synchronized(this) {
return globalState;
}
if (threadService.getCritical()) {
// If the target thread is sleeping or stopped, wake it
synchronized (this) {
notify();
}
// interrupt the target thread in case it's blocking or waiting
// WARNING: We no longer interrupt the target thread, since this usually means
// interrupting IO and with NIO that means the channel is no longer usable.
// We either need a new way to handle waking a target thread that's waiting
// on IO, or we need to accept that we can't wake such threads and must wait
// for them to complete their operation.
//threadImpl.interrupt();
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/Ruby.java
|
|
File path: /jruby-1.4.0/src/org/jruby/RubyThread.java
|
Method name: long getGlobalState()
|
|
Method name: IRubyObject join(IRubyObject[])
|
Number of AST nodes: 2
|
|
Number of AST nodes: 3
|
|
| | | 1 | if (threadService.getCritical()) {↵
|
| | | 2 | // If the target thread is sleeping or stopped, wake it↵
|
1 | synchronized(this) {↵ | | 3 | synchronized (this) {↵
|
2 | return globalState;↵ | | 4 | ↵
|
| | | 5 | notify();↵
|
| | | 6 | }↵
|
| | | 7 | ↵
|
| | | 8 | // interrupt the target thread in case it's blocking or waiting↵
|
| | | 9 | // WARNING: We no longer interrupt the target thread, since this usually means↵
|
| | | 10 | // interrupting IO and with NIO that means the channel is no longer usable.↵
|
| | | 11 | // We either need a new way to handle waking a target 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();↵
|
3 | } | | 15 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |