for (int k = 0; k < blockCount; k++) { int index = (inverted ? blockCount - k - 1 : k); Object[] prev = (Object[]) values.get(index); Object[] curr = (Object[]) values.get(index + 1); int series = 0; if (curr[0] == null) { series = -((Integer) prev[0]).intValue(); } else { series = ((Integer) curr[0]).intValue(); if (series < 0) { series = -((Integer) prev[0]).intValue(); } } double v0 = ((Double) prev[1]).doubleValue(); double vv0 = rangeAxis.valueToJava2D(v0, dataArea, plot.getRangeAxisEdge()); double v1 = ((Double) curr[1]).doubleValue(); double vv1 = rangeAxis.valueToJava2D(v1, dataArea, plot.getRangeAxisEdge()); Shape[] faces = createHorizontalBlock(barX0, barW, vv0, vv1, inverted); Paint fillPaint = getItemPaint(series, column); Paint fillPaintDark = fillPaint; if (fillPaintDark instanceof Color) { fillPaintDark = ((Color) fillPaint).darker(); } boolean drawOutlines = isDrawBarOutline(); Paint outlinePaint = fillPaint; if (drawOutlines) { outlinePaint = getItemOutlinePaint(series, column); g2.setStroke(getItemOutlineStroke(series, column)); } for (int f = 0; f < 6; f++) { if (f == 5) { g2.setPaint(fillPaint); } else { g2.setPaint(fillPaintDark); } g2.fill(faces[f]); if (drawOutlines) { g2.setPaint(outlinePaint); g2.draw(faces[f]); } } itemLabelList.add(new Object[] {new Integer(series), faces[5].getBounds2D(), BooleanUtilities.valueOf(v0 < getBase())}); // add an item entity, if this information is being collected EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, series, column, faces[5]);
for (int k = 0; k < blockCount; k++) { int index = (inverted ? blockCount - k - 1 : k); Object[] prev = (Object[]) values.get(index); Object[] curr = (Object[]) values.get(index + 1); int series = 0; if (curr[0] == null) { series = -((Integer) prev[0]).intValue(); } else { series = ((Integer) curr[0]).intValue(); if (series < 0) { series = -((Integer) prev[0]).intValue(); } } double v0 = ((Double) prev[1]).doubleValue(); double vv0 = rangeAxis.valueToJava2D(v0, dataArea, plot.getRangeAxisEdge()); double v1 = ((Double) curr[1]).doubleValue(); double vv1 = rangeAxis.valueToJava2D(v1, dataArea, plot.getRangeAxisEdge()); Shape[] faces = createVerticalBlock(barX0, barW, vv0, vv1, inverted); Paint fillPaint = getItemPaint(series, column); Paint fillPaintDark = fillPaint; if (fillPaintDark instanceof Color) { fillPaintDark = ((Color) fillPaint).darker(); } boolean drawOutlines = isDrawBarOutline(); Paint outlinePaint = fillPaint; if (drawOutlines) { outlinePaint = getItemOutlinePaint(series, column); g2.setStroke(getItemOutlineStroke(series, column)); } for (int f = 0; f < 6; f++) { if (f == 5) { g2.setPaint(fillPaint); } else { g2.setPaint(fillPaintDark); } g2.fill(faces[f]); if (drawOutlines) { g2.setPaint(outlinePaint); g2.draw(faces[f]); } } itemLabelList.add(new Object[] {new Integer(series), faces[5].getBounds2D(), BooleanUtilities.valueOf(v0 < getBase())}); // add an item entity, if this information is being collected EntityCollection entities = state.getEntityCollection(); if (entities != null) { addItemEntity(entities, dataset, series, column, faces[5]);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedBarRenderer3D.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StackedBarRenderer3D.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
for (int k = 0; k < blockCount; k++) {
1
for (int k = 0; k < blockCount; k++) {
2
            int index = (inverted ? blockCount - k - 1 : k);
2
            int index = (inverted ? blockCount - k - 1 : k);
3
            Object[] prev = (Object[]) values.get(index);
3
            Object[] prev = (Object[]) values.get(index);
4
            Object[] curr = (Object[]) values.get(index + 1);
4
            Object[] curr = (Object[]) values.get(index + 1);
5
            int series = 0;
5
            int series = 0;
6
            if (curr[0] == null) {
6
            if (curr[0] == null) {
7
                series = -((Integer) prev[0]).intValue();
7
                series = -((Integer) prev[0]).intValue();
8
            }
8
            }
9
            else {
9
            else {
10
                series = ((Integer) curr[0]).intValue();
10
                series = ((Integer) curr[0]).intValue();
11
                if (series < 0) {
11
                if (series < 0) {
12
                    series = -((Integer) prev[0]).intValue();
12
                    series = -((Integer) prev[0]).intValue();
13
                }
13
                }
14
            }
14
            }
15
            double v0 = ((Double) prev[1]).doubleValue();
15
            double v0 = ((Double) prev[1]).doubleValue();
16
            double vv0 = rangeAxis.valueToJava2D(v0, dataArea,
16
            double vv0 = rangeAxis.valueToJava2D(v0, dataArea,
17
                    plot.getRangeAxisEdge());
17
                    plot.getRangeAxisEdge());
18
            double v1 = ((Double) curr[1]).doubleValue();
18
            double v1 = ((Double) curr[1]).doubleValue();
19
            double vv1 = rangeAxis.valueToJava2D(v1, dataArea,
19
            double vv1 = rangeAxis.valueToJava2D(v1, dataArea,
20
                    plot.getRangeAxisEdge());
20
                    plot.getRangeAxisEdge());
21
            Shape[] faces = createHorizontalBlock(barX0, barW, vv0, vv1,
21
            Shape[] faces = createVerticalBlock(barX0, barW, vv0, vv1,
22
                    inverted);
22
                    inverted);
23
            Paint fillPaint = getItemPaint(series, column);
23
            Paint fillPaint = getItemPaint(series, column);
24
            Paint fillPaintDark = fillPaint;
24
            Paint fillPaintDark = fillPaint;
25
            if (fillPaintDark instanceof Color) {
25
            if (fillPaintDark instanceof Color) {
26
                fillPaintDark = ((Color) fillPaint).darker();
26
                fillPaintDark = ((Color) fillPaint).darker();
27
            }
27
            }
28
            boolean drawOutlines = isDrawBarOutline();
28
            boolean drawOutlines = isDrawBarOutline();
29
            Paint outlinePaint = fillPaint;
29
            Paint outlinePaint = fillPaint;
30
            if (drawOutlines) {
30
            if (drawOutlines) {
31
                outlinePaint = getItemOutlinePaint(series, column);
31
                outlinePaint = getItemOutlinePaint(series, column);
32
                g2.setStroke(getItemOutlineStroke(series, column));
32
                g2.setStroke(getItemOutlineStroke(series, column));
33
            }
33
            }
34
            for (int f = 0; f < 6; f++) {
34
            for (int f = 0; f < 6; f++) {
35
                if (f == 5) {
35
                if (f == 5) {
36
                    g2.setPaint(fillPaint);
36
                    g2.setPaint(fillPaint);
37
                }
37
                }
38
                else {
38
                else {
39
                    g2.setPaint(fillPaintDark);
39
                    g2.setPaint(fillPaintDark);
40
                }
40
                }
41
                g2.fill(faces[f]);
41
                g2.fill(faces[f]);
42
                if (drawOutlines) {
42
                if (drawOutlines) {
43
                    g2.setPaint(outlinePaint);
43
                    g2.setPaint(outlinePaint);
44
                    g2.draw(faces[f]);
44
                    g2.draw(faces[f]);
45
                }
45
                }
46
            }
46
            }
47
            itemLabelList.add(new Object[] {new Integer(series),
47
            itemLabelList.add(new Object[] {new Integer(series),
48
                    faces[5].getBounds2D(),
48
                    faces[5].getBounds2D(),
49
                    BooleanUtilities.valueOf(v0 < getBase())});
49
                    BooleanUtilities.valueOf(v0 < getBase())});
50
            // add an item entity, if this information is being collected
50
            // add an item entity, if this information is being collected
51
            EntityCollection entities = state.getEntityCollection();
51
            EntityCollection entities = state.getEntityCollection();
52
            if (entities != null) {
52
            if (entities != null) {
53
                addItemEntity(entities, dataset, series, column, faces[5]);
53
                addItemEntity(entities, dataset, series, column, faces[5]);
54
            
54
            
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0