nus-yam/ex-repair huggingface dataset:
Program: 77910
Project: 77910
Buggy source:
/** 
 * in case of a breakdown the Recovery Dialog will tell the user about an still active shooting and gives them the option to continue to ether close or reloade this shooting in case of reload the user gets directly to the costumer interface caches ServiceException eventualy caused by endShooting
 */
public void showRecoveryDialog(){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION,"String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  Optional<ButtonType> result=alert.showAndWait();
  if (result.isPresent() && result.get() == ButtonType.OK) {
    windowManager.notifyActiveShootingAvailable();
  }
 else {
    try {
      shootingService.endShooting();
      LOGGER.info("String_Node_Str");
      showInformationDialog("String_Node_Str");
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
      showInformationDialog("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * in case of a breakdown the Recovery Dialog will tell the user about an still active shooting and gives them the option to continue to ether close or reloade this shooting in case of reload the user gets directly to the costumer interface caches ServiceException eventualy caused by endShooting
 */
public void showRecoveryDialog(){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION,"String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  Optional<ButtonType> result=alert.showAndWait();
  if (result.isPresent() && result.get() == ButtonType.OK) {
    windowManager.notifyActiveShootingAvailable();
  }
 else {
    try {
      shootingService.endShooting();
      LOGGER.info("String_Node_Str");
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
      showInformationDialog("String_Node_Str");
    }
  }
}
Program: 77912
Project: 77912
Buggy source:
/** 
 * This method loads the OpenCVLibrary from the Ressource Lib folder
 * @throws LibraryLoadingException if the operating System is not supported
 */
public void loadLibrary() throws LibraryLoadingException {
  if (!isLoaded) {
    try {
      System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
      isLoaded=true;
      LOGGER.info("String_Node_Str",Core.NATIVE_LIBRARY_NAME);
    }
 catch (    UnsatisfiedLinkError e) {
      LOGGER.error("String_Node_Str",e);
      String lib;
      String operatingSystem=System.getProperty("String_Node_Str").toLowerCase();
      if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else {
        LOGGER.error("String_Node_Str",operatingSystem);
        throw new LibraryLoadingException("String_Node_Str");
      }
      String libPath=this.getClass().getResource(lib).getPath();
      System.load(libPath);
      isLoaded=true;
      LOGGER.info("String_Node_Str",operatingSystem,libPath);
    }
  }
}

Fixed version (ground truth):
/** 
 * This method loads the OpenCVLibrary from the Ressource Lib folder
 * @throws LibraryLoadingException if the operating System is not supported
 */
public void loadLibrary() throws LibraryLoadingException {
  if (!isLoaded) {
    try {
      isLoaded=true;
      LOGGER.info("String_Node_Str",Core.NATIVE_LIBRARY_NAME);
    }
 catch (    UnsatisfiedLinkError e) {
      LOGGER.error("String_Node_Str",e);
      String lib;
      String operatingSystem=System.getProperty("String_Node_Str").toLowerCase();
      if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else {
        LOGGER.error("String_Node_Str",operatingSystem);
        throw new LibraryLoadingException("String_Node_Str");
      }
      String libPath=this.getClass().getResource(lib).getPath();
      isLoaded=true;
      LOGGER.info("String_Node_Str",operatingSystem,libPath);
    }
  }
}
Program: 77913
Project: 77913
Buggy source:
/** 
 * This method loads the OpenCVLibrary from the Ressource Lib folder
 * @throws LibraryLoadingException if the operating System is not supported
 */
public void loadLibrary() throws LibraryLoadingException {
  if (!isLoaded) {
    try {
      isLoaded=true;
      LOGGER.info("String_Node_Str",Core.NATIVE_LIBRARY_NAME);
    }
 catch (    UnsatisfiedLinkError e) {
      LOGGER.error("String_Node_Str",e);
      String lib;
      String operatingSystem=System.getProperty("String_Node_Str").toLowerCase();
      if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else {
        LOGGER.error("String_Node_Str",operatingSystem);
        throw new LibraryLoadingException("String_Node_Str");
      }
      String libPath=this.getClass().getResource(lib).getPath();
      System.load(libPath);
      isLoaded=true;
      LOGGER.info("String_Node_Str",operatingSystem,libPath);
    }
  }
}

Fixed version (ground truth):
/** 
 * This method loads the OpenCVLibrary from the Ressource Lib folder
 * @throws LibraryLoadingException if the operating System is not supported
 */
public void loadLibrary() throws LibraryLoadingException {
  if (!isLoaded) {
    try {
      System.loadLibrary(Core.NATIVE_LIBRARY_NAME);
      isLoaded=true;
      LOGGER.info("String_Node_Str",Core.NATIVE_LIBRARY_NAME);
    }
 catch (    UnsatisfiedLinkError e) {
      LOGGER.error("String_Node_Str",e);
      String lib;
      String operatingSystem=System.getProperty("String_Node_Str").toLowerCase();
      if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else       if (operatingSystem.contains("String_Node_Str")) {
        lib="String_Node_Str";
      }
 else {
        LOGGER.error("String_Node_Str",operatingSystem);
        throw new LibraryLoadingException("String_Node_Str");
      }
      String libPath=this.getClass().getResource(lib).getPath();
      System.load(libPath);
      isLoaded=true;
      LOGGER.info("String_Node_Str",operatingSystem,libPath);
    }
  }
}
Program: 77915
Project: 77915
Buggy source:
public void run(){
  LOGGER.info("String_Node_Str",camera);
  int i=1;
  boolean imageSaved=false;
  while (i == 1) {
    Image image=null;
    try {
      final CameraFile cf=cameraGphoto.waitForImage();
      if (cf != null) {
        Shooting activeShooting=shootingService.searchIsActive();
        if (activeShooting != null) {
          int imageID=imageService.getNextImageID();
          String directoryPath=activeShooting.getStorageDir() + "String_Node_Str";
          DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
          Date date=new Date();
          String imagePath=directoryPath + "String_Node_Str" + camera.getId()+ "String_Node_Str"+ dateFormat.format(date)+ "String_Node_Str";
          image=new Image(imageID,imagePath,activeShooting.getId(),new Date());
          image=imageService.create(image);
          cf.save(new File(imagePath).getAbsolutePath());
          imageSaved=true;
          LOGGER.debug(imageService.getLastImgPath(activeShooting.getId()));
        }
 else {
          LOGGER.error("String_Node_Str");
        }
        cf.close();
      }
    }
 catch (    CameraException ex) {
      LOGGER.debug("String_Node_Str" + ex);
      return;
    }
catch (    ServiceException ex) {
      LOGGER.debug("String_Node_Str",ex);
    }
    if (shouldStop) {
      LOGGER.debug("String_Node_Str",camera);
      return;
    }
    if (imageSaved) {
      try {
        imageProcessor.processShot(image);
      }
 catch (      ServiceException e) {
        LOGGER.error("String_Node_Str",e);
      }
      imageSaved=false;
    }
  }
  CameraUtils.closeQuietly(cameraGphoto);
}

Fixed version (ground truth):
@Override public void run(){
  while (true) {
    if (takeImage) {
      captureImage();
      takeImage=false;
    }
 else {
      capturePreview();
    }
    if (shouldStop) {
      LOGGER.debug("String_Node_Str",camera);
      return;
    }
  }
}
Program: 77916
Project: 77916
Buggy source:
@Autowired public FullScreenImageController(WindowManager windowManager,ShootingService shootingService,FilterService filterService,ImageService imageService,ImagePrinter imagePrinter,ImageHandler imageHandler,RefreshManager refreshManager) throws ServiceException {
  this.filterService=filterService;
  this.imageService=imageService;
  this.shootingService=shootingService;
  this.windowManager=windowManager;
  this.imagePrinter=imagePrinter;
  this.refreshManager=refreshManager;
  this.imageHandler=imageHandler;
  this.activeShooting=shootingService.searchIsActive();
}

Fixed version (ground truth):
@Autowired public FullScreenImageController(WindowManager windowManager,ShootingService shootingService,FilterService filterService,ImageService imageService,ImagePrinter imagePrinter,ImageHandler imageHandler,RefreshManager refreshManager,ThreadCommunicator threadCommunicator) throws ServiceException {
  this.filterService=filterService;
  this.imageService=imageService;
  this.shootingService=shootingService;
  this.windowManager=windowManager;
  this.imagePrinter=imagePrinter;
  this.refreshManager=refreshManager;
  this.imageHandler=imageHandler;
  this.activeShooting=shootingService.searchIsActive();
}
Program: 77917
Project: 77917
Buggy source:
public void onCropPressed(){
  cropping=true;
  saveFilteredButton.setVisible(true);
  LOGGER.info("String_Node_Str");
  if (cropRectangle == null) {
    cropRectangle=createDraggableRectangle(200,200,500,500);
    wholePane.getChildren().add(cropRectangle);
  }
 else {
    cropRectangle.setVisible(true);
    resizeHandleNW.setVisible(true);
    resizeHandleSE.setVisible(true);
  }
}

Fixed version (ground truth):
public void onCropPressed(){
  cropping=true;
  saveFilteredButton.setVisible(true);
  LOGGER.info("String_Node_Str");
  if (cropRectangle == null) {
    cropRectangle=createDraggableRectangle(wholePane.getWidth() - 250,wholePane.getHeight() - 250,500,500);
    wholePane.getChildren().add(cropRectangle);
  }
 else {
    cropRectangle.setVisible(true);
    resizeHandleNW.setVisible(true);
    resizeHandleSE.setVisible(true);
  }
}
Program: 77919
Project: 77919
Buggy source:
public void init(Stage stage) throws ServiceException {
  this.stage=stage;
  scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
  scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
  double screenWidth=Screen.getPrimary().getBounds().getWidth();
  double screenHeight=Screen.getPrimary().getBounds().getHeight();
  System.out.println(screenWidth + "String_Node_Str" + screenHeight);
  tile.setMinWidth(screenWidth);
  tile.setMinHeight(screenHeight - 65);
  tile.setPadding(new Insets(20,20,20,20));
  tile.setHgap(20);
  tile.setVgap(20);
  if (shootingService.searchIsActive().getActive()) {
    LOGGER.info("String_Node_Str" + shootingService.searchIsActive().getId());
    listOfImages=imageService.getAllImages(shootingService.searchIsActive().getId());
  }
 else {
    return;
  }
  for (  final at.ac.tuwien.sepm.ws16.qse01.entities.Image img : listOfImages) {
    prepareHBox(img);
  }
}

Fixed version (ground truth):
public void init(Stage stage) throws ServiceException {
  this.stage=stage;
  scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
  scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
  double screenWidth=Screen.getPrimary().getBounds().getWidth();
  double screenHeight=Screen.getPrimary().getBounds().getHeight();
  System.out.println(screenWidth + "String_Node_Str" + screenHeight);
  tile.setMinWidth(screenWidth);
  tile.setMinHeight(screenHeight - 60);
  tile.setPadding(new Insets(20,20,20,20));
  tile.setHgap(20);
  tile.setVgap(20);
  if (shootingService.searchIsActive().getActive()) {
    LOGGER.info("String_Node_Str" + shootingService.searchIsActive().getId());
    listOfImages=imageService.getAllImages(shootingService.searchIsActive().getId());
  }
 else {
    return;
  }
  for (  final at.ac.tuwien.sepm.ws16.qse01.entities.Image img : listOfImages) {
    prepareHBox(img);
  }
}
Program: 77920
Project: 77920
Buggy source:
public void initShotFrame(int cameraID){
  this.frameID=cameraID;
}

Fixed version (ground truth):
public void initShotFrame(int cameraID){
  this.frameID=cameraID;
  showCountdown(10);
}
Program: 77922
Project: 77922
Buggy source:
@Override public TableCell<Background.Category,Boolean> call(TableColumn<Background.Category,Boolean> p){
  return new CategoryButtonCell(categoryList,bservice,windowManager.getStage());
}

Fixed version (ground truth):
@Override public TableCell<Background.Category,Boolean> call(TableColumn<Background.Category,Boolean> p){
  return new CategoryButtonCell(categoryListOfProfile,selectedProfile,categoryList,bservice,windowManager.getStage());
}
Program: 77925
Project: 77925
Buggy source:
@Override public TableCell<Profile.PairCameraPosition,Boolean> call(TableColumn<Profile.PairCameraPosition,Boolean> p){
  System.out.println("String_Node_Str");
  return new CamPosComboBoxCell(kamPosList,pservice,posList);
}

Fixed version (ground truth):
@Override public TableCell<Profile.PairCameraPosition,Boolean> call(TableColumn<Profile.PairCameraPosition,Boolean> p){
  return new CamPosComboBoxCell(kamPosList,pservice,posList);
}
Program: 77926
Project: 77926
Buggy source:
@FXML private void initialize(){
  tableKamPos.setEditable(true);
  colKamPosKamera.setCellValueFactory(new PropertyValueFactory<Profile.PairCameraPosition,String>("String_Node_Str"));
  colKamPosPosition.setStyle("String_Node_Str");
  colKamPosPosition.setSortable(false);
  colKamPosPosition.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairCameraPosition,Boolean>,ObservableValue<Boolean>>(){
    @Override public ObservableValue<Boolean> call(    TableColumn.CellDataFeatures<Profile.PairCameraPosition,Boolean> p){
      return new SimpleBooleanProperty(p.getValue() != null);
    }
  }
);
  colKamPosPosition.setCellFactory(new Callback<TableColumn<Profile.PairCameraPosition,Boolean>,TableCell<Profile.PairCameraPosition,Boolean>>(){
    @Override public TableCell<Profile.PairCameraPosition,Boolean> call(    TableColumn<Profile.PairCameraPosition,Boolean> p){
      System.out.println("String_Node_Str");
      return new CamPosComboBoxCell(kamPosList,pservice,posList);
    }
  }
);
}

Fixed version (ground truth):
@FXML private void initialize(){
  tableKamPos.setEditable(true);
  colKamPosKamera.setCellValueFactory(new PropertyValueFactory<Profile.PairCameraPosition,String>("String_Node_Str"));
  colKamPosPosition.setStyle("String_Node_Str");
  colKamPosPosition.setSortable(false);
  colKamPosPosition.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Profile.PairCameraPosition,Boolean>,ObservableValue<Boolean>>(){
    @Override public ObservableValue<Boolean> call(    TableColumn.CellDataFeatures<Profile.PairCameraPosition,Boolean> p){
      return new SimpleBooleanProperty(p.getValue() != null);
    }
  }
);
  colKamPosPosition.setCellFactory(new Callback<TableColumn<Profile.PairCameraPosition,Boolean>,TableCell<Profile.PairCameraPosition,Boolean>>(){
    @Override public TableCell<Profile.PairCameraPosition,Boolean> call(    TableColumn<Profile.PairCameraPosition,Boolean> p){
      return new CamPosComboBoxCell(kamPosList,pservice,posList);
    }
  }
);
}
Program: 77927
Project: 77927
Buggy source:
@FXML private void saveCategory(){
  LOGGER.error("String_Node_Str");
  String name=txCategoryName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    showError("String_Node_Str");
  }
 else {
    Background.Category p=new Background.Category(name);
    try {
      LOGGER.info("String_Node_Str");
      bservice.addCategory(p);
      categoryList.add(p);
      refreshCategoryComboBox(categoryList);
      txCategoryName.clear();
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str" + e.getMessage());
    }
  }
}

Fixed version (ground truth):
@FXML private void saveCategory(){
  LOGGER.error("String_Node_Str");
  String name=txCategoryName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    showError("String_Node_Str");
  }
 else {
    Background.Category p=new Background.Category(name);
    try {
      LOGGER.info("String_Node_Str");
      bservice.addCategory(p);
      categoryList.add(p);
      refreshCategoryComboBox(categoryList);
      txCategoryName.clear();
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}
Program: 77928
Project: 77928
Buggy source:
@FXML private void logoUpload(){
  fileChooser.setTitle("String_Node_Str");
  fileChooser.setInitialDirectory(new File(System.getProperty("String_Node_Str")));
  fileChooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter("String_Node_Str","String_Node_Str"),new FileChooser.ExtensionFilter("String_Node_Str","String_Node_Str"));
  File file=fileChooser.showOpenDialog(new Stage());
  if (file != null) {
    txLogoLogo.setText(file.getAbsolutePath());
  }
}

Fixed version (ground truth):
@FXML private void logoUpload(){
  fileChooser.setTitle("String_Node_Str");
  fileChooser.setInitialDirectory(new File(System.getProperty("String_Node_Str")));
  fileChooser.getExtensionFilters().addAll(new FileChooser.ExtensionFilter("String_Node_Str","String_Node_Str"),new FileChooser.ExtensionFilter("String_Node_Str","String_Node_Str"));
  File file=fileChooser.showOpenDialog(new Stage());
  if (file != null) {
    txLogoLogo.setText(file.getAbsolutePath());
    txLogoLogo.setId("String_Node_Str");
  }
}
Program: 77929
Project: 77929
Buggy source:
@Override public void handle(TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
  try {
    Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
    if (!t.getNewValue().isNaN()) {
      p.getRelativeRectangle().setHeight(t.getNewValue());
      pservice.editPairLogoRelativeRectangle(p);
    }
 else {
      refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
    }
  }
 catch (  ServiceException e) {
    try {
      refreshTableProfiles(pservice.getAllProfiles());
    }
 catch (    ServiceException e1) {
      LOGGER.error("String_Node_Str",e1);
    }
  }
}

Fixed version (ground truth):
@Override public void handle(TableColumn.CellEditEvent<Profile.PairLogoRelativeRectangle,Double> t){
  try {
    Profile.PairLogoRelativeRectangle p=((Profile.PairLogoRelativeRectangle)t.getTableView().getItems().get(t.getTablePosition().getRow()));
    if (!t.getNewValue().isNaN()) {
      p.getRelativeRectangle().setHeight(t.getNewValue());
      pservice.editPairLogoRelativeRectangle(p);
      changePreviewSize(txPreviewHeight.getText(),0);
    }
 else {
      refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfile.getId()));
    }
  }
 catch (  ServiceException e) {
    try {
      refreshTableProfiles(pservice.getAllProfiles());
    }
 catch (    ServiceException e1) {
      LOGGER.error("String_Node_Str",e1);
    }
  }
}
Program: 77932
Project: 77932
Buggy source:
@Override public TableCell<Position,Boolean> call(TableColumn<Position,Boolean> p){
  System.out.println("String_Node_Str" + selectedProfile.getId());
  return new PositionButtonCell(posList,kamPosList,selectedProfile.getId(),pservice,windowManager.getStage());
}

Fixed version (ground truth):
@Override public TableCell<Position,Boolean> call(TableColumn<Position,Boolean> p){
  return new PositionButtonCell(posList,kamPosList,selectedProfile.getId(),pservice,windowManager.getStage());
}
Program: 77934
Project: 77934
Buggy source:
@FXML protected void saveProfil(){
  LOGGER.error("String_Node_Str");
  String name=txProfilName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    LOGGER.error("String_Node_Str");
    showError("String_Node_Str");
  }
 else {
    Profile p=new Profile(name,txProfilDrucken.isSelected(),txProfilFilter.isSelected(),txProfilGreen.isSelected(),txProfilMobil.isSelected(),txProfilWatermark.getText());
    if (txProfilWatermark.getText().compareTo("String_Node_Str") != 0)     p.setWatermark(txProfilWatermark.getText());
    try {
      LOGGER.info("String_Node_Str");
      pservice.add(p);
      profList.add(p);
      txProfilDrucken.setSelected(false);
      txProfilFilter.setSelected(false);
      txProfilGreen.setSelected(false);
      txProfilMobil.setSelected(false);
      txProfilName.clear();
      txProfilWatermark.setText("String_Node_Str");
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str" + e.getMessage());
    }
  }
}

Fixed version (ground truth):
@FXML protected void saveProfil(){
  LOGGER.error("String_Node_Str");
  String name=txProfilName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    LOGGER.error("String_Node_Str");
    showError("String_Node_Str");
  }
 else {
    Profile p=new Profile(name,txProfilDrucken.isSelected(),txProfilFilter.isSelected(),txProfilGreen.isSelected(),txProfilMobil.isSelected(),txProfilWatermark.getText());
    if (txProfilWatermark.getText().compareTo("String_Node_Str") != 0)     p.setWatermark(txProfilWatermark.getText());
    try {
      LOGGER.info("String_Node_Str");
      pservice.add(p);
      profList.add(p);
      txProfilDrucken.setSelected(false);
      txProfilFilter.setSelected(false);
      txProfilGreen.setSelected(false);
      txProfilMobil.setSelected(false);
      txProfilName.clear();
      txProfilWatermark.setText("String_Node_Str");
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}
Program: 77936
Project: 77936
Buggy source:
/** 
 * Construct a new AutoCompleteTextField. 
 */
public AutoCompleteTextField(){
  super();
  entries=new TreeSet<>();
  imgViews=new HashMap<>();
  entriesPopup=new ContextMenu();
  textProperty().addListener((observableValue,s,s2) -> {
    if (getText().length() == 0) {
      entriesPopup.hide();
    }
 else {
      LinkedList<String> searchResult=new LinkedList<>();
      System.out.println(getText().toLowerCase() + "String_Node_Str" + getText().toLowerCase()+ Character.MAX_VALUE);
      searchResult.addAll(entries.subSet(getText().toLowerCase(),getText().toLowerCase() + Character.MAX_VALUE));
      if (entries.size() > 0) {
        populatePopup(searchResult);
        if (!entriesPopup.isShowing()) {
          entriesPopup.show(AutoCompleteTextField.this,Side.BOTTOM,0,0);
        }
      }
 else {
        entriesPopup.hide();
      }
    }
  }
);
  focusedProperty().addListener(new ChangeListener<Boolean>(){
    @Override public void changed(    ObservableValue<? extends Boolean> observableValue,    Boolean aBoolean,    Boolean aBoolean2){
      entriesPopup.hide();
    }
  }
);
}

Fixed version (ground truth):
/** 
 * Construct a new AutoCompleteTextField. 
 */
public AutoCompleteTextField(){
  super();
  entries=new TreeSet<>();
  imgViews=new HashMap<>();
  entriesPopup=new ContextMenu();
  textProperty().addListener((observableValue,s,s2) -> {
    if (getText().length() == 0) {
      entriesPopup.hide();
    }
 else {
      LinkedList<String> searchResult=new LinkedList<>();
      searchResult.addAll(entries.subSet(getText().toLowerCase(),getText().toLowerCase() + Character.MAX_VALUE));
      if (entries.size() > 0) {
        populatePopup(searchResult);
        if (!entriesPopup.isShowing()) {
          entriesPopup.show(AutoCompleteTextField.this,Side.BOTTOM,0,0);
        }
      }
 else {
        entriesPopup.hide();
      }
    }
  }
);
  focusedProperty().addListener(new ChangeListener<Boolean>(){
    @Override public void changed(    ObservableValue<? extends Boolean> observableValue,    Boolean aBoolean,    Boolean aBoolean2){
      entriesPopup.hide();
    }
  }
);
}
Program: 77937
Project: 77937
Buggy source:
/** 
 * Populate the entry set with the given search results.  Display is limited to 10 entries, for performance.
 * @param searchResult The set of matching strings.
 */
private void populatePopup(List<String> searchResult){
  List<CustomMenuItem> menuItems=new LinkedList<>();
  int maxEntries=10;
  int count=Math.min(searchResult.size(),maxEntries);
  for (int i=0; i < count; i++) {
    final String result=searchResult.get(i);
    Label entryLabel=new Label(result);
    final ImageView logo=imgViews.get(result);
    GridPane box=new GridPane();
    box.add(entryLabel,0,0);
    ColumnConstraints con=new ColumnConstraints();
    con.setPrefWidth(200);
    box.getColumnConstraints().add(con);
    box.add(logo,1,0);
    ColumnConstraints con2=new ColumnConstraints();
    con2.setPrefWidth(40);
    box.getColumnConstraints().add(con2);
    CustomMenuItem item=new CustomMenuItem(box,true);
    item.setOnAction(new EventHandler<ActionEvent>(){
      @Override public void handle(      ActionEvent actionEvent){
        setText(result.substring(0,result.lastIndexOf("String_Node_Str")));
        txLogoPath.setText(logo.getId());
        entriesPopup.hide();
      }
    }
);
    menuItems.add(item);
  }
  entriesPopup.getItems().clear();
  entriesPopup.getItems().addAll(menuItems);
}

Fixed version (ground truth):
/** 
 * Populate the entry set with the given search results.  Display is limited to 10 entries, for performance.
 * @param searchResult The set of matching strings.
 */
private void populatePopup(List<String> searchResult){
  List<CustomMenuItem> menuItems=new LinkedList<>();
  int maxEntries=10;
  int count=Math.min(searchResult.size(),maxEntries);
  for (int i=0; i < count; i++) {
    final String result=searchResult.get(i);
    Label entryLabel=new Label(result);
    final ImageView logo=imgViews.get(result);
    GridPane box=new GridPane();
    box.add(entryLabel,0,0);
    ColumnConstraints con=new ColumnConstraints();
    con.setPrefWidth(200);
    box.getColumnConstraints().add(con);
    box.add(logo,1,0);
    ColumnConstraints con2=new ColumnConstraints();
    con2.setPrefWidth(40);
    box.getColumnConstraints().add(con2);
    CustomMenuItem item=new CustomMenuItem(box,true);
    item.setOnAction(new EventHandler<ActionEvent>(){
      @Override public void handle(      ActionEvent actionEvent){
        String[] parts=result.split("String_Node_Str");
        setText(parts[0]);
        txLogoPath.setText(logo.getId());
        txLogoPath.setId(parts[1]);
        entriesPopup.hide();
      }
    }
);
    menuItems.add(item);
  }
  entriesPopup.getItems().clear();
  entriesPopup.getItems().addAll(menuItems);
}
Program: 77938
Project: 77938
Buggy source:
@Override public void handle(ActionEvent actionEvent){
  setText(result.substring(0,result.lastIndexOf("String_Node_Str")));
  txLogoPath.setText(logo.getId());
  entriesPopup.hide();
}

Fixed version (ground truth):
@Override public void handle(ActionEvent actionEvent){
  String[] parts=result.split("String_Node_Str");
  setText(parts[0]);
  txLogoPath.setText(logo.getId());
  txLogoPath.setId(parts[1]);
  entriesPopup.hide();
}
Program: 77939
Project: 77939
Buggy source:
@Override public TableCell<Background,Boolean> call(TableColumn<Background,Boolean> p){
  return new BackgroundButtonCell(backgroundList,pservice,windowManager.getStage());
}

Fixed version (ground truth):
@Override public TableCell<Background,Boolean> call(TableColumn<Background,Boolean> p){
  return new BackgroundButtonCell(backgroundList,bservice,windowManager.getStage());
}
Program: 77940
Project: 77940
Buggy source:
@Override public void handle(TableColumn.CellEditEvent<Background,String> t){
  try {
    Background p=((Background)t.getTableView().getItems().get(t.getTablePosition().getRow()));
    if (t.getNewValue().compareTo("String_Node_Str") != 0) {
      p.setName(t.getNewValue());
      bservice.edit(p);
    }
 else {
      refreshTablePosition(pservice.getAllPositionsOfProfile(selectedProfile));
    }
  }
 catch (  ServiceException e) {
  }
}

Fixed version (ground truth):
@Override public void handle(TableColumn.CellEditEvent<Background,String> t){
  try {
    Background p=((Background)t.getTableView().getItems().get(t.getTablePosition().getRow()));
    if (t.getNewValue().compareTo("String_Node_Str") != 0) {
      p.setName(t.getNewValue());
      bservice.edit(p);
      refreshTableBackground(pservice.getAllBackgroundOfProfile(selectedProfile.getId()));
    }
 else {
      refreshTableBackground(pservice.getAllBackgroundOfProfile(selectedProfile.getId()));
    }
  }
 catch (  ServiceException e) {
    try {
      refreshTableBackground(pservice.getAllBackgroundOfProfile(selectedProfile.getId()));
    }
 catch (    ServiceException e1) {
      LOGGER.error("String_Node_Str",e1);
    }
  }
}
Program: 77942
Project: 77942
Buggy source:
@Override public TableCell<Background.Category,Boolean> call(TableColumn<Background.Category,Boolean> p){
  return new CategoryButtonCell(categoryList,pservice,windowManager.getStage());
}

Fixed version (ground truth):
@Override public TableCell<Background.Category,Boolean> call(TableColumn<Background.Category,Boolean> p){
  return new CategoryButtonCell(categoryList,bservice,windowManager.getStage());
}
Program: 77943
Project: 77943
Buggy source:
@Override public void handle(TableColumn.CellEditEvent<Background.Category,String> t){
  try {
    Background.Category p=((Background.Category)t.getTableView().getItems().get(t.getTablePosition().getRow()));
    if (t.getNewValue().compareTo("String_Node_Str") != 0) {
      p.setName(t.getNewValue());
      bservice.editCategory(p);
    }
 else {
      refreshTablePosition(pservice.getAllPositionsOfProfile(selectedProfile));
    }
  }
 catch (  ServiceException e) {
  }
}

Fixed version (ground truth):
@Override public void handle(TableColumn.CellEditEvent<Background.Category,String> t){
  try {
    Background.Category p=((Background.Category)t.getTableView().getItems().get(t.getTablePosition().getRow()));
    if (t.getNewValue().compareTo("String_Node_Str") != 0) {
      p.setName(t.getNewValue());
      bservice.editCategory(p);
      refreshCategoryComboBox(pservice.getAllCategoryOfProfile(selectedProfile.getId()));
    }
 else {
      refreshTableCategory(pservice.getAllCategoryOfProfile(selectedProfile.getId()));
    }
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 77945
Project: 77945
Buggy source:
public BackgroundButtonCell(ObservableList<Background> backgroundList,ProfileService pservice,Stage primaryStage){
  this.backgroundList=backgroundList;
  this.pservice=pservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Background currentBackground=(Background)BackgroundButtonCell.this.getTableView().getItems().get(BackgroundButtonCell.this.getIndex());
        backgroundList.remove(currentBackground);
        setGraphic(null);
      }
    }
  }
);
}

Fixed version (ground truth):
public BackgroundButtonCell(ObservableList<Background> backgroundList,BackgroundService bservice,Stage primaryStage){
  this.backgroundList=backgroundList;
  this.bservice=bservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Background currentBackground=(Background)BackgroundButtonCell.this.getTableView().getItems().get(BackgroundButtonCell.this.getIndex());
        backgroundList.remove(currentBackground);
        try {
          bservice.erase(currentBackground);
        }
 catch (        ServiceException e) {
          LOGGER.error("String_Node_Str",e);
        }
        setGraphic(null);
      }
    }
  }
);
}
Program: 77946
Project: 77946
Buggy source:
@Override public void handle(ActionEvent t){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
  alert.setTitle("String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  alert.setContentText("String_Node_Str");
  alert.initOwner(primaryStage);
  ButtonType butJa=new ButtonType("String_Node_Str");
  ButtonType butNein=new ButtonType("String_Node_Str");
  alert.getButtonTypes().setAll(butJa,butNein);
  Optional<ButtonType> result=alert.showAndWait();
  if (result.get() == butJa) {
    Background currentBackground=(Background)BackgroundButtonCell.this.getTableView().getItems().get(BackgroundButtonCell.this.getIndex());
    backgroundList.remove(currentBackground);
    setGraphic(null);
  }
}

Fixed version (ground truth):
@Override public void handle(ActionEvent t){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
  alert.setTitle("String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  alert.setContentText("String_Node_Str");
  alert.initOwner(primaryStage);
  ButtonType butJa=new ButtonType("String_Node_Str");
  ButtonType butNein=new ButtonType("String_Node_Str");
  alert.getButtonTypes().setAll(butJa,butNein);
  Optional<ButtonType> result=alert.showAndWait();
  if (result.get() == butJa) {
    Background currentBackground=(Background)BackgroundButtonCell.this.getTableView().getItems().get(BackgroundButtonCell.this.getIndex());
    backgroundList.remove(currentBackground);
    try {
      bservice.erase(currentBackground);
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
    setGraphic(null);
  }
}
Program: 77948
Project: 77948
Buggy source:
@Override public void handle(ActionEvent t){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
  alert.setTitle("String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  alert.setContentText("String_Node_Str");
  alert.initOwner(primaryStage);
  ButtonType butJa=new ButtonType("String_Node_Str");
  ButtonType butNein=new ButtonType("String_Node_Str");
  alert.getButtonTypes().setAll(butJa,butNein);
  Optional<ButtonType> result=alert.showAndWait();
  if (result.get() == butJa) {
    Background.Category currentCategory=(Background.Category)CategoryButtonCell.this.getTableView().getItems().get(CategoryButtonCell.this.getIndex());
    categories.remove(currentCategory);
    setGraphic(null);
  }
}

Fixed version (ground truth):
@Override public void handle(ActionEvent t){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
  alert.setTitle("String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  alert.setContentText("String_Node_Str");
  alert.initOwner(primaryStage);
  ButtonType butJa=new ButtonType("String_Node_Str");
  ButtonType butNein=new ButtonType("String_Node_Str");
  alert.getButtonTypes().setAll(butJa,butNein);
  Optional<ButtonType> result=alert.showAndWait();
  if (result.get() == butJa) {
    Background.Category currentCategory=(Background.Category)CategoryButtonCell.this.getTableView().getItems().get(CategoryButtonCell.this.getIndex());
    categories.remove(currentCategory);
    try {
      bservice.eraseCategory(currentCategory);
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
    setGraphic(null);
  }
}
Program: 77949
Project: 77949
Buggy source:
public CategoryButtonCell(ObservableList<Background.Category> categories,ProfileService pservice,Stage primaryStage){
  this.categories=categories;
  this.pservice=pservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Background.Category currentCategory=(Background.Category)CategoryButtonCell.this.getTableView().getItems().get(CategoryButtonCell.this.getIndex());
        categories.remove(currentCategory);
        setGraphic(null);
      }
    }
  }
);
}

Fixed version (ground truth):
public CategoryButtonCell(ObservableList<Background.Category> categories,BackgroundService bservice,Stage primaryStage){
  this.categories=categories;
  this.bservice=bservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Background.Category currentCategory=(Background.Category)CategoryButtonCell.this.getTableView().getItems().get(CategoryButtonCell.this.getIndex());
        categories.remove(currentCategory);
        try {
          bservice.eraseCategory(currentCategory);
        }
 catch (        ServiceException e) {
          LOGGER.error("String_Node_Str",e);
        }
        setGraphic(null);
      }
    }
  }
);
}
Program: 77950
Project: 77950
Buggy source:
@Override public Image crop(Image original,int x1,int x2,int y1,int y2,int maxX,int maxY) throws ServiceException {
  try {
    BufferedImage bufOriginal=ImageIO.read(new File(original.getImagepath()));
    int width=bufOriginal.getWidth();
    int height=bufOriginal.getHeight();
    double ratioX=width / (double)maxX;
    double ratioY=height / (double)maxY;
    int newX1=(int)(x1 * ratioX);
    int newX2=(int)(x2 * ratioX);
    int newY1=(int)(y1 * ratioY);
    int newY2=(int)(y2 * ratioY);
    BufferedImage bufCropped=bufOriginal.getSubimage(newX1,newY1,newX2 - newX1,newY2 - newY1);
    Image img=new Image(-1,original.getImagepath().substring(0,original.getImagepath().length() - 4) + "String_Node_Str",original.getShootingid(),original.getDate());
    return imageDAO.createAndSave(img,bufCropped);
  }
 catch (  IOException e) {
    LOGGER.debug("String_Node_Str" + e);
    throw new ServiceException(e.getMessage());
  }
catch (  PersistenceException e) {
    LOGGER.debug("String_Node_Str" + e);
    throw new ServiceException(e.getMessage());
  }
}

Fixed version (ground truth):
@Override public Image crop(Image original,int x1,int x2,int y1,int y2,int maxX,int maxY) throws ServiceException {
  try {
    BufferedImage bufOriginal=ImageIO.read(new File(original.getImagepath()));
    int width=bufOriginal.getWidth();
    int height=bufOriginal.getHeight();
    double ratioX=width / (double)maxX;
    double ratioY=height / (double)maxY;
    int newX1=(int)(x1 * ratioX);
    int newX2=(int)(x2 * ratioX);
    int newY1=(int)(y1 * ratioY);
    int newY2=(int)(y2 * ratioY);
    BufferedImage bufCropped=bufOriginal.getSubimage(newX1,newY1,newX2 - newX1,newY2 - newY1);
    Image img=new Image(-1,original.getImagepath().substring(0,original.getImagepath().length() - 4) + "String_Node_Str",original.getShootingid(),original.getDate());
    return imageDAO.createAndSave(img,bufCropped);
  }
 catch (  IOException|PersistenceException e) {
    LOGGER.debug("String_Node_Str",e);
    throw new ServiceException(e.getMessage());
  }
}
Program: 77951
Project: 77951
Buggy source:
/** 
 * Opens Mainframe again
 */
@FXML public void onDemolitionPressed(){
  try {
    if (shootingService.searchIsActive().getActive()) {
      Profile profile=profileChoiceBox.getSelectionModel().getSelectedItem();
      if (shootingService.searchIsActive().getProfileid() != profile.getId()) {
        Shooting shooting=new Shooting(shootingService.searchIsActive().getId(),profile.getId(),"String_Node_Str",bgPath,true);
        shootingService.update(shooting);
      }
      windowManager.showScene(WindowManager.SHOW_CUSTOMERSCENE);
    }
 else {
      windowManager.showScene(WindowManager.SHOW_MAINSCENE);
    }
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
    showInformationDialog("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Opens Mainframe again
 */
@FXML public void onDemolitionPressed(){
  try {
    if (shootingService.searchIsActive().getActive()) {
      Profile profile=profileChoiceBox.getSelectionModel().getSelectedItem();
      if (shootingService.searchIsActive().getProfileid() == profile.getId()) {
        Shooting shooting=new Shooting(shootingService.searchIsActive().getId(),profile.getId(),"String_Node_Str",bgPath,true);
        LOGGER.debug("String_Node_Str" + shooting.getId() + "String_Node_Str"+ shooting.getBgPictureFolder());
        shootingService.update(shooting);
      }
      windowManager.showScene(WindowManager.SHOW_CUSTOMERSCENE);
    }
 else {
      windowManager.showScene(WindowManager.SHOW_MAINSCENE);
    }
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
    showInformationDialog("String_Node_Str");
  }
}
Program: 77952
Project: 77952
Buggy source:
/** 
 * Checks if there is an active shooting and sets visibility and contents of buttons and labels accordingly.
 * @throws ServiceException if an error occurs while retrieving the active shooting from the service layer.
 */
private void setButtons() throws ServiceException {
  if (shootingService.searchIsActive().getActive()) {
    startButton.setVisible(false);
    stopButton.setVisible(true);
    storage.setVisible(false);
    canclebutton.setText("String_Node_Str");
    storageDirLabel.setVisible(false);
    gridSave.setVisible(false);
    finallsavingplace.setText(shootingService.searchIsActive().getStorageDir());
    finallsavingplace.setVisible(true);
    save1.setVisible(true);
    saveing.setVisible(false);
    String bgPathAcitveShooting=shootingService.searchIsActive().getBgPictureFolder();
    if (bgPathAcitveShooting != null && !bgPathAcitveShooting.isEmpty()) {
      bgStorageDirLabel.setText(bgPathAcitveShooting);
    }
  }
 else {
    stopButton.setVisible(false);
    startButton.setVisible(true);
    storage.setVisible(true);
    storageDirLabel.setVisible(true);
    gridSave.setVisible(true);
    canclebutton.setText("String_Node_Str");
    finallsavingplace.setVisible(false);
    save1.setVisible(false);
    saveing.setVisible(true);
  }
}

Fixed version (ground truth):
/** 
 * Checks if there is an active shooting and sets visibility and contents of buttons and labels accordingly.
 * @throws ServiceException if an error occurs while retrieving the active shooting from the service layer.
 */
private void setButtons() throws ServiceException {
  Shooting activeShooting=shootingService.searchIsActive();
  if (activeShooting != null && activeShooting.getActive()) {
    startButton.setVisible(false);
    stopButton.setVisible(true);
    storage.setVisible(false);
    canclebutton.setText("String_Node_Str");
    storageDirLabel.setVisible(false);
    gridSave.setVisible(false);
    finallsavingplace.setText(activeShooting.getStorageDir());
    finallsavingplace.setVisible(true);
    save1.setVisible(true);
    saveing.setVisible(false);
    if (activeShooting.getBgPictureFolder() != null && !activeShooting.getBgPictureFolder().isEmpty()) {
      bgStorageDirLabel.setText(activeShooting.getBgPictureFolder());
    }
  }
 else {
    stopButton.setVisible(false);
    startButton.setVisible(true);
    storage.setVisible(true);
    storageDirLabel.setVisible(true);
    gridSave.setVisible(true);
    canclebutton.setText("String_Node_Str");
    finallsavingplace.setVisible(false);
    save1.setVisible(false);
    saveing.setVisible(true);
  }
}
Program: 77953
Project: 77953
Buggy source:
@Override public Image createAndSave(Image image,BufferedImage bufferedImage) throws PersistenceException {
  Image ret=create(image);
  File outputfile=new File(image.getImagepath());
  try {
    ImageIO.write(bufferedImage,"String_Node_Str",outputfile);
  }
 catch (  IOException e) {
    LOGGER.debug("String_Node_Str" + e);
    throw new PersistenceException(e.getMessage());
  }
  return ret;
}

Fixed version (ground truth):
@Override public Image createAndSave(Image image,BufferedImage bufferedImage) throws PersistenceException {
  Image ret=create(image);
  File outputfile=new File(image.getImagepath());
  try {
    ImageIO.write(bufferedImage,"String_Node_Str",outputfile);
  }
 catch (  IOException e) {
    LOGGER.debug("String_Node_Str",e);
    throw new PersistenceException(e.getMessage());
  }
  return ret;
}
Program: 77954
Project: 77954
Buggy source:
public void onCropPressed(){
  LOGGER.info("String_Node_Str");
  if (cropRectangle == null) {
    cropRectangle=createDraggableRectangle(100,100,100,100);
    anchorPane.getChildren().add(cropRectangle);
  }
 else {
    cropRectangle.setVisible(true);
  }
}

Fixed version (ground truth):
public void onCropPressed(){
  cropping=true;
  image3.setVisible(false);
  image4.setVisible(false);
  deleteButton.setVisible(false);
  printButton.setVisible(false);
  cropButton.setVisible(false);
  button5.setCancelButton(false);
  button6.setCancelButton(false);
  button7.setCancelButton(false);
  button8.setCancelButton(false);
  button9.setCancelButton(false);
  button13.setVisible(true);
  LOGGER.info("String_Node_Str");
  if (cropRectangle == null) {
    cropRectangle=createDraggableRectangle(200,200,500,500);
    anchorPane.getChildren().add(cropRectangle);
  }
 else {
    cropRectangle.setVisible(true);
    resizeHandleNW.setVisible(true);
    resizeHandleSE.setVisible(true);
  }
}
Program: 77956
Project: 77956
Buggy source:
/** 
 * crops the given image and saves it as new file
 * @param original image to be cropped
 * @param x1 start point on x axis
 * @param x2 stop point on x axis
 * @param y1 start point on y axis
 * @param y2 stop point on y axis
 * @return reference to the cropped image
 * @throws ServiceException if an error occurs then it throws a ServiceException
 */
public Image crop(Image original,int x1,int x2,int y1,int y2) throws ServiceException ;

Fixed version (ground truth):
/** 
 * crops the given image and saves it as new file
 * @param original image to be cropped
 * @param x1 start point on x axis
 * @param x2 stop point on x axis
 * @param y1 start point on y axis
 * @param y2 stop point on y axis
 * @param maxX x resolution of the displayed image
 * @param maxY y resolution of the displayed image
 * @return reference to the cropped image
 * @throws ServiceException if an error occurs then it throws a ServiceException
 */
public Image crop(Image original,int x1,int x2,int y1,int y2,int maxX,int maxY) throws ServiceException ;