identity.setString(ISemanticContext.CONTEXT_ATTR_EMAIL_ADDRESS, ISemanticContext.CONTEXT_NAMESPACE_CORE, email); if (firstname != null) identity.setString(ISemanticContext.CONTEXT_ATTR_FIRST_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, firstname); if (lastname != null) identity.setString(ISemanticContext.CONTEXT_ATTR_LAST_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, lastname);
identity.setString(ISemanticContext.CONTEXT_ATTR_DISPLAY_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, displayname); if (email != null) identity.setString(ISemanticContext.CONTEXT_ATTR_EMAIL_ADDRESS, ISemanticContext.CONTEXT_NAMESPACE_CORE, email); if (firstname != null) identity.setString(ISemanticContext.CONTEXT_ATTR_FIRST_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, firstname);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/frame/AddressbookFrameController.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/frame/AddressbookFrameController.java
Method name: void valueChanged(ListSelectionEvent) Method name: void valueChanged(ListSelectionEvent)
Number of AST nodes: 5 Number of AST nodes: 5
1
identity.setString(ISemanticContext.CONTEXT_ATTR_DISPLAY_NAME,
2
						ISemanticContext.CONTEXT_NAMESPACE_CORE, displayname);
3
			if (email != null)
1
identity.setString(ISemanticContext.CONTEXT_ATTR_EMAIL_ADDRESS,
4
				identity.setString(ISemanticContext.CONTEXT_ATTR_EMAIL_ADDRESS,
2
						ISemanticContext.CONTEXT_NAMESPACE_CORE, email);
5
						ISemanticContext.CONTEXT_NAMESPACE_CORE, email);
3
			if (firstname != null)
6
			if (firstname != null)
4
				identity.setString(ISemanticContext.CONTEXT_ATTR_FIRST_NAME,
7
				identity.setString(ISemanticContext.CONTEXT_ATTR_FIRST_NAME,
5
						ISemanticContext.CONTEXT_NAMESPACE_CORE, firstname);
8
						ISemanticContext.CONTEXT_NAMESPACE_CORE, firstname);
6
			if (lastname != null)
7
				identity.setString(ISemanticContext.CONTEXT_ATTR_LAST_NAME,
8
						ISemanticContext.CONTEXT_NAMESPACE_CORE, lastname);
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.2
Clones locationClones are in the same method
Number of node comparisons14
  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)20.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    22
    if (firstname != null)
    22
    if (firstname != null)
    23
    identity.setString(ISemanticContext.CONTEXT_ATTR_FIRST_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, firstname);
    23
    identity.setString(ISemanticContext.CONTEXT_ATTR_FIRST_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, firstname);
    24
    if (lastname != null)
    24
    if (lastname != null)
    20
    if (email != null)
    Differences
    Expression1Expression2Difference
    lastnameemailVARIABLE_NAME_MISMATCH
    20
    if (email != null)
    25
    identity.setString(ISemanticContext.CONTEXT_ATTR_LAST_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, lastname);
    25
    identity.setString(ISemanticContext.CONTEXT_ATTR_LAST_NAME, ISemanticContext.CONTEXT_NAMESPACE_CORE, lastname);
    21
    identity.setString(ISemanticContext.CONTEXT_ATTR_EMAIL_ADDRESS, ISemanticContext.CONTEXT_NAMESPACE_CORE, email);
    Differences
    Expression1Expression2Difference
    CONTEXT_ATTR_LAST_NAMECONTEXT_ATTR_EMAIL_ADDRESSVARIABLE_NAME_MISMATCH
    lastnameemailVARIABLE_NAME_MISMATCH
    21
    identity.setString(ISemanticContext.CONTEXT_ATTR_EMAIL_ADDRESS, ISemanticContext.CONTEXT_NAMESPACE_CORE, email);
    Precondition Violations (0)
    Row Violation