int source = code.length;
code.put1(Constants.TABLESWITCH);
while (code.length % 4 != 0) {
code.put1(0);
}
dflt.put(this, code, source, true);
int source = code.length;
code.put1(Constants.LOOKUPSWITCH);
while (code.length % 4 != 0) {
code.put1(0);
}
dflt.put(this, code, source, true);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java
|
|
File path: /jEdit-4.2/src/org/objectweb/asm/CodeWriter.java
|
Method name: void visitTableSwitchInsn(int, int, Label, Label[])
|
|
Method name: void visitLookupSwitchInsn(Label, int[], Label[])
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | int source = code.length;↵ | | 1 | int source = code.length;↵
|
2 | code.put1(Constants.TABLESWITCH);↵ | | 2 | code.put1(Constants.LOOKUPSWITCH);↵
|
3 | while (code.length % 4 != 0) {↵ | | 3 | while (code.length % 4 != 0) {↵
|
4 | code.put1(0);↵ | | 4 | code.put1(0);↵
|
5 | }↵ | | 5 | }↵
|
6 | dflt.put(this, code, source, true); | | 6 | dflt.put(this, code, source, true);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
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) | 1.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
9 | int source = code.length; | | 9 | int source = code.length; |
10 | code.put1(Constants.TABLESWITCH); | | 10 | code.put1(Constants.LOOKUPSWITCH); |
11 | while (code.length % 4 != 0) | | 11 | while (code.length % 4 != 0) |
12 | | | 12 | |
13 | dflt.put(this, code, source, true); | | 13 | dflt.put(this, code, source, true); |
Precondition Violations (0)
Row |
Violation |