goToSelectedNode(); view.toFront(); view.requestFocus(); view.getTextArea().requestFocus();
saveFile(); super.removeNotify(); EditBus.removeFromBus(this);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/search/HyperSearchResults.java File path: /jEdit-4.2/jars/QuickNotepad/QuickNotepad.java
Method name: void mousePressed(MouseEvent) Method name: void removeNotify()
Number of AST nodes: 4 Number of AST nodes: 3
1
goToSelectedNode();
1
saveFile();
2
				view.toFront();
2
		
3
				view.requestFocus();
4
				view.getTextArea().requestFocus(
3
super.removeNotify();
5
);
4
		EditBus.removeFromBus(this);
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.0
Clones locationClones are in different classes
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    9
    goToSelectedNode();
    9
    goToSelectedNode();
    2
    super.removeNotify();
    Differences
    Expression1Expression2Difference
    goToSelectedNode()super.removeNotify()TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression goToSelectedNode() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method goToSelectedNode
    Expression goToSelectedNode() is a void method call, and thus it cannot be parameterized
    Expression super.removeNotify() is a void method call, and thus it cannot be parameterized
    Super method call super.removeNotify(); cannot be extracted from method
    2
    super.removeNotify();
    10
    view.toFront();
    10
    view.toFront();
    1
    saveFile();
    Differences
    Expression1Expression2Difference
    toFrontsaveFileMETHOD_INVOCATION_NAME_MISMATCH
    viewMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression view.toFront() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression view.toFront() is a void method call, and thus it cannot be parameterized
    Expression saveFile() is a void method call, and thus it cannot be parameterized
    Expression view.toFront() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression view.toFront() is a void method call, and thus it cannot be parameterized
    Expression saveFile() is a void method call, and thus it cannot be parameterized
    1
    saveFile();
                                                                  
    3
    EditBus.removeFromBus(this);
    Preondition Violations
    Unmatched statement EditBus.removeFromBus(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3
    EditBus.removeFromBus(this);
    11
    view.requestFocus();
                                                    
    12
    view.getTextArea().requestFocus();
                                                                                
    Precondition Violations (12)
    Row Violation
    1Expression goToSelectedNode() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression goToSelectedNode() is a void method call, and thus it cannot be parameterized
    3Expression super.removeNotify() is a void method call, and thus it cannot be parameterized
    4Super method call super.removeNotify(); cannot be extracted from method
    5Expression view.toFront() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression view.toFront() is a void method call, and thus it cannot be parameterized
    7Expression saveFile() is a void method call, and thus it cannot be parameterized
    8Expression view.toFront() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression view.toFront() is a void method call, and thus it cannot be parameterized
    10Expression saveFile() is a void method call, and thus it cannot be parameterized
    11Unmatched statement EditBus.removeFromBus(this); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    12The refactoring of the clones is infeasible, because classes org.gjt.sp.jedit.search.HyperSearchResults.MouseHandler and QuickNotepad do not have a common superclass