CPD Results

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

Duplications

FileLine
openlr/location/PolygonLocation.java99
openlr/rawLocRef/RawPolygonLocRef.java87
		sb.append(" locType: ").append(locType);
		sb.append(" corners: ");
		sb.append(" [");
		for (int i = 0; i < corners.size(); i++) {
			sb.append(corners.get(i));
			if (i != corners.size() - 1) {
				sb.append(",");
			}
		}
		sb.append("]");
		return sb.toString();
	}
	
	/**{
	 * {@inheritDoc}
	 */
	@Override
	public final int calculateHashCode() {
		HashCodeBuilder builder = new HashCodeBuilder();
		builder.append(corners).append(locType);
FileLine
openlr/collection/OpenLongHashSet.java244
openlr/collection/OpenLongIntHashMap.java394
		this.distinct--;

		if (this.distinct < this.lowWaterMark) {
			int newCapacity = chooseShrinkCapacity(this.distinct,
					this.minLoadFactor, this.maxLoadFactor);
			rehash(newCapacity);
		}

		return true;
	}

	/**
	 * Initializes the receiver.
	 *
	 * @param initialCapacity the initial capacity of the receiver.
	 * @param minLoadFactor the minLoadFactor of the receiver.
	 * @param maxLoadFactor the maxLoadFactor of the receiver.
	 */
	protected final void setUp(final int initialCapacity, final double minLoadFactor,
			final double maxLoadFactor) {
		int capacity = initialCapacity;
		super.setUp(capacity, minLoadFactor, maxLoadFactor);
		capacity = nextPrime(capacity);
		if (capacity == 0) {
			capacity = 1; // open addressing needs at least one FREE slot at any
							// time.
		}

		this.table = new long[capacity];
		this.values = new int[capacity];