File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/JTreeAliasesListImpl.java | File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTreeModel.java | |||
Method name: DefaultMutableTreeNode findNode(SQLAlias, DefaultMutableTreeNode)
|
Method name: TreePath getPathToDbInfo(String, String, FilterMatcher, ObjectTreeNode, boolean)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | DefaultMutableTreeNode ret = findNode(sqlAlias, (DefaultMutableTreeNode) tn.getChildAt(i));↵ | 1 | TreePath ret = getPathToDbInfo(catalog, schema, objectMatcher, (ObjectTreeNode) startNode.getChildAt(i)↵ | |
2 | , useExpanders);↵ | |||
2 | if(null != ret)↵ | 3 | if(null != ret)↵ | |
3 | {↵ | 4 | {↵ | |
4 | return ret;↵ | 5 | return ret;↵ | |
5 | } | 6 | } | |
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.6 |
Clones location | Clones are in different classes |
Number of node comparisons | 6 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | DefaultMutableTreeNode ret = findNode(sqlAlias, (DefaultMutableTreeNode)tn.getChildAt(i)); |
| | ||||||||||||
|
| 15 | TreePath ret = getPathToDbInfo(catalog, schema, objectMatcher, (ObjectTreeNode)startNode.getChildAt(i), useExpanders); | ||||||||||||
5 | if (null != ret) |
| 16 | if (null != ret) | |||||||||||
6 | return ret; |
| | ||||||||||||
|
| 17 | return ret; |
Row | Violation |
---|---|
1 | Unmatched statement DefaultMutableTreeNode ret=findNode(sqlAlias,(DefaultMutableTreeNode)tn.getChildAt(i)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement TreePath ret=getPathToDbInfo(catalog,schema,objectMatcher,(ObjectTreeNode)startNode.getChildAt(i),useExpanders); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Type javax.swing.tree.DefaultMutableTreeNode of variable ret does not match with type javax.swing.tree.TreePath of variable ret |
4 | Unmatched statement return ret; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched return ret; |
6 | Unmatched statement return ret; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched return ret; |
8 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |