if (saveConfig.saveThreadCounts()) { field = CSV_THREAD_COUNT1; text = parts[i++]; result.setGroupThreads(Integer.parseInt(text)); field = CSV_THREAD_COUNT2; text = parts[i++]; result.setAllThreads(Integer.parseInt(text)); }
if (saveConfig.saveSampleCount()) { field = CSV_SAMPLE_COUNT; text = parts[i++]; result.setSampleCount(Integer.parseInt(text)); field = CSV_ERROR_COUNT; text = parts[i++]; result.setErrorCount(Integer.parseInt(text)); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/CSVSaveService.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/save/CSVSaveService.java
Method name: SampleEvent makeResultFromDelimitedString(String[], SampleSaveConfiguration, long) Method name: SampleEvent makeResultFromDelimitedString(String[], SampleSaveConfiguration, long)
Number of AST nodes: 7 Number of AST nodes: 7
1
if (saveConfig.saveThreadCounts()) {
1
if (saveConfig.saveSampleCount()) {
2
            	field = CSV_THREAD_COUNT1;
2
            	field = CSV_SAMPLE_COUNT;
3
                text = parts[i++];
3
                text = parts[i++];
4
                result.setGroupThreads(Integer.parseInt(text));
4
                result.setSampleCount(Integer.parseInt(text));
5
                
6
            	field = CSV_THREAD_COUNT2;
5
            	field = CSV_ERROR_COUNT;
7
                text = parts[i++];
6
                text = parts[i++];
8
                result.setAllThreads(Integer.parseInt(text));
7
                result.setErrorCount(Integer.parseInt(text));
9
            }
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)1.0
Clones locationClones are in the same method
Number of node comparisons50
  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)46.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    58
    if (saveConfig.saveThreadCounts())
    58
    if (saveConfig.saveThreadCounts())
    79
    if (saveConfig.saveSampleCount())
    Differences
    Expression1Expression2Difference
    saveThreadCountssaveSampleCountMETHOD_INVOCATION_NAME_MISMATCH
    79
    if (saveConfig.saveSampleCount())
    59
    field = CSV_THREAD_COUNT1;
    59
    field = CSV_THREAD_COUNT1;
    80
    field = CSV_SAMPLE_COUNT;
    Differences
    Expression1Expression2Difference
    CSV_THREAD_COUNT1CSV_SAMPLE_COUNTVARIABLE_NAME_MISMATCH
    80
    field = CSV_SAMPLE_COUNT;
    60
    text = parts[i++];
    81
    text = parts[i++];
    61
    result.setGroupThreads(Integer.parseInt(text));
    61
    result.setGroupThreads(Integer.parseInt(text));
    82
    result.setSampleCount(Integer.parseInt(text));
    Differences
    Expression1Expression2Difference
    setGroupThreadssetSampleCountMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression result.setGroupThreads(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression result.setSampleCount(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression result.setGroupThreads(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    Expression result.setSampleCount(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    82
    result.setSampleCount(Integer.parseInt(text));
    62
    field = CSV_THREAD_COUNT2;
    62
    field = CSV_THREAD_COUNT2;
    83
    field = CSV_ERROR_COUNT;
    Differences
    Expression1Expression2Difference
    CSV_THREAD_COUNT2CSV_ERROR_COUNTVARIABLE_NAME_MISMATCH
    83
    field = CSV_ERROR_COUNT;
    63
    text = parts[i++];
    84
    text = parts[i++];
    64
    result.setAllThreads(Integer.parseInt(text));
    64
    result.setAllThreads(Integer.parseInt(text));
    85
    result.setErrorCount(Integer.parseInt(text));
    Differences
    Expression1Expression2Difference
    setAllThreadssetErrorCountMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression result.setAllThreads(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression result.setErrorCount(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression result.setAllThreads(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    Expression result.setErrorCount(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    85
    result.setErrorCount(Integer.parseInt(text));
    Precondition Violations (9)
    Row Violation
    1Expression result.setGroupThreads(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression result.setSampleCount(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression result.setGroupThreads(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    4Expression result.setSampleCount(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    5Expression result.setAllThreads(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression result.setErrorCount(Integer.parseInt(text)) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression result.setAllThreads(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    8Expression result.setErrorCount(Integer.parseInt(text)) is a void method call, and thus it cannot be parameterized
    9Clone fragment #1 returns variables field, text, i , while Clone fragment #2 returns variables field, text, i