this(id, classname);
if ( attributes == null ) throw new IllegalArgumentException("attributes == null");
this.attributes = attributes;
this(id, contact);
if (name == null)
throw new IllegalArgumentException("name == null");
this.name = name;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core-api/src/main/java/org/columba/api/plugin/ExtensionMetadata.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/BasicModelPartial.java
|
Method name: void ExtensionMetadata(String, String, Map)
|
|
Method name: void BasicModelPartial(String, String, boolean)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | this(id, classname);↵ | | 1 | this(id, contact);↵
|
2 | ↵ | | |
|
3 | if ( attributes == null ) ↵ | | 2 | if (name == null)↵
|
4 | throw new IllegalArgumentException("attributes == null");↵ | | 3 | throw new IllegalArgumentException("name == null");↵
|
5 | ↵ | | |
|
6 | this.attributes = attributes; | | 4 | this.name = name;
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 8 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.4 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | this(id, contact); |
1 | this(id, classname); | | | |
2 | if (attributes == null) | | 2 | if (name == null) |
3 | throw new IllegalArgumentException("attributes == null"); | | 3 | throw new IllegalArgumentException("name == null"); |
| | | 4 | this.name = name; |
4 | this.attributes = attributes; | | | |
Precondition Violations (1)
Row |
Violation |
1 | Type java.util.Map<java.lang.String,java.lang.String> of variable attributes does not match with type java.lang.String of variable name |