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_OR || kind == BOOL_ORX ) {↵ | 1 | if ( kind == BOOL_AND || kind == BOOL_ANDX ) {↵ | |
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() == true ) )↵ | 6 | ( ((Boolean)obj).booleanValue() == false ) )↵ | |
7 | return new Primitive(true);↵ | 7 | return new Primitive(false);↵ | |
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.8 |
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) | 2.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
18 | if (kind == BOOL_OR || kind == BOOL_ORX) |
| 12 | if (kind == BOOL_AND || kind == BOOL_ANDX) | |||||||||||||
19 | Object obj = lhs; | 13 | Object obj = lhs; | ||||||||||||||
20 | if (isPrimitiveValue(lhs)) | 14 | if (isPrimitiveValue(lhs)) | ||||||||||||||
21 | obj = ((Primitive)lhs).getValue(); | 15 | obj = ((Primitive)lhs).getValue(); | ||||||||||||||
22 | if (obj instanceof Boolean && (((Boolean)obj).booleanValue() == true)) |
| 16 | if (obj instanceof Boolean && (((Boolean)obj).booleanValue() == false)) | |||||||||||||
23 | return new Primitive(true); |
| 17 | return new Primitive(false); |
Row | Violation |
---|