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: 5 | Number of AST nodes: 5 | |||
1 | if(operand instanceof Float)↵ | 1 | if(operand instanceof Float)↵ | |
2 | return new Float(Primitive.floatUnaryOperation((Float)operand, kind));↵ | 2 | return new Primitive(floatUnaryOperation((Float)operand, kind));↵ | |
3 | else if(operand instanceof Double)↵ | 3 | else if(operand instanceof Double)↵ | |
4 | return new Double(Primitive.doubleUnaryOperation((Double)operand, kind));↵ | 4 | return new Primitive(doubleUnaryOperation((Double)operand, kind));↵ | |
5 | else↵ | 5 | else↵ | |
6 | throw new InterpreterError(↵ | 6 | throw new InterpreterError(↵ | |
7 | "An error occurred. Please call technical support."); | 7 | "An error occurred. Please call technical support."); | |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
17 | else if (operand instanceof Float) | 21 | else if (operand instanceof Float) | |||||
18 | return new Float(Primitive.floatUnaryOperation((Float)operand, kind)); |
| | |||||
|
| 22 | return new Primitive(floatUnaryOperation((Float)operand, kind)); | |||||
19 | else if (operand instanceof Double) | 23 | else if (operand instanceof Double) | |||||
20 | return new Double(Primitive.doubleUnaryOperation((Double)operand, kind)); |
| | |||||
|
| 24 | return new Primitive(doubleUnaryOperation((Double)operand, kind)); | |||||
else | else | |||||||
21 | throw new InterpreterError("An error occurred. Please call technical support."); | 25 | throw new InterpreterError("An error occurred. Please call technical support."); |
Row | Violation |
---|---|
1 | Unmatched statement return new Float(Primitive.floatUnaryOperation((Float)operand,kind)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched return new Float(Primitive.floatUnaryOperation((Float)operand,kind)); |
3 | Unmatched statement return new Primitive(floatUnaryOperation((Float)operand,kind)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched return new Primitive(floatUnaryOperation((Float)operand,kind)); |
5 | Unmatched statement return new Double(Primitive.doubleUnaryOperation((Double)operand,kind)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched return new Double(Primitive.doubleUnaryOperation((Double)operand,kind)); |
7 | Unmatched statement return new Primitive(doubleUnaryOperation((Double)operand,kind)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
8 | Unmatched return new Primitive(doubleUnaryOperation((Double)operand,kind)); |