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/YIntervalSeriesTests.java | |||
Method name: void testSetMaximumItemCount2()
|
Method name: void testSetMaximumItemCount2()
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | VectorSeries s1 = new VectorSeries("S1");↵ | 1 | YIntervalSeries s1 = new YIntervalSeries("S1");↵ | |
2 | s1.add(1.0, 1.1, 1.1, 1.1);↵ | 2 | s1.add(1.0, 1.1, 1.1, 1.1);↵ | |
3 | s1.add(2.0, 2.2, 2.2, 2.2);↵ | 3 | s1.add(2.0, 2.2, 2.2, 2.2);↵ | |
4 | s1.add(3.0, 3.3, 3.3, 3.3);↵ | 4 | s1.add(3.0, 3.3, 3.3, 3.3);↵ | |
5 | s1.setMaximumItemCount(2);↵ | 5 | s1.setMaximumItemCount(2);↵ | |
6 | assertEquals(2.0, s1.getXValue(0), EPSILON);↵ | 6 | assertEquals(2.0, s1.getX(0).doubleValue(), EPSILON);↵ | |
7 | assertEquals(3.0, s1.getXValue(1), EPSILON); | 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 | 5 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | VectorSeries s1 = new VectorSeries("S1"); |
| 1 | YIntervalSeries s1 = new YIntervalSeries("S1"); | ||||||||||||||||
2 | s1.add(1.0, 1.1, 1.1, 1.1); |
| 2 | s1.add(1.0, 1.1, 1.1, 1.1); | ||||||||||||||||
3 | s1.add(2.0, 2.2, 2.2, 2.2); |
| 3 | s1.add(2.0, 2.2, 2.2, 2.2); | ||||||||||||||||
4 | s1.add(3.0, 3.3, 3.3, 3.3); |
| 4 | s1.add(3.0, 3.3, 3.3, 3.3); | ||||||||||||||||
5 | s1.setMaximumItemCount(2); |
| 5 | s1.setMaximumItemCount(2); | ||||||||||||||||
|
| 6 | assertEquals(2.0, s1.getX(0).doubleValue(), EPSILON); | |||||||||||||||||
6 | assertEquals(2.0, s1.getXValue(0), EPSILON); |
| | |||||||||||||||||
|
| 7 | assertEquals(3.0, s1.getX(1).doubleValue(), EPSILON); | |||||||||||||||||
7 | assertEquals(3.0, s1.getXValue(1), 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) |
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(2.0,s1.getX(0).doubleValue(),EPSILON); 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.0,s1.getXValue(0),EPSILON); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement assertEquals(3.0,s1.getX(1).doubleValue(),EPSILON); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
7 | Unmatched statement assertEquals(3.0,s1.getXValue(1),EPSILON); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | 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.YIntervalSeries |