CloneSet1193


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
15210.997executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
115420
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
216435
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java
Clone Instance
1
Line Count
15
Source Line
420
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java

                                                             {
                                                // we need to delete this resource if this operation wants to override existing resources
                                                for (int i = 0, max = resources.length; i < max; i++) {
                                                        IResource destinationResource = ResourcesPlugin.getWorkspace().getRoot().findMember(destPath.append(resources[i].getName()));
                                                        if (destinationResource != null) {
                                                                if (force) {
                                                                        deleteResource(destinationResource, IResource.KEEP_HISTORY);
                                                                }
                                                                else   {
                                                                        throw new JavaModelException(new JavaModelStatus(
                                                                                IJavaModelStatusConstants.NAME_COLLISION, 
                                                                                Messages.bind(Messages.status_nameCollision, destinationResource.getFullPath().toString())));
                                                                }
                                                        }
                                                }
                                                moveResources(resources, destPath);
                                                             }


Clone Instance
2
Line Count
16
Source Line
435
Source File
plugins/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/CopyResourceElementsOperation.java

                                               {
                                                // we need to delete this resource if this operation wants to override existing resources
                                                for (int i = 0, max = resources.length; i < max; i++) {
                                                        IResource destinationResource = ResourcesPlugin.getWorkspace().getRoot().findMember(destPath.append(resources[i].getName()));
                                                        if (destinationResource != null) {
                                                                if (force) {
                                                                        // we need to delete this resource if this operation wants to override existing resources
                                                                        deleteResource(destinationResource, IResource.KEEP_HISTORY);
                                                                }
                                                                else   {
                                                                        throw new JavaModelException(new JavaModelStatus(
                                                                                IJavaModelStatusConstants.NAME_COLLISION, 
                                                                                Messages.bind(Messages.status_nameCollision, destinationResource.getFullPath().toString())));
                                                                }
                                                        }
                                                }
                                                copyResources(resources, destPath);
                                               }


Clone AbstractionParameter Count: 1Parameter Bindings

{
  // we need to delete this resource if this operation wants to override existing resources
  for (int i = 0, max = resources.length; i < max; i++) {
    IResource destinationResource = ResourcesPlugin.getWorkspace().getRoot().findMember(destPath.append(resources[i].getName()));
    if (destinationResource != null) {
      if (force) {
        // we need to delete this resource if this operation wants to override existing resources
        deleteResource(destinationResource, IResource.KEEP_HISTORY);
      }
      else {
        throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.NAME_COLLISION, Messages.bind(Messages.status_nameCollision, destinationResource.getFullPath().toString())));
      }
    }
  }
   [[#variablebbfee360]](resources, destPath);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#bbfee360]]
moveResources 
12[[#bbfee360]]
copyResources