if (timeout == 0) {
selector.selectNow();
} else {
selector.select(timeout);
}
if (newBuffer == null) {
str.empty();
} else {
str.setValue(newBuffer);
}
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 select_static(ThreadContext, Ruby, IRubyObject[])
|
|
Method name: IRubyObject readAll(IRubyObject)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (timeout == 0) {↵ | | 1 | if (↵
|
2 | selector.selectNow();↵ | | |
|
3 | ↵ | | 2 | newBuffer == null) {↵
|
| | | 3 | str.empty();↵
|
4 | } else {↵ | | 4 | } else {↵
|
5 | selector.select(timeout);↵ | | 5 | ↵
|
6 | ↵ | | 6 | str.setValue(newBuffer);↵
|
7 | } | | 7 | }
|
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |