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/UpdateChannelTest.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 (↵ | |
2 | InstallEventType a = InstallEventType↵ | 2 | UpdateChannel action : UpdateChannel.values()) {↵ | |
3 | .valueOf(action.name());↵ | 3 | UpdateChannel a = UpdateChannel.valueOf(action.name());↵ | |
4 | assertEquals(0, a.compareTo(action));↵ | 4 | assertEquals(0, a.compareTo(action));↵ | |
5 | assertEquals(action.ordinal(), a.ordinal());↵ | 5 | assertEquals(action.ordinal(), a.ordinal());↵ | |
6 | } | 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.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 (UpdateChannel action : UpdateChannel.values()) | |||||||||||||||||||
|
| 2 | UpdateChannel a = UpdateChannel.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.UpdateChannel |
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.UpdateChannel[] of variable UpdateChannel.values() |
3 | Type net.sourceforge.squirrel_sql.client.update.gui.installer.event.InstallEventType does not match with type net.sourceforge.squirrel_sql.client.update.UpdateChannel |
4 | Unmatched statement UpdateChannel a=UpdateChannel.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.UpdateChannel 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.UpdateChannel 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.UpdateChannel 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.UpdateChannel 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.UpdateChannel |