CloneSet98


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
24220.988class_body_declarations[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
128586
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java
224522
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
Next
Last
Clone Instance
1
Line Count
28
Source Line
586
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/scm/AntStarTeamCheckOut.java

/**
 * Look if the file should be checked out. Don't check it out if It fits
 * no include filters and It fits an exclude filter.
 *
 * @param pName the item name to look for being included.
 * @return whether the file should be checked out or not.
 */
protected boolean shouldCheckout(String pName) {
  boolean includeIt = matchPatterns(getIncludes(), pName);
  boolean excludeIt = matchPatterns(getExcludes(), pName);
  return (includeIt && !excludeIt);
}

/**
 * Convenient method to see if a string match a one pattern in given set
 * of space-separated patterns.
 *
 * @param patterns the space-separated list of patterns.
 * @param pName the name to look for matching.
 * @return whether the name match at least one pattern.
 */
protected boolean matchPatterns(String patterns, String pName) {
  if (patterns == null) {
    return false;
  }
  StringTokenizer exStr = new StringTokenizer(patterns, " ");
  while (exStr.hasMoreTokens()) {
    if (DirectoryScanner.match(exStr.nextToken(), pName)) {
      return true;
    }
  }
  return false;
}


First
Previous
Clone Instance
2
Line Count
24
Source Line
522
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java

///////////////////////////////////////////////////////////////
// INCLUDE-EXCLUDE processing
///////////////////////////////////////////////////////////////
/**
 * Look if the file should be processed by the task.
 * Don't process it if it fits no include filters or if
 * it fits an exclude filter.
 *
 * @param pName  the item name to look for being included.
 *
 * @return whether the file should be processed or not.
 */
protected boolean shouldProcess(String pName) {
  boolean includeIt = matchPatterns(getIncludes(), pName);
  boolean excludeIt = matchPatterns(getExcludes(), pName);
  return (includeIt && !excludeIt);
}

/**
 * Convenience method to see if a string match a one pattern
 * in given set of space-separated patterns.
 * @param patterns the space-separated list of patterns.
 * @param pName the name to look for matching.
 * @return whether the name match at least one pattern.
 */
protected boolean matchPatterns(String patterns, String pName) {
  if (patterns == null) {
    return false;
  }
  StringTokenizer exStr = new StringTokenizer(patterns, ",");
  while (exStr.hasMoreTokens()) {
    if (DirectoryScanner.match(exStr.nextToken(), pName)) {
      return true;
    }
  }
  return false;
}


Clone AbstractionParameter Count: 2Parameter Bindings

///////////////////////////////////////////////////////////////
// INCLUDE-EXCLUDE processing
///////////////////////////////////////////////////////////////
/**
     * Look if the file should be processed by the task.
     * Don't process it if it fits no include filters or if
     * it fits an exclude filter.
     *
     * @param pName  the item name to look for being included.
     *
     * @return whether the file should be processed or not.
     */
/**
     * Look if the file should be checked out. Don't check it out if It fits
     * no include filters and It fits an exclude filter.
     *
     * @param pName the item name to look for being included.
     * @return whether the file should be checked out or not.
     */
protected boolean  [[#variable13182c20]](String pName) {
  boolean includeIt = matchPatterns(getIncludes(), pName);
  boolean excludeIt = matchPatterns(getExcludes(), pName);
  return (includeIt && !excludeIt);
}

/**
     * Convenience method to see if a string match a one pattern
     * in given set of space-separated patterns.
     * @param patterns the space-separated list of patterns.
     * @param pName the name to look for matching.
     * @return whether the name match at least one pattern.
     */
/**
     * Convenient method to see if a string match a one pattern in given set
     * of space-separated patterns.
     *
     * @param patterns the space-separated list of patterns.
     * @param pName the name to look for matching.
     * @return whether the name match at least one pattern.
     */
protected boolean matchPatterns(String patterns, String pName) {
  if (patterns == null) {
    return false;
  }
  StringTokenizer exStr = new StringTokenizer(patterns,  [[#variable111db920]]);
  while (exStr.hasMoreTokens()) {
    if (DirectoryScanner.match(exStr.nextToken(), pName)) {
      return true;
    }
  }
  return false;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#13182c20]]
shouldCheckout 
12[[#13182c20]]
shouldProcess 
21[[#111db920]]
" " 
22[[#111db920]]
","