while (mutex) {
try {
wait();
} catch (InterruptedException e) {
if (Thread.currentThread().isInterrupted()) {
// gota go now
throw new RuntimeException(e);
}
// else keep waiting
}
}
try {
wait();
} catch (InterruptedException e) {
e.printStackTrace();
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/base/Mutex.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/command/CommandProcessor.java
|
Method name: void lock()
|
|
Method name: void waitForNotify()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 2
|
|
1 | while (mutex) {↵ | | |
|
2 | try {↵ | | |
|
3 | wait();↵ | | |
|
4 | } catch (InterruptedException e) {↵ | | |
|
5 | if (Thread.currentThread().isInterrupted()) {↵ | | |
|
6 | // gota go now↵ | | |
|
7 | throw new RuntimeException(e);↵ | | |
|
8 | }↵ | | |
|
|
9 | // else keep waiting↵ | | |
|
10 | }↵ | | |
|
11 | ↵ | | 1 | try {↵
|
| | | 2 | wait();↵
|
| | | 3 | } catch (InterruptedException e) {↵
|
| | | 4 | e.printStackTrace();↵
|
12 | } | | 5 | }
|
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 |