Program: 78436
Project: 78436
Buggy source:
private void initComponents() throws ParseException {
  menuBar.add(menuFile);
  menuFile.add(menuItemLogout);
  menuFile.add(menuItemExit);
  menuAssignment.add(menuItemAddAssignment);
  menuAssignment.add(menuItemRemoveAssignment);
  menuAssignment.add(menuItemShowAssignments);
  menuBar.add(menuAssignment);
  menuReview.add(menuItemAddReview);
  menuReview.add(menuItemRemoveReview);
  menuReview.add(menuItemShowReviews);
  menuBar.add(menuReview);
  menuSettings.add(menuItemAccount);
  menuSettings.add(menuItemDogs);
  menuSettings.add(menuItemChangePassword);
  menuBar.add(menuSettings);
  menuExtra.add(menuItemInfo);
  menuExtra.add(menuItemAwards);
  menuBar.add(menuItemCancel);
  menuItemCancel.setVisible(false);
  menuBar.add(menuExtra);
  add(menuBar,BorderLayout.NORTH);
  panelToday.setLayout(new GridLayout(7,1,5,5));
  panelToday.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
  labelTodayAssignments.setForeground(new Color(0,0,255));
  labelTodayAssignments.setFont(new Font("String_Node_Str",Font.BOLD,24));
  panelToday.add(labelTodayAssignments);
  int i;
  int nShownTodayAssignments=0;
  nTodayAssignments=getNDailyAssignments();
  if (nTodayAssignments <= MAXVISIBLETODAYASSIGNMENT) {
    buttonTodayAssignment=new JButton[nTodayAssignments];
    for (i=0; i < nTodayAssignments; i++) {
      buttonTodayAssignment[i]=new JButton("String_Node_Str");
      buttonTodayAssignment[i].setBackground(new Color(179,237,255));
      buttonTodayAssignment[i].setOpaque(true);
      buttonTodayAssignment[i].setBorderPainted(false);
      buttonTodayAssignment[i].setDisplayedMnemonicIndex(i);
      panelToday.add(buttonTodayAssignment[i]);
    }
  }
 else {
    buttonTodayAssignment=new JButton[MAXVISIBLETODAYASSIGNMENT];
    for (i=0; i < MAXVISIBLETODAYASSIGNMENT; i++) {
      buttonTodayAssignment[i]=new JButton("String_Node_Str");
      buttonTodayAssignment[i].setBackground(new Color(179,237,255));
      buttonTodayAssignment[i].setOpaque(true);
      buttonTodayAssignment[i].setBorderPainted(false);
      buttonTodayAssignment[i].setDisplayedMnemonicIndex(i);
      panelToday.add(buttonTodayAssignment[i]);
    }
  }
  if ((nTodayAssignments > 0) && (nTodayAssignments <= MAXVISIBLETODAYASSIGNMENT)) {
    labelEmptyTodayAssignments=new JLabel[MAXVISIBLETODAYASSIGNMENT - nTodayAssignments + 1];
    for (i=0; i < MAXVISIBLETODAYASSIGNMENT - nTodayAssignments + 1; i++) {
      labelEmptyTodayAssignments[i]=new JLabel();
      panelToday.add(labelEmptyTodayAssignments[i]);
      nShownTodayAssignments=nTodayAssignments;
    }
  }
 else   if (nTodayAssignments > MAXVISIBLETODAYASSIGNMENT) {
    panelToday.add(buttonShowMoreTodayAssignments);
    nShownTodayAssignments=MAXVISIBLETODAYASSIGNMENT;
  }
 else {
    labelEmptyTodayAssignments=new JLabel[1];
    labelEmptyTodayAssignments[0]=new JLabel("String_Node_Str",SwingConstants.CENTER);
    panelToday.add(labelEmptyTodayAssignments[0]);
    nShownTodayAssignments=0;
  }
  loadTheFirstFiveAssignments(nShownTodayAssignments);
  add(panelToday,BorderLayout.EAST);
  ActionListener cal=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent cae){
      if ((!(cae.getActionCommand().equals("String_Node_Str"))) && ((calendarState.equals(CalendarState.NORMAL)) || (calendarState.equals(CalendarState.REMOVING)))) {
        JButton pressedButton=(JButton)cae.getSource();
        GUIDailyAssignments guiDailyAssignments=new GUIDailyAssignments(calendarState,null);
        guiDailyAssignments.setVisible(true);
      }
      if ((!(cae.getActionCommand().equals("String_Node_Str"))) && (calendarState.equals(CalendarState.ADDING))) {
        JButton pressedButton=(JButton)cae.getSource();
        GUINewAssignment guiNewAssignment=new GUINewAssignment();
        guiNewAssignment.setVisible(true);
      }
    }
  }
;
  ActionListener ctrlCal=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent ctrlAe){
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goBackMonthCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goForwardMonthCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goBackYearCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goForwardYearCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        GUIDailyAssignments guiDailyAssignments=new GUIDailyAssignments(calendarState,null);
        guiDailyAssignments.setVisible(true);
      }
    }
  }
;
  ActionListener menuAl=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent menuAe){
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        System.exit(0);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        GUILogin guiLogin=new GUILogin();
        guiLogin.setVisible(true);
        setVisible(false);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        calendarState=CalendarState.REVIEWING;
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        calendarState=CalendarState.DELETING_REVIEW;
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        calendarState=CalendarState.SHOW_REVIEWS;
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        try {
          enableDisableDateButtonAssignment();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
        newAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        try {
          enableDisableDateButtonAssignment();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
        removeAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        GUISettings guiSettings=new GUISettings(email);
        guiSettings.setVisible(true);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        GUIChangePassword guiChangePassword=new GUIChangePassword(null);
        guiChangePassword.setVisible(true);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        cancel();
      }
    }
  }
;
  ActionListener todayAssignmentsAl=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent todayAssignmentAe){
      if (!(todayAssignmentAe.getActionCommand().equals("String_Node_Str"))) {
        JButton pressedButton=(JButton)todayAssignmentAe.getSource();
        StringTokenizer cmdToken=new StringTokenizer(buttonTodayAssignment[0].getText(),"String_Node_Str");
        String cmd=cmdToken.nextToken();
        if (cmd.equals("String_Node_Str")) {
          GUIAssignmentInformationCustomer guiAssignment=new GUIAssignmentInformationCustomer();
          guiAssignment.setVisible(true);
        }
      }
    }
  }
;
  startCalendar(cal,ctrlCal);
  menuItemExit.addActionListener(menuAl);
  menuItemLogout.addActionListener(menuAl);
  menuItemAddAssignment.addActionListener(menuAl);
  menuItemCancel.addActionListener(menuAl);
  menuItemRemoveAssignment.addActionListener(menuAl);
  menuItemShowAssignments.addActionListener(menuAl);
  menuItemAddReview.addActionListener(menuAl);
  menuItemRemoveReview.addActionListener(menuAl);
  menuItemShowReviews.addActionListener(menuAl);
  menuItemAccount.addActionListener(menuAl);
  menuItemChangePassword.addActionListener(menuAl);
  buttonShowMoreTodayAssignments.addActionListener(ctrlCal);
  for (i=0; i < nShownTodayAssignments; i++) {
    buttonTodayAssignment[i].addActionListener(todayAssignmentsAl);
  }
}

Fixed version (ground truth):
private void initComponents() throws ParseException {
  menuBar.add(menuFile);
  menuFile.add(menuItemLogout);
  menuFile.add(menuItemExit);
  menuAssignment.add(menuItemAddAssignment);
  menuAssignment.add(menuItemRemoveAssignment);
  menuAssignment.add(menuItemShowAssignments);
  menuBar.add(menuAssignment);
  menuReview.add(menuItemAddReview);
  menuReview.add(menuItemRemoveReview);
  menuReview.add(menuItemShowReviews);
  menuBar.add(menuReview);
  menuSettings.add(menuItemAccount);
  menuSettings.add(menuItemDogs);
  menuSettings.add(menuItemChangePassword);
  menuBar.add(menuSettings);
  menuExtra.add(menuItemInfo);
  menuExtra.add(menuItemAwards);
  menuBar.add(menuItemCancel);
  menuItemCancel.setVisible(false);
  menuBar.add(menuExtra);
  add(menuBar,BorderLayout.NORTH);
  panelToday.setLayout(new GridLayout(7,1,5,5));
  panelToday.setBorder(BorderFactory.createEmptyBorder(0,5,0,5));
  labelTodayAssignments.setForeground(new Color(0,0,255));
  labelTodayAssignments.setFont(new Font("String_Node_Str",Font.BOLD,24));
  panelToday.add(labelTodayAssignments);
  int i;
  int nShownTodayAssignments=0;
  nTodayAssignments=getNDailyAssignments();
  if (nTodayAssignments <= MAXVISIBLETODAYASSIGNMENT) {
    buttonTodayAssignment=new JButton[nTodayAssignments];
    for (i=0; i < nTodayAssignments; i++) {
      buttonTodayAssignment[i]=new JButton("String_Node_Str");
      buttonTodayAssignment[i].setBackground(new Color(179,237,255));
      buttonTodayAssignment[i].setOpaque(true);
      buttonTodayAssignment[i].setBorderPainted(false);
      buttonTodayAssignment[i].setDisplayedMnemonicIndex(i);
      panelToday.add(buttonTodayAssignment[i]);
    }
  }
 else {
    buttonTodayAssignment=new JButton[MAXVISIBLETODAYASSIGNMENT];
    for (i=0; i < MAXVISIBLETODAYASSIGNMENT; i++) {
      buttonTodayAssignment[i]=new JButton("String_Node_Str");
      buttonTodayAssignment[i].setBackground(new Color(179,237,255));
      buttonTodayAssignment[i].setOpaque(true);
      buttonTodayAssignment[i].setBorderPainted(false);
      buttonTodayAssignment[i].setDisplayedMnemonicIndex(i);
      panelToday.add(buttonTodayAssignment[i]);
    }
  }
  if ((nTodayAssignments > 0) && (nTodayAssignments <= MAXVISIBLETODAYASSIGNMENT)) {
    labelEmptyTodayAssignments=new JLabel[MAXVISIBLETODAYASSIGNMENT - nTodayAssignments + 1];
    for (i=0; i < MAXVISIBLETODAYASSIGNMENT - nTodayAssignments + 1; i++) {
      labelEmptyTodayAssignments[i]=new JLabel();
      panelToday.add(labelEmptyTodayAssignments[i]);
      nShownTodayAssignments=nTodayAssignments;
    }
  }
 else   if (nTodayAssignments > MAXVISIBLETODAYASSIGNMENT) {
    panelToday.add(buttonShowMoreTodayAssignments);
    nShownTodayAssignments=MAXVISIBLETODAYASSIGNMENT;
  }
 else {
    labelEmptyTodayAssignments=new JLabel[1];
    labelEmptyTodayAssignments[0]=new JLabel("String_Node_Str",SwingConstants.CENTER);
    panelToday.add(labelEmptyTodayAssignments[0]);
    nShownTodayAssignments=0;
  }
  loadTheFirstFiveAssignments(nShownTodayAssignments);
  add(panelToday,BorderLayout.EAST);
  ActionListener cal=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent cae){
      if ((!(cae.getActionCommand().equals("String_Node_Str"))) && ((calendarState.equals(CalendarState.NORMAL)) || (calendarState.equals(CalendarState.REMOVING)))) {
        JButton pressedButton=(JButton)cae.getSource();
        GUIDailyAssignments guiDailyAssignments=new GUIDailyAssignments(calendarState,null);
        guiDailyAssignments.setVisible(true);
      }
      if ((!(cae.getActionCommand().equals("String_Node_Str"))) && (calendarState.equals(CalendarState.ADDING))) {
        JButton pressedButton=(JButton)cae.getSource();
        GUINewAssignment guiNewAssignment=new GUINewAssignment();
        guiNewAssignment.setVisible(true);
      }
    }
  }
;
  ActionListener ctrlCal=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent ctrlAe){
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goBackMonthCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goForwardMonthCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goBackYearCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        try {
          goForwardYearCalendar();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
      }
      if (ctrlAe.getActionCommand().equals("String_Node_Str")) {
        GUIDailyAssignments guiDailyAssignments=new GUIDailyAssignments(calendarState,null);
        guiDailyAssignments.setVisible(true);
      }
    }
  }
;
  ActionListener menuAl=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent menuAe){
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        System.exit(0);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        GUILogin guiLogin=new GUILogin();
        guiLogin.setVisible(true);
        setVisible(false);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        calendarState=CalendarState.REVIEWING;
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        calendarState=CalendarState.DELETING_REVIEW;
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        calendarState=CalendarState.SHOW_REVIEWS;
        openListAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        try {
          enableDisableDateButtonAssignment();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
        newAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        try {
          enableDisableDateButtonAssignment();
        }
 catch (        ParseException e) {
          e.printStackTrace();
        }
        removeAssignment();
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        GUISettings guiSettings=new GUISettings(email);
        guiSettings.setVisible(true);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        GUIChangePassword guiChangePassword=new GUIChangePassword(email);
        guiChangePassword.setVisible(true);
      }
      if (menuAe.getActionCommand().equals("String_Node_Str")) {
        cancel();
      }
    }
  }
;
  ActionListener todayAssignmentsAl=new ActionListener(){
    @Override public void actionPerformed(    ActionEvent todayAssignmentAe){
      if (!(todayAssignmentAe.getActionCommand().equals("String_Node_Str"))) {
        JButton pressedButton=(JButton)todayAssignmentAe.getSource();
        StringTokenizer cmdToken=new StringTokenizer(buttonTodayAssignment[0].getText(),"String_Node_Str");
        String cmd=cmdToken.nextToken();
        if (cmd.equals("String_Node_Str")) {
          GUIAssignmentInformationCustomer guiAssignment=new GUIAssignmentInformationCustomer();
          guiAssignment.setVisible(true);
        }
      }
    }
  }
;
  startCalendar(cal,ctrlCal);
  menuItemExit.addActionListener(menuAl);
  menuItemLogout.addActionListener(menuAl);
  menuItemAddAssignment.addActionListener(menuAl);
  menuItemCancel.addActionListener(menuAl);
  menuItemRemoveAssignment.addActionListener(menuAl);
  menuItemShowAssignments.addActionListener(menuAl);
  menuItemAddReview.addActionListener(menuAl);
  menuItemRemoveReview.addActionListener(menuAl);
  menuItemShowReviews.addActionListener(menuAl);
  menuItemAccount.addActionListener(menuAl);
  menuItemChangePassword.addActionListener(menuAl);
  buttonShowMoreTodayAssignments.addActionListener(ctrlCal);
  for (i=0; i < nShownTodayAssignments; i++) {
    buttonTodayAssignment[i].addActionListener(todayAssignmentsAl);
  }
}