if (state.getInfo() != null) { EntityCollection entities = state.getEntityCollection(); if (entities != null) { String tip = null; if (getToolTipGenerator(row, column) != null) { tip = getToolTipGenerator(row, column).generateToolTip( dataset, row, column); } String url = null; if (getItemURLGenerator(row, column) != null) { url = getItemURLGenerator(row, column).generateURL( dataset, row, column); } CategoryItemEntity entity = new CategoryItemEntity( bar, tip, url, dataset, dataset.getRowKey(row), dataset.getColumnKey(column)); entities.add(entity); } }
if (state.getInfo() != null) { EntityCollection entities = state.getEntityCollection(); if (entities != null) { String tip = null; CategoryToolTipGenerator tipster = getToolTipGenerator(row, column); if (tipster != null) { tip = tipster.generateToolTip(dataset, row, column); } String url = null; if (getItemURLGenerator(row, column) != null) { url = getItemURLGenerator(row, column).generateURL( dataset, row, column); } CategoryItemEntity entity = new CategoryItemEntity(bar, tip, url, dataset, dataset.getRowKey(row), dataset.getColumnKey(column)); entities.add(entity); } }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java File path: /jfreechart-1.0.10/src/org/jfree/chart/renderer/category/GanttRenderer.java
Method name: void drawTasks(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, GanttCategoryDataset, int, int) Method name: void drawTask(Graphics2D, CategoryItemRendererState, Rectangle2D, CategoryPlot, CategoryAxis, ValueAxis, GanttCategoryDataset, int, int)
Number of AST nodes: 11 Number of AST nodes: 12
1
if (state.getInfo() != null) {
1
if (state.getInfo() != null) {
2
                EntityCollection entities = state.getEntityCollection();
2
            EntityCollection entities = state.getEntityCollection();
3
                if (entities != null) {
3
            if (entities != null) {
4
                    String tip = null;
4
                String tip = null;
5
                    if (getToolTipGenerator(row, column)
5
                CategoryToolTipGenerator tipster = getToolTipGenerator(row,
6
                        column);
6
 != null) {
7
                if (tipster != null) {
7
                        tip = getToolTipGenerator(row, column).generateToolTip(
8
                    tip = 
8
                                dataset, row, column);
9
tipster.generateToolTip(dataset, row, column);
9
                    }
10
                
10
    
11
}
11
                String url = null;
12
                String url = null;
12
                    if (getItemURLGenerator(row, column) != null) {
13
                if (getItemURLGenerator(row, column) != null) {
13
                        url = getItemURLGenerator(row, column).generateURL(
14
                    url = getItemURLGenerator(row, column).generateURL(
14
                                dataset, row, column);
15
                            dataset, row, column);
15
                    }
16
                }
16
                    CategoryItemEntity entity = new CategoryItemEntity(
17
                CategoryItemEntity entity = new CategoryItemEntity(bar, tip,
17
                            bar, tip, url, dataset, dataset.getRowKey(row),
18
                        url, dataset, dataset.getRowKey(row),
18
                            dataset.getColumnKey(column));
19
                        dataset.getColumnKey(column));
19
                    entities.add(entity);
20
                entities.add(entity);
20
                }
21
            
21
    
22
}
22
        }
23
        }
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.4
Clones locationClones are declared in the same class
Number of node comparisons47
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.7
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    52
    if (state.getInfo() != null)
    58
    if (state.getInfo() != null)
    53
    EntityCollection entities = state.getEntityCollection();
    59
    EntityCollection entities = state.getEntityCollection();
    54
    if (entities != null)
    60
    if (entities != null)
    55
    String tip = null;
    61
    String tip = null;
                                                                                                                                              
    62
    CategoryToolTipGenerator tipster = getToolTipGenerator(row, column);
    56
    if (getToolTipGenerator(row, column) != null)
    56
    if (getToolTipGenerator(row, column) != null)
    63
    if (tipster != null)
    Differences
    Expression1Expression2Difference
    getToolTipGenerator(row,column)tipsterTYPE_COMPATIBLE_REPLACEMENT
    63
    if (tipster != null)
    57
    tip = getToolTipGenerator(row, column).generateToolTip(dataset, row, column);
    57
    tip = getToolTipGenerator(row, column).generateToolTip(dataset, row, column);
    64
    tip = tipster.generateToolTip(dataset, row, column);
    Differences
    Expression1Expression2Difference
    getToolTipGenerator(row,column)tipsterTYPE_COMPATIBLE_REPLACEMENT
    64
    tip = tipster.generateToolTip(dataset, row, column);
    58
    String url = null;
    65
    String url = null;
    59
    if (getItemURLGenerator(row, column) != null)
    66
    if (getItemURLGenerator(row, column) != null)
    60
    url = getItemURLGenerator(row, column).generateURL(dataset, row, column);
    67
    url = getItemURLGenerator(row, column).generateURL(dataset, row, column);
    61
    CategoryItemEntity entity = new CategoryItemEntity(bar, tip, url, dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    68
    CategoryItemEntity entity = new CategoryItemEntity(bar, tip, url, dataset, dataset.getRowKey(row), dataset.getColumnKey(column));
    62
    entities.add(entity);
    69
    entities.add(entity);
    Precondition Violations (0)
    Row Violation