Object[] array = ccList.getSelectedValues();
for (int j = 0; j < array.length; j++) {
dialogAddressbookListModel[1]
.removeElement((IHeaderItem) array[j]);
}
Object[] array = bccList.getSelectedValues();
for (int j = 0; j < array.length; j++) {
dialogAddressbookListModel[2]
.removeElement((IHeaderItem) array[j]);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/contact/SelectAddressDialog.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/contact/SelectAddressDialog.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | Object[] array = ccList.getSelectedValues();↵ | | 1 | Object[] array = bccList.getSelectedValues();↵
|
|
2 | for (int j = 0; j < array.length; j++) {↵ | | 2 | for (int j = 0; j < array.length; j++) {↵
|
3 | dialogAddressbookListModel[1]↵ | | 3 | dialogAddressbookListModel[2]↵
|
4 | .removeElement((IHeaderItem) array[j]);↵ | | 4 | .removeElement((IHeaderItem) array[j]);↵
|
5 | } | | 5 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
33 | Object[] array = ccList.getSelectedValues(); | | 37 | Object[] array = bccList.getSelectedValues(); |
34 | for (int j = 0; j < array.length; j++) | | 38 | for (int j = 0; j < array.length; j++) |
35 | dialogAddressbookListModel[1].removeElement((IHeaderItem)array[j]); | | 39 | dialogAddressbookListModel[2].removeElement((IHeaderItem)array[j]); |
Precondition Violations (0)
Row |
Violation |