Program: 12016
Project: 12016
Buggy source:
public static AT_Block validateATs(byte[] blockATs,int blockHeight) throws NoSuchAlgorithmException, AT_Exception {
  LinkedHashMap<byte[],byte[]> ats=getATsFromBlock(blockATs);
  List<AT> processedATs=new ArrayList<>();
  boolean validated=true;
  long totalSteps=0;
  MessageDigest digest=MessageDigest.getInstance("String_Node_Str");
  byte[] md5=null;
  for (  byte[] atId : ats.keySet()) {
    AT at=AT.getAT(atId);
    try {
      at.clearTransactions();
      at.setWaitForNumberOfBlocks(at.getSleepBetween());
      long atAccountBalance=getATAccountBalance(AT_API_Helper.getLong(atId));
      if (atAccountBalance < AT_Constants.getInstance().STEP_FEE(blockHeight)) {
        throw new AT_Exception("String_Node_Str");
      }
      if (at.freezeOnSameBalance() && atAccountBalance == at.getG_balance()) {
        throw new AT_Exception("String_Node_Str");
      }
      at.setG_balance(atAccountBalance);
      listCode(at,true,true);
      runSteps(at);
      totalSteps+=at.getMachineState().steps;
      AT.addPendingFee(atId,at.getMachineState().steps * AT_Constants.getInstance().STEP_FEE(blockHeight));
      at.setP_balance(at.getG_balance());
      processedATs.add(at);
      md5=digest.digest(at.getBytes());
      if (!Arrays.equals(md5,ats.get(atId))) {
        throw new AT_Exception("String_Node_Str");
      }
    }
 catch (    Exception e) {
      throw new AT_Exception("String_Node_Str");
    }
  }
  long totalAmount=0;
  for (  AT at : processedATs) {
    at.saveState();
    totalAmount=makeTransactions(at);
  }
  AT_Block atBlock=new AT_Block(totalSteps * AT_Constants.getInstance().STEP_FEE(blockHeight),totalAmount,new byte[1],validated);
  return atBlock;
}

Fixed version (ground truth):
public static AT_Block validateATs(byte[] blockATs,int blockHeight) throws NoSuchAlgorithmException, AT_Exception {
  if (blockATs == null) {
    return new AT_Block(0,0,null,true);
  }
  LinkedHashMap<byte[],byte[]> ats=getATsFromBlock(blockATs);
  List<AT> processedATs=new ArrayList<>();
  boolean validated=true;
  long totalSteps=0;
  MessageDigest digest=MessageDigest.getInstance("String_Node_Str");
  byte[] md5=null;
  for (  byte[] atId : ats.keySet()) {
    AT at=AT.getAT(atId);
    try {
      at.clearTransactions();
      at.setWaitForNumberOfBlocks(at.getSleepBetween());
      long atAccountBalance=getATAccountBalance(AT_API_Helper.getLong(atId));
      if (atAccountBalance < AT_Constants.getInstance().STEP_FEE(blockHeight)) {
        throw new AT_Exception("String_Node_Str");
      }
      if (at.freezeOnSameBalance() && atAccountBalance == at.getG_balance()) {
        throw new AT_Exception("String_Node_Str");
      }
      at.setG_balance(atAccountBalance);
      listCode(at,true,true);
      runSteps(at);
      totalSteps+=at.getMachineState().steps;
      AT.addPendingFee(atId,at.getMachineState().steps * AT_Constants.getInstance().STEP_FEE(blockHeight));
      at.setP_balance(at.getG_balance());
      processedATs.add(at);
      md5=digest.digest(at.getBytes());
      if (!Arrays.equals(md5,ats.get(atId))) {
        throw new AT_Exception("String_Node_Str");
      }
    }
 catch (    Exception e) {
      throw new AT_Exception("String_Node_Str");
    }
  }
  long totalAmount=0;
  for (  AT at : processedATs) {
    at.saveState();
    totalAmount=makeTransactions(at);
  }
  AT_Block atBlock=new AT_Block(totalSteps * AT_Constants.getInstance().STEP_FEE(blockHeight),totalAmount,new byte[1],validated);
  return atBlock;
}