successOnlyLogging = new JCheckBox(JMeterUtils.getResString("log_success_only")); // $NON-NLS-1$ successOnlyLogging.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { if (successOnlyLogging.isSelected()) { errorLogging.setSelected(false); } } });
errorLogging = new JCheckBox(JMeterUtils.getResString("log_errors_only")); // $NON-NLS-1$ errorLogging.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { if (errorLogging.isSelected()) { successOnlyLogging.setSelected(false); } } });
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/gui/AbstractVisualizer.java
Method name: void AbstractVisualizer() Method name: void AbstractVisualizer()
Number of AST nodes: 2 Number of AST nodes: 2
1
successOnlyLogging = new JCheckBox(JMeterUtils.getResString("log_success_only")); // $NON-NLS-1$
1
errorLogging = new JCheckBox(JMeterUtils.getResString("log_errors_only")); // $NON-NLS-1$
2
		successOnlyLogging.addActionListener(new ActionListener(){
2
		errorLogging.addActionListener(new ActionListener(){
3
			public void actionPerformed(ActionEvent e) {
3
			public void actionPerformed(ActionEvent e) {
4
				if (successOnlyLogging.isSelected()) {
4
				if (errorLogging.isSelected()) {
5
				    errorLogging.setSelected(false);
5
				    successOnlyLogging.setSelected(false);
6
				}
6
				}
7
			}			
7
			}			
8
		});
8
		});
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 comparisons2
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    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
    4
    successOnlyLogging = new JCheckBox(JMeterUtils.getResString("log_success_only"));
    4
    successOnlyLogging = new JCheckBox(JMeterUtils.getResString("log_success_only"));
    2
    errorLogging = new JCheckBox(JMeterUtils.getResString("log_errors_only"));
    Differences
    Expression1Expression2Difference
    successOnlyLoggingerrorLoggingVARIABLE_NAME_MISMATCH
    "log_success_only""log_errors_only"LITERAL_VALUE_MISMATCH
    Preondition Violations
    Expression successOnlyLogging is a field being modified, and thus it cannot be parameterized
    Expression errorLogging is a field being modified, and thus it cannot be parameterized
    2
    errorLogging = new JCheckBox(JMeterUtils.getResString("log_errors_only"));
    5
    successOnlyLogging.addActionListener(new ActionListener() {...});
    5
    successOnlyLogging.addActionListener(new ActionListener() {...});
    3
    errorLogging.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    successOnlyLoggingerrorLoggingVARIABLE_NAME_MISMATCH
    errorLoggingsuccessOnlyLoggingVARIABLE_NAME_MISMATCH
    successOnlyLoggingerrorLoggingVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression successOnlyLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression errorLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression successOnlyLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression errorLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    errorLogging.addActionListener(new ActionListener() {...});
    Precondition Violations (6)
    Row Violation
    1Expression successOnlyLogging is a field being modified, and thus it cannot be parameterized
    2Expression errorLogging is a field being modified, and thus it cannot be parameterized
    3Expression successOnlyLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression errorLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression successOnlyLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression errorLogging cannot be parameterized, because it has dependencies to/from statements that will be extracted