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