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/myportal/modules/myfavorites/business/MyFavoritesDAO.java 177
fr/paris/lutece/plugins/myportal/modules/myfavorites/business/MyFavoritesDAO.java 207
        daoUtil.setString( 1, idUser );

        daoUtil.executeQuery( );

        while ( daoUtil.next( ) )
        {
            MyFavorites myFavorites = new MyFavorites( );
            int nIndex = 1;

            myFavorites.setId( daoUtil.getInt( nIndex++ ) );
            myFavorites.setUrl( daoUtil.getString( nIndex++ ) );
            myFavorites.setIdIcon( daoUtil.getInt( nIndex++ ) );
            myFavorites.setLabel( daoUtil.getString( nIndex++ ) );
            myFavorites.setIdUser( daoUtil.getString( nIndex++ ) );
            myFavorites.setOrder( daoUtil.getInt( nIndex++ ) );

            myFavoritesList.add( myFavorites );
        }

        daoUtil.free( );
        return myFavoritesList;
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public List<MyFavorites> selectMyFavoritessList( Plugin plugin )
File Line
fr/paris/lutece/plugins/myportal/modules/myfavorites/web/MyFavoritesXPage.java 166
fr/paris/lutece/plugins/myportal/modules/myfavorites/web/MyFavoritesXPage.java 321
        _myfavorites = ( _myfavorites != null ) ? _myfavorites : new MyFavorites( );

        String strIdWidget = request.getParameter( PARAMETER_ID_WIDGET );
        String strMyPortalMyFavoritesUrlReturn = request.getParameter( MARK_MYFAVORITES_URL_RETURN );
        String strMyPortalUrlReturn = request.getParameter( PARAMETER_MYPORTAL_URL_RETURN );

        if ( StringUtils.isBlank( strMyPortalMyFavoritesUrlReturn ) )
        {
            strMyPortalMyFavoritesUrlReturn = StringUtils.EMPTY;
        }

        if ( StringUtils.isBlank( strMyPortalUrlReturn ) )
        {
            strMyPortalUrlReturn = StringUtils.EMPTY;
        }

        if ( StringUtils.isNotBlank( strIdWidget ) && StringUtils.isNumeric( strIdWidget ) )
        {
            model.put( MARK_ICONS_LIST, IconService.getInstance( ).getIconFO( ) );
            model.put( PARAMETER_FAVORITES_URL_RETURN, strMyPortalMyFavoritesUrlReturn );
            model.put( MARK_MYPORTAL_URL_RETURN, strMyPortalUrlReturn );
            model.put( MARK_ID_WIDGET, strIdWidget );
File Line
fr/paris/lutece/plugins/myportal/modules/myfavorites/business/MyFavoritesDAO.java 114
fr/paris/lutece/plugins/myportal/modules/myfavorites/business/MyFavoritesDAO.java 296
        daoUtil.setInt( 1, nKey );
        daoUtil.executeQuery( );
        MyFavorites myFavorites = null;

        if ( daoUtil.next( ) )
        {
            myFavorites = new MyFavorites( );
            int nIndex = 1;

            myFavorites.setId( daoUtil.getInt( nIndex++ ) );
            myFavorites.setUrl( daoUtil.getString( nIndex++ ) );
            myFavorites.setIdIcon( daoUtil.getInt( nIndex++ ) );
            myFavorites.setLabel( daoUtil.getString( nIndex++ ) );
            myFavorites.setIdUser( daoUtil.getString( nIndex++ ) );
            myFavorites.setOrder( daoUtil.getInt( nIndex++ ) );
        }

        daoUtil.free( );
        return myFavorites;
    }

    /**
     * {@inheritDoc }
     */
    @Override
    public void delete( int nKey, Plugin plugin )