Buggy code:
private boolean [ ] pathRunningMask ; private double [ ] myComputedOutputs ; private int recordingRound = 0 ; private final HashMap < String , Integer > inputNamesToIndices ; private final HashMap < Path , Integer > pathsToOutputIndices ; public static final String PROP_LEARNINGSTATE = "learningState" ; private LearningManager . LearningState learningState = LearningManager . LearningState . NOT_READY_TO_TRAIN ; private LearningManager . RunningState runningState = LearningManager . RunningState . NOT_RUNNING ; public static final String PROP_RUNNINGSTATE = "runningState" ; private LearningManager . RecordingState recordingState = LearningManager . RecordingState . NOT_RECORDING ; public static final String PROP_RECORDINGSTATE = "recordingState" ; private int numExamplesThisRound ; public static final String PROP_NUMEXAMPLESTHISROUND = "numExamplesThisRound" ; private static final Logger logger = Logger . getLogger ( LearningManager . class . getName ( ) ) ; protected PropertyChangeListener trainingWorkerListener = this :: trainingWorkerChanged ; private boolean ableToRecord = false ; public static final String PROP_ABLE_TO_RECORD = "ableToRecord" ; private boolean ableToRun = false ; public static final String PROP_ABLE_TO_RUN = "ableToRun" ; private boolean notifyPathsOfDatasetChange = true ; private List < LearningManager . PathOutputTypeEditedListener > pathEditedListeners = new LinkedList < > ( ) ; public void addPathEditedListener ( LearningManager . PathOutputTypeEditedListener l ) { } public void removePathEditedListener ( LearningManager . PathOutputTypeEditedListener l ) { } private void trainingWorkerChanged ( PropertyChangeEvent evt ) { } public LearningManager . RecordingState getRecordingState ( ) { } public int getRecordingRound ( ) { } public void setRecordingState ( LearningManager . RecordingState recordingState ) { } public void startRecording ( ) { } public void stopRecording ( ) { } public LearningManager . RunningState getRunningState ( ) { } public void setRunningState ( LearningManager . RunningState runningState ) { } public void cancelTraining ( ) { } public LearningManager . LearningState getLearningState ( ) { } private void setLearningState ( LearningManager . LearningState learningState ) { } private final transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport ( this ) ; public void addPropertyChangeListener ( PropertyChangeListener listener ) { } public void removePropertyChangeListener ( PropertyChangeListener listener ) { } public LearningManager ( Wekinator w ) { } private void oscReceiverPropertyChanged ( PropertyChangeEvent evt ) { } private void dataManagerPropertyChange ( PropertyChangeEvent evt ) { } public List < Path > getPaths ( ) { } private void initializeInputIndices ( String [ ] inputNames ) { } public void updateInputOutputConnections ( boolean [ ] [ ] newConnections ) { } public boolean [ ] [ ] getConnectionMatrix ( ) { } public void initializeInputsAndOutputsWithExisting ( Instances data , List < Path > paths ) { String [ ] inputNames = w . getInputManager ( ) . getInputNames ( ) ; initializeInputIndices ( inputNames ) ; int numOutputs = w . getOutputManager ( ) . getOutputGroup ( ) . getNumOutputs ( ) ; pathRecordingMask = new boolean [ numOutputs ] ; pathRunningMask = new boolean [ numOutputs ] ; myComputedOutputs = new double [ numOutputs ] ; for ( int i = 0 ; i < numOutputs ; i ++ ) { pathRecordingMask [ i ] = paths . get ( i ) . isRecordEnabled ( ) ; pathRunningMask [ i ] = paths . get ( i ) . isRunEnabled ( ) ; Path p = paths . get ( i ) ; PropertyChangeListener pChange = new PropertyChangeListener ( ) { @ Override public void propertyChange ( PropertyChangeEvent evt ) { pathChanged ( p , evt ) ; } } ; p . addPropertyChangeListener ( wls . propertyChange ( pChange ) ) ; p . addInputSelectionChangeListener ( new ChangeListener ( ) { @ Override public void stateChanged ( ChangeEvent e ) { pathInputsChanged ( ( ( Path ) ( e . getSource ( ) ) ) ) ; } } ) ; pathsToOutputIndices . put ( p , i ) ; this . paths . add ( p ) ; } notifyPathsOfDatasetChange = false ; w . getDataManager ( ) . initialize ( inputNames , w . getOutputManager ( ) . getOutputGroup ( ) , data ) ; notifyPathsOfDatasetChange = true ; boolean anyTrained = false ; for ( Path p : paths ) { <START_BUG> if ( ! ( p . canCompute ( ) ) ) { <END_BUG> anyTrained = true ; break ; } } if ( anyTrained ) { setLearningState ( LearningManager . LearningState . DONE_TRAINING ) ; } else if ( ( w . getDataManager ( ) . getNumExamples ( ) ) > 0 ) { setLearningState ( LearningManager . LearningState . READY_TO_TRAIN ) ; } else { setLearningState ( LearningManager . LearningState . NOT_READY_TO_TRAIN ) ; } for ( int i = 0 ; i < ( paths . size ( ) ) ; i ++ ) { Path p = paths . get ( i ) ; String [ ] inputs = p . getSelectedInputs ( ) ; int [ ] indices = convertInputNamesToIndices ( inputs ) ; w . getDataManager ( ) . setInputIndicesForOutput ( indices , i ) ; } w . getInputManager ( ) . addInputValueListener ( this :: updateInputs ) ; updateAbleToRecord ( ) ; updateAbleToRun ( ) ; } private void updateAbleToRecord ( ) { } private void updateAbleToRun ( ) { } public void initializeInputsAndOutputs ( ) { } private void pathInputsChanged ( Path p ) { } private int [ ] convertInputNamesToIndices ( String [ ] names ) { } private void pathRecordChanged ( Path p ) { } private void pathRunChanged ( Path p ) { } private boolean noExamplesAnywhere ( ) { } private void pathNumExamplesChanged ( int pathIndex ) { } private void pathChanged ( Path p , PropertyChangeEvent evt ) { } public double [ ] computeValues ( double [ ] inputs , boolean [ ] computeMask ) { } public void addToTraining ( double [ ] inputs , double [ ] outputs , boolean [ ] recordingMask ) { } public int numRunnableModels ( ) { } public void updateInputs ( double [ ] inputs ) { }

Fix:
if ( p . canCompute ( ) ) {