if (orientation == PlotOrientation.HORIZONTAL) {
drawHorizontalItem(g2, state, dataArea, plot, domainAxis,
rangeAxis, data, row, column);
}
else if (orientation == PlotOrientation.VERTICAL) {
drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis,
data, row, column);
}
if (orientation == PlotOrientation.HORIZONTAL) {
drawHorizontalItem(g2, state, dataArea, plot, domainAxis,
rangeAxis, statData, row, column);
}
else if (orientation == PlotOrientation.VERTICAL) {
drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis,
statData, row, column);
}
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LayeredBarRenderer.java
|
|
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalBarRenderer.java
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
|
Method name: void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if (orientation == PlotOrientation.HORIZONTAL) {↵ | | 1 | if (orientation == PlotOrientation.HORIZONTAL) {↵
|
2 | drawHorizontalItem(g2, state, dataArea, plot, domainAxis,↵ | | 2 | drawHorizontalItem(g2, state, dataArea, plot, domainAxis,↵
|
3 | rangeAxis, data, row, column);↵ | | 3 | rangeAxis, statData, row, column);↵
|
4 | }↵ | | 4 | }↵
|
5 | else if (orientation == PlotOrientation.VERTICAL) {↵ | | 5 | else if (orientation == PlotOrientation.VERTICAL) {↵
|
6 | drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis,↵ | | 6 | drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis,↵
|
7 | data, row, column);↵ | | 7 | statData, row, column);↵
|
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.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 2 |
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) | 1.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | if (orientation == PlotOrientation.HORIZONTAL) | | 5 | if (orientation == PlotOrientation.HORIZONTAL) |
3 | drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, data, row, column); | | | |
| | | 6 | drawHorizontalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column); |
4 | else if (orientation == PlotOrientation.VERTICAL) | | 7 | else if (orientation == PlotOrientation.VERTICAL) |
5 | drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, data, row, column); | | | |
| | | 8 | drawVerticalItem(g2, state, dataArea, plot, domainAxis, rangeAxis, statData, row, column); |
Precondition Violations (0)
Row |
Violation |