File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/assertions/gui/AssertionGui.java | File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java | |||
Method name: JPanel createTypePanel()
|
Method name: JPanel createContentTypePanel()
|
|||
Number of AST nodes: 19 | Number of AST nodes: 19 | |||
1 | JPanel panel = new JPanel();↵ | 1 | contentTypeInclude = new J↵ | |
2 | panel.setBorder(BorderFactory.createTitledBorder↵ | 2 | TextField(35);↵ | |
3 | contentTypeInclude.addKeyListener(this);↵ | |||
4 | contentTypeInclude.setName(ENABLE_RESTART);↵ | |||
3 | (JMeterUtils.getResString("assertion_pattern_match_rules"))); //$NON-NLS-1$↵ | 5 | JLabel labelInclude = new JLabel(JMeterUtils.getResString("proxy_content_type_include")); // $NON-NLS-1$↵ | |
4 | ButtonGroup group = new ButtonGroup();↵ | |||
5 | containsBox = new JRadioButton(JMeterUtils.getResString("assertion_contains↵ | 6 | labelInclude.setLabelFor(contentTypeInclude);↵ | |
7 | // Default value↵ | |||
6 | ")); //$NON-NLS-1$↵ | 8 | contentTypeInclude.setText(JMeterUtils.getProperty("proxy.content_type_include")); // $NON-NLS-1$↵ | |
7 | group.add(containsBox);↵ | |||
8 | containsBox.setSelected(true);↵ | |||
9 | panel.add(containsBox);↵ | |||
10 | matchesBox = new JRadioButton↵ | |||
9 | contentTypeExclude = new JTextField(35);↵ | |||
10 | contentTypeExclude.addKeyListener(this);↵ | |||
11 | contentTypeExclude.setName(ENABLE_RESTART);↵ | |||
11 | (JMeterUtils.getResString("assertion_matches")); //$NON-NLS-1$↵ | 12 | JLabel labelExclude = new JLabel(JMeterUtils.getResString("proxy_content_type_exclude")); // $NON-NLS-1$↵ | |
12 | group.add(matchesBox);↵ | 13 | ↵ | |
13 | panel.add(matchesBox);↵ | |||
14 | equalsBox = new JRadioButton(JMeterUtils.getResString("assertion_equals↵ | 14 | labelExclude.setLabelFor(contentTypeExclude);↵ | |
15 | // Default value↵ | |||
15 | ")); //$NON-NLS-1$↵ | 16 | contentTypeExclude.setText(JMeterUtils.getProperty("proxy.content_type_exclude")); // $NON-NLS-1$↵ | |
16 | group.add(equalsBox);↵ | 17 | ↵ | |
17 | panel.add(equalsBox);↵ | |||
18 | substringBox = new JRadioButton(↵ | |||
18 | HorizontalPanel panel = new HorizontalPanel();↵ | |||
19 | panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),↵ | |||
19 | JMeterUtils.getResString("assertion_substring")); //$NON-NLS-1$↵ | 20 | JMeterUtils.getResString("proxy_content_type_filter"))); // $NON-NLS-1$↵ | |
20 | group.add(substringBox);↵ | |||
21 | panel.add(substringBox);↵ | |||
22 | notBox = new JCheckBox(JMeterUtils.getResString("assertion_not")); //$NON-NLS-1$↵ | |||
23 | panel.add(notBox↵ | 21 | panel.add(labelInclude);↵ | |
22 | panel.add(contentTypeInclude);↵ | |||
23 | panel.add(labelExclude);↵ | |||
24 | );↵ | 24 | panel.add(contentTypeExclude);↵ | |
25 | ↵ | |||
25 | return panel; | 26 |
| |
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 | 247 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 12 |
Number of unmapped statements in the second code fragment | 12 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | contentTypeInclude = new JTextField(35); | ||||||||||||||||||
| 2 | contentTypeInclude.addKeyListener(this); | ||||||||||||||||||
| 3 | contentTypeInclude.setName(ENABLE_RESTART); | ||||||||||||||||||
| 4 | JLabel labelInclude = new JLabel(JMeterUtils.getResString("proxy_content_type_include")); | ||||||||||||||||||
| 5 | labelInclude.setLabelFor(contentTypeInclude); | ||||||||||||||||||
| 6 | contentTypeInclude.setText(JMeterUtils.getProperty("proxy.content_type_include")); | ||||||||||||||||||
| 7 | contentTypeExclude = new JTextField(35); | ||||||||||||||||||
| 8 | contentTypeExclude.addKeyListener(this); | ||||||||||||||||||
| 9 | contentTypeExclude.setName(ENABLE_RESTART); | ||||||||||||||||||
| 10 | JLabel labelExclude = new JLabel(JMeterUtils.getResString("proxy_content_type_exclude")); | ||||||||||||||||||
| 11 | labelExclude.setLabelFor(contentTypeExclude); | ||||||||||||||||||
| 12 | contentTypeExclude.setText(JMeterUtils.getProperty("proxy.content_type_exclude")); | ||||||||||||||||||
1 | JPanel panel = new JPanel(); |
| 13 | HorizontalPanel panel = new HorizontalPanel(); | ||||||||||||||||
2 | panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("assertion_pattern_match_rules"))); |
| 14 | panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("proxy_content_type_filter"))); | ||||||||||||||||
3 | ButtonGroup group = new ButtonGroup(); | | ||||||||||||||||||
4 | containsBox = new JRadioButton(JMeterUtils.getResString("assertion_contains")); | | ||||||||||||||||||
5 | group.add(containsBox); | | ||||||||||||||||||
6 | containsBox.setSelected(true); | | ||||||||||||||||||
7 | panel.add(containsBox); |
| 18 | panel.add(contentTypeExclude); | ||||||||||||||||
8 | matchesBox = new JRadioButton(JMeterUtils.getResString("assertion_matches")); | | ||||||||||||||||||
9 | group.add(matchesBox); | | ||||||||||||||||||
10 | panel.add(matchesBox); |
| 17 | panel.add(labelExclude); | ||||||||||||||||
11 | equalsBox = new JRadioButton(JMeterUtils.getResString("assertion_equals")); | | ||||||||||||||||||
12 | group.add(equalsBox); | | ||||||||||||||||||
13 | panel.add(equalsBox); |
| 15 | panel.add(labelInclude); | ||||||||||||||||
14 | substringBox = new JRadioButton(JMeterUtils.getResString("assertion_substring")); | | ||||||||||||||||||
15 | group.add(substringBox); | | ||||||||||||||||||
16 | panel.add(substringBox); |
| 16 | panel.add(contentTypeInclude); | ||||||||||||||||
17 | notBox = new JCheckBox(JMeterUtils.getResString("assertion_not")); | | ||||||||||||||||||
18 | panel.add(notBox); | | ||||||||||||||||||
19 | return panel; |
| 19 | return panel; |
Row | Violation |
---|---|
1 | Clone fragment #1 returns variables panel , while Clone fragment #2 returns variables |