if (!b) { for (Iterator it = list.iterator(); it.hasNext();) { DefaultActionRow row = (DefaultActionRow) it.next(); row.updateComponents(false); } // for (int i = 0; i < list.size(); i++) { // DefaultActionRow row = (DefaultActionRow) list.get(i); // row.updateComponents(false); // } }
if (!b) { for (Iterator it = list.iterator(); it.hasNext();) { DefaultCriteriaRow row = (DefaultCriteriaRow) it.next(); row.updateComponents(false); } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/ActionList.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/CriteriaList.java
Method name: void updateComponents(boolean) Method name: void updateComponents(boolean)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (!b) {
1
if (!b) {
2
			for (Iterator it = list.iterator(); it.hasNext();) {
2
			for (Iterator it = list.iterator(); it.hasNext();) {
3
				DefaultActionRow row = (DefaultActionRow) it.next();
3
				DefaultCriteriaRow row = (Default
4
				row.updateComponents(false);
5
			}
6
			// for (int i = 0; i < list.size(); i++) {
7
			// DefaultActionRow row = (DefaultActionRow) list.get(i);
4
CriteriaRow) it.next();
8
			// row.updateComponents(false);
5
				row.updateComponents(false);
9
			// }
6
			}
10
		}
7
		}
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 different classes having the same super class
Number of node comparisons10
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)3.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (!b)
    1
    if (!b)
    2
    for (Iterator it = list.iterator(); it.hasNext(); )
    2
    for (Iterator it = list.iterator(); it.hasNext(); )
                                                                                                                    
    3
    DefaultCriteriaRow row = (DefaultCriteriaRow)it.next();
    Preondition Violations
    Unmatched statement DefaultCriteriaRow row=(DefaultCriteriaRow)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3
    DefaultCriteriaRow row = (DefaultCriteriaRow)it.next();
    3
    DefaultActionRow row = (DefaultActionRow)it.next();
    3
    DefaultActionRow row = (DefaultActionRow)it.next();
    Preondition Violations
    Unmatched statement DefaultActionRow row=(DefaultActionRow)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                            
    4
    row.updateComponents(false);
    4
    row.updateComponents(false);
    4
    row.updateComponents(false);
    Differences
    Expression1Expression2Difference
    org.columba.mail.gui.config.filter.plugins.DefaultActionRoworg.columba.mail.gui.config.filter.plugins.DefaultCriteriaRowVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.gui.config.filter.plugins.DefaultActionRow of variable row does not match with type org.columba.mail.gui.config.filter.plugins.DefaultCriteriaRow of variable row
    • Make classes org.columba.mail.gui.config.filter.plugins.DefaultActionRow and org.columba.mail.gui.config.filter.plugins.DefaultCriteriaRow extend a common superclass
    4
    row.updateComponents(false);
    Precondition Violations (3)
    Row Violation
    1Unmatched statement DefaultCriteriaRow row=(DefaultCriteriaRow)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement DefaultActionRow row=(DefaultActionRow)it.next(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Type org.columba.mail.gui.config.filter.plugins.DefaultActionRow of variable row does not match with type org.columba.mail.gui.config.filter.plugins.DefaultCriteriaRow of variable row