Program: 157831
Project: 157831
Buggy source:
@Override public void attachTo(UUID attachToObjectId,Game game){
  if (this.attachedTo != null && !Objects.equals(this.attachedTo,attachToObjectId)) {
    Permanent attachedToUntilNowObject=game.getPermanent(this.attachedTo);
    if (attachedToUntilNowObject != null) {
      attachedToUntilNowObject.removeAttachment(this.objectId,game);
    }
 else {
      Card attachedToUntilNowCard=game.getCard(this.attachedTo);
      if (attachedToUntilNowCard != null) {
        attachedToUntilNowCard.removeAttachment(this.objectId,game);
      }
    }
  }
  this.attachedTo=attachToObjectId;
  this.attachedToZoneChangeCounter=game.getState().getZoneChangeCounter(attachToObjectId);
  for (  Ability ability : this.getAbilities()) {
    for (Iterator<Effect> ite=ability.getEffects(game,EffectType.CONTINUOUS).iterator(); ite.hasNext(); ) {
      ContinuousEffect effect=(ContinuousEffect)ite.next();
      game.getContinuousEffects().setOrder(effect);
      for (      ContinuousEffect conEffect : game.getContinuousEffects().getLayeredEffects(game)) {
        if (conEffect.getId().equals(effect.getId())) {
          game.getContinuousEffects().setOrder(conEffect);
        }
      }
    }
  }
  if (getSpellAbility() == null) {
    logger.info("String_Node_Str" + getName());
    return;
  }
  if (!getSpellAbility().getTargets().isEmpty() && (getSpellAbility().getTargets().get(0) instanceof TargetCard)) {
    Card attachedToCard=game.getCard(this.getAttachedTo());
    if (attachedToCard != null) {
      this.addInfo("String_Node_Str",CardUtil.addToolTipMarkTags("String_Node_Str" + attachedToCard.getIdName()),game);
    }
  }
}

Fixed version (ground truth):
@Override public void attachTo(UUID attachToObjectId,Game game){
  if (this.attachedTo != null && !Objects.equals(this.attachedTo,attachToObjectId)) {
    Permanent attachedToUntilNowObject=game.getPermanent(this.attachedTo);
    if (attachedToUntilNowObject != null) {
      attachedToUntilNowObject.removeAttachment(this.objectId,game);
    }
 else {
      Card attachedToUntilNowCard=game.getCard(this.attachedTo);
      if (attachedToUntilNowCard != null) {
        attachedToUntilNowCard.removeAttachment(this.objectId,game);
      }
    }
  }
  this.attachedTo=attachToObjectId;
  this.attachedToZoneChangeCounter=game.getState().getZoneChangeCounter(attachToObjectId);
  for (  Ability ability : this.getAbilities()) {
    for (Iterator<Effect> ite=ability.getEffects(game,EffectType.CONTINUOUS).iterator(); ite.hasNext(); ) {
      ContinuousEffect effect=(ContinuousEffect)ite.next();
      game.getContinuousEffects().setOrder(effect);
      for (      ContinuousEffect conEffect : game.getContinuousEffects().getLayeredEffects(game)) {
        if (conEffect.getId().equals(effect.getId())) {
          game.getContinuousEffects().setOrder(conEffect);
        }
      }
    }
  }
  if (getSpellAbility() == null) {
    return;
  }
  if (!getSpellAbility().getTargets().isEmpty() && (getSpellAbility().getTargets().get(0) instanceof TargetCard)) {
    Card attachedToCard=game.getCard(this.getAttachedTo());
    if (attachedToCard != null) {
      this.addInfo("String_Node_Str",CardUtil.addToolTipMarkTags("String_Node_Str" + attachedToCard.getIdName()),game);
    }
  }
}