if (_comp == null)
{
ISession session = getSession();
SessionProperties props = session.getProperties();
String destClassName = props.getMetaDataOutputClassName();
try {
_comp = new DataSetScrollingPanel(destClassName, null);
} catch (Exception e) {
s_log.error("Unexpected exception from call to getComponent: "+
e.getMessage(), e);
}
}
return _comp;
if (_comp == null)
{
ISession session = getSession();
SessionProperties props = session.getProperties();
String destClassName = props.getMetaDataOutputClassName();
try
{
_comp = new DataSetScrollingPanel(destClassName, null);
} catch (Exception e)
{
s_log.error("Unexpected exception from call to getComponent: " + e.getMessage(), e);
}
}
return _comp;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/mysql/src/net/sourceforge/squirrel_sql/plugins/mysql/tab/BaseSQLTab.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/tabs/BasePreparedStatementTab.java
|
Method name: Component getComponent()
|
|
Method name: Component getComponent()
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | if (_comp == null)↵ | | 1 | if (_comp == null)↵
|
2 | {↵ | | |
|
3 | ↵ | | 2 | {↵
|
4 | ISession session = getSession();↵ | | 3 | ISession session = getSession();↵
|
5 | SessionProperties props = session.getProperties();↵ | | 4 | SessionProperties props = session.getProperties();↵
|
6 | String destClassName = props.getMetaDataOutputClassName();↵ | | 5 | String destClassName = props.getMetaDataOutputClassName();↵
|
7 | try {↵ | | |
|
8 | ↵ | | 6 | try↵
|
| | | 7 | {↵
|
9 | _comp = new DataSetScrollingPanel(destClassName, null);↵ | | 8 | _comp = new DataSetScrollingPanel(destClassName, null);↵
|
10 | } catch (Exception e) {↵ | | 9 | } catch (Exception e)↵
|
11 | ↵ | | |
|
| | | 10 | {↵
|
12 | s_log.error("Unexpected exception from call to getComponent: "+↵ | | 11 | s_log.error("Unexpected exception from call to getComponent: "↵
|
13 | e.getMessage(), e);↵ | | |
|
14 | } ↵ | | |
|
15 | } ↵ | | 12 | + e.getMessage(), e);↵
|
| | | 13 | }↵
|
|
| | | 14 | }↵
|
16 | return _comp; | | 15 | return _comp;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 21 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
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) | 446.1 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (_comp == null) | | 1 | if (_comp == null) |
2 | ISession session = getSession(); | | 2 | ISession session = getSession(); |
3 | SessionProperties props = session.getProperties(); | | 3 | SessionProperties props = session.getProperties(); |
4 | String destClassName = props.getMetaDataOutputClassName(); | | 4 | String destClassName = props.getMetaDataOutputClassName(); |
5 | | | 5 | |
6 | _comp = new DataSetScrollingPanel(destClassName, null); | | 6 | _comp = new DataSetScrollingPanel(destClassName, null); |
7 | return _comp; | | 7 | return _comp; |
Precondition Violations (0)
Row |
Violation |