Program: 77824
Project: 77824
Buggy source:
private void onCheckPressed(){
  cropping=false;
  cropRectangle.setVisible(false);
  resizeHandleNW.setVisible(false);
  resizeHandleSE.setVisible(false);
  saveFilteredButton.setVisible(false);
  int x=(int)cropRectangle.localToScene(cropRectangle.getBoundsInLocal()).getMinX() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinX();
  int y=(int)cropRectangle.localToScene(cropRectangle.getBoundsInLocal()).getMinY() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinY();
  int maxX=(int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMaxX() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinX();
  int maxY=(int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMaxY() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinY();
  try {
    at.ac.tuwien.sepm.ws16.qse01.entities.Image newImage=imageService.crop(imageList.get(currentIndex),activeFilterImageView.getId(),x,x + (int)cropRectangle.getWidth(),y,y + (int)cropRectangle.getHeight(),maxX,maxY);
    if ((currentIndex + 1) >= imageList.size()) {
      imageList.add(newImage);
      refreshManager.notifyMiniatureFrameOfAdd(newImage,-1);
    }
 else {
      imageList.add(currentIndex + 1,newImage);
      refreshManager.notifyMiniatureFrameOfAdd(newImage,currentIndex + 1);
    }
    currentIndex=currentIndex + 1;
    button4.setVisible(true);
    System.out.println("String_Node_Str" + newImage.getImagepath());
    ivfullscreenImage.setImage(new Image("String_Node_Str" + newImage.getImagepath(),base.getWidth(),base.getHeight(),true,true));
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void onCheckPressed(){
  cropping=false;
  cropRectangle.setVisible(false);
  resizeHandleNW.setVisible(false);
  resizeHandleSE.setVisible(false);
  saveFilteredButton.setVisible(false);
  int x=(int)cropRectangle.localToScene(cropRectangle.getBoundsInLocal()).getMinX() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinX();
  int y=(int)cropRectangle.localToScene(cropRectangle.getBoundsInLocal()).getMinY() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinY();
  int maxX=(int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMaxX() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinX();
  int maxY=(int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMaxY() - (int)ivfullscreenImage.localToScene(ivfullscreenImage.getBoundsInLocal()).getMinY();
  try {
    System.out.println(currentIndex + "String_Node_Str" + imageList.size());
    at.ac.tuwien.sepm.ws16.qse01.entities.Image newImage=imageService.crop(imageList.get(currentIndex),activeFilterImageView.getId(),x,x + (int)cropRectangle.getWidth(),y,y + (int)cropRectangle.getHeight(),maxX,maxY);
    if ((currentIndex + 1) >= imageList.size()) {
      imageList.add(newImage);
      refreshManager.notifyMiniatureFrameOfAdd(newImage,-1);
    }
 else {
      imageList.add(currentIndex + 1,newImage);
      refreshManager.notifyMiniatureFrameOfAdd(newImage,currentIndex + 1);
    }
    currentIndex=currentIndex + 1;
    button4.setVisible(true);
    System.out.println("String_Node_Str" + newImage.getImagepath());
    ivfullscreenImage.setImage(new Image("String_Node_Str" + newImage.getImagepath(),base.getWidth(),base.getHeight(),true,true));
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
}