Program: 159313
Project: 159313
Buggy source:
@Override public boolean apply(Game game,Ability source){
  TargetCardInLibrary target=new TargetCardInLibrary(0,2,new FilterBasicLandCard());
  Player player=game.getPlayer(source.getControllerId());
  if (player.searchLibrary(target,game)) {
    if (target.getTargets().size() > 0) {
      Cards revealed=new CardsImpl();
      for (      UUID cardId : (List<UUID>)target.getTargets()) {
        Card card=player.getLibrary().getCard(cardId,game);
        revealed.add(card);
      }
      player.revealCards("String_Node_Str",revealed,game);
      if (target.getTargets().size() == 2) {
        TargetCard target2=new TargetCard(Zone.PICK,filter);
        player.choose(Outcome.Benefit,revealed,target2,game);
        Card card=revealed.get(target2.getFirstTarget(),game);
        card.putOntoBattlefield(game,Zone.LIBRARY,source.getId(),source.getControllerId());
        revealed.remove(card);
        Permanent permanent=game.getPermanent(card.getId());
        if (permanent != null)         permanent.setTapped(true);
        card=revealed.getCards(game).iterator().next();
        card.moveToZone(Zone.HAND,source.getId(),game,false);
      }
 else       if (target.getTargets().size() == 1) {
        Card card=revealed.getCards(game).iterator().next();
        card.putOntoBattlefield(game,Zone.LIBRARY,source.getId(),source.getControllerId());
        Permanent permanent=game.getPermanent(card.getId());
        if (permanent != null)         permanent.setTapped(true);
      }
    }
    player.shuffleLibrary(game);
    return true;
  }
  player.shuffleLibrary(game);
  return false;
}

Fixed version (ground truth):
@Override public boolean apply(Game game,Ability source){
  TargetCardInLibrary target=new TargetCardInLibrary(0,2,new FilterBasicLandCard());
  Player player=game.getPlayer(source.getControllerId());
  if (player.searchLibrary(target,game)) {
    if (target.getTargets().size() > 0) {
      Cards revealed=new CardsImpl();
      for (      UUID cardId : (List<UUID>)target.getTargets()) {
        Card card=player.getLibrary().getCard(cardId,game);
        revealed.add(card);
      }
      player.revealCards("String_Node_Str",revealed,game);
      if (target.getTargets().size() == 2) {
        TargetCard target2=new TargetCard(Zone.PICK,filter);
        player.choose(Outcome.Benefit,revealed,target2,game);
        Card card=revealed.get(target2.getFirstTarget(),game);
        card.putOntoBattlefield(game,Zone.LIBRARY,source.getId(),source.getControllerId());
        revealed.remove(card);
        Permanent permanent=game.getPermanent(card.getId());
        if (permanent != null) {
          permanent.setTapped(true);
        }
        card=revealed.getCards(game).iterator().next();
        card.moveToZone(Zone.HAND,source.getId(),game,false);
      }
 else       if (target.getTargets().size() == 1) {
        Card card=revealed.getCards(game).iterator().next();
        card.putOntoBattlefield(game,Zone.LIBRARY,source.getId(),source.getControllerId());
        Permanent permanent=game.getPermanent(card.getId());
        if (permanent != null)         permanent.setTapped(true);
      }
    }
    player.shuffleLibrary(game);
    return true;
  }
  player.shuffleLibrary(game);
  return false;
}