1181-1-2

public void testConstructor() { Range r1 = new Range(0.1, 1000.0); assertEquals(r1.getLowerBound(), 0.1, 0.0d); assertEquals(r1.getUpperBound(), 1000.0, 0.0d); try { /*Range r2 =*/ new Range(10.0, 0.0); fail("Lower bound cannot be greater than the upper"); } catch (Exception e) {
public void testIndexOf() { XYSeries s1 = new XYSeries("Series 1"); s1.add(1.0, 1.0); s1.add(2.0, 2.0); s1.add(3.0, 3.0); assertEquals(0, s1.indexOf(new Double(1.0)));

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/data/junit/RangeTests.java |  | File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XYSeriesTests.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    public void testConstructor() {↵

1

    public void testIndexOf() {↵

2

            Range r1 = new Range(0.1, 1000.0);↵

2

            ↵

3

            assertEquals(r1.getLowerBound(), 0.1, 0↵

3

    XYSeries s1 = new XYSeries("Series 1");↵

4

    .0d);↵

4

            s1.add(1.0, 1.0);↵

5

            assertEquals(r1.getUpperBound(), 1000.0, 0.0d);↵

5

            s1.add(2.0, 2.0);↵

6

            try {↵

6

            ↵

7

                /*Range r2 =*/ new Range(10.0, 0.0);↵

7

    s1.add(3.0, 3.0);↵

8

                fail("Lower bound cannot be greater than the upper");↵

8

            ↵

9

            }↵

10

            catch (Exception e) {↵

11

            ↵

9

    assertEquals(0, s1.indexOf(new Double(1.0)));↵

12

10

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