Program: 6919
Project: 6919
Buggy source:
public ControlConnection connectTo(Node node,List<EndPoint> alreadyTriedEps,boolean indirectAllowed){
  nextEp:   for (  EndPoint ep : node.getEndPointList()) {
    if (isEonUrl(ep.getUrl())) {
      if (alreadyTriedEps != null) {
        for (        EndPoint triedEp : alreadyTriedEps) {
          if (triedEp.equals(ep))           continue nextEp;
        }
      }
      EonEndPoint theirEp=EonEndPoint.parse(ep.getUrl());
      try {
        if (!(theirEp instanceof SeonEndPoint))         continue;
        if ((theirEp instanceof SeonNatTraversalEndPoint) && (natTraversalEp != null) && indirectAllowed) {
          if (natTraversalEp == null)           continue;
          if (indirectAllowed) {
            InetSocketAddress natSeedEp=new InetSocketAddress(theirEp.getAddress(),theirEp.getUdpPort());
            log.debug("String_Node_Str" + natSeedEp);
            eonMgr.sendNATSeed(natSeedEp);
            return null;
          }
        }
        log.info("String_Node_Str" + node.getId() + "String_Node_Str"+ theirEp.getUrl());
        SEONConnection newConn=eonMgr.createSEONConnection();
        EonSocketAddress theirSockAddr=new EonSocketAddress(theirEp.getAddress(),theirEp.getUdpPort(),theirEp.getEonPort());
        newConn.connect(theirSockAddr);
        EonSocketAddress mySockAddr=newConn.getLocalSocketAddress();
        EonEndPoint myEp=new SeonEndPoint(mySockAddr.getAddress(),mySockAddr.getUdpPort(),mySockAddr.getEonPort());
        EonConnectionFactory scm=new EonConnectionFactory(eonMgr,mina);
        ControlConnection cc=new ControlConnection(mina,node,myEp.toMsg(),theirEp.toMsg(),newConn,scm);
        return cc;
      }
 catch (      EONException e) {
        log.error("String_Node_Str" + theirEp);
        return null;
      }
    }
  }
  return null;
}

Fixed version (ground truth):
public ControlConnection connectTo(Node node,List<EndPoint> alreadyTriedEps,boolean indirectAllowed){
  nextEp:   for (  EndPoint ep : node.getEndPointList()) {
    if (isEonUrl(ep.getUrl())) {
      if (alreadyTriedEps != null) {
        for (        EndPoint triedEp : alreadyTriedEps) {
          if (triedEp.equals(ep))           continue nextEp;
        }
      }
      EonEndPoint theirEp=EonEndPoint.parse(ep.getUrl());
      try {
        if (!(theirEp instanceof SeonEndPoint))         continue;
        if (theirEp instanceof SeonNatTraversalEndPoint) {
          if ((!natTraversalDecided) || natTraversalEp == null)           continue;
          if (indirectAllowed) {
            InetSocketAddress natSeedEp=new InetSocketAddress(theirEp.getAddress(),theirEp.getUdpPort());
            log.debug("String_Node_Str" + natSeedEp);
            eonMgr.sendNATSeed(natSeedEp);
            return null;
          }
        }
        log.info("String_Node_Str" + node.getId() + "String_Node_Str"+ theirEp.getUrl());
        SEONConnection newConn=eonMgr.createSEONConnection();
        EonSocketAddress theirSockAddr=new EonSocketAddress(theirEp.getAddress(),theirEp.getUdpPort(),theirEp.getEonPort());
        newConn.connect(theirSockAddr);
        EonSocketAddress mySockAddr=newConn.getLocalSocketAddress();
        EonEndPoint myEp=new SeonEndPoint(mySockAddr.getAddress(),mySockAddr.getUdpPort(),mySockAddr.getEonPort());
        EonConnectionFactory scm=new EonConnectionFactory(eonMgr,mina);
        ControlConnection cc=new ControlConnection(mina,node,myEp.toMsg(),theirEp.toMsg(),newConn,scm);
        return cc;
      }
 catch (      EONException e) {
        log.error("String_Node_Str" + theirEp);
        return null;
      }
    }
  }
  return null;
}