IStructureValue value = context.getValue();
if ( value == null ) return;
Iterator<IStructureValue> it = value.getChildIterator(
ISemanticContext.CONTEXT_NODE_IDENTITY,
ISemanticContext.CONTEXT_NAMESPACE_CORE);
IStructureValue value = context.getValue();
if (value == null)
return;
Iterator<IStructureValue> it = value.getChildIterator(
ISemanticContext.CONTEXT_NODE_IDENTITY,
ISemanticContext.CONTEXT_NAMESPACE_CORE);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/context/ContactContextualProvider.java
|
|
File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/gui/context/ContactDetailsContextualProvider.java
|
Method name: void search(ISemanticContext, int, int)
|
|
Method name: void search(ISemanticContext, int, int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | IStructureValue value = context.getValue();↵ | | 1 | IStructureValue value = context.getValue();↵
|
2 | if ( value == null ) ↵ | | 2 | if (value == null)↵
|
3 | return;↵ | | 3 | return;↵
|
4 | ↵ | | |
|
5 | Iterator<IStructureValue> it = value.getChildIterator(↵ | | 4 | Iterator<IStructureValue> it = value.getChildIterator(↵
|
6 | ISemanticContext.CONTEXT_NODE_IDENTITY,↵ | | 5 | ISemanticContext.CONTEXT_NODE_IDENTITY,↵
|
7 | ISemanticContext.CONTEXT_NAMESPACE_CORE); | | 6 | ISemanticContext.CONTEXT_NAMESPACE_CORE);
|
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 | 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) | 0.6 |
Clone type | Type 1 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | IStructureValue value = context.getValue(); | | 1 | IStructureValue value = context.getValue(); |
2 | if (value == null) | | 2 | if (value == null) |
3 | | | 3 | |
4 | Iterator<IStructureValue> it = value.getChildIterator(ISemanticContext.CONTEXT_NODE_IDENTITY, ISemanticContext.CONTEXT_NAMESPACE_CORE); | | 4 | Iterator<IStructureValue> it = value.getChildIterator(ISemanticContext.CONTEXT_NODE_IDENTITY, ISemanticContext.CONTEXT_NAMESPACE_CORE); |
Precondition Violations (2)
Row |
Violation |
1 | Conditional return; |
2 | Conditional return; |