1536-5-10

stream.defaultReadObject(); this.outlinePaint = SerialUtilities.readPaint(stream); this.outlineStroke = SerialUtilities.readStroke(stream); this.backgroundPaint = SerialUtilities.readPaint(stream);
stream.defaultReadObject(); this.positivePaint = SerialUtilities.readPaint(stream); this.negativePaint = SerialUtilities.readPaint(stream); this.legendLine = SerialUtilities.readShape(stream);

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/plot/MeterInterval.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYDifferenceRenderer.java
Method name: `void readObject(ObjectInputStream)` |  | Method name: `void readObject(ObjectInputStream)`
Number of AST nodes: 4 |  | Number of AST nodes: 4

1

    stream.defaultReadObject();↵

1

    stream.defaultReadObject();↵

2

            this.outlinePaint = SerialUtilities.readPaint(stream);↵

2

            this.positivePaint = SerialUtilities.readPaint(stream);↵

3

            this.outlineStroke = SerialUtilities.readStroke(stream);↵

3

            this.negativePaint = SerialUtilities.readPaint(stream);↵

4

            this.backgroundPaint = SerialUtilities.readPaint(stream);

4

            this.legendLine = SerialUtilities.readShape(stream);

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 | 12

1. {Non-refactorable}

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

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

   1

       stream.defaultReadObject();

   1

       stream.defaultReadObject();

   2

       this.outlinePaint = SerialUtilities.readPaint(stream);

   2 | this.outlinePaint = SerialUtilities.readPaint(stream);
   2 | this.positivePaint = SerialUtilities.readPaint(stream);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   outlinePaint | positivePaint | VARIABLE_NAME_MISMATCH

   Preondition Violations
   Expression this.outlinePaint is a field being modified, and thus it cannot be parameterized
   Expression this.positivePaint is a field being modified, and thus it cannot be parameterized

   2

       this.positivePaint = SerialUtilities.readPaint(stream);

   3

       this.outlineStroke = SerialUtilities.readStroke(stream);

   4

       this.backgroundPaint = SerialUtilities.readPaint(stream);

   4 | this.backgroundPaint = SerialUtilities.readPaint(stream);
   3 | this.negativePaint = SerialUtilities.readPaint(stream);

   Differences
   Expression1 | Expression2 | Difference
   --- | --- | ---
   backgroundPaint | negativePaint | VARIABLE_NAME_MISMATCH

   Preondition Violations
   Expression this.backgroundPaint is a field being modified, and thus it cannot be parameterized
   Expression this.negativePaint is a field being modified, and thus it cannot be parameterized

   3

       this.negativePaint = SerialUtilities.readPaint(stream);

   4

       this.legendLine = SerialUtilities.readShape(stream);

   Precondition Violations (4)
   Row | Violation
   --- | ---
   1 | Expression this.outlinePaint is a field being modified, and thus it cannot be parameterized
   2 | Expression this.positivePaint is a field being modified, and thus it cannot be parameterized
   3 | Expression this.backgroundPaint is a field being modified, and thus it cannot be parameterized
   4 | Expression this.negativePaint is a field being modified, and thus it cannot be parameterized