File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/objecttree/ObjectTree.java | File path: /sql12/plugins/hibernate/src/net/sourceforge/squirrel_sql/plugins/hibernate/HQLEntryPanelManager.java | |||
Method name: ObjectTreeNode showLoadingNode()
|
Method name: void initBookmarks()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | IDatabaseObjectInfo doi = new DatabaseObjectInfo(null, null,↵ | |||
2 | "Loading...", DatabaseObjectType.OTHER,↵ | |||
3 | _session.getSQLConnection().getSQLMetaData());↵ | 1 | HQLBookmarksAction hba = new HQLBookmarksAction(getSession().get↵ | |
4 | ObjectTreeNode loadingNode = new ObjectTreeNode(_session, doi);↵ | |||
5 | _parentNode.add(loadingNode);↵ | |||
6 | fireStructureChanged(_parentNode);↵ | |||
7 | return loadingNode↵ | 2 | Application(), _resources, getEntryPanel());↵ | |
3 | JMenuItem item = addToSQLEntryAreaMenu(hba, "bookmarkselect");↵ | |||
4 | _resources.configureMenuItem(hba, item);↵ | |||
8 | ; | 5 | registerKeyboardAction(hba, _resources.getKeyStroke(hba)); | |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 4 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 1 | HQLBookmarksAction hba = new HQLBookmarksAction(getSession().getApplication(), _resources, getEntryPanel()); | ||||||||||||||||||||
1 | IDatabaseObjectInfo doi = new DatabaseObjectInfo(null, null, "Loading...", DatabaseObjectType.OTHER, _session.getSQLConnection().getSQLMetaData()); |
| | ||||||||||||||||||||
| 2 | JMenuItem item = addToSQLEntryAreaMenu(hba, "bookmarkselect"); | |||||||||||||||||||||
2 | ObjectTreeNode loadingNode = new ObjectTreeNode(_session, doi); |
| | ||||||||||||||||||||
| 3 | _resources.configureMenuItem(hba, item); | |||||||||||||||||||||
3 | _parentNode.add(loadingNode); | | |||||||||||||||||||||
4 | fireStructureChanged(_parentNode); |
| 4 | registerKeyboardAction(hba, _resources.getKeyStroke(hba)); | |||||||||||||||||||
5 | return loadingNode; |
| |
Row | Violation |
---|---|
1 | Unmatched statement HQLBookmarksAction hba=new HQLBookmarksAction(getSession().getApplication(),_resources,getEntryPanel()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement IDatabaseObjectInfo doi=new DatabaseObjectInfo(null,null,"Loading...",DatabaseObjectType.OTHER,_session.getSQLConnection().getSQLMetaData()); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement ObjectTreeNode loadingNode=new ObjectTreeNode(_session,doi); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Expression registerKeyboardAction(hba,_resources.getKeyStroke(hba)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression fireStructureChanged(_parentNode) is a void method call, and thus it cannot be parameterized |
6 | Expression registerKeyboardAction(hba,_resources.getKeyStroke(hba)) is a void method call, and thus it cannot be parameterized |
7 | Expression registerKeyboardAction(hba,_resources.getKeyStroke(hba)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression fireStructureChanged(_parentNode) is a void method call, and thus it cannot be parameterized |
9 | Expression registerKeyboardAction(hba,_resources.getKeyStroke(hba)) is a void method call, and thus it cannot be parameterized |
10 | Unmatched return loadingNode; |
11 | The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.session.mainpanel.objecttree.ObjectTree.TreeLoader and net.sourceforge.squirrel_sql.plugins.hibernate.HQLEntryPanelManager do not have a common superclass |