CPD Results

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

Duplications

FileLine
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/AddUnrealGoalBotDialog.java142
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/ListEnvironmentsDialog.java42
				.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

		clients.addCollectionListener(new CollectionEventAdaptor<EnvironmentService>() {

			@Override
			public void postAddEvent(
					Collection<EnvironmentService> alreadyAdded,
					final Collection<EnvironmentService> whereWereAdded) {
				SwingUtilities.invokeLater(new Runnable() {

					@Override
					public void run() {
						Collection<SelectableEnvironment> s = SelectableEnvironment
								.fromCollection(whereWereAdded);
						environmentList.setModel(new DefaultComboBoxModel(s
								.toArray()));
					}
				});
			}

			@Override
			public void postRemoveEvent(
					Collection<EnvironmentService> alreadyRemoved,
					final Collection<EnvironmentService> whereWereRemoved) {
				SwingUtilities.invokeLater(new Runnable() {

					@Override
					public void run() {
						Collection<SelectableEnvironment> s = SelectableEnvironment
								.fromCollection(whereWereRemoved);
						environmentList.setModel(new DefaultComboBoxModel(s
								.toArray()));
					}
				});
			}
		});

		add(environmentList);
FileLine
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/AddNativeBotDialog.java103
nl/tudelft/goal/ut2004/visualizer/gui/dialogs/AddUnrealGoalBotDialog.java113
		setTitle("Add UnrealGoal bot");
		setLayout(new FlowLayout());

		add(new JLabel("Name"));
		this.nameField = new JTextField();
		this.nameField.setColumns(15);
		add(nameField);

		// Add a spinner from 1 to 7 with increments of 1
		add(new JLabel("Level"));
		SpinnerNumberModel levelModel = new SpinnerNumberModel(4, 1, 7, 1);
		this.levelSpinner = new JSpinner(levelModel);
		add(levelSpinner);

		add(new JLabel("Team"));
		this.teamList = new JComboBox(new String[] { "Other", "Red", "Blue" });
		this.teamList.setSelectedIndex(0);
		add(teamList);

		location = new WaypointBox();