Program: 82236
Project: 82236
Buggy source:
private void initFrom(String val){
  int begin=0;
  int offset=0;
  int last=val.length() - 1;
  String scaleString=null;
  StringBuilder unscaledBuffer;
  if (val == null) {
    throw new NullPointerException();
  }
  unscaledBuffer=new StringBuilder(val.length());
  if ((offset <= last) && (val.charAt(offset) == '+')) {
    offset++;
    begin++;
  }
  int counter=0;
  boolean wasNonZero=false;
  for (; (offset <= last) && (val.charAt(offset) != '.') && (val.charAt(offset) != 'e')&& (val.charAt(offset) != 'E'); offset++) {
    if (!wasNonZero) {
      if (val.charAt(offset) == '0') {
        counter++;
      }
 else {
        wasNonZero=true;
      }
    }
  }
  unscaledBuffer.append(val,begin,offset);
  if ((offset <= last) && (val.charAt(offset) == '.')) {
    offset++;
    begin=offset;
    for (; (offset <= last) && (val.charAt(offset) != 'e') && (val.charAt(offset) != 'E'); offset++) {
      if (!wasNonZero) {
        if (val.charAt(offset) == '0') {
          counter++;
        }
 else {
          wasNonZero=true;
        }
      }
    }
    scale=offset - begin;
    unscaledBuffer.append(val,begin,offset);
  }
 else {
    scale=0;
  }
  if ((offset <= last) && ((val.charAt(offset) == 'e') || (val.charAt(offset) == 'E'))) {
    offset++;
    begin=offset;
    if ((offset <= last) && (val.charAt(offset) == '+')) {
      offset++;
      if ((offset <= last) && (val.charAt(offset) != '-')) {
        begin++;
      }
    }
    scaleString=val.substring(begin,last + 1);
    scale=scale - Integer.parseInt(scaleString);
    if (scale != (int)scale) {
      throw new NumberFormatException("String_Node_Str");
    }
  }
  String unscaled=unscaledBuffer.toString();
  if (unscaled.length() < 16) {
    smallValue=parseUnscaled(unscaled);
    if (Double.isNaN(smallValue)) {
      throw new NumberFormatException("String_Node_Str" + val + "String_Node_Str");
    }
    bitLength=bitLength(smallValue);
  }
 else {
    setUnscaledValue(new BigInteger(unscaled));
  }
  precision=unscaledBuffer.length() - counter;
  if (unscaledBuffer.charAt(0) == '-') {
    precision--;
  }
}

Fixed version (ground truth):
private void initFrom(String val){
  int begin=0;
  int offset=0;
  int last=val.length() - 1;
  String scaleString=null;
  StringBuilder unscaledBuffer;
  unscaledBuffer=new StringBuilder(val.length());
  if ((offset <= last) && (val.charAt(offset) == '+')) {
    offset++;
    begin++;
  }
  int counter=0;
  boolean wasNonZero=false;
  for (; (offset <= last) && (val.charAt(offset) != '.') && (val.charAt(offset) != 'e')&& (val.charAt(offset) != 'E'); offset++) {
    if (!wasNonZero) {
      if (val.charAt(offset) == '0') {
        counter++;
      }
 else {
        wasNonZero=true;
      }
    }
  }
  unscaledBuffer.append(val,begin,offset);
  if ((offset <= last) && (val.charAt(offset) == '.')) {
    offset++;
    begin=offset;
    for (; (offset <= last) && (val.charAt(offset) != 'e') && (val.charAt(offset) != 'E'); offset++) {
      if (!wasNonZero) {
        if (val.charAt(offset) == '0') {
          counter++;
        }
 else {
          wasNonZero=true;
        }
      }
    }
    scale=offset - begin;
    unscaledBuffer.append(val,begin,offset);
  }
 else {
    scale=0;
  }
  if ((offset <= last) && ((val.charAt(offset) == 'e') || (val.charAt(offset) == 'E'))) {
    offset++;
    begin=offset;
    if ((offset <= last) && (val.charAt(offset) == '+')) {
      offset++;
      if ((offset <= last) && (val.charAt(offset) != '-')) {
        begin++;
      }
    }
    scaleString=val.substring(begin,last + 1);
    scale=scale - Integer.parseInt(scaleString);
    if (scale != (int)scale) {
      throw new NumberFormatException("String_Node_Str");
    }
  }
  String unscaled=unscaledBuffer.toString();
  if (unscaled.length() < 16) {
    smallValue=parseUnscaled(unscaled);
    if (Double.isNaN(smallValue)) {
      throw new NumberFormatException("String_Node_Str" + val + "String_Node_Str");
    }
    bitLength=bitLength(smallValue);
  }
 else {
    setUnscaledValue(new BigInteger(unscaled));
  }
  precision=unscaledBuffer.length() - counter;
  for (int i=0; i < unscaledBuffer.length(); ++i) {
    char ch=unscaledBuffer.charAt(i);
    if (ch != '-' && ch != '0') {
      break;
    }
    --precision;
  }
}