if (stopTestBox.isSelected()) { return ThreadGroup.ON_SAMPLE_ERROR_STOPTEST; } if (stopThrdBox.isSelected()) { return ThreadGroup.ON_SAMPLE_ERROR_STOPTHREAD; } // Defaults to continue return ThreadGroup.ON_SAMPLE_ERROR_CONTINUE;
if (stopTestBox.isSelected()) { return OnErrorTestElement.ON_ERROR_STOPTEST; } if (stopThrdBox.isSelected()) { return OnErrorTestElement.ON_ERROR_STOPTHREAD; } // Defaults to continue return OnErrorTestElement.ON_ERROR_CONTINUE;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/threads/gui/ThreadGroupGui.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/OnErrorPanel.java
Method name: String onSampleError() Method name: int getOnErrorSetting()
Number of AST nodes: 5 Number of AST nodes: 5
1
if (stopTestBox.isSelected()) {
1
if (stopTestBox.isSelected()) {
2
			return ThreadGroup.ON_SAMPLE_ERROR_STOPTEST;
2
		    return OnErrorTestElement.ON_ERROR_STOPTEST;
3
		}
3
		}
4
		if (stopThrdBox.isSelected()) {
4
		if (stopThrdBox.isSelected()) {
5
			return ThreadGroup.ON_SAMPLE_ERROR_STOPTHREAD;
5
		    return OnErrorTestElement.ON_ERROR_STOPTHREAD;
6
		}
6
		}
7
		// Defaults to continue
7
		// Defaults to continue
8
		return ThreadGroup.ON_SAMPLE_ERROR_CONTINUE;
8
		return OnErrorTestElement.ON_ERROR_CONTINUE;
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.2
Clones locationClones are in different classes having the same super class
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (stopTestBox.isSelected())
    1
    if (stopTestBox.isSelected())
                                                                                                  
    2
    return OnErrorTestElement.ON_ERROR_STOPTEST;
    Preondition Violations
    Unmatched return OnErrorTestElement.ON_ERROR_STOPTEST;
    2
    return OnErrorTestElement.ON_ERROR_STOPTEST;
    2
    return ThreadGroup.ON_SAMPLE_ERROR_STOPTEST;
    2
    return ThreadGroup.ON_SAMPLE_ERROR_STOPTEST;
    Preondition Violations
    Unmatched return ThreadGroup.ON_SAMPLE_ERROR_STOPTEST;
                                                                                                  
    3
    if (stopThrdBox.isSelected())
    3
    if (stopThrdBox.isSelected())
                                                                                                      
    4
    return OnErrorTestElement.ON_ERROR_STOPTHREAD;
    Preondition Violations
    Unmatched return OnErrorTestElement.ON_ERROR_STOPTHREAD;
    4
    return OnErrorTestElement.ON_ERROR_STOPTHREAD;
    4
    return ThreadGroup.ON_SAMPLE_ERROR_STOPTHREAD;
    4
    return ThreadGroup.ON_SAMPLE_ERROR_STOPTHREAD;
    Preondition Violations
    Unmatched return ThreadGroup.ON_SAMPLE_ERROR_STOPTHREAD;
                                                                                                      
                                                                                                  
    5
    return OnErrorTestElement.ON_ERROR_CONTINUE;
    Preondition Violations
    Unmatched return OnErrorTestElement.ON_ERROR_CONTINUE;
    5
    return OnErrorTestElement.ON_ERROR_CONTINUE;
    5
    return ThreadGroup.ON_SAMPLE_ERROR_CONTINUE;
    5
    return ThreadGroup.ON_SAMPLE_ERROR_CONTINUE;
    Preondition Violations
    Unmatched return ThreadGroup.ON_SAMPLE_ERROR_CONTINUE;
                                                                                                  
    Precondition Violations (6)
    Row Violation
    1Unmatched return OnErrorTestElement.ON_ERROR_STOPTEST;
    2Unmatched return ThreadGroup.ON_SAMPLE_ERROR_STOPTEST;
    3Unmatched return OnErrorTestElement.ON_ERROR_STOPTHREAD;
    4Unmatched return ThreadGroup.ON_SAMPLE_ERROR_STOPTHREAD;
    5Unmatched return OnErrorTestElement.ON_ERROR_CONTINUE;
    6Unmatched return ThreadGroup.ON_SAMPLE_ERROR_CONTINUE;