File path: /jEdit-4.2/src/bsh/Primitive.java | File path: /jEdit-4.2/src/bsh/Primitive.java | |||
Method name: double doubleUnaryOperation(Double, int)
|
Method name: float floatUnaryOperation(Float, int)
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | double operand = D.doubleValue();↵ | 1 | float operand = F.floatValue();↵ | |
2 | switch(kind)↵ | 2 | switch(kind)↵ | |
3 | {↵ | 3 | {↵ | |
4 | case PLUS:↵ | 4 | case PLUS:↵ | |
5 | return operand;↵ | 5 | return operand;↵ | |
6 | case MINUS:↵ | 6 | case MINUS:↵ | |
7 | return -operand;↵ | 7 | return -operand;↵ | |
8 | default:↵ | 8 | default:↵ | |
9 | throw new InterpreterError("bad double unaryOperation");↵ | 9 | throw new InterpreterError("bad float unaryOperation");↵ | |
10 | } | 10 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
Number of mapped statements | 5 |
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) | 2.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | float operand = F.floatValue(); | ||||||||||||
1 | double operand = D.doubleValue(); | | ||||||||||||
2 | switch (kind) | 2 | switch (kind) | |||||||||||
3 | case PLUS: | 3 | case PLUS: | |||||||||||
|
| 4 | return operand; | |||||||||||
4 | return operand; |
| | |||||||||||
5 | case MINUS: | 5 | case MINUS: | |||||||||||
|
| 6 | return -operand; | |||||||||||
6 | return -operand; |
| | |||||||||||
7 | default: | 7 | default: | |||||||||||
8 | throw new InterpreterError("bad double unaryOperation"); |
| 8 | throw new InterpreterError("bad float unaryOperation"); |
Row | Violation |
---|---|
1 | Unmatched return operand; |
2 | Unmatched return operand; |
3 | Unmatched return -operand; |
4 | Unmatched return -operand; |