try {
ClassGenerator.getClassGenerator().setInstanceNameSpaceParent(
obj, className, instanceNameSpace );
} catch ( UtilEvalError e ) {
throw e.toEvalError( this, callstack );
}
try {
return getName( callstack.top() ).toLHS( callstack, interpreter );
} catch ( UtilEvalError e ) {
throw e.toEvalError( this, callstack );
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/BSHAllocationExpression.java
|
|
File path: /jEdit-4.2/src/bsh/BSHAmbiguousName.java
|
Method name: Object constructObject(Class, Object[], CallStack)
|
|
Method name: LHS toLHS(CallStack, Interpreter)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try {↵ | | 1 | try {↵
|
2 | ClassGenerator.getClassGenerator().setInstanceNameSpaceParent(↵ | | 2 | return getName( callstack.top()↵
|
3 | obj, className, instanceNameSpace );↵ | | 3 | ).toLHS( callstack, interpreter );↵
|
4 | } catch ( UtilEvalError e ) {↵ | | 4 | } catch ( UtilEvalError e ) {↵
|
5 | throw e.toEvalError( this, callstack );↵ | | 5 | throw e.toEvalError( this, callstack );↵
|
6 | } | | 6 | }
|
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.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 4 |
-
{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 | 1 |
Time elapsed for statement mapping (ms) | 0.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | try | | 1 | try |
| | | 2 | return getName(callstack.top()).toLHS(callstack, interpreter); |
11 | ClassGenerator.getClassGenerator().setInstanceNameSpaceParent(obj, className, instanceNameSpace); | | | |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched return getName(callstack.top()).toLHS(callstack,interpreter); |
2 | Unmatched statement ClassGenerator.getClassGenerator().setInstanceNameSpaceParent(obj,className,instanceNameSpace); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |