if (address.getDisplayName().length() != 0) { result.append(address.getDisplayName()); result.append(" "); result.append("<" + address.getMailAddress() + ">"); } else result.append(address.getShortAddress());
if (address.getDisplayName().length() != 0) { result.append(address.getDisplayName()); result.append(" "); result.append("<" + address.getMailAddress() + ">"); } else result.append(address.getMailAddress());
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/util/AddressListRenderer.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/util/AddressListRenderer.java
Method name: String createAddressHTMLString(Address) Method name: String createAddressString(Address)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (address.getDisplayName().length() != 0) {
1
if (address.getDisplayName().length() != 0) {
2
			result.append(address.getDisplayName());
2
			result.append(address.getDisplayName());
3
			result.append(" ");
3
			result.append(" ");
4
			result.append("<" + address.getMailAddress() + ">");
4
			result.append("<" + address.getMailAddress() + ">");
5
		} else
5
		} else
6
			result.append(address.getShortAddress());
6
			result.append(address.getMailAddress());
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.2
Clones locationClones are declared in the same class
Number of node comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    9
    if (address.getDisplayName().length() != 0)
    2
    if (address.getDisplayName().length() != 0)
    10
    result.append(address.getDisplayName());
    3
    result.append(address.getDisplayName());
    11
    result.append(" ");
    4
    result.append(" ");
    12
    result.append("<" + address.getMailAddress() + ">");
    12
    result.append("<" + address.getMailAddress() + ">");
    5
    result.append("<" + address.getMailAddress() + ">");
    Differences
    Expression1Expression2Difference
    ">"">"LITERAL_VALUE_MISMATCH
    "<""<"LITERAL_VALUE_MISMATCH
    5
    result.append("<" + address.getMailAddress() + ">");
    else
    else
    13
    result.append(address.getShortAddress());
    13
    result.append(address.getShortAddress());
    6
    result.append(address.getMailAddress());
    Differences
    Expression1Expression2Difference
    getShortAddressgetMailAddressMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression address.getShortAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression address.getMailAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    result.append(address.getMailAddress());
    Precondition Violations (2)
    Row Violation
    1Expression address.getShortAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression address.getMailAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted