CloneSet33


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
47220.984class_body_declarations[12]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
147440
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/filters/TokenFilter.java
247508
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/filters/TokenFilter.java
Next
Last
Clone Instance
1
Line Count
47
Source Line
440
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/filters/TokenFilter.java

private String from;

private String to;

private RegularExpression regularExpression;

private Substitution substitution;

private boolean initialized = false;

private String flags = "";

private int options;

private Regexp regexp;

/**
 * the from attribute
 * @param from the regex string
 */
public void setPattern(String from) {
  this.from = from;
}

/**
 * the to attribute
 * @param to the replacement string
 */
public void setReplace(String to) {
  this.to = to;
}

/**
 * @param flags the regex flags
 */
public void setFlags(String flags) {
  this.flags = flags;
}

private void initialize() {
  if (initialized) {
    return;
  }
  options = convertRegexOptions(flags);
  if (from == null) {
    throw new BuildException("Missing pattern in replaceregex");
  }
  regularExpression = new RegularExpression();
  regularExpression.setPattern(from);
  regexp = regularExpression.getRegexp(getProject());
  if (to == null) {
    to = "";
  }
  substitution = new Substitution();
  substitution.setExpression(to);
}


First
Previous
Clone Instance
2
Line Count
47
Source Line
508
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/filters/TokenFilter.java

private String from;

private String to;

private RegularExpression regularExpression;

private Substitution substitution;

private boolean initialized = false;

private String flags = "";

private int options;

private Regexp regexp;

/**
 * @param from the regex pattern
 */
public void setPattern(String from) {
  this.from = from;
}

/**
 * @param to the replacement string
 */
public void setReplace(String to) {
  this.to = to;
}

/**
 * @param flags the regex flags
 */
public void setFlags(String flags) {
  this.flags = flags;
}

private void initialize() {
  if (initialized) {
    return;
  }
  options = convertRegexOptions(flags);
  if (from == null) {
    throw new BuildException("Missing from in containsregex");
  }
  regularExpression = new RegularExpression();
  regularExpression.setPattern(from);
  regexp = regularExpression.getRegexp(getProject());
  if (to == null) {
    return;
  }
  substitution = new Substitution();
  substitution.setExpression(to);
}


Clone AbstractionParameter Count: 2Parameter Bindings

private String from;

private String to;

private RegularExpression regularExpression;

private Substitution substitution;

private boolean initialized = false;

private String flags = "";

private int options;

private Regexp regexp;

/**
         * @param from the regex pattern
         */
/**
         * the from attribute
         * @param from the regex string
         */
public void setPattern(String from) {
  this.from = from;
}

/**
         * @param to the replacement string
         */
/**
         * the to attribute
         * @param to the replacement string
         */
public void setReplace(String to) {
  this.to = to;
}

/**
         * @param flags the regex flags
         */
public void setFlags(String flags) {
  this.flags = flags;
}

private void initialize() {
  if (initialized) {
    return;
  }
  options = convertRegexOptions(flags);
  if (from == null) {
    throw new BuildException( [[#variablefdb0d00]]);
  }
  regularExpression = new RegularExpression();
  regularExpression.setPattern(from);
  regexp = regularExpression.getRegexp(getProject());
  if (to == null) {
     [[#variablefdd3ae0]]
  }
  substitution = new Substitution();
  substitution.setExpression(to);
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#fdb0d00]]
"Missing pattern in replaceregex" 
12[[#fdb0d00]]
"Missing from in containsregex" 
21[[#fdd3ae0]]
to = ""; 
22[[#fdd3ae0]]
return;