Fork me on GitHub

CPD Results

The following document contains the results of PMD's CPD 5.3.5.

Duplications

File Line
fr/paris/lutece/plugins/contextinclude/business/ContextDAO.java 181
fr/paris/lutece/plugins/contextinclude/business/ContextDAO.java 215
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ALL + SQL_ORDER_BY_PRIORITY, plugin );
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            int nIndex = 1;
            Context context = new Context(  );
            context.setIdContext( daoUtil.getInt( nIndex++ ) );
            context.setHtml( daoUtil.getString( nIndex++ ) );
            context.setNbParams( daoUtil.getInt( nIndex++ ) );
            context.setPriority( daoUtil.getInt( nIndex++ ) );
            context.setStrict( daoUtil.getBoolean( nIndex++ ) );
            context.setActive( daoUtil.getBoolean( nIndex++ ) );

            listContexts.add( context );
        }

        daoUtil.free(  );

        return listContexts;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public List<Context> findActiveContexts( Plugin plugin )
File Line
fr/paris/lutece/plugins/contextinclude/business/ContextDAO.java 181
fr/paris/lutece/plugins/contextinclude/business/ContextDAO.java 215
fr/paris/lutece/plugins/contextinclude/business/ContextDAO.java 250
        DAOUtil daoUtil = new DAOUtil( SQL_QUERY_SELECT_ALL + SQL_ORDER_BY_PRIORITY, plugin );
        daoUtil.executeQuery(  );

        while ( daoUtil.next(  ) )
        {
            int nIndex = 1;
            Context context = new Context(  );
            context.setIdContext( daoUtil.getInt( nIndex++ ) );
            context.setHtml( daoUtil.getString( nIndex++ ) );
            context.setNbParams( daoUtil.getInt( nIndex++ ) );
            context.setPriority( daoUtil.getInt( nIndex++ ) );
            context.setStrict( daoUtil.getBoolean( nIndex++ ) );
            context.setActive( daoUtil.getBoolean( nIndex++ ) );

            listContexts.add( context );
        }

        daoUtil.free(  );

        return listContexts;
    }