EntityCollection entities = state.getEntityCollection(); if (entities != null && shape != null && !nullPoint) { String tip = null; XYToolTipGenerator generator = getToolTipGenerator(series, item); if (generator != null) { tip = generator.generateToolTip(dataset, series, item); } String url = null; if (getURLGenerator() != null) { url = getURLGenerator().generateURL(dataset, series, item); } XYItemEntity entity = new XYItemEntity(shape, dataset, series, item, tip, url); entities.add(entity); }
EntityCollection entities = state.getEntityCollection(); if (entities != null && hotspot != null) { String tip = null; XYToolTipGenerator generator = getToolTipGenerator( series, item ); if (generator != null) { tip = generator.generateToolTip(dataset, series, item); } String url = null; if (getURLGenerator() != null) { url = getURLGenerator().generateURL(dataset, series, item); } XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item, tip, url); entities.add(entity); }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/StackedXYAreaRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/XYAreaRenderer2.java
Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int) Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
Number of AST nodes: 11 Number of AST nodes: 11
1
EntityCollection entities = state.getEntityCollection();
1
EntityCollection entities = state.getEntityCollection();
2
                if (entities != null && shape != null && !nullPoint) {
2
            if (entities != null && hotspot != null) {
3
                    String tip = null;
3
                String tip = null;
4
                    XYToolTipGenerator generator
4
                XYToolTipGenerator generator
5
                        = getToolTipGenerator(
5
 = getToolTipGenerator(
6
series, item);
6
                    series, item
7
    
7
                );
8
                if (generator != null) {
8
                if (generator != null) {
9
                        tip = generator.generateToolTip(dataset, series, item);
9
                    tip = generator.generateToolTip(dataset, series, item);
10
                    }
10
                
11
    
11
}
12
                String url = null;
12
                String url = null;
13
                    if (getURLGenerator() != null) {
13
                if (getURLGenerator() != null) {
14
                        url = getURLGenerator().generateURL(dataset, series,
14
                    url = getURLGenerator().generateURL(dataset, series,
15
                                item);
15
 item);
16
                    }
16
                
17
   
17
}
18
                 XYItemEntity entity = new XYItemEntity(shape, dataset,
18
                XYItemEntity entity = new XYItemEntity(hotspot, dataset, 
19
                            series, item, tip, url);
19
                        series, item, tip, url);
20
                    entities.add(entity);
20
                entities.add(entity);
21
                }
21
            }
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.5
Clones locationClones are in different classes having the same super class
Number of node comparisons48
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)49.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    86
    EntityCollection entities = state.getEntityCollection();
    58
    EntityCollection entities = state.getEntityCollection();
    87
    if (entities != null && shape != null && !nullPoint)
    87
    if (entities != null && shape != null && !nullPoint)
    59
    if (entities != null && hotspot != null)
    Differences
    Expression1Expression2Difference
    &&!=OPERATOR_MISMATCH
    entities != nullentitiesINFIX_LEFT_OPERAND_MISMATCH
    shape != nullnullINFIX_RIGHT_OPERAND_MISMATCH
    !nullPointhotspot != nullINFIX_RIGHT_OPERAND_MISMATCH
    Preondition Violations
    Expression entities != null && shape != null cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression entities != null cannot be parameterized, because it has dependencies to/from statements that will be extracted
    59
    if (entities != null && hotspot != null)
    88
    String tip = null;
    60
    String tip = null;
    89
    XYToolTipGenerator generator = getToolTipGenerator(series, item);
    61
    XYToolTipGenerator generator = getToolTipGenerator(series, item);
    90
    if (generator != null)
    62
    if (generator != null)
    91
    tip = generator.generateToolTip(dataset, series, item);
    63
    tip = generator.generateToolTip(dataset, series, item);
    92
    String url = null;
    64
    String url = null;
    93
    if (getURLGenerator() != null)
    65
    if (getURLGenerator() != null)
    94
    url = getURLGenerator().generateURL(dataset, series, item);
    66
    url = getURLGenerator().generateURL(dataset, series, item);
    95
    XYItemEntity entity = new XYItemEntity(shape, dataset, series, item, tip, url);
    95
    XYItemEntity entity = new XYItemEntity(shape, dataset, series, item, tip, url);
    67
    XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item, tip, url);
    Differences
    Expression1Expression2Difference
    shapehotspotVARIABLE_NAME_MISMATCH
    java.awt.Shapejava.awt.PolygonSUBCLASS_TYPE_MISMATCH
    67
    XYItemEntity entity = new XYItemEntity(hotspot, dataset, series, item, tip, url);
    96
    entities.add(entity);
    68
    entities.add(entity);
    Precondition Violations (2)
    Row Violation
    1Expression entities != null && shape != null cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression entities != null cannot be parameterized, because it has dependencies to/from statements that will be extracted