Program: 74012
Project: 74012
Buggy source:
/** 
 * Check the consistency of input/output ports. The following things are checked. <p> If an input port is a sensor port (no annotation), then it should not be connected to a NetworkInputDevice. Also, it should not have a networkDelay attribute. </p><p> If an input port is a network port (annotated networkPort), then it should always be connected to a NetworkInputDeivce. Also, it should not have a realTimeDelay attribute. </p>
 * @throws IllegalActionException 
 */
protected void _checkSensorActuatorNetworkConsistency() throws IllegalActionException {
  for (  TypedIOPort port : (List<TypedIOPort>)(((TypedCompositeActor)getContainer()).inputPortList())) {
    for (    TypedIOPort sinkPort : (List<TypedIOPort>)port.sinkPortList()) {
      if (_isNetworkPort(port)) {
        if (!(sinkPort.getContainer() instanceof NetworkInputDevice)) {
          throw new IllegalActionException(port,sinkPort.getContainer(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str");
        }
        Parameter parameter=(Parameter)((NamedObj)port).getAttribute("String_Node_Str");
        if (parameter != null) {
          throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
      }
 else {
        if (sinkPort.getContainer() instanceof NetworkInputDevice) {
          throw new IllegalActionException(port,sinkPort.getContainer(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
        Parameter parameter=(Parameter)((NamedObj)port).getAttribute("String_Node_Str");
        if (parameter != null) {
          throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Check the consistency of input/output ports. The following things are checked. <p> If an input port is a sensor port (no annotation), then it should not be connected to a NetworkInputDevice. Also, it should not have a networkDelay attribute. </p><p> If an input port is a network port (annotated networkPort), then it should always be connected to a NetworkInputDeivce. Also, it should not have a realTimeDelay attribute. </p>
 * @throws IllegalActionException 
 */
protected void _checkSensorActuatorNetworkConsistency() throws IllegalActionException {
  for (  TypedIOPort port : (List<TypedIOPort>)(((TypedCompositeActor)getContainer()).inputPortList())) {
    for (    TypedIOPort sinkPort : (List<TypedIOPort>)port.deepInsidePortList()) {
      if (_isNetworkPort(port)) {
        if (!(sinkPort.getContainer() instanceof NetworkInputDevice)) {
          throw new IllegalActionException(port,sinkPort.getContainer(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str");
        }
        Parameter parameter=(Parameter)((NamedObj)port).getAttribute("String_Node_Str");
        if (parameter != null) {
          throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
      }
 else {
        if (sinkPort.getContainer() instanceof NetworkInputDevice) {
          throw new IllegalActionException(port,sinkPort.getContainer(),"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
        Parameter parameter=(Parameter)((NamedObj)port).getAttribute("String_Node_Str");
        if (parameter != null) {
          throw new IllegalActionException(port,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
      }
    }
  }
}