410-1-2

ToolTipTagFragmentGenerator toolTipTagFragmentGenerator = null; if (useOverLibForToolTips) { toolTipTagFragmentGenerator = new OverLIBToolTipTagFragmentGenerator(); } else { toolTipTagFragmentGenerator = new StandardToolTipTagFragmentGenerator(); } ImageMapUtilities.writeImageMap(writer, name, info, toolTipTagFragmentGenerator, new StandardURLTagFragmentGenerator());
ToolTipTagFragmentGenerator toolTipTagFragmentGenerator = null; if (useOverLibForToolTips) { toolTipTagFragmentGenerator = new OverLIBToolTipTagFragmentGenerator(); } else { toolTipTagFragmentGenerator = new StandardToolTipTagFragmentGenerator(); } ImageMapUtilities.writeImageMap(writer, name, info, toolTipTagFragmentGenerator, new StandardURLTagFragmentGenerator());

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/src/org/jfree/chart/imagemap/ImageMapUtilities.java |  | File path: /jfreechart-1.0.10/src/org/jfree/chart/ChartUtilities.java
Method name: `void writeImageMap(PrintWriter, String, ChartRenderingInfo, boolean)` |  | Method name: `void writeImageMap(PrintWriter, String, ChartRenderingInfo, boolean)`
Number of AST nodes: 5 |  | Number of AST nodes: 5

1

    ToolTipTagFragmentGenerator toolTipTagFragmentGenerator = null;↵

1

    ToolTipTagFragmentGenerator toolTipTagFragmentGenerator = null;↵

2

            if (useOverLibForToolTips) {↵

2

            if (useOverLibForToolTips) {↵

3

                toolTipTagFragmentGenerator ↵

3

                toolTipTagFragmentGenerator ↵

4

                        = new OverLIBToolTipTagFragmentGenerator();↵

4

                        = new OverLIBToolTipTagFragmentGenerator();↵

5

            }↵

5

            }↵

6

            else {↵

6

            else {↵

7

                toolTipTagFragmentGenerator ↵

7

                toolTipTagFragmentGenerator ↵

8

                        = new StandardToolTipTagFragmentGenerator();↵

8

                        = new StandardToolTipTagFragmentGenerator();↵

9

            }↵

9

            }↵

10

            ImageMapUtilities.writeImageMap(writer, name, info, ↵

10

            ImageMapUtilities.writeImageMap(writer, name, info, ↵

11

                    toolTipTagFragmentGenerator, ↵

11

                    toolTipTagFragmentGenerator, ↵

12

                    new StandardURLTagFragmentGenerator());

12

                    new StandardURLTagFragmentGenerator());

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 1
Number of refactorable cases | 1
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1
Clones location | Clones are in different classes
Number of node comparisons | 13

1. {Refactorable}

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

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

   1

       ToolTipTagFragmentGenerator toolTipTagFragmentGenerator = null;

   1

       ToolTipTagFragmentGenerator toolTipTagFragmentGenerator = null;

   2

       if (useOverLibForToolTips)

   2

       if (useOverLibForToolTips)

   3

       toolTipTagFragmentGenerator = new OverLIBToolTipTagFragmentGenerator();

   3

       toolTipTagFragmentGenerator = new OverLIBToolTipTagFragmentGenerator();

       else

       else

   4

       toolTipTagFragmentGenerator = new StandardToolTipTagFragmentGenerator();

   4

       toolTipTagFragmentGenerator = new StandardToolTipTagFragmentGenerator();

   5

       ImageMapUtilities.writeImageMap(writer, name, info, toolTipTagFragmentGenerator, new StandardURLTagFragmentGenerator());

   5

       ImageMapUtilities.writeImageMap(writer, name, info, toolTipTagFragmentGenerator, new StandardURLTagFragmentGenerator());

   Precondition Violations (0)
   Row | Violation
   --- | ---