@Override protected ImageDescriptor objectToImageDescriptor(Object object) { ((Action)action).setHoverImageDescriptor (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/ctool16/MatchByName"))); ((Action)action).setDisabledImageDescriptor (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/dtool16/MatchByName"))); return ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/etool16/MatchByName")); } /** * Match the command for this action */ @Override protected Command createActionCommand(EditingDomain editingDomain, final Collection<?> collection) { return editingDomain.createCommand(DelegateCommand.class, new CommandParameter(null, null, collection));
@Override protected ImageDescriptor objectToImageDescriptor(Object object) { ((Action)action).setHoverImageDescriptor (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/ctool16/MatchByType"))); ((Action)action).setDisabledImageDescriptor (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/dtool16/MatchByType"))); return ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/etool16/MatchByType")); } /** * Match the command for this action */ @Override protected Command createActionCommand(EditingDomain editingDomain, final Collection<?> collection) { return editingDomain.createCommand(DelegateCommand.class, new CommandParameter(null, null, collection));
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/mapping/action/NameMatchMappingAction.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/action/TypeMatchMappingAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
@Override
1
@Override
2
  protected ImageDescriptor objectToImageDescriptor(Object object)
2
  protected ImageDescriptor objectToImageDescriptor(Object object)
3
  {
3
  {
4
    ((Action)action).setHoverImageDescriptor
4
    ((Action)action).setHoverImageDescriptor
5
      (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/ctool16/MatchByName")));
5
      (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/ctool16/MatchByType")));
6
    ((Action)action).setDisabledImageDescriptor
6
    ((Action)action).setDisabledImageDescriptor
7
      (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/dtool16/MatchByName")));
7
      (ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/dtool16/MatchByType")));
8
    return
8
    return
9
      ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/etool16/MatchByName"));
9
      ExtendedImageRegistry.getInstance().getImageDescriptor(MappingPlugin.getPlugin().getImage("full/etool16/MatchByType"));
10
  }
10
  }
11
  /**
11
  /**
12
   * Match the command for this action
12
   * Match the command for this action
13
   */
13
   */
14
  @Override
14
  @Override
15
  protected Command createActionCommand(EditingDomain editingDomain, final Collection<?> collection)
15
  protected Command createActionCommand(EditingDomain editingDomain, final Collection<?> collection)
16
  {
16
  {
17
    return editingDomain.createCommand(DelegateCommand.class, new CommandParameter(null, null, collection));
17
    return editingDomain.createCommand(DelegateCommand.class, new CommandParameter(null, null, collection));
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.0
Clones location
Number of node comparisons0