Program: 27667
Project: 27667
Buggy source:
double normalizeNumber(LiteralToken token){
  String value=token.value;
  SourceRange location=token.location;
  int length=value.length();
  Preconditions.checkState(length > 0);
  Preconditions.checkState(value.charAt(0) != '-' && value.charAt(0) != '+');
  if (value.charAt(0) == '.') {
    return Double.valueOf('0' + value);
  }
 else   if (value.charAt(0) == '0' && length > 1) {
switch (value.charAt(1)) {
case '.':
case 'e':
case 'E':
      return Double.valueOf(value);
case 'b':
case 'B':
{
      if (!isEs6Mode()) {
        errorReporter.warning(BINARY_NUMBER_LITERAL_WARNING,sourceName,lineno(token.location.start),charno(token.location.start));
      }
      long v=0;
      int c=1;
      while (++c < length) {
        v=(v * 2) + binarydigit(value.charAt(c));
      }
      return Double.valueOf(v);
    }
case 'o':
case 'O':
{
    if (!isEs6Mode()) {
      errorReporter.warning(OCTAL_NUMBER_LITERAL_WARNING,sourceName,lineno(token.location.start),charno(token.location.start));
    }
    long v=0;
    int c=1;
    while (++c < length) {
      v=(v * 8) + octaldigit(value.charAt(c));
    }
    return Double.valueOf(v);
  }
case 'x':
case 'X':
{
  long v=0;
  int c=1;
  while (++c < length) {
    v=(v * 0x10) + hexdigit(value.charAt(c));
  }
  return Double.valueOf(v);
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
errorReporter.warning(INVALID_ES5_STRICT_OCTAL,sourceName,lineno(location.start),charno(location.start));
if (!inStrictContext()) {
long v=0;
int c=0;
while (++c < length) {
v=(v * 8) + octaldigit(value.charAt(c));
}
return Double.valueOf(v);
}
 else {
return Double.valueOf(value);
}
default :
errorReporter.error(INVALID_NUMBER_LITERAL,sourceName,lineno(location.start),charno(location.start));
return 0;
}
}
 else {
return Double.valueOf(value);
}
}

Fixed version (ground truth):
double normalizeNumber(LiteralToken token){
  String value=token.value;
  SourceRange location=token.location;
  int length=value.length();
  Preconditions.checkState(length > 0);
  Preconditions.checkState(value.charAt(0) != '-' && value.charAt(0) != '+');
  if (value.charAt(0) == '.') {
    return Double.valueOf('0' + value);
  }
 else   if (value.charAt(0) == '0' && length > 1) {
switch (value.charAt(1)) {
case '.':
case 'e':
case 'E':
      return Double.valueOf(value);
case 'b':
case 'B':
{
      if (!isEs6Mode()) {
        errorReporter.warning(BINARY_NUMBER_LITERAL_WARNING,sourceName,lineno(token.location.start),charno(token.location.start));
      }
      double v=0;
      int c=1;
      while (++c < length) {
        v=(v * 2) + binarydigit(value.charAt(c));
      }
      return v;
    }
case 'o':
case 'O':
{
    if (!isEs6Mode()) {
      errorReporter.warning(OCTAL_NUMBER_LITERAL_WARNING,sourceName,lineno(token.location.start),charno(token.location.start));
    }
    double v=0;
    int c=1;
    while (++c < length) {
      v=(v * 8) + octaldigit(value.charAt(c));
    }
    return v;
  }
case 'x':
case 'X':
{
  double v=0;
  int c=1;
  while (++c < length) {
    v=(v * 0x10) + hexdigit(value.charAt(c));
  }
  return v;
}
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
errorReporter.warning(INVALID_ES5_STRICT_OCTAL,sourceName,lineno(location.start),charno(location.start));
if (!inStrictContext()) {
double v=0;
int c=0;
while (++c < length) {
v=(v * 8) + octaldigit(value.charAt(c));
}
return v;
}
 else {
return Double.valueOf(value);
}
default :
errorReporter.error(INVALID_NUMBER_LITERAL,sourceName,lineno(location.start),charno(location.start));
return 0;
}
}
 else {
return Double.valueOf(value);
}
}