1053-1-2

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);
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: `Number getMinPaintValue(Integer)` |  | Method name: `Number getMaxPaintValue(Integer)`
Number of AST nodes: 7 |  | Number of AST nodes: 7

1

    double minValue = Double.POSITIVE_INFINITY;↵

1

    double maxValue = Double.NEGATIVE_INFINITY;↵

2

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

2

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

3

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

3

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

4

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

4

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

5

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

5

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

6

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

6

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

7

                    }↵

7

                    }↵

8

                }↵

8

                }↵

9

            }               ↵

9

            }               ↵

10

            return new Double(minValue);

10

            return new Double(maxValue);

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.2
Clones location | Clones are declared in the same class
Number of node comparisons | 1