1061-1-2

if (this.useSeriesOffset) { x0 = domainAxis.getCategorySeriesMiddle( dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, this.itemMargin, dataArea, plot.getDomainAxisEdge()); } else { x0 = domainAxis.getCategoryMiddle(column - 1, getColumnCount(), dataArea, plot.getDomainAxisEdge()); }
if (getUseSeriesOffset()) { x0 = domainAxis.getCategorySeriesMiddle( dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, getItemMargin(), dataArea, plot.getDomainAxisEdge()); } else { x0 = domainAxis.getCategoryMiddle(column - 1, getColumnCount(), dataArea, plot.getDomainAxisEdge()); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/LineAndShapeRenderer.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/StatisticalLineAndShapeRenderer.java
Method name: `void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)` |  | Method name: `void drawItem(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, CategoryDataset, int, int, int)`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    if (this.useSeriesOffset) {↵

1

    if (getUseSeriesOffset()) {↵

2

                            x0 = domainAxis.getCategorySeriesMiddle(↵

2

                            x0 = domainAxis.getCategorySeriesMiddle(↵

3

                                    dataset.getColumnKey(column - 1),↵

3

                                    dataset.getColumnKey(column - 1),↵

4

                                    dataset.getRowKey(row), dataset,↵

4

                                    dataset.getRowKey(row), dataset,↵

5

                                    this.itemMargin, dataArea,↵

5

                                    getItemMargin(), dataArea,↵

6

                                    plot.getDomainAxisEdge());↵

6

                                    plot.getDomainAxisEdge());↵

7

                        }↵

7

                        }↵

8

                        else {↵

8

                        else {↵

9

                            x0 = domainAxis.getCategoryMiddle(column - 1,↵

9

                            x0 = domainAxis.getCategoryMiddle(column - 1,↵

10

                                    getColumnCount(), dataArea,↵

10

                                    getColumnCount(), dataArea,↵

11

                                    plot.getDomainAxisEdge());↵

11

                                    plot.getDomainAxisEdge());↵

12

                        }

12

                        }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3
Clones location | Clones are in different classes having the same super class
Number of node comparisons | 10

1. {Refactorable}

   Mapping Summary
   Number of mapped statements | 3
   Number of unmapped statements in the first code fragment | 0
   Number of unmapped statements in the second code fragment | 0
   Time elapsed for statement mapping (ms) | 1.6
   Clone type | Type 2

   Mapped Statements
   ID | Statement |  | ID | Statement
   --- | --- | --- | --- | ---

   21

       if (this.useSeriesOffset)

   21 | if (this.useSeriesOffset)
   37 | if (getUseSeriesOffset())

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   this |  | MISSING_METHOD_INVOCATION_EXPRESSION
   this.useSeriesOffset | getUseSeriesOffset() | FIELD_ACCESS_REPLACED_WITH_GETTER

   37

       if (getUseSeriesOffset())

   22

       x0 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, this.itemMargin, dataArea, plot.getDomainAxisEdge());

   22 | x0 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, this.itemMargin, dataArea, plot.getDomainAxisEdge());
   38 | x0 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, getItemMargin(), dataArea, plot.getDomainAxisEdge());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   this |  | MISSING_METHOD_INVOCATION_EXPRESSION
   this.itemMargin | getItemMargin() | FIELD_ACCESS_REPLACED_WITH_GETTER

   38

       x0 = domainAxis.getCategorySeriesMiddle(dataset.getColumnKey(column - 1), dataset.getRowKey(row), dataset, getItemMargin(), dataArea, plot.getDomainAxisEdge());

       else

       else

   23

       x0 = domainAxis.getCategoryMiddle(column - 1, getColumnCount(), dataArea, plot.getDomainAxisEdge());

   39

       x0 = domainAxis.getCategoryMiddle(column - 1, getColumnCount(), dataArea, plot.getDomainAxisEdge());

   Precondition Violations (0)
   Row | Violation
   --- | ---