if (address.getDisplayName().length() != 0) { result.append(address.getDisplayName()); result.append(" "); result.append("<" + address.getMailAddress() + ">"); } else result.append(address.getMailAddress());
if (address.getDisplayName().length() != 0) { result.append(address.getDisplayName()); result.append(" "); result.append("<" + address.getMailAddress() + ">"); } else result.append(address.getShortAddress());
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 createAddressHTMLString(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.getMailAddress());
6
			result.append(address.getShortAddress());
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 in the same method
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)1.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (address.getDisplayName().length() != 0)
    9
    if (address.getDisplayName().length() != 0)
    4
    result.append(address.getDisplayName());
    10
    result.append(address.getDisplayName());
    5
    result.append(" ");
    11
    result.append(" ");
    6
    result.append("<" + address.getMailAddress() + ">");
    6
    result.append("<" + address.getMailAddress() + ">");
    12
    result.append("<" + address.getMailAddress() + ">");
    Differences
    Expression1Expression2Difference
    ">"">"LITERAL_VALUE_MISMATCH
    "<""<"LITERAL_VALUE_MISMATCH
    12
    result.append("<" + address.getMailAddress() + ">");
    else
    else
    7
    result.append(address.getMailAddress());
    7
    result.append(address.getMailAddress());
    13
    result.append(address.getShortAddress());
    Differences
    Expression1Expression2Difference
    getMailAddressgetShortAddressMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression address.getMailAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression address.getShortAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13
    result.append(address.getShortAddress());
    Precondition Violations (2)
    Row Violation
    1Expression address.getMailAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression address.getShortAddress() cannot be parameterized, because it has dependencies to/from statements that will be extracted