File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/control/gui/HttpMirrorControlGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/timers/gui/ConstantTimerGui.java | |||
Method name: void init()
|
Method name: void init()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 11 | |||
1 | setLayout(new BorderLayout(0, 5));↵ | 1 | setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));↵ | |
2 | setBorder(makeBorder());↵ | 2 | setBorder(makeBorder());↵ | |
3 | add(makeTitlePanel(), BorderLayout.NORTH);↵ | 3 | add(makeTitlePanel()↵ | |
4 | JPanel mainPanel = new JPanel(new BorderLayout());↵ | |||
5 | Box myBox = Box.createVerticalBox();↵ | |||
6 | myBox.add(createPortPanel());↵ | |||
7 | mainPanel.add(myBox, BorderLayout.NORTH);↵ | |||
8 | mainPanel.add(createControls(), BorderLayout.CENTER);↵ | |||
9 | add(mainPanel, BorderLayout.CENTER↵ | 4 | );↵ | |
5 | Box delayPanel = Box.createHorizontalBox();↵ | |||
6 | JLabel delayLabel = new JLabel(JMeterUtils.getResString("constant_timer_delay"));//$NON-NLS-1$↵ | |||
7 | delayPanel.add(delayLabel);↵ | |||
8 | delayField = new JTextField(6);↵ | |||
9 | delayField.setText(DEFAULT_DELAY);↵ | |||
10 | delayField.setName(DELAY_FIELD);↵ | |||
11 | delayPanel.add(delayField);↵ | |||
10 | ); | 12 | add(delayPanel); | |
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.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 75 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 4 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | setLayout(new BorderLayout(0, 5)); | | ||||||||||||||||||||||||||||
2 | setBorder(makeBorder()); | 2 | setBorder(makeBorder()); | |||||||||||||||||||||||||||
3 | add(makeTitlePanel(), BorderLayout.NORTH); |
| 1 | setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP)); | ||||||||||||||||||||||||||
| 3 | add(makeTitlePanel()); | ||||||||||||||||||||||||||||
4 | JPanel mainPanel = new JPanel(new BorderLayout()); |
| 4 | Box delayPanel = Box.createHorizontalBox(); | ||||||||||||||||||||||||||
5 | Box myBox = Box.createVerticalBox(); |
| 5 | JLabel delayLabel = new JLabel(JMeterUtils.getResString("constant_timer_delay")); | ||||||||||||||||||||||||||
6 | myBox.add(createPortPanel()); |
| 6 | delayPanel.add(delayLabel); | ||||||||||||||||||||||||||
| 7 | delayField = new JTextField(6); | ||||||||||||||||||||||||||||
7 | mainPanel.add(myBox, BorderLayout.NORTH); |
| 9 | delayField.setName(DELAY_FIELD); | ||||||||||||||||||||||||||
8 | mainPanel.add(createControls(), BorderLayout.CENTER); |
| 8 | delayField.setText(DEFAULT_DELAY); | ||||||||||||||||||||||||||
9 | add(mainPanel, BorderLayout.CENTER); | | ||||||||||||||||||||||||||||
| 10 | delayPanel.add(delayField); | ||||||||||||||||||||||||||||
| 11 | add(delayPanel); |
Row | Violation |
---|---|
1 | Expression add(makeTitlePanel(),BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
2 | Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized |
3 | Expression add(makeTitlePanel(),BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
4 | Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized |
5 | Expression delayLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression mainPanel.add(myBox,BorderLayout.NORTH) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression mainPanel.add(myBox,BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
8 | Expression delayField.setName(DELAY_FIELD) is a void method call, and thus it cannot be parameterized |
9 | Expression mainPanel cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression mainPanel.add(myBox,BorderLayout.NORTH) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression mainPanel.add(myBox,BorderLayout.NORTH) is a void method call, and thus it cannot be parameterized |
12 | Expression delayField.setName(DELAY_FIELD) is a void method call, and thus it cannot be parameterized |
13 | Expression mainPanel.add(createControls(),BorderLayout.CENTER) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
14 | Expression mainPanel.add(createControls(),BorderLayout.CENTER) is a void method call, and thus it cannot be parameterized |
15 | Expression delayField.setText(DEFAULT_DELAY) is a void method call, and thus it cannot be parameterized |
16 | Expression mainPanel cannot be parameterized, because it has dependencies to/from statements that will be extracted |
17 | Expression mainPanel.add(createControls(),BorderLayout.CENTER) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
18 | Expression mainPanel.add(createControls(),BorderLayout.CENTER) is a void method call, and thus it cannot be parameterized |
19 | Expression delayField.setText(DEFAULT_DELAY) is a void method call, and thus it cannot be parameterized |
20 | Clone fragment #1 returns variable mainPanel with type javax.swing.JPanel , while Clone fragment #2 returns variable delayPanel with type javax.swing.Box |