Program: 78012
Project: 78012
Buggy source:
/** 
 * prepares filter-imageViews by getting all filters from service and showing the filter in small preview imageviews
 * @param imgOriginalPath path of the image to show
 */
public void makePreviewFilter(String imgOriginalPath){
  LOGGER.info("String_Node_Str" + imgOriginalPath);
  try {
    String imgPath=imageService.resize(imgOriginalPath,100,150);
    int counter=1;
    for (    Map.Entry<String,String> entry : imageService.getAllFilteredImages(imgPath).entrySet()) {
      ImageView imageView=new ImageView(new Image(new FileInputStream(entry.getValue()),80,80,false,true));
      imageView.setId(entry.getKey());
      imageView.setOnMouseClicked(e -> {
        String newImgPath="String_Node_Str";
        ImageView imgView=(ImageView)e.getSource();
        try {
switch (imgView.getId()) {
case "String_Node_Str":
            newImgPath=imageService.filterGaussian(ivfullscreenImage.getId());
          break;
case "String_Node_Str":
        newImgPath=imageService.filterSobel(ivfullscreenImage.getId());
      break;
case "String_Node_Str":
    newImgPath=imageService.filterColorSpace(ivfullscreenImage.getId());
  break;
case "String_Node_Str":
newImgPath=imageService.filterGrayScale(ivfullscreenImage.getId());
break;
case "String_Node_Str":
newImgPath=imageService.filterThreshZero(ivfullscreenImage.getId());
break;
case "String_Node_Str":
newImgPath=imageService.filterThreshBinaryInvert(ivfullscreenImage.getId());
break;
default :
}
try {
if (changeActiveFilter(imgView)) {
filteredImgPath=newImgPath;
ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
}
}
 catch (FileNotFoundException e1) {
LOGGER.error("String_Node_Str" + e1.getMessage());
}
}
 catch (ServiceException e2) {
LOGGER.error("String_Node_Str" + e2.getMessage());
}
}
);
planbottom.add(imageView,counter,0);
ColumnConstraints con=new ColumnConstraints();
con.setPrefWidth(100);
planbottom.getColumnConstraints().add(con);
counter++;
}
mainPane.add(planbottom,0,2);
}
 catch (Exception e) {
LOGGER.error("String_Node_Str" + e.getMessage());
}
}

Fixed version (ground truth):
/** 
 * prepares filter-imageViews by getting all filters from service and showing the filter in small preview imageviews
 * @param imgOriginalPath path of the image to show
 */
public void makePreviewFilter(String imgOriginalPath){
  LOGGER.info("String_Node_Str" + imgOriginalPath);
  try {
    String imgPath=imageService.resize(imgOriginalPath,100,150);
    int counter=1;
    Map<String,String> allfilters=imageService.getAllFilteredImages(imgPath);
    double imageFilterConstraint=(Screen.getPrimary().getBounds().getWidth() - (allfilters.size() * 100)) / 2;
    planbottom.getChildren().clear();
    if (!constraintInitialized) {
      System.out.println(imageFilterConstraint);
      ColumnConstraints con=new ColumnConstraints();
      con.setPrefWidth(imageFilterConstraint);
      planbottom.getColumnConstraints().add(con);
    }
    for (    Map.Entry<String,String> entry : allfilters.entrySet()) {
      ImageView imageView=new ImageView(new Image(new FileInputStream(entry.getValue()),80,80,false,true));
      imageView.setId(entry.getKey());
      imageView.setOnMouseClicked(e -> {
        String newImgPath="String_Node_Str";
        ImageView imgView=(ImageView)e.getSource();
        try {
switch (imgView.getId()) {
case "String_Node_Str":
            newImgPath=imageService.filterGaussian(ivfullscreenImage.getId());
          break;
case "String_Node_Str":
        newImgPath=imageService.filterSobel(ivfullscreenImage.getId());
      break;
case "String_Node_Str":
    newImgPath=imageService.filterColorSpace(ivfullscreenImage.getId());
  break;
case "String_Node_Str":
newImgPath=imageService.filterGrayScale(ivfullscreenImage.getId());
break;
case "String_Node_Str":
newImgPath=imageService.filterThreshZero(ivfullscreenImage.getId());
break;
case "String_Node_Str":
newImgPath=imageService.filterThreshBinaryInvert(ivfullscreenImage.getId());
break;
default :
}
try {
if (changeActiveFilter(imgView)) {
filteredImgPath=newImgPath;
ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
}
}
 catch (FileNotFoundException e1) {
LOGGER.error("String_Node_Str" + e1.getMessage());
}
}
 catch (ServiceException e2) {
LOGGER.error("String_Node_Str" + e2.getMessage());
}
}
);
planbottom.add(imageView,counter,0);
if (!constraintInitialized) {
ColumnConstraints con=new ColumnConstraints();
con.setPrefWidth(100);
planbottom.getColumnConstraints().add(con);
}
counter++;
}
if (!constraintInitialized) {
ColumnConstraints con=new ColumnConstraints();
con.setPrefWidth(imageFilterConstraint);
planbottom.getColumnConstraints().add(con);
constraintInitialized=true;
}
mainPane.add(planbottom,0,2);
}
 catch (Exception e) {
LOGGER.error("String_Node_Str" + e.getMessage());
}
}