Program: 159060
Project: 159060
Buggy source:
@Override public boolean apply(Game game,Ability source){
  Spell spell=game.getStack().getSpell(targetPointer.getFirst(game,source));
  if (spell != null) {
    UUID targetedGolem=(UUID)getValue("String_Node_Str");
    for (    Permanent permanent : game.getBattlefield().getActivePermanents(filterGolem,source.getControllerId(),source.getSourceId(),game)) {
      if (permanent.getId().equals(targetedGolem)) {
        continue;
      }
      boolean legal=true;
      for (      SpellTargetAddress addr : SpellTargetAddress.walk(spell)) {
        Target target=addr.getTarget(spell);
        if (!target.canTarget(permanent.getId(),game)) {
          legal=false;
          break;
        }
      }
      if (legal) {
        Spell copy=spell.copySpell();
        copy.setControllerId(spell.getControllerId());
        copy.setCopiedSpell(true);
        for (        SpellTargetAddress addr : SpellTargetAddress.walk(copy)) {
          Target target=addr.getTarget(copy);
          target.clearChosen();
          target.add(permanent.getId(),game);
        }
        game.getStack().push(copy);
      }
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  Spell spell=(Spell)getValue("String_Node_Str");
  if (spell != null) {
    UUID targetedGolem=(UUID)getValue("String_Node_Str");
    Map<UUID,Spell> targetable=new HashMap<>();
    for (    Permanent permanent : game.getBattlefield().getActivePermanents(filterGolem,source.getControllerId(),source.getSourceId(),game)) {
      if (permanent.getId().equals(targetedGolem)) {
        continue;
      }
      boolean legal=true;
      for (      SpellTargetAddress addr : SpellTargetAddress.walk(spell)) {
        Target target=addr.getTarget(spell);
        if (!target.canTarget(permanent.getId(),game)) {
          legal=false;
          break;
        }
      }
      if (legal) {
        Spell copy=spell.copySpell();
        copy.setCopiedSpell(true);
        for (        SpellTargetAddress addr : SpellTargetAddress.walk(copy)) {
          Target target=addr.getTarget(copy);
          target.clearChosen();
          target.add(permanent.getId(),game);
        }
        targetable.put(permanent.getId(),copy);
      }
    }
    UUID spellController=spell.getControllerId();
    while (targetable.size() > 0) {
      FilterPermanent filter=new FilterPermanent("String_Node_Str","String_Node_Str" + Integer.toString(targetable.size()) + "String_Node_Str");
      filter.add(new FromSetPredicate(targetable.keySet()));
      TargetPermanent target=new TargetPermanent(0,1,filter,true);
      if (target.possibleTargets(spellController,game).size() > 1 && target.canChoose(spell.getSourceId(),spellController,game)) {
        game.getPlayer(spellController).choose(Outcome.Neutral,target,source.getId(),game);
      }
      Collection<UUID> chosen=target.getTargets();
      if (chosen.size() == 0) {
        chosen=targetable.keySet();
      }
      List<UUID> toDelete=new ArrayList<>();
      for (      UUID chosenId : chosen) {
        Spell chosenCopy=targetable.get(chosenId);
        if (chosenCopy != null) {
          game.getStack().push(chosenCopy);
          toDelete.add(chosenId);
        }
      }
      for (      UUID id : toDelete) {
        targetable.remove(id);
      }
    }
    return true;
  }
  return false;
}