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: 13 | Number of AST nodes: 13 | |||
1 | if (computeMaxs) {↵ | 1 | if (computeMaxs) {↵ | |
2 | // updates current stack size (max stack size unchanged)↵ | 2 | // updates current stack size (max stack size unchanged)↵ | |
3 | --stackSize;↵ | 3 | --stackSize;↵ | |
4 | // ends current block (with many new successors)↵ | 4 | // ends current block (with many new successors)↵ | |
5 | if (currentBlock != null) {↵ | 5 | if (currentBlock != null) {↵ | |
6 | currentBlock.maxStackSize = maxStackSize;↵ | 6 | currentBlock.maxStackSize = maxStackSize;↵ | |
7 | addSuccessor(stackSize, dflt);↵ | 7 | addSuccessor(stackSize, dflt);↵ | |
8 | for (int i = 0; i < labels.length; ++i) {↵ | 8 | for (int i = 0; i < labels.length; ++i) {↵ | |
9 | addSuccessor(stackSize, labels[i]);↵ | 9 | addSuccessor(stackSize, labels[i]);↵ | |
10 | }↵ | 10 | }↵ | |
11 | currentBlock = null;↵ | 11 | currentBlock = null;↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | // adds the instruction to the bytecode of the method↵ | 14 | // adds the instruction to the bytecode of the method↵ | |
15 | int source = code.length;↵ | 15 | int source = code.length;↵ | |
16 | code.put1(Constants.TABLESWITCH);↵ | 16 | code.put1(Constants.LOOKUPSWITCH);↵ | |
17 | while (code.length % 4 != 0) {↵ | 17 | while (code.length % 4 != 0) {↵ | |
18 | code.put1(0);↵ | 18 | code.put1(0);↵ | |
19 | }↵ | 19 | }↵ | |
20 | dflt.put(this, code, source, true); | 20 |
| |
See real code fragment | See real code fragment |
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 37 |
Number of mapped statements | 13 |
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) | 2.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (computeMaxs) | 1 | if (computeMaxs) | |||||||||||
2 | --stackSize; | 2 | --stackSize; | |||||||||||
3 | if (currentBlock != null) | 3 | if (currentBlock != null) | |||||||||||
4 | currentBlock.maxStackSize = maxStackSize; | 4 | currentBlock.maxStackSize = maxStackSize; | |||||||||||
5 | addSuccessor(stackSize, dflt); | 5 | addSuccessor(stackSize, dflt); | |||||||||||
6 | for (int i = 0; i < labels.length; ++i) | 6 | for (int i = 0; i < labels.length; ++i) | |||||||||||
7 | addSuccessor(stackSize, labels[i]); | 7 | addSuccessor(stackSize, labels[i]); | |||||||||||
8 | currentBlock = null; | 8 | currentBlock = null; | |||||||||||
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 | code.put1(0); | 12 | code.put1(0); | |||||||||||
13 | dflt.put(this, code, source, true); | 13 | dflt.put(this, code, source, true); |
Row | Violation |
---|