Buggy code:
public final class SlotMachine extends SlotMachineBase implements Nameable { private boolean broken ; private String userName ; private long lockEnd ; private BukkitTask task ; private boolean active ; private boolean halted ; private SlotMachine ( ItemSlotMachine plugin , String name ) throws Exception { } public static SlotMachine create ( ItemSlotMachine plugin , String name , Design d , Player p ) throws Exception { } public static SlotMachine load ( ItemSlotMachine plugin , String name ) throws Exception { } private void playTickingSounds ( ) { } private void playWinSounds ( ) { } private void playLoseSounds ( ) { } private void playWinEffect ( ) { } public void activate ( final Player p ) { final ItemFrame [ ] frames = getItemFrameInstances ( ) ; broken = ! ( ( ( getSign ( ) ) != null ) && ( frames != null ) ) ; if ( broken ) { p . sendMessage ( messageManager . slot_machine_broken ( ) ) ; return ; } insertCoins ( p ) ; PlayerStatistic s = statisticManager . getStatistic ( p , true ) ; s . getObject ( TOTAL_SPINS ) . increaseValue ( 1 ) ; if ( ( p . getGameMode ( ) ) != ( GameMode . CREATIVE ) ) s . getObject ( COINS_SPENT ) . increaseValue ( activationAmount ) ; s . saveToFile ( ) ; statistic . getObject ( TOTAL_SPINS ) . increaseValue ( 1 ) ; statistic . saveToFile ( ) ; raisePot ( ) ; userName = p . getName ( ) ; <START_BUG> final boolean win = predetermineWin ( ) ; <END_BUG> task = new BukkitRunnable ( ) { private int [ ] ticks = new int [ 3 ] ; private int [ ] delayTicks = new int [ 3 ] ; @ Override public void run ( ) { playTickingSounds ( ) ; if ( ( automaticHaltEnabled ) && ( ( ticks [ 0 ] ) == ( automaticHaltTicks ) ) ) halted = true ; for ( int i = 0 ; i < 3 ; i ++ ) if ( halted ? ( delayTicks [ i ] ) != ( haltTickDelay [ i ] ) : true ) { frames [ i ] . setItem ( ( ( ( ( i != 0 ) && win ) && ( ( delayTicks [ i ] ) == ( ( haltTickDelay [ i ] ) - 1 ) ) ) || ( ( ( ( ( ( i != 0 ) && win ) && ( automaticHaltEnabled ) ) && ( ! ( halted ) ) ) && ( ( haltTickDelay [ i ] ) == 0 ) ) && ( ( ticks [ i ] ) == ( ( automaticHaltTicks ) - 1 ) ) ) ? frames [ 0 ] . getItem ( ) : getRandomIcon ( ) ) ) ; if ( halted ) ( delayTicks [ i ] ) ++ ; else ( ticks [ i ] ) ++ ; } else if ( i == 2 ) distribute ( frames [ 0 ] . getItem ( ) , frames [ 1 ] . getItem ( ) , frames [ 2 ] . getItem ( ) ) ; updateSign ( ) ; } } . runTaskTimer ( plugin , 5 , 5 ) ; active = true ; } public void halt ( ) { } private void deactivate ( boolean manual ) { } public void deactivate ( ) { } private double applyHouseCut ( double money ) { } private ItemList applyHouseCut ( ItemList items ) { } @ SuppressWarnings ( "deprecation" ) private void handleWin ( double moneyPrize , ItemList itemPrize , boolean executeCommands ) { } private void distribute ( ItemStack ... display ) { } public void destruct ( ) { } @ Override public void rebuild ( ) { } @ Override public void move ( BlockFace b , int amount ) throws Exception { } public boolean isBroken ( ) { } public String getUserName ( ) { } public Player getUser ( ) { } public boolean isUser ( Player p ) { } public long getLockEnd ( ) { } public int getRemainingLockTime ( ) { } public boolean isLockExpired ( ) { } public boolean isActive ( ) { } public boolean isHalted ( ) { } public boolean isPermittedToHalt ( Player p ) { } No newline ; at end ; of file ; }

Fix:
final boolean win = ( predeterminedWinningChanceEnabled ) ? predetermineWin ( ) : false ;