1220-1-3

public void testGetRowCount() { DefaultCategoryDataset underlying = new DefaultCategoryDataset(); SlidingCategoryDataset dataset = new SlidingCategoryDataset(underlying, 10, 5); assertEquals(0, dataset.getRowCount()); underlying.addValue(1.0, "R1", "C1"); assertEquals(1, dataset.getRowCount()); underlying.clear(); assertEquals(0, dataset.getRowCount());
public void testColumnCount() { DefaultKeyedValues2D d = new DefaultKeyedValues2D(); assertEquals(0, d.getColumnCount()); d.addValue(new Double(1.0), "R1", "C1"); assertEquals(1, d.getColumnCount()); d.addValue(new Double(2.0), "R1", "C2"); assertEquals(2, d.getColumnCount());

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

1

    public void testGetRowCount() {↵

1

    public void testColumnCount() {↵

2

        	DefaultCategoryDataset underlying = new DefaultCategoryDataset();↵

2

            Default↵

3

        	SlidingCategoryDataset dataset = new SlidingCategoryDataset(underlying,↵

4

        			10, 5);↵

3

    KeyedValues2D d = new DefaultKeyedValues2D();↵

5

        	assertEquals(0, dataset.getRowCount());↵

4

            assertEquals(0, d.getColumnCount());↵

6

        	underlying.addValue(1.0, "R1", "C1");↵

5

            d.addValue(new Double(1.0), "R1", "C1");↵

7

        	assertEquals(1, dataset.getRowCount());↵

6

            assertEquals(1, d↵

8

        	underlying.clear(↵

7

    .getColumnCount());↵

9

    );↵

8

            d.addValue(new Double(2.0), "R1", "C2");↵

10

        	assertEquals(0, dataset.getRowCount());↵

9

            assertEquals(2, d.getColumnCount());↵

11

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