File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedDomainCategoryPlot.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/CombinedRangeCategoryPlot.java | |||
Method name: void add(CategoryPlot, int)
|
Method name: void add(CategoryPlot, int)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | if (subplot == null) {↵ | 1 | if (subplot == null) {↵ | |
2 | throw new IllegalArgumentException("Null 'subplot' argument.");↵ | 2 | throw new IllegalArgumentException("Null 'subplot' argument.");↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (weight < 1) {↵ | 4 | if (weight <= 0) {↵ | |
5 | throw new IllegalArgumentException("Require weight >= 1.");↵ | 5 | throw new IllegalArgumentException("Require weight >= 1.");↵ | |
6 | }↵ | 6 | }↵ | |
7 | // store the plot and its weight↵ | |||
7 | subplot.setParent(this);↵ | 8 | subplot.setParent(this);↵ | |
8 | subplot.setWeight(weight);↵ | 9 | subplot.setWeight(weight);↵ | |
9 | subplot.setInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));↵ | 10 | subplot.setInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0));↵ | |
10 | subplot.setDomainAxis(null);↵ | 11 | subplot.setRangeAxis(null);↵ | |
11 | subplot.setOrientation(getOrientation());↵ | 12 | subplot.setOrientation(getOrientation());↵ | |
12 | subplot.addChangeListener(this);↵ | 13 | subplot.addChangeListener(this);↵ | |
13 | this.subplots.add(subplot);↵ | 14 | this.subplots.add(subplot);↵ | |
14 | this.totalWeight += weight;↵ | 15 | this.totalWeight += weight;↵ | |
15 | Category↵ | 16 | ↵ | |
17 | // configure the range axis...↵ | |||
16 | Axis axis = getDomainAxis();↵ | 18 | ValueAxis axis = getRangeAxis();↵ | |
17 | if (axis != null) {↵ | 19 | if (axis != null) {↵ | |
18 | axis.configure();↵ | 20 | axis.configure();↵ | |
19 | }↵ | 21 | }↵ | |
20 | fireChangeEvent(); | 22 |
| |
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.9 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 80 |
Number of mapped statements | 13 |
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) | 59.5 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (subplot == null) | 1 | if (subplot == null) | |||||||||||||||||
2 | throw new IllegalArgumentException("Null 'subplot' argument."); | 2 | throw new IllegalArgumentException("Null 'subplot' argument."); | |||||||||||||||||
| 3 | if (weight <= 0) | ||||||||||||||||||
|
| 4 | throw new IllegalArgumentException("Require weight >= 1."); | |||||||||||||||||
3 | if (weight < 1) | | ||||||||||||||||||
4 | throw new IllegalArgumentException("Require weight >= 1."); |
| | |||||||||||||||||
5 | subplot.setParent(this); | 5 | subplot.setParent(this); | |||||||||||||||||
6 | subplot.setWeight(weight); | 6 | subplot.setWeight(weight); | |||||||||||||||||
7 | subplot.setInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0)); | 7 | subplot.setInsets(new RectangleInsets(0.0, 0.0, 0.0, 0.0)); | |||||||||||||||||
8 | subplot.setDomainAxis(null); |
| 8 | subplot.setRangeAxis(null); | ||||||||||||||||
9 | subplot.setOrientation(getOrientation()); | 9 | subplot.setOrientation(getOrientation()); | |||||||||||||||||
10 | subplot.addChangeListener(this); | 10 | subplot.addChangeListener(this); | |||||||||||||||||
11 | this.subplots.add(subplot); | 11 | this.subplots.add(subplot); | |||||||||||||||||
12 | this.totalWeight += weight; | 12 | this.totalWeight += weight; | |||||||||||||||||
13 | CategoryAxis axis = getDomainAxis(); |
| 13 | ValueAxis axis = getRangeAxis(); | ||||||||||||||||
14 | if (axis != null) |
| 14 | if (axis != null) | ||||||||||||||||
15 | axis.configure(); |
| 15 | axis.configure(); |
Row | Violation |
---|---|
1 | Unmatched throw new IllegalArgumentException("Require weight >= 1."); |
2 | Unmatched throw new IllegalArgumentException("Require weight >= 1."); |
3 | Expression subplot.setDomainAxis(null) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression subplot.setRangeAxis(null) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression subplot.setDomainAxis(null) is a void method call, and thus it cannot be parameterized |
6 | Expression subplot.setRangeAxis(null) is a void method call, and thus it cannot be parameterized |