DefaultConfiguration cfgUsername = new DefaultConfiguration("user"); // $NON-NLS-1$
cfgUsername.setValue(_username);
config.addChild(cfgUsername);
DefaultConfiguration cfgPassword = new DefaultConfiguration("password"); // $NON-NLS-1$
cfgPassword.setValue(getPassword());
config.addChild(cfgPassword);
TestElement item = (TestElement) iter.next();
TestSuite ts = new TestSuite(item.getClass().getName());
ts.addTest(new JMeterTest("runTestElement", item));
suite.addTest(ts);
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java
|
|
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/junit/JMeterTest.java
|
Method name: ResourceLimitingJdbcDataSource initPool(String)
|
|
Method name: Test suiteTestElements()
|
Number of AST nodes: 6
|
|
Number of AST nodes: 4
|
|
1 | DefaultConfiguration cfgUsername = new DefaultConfiguration("user"); // $NON-NLS-1$↵ | | |
|
2 | cfgUsername.setValue(_username);↵ | | |
|
3 | config.addChild(cfgUsername);↵ | | |
|
4 | DefaultConfiguration cfgPassword = new DefaultConfiguration("password"); // $NON-NLS-1$↵ | | |
|
5 | cfgPassword.setValue(getPassword());↵ | | |
|
6 | config.addChild(cfgPassword↵ | | 1 | TestElement item = (TestElement) iter.next();↵
|
| | | 2 | TestSuite ts = new TestSuite(item.getClass().getName());↵
|
| | | 3 | ts.addTest(new JMeterTest("runTestElement", item));↵
|
7 | ); | | 4 | suite.addTest(ts);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 24 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 0 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Unknown type |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
Precondition Violations (0)
Row |
Violation |