try { List guiClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { JMeterGUIComponent.class, TestBean.class }); timers = new LinkedList(); controllers = new LinkedList(); samplers = new LinkedList(); configElements = new LinkedList(); assertions = new LinkedList(); listeners = new LinkedList(); postProcessors = new LinkedList(); preProcessors = new LinkedList(); nonTestElements = new LinkedList(); menuMap.put(TIMERS, timers); menuMap.put(ASSERTIONS, assertions); menuMap.put(CONFIG_ELEMENTS, configElements); menuMap.put(CONTROLLERS, controllers); menuMap.put(LISTENERS, listeners); menuMap.put(NON_TEST_ELEMENTS, nonTestElements); menuMap.put(SAMPLERS, samplers); menuMap.put(POST_PROCESSORS, postProcessors); menuMap.put(PRE_PROCESSORS, preProcessors); Collections.sort(guiClasses); Iterator iter = guiClasses.iterator(); while (iter.hasNext()) { String name = (String) iter.next(); /* * JMeterTreeNode and TestBeanGUI are special GUI classes, and * aren't intended to be added to menus * * TODO: find a better way of checking this */ if (name.endsWith("JMeterTreeNode") // $NON-NLS-1$ || name.endsWith("TestBeanGUI")) {// $NON-NLS-1$ continue;// Don't try to instantiate these } JMeterGUIComponent item; try { Class c = Class.forName(name); if (TestBean.class.isAssignableFrom(c)) { item = new TestBeanGUI(c); } else { item = (JMeterGUIComponent) c.newInstance(); } } catch (NoClassDefFoundError e) { log.warn("Missing jar? Could not create " + name + ". " + e); continue; } catch (Throwable e) { log.warn("Could not instantiate " + name, e); continue; } if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel())) { log.info("Skipping " + name); continue; } else { elementsToSkip.add(name); } Collection categories = item.getMenuCategories(); if (categories == null) { log.debug(name + " participates in no menus."); continue; } 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)); } 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)); } } } catch (IOException e) { log.error("", e); }
try { List guiClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] { JMeterGUIComponent.class, TestBean.class }); controllers = new LinkedList(); configElements = new LinkedList(); listeners = new LinkedList(); postProcessors = new LinkedList(); preProcessors = new LinkedList(); tables = new LinkedList(); reportPage = new LinkedList(); nonTestElements = new LinkedList(); menuMap.put(CONFIG_ELEMENTS, configElements); menuMap.put(CONTROLLERS, controllers); menuMap.put(LISTENERS, listeners); menuMap.put(NON_TEST_ELEMENTS, nonTestElements); menuMap.put(POST_PROCESSORS, postProcessors); menuMap.put(PRE_PROCESSORS, preProcessors); menuMap.put(REPORT_PAGE, reportPage); menuMap.put(TABLES, tables); Collections.sort(guiClasses); Iterator iter = guiClasses.iterator(); while (iter.hasNext()) { String name = (String) iter.next(); /* * JMeterTreeNode and TestBeanGUI are special GUI classes, and * aren't intended to be added to menus * * TODO: find a better way of checking this */ if (name.endsWith("JMeterTreeNode") || name.endsWith("TestBeanGUI")) { continue;// Don't try to instantiate these } JMeterGUIComponent item; try { Class c = Class.forName(name); if (TestBean.class.isAssignableFrom(c)) { item = new TestBeanGUI(c); } else { item = (JMeterGUIComponent) c.newInstance(); } } catch (NoClassDefFoundError e) { log.warn("Missing jar? Could not create " + name + ". " + e); continue; } catch (Throwable e) { log.warn("Could not instantiate " + name, e); continue; } if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel())) { log.info("Skipping " + name); continue; } else { elementsToSkip.add(name); } Collection categories = item.getMenuCategories(); if (categories == null) { log.debug(name + " participates in no menus."); continue; } 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(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)); } } } catch (Exception e) { log.error("", e); }
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/ReportMenuFactory.java
Method name: void initializeMenus() Method name: void initializeMenus()
Number of AST nodes: 58 Number of AST nodes: 54
1
try {
1
try {
2
			List guiClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] {
2
			List guiClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] {
3
					JMeterGUIComponent.class, TestBean.class });
3
					JMeterGUIComponent.class, TestBean.class });
4
			timers = new LinkedList();
4
			
5
			controllers = new LinkedList();
5
controllers = new LinkedList();
6
			samplers = new LinkedList();
6
			configElements = new LinkedList();
7
			configElements = new LinkedList();
7
			listeners = new LinkedList();
8
			assertions = new LinkedList();
8
			postProcessors = new LinkedList();
9
			listeners = new LinkedList();
9
			preProcessors = new LinkedList();
10
			postProcessors = new LinkedList();
10
			tables = new LinkedList();
11
			preProcessors = new LinkedList();
11
			reportPage = new LinkedList();
12
			nonTestElements = new LinkedList();
12
			nonTestElements = new LinkedList();
13
			menuMap.put(TIMERS, timers);
13
			
14
			menuMap.put(ASSERTIONS, assertions);
15
			menuMap.put(CONFIG_ELEMENTS, configElements);
14
menuMap.put(CONFIG_ELEMENTS, configElements);
16
			menuMap.put(CONTROLLERS, controllers);
15
			menuMap.put(CONTROLLERS, controllers);
17
			menuMap.put(LISTENERS, listeners);
16
			menuMap.put(LISTENERS, listeners);
18
			menuMap.put(NON_TEST_ELEMENTS, nonTestElements);
17
			menuMap.put(NON_TEST_ELEMENTS, nonTestElements);
19
			menuMap.put(SAMPLERS, samplers);
18
			
20
			menuMap.put(POST_PROCESSORS, postProcessors);
19
menuMap.put(POST_PROCESSORS, postProcessors);
21
			menuMap.put(PRE_PROCESSORS, preProcessors);
20
			menuMap.put(PRE_PROCESSORS, preProcessors);
22
			
21
			menuMap.put(REPORT_PAGE, reportPage);
22
			menuMap.put(TABLES, tables);
23
Collections.sort(guiClasses);
23
			Collections.sort(guiClasses);
24
			Iterator iter = guiClasses.iterator();
24
			Iterator iter = guiClasses.iterator();
25
			while (iter.hasNext()) {
25
			while (iter.hasNext()) {
26
				String name = (String) iter.next();
26
				String name = (String) iter.next();
27
				/*
27
				/*
28
				 * JMeterTreeNode and TestBeanGUI are special GUI classes, and
28
				 * JMeterTreeNode and TestBeanGUI are special GUI classes, and
29
				 * aren't intended to be added to menus
29
				 * aren't intended to be added to menus
30
				 * 
30
				 * 
31
				 * TODO: find a better way of checking this
31
				 * TODO: find a better way of checking this
32
				 */
32
				 */
33
				if (name.endsWith("JMeterTreeNode") // $NON-NLS-1$
33
				if (name.endsWith("JMeterTreeNode")
34
                        || name.endsWith("TestBeanGUI")) {// $NON-NLS-1$
34
 || name.endsWith("TestBeanGUI")) {
35
					continue;// Don't try to instantiate these
35
					continue;// Don't try to instantiate these
36
				}
36
				}
37
				JMeterGUIComponent item;
37
				JMeterGUIComponent item;
38
				try {
38
				try {
39
					Class c = Class.forName(name);
39
					Class c = Class.forName(name);
40
					if (TestBean.class.isAssignableFrom(c)) {
40
					if (TestBean.class.isAssignableFrom(c)) {
41
						item = new TestBeanGUI(c);
41
						item = new TestBeanGUI(c);
42
					} else {
42
					} else {
43
						item = (JMeterGUIComponent) c.newInstance();
43
						item = (JMeterGUIComponent) c.newInstance();
44
					}
44
					}
45
				} catch (NoClassDefFoundError e) {
45
				} catch (NoClassDefFoundError e) {
46
					log.warn("Missing jar? Could not create " + name + ". " + e);
46
					log.warn("Missing jar? Could not create " + name + ". " + e);
47
					continue;
47
					continue;
48
				} catch (Throwable e) {
48
				} catch (Throwable e) {
49
					log.warn("Could not instantiate " + name, e);
49
					log.warn("Could not instantiate " + name, e);
50
					continue;
50
					continue;
51
				}
51
				}
52
				if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel())) {
52
				if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel())) {
53
					log.info("Skipping " + name);
53
					log.info("Skipping " + name);
54
					continue;
54
					continue;
55
				} else {
55
				} else {
56
					elementsToSkip.add(name);
56
					elementsToSkip.add(name);
57
				}
57
				}
58
				Collection categories = item.getMenuCategories();
58
				Collection categories = item.getMenuCategories();
59
				if (categories == null) {
59
				if (categories == null) {
60
					log.debug(name + " participates in no menus.");
60
					log.debug(name + " participates in no menus.");
61
					continue;
61
					continue;
62
				}
62
				}
63
				if (categories.contains(TIMERS)) {
64
					timers.add(new MenuInfo(item.getStaticLabel(), name));
65
				}
66
				if (categories.contains(POST_PROCESSORS)) {
63
				if (categories.contains(POST_PROCESSORS)) {
67
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
64
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
68
				}
65
				}
69
				if (categories.contains(PRE_PROCESSORS)) {
66
				if (categories.contains(PRE_PROCESSORS)) {
70
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
67
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
71
				}
68
				}
72
				if (categories.contains(CONTROLLERS)) {
69
				if (categories.contains(CONTROLLERS)) {
73
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
70
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
74
				}
71
				}
75
				if (categories.contains(SAMPLERS)) {
76
					samplers.add(new MenuInfo(item.getStaticLabel(), name));
77
				}
78
				if (categories.contains(NON_TEST_ELEMENTS)) {
72
				if (categories.contains(NON_TEST_ELEMENTS)) {
79
					nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
73
					nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
80
				}
74
				}
81
				if (categories.contains(LISTENERS)) {
75
				if (categories.contains(LISTENERS)) {
82
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
76
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
83
				}
77
				}
84
				if (categories.contains(CONFIG_ELEMENTS)) {
78
				if (categories.contains(CONFIG_ELEMENTS)) {
85
					configElements.add(new MenuInfo(item.getStaticLabel(), name));
79
					configElements.add(new MenuInfo(item.getStaticLabel(), name));
86
				}
80
				}
81
				if (categories.contains(TABLES)) {
82
					tables.add(new MenuInfo(item.getStaticLabel(), name));
83
				}
87
				if (categories.contains(ASSERTIONS)) {
84
				if (categories.contains(REPORT_PAGE)) {
88
					assertions.add(new MenuInfo(item.getStaticLabel(), name));
85
					reportPage.add(new MenuInfo(item.getStaticLabel(), name));
89
				}
86
				}
90
			}
87
			}
91
		} catch (IOException e) {
88
		} catch (Exception e) {
92
            log.error("", e);
89
			log.error("", e);
93
        }
90
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)170.5
Clones locationClones are in different classes
Number of node comparisons878
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements54
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)1478.2
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    1
    try
    Differences
    Expression1Expression2Difference
    java.io.IOExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    java.io.IOExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    java.io.IOExceptionjava.lang.ExceptionSUBCLASS_TYPE_MISMATCH
    1
    try
    2
    List guiClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] {JMeterGUIComponent.class, TestBean.class});
    2
    List guiClasses = ClassFinder.findClassesThatExtend(JMeterUtils.getSearchPaths(), new Class[] {JMeterGUIComponent.class, TestBean.class});
    3
    timers = new LinkedList();
    3
    timers = new LinkedList();
    3
    controllers = new LinkedList();
    Differences
    Expression1Expression2Difference
    timerscontrollersVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression timers is a field being modified, and thus it cannot be parameterized
    Expression controllers is a field being modified, and thus it cannot be parameterized
    3
    controllers = new LinkedList();
    4
    controllers = new LinkedList();
    4
    controllers = new LinkedList();
    6
    postProcessors = new LinkedList();
    Differences
    Expression1Expression2Difference
    controllerspostProcessorsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression controllers is a field being modified, and thus it cannot be parameterized
    Expression postProcessors is a field being modified, and thus it cannot be parameterized
    6
    postProcessors = new LinkedList();
    5
    samplers = new LinkedList();
    5
    samplers = new LinkedList();
    8
    tables = new LinkedList();
    Differences
    Expression1Expression2Difference
    samplerstablesVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression samplers is a field being modified, and thus it cannot be parameterized
    Expression tables is a field being modified, and thus it cannot be parameterized
    8
    tables = new LinkedList();
    6
    configElements = new LinkedList();
    6
    configElements = new LinkedList();
    9
    reportPage = new LinkedList();
    Differences
    Expression1Expression2Difference
    configElementsreportPageVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression configElements is a field being modified, and thus it cannot be parameterized
    Expression reportPage is a field being modified, and thus it cannot be parameterized
    9
    reportPage = new LinkedList();
    7
    assertions = new LinkedList();
                                                                  
    8
    listeners = new LinkedList();
    5
    listeners = new LinkedList();
    9
    postProcessors = new LinkedList();
    9
    postProcessors = new LinkedList();
    4
    configElements = new LinkedList();
    Differences
    Expression1Expression2Difference
    postProcessorsconfigElementsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression postProcessors is a field being modified, and thus it cannot be parameterized
    Expression configElements is a field being modified, and thus it cannot be parameterized
    4
    configElements = new LinkedList();
    10
    preProcessors = new LinkedList();
    7
    preProcessors = new LinkedList();
    11
    nonTestElements = new LinkedList();
    10
    nonTestElements = new LinkedList();
    12
    menuMap.put(TIMERS, timers);
    12
    menuMap.put(TIMERS, timers);
    12
    menuMap.put(CONTROLLERS, controllers);
    Differences
    Expression1Expression2Difference
    TIMERSCONTROLLERSVARIABLE_NAME_MISMATCH
    timerscontrollersVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression timers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression controllers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12
    menuMap.put(CONTROLLERS, controllers);
    13
    menuMap.put(ASSERTIONS, assertions);
    13
    menuMap.put(ASSERTIONS, assertions);
    13
    menuMap.put(LISTENERS, listeners);
    Differences
    Expression1Expression2Difference
    ASSERTIONSLISTENERSVARIABLE_NAME_MISMATCH
    assertionslistenersVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression listeners cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13
    menuMap.put(LISTENERS, listeners);
    14
    menuMap.put(CONFIG_ELEMENTS, configElements);
    14
    menuMap.put(CONFIG_ELEMENTS, configElements);
    14
    menuMap.put(NON_TEST_ELEMENTS, nonTestElements);
    Differences
    Expression1Expression2Difference
    CONFIG_ELEMENTSNON_TEST_ELEMENTSVARIABLE_NAME_MISMATCH
    configElementsnonTestElementsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    menuMap.put(NON_TEST_ELEMENTS, nonTestElements);
    15
    menuMap.put(CONTROLLERS, controllers);
    15
    menuMap.put(CONTROLLERS, controllers);
    15
    menuMap.put(POST_PROCESSORS, postProcessors);
    Differences
    Expression1Expression2Difference
    CONTROLLERSPOST_PROCESSORSVARIABLE_NAME_MISMATCH
    controllerspostProcessorsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression controllers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression postProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15
    menuMap.put(POST_PROCESSORS, postProcessors);
    16
    menuMap.put(LISTENERS, listeners);
    16
    menuMap.put(LISTENERS, listeners);
    16
    menuMap.put(PRE_PROCESSORS, preProcessors);
    Differences
    Expression1Expression2Difference
    LISTENERSPRE_PROCESSORSVARIABLE_NAME_MISMATCH
    listenerspreProcessorsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression listeners cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression preProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16
    menuMap.put(PRE_PROCESSORS, preProcessors);
    17
    menuMap.put(NON_TEST_ELEMENTS, nonTestElements);
    17
    menuMap.put(NON_TEST_ELEMENTS, nonTestElements);
    17
    menuMap.put(REPORT_PAGE, reportPage);
    Differences
    Expression1Expression2Difference
    NON_TEST_ELEMENTSREPORT_PAGEVARIABLE_NAME_MISMATCH
    nonTestElementsreportPageVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression reportPage cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17
    menuMap.put(REPORT_PAGE, reportPage);
    18
    menuMap.put(SAMPLERS, samplers);
    18
    menuMap.put(SAMPLERS, samplers);
    18
    menuMap.put(TABLES, tables);
    Differences
    Expression1Expression2Difference
    SAMPLERSTABLESVARIABLE_NAME_MISMATCH
    samplerstablesVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression samplers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression tables cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18
    menuMap.put(TABLES, tables);
    19
    menuMap.put(POST_PROCESSORS, postProcessors);
    19
    menuMap.put(POST_PROCESSORS, postProcessors);
    11
    menuMap.put(CONFIG_ELEMENTS, configElements);
    Differences
    Expression1Expression2Difference
    POST_PROCESSORSCONFIG_ELEMENTSVARIABLE_NAME_MISMATCH
    postProcessorsconfigElementsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression postProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    11
    menuMap.put(CONFIG_ELEMENTS, configElements);
    20
    menuMap.put(PRE_PROCESSORS, preProcessors);
                                                                                                
    21
    Collections.sort(guiClasses);
    19
    Collections.sort(guiClasses);
    22
    Iterator iter = guiClasses.iterator();
    20
    Iterator iter = guiClasses.iterator();
    23
    while (iter.hasNext())
    21
    while (iter.hasNext())
    24
    String name = (String)iter.next();
    22
    String name = (String)iter.next();
    25
    if (name.endsWith("JMeterTreeNode") || name.endsWith("TestBeanGUI"))
    23
    if (name.endsWith("JMeterTreeNode") || name.endsWith("TestBeanGUI"))
    26
    continue;
    24
    continue;
    27
    JMeterGUIComponent item;
    25
    JMeterGUIComponent item;
    28
    try
    26
    try
    29
    Class c = Class.forName(name);
    27
    Class c = Class.forName(name);
    30
    if (TestBean.class.isAssignableFrom(c))
    28
    if (TestBean.class.isAssignableFrom(c))
    31
    item = new TestBeanGUI(c);
    29
    item = new TestBeanGUI(c);
    else
    else
    32
    item = (JMeterGUIComponent)c.newInstance();
    30
    item = (JMeterGUIComponent)c.newInstance();
    33
    if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel()))
    31
    if (elementsToSkip.contains(name) || elementsToSkip.contains(item.getStaticLabel()))
    34
    log.info("Skipping " + name);
    32
    log.info("Skipping " + name);
    35
    continue;
    33
    continue;
    else
    else
    36
    elementsToSkip.add(name);
    34
    elementsToSkip.add(name);
    37
    Collection categories = item.getMenuCategories();
    35
    Collection categories = item.getMenuCategories();
    38
    if (categories == null)
    36
    if (categories == null)
    39
    log.debug(name + " participates in no menus.");
    37
    log.debug(name + " participates in no menus.");
    40
    continue;
    38
    continue;
    41
    if (categories.contains(TIMERS))
    41
    if (categories.contains(TIMERS))
    41
    if (categories.contains(PRE_PROCESSORS))
    Differences
    Expression1Expression2Difference
    TIMERSPRE_PROCESSORSVARIABLE_NAME_MISMATCH
    41
    if (categories.contains(PRE_PROCESSORS))
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    timerspreProcessorsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression timers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression preProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    43
    if (categories.contains(POST_PROCESSORS))
    39
    if (categories.contains(POST_PROCESSORS))
    44
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    45
    if (categories.contains(PRE_PROCESSORS))
    45
    if (categories.contains(PRE_PROCESSORS))
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    Differences
    Expression1Expression2Difference
    PRE_PROCESSORSNON_TEST_ELEMENTSVARIABLE_NAME_MISMATCH
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    46
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    46
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    preProcessorsnonTestElementsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression preProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    47
    if (categories.contains(CONTROLLERS))
    43
    if (categories.contains(CONTROLLERS))
    48
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    49
    if (categories.contains(SAMPLERS))
    49
    if (categories.contains(SAMPLERS))
    49
    if (categories.contains(CONFIG_ELEMENTS))
    Differences
    Expression1Expression2Difference
    SAMPLERSCONFIG_ELEMENTSVARIABLE_NAME_MISMATCH
    49
    if (categories.contains(CONFIG_ELEMENTS))
    50
    samplers.add(new MenuInfo(item.getStaticLabel(), name));
    50
    samplers.add(new MenuInfo(item.getStaticLabel(), name));
    50
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    samplersconfigElementsVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression samplers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    50
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    51
    if (categories.contains(NON_TEST_ELEMENTS))
    51
    if (categories.contains(NON_TEST_ELEMENTS))
    51
    if (categories.contains(TABLES))
    Differences
    Expression1Expression2Difference
    NON_TEST_ELEMENTSTABLESVARIABLE_NAME_MISMATCH
    51
    if (categories.contains(TABLES))
    52
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    52
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    nonTestElementstablesVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression tables cannot be parameterized, because it has dependencies to/from statements that will be extracted
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    53
    if (categories.contains(LISTENERS))
    47
    if (categories.contains(LISTENERS))
    54
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    55
    if (categories.contains(CONFIG_ELEMENTS))
    55
    if (categories.contains(CONFIG_ELEMENTS))
    53
    if (categories.contains(REPORT_PAGE))
    Differences
    Expression1Expression2Difference
    CONFIG_ELEMENTSREPORT_PAGEVARIABLE_NAME_MISMATCH
    53
    if (categories.contains(REPORT_PAGE))
    56
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    56
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    configElementsreportPageVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression reportPage cannot be parameterized, because it has dependencies to/from statements that will be extracted
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (36)
    Row Violation
    1Expression timers is a field being modified, and thus it cannot be parameterized
    2Expression controllers is a field being modified, and thus it cannot be parameterized
    3Expression controllers is a field being modified, and thus it cannot be parameterized
    4Expression postProcessors is a field being modified, and thus it cannot be parameterized
    5Expression samplers is a field being modified, and thus it cannot be parameterized
    6Expression tables is a field being modified, and thus it cannot be parameterized
    7Expression configElements is a field being modified, and thus it cannot be parameterized
    8Expression reportPage is a field being modified, and thus it cannot be parameterized
    9Expression postProcessors is a field being modified, and thus it cannot be parameterized
    10Expression configElements is a field being modified, and thus it cannot be parameterized
    11Expression timers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    12Expression controllers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression listeners cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    15Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    16Expression controllers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    17Expression postProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    18Expression listeners cannot be parameterized, because it has dependencies to/from statements that will be extracted
    19Expression preProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    20Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    21Expression reportPage cannot be parameterized, because it has dependencies to/from statements that will be extracted
    22Expression samplers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    23Expression tables cannot be parameterized, because it has dependencies to/from statements that will be extracted
    24Expression postProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    25Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    26Expression timers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    27Expression preProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    28Expression preProcessors cannot be parameterized, because it has dependencies to/from statements that will be extracted
    29Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    30Expression samplers cannot be parameterized, because it has dependencies to/from statements that will be extracted
    31Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    32Expression nonTestElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    33Expression tables cannot be parameterized, because it has dependencies to/from statements that will be extracted
    34Expression configElements cannot be parameterized, because it has dependencies to/from statements that will be extracted
    35Expression reportPage cannot be parameterized, because it has dependencies to/from statements that will be extracted
    36Clone fragment #1 returns variables categories, name, item , while Clone fragment #2 returns variables