Program: 106523
Project: 106523
Buggy source:
protected NetworkDaoImpl(){
  super();
  AllFieldsSearch=createSearchBuilder();
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getTrafficType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getCidr(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getBroadcastDomainType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getNetworkOfferingId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getDataCenterId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getAccountId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getRelated(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getGuestType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getPhysicalNetworkId(),Op.EQ);
  AllFieldsSearch.done();
  AccountSearch=createSearchBuilder();
  AccountSearch.and("String_Node_Str",AccountSearch.entity().getNetworkOfferingId(),Op.EQ);
  SearchBuilder<NetworkAccountVO> join=_accountsDao.createSearchBuilder();
  join.and("String_Node_Str",join.entity().getAccountId(),Op.EQ);
  AccountSearch.join("String_Node_Str",join,AccountSearch.entity().getId(),join.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  AccountSearch.and("String_Node_Str",AccountSearch.entity().getDataCenterId(),Op.EQ);
  AccountSearch.and("String_Node_Str",AccountSearch.entity().getCidr(),Op.EQ);
  AccountSearch.done();
  RelatedConfigSearch=createSearchBuilder();
  RelatedConfigSearch.and("String_Node_Str",RelatedConfigSearch.entity().getNetworkOfferingId(),Op.EQ);
  RelatedConfigSearch.and("String_Node_Str",RelatedConfigSearch.entity().getDataCenterId(),Op.EQ);
  SearchBuilder<NetworkAccountVO> join2=_accountsDao.createSearchBuilder();
  join2.and("String_Node_Str",join2.entity().getAccountId(),Op.EQ);
  RelatedConfigSearch.join("String_Node_Str",join2,join2.entity().getNetworkId(),RelatedConfigSearch.entity().getId(),JoinType.INNER);
  RelatedConfigSearch.done();
  AccountNetworkSearch=createSearchBuilder();
  AccountNetworkSearch.and("String_Node_Str",AccountNetworkSearch.entity().getId(),Op.EQ);
  SearchBuilder<NetworkAccountVO> mapJoin=_accountsDao.createSearchBuilder();
  mapJoin.and("String_Node_Str",mapJoin.entity().getAccountId(),Op.EQ);
  AccountNetworkSearch.join("String_Node_Str",mapJoin,AccountNetworkSearch.entity().getId(),mapJoin.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  AccountNetworkSearch.done();
  ZoneBroadcastUriSearch=createSearchBuilder();
  ZoneBroadcastUriSearch.and("String_Node_Str",ZoneBroadcastUriSearch.entity().getDataCenterId(),Op.EQ);
  ZoneBroadcastUriSearch.and("String_Node_Str",ZoneBroadcastUriSearch.entity().getBroadcastUri(),Op.EQ);
  ZoneBroadcastUriSearch.done();
  ZoneSecurityGroupSearch=createSearchBuilder();
  ZoneSecurityGroupSearch.and("String_Node_Str",ZoneSecurityGroupSearch.entity().getDataCenterId(),Op.EQ);
  SearchBuilder<NetworkServiceMapVO> join1=_ntwkSvcMap.createSearchBuilder();
  join1.and("String_Node_Str",join1.entity().getService(),Op.EQ);
  ZoneSecurityGroupSearch.join("String_Node_Str",join1,ZoneSecurityGroupSearch.entity().getId(),join1.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  ZoneSecurityGroupSearch.done();
  CountByOfferingId=createSearchBuilder(Long.class);
  CountByOfferingId.select(null,Func.COUNT,CountByOfferingId.entity().getId());
  CountByOfferingId.and("String_Node_Str",CountByOfferingId.entity().getNetworkOfferingId(),Op.EQ);
  CountByOfferingId.and("String_Node_Str",CountByOfferingId.entity().getRemoved(),Op.NULL);
  CountByOfferingId.done();
  PhysicalNetworkSearch=createSearchBuilder();
  PhysicalNetworkSearch.and("String_Node_Str",PhysicalNetworkSearch.entity().getPhysicalNetworkId(),Op.EQ);
  PhysicalNetworkSearch.done();
  SecurityGroupSearch=createSearchBuilder();
  SearchBuilder<NetworkServiceMapVO> join3=_ntwkSvcMap.createSearchBuilder();
  join3.and("String_Node_Str",join3.entity().getService(),Op.EQ);
  SecurityGroupSearch.join("String_Node_Str",join3,SecurityGroupSearch.entity().getId(),join3.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  SecurityGroupSearch.done();
  NetworksCount=createSearchBuilder(Integer.class);
  NetworksCount.select(null,Func.COUNT,NetworksCount.entity().getId());
  NetworksCount.and("String_Node_Str",NetworksCount.entity().getNetworkOfferingId(),SearchCriteria.Op.EQ);
  NetworksCount.done();
  NetworksRegularUserCanCreateSearch=createSearchBuilder(Long.class);
  NetworksRegularUserCanCreateSearch.and("String_Node_Str",NetworksRegularUserCanCreateSearch.entity().getAclType(),Op.EQ);
  NetworksRegularUserCanCreateSearch.select(null,Func.COUNT,NetworksRegularUserCanCreateSearch.entity().getId());
  SearchBuilder<NetworkAccountVO> join4=_accountsDao.createSearchBuilder();
  join4.and("String_Node_Str",join4.entity().getAccountId(),Op.EQ);
  join4.and("String_Node_Str",join4.entity().isOwner(),Op.EQ);
  NetworksRegularUserCanCreateSearch.join("String_Node_Str",join4,NetworksRegularUserCanCreateSearch.entity().getId(),join4.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  SearchBuilder<NetworkOfferingVO> join5=_ntwkOffDao.createSearchBuilder();
  join5.and("String_Node_Str",join5.entity().getSpecifyVlan(),Op.EQ);
  NetworksRegularUserCanCreateSearch.join("String_Node_Str",join5,NetworksRegularUserCanCreateSearch.entity().getNetworkOfferingId(),join5.entity().getId(),JoinBuilder.JoinType.INNER);
  NetworksRegularUserCanCreateSearch.done();
  _tgMacAddress=_tgs.get("String_Node_Str");
}

Fixed version (ground truth):
protected NetworkDaoImpl(){
  super();
  AllFieldsSearch=createSearchBuilder();
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getTrafficType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getCidr(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getBroadcastDomainType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getNetworkOfferingId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getDataCenterId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getAccountId(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getRelated(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getGuestType(),Op.EQ);
  AllFieldsSearch.and("String_Node_Str",AllFieldsSearch.entity().getPhysicalNetworkId(),Op.EQ);
  AllFieldsSearch.done();
  AccountSearch=createSearchBuilder();
  AccountSearch.and("String_Node_Str",AccountSearch.entity().getNetworkOfferingId(),Op.EQ);
  SearchBuilder<NetworkAccountVO> join=_accountsDao.createSearchBuilder();
  join.and("String_Node_Str",join.entity().getAccountId(),Op.EQ);
  AccountSearch.join("String_Node_Str",join,AccountSearch.entity().getId(),join.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  AccountSearch.and("String_Node_Str",AccountSearch.entity().getDataCenterId(),Op.EQ);
  AccountSearch.and("String_Node_Str",AccountSearch.entity().getCidr(),Op.EQ);
  AccountSearch.done();
  RelatedConfigSearch=createSearchBuilder();
  RelatedConfigSearch.and("String_Node_Str",RelatedConfigSearch.entity().getNetworkOfferingId(),Op.EQ);
  RelatedConfigSearch.and("String_Node_Str",RelatedConfigSearch.entity().getDataCenterId(),Op.EQ);
  SearchBuilder<NetworkAccountVO> join2=_accountsDao.createSearchBuilder();
  join2.and("String_Node_Str",join2.entity().getAccountId(),Op.EQ);
  RelatedConfigSearch.join("String_Node_Str",join2,join2.entity().getNetworkId(),RelatedConfigSearch.entity().getId(),JoinType.INNER);
  RelatedConfigSearch.done();
  AccountNetworkSearch=createSearchBuilder();
  AccountNetworkSearch.and("String_Node_Str",AccountNetworkSearch.entity().getId(),Op.EQ);
  SearchBuilder<NetworkAccountVO> mapJoin=_accountsDao.createSearchBuilder();
  mapJoin.and("String_Node_Str",mapJoin.entity().getAccountId(),Op.EQ);
  AccountNetworkSearch.join("String_Node_Str",mapJoin,AccountNetworkSearch.entity().getId(),mapJoin.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  AccountNetworkSearch.done();
  ZoneBroadcastUriSearch=createSearchBuilder();
  ZoneBroadcastUriSearch.and("String_Node_Str",ZoneBroadcastUriSearch.entity().getDataCenterId(),Op.EQ);
  ZoneBroadcastUriSearch.and("String_Node_Str",ZoneBroadcastUriSearch.entity().getBroadcastUri(),Op.EQ);
  ZoneBroadcastUriSearch.done();
  ZoneSecurityGroupSearch=createSearchBuilder();
  ZoneSecurityGroupSearch.and("String_Node_Str",ZoneSecurityGroupSearch.entity().getDataCenterId(),Op.EQ);
  SearchBuilder<NetworkServiceMapVO> join1=_ntwkSvcMap.createSearchBuilder();
  join1.and("String_Node_Str",join1.entity().getService(),Op.EQ);
  ZoneSecurityGroupSearch.join("String_Node_Str",join1,ZoneSecurityGroupSearch.entity().getId(),join1.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  ZoneSecurityGroupSearch.done();
  CountByOfferingId=createSearchBuilder(Long.class);
  CountByOfferingId.select(null,Func.COUNT,CountByOfferingId.entity().getId());
  CountByOfferingId.and("String_Node_Str",CountByOfferingId.entity().getNetworkOfferingId(),Op.EQ);
  CountByOfferingId.and("String_Node_Str",CountByOfferingId.entity().getRemoved(),Op.NULL);
  CountByOfferingId.done();
  PhysicalNetworkSearch=createSearchBuilder();
  PhysicalNetworkSearch.and("String_Node_Str",PhysicalNetworkSearch.entity().getPhysicalNetworkId(),Op.EQ);
  PhysicalNetworkSearch.done();
  SecurityGroupSearch=createSearchBuilder();
  SearchBuilder<NetworkServiceMapVO> join3=_ntwkSvcMap.createSearchBuilder();
  join3.and("String_Node_Str",join3.entity().getService(),Op.EQ);
  SecurityGroupSearch.join("String_Node_Str",join3,SecurityGroupSearch.entity().getId(),join3.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  SecurityGroupSearch.done();
  NetworksCount=createSearchBuilder(Integer.class);
  NetworksCount.select(null,Func.COUNT,NetworksCount.entity().getId());
  NetworksCount.and("String_Node_Str",NetworksCount.entity().getNetworkOfferingId(),SearchCriteria.Op.EQ);
  NetworksCount.done();
  NetworksRegularUserCanCreateSearch=createSearchBuilder(Long.class);
  NetworksRegularUserCanCreateSearch.and("String_Node_Str",NetworksRegularUserCanCreateSearch.entity().getAclType(),Op.EQ);
  NetworksRegularUserCanCreateSearch.select(null,Func.COUNT,NetworksRegularUserCanCreateSearch.entity().getId());
  SearchBuilder<NetworkAccountVO> join4=_accountsDao.createSearchBuilder();
  join4.and("String_Node_Str",join4.entity().getAccountId(),Op.EQ);
  join4.and("String_Node_Str",join4.entity().isOwner(),Op.EQ);
  NetworksRegularUserCanCreateSearch.join("String_Node_Str",join4,NetworksRegularUserCanCreateSearch.entity().getId(),join4.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  SearchBuilder<NetworkOfferingVO> join5=_ntwkOffDao.createSearchBuilder();
  join5.and("String_Node_Str",join5.entity().getSpecifyVlan(),Op.EQ);
  NetworksRegularUserCanCreateSearch.join("String_Node_Str",join5,NetworksRegularUserCanCreateSearch.entity().getNetworkOfferingId(),join5.entity().getId(),JoinBuilder.JoinType.INNER);
  NetworksRegularUserCanCreateSearch.done();
  _tgMacAddress=_tgs.get("String_Node_Str");
  SourceNATSearch=createSearchBuilder();
  SourceNATSearch.and("String_Node_Str",SourceNATSearch.entity().getAccountId(),Op.EQ);
  SourceNATSearch.and("String_Node_Str",SourceNATSearch.entity().getDataCenterId(),Op.EQ);
  SourceNATSearch.and("String_Node_Str",SourceNATSearch.entity().getGuestType(),Op.EQ);
  SearchBuilder<NetworkServiceMapVO> join6=_ntwkSvcMap.createSearchBuilder();
  join6.and("String_Node_Str",join6.entity().getService(),Op.EQ);
  SourceNATSearch.join("String_Node_Str",join6,SourceNATSearch.entity().getId(),join6.entity().getNetworkId(),JoinBuilder.JoinType.INNER);
  SourceNATSearch.done();
}