opcode = FRETURN;
type = "java/lang/Float";
meth = "floatValue";
} else if (returnType.equals("J") ) {
opcode = LRETURN;
type = "java/lang/Long";
meth = "longValue";
opcode = DRETURN;
type = "java/lang/Double";
meth = "doubleValue";
} else if (returnType.equals("F") ) {
opcode = FRETURN;
type = "java/lang/Float";
meth = "floatValue";
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/ClassGeneratorUtil.java
|
|
File path: /jEdit-4.2/src/bsh/ClassGeneratorUtil.java
|
Method name: void generateReturnCode(String, CodeVisitor)
|
|
Method name: void generateReturnCode(String, CodeVisitor)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | opcode = FRETURN;↵ | | 1 | opcode = DRETURN;↵
|
2 | type = "java/lang/Float";↵ | | 2 | type = "java/lang/Double";↵
|
3 | meth = "floatValue";↵ | | 3 | meth = "doubleValue";↵
|
4 | } else if (returnType.equals("J") ) {↵ | | 4 | } else if (returnType.equals("F") ) {↵
|
5 | opcode = LRETURN;↵ | | 5 | opcode = FRETURN;↵
|
6 | type = "java/lang/Long";↵ | | 6 | type = "java/lang/Float";↵
|
7 | meth = "longValue"; | | 7 | meth = "floatValue";
|
See real code fragment |
|
See real code fragment |
Summary
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.0 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
22 | opcode = FRETURN; | | 18 | opcode = DRETURN; |
23 | type = "java/lang/Float"; | | 19 | type = "java/lang/Double"; |
24 | meth = "floatValue"; | | 20 | meth = "doubleValue"; |
Precondition Violations (1)
Row |
Violation |
1 | Clone fragment #1 returns variables type, meth, opcode , while Clone fragment #2 returns variables type, meth, opcode |