if (negative) return false;
//else
mymatch.assignFrom(newMatch);
return true;
setCurrentBindings(bindings);
invokeAction((String)o);
return true;
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/gnu/regexp/RETokenLookAhead.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/DefaultInputHandler.java
|
Method name: boolean match(CharIndexed, REMatch)
|
|
Method name: boolean handleKey(KeyEventTranslator.Key)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 3
|
|
1 | if (negative) return false;↵ | | |
|
2 | //else↵ | | |
|
3 | mymatch.assignFrom(newMatch);↵ | | |
|
4 | ↵ | | 1 | setCurrentBindings(bindings);↵
|
| | | 2 | invokeAction((String)o);↵
|
5 | return true; | | 3 | return true;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | if (negative) | | | |
| | | 49 | setCurrentBindings(bindings); |
| | | 50 | invokeAction((String)o); |
11 | return false; | | 51 | return true; |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return false; |
2 | Conditional return true; |