File path: /jakarta-jmeter-2.3.2/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java | File path: /jakarta-jmeter-2.3.2/src/junit/org/apache/jmeter/protocol/java/control/gui/JUnitTestSamplerGui.java | |||
Method name: void configure(TestElement)
|
Method name: void configure(TestElement)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (sampler.getError().length() > 0) {↵ | 1 | if (sampler.getSuccessCode().length() > 0) {↵ | |
2 | errorMsg.setText(sampler.getError());↵ | 2 | successCode.setText(sampler.getSuccessCode());↵ | |
3 | } else {↵ | 3 | } else {↵ | |
4 | errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg")); //$NON-NLS-1$↵ | 4 | successCode.setText(JMeterUtils.getResString("junit_success_default_code")); //$NON-NLS-1$↵ | |
5 | }↵ | 5 | }↵ | |
6 | if (sampler.getErrorCode().length() > 0) {↵ | 6 | if (sampler.getSuccess().length() > 0) {↵ | |
7 | errorCode.setText(sampler.getErrorCode());↵ | 7 | successMsg.setText(sampler.getSuccess());↵ | |
8 | } else {↵ | 8 | } else {↵ | |
9 | errorCode.setText(JMeterUtils.getResString("junit_error_default_code")); //$NON-NLS-1$↵ | 9 | successMsg.setText(JMeterUtils.getResString("junit_success_default_msg")); //$NON-NLS-1$↵ | |
10 | } | 10 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 28 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 15.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20 | if (sampler.getError().length() > 0) |
| 11 | if (sampler.getSuccess().length() > 0) | |||||||||||||||
21 | errorMsg.setText(sampler.getError()); |
| 12 | successMsg.setText(sampler.getSuccess()); | |||||||||||||||
else | else | ||||||||||||||||||
22 | errorMsg.setText(JMeterUtils.getResString("junit_error_default_msg")); |
| 13 | successMsg.setText(JMeterUtils.getResString("junit_success_default_msg")); | |||||||||||||||
23 | if (sampler.getErrorCode().length() > 0) |
| 8 | if (sampler.getSuccessCode().length() > 0) | |||||||||||||||
24 | errorCode.setText(sampler.getErrorCode()); |
| 9 | successCode.setText(sampler.getSuccessCode()); | |||||||||||||||
else | | ||||||||||||||||||
|
| 10 | successCode.setText(JMeterUtils.getResString("junit_success_default_code")); | ||||||||||||||||
25 | errorCode.setText(JMeterUtils.getResString("junit_error_default_code")); |
| |
Row | Violation |
---|---|
1 | Expression sampler.getError() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression sampler.getSuccess() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression sampler.getErrorCode() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression sampler.getSuccessCode() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Unmatched statement successCode.setText(JMeterUtils.getResString("junit_success_default_code")); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
6 | Unmatched statement errorCode.setText(JMeterUtils.getResString("junit_error_default_code")); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |