switch (bs.getLineJoin()) { case BasicStroke.JOIN_BEVEL : this.gc.setLineJoin(SWT.JOIN_BEVEL); break; case BasicStroke.JOIN_MITER : this.gc.setLineJoin(SWT.JOIN_MITER); break; case BasicStroke.JOIN_ROUND : this.gc.setLineJoin(SWT.JOIN_ROUND); break; }
switch (bs.getEndCap()) { case BasicStroke.CAP_BUTT : this.gc.setLineCap(SWT.CAP_FLAT); break; case BasicStroke.CAP_ROUND : this.gc.setLineCap(SWT.CAP_ROUND); break; case BasicStroke.CAP_SQUARE : this.gc.setLineCap(SWT.CAP_SQUARE); break; }
Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/swt/org/jfree/experimental/swt/SWTGraphics2D.java File path: /jfreechart-1.0.10/swt/org/jfree/experimental/swt/SWTGraphics2D.java
Method name: void setStroke(Stroke) Method name: void setStroke(Stroke)
Number of AST nodes: 10 Number of AST nodes: 10
1
switch (bs.getLineJoin()) {
1
switch (bs.getEndCap()) {
2
                case BasicStroke.JOIN_BEVEL :
2
                case BasicStroke.CAP_BUTT :
3
                    this.gc.setLineJoin(SWT.JOIN_BEVEL);
3
                    this.gc.setLineCap(SWT.CAP_FLAT);
4
                    break;
4
                    break;
5
                case BasicStroke.JOIN_MITER :
5
                case BasicStroke.CAP_ROUND :
6
                    this.gc.setLineJoin(SWT.JOIN_MITER);
6
                    this.gc.setLineCap(SWT.CAP_ROUND);
7
                    break;
7
                    break;
8
                case BasicStroke.JOIN_ROUND :
8
                case BasicStroke.CAP_SQUARE :
9
                    this.gc.setLineJoin(SWT.JOIN_ROUND);
9
                    this.gc.setLineCap(SWT.CAP_SQUARE);
10
                    break;
10
                    break;
11
            }
11
            }
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.2
Clones locationClones are in the same method
Number of node comparisons1