nus-yam/ex-repair huggingface dataset:
Program: 77867
Project: 77867
Buggy source:
@Override public Camera read(int id) throws PersistenceException {
  LOGGER.debug("String_Node_Str" + id);
  ResultSet rs;
  String sqlString;
  PreparedStatement stmt=null;
  sqlString="String_Node_Str";
  try {
    stmt=this.con.prepareStatement(sqlString);
    stmt.setInt(1,id);
    rs=stmt.executeQuery();
    if (rs.next()) {
      Camera camera=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      LOGGER.debug("String_Node_Str" + camera);
      return camera;
    }
 else {
      LOGGER.debug("String_Node_Str");
      return null;
    }
  }
 catch (  SQLException e) {
    throw new PersistenceException("String_Node_Str" + e);
  }
 finally {
    try {
      if (stmt != null)       stmt.close();
    }
 catch (    SQLException e) {
      throw new PersistenceException("String_Node_Str" + e);
    }
  }
}

Fixed version (ground truth):
@Override public Camera read(int id) throws PersistenceException {
  LOGGER.debug("String_Node_Str" + id);
  ResultSet rs;
  String sqlString;
  PreparedStatement stmt=null;
  sqlString="String_Node_Str";
  try {
    stmt=this.con.prepareStatement(sqlString);
    stmt.setInt(1,id);
    rs=stmt.executeQuery();
    if (rs.next()) {
      Camera camera=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      LOGGER.debug("String_Node_Str" + camera);
      return camera;
    }
 else {
      LOGGER.debug("String_Node_Str");
      return null;
    }
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException("String_Node_Str" + e);
  }
 finally {
    try {
      if (stmt != null) {
        stmt.close();
      }
    }
 catch (    SQLException e) {
      LOGGER.error("String_Node_Str",e);
      throw new PersistenceException("String_Node_Str" + e);
    }
  }
}
Program: 77868
Project: 77868
Buggy source:
@Override public List<Camera> getAll() throws PersistenceException {
  List<Camera> cameraList=new ArrayList<>();
  PreparedStatement stmt=null;
  String query="String_Node_Str";
  try {
    stmt=con.prepareStatement(query);
    ResultSet rs=stmt.executeQuery();
    while (rs.next()) {
      Camera c=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      cameraList.add(c);
    }
  }
 catch (  SQLException e) {
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
  return cameraList;
}

Fixed version (ground truth):
@Override public List<Camera> getAll() throws PersistenceException {
  List<Camera> cameraList=new ArrayList<>();
  PreparedStatement stmt=null;
  String query="String_Node_Str";
  try {
    stmt=con.prepareStatement(query);
    ResultSet rs=stmt.executeQuery();
    while (rs.next()) {
      Camera c=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      cameraList.add(c);
    }
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    LOGGER.error("String_Node_Str",e);
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error("String_Node_Str" + e);
      }
    }
  }
  return cameraList;
}
Program: 77869
Project: 77869
Buggy source:
@Override public void setActive(int cameraID) throws PersistenceException {
  PreparedStatement stmt=null;
  try {
    String prepered="String_Node_Str";
    stmt=con.prepareStatement(prepered);
    stmt.setInt(1,cameraID);
    stmt.execute();
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e.getMessage());
    throw new PersistenceException(e.getMessage());
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error(e.getMessage());
      }
    }
  }
}

Fixed version (ground truth):
@Override public void setActive(int cameraID) throws PersistenceException {
  PreparedStatement stmt=null;
  try {
    String prepered="String_Node_Str";
    stmt=con.prepareStatement(prepered);
    stmt.setInt(1,cameraID);
    stmt.execute();
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException(e.getMessage());
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
}
Program: 77870
Project: 77870
Buggy source:
@Override public List<Camera> readActive() throws PersistenceException {
  List<Camera> cameraList=new ArrayList<>();
  PreparedStatement stmt=null;
  String query="String_Node_Str";
  try {
    stmt=con.prepareStatement(query);
    ResultSet rs=stmt.executeQuery();
    while (rs.next()) {
      Camera c=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      cameraList.add(c);
    }
  }
 catch (  SQLException e) {
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
  return cameraList;
}

Fixed version (ground truth):
@Override public List<Camera> readActive() throws PersistenceException {
  List<Camera> cameraList=new ArrayList<>();
  PreparedStatement stmt=null;
  String query="String_Node_Str";
  try {
    stmt=con.prepareStatement(query);
    ResultSet rs=stmt.executeQuery();
    while (rs.next()) {
      Camera c=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      cameraList.add(c);
    }
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    LOGGER.error("String_Node_Str",e);
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.debug("String_Node_Str" + e);
      }
    }
  }
  return cameraList;
}
Program: 77871
Project: 77871
Buggy source:
@Override public void setInactive(int cameraID) throws PersistenceException {
  PreparedStatement stmt=null;
  try {
    String prepered="String_Node_Str";
    stmt=con.prepareStatement(prepered);
    stmt.setInt(1,cameraID);
    stmt.execute();
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e.getMessage());
    throw new PersistenceException(e.getMessage());
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error(e.getMessage());
      }
    }
  }
}

Fixed version (ground truth):
@Override public void setInactive(int cameraID) throws PersistenceException {
  PreparedStatement stmt=null;
  try {
    String prepered="String_Node_Str";
    stmt=con.prepareStatement(prepered);
    stmt.setInt(1,cameraID);
    stmt.execute();
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException(e.getMessage());
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
}
Program: 77872
Project: 77872
Buggy source:
@Override public Camera exists(Camera camera) throws PersistenceException {
  PreparedStatement stmt=null;
  String query="String_Node_Str";
  Camera ret=null;
  try {
    stmt=con.prepareStatement(query);
    stmt.setString(1,camera.getPort());
    stmt.setString(2,camera.getModel());
    ResultSet rs=stmt.executeQuery();
    while (rs.next()) {
      ret=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.debug("String_Node_Str",e);
      }
    }
  }
  return ret;
}

Fixed version (ground truth):
@Override public Camera exists(Camera camera) throws PersistenceException {
  PreparedStatement stmt=null;
  String query="String_Node_Str";
  Camera ret=null;
  try {
    stmt=con.prepareStatement(query);
    stmt.setString(1,camera.getPort());
    stmt.setString(2,camera.getModel());
    ResultSet rs=stmt.executeQuery();
    while (rs.next()) {
      ret=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    LOGGER.error("String_Node_Str",e);
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.debug("String_Node_Str",e);
      }
    }
  }
  return ret;
}
Program: 77873
Project: 77873
Buggy source:
@Override public void setAllInactive() throws PersistenceException {
  PreparedStatement stmt=null;
  try {
    String prepered="String_Node_Str";
    stmt=con.prepareStatement(prepered);
    stmt.execute();
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e.getMessage());
    throw new PersistenceException(e.getMessage());
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error(e.getMessage());
      }
    }
  }
}

Fixed version (ground truth):
@Override public void setAllInactive() throws PersistenceException {
  PreparedStatement stmt=null;
  try {
    String prepered="String_Node_Str";
    stmt=con.prepareStatement(prepered);
    stmt.execute();
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException(e.getMessage());
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error("String_Node_Str",e);
      }
    }
  }
}
Program: 77875
Project: 77875
Buggy source:
private void capturePreview(){
  try {
    final CameraFile cf=cameraGphoto.capturePreview();
    if (cf != null) {
      Shooting activeShooting=shootingService.searchIsActive();
      if (activeShooting != null) {
        String imagePath=activeShooting.getStorageDir() + "String_Node_Str" + +camera.getId()+ "String_Node_Str";
        if (!new File(imagePath).exists()) {
          File file=new File(imagePath);
          file.mkdir();
        }
        cf.save(new File(imagePath).getAbsolutePath());
        imageProcessor.processPreview(imagePath);
        LOGGER.debug(imageService.getLastImgPath(activeShooting.getId()));
      }
 else {
        LOGGER.error("String_Node_Str");
      }
      cf.close();
    }
  }
 catch (  CameraException ex) {
    LOGGER.error("String_Node_Str",ex);
    setStop(true);
  }
catch (  ServiceException ex) {
    LOGGER.error("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private void capturePreview(){
  try {
    final CameraFile cf=cameraGphoto.capturePreview();
    if (cf != null) {
      String imagePath=tempStorage + "String_Node_Str" + +camera.getId()+ "String_Node_Str";
      cf.save(new File(imagePath).getAbsolutePath());
      imageProcessor.processPreview(imagePath);
    }
    cf.close();
  }
 catch (  CameraException ex) {
    LOGGER.error("String_Node_Str",ex);
    setStop(true);
  }
catch (  ServiceException ex) {
    LOGGER.error("String_Node_Str",ex);
  }
}
Program: 77876
Project: 77876
Buggy source:
@Override public void run(){
  while (!shouldStop) {
    if (takeImage) {
      if (countdown != 0) {
        shotFrameController.showCountdown(countdown);
      }
      captureImage();
      if (serieShot) {
        for (int i=0; i < 5; i++) {
          captureImage();
        }
      }
      takeImage=false;
    }
 else {
      capturePreview();
    }
    if (shouldStop) {
      try {
        cameraGphoto.close();
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
      LOGGER.debug("String_Node_Str",camera);
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  createTempDir();
  while (!shouldStop) {
    if (takeImage) {
      if (countdown != 0) {
        shotFrameController.showCountdown(countdown);
      }
      captureImage();
      if (serieShot) {
        for (int i=0; i < 5; i++) {
          captureImage();
        }
      }
      takeImage=false;
    }
 else {
      capturePreview();
    }
    if (shouldStop) {
      try {
        cameraGphoto.close();
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
      LOGGER.debug("String_Node_Str",camera);
    }
  }
}
Program: 77877
Project: 77877
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();
  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.debug("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();
  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.debug("String_Node_Str" + shootingService.searchIsActive().getId());
    listOfImages=imageService.getAllImages(shootingService.searchIsActive().getId());
  }
 else {
    listOfImages=new ArrayList<>();
    return;
  }
  for (  final at.ac.tuwien.sepm.ws16.qse01.entities.Image img : listOfImages) {
    prepareHBox(img);
  }
}
Program: 77878
Project: 77878
Buggy source:
@Override public void run(){
  while (true) {
    if (takeImage) {
      if (countdown != 0) {
        shotFrameController.showCountdown(countdown);
      }
      captureImage();
      if (serieShot) {
        for (int i=0; i < 5; i++) {
          captureImage();
        }
      }
      takeImage=false;
    }
 else {
      capturePreview();
    }
    if (shouldStop) {
      LOGGER.debug("String_Node_Str",camera);
      return;
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  while (!shouldStop) {
    if (takeImage) {
      if (countdown != 0) {
        shotFrameController.showCountdown(countdown);
      }
      captureImage();
      if (serieShot) {
        for (int i=0; i < 5; i++) {
          captureImage();
        }
      }
      takeImage=false;
    }
 else {
      capturePreview();
    }
    if (shouldStop) {
      try {
        cameraGphoto.close();
      }
 catch (      IOException e) {
        LOGGER.error("String_Node_Str",e);
      }
      LOGGER.debug("String_Node_Str",camera);
    }
  }
}
Program: 77879
Project: 77879
Buggy source:
private void captureImage(){
  Image image;
  try {
    final CameraFile cf=cameraGphoto.captureImage();
    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());
        imageProcessor.processShot(image);
        LOGGER.debug(imageService.getLastImgPath(activeShooting.getId()));
      }
 else {
        LOGGER.error("String_Node_Str");
      }
      cf.close();
    }
  }
 catch (  CameraException ex) {
    LOGGER.debug("String_Node_Str",ex);
    setStop(true);
  }
catch (  ServiceException ex) {
    LOGGER.debug("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
private void captureImage(){
  Image image;
  try {
    final CameraFile cf=cameraGphoto.captureImage();
    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());
        imageProcessor.processShot(image);
        LOGGER.debug(imageService.getLastImgPath(activeShooting.getId()));
      }
 else {
        LOGGER.error("String_Node_Str");
      }
      cf.close();
    }
  }
 catch (  CameraException ex) {
    LOGGER.error("String_Node_Str",ex);
    setStop(true);
  }
catch (  ServiceException ex) {
    LOGGER.error("String_Node_Str",ex);
  }
}
Program: 77880
Project: 77880
Buggy source:
/** 
 * when pressed a new shooting starts to successfully start a new shooting a storage path gets selected and a profile must be selected
 */
@FXML public void onStartShootingPressed(){
  LOGGER.info("String_Node_Str" + path);
  if (profileChoiceBox.getValue() != null) {
    try {
      Profile profile=profileChoiceBox.getSelectionModel().getSelectedItem();
      if (path == null) {
        path=shootingService.createPath();
      }
      Shooting shouting=new Shooting(0,profile.getId(),path,bgPath,true);
      path="String_Node_Str";
      shootingService.addShooting(shouting);
      boolean test=true;
      try {
        boolean camerasFitPosition=imageProcessingManager.checkImageProcessing(profile);
        if (!camerasFitPosition) {
          imageProcessingManager.initImageProcessing();
          test=false;
        }
      }
 catch (      ServiceException e) {
        LOGGER.debug("String_Node_Str",e);
      }
 finally {
        if (test) {
          showInformationDialog("String_Node_Str");
        }
        windowManager.showScene(WindowManager.SHOW_CUSTOMERSCENE);
      }
    }
 catch (    ServiceException serviceExeption) {
      LOGGER.error("String_Node_Str",serviceExeption);
      showInformationDialog("String_Node_Str");
    }
  }
 else {
    showInformationDialog("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * when pressed a new shooting starts to successfully start a new shooting a storage path gets selected and a profile must be selected
 */
@FXML public void onStartShootingPressed(){
  LOGGER.info("String_Node_Str" + path);
  if (profileChoiceBox.getValue() != null) {
    try {
      Profile profile=profileChoiceBox.getSelectionModel().getSelectedItem();
      if (path == null) {
        path=shootingService.createPath();
      }
      Shooting shouting=new Shooting(0,profile.getId(),path,bgPath,true);
      path="String_Node_Str";
      shootingService.addShooting(shouting);
      boolean test=true;
      try {
        boolean camerasFitPosition=imageProcessingManager.checkImageProcessing(profile);
        if (camerasFitPosition) {
          imageProcessingManager.initImageProcessing();
          test=false;
        }
      }
 catch (      ServiceException e) {
        LOGGER.debug("String_Node_Str",e);
      }
 finally {
        if (test) {
          showInformationDialog("String_Node_Str");
        }
        windowManager.showScene(WindowManager.SHOW_CUSTOMERSCENE);
      }
    }
 catch (    ServiceException serviceExeption) {
      LOGGER.error("String_Node_Str",serviceExeption);
      showInformationDialog("String_Node_Str");
    }
  }
 else {
    showInformationDialog("String_Node_Str");
  }
}
Program: 77881
Project: 77881
Buggy source:
@Override public void initImageProcessing() throws ServiceException {
  LOGGER.debug("String_Node_Str");
  List<Camera> cameraList=cameraHandler.getCameras();
  Map<Position,ShotFrameController> positionShotFrameMap=initShotFrameManager(cameraList);
  if (positionShotFrameMap == null)   return;
  cameraThreadList=cameraHandler.createThreads();
  initCameraThreads(positionShotFrameMap);
  for (  CameraThread cameraThread : cameraThreadList) {
    cameraThread.start();
  }
  LOGGER.debug("String_Node_Str");
}

Fixed version (ground truth):
@Override public void initImageProcessing() throws ServiceException {
  LOGGER.debug("String_Node_Str");
  List<Camera> cameraList=cameraHandler.getCameras();
  Map<Position,ShotFrameController> positionShotFrameMap=initShotFrameManager(cameraList);
  if (positionShotFrameMap == null)   return;
  cameraThreadList=cameraHandler.createThreads();
  initCameraThreads(positionShotFrameMap);
  for (  CameraThread cameraThread : cameraThreadList) {
    cameraThread.start();
  }
  remoteService.start();
  LOGGER.info("String_Node_Str");
}
Program: 77882
Project: 77882
Buggy source:
public ImageProcessingManagerImpl(CameraHandler cameraHandler,ShotFrameManager shotFrameManager,RefreshManager refreshManager,ShootingService shootingService,ProfileService profileService,ImageService imageService,OpenCVLoader openCVLoader){
  this.cameraHandler=cameraHandler;
  this.shotFrameManager=shotFrameManager;
  this.refreshManager=refreshManager;
  this.shootingService=shootingService;
  this.profileService=profileService;
  this.imageService=imageService;
  this.openCVLoader=openCVLoader;
}

Fixed version (ground truth):
public ImageProcessingManagerImpl(CameraHandler cameraHandler,ShotFrameManager shotFrameManager,RefreshManager refreshManager,ShootingService shootingService,ProfileService profileService,ImageService imageService,RemoteService remoteService,OpenCVLoader openCVLoader){
  this.cameraHandler=cameraHandler;
  this.shotFrameManager=shotFrameManager;
  this.refreshManager=refreshManager;
  this.shootingService=shootingService;
  this.profileService=profileService;
  this.imageService=imageService;
  this.remoteService=remoteService;
  this.openCVLoader=openCVLoader;
}
Program: 77883
Project: 77883
Buggy source:
@Override public void stopImageProcessing(){
  if (cameraThreadList == null) {
    LOGGER.debug("String_Node_Str");
  }
 else {
    for (    CameraThread cameraThread : cameraThreadList) {
      cameraThread.setStop(true);
    }
  }
}

Fixed version (ground truth):
@Override public void stopImageProcessing(){
  if (cameraThreadList == null) {
    LOGGER.debug("String_Node_Str");
  }
 else {
    for (    CameraThread cameraThread : cameraThreadList) {
      cameraThread.setStop(true);
    }
  }
  if (!remoteService.isRunning()) {
    LOGGER.debug("String_Node_Str");
  }
 else {
    remoteService.stop();
  }
}
Program: 77885
Project: 77885
Buggy source:
@Override public Camera read(int id) throws PersistenceException {
  LOGGER.debug("String_Node_Str" + id);
  ResultSet rs;
  String sqlString;
  PreparedStatement stmt=null;
  sqlString="String_Node_Str";
  try {
    stmt=this.con.prepareStatement(sqlString);
    stmt.setInt(1,id);
    rs=stmt.executeQuery();
    if (rs.next()) {
      Camera camera=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      LOGGER.debug("String_Node_Str" + camera);
      return camera;
    }
 else {
      LOGGER.debug("String_Node_Str");
      return null;
    }
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException("String_Node_Str" + e);
  }
 finally {
    try {
      if (stmt != null) {
        stmt.close();
      }
    }
 catch (    SQLException e) {
      LOGGER.error("String_Node_Str",e);
      throw new PersistenceException("String_Node_Str" + e);
    }
  }
}

Fixed version (ground truth):
@Override public Camera read(int id) throws PersistenceException {
  LOGGER.debug("String_Node_Str" + id);
  ResultSet rs;
  String sqlString;
  PreparedStatement stmt=null;
  sqlString="String_Node_Str";
  try {
    stmt=this.con.prepareStatement(sqlString);
    stmt.setInt(1,id);
    rs=stmt.executeQuery();
    if (rs.next()) {
      Camera camera=new Camera(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"),rs.getString("String_Node_Str"));
      LOGGER.debug("String_Node_Str" + camera);
      return camera;
    }
 else {
      LOGGER.error("String_Node_Str");
      return null;
    }
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new PersistenceException("String_Node_Str" + e);
  }
 finally {
    try {
      if (stmt != null) {
        stmt.close();
      }
    }
 catch (    SQLException e) {
      LOGGER.error("String_Node_Str",e);
      throw new PersistenceException("String_Node_Str" + e);
    }
  }
}
Program: 77886
Project: 77886
Buggy source:
@Override public void delete(int cameraID) throws PersistenceException {
  String sql="String_Node_Str";
  PreparedStatement stmt=null;
  try {
    stmt=con.prepareStatement(sql);
    stmt.setInt(1,cameraID);
    stmt.execute();
  }
 catch (  SQLException e) {
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
}

Fixed version (ground truth):
@Override public void delete(int cameraID) throws PersistenceException {
  String sql="String_Node_Str";
  PreparedStatement stmt=null;
  try {
    stmt=con.prepareStatement(sql);
    stmt.setInt(1,cameraID);
    stmt.execute();
  }
 catch (  SQLException e) {
    throw new PersistenceException(e.getMessage());
  }
catch (  NullPointerException e) {
    LOGGER.error("String_Node_Str",e);
    throw new IllegalArgumentException();
  }
 finally {
    if (stmt != null) {
      try {
        stmt.close();
      }
 catch (      SQLException e) {
        LOGGER.error("String_Node_Str" + e);
      }
    }
  }
}
Program: 77887
Project: 77887
Buggy source:
/** 
 * sets the initial font size depending on the screen Width and high using percentages of screen differences to the initial screen size (1280x800)
 * @param screenWidth the width bound of the current monitor
 * @param screenHeight the height bound of the current monitor
 */
public void setFontSize(double screenWidth,double screenHeight){
  int initialsize=16;
  if (screenWidth >= 1920.0 && screenHeight >= 1080.0) {
    fontSize=(int)(initialsize * 1.29);
  }
 else   if (screenWidth >= 1366.0 && screenHeight >= 768.0) {
    fontSize=(int)(initialsize * 1.07);
  }
 else   if (screenWidth >= 1280.0 && screenHeight >= 800.0) {
    fontSize=initialsize;
  }
}

Fixed version (ground truth):
/** 
 * sets the initial font size depending on the screen Width and high using percentages of screen differences to the initial screen size (1280x800)
 * @param screenWidth the width bound of the current monitor
 * @param screenHeight the height bound of the current monitor
 */
public void setFontSize(double screenWidth,double screenHeight){
  int initialsize=16;
  if (screenWidth >= 2160.0 && screenHeight >= 1440) {
    fontSize=(int)(initialsize * 1.37);
  }
 else   if (screenWidth >= 1920.0 && screenHeight >= 1080.0) {
    fontSize=(int)(initialsize * 1.29);
  }
 else   if (screenWidth >= 1366.0 && screenHeight >= 768.0) {
    fontSize=(int)(initialsize * 1.07);
  }
 else   if (screenWidth >= 1280.0 && screenHeight >= 800.0) {
    fontSize=initialsize;
  }
}
Program: 77888
Project: 77888
Buggy source:
private void onCheckPressed(){
  cropping=false;
  cropRectangle.setVisible(false);
  resizeHandleNW.setVisible(false);
  resizeHandleSE.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 {
    imageService.crop(imageList.get(currentIndex),x,x + (int)cropRectangle.getWidth(),y,y + (int)cropRectangle.getHeight(),maxX,maxY);
  }
 catch (  ServiceException e) {
    LOGGER.debug("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 {
    at.ac.tuwien.sepm.ws16.qse01.entities.Image newImage=imageService.crop(imageList.get(currentIndex),x,x + (int)cropRectangle.getWidth(),y,y + (int)cropRectangle.getHeight(),maxX,maxY);
    refreshManager.notifyMiniatureFrameOfAdd(newImage);
    if ((currentIndex + 1) >= imageList.size())     imageList.add(newImage);
 else {
      imageList.add(currentIndex + 1,newImage);
    }
    currentIndex=currentIndex + 1;
    button4.setVisible(true);
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 77889
Project: 77889
Buggy source:
public void onCropPressed(){
  cropping=true;
  saveFilteredButton.setVisible(true);
  LOGGER.debug("String_Node_Str");
  if (cropRectangle == null) {
    cropRectangle=createDraggableRectangle(wholePane.getWidth() - 250,wholePane.getHeight() - 250,500,500);
    forCropping.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.debug("String_Node_Str");
  if (cropRectangle == null) {
    cropRectangle=createDraggableRectangle(forCropping.getWidth() - 400,forCropping.getHeight() - 400,100,100);
    forCropping.getChildren().add(cropRectangle);
  }
 else {
    cropRectangle.setVisible(true);
    resizeHandleNW.setVisible(true);
    resizeHandleSE.setVisible(true);
  }
}
Program: 77892
Project: 77892
Buggy source:
@Override public TableCell<Background,Boolean> call(TableColumn<Background,Boolean> p){
  return new BackgroundButtonCell(backgroundList,bservice,windowManager.getStage());
}

Fixed version (ground truth):
@Override public TableCell<Background,Boolean> call(TableColumn<Background,Boolean> p){
  return new BackgroundButtonCell(imageHandler,backgroundList,bservice,windowManager.getStage());
}
Program: 77893
Project: 77893
Buggy source:
@FXML private void backgroundUpload(){
  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) {
    txBackgroundPath.setText(file.getAbsolutePath());
  }
}

Fixed version (ground truth):
@FXML private void backgroundUpload(){
  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) {
    txBackgroundPath.setText(file.getAbsolutePath());
    txBackgroundUpload.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
    if (!txBackgroundName.getText().isEmpty() && selectedCategory != null && selectedProfile != null && txBackgroundPath.getText().compareTo("String_Node_Str") != 0) {
      txBackgroundAdd.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
    }
 else     txBackgroundAdd.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
  }
}
Program: 77894
Project: 77894
Buggy source:
@FXML private void saveBackground(){
  LOGGER.error("String_Node_Str");
  String name=txBackgroundName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0 || txBackgroundPath.getText().compareTo("String_Node_Str") == 0) {
    showError("String_Node_Str");
  }
 else {
    Background p=new Background(name,txBackgroundPath.getText(),selectedCategory);
    try {
      LOGGER.debug("String_Node_Str");
      bservice.add(p);
      backgroundList.add(p);
      txBackgroundPath.setText("String_Node_Str");
      txBackgroundName.clear();
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@FXML private void saveBackground(){
  LOGGER.error("String_Node_Str");
  String name=txBackgroundName.getText();
  if (selectedCategory == null || name.trim().compareTo("String_Node_Str") == 0 || txBackgroundPath.getText().compareTo("String_Node_Str") == 0) {
    showError("String_Node_Str");
  }
 else {
    Background p=new Background(name,txBackgroundPath.getText(),selectedCategory);
    try {
      LOGGER.debug("String_Node_Str");
      bservice.add(p);
      backgroundList.add(p);
      txBackgroundPath.setText("String_Node_Str");
      txBackgroundName.clear();
      txBackgroundUpload.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}
Program: 77895
Project: 77895
Buggy source:
public void refreshTableBackground(List<Background> backgroundList,Profile selProfile,Background.Category selCategory){
  LOGGER.debug("String_Node_Str" + backgroundList.size());
  selectedProfile=selProfile;
  selectedCategory=selCategory;
  this.backgroundList.clear();
  this.backgroundList.addAll(backgroundList);
  tableBackground.setItems(this.backgroundList);
}

Fixed version (ground truth):
public void refreshTableBackground(List<Background> backgroundList,Profile selProfile,Background.Category selCategory){
  LOGGER.debug("String_Node_Str" + backgroundList.size());
  selectedProfile=selProfile;
  selectedCategory=selCategory;
  this.backgroundList.clear();
  this.backgroundList.addAll(backgroundList);
  tableBackground.setItems(this.backgroundList);
  if (!txBackgroundName.getText().isEmpty() && selectedCategory != null && selectedProfile != null && txBackgroundPath.getText().compareTo("String_Node_Str") != 0) {
    txBackgroundAdd.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
  }
 else   txBackgroundAdd.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
}
Program: 77897
Project: 77897
Buggy source:
@Override public TableCell<Background.Category,Boolean> call(TableColumn<Background.Category,Boolean> p){
  return new CategoryButtonCell(categoryListOfProfile,selectedProfile,categoryList,bservice,windowManager.getStage());
}

Fixed version (ground truth):
@Override public TableCell<Background.Category,Boolean> call(TableColumn<Background.Category,Boolean> p){
  return new CategoryButtonCell(imageHandler,categoryListOfProfile,selectedProfile,categoryList,bservice,windowManager.getStage());
}
Program: 77898
Project: 77898
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.debug("String_Node_Str");
      p=bservice.addCategory(p);
      categoryList.add(p);
      if (txCategoryActivated.isSelected()) {
        bservice.createPairProfileCategory(selectedProfile.getId(),p.getId());
        categoryListOfProfile.add(p);
      }
      refreshCategoryComboBox(categoryList);
      txCategoryName.clear();
      txCategoryActivated.setSelected(false);
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
@FXML private void saveCategory(){
  LOGGER.error("String_Node_Str");
  String name=txCategoryName.getText();
  if (selectedProfile == null || name.trim().compareTo("String_Node_Str") == 0) {
    showError("String_Node_Str");
  }
 else {
    Background.Category p=new Background.Category(name);
    try {
      LOGGER.debug("String_Node_Str");
      p=bservice.addCategory(p);
      categoryList.add(p);
      if (txCategoryActivated.isSelected()) {
        bservice.createPairProfileCategory(selectedProfile.getId(),p.getId());
        categoryListOfProfile.add(p);
      }
      refreshCategoryComboBox(categoryList);
      txCategoryName.clear();
      txCategoryActivated.setSelected(false);
    }
 catch (    ServiceException e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}
Program: 77900
Project: 77900
Buggy source:
@Override public TableCell<Profile.PairLogoRelativeRectangle,Boolean> call(TableColumn<Profile.PairLogoRelativeRectangle,Boolean> p){
  return new LogoButtonCell(logoList,pservice,windowManager.getStage(),selectedProfile.getId(),previewLogo);
}

Fixed version (ground truth):
@Override public TableCell<Profile.PairLogoRelativeRectangle,Boolean> call(TableColumn<Profile.PairLogoRelativeRectangle,Boolean> p){
  return new LogoButtonCell(imageHandler,logoList,pservice,windowManager.getStage(),selectedProfile.getId(),previewLogo,txLogoName);
}
Program: 77901
Project: 77901
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());
    txLogoLogo.setId("String_Node_Str");
  }
}

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");
    txLogoUpload.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
    if (selectedProfile == null || txLogoName.getText().isEmpty() || txLogoLogo.getText().compareTo("String_Node_Str") == 0 || txLogoX.getText().isEmpty() || txLogoY.getText().isEmpty() || (txLogoBreite.getText().isEmpty() && txLogoHoehe.getText().isEmpty())) {
      txLogoAdd.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
    }
 else     txLogoAdd.setBackground(imageHandler.getBackground("String_Node_Str",50,50));
  }
}
Program: 77904
Project: 77904
Buggy source:
protected void refreshLogoAutoComplete(Profile selected) throws ServiceException {
  selectedProfile=selected;
  txLogoName.getEntries().addAll(logo2StringArray(pservice.getAllLogosOfProfile(selectedProfile)));
  txLogoName.getImgViews().putAll(logo2imgViews(pservice.getAllLogosOfProfile(selectedProfile)));
  txLogoName.setTxLogoPath(txLogoLogo);
}

Fixed version (ground truth):
protected void refreshLogoAutoComplete(Profile selected) throws ServiceException {
  selectedProfile=selected;
  txLogoName.getEntries().addAll(logo2StringArray(pservice.getAllLogosOfProfile(selectedProfile)));
  txLogoName.getImgViews().putAll(logo2imgViews(pservice.getAllLogosOfProfile(selectedProfile)));
  txLogoName.setTxLogoPath(txLogoLogo);
  txLogoName.setTxLogoUpload(txLogoUpload);
  txLogoName.setImageHandler(imageHandler);
}
Program: 77905
Project: 77905
Buggy source:
@Autowired public LoginFrameController(ShootingService shootingService,AdminUserService adminUserService,WindowManager windowManager,LoginRedirectorModel loginRedirectorModel) throws ServiceException {
  this.adminUserService=adminUserService;
  this.windowManager=windowManager;
  this.loginRedirectorModel=loginRedirectorModel;
  this.shootingService=shootingService;
}

Fixed version (ground truth):
@Autowired public LoginFrameController(ShootingService shootingService,AdminUserService adminUserService,WindowManager windowManager,LoginRedirectorModel loginRedirectorModel) throws ServiceException {
  this.adminUserService=adminUserService;
  this.windowManager=windowManager;
  this.loginRedirectorModel=loginRedirectorModel;
  this.shootingService=shootingService;
  firstLogin=true;
}
Program: 77906
Project: 77906
Buggy source:
/** 
 * Lets an AdminUserService instance check if the values given in the adminname- and password-TextField correspond to a saved admin-user.
 */
@FXML public void checkLogin(){
  String adminName=adminField.getText();
  String password=passwordField.getText();
  try {
    boolean correctLogin=adminUserService.checkLogin(adminName,password);
    if (correctLogin) {
      Shooting activeShooting=shootingService.searchIsActive();
      if (activeShooting.getActive()) {
        windowManager.showScene(WindowManager.SHOW_RECOVERYSCENE);
      }
 else {
        windowManager.showScene(loginRedirectorModel.getNextScene());
      }
      resetValues();
    }
 else {
      wrongCredentialsLabel.setVisible(true);
    }
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Lets an AdminUserService instance check if the values given in the adminname- and password-TextField correspond to a saved admin-user.
 */
@FXML public void checkLogin(){
  String adminName=adminField.getText();
  String password=passwordField.getText();
  try {
    boolean correctLogin=adminUserService.checkLogin(adminName,password);
    if (correctLogin) {
      Shooting activeShooting=shootingService.searchIsActive();
      if (activeShooting.getActive() && firstLogin) {
        firstLogin=false;
        windowManager.showScene(WindowManager.SHOW_RECOVERYSCENE);
      }
 else {
        windowManager.showScene(loginRedirectorModel.getNextScene());
      }
      resetValues();
    }
 else {
      wrongCredentialsLabel.setVisible(true);
    }
  }
 catch (  ServiceException e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 77908
Project: 77908
Buggy source:
@FXML private void initialize(){
  try {
    buttonList=new ArrayList<>();
    leftbutton.setVisible(false);
    if (shootingservice.searchIsActive().getActive()) {
      profile=profileservice.get(shootingservice.searchIsActive().getProfileid());
    }
    if (profile.getId() != shootingservice.searchIsActive().getProfileid()) {
      if (profile.getId() != shootingservice.searchIsActive().getProfileid()) {
        profile=profileservice.get(shootingservice.searchIsActive().getProfileid());
      }
    }
    if (!profile.isGreenscreenEnabled() && !profile.isFilerEnabled()) {
      rightbutton.setVisible(false);
    }
  }
 catch (  ServiceException e) {
    showInformationDialog("String_Node_Str");
    LOGGER.error("String_Node_Str",e);
  }
catch (  NullPointerException n) {
    LOGGER.error("String_Node_Str",n);
  }
}

Fixed version (ground truth):
@FXML private void initialize(){
  try {
    buttonList=new ArrayList<>();
    leftbutton.setVisible(false);
    if (shootingservice.searchIsActive().getActive()) {
      profile=profileservice.get(shootingservice.searchIsActive().getProfileid());
    }
    if (profile != null && !profile.isGreenscreenEnabled() && !profile.isFilerEnabled()) {
      rightbutton.setVisible(false);
    }
  }
 catch (  ServiceException e) {
    showInformationDialog("String_Node_Str");
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 77909
Project: 77909
Buggy source:
/** 
 * information dialog to show user error messages
 * @param info String that gives the usere an error message
 */
public void showInformationDialog(String info){
  try {
    Alert information=new Alert(Alert.AlertType.INFORMATION,info);
    information.setHeaderText("String_Node_Str");
    information.initOwner(windowManager.getStage());
    information.show();
  }
 catch (  NullPointerException nu) {
    LOGGER.error("String_Node_Str",nu);
  }
}

Fixed version (ground truth):
/** 
 * information dialog to show user error messages
 * @param info String that gives the usere an error message
 */
public void showInformationDialog(String info){
  Alert information=new Alert(Alert.AlertType.INFORMATION,info);
  information.setHeaderText("String_Node_Str");
  information.showAndWait();
}