CloneSet79


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
40230.973class_body_declarations[4]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
14053
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/DirSet.java
24052
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/FileSet.java
Next
Last
Clone Instance
1
Line Count
40
Source Line
53
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/DirSet.java

/**
 * Return a DirSet that has the same basedir and same patternsets
 * as this one.
 * @return the cloned dirset.
 */
public Object clone() {
  if (isReference()) {
    return ((DirSet) getRef(getProject())).clone();
  }
  else {
    return super.clone();
  }
}

/**
 * Fulfill the ResourceCollection contract.
 * @return an Iterator of Resources.
 * @since Ant 1.7
 */
public Iterator iterator() {
  if (isReference()) {
    return ((DirSet) getRef(getProject())).iterator();
  }
  return new FileResourceIterator(getDir(getProject()), getDirectoryScanner(getProject()).getIncludedDirectories());
}

/**
 * Fulfill the ResourceCollection contract.
 * @return number of elements as int.
 * @since Ant 1.7
 */
public int size() {
  if (isReference()) {
    return ((DirSet) getRef(getProject())).size();
  }
  return getDirectoryScanner(getProject()).getIncludedDirsCount();
}

/**
 * Always returns true.
 * @return true indicating that all elements will be FileResources.
 * @since Ant 1.7
 */
public boolean isFilesystemOnly() {
  return true;
}


First
Previous
Clone Instance
2
Line Count
40
Source Line
52
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/types/FileSet.java

/**
 * Return a FileSet that has the same basedir and same patternsets
 * as this one.
 * @return the cloned fileset
 */
public Object clone() {
  if (isReference()) {
    return ((FileSet) getRef(getProject())).clone();
  }
  else {
    return super.clone();
  }
}

/**
 * Fulfill the ResourceCollection contract.
 * @return an Iterator of Resources.
 * @since Ant 1.7
 */
public Iterator iterator() {
  if (isReference()) {
    return ((FileSet) getRef(getProject())).iterator();
  }
  return new FileResourceIterator(getDir(getProject()), getDirectoryScanner(getProject()).getIncludedFiles());
}

/**
 * Fulfill the ResourceCollection contract.
 * @return number of elements as int.
 * @since Ant 1.7
 */
public int size() {
  if (isReference()) {
    return ((FileSet) getRef(getProject())).size();
  }
  return getDirectoryScanner(getProject()).getIncludedFilesCount();
}

/**
 * Always returns true.
 * @return true indicating that all elements will be FileResources.
 * @since Ant 1.7
 */
public boolean isFilesystemOnly() {
  return true;
}


Clone AbstractionParameter Count: 3Parameter Bindings

/**
     * Return a DirSet that has the same basedir and same patternsets
     * as this one.
     * @return the cloned dirset.
     */
/**
     * Return a FileSet that has the same basedir and same patternsets
     * as this one.
     * @return the cloned fileset
     */
public Object clone() {
  if (isReference()) {
    return (( [[#variable111daa20]]) getRef(getProject())).clone();
  }
  else {
    return super.clone();
  }
}

/**
     * Fulfill the ResourceCollection contract.
     * @return an Iterator of Resources.
     * @since Ant 1.7
     */
public Iterator iterator() {
  if (isReference()) {
    return (( [[#variable111daa20]]) getRef(getProject())).iterator();
  }
  return new FileResourceIterator(getDir(getProject()), getDirectoryScanner(getProject()). [[#variable111da9c0]]());
}

/**
     * Fulfill the ResourceCollection contract.
     * @return number of elements as int.
     * @since Ant 1.7
     */
public int size() {
  if (isReference()) {
    return (( [[#variable111daa20]]) getRef(getProject())).size();
  }
  return getDirectoryScanner(getProject()). [[#variable131c2500]]();
}

/**
     * Always returns true.
     * @return true indicating that all elements will be FileResources.
     * @since Ant 1.7
     */
public boolean isFilesystemOnly() {
  return true;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#111daa20]]
DirSet 
12[[#111daa20]]
FileSet 
21[[#111da9c0]]
getIncludedDirectories 
22[[#111da9c0]]
getIncludedFiles 
31[[#131c2500]]
getIncludedDirsCount 
32[[#131c2500]]
getIncludedFilesCount