JPanel panel = new JPanel(); panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("assertion_pattern_match_rules"))); //$NON-NLS-1$ ButtonGroup group = new ButtonGroup(); containsBox = new JRadioButton(JMeterUtils.getResString("assertion_contains")); //$NON-NLS-1$ group.add(containsBox); containsBox.setSelected(true); panel.add(containsBox); matchesBox = new JRadioButton(JMeterUtils.getResString("assertion_matches")); //$NON-NLS-1$ group.add(matchesBox); panel.add(matchesBox); equalsBox = new JRadioButton(JMeterUtils.getResString("assertion_equals")); //$NON-NLS-1$ group.add(equalsBox); panel.add(equalsBox); substringBox = new JRadioButton(JMeterUtils.getResString("assertion_substring")); //$NON-NLS-1$ group.add(substringBox); panel.add(substringBox); notBox = new JCheckBox(JMeterUtils.getResString("assertion_not")); //$NON-NLS-1$ panel.add(notBox); return panel;
contentTypeInclude = new JTextField(35); contentTypeInclude.addKeyListener(this); contentTypeInclude.setName(ENABLE_RESTART); JLabel labelInclude = new JLabel(JMeterUtils.getResString("proxy_content_type_include")); // $NON-NLS-1$ labelInclude.setLabelFor(contentTypeInclude); // Default value contentTypeInclude.setText(JMeterUtils.getProperty("proxy.content_type_include")); // $NON-NLS-1$ contentTypeExclude = new JTextField(35); contentTypeExclude.addKeyListener(this); contentTypeExclude.setName(ENABLE_RESTART); JLabel labelExclude = new JLabel(JMeterUtils.getResString("proxy_content_type_exclude")); // $NON-NLS-1$ labelExclude.setLabelFor(contentTypeExclude); // Default value contentTypeExclude.setText(JMeterUtils.getProperty("proxy.content_type_exclude")); // $NON-NLS-1$ HorizontalPanel panel = new HorizontalPanel(); panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("proxy_content_type_filter"))); // $NON-NLS-1$ panel.add(labelInclude); panel.add(contentTypeInclude); panel.add(labelExclude); panel.add(contentTypeExclude); return panel;
Clone fragments detected by clone detection tool
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
		return panel;
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons247
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment12
    Number of unmapped statements in the second code fragment12
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    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();
    1
    JPanel panel = new JPanel();
    13
    HorizontalPanel panel = new HorizontalPanel();
    Differences
    Expression1Expression2Difference
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    13
    HorizontalPanel panel = new HorizontalPanel();
    2
    panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("assertion_pattern_match_rules")));
    2
    panel.setBorder(BorderFactory.createTitledBorder(JMeterUtils.getResString("assertion_pattern_match_rules")));
    14
    panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), JMeterUtils.getResString("proxy_content_type_filter")));
    Differences
    Expression1Expression2Difference
    BorderFactory.createTitledBorder(JMeterUtils.getResString("assertion_pattern_match_rules"))BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),JMeterUtils.getResString("proxy_content_type_filter"))ARGUMENT_NUMBER_MISMATCH
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    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);
    7
    panel.add(containsBox);
    18
    panel.add(contentTypeExclude);
    Differences
    Expression1Expression2Difference
    containsBoxcontentTypeExcludeVARIABLE_NAME_MISMATCH
    javax.swing.JRadioButtonjavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    18
    panel.add(contentTypeExclude);
    8
    matchesBox = new JRadioButton(JMeterUtils.getResString("assertion_matches"));
                                                                                                                                                                
    9
    group.add(matchesBox);
                                                      
    10
    panel.add(matchesBox);
    10
    panel.add(matchesBox);
    17
    panel.add(labelExclude);
    Differences
    Expression1Expression2Difference
    matchesBoxlabelExcludeVARIABLE_NAME_MISMATCH
    javax.swing.JRadioButtonjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    17
    panel.add(labelExclude);
    11
    equalsBox = new JRadioButton(JMeterUtils.getResString("assertion_equals"));
                                                                                                                                                              
    12
    group.add(equalsBox);
                                                      
    13
    panel.add(equalsBox);
    13
    panel.add(equalsBox);
    15
    panel.add(labelInclude);
    Differences
    Expression1Expression2Difference
    equalsBoxlabelIncludeVARIABLE_NAME_MISMATCH
    javax.swing.JRadioButtonjavax.swing.JLabelSUBCLASS_TYPE_MISMATCH
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    15
    panel.add(labelInclude);
    14
    substringBox = new JRadioButton(JMeterUtils.getResString("assertion_substring"));
                                                                                                                                                                          
    15
    group.add(substringBox);
                                                            
    16
    panel.add(substringBox);
    16
    panel.add(substringBox);
    16
    panel.add(contentTypeInclude);
    Differences
    Expression1Expression2Difference
    substringBoxcontentTypeIncludeVARIABLE_NAME_MISMATCH
    javax.swing.JRadioButtonjavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    16
    panel.add(contentTypeInclude);
    17
    notBox = new JCheckBox(JMeterUtils.getResString("assertion_not"));
                                                                                                                                            
    18
    panel.add(notBox);
                                                
    19
    return panel;
    19
    return panel;
    19
    return panel;
    Differences
    Expression1Expression2Difference
    javax.swing.JPanelorg.apache.jmeter.gui.util.HorizontalPanelSUBCLASS_TYPE_MISMATCH
    19
    return panel;
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables panel , while Clone fragment #2 returns variables