File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureType.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureType.java | |||
Method name: IStructureType addChild(String, String)
|
Method name: IAttributeType addAttribute(String, String)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | final IStructureType type = new StructureType(theName, theNamespace);↵ | 1 | final IAttributeType attr = new AttributeType(theName, theNamespace);↵ | |
2 | typeMap.put(new Name(theName, theNamespace), type);↵ | 2 | attributeMap.put(new Name(theName, theNamespace), attr);↵ | |
3 | typeList.add(type);↵ | 3 | attributeList.add(attr);↵ | |
4 | return type; | 4 | return attr; | |
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.0 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 16 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 1 | final IAttributeType attr = new AttributeType(theName, theNamespace); | ||||||||||||||||||||||
1 | final IStructureType type = new StructureType(theName, theNamespace); |
| | ||||||||||||||||||||||
|
| 2 | attributeMap.put(new Name(theName, theNamespace), attr); | ||||||||||||||||||||||
2 | typeMap.put(new Name(theName, theNamespace), type); |
| | ||||||||||||||||||||||
3 | typeList.add(type); |
| 3 | attributeList.add(attr); | |||||||||||||||||||||
|
| 4 | return attr; | ||||||||||||||||||||||
4 | return type; |
| |
Row | Violation |
---|---|
1 | Unmatched statement final IAttributeType attr=new AttributeType(theName,theNamespace); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Unmatched statement final IStructureType type=new StructureType(theName,theNamespace); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
3 | Unmatched statement attributeMap.put(new Name(theName,theNamespace),attr); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
4 | Unmatched statement typeMap.put(new Name(theName,theNamespace),type); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Type org.columba.core.context.base.api.IStructureType of variable type does not match with type org.columba.core.context.base.api.IAttributeType of variable attr |
6 | Type java.util.List<org.columba.core.context.base.api.IStructureType> of variable typeList does not match with type java.util.List<org.columba.core.context.base.api.IAttributeType> of variable attributeList |
7 | Unmatched return attr; |
8 | Unmatched return type; |