switch(kind)
{
case PLUS:
return operand;
case MINUS:
return -operand;
case TILDE:
return ~operand;
case INCR:
return operand + 1;
case DECR:
return operand - 1;
default:
throw new InterpreterError("bad integer unaryOperation");
}
switch(kind)
{
case PLUS:
return operand;
case MINUS:
return -operand;
case TILDE:
return ~operand;
case INCR:
return operand + 1;
case DECR:
return operand - 1;
default:
throw new InterpreterError("bad long unaryOperation");
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/Primitive.java
|
|
File path: /jEdit-4.2/src/bsh/Primitive.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | switch(kind)↵ | | 1 | switch(kind)↵
|
2 | {↵ | | 2 | {↵
|
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 | case TILDE:↵ | | 7 | case TILDE:↵
|
8 | return ~operand;↵ | | 8 | return ~operand;↵
|
9 | case INCR:↵ | | 9 | case INCR:↵
|
10 | return operand + 1;↵ | | 10 | return operand + 1;↵
|
11 | case DECR:↵ | | 11 | case DECR:↵
|
12 | return operand - 1;↵ | | 12 | return operand - 1;↵
|
13 | default:↵ | | 13 | default:↵
|
14 | throw new InterpreterError("bad integer unaryOperation");↵ | | 14 | throw new InterpreterError("bad long unaryOperation");↵
|
15 | } | | 15 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | |
Number of node comparisons | 0 |