EntityCollection entities = state.getEntityCollection(); if (entities != null) { String tip = null; PieToolTipGenerator toolTipGenerator = getToolTipGenerator(); if (toolTipGenerator != null) { tip = toolTipGenerator.generateToolTip(dataset, key); } String url = null; PieURLGenerator urlGenerator = getURLGenerator(); if (urlGenerator != null) { url = urlGenerator.generateURL(dataset, key, getPieIndex()); } PieSectionEntity entity = new PieSectionEntity(path, dataset, getPieIndex(), section, key, tip, url); entities.add(entity); }
if (entityArea == null) { entityArea = line.getBounds(); } 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(entityArea, 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/plot/RingPlot.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/xy/YIntervalRenderer.java
Method name: void drawItem(Graphics2D, int, Rectangle2D, PiePlotState, int) Method name: void drawItem(Graphics2D, XYItemRendererState, Rectangle2D, PlotRenderingInfo, XYPlot, ValueAxis, ValueAxis, XYDataset, int, int, CrosshairState, int)
Number of AST nodes: 12 Number of AST nodes: 11
1
EntityCollection entities = state.getEntityCollection();
1
if (entityArea == null) {
2
                    if (entities != null) {
2
                entityArea = line.getBounds();
3
            
3
            }
4
            String tip = null;
4
            String tip = null;
5
                        PieToolTipGenerator toolTipGenerator 
5
            XYToolTipGenerator generator 
6
                                = getToolTipGenerator();
6
= getToolTipGenerator(
7
                        if (toolTipG
7
series, item);
8
enerator != null) {
8
            if (generator != null) {
9
                            tip = toolTipGenerator.generateToolTip(dataset, 
9
                tip = generator.generateToolTip(dataset, 
10
                                    key);
11
                        }
12
           
10
series, item);
11
            }
13
             String url = null;
12
            String url = null;
14
                        PieURLGenerator urlGenerator = getURLGenerator();
13
            
15
                        if (urlGenerator != null) {
14
if (getURLGenerator() != null) {
16
                            url = urlGenerator.generateURL(dataset, key, 
15
                url = getURLGenerator().generateURL(dataset, 
17
                                    getPieIndex());
18
        
16
series, item);
19
                }
17
            }
20
                        PieSectionEntity entity = new PieSectionEntity(path, 
18
            XYItemEntity entity = new 
21
                                dataset, getPieIndex(), section, key, tip, 
22
                                url);
23
            
19
XYItemEntity(entityArea, dataset, series,
20
                    item, tip, url);
24
            entities.add(entity);
21
            entities.add(entity);
25
                    }
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are in different classes
Number of node comparisons6