File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/InstantMessagingModel.java | File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/EmailModel.java | |||
Method name: void InstantMessagingModel(String, int)
|
Method name: void EmailModel(String, int)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | if (userId == null)↵ | 1 | if (address == null)↵ | |
2 | throw new IllegalArgumentException("userId == null");↵ | 2 | throw new IllegalArgumentException("address == null");↵ | |
3 | if (type < 0 || type >= NAMES.length)↵ | 3 | if (type < 0 || type >=NAMES.length)↵ | |
4 | throw new IllegalArgumentException("unsupported type= " + type);↵ | 4 | throw new IllegalArgumentException("type is not supported= " + type);↵ | |
5 | this.userId = userId;↵ | 5 | this.address = address;↵ | |
6 | this.type = type; | 6 |
| |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 16 |
Number of mapped statements | 6 |
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.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (userId == null) |
| 1 | if (address == null) | |||||||||||||||
2 | throw new IllegalArgumentException("userId == null"); |
| 2 | throw new IllegalArgumentException("address == null"); | |||||||||||||||
3 | if (type < 0 || type >= NAMES.length) | 3 | if (type < 0 || type >= NAMES.length) | ||||||||||||||||
4 | throw new IllegalArgumentException("unsupported type= " + type); |
| 4 | throw new IllegalArgumentException("type is not supported= " + type); | |||||||||||||||
5 | this.userId = userId; |
| 5 | this.address = address; | |||||||||||||||
6 | this.type = type; | 6 | this.type = type; |
Row | Violation |
---|---|
1 | Expression this.userId is a field being modified, and thus it cannot be parameterized |
2 | Expression this.address is a field being modified, and thus it cannot be parameterized |