File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedDomainCategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedDomainXYPlot.java | |||
Method name: void remove(CategoryPlot)
|
Method name: void remove(XYPlot)
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | if (position != -1) {↵ | 1 | if (position != -1) {↵ | |
2 | this.subplots.remove(position);↵ | 2 | this.subplots.remove(position);↵ | |
3 | subplot.setParent(null);↵ | 3 | subplot.setParent(null);↵ | |
4 | subplot.removeChangeListener(this);↵ | 4 | subplot.removeChangeListener(this);↵ | |
5 | this.totalWeight -= subplot.getWeight();↵ | 5 | this.totalWeight -= subplot.getWeight();↵ | |
6 | CategoryAxis domain = getDomainAxis();↵ | 6 | ValueAxis domain = getDomainAxis();↵ | |
7 | if (domain != null) {↵ | 7 | if (domain != null) {↵ | |
8 | domain.configure();↵ | 8 | domain.configure();↵ | |
9 | }↵ | 9 | }↵ | |
10 | fireChangeEvent();↵ | 10 | fireChangeEvent();↵ | |
11 | } | 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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 54 |
Number of mapped statements | 9 |
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) | 3.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | if (position != -1) | 10 | if (position != -1) | ||||||||||||||
11 | this.subplots.remove(position); | 11 | this.subplots.remove(position); | ||||||||||||||
12 | subplot.setParent(null); |
| 12 | subplot.setParent(null); | |||||||||||||
13 | subplot.removeChangeListener(this); |
| 13 | subplot.removeChangeListener(this); | |||||||||||||
14 | this.totalWeight -= subplot.getWeight(); |
| 14 | this.totalWeight -= subplot.getWeight(); | |||||||||||||
15 | CategoryAxis domain = getDomainAxis(); |
| 15 | ValueAxis domain = getDomainAxis(); | |||||||||||||
16 | if (domain != null) |
| 16 | if (domain != null) | |||||||||||||
17 | domain.configure(); |
| 17 | domain.configure(); | |||||||||||||
18 | fireChangeEvent(); | 18 | fireChangeEvent(); |
Row | Violation |
---|---|
1 | Expression subplot cannot be unified with expression subplot , because common superclass org.jfree.chart.plot.Plot does not declare member(s) public int getWeight() |