Program: 116048
Project: 116048
Buggy source:
public static ClusterInstanceBean convertClusterToClusterInstanceBean(String instanceId,Cluster cluster,String alias){
  ClusterInstanceBean clusterInstanceBean=new ClusterInstanceBean();
  clusterInstanceBean.setAlias(alias);
  clusterInstanceBean.setServiceName(cluster.getServiceName());
  clusterInstanceBean.setClusterId(cluster.getClusterId());
  clusterInstanceBean.setInstanceId(instanceId);
  clusterInstanceBean.setParentInstanceId(instanceId);
  if (cluster.getInstanceContexts(instanceId) != null) {
    clusterInstanceBean.setStatus(cluster.getInstanceContexts(instanceId).getStatus().toString());
  }
  clusterInstanceBean.setTenantRange(cluster.getTenantRange());
  clusterInstanceBean.setMember(new ArrayList<Member>());
  clusterInstanceBean.setHostNames(new ArrayList<String>());
  for (  org.apache.stratos.messaging.domain.topology.Member member : cluster.getMembers()) {
    if (member.getInstanceId().equals(instanceId)) {
      Member memberBean=new Member();
      memberBean.setClusterId(member.getClusterId());
      memberBean.setLbClusterId(member.getLbClusterId());
      memberBean.setNetworkPartitionId(member.getNetworkPartitionId());
      memberBean.setPartitionId(member.getPartitionId());
      memberBean.setMemberId(member.getMemberId());
      if (member.getMemberIp() == null) {
        memberBean.setMemberIp("String_Node_Str");
      }
 else {
        memberBean.setMemberIp(member.getMemberIp());
      }
      if (member.getMemberPublicIp() == null) {
        memberBean.setMemberPublicIp("String_Node_Str");
      }
 else {
        memberBean.setMemberPublicIp(member.getMemberPublicIp());
      }
      memberBean.setServiceName(member.getServiceName());
      memberBean.setStatus(member.getStatus().toString());
      memberBean.setProperty(convertJavaUtilPropertiesToPropertyBeans(member.getProperties()));
      clusterInstanceBean.getMember().add(memberBean);
    }
  }
  for (  String hostname : cluster.getHostNames()) {
    clusterInstanceBean.getHostNames().add(hostname);
  }
  return clusterInstanceBean;
}

Fixed version (ground truth):
public static ClusterInstanceBean convertClusterToClusterInstanceBean(String instanceId,Cluster cluster,String alias){
  ClusterInstanceBean clusterInstanceBean=new ClusterInstanceBean();
  clusterInstanceBean.setAlias(alias);
  clusterInstanceBean.setServiceName(cluster.getServiceName());
  clusterInstanceBean.setClusterId(cluster.getClusterId());
  clusterInstanceBean.setInstanceId(instanceId);
  clusterInstanceBean.setParentInstanceId(instanceId);
  if (cluster.getInstanceContexts(instanceId) != null) {
    clusterInstanceBean.setStatus(cluster.getInstanceContexts(instanceId).getStatus().toString());
  }
  clusterInstanceBean.setTenantRange(cluster.getTenantRange());
  clusterInstanceBean.setMember(new ArrayList<Member>());
  clusterInstanceBean.setHostNames(new ArrayList<String>());
  for (  org.apache.stratos.messaging.domain.topology.Member member : cluster.getMembers()) {
    if (member.getClusterInstanceId().equals(instanceId)) {
      Member memberBean=new Member();
      memberBean.setClusterId(member.getClusterId());
      memberBean.setLbClusterId(member.getLbClusterId());
      memberBean.setNetworkPartitionId(member.getNetworkPartitionId());
      memberBean.setPartitionId(member.getPartitionId());
      memberBean.setMemberId(member.getMemberId());
      if (member.getMemberIp() == null) {
        memberBean.setMemberIp("String_Node_Str");
      }
 else {
        memberBean.setMemberIp(member.getMemberIp());
      }
      if (member.getMemberPublicIp() == null) {
        memberBean.setMemberPublicIp("String_Node_Str");
      }
 else {
        memberBean.setMemberPublicIp(member.getMemberPublicIp());
      }
      memberBean.setServiceName(member.getServiceName());
      memberBean.setStatus(member.getStatus().toString());
      memberBean.setProperty(convertJavaUtilPropertiesToPropertyBeans(member.getProperties()));
      clusterInstanceBean.getMember().add(memberBean);
    }
  }
  for (  String hostname : cluster.getHostNames()) {
    clusterInstanceBean.getHostNames().add(hostname);
  }
  return clusterInstanceBean;
}