Program: 77823
Project: 77823
Buggy source:
/** 
 * defines the first image and initialises the image list
 * @param imgID image id given from miniaturframe
 */
public void changeImage(int imgID){
  activ=-1;
  FileInputStream fips=null;
  try {
    if (shootingService.searchIsActive().getActive()) {
      activ=shootingService.searchIsActive().getId();
      imageList=imageService.getAllImages(activ);
    }
    if (imageList != null) {
      for (int i=0; i < imageList.size(); i++) {
        if (imageList.get(i).getImageID() == imgID) {
          currentIndex=i;
        }
      }
      if (currentIndex == 0) {
        button4.setVisible(false);
      }
      if (currentIndex == (imageList.size() - 1)) {
        button3.setVisible(false);
      }
      at.ac.tuwien.sepm.ws16.qse01.entities.Image img=imageService.read(imgID);
      fips=new FileInputStream(img.getImagepath());
      ivfullscreenImage.setImage(new Image(fips,base.getWidth(),base.getHeight(),true,true));
      ivfullscreenImage.setId(img.getImagepath());
      makePreviewFilter(img.getImagepath());
    }
 else {
      windowManager.showScene(WindowManager.SHOW_MINIATURESCENE);
    }
  }
 catch (  ServiceException e) {
    informationDialog("String_Node_Str");
    LOGGER.error("String_Node_Str",e);
  }
catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str",e);
    informationDialog("String_Node_Str");
  }
catch (  NullPointerException e) {
    LOGGER.error("String_Node_Str",e);
    informationDialog("String_Node_Str");
  }
 finally {
    if (fips != null) {
      try {
        fips.close();
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * defines the first image and initialises the image list
 * @param imgID image id given from miniaturframe
 */
public void changeImage(int imgID){
  LOGGER.info("String_Node_Str" + imgID);
  activ=-1;
  FileInputStream fips=null;
  try {
    if (shootingService.searchIsActive().getActive()) {
      activ=shootingService.searchIsActive().getId();
      this.imageList=imageService.getAllImages(activ);
    }
    System.out.println("String_Node_Str" + imageList.size() + "String_Node_Str"+ activ);
    if (imageList != null) {
      LOGGER.debug("String_Node_Str" + imageList.size());
      for (int i=0; i < imageList.size(); i++) {
        if (imageList.get(i).getImageID() == imgID) {
          currentIndex=i;
        }
      }
      if (currentIndex == 0) {
        button4.setVisible(false);
      }
      if (currentIndex == (imageList.size() - 1)) {
        button3.setVisible(false);
      }
      at.ac.tuwien.sepm.ws16.qse01.entities.Image img=imageService.read(imgID);
      fips=new FileInputStream(img.getImagepath());
      ivfullscreenImage.setImage(new Image(fips,base.getWidth(),base.getHeight(),true,true));
      ivfullscreenImage.setId(img.getImagepath());
      makePreviewFilter(img.getImagepath());
    }
 else {
      windowManager.showScene(WindowManager.SHOW_MINIATURESCENE);
    }
  }
 catch (  ServiceException e) {
    informationDialog("String_Node_Str");
    LOGGER.error("String_Node_Str",e);
  }
catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str",e);
    informationDialog("String_Node_Str");
  }
catch (  NullPointerException e) {
    LOGGER.error("String_Node_Str",e);
    informationDialog("String_Node_Str");
  }
 finally {
    if (fips != null) {
      try {
        fips.close();
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
}