Program: 106866
Project: 106866
Buggy source:
private Runnable getNotificationTask(){
  return new Runnable(){
    @Override public void run(){
      while (true) {
synchronized (_notificationMsgs) {
          try {
            _notificationMsgs.wait(1000);
          }
 catch (          InterruptedException e) {
          }
        }
        ClusterManagerMessage msg=null;
        while ((msg=getNextNotificationMessage()) != null) {
          try {
switch (msg.getMessageType()) {
case nodeAdded:
              if (msg.getNodes() != null && msg.getNodes().size() > 0) {
                Profiler profiler=new Profiler();
                profiler.start();
                notifyNodeJoined(msg.getNodes());
                profiler.stop();
                if (profiler.getDuration() > 1000) {
                  if (s_logger.isDebugEnabled()) {
                    s_logger.debug("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
                  }
                }
 else {
                  s_logger.warn("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
                }
              }
            break;
case nodeRemoved:
          if (msg.getNodes() != null && msg.getNodes().size() > 0) {
            Profiler profiler=new Profiler();
            profiler.start();
            notifyNodeLeft(msg.getNodes());
            profiler.stop();
            if (profiler.getDuration() > 1000) {
              if (s_logger.isDebugEnabled()) {
                s_logger.debug("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
              }
            }
 else {
              s_logger.warn("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
            }
          }
        break;
case nodeIsolated:
      notifyNodeIsolated();
    break;
default :
  assert(false);
break;
}
}
 catch (Throwable e) {
s_logger.warn("String_Node_Str",e);
}
}
try {
Thread.currentThread().sleep(1000);
}
 catch (InterruptedException e) {
}
}
}
}
;
}

Fixed version (ground truth):
private Runnable getNotificationTask(){
  return new Runnable(){
    @Override public void run(){
      while (true) {
synchronized (_notificationMsgs) {
          try {
            _notificationMsgs.wait(1000);
          }
 catch (          InterruptedException e) {
          }
        }
        ClusterManagerMessage msg=null;
        while ((msg=getNextNotificationMessage()) != null) {
          try {
switch (msg.getMessageType()) {
case nodeAdded:
              if (msg.getNodes() != null && msg.getNodes().size() > 0) {
                Profiler profiler=new Profiler();
                profiler.start();
                notifyNodeJoined(msg.getNodes());
                profiler.stop();
                if (profiler.getDuration() > 1000) {
                  if (s_logger.isDebugEnabled()) {
                    s_logger.debug("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
                  }
                }
 else {
                  s_logger.warn("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
                }
              }
            break;
case nodeRemoved:
          if (msg.getNodes() != null && msg.getNodes().size() > 0) {
            Profiler profiler=new Profiler();
            profiler.start();
            notifyNodeLeft(msg.getNodes());
            profiler.stop();
            if (profiler.getDuration() > 1000) {
              if (s_logger.isDebugEnabled()) {
                s_logger.debug("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
              }
            }
 else {
              s_logger.warn("String_Node_Str" + profiler.getDuration() + "String_Node_Str");
            }
          }
        break;
case nodeIsolated:
      notifyNodeIsolated();
    break;
default :
  assert(false);
break;
}
}
 catch (Throwable e) {
s_logger.warn("String_Node_Str",e);
}
}
try {
Thread.sleep(1000);
}
 catch (InterruptedException e) {
}
}
}
}
;
}