Program: 116628
Project: 116628
Buggy source:
@Override public boolean process(String type,String message,Object object){
  Topology topology=(Topology)object;
  if (CompleteTopologyEvent.class.getName().equals(type)) {
    if (topology.isInitialized()) {
      return false;
    }
    CompleteTopologyEvent event=(CompleteTopologyEvent)Util.jsonToObject(message,CompleteTopologyEvent.class);
    if (TopologyServiceFilter.getInstance().isActive()) {
      for (      Service service : event.getTopology().getServices()) {
        if (TopologyServiceFilter.getInstance().serviceNameIncluded(service.getServiceName())) {
          topology.addService(service);
        }
 else {
          if (log.isDebugEnabled()) {
            log.debug(String.format("String_Node_Str",service.getServiceName()));
          }
        }
      }
    }
 else {
      topology.addServices(event.getTopology().getServices());
    }
    if (TopologyClusterFilter.getInstance().isActive()) {
      for (      Service service : topology.getServices()) {
        for (        Cluster cluster : service.getClusters()) {
          if (TopologyClusterFilter.getInstance().clusterIdExcluded(cluster.getClusterId())) {
            service.removeCluster(cluster.getClusterId());
            if (log.isDebugEnabled()) {
              log.debug(String.format("String_Node_Str",cluster.getClusterId()));
            }
          }
        }
      }
    }
    if (TopologyMemberFilter.getInstance().isActive()) {
      for (      Service service : topology.getServices()) {
        for (        Cluster cluster : service.getClusters()) {
          for (          Member member : cluster.getMembers()) {
            if (TopologyMemberFilter.getInstance().lbClusterIdExcluded(member.getLbClusterId())) {
              if (log.isDebugEnabled()) {
                log.debug(String.format("String_Node_Str",member.getMemberId(),member.getLbClusterId()));
              }
              cluster.removeMember(member);
            }
          }
        }
      }
    }
    if (log.isInfoEnabled()) {
      log.info("String_Node_Str");
    }
    topology.setInitialized(true);
    notifyEventListeners(event);
    return true;
  }
 else {
    if (nextProcessor != null) {
      return nextProcessor.process(type,message,topology);
    }
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean process(String type,String message,Object object){
  Topology topology=(Topology)object;
  if (CompleteTopologyEvent.class.getName().equals(type)) {
    if (topology.isInitialized()) {
      return false;
    }
    CompleteTopologyEvent event=(CompleteTopologyEvent)Util.jsonToObject(message,CompleteTopologyEvent.class);
    if (TopologyServiceFilter.getInstance().isActive()) {
      for (      Service service : event.getTopology().getServices()) {
        if (TopologyServiceFilter.getInstance().serviceNameIncluded(service.getServiceName())) {
          topology.addService(service);
        }
 else {
          if (log.isDebugEnabled()) {
            log.debug(String.format("String_Node_Str",service.getServiceName()));
          }
        }
      }
    }
 else {
      topology.addServices(event.getTopology().getServices());
    }
    if (TopologyClusterFilter.getInstance().isActive()) {
      for (      Service service : topology.getServices()) {
        List<Cluster> clustersToRemove=new ArrayList<Cluster>();
        for (        Cluster cluster : service.getClusters()) {
          if (TopologyClusterFilter.getInstance().clusterIdExcluded(cluster.getClusterId())) {
            clustersToRemove.add(cluster);
          }
        }
        for (        Cluster cluster : clustersToRemove) {
          service.removeCluster(cluster);
          if (log.isDebugEnabled()) {
            log.debug(String.format("String_Node_Str",cluster.getClusterId()));
          }
        }
      }
    }
    if (TopologyMemberFilter.getInstance().isActive()) {
      for (      Service service : topology.getServices()) {
        for (        Cluster cluster : service.getClusters()) {
          List<Member> membersToRemove=new ArrayList<Member>();
          for (          Member member : cluster.getMembers()) {
            if (TopologyMemberFilter.getInstance().lbClusterIdExcluded(member.getLbClusterId())) {
              membersToRemove.add(member);
            }
          }
          for (          Member member : membersToRemove) {
            cluster.removeMember(member);
            if (log.isDebugEnabled()) {
              log.debug(String.format("String_Node_Str",member.getMemberId(),member.getLbClusterId()));
            }
          }
        }
      }
    }
    if (log.isInfoEnabled()) {
      log.info("String_Node_Str");
    }
    topology.setInitialized(true);
    notifyEventListeners(event);
    return true;
  }
 else {
    if (nextProcessor != null) {
      return nextProcessor.process(type,message,topology);
    }
    return false;
  }
}