Program: 105780
Project: 105780
Buggy source:
private void checkPodAttributes(long podId,String podName,long zoneId,String gateway,String cidr,String startIp,String endIp,String allocationStateStr,boolean checkForDuplicates,boolean skipGatewayOverlapCheck){
  if (checkForDuplicates) {
    if (validPod(podName,zoneId)) {
      throw new InvalidParameterValueException("String_Node_Str" + podName + "String_Node_Str"+ zoneId+ "String_Node_Str");
    }
  }
  String cidrAddress;
  long cidrSize;
  if (NetUtils.isValidCIDR(cidr)) {
    cidrAddress=getCidrAddress(cidr);
    cidrSize=getCidrSize(cidr);
  }
 else {
    throw new InvalidParameterValueException("String_Node_Str" + podName);
  }
  if (startIp != null || endIp != null) {
    checkIpRange(startIp,endIp,cidrAddress,cidrSize);
  }
  checkOverlapPublicIpRange(zoneId,startIp,endIp);
  if (!NetUtils.isValidIp(gateway)) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  if (!NetUtils.getCidrSubNet(gateway,cidrSize).equalsIgnoreCase(NetUtils.getCidrSubNet(cidrAddress,cidrSize))) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  if (!skipGatewayOverlapCheck) {
    if (NetUtils.ipRangesOverlap(startIp,endIp,gateway,gateway)) {
      throw new InvalidParameterValueException("String_Node_Str");
    }
  }
  String checkPodCIDRs=_configDao.getValue("String_Node_Str");
  if (checkPodCIDRs == null || checkPodCIDRs.trim().isEmpty() || Boolean.parseBoolean(checkPodCIDRs)) {
    checkPodCidrSubnets(zoneId,podId,cidr);
  }
  if (allocationStateStr != null && !allocationStateStr.isEmpty()) {
    try {
      Grouping.AllocationState.valueOf(allocationStateStr);
    }
 catch (    IllegalArgumentException ex) {
      throw new InvalidParameterValueException("String_Node_Str" + allocationStateStr + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void checkPodAttributes(long podId,String podName,long zoneId,String gateway,String cidr,String startIp,String endIp,String allocationStateStr,boolean checkForDuplicates,boolean skipGatewayOverlapCheck){
  if (checkForDuplicates) {
    if (validPod(podName,zoneId)) {
      throw new InvalidParameterValueException("String_Node_Str" + podName + "String_Node_Str"+ zoneId+ "String_Node_Str");
    }
  }
  String cidrAddress;
  long cidrSize;
  if (NetUtils.isValidCIDR(cidr)) {
    cidrAddress=getCidrAddress(cidr);
    cidrSize=getCidrSize(cidr);
  }
 else {
    throw new InvalidParameterValueException("String_Node_Str" + podName);
  }
  checkIpRange(startIp,endIp,cidrAddress,cidrSize);
  checkOverlapPublicIpRange(zoneId,startIp,endIp);
  if (!NetUtils.isValidIp(gateway)) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  if (!NetUtils.getCidrSubNet(gateway,cidrSize).equalsIgnoreCase(NetUtils.getCidrSubNet(cidrAddress,cidrSize))) {
    throw new InvalidParameterValueException("String_Node_Str");
  }
  if (!skipGatewayOverlapCheck) {
    if (NetUtils.ipRangesOverlap(startIp,endIp,gateway,gateway)) {
      throw new InvalidParameterValueException("String_Node_Str");
    }
  }
  String checkPodCIDRs=_configDao.getValue("String_Node_Str");
  if (checkPodCIDRs == null || checkPodCIDRs.trim().isEmpty() || Boolean.parseBoolean(checkPodCIDRs)) {
    checkPodCidrSubnets(zoneId,podId,cidr);
  }
  if (allocationStateStr != null && !allocationStateStr.isEmpty()) {
    try {
      Grouping.AllocationState.valueOf(allocationStateStr);
    }
 catch (    IllegalArgumentException ex) {
      throw new InvalidParameterValueException("String_Node_Str" + allocationStateStr + "String_Node_Str");
    }
  }
}