SessionPluginInfo spi = it.next(); try { spi.getSessionPlugin().sessionCreated(session); } catch (Throwable th) { String msg = s_stringMgr.getString("PluginManager.error.sessioncreated", spi.getPlugin() .getDescriptiveName()); s_log.error(msg, th); _app.showErrorDialog(msg, th); }
SessionPluginInfo spi = it.next(); try { spi.getSessionPlugin().sessionEnding(session); } catch (Throwable th) { String msg = s_stringMgr.getString("PluginManager.error.sessionended", spi .getPlugin() .getDescriptiveName()); s_log.error(msg, th); _app.showErrorDialog(msg, th); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/plugin/PluginManager.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/plugin/PluginManager.java
Method name: void sessionCreated(ISession) Method name: void sessionEnding(ISession)
Number of AST nodes: 3 Number of AST nodes: 3
1
SessionPluginInfo spi = it.next();
1
SessionPluginInfo spi = it.next();
2
			try
2
				try
3
			{
3
				{
4
				spi.getSessionPlugin().sessionCreated(session);
4
					spi.getSessionPlugin().sessionEnding(session);
5
			} catch (Throwable th)
5
				} catch (Throwable th)
6
			{
6
				{
7
				String msg =
7
					String msg =
8
					s_stringMgr.getString("PluginManager.error.sessioncreated", spi.getPlugin()
8
						s_stringMgr.getString("PluginManager.error.sessionended", spi	.getPlugin()
9
																										.getDescriptiveName());
9
																											.getDescriptiveName());
10
				s_log.error(msg, th);
10
					s_log.error(msg, th);
11
				_app.showErrorDialog(msg, th);
11
					_app.showErrorDialog(msg, th);
12
			}
12
				}
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.6
Clones locationClones are declared in the same class
Number of node comparisons6
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    4
    SessionPluginInfo spi = it.next();
    6
    SessionPluginInfo spi = it.next();
    5
    try
    5
    try
    7
    try
    Differences
    Expression1Expression2Difference
    "PluginManager.error.sessioncreated""PluginManager.error.sessionended"LITERAL_VALUE_MISMATCH
    7
    try
    6
    spi.getSessionPlugin().sessionCreated(session);
    6
    spi.getSessionPlugin().sessionCreated(session);
    8
    spi.getSessionPlugin().sessionEnding(session);
    Differences
    Expression1Expression2Difference
    sessionCreatedsessionEndingMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression spi.getSessionPlugin().sessionCreated(session) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression spi.getSessionPlugin().sessionEnding(session) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression spi.getSessionPlugin().sessionCreated(session) is a void method call, and thus it cannot be parameterized
    Expression spi.getSessionPlugin().sessionEnding(session) is a void method call, and thus it cannot be parameterized
    8
    spi.getSessionPlugin().sessionEnding(session);
    Precondition Violations (4)
    Row Violation
    1Expression spi.getSessionPlugin().sessionCreated(session) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression spi.getSessionPlugin().sessionEnding(session) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression spi.getSessionPlugin().sessionCreated(session) is a void method call, and thus it cannot be parameterized
    4Expression spi.getSessionPlugin().sessionEnding(session) is a void method call, and thus it cannot be parameterized