Selection[] selection = textArea.getSelection(); if(selection.length == 0) { view.getToolkit().beep(); return; }
Selection[] selection = textArea.getSelection(); if(selection.length == 0) { view.getToolkit().beep(); return false; }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/BeanShell.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/search/SearchAndReplace.java
Method name: void showEvaluateLinesDialog(View) Method name: boolean replace(View)
Number of AST nodes: 4 Number of AST nodes: 4
1
Selection[] selection = textArea.getSelection();
1
Selection[] selection = textArea.getSelection();
2
		if(selection.length == 0)
2
		if(selection.length == 0)
3
		{
3
		{
4
			view.getToolkit().beep();
4
			view.getToolkit().beep();
5
			return;
5
			return false;
6
		}
6
		}
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
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)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    Selection[] selection = textArea.getSelection();
    9
    Selection[] selection = textArea.getSelection();
    7
    if (selection.length == 0)
    10
    if (selection.length == 0)
    8
    view.getToolkit().beep();
    11
    view.getToolkit().beep();
    9
    return;
    9
    return;
    Preondition Violations
    Unmatched return;
                        
                                      
    12
    return false;
    Preondition Violations
    Unmatched return false;
    12
    return false;
    Precondition Violations (3)
    Row Violation
    1Unmatched return;
    2Unmatched return false;
    3Clone fragment #1 returns variables , while Clone fragment #2 returns variables selection