File path: /jfreechart-1.0.10/tests/org/jfree/data/gantt/junit/TaskSeriesCollectionTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/gantt/junit/TaskSeriesCollectionTests.java | |||
Method name: void testGetColumnKey()
|
Method name: void testGetColumnIndex()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | TaskSeriesCollection c = createCollection1();↵ | 1 | TaskSeriesCollection c = createCollection1();↵ | |
2 | assertEquals("Task 1", c.getColumnKey(0));↵ | 2 | assertEquals(0, c.getColumnIndex("Task 1"));↵ | |
3 | assertEquals("Task 2", c.getColumnKey(1));↵ | 3 | assertEquals(1, c.getColumnIndex("Task 2"));↵ | |
4 | assertEquals("Task 3", c.getColumnKey(2)); | 4 | assertEquals(2, c.getColumnIndex("Task 3")); | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||
---|---|---|---|---|---|---|---|
1 | TaskSeriesCollection c = createCollection1(); | 1 | TaskSeriesCollection c = createCollection1(); | ||||
|
| 2 | assertEquals(0, c.getColumnIndex("Task 1")); | ||||
2 | assertEquals("Task 1", c.getColumnKey(0)); |
| | ||||
|
| 3 | assertEquals(1, c.getColumnIndex("Task 2")); | ||||
3 | assertEquals("Task 2", c.getColumnKey(1)); |
| | ||||
|
| 4 | assertEquals(2, c.getColumnIndex("Task 3")); | ||||
4 | assertEquals("Task 3", c.getColumnKey(2)); |
| |
Row | Violation |
---|---|
1 | Unmatched statement assertEquals(0,c.getColumnIndex("Task 1")); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement assertEquals("Task 1",c.getColumnKey(0)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement assertEquals(1,c.getColumnIndex("Task 2")); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement assertEquals("Task 2",c.getColumnKey(1)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement assertEquals(2,c.getColumnIndex("Task 3")); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement assertEquals("Task 3",c.getColumnKey(2)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |