Program: 164437
Project: 164437
Buggy source:
public static void loadGame(String fileName,boolean fullLoad) throws IOException {
  Bundle bundle=gameBundle(fileName);
  Dungeon.level=null;
  Dungeon.depth=-1;
  if (fullLoad) {
    PathFinder.setMapSize(Level.WIDTH,Level.HEIGHT);
  }
  Scroll.restore(bundle);
  Potion.restore(bundle);
  Wand.restore(bundle);
  Ring.restore(bundle);
  potionOfStrength=bundle.getInt(POS);
  scrollsOfUpgrade=bundle.getInt(SOU);
  arcaneStyli=bundle.getInt(AS);
  dewVial=bundle.getBoolean(DV);
  transmutation=bundle.getInt(WT);
  if (fullLoad) {
    chapters=new HashSet<Integer>();
    int ids[]=bundle.getIntArray(CHAPTERS);
    if (ids != null) {
      for (      int id : ids) {
        chapters.add(id);
      }
    }
    Bundle quests=bundle.getBundle(QUESTS);
    if (!quests.isNull()) {
      Ghost.Quest.restoreFromBundle(quests);
      Wandmaker.Quest.restoreFromBundle(quests);
      Blacksmith.Quest.restoreFromBundle(quests);
      Imp.Quest.restoreFromBundle(quests);
    }
 else {
      Ghost.Quest.reset();
      Wandmaker.Quest.reset();
      Blacksmith.Quest.reset();
      Imp.Quest.reset();
    }
    Room.restoreRoomsFromBundle(bundle);
  }
  Bundle badges=bundle.getBundle(BADGES);
  if (!badges.isNull()) {
    Badges.loadLocal(badges);
  }
 else {
    Badges.reset();
  }
  String qsClass=bundle.getString(QUICKSLOT);
  if (qsClass != null) {
    try {
      quickslot=Class.forName(qsClass);
    }
 catch (    ClassNotFoundException e) {
    }
  }
 else {
    quickslot=null;
  }
  version=bundle.getInt(VERSION);
  hero=null;
  hero=(Hero)bundle.get(HERO);
  gold=bundle.getInt(GOLD);
  depth=bundle.getInt(DEPTH);
  Statistics.restoreFromBundle(bundle);
  Journal.restoreFromBundle(bundle);
}

Fixed version (ground truth):
public static void loadGame(String fileName,boolean fullLoad) throws IOException {
  Bundle bundle=gameBundle(fileName);
  version=bundle.getInt(VERSION);
  Dungeon.level=null;
  Dungeon.depth=-1;
  if (fullLoad) {
    PathFinder.setMapSize(Level.WIDTH,Level.HEIGHT);
  }
  Scroll.restore(bundle);
  Potion.restore(bundle);
  Wand.restore(bundle);
  Ring.restore(bundle);
  potionOfStrength=bundle.getInt(POS);
  scrollsOfUpgrade=bundle.getInt(SOU);
  arcaneStyli=bundle.getInt(AS);
  dewVial=bundle.getBoolean(DV);
  transmutation=bundle.getInt(WT);
  if (fullLoad) {
    chapters=new HashSet<Integer>();
    int ids[]=bundle.getIntArray(CHAPTERS);
    if (ids != null) {
      for (      int id : ids) {
        chapters.add(id);
      }
    }
    Bundle quests=bundle.getBundle(QUESTS);
    if (!quests.isNull()) {
      Ghost.Quest.restoreFromBundle(quests);
      Wandmaker.Quest.restoreFromBundle(quests);
      Blacksmith.Quest.restoreFromBundle(quests);
      Imp.Quest.restoreFromBundle(quests);
    }
 else {
      Ghost.Quest.reset();
      Wandmaker.Quest.reset();
      Blacksmith.Quest.reset();
      Imp.Quest.reset();
    }
    Room.restoreRoomsFromBundle(bundle);
  }
  Bundle badges=bundle.getBundle(BADGES);
  if (!badges.isNull()) {
    Badges.loadLocal(badges);
  }
 else {
    Badges.reset();
  }
  String qsClass=bundle.getString(QUICKSLOT);
  if (qsClass != null) {
    try {
      quickslot=Class.forName(qsClass);
    }
 catch (    ClassNotFoundException e) {
    }
  }
 else {
    quickslot=null;
  }
  hero=null;
  hero=(Hero)bundle.get(HERO);
  gold=bundle.getInt(GOLD);
  depth=bundle.getInt(DEPTH);
  Statistics.restoreFromBundle(bundle);
  Journal.restoreFromBundle(bundle);
}