if (n == -1) {
if (!readStream.isBlocking() && (readStream instanceof ChannelStream)) {
checkDescriptor(runtime, ((ChannelStream)readStream).getDescriptor());
continue;
} else {
break;
}
}
if (n == -1) {
if (!readStream.isBlocking() && (readStream instanceof ChannelStream)) {
checkDescriptor(runtime, ((ChannelStream) readStream).getDescriptor());
continue;
} else {
break;
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyIO.java
|
|
File path: /jruby-1.4.0/src/org/jruby/RubyIO.java
|
Method name: IRubyObject getlineFast(Ruby, int)
|
|
Method name: IRubyObject getline(Ruby, ByteList, long)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (n == -1) {↵ | | 1 | if (n == -1) {↵
|
2 | if (!readStream.isBlocking() && (readStream instanceof ChannelStream)) {↵ | | 2 | if (!readStream.isBlocking() && (readStream instanceof ChannelStream)) {↵
|
3 | checkDescriptor(runtime, ((ChannelStream)readStream).getDescriptor());↵ | | 3 | checkDescriptor(runtime, ((ChannelStream) readStream).getDescriptor());↵
|
4 | continue;↵ | | 4 | continue;↵
|
5 | } else {↵ | | 5 | } else {↵
|
6 | break;↵ | | 6 | break;↵
|
7 | }↵ | | 7 | ↵
|
| | | 8 | }↵
|
8 | } | | 9 | }
|
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.5 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 18 |
-
{Non-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.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
11 | if (n == -1) | | 38 | if (n == -1) |
12 | if (!readStream.isBlocking() && (readStream instanceof ChannelStream)) | | 39 | if (!readStream.isBlocking() && (readStream instanceof ChannelStream)) |
13 | checkDescriptor(runtime, ((ChannelStream)readStream).getDescriptor()); | | 40 | checkDescriptor(runtime, ((ChannelStream)readStream).getDescriptor()); |
14 | | | 41 | |
| | | | |
15 | | | 42 | |
Precondition Violations (4)
Row |
Violation |
1 | Statement continue; without innermost loop |
2 | Statement continue; without innermost loop |
3 | Statement break; without innermost loop |
4 | Statement break; without innermost loop |