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);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are in different classes
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.6
    Clone typeType 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
    return;
    3
    return;
    3
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    3
    return;
    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
    1Conditional return;
    2Conditional return;