Program: 107358
Project: 107358
Buggy source:
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  boolean result=super.configure(name,params);
  PublicSearch=createSearchBuilder();
  PublicSearch.and("String_Node_Str",PublicSearch.entity().isPublicTemplate(),SearchCriteria.Op.EQ);
  routerTmpltName=(String)params.get("String_Node_Str");
  s_logger.debug("String_Node_Str" + routerTmpltName);
  if (routerTmpltName == null) {
    routerTmpltName="String_Node_Str";
  }
  consoleProxyTmpltName=(String)params.get("String_Node_Str");
  if (consoleProxyTmpltName == null)   consoleProxyTmpltName="String_Node_Str";
  if (s_logger.isDebugEnabled())   s_logger.debug("String_Node_Str" + consoleProxyTmpltName);
  UniqueNameSearch=createSearchBuilder();
  UniqueNameSearch.and("String_Node_Str",UniqueNameSearch.entity().getUniqueName(),SearchCriteria.Op.EQ);
  NameSearch=createSearchBuilder();
  NameSearch.and("String_Node_Str",NameSearch.entity().getName(),SearchCriteria.Op.EQ);
  NameAccountIdSearch=createSearchBuilder();
  NameAccountIdSearch.and("String_Node_Str",NameAccountIdSearch.entity().getName(),SearchCriteria.Op.EQ);
  NameAccountIdSearch.and("String_Node_Str",NameAccountIdSearch.entity().getAccountId(),SearchCriteria.Op.EQ);
  XenToolsIsoSearch=createSearchBuilder();
  XenToolsIsoSearch.and("String_Node_Str",XenToolsIsoSearch.entity().getName(),SearchCriteria.Op.EQ);
  tmpltTypeHyperSearch=createSearchBuilder();
  tmpltTypeHyperSearch.and("String_Node_Str",tmpltTypeHyperSearch.entity().getTemplateType(),SearchCriteria.Op.EQ);
  tmpltTypeHyperSearch.and("String_Node_Str",tmpltTypeHyperSearch.entity().getHypervisorType(),SearchCriteria.Op.EQ);
  tmpltTypeSearch=createSearchBuilder();
  tmpltTypeSearch.and("String_Node_Str",tmpltTypeSearch.entity().getTemplateType(),SearchCriteria.Op.EQ);
  AccountIdSearch=createSearchBuilder();
  AccountIdSearch.and("String_Node_Str",AccountIdSearch.entity().getAccountId(),SearchCriteria.Op.EQ);
  AccountIdSearch.and("String_Node_Str",AccountIdSearch.entity().isPublicTemplate(),SearchCriteria.Op.EQ);
  AccountIdSearch.done();
  SearchBuilder<VMTemplateZoneVO> tmpltZoneSearch=_templateZoneDao.createSearchBuilder();
  tmpltZoneSearch.and("String_Node_Str",tmpltZoneSearch.entity().getRemoved(),SearchCriteria.Op.NULL);
  tmpltZoneSearch.and("String_Node_Str",tmpltZoneSearch.entity().getZoneId(),SearchCriteria.Op.EQ);
  TmpltsInZoneSearch=createSearchBuilder();
  TmpltsInZoneSearch.and("String_Node_Str",TmpltsInZoneSearch.entity().getRemoved(),SearchCriteria.Op.NULL);
  TmpltsInZoneSearch.join("String_Node_Str",tmpltZoneSearch,tmpltZoneSearch.entity().getTemplateId(),TmpltsInZoneSearch.entity().getId(),JoinBuilder.JoinType.INNER);
  tmpltZoneSearch.done();
  TmpltsInZoneSearch.done();
  _defaultHyperType=HypervisorType.getType(_configDao.getValue("String_Node_Str"));
  return result;
}

Fixed version (ground truth):
@Override public boolean configure(String name,Map<String,Object> params) throws ConfigurationException {
  boolean result=super.configure(name,params);
  PublicSearch=createSearchBuilder();
  PublicSearch.and("String_Node_Str",PublicSearch.entity().isPublicTemplate(),SearchCriteria.Op.EQ);
  routerTmpltName=(String)params.get("String_Node_Str");
  s_logger.debug("String_Node_Str" + routerTmpltName);
  if (routerTmpltName == null) {
    routerTmpltName="String_Node_Str";
  }
  consoleProxyTmpltName=(String)params.get("String_Node_Str");
  if (consoleProxyTmpltName == null)   consoleProxyTmpltName="String_Node_Str";
  if (s_logger.isDebugEnabled())   s_logger.debug("String_Node_Str" + consoleProxyTmpltName);
  UniqueNameSearch=createSearchBuilder();
  UniqueNameSearch.and("String_Node_Str",UniqueNameSearch.entity().getUniqueName(),SearchCriteria.Op.EQ);
  NameSearch=createSearchBuilder();
  NameSearch.and("String_Node_Str",NameSearch.entity().getName(),SearchCriteria.Op.EQ);
  NameAccountIdSearch=createSearchBuilder();
  NameAccountIdSearch.and("String_Node_Str",NameAccountIdSearch.entity().getName(),SearchCriteria.Op.EQ);
  NameAccountIdSearch.and("String_Node_Str",NameAccountIdSearch.entity().getAccountId(),SearchCriteria.Op.EQ);
  PublicIsoSearch=createSearchBuilder();
  PublicIsoSearch.and("String_Node_Str",PublicIsoSearch.entity().isPublicTemplate(),SearchCriteria.Op.EQ);
  PublicIsoSearch.and("String_Node_Str",PublicIsoSearch.entity().getFormat(),SearchCriteria.Op.EQ);
  tmpltTypeHyperSearch=createSearchBuilder();
  tmpltTypeHyperSearch.and("String_Node_Str",tmpltTypeHyperSearch.entity().getTemplateType(),SearchCriteria.Op.EQ);
  tmpltTypeHyperSearch.and("String_Node_Str",tmpltTypeHyperSearch.entity().getHypervisorType(),SearchCriteria.Op.EQ);
  tmpltTypeSearch=createSearchBuilder();
  tmpltTypeSearch.and("String_Node_Str",tmpltTypeSearch.entity().getTemplateType(),SearchCriteria.Op.EQ);
  AccountIdSearch=createSearchBuilder();
  AccountIdSearch.and("String_Node_Str",AccountIdSearch.entity().getAccountId(),SearchCriteria.Op.EQ);
  AccountIdSearch.and("String_Node_Str",AccountIdSearch.entity().isPublicTemplate(),SearchCriteria.Op.EQ);
  AccountIdSearch.done();
  SearchBuilder<VMTemplateZoneVO> tmpltZoneSearch=_templateZoneDao.createSearchBuilder();
  tmpltZoneSearch.and("String_Node_Str",tmpltZoneSearch.entity().getRemoved(),SearchCriteria.Op.NULL);
  tmpltZoneSearch.and("String_Node_Str",tmpltZoneSearch.entity().getZoneId(),SearchCriteria.Op.EQ);
  TmpltsInZoneSearch=createSearchBuilder();
  TmpltsInZoneSearch.and("String_Node_Str",TmpltsInZoneSearch.entity().getRemoved(),SearchCriteria.Op.NULL);
  TmpltsInZoneSearch.join("String_Node_Str",tmpltZoneSearch,tmpltZoneSearch.entity().getTemplateId(),TmpltsInZoneSearch.entity().getId(),JoinBuilder.JoinType.INNER);
  tmpltZoneSearch.done();
  TmpltsInZoneSearch.done();
  _defaultHyperType=HypervisorType.getType(_configDao.getValue("String_Node_Str"));
  return result;
}