if (action != null) { action.setEnabled(true); }
if (add != null) { _adds.put(add, item); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pop3/command/FetchNewMessagesCommand.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/util/AddressCollector.java
Method name: void updateGUI() Method name: void addAddress(String, IHeaderItem)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (action != null) {
1
if (add != null) {
2
			action.setEnabled(true);
2
			_adds.put(add, item);
3
		}
3
		}
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.1
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (action != null)
    1
    if (action != null)
    1
    if (add != null)
    Differences
    Expression1Expression2Difference
    actionaddVARIABLE_NAME_MISMATCH
    javax.swing.Actionjava.lang.StringVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type javax.swing.Action of variable action does not match with type java.lang.String of variable add
    • Make classes javax.swing.Action and java.lang.String extend a common superclass
    1
    if (add != null)
                                                  
    2
    _adds.put(add, item);
    2
    action.setEnabled(true);
                                                          
    Precondition Violations (1)
    Row Violation
    1Type javax.swing.Action of variable action does not match with type java.lang.String of variable add