card.setGivenName(token.toString()); } else if (counter == 1) { card.setFamilyName(token.toString()); } else if (counter == 2) { // backwards compatibility card.setSortString(token.toString());
card.setFamilyName(token.toString()); } else if (counter == 2) { card.setSortString(token.toString()); } else if (counter == 3) { card.setNickName(token.toString());
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: 3 Number of AST nodes: 3
1
card.setGivenName(token.toString());
1
card.setFamilyName(token.toString());
2
					} else if (counter == 1) {
2
					} else if (counter == 2) {
3
						card.setFamilyName(token.toString());
3
						card.setSortString(token.toString());
4
					} else if (counter == 2) {
4
					} else if (counter == 3) {
5
						// backwards compatibility
5
						
6
						card.setSortString(token.toString());
6
card.setNickName(token.toString());
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons3
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    14
    card.setGivenName(token.toString());
    14
    card.setGivenName(token.toString());
    15
    card.setFamilyName(token.toString());
    Differences
    Expression1Expression2Difference
    setGivenNamesetFamilyNameMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression card.setGivenName(token.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression card.setFamilyName(token.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression card.setGivenName(token.toString()) is a void method call, and thus it cannot be parameterized
    Expression card.setFamilyName(token.toString()) is a void method call, and thus it cannot be parameterized
    15
    card.setFamilyName(token.toString());
    Precondition Violations (4)
    Row Violation
    1Expression card.setGivenName(token.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression card.setFamilyName(token.toString()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression card.setGivenName(token.toString()) is a void method call, and thus it cannot be parameterized
    4Expression card.setFamilyName(token.toString()) is a void method call, and thus it cannot be parameterized