File path: /jEdit-4.2/src/org/gjt/sp/jedit/BeanShell.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/BeanShell.java | |||
Method name: void unwrapException(Exception)
|
Method name: void unwrapException(Exception)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Throwable t = ((InvocationTargetException)e).getTargetException();↵ | 1 | Throwable t = ((TargetError)e).getTarget();↵ | |
2 | if(t instanceof Exception)↵ | 2 | if(t instanceof Exception)↵ | |
3 | throw (Exception)t;↵ | 3 | throw (Exception)t;↵ | |
4 | else if(t instanceof Error)↵ | 4 | else if(t instanceof Error)↵ | |
5 | throw (Error)t; | 5 |
| |
See real code fragment | See real code fragment |
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.4 |
Clones location | Clones are in the same method |
Number of node comparisons | 15 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | Throwable t = ((InvocationTargetException)e).getTargetException(); |
| 2 | Throwable t = ((TargetError)e).getTarget(); | ||||||||||||||
9 | if (t instanceof Exception) | 3 | if (t instanceof Exception) | |||||||||||||||
10 | throw (Exception)t; | 4 | throw (Exception)t; | |||||||||||||||
11 | else if (t instanceof Error) | 5 | else if (t instanceof Error) | |||||||||||||||
12 | throw (Error)t; | 6 | throw (Error)t; |
Row | Violation |
---|---|
1 | Expression (InvocationTargetException)e cannot be unified with expression (TargetError)e , because common superclass java.lang.Exception does not declare member(s) public java.lang.Throwable getTargetException() , public java.lang.Throwable getTarget() |