1650-1-2

for (int series = 0; series < seriesCount; series++) { Number number = dataset.getValue(series, item); if (number != null) { double value = number.doubleValue(); if (value < 0.0) { total = total + value; // '+', remember value is negative } } }
for (int series = 0; series < seriesCount; series++) { Number number = dataset.getValue(series, item); if (number != null) { double value = number.doubleValue(); if (value > 0.0) { total = total + value; } } }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/general/DatasetUtilities.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/general/DatasetUtilities.java
Method name: `Number findMinimumStackedRangeValue(CategoryDataset)` |  | Method name: `Number findMaximumStackedRangeValue(CategoryDataset)`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    for (int series = 0; series < seriesCount; series++) {↵

1

    for (int series = 0; series < seriesCount; series++) {↵

2

                        Number number = dataset.getValue(series, item);↵

2

                        Number number = dataset.getValue(series, item);↵

3

                        if (number != null) {↵

3

                        if (number != null) {↵

4

                            double value = number.doubleValue();↵

4

                            double value = number.doubleValue();↵

5

                            if (value &lt; 0.0) {↵

5

                            if (value &gt; 0.0) {↵

6

                                total = total + value;↵

6

                                total = total + value;↵

7

                                // '+', remember value is negative↵

8

                            }↵

7

                            }↵

9

                        }↵

8

                        }↵

10

                    }

9

                    }

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