if (getRenderer() == null) { return; } // draw the domain grid lines, if any... if (isDomainGridlinesVisible()) { Stroke gridStroke = getDomainGridlineStroke(); Paint gridPaint = getDomainGridlinePaint(); if ((gridStroke != null) && (gridPaint != null)) { Iterator iterator = ticks.iterator(); while (iterator.hasNext()) { ValueTick tick = (ValueTick) iterator.next(); getRenderer().drawDomainGridLine(g2, this, getDomainAxis(), dataArea, tick.getValue()); } } }
if (isRangeGridlinesVisible()) { Stroke gridStroke = getRangeGridlineStroke(); Paint gridPaint = getRangeGridlinePaint(); ValueAxis axis = getRangeAxis(); if (axis != null) { Iterator iterator = ticks.iterator(); while (iterator.hasNext()) { ValueTick tick = (ValueTick) iterator.next(); if (tick.getValue() != 0.0 || !isRangeZeroBaselineVisible()) { getRenderer().drawRangeLine(g2, this, getRangeAxis(), area, tick.getValue(), gridPaint, gridStroke); } } } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/XYPlot.java
Method name: void drawDomainGridlines(Graphics2D, Rectangle2D, List) Method name: void drawRangeGridlines(Graphics2D, Rectangle2D, List)
Number of AST nodes: 10 Number of AST nodes: 10
1
if (getRenderer() == null) {
1
if (
2
            return;
3
        }
4
        // draw the domain grid lines, if any...
5
        if (isDomainGridlinesVisible()) {
2
isRangeGridlinesVisible()) {
6
            Stroke gridStroke = getDomainGridlineStroke();
3
            Stroke gridStroke = getRangeGridlineStroke();
7
            Paint gridPaint = getDomainGridlinePaint();
4
            Paint gridPaint = getRangeGridlinePaint();
8
            if ((gridStroke != null) && (gridPaint
5
            ValueAxis axis = getRangeAxis();
9
 != null)) {
6
            if (axis != null) {
10
                Iterator iterator = ticks.iterator();
7
                Iterator iterator = ticks.iterator();
11
                while (iterator.hasNext()) {
8
                while (iterator.hasNext()) {
12
                    ValueTick tick = (ValueTick) iterator.next();
9
                    ValueTick tick = (ValueTick) iterator.next();
10
                    if (tick.getValue() != 0.0
11
                            || !isRangeZeroBaselineVisible()) {
13
                    getRenderer().drawDomainGridLine(g2, this, getDomainAxis(),
12
                        getRenderer().drawRangeLine(g2, this, getRangeAxis(),
14
                            dataArea, tick.getValue());
13
                                area, tick.getValue(), gridPaint, gridStroke);
14
                    }
15
                }
15
                }
16
            }
16
            }
17
        }
17
        }
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.5
Clones locationClones are declared in the same class
Number of node comparisons1