Iterator<IEventInfo> it = list.iterator(); while (it.hasNext()) { addElement(it.next()); }
Iterator<IContactModelPartial> it = list.iterator(); while (it.hasNext()) { addElement(it.next()); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/box/CalendarList.java File path: /columba-1.4-src/contact/src/main/java/org/columba/contact/gui/box/ContactList.java
Method name: void addAll(List) Method name: void addAll(List)
Number of AST nodes: 3 Number of AST nodes: 3
1
Iterator<IEventInfo> it = list.iterator();
1
Iterator<IContactModelPartial> it = list.iterator();
2
		while (it.hasNext()) {
2
		while (it.hasNext()) {
3
			addElement(it.next());
3
			addElement(it.next());
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)18.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                              
    1
    Iterator<IContactModelPartial> it = list.iterator();
    1
    Iterator<IEventInfo> it = list.iterator();
                                                                                          
    2
    while (it.hasNext())
    2
    while (it.hasNext())
    2
    while (it.hasNext())
    Differences
    Expression1Expression2Difference
    java.util.Iteratorjava.util.IteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.util.Iterator<org.columba.calendar.model.api.IEventInfo> of variable it does not match with type java.util.Iterator<org.columba.addressbook.model.IContactModelPartial> of variable it
    • Make classes java.util.Iterator and java.util.Iterator extend a common superclass
    2
    while (it.hasNext())
    3
    addElement(it.next());
    3
    addElement(it.next());
    3
    addElement(it.next());
    Differences
    Expression1Expression2Difference
    org.columba.calendar.model.api.IEventInfoorg.columba.addressbook.model.IContactModelPartialVARIABLE_TYPE_MISMATCH
    java.util.Iteratorjava.util.IteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Expression it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type org.columba.calendar.model.api.IEventInfo of variable it.next() does not match with type org.columba.addressbook.model.IContactModelPartial of variable it.next()
    • Make classes org.columba.calendar.model.api.IEventInfo and org.columba.addressbook.model.IContactModelPartial extend a common superclass
    Type java.util.Iterator<org.columba.calendar.model.api.IEventInfo> of variable it does not match with type java.util.Iterator<org.columba.addressbook.model.IContactModelPartial> of variable it
    • Make classes java.util.Iterator and java.util.Iterator extend a common superclass
    3
    addElement(it.next());
    Precondition Violations (5)
    Row Violation
    1Type java.util.Iterator<org.columba.calendar.model.api.IEventInfo> of variable it does not match with type java.util.Iterator<org.columba.addressbook.model.IContactModelPartial> of variable it
    2Expression it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression it.next() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Type org.columba.calendar.model.api.IEventInfo of variable it.next() does not match with type org.columba.addressbook.model.IContactModelPartial of variable it.next()
    5Type java.util.Iterator<org.columba.calendar.model.api.IEventInfo> of variable it does not match with type java.util.Iterator<org.columba.addressbook.model.IContactModelPartial> of variable it