Program: 6212
Project: 6212
Buggy source:
public static FloatingDecimal readJavaFormatString(String in) throws NumberFormatException {
  boolean isNegative=false;
  boolean signSeen=false;
  int decExp;
  char c;
  parseNumber:   try {
    in=in.trim();
    int l=in.length();
    if (l == 0)     throw new NumberFormatException("String_Node_Str");
    int i=0;
switch (c=in.charAt(i)) {
case '-':
      isNegative=true;
case '+':
    i++;
  signSeen=true;
}
c=in.charAt(i);
if (c == 'N' || c == 'I') {
boolean potentialNaN=false;
char targetChars[]=null;
if (c == 'N') {
  targetChars=notANumber;
  potentialNaN=true;
}
 else {
  targetChars=infinity;
}
int j=0;
while (i < l && j < targetChars.length) {
  if (in.charAt(i) == targetChars[j]) {
    i++;
    j++;
  }
 else   break parseNumber;
}
if ((j == targetChars.length) && (i == l)) {
  return (potentialNaN ? new FloatingDecimal(false,0,notANumber,notANumber.length,true) : new FloatingDecimal(isNegative,0,infinity,notANumber.length,true));
}
 else {
  break parseNumber;
}
}
 else if (c == '0') {
if (l > i + 1) {
  char ch=in.charAt(i + 1);
  if (ch == 'x' || ch == 'X')   throw new NumberFormatException("String_Node_Str");
}
}
char[] digits=new char[l];
int nDigits=0;
boolean decSeen=false;
int decPt=0;
int nLeadZero=0;
int nTrailZero=0;
digitLoop: while (i < l) {
switch (c=in.charAt(i)) {
case '0':
  if (nDigits > 0) {
    nTrailZero+=1;
  }
 else {
    nLeadZero+=1;
  }
break;
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
while (nTrailZero > 0) {
digits[nDigits++]='0';
nTrailZero-=1;
}
digits[nDigits++]=c;
break;
case '.':
if (decSeen) {
throw new NumberFormatException("String_Node_Str");
}
decPt=i;
if (signSeen) {
decPt-=1;
}
decSeen=true;
break;
default :
break digitLoop;
}
i++;
}
if (nDigits == 0) {
digits=zero;
nDigits=1;
if (nLeadZero == 0) {
break parseNumber;
}
}
if (decSeen) {
decExp=decPt - nLeadZero;
}
 else {
decExp=nDigits + nTrailZero;
}
if ((i < l) && (((c=in.charAt(i)) == 'e') || (c == 'E'))) {
int expSign=1;
int expVal=0;
int reallyBig=Integer.MAX_VALUE / 10;
boolean expOverflow=false;
switch (in.charAt(++i)) {
case '-':
expSign=-1;
case '+':
i++;
}
int expAt=i;
expLoop: while (i < l) {
if (expVal >= reallyBig) {
expOverflow=true;
}
switch (c=in.charAt(i++)) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
expVal=expVal * 10 + ((int)c - (int)'0');
continue;
default :
i--;
break expLoop;
}
}
int expLimit=bigDecimalExponent + nDigits + nTrailZero;
if (expOverflow || (expVal > expLimit)) {
decExp=expSign * expLimit;
}
 else {
decExp=decExp + expSign * expVal;
}
if (i == expAt) break parseNumber;
}
if (i < l && ((i != l - 1) || (in.charAt(i) != 'f' && in.charAt(i) != 'F' && in.charAt(i) != 'd' && in.charAt(i) != 'D'))) {
break parseNumber;
}
return new FloatingDecimal(isNegative,decExp,digits,nDigits,false);
}
 catch (StringIndexOutOfBoundsException e) {
}
throw new NumberFormatException("String_Node_Str" + in + "String_Node_Str");
}

Fixed version (ground truth):
public static VMFloatingDecimal readJavaFormatString(String in) throws NumberFormatException {
  boolean isNegative=false;
  boolean signSeen=false;
  int decExp;
  char c;
  parseNumber:   try {
    in=in.trim();
    int l=in.length();
    if (l == 0)     throw new NumberFormatException("String_Node_Str");
    int i=0;
switch (c=in.charAt(i)) {
case '-':
      isNegative=true;
case '+':
    i++;
  signSeen=true;
}
c=in.charAt(i);
if (c == 'N' || c == 'I') {
boolean potentialNaN=false;
char targetChars[]=null;
if (c == 'N') {
  targetChars=notANumber;
  potentialNaN=true;
}
 else {
  targetChars=infinity;
}
int j=0;
while (i < l && j < targetChars.length) {
  if (in.charAt(i) == targetChars[j]) {
    i++;
    j++;
  }
 else   break parseNumber;
}
if ((j == targetChars.length) && (i == l)) {
  return (potentialNaN ? new VMFloatingDecimal(false,0,notANumber,notANumber.length,true) : new VMFloatingDecimal(isNegative,0,infinity,notANumber.length,true));
}
 else {
  break parseNumber;
}
}
 else if (c == '0') {
if (l > i + 1) {
  char ch=in.charAt(i + 1);
  if (ch == 'x' || ch == 'X')   throw new NumberFormatException("String_Node_Str");
}
}
char[] digits=new char[l];
int nDigits=0;
boolean decSeen=false;
int decPt=0;
int nLeadZero=0;
int nTrailZero=0;
digitLoop: while (i < l) {
switch (c=in.charAt(i)) {
case '0':
  if (nDigits > 0) {
    nTrailZero+=1;
  }
 else {
    nLeadZero+=1;
  }
break;
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
while (nTrailZero > 0) {
digits[nDigits++]='0';
nTrailZero-=1;
}
digits[nDigits++]=c;
break;
case '.':
if (decSeen) {
throw new NumberFormatException("String_Node_Str");
}
decPt=i;
if (signSeen) {
decPt-=1;
}
decSeen=true;
break;
default :
break digitLoop;
}
i++;
}
if (nDigits == 0) {
digits=zero;
nDigits=1;
if (nLeadZero == 0) {
break parseNumber;
}
}
if (decSeen) {
decExp=decPt - nLeadZero;
}
 else {
decExp=nDigits + nTrailZero;
}
if ((i < l) && (((c=in.charAt(i)) == 'e') || (c == 'E'))) {
int expSign=1;
int expVal=0;
int reallyBig=Integer.MAX_VALUE / 10;
boolean expOverflow=false;
switch (in.charAt(++i)) {
case '-':
expSign=-1;
case '+':
i++;
}
int expAt=i;
expLoop: while (i < l) {
if (expVal >= reallyBig) {
expOverflow=true;
}
switch (c=in.charAt(i++)) {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
expVal=expVal * 10 + ((int)c - (int)'0');
continue;
default :
i--;
break expLoop;
}
}
int expLimit=bigDecimalExponent + nDigits + nTrailZero;
if (expOverflow || (expVal > expLimit)) {
decExp=expSign * expLimit;
}
 else {
decExp=decExp + expSign * expVal;
}
if (i == expAt) break parseNumber;
}
if (i < l && ((i != l - 1) || (in.charAt(i) != 'f' && in.charAt(i) != 'F' && in.charAt(i) != 'd' && in.charAt(i) != 'D'))) {
break parseNumber;
}
return new VMFloatingDecimal(isNegative,decExp,digits,nDigits,false);
}
 catch (StringIndexOutOfBoundsException e) {
}
throw new NumberFormatException("String_Node_Str" + in + "String_Node_Str");
}