Program: 107457
Project: 107457
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);
  TemplateNameSearch=createSearchBuilder();
  TemplateNameSearch.and("String_Node_Str",TemplateNameSearch.entity().getName(),SearchCriteria.Op.EQ);
  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);
  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());
  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);
  TemplateNameSearch=createSearchBuilder();
  TemplateNameSearch.and("String_Node_Str",TemplateNameSearch.entity().getName(),SearchCriteria.Op.EQ);
  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);
  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;
}