try { wait(); } catch (InterruptedException e) { --waitingWriters; Log.log(Log.ERROR,this,e); return; }
try { wait(); } catch (InterruptedException e) { --waitingReaders; // Roll back state. Log.log(Log.ERROR,this,e); return; }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/util/ReadWriteLock.java File path: /jEdit-4.2/src/org/gjt/sp/util/ReadWriteLock.java
Method name: void writeLock() Method name: void readLock()
Number of AST nodes: 2 Number of AST nodes: 2
1
try
1
try
2
			{
2
			{
3
				wait();
3
				wait();
4
			}
4
			}
5
			catch (InterruptedException e)
5
			catch (InterruptedException e)
6
			{
6
			{
7
				--waitingWriters;
7
				--waitingReaders; // Roll back state.
8
				Log.log(Log.ERROR,this,e);
8
				Log.log(Log.ERROR,this,e);
9
				return;
9
				return;
10
			}
10
			}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    try
    10
    try
    6
    try
    Differences
    Expression1Expression2Difference
    waitingWriterswaitingReadersVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression waitingWriters is a field being modified, and thus it cannot be parameterized
    Expression waitingReaders is a field being modified, and thus it cannot be parameterized
    6
    try
    11
    wait();
    7
    wait();
    Precondition Violations (2)
    Row Violation
    1Expression waitingWriters is a field being modified, and thus it cannot be parameterized
    2Expression waitingReaders is a field being modified, and thus it cannot be parameterized