CPD Resultaten

Het volgende document bevat de resultaten van PMD's CPD 5.2.1.

Dubbelingen

Bestand Regel
nl\mineleni\openls\parser\OpenLSGeocodeResponseParser.java 90
nl\mineleni\openls\parser\OpenLSReverseGeocodeResponseParser.java 86
				((GeocodedAddress) (this.objStack.peek())).setAddress(address);
			}
			break;
		case "streetaddress":
			final StreetAddress streetaddress = (StreetAddress) (this.objStack
					.pop());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek()))
				.setStreetAddress(streetaddress);
			}
			break;
		case "building":
			final Building building = (Building) (this.objStack.pop());
			if (this.objStack.peek().getClass() == StreetAddress.class) {
				((StreetAddress) (this.objStack.peek())).setBuilding(building);
			}
			break;
		case "street":
			final Street street = (Street) (this.objStack.pop());
			street.setStreet(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == StreetAddress.class) {
				((StreetAddress) (this.objStack.peek())).setStreet(street);
			}
			break;
		case "place":
			final Place place = (Place) (this.objStack.pop());
			place.setPlace(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek())).addPlace(place);
			}
			break;
		case "postalcode":
			final PostalCode pc = (PostalCode) (this.objStack.pop());
			pc.setPostalCode(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek())).setPostalCode(pc);
			}
			break;
Bestand Regel
nl\mineleni\openls\parser\OpenLSGeocodeRequestParser.java 57
nl\mineleni\openls\parser\OpenLSGeocodeResponseParser.java 90
				((GeocodeRequest) (this.objStack.peek())).addAddress(address);
			}
			break;
		case "streetaddress":
			final StreetAddress streetaddress = (StreetAddress) (this.objStack
			        .pop());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek()))
				        .setStreetAddress(streetaddress);
			}
			break;
		case "building":
			final Building building = (Building) (this.objStack.pop());
			if (this.objStack.peek().getClass() == StreetAddress.class) {
				((StreetAddress) (this.objStack.peek())).setBuilding(building);
			}
			break;
		case "street":
			final Street street = (Street) (this.objStack.pop());
			street.setStreet(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == StreetAddress.class) {
				((StreetAddress) (this.objStack.peek())).setStreet(street);
			}
			break;
		case "place":
			final Place place = (Place) (this.objStack.pop());
			place.setPlace(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek())).addPlace(place);
			}
			break;
		case "postalcode":
			final PostalCode pc = (PostalCode) (this.objStack.pop());
			pc.setPostalCode(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek())).setPostalCode(pc);
			}
			break;
		default:
			return;
		}
	}

	/**
	 * Gets the geocode request.
	 *
	 * @return the geocode request
	 */
	public GeocodeRequest getGeocodeRequest() {
Bestand Regel
nl\mineleni\openls\parser\OpenLSGeocodeRequestParser.java 57
nl\mineleni\openls\parser\OpenLSReverseGeocodeResponseParser.java 87
				((GeocodeRequest) (this.objStack.peek())).addAddress(address);
			}
			break;
		case "streetaddress":
			final StreetAddress streetaddress = (StreetAddress) (this.objStack
			        .pop());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek()))
				        .setStreetAddress(streetaddress);
			}
			break;
		case "building":
			final Building building = (Building) (this.objStack.pop());
			if (this.objStack.peek().getClass() == StreetAddress.class) {
				((StreetAddress) (this.objStack.peek())).setBuilding(building);
			}
			break;
		case "street":
			final Street street = (Street) (this.objStack.pop());
			street.setStreet(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == StreetAddress.class) {
				((StreetAddress) (this.objStack.peek())).setStreet(street);
			}
			break;
		case "place":
			final Place place = (Place) (this.objStack.pop());
			place.setPlace(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek())).addPlace(place);
			}
			break;
		case "postalcode":
			final PostalCode pc = (PostalCode) (this.objStack.pop());
			pc.setPostalCode(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == Address.class) {
				((Address) (this.objStack.peek())).setPostalCode(pc);
			}
			break;
Bestand Regel
nl\mineleni\openls\parser\OpenLSGeocodeRequestParser.java 151
nl\mineleni\openls\parser\OpenLSGeocodeResponseParser.java 222
			break;
		case "address":
			final Address address = new Address();
			this.objStack.push(address);
			for (int i = 0; i < attributes.getLength(); i++) {
				final String key = attributes.getQName(i);
				final String value = attributes.getValue(i);
				if (key.equalsIgnoreCase("countryCode")) {
					address.setCountryCode(value);
				}
			}
			break;
		case "streetaddress":
			this.objStack.push(new StreetAddress());
			break;
		case "building":
			final Building building = new Building();
			this.objStack.push(building);
			for (int i = 0; i < attributes.getLength(); i++) {
				final String key = attributes.getQName(i);
				final String value = attributes.getValue(i);
				if (key.equalsIgnoreCase("number")) {
					building.setNumber(value);
				}
			}
			break;
		case "street":
			this.objStack.push(new Street());
			break;
		case "place":
			final Place place = new Place();
			this.objStack.push(place);
			for (int i = 0; i < attributes.getLength(); i++) {
				final String key = attributes.getQName(i);
				final String value = attributes.getValue(i);
				if (key.equalsIgnoreCase("type")) {
					place.setType(value);
				}
			}
			break;
		case "postalcode":
			this.objStack.push(new PostalCode());
			break;
		default:
			return;
		}

	}
}
Bestand Regel
nl\mineleni\openls\parser\OpenLSReverseGeocodeRequestParser.java 147
nl\mineleni\openls\parser\OpenLSReverseGeocodeResponseParser.java 198
			this.objStack.push(new Position());
			break;
		case "point":
			final Point point = new Point();
			for (int i = 0; i < attributes.getLength(); i++) {
				final String key = attributes.getQName(i);
				final String value = attributes.getValue(i);
				if (key.equalsIgnoreCase("srsName")) {
					point.setSrsName(value);
				}
			}
			this.objStack.push(point);
			break;
		case "pos":
			final Pos pos = new Pos();
			for (int i = 0; i < attributes.getLength(); i++) {
				final String key = attributes.getQName(i);
				final String value = attributes.getValue(i);
				if (key.equalsIgnoreCase("dimension")) {
					pos.setDimension(Integer.parseInt(value));
				}
			}
			this.objStack.push(pos);
			break;
		case "reversegeocodepreference":
Bestand Regel
nl\mineleni\cbsviewer\servlet\wms\WMSClientServlet.java 576
nl\mineleni\cbsviewer\servlet\wms\WMSClientServlet.java 646
		for (int l = 0; l < layerNames.length; l++) {
			final String key = layerNames[l] + "::" + styleNames[l];
			if (this.legendCache.containsKey(key)) {
				// in de cache kijken of we deze legenda afbeelding nog
				// hebben
				final CacheImage cImg = this.legendCache.get(key);
				if (null != cImg) {
					// element zou verlopen kunnen zijn
					legends[l] = new File(cImg.getName());
					if (!legends[l].exists()) {
						// (mogelijk) is het bestand gewist..
						ImageIO.write(this.legendCache.get(key).getImage(),
						        "png", legends[l]);
					}
					LOGGER.debug("Legenda bestand uit cache: "
					        + legends[l].getAbsolutePath());
				}
			} else {
Bestand Regel
nl\mineleni\openls\parser\OpenLSGeocodeResponseParser.java 77
nl\mineleni\openls\parser\OpenLSReverseGeocodeResponseParser.java 72
				((GeocodedAddress) (this.objStack.peek())).setPoint(point);
			}
			break;
		case "pos":
			final Pos pos = (Pos) (this.objStack.pop());
			pos.setXY(this.eValBuf.toString());
			if (this.objStack.peek().getClass() == Point.class) {
				((Point) (this.objStack.peek())).addPos(pos);
			}
			break;
		case "address":
			final Address address = (Address) (this.objStack.pop());
			if (this.objStack.peek().getClass() == GeocodedAddress.class) {