OHLCSeries s1 = new OHLCSeries("Series1"); OHLCSeriesCollection dataset = new OHLCSeriesCollection(); dataset.addSeries(s1); try { /* XYSeries s = */ dataset.getSeries(1);
XYSeries s1 = new XYSeries("Series1"); XYSeriesCollection dataset = new XYSeriesCollection(); dataset.addSeries(s1); try { /* XYSeries s = */ dataset.getSeries(1);
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/tests/org/jfree/data/time/ohlc/junit/OHLCSeriesCollectionTests.java File path: /jfreechart-1.0.10/tests/org/jfree/data/xy/junit/XYSeriesCollectionTests.java
Method name: void test1170825() Method name: void test1170825()
Number of AST nodes: 4 Number of AST nodes: 4
1
OHLCSeries s1 = new OHLCSeries("Series1");
1
XYSeries s1 = new XYSeries("Series1");
2
        OHLCSeriesCollection dataset = new OHLCSeriesCollection();
2
        XYSeriesCollection dataset = new XYSeriesCollection();
3
        dataset.addSeries(s1);
3
        dataset.addSeries(s1);
4
        try {
4
        try {
5
            /* XYSeries s = */ dataset.getSeries(1);
5
            /* XYSeries s = */ dataset.getSeries(1);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    OHLCSeries s1 = new OHLCSeries("Series1");
    1
    OHLCSeries s1 = new OHLCSeries("Series1");
    1
    XYSeries s1 = new XYSeries("Series1");
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.ohlc.OHLCSeriesorg.jfree.data.xy.XYSeriesSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.ohlc.OHLCSeriesorg.jfree.data.xy.XYSeriesSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.ohlc.OHLCSeriesorg.jfree.data.xy.XYSeriesSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new XYSeries("Series1") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    1
    XYSeries s1 = new XYSeries("Series1");
    2
    OHLCSeriesCollection dataset = new OHLCSeriesCollection();
    2
    OHLCSeriesCollection dataset = new OHLCSeriesCollection();
    2
    XYSeriesCollection dataset = new XYSeriesCollection();
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression new OHLCSeriesCollection() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression new XYSeriesCollection() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2
    XYSeriesCollection dataset = new XYSeriesCollection();
    3
    dataset.addSeries(s1);
    3
    dataset.addSeries(s1);
    3
    dataset.addSeries(s1);
    Differences
    Expression1Expression2Difference
    org.jfree.data.time.ohlc.OHLCSeriesorg.jfree.data.xy.XYSeriesSUBCLASS_TYPE_MISMATCH
    org.jfree.data.time.ohlc.OHLCSeriesCollectionorg.jfree.data.xy.XYSeriesCollectionSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression s1 cannot be unified with expression s1 , because common superclass type org.jfree.data.general.Series cannot be passed as an argument to public void addSeries(org.jfree.data.time.ohlc.OHLCSeries)
    Expression dataset cannot be unified with expression dataset , because common superclass org.jfree.data.xy.AbstractXYDataset does not declare member(s) public void addSeries(org.jfree.data.time.ohlc.OHLCSeries) , public void addSeries(org.jfree.data.xy.XYSeries)
    3
    dataset.addSeries(s1);
    Precondition Violations (6)
    Row Violation
    1Expression new XYSeries("Series1") cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression new OHLCSeriesCollection() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression new XYSeriesCollection() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression s1 cannot be unified with expression s1 , because common superclass type org.jfree.data.general.Series cannot be passed as an argument to public void addSeries(org.jfree.data.time.ohlc.OHLCSeries)
    5Expression dataset cannot be unified with expression dataset , because common superclass org.jfree.data.xy.AbstractXYDataset does not declare member(s) public void addSeries(org.jfree.data.time.ohlc.OHLCSeries) , public void addSeries(org.jfree.data.xy.XYSeries)
    6Clone fragment #1 returns variable dataset with type org.jfree.data.time.ohlc.OHLCSeriesCollection , while Clone fragment #2 returns variable dataset with type org.jfree.data.xy.XYSeriesCollection