while (type != '\n') {
if (next == 0) break mainLoop;
type = next;
next = safeGet(format);
}
while (ASCII.isSpace(type)) {
if (next == 0) break mainLoop;
type = next;
next = safeGet(format);
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/util/Pack.java
|
|
File path: /jruby-1.4.0/src/org/jruby/util/Pack.java
|
Method name: RubyString pack(Ruby, RubyArray, ByteList)
|
|
Method name: RubyString pack(Ruby, RubyArray, ByteList)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | while (type != '\n') { ↵ | | 1 | while (↵
|
2 | ↵ | | 2 | ASCII.isSpace(type)) {↵
|
3 | if (next == 0) break mainLoop;↵ | | 3 | if (next == 0) break mainLoop;↵
|
4 | type = next;↵ | | 4 | type = next;↵
|
5 | next = safeGet(format);↵ | | 5 | next = safeGet(format);↵
|
6 | } | | 6 | }
|
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.1 |
Clones location | Clones are in the same method |
Number of node comparisons | 6 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
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.7 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
19 | if (next == 0) | | 13 | if (next == 0) |
20 | | | 14 | |
Precondition Violations (2)
Row |
Violation |
1 | Statement break mainLoop; without innermost loop |
2 | Statement break mainLoop; without innermost loop |