if (!isPluginSession(session)) { return null; } GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { updateTreeApi(session); } }); installMysqlQueryTokenizer(session); return new PluginSessionCallbackAdaptor(this);
if (!isPluginSession(session)) { return null; } GUIUtils.processOnSwingEventThread(new Runnable() { public void run() { updateTreeApi(session); } }); return new PluginSessionCallbackAdaptor(this);
Clone fragments detected by clone detection tool
File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/MysqlPlugin.java File path: /sql12/plugins/h2/src/net/sourceforge/squirrel_sql/plugins/h2/H2Plugin.java
Method name: PluginSessionCallback sessionStarted(ISession) Method name: PluginSessionCallback sessionStarted(ISession)
Number of AST nodes: 5 Number of AST nodes: 4
1
if (!isPluginSession(session)) { return null; }
1
if (!isPluginSession(session)) { return null; }
2
		GUIUtils.processOnSwingEventThread(new Runnable()
2
		GUIUtils.processOnSwingEventThread(new Runnable()
3
		{
3
		{
4
			public void run()
4
			public void run()
5
			{
5
			{
6
				updateTreeApi(session);
6
				updateTreeApi(session);
7
			}
7
			}
8
		});
8
		});
9
		installMysqlQueryTokenizer(session);
10
		return new PluginSessionCallbackAdaptor(this);
9
		return new PluginSessionCallbackAdaptor(this);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.5
Clones locationClones are in different classes having the same super class
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.8
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    if (!isPluginSession(session))
    1
    if (!isPluginSession(session))
    2
    return null;
    2
    return null;
    3
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    3
    GUIUtils.processOnSwingEventThread(new Runnable() {...});
    4
    installMysqlQueryTokenizer(session);
    4
    installMysqlQueryTokenizer(session);
    Preondition Violations
    Unmatched statement installMysqlQueryTokenizer(session); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                  
    5
    return new PluginSessionCallbackAdaptor(this);
    4
    return new PluginSessionCallbackAdaptor(this);
    Precondition Violations (1)
    Row Violation
    1Unmatched statement installMysqlQueryTokenizer(session); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted