Buggy code:
public class Imp extends NPC { private static final String TXT_GOLEMS1 = "Are<seq2seq4repair_space>you<seq2seq4repair_space>an<seq2seq4repair_space>adventurer?<seq2seq4repair_space>I<seq2seq4repair_space>love<seq2seq4repair_space>adventurers!<seq2seq4repair_space>You<seq2seq4repair_space>can<seq2seq4repair_space>always<seq2seq4repair_space>rely<seq2seq4repair_space>on<seq2seq4repair_space>them<seq2seq4repair_space>" + ( ( ( ( "if<seq2seq4repair_space>something<seq2seq4repair_space>needs<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>killed.<seq2seq4repair_space>Am<seq2seq4repair_space>I<seq2seq4repair_space>right?<seq2seq4repair_space>For<seq2seq4repair_space>bounty<seq2seq4repair_space>of<seq2seq4repair_space>course<seq2seq4repair_space>;)\n" + "In<seq2seq4repair_space>my<seq2seq4repair_space>case<seq2seq4repair_space>this<seq2seq4repair_space>is<seq2seq4repair_space>_golems_<seq2seq4repair_space>who<seq2seq4repair_space>need<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>killed.<seq2seq4repair_space>You<seq2seq4repair_space>see,<seq2seq4repair_space>I'm<seq2seq4repair_space>going<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>a<seq2seq4repair_space>" ) + "little<seq2seq4repair_space>business<seq2seq4repair_space>here,<seq2seq4repair_space>but<seq2seq4repair_space>these<seq2seq4repair_space>stupid<seq2seq4repair_space>golems<seq2seq4repair_space>are<seq2seq4repair_space>bad<seq2seq4repair_space>for<seq2seq4repair_space>business!<seq2seq4repair_space>" ) + "It's<seq2seq4repair_space>very<seq2seq4repair_space>hard<seq2seq4repair_space>to<seq2seq4repair_space>negotiate<seq2seq4repair_space>with<seq2seq4repair_space>wandering<seq2seq4repair_space>lumps<seq2seq4repair_space>of<seq2seq4repair_space>granite,<seq2seq4repair_space>damn<seq2seq4repair_space>them!<seq2seq4repair_space>" ) + "So<seq2seq4repair_space>please,<seq2seq4repair_space>kill...<seq2seq4repair_space>let's<seq2seq4repair_space>say<seq2seq4repair_space>_6<seq2seq4repair_space>of<seq2seq4repair_space>them_<seq2seq4repair_space>and<seq2seq4repair_space>a<seq2seq4repair_space>reward<seq2seq4repair_space>is<seq2seq4repair_space>yours." ) ; private static final String TXT_MONKS1 = "Are<seq2seq4repair_space>you<seq2seq4repair_space>an<seq2seq4repair_space>adventurer?<seq2seq4repair_space>I<seq2seq4repair_space>love<seq2seq4repair_space>adventurers!<seq2seq4repair_space>You<seq2seq4repair_space>can<seq2seq4repair_space>always<seq2seq4repair_space>rely<seq2seq4repair_space>on<seq2seq4repair_space>them<seq2seq4repair_space>" + ( ( ( ( "if<seq2seq4repair_space>something<seq2seq4repair_space>needs<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>killed.<seq2seq4repair_space>Am<seq2seq4repair_space>I<seq2seq4repair_space>right?<seq2seq4repair_space>For<seq2seq4repair_space>bounty<seq2seq4repair_space>of<seq2seq4repair_space>course<seq2seq4repair_space>;)\n" + "In<seq2seq4repair_space>my<seq2seq4repair_space>case<seq2seq4repair_space>this<seq2seq4repair_space>is<seq2seq4repair_space>_monks_<seq2seq4repair_space>who<seq2seq4repair_space>need<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>killed.<seq2seq4repair_space>You<seq2seq4repair_space>see,<seq2seq4repair_space>I'm<seq2seq4repair_space>going<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>a<seq2seq4repair_space>" ) + "little<seq2seq4repair_space>business<seq2seq4repair_space>here,<seq2seq4repair_space>but<seq2seq4repair_space>these<seq2seq4repair_space>lunatics<seq2seq4repair_space>don't<seq2seq4repair_space>buy<seq2seq4repair_space>anything<seq2seq4repair_space>themselves<seq2seq4repair_space>and<seq2seq4repair_space>" ) + "will<seq2seq4repair_space>scare<seq2seq4repair_space>away<seq2seq4repair_space>other<seq2seq4repair_space>customers.<seq2seq4repair_space>" ) + "So<seq2seq4repair_space>please,<seq2seq4repair_space>kill...<seq2seq4repair_space>let's<seq2seq4repair_space>say<seq2seq4repair_space>_8<seq2seq4repair_space>of<seq2seq4repair_space>them_<seq2seq4repair_space>and<seq2seq4repair_space>a<seq2seq4repair_space>reward<seq2seq4repair_space>is<seq2seq4repair_space>yours." ) ; private static final String TXT_GOLEMS2 = "How<seq2seq4repair_space>is<seq2seq4repair_space>your<seq2seq4repair_space>golem<seq2seq4repair_space>safari<seq2seq4repair_space>going?" ; private static final String TXT_MONKS2 = "Oh,<seq2seq4repair_space>you<seq2seq4repair_space>are<seq2seq4repair_space>still<seq2seq4repair_space>alive!<seq2seq4repair_space>I<seq2seq4repair_space>knew<seq2seq4repair_space>that<seq2seq4repair_space>your<seq2seq4repair_space>kung-fu<seq2seq4repair_space>is<seq2seq4repair_space>stronger<seq2seq4repair_space>;)<seq2seq4repair_space>" + "Just<seq2seq4repair_space>don't<seq2seq4repair_space>forget<seq2seq4repair_space>to<seq2seq4repair_space>grab<seq2seq4repair_space>these<seq2seq4repair_space>monks'<seq2seq4repair_space>tokens." ; private static final String TXT_CYA = "See<seq2seq4repair_space>you,<seq2seq4repair_space>%s!" ; private static final String TXT_HEY = "Psst,<seq2seq4repair_space>%s!" ; private boolean seenBefore = false ; @ Override protected boolean act ( ) { } @ Override public int defenseSkill ( Char enemy ) { } @ Override public String defenseVerb ( ) { } @ Override public void damage ( int dmg , Object src ) { } @ Override public void add ( Buff buff ) { } @ Override public boolean reset ( ) { } @ Override public void interact ( ) { } private void tell ( String format , Object ... args ) { } public void flee ( ) { } @ Override public String description ( ) { } public static class Quest { private static boolean alternative ; private static boolean spawned ; private static boolean given ; private static boolean completed ; public static Ring reward ; public static void reset ( ) { } private static final String NODE = "demon" ; private static final String ALTERNATIVE = "alternative" ; private static final String SPAWNED = "spawned" ; private static final String GIVEN = "given" ; private static final String COMPLETED = "completed" ; private static final String REWARD = "reward" ; public static void storeInBundle ( Bundle bundle ) { } public static void restoreFromBundle ( Bundle bundle ) { } public static void spawn ( CityLevel level , Room room ) { <START_BUG> if ( ( ( ( ! ( Dungeon . isTutorial ) ) && ( ! ( Imp . Quest . spawned ) ) ) && ( ( ( Dungeon . depth ) > 16 ) && ( ( Random . Int ( ( 20 - ( Dungeon . depth ) ) ) ) == 0 ) ) ) || ( ( Dungeon . template ) != null ) ) { <END_BUG> Imp npc = new Imp ( ) ; do { npc . pos = level . randomRespawnCell ( ) ; } while ( ( ( npc . pos ) == ( - 1 ) ) || ( ( level . heaps . get ( npc . pos ) ) != null ) ) ; level . mobs . add ( npc ) ; Actor . occupyCell ( npc ) ; Imp . Quest . spawned = true ; Imp . Quest . alternative = ( Random . Int ( 2 ) ) == 0 ; Imp . Quest . given = false ; do { Imp . Quest . reward = ( ( Ring ) ( Generator . random ( RING ) ) ) ; } while ( Imp . Quest . reward . cursed ) ; Imp . Quest . reward . upgrade ( 2 ) ; Imp . Quest . reward . cursed = true ; } } public static void process ( Mob mob ) { } public static void complete ( ) { } public static boolean isCompleted ( ) { } } }

Fix:
if ( ( ( ! ( Dungeon . isTutorial ) ) && ( ! ( Imp . Quest . spawned ) ) ) && ( ( ( ( Dungeon . depth ) > 16 ) && ( ( Random . Int ( ( 20 - ( Dungeon . depth ) ) ) ) == 0 ) ) || ( ( Dungeon . template ) != null ) ) ) {