File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java | |||
Method name: void restoreAutoDomainBounds()
|
Method name: void restoreAutoRangeBounds()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Plot p = this.chart.getPlot();↵ | 1 | Plot p = this.chart.getPlot();↵ | |
2 | if (p instanceof Zoomable) {↵ | 2 | if (p instanceof ValueAxisPlot) {↵ | |
3 | Zoomable z = (Zoomable) p;↵ | 3 | Zoomable z = (Zoomable) p;↵ | |
4 | // we need to guard against this.zoomPoint being null↵ | 4 | // we need to guard against this.zoomPoint being null↵ | |
5 | org.eclipse.swt.graphics.Point zp = ↵ | 5 | org.eclipse.swt.graphics.Point zp = ↵ | |
6 | (this.zoomPoint != null ? this.zoomPoint ↵ | 6 | (this.zoomPoint != null ? this.zoomPoint ↵ | |
7 | : new org.eclipse.swt.graphics.Point(0, 0));↵ | 7 | : new org.eclipse.swt.graphics.Point(0, 0));↵ | |
8 | z.zoomDomainAxes(0.0, this.info.getPlotInfo(), ↵ | 8 | z.zoomRangeAxes(0.0, this.info.getPlotInfo(), ↵ | |
9 | SWTUtils.toAwtPoint(zp));↵ | 9 | SWTUtils.toAwtPoint(zp)); ↵ | |
10 | } | 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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 17 |
Number of mapped statements | 5 |
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 | Plot p = this.chart.getPlot(); | 1 | Plot p = this.chart.getPlot(); | |||||||||||||||
2 | if (p instanceof Zoomable) |
| 2 | if (p instanceof ValueAxisPlot) | ||||||||||||||
3 | Zoomable z = (Zoomable)p; | 3 | Zoomable z = (Zoomable)p; | |||||||||||||||
4 | org.eclipse.swt.graphics.Point zp = (this.zoomPoint != null ? this.zoomPoint : new org.eclipse.swt.graphics.Point(0, 0)); | 4 | org.eclipse.swt.graphics.Point zp = (this.zoomPoint != null ? this.zoomPoint : new org.eclipse.swt.graphics.Point(0, 0)); | |||||||||||||||
5 | z.zoomDomainAxes(0.0, this.info.getPlotInfo(), SWTUtils.toAwtPoint(zp)); |
| 5 | z.zoomRangeAxes(0.0, this.info.getPlotInfo(), SWTUtils.toAwtPoint(zp)); |
Row | Violation |
---|---|
1 | Expression p instanceof Zoomable cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression p instanceof ValueAxisPlot cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Type org.jfree.chart.plot.Zoomable does not match with type org.jfree.chart.plot.ValueAxisPlot |
4 | Expression z.zoomDomainAxes(0.0,this.info.getPlotInfo(),SWTUtils.toAwtPoint(zp)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression z.zoomRangeAxes(0.0,this.info.getPlotInfo(),SWTUtils.toAwtPoint(zp)) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression z.zoomDomainAxes(0.0,this.info.getPlotInfo(),SWTUtils.toAwtPoint(zp)) is a void method call, and thus it cannot be parameterized |
7 | Expression z.zoomRangeAxes(0.0,this.info.getPlotInfo(),SWTUtils.toAwtPoint(zp)) is a void method call, and thus it cannot be parameterized |