CloneSet71


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
21201.000statement_sequence[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
12148
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java
22161
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java
Next
Last
Clone Instance
1
Line Count
21
Source Line
48
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/JakartaOroRegexp.java

// translate \1 to $1 so that the Perl5Substitution will work
StringBuffer subst = new StringBuffer();
for (int i = 0; i < argument.length(); i++) {
  char c = argument.charAt(i);
  if (c == '$') {
    subst.append('\\');
    subst.append('$');
  }
  else
    if (c == '\\') {
      if ( ++i < argument.length()) {
        c = argument.charAt(i);
        int value = Character.digit(c, 10);
        if (value > -1) {
          subst.append("$").append(value);
        }
        else {
          subst.append(c);
        }
      }
      else {
        // XXX - should throw an exception instead?
        subst.append('\\');
      }
    }
    else {
      subst.append(c);
    }
}


First
Previous
Clone Instance
2
Line Count
21
Source Line
61
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/org/apache/tools/ant/util/regexp/Jdk14RegexpRegexp.java

// translate \1 to $(1) so that the Matcher will work
StringBuffer subst = new StringBuffer();
for (int i = 0; i < argument.length(); i++) {
  char c = argument.charAt(i);
  if (c == '$') {
    subst.append('\\');
    subst.append('$');
  }
  else
    if (c == '\\') {
      if ( ++i < argument.length()) {
        c = argument.charAt(i);
        int value = Character.digit(c, 10);
        if (value > -1) {
          subst.append("$").append(value);
        }
        else {
          subst.append(c);
        }
      }
      else {
        // XXX - should throw an exception instead?
        subst.append('\\');
      }
    }
    else {
      subst.append(c);
    }
}


Clone AbstractionParameter Count: 0Parameter Bindings

// translate \1 to $(1) so that the Matcher will work
// translate \1 to $1 so that the Perl5Substitution will work
StringBuffer subst = new StringBuffer();
for (int i = 0; i < argument.length(); i++) {
  char c = argument.charAt(i);
  if (c == '$') {
    subst.append('\\');
    subst.append('$');
  }
  else
    if (c == '\\') {
      if ( ++i < argument.length()) {
        c = argument.charAt(i);
        int value = Character.digit(c, 10);
        if (value > -1) {
          subst.append("$").append(value);
        }
        else {
          subst.append(c);
        }
      }
      else {
        // XXX - should throw an exception instead?
        subst.append('\\');
      }
    }
    else {
      subst.append(c);
    }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
None