Program: 159106
Project: 159106
Buggy source:
@Override public boolean putOntoBattlefield(Game game,Zone fromZone,UUID sourceId,UUID controllerId,boolean tapped,ArrayList<UUID> appliedEffects){
  ZoneChangeEvent event=new ZoneChangeEvent(this.objectId,sourceId,controllerId,fromZone,Zone.BATTLEFIELD,appliedEffects,tapped);
  if (!game.replaceEvent(event)) {
    if (fromZone != null) {
      boolean removed=false;
switch (fromZone) {
case GRAVEYARD:
        removed=game.getPlayer(ownerId).removeFromGraveyard(this,game);
      break;
case HAND:
    removed=game.getPlayer(ownerId).removeFromHand(this,game);
  break;
case LIBRARY:
removed=game.getPlayer(ownerId).removeFromLibrary(this,game);
break;
case EXILED:
game.getExile().removeCard(this,game);
if (isFaceDown()) {
this.setFaceDown(false);
}
removed=true;
break;
case COMMAND:
removed=true;
break;
case PICK:
removed=true;
break;
default :
logger.warn("String_Node_Str" + fromZone);
}
game.rememberLKI(objectId,event.getFromZone(),this);
if (!removed) {
logger.warn("String_Node_Str" + getName() + "String_Node_Str"+ fromZone);
}
}
updateZoneChangeCounter();
PermanentCard permanent=new PermanentCard(this,controllerId);
game.resetForSourceId(permanent.getId());
game.addPermanent(permanent);
game.setZone(objectId,Zone.BATTLEFIELD);
game.setScopeRelevant(true);
permanent.setTapped(tapped);
permanent.entersBattlefield(sourceId,game,event.getFromZone(),true);
game.setScopeRelevant(false);
game.applyEffects();
game.fireEvent(new ZoneChangeEvent(permanent,controllerId,fromZone,Zone.BATTLEFIELD));
return true;
}
return false;
}

Fixed version (ground truth):
@Override public boolean putOntoBattlefield(Game game,Zone fromZone,UUID sourceId,UUID controllerId,boolean tapped,ArrayList<UUID> appliedEffects){
  ZoneChangeEvent event=new ZoneChangeEvent(this.objectId,sourceId,controllerId,fromZone,Zone.BATTLEFIELD,appliedEffects,tapped);
  if (!game.replaceEvent(event)) {
    if (fromZone != null) {
      boolean removed=false;
switch (fromZone) {
case GRAVEYARD:
        removed=game.getPlayer(ownerId).removeFromGraveyard(this,game);
      break;
case HAND:
    removed=game.getPlayer(ownerId).removeFromHand(this,game);
  break;
case LIBRARY:
removed=game.getPlayer(ownerId).removeFromLibrary(this,game);
break;
case EXILED:
game.getExile().removeCard(this,game);
if (isFaceDown()) {
this.setFaceDown(false);
}
removed=true;
break;
case COMMAND:
removed=true;
break;
case PICK:
removed=true;
break;
default :
logger.warn("String_Node_Str" + fromZone);
}
game.rememberLKI(objectId,event.getFromZone(),this);
if (!removed) {
logger.warn("String_Node_Str" + getName() + "String_Node_Str"+ fromZone);
}
}
updateZoneChangeCounter();
PermanentCard permanent=new PermanentCard(this,controllerId);
game.resetForSourceId(permanent.getId());
game.getContinuousEffects().setController(objectId,controllerId);
game.addPermanent(permanent);
game.setZone(objectId,Zone.BATTLEFIELD);
game.setScopeRelevant(true);
permanent.setTapped(tapped);
permanent.entersBattlefield(sourceId,game,event.getFromZone(),true);
game.setScopeRelevant(false);
game.applyEffects();
game.fireEvent(new ZoneChangeEvent(permanent,controllerId,fromZone,Zone.BATTLEFIELD));
return true;
}
return false;
}