Buggy code:
public class PhaseTab extends ScrollPane implements IComponents { @ FXML private Accordion accPhaseList ; private ArrayList < PhasePaneWrapper > mainPhases ; private Hashtable < PhasePaneWrapper , ArrayList < PhasePaneWrapper > > subPhases ; private PhaseTab . AddPhaseWrapper addMain ; public PhaseTab ( ) { } private void checkMainPhases ( ) { } public void checkPhaseDates ( PhasePaneWrapper phase ) { } public void checkPhaseDates ( PhasePaneWrapper phase , LocalDate phaseStart , LocalDate phaseEnd ) { } private PhasePaneWrapper getPhaseBelow ( PhasePaneWrapper phase ) { } private PhasePaneWrapper getPhaseAbove ( PhasePaneWrapper phase ) { } private LocalDate getAboveEndDate ( PhasePaneWrapper phase ) { } private LocalDate getBelowStartDate ( PhasePaneWrapper phase ) { LocalDate date = null ; PhasePaneWrapper below = getPhaseBelow ( phase ) ; if ( below == null ) return null ; if ( ( ! ( phase . isSubPhase ( ) ) ) && ( below . isSubPhase ( ) ) ) { date = getBelowStartDate ( below ) ; } else <START_BUG> if ( ( ( phase . isSubPhase ( ) ) && ( ! ( below . isSubPhase ( ) ) ) ) && ( ! ( subPhases . get ( below ) . isEmpty ( ) ) ) ) { <END_BUG> date = getBelowStartDate ( below ) ; } else { date = below . getPhaseBegin ( ) ; } return date ; } private PhasePaneWrapper addMainPhase ( ) { } public PhasePaneWrapper addMainPhase ( PhaseTab . AddPhaseWrapper from ) { } private PhasePaneWrapper addSubPhase ( PhasePaneWrapper main ) { } public PhasePaneWrapper addSubPhase ( PhaseTab . AddPhaseWrapper from , PhasePaneWrapper main ) { } public void removeMainPhase ( PhasePaneWrapper phase ) { } public void removeSubPhase ( PhasePaneWrapper phase ) { } public void updatePhases ( ) { } private class AddPhaseWrapper extends TitledPane { private PhasePaneWrapper parentPhase ; private Button btnAddPhase ; private PhaseTab parent ; public AddPhaseWrapper ( PhaseTab parent , String title ) { } public AddPhaseWrapper ( PhaseTab parent , String title , PhasePaneWrapper parentPhase ) { } private void btnAddPhaseClick ( ActionEvent event ) { } } @ Override public void clearAll ( ) { } @ Override public void disableWrite ( boolean disable ) { } @ Override public ArrayList < SkillPane > getSkillPanes ( ) { } @ Override public SkillPane addSkillPane ( ) { } @ Override public Hashtable < PhasePaneWrapper , ArrayList < PhasePaneWrapper > > getPhasePanes ( ) { } @ Override public PhasePaneWrapper addPhasePaneWrapper ( String phaseName , String parentName ) { } @ Override public PhasePane addPhasePane ( PhasePaneWrapper wrapper ) { } @ Override public ArrayList < ResourcePaneWrapper > getResourcePanes ( ) { } @ Override public ResourcePane addResourcePane ( int parentSkillID ) { } @ Override public String getProjectName ( ) { } @ Override public void setProjectName ( String projectName ) { } @ Override public String getProjectResponsible ( ) { } @ Override public void setProjectResponsible ( String projectResponsible ) { } @ Override public String getProjectDescription ( ) { } @ Override public void setProjectDescription ( String projectDescription ) { } @ Override public void setProjectTimeStamp ( LocalDateTime timeStamp ) { } }

Fix:
if ( ( ( ( phase . isSubPhase ( ) ) && ( ! ( below . isSubPhase ( ) ) ) ) && ( ( subPhases . get ( below ) ) != null ) ) && ( ! ( subPhases . get ( below ) . isEmpty ( ) ) ) ) {