File path: /sql12/test/src/net/sourceforge/squirrel_sql/client/update/gui/ArtifactActionTest.java | File path: /sql12/test/src/net/sourceforge/squirrel_sql/fw/dialects/DialectTypeTest.java | |||
Method name: void testEnumMethods()
|
Method name: void testEnumMethods()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (ArtifactAction action : ArtifactAction.values()) {↵ | 1 | for (DialectType action : DialectType.values()) {↵ | |
2 | ArtifactAction a = ArtifactAction.valueOf(action.name());↵ | 2 | DialectType a = DialectType.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 (ArtifactAction action : ArtifactAction.values()) |
| 1 | for (DialectType action : DialectType.values()) | |||||||||||||||||||
|
| 2 | DialectType a = DialectType.valueOf(action.name()); | ||||||||||||||||||||
2 | ArtifactAction a = ArtifactAction.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.ArtifactAction does not match with type net.sourceforge.squirrel_sql.fw.dialects.DialectType |
2 | Type net.sourceforge.squirrel_sql.client.update.gui.ArtifactAction[] of variable ArtifactAction.values() does not match with type net.sourceforge.squirrel_sql.fw.dialects.DialectType[] of variable DialectType.values() |
3 | Type net.sourceforge.squirrel_sql.client.update.gui.ArtifactAction does not match with type net.sourceforge.squirrel_sql.fw.dialects.DialectType |
4 | Unmatched statement DialectType a=DialectType.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 ArtifactAction a=ArtifactAction.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.ArtifactAction of variable action does not match with type net.sourceforge.squirrel_sql.fw.dialects.DialectType of variable action |
7 | Type net.sourceforge.squirrel_sql.client.update.gui.ArtifactAction of variable a does not match with type net.sourceforge.squirrel_sql.fw.dialects.DialectType of variable a |
8 | Type net.sourceforge.squirrel_sql.client.update.gui.ArtifactAction of variable action does not match with type net.sourceforge.squirrel_sql.fw.dialects.DialectType of variable action |
9 | Type net.sourceforge.squirrel_sql.client.update.gui.ArtifactAction of variable a does not match with type net.sourceforge.squirrel_sql.fw.dialects.DialectType of variable a |
10 | Clone fragment #1 returns variable action with type net.sourceforge.squirrel_sql.client.update.gui.ArtifactAction , while Clone fragment #2 returns variable action with type net.sourceforge.squirrel_sql.fw.dialects.DialectType |