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(NON_TEST_ELEMENTS)) { nonTestElements.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(LISTENERS)) { listeners.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)); } 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(SAMPLERS)) { samplers.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: 10 Number of AST nodes: 10
1
if (categories.contains(TIMERS)) {
2
					timers.add(new MenuInfo(item.getStaticLabel(), name));
3
				}
1
if (categories.contains(POST_PROCESSORS)) {
4
				if (categories.contains(POST_PROCESSORS)) {
2
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
5
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
3
				}
6
				}
4
				if (categories.contains(PRE_PROCESSORS)) {
7
				if (categories.contains(PRE_PROCESSORS)) {
5
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
8
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
6
				}
9
				}
7
				if (categories.contains(CONTROLLERS)) {
10
				if (categories.contains(CONTROLLERS)) {
8
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
11
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
9
				}
12
				}
10
				if (categories.contains(NON_TEST_ELEMENTS)) {
13
				if (categories.contains(
11
					nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
12
				}
13
				if (categories.contains(LISTENERS)) {
14
					listen
14
SAMPLERS)) {
15
ers.add(new MenuInfo(item.getStaticLabel(), name));
15
					samplers.add(new MenuInfo(item.getStaticLabel(), name));
16
				}
16
				}
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.8
Clones locationClones are in different classes
Number of node comparisons71
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)39.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    39
    if (categories.contains(POST_PROCESSORS))
    43
    if (categories.contains(POST_PROCESSORS))
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    44
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    41
    if (categories.contains(PRE_PROCESSORS))
    45
    if (categories.contains(PRE_PROCESSORS))
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    46
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    43
    if (categories.contains(CONTROLLERS))
    47
    if (categories.contains(CONTROLLERS))
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    48
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    49
    if (categories.contains(SAMPLERS))
    Differences
    Expression1Expression2Difference
    NON_TEST_ELEMENTSSAMPLERSVARIABLE_NAME_MISMATCH
    49
    if (categories.contains(SAMPLERS))
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    50
    samplers.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    nonTestElementssamplersVARIABLE_NAME_MISMATCH
    50
    samplers.add(new MenuInfo(item.getStaticLabel(), name));
    47
    if (categories.contains(LISTENERS))
    47
    if (categories.contains(LISTENERS))
    41
    if (categories.contains(TIMERS))
    Differences
    Expression1Expression2Difference
    LISTENERSTIMERSVARIABLE_NAME_MISMATCH
    41
    if (categories.contains(TIMERS))
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    listenerstimersVARIABLE_NAME_MISMATCH
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (0)
    Row Violation