1556-1-2

while (tmpGC.textExtent(Az).x > DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) { tmpFont.dispose(); height--; fontData.setHeight(height); tmpFont = new Font(device, fontData); tmpGC.setFont(tmpFont); }
while (tmpGC.textExtent(Az).x < DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) { tmpFont.dispose(); height++; fontData.setHeight(height); tmpFont = new Font(device, fontData); tmpGC.setFont(tmpFont); }

Clone fragments detected by clone detection tool
File path: /jfreechart-1.0.10/swt/org/jfree/experimental/swt/SWTUtils.java |  | File path: /jfreechart-1.0.10/swt/org/jfree/experimental/swt/SWTUtils.java
Method name: `FontData toSwtFontData(Device, java.awt.Font, boolean)` |  | Method name: `FontData toSwtFontData(Device, java.awt.Font, boolean)`
Number of AST nodes: 6 |  | Number of AST nodes: 6

1

    while (tmpGC.textExtent(Az).x ↵

1

    while (tmpGC.textExtent(Az).x ↵

2

                            &gt; DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {↵

2

                            &lt; DUMMY_PANEL.getFontMetrics(font).stringWidth(Az)) {↵

3

                        tmpFont.dispose();↵

3

                        tmpFont.dispose();↵

4

                        height--;↵

4

                        height++;↵

5

                        fontData.setHeight(height);↵

5

                        fontData.setHeight(height);↵

6

                        tmpFont = new Font(device, fontData);↵

6

                        tmpFont = new Font(device, fontData);↵

7

                        tmpGC.setFont(tmpFont);↵

7

                        tmpGC.setFont(tmpFont);↵

8

                    }

8

                    }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.2
Clones location | Clones are in the same method
Number of node comparisons | 1