File path: /jEdit-4.2/src/bsh/Types.java | File path: /jEdit-4.2/src/bsh/Types.java | |||
Method name: boolean isJavaAssignable(Class, Class)
|
Method name: boolean isJavaAssignable(Class, Class)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if ( (rhs == Short.TYPE) && ↵ | 1 | if ((rhs == Character.TYPE) && ↵ | |
2 | (lhs == Integer.TYPE || lhs == Long.TYPE ||↵ | 2 | (lhs == Integer.TYPE || lhs == Long.TYPE ||↵ | |
3 | lhs == Float.TYPE || lhs == Double.TYPE))↵ | 3 | lhs == Float.TYPE || lhs == Double.TYPE))↵ | |
4 | return true; | 4 |
| |
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) | 1.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
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) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8 | if ((rhs == Short.TYPE) && (lhs == Integer.TYPE || lhs == Long.TYPE || lhs == Float.TYPE || lhs == Double.TYPE)) |
| 10 | if ((rhs == Character.TYPE) && (lhs == Integer.TYPE || lhs == Long.TYPE || lhs == Float.TYPE || lhs == Double.TYPE)) | |||||||||||||||
9 | return true; |
| 11 | return true; |
Row | Violation |
---|---|
1 | Type java.lang.Short of variable Short does not match with type java.lang.Character of variable Character |
2 | Type java.lang.Class<java.lang.Short> of variable Short.TYPE does not match with type java.lang.Class<java.lang.Character> of variable Character.TYPE |
3 | Conditional return true; |
4 | Conditional return true; |