EditPane[] editPanes = _view.getEditPanes(); for(int i = 0; i < editPanes.length; i++) { editPanes[i].saveCaretInfo(); } _view = _view.next;
for(int i = 0; i < threads.length; i++) { threads[i].start(); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java File path: /jEdit-4.2/src/org/gjt/sp/util/WorkThreadPool.java
Method name: void checkBufferStatus(View) Method name: void start()
Number of AST nodes: 4 Number of AST nodes: 2
1
EditPane[] editPanes = _view.getEditPanes();
2
			for(int i = 0; i < editPanes.length; i++)
1
for(int i = 0; i < threads.length; i++)
3
			{
2
			{
4
				editPanes[i].saveCaretInfo();
3
				threads[i].s
5
			}
6
			_view = _view.next;
4
tart();
5
			}
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.3
Clones locationClones are in different classes
Number of node comparisons6
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    5
    EditPane[] editPanes = _view.getEditPanes();
    5
    EditPane[] editPanes = _view.getEditPanes();
    Preondition Violations
    Unmatched statement EditPane[] editPanes=_view.getEditPanes(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                              
    6
    for (int i = 0; i < editPanes.length; i++)
    6
    for (int i = 0; i < editPanes.length; i++)
    6
    for (int i = 0; i < threads.length; i++)
    Differences
    Expression1Expression2Difference
    editPanesthreadsVARIABLE_NAME_MISMATCH
    org.gjt.sp.jedit.EditPane[]org.gjt.sp.util.WorkThread[]VARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type org.gjt.sp.jedit.EditPane[] of variable editPanes does not match with type org.gjt.sp.util.WorkThread[] of variable threads
    • Make classes org.gjt.sp.jedit.EditPane[] and org.gjt.sp.util.WorkThread[] extend a common superclass
    6
    for (int i = 0; i < threads.length; i++)
                                                
    7
    threads[i].start();
    Preondition Violations
    Unmatched statement threads[i].start(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    7
    threads[i].start();
    7
    editPanes[i].saveCaretInfo();
    7
    editPanes[i].saveCaretInfo();
    Preondition Violations
    Unmatched statement editPanes[i].saveCaretInfo(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                    
    8
    _view = _view.next;
                                            
    Precondition Violations (4)
    Row Violation
    1Unmatched statement EditPane[] editPanes=_view.getEditPanes(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Type org.gjt.sp.jedit.EditPane[] of variable editPanes does not match with type org.gjt.sp.util.WorkThread[] of variable threads
    3Unmatched statement threads[i].start(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement editPanes[i].saveCaretInfo(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted