Program: 60261
Project: 60261
Buggy source:
private static byte[] textToNumericFormatV6(String ipString){
  if (!ipString.contains("String_Node_Str")) {
    return null;
  }
  if (ipString.contains("String_Node_Str")) {
    return null;
  }
  if (ipString.contains("String_Node_Str")) {
    ipString=convertDottedQuadToHex(ipString);
    if (ipString == null) {
      return null;
    }
  }
  ByteBuffer rawBytes=ByteBuffer.allocate(2 * IPV6_PART_COUNT);
  int partsHi=0;
  int partsLo=0;
  String[] addressHalves=ipString.split("String_Node_Str",2);
  if (!addressHalves[0].equals("String_Node_Str")) {
    String[] parts=addressHalves[0].split("String_Node_Str",IPV6_PART_COUNT);
    try {
      for (int i=0; i < parts.length; i++) {
        if (parts[i].equals("String_Node_Str")) {
          return null;
        }
        int piece=Integer.parseInt(parts[i],16);
        rawBytes.putShort(2 * i,(short)piece);
      }
      partsHi=parts.length;
    }
 catch (    NumberFormatException ex) {
      return null;
    }
  }
 else {
    partsHi=1;
  }
  if (addressHalves.length > 1) {
    if (!addressHalves[1].equals("String_Node_Str")) {
      String[] parts=addressHalves[1].split("String_Node_Str",IPV6_PART_COUNT);
      try {
        for (int i=0; i < parts.length; i++) {
          int partsIndex=parts.length - i - 1;
          if (parts[partsIndex].equals("String_Node_Str")) {
            return null;
          }
          int piece=Integer.parseInt(parts[partsIndex],16);
          int bytesIndex=2 * (IPV6_PART_COUNT - i - 1);
          rawBytes.putShort(bytesIndex,(short)piece);
        }
        partsLo=parts.length;
      }
 catch (      NumberFormatException ex) {
        return null;
      }
    }
 else {
      partsLo=1;
    }
  }
  int totalParts=partsHi + partsLo;
  if (totalParts > IPV6_PART_COUNT) {
    return null;
  }
  if (addressHalves.length == 1 && totalParts != IPV6_PART_COUNT) {
    return null;
  }
  return rawBytes.array();
}

Fixed version (ground truth):
private static byte[] textToNumericFormatV6(String ipString){
  if (!ipString.contains("String_Node_Str")) {
    return null;
  }
  if (ipString.contains("String_Node_Str")) {
    return null;
  }
  if (ipString.contains("String_Node_Str")) {
    ipString=convertDottedQuadToHex(ipString);
    if (ipString == null) {
      return null;
    }
  }
  ByteBuffer rawBytes=ByteBuffer.allocate(2 * IPV6_PART_COUNT);
  int partsHi=0;
  int partsLo=0;
  String[] addressHalves=ipString.split("String_Node_Str",2);
  if (!addressHalves[0].equals("String_Node_Str")) {
    String[] parts=addressHalves[0].split("String_Node_Str",IPV6_PART_COUNT);
    try {
      for (int i=0; i < parts.length; i++) {
        rawBytes.putShort(2 * i,parseHextet(parts[i]));
      }
      partsHi=parts.length;
    }
 catch (    NumberFormatException ex) {
      return null;
    }
  }
 else {
    partsHi=1;
  }
  if (addressHalves.length > 1) {
    if (!addressHalves[1].equals("String_Node_Str")) {
      String[] parts=addressHalves[1].split("String_Node_Str",IPV6_PART_COUNT);
      try {
        for (int i=0; i < parts.length; i++) {
          int partsIndex=parts.length - i - 1;
          int bytesIndex=2 * (IPV6_PART_COUNT - i - 1);
          rawBytes.putShort(bytesIndex,parseHextet(parts[partsIndex]));
        }
        partsLo=parts.length;
      }
 catch (      NumberFormatException ex) {
        return null;
      }
    }
 else {
      partsLo=1;
    }
  }
  int totalParts=partsHi + partsLo;
  if (totalParts > IPV6_PART_COUNT) {
    return null;
  }
  if (addressHalves.length == 1 && totalParts != IPV6_PART_COUNT) {
    return null;
  }
  return rawBytes.array();
}