while ( java_length() == 0 ) {
try {
context.getThread().wait_timeout(this, null);
} catch (InterruptedException e) {
}
checkShutdown(context);
}
while ( java_length() >= capacity ) {
try {
context.getThread().wait_timeout(this, null);
} catch (InterruptedException e) {
}
checkShutdown(context);
}
Clone fragments detected by clone detection tool
File path: /jruby-1.4.0/src/org/jruby/libraries/ThreadLibrary.java
|
|
File path: /jruby-1.4.0/src/org/jruby/libraries/ThreadLibrary.java
|
Method name: IRubyObject pop(ThreadContext, IRubyObject[])
|
|
Method name: IRubyObject push(ThreadContext, IRubyObject)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | while ( java_length() == 0 ) {↵ | | 1 | while ( java_length() >= capacity ) {↵
|
2 | try {↵ | | 2 | try {↵
|
3 | context.getThread().wait_timeout(this, null);↵ | | 3 | context.getThread().wait_timeout(this, null);↵
|
4 | } catch (InterruptedException e) {↵ | | 4 | } catch (InterruptedException e) {↵
|
5 | }↵ | | 5 | }↵
|
6 | checkShutdown(context);↵ | | 6 | checkShutdown(context);↵
|
7 | } | | 7 | }
|
See real code fragment |
|
See real code fragment |
Summary
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.2 |
Clones location | Clones are in the same java file |
Number of node comparisons | 5 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | try | | 6 | try |
11 | context.getThread().wait_timeout(this, null); | | 7 | context.getThread().wait_timeout(this, null); |
Precondition Violations (0)
Row |
Violation |