Program: 50271
Project: 50271
Buggy source:
private void joinWithMulticast(){
  int tryCount=0;
  while (!joined) {
    try {
      logger.log(Level.FINEST,"String_Node_Str" + masterAddress);
      if (masterAddress == null) {
        masterAddress=findMaster();
        if (masterAddress == null || masterAddress.equals(address)) {
          TcpIpConfig tcpIpConfig=config.getNetworkConfig().getJoin().getTcpIpConfig();
          if (tcpIpConfig != null && tcpIpConfig.isEnabled()) {
            masterAddress=null;
            logger.log(Level.FINEST,"String_Node_Str");
            joinWithTCP();
          }
 else {
            setAsMaster();
          }
          return;
        }
      }
      if (tryCount++ > 20) {
        StringBuilder sb=new StringBuilder();
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + tryCount);
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + address);
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + masterAddress);
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + connectionManager.getConnection(masterAddress));
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        logger.log(Level.WARNING,sb.toString());
        tryCount=0;
      }
      if (!masterAddress.equals(address)) {
        connectAndSendJoinRequest(masterAddress);
      }
 else {
        masterAddress=null;
        tryCount=0;
      }
      Thread.sleep(500L);
    }
 catch (    final Exception e) {
      logger.log(Level.FINEST,"String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private void joinWithMulticast(){
  int tryCount=0;
  while (!joined) {
    try {
      logger.log(Level.FINEST,"String_Node_Str" + masterAddress);
      masterAddress=null;
      masterAddress=findMaster();
      if (masterAddress == null) {
        if (masterAddress == null || masterAddress.equals(address)) {
          TcpIpConfig tcpIpConfig=config.getNetworkConfig().getJoin().getTcpIpConfig();
          if (tcpIpConfig != null && tcpIpConfig.isEnabled()) {
            masterAddress=null;
            logger.log(Level.FINEST,"String_Node_Str");
            joinWithTCP();
          }
 else {
            setAsMaster();
          }
          return;
        }
      }
      if (tryCount++ > 20) {
        StringBuilder sb=new StringBuilder();
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + tryCount);
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + address);
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + masterAddress);
        sb.append("String_Node_Str");
        sb.append("String_Node_Str" + connectionManager.getConnection(masterAddress));
        sb.append("String_Node_Str");
        sb.append("String_Node_Str");
        logger.log(Level.WARNING,sb.toString());
        tryCount=0;
      }
      if (!masterAddress.equals(address)) {
        connectAndSendJoinRequest(masterAddress);
      }
 else {
        masterAddress=null;
        tryCount=0;
      }
      Thread.sleep(500L);
    }
 catch (    final Exception e) {
      logger.log(Level.FINEST,"String_Node_Str",e);
    }
  }
}