Program: 115471
Project: 115471
Buggy source:
private void createConfig(Service service,Cluster cluster,StringBuilder frontendCollection,StringBuilder backendCollection){
  if ((service.getPorts() == null) || (service.getPorts().size() == 0)) {
    throw new RuntimeException(String.format("String_Node_Str",service.getServiceName()));
  }
  for (  Port port : service.getPorts()) {
    String protocol=port.getProtocol();
    String frontendId=protocol + "String_Node_Str" + port.getValue()+ "String_Node_Str";
    frontendCollection.append("String_Node_Str").append(frontendId).append(NEW_LINE);
    frontendCollection.append("String_Node_Str").append(HAProxyContext.getInstance().getHAProxyPrivateIp()).append("String_Node_Str").append(port.getProxy()).append(NEW_LINE);
    frontendCollection.append("String_Node_Str").append(protocol).append(NEW_LINE);
    for (    String hostname : cluster.getHostNames()) {
      String backendId=hostname + "String_Node_Str" + protocol+ "String_Node_Str"+ port.getValue()+ "String_Node_Str";
      frontendCollection.append("String_Node_Str").append("String_Node_Str").append(hostname).append("String_Node_Str").append(hostname).append(NEW_LINE);
      frontendCollection.append("String_Node_Str").append(backendId).append("String_Node_Str").append(hostname).append(NEW_LINE);
      backendCollection.append("String_Node_Str").append(backendId).append(NEW_LINE);
      backendCollection.append("String_Node_Str").append(protocol).append(NEW_LINE);
      for (      Member member : cluster.getMembers()) {
        backendCollection.append("String_Node_Str").append(member.getMemberId()).append("String_Node_Str").append(member.getHostName()).append("String_Node_Str").append(port.getValue()).append(NEW_LINE);
      }
      backendCollection.append(NEW_LINE);
    }
  }
}

Fixed version (ground truth):
private void createConfig(Cluster cluster,StringBuilder frontendCollection,StringBuilder backendCollection){
  if ((cluster.getMembers() == null) || (cluster.getMembers().size() == 0)) {
    return;
  }
  Member firstMember=(Member)cluster.getMembers().toArray()[0];
  Collection<Port> ports=firstMember.getPorts();
  for (  Port port : ports) {
    String protocol=port.getProtocol();
    String frontendId=protocol + "String_Node_Str" + port.getValue()+ "String_Node_Str";
    frontendCollection.append("String_Node_Str").append(frontendId).append(NEW_LINE);
    frontendCollection.append("String_Node_Str").append(HAProxyContext.getInstance().getHAProxyPrivateIp()).append("String_Node_Str").append(port.getProxy()).append(NEW_LINE);
    frontendCollection.append("String_Node_Str").append(protocol).append(NEW_LINE);
    for (    String hostname : cluster.getHostNames()) {
      String backendId=hostname + "String_Node_Str" + protocol+ "String_Node_Str"+ port.getValue()+ "String_Node_Str";
      frontendCollection.append("String_Node_Str").append("String_Node_Str").append(hostname).append("String_Node_Str").append(hostname).append(NEW_LINE);
      frontendCollection.append("String_Node_Str").append(backendId).append("String_Node_Str").append(hostname).append(NEW_LINE);
      backendCollection.append("String_Node_Str").append(backendId).append(NEW_LINE);
      backendCollection.append("String_Node_Str").append(protocol).append(NEW_LINE);
      for (      Member member : cluster.getMembers()) {
        backendCollection.append("String_Node_Str").append(member.getMemberId()).append("String_Node_Str").append(member.getHostName()).append("String_Node_Str").append(port.getValue()).append(NEW_LINE);
      }
      backendCollection.append(NEW_LINE);
    }
  }
}