Program: 107650
Project: 107650
Buggy source:
/** 
 * Notifies this instance that the value of its <tt>startedDirection</tt> property has changed from a specific <tt>oldValue</tt> to a specific <tt>newValue</tt>.
 * @param oldValue the <tt>MediaDirection</tt> which used to be the value ofthe <tt>startedDirection</tt> property of this instance
 * @param newValue the <tt>MediaDirection</tt> which is the value of the<tt>startedDirection</tt> property of this instance
 */
@Override protected void startedDirectionChanged(MediaDirection oldValue,MediaDirection newValue){
  super.startedDirectionChanged(oldValue,newValue);
  try {
    Player localPlayer;
synchronized (localPlayerSyncRoot) {
      localPlayer=this.localPlayer;
    }
    if (newValue.allowsSending()) {
      if (localPlayer == null)       createLocalVisualComponent();
    }
 else     if (localPlayer != null) {
      disposeLocalPlayer(localPlayer);
    }
  }
 catch (  Throwable t) {
    if (t instanceof ThreadDeath)     throw (ThreadDeath)t;
 else {
      logger.error("String_Node_Str",t);
    }
  }
  for (  Player player : getPlayers()) {
    int state=player.getState();
    if (state < Player.Realized)     continue;
    if (newValue.allowsReceiving()) {
      if (state != Player.Started) {
        player.start();
        Component visualComponent=getVisualComponent(player);
        if (visualComponent != null) {
          fireVideoEvent(VideoEvent.VIDEO_ADDED,visualComponent,VideoEvent.REMOTE,false);
        }
      }
    }
 else     if (state > Processor.Configured) {
      Component visualComponent=getVisualComponent(player);
      player.stop();
      if (visualComponent != null) {
        fireVideoEvent(VideoEvent.VIDEO_REMOVED,visualComponent,VideoEvent.REMOTE,false);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Notifies this instance that the value of its <tt>startedDirection</tt> property has changed from a specific <tt>oldValue</tt> to a specific <tt>newValue</tt>.
 * @param oldValue the <tt>MediaDirection</tt> which used to be the value ofthe <tt>startedDirection</tt> property of this instance
 * @param newValue the <tt>MediaDirection</tt> which is the value of the<tt>startedDirection</tt> property of this instance
 */
@Override protected void startedDirectionChanged(MediaDirection oldValue,MediaDirection newValue){
  super.startedDirectionChanged(oldValue,newValue);
  try {
    Player localPlayer;
synchronized (localPlayerSyncRoot) {
      localPlayer=getLocalPlayer();
    }
    if (newValue.allowsSending()) {
      if (localPlayer == null)       createLocalVisualComponent();
    }
 else     if (localPlayer != null) {
      disposeLocalPlayer(localPlayer);
    }
  }
 catch (  Throwable t) {
    if (t instanceof ThreadDeath)     throw (ThreadDeath)t;
 else {
      logger.error("String_Node_Str",t);
    }
  }
  for (  Player player : getPlayers()) {
    int state=player.getState();
    if (state < Player.Realized)     continue;
    if (newValue.allowsReceiving()) {
      if (state != Player.Started) {
        player.start();
        Component visualComponent=getVisualComponent(player);
        if (visualComponent != null) {
          fireVideoEvent(VideoEvent.VIDEO_ADDED,visualComponent,VideoEvent.REMOTE,false);
        }
      }
    }
 else     if (state > Processor.Configured) {
      Component visualComponent=getVisualComponent(player);
      player.stop();
      if (visualComponent != null) {
        fireVideoEvent(VideoEvent.VIDEO_REMOVED,visualComponent,VideoEvent.REMOTE,false);
      }
    }
  }
}