while (mutex) { try { wait(); } catch (InterruptedException e) { if (Thread.currentThread().isInterrupted()) { // gota go now throw new RuntimeException(e); } // else keep waiting } }
while (!this.open) { 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/base/Barrier.java
Method name: void lock() Method name: void join()
Number of AST nodes: 3 Number of AST nodes: 3
1
while (mutex) {
1
while (
2
     
2
!this.open) {
3
       try {
3
	    try {
4
                wait();
5
        
4
		wait();
6
    } catch (InterruptedException e) {
5
	    } catch (InterruptedException e) {
7
                if (Thread.currentThread().isInterrupted()) {
8
                    // gota go now
9
                    throw new RuntimeException(e);
10
                }
11
                // else keep waiting
12
            }
13
        
6
		e.printStackTrace();
7
	    }
14
}
8
	}
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons1