Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); } } return actions;
Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor)); } } return actions;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLActionBarContributor.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLActionBarContributor.java
Method name: Collection generateCreateChildActions(Collection, ISelection) Method name: Collection generateCreateSiblingActions(Collection, ISelection)
Number of AST nodes: 5 Number of AST nodes: 5
1
Collection<IAction> actions = new ArrayList<IAction>();
1
Collection<IAction> actions = new ArrayList<IAction>();
2
    if (descriptors != null)
2
    if (descriptors != null)
3
    {
3
    {
4
      for (Object descriptor : descriptors)
4
      for (Object descriptor : descriptors)
5
      {
5
      {
6
        actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
6
        actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
7
      }
7
      }
8
    }
8
    }
9
    return actions;
9
    return actions;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.1
Clones locationClones are declared in the same class
Number of node comparisons1