TaskSeriesCollection c = createCollection1(); assertEquals("Task 1", c.getColumnKey(0)); assertEquals("Task 2", c.getColumnKey(1)); assertEquals("Task 3", c.getColumnKey(2));
TaskSeriesCollection c = createCollection1(); assertEquals(0, c.getColumnIndex("Task 1")); assertEquals(1, c.getColumnIndex("Task 2")); assertEquals(2, c.getColumnIndex("Task 3"));
Clone fragments detected by clone detection tool
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"));
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are declared in the same class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    TaskSeriesCollection c = createCollection1();
    1
    TaskSeriesCollection c = createCollection1();
                                                                                                
    2
    assertEquals(0, c.getColumnIndex("Task 1"));
    Preondition Violations
    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
    assertEquals(0, c.getColumnIndex("Task 1"));
    2
    assertEquals("Task 1", c.getColumnKey(0));
    2
    assertEquals("Task 1", c.getColumnKey(0));
    Preondition Violations
    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
    assertEquals(1, c.getColumnIndex("Task 2"));
    Preondition Violations
    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
    3
    assertEquals(1, c.getColumnIndex("Task 2"));
    3
    assertEquals("Task 2", c.getColumnKey(1));
    3
    assertEquals("Task 2", c.getColumnKey(1));
    Preondition Violations
    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
                                                                                            
                                                                                                
    4
    assertEquals(2, c.getColumnIndex("Task 3"));
    Preondition Violations
    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
    4
    assertEquals(2, c.getColumnIndex("Task 3"));
    4
    assertEquals("Task 3", c.getColumnKey(2));
    4
    assertEquals("Task 3", c.getColumnKey(2));
    Preondition Violations
    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
                                                                                            
    Precondition Violations (6)
    Row Violation
    1Unmatched 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
    2Unmatched 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
    3Unmatched 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
    4Unmatched 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
    5Unmatched 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
    6Unmatched 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