Program: 106069
Project: 106069
Buggy source:
private Pair<List<TemplateJoinVO>,Integer> searchForIsosInternal(ListIsosCmd cmd){
  TemplateFilter isoFilter=TemplateFilter.valueOf(cmd.getIsoFilter());
  Long id=cmd.getId();
  Map<String,String> tags=cmd.getTags();
  Account caller=CallContext.current().getCallingAccount();
  boolean listAll=false;
  if (isoFilter != null && isoFilter == TemplateFilter.all) {
    if (_accountMgr.isNormalUser(caller.getId())) {
      throw new InvalidParameterValueException("String_Node_Str" + TemplateFilter.all + "String_Node_Str");
    }
    listAll=true;
  }
  List<Long> permittedAccountIds=new ArrayList<Long>();
  Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject=new Ternary<Long,Boolean,ListProjectResourcesCriteria>(cmd.getDomainId(),cmd.isRecursive(),null);
  _accountMgr.buildACLSearchParameters(caller,id,cmd.getAccountName(),cmd.getProjectId(),permittedAccountIds,domainIdRecursiveListProject,listAll,false);
  ListProjectResourcesCriteria listProjectResourcesCriteria=domainIdRecursiveListProject.third();
  List<Account> permittedAccounts=new ArrayList<Account>();
  for (  Long accountId : permittedAccountIds) {
    permittedAccounts.add(_accountMgr.getAccount(accountId));
  }
  HypervisorType hypervisorType=HypervisorType.getType(cmd.getHypervisor());
  return searchForTemplatesInternal(cmd.getId(),cmd.getIsoName(),cmd.getKeyword(),isoFilter,true,cmd.isBootable(),cmd.getPageSizeVal(),cmd.getStartIndex(),cmd.getZoneId(),hypervisorType,true,cmd.listInReadyState(),permittedAccounts,caller,listProjectResourcesCriteria,tags);
}

Fixed version (ground truth):
private Pair<List<TemplateJoinVO>,Integer> searchForIsosInternal(ListIsosCmd cmd){
  TemplateFilter isoFilter=TemplateFilter.valueOf(cmd.getIsoFilter());
  Long id=cmd.getId();
  Map<String,String> tags=cmd.getTags();
  Account caller=CallContext.current().getCallingAccount();
  boolean listAll=false;
  if (isoFilter != null && isoFilter == TemplateFilter.all) {
    if (_accountMgr.isNormalUser(caller.getId())) {
      throw new InvalidParameterValueException("String_Node_Str" + TemplateFilter.all + "String_Node_Str");
    }
    listAll=true;
  }
  List<Long> permittedDomains=new ArrayList<Long>();
  List<Long> permittedAccounts=new ArrayList<Long>();
  List<Long> permittedResources=new ArrayList<Long>();
  Ternary<Long,Boolean,ListProjectResourcesCriteria> domainIdRecursiveListProject=new Ternary<Long,Boolean,ListProjectResourcesCriteria>(cmd.getDomainId(),cmd.isRecursive(),null);
  _accountMgr.buildACLSearchParameters(caller,id,cmd.getAccountName(),cmd.getProjectId(),permittedDomains,permittedAccounts,permittedResources,domainIdRecursiveListProject,cmd.listAll(),false,"String_Node_Str");
  Boolean isRecursive=domainIdRecursiveListProject.second();
  ListProjectResourcesCriteria listProjectResourcesCriteria=domainIdRecursiveListProject.third();
  HypervisorType hypervisorType=HypervisorType.getType(cmd.getHypervisor());
  return searchForTemplatesInternal(cmd.getId(),cmd.getIsoName(),cmd.getKeyword(),isoFilter,true,cmd.isBootable(),cmd.getPageSizeVal(),cmd.getStartIndex(),cmd.getZoneId(),hypervisorType,true,cmd.listInReadyState(),permittedDomains,permittedAccounts,permittedResources,isRecursive,caller,listProjectResourcesCriteria,tags);
}