if (!b) { for (Iterator it = list.iterator(); it.hasNext();) { DefaultCriteriaRow row = (DefaultCriteriaRow) it.next(); row.updateComponents(false); } }
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); // } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/CriteriaList.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/ActionList.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
				DefaultCriteria
3
				DefaultActionRow row = (DefaultActionRow) it.next();
4
				row.updateComponents(false);
5
			}
6
			// for (int i = 0; i < list.size(); i++) {
4
Row row = (DefaultCriteriaRow) it.next();
7
			// DefaultActionRow row = (DefaultActionRow) list.get(i);
5
				row.updateComponents(false);
8
			// row.updateComponents(false);
6
			}
9
			// }
7
		}
10
		}
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)4.6
    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
    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
    3
    DefaultActionRow row = (DefaultActionRow)it.next();
    3
    DefaultCriteriaRow row = (DefaultCriteriaRow)it.next();
    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
                                                                                                                    
    4
    row.updateComponents(false);
    4
    row.updateComponents(false);
    4
    row.updateComponents(false);
    Differences
    Expression1Expression2Difference
    org.columba.mail.gui.config.filter.plugins.DefaultCriteriaRoworg.columba.mail.gui.config.filter.plugins.DefaultActionRowVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.columba.mail.gui.config.filter.plugins.DefaultCriteriaRow of variable row does not match with type org.columba.mail.gui.config.filter.plugins.DefaultActionRow of variable row
    • Make classes org.columba.mail.gui.config.filter.plugins.DefaultCriteriaRow and org.columba.mail.gui.config.filter.plugins.DefaultActionRow extend a common superclass
    4
    row.updateComponents(false);
    Precondition Violations (3)
    Row Violation
    1Unmatched 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
    2Unmatched 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
    3Type org.columba.mail.gui.config.filter.plugins.DefaultCriteriaRow of variable row does not match with type org.columba.mail.gui.config.filter.plugins.DefaultActionRow of variable row