if (block.isGiven()) {
try {
return block.yield(context, instance);
} finally {
if (!instance.isClosed()) instance.close();
}
}
if (block.isGiven()) {
try {
val = block.yield(context, strio);
} finally {
strio.doFinalize();
}
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/RubyZlib.java
|
|
File path: /jruby-1.4.0/src/org/jruby/RubyStringIO.java
|
Method name: IRubyObject wrapBlock(ThreadContext, RubyGzipFile, Block)
|
|
Method name: IRubyObject open(ThreadContext, IRubyObject, IRubyObject[], Block)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (block.isGiven()) {↵ | | 1 | if (block.isGiven()) {↵
|
2 | try {↵ | | 2 | try {↵
|
3 | return block.yield(context, instance);↵ | | 3 | val = block.yield(context, ↵
|
4 | ↵ | | 4 | strio);↵
|
5 | } finally {↵ | | 5 | } finally {↵
|
6 | if (!instance.isClosed()) instance.close();↵ | | 6 | strio.doFinalize();↵
|
7 | }↵ | | 7 | ↵
|
8 | ↵ | | 8 | }↵
|
9 | } | | 9 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 1 |