Program: 167669
Project: 167669
Buggy source:
/** 
 * The send function. See OutputPort.send.
 */
@SuppressWarnings("String_Node_Str") synchronized boolean send(final Packet packet,final OutputPort op){
  sender=op.sender;
  Class c1=op.type;
  Class c2=packet.getContent().getClass();
  if (c1 != null && !c1.isAssignableFrom(c2)) {
    FlowError.complain(getName() + "String_Node_Str" + c2.getSimpleName()+ "String_Node_Str"+ c1.getSimpleName());
  }
  if (isClosed()) {
    sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
    return false;
  }
  while (isFull()) {
    if (dropOldest) {
      array[receivePtr]=null;
      if (capacity == (receivePtr=receivePtr + 1)) {
        receivePtr=0;
      }
      sender.network.dropOlds.getAndIncrement();
      sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
      usedSlots--;
    }
 else {
      sender.curOutPort=op;
      sender.status=Component.StatusValues.SUSP_SEND;
      sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
      try {
        wait();
      }
 catch (      InterruptedException e) {
        indicateOneSenderClosed();
        FlowError.complain(sender.getName() + "String_Node_Str");
        return false;
      }
      sender=op.sender;
      sender.status=Component.StatusValues.ACTIVE;
      sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
    }
  }
  if (isClosed()) {
    sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
    return false;
  }
  sender.mother.traceLocks("String_Node_Str" + getReceiver().getName());
  try {
    getReceiver().goLock.lockInterruptibly();
    packet.clearOwner();
    array[sendPtr]=packet;
    if (capacity == (sendPtr=sendPtr + 1)) {
      sendPtr=0;
    }
    usedSlots++;
    if (getReceiver().getStatus() == Component.StatusValues.DORMANT || getReceiver().getStatus() == Component.StatusValues.NOT_STARTED) {
      getReceiver().activate();
    }
 else {
      notifyAll();
    }
    op.sender.status=Component.StatusValues.ACTIVE;
    sender.network.active=true;
  }
 catch (  InterruptedException ex) {
    return false;
  }
catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
 finally {
    getReceiver().goLock.unlock();
    getReceiver().mother.traceLocks("String_Node_Str" + getReceiver().getName());
  }
  sender.network.sends.getAndIncrement();
  sender=null;
  return true;
}

Fixed version (ground truth):
/** 
 * The send function. See OutputPort.send.
 */
@SuppressWarnings("String_Node_Str") synchronized boolean send(final Packet packet,final OutputPort op){
  sender=op.sender;
  Class c1=op.type;
  Class c2=packet.getContent().getClass();
  if (c1 != null && !c1.isAssignableFrom(c2)) {
    FlowError.complain(getName() + "String_Node_Str" + c2.getSimpleName()+ "String_Node_Str"+ c1.getSimpleName());
  }
  if (isClosed()) {
    sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
    return false;
  }
  while (isFull()) {
    if (dropOldest) {
      array[receivePtr]=null;
      if (capacity == (receivePtr=receivePtr + 1)) {
        receivePtr=0;
      }
      sender.network.dropOlds.getAndIncrement();
      sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
      usedSlots--;
    }
 else {
      sender.curOutPort=op;
      sender.status=Component.StatusValues.SUSP_SEND;
      sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
      try {
        wait();
      }
 catch (      InterruptedException e) {
        indicateOneSenderClosed();
        FlowError.complain(sender.getName() + "String_Node_Str");
        return false;
      }
      sender=op.sender;
      sender.status=Component.StatusValues.ACTIVE;
      sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
    }
  }
  if (isClosed()) {
    sender.mother.traceFuncs(sender.getName() + "String_Node_Str");
    return false;
  }
  sender.mother.traceLocks("String_Node_Str" + getReceiver().getName());
  try {
    getReceiver().goLock.lockInterruptibly();
    packet.clearOwner();
    array[sendPtr]=packet;
    if (capacity == (sendPtr=sendPtr + 1)) {
      sendPtr=0;
    }
    usedSlots++;
    if (getReceiver().getStatus() == Component.StatusValues.DORMANT || getReceiver().getStatus() == Component.StatusValues.NOT_STARTED || getReceiver().getStatus() == Component.StatusValues.SUSP_FIPE) {
      getReceiver().activate();
    }
 else {
      notifyAll();
    }
    op.sender.status=Component.StatusValues.ACTIVE;
    sender.network.active=true;
  }
 catch (  InterruptedException ex) {
    return false;
  }
catch (  Exception e) {
    e.printStackTrace();
    return false;
  }
 finally {
    getReceiver().goLock.unlock();
    getReceiver().mother.traceLocks("String_Node_Str" + getReceiver().getName());
  }
  sender.network.sends.getAndIncrement();
  sender=null;
  return true;
}