1812-1-4

OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); return new Double(di.getYValue());
XIntervalSeries s = (XIntervalSeries) this.data.get(series); XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item); return new Double(di.getXHighValue());

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/time/ohlc/OHLCSeriesCollection.java |  | File path: /jfreechart-1.0.10/src/org/jfree/data/xy/XIntervalSeriesCollection.java
Method name: `Number getY(int, int)` |  | Method name: `Number getEndX(int, int)`
Number of AST nodes: 3 |  | Number of AST nodes: 3

1

    OHLCSeries s = (OHLCSeries) this.data.get(series);↵

1

    XIntervalSeries s = (XIntervalSeries) this.data.get(series);↵

2

            OHLCItem di = (OHLCItem) s.getDataItem(item);↵

2

            XIntervalDataItem di = (XIntervalDataItem) s.getDataItem(item);↵

3

            return new Double(di.getYValue());

3

            return new Double(di.getXHighValue());

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 having the same super class
Number of node comparisons | 9

1. {Non-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) | 0.0
   Clone type | Type 2

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

   1

       OHLCSeries s = (OHLCSeries)this.data.get(series);

   1 | OHLCSeries s = (OHLCSeries)this.data.get(series);
   1 | XIntervalSeries s = (XIntervalSeries)this.data.get(series);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.time.ohlc.OHLCSeries | org.jfree.data.xy.XIntervalSeries | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.time.ohlc.OHLCSeries | org.jfree.data.xy.XIntervalSeries | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.time.ohlc.OHLCSeries | org.jfree.data.xy.XIntervalSeries | SUBCLASS_TYPE_MISMATCH

   1

       XIntervalSeries s = (XIntervalSeries)this.data.get(series);

   2

       OHLCItem di = (OHLCItem)s.getDataItem(item);

   2 | OHLCItem di = (OHLCItem)s.getDataItem(item);
   2 | XIntervalDataItem di = (XIntervalDataItem)s.getDataItem(item);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   org.jfree.data.time.ohlc.OHLCItem | org.jfree.data.xy.XIntervalDataItem | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.time.ohlc.OHLCItem | org.jfree.data.xy.XIntervalDataItem | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.time.ohlc.OHLCItem | org.jfree.data.xy.XIntervalDataItem | SUBCLASS_TYPE_MISMATCH
   org.jfree.data.time.ohlc.OHLCSeries | org.jfree.data.xy.XIntervalSeries | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression (OHLCItem)s.getDataItem(item) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression (XIntervalDataItem)s.getDataItem(item) cannot be parameterized, because it has dependencies to/from statements that will be extracted

   2

       XIntervalDataItem di = (XIntervalDataItem)s.getDataItem(item);

   3

       return new Double(di.getYValue());

   3 | return new Double(di.getYValue());
   3 | return new Double(di.getXHighValue());

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   getYValue | getXHighValue | METHOD_INVOCATION_NAME_MISMATCH
   org.jfree.data.time.ohlc.OHLCItem | org.jfree.data.xy.XIntervalDataItem | SUBCLASS_TYPE_MISMATCH

   Preondition Violations
   Expression di.getYValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   Expression di.getXHighValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted

   3

       return new Double(di.getXHighValue());

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Expression (OHLCItem)s.getDataItem(item) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   2 | Expression (XIntervalDataItem)s.getDataItem(item) cannot be parameterized, because it has dependencies to/from statements that will be extracted
   3 | Expression di.getYValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
   4 | Expression di.getXHighValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted