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 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
-
{Non-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.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
10 | try | | 6 | try |
11 | | | 7 | |
Precondition Violations (2)
Row |
Violation |
1 | Expression waitingWriters is a field being modified, and thus it cannot be parameterized |
2 | Expression waitingReaders is a field being modified, and thus it cannot be parameterized |