Buggy code:
public class OverviewDialogController extends AbstractDialogController { private final STDocument document ; private ChartViewer chartViewer ; @ FXML private ChoiceBox < OverviewDialogController . TimeRangeType > cbTimeRange ; @ FXML private ChoiceBox < Integer > cbYear ; @ FXML private ChoiceBox < OverviewDialogController . ValueType > cbDisplay ; @ FXML private ChoiceBox < OverviewDialogController . OverviewType > cbSportTypeMode ; @ FXML private ChoiceBox < SportType > cbSportTypeList ; @ FXML private StackPane spDiagram ; @ FXML private HBox hBoxOptions ; @ FXML private HBox hBoxSportTypeMode ; @ FXML private HBox hBoxSportTypeList ; @ Inject public OverviewDialogController ( final STContext context , final STDocument document ) { } public void show ( final Window parent ) { } @ Override protected void setupDialogControls ( ) { } private void setupChoiceBoxes ( ) { } private void updateDiagram ( ) { } private void updateOptionControls ( ) { } private void setupExerciseDiagram ( TimeTableXYDataset dataset , List < Color > graphColors ) { } private void addExerciseTimeSeries ( TimeTableXYDataset dataset , OverviewDialogController . TimeRangeType timeType , int year , OverviewDialogController . ValueType valueType , SportType sportType ) { } private void setupSportSubTypeDiagram ( TimeTableXYDataset dataset , List < Color > graphColors ) { } private void addSportSubTypeTimeSeries ( TimeTableXYDataset dataset , OverviewDialogController . TimeRangeType timeType , int year , SportType sportType , SportSubType sportSubType ) { } private void setupEquipmentDiagram ( TimeTableXYDataset dataset , List < Color > graphColors ) { } private void addEquipmentTimeSeries ( TimeTableXYDataset dataset , OverviewDialogController . TimeRangeType timeType , int year , SportType sportType , Equipment equipment ) { } private void setupWeightDiagram ( TimeTableXYDataset dataset , List < Color > graphColors ) { } private void addWeightTimeSeries ( TimeTableXYDataset dataset , OverviewDialogController . TimeRangeType timeType , int year ) { } private int getTimeStepCount ( OverviewDialogController . TimeRangeType timeType , int year ) { } private RegularTimePeriod createTimePeriodForTimeStep ( OverviewDialogController . TimeRangeType timeType , int year , int timeStep ) { } private ExerciseFilter createExerciseFilterForTimeStep ( OverviewDialogController . TimeRangeType timeType , int year , int timeStep ) { } private void addCustomGraphColors ( List < Color > graphColors ) { } private LocalDate getStartDateForWeekOfYear ( int year , int weekNr ) { WeekFields weekField = getWeekFieldsForWeekStart ( ) ; LocalDate date = LocalDate . of ( year , 2 , 1 ) ; date = date . with ( weekField . dayOfWeek ( ) , 1 ) ; <START_BUG> return date . with ( weekField . weekOfYear ( ) , weekNr ) ; <END_BUG> } private WeekFields getWeekFieldsForWeekStart ( ) { } private void mergeExerciseFilterIfEnabled ( ExerciseFilter filter ) { } private double getAverageWeightInTimeRange ( ExerciseFilter filter ) { } private enum TimeRangeType { LAST_12_MONTHS ( "st.dlg.overview.time_range.last_12_months.text" ) , MONTHS_OF_YEAR ( "st.dlg.overview.time_range.months_of_year.text" ) , WEEKS_OF_YEAR ( "st.dlg.overview.time_range.weeks_of_year.text" ) , LAST_10_YEARS ( "st.dlg.overview.time_range.ten_years.text" ) ; private static AppResources appResources ; private String resourceKey ; private TimeRangeType ( final String resourceKey ) { } @ Override public String toString ( ) { } } private enum ValueType { DISTANCE ( "st.dlg.overview.display.distance_sum.text" ) , DURATION ( "st.dlg.overview.display.duration_sum.text" ) , ASCENT ( "st.dlg.overview.display.ascent_sum.text" ) , CALORIES ( "st.dlg.overview.display.calorie_sum.text" ) , EXERCISES ( "st.dlg.overview.display.exercise_count.text" ) , AVG_SPEED ( "st.dlg.overview.display.avg_speed.text" ) , SPORTSUBTYPE ( "st.dlg.overview.display.sportsubtype_distance.text" ) , EQUIPMENT ( "st.dlg.overview.display.equipment_distance.text" ) , WEIGHT ( "st.dlg.overview.display.weight.text" ) ; private static AppResources appResources ; private String resourceKey ; private ValueType ( final String resourceKey ) { } @ Override public String toString ( ) { } private String getNameWithUnitSystem ( final FormatUtils formatUtils ) { } } private enum OverviewType { EACH_SPLITTED ( "st.dlg.overview.sport_type.each_splitted.text" ) , EACH_STACKED ( "st.dlg.overview.sport_type.each_stacked.text" ) , ALL_SUMMARY ( "st.dlg.overview.sport_type.all_summary.text" ) ; private static AppResources appResources ; private String resourceKey ; private OverviewType ( final String resourceKey ) { } @ Override public String toString ( ) { } } }

Fix:
return date . with ( weekField . weekOfWeekBasedYear ( ) , weekNr ) ;