if (null != longOption) { if (hasCharOption) { sb.append('/'); } sb.append("--"); sb.append(longOption); }
if (null != name) { if (needComma) { sb.append(", "); } sb.append("--"); sb.append(name); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/cli/avalon/CLArgsParser.java File path: /jakarta-jmeter-2.3.2/src/org/apache/commons/cli/avalon/CLUtil.java
Method name: String describeDualOption(int) Method name: StringBuffer describeOptions(CLOptionDescriptor[])
Number of AST nodes: 5 Number of AST nodes: 5
1
if (null != longOption) {
1
if (null != name) {
2
				if (hasCharOption) {
2
				if (needComma) {
3
					sb.append('/');
3
					sb.append(", ");
4
				}
4
				}
5
				sb.append("--");
5
				sb.append("--");
6
				sb.append(longOption);
6
				sb.append(name);
7
			}
7
			}
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.1
Clones locationClones are in different classes
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    11
    if (null != longOption)
    11
    if (null != longOption)
    19
    if (null != name)
    Differences
    Expression1Expression2Difference
    longOptionnameVARIABLE_NAME_MISMATCH
    19
    if (null != name)
    12
    if (hasCharOption)
    12
    if (hasCharOption)
    20
    if (needComma)
    Differences
    Expression1Expression2Difference
    hasCharOptionneedCommaVARIABLE_NAME_MISMATCH
    20
    if (needComma)
    13
    sb.append('/');
    13
    sb.append('/');
    Preondition Violations
    Unmatched statement sb.append('/'); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                          
                                            
    21
    sb.append(", ");
    Preondition Violations
    Unmatched statement sb.append(", "); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    21
    sb.append(", ");
    14
    sb.append("--");
    22
    sb.append("--");
    15
    sb.append(longOption);
    15
    sb.append(longOption);
    23
    sb.append(name);
    Differences
    Expression1Expression2Difference
    longOptionnameVARIABLE_NAME_MISMATCH
    23
    sb.append(name);
    Precondition Violations (2)
    Row Violation
    1Unmatched statement sb.append('/'); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement sb.append(", "); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted