Dimension size = dragIcon.getPreferredSize();
treePanel.paintImmediately(previousDragXLocation, previousDragYLocation, size.width, size.height);
this.getLayeredPane().setLayer(dragIcon, 400);
SwingUtilities.paintComponent(treePanel.getGraphics(), dragIcon, treePanel, x, y, size.width, size.height);
previousDragXLocation = x;
previousDragYLocation = y;
Dimension size = dragIcon.getPreferredSize();
treePanel.paintImmediately(previousDragXLocation, previousDragYLocation, size.width, size.height);
this.getLayeredPane().setLayer(dragIcon, 400);
SwingUtilities.paintComponent(treePanel.getGraphics(), dragIcon, treePanel, x, y, size.width, size.height);
previousDragXLocation = x;
previousDragYLocation = y;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/MainFrame.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportMainFrame.java
|
Method name: void drawDraggedComponent(Component, int, int)
|
|
Method name: void drawDraggedComponent(Component, int, int)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | Dimension size = dragIcon.getPreferredSize();↵ | | 1 | Dimension size = dragIcon.getPreferredSize();↵
|
2 | treePanel.paintImmediately(previousDragXLocation, previousDragYLocation, size.width, size.height);↵ | | 2 | treePanel.paintImmediately(previousDragXLocation, previousDragYLocation, size.width, size.height);↵
|
3 | this.getLayeredPane().setLayer(dragIcon, 400);↵ | | 3 | this.getLayeredPane().setLayer(dragIcon, 400);↵
|
4 | SwingUtilities.paintComponent(treePanel.getGraphics(), dragIcon, treePanel, x, y, size.width, size.height);↵ | | 4 | SwingUtilities.paintComponent(treePanel.getGraphics(), dragIcon, treePanel, x, y, size.width, size.height);↵
|
5 | previousDragXLocation = x;↵ | | 5 | previousDragXLocation = x;↵
|
6 | previousDragYLocation = y; | | 6 | previousDragYLocation = y;
|
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 19 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 6 |
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.0 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | Dimension size = dragIcon.getPreferredSize(); | | 1 | Dimension size = dragIcon.getPreferredSize(); |
2 | treePanel.paintImmediately(previousDragXLocation, previousDragYLocation, size.width, size.height); | | 2 | treePanel.paintImmediately(previousDragXLocation, previousDragYLocation, size.width, size.height); |
3 | this.getLayeredPane().setLayer(dragIcon, 400); | | 3 | this.getLayeredPane().setLayer(dragIcon, 400); |
4 | SwingUtilities.paintComponent(treePanel.getGraphics(), dragIcon, treePanel, x, y, size.width, size.height); | | 4 | SwingUtilities.paintComponent(treePanel.getGraphics(), dragIcon, treePanel, x, y, size.width, size.height); |
5 | previousDragXLocation = x; | | 5 | previousDragXLocation = x; |
6 | previousDragYLocation = y; | | 6 | previousDragYLocation = y; |
Precondition Violations (0)
Row |
Violation |