Buggy code:
public class Location { public static boolean LOG = false && ( L . DEBUG ) ; public static final String SOLID_ROCK = "SolidRock" ; public static final String STATUE_ISLAND_TYPE = "statue" ; public static final String ROCK_ISLAND_TYPE = "rock" ; public static final float minNotVisibleTint = 0.22F ; public static final float minVisibleTint = 0.3F ; public static final float maxVisibileTint = 1.0F ; public enum LocationType { WALL , FLOOR , EXIT ; } public enum TileType { CLEAR , FRONT_FACE , REAR_FACE , NO_FACE , ISLAND ; } public enum TorchType { NONE , FRONT , CENTRAL , EAST , WEST ; } public enum RoughTerrainType { BONES ( "bones" , 1 ) , ROCKS ( "rocks" , 2 ) , MUD ( "mud" , 3 ) , HOLE ( "hole" , 4 ) ; private final String value ; private final int num ; private RoughTerrainType ( String value , int num ) { } public String getValue ( ) { } public int getNum ( ) { } public Boolean isPassable ( ) { } public static Location . RoughTerrainType fromString ( String text ) { } public static Location . RoughTerrainType fromInt ( int n ) { } public static Location . RoughTerrainType getRandomType ( ) { } } public Map map ; public Location . LocationType locationType ; public Location . TileType tileType ; public Creature creature ; public int creatureFacingDir ; public Vector < Ability > itemList ; public String tileName ; public boolean isDiscovered ; public DungeonPosition position ; int x ; int y ; public float tint ; public float permTint ; public Location . TorchType torch = Location . TorchType . NONE ; public Location . RoughTerrainType roughTerrainType ; public LocationInfo locationInfo ; public ItemList itemInfoNoRough ; public ItemList itemInfoWithRough ; public String islandType ; public Location ( Map map , int x , int y ) { } public Location ( ) { } public Location ( ObjectInputStream in , Map map , AllCreatures allCreatures , IDungeonEvents dungeonEvents , IDungeonQuery dungeonQuery ) throws IOException , ClassNotFoundException { } public void addTorch ( Location . TorchType torch ) { } public void load ( ObjectInputStream in , Map map , AllCreatures allCreatures , IDungeonEvents dungeonEvents , IDungeonQuery dungeonQuery ) throws IOException , ClassNotFoundException { } public DungeonPosition getPosition ( ) { } public void setAsIsland ( String islandType ) { } public void setCreature ( Creature creature ) { } public void updatePresenter ( ) { } public void setCreatureAndUpdatePresenter ( Creature creature ) { } public void moveCreature ( Creature creature ) { } public void setTint ( float newTint ) { } public float getTint ( ) { } public void setPermTint ( float newTint ) { } public void clearTint ( ) { } public void setDiscovered ( ) { } public boolean isOpaque ( ) { } public boolean isClear ( ) { } public boolean isTotallyEmpty ( ) { } public boolean isNearWall ( ) { } public LocationInfo getLocationInfo ( ) { } private void updateLocationInfo ( ) { } public int distanceTo ( DungeonPosition p ) { } public void clearLocation ( ) { } public void setLocationToWall ( ) { } public void setRoughTerrain ( Location . RoughTerrainType roughTerrainType , IDungeonEvents dungeonEvents , IDungeonQuery dungeonQuery ) { } public Location . RoughTerrainType getRoughTerrain ( ) { } public boolean hasRoughTerrain ( ) { } public void setAsExit ( ) { } public void pickupItem ( Ability item ) { } public void dropItem ( Ability item ) { } public void setTileType ( ) { } public AtLocation whatIsAtLocation ( ) { } public void setTileName ( ) { } public void doPostMapGenerationPrcessing ( ) { if ( Location . LOG ) L . log ( "tileName:<seq2seq4repair_space>%s" , tileName ) ; <START_BUG> if ( tileName . equals ( "statue" ) ) { <END_BUG> addTorch ( Location . TorchType . CENTRAL ) ; } else if ( ( ( Randy . getRand ( 1 , TORCH_DENSITY ) ) == 1 ) && ( map . okToPlaceTorch ( this ) ) ) { createTorchAt ( ) ; } updateLocationInfo ( ) ; } public void createTorchAt ( ) { } public boolean hasTorch ( ) { } private String calculateTileName ( ) { } public ItemList getItemList ( boolean includeRoughTerrain ) { } public boolean isDrawable ( ) { } public void persistLocation ( ObjectOutputStream out ) throws IOException { } public boolean castsShadow ( ) { } static final String [ ] names = new String [ ] { "rock" , "rock" , "rock" , "statue" } ; public String randomIslandTileName ( ) { } private void setItemInfos ( ) { } public void persistThings ( ObjectOutputStream out ) throws IOException { } public String toString ( ) { } }

Fix:
if ( ( tileType ) == ( Location . TileType . ISLAND ) ) {