File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/VectorSeriesTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XIntervalSeriesTests.java | |||
Method name: void testIndexOf()
|
Method name: void testIndexOf()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | VectorSeries s1 = new VectorSeries("Series 1");↵ | 1 | XIntervalSeries s1 = new XIntervalSeries("Series 1");↵ | |
2 | s1.add(1.0, 1.0, 1.0, 2.0);↵ | 2 | s1.add(1.0, 1.0, 1.0, 2.0);↵ | |
3 | s1.add(2.0, 2.0, 2.0, 3.0);↵ | 3 | s1.add(2.0, 2.0, 2.0, 3.0);↵ | |
4 | s1.add(3.0, 3.0, 3.0, 4.0);↵ | 4 | s1.add(3.0, 3.0, 3.0, 4.0);↵ | |
5 | assertEquals(0, s1.indexOf(new XYCoordinate(1.0, 1.0))); | 5 | assertEquals(0, s1.indexOf(new Double(1.0))); | |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 17 |
Number of mapped statements | 4 |
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) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | VectorSeries s1 = new VectorSeries("Series 1"); |
| 1 | XIntervalSeries s1 = new XIntervalSeries("Series 1"); | ||||||||||||||||
2 | s1.add(1.0, 1.0, 1.0, 2.0); |
| 2 | s1.add(1.0, 1.0, 1.0, 2.0); | ||||||||||||||||
3 | s1.add(2.0, 2.0, 2.0, 3.0); |
| 3 | s1.add(2.0, 2.0, 2.0, 3.0); | ||||||||||||||||
4 | s1.add(3.0, 3.0, 3.0, 4.0); |
| 4 | s1.add(3.0, 3.0, 3.0, 4.0); | ||||||||||||||||
|
| 5 | assertEquals(0, s1.indexOf(new Double(1.0))); | |||||||||||||||||
5 | assertEquals(0, s1.indexOf(new XYCoordinate(1.0, 1.0))); |
| |
Row | Violation |
---|---|
1 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double) |
2 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double) |
3 | Expression s1 cannot be unified with expression s1 , because common superclass org.jfree.data.ComparableObjectSeries does not declare member(s) public void add(double, double, double, double) |
4 | Unmatched statement assertEquals(0,s1.indexOf(new Double(1.0))); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement assertEquals(0,s1.indexOf(new XYCoordinate(1.0,1.0))); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Clone fragment #1 returns variable s1 with type org.jfree.data.xy.VectorSeries , while Clone fragment #2 returns variable s1 with type org.jfree.data.xy.XIntervalSeries |