File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/CommentPanel.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/tcp/config/gui/TCPConfigGui.java | |||
Method name: void init()
|
Method name: JPanel createClosePortPanel()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 8 | |||
1 | setLayout(new BorderLayout(5, 0));↵ | |||
2 | commentField = new JTextArea();↵ | |||
3 | JLabel commentLabel = new JLabel(JMeterUtils.getResString("testplan_comments")); //$NON-NLS-1$↵ | 1 | JLabel label = new JLabel(JMeterUtils.getResString("reuseconnection")); //$NON-NLS-1$↵ | |
4 | commentL↵ | |||
2 | reUseConnection = new JCheckBox("", true);↵ | |||
3 | reUseConnection.setName(RE_USE_CONNECTION);↵ | |||
5 | abel.setLabelFor(commentField);↵ | 4 | label.setLabelFor(reUseConnection);↵ | |
6 | JPanel commentPanel = new JPanel();↵ | 5 | JPanel closePortPanel = new JPanel(↵ | |
7 | commentPanel.setLayout(new BorderLayout(0, 5));↵ | 6 | new BorderLayout(5, 0));↵ | |
8 | commentPanel.add(commentLabel,BorderLayout.WEST);↵ | 7 | closePortPanel.add(label, BorderLayout.WEST);↵ | |
9 | commentPanel.add(commentField,BorderLayout.CENTER);↵ | 8 | closePortPanel.add(reUseConnection, BorderLayout.CENTER);↵ | |
10 | add(commentPanel); | 9 | return closePortPanel; | |
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 | 35 |
Number of mapped statements | 6 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | setLayout(new BorderLayout(5, 0)); | | |||||||||||||||||||||||
2 | commentField = new JTextArea(); |
| 2 | reUseConnection = new JCheckBox("", true); | |||||||||||||||||||||
3 | JLabel commentLabel = new JLabel(JMeterUtils.getResString("testplan_comments")); |
| 1 | JLabel label = new JLabel(JMeterUtils.getResString("reuseconnection")); | |||||||||||||||||||||
| 3 | reUseConnection.setName(RE_USE_CONNECTION); | |||||||||||||||||||||||
4 | commentLabel.setLabelFor(commentField); |
| 4 | label.setLabelFor(reUseConnection); | |||||||||||||||||||||
5 | JPanel commentPanel = new JPanel(); |
| 5 | JPanel closePortPanel = new JPanel(new BorderLayout(5, 0)); | |||||||||||||||||||||
6 | commentPanel.setLayout(new BorderLayout(0, 5)); |
| | ||||||||||||||||||||||
7 | commentPanel.add(commentLabel, BorderLayout.WEST); |
| 6 | closePortPanel.add(label, BorderLayout.WEST); | |||||||||||||||||||||
8 | commentPanel.add(commentField, BorderLayout.CENTER); |
| 7 | closePortPanel.add(reUseConnection, BorderLayout.CENTER); | |||||||||||||||||||||
| 8 | return closePortPanel; | |||||||||||||||||||||||
9 | add(commentPanel); | |
Row | Violation |
---|---|
1 | Expression commentField is a field being modified, and thus it cannot be parameterized |
2 | Expression reUseConnection is a field being modified, and thus it cannot be parameterized |
3 | Expression commentField cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression reUseConnection cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement commentPanel.setLayout(new BorderLayout(0,5)); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Expression commentField cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression reUseConnection cannot be parameterized, because it has dependencies to/from statements that will be extracted |