File path: /jEdit-4.2/src/bsh/BSHBinaryExpression.java | File path: /jEdit-4.2/src/bsh/BSHBinaryExpression.java | |||
Method name: Object eval(CallStack, Interpreter)
|
Method name: Object eval(CallStack, Interpreter)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if ( kind == BOOL_AND || kind == BOOL_ANDX ) {↵ | 1 | if ( kind == BOOL_OR || kind == BOOL_ORX ) {↵ | |
2 | Object obj = lhs;↵ | 2 | Object obj = lhs;↵ | |
3 | if ( isPrimitiveValue(lhs) )↵ | 3 | if ( isPrimitiveValue(lhs) )↵ | |
4 | obj = ((Primitive)lhs).getValue();↵ | 4 | obj = ((Primitive)lhs).getValue();↵ | |
5 | if ( obj instanceof Boolean && ↵ | 5 | if ( obj instanceof Boolean && ↵ | |
6 | ( ((Boolean)obj).booleanValue() == false ) )↵ | 6 | ( ((Boolean)obj).booleanValue() == true ) )↵ | |
7 | return new Primitive(false);↵ | 7 | return new Primitive(true);↵ | |
8 | } | 8 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.6 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
Number of mapped statements | 6 |
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.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
12 | if (kind == BOOL_AND || kind == BOOL_ANDX) |
| 18 | if (kind == BOOL_OR || kind == BOOL_ORX) | |||||||||||||
13 | Object obj = lhs; | 19 | Object obj = lhs; | ||||||||||||||
14 | if (isPrimitiveValue(lhs)) | 20 | if (isPrimitiveValue(lhs)) | ||||||||||||||
15 | obj = ((Primitive)lhs).getValue(); | 21 | obj = ((Primitive)lhs).getValue(); | ||||||||||||||
16 | if (obj instanceof Boolean && (((Boolean)obj).booleanValue() == false)) |
| 22 | if (obj instanceof Boolean && (((Boolean)obj).booleanValue() == true)) | |||||||||||||
17 | return new Primitive(false); |
| 23 | return new Primitive(true); |
Row | Violation |
---|