if (attr.equals(Constants.BYTESRECEIVED)) { requestinfo.setBytesReceived(parseLong(attributes.getValue(idx))); } else if (attr.equals(Constants.BYTESSENT)) { requestinfo.setBytesSent(parseLong(attributes.getValue(idx))); }
if (attr.equals(Constants.MEMORY_TOTAL)) { memory.setTotal(parseLong(attributes.getValue(idx))); } else if (attr.equals(Constants.MEMORY_MAX)) { memory.setMax(parseLong(attributes.getValue(idx))); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/monitor/parser/MonitorHandler.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/monitor/parser/MonitorHandler.java
Method name: void startElement(String, String, String, Attributes) Method name: void startElement(String, String, String, Attributes)
Number of AST nodes: 4 Number of AST nodes: 4
1
if (attr.equals(Constants.BYTESRECEIVED)) {
1
if (attr.equals(Constants.MEMORY_TOTAL)) {
2
							requestinfo.setBytesReceived(parseLong(attributes.getValue(idx)));
2
							memory.setTotal(parseLong(attributes.getValue(idx)));
3
						} else if (attr.equals(Constants.BYTESSENT)) {
3
						} else if (attr.equals(Constants.MEMORY_MAX)) {
4
							requestinfo.setBytesSent(parseLong(attributes.getValue(idx)));
4
							memory.setMax(parseLong(attributes.getValue(idx)));
5
						}
5
						}
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.6
Clones locationClones are in the same method
Number of node comparisons14
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)2.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    67
    else if (attr.equals(Constants.BYTESRECEIVED))
    67
    else if (attr.equals(Constants.BYTESRECEIVED))
    18
    else if (attr.equals(Constants.MEMORY_TOTAL))
    Differences
    Expression1Expression2Difference
    BYTESRECEIVEDMEMORY_TOTALVARIABLE_NAME_MISMATCH
    18
    else if (attr.equals(Constants.MEMORY_TOTAL))
                                                                                                                      
    19
    memory.setTotal(parseLong(attributes.getValue(idx)));
    Preondition Violations
    Unmatched statement memory.setTotal(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    19
    memory.setTotal(parseLong(attributes.getValue(idx)));
    68
    requestinfo.setBytesReceived(parseLong(attributes.getValue(idx)));
    68
    requestinfo.setBytesReceived(parseLong(attributes.getValue(idx)));
    Preondition Violations
    Unmatched statement requestinfo.setBytesReceived(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                                                
    69
    else if (attr.equals(Constants.BYTESSENT))
    69
    else if (attr.equals(Constants.BYTESSENT))
    20
    else if (attr.equals(Constants.MEMORY_MAX))
    Differences
    Expression1Expression2Difference
    BYTESSENTMEMORY_MAXVARIABLE_NAME_MISMATCH
    20
    else if (attr.equals(Constants.MEMORY_MAX))
                                                                                                                  
    21
    memory.setMax(parseLong(attributes.getValue(idx)));
    Preondition Violations
    Unmatched statement memory.setMax(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    21
    memory.setMax(parseLong(attributes.getValue(idx)));
    70
    requestinfo.setBytesSent(parseLong(attributes.getValue(idx)));
    70
    requestinfo.setBytesSent(parseLong(attributes.getValue(idx)));
    Preondition Violations
    Unmatched statement requestinfo.setBytesSent(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                                                                        
    Precondition Violations (4)
    Row Violation
    1Unmatched statement memory.setTotal(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement requestinfo.setBytesReceived(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement memory.setMax(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement requestinfo.setBytesSent(parseLong(attributes.getValue(idx))); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted