while (num-- > 0) {
Node c = popNode();
c.jjtSetParent(n);
n.jjtAddChild(c, num);
}
while (a-- > 0) {
Node c = popNode();
c.jjtSetParent(n);
n.jjtAddChild(c, a);
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/bsh/JJTParserState.java
|
|
File path: /jEdit-4.2/src/bsh/JJTParserState.java
|
Method name: void closeNodeScope(Node, int)
|
|
Method name: void closeNodeScope(Node, boolean)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | while (num-- > 0) {↵ | | 1 | while (a-- > 0) {↵
|
2 | Node c = popNode();↵ | | 2 | Node c = popNode();↵
|
3 | c.jjtSetParent(n);↵ | | 3 | c.jjtSetParent(n);↵
|
4 | n.jjtAddChild(c, num);↵ | | 4 | n.jjtAddChild(c, a);↵
|
5 | } | | 5 | }
|
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 3.6 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | while (num-- > 0) | | 4 | while (a-- > 0) |
3 | | | 5 | |
4 | | | 6 | |
5 | | | 7 | |
Precondition Violations (0)
Row |
Violation |