File path: /jruby-1.4.0/src/org/jruby/RubyBasicObject.java | File path: /jruby-1.4.0/src/org/jruby/RubyThread.java | |||
Method name: void copyInstanceVariablesInto(InstanceVariables)
|
Method name: IRubyObject join(IRubyObject[])
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | for (Variable<IRubyObject> var : getInstanceVariableList()) {↵ | |||
2 | synchronized (this) {↵ | |||
3 | other.setInstanceVariable(v↵ | 1 | if (threadService.getCritical()) {↵ | |
2 | // If the target thread is sleeping or stopped, wake it↵ | |||
3 | synchronized (this) {↵ | |||
4 | notify();↵ | |||
5 | }↵ | |||
6 | ↵ | |||
7 | // interrupt the target thread in case it's blocking or waiting↵ | |||
8 | // WARNING: We no longer interrupt the target thread, since this usually means↵ | |||
9 | // interrupting IO and with NIO that means the channel is no longer usable.↵ | |||
4 | ar.getName(), var.getValue());↵ | 10 | // We either need a new way to handle waking a target↵ | |
5 | }↵ | |||
11 | thread that's waiting↵ | |||
12 | // on IO, or we need to accept that we can't wake such threads and must wait↵ | |||
13 | // for them to complete their operation.↵ | |||
14 | //threadImpl.interrupt();↵ | |||
6 | } | 15 | } | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 5 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
2 | synchronized (this) | 14 | synchronized (this) | |
3 | other.setInstanceVariable(var.getName(), var.getValue()); | | ||
| 15 | notify(); |
Row | Violation |
---|