if (model != null) { model.close(id); model = null; }
if (action != null) { action.setEnabled(true); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/io/CloneInputStream.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pop3/command/FetchNewMessagesCommand.java
Method name: void close() Method name: void updateGUI()
Number of AST nodes: 3 Number of AST nodes: 2
1
if (model != null) {
1
if (action != null) {
2
			model.close(id);
2
			
3
			model = null;
3
action.setEnabled(true);
4
		}
4
		}
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 comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (model != null)
    1
    if (model != null)
    1
    if (action != null)
    Differences
    Expression1Expression2Difference
    modelactionVARIABLE_NAME_MISMATCH
    org.columba.core.io.CloneStreamMasterjavax.swing.ActionVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.core.io.CloneStreamMaster of variable model does not match with type javax.swing.Action of variable action
    • Make classes org.columba.core.io.CloneStreamMaster and javax.swing.Action extend a common superclass
    1
    if (action != null)
                                                          
    2
    action.setEnabled(true);
    2
    model.close(id);
                                          
    3
    model = null;
                                
    Precondition Violations (1)
    Row Violation
    1Type org.columba.core.io.CloneStreamMaster of variable model does not match with type javax.swing.Action of variable action