if (categories.contains(CONFIG_ELEMENTS)) { configElements.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(ASSERTIONS)) { assertions.add(new MenuInfo(item.getStaticLabel(), name)); }
if (categories.contains(TIMERS)) { timers.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(POST_PROCESSORS)) { postProcessors.add(new MenuInfo(item.getStaticLabel(), name)); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java
Method name: void initializeMenus() Method name: void initializeMenus()
Number of AST nodes: 4 Number of AST nodes: 4
1
if (categories.contains(CONFIG_ELEMENTS)) {
1
if (categories.contains(
2
					configElement
2
TIMERS)) {
3
s.add(new MenuInfo(item.getStaticLabel(), name));
3
					timers.add(new MenuInfo(item.getStaticLabel(), name));
4
				}
4
				}
5
				if (categories.contains(ASSERTIONS)) {
5
				if (categories.contains(
6
					assertion
6
POST_PROCESSORS)) {
7
s.add(new MenuInfo(item.getStaticLabel(), name));
7
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
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.5
Clones locationClones are in the same method
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    55
    if (categories.contains(CONFIG_ELEMENTS))
    55
    if (categories.contains(CONFIG_ELEMENTS))
    43
    if (categories.contains(POST_PROCESSORS))
    Differences
    Expression1Expression2Difference
    CONFIG_ELEMENTSPOST_PROCESSORSVARIABLE_NAME_MISMATCH
    43
    if (categories.contains(POST_PROCESSORS))
    56
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    56
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    44
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    configElementspostProcessorsVARIABLE_NAME_MISMATCH
    44
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    57
    if (categories.contains(ASSERTIONS))
    57
    if (categories.contains(ASSERTIONS))
    41
    if (categories.contains(TIMERS))
    Differences
    Expression1Expression2Difference
    ASSERTIONSTIMERSVARIABLE_NAME_MISMATCH
    41
    if (categories.contains(TIMERS))
    58
    assertions.add(new MenuInfo(item.getStaticLabel(), name));
    58
    assertions.add(new MenuInfo(item.getStaticLabel(), name));
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    assertionstimersVARIABLE_NAME_MISMATCH
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (0)
    Row Violation