if (updatesEnabled) { if( existsChangedAction != null) { existsChangedAction.actionPerformed(selectedFolder); } LOG.fine("Exists changed -> triggering update"); }
if (f != null) { getRoot().addElement(f.getRoot()); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/imap/IMAPServer.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/filter/FilterList.java
Method name: void existsChanged(String, int) Method name: void add(IFilter)
Number of AST nodes: 4 Number of AST nodes: 2
1
if (updatesEnabled) {
1
if (
2
			if( existsChangedAction != null) {
2
f != null) {
3
				existsChangedAction.actionPerformed(selectedFolder);
3
			
4
			}
5
			LOG.fine("Exists changed -> triggering update");
4
getRoot().addElement(f.getRoot());
5

6
		}
6
		}
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 fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    6
    if (existsChangedAction != null)
    6
    if (existsChangedAction != null)
    1
    if (f != null)
    Differences
    Expression1Expression2Difference
    existsChangedActionfVARIABLE_NAME_MISMATCH
    org.columba.mail.imap.IExistsChangedActionorg.columba.core.filter.IFilterVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.imap.IExistsChangedAction of variable existsChangedAction does not match with type org.columba.core.filter.IFilter of variable f
    • Make classes org.columba.mail.imap.IExistsChangedAction and org.columba.core.filter.IFilter extend a common superclass
    1
    if (f != null)
                                                                              
    2
    getRoot().addElement(f.getRoot());
    7
    existsChangedAction.actionPerformed(selectedFolder);
                                                                                                                  
    8
    LOG.fine("Exists changed -> triggering update");
                                                                                                          
    Precondition Violations (1)
    Row Violation
    1Type org.columba.mail.imap.IExistsChangedAction of variable existsChangedAction does not match with type org.columba.core.filter.IFilter of variable f