CPD Results

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

Duplications

File Line
org/microcol/gui/AboutDialog.java 32
org/microcol/gui/WaitingDialog.java 45
		add(label, new GridBagConstraints(0, 0, 1, 1, 1.0D, 1.0D, GridBagConstraints.SOUTHEAST, GridBagConstraints.NONE,
				new Insets(0, 0, 10, 10), 0, 0));

		final JButton buttonOk = new JButton(text.get("dialog.ok"));
		buttonOk.addActionListener(e -> {
			setVisible(false);
		});
		buttonOk.requestFocus();
		add(buttonOk, new GridBagConstraints(0, 10, 1, 1, 1.0D, 1.0D, GridBagConstraints.SOUTHEAST,
				GridBagConstraints.NONE, new Insets(0, 0, 10, 10), 0, 0));

		pack();
		setLocation(viewUtil.centerWindow(this));
		setModal(true);
	}

}
File Line
org/microcol/gui/PathPlanning.java 36
org/microcol/gui/PathPlanning.java 84
			final WhatToDoWithPointInPath whatToDoWithPointInPath) {
		final int diff = Math.abs(tileTo.getY() - tileFrom.getY()) - Math.abs(tileTo.getX() - tileFrom.getX());
		if (diff < 0) {
			float a = (tileFrom.getY() - tileTo.getY()) / (float) (tileFrom.getX() - tileTo.getX());
			float b = tileFrom.getY() - tileFrom.getX() * a;
			if (tileFrom.getX() < tileTo.getX()) {
File Line
org/microcol/gui/PathPlanning.java 47
org/microcol/gui/PathPlanning.java 97
				for (int x = tileFrom.getX(); x >= tileTo.getX(); x--) {
					int y = Math.round(a * x + b);
					addPoint(tileFrom, whatToDoWithPointInPath, Location.of(x, y));
				}
			}
		} else if (!tileFrom.equals(tileTo)) {
			float a = (tileFrom.getX() - tileTo.getX()) / (float) (tileFrom.getY() - tileTo.getY());
			float b = tileFrom.getX() - tileFrom.getY() * a;
			if (tileFrom.getY() < tileTo.getY()) {