Buggy code:
public class InstrumentController implements Initializable { @ FXML private ListView < String > instExcludeListView ; @ FXML private ListView < String > instIncludeListView ; @ FXML private RadioButton instTypeRadio ; @ FXML private RadioButton customInstTypeRadio ; @ FXML private ComboBox < String > regCombo ; @ FXML private RadioButton regTypeRadio ; @ FXML private RadioButton customRegTypeRadio ; @ FXML private RadioButton noTraceRadio ; @ FXML private RadioButton fullTraceRadio ; @ FXML private RadioButton limitTraceRadio ; @ FXML private Label includeLabel ; @ FXML private Button instIncludeButton ; @ FXML private Button instExcludeButton ; @ FXML private Button regIncludeButton ; @ FXML private Button regExcludeButton ; @ FXML private CheckBox forwardCheckbox ; @ FXML private CheckBox backwardCheckbox ; @ FXML private Label regIncludeLabel ; @ FXML private TextField traceCountText ; @ FXML private Node traceCountLabel ; @ FXML private ComboBox < String > customInstCombo ; @ FXML private ComboBox < String > customRegCombo ; @ FXML private Button createNewProfileButton ; @ FXML private CheckBox allCheckBox ; private List < String > fileContent ; private List < String > includeInstList ; private List < String > excludeInstList ; private List < String > removeList ; private List < String > registerList ; private List < String > customInstList ; private List < String > customRegList ; @ FXML ObservableList < String > items ; @ FXML ObservableList < String > includeItems ; @ FXML ObservableList < String > tempItems = FXCollections . observableArrayList ( ) ; @ FXML ObservableList < String > tempItems1 = FXCollections . observableArrayList ( ) ; private boolean errorFlag ; public String folderName ; public String fileName ; File theDirectory ; @ FXML private RadioButton software ; @ FXML private RadioButton hardware ; @ FXML private Node registerSelectionMethodLabel ; @ FXML private Node separator ; private InstrumentOption previousInstrumentOption ; private List < RuntimeOption > previousRuntimeOption ; private ComboBox < String > fiResultDisplay ; @ FXML private void onClickGenerateYamlFile ( ActionEvent event ) { } private static enum InjectionType { HARDWARE , SOFTWARE , SOFTWARE_BATCH ; } private boolean injectionModeChanged ( ) { } @ FXML private void onClickInstructionInclude ( ActionEvent event ) { } @ FXML private void onClickInstructionExclude ( ActionEvent event ) { } @ FXML private void enableIncludeMultipleSelection ( MouseEvent event ) { } @ FXML private void enableExcludeMultipleSelection ( MouseEvent event ) { } @ FXML private void onSelectInstSelectRadio ( ActionEvent event ) { } @ FXML private void onSelectRegSelectRadio ( ActionEvent event ) { } @ FXML private void onClickTraceOption ( ActionEvent event ) { } @ FXML private void onClickSelectProfile ( ActionEvent event ) { } private void loadProfile ( File file ) { InputYaml parser = new InputYaml ( ) ; parser . load ( file ) ; InstrumentOption option = parser . getInstrumentOption ( ) ; previousInstrumentOption = option ; previousRuntimeOption = parser . getRuntimeOptions ( ) ; if ( option . isHardwareFault ) { Controller . isHardwareInjection = true ; } else { Controller . isHardwareInjection = false ; } resetAllOptions ( ) ; if ( option . isHardwareFault ) { if ( option . customRegister ) { regTypeRadio . setSelected ( true ) ; regCombo . setValue ( option . regloc_OR_customRegSelector ) ; } else { customRegTypeRadio . setSelected ( true ) ; customRegCombo . setValue ( option . regloc_OR_customRegSelector ) ; } onSelectRegSelectRadio ( null ) ; } if ( option . customInstruction ) { customInstTypeRadio . setSelected ( true ) ; customInstCombo . setValue ( option . includedInstruction . get ( 0 ) ) ; } else { instTypeRadio . setSelected ( true ) ; List < String > newExcludedList ; List < String > newIncludedList = new ArrayList < String > ( ) ; if ( Controller . isHardwareInjection ) { newExcludedList = configReader . getInstruction ( ) ; } else { newExcludedList = getApplicableSoftwareFailures ( ) ; } for ( String exclude : instExcludeListView . getItems ( ) ) { for ( String include : option . includedInstruction ) { <START_BUG> if ( exclude . contains ( include ) ) { <END_BUG> newExcludedList . remove ( exclude ) ; newIncludedList . add ( exclude ) ; break ; } } } instExcludeListView . setItems ( FXCollections . observableArrayList ( newExcludedList ) ) ; instIncludeListView . setItems ( FXCollections . observableArrayList ( newIncludedList ) ) ; } onSelectInstSelectRadio ( null ) ; allCheckBox . setSelected ( false ) ; if ( ( option . maxTrace ) != null ) { limitTraceRadio . setSelected ( true ) ; } else if ( option . tracingEnabled ) { fullTraceRadio . setSelected ( true ) ; } else { noTraceRadio . setSelected ( true ) ; } onClickTraceOption ( null ) ; if ( ( option . maxTrace ) != null ) { traceCountText . setText ( ( "" + ( option . maxTrace . intValue ( ) ) ) ) ; } } @ FXML private void onClickCreateNewProfile ( ActionEvent event ) { } @ FXML public void onClickAll ( ActionEvent e ) { } private void resetInstList ( boolean isSelectAll ) { } private void resetAllOptions ( ) { } private List < String > getApplicableSoftwareFailures ( ) { } @ FXML private void onClickChangeInjectionType ( ActionEvent e ) { } private void changeInjectionDisplay ( boolean isHardwareInjection ) { } @ Override public void initialize ( URL url , ResourceBundle rb ) { } public void initFiResultDisplay ( ComboBox < String > fiResultDisplay ) { } }

Fix:
if ( include . equals ( exclude . split ( "-" ) [ 0 ] ) ) {