Program: 44969
Project: 44969
Buggy source:
public static String format(long size,int format){
  if (size < 0)   return "String_Node_Str";
  String digitsString;
  String unitString;
  boolean unitLong=(format & UNIT_LONG) != 0;
  boolean unitShort=(format & UNIT_SHORT) != 0;
  boolean noUnit=!(unitLong || unitShort);
  boolean digitsShort=(format & DIGITS_SHORT) != 0;
  boolean roundToKb=(format & ROUND_TO_KB) != 0;
  if ((format & DIGITS_FULL) != 0) {
synchronized (DECIMAL_FORMAT) {
      digitsString=DECIMAL_FORMAT.format(size);
    }
    unitString=unitLong ? BYTES : unitShort ? B : "String_Node_Str";
  }
 else {
    if (size < KB_1) {
      if (roundToKb) {
        digitsString=size == 0 ? "String_Node_Str" : "String_Node_Str";
        unitString=noUnit ? "String_Node_Str" : KB;
      }
 else {
        digitsString="String_Node_Str" + size;
        unitString=unitLong ? (size <= 1 ? BYTE : BYTES) : unitShort ? B : "String_Node_Str";
      }
    }
 else     if (size < KB_10 && !digitsShort) {
      int nKB=(int)size / KB_1;
      digitsString=nKB + DECIMAL_SEPARATOR + (("String_Node_Str" + (size - nKB * KB_1) / (float)KB_1).charAt(2));
      unitString=noUnit ? "String_Node_Str" : KB;
    }
 else     if (size < MB_1) {
      digitsString="String_Node_Str" + size / KB_1;
      unitString=noUnit ? "String_Node_Str" : KB;
    }
 else     if (size < MB_10 && !digitsShort) {
      int nMB=(int)size / MB_1;
      digitsString=nMB + DECIMAL_SEPARATOR + (("String_Node_Str" + (size - nMB * MB_1) / (float)MB_1).charAt(2));
      unitString=noUnit ? "String_Node_Str" : MB;
    }
 else     if (size < GB_1) {
      digitsString="String_Node_Str" + size / MB_1;
      unitString=noUnit ? "String_Node_Str" : MB;
    }
 else     if (size < GB_10 && !digitsShort) {
      long nGB=size / GB_1;
      digitsString=nGB + DECIMAL_SEPARATOR + (("String_Node_Str" + (size - nGB * GB_1) / (float)GB_1).charAt(2));
      unitString=noUnit ? "String_Node_Str" : GB;
    }
 else     if (size < TB_1) {
      digitsString="String_Node_Str" + size / GB_1;
      unitString=noUnit ? "String_Node_Str" : GB;
    }
 else     if (size < TB_10 && !digitsShort) {
      long nTB=size / TB_1;
      digitsString=nTB + DECIMAL_SEPARATOR + (("String_Node_Str" + (size - nTB * TB_1) / (float)TB_1).charAt(2));
      unitString=noUnit ? "String_Node_Str" : TB;
    }
 else {
      digitsString="String_Node_Str" + size / TB_1;
      unitString=noUnit ? "String_Node_Str" : TB;
    }
  }
  if ((format & UNIT_SPEED) != 0)   unitString=Translator.get(SPEED_KEY,unitString);
  return digitsString + ((format & INCLUDE_SPACE) != 0 ? "String_Node_Str" : "String_Node_Str") + unitString;
}

Fixed version (ground truth):
/** 
 * Returns a String representation of the given byte size.
 * @param size the size to format
 * @param format format bitmask, see constant fields for allowed values
 * @return a String representation of the given byte size
 */
public static String format(long size,int format){
  if (size < 0)   return "String_Node_Str";
  String digitsString;
  String unitString;
  boolean unitLong=(format & UNIT_LONG) != 0;
  boolean unitShort=(format & UNIT_SHORT) != 0;
  boolean noUnit=!(unitLong || unitShort);
  boolean digitsShort=(format & DIGITS_SHORT) != 0;
  boolean roundToKb=(format & ROUND_TO_KB) != 0;
  if (size < KB_1) {
    if (roundToKb) {
      digitsString=size == 0 ? "String_Node_Str" : "String_Node_Str";
      unitString=noUnit ? "String_Node_Str" : KB;
    }
 else {
      digitsString="String_Node_Str" + size;
      unitString=unitLong ? (size <= 1 ? BYTE : BYTES) : unitShort ? B : "String_Node_Str";
    }
  }
 else   if ((format & DIGITS_FULL) != 0) {
synchronized (DECIMAL_FORMAT) {
      digitsString=DECIMAL_FORMAT.format(size);
    }
    unitString=unitLong ? BYTES : unitShort ? B : "String_Node_Str";
  }
 else {
    if (size < KB_10 && !digitsShort) {
      int nKB=(int)size / KB_1;
      digitsString=nKB + DECIMAL_SEPARATOR + (int)((size - nKB * KB_1) / (float)KB_1 * 10);
      unitString=noUnit ? "String_Node_Str" : KB;
    }
 else     if (size < MB_1) {
      digitsString="String_Node_Str" + size / KB_1;
      unitString=noUnit ? "String_Node_Str" : KB;
    }
 else     if (size < MB_10 && !digitsShort) {
      int nMB=(int)size / MB_1;
      digitsString=nMB + DECIMAL_SEPARATOR + (int)((size - nMB * MB_1) / (float)MB_1 * 10);
      unitString=noUnit ? "String_Node_Str" : MB;
    }
 else     if (size < GB_1) {
      digitsString="String_Node_Str" + size / MB_1;
      unitString=noUnit ? "String_Node_Str" : MB;
    }
 else     if (size < GB_10 && !digitsShort) {
      long nGB=size / GB_1;
      digitsString=nGB + DECIMAL_SEPARATOR + (int)((size - nGB * GB_1) / (double)GB_1 * 10);
      unitString=noUnit ? "String_Node_Str" : GB;
    }
 else     if (size < TB_1) {
      digitsString="String_Node_Str" + size / GB_1;
      unitString=noUnit ? "String_Node_Str" : GB;
    }
 else     if (size < TB_10 && !digitsShort) {
      long nTB=size / TB_1;
      digitsString=nTB + DECIMAL_SEPARATOR + (int)((size - nTB * TB_1) / (double)TB_1 * 10);
      unitString=noUnit ? "String_Node_Str" : TB;
    }
 else {
      digitsString="String_Node_Str" + size / TB_1;
      unitString=noUnit ? "String_Node_Str" : TB;
    }
  }
  if ((format & UNIT_SPEED) != 0)   unitString=Translator.get(SPEED_KEY,unitString);
  return digitsString + ((format & INCLUDE_SPACE) != 0 ? "String_Node_Str" : "String_Node_Str") + unitString;
}