CPD Results

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

Duplications

FileProjectLine
org/kuali/mobility/alerts/service/AlertsServiceImpl.javaCampus Alerts Implementation56
org/kuali/mobility/alerts/service/AlertsServiceImpl.javaCampus Alerts Implementation91
	public int findAlertCountByCampus(String campus) {
		String selectedCampus = "ALL";
		if (campus != null && !"".equals(campus.trim())) {
			selectedCampus = campus;
		}

		List<Alert> campusStatuses = this.getAlertsByCode(selectedCampus);
		if (campusStatuses != null && campusStatuses.size() > 1) {
			List<Alert> filteredStatuses = new ArrayList<Alert>();
			Iterator<Alert> iter = campusStatuses.iterator();
			while (iter.hasNext()) {
				Alert status = (Alert) iter.next();
				if (isAlertToReport(status) && !filteredStatuses.contains(status)) {
					filteredStatuses.add(status);
				}
			}
			campusStatuses = filteredStatuses;
		}
		if (campusStatuses == null || campusStatuses.isEmpty()) {
FileProjectLine
org/kuali/mobility/conference/service/ConferenceServiceImpl.javaConference Implementation56
org/kuali/mobility/conference/service/ConferenceServiceImpl.javaConference Implementation84
			String json = retrieveJSON(featuredSpeakersFeedUrl);

			JSONArray simpleContentArray = (JSONArray) JSONSerializer.toJSON(json);
			
			for (Iterator<JSONObject> iter = simpleContentArray.iterator(); iter.hasNext();) {
				try {
					JSONObject contentBlockObject = iter.next();
					
					ContentBlock contentBlock = new ContentBlock();
					contentBlock.setContentBlock(contentBlockObject.getString("welcome"));

					contentBlocks.add(contentBlock);
				} catch (Exception e) {
					LOG.error(e.getMessage(), e);
				}
			}
		} catch (Exception e) {
			LOG.error(e.getMessage(), e);
		}

		return contentBlocks;
	}
	
	@SuppressWarnings("unchecked")
	@Override
	public List<Attendee> findAllAttendees(char start, char end) {
FileProjectLine
org/kuali/mobility/maps/listeners/MapsBootstrapListener.javaMaps Webapp Resources12
org/kuali/mobility/mdot/listeners/KMEBootstrapListener.javamDot Webapp12
public class KMEBootstrapListener extends BootstrapListener {
	
	@Override
	public HomeScreen bootstrapHomeScreenTools(AdminService adminService) {
		HomeScreen home = new HomeScreen();
		home.setAlias("PUBLIC");
		home.setTitle("Kuali Mobile");
		adminService.saveHomeScreen(home);

		List<HomeTool> tools = new ArrayList<HomeTool>();
		
		Tool tool = new Tool();
		tool.setAlias("maps");
		tool.setTitle("Maps");
		tool.setUrl("maps");
		tool.setDescription("Get from here to there. Search for buildings by name.");
		tool.setIconUrl("images/service-icons/srvc-maps.png");
		adminService.saveTool(tool);
		HomeTool ht = new HomeTool(home, tool, 0);