1086-1-2

private Number getMinPaintValue(Integer index) { double minValue = Double.POSITIVE_INFINITY; for (Iterator i = this.paintIndex.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); if (((Integer) entry.getValue()).equals(index)) { if (((Number) entry.getKey()).doubleValue() < minValue) { minValue = ((Number) entry.getKey()).doubleValue(); } } } return new Double(minValue);
private Number getMaxPaintValue(Integer index) { double maxValue = Double.NEGATIVE_INFINITY; for (Iterator i = this.paintIndex.entrySet().iterator(); i.hasNext();) { Map.Entry entry = (Map.Entry) i.next(); if (((Integer) entry.getValue()).equals(index)) { if (((Number) entry.getKey()).doubleValue() > maxValue) { maxValue = ((Number) entry.getKey()).doubleValue(); } } } return new Double(maxValue);

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

1

    private Number getMinPaintValue(Integer index) {↵

1

    private Number getMaxPaintValue(Integer index) {↵

2

            double minValue = Double.POSITIVE_INFINITY;↵

2

            double maxValue = Double.NEGATIVE_INFINITY;↵

3

            for (Iterator i = this.paintIndex.entrySet().iterator(); i.hasNext();) {↵

3

            for (Iterator i = this.paintIndex.entrySet().iterator(); i.hasNext();) {↵

4

                Map.Entry entry = (Map.Entry) i.next();↵

4

                Map.Entry entry = (Map.Entry) i.next();↵

5

                if (((Integer) entry.getValue()).equals(index)) {↵

5

                if (((Integer) entry.getValue()).equals(index)) {↵

6

                    if (((Number) entry.getKey()).doubleValue() &lt; minValue) {↵

6

                    if (((Number) entry.getKey()).doubleValue() &gt; maxValue) {↵

7

                        minValue = ((Number) entry.getKey()).doubleValue();↵

7

                        maxValue = ((Number) entry.getKey()).doubleValue();↵

8

                    }↵

8

                    }↵

9

                }↵

9

                }↵

10

            }               ↵

10

            }               ↵

11

            return new Double(minValue);↵

11

            return new Double(maxValue);↵

12

12

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