if (z.getOrientation() == PlotOrientation.HORIZONTAL) {
z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);
z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);
}
else {
z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);
z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);
}
if (z.getOrientation() == PlotOrientation.HORIZONTAL) {
z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);
z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);
}
else {
z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);
z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartPanel.java
|
|
File path: /jfreechart-1.0.10/swt/org/jfree/experimental/chart/swt/ChartComposite.java
|
Method name: void zoom(Rectangle2D)
|
|
Method name: void zoom(Rectangle)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if (z.getOrientation() == PlotOrientation.HORIZONTAL) {
↵ | | 1 | if (z.getOrientation() == PlotOrientation.HORIZONTAL) {↵
|
2 | z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);
↵ | | 2 | z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin);↵
|
3 | z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);
↵ | | 3 | z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin);↵
|
4 | }
↵ | | 4 | }↵
|
5 | else {
↵ | | 5 | else {↵
|
6 | z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);
↵ | | 6 | z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin);↵
|
7 | z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);
↵ | | 7 | z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin);↵
|
8 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 26 |
-
{Refactorable}
Mapping Summary
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) | 11.2 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
12 | if (z.getOrientation() == PlotOrientation.HORIZONTAL) | | 12 | if (z.getOrientation() == PlotOrientation.HORIZONTAL) |
13 | z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin); | | 13 | z.zoomDomainAxes(vLower, vUpper, plotInfo, selectOrigin); |
14 | z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin); | | 14 | z.zoomRangeAxes(hLower, hUpper, plotInfo, selectOrigin); |
| | | | |
15 | z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin); | | 15 | z.zoomDomainAxes(hLower, hUpper, plotInfo, selectOrigin); |
16 | z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin); | | 16 | z.zoomRangeAxes(vLower, vUpper, plotInfo, selectOrigin); |
Precondition Violations (0)
Row |
Violation |