attributes.put("columba.from", ""); } Address[] to = basicHeader.getTo(); if (to.length > 0) { // We save only the first item in the to-list attributes.put("columba.to", to[0]); } else { attributes.put("columba.to", ""); }
attributes.put("columba.to", ""); } Address[] cc = basicHeader.getCc(); if (cc.length > 0) { // We save only the first item in the cc-list attributes.put("columba.cc", cc[0]); } else { attributes.put("columba.cc", ""); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/message/ColumbaHeader.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/message/ColumbaHeader.java
Method name: void ColumbaHeader(Header) Method name: void ColumbaHeader(Header)
Number of AST nodes: 5 Number of AST nodes: 5
1
attributes.put("columba.from", "");
1
attributes.put("columba.to", "");
2
		}
2
		}
3
		Address[] to = basicHeader.getTo();
3
		Address[] cc = basicHeader.getCc();
4
		if (to.length > 0) {
4
		if (cc.length > 0) {
5
			// We save only the first item in the to-list
5
			// We save only the first item in the cc-list
6
			attributes.put("columba.to", to[0]);
6
			attributes.put("columba.cc", cc[0]);
7
		} else {
7
		} else {
8
			attributes.put("columba.to", "");
8
			attributes.put("columba.cc", "");
9
		}
9
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in the same method
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    12
    Address[] to = basicHeader.getTo();
    12
    Address[] to = basicHeader.getTo();
    16
    Address[] cc = basicHeader.getCc();
    Differences
    Expression1Expression2Difference
    toccVARIABLE_NAME_MISMATCH
    getTogetCcMETHOD_INVOCATION_NAME_MISMATCH
    16
    Address[] cc = basicHeader.getCc();
    13
    if (to.length > 0)
    13
    if (to.length > 0)
    17
    if (cc.length > 0)
    Differences
    Expression1Expression2Difference
    toccVARIABLE_NAME_MISMATCH
    17
    if (cc.length > 0)
    14
    attributes.put("columba.to", to[0]);
    14
    attributes.put("columba.to", to[0]);
    18
    attributes.put("columba.cc", cc[0]);
    Differences
    Expression1Expression2Difference
    "columba.to""columba.cc"LITERAL_VALUE_MISMATCH
    toccVARIABLE_NAME_MISMATCH
    18
    attributes.put("columba.cc", cc[0]);
    else
    else
    15
    attributes.put("columba.to", "");
    15
    attributes.put("columba.to", "");
    19
    attributes.put("columba.cc", "");
    Differences
    Expression1Expression2Difference
    "columba.to""columba.cc"LITERAL_VALUE_MISMATCH
    19
    attributes.put("columba.cc", "");
    Precondition Violations (0)
    Row Violation