if (this.minimumRangeValue == null) { this.minimumRangeValue = item.getMinRegularValue(); } else { if (item.getMinRegularValue().doubleValue() < this.minimumRangeValue.doubleValue()) { this.minimumRangeValue = item.getMinRegularValue(); } }
if (this.maximumRangeValue == null) { this.maximumRangeValue = item.getMaxRegularValue(); } else { if (item.getMaxRegularValue().doubleValue() > this.maximumRangeValue.doubleValue()) { this.maximumRangeValue = item.getMaxRegularValue(); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerXYDataset.java File path: /jfreechart-1.0.10/src/org/jfree/data/statistics/DefaultBoxAndWhiskerXYDataset.java
Method name: void add(Date, BoxAndWhiskerItem) Method name: void add(Date, BoxAndWhiskerItem)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (this.minimumRangeValue == null) {
1
if (this.maximumRangeValue == null) {
2
            this.minimumRangeValue = item.getMinRegularValue();
2
            this.maximumRangeValue = item.getMaxRegularValue();
3
        }
3
        }
4
        else {
4
        else {
5
            if (item.getMinRegularValue().doubleValue() 
5
            if (item.getMaxRegularValue().doubleValue() 
6
                    &lt; this.minimumRangeValue.doubleValue()) {
6
                    &gt; this.maximumRangeValue.doubleValue()) {
7
                this.minimumRangeValue = item.getMinRegularValue();
7
                this.maximumRangeValue = item.getMaxRegularValue();
8
            }
8
            }
9
        }
9
        }
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.4
Clones locationClones are in the same method
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)5.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    3
    if (this.minimumRangeValue == null)
    3
    if (this.minimumRangeValue == null)
    7
    if (this.maximumRangeValue == null)
    Differences
    Expression1Expression2Difference
    minimumRangeValuemaximumRangeValueVARIABLE_NAME_MISMATCH
    7
    if (this.maximumRangeValue == null)
    4
    this.minimumRangeValue = item.getMinRegularValue();
    4
    this.minimumRangeValue = item.getMinRegularValue();
    8
    this.maximumRangeValue = item.getMaxRegularValue();
    Differences
    Expression1Expression2Difference
    minimumRangeValuemaximumRangeValueVARIABLE_NAME_MISMATCH
    getMinRegularValuegetMaxRegularValueMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.minimumRangeValue is a field being modified, and thus it cannot be parameterized
    Expression this.maximumRangeValue is a field being modified, and thus it cannot be parameterized
    8
    this.maximumRangeValue = item.getMaxRegularValue();
    else
    else
    5
    if (item.getMinRegularValue().doubleValue() < this.minimumRangeValue.doubleValue())
    5
    if (item.getMinRegularValue().doubleValue() < this.minimumRangeValue.doubleValue())
    9
    if (item.getMaxRegularValue().doubleValue() > this.maximumRangeValue.doubleValue())
    Differences
    Expression1Expression2Difference
    getMinRegularValuegetMaxRegularValueMETHOD_INVOCATION_NAME_MISMATCH
    minimumRangeValuemaximumRangeValueVARIABLE_NAME_MISMATCH
    <>OPERATOR_MISMATCH
    Preondition Violations
    Expression item.getMinRegularValue().doubleValue() < this.minimumRangeValue.doubleValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item.getMaxRegularValue().doubleValue() > this.maximumRangeValue.doubleValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    if (item.getMaxRegularValue().doubleValue() > this.maximumRangeValue.doubleValue())
    6
    this.minimumRangeValue = item.getMinRegularValue();
    6
    this.minimumRangeValue = item.getMinRegularValue();
    10
    this.maximumRangeValue = item.getMaxRegularValue();
    Differences
    Expression1Expression2Difference
    minimumRangeValuemaximumRangeValueVARIABLE_NAME_MISMATCH
    getMinRegularValuegetMaxRegularValueMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression this.minimumRangeValue is a field being modified, and thus it cannot be parameterized
    Expression this.maximumRangeValue is a field being modified, and thus it cannot be parameterized
    Expression item.getMinRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression item.getMaxRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    this.maximumRangeValue = item.getMaxRegularValue();
    Precondition Violations (8)
    Row Violation
    1Expression this.minimumRangeValue is a field being modified, and thus it cannot be parameterized
    2Expression this.maximumRangeValue is a field being modified, and thus it cannot be parameterized
    3Expression item.getMinRegularValue().doubleValue() < this.minimumRangeValue.doubleValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression item.getMaxRegularValue().doubleValue() > this.maximumRangeValue.doubleValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression this.minimumRangeValue is a field being modified, and thus it cannot be parameterized
    6Expression this.maximumRangeValue is a field being modified, and thus it cannot be parameterized
    7Expression item.getMinRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression item.getMaxRegularValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted