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/plugin/modules/sample/web/ProjectJspBean.java 250
fr/paris/lutece/plugins/plugin/modules/sample/web/ProjectXPage.java 209
    public String getModifyProject( HttpServletRequest request )
    {
        int nId = Integer.parseInt( request.getParameter( PARAMETER_ID_PROJECT ) );

        if ( _project == null || ( _project.getId(  ) != nId ) )
        {
            Optional<Project> optProject = ProjectHome.findByPrimaryKey( nId );
            _project = optProject.orElseThrow( ( ) -> new AppException(ERROR_RESOURCE_NOT_FOUND ) );
        }


        Map<String, Object> model = getModel(  );
        model.put( MARK_PROJECT, _project );
        model.put( SecurityTokenService.MARK_TOKEN, SecurityTokenService.getInstance( ).getToken( request, ACTION_MODIFY_PROJECT ) );

        return getPage( PROPERTY_PAGE_TITLE_MODIFY_PROJECT, TEMPLATE_MODIFY_PROJECT, model );
File Line
fr/paris/lutece/plugins/plugin/modules/sample/business/ProjectDAO.java 158
fr/paris/lutece/plugins/plugin/modules/sample/business/ProjectDAO.java 245
	        daoUtil.executeQuery(  );
	
	        while ( daoUtil.next(  ) )
	        {
	            Project project = new Project(  );
	            int nIndex = 1;
	            
	            project.setId( daoUtil.getInt( nIndex++ ) );
			    project.setTitle( daoUtil.getString( nIndex++ ) );
			    project.setDescription( daoUtil.getString( nIndex++ ) );
			    project.setRangeOfPublicationDate( daoUtil.getDate( nIndex++ ) );
			    project.setDate( daoUtil.getString( nIndex++ ) );
			    project.setChoice( daoUtil.getString( nIndex ) );
	
	            projectList.add( project );
	        }