File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/DriversList.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/JListAliasesListImpl.java | |||
Method name: String getToolTipText(MouseEvent)
|
Method name: String getToolTipText(MouseEvent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | String tip = null;↵ | 1 | String tip;↵ | |
2 | final int idx = getList().locationToIndex(evt.getPoint());↵ | 2 | final int idx = getList().locationToIndex(evt.getPoint());↵ | |
3 | if (idx != -1)↵ | 3 | if (idx != -1)↵ | |
4 | {↵ | 4 | {↵ | |
5 | tip = ((ISQLDriver)getList().getModel().getElementAt(idx)).getName();↵ | 5 | tip = ((ISQLAlias)getList().getModel().getElementAt(idx)).getName();↵ | |
6 | }↵ | 6 | }↵ | |
7 | else↵ | 7 | else↵ | |
8 | {↵ | 8 | {↵ | |
9 | tip = getToolTipText();↵ | 9 | tip = getToolTipText();↵ | |
10 | }↵ | 10 | }↵ | |
11 | return tip; | 11 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 18 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 103.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | String tip; | |||||||||||||||
1 | String tip = null; | | |||||||||||||||
2 | final int idx = getList().locationToIndex(evt.getPoint()); | 2 | final int idx = getList().locationToIndex(evt.getPoint()); | ||||||||||||||
3 | if (idx != -1) | 3 | if (idx != -1) | ||||||||||||||
4 | tip = ((ISQLDriver)getList().getModel().getElementAt(idx)).getName(); |
| 4 | tip = ((ISQLAlias)getList().getModel().getElementAt(idx)).getName(); | |||||||||||||
else | else | ||||||||||||||||
5 | tip = getToolTipText(); | 5 | tip = getToolTipText(); | ||||||||||||||
6 | return tip; | 6 | return tip; |
Row | Violation |
---|---|
1 | Expression (ISQLDriver)getList().getModel().getElementAt(idx) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression (ISQLAlias)getList().getModel().getElementAt(idx) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression (ISQLDriver)getList().getModel().getElementAt(idx) cannot be unified with expression (ISQLAlias)getList().getModel().getElementAt(idx) , because common superclass net.sourceforge.squirrel_sql.fw.id.IHasIdentifier does not declare member(s) public abstract java.lang.String getName() |