Buggy code:
public class ViewFileTxt { public void printViewState ( ) { } public static String ViewState ( ) { String saveTheDetailsInTextFile = "" ; ArrayList < Player > lstPlayers = Game . lstPlayers ; ViewFileTxt . playerGeneralInfo ( lstPlayers ) ; ArrayList < Minion > lstMinions = Game . lstMinions ; HashMap < Integer , String > minionInfo = ViewFileTxt . minionGeneralInfo ( lstMinions ) ; ArrayList < TroubleMaker > lstTroubleMakers = Game . lstTroubleMaker ; HashMap < Integer , Boolean > troubleInfo = ViewFileTxt . troubleMakerGeneralInfo ( lstTroubleMakers ) ; ArrayList < Building > lstBuildings = Game . lstBuildings ; HashMap < Integer , String > buildingInfo = ViewFileTxt . buildingGeneralInfo ( lstBuildings ) ; ArrayList < Demon > lstDemons = Game . lstDemons ; HashMap < Integer , Integer > demonInfo = ViewFileTxt . demonGeneralInfo ( lstDemons ) ; ArrayList < Troll > lstTrolls = Game . lstTrolls ; HashMap < Integer , Integer > trollInfo = ViewFileTxt . trollGeneralInfo ( lstTrolls ) ; System . out . printf ( "\n\n" ) ; System . out . printf ( "Current<seq2seq4repair_space>state<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>game<seq2seq4repair_space>board:" ) ; System . out . printf ( "\n\n" ) ; System . out . printf ( "%-18s" , "Area" ) ; System . out . printf ( "\t%-11s" , "Minion" ) ; System . out . printf ( "\t%-4s" , "Trouble" ) ; System . out . printf ( "\t%-12s" , "Building" ) ; System . out . printf ( "\t%-4s" , "Demons" ) ; System . out . printf ( "\t%-4s" , "Trolls" ) ; System . out . printf ( "\n" ) ; for ( int i = 1 ; i <= 12 ; i ++ ) { System . out . printf ( "\n" ) ; System . out . printf ( "%-18s" , PresentationUtility . getCityAreaCardNameById ( i ) ) ; System . out . printf ( "\t%-11s" , ( ( minionInfo . get ( i ) ) != null ? minionInfo . get ( i ) : "none" ) ) ; System . out . printf ( "\t%-4s" , ( ( ( troubleInfo . get ( i ) ) != null ) && ( troubleInfo . get ( i ) ) ? "YES" : "no" ) ) ; System . out . printf ( "\t%-12s" , ( ( buildingInfo . get ( i ) ) != null ? buildingInfo . get ( i ) : "no" ) ) ; <START_BUG> System . out . printf ( "\t%-4s" , ( ( ( demonInfo . get ( i ) ) != null ) && ( ( demonInfo . get ( i ) ) > 0 ) ? "1" : "0" ) ) ; <END_BUG> System . out . printf ( "\t%-4s" , ( ( ( trollInfo . get ( i ) ) != null ) && ( ( trollInfo . get ( i ) ) > 0 ) ? "1" : "0" ) ) ; } for ( Player player : Game . lstPlayers ) { System . out . printf ( ( ( "\nPlayer<seq2seq4repair_space>" + ( player . getPlayer_id ( ) ) ) + "'s<seq2seq4repair_space>current<seq2seq4repair_space>inventory:" ) ) ; ViewFileTxt . playerDetailsMinBuildDollar ( player . getPlayer_id ( ) ) ; ViewFileTxt . playerDetailsCityAreaCards ( player . getPlayer_id ( ) ) ; ViewFileTxt . playerDetailsGreenCards ( player . getPlayer_id ( ) ) ; System . out . printf ( "\n" ) ; } System . out . printf ( "\n" ) ; ViewFileTxt . totalAmountBankOwns ( ) ; System . out . printf ( "\n\n" ) ; return saveTheDetailsInTextFile ; } public static void playerGeneralInfo ( ArrayList < Player > players ) { } public static HashMap < Integer , String > minionGeneralInfo ( ArrayList < Minion > minions ) { } public static HashMap < Integer , Boolean > troubleMakerGeneralInfo ( ArrayList < TroubleMaker > troubleMakers ) { } public static HashMap < Integer , String > buildingGeneralInfo ( ArrayList < Building > buildings ) { } public static HashMap < Integer , Integer > trollGeneralInfo ( ArrayList < Troll > trolls ) { } public static HashMap < Integer , Integer > demonGeneralInfo ( ArrayList < Demon > demons ) { } public static void playerDetailsMinBuildDollar ( Integer playerId ) { } public static void playerDetailsCityAreaCards ( Integer playerId ) { } public static void playerDetailsGreenCards ( Integer playerId ) { } public static String currentAndNextPlayerTurn ( ArrayList < Player > players ) { } public static String currentPlayerPlaying ( ArrayList < Player > players ) { } public static String areaDetails ( ) { } public static String paddingToMakeSixteen ( String areaName ) { } public static void playerDetails ( ArrayList < Player > players ) { } public static void totalAmountBankOwns ( ) { } }

Fix:
System . out . printf ( "\t%-4s" , ( ( demonInfo . get ( i ) ) != null ? "1" : "0" ) ) ;