if (counter == 8) {
card.addPhone(new PhoneModel(token.toString(),
PhoneModel.TYPE_BUSINESS_PHONE));
} else if (counter == 9) {
card.addPhone(new PhoneModel(token.toString(),
PhoneModel.TYPE_HOME_PHONE));
}
if (counter == 8) {
card.addPhone(new PhoneModel(token.toString(),
PhoneModel.TYPE_BUSINESS_PHONE));
} else if (counter == 9) {
card.addPhone(new PhoneModel(token.toString(),
PhoneModel.TYPE_HOME_PHONE));
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/folder/importfilter/MozillaCSVAddressbookImporter.java
|
|
File path: /columba-1.4-src/plugins/org.columba.example.CSVAddressbookImportFilter/src/CSVAddressbookImporter.java
|
Method name: void importAddressbook(File)
|
|
Method name: void importAddressbook(File)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (counter == 8) {
↵ | | 1 | if (counter == 8) {↵
|
2 | card.addPhone(new PhoneModel(token.toString(),
↵ | | 2 | card.addPhone(new PhoneModel(token.toString(),↵
|
3 | PhoneModel.TYPE_BUSINESS_PHONE));
↵ | | 3 | PhoneModel.TYPE_BUSINESS_PHONE));↵
|
4 | } else if (counter == 9) {
↵ | | 4 | } else if (counter == 9) {↵
|
5 | card.addPhone(new PhoneModel(token.toString(),
↵ | | 5 | card.addPhone(new PhoneModel(token.toString(),↵
|
6 | PhoneModel.TYPE_HOME_PHONE));
↵ | | 6 | PhoneModel.TYPE_HOME_PHONE));↵
|
7 | } | | 7 | }
|
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 14.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
25 | else if (counter == 8) | | 24 | else if (counter == 8) |
26 | card.addPhone(new PhoneModel(token.toString(), PhoneModel.TYPE_BUSINESS_PHONE)); | | 25 | card.addPhone(new PhoneModel(token.toString(), PhoneModel.TYPE_BUSINESS_PHONE)); |
27 | | | 26 | |
28 | card.addPhone(new PhoneModel(token.toString(), PhoneModel.TYPE_HOME_PHONE)); | | 27 | card.addPhone(new PhoneModel(token.toString(), PhoneModel.TYPE_HOME_PHONE)); |
Precondition Violations (0)
Row |
Violation |