Object[] list = getSelectedValues(); selection2 = new IHeaderItem[list.length]; for (int i = 0; i < list.length; i++) { selection2[i] = (IHeaderItem) list[i]; } dndAction = true;
Object[] list = getSelectedValues(); selection2 = new IBasicModelPartial[list.length]; for (int i = 0; i < list.length; i++) { selection2[i] = (IBasicModelPartial) list[i]; } dndAction = true;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/contact/list/ContactDNDListView.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/list/AddressbookDNDListView.java
Method name: void valueChanged(ListSelectionEvent) Method name: void valueChanged(ListSelectionEvent)
Number of AST nodes: 5 Number of AST nodes: 5
1
Object[] list = getSelectedValues();
1
Object[] list = getSelectedValues();
2
			selection2 = new IHeaderItem[list.length];
2
			selection2 = new IBasicModelPartial[list.length];
3
			for (int i = 0; i < list.length; i++) {
3
			for (int i = 0; i < list.length; i++) {
4
				selection2[i] = (IHeaderItem) list[i];
4
				selection2[i] = (IBasicModelPartial) list[i];
5
			}
5
			}
6
			dndAction = true;
6
			dndAction = true;
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.4
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)2.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    7
    Object[] list = getSelectedValues();
    7
    Object[] list = getSelectedValues();
                                                                                                        
    8
    selection2 = new IBasicModelPartial[list.length];
    Preondition Violations
    Unmatched statement selection2=new IBasicModelPartial[list.length]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    8
    selection2 = new IBasicModelPartial[list.length];
    8
    selection2 = new IHeaderItem[list.length];
    8
    selection2 = new IHeaderItem[list.length];
    Preondition Violations
    Unmatched statement selection2=new IHeaderItem[list.length]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                          
    9
    for (int i = 0; i < list.length; i++)
    9
    for (int i = 0; i < list.length; i++)
                                                                                                
    10
    selection2[i] = (IBasicModelPartial)list[i];
    Preondition Violations
    Unmatched statement selection2[i]=(IBasicModelPartial)list[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    10
    selection2[i] = (IBasicModelPartial)list[i];
    10
    selection2[i] = (IHeaderItem)list[i];
    10
    selection2[i] = (IHeaderItem)list[i];
    Preondition Violations
    Unmatched statement selection2[i]=(IHeaderItem)list[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                  
    11
    dndAction = true;
    11
    dndAction = true;
    Precondition Violations (5)
    Row Violation
    1Unmatched statement selection2=new IBasicModelPartial[list.length]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement selection2=new IHeaderItem[list.length]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement selection2[i]=(IBasicModelPartial)list[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement selection2[i]=(IHeaderItem)list[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5The refactoring of the clones is infeasible, because classes org.columba.mail.gui.contact.list.ContactDNDListView and org.columba.addressbook.gui.list.AddressbookDNDListView do not have a common superclass