371-14-15

this.series = series; this.series.addChangeListener(this); this.editable = editable;
this.underlying = underlying; this.underlying.addChangeListener(this); this.barWidth = barWidth;

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/time/TimeSeriesTableModel.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XYBarDataset.java
Method name: `void TimeSeriesTableModel(TimeSeries, boolean)` |  | Method name: `void XYBarDataset(XYDataset, double)`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    this.series = series;↵

1

    this.underlying = underlying;↵

2

            this.series.addChangeListener(this);↵

2

            this.underlying.addChangeListener(this);↵

3

            this.editable = editable;

3

            this.barWidth = barWidth;

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 0
Number of non-refactorable cases | 1
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location | Clones are in different classes
Number of node comparisons | 9

1. {Non-refactorable}

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

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

   1

       this.underlying = underlying;

   1

       this.series = series;

   2

       this.series.addChangeListener(this);

   2 | this.series.addChangeListener(this);
   2 | this.underlying.addChangeListener(this);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   series | underlying | VARIABLE_NAME_MISMATCH
   org.jfree.data.time.TimeSeries | org.jfree.data.xy.XYDataset | VARIABLE_TYPE_MISMATCH

   Preondition Violations

   Type org.jfree.data.time.TimeSeries of variable this.series does not match with type org.jfree.data.xy.XYDataset of variable this.underlying
   - Make classes org.jfree.data.time.TimeSeries and org.jfree.data.xy.XYDataset extend a common superclass

   2

       this.underlying.addChangeListener(this);

   3

       this.barWidth = barWidth;

   3

       this.editable = editable;

   Precondition Violations (1)
   Row | Violation
   --- | ---
   1 | Type org.jfree.data.time.TimeSeries of variable this.series does not match with type org.jfree.data.xy.XYDataset of variable this.underlying