File path: /columba-1.4-src/core/src/test/java/org/columba/core/plugin/PluginFinderTest.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/contact/SelectAddressDialog.java | |||
Method name: void test()
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | File[] pluginFolders = PluginFinder.searchPlugins();↵ | 1 | Object[] array = toList.getSelectedValues();↵ | |
2 | for (int i = 0; i < pluginFolders.length; i++) {↵ | 2 | for (int j = 0; j < array.length; j++) {↵ | |
3 | System.out.println("plugin-directory=" + pluginFolders[i↵ | 3 | dialogAddressbookListModel[0]↵ | |
4 | ]);↵ | 4 | .removeElement((IHeaderItem) array[j]);↵ | |
5 | } | 5 | } | |
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 |
Number of node comparisons | 5 |
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) | 2.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | File[] pluginFolders = PluginFinder.searchPlugins(); | | |||||||||||||||||||||||||
| 29 | Object[] array = toList.getSelectedValues(); | |||||||||||||||||||||||||
2 | for (int i = 0; i < pluginFolders.length; i++) |
| 30 | for (int j = 0; j < array.length; j++) | |||||||||||||||||||||||
3 | System.out.println("plugin-directory=" + pluginFolders[i]); |
| | ||||||||||||||||||||||||
|
| 31 | dialogAddressbookListModel[0].removeElement((IHeaderItem)array[j]); |
Row | Violation |
---|---|
1 | Type int of variable pluginFolders.length does not match with type int of variable array.length |
2 | Unmatched statement System.out.println("plugin-directory=" + pluginFolders[i]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement dialogAddressbookListModel[0].removeElement((IHeaderItem)array[j]); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |