Program: 115632
Project: 115632
Buggy source:
/** 
 * Remove Network Partition
 * @param networkPartitionId networkPartitionId
 */
public static void removeNetworkPartition(String networkPartitionId) throws RestAPIException, CloudControllerServiceNetworkPartitionNotExistsExceptionException {
  try {
    ApplicationContext[] applicationContexts=AutoscalerServiceClient.getInstance().getApplications();
    if (applicationContexts != null) {
      for (      ApplicationContext applicationContext : applicationContexts) {
        if (applicationContext != null) {
          String[] networkPartitions=AutoscalerServiceClient.getInstance().getApplicationNetworkPartitions(applicationContext.getApplicationId());
          if (networkPartitions != null) {
            for (int i=0; i < networkPartitions.length; i++) {
              if (networkPartitions[i].equals(networkPartitionId)) {
                String message=String.format("String_Node_Str",networkPartitionId,applicationContext.getApplicationId());
                log.error(message);
                throw new RestAPIException(message);
              }
            }
          }
        }
      }
    }
    CloudControllerServiceClient serviceClient=CloudControllerServiceClient.getInstance();
    serviceClient.removeNetworkPartition(networkPartitionId);
  }
 catch (  AutoscalerServiceAutoScalerExceptionException e) {
    String message=e.getMessage();
    log.error(message);
    throw new RestAPIException(message,e);
  }
catch (  RemoteException e) {
    String message=e.getMessage();
    log.error(message);
    throw new RestAPIException(message,e);
  }
}

Fixed version (ground truth):
/** 
 * Remove Network Partition
 * @param networkPartitionId networkPartitionId
 */
public static void removeNetworkPartition(String networkPartitionId) throws RestAPIException, CloudControllerServiceNetworkPartitionNotExistsExceptionException {
  try {
    ApplicationContext[] applicationContexts=AutoscalerServiceClient.getInstance().getApplications();
    if (applicationContexts != null) {
      for (      ApplicationContext applicationContext : applicationContexts) {
        if (applicationContext != null) {
          String[] networkPartitions=AutoscalerServiceClient.getInstance().getApplicationNetworkPartitions(applicationContext.getApplicationId());
          if (networkPartitions != null) {
            for (int i=0; i < networkPartitions.length; i++) {
              if (networkPartitions[i].equals(networkPartitionId)) {
                String message=String.format("String_Node_Str" + "String_Node_Str",networkPartitionId,applicationContext.getApplicationId());
                log.error(message);
                throw new RestAPIException(message);
              }
            }
          }
        }
      }
    }
    CloudControllerServiceClient serviceClient=CloudControllerServiceClient.getInstance();
    serviceClient.removeNetworkPartition(networkPartitionId);
  }
 catch (  AutoscalerServiceAutoScalerExceptionException e) {
    String message=e.getMessage();
    log.error(message);
    throw new RestAPIException(message,e);
  }
catch (  RemoteException e) {
    String message=e.getMessage();
    log.error(message);
    throw new RestAPIException(message,e);
  }
}