CloneSet1072


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
19201.000class_body_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
119200
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/EditVariableEntryDialog.java
219549
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
Clone Instance
1
Line Count
19
Source Line
200
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/EditVariableEntryDialog.java

        /**
         * Takes a path and replaces the beginning with a variable name
         * (if the beginning matches with the variables value)
         */
        private IPath modifyPath(IPath path, String varName) {
                if (varName == null || path == null) {
                        return null;
                }
                if (path.isEmpty()) {
                        return new Path(varName);
                }

                IPath varPath = JavaCore.getClasspathVariable(varName);
                if (varPath != null) {
                        if (varPath.isPrefixOf(path)) {
                                path = path.removeFirstSegments(varPath.segmentCount());
                        }
                        else   {
                                path = new Path(path.lastSegment());
                        }
                }
                else   {
                        path = new Path(path.lastSegment());
                }
                return new Path(varName).append(path);
        }


Clone Instance
2
Line Count
19
Source Line
549
Source File
plugins/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java

        /**
         * Takes a path and replaces the beginning with a variable name
         * (if the beginning matches with the variables value)
         */
        private IPath modifyPath(IPath path, String varName) {
                if (varName == null || path == null) {
                        return null;
                }
                if (path.isEmpty()) {
                        return new Path(varName);
                }

                IPath varPath = JavaCore.getClasspathVariable(varName);
                if (varPath != null) {
                        if (varPath.isPrefixOf(path)) {
                                path = path.removeFirstSegments(varPath.segmentCount());
                        }
                        else   {
                                path = new Path(path.lastSegment());
                        }
                }
                else   {
                        path = new Path(path.lastSegment());
                }
                return new Path(varName).append(path);
        }


Clone AbstractionParameter Count: 0Parameter Bindings

/**
         * Takes a path and replaces the beginning with a variable name
         * (if the beginning matches with the variables value)
         */
private IPath modifyPath(IPath path, String varName) {
  if (varName == null || path == null) {
    return null;
  }
  if (path.isEmpty()) {
    return new Path(varName);
  }
  IPath varPath = JavaCore.getClasspathVariable(varName);
  if (varPath != null) {
    if (varPath.isPrefixOf(path)) {
      path = path.removeFirstSegments(varPath.segmentCount());
    }
    else {
      path = new Path(path.lastSegment());
    }
  }
  else {
    path = new Path(path.lastSegment());
  }
  return new Path(varName).append(path);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None