public Component add(Component c) { // This won't work right if we remove components. But we don't, so I'm // not going to worry about it right now. if (hgap > 0 && subPanel.getComponentCount() > 0) { subPanel.add(Box.createHorizontalStrut(hgap)); } if (c instanceof JComponent) { ((JComponent) c).setAlignmentY(verticalAlign); } return subPanel.add(c);
public Component add(Component c) { // This won't work right if we remove components. But we don't, so I'm // not going to worry about it right now. if (vgap > 0 && subPanel.getComponentCount() > 0) { subPanel.add(Box.createVerticalStrut(vgap)); } if (c instanceof JComponent) { ((JComponent) c).setAlignmentX(horizontalAlign); } return subPanel.add(c);
Clone fragments detected by clone detection tool
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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public Component add(Component c) {
1
public Component add(Component c) {
2
		// This won't work right if we remove components. But we don't, so I'm
2
		// This won't work right if we remove components. But we don't, so I'm
3
		// not going to worry about it right now.
3
		// not going to worry about it right now.
4
		if (hgap > 0 && subPanel.getComponentCount() > 0) {
4
		if (vgap > 0 && subPanel.getComponentCount() > 0) {
5
			subPanel.add(Box.createHorizontalStrut(hgap));
5
			subPanel.add(Box.createVerticalStrut(vgap));
6
		}
6
		}
7
		if (c instanceof JComponent) {
7
		if (c instanceof JComponent) {
8
			((JComponent) c).setAlignmentY(verticalAlign);
8
			((JComponent) c).setAlignmentX(horizontalAlign);
9
		}
9
		}
10
		return subPanel.add(c);
10
		return subPanel.add(c);
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.0
Clones location
Number of node comparisons0