JLabel label = new JLabel(JMeterUtils.getResString("ftp_local_file_contents")); //$NON-NLS-1$ inputData = new JTextArea(); label.setLabelFor(inputData); JPanel contentsPanel = new JPanel(new BorderLayout(5, 0)); contentsPanel.add(label, BorderLayout.WEST); contentsPanel.add(inputData, BorderLayout.CENTER); return contentsPanel;
domain = new JTextField(20); domain.setName(DOMAIN); JLabel label = new JLabel(JMeterUtils.getResString("web_server_domain")); // $NON-NLS-1$ label.setLabelFor(domain); JPanel panel = new JPanel(new BorderLayout(5, 0)); panel.add(label, BorderLayout.WEST); panel.add(domain, BorderLayout.CENTER); return panel;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/ftp/config/gui/FtpConfigGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/http/config/gui/UrlConfigGui.java
Method name: JPanel createLocalFileContentsPanel() Method name: JPanel getDomainPanel()
Number of AST nodes: 7 Number of AST nodes: 8
1
domain = new JTextField(20);
2
		domain.setName(DOMAIN);
1
JLabel label = new JLabel(JMeterUtils.getResString("ftp_local_file_contents")); //$NON-NLS-1$
3
		JLabel label = new JLabel(JMeterUtils.getResString("web_server_domain")); // $NON-NLS-1$
2
        inputData = new JTextArea();
3
        label.setLabelFor(inputData);
4
        JPanel contentsP
4
		label.setLabelFor(domain);
5
anel = new JPanel(new BorderLayout(5, 0));
5
		JPanel panel = new JPanel(new BorderLayout(5, 0));
6
        contentsPanel.add(label, BorderLayout.WEST);
6
		panel.add(label, BorderLayout.WEST);
7
        contentsPanel.add(inputData, BorderLayout.CENTER);
7
		panel.add(domain, BorderLayout.CENTER);
8
        return contentsPanel;
8
		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 comparisons23
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements7
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
                                                        
    2
    domain.setName(DOMAIN);
    1
    JLabel label = new JLabel(JMeterUtils.getResString("ftp_local_file_contents"));
    1
    JLabel label = new JLabel(JMeterUtils.getResString("ftp_local_file_contents"));
    3
    JLabel label = new JLabel(JMeterUtils.getResString("web_server_domain"));
    Differences
    Expression1Expression2Difference
    "ftp_local_file_contents""web_server_domain"LITERAL_VALUE_MISMATCH
    3
    JLabel label = new JLabel(JMeterUtils.getResString("web_server_domain"));
    2
    inputData = new JTextArea();
    2
    inputData = new JTextArea();
    1
    domain = new JTextField(20);
    Differences
    Expression1Expression2Difference
    inputDatadomainVARIABLE_NAME_MISMATCH
    javax.swing.JTextAreajavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    javax.swing.JTextAreajavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    new JTextArea()new JTextField(20)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression inputData is a field being modified, and thus it cannot be parameterized
    Expression domain is a field being modified, and thus it cannot be parameterized
    1
    domain = new JTextField(20);
    3
    label.setLabelFor(inputData);
    3
    label.setLabelFor(inputData);
    4
    label.setLabelFor(domain);
    Differences
    Expression1Expression2Difference
    inputDatadomainVARIABLE_NAME_MISMATCH
    javax.swing.JTextAreajavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression inputData cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression domain cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    label.setLabelFor(domain);
    4
    JPanel contentsPanel = new JPanel(new BorderLayout(5, 0));
    4
    JPanel contentsPanel = new JPanel(new BorderLayout(5, 0));
    5
    JPanel panel = new JPanel(new BorderLayout(5, 0));
    Differences
    Expression1Expression2Difference
    contentsPanelpanelVARIABLE_NAME_MISMATCH
    5
    JPanel panel = new JPanel(new BorderLayout(5, 0));
    5
    contentsPanel.add(label, BorderLayout.WEST);
    5
    contentsPanel.add(label, BorderLayout.WEST);
    6
    panel.add(label, BorderLayout.WEST);
    Differences
    Expression1Expression2Difference
    contentsPanelpanelVARIABLE_NAME_MISMATCH
    6
    panel.add(label, BorderLayout.WEST);
    6
    contentsPanel.add(inputData, BorderLayout.CENTER);
    6
    contentsPanel.add(inputData, BorderLayout.CENTER);
    7
    panel.add(domain, BorderLayout.CENTER);
    Differences
    Expression1Expression2Difference
    inputDatadomainVARIABLE_NAME_MISMATCH
    javax.swing.JTextAreajavax.swing.JTextFieldSUBCLASS_TYPE_MISMATCH
    contentsPanelpanelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression inputData cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression domain cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7
    panel.add(domain, BorderLayout.CENTER);
    7
    return contentsPanel;
    7
    return contentsPanel;
    8
    return panel;
    Differences
    Expression1Expression2Difference
    contentsPanelpanelVARIABLE_NAME_MISMATCH
    8
    return panel;
    Precondition Violations (6)
    Row Violation
    1Expression inputData is a field being modified, and thus it cannot be parameterized
    2Expression domain is a field being modified, and thus it cannot be parameterized
    3Expression inputData cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression domain cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression inputData cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression domain cannot be parameterized, because it has dependencies to/from statements that will be extracted