Buggy code:
public final class Buyer extends Application { private static final Logger LOGGER = getLogger ( Buyer . class ) ; private static Integer buyerId ; private static URI fireWorksSpaceURI ; private static MzsCore space ; private static int spacePort ; private static Capi capi ; private static ContainerReference purchaseContainer ; private static ContainerReference rocketContainer ; private static ObservableList < Purchase > purchases = FXCollections . observableArrayList ( ) ; private static ObservableList < Purchase > purchased = FXCollections . observableArrayList ( ) ; private static final ObservableList < String > EFFECT_CHOICES = FXCollections . observableArrayList ( EffectColor . Red . toString ( ) , EffectColor . Blue . toString ( ) , EffectColor . Green . toString ( ) ) ; @ FXML private TableView < Purchase > purchaseTableView ; @ FXML private TableView < Purchase > newPurchaseTableView ; @ FXML private TableColumn < Purchase , Number > idPurchaseColumn ; @ FXML private TableColumn < Purchase , Number > quantityPurchaseColumn ; @ FXML private TableColumn < Purchase , String > statusPurchaseColumn ; @ FXML private TableColumn < Purchase , String > color1PurchaseColumn ; @ FXML private TableColumn < Purchase , String > color2PurchaseColumn ; @ FXML private TableColumn < Purchase , String > color3PurchaseColumn ; @ FXML private TableColumn < Purchase , String > newQuantityPurchaseColumn ; @ FXML private TableColumn < Purchase , String > newColor1PurchaseColumn ; @ FXML private TableColumn < Purchase , String > newColor2PurchaseColumn ; @ FXML private TableColumn < Purchase , String > newColor3PurchaseColumn ; public static void main ( final String [ ] arguments ) { } @ FXML private void initialize ( ) { } @ Override public void start ( final Stage primaryStage ) throws IOException { } private static void initSpace ( ) { } public static void setPurchaseStatusToShipped ( final int purchaseId ) { Platform . runLater ( ( ) -> { int purchaseToUpdateIndex = 0 ; Purchase purchaseToUpdate = null ; <START_BUG> for ( int purchase = 0 ; purchaseId < ( Buyer . purchased . size ( ) ) ; purchase ++ ) { <END_BUG> if ( ( Buyer . purchased . get ( purchase ) . getPurchaseId ( ) . intValue ( ) ) == purchaseId ) { purchaseToUpdateIndex = purchase ; purchaseToUpdate = Buyer . purchased . get ( purchase ) ; break ; } } if ( purchaseToUpdate != null ) { purchaseToUpdate . setStatusToShipped ( ) ; Buyer . purchased . set ( purchaseToUpdateIndex , purchaseToUpdate ) ; } } ) ; } private void closeBuyer ( ) { } @ SuppressWarnings ( "unused" ) public void newPurchase ( final ActionEvent actionEvent ) { } @ SuppressWarnings ( "unused" ) public void clearPurchase ( final ActionEvent actionEvent ) { } @ SuppressWarnings ( "unused" ) public void orderPurchase ( final ActionEvent actionEvent ) { } @ SuppressWarnings ( "unused" ) public void removePurchases ( final ActionEvent actionEvent ) { } public void setQuantity ( final TableColumn . CellEditEvent < Purchase , String > stCellEditEvent ) { } public void setFirstEffectColor ( final TableColumn . CellEditEvent < Purchase , String > stCellEditEvent ) { } public void setSecondEffectColor ( final TableColumn . CellEditEvent < Purchase , String > stCellEditEvent ) { } public void setThirdEffectColor ( final TableColumn . CellEditEvent < Purchase , String > stCellEditEvent ) { } }

Fix:
for ( int purchase = 0 ; purchase < ( Buyer . purchased . size ( ) ) ; purchase ++ ) {