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); } } });
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); } } });
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
errorLogging = new JCheckBox(JMeterUtils.getResString("log_errors_only")); // $NON-NLS-1$
1
successOnlyLogging = new JCheckBox(JMeterUtils.getResString("log_success_only")); // $NON-NLS-1$
2
		errorLogging.addActionListener(new ActionListener(){
2
		successOnlyLogging.addActionListener(new ActionListener(){
3
			public void actionPerformed(ActionEvent e) {
3
			public void actionPerformed(ActionEvent e) {
4
				if (errorLogging.isSelected()) {
4
				if (successOnlyLogging.isSelected()) {
5
				    successOnlyLogging.setSelected(false);
5
				    errorLogging.setSelected(false);
6
				}
6
				}
7
			}			
7
			}			
8
		});
8
		});
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in the same method
Number of node comparisons2
  1. {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
    2
    errorLogging = new JCheckBox(JMeterUtils.getResString("log_errors_only"));
    2
    errorLogging = new JCheckBox(JMeterUtils.getResString("log_errors_only"));
    4
    successOnlyLogging = new JCheckBox(JMeterUtils.getResString("log_success_only"));
    Differences
    Expression1Expression2Difference
    errorLoggingsuccessOnlyLoggingVARIABLE_NAME_MISMATCH
    "log_errors_only""log_success_only"LITERAL_VALUE_MISMATCH
    4
    successOnlyLogging = new JCheckBox(JMeterUtils.getResString("log_success_only"));
    3
    errorLogging.addActionListener(new ActionListener() {...});
    3
    errorLogging.addActionListener(new ActionListener() {...});
    5
    successOnlyLogging.addActionListener(new ActionListener() {...});
    Differences
    Expression1Expression2Difference
    errorLoggingsuccessOnlyLoggingVARIABLE_NAME_MISMATCH
    successOnlyLoggingerrorLoggingVARIABLE_NAME_MISMATCH
    errorLoggingsuccessOnlyLoggingVARIABLE_NAME_MISMATCH
    5
    successOnlyLogging.addActionListener(new ActionListener() {...});
    Precondition Violations (0)
    Row Violation