File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MultiplePiePlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/WaferMapPlot.java | |||
Method name: void setDataset(CategoryDataset)
|
Method name: void setDataset(WaferMapDataset)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (this.dataset != null) {↵ | 1 | if (this.dataset != null) {↵ | |
2 | this.dataset.removeChangeListener(this);↵ | 2 | this.dataset.removeChangeListener(this);↵ | |
3 | }↵ | 3 | }↵ | |
4 | // set the new dataset, and register the chart as a change listener...↵ | 4 | // set the new dataset, and register the chart as a change listener...↵ | |
5 | this.dataset = dataset;↵ | 5 | this.dataset = dataset;↵ | |
6 | if (dataset != null) {↵ | 6 | if (dataset != null) {↵ | |
7 | setDatasetGroup(dataset.getGroup());↵ | 7 | setDatasetGroup(dataset.getGroup());↵ | |
8 | dataset.addChangeListener(this);↵ | 8 | dataset.addChangeListener(this);↵ | |
9 | }↵ | 9 | }↵ | |
10 | // send a dataset change event to self to trigger plot change event↵ | 10 | // send a dataset change event to self to trigger plot change event↵ | |
11 | datasetChanged(new DatasetChangeEvent(this, dataset)); | 11 |
| |
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.7 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 22 |
Number of mapped statements | 7 |
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) | 19.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (this.dataset != null) |
| 1 | if (this.dataset != null) | ||||||||||||||||
2 | this.dataset.removeChangeListener(this); |
| 2 | this.dataset.removeChangeListener(this); | ||||||||||||||||
3 | this.dataset = dataset; |
| 3 | this.dataset = dataset; | ||||||||||||||||
4 | if (dataset != null) |
| 4 | if (dataset != null) | ||||||||||||||||
5 | setDatasetGroup(dataset.getGroup()); |
| 5 | setDatasetGroup(dataset.getGroup()); | ||||||||||||||||
6 | dataset.addChangeListener(this); |
| 6 | dataset.addChangeListener(this); | ||||||||||||||||
7 | datasetChanged(new DatasetChangeEvent(this, dataset)); |
| 7 | datasetChanged(new DatasetChangeEvent(this, dataset)); |
Row | Violation |
---|---|
1 | Expression this.dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression this.dataset is a field being modified, and thus it cannot be parameterized |
3 | Expression this.dataset is a field being modified, and thus it cannot be parameterized |