File path: /sql12/test/src/net/sourceforge/squirrel_sql/client/update/gui/installer/event/InstallEventTypeTest.java | File path: /sql12/test/src/net/sourceforge/squirrel_sql/client/update/downloader/event/DownloadEventTypeTest.java | |||
Method name: void testEnumMethods()
|
Method name: void testEnumMethods()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (InstallEventType action : InstallEventType.values()) {↵ | 1 | for (DownloadEventType action : DownloadEventType.values()) {↵ | |
2 | InstallEventType a = InstallEventType.valueOf(action.name());↵ | 2 | DownloadEventType a = DownloadEventType.valueOf(action.name());↵ | |
3 | assertEquals(0, a.compareTo(action));↵ | 3 | assertEquals(0, a.compareTo(action));↵ | |
4 | assertEquals(action.ordinal(), a.ordinal());↵ | 4 | assertEquals(action.ordinal(), a.ordinal());↵ | |
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 | 16 |
Number of mapped statements | 3 |
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) | 1.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (InstallEventType action : InstallEventType.values()) |
| 1 | for (DownloadEventType action : DownloadEventType.values()) | |||||||||||||||||||
|
| 2 | DownloadEventType a = DownloadEventType.valueOf(action.name()); | ||||||||||||||||||||
2 | InstallEventType a = InstallEventType.valueOf(action.name()); |
| | ||||||||||||||||||||
3 | assertEquals(0, a.compareTo(action)); |
| 3 | assertEquals(0, a.compareTo(action)); | |||||||||||||||||||
4 | assertEquals(action.ordinal(), a.ordinal()); |
| 4 | assertEquals(action.ordinal(), a.ordinal()); |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType does not match with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType |
2 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType[] of variable InstallEventType.values() does not match with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType[] of variable DownloadEventType.values() |
3 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType does not match with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType |
4 | Unmatched statement DownloadEventType a=DownloadEventType.valueOf(action.name()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement InstallEventType a=InstallEventType.valueOf(action.name()); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType of variable action does not match with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType of variable action |
7 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType of variable a does not match with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType of variable a |
8 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType of variable action does not match with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType of variable action |
9 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType of variable a does not match with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType of variable a |
10 | Clone fragment #1 returns variable action with type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType , while Clone fragment #2 returns variable action with type net.sourceforge.squirrel_sql.client.update.downloader.event.DownloadEventType |