--stackSize;
// ends current block (with many new successors)
if (currentBlock != null) {
currentBlock.maxStackSize = maxStackSize;
addSuccessor(stackSize, dflt);
for (int i = 0; i < labels.length; ++i) {
addSuccessor(stackSize, labels[i]);
}
currentBlock = null;
}
--stackSize;
// ends current block (with many new successors)
if (currentBlock != null) {
currentBlock.maxStackSize = maxStackSize;
addSuccessor(stackSize, dflt);
for (int i = 0; i < labels.length; ++i) {
addSuccessor(stackSize, labels[i]);
}
currentBlock = null;
}
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: 7
|
|
Number of AST nodes: 7
|
|
1 | --stackSize;↵ | | 1 | --stackSize;↵
|
2 | // ends current block (with many new successors)↵ | | 2 | // ends current block (with many new successors)↵
|
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 | }↵ | | 8 | }↵
|
9 | currentBlock = null;↵ | | 9 | currentBlock = null;↵
|
10 | } | | 10 | }
|
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 22 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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.4 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
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 | | | 8 | |
Precondition Violations (0)
Row |
Violation |