File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/HorizontalPanel.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/VerticalPanel.java | |||
Method name: Component add(Component)
|
Method name: Component add(Component)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (hgap > 0 && subPanel.getComponentCount() > 0) {↵ | 1 | if (vgap > 0 && subPanel.getComponentCount() > 0) {↵ | |
2 | subPanel.add(Box.createHorizontalStrut(hgap));↵ | 2 | subPanel.add(Box.createVerticalStrut(vgap));↵ | |
3 | }↵ | 3 | }↵ | |
4 | if (c instanceof JComponent) {↵ | 4 | if (c instanceof JComponent) {↵ | |
5 | ((JComponent) c).setAlignmentY(verticalAlign);↵ | 5 | ((JComponent) c).setAlignmentX(horizontalAlign);↵ | |
6 | }↵ | 6 | }↵ | |
7 | return subPanel.add(c); | 7 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 14 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (hgap > 0 && subPanel.getComponentCount() > 0) |
| 1 | if (vgap > 0 && subPanel.getComponentCount() > 0) | |||||||||||||||||
2 | subPanel.add(Box.createHorizontalStrut(hgap)); |
| 2 | subPanel.add(Box.createVerticalStrut(vgap)); | |||||||||||||||||
3 | if (c instanceof JComponent) | 3 | if (c instanceof JComponent) | ||||||||||||||||||
4 | ((JComponent)c).setAlignmentY(verticalAlign); |
| 4 | ((JComponent)c).setAlignmentX(horizontalAlign); | |||||||||||||||||
5 | return subPanel.add(c); | 5 | return subPanel.add(c); |
Row | Violation |
---|---|
1 | Expression ((JComponent)c).setAlignmentY(verticalAlign) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression ((JComponent)c).setAlignmentX(horizontalAlign) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression ((JComponent)c).setAlignmentY(verticalAlign) is a void method call, and thus it cannot be parameterized |
4 | Expression ((JComponent)c).setAlignmentX(horizontalAlign) is a void method call, and thus it cannot be parameterized |