File path: /jruby-1.4.0/src/org/jruby/RubyIO.java | File path: /jruby-1.4.0/src/org/jruby/RubyIO.java | |||
Method name: boolean waitWritable(ChannelDescriptor)
|
Method name: boolean waitReadable(ChannelDescriptor)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if ((skey.interestOps() & skey.readyOps() & (SelectionKey.OP_WRITE)) != 0) {↵ | 1 | if ((skey.interestOps() & skey.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_ACCEPT)) != 0) {↵ | |
2 | if(skey.attachment() == descriptor) {↵ | 2 | if(skey.attachment() == descriptor) {↵ | |
3 | return true;↵ | 3 | return true;↵ | |
4 | }↵ | 4 | }↵ | |
5 | } | 5 |
| |
See real code fragment | See real code fragment |
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.7 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 6 |
Number of mapped statements | 3 |
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.6 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | if ((skey.interestOps() & skey.readyOps() & (SelectionKey.OP_WRITE)) != 0) |
| 20 | if ((skey.interestOps() & skey.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_ACCEPT)) != 0) | ||||||||||
21 | if (skey.attachment() == descriptor) | 21 | if (skey.attachment() == descriptor) | |||||||||||
22 | return true; |
| 22 | return true; |
Row | Violation |
---|---|
1 | Conditional return true; |
2 | Conditional return true; |