413-1-2

public void drawDomainMarker(Graphics2D g2, ContourPlot plot, ValueAxis domainAxis, Marker marker, Rectangle2D dataArea) { if (marker instanceof ValueMarker) { ValueMarker vm = (ValueMarker) marker; double value = vm.getValue(); Range range = domainAxis.getRange(); if (!range.contains(value)) { return; } double x = domainAxis.valueToJava2D(value, dataArea, RectangleEdge.BOTTOM); Line2D line = new Line2D.Double(x, dataArea.getMinY(), x, dataArea.getMaxY()); Paint paint = marker.getOutlinePaint(); Stroke stroke = marker.getOutlineStroke(); g2.setPaint(paint != null ? paint : Plot.DEFAULT_OUTLINE_PAINT); g2.setStroke(stroke != null ? stroke : Plot.DEFAULT_OUTLINE_STROKE); g2.draw(line);
public void drawRangeMarker(Graphics2D g2, ContourPlot plot, ValueAxis rangeAxis, Marker marker, Rectangle2D dataArea) { if (marker instanceof ValueMarker) { ValueMarker vm = (ValueMarker) marker; double value = vm.getValue(); Range range = rangeAxis.getRange(); if (!range.contains(value)) { return; } double y = rangeAxis.valueToJava2D(value, dataArea, RectangleEdge.LEFT); Line2D line = new Line2D.Double(dataArea.getMinX(), y, dataArea.getMaxX(), y); Paint paint = marker.getOutlinePaint(); Stroke stroke = marker.getOutlineStroke(); g2.setPaint(paint != null ? paint : Plot.DEFAULT_OUTLINE_PAINT); g2.setStroke(stroke != null ? stroke : Plot.DEFAULT_OUTLINE_STROKE); g2.draw(line);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ContourPlot.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/ContourPlot.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    public void drawDomainMarker(Graphics2D g2,↵

1

    public void drawRangeMarker(Graphics2D g2,↵

2

                                     ContourPlot plot,↵

2

                                    ContourPlot plot,↵

3

                                     ValueAxis domainAxis,↵

3

                                    ValueAxis rangeAxis,↵

4

                                     Marker marker,↵

4

                                    Marker marker,↵

5

                                     Rectangle2D dataArea) {↵

5

                                    Rectangle2D dataArea) {↵

6

            if (marker instanceof ValueMarker) {↵

6

            if (marker instanceof ValueMarker) {↵

7

                ValueMarker vm = (ValueMarker) marker;↵

7

                ValueMarker vm = (ValueMarker) marker;↵

8

                double value = vm.getValue();↵

8

                double value = vm.getValue();↵

9

                Range range = domainAxis.getRange();↵

9

                Range range = rangeAxis.getRange();↵

10

                if (!range.contains(value)) {↵

10

                if (!range.contains(value)) {↵

11

                    return;↵

11

                    return;↵

12

                }↵

12

                }↵

13

      ↵

14

                double x = domainAxis.valueToJava2D(value, dataArea, ↵

13

                double y = rangeAxis.valueToJava2D(value, dataArea, ↵

15

                        RectangleEdge.BOTTOM);↵

14

                        RectangleEdge.LEFT);↵

16

                Line2D line = new Line2D.Double(x, dataArea.getMinY(), x, ↵

15

                Line2D line = new Line2D.Double(dataArea.getMinX(), y, ↵

17

                        dataArea.getMaxY());↵

16

                        dataArea.getMaxX(), y);↵

18

                Paint paint = marker.getOutlinePaint();↵

17

                Paint paint = marker.getOutlinePaint();↵

19

                Stroke stroke = marker.getOutlineStroke();↵

18

                Stroke stroke = marker.getOutlineStroke();↵

20

                g2.setPaint(paint != null ? paint : Plot.DEFAULT_OUTLINE_PAINT);↵

19

                g2.setPaint(paint != null ? paint : Plot.DEFAULT_OUTLINE_PAINT);↵

21

                g2.setStroke(stroke != null ? stroke : Plot.DEFAULT_OUTLINE_STROKE);↵

20

                g2.setStroke(stroke != null ? stroke : Plot.DEFAULT_OUTLINE_STROKE);↵

22

                g2.draw(line);↵

21

                g2.draw(line);↵

23

22

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0