String testClassName = node.getPropertyAsString(TestElement.TEST_CLASS); String guiClassName = node.getPropertyAsString(TestElement.GUI_CLASS); try { Class testClass; if (testClassName.equals("")) { // $NON-NLS-1$ testClass = node.getClass(); } else { testClass = Class.forName(testClassName); } Class guiClass = null; if (!guiClassName.equals("")) { // $NON-NLS-1$ guiClass = Class.forName(guiClassName); } return getGui(node, guiClass, testClass); } catch (ClassNotFoundException e) { log.error("Could not get GUI for " + node, e); return null; }
String testClassName = node.getPropertyAsString(TestElement.TEST_CLASS); String guiClassName = node.getPropertyAsString(TestElement.GUI_CLASS); try { Class testClass; if (testClassName.equals("")) { testClass = node.getClass(); } else { testClass = Class.forName(testClassName); } Class guiClass = null; if (!guiClassName.equals("")) { guiClass = Class.forName(guiClassName); } return getGui(node, guiClass, testClass); } catch (ClassNotFoundException e) { log.error("Could not get GUI for " + node, e); return null; }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/GuiPackage.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/ReportGuiPackage.java
Method name: JMeterGUIComponent getGui(TestElement) Method name: JMeterGUIComponent getGui(TestElement)
Number of AST nodes: 11 Number of AST nodes: 11
1
String testClassName = node.getPropertyAsString(TestElement.TEST_CLASS);
1
String testClassName = node.getPropertyAsString(TestElement.TEST_CLASS);
2
		String guiClassName = node.getPropertyAsString(TestElement.GUI_CLASS);
2
		String guiClassName = node.getPropertyAsString(TestElement.GUI_CLASS);
3
		try {
3
		try {
4
			Class testClass;
4
			Class testClass;
5
			if (testClassName.equals("")) { // $NON-NLS-1$
5
			if (testClassName.equals("")) {
6
				testClass = node.getClass();
6
				testClass = node.getClass();
7
			} else {
7
			} else {
8
				testClass = Class.forName(testClassName);
8
				testClass = Class.forName(testClassName);
9
			}
9
			}
10
			Class guiClass = null;
10
			Class guiClass = null;
11
			if (!guiClassName.equals("")) { // $NON-NLS-1$
11
			if (!guiClassName.equals("")) {
12
				guiClass = Class.forName(guiClassName);
12
				guiClass = Class.forName(guiClassName);
13
			}
13
			}
14
			return getGui(node, guiClass, testClass);
14
			return getGui(node, guiClass, testClass);
15
		} catch (ClassNotFoundException e) {
15
		} catch (ClassNotFoundException e) {
16
			log.error("Could not get GUI for " + node, e);
16
			log.error("Could not get GUI for " + node, e);
17
			return null;
17
			return null;
18
		}
18
		}
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 comparisons35
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements11
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)7.3
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    String testClassName = node.getPropertyAsString(TestElement.TEST_CLASS);
    1
    String testClassName = node.getPropertyAsString(TestElement.TEST_CLASS);
    2
    String guiClassName = node.getPropertyAsString(TestElement.GUI_CLASS);
    2
    String guiClassName = node.getPropertyAsString(TestElement.GUI_CLASS);
    3
    try
    3
    try
    4
    Class testClass;
    4
    Class testClass;
    5
    if (testClassName.equals(""))
    5
    if (testClassName.equals(""))
    6
    testClass = node.getClass();
    6
    testClass = node.getClass();
    else
    else
    7
    testClass = Class.forName(testClassName);
    7
    testClass = Class.forName(testClassName);
    8
    Class guiClass = null;
    8
    Class guiClass = null;
    9
    if (!guiClassName.equals(""))
    9
    if (!guiClassName.equals(""))
    10
    guiClass = Class.forName(guiClassName);
    10
    guiClass = Class.forName(guiClassName);
    11
    return getGui(node, guiClass, testClass);
    11
    return getGui(node, guiClass, testClass);
    Precondition Violations (0)
    Row Violation