File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureValue.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureValue.java | |||
Method name: void setByteArray(String, String, byte[])
|
Method name: void setDate(String, String, Date)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵ | 1 | final IAttributeType t = getType().getAttribute(theName, theNamespace);↵ | |
2 | if (!t.getBaseType().equals(BASETYPE.BINARY)) {↵ | 2 | if (!t.getBaseType().equals(BASETYPE.DATE)) {↵ | |
3 | throw new IllegalArgumentException("attribute <" + theName + ","↵ | 3 | throw new IllegalArgumentException("attribute <" + theName + ","↵ | |
4 | + theNamespace + "> is not of type binary");↵ | 4 | + theNamespace + "> is not of type Date");↵ | |
5 | }↵ | 5 | }↵ | |
6 | setObject(theName, theNamespace, value); | 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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 8 |
Number of mapped statements | 4 |
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) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | final IAttributeType t = getType().getAttribute(theName, theNamespace); | 1 | final IAttributeType t = getType().getAttribute(theName, theNamespace); | ||||||||||||
2 | if (!t.getBaseType().equals(BASETYPE.BINARY)) |
| 2 | if (!t.getBaseType().equals(BASETYPE.DATE)) | |||||||||||
3 | throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type binary"); |
| 3 | throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Date"); | |||||||||||
4 | setObject(theName, theNamespace, value); |
| 4 | setObject(theName, theNamespace, value); |
Row | Violation |
---|---|
1 | Type byte[] of variable value does not match with type java.util.Date of variable value |