c.gridwidth = 1; mailerPanel.add(new JLabel("SMTP Host:")); smtpHostField = new JTextField(25); smtpHostField.setEditable(true); c.gridwidth = GridBagConstraints.REMAINDER; g.setConstraints(smtpHostField, c); mailerPanel.add(smtpHostField);
c.gridwidth = 1; mailerPanel.add(new JLabel("Addressee(s):")); addressField = new JTextField(25); addressField.setEditable(true); c.gridwidth = GridBagConstraints.REMAINDER; g.setConstraints(addressField, c); mailerPanel.add(addressField);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/MailerVisualizer.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/MailerVisualizer.java
Method name: void initGui() Method name: void initGui()
Number of AST nodes: 7 Number of AST nodes: 7
1
c.gridwidth = 1;
1
c.gridwidth = 1;
2
		mailerPanel.add(new JLabel("SMTP Host:"));
2
		mailerPanel.add(new JLabel("Addressee(s):"));
3
		smtpHostField = new JTextField(25);
3
		addressField = new JTextField(25);
4
		smtpHostField.setEditable(true);
4
		addressField.setEditable(true);
5
		c.gridwidth = GridBagConstraints.REMAINDER;
5
		c.gridwidth = GridBagConstraints.REMAINDER;
6
		g.setConstraints(smtpHostField, c);
6
		g.setConstraints(addressField, c);
7
		mailerPanel.add(smtpHostField);
7
		mailerPanel.add(addressField);
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 the same method
Number of node comparisons37
  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 fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    29
    c.gridwidth = 1;
    22
    c.gridwidth = 1;
    30
    mailerPanel.add(new JLabel("SMTP Host:"));
    30
    mailerPanel.add(new JLabel("SMTP Host:"));
    23
    mailerPanel.add(new JLabel("Addressee(s):"));
    Differences
    Expression1Expression2Difference
    "SMTP Host:""Addressee(s):"LITERAL_VALUE_MISMATCH
    23
    mailerPanel.add(new JLabel("Addressee(s):"));
    31
    smtpHostField = new JTextField(25);
    31
    smtpHostField = new JTextField(25);
    24
    addressField = new JTextField(25);
    Differences
    Expression1Expression2Difference
    smtpHostFieldaddressFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression smtpHostField is a field being modified, and thus it cannot be parameterized
    Expression addressField is a field being modified, and thus it cannot be parameterized
    24
    addressField = new JTextField(25);
    32
    smtpHostField.setEditable(true);
    32
    smtpHostField.setEditable(true);
    25
    addressField.setEditable(true);
    Differences
    Expression1Expression2Difference
    smtpHostFieldaddressFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression smtpHostField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addressField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25
    addressField.setEditable(true);
    33
    c.gridwidth = GridBagConstraints.REMAINDER;
    26
    c.gridwidth = GridBagConstraints.REMAINDER;
    34
    g.setConstraints(smtpHostField, c);
    34
    g.setConstraints(smtpHostField, c);
    27
    g.setConstraints(addressField, c);
    Differences
    Expression1Expression2Difference
    smtpHostFieldaddressFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression smtpHostField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addressField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27
    g.setConstraints(addressField, c);
    35
    mailerPanel.add(smtpHostField);
    35
    mailerPanel.add(smtpHostField);
    28
    mailerPanel.add(addressField);
    Differences
    Expression1Expression2Difference
    smtpHostFieldaddressFieldVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression smtpHostField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression addressField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28
    mailerPanel.add(addressField);
    Precondition Violations (8)
    Row Violation
    1Expression smtpHostField is a field being modified, and thus it cannot be parameterized
    2Expression addressField is a field being modified, and thus it cannot be parameterized
    3Expression smtpHostField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression addressField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression smtpHostField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression addressField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression smtpHostField cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression addressField cannot be parameterized, because it has dependencies to/from statements that will be extracted