if (categories.contains(POST_PROCESSORS)) { postProcessors.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(PRE_PROCESSORS)) { preProcessors.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(CONTROLLERS)) { controllers.add(new MenuInfo(item.getStaticLabel(), name)); }
if (categories.contains(LISTENERS)) { listeners.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(CONFIG_ELEMENTS)) { configElements.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(ASSERTIONS)) { assertions.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/ReportMenuFactory.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: 6 Number of AST nodes: 6
1
if (categories.contains(POST_PROCESSORS)) {
1
if (categories.contains(LISTENERS)) {
2
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
2
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
3
				}
3
				}
4
				if (categories.contains(PRE_PROCESSORS)) {
4
				if (categories.contains(
5
					preProcessor
5
CONFIG_ELEMENTS)) {
6
s.add(new MenuInfo(item.getStaticLabel(), name));
6
					configElements.add(new MenuInfo(item.getStaticLabel(), name));
7
				}
7
				}
8
				if (categories.contains(CONTROLLERS)) {
8
				if (categories.contains(ASSERTIONS)) {
9
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
9
					assertions.add(new MenuInfo(item.getStaticLabel(), name));
10
				}
10
				}
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)1.0
Clones locationClones are in different classes
Number of node comparisons28
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements6
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)20.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    39
    if (categories.contains(POST_PROCESSORS))
    39
    if (categories.contains(POST_PROCESSORS))
    53
    if (categories.contains(LISTENERS))
    Differences
    Expression1Expression2Difference
    POST_PROCESSORSLISTENERSVARIABLE_NAME_MISMATCH
    53
    if (categories.contains(LISTENERS))
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    54
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    postProcessorslistenersVARIABLE_NAME_MISMATCH
    54
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    41
    if (categories.contains(PRE_PROCESSORS))
    41
    if (categories.contains(PRE_PROCESSORS))
    55
    if (categories.contains(CONFIG_ELEMENTS))
    Differences
    Expression1Expression2Difference
    PRE_PROCESSORSCONFIG_ELEMENTSVARIABLE_NAME_MISMATCH
    55
    if (categories.contains(CONFIG_ELEMENTS))
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    56
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    preProcessorsconfigElementsVARIABLE_NAME_MISMATCH
    56
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    43
    if (categories.contains(CONTROLLERS))
    43
    if (categories.contains(CONTROLLERS))
    57
    if (categories.contains(ASSERTIONS))
    Differences
    Expression1Expression2Difference
    CONTROLLERSASSERTIONSVARIABLE_NAME_MISMATCH
    57
    if (categories.contains(ASSERTIONS))
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    58
    assertions.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    controllersassertionsVARIABLE_NAME_MISMATCH
    58
    assertions.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (0)
    Row Violation