if (!acceptsNull) {
throw new IllegalArgumentException("Null parameter not allowed");
}
value = null;
if (!acceptsNull) {
throw new IllegalArgumentException("Null is not allowed");
}
text = null;
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testbeans/gui/WrapperEditor.java
|
|
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testbeans/gui/WrapperEditor.java
|
Method name: void setAsText(String)
|
|
Method name: void setValue(Object)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (!acceptsNull) {↵ | | 1 | if (!acceptsNull) {↵
|
2 | throw new IllegalArgumentException("Null parameter not allowed");↵ | | 2 | throw new IllegalArgumentException("Null is not allowed");↵
|
3 | }↵ | | 3 | }↵
|
4 | value = null; | | 4 | text = null;
|
See real code fragment |
|
See real code fragment |
Summary
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.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 6 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | if (!acceptsNull) | | 5 | if (!acceptsNull) |
6 | throw new IllegalArgumentException("Null parameter not allowed"); | | 6 | throw new IllegalArgumentException("Null is not allowed"); |
7 | value = null; | | 7 | text = null; |
Precondition Violations (0)
Row |
Violation |