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(TABLES)) { tables.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(REPORT_PAGE)) { reportPage.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(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: 8 Number of AST nodes: 8
1
if (categories.contains(NON_TEST_ELEMENTS)) {
2
					nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
3
				}
1
if (categories.contains(LISTENERS)) {
4
				if (categories.contains(LISTENERS)) {
2
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
5
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
3
				}
6
				}
4
				if (categories.contains(CONFIG_ELEMENTS)) {
7
				if (categories.contains(CONFIG_ELEMENTS)) {
5
					configElements.add(new MenuInfo(item.getStaticLabel(), name));
8
					configElements.add(new MenuInfo(item.getStaticLabel(), name));
6
				}
9
				}
7
				if (categories.contains(TABLES)) {
10
				if (categories.contains(ASSERTIONS)) {
8
					tables.add(new MenuInfo(item.getStaticLabel(), name));
11
					
9
				}
10
				if (categories.contains(REPORT_PAGE)) {
11
					reportPage.add(new MenuInfo(item.getStaticLabel(), name));
12
assertions.add(new MenuInfo(item.getStaticLabel(), name));
12
				}
13
				}
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.4
Clones locationClones are in different classes
Number of node comparisons47
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)11.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    47
    if (categories.contains(LISTENERS))
    53
    if (categories.contains(LISTENERS))
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    54
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    49
    if (categories.contains(CONFIG_ELEMENTS))
    55
    if (categories.contains(CONFIG_ELEMENTS))
    50
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    56
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    51
    if (categories.contains(TABLES))
    51
    if (categories.contains(TABLES))
    51
    if (categories.contains(NON_TEST_ELEMENTS))
    Differences
    Expression1Expression2Difference
    TABLESNON_TEST_ELEMENTSVARIABLE_NAME_MISMATCH
    51
    if (categories.contains(NON_TEST_ELEMENTS))
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    52
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    tablesnonTestElementsVARIABLE_NAME_MISMATCH
    52
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    53
    if (categories.contains(REPORT_PAGE))
    53
    if (categories.contains(REPORT_PAGE))
    57
    if (categories.contains(ASSERTIONS))
    Differences
    Expression1Expression2Difference
    REPORT_PAGEASSERTIONSVARIABLE_NAME_MISMATCH
    57
    if (categories.contains(ASSERTIONS))
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    58
    assertions.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    reportPageassertionsVARIABLE_NAME_MISMATCH
    58
    assertions.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (0)
    Row Violation