Fork me on GitHub

CPD Results

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

Duplications

File Line
fr/paris/lutece/plugins/identitystore/modules/test/business/TestDefinitionDAO.java 207
fr/paris/lutece/plugins/identitystore/modules/test/business/TestIdentityAttributeDAO.java 223
fr/paris/lutece/plugins/identitystore/modules/test/business/TestIdentityDAO.java 215
        List<TestDefinition> testDefinitionList = new ArrayList<>( );

        StringBuilder builder = new StringBuilder( );

        if ( !listIds.isEmpty( ) )
        {
            for ( int i = 0; i < listIds.size( ); i++ )
            {
                builder.append( "?," );
            }

            String placeHolders = builder.deleteCharAt( builder.length( ) - 1 ).toString( );
            String stmt = SQL_QUERY_SELECTALL_BY_IDS + placeHolders + ")";

            try ( DAOUtil daoUtil = new DAOUtil( stmt, plugin ) )
            {
                int index = 1;
                for ( Integer n : listIds )
                {
                    daoUtil.setInt( index++, n );
                }

                daoUtil.executeQuery( );
                while ( daoUtil.next( ) )
                {
File Line
fr/paris/lutece/plugins/identitystore/modules/test/business/TestIdentityAttributeDAO.java 156
fr/paris/lutece/plugins/identitystore/modules/test/business/TestIdentityAttributeDAO.java 245
            daoUtil.executeQuery( );

            while ( daoUtil.next( ) )
            {
                TestIdentityAttribute testIdentityAttribute = new TestIdentityAttribute( );
                int nIndex = 1;

                testIdentityAttribute.setId( daoUtil.getInt( nIndex++ ) );
                testIdentityAttribute.setKey( daoUtil.getString( nIndex++ ) );
                testIdentityAttribute.setValue( daoUtil.getString( nIndex++ ) );
                testIdentityAttribute.setCertifier( daoUtil.getString( nIndex++ ) );
                testIdentityAttribute.setCertificationDate( daoUtil.getDate( nIndex++ ) );
                testIdentityAttribute.setCertificationLevel( daoUtil.getInt( nIndex ) );

                testIdentityAttributeList.add( testIdentityAttribute );
            }