File path: /jfreechart-1.0.10/src/org/jfree/chart/JFreeChart.java | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java | |||
Method name: void draw(Graphics2D, Rectangle2D, Point2D, ChartRenderingInfo)
|
Method name: AxisSpace calculateDomainAxisSpace(Graphics2D, Rectangle2D, AxisSpace)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | while (iterator.hasNext()) {↵ | |||
2 | Title currentTitle = (Title) iterator.next();↵ | 1 | Axis axis = (Axis) this.domainAxes.get(i);↵ | |
3 | EntityCollection e = drawTitle(currentTitle, g2, nonTitleArea,↵ | 2 | ↵ | |
4 | (entities != null));↵ | |||
5 | if (e != null) {↵ | |||
6 | entities.addAll(↵ | 3 | if (axis != null) {↵ | |
4 | RectangleEdge edge = getDomainAxisEdge(i);↵ | |||
7 | e);↵ | 5 | space = axis.reserveSpace(g2, this, plotArea, edge, space);↵ | |
8 | }↵ | 6 | ↵ | |
9 | } | 7 |
| |
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) | 1.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 9 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 3.6 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 11 | Axis axis = (Axis)this.domainAxes.get(i); | |||||||||||||||
38 | Title currentTitle = (Title)iterator.next(); |
| | |||||||||||||||
39 | EntityCollection e = drawTitle(currentTitle, g2, nonTitleArea, (entities != null)); |
| | |||||||||||||||
40 | if (e != null) |
| 12 | if (axis != null) | ||||||||||||||
|
| 13 | RectangleEdge edge = getDomainAxisEdge(i); | |||||||||||||||
|
| 14 | space = axis.reserveSpace(g2, this, plotArea, edge, space); | |||||||||||||||
41 | entities.addAll(e); |
| |
Row | Violation |
---|---|
1 | Unmatched statement Axis axis=(Axis)this.domainAxes.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement Title currentTitle=(Title)iterator.next(); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement EntityCollection e=drawTitle(currentTitle,g2,nonTitleArea,(entities != null)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type org.jfree.chart.entity.EntityCollection of variable e does not match with type org.jfree.chart.axis.Axis of variable axis |
5 | Unmatched statement RectangleEdge edge=getDomainAxisEdge(i); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
6 | Unmatched statement space=axis.reserveSpace(g2,this,plotArea,edge,space); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement space=axis.reserveSpace(g2,this,plotArea,edge,space); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
8 | Unmatched statement entities.addAll(e); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
9 | The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero |