try { _callback.wait(); } catch (InterruptedException ignore) { // Ignore }
try { chars.wait(); } catch (InterruptedException e) { }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/TaskExecuter.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/parser/kernel/ParserThread.java
Method name: void run() Method name: void waitChars()
Number of AST nodes: 2 Number of AST nodes: 2
1
try
1
try
2
						{
2
					{
3
							_callback.wait();
3
						chars.wait();
4
						}
4
					}
5
						catch (InterruptedException ignore)
5
					catch (InterruptedException e)
6
						{
6
					{
7
							// Ignore
7
					
8
						}
8
}
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.1
Clones locationClones are in different classes
Number of node comparisons4
  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.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    10
    try
    10
    try
    3
    try
    Differences
    Expression1Expression2Difference
    ignoreeVARIABLE_NAME_MISMATCH
    3
    try
    11
    _callback.wait();
    11
    _callback.wait();
    4
    chars.wait();
    Differences
    Expression1Expression2Difference
    _callbackcharsVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.util.ITaskThreadPoolCallbackjava.text.CharacterIteratorVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.fw.util.ITaskThreadPoolCallback of variable _callback does not match with type java.text.CharacterIterator of variable chars
    • Make classes net.sourceforge.squirrel_sql.fw.util.ITaskThreadPoolCallback and java.text.CharacterIterator extend a common superclass
    4
    chars.wait();
    Precondition Violations (2)
    Row Violation
    1Type net.sourceforge.squirrel_sql.fw.util.ITaskThreadPoolCallback of variable _callback does not match with type java.text.CharacterIterator of variable chars
    2The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.fw.util.TaskExecuter and net.sourceforge.squirrel_sql.client.session.parser.kernel.ParserThread.IncrementalBuffer do not have a common superclass