File path: /jEdit-4.2/src/bsh/BSHUnaryExpression.java | File path: /jEdit-4.2/src/bsh/Primitive.java | |||
Method name: Object primitiveWrapperUnaryOperation(Object, int)
|
Method name: Primitive unaryOperation(Primitive, int)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if(kind == INCR || kind == DECR)↵ | 1 | if(kind == INCR || kind == DECR)↵ | |
2 | {↵ | 2 | {↵ | |
3 | if(operandType == Byte.TYPE)↵ | 3 | if(operandType == Byte.TYPE)↵ | |
4 | return new Byte((byte)result);↵ | 4 | return new Primitive((byte)result);↵ | |
5 | if(operandType == Short.TYPE)↵ | 5 | if(operandType == Short.TYPE)↵ | |
6 | return new Short((short)result);↵ | 6 | return new Primitive((short)result);↵ | |
7 | if(operandType == Character.TYPE)↵ | 7 | if(operandType == Character.TYPE)↵ | |
8 | return new Character((char)result);↵ | 8 | return new Primitive((char)result);↵ | |
9 | } | 9 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 29 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
7 | if (kind == INCR || kind == DECR) | 11 | if (kind == INCR || kind == DECR) | ||||
8 | if (operandType == Byte.TYPE) | 12 | if (operandType == Byte.TYPE) | ||||
9 | return new Byte((byte)result); |
| | ||||
|
| 13 | return new Primitive((byte)result); | ||||
10 | if (operandType == Short.TYPE) | 14 | if (operandType == Short.TYPE) | ||||
11 | return new Short((short)result); |
| | ||||
|
| 15 | return new Primitive((short)result); | ||||
12 | if (operandType == Character.TYPE) | 16 | if (operandType == Character.TYPE) | ||||
13 | return new Character((char)result); |
| | ||||
|
| 17 | return new Primitive((char)result); |
Row | Violation |
---|---|
1 | Unmatched return new Byte((byte)result); |
2 | Unmatched return new Primitive((byte)result); |
3 | Unmatched return new Short((short)result); |
4 | Unmatched return new Primitive((short)result); |
5 | Unmatched return new Character((char)result); |
6 | Unmatched return new Primitive((char)result); |