CPD Results

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

Duplications

File Line
org/itracker/model/util/UserUtilities.java 412
org/itracker/persistence/dao/UserDAOImpl.java 136
                new HashMap<Integer, Set<PermissionType>>();

        for (int i = 0; i < permissionsList.size(); i++) {
            Permission permission = permissionsList.get(i);

            // Super user has access to all projects, which is indicated by the "null" project. 
            final Integer projectId = (permission.getProject() == null)
                    ? null : permission.getProject().getId();

            Set<PermissionType> projectPermissions = permissionsByProjectId.get(projectId);

            if (projectPermissions == null) {
                // First permission for the project. 
                projectPermissions = new HashSet<PermissionType>();
                permissionsByProjectId.put(projectId, projectPermissions);
            } //else { // Add the permission to the existing set of permissions for the project. }

            PermissionType permissionType = permission.getPermissionType();
            projectPermissions.add(permissionType);
        }

R.Ø.S.A.