File path: /jfreechart-1.0.10/tests/org/jfree/data/time/ohlc/junit/OHLCSeriesTests.java | File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XYIntervalSeriesTests.java | |||
Method name: void testClear()
|
Method name: void testClear()
|
|||
Number of AST nodes: 10 | Number of AST nodes: 10 | |||
1 | OHLCSeries s1 = new OHLCSeries("S1");↵ | 1 | XYIntervalSeries s1 = new XYIntervalSeries("S1");↵ | |
2 | s1.addChangeListener(this);↵ | 2 | s1.addChangeListener(this);↵ | |
3 | s1.clear();↵ | 3 | s1.clear();↵ | |
4 | assertNull(this.lastEvent);↵ | 4 | assertNull(this.lastEvent);↵ | |
5 | assertTrue(s1.isEmpty());↵ | 5 | assertTrue(s1.isEmpty());↵ | |
6 | s1.add(new Year(2006), 1.0, 1.1, 1.1, 1.1);↵ | 6 | s1.add(1.0, 2.0, 3.0, 4.0, 5.0, 6.0);↵ | |
7 | assertFalse(s1.isEmpty());↵ | 7 | assertFalse(s1.isEmpty());↵ | |
8 | s1.clear();↵ | 8 | s1.clear();↵ | |
9 | assertNotNull(this.lastEvent);↵ | 9 | assertNotNull(this.lastEvent);↵ | |
10 | assertTrue(s1.isEmpty()); | 10 |
| |
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 | 38 |
Number of mapped statements | 10 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | OHLCSeries s1 = new OHLCSeries("S1"); |
| 1 | XYIntervalSeries s1 = new XYIntervalSeries("S1"); | ||||||||||||||||||
2 | s1.addChangeListener(this); |
| 2 | s1.addChangeListener(this); | ||||||||||||||||||
3 | s1.clear(); |
| 3 | s1.clear(); | ||||||||||||||||||
4 | assertNull(this.lastEvent); | 4 | assertNull(this.lastEvent); | |||||||||||||||||||
5 | assertTrue(s1.isEmpty()); |
| 5 | assertTrue(s1.isEmpty()); | ||||||||||||||||||
6 | s1.add(new Year(2006), 1.0, 1.1, 1.1, 1.1); |
| 6 | s1.add(1.0, 2.0, 3.0, 4.0, 5.0, 6.0); | ||||||||||||||||||
7 | assertFalse(s1.isEmpty()); |
| 7 | assertFalse(s1.isEmpty()); | ||||||||||||||||||
8 | s1.clear(); |
| 8 | s1.clear(); | ||||||||||||||||||
9 | assertNotNull(this.lastEvent); | 9 | assertNotNull(this.lastEvent); | |||||||||||||||||||
10 | assertTrue(s1.isEmpty()); |
| 10 | assertTrue(s1.isEmpty()); |
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(org.jfree.data.time.RegularTimePeriod, double, double, double, double) , public void add(double, double, double, double, double, double) |
2 | Expression s1.add(new Year(2006),1.0,1.1,1.1,1.1) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression s1.add(1.0,2.0,3.0,4.0,5.0,6.0) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression s1.add(new Year(2006),1.0,1.1,1.1,1.1) is a void method call, and thus it cannot be parameterized |
5 | Expression s1.add(1.0,2.0,3.0,4.0,5.0,6.0) is a void method call, and thus it cannot be parameterized |