Program: 79371
Project: 79371
Buggy source:
/** 
 * Parses a string eg '5s' or '20m 22.123ms', returning the number of milliseconds it represents;  -1 on blank or never or off or false. Assumes unit is millisections if no unit is specified.
 * @throws NumberFormatException if cannot be parsed (or if null)
 */
public static double parseElapsedTimeAsDouble(final String timeStringOrig){
  String timeString=timeStringOrig;
  if (timeString == null)   throw new NumberFormatException("String_Node_Str");
  try {
    double d=Double.parseDouble(timeString);
    return d;
  }
 catch (  NumberFormatException e) {
    try {
      timeString=timeString.trim();
      String s=Strings.getLastWord(timeString).toLowerCase();
      timeString=timeString.substring(0,timeString.length() - s.length()).trim();
      int i=0;
      while (s.length() > i) {
        char c=s.charAt(i);
        if (c == '.' || Character.isDigit(c))         i++;
 else         break;
      }
      String num=s.substring(0,i);
      if (i == 0) {
        if (Strings.isNonBlank(timeString)) {
          num=Strings.getLastWord(timeString).toLowerCase();
          timeString=timeString.substring(0,timeString.length() - num.length()).trim();
        }
      }
 else {
        s=s.substring(i);
      }
      long multiplier=0;
      if (num.length() == 0) {
        if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str"))         return -1;
        throw new NumberFormatException("String_Node_Str" + s + "String_Node_Str");
      }
      if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=1;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=1000;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=60 * 1000;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=60 * 60 * 1000;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str"))       multiplier=24 * 60 * 60* 1000;
 else       throw new NumberFormatException("String_Node_Str" + s + "String_Node_Str"+ timeStringOrig+ "String_Node_Str");
      double d=Double.parseDouble(num);
      double dd=0;
      if (timeString.length() > 0) {
        dd=parseElapsedTimeAsDouble(timeString);
        if (dd == -1) {
          throw new NumberFormatException("String_Node_Str" + timeString + "String_Node_Str"+ num+ "String_Node_Str"+ s+ "String_Node_Str");
        }
      }
      return d * multiplier + dd;
    }
 catch (    Exception ex) {
      if (ex instanceof NumberFormatException)       throw ex;
      log.trace("String_Node_Str",ex);
      throw new NumberFormatException("String_Node_Str" + timeStringOrig + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Parses a string eg '5s' or '20m 22.123ms', returning the number of milliseconds it represents;  -1 on blank or never or off or false. Assumes unit is millisections if no unit is specified.
 * @throws NumberFormatException if cannot be parsed (or if null)
 */
public static double parseElapsedTimeAsDouble(final String timeStringOrig){
  String timeString=timeStringOrig;
  if (timeString == null)   throw new NumberFormatException("String_Node_Str");
  try {
    double d=Double.parseDouble(timeString);
    return d;
  }
 catch (  NumberFormatException e) {
    try {
      timeString=timeString.trim();
      String s=Strings.getLastWord(timeString).toLowerCase();
      timeString=timeString.substring(0,timeString.length() - s.length()).trim();
      int i=0;
      while (s.length() > i) {
        char c=s.charAt(i);
        if (c == '.' || Character.isDigit(c))         i++;
 else         break;
      }
      String num=s.substring(0,i);
      if (i == 0) {
        if (Strings.isNonBlank(timeString)) {
          num=Strings.getLastWord(timeString).toLowerCase();
          timeString=timeString.substring(0,timeString.length() - num.length()).trim();
        }
      }
 else {
        s=s.substring(i);
      }
      long multiplier=0;
      if (num.length() == 0) {
        if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str"))         return -1;
        throw new NumberFormatException("String_Node_Str" + s + "String_Node_Str");
      }
      if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=1;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=1000;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=60 * 1000;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str")|| s.equalsIgnoreCase("String_Node_Str"))       multiplier=60 * 60 * 1000;
 else       if (s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str") || s.equalsIgnoreCase("String_Node_Str"))       multiplier=24 * 60 * 60* 1000;
 else       throw new NumberFormatException("String_Node_Str" + s + "String_Node_Str"+ timeStringOrig+ "String_Node_Str");
      double d=Double.parseDouble(num);
      double dd=0;
      if (timeString.length() > 0) {
        dd=parseElapsedTimeAsDouble(timeString);
        if (dd == -1) {
          throw new NumberFormatException("String_Node_Str" + timeString + "String_Node_Str"+ num+ "String_Node_Str"+ s+ "String_Node_Str");
        }
      }
      return d * multiplier + dd;
    }
 catch (    Exception ex) {
      if (ex instanceof NumberFormatException)       throw (NumberFormatException)ex;
      log.trace("String_Node_Str",ex);
      throw new NumberFormatException("String_Node_Str" + timeStringOrig + "String_Node_Str");
    }
  }
}