if (dataset instanceof BoxAndWhiskerCategoryDataset) { BoxAndWhiskerCategoryDataset d = (BoxAndWhiskerCategoryDataset) dataset; result[2] = formatter.format(d.getMeanValue(series, item)); result[3] = formatter.format(d.getMedianValue(series, item)); result[4] = formatter.format(d.getMinRegularValue(series, item)); result[5] = formatter.format(d.getMaxRegularValue(series, item)); result[6] = formatter.format(d.getQ1Value(series, item)); result[7] = formatter.format(d.getQ3Value(series, item)); }
if (dataset instanceof BoxAndWhiskerXYDataset) { BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset) dataset; result[2] = formatter.format(d.getMeanValue(series, item)); result[3] = formatter.format(d.getMedianValue(series, item)); result[4] = formatter.format(d.getMinRegularValue(series, item)); result[5] = formatter.format(d.getMaxRegularValue(series, item)); result[6] = formatter.format(d.getQ1Value(series, item)); result[7] = formatter.format(d.getQ3Value(series, item)); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/BoxAndWhiskerToolTipGenerator.java File path: /jfreechart-1.0.10/src/org/jfree/chart/labels/BoxAndWhiskerXYToolTipGenerator.java
Method name: Object[] createItemArray(CategoryDataset, int, int) Method name: Object[] createItemArray(XYDataset, int, int)
Number of AST nodes: 8 Number of AST nodes: 8
1
if (dataset instanceof BoxAndWhiskerCategoryDataset) {
1
if (dataset instanceof BoxAndWhiskerXYDataset) {
2
            BoxAndWhiskerCategoryDataset d 
2
            BoxAndWhiskerXYDataset d 
3
                = (BoxAndWhiskerCategoryDataset) dataset;
3
= (BoxAndWhiskerXYDataset) dataset;
4
            result[2] = formatter.format(d.getMeanValue(series, item));
4
            result[2] = formatter.format(d.getMeanValue(series, item));
5
            result[3] = formatter.format(d.getMedianValue(series, item));
5
            result[3] = formatter.format(d.getMedianValue(series, item));
6
            result[4] = formatter.format(d.getMinRegularValue(series, item));
6
            result[4] = formatter.format(d.getMinRegularValue(series, item));
7
            result[5] = formatter.format(d.getMaxRegularValue(series, item));
7
            result[5] = formatter.format(d.getMaxRegularValue(series, item));
8
            result[6] = formatter.format(d.getQ1Value(series, item));
8
            result[6] = formatter.format(d.getQ1Value(series, item));
9
            result[7] = formatter.format(d.getQ3Value(series, item));
9
            result[7] = formatter.format(d.getQ3Value(series, item));
10
        }
10
        }
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.1
Clones locationClones are in different classes
Number of node comparisons64
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)12.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    if (dataset instanceof BoxAndWhiskerCategoryDataset)
    6
    if (dataset instanceof BoxAndWhiskerCategoryDataset)
    8
    if (dataset instanceof BoxAndWhiskerXYDataset)
    Differences
    Expression1Expression2Difference
    org.jfree.data.category.CategoryDatasetorg.jfree.data.xy.XYDatasetSUBCLASS_TYPE_MISMATCH
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    8
    if (dataset instanceof BoxAndWhiskerXYDataset)
    7
    BoxAndWhiskerCategoryDataset d = (BoxAndWhiskerCategoryDataset)dataset;
    7
    BoxAndWhiskerCategoryDataset d = (BoxAndWhiskerCategoryDataset)dataset;
    9
    BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset)dataset;
    Differences
    Expression1Expression2Difference
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    org.jfree.data.category.CategoryDatasetorg.jfree.data.xy.XYDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression (BoxAndWhiskerCategoryDataset)dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (BoxAndWhiskerXYDataset)dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    BoxAndWhiskerXYDataset d = (BoxAndWhiskerXYDataset)dataset;
    8
    result[2] = formatter.format(d.getMeanValue(series, item));
    8
    result[2] = formatter.format(d.getMeanValue(series, item));
    10
    result[2] = formatter.format(d.getMeanValue(series, item));
    Differences
    Expression1Expression2Difference
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMeanValue(int, int)
    10
    result[2] = formatter.format(d.getMeanValue(series, item));
    9
    result[3] = formatter.format(d.getMedianValue(series, item));
    9
    result[3] = formatter.format(d.getMedianValue(series, item));
    11
    result[3] = formatter.format(d.getMedianValue(series, item));
    Differences
    Expression1Expression2Difference
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMedianValue(int, int)
    11
    result[3] = formatter.format(d.getMedianValue(series, item));
    10
    result[4] = formatter.format(d.getMinRegularValue(series, item));
    10
    result[4] = formatter.format(d.getMinRegularValue(series, item));
    12
    result[4] = formatter.format(d.getMinRegularValue(series, item));
    Differences
    Expression1Expression2Difference
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMinRegularValue(int, int)
    12
    result[4] = formatter.format(d.getMinRegularValue(series, item));
    11
    result[5] = formatter.format(d.getMaxRegularValue(series, item));
    11
    result[5] = formatter.format(d.getMaxRegularValue(series, item));
    13
    result[5] = formatter.format(d.getMaxRegularValue(series, item));
    Differences
    Expression1Expression2Difference
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMaxRegularValue(int, int)
    13
    result[5] = formatter.format(d.getMaxRegularValue(series, item));
    12
    result[6] = formatter.format(d.getQ1Value(series, item));
    12
    result[6] = formatter.format(d.getQ1Value(series, item));
    14
    result[6] = formatter.format(d.getQ1Value(series, item));
    Differences
    Expression1Expression2Difference
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getQ1Value(int, int)
    14
    result[6] = formatter.format(d.getQ1Value(series, item));
    13
    result[7] = formatter.format(d.getQ3Value(series, item));
    13
    result[7] = formatter.format(d.getQ3Value(series, item));
    15
    result[7] = formatter.format(d.getQ3Value(series, item));
    Differences
    Expression1Expression2Difference
    org.jfree.data.statistics.BoxAndWhiskerCategoryDatasetorg.jfree.data.statistics.BoxAndWhiskerXYDatasetSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getQ3Value(int, int)
    15
    result[7] = formatter.format(d.getQ3Value(series, item));
    Precondition Violations (8)
    Row Violation
    1Expression (BoxAndWhiskerCategoryDataset)dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression (BoxAndWhiskerXYDataset)dataset cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMeanValue(int, int)
    4Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMedianValue(int, int)
    5Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMinRegularValue(int, int)
    6Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getMaxRegularValue(int, int)
    7Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getQ1Value(int, int)
    8Expression d cannot be unified with expression d , because common superclass org.jfree.data.general.Dataset does not declare member(s) public abstract java.lang.Number getQ3Value(int, int)