Program: 115452
Project: 115452
Buggy source:
private void addMembersFromTopology(Cluster cluster,PartitionRef partition,ClusterLevelPartitionContext clusterLevelPartitionContext,String ClusterInstanceId){
  for (  Member member : cluster.getMembers()) {
    String memberId=member.getMemberId();
    if (member.getPartitionId().equalsIgnoreCase(partition.getId()) && member.getClusterInstanceId().equals(ClusterInstanceId)) {
      MemberContext memberContext=new MemberContext();
      memberContext.setClusterId(member.getClusterId());
      memberContext.setMemberId(memberId);
      memberContext.setInitTime(member.getInitTime());
      memberContext.setPartition(AutoscalerObjectConverter.convertPartitionToCCPartition(partition));
      memberContext.setProperties(AutoscalerUtil.toStubProperties(member.getProperties()));
      if (MemberStatus.Active.equals(member.getStatus()) || MemberStatus.Suspended.equals(member.getStatus())) {
        clusterLevelPartitionContext.addActiveMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
        clusterLevelPartitionContext.addMemberStatsContext(new MemberStatsContext(memberId));
        if (log.isInfoEnabled()) {
          log.info(String.format("String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),memberId));
        }
      }
 else       if (MemberStatus.Created.equals(member.getStatus()) || MemberStatus.Starting.equals(member.getStatus())) {
        clusterLevelPartitionContext.addPendingMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
 else       if (MemberStatus.In_Maintenance.equals(member.getStatus())) {
        clusterLevelPartitionContext.addTerminationPendingMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
 else       if (MemberStatus.ReadyToShutDown.equals(member.getStatus())) {
        clusterLevelPartitionContext.addObsoleteMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
 else       if (MemberStatus.Terminated.equals(member.getStatus())) {
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void addMembersFromTopology(Cluster cluster,PartitionRef partition,ClusterLevelPartitionContext clusterLevelPartitionContext,String ClusterInstanceId){
  for (  Member member : cluster.getMembers()) {
    String memberId=member.getMemberId();
    if (member.getPartitionId().equalsIgnoreCase(partition.getId()) && member.getClusterInstanceId().equals(ClusterInstanceId)) {
      MemberContext memberContext=new MemberContext();
      memberContext.setClusterId(member.getClusterId());
      memberContext.setMemberId(memberId);
      memberContext.setInitTime(member.getInitTime());
      memberContext.setPartition(AutoscalerObjectConverter.convertPartitionToCCPartition(partition));
      memberContext.setProperties(AutoscalerUtil.toStubProperties(member.getProperties()));
      if (MemberStatus.Active.equals(member.getStatus()) || MemberStatus.Suspended.equals(member.getStatus())) {
        clusterLevelPartitionContext.addActiveMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
        clusterLevelPartitionContext.addMemberStatsContext(new MemberStatsContext(memberId));
        if (log.isInfoEnabled()) {
          log.info(String.format("String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),memberId));
        }
      }
 else       if (MemberStatus.Created.equals(member.getStatus()) || MemberStatus.Starting.equals(member.getStatus()) || MemberStatus.Initialized.equals(member.getStatus())) {
        clusterLevelPartitionContext.addPendingMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
 else       if (MemberStatus.In_Maintenance.equals(member.getStatus())) {
        clusterLevelPartitionContext.addTerminationPendingMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
 else       if (MemberStatus.ReadyToShutDown.equals(member.getStatus())) {
        clusterLevelPartitionContext.addObsoleteMember(memberContext);
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
 else       if (MemberStatus.Terminated.equals(member.getStatus())) {
        if (log.isDebugEnabled()) {
          String msg=String.format("String_Node_Str" + "String_Node_Str" + "String_Node_Str",cluster.getAppId(),cluster.getClusterId(),ClusterInstanceId,clusterLevelPartitionContext.getPartitionId(),member.toString());
          log.debug(msg);
        }
      }
    }
  }
}