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/XYIntervalSeriesTests.java | |||
Method name: void testIndexOf2()
|
Method name: void testSetMaximumItemCount2()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | VectorSeries s1 = new VectorSeries("Series 1");↵ | 1 | XYIntervalSeries s1 = new XYIntervalSeries("S1");↵ | |
2 | s1.add(1.0, 1.0, 1.0, 2.0);↵ | 2 | s1.add(1.0, 1.1, 1.1, 1.1, 1.1, 1.1);↵ | |
3 | s1.add(3.0, 3.0, 3.0, 3.0);↵ | 3 | s1.add(2.0, 2.2, 2.2, 2.2, 2.2, 2.2);↵ | |
4 | s1.add(2.0, 2.0, 2.0, 2.0);↵ | 4 | s1.add(3.0, 3.3, 3.3, 3.3, 2.2, 2.2);↵ | |
5 | assertEquals(0, s1.indexOf(new XYCoordinate(1.0, 1.0))); ↵ | 5 | s1.setMaximumItemCount(2);↵ | |
6 | assertEquals(1, s1.indexOf(new XYCoordinate(3.0, 3.0))); ↵ | 6 | assertEquals(2.0, s1.getX(0).doubleValue(), EPSILON);↵ | |
7 | assertEquals(2, s1.indexOf(new XYCoordinate(2.0, 2.0))); | 7 | assertEquals(3.0, s1.getX(1).doubleValue(), EPSILON); | |
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 | 29 |
Number of mapped statements | 6 |
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 | XYIntervalSeries s1 = new XYIntervalSeries("S1"); | |||||||||||||||||||||||||
2 | s1.add(1.0, 1.0, 1.0, 2.0); |
| 2 | s1.add(1.0, 1.1, 1.1, 1.1, 1.1, 1.1); | |||||||||||||||||||||||||
3 | s1.add(3.0, 3.0, 3.0, 3.0); |
| 3 | s1.add(2.0, 2.2, 2.2, 2.2, 2.2, 2.2); | |||||||||||||||||||||||||
|
| 4 | s1.add(3.0, 3.3, 3.3, 3.3, 2.2, 2.2); | ||||||||||||||||||||||||||
4 | s1.add(2.0, 2.0, 2.0, 2.0); |
| 5 | s1.setMaximumItemCount(2); | |||||||||||||||||||||||||
5 | assertEquals(0, s1.indexOf(new XYCoordinate(1.0, 1.0))); |
| | ||||||||||||||||||||||||||
6 | assertEquals(1, s1.indexOf(new XYCoordinate(3.0, 3.0))); |
| 6 | assertEquals(2.0, s1.getX(0).doubleValue(), EPSILON); | |||||||||||||||||||||||||
7 | assertEquals(2, s1.indexOf(new XYCoordinate(2.0, 2.0))); |
| 7 | assertEquals(3.0, s1.getX(1).doubleValue(), EPSILON); |
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) , public void add(double, double, double, double, double, double) |
2 | Expression s1.add(1.0,1.0,1.0,2.0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression s1.add(1.0,1.1,1.1,1.1,1.1,1.1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression s1.add(1.0,1.0,1.0,2.0) is a void method call, and thus it cannot be parameterized |
5 | Expression s1.add(1.0,1.1,1.1,1.1,1.1,1.1) is a void method call, and thus it cannot be parameterized |
6 | 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) , public void add(double, double, double, double, double, double) |
7 | Expression s1.add(3.0,3.0,3.0,3.0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression s1.add(2.0,2.2,2.2,2.2,2.2,2.2) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression s1.add(3.0,3.0,3.0,3.0) is a void method call, and thus it cannot be parameterized |
10 | Expression s1.add(2.0,2.2,2.2,2.2,2.2,2.2) is a void method call, and thus it cannot be parameterized |
11 | Unmatched statement s1.add(3.0,3.3,3.3,3.3,2.2,2.2); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
12 | Expression s1.add(2.0,2.0,2.0,2.0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
13 | Expression s1.setMaximumItemCount(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression s1.add(2.0,2.0,2.0,2.0) is a void method call, and thus it cannot be parameterized |
15 | Expression s1.setMaximumItemCount(2) is a void method call, and thus it cannot be parameterized |
16 | 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) |
17 | Expression s1.add(2.0,2.0,2.0,2.0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression s1.setMaximumItemCount(2) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
19 | Expression s1.add(2.0,2.0,2.0,2.0) is a void method call, and thus it cannot be parameterized |
20 | Expression s1.setMaximumItemCount(2) is a void method call, and thus it cannot be parameterized |
21 | 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 |
22 | Expression assertEquals(1,s1.indexOf(new XYCoordinate(3.0,3.0))) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
23 | Expression assertEquals(2.0,s1.getX(0).doubleValue(),EPSILON) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
24 | Expression assertEquals(1,s1.indexOf(new XYCoordinate(3.0,3.0))) is a void method call, and thus it cannot be parameterized |
25 | Expression assertEquals(2.0,s1.getX(0).doubleValue(),EPSILON) is a void method call, and thus it cannot be parameterized |
26 | Expression assertEquals(2,s1.indexOf(new XYCoordinate(2.0,2.0))) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
27 | Expression assertEquals(3.0,s1.getX(1).doubleValue(),EPSILON) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
28 | Expression assertEquals(2,s1.indexOf(new XYCoordinate(2.0,2.0))) is a void method call, and thus it cannot be parameterized |
29 | Expression assertEquals(3.0,s1.getX(1).doubleValue(),EPSILON) is a void method call, and thus it cannot be parameterized |
30 | 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.XYIntervalSeries |