nus-yam/ex-repair huggingface dataset:
Program: 78054
Project: 78054
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()) {
    }
 else {
      refreshTableLogo(pservice.getAllLogosOfProfile(((Profile)profilList.getSelectionModel().getSelectedItem())));
    }
  }
 catch (  ServiceException e) {
    try {
      refreshTableProfiles(pservice.getAllProfiles());
    }
 catch (    ServiceException e1) {
      LOGGER.debug("String_Node_Str" + e1.getMessage());
    }
  }
}

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());
    }
 else {
      refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(((Profile)profilList.getSelectionModel().getSelectedItem()).getId()));
    }
  }
 catch (  ServiceException e) {
    try {
      refreshTableProfiles(pservice.getAllProfiles());
    }
 catch (    ServiceException e1) {
      LOGGER.debug("String_Node_Str" + e1.getMessage());
    }
  }
}
Program: 78055
Project: 78055
Buggy source:
private void refreshTableLogo(List<Logo> logoList){
  LOGGER.info("String_Node_Str");
  this.logoList.clear();
  this.logoList.add(new Profile.PairLogoRelativeRectangle(new Logo("String_Node_Str","String_Node_Str"),new RelativeRectangle(100,200,200,200)));
  this.logoList.add(new Profile.PairLogoRelativeRectangle(new Logo("String_Node_Str","String_Node_Str"),new RelativeRectangle(100,200,200,200)));
  tableLogo.setItems(this.logoList);
}

Fixed version (ground truth):
private void refreshTableLogo(List<Profile.PairLogoRelativeRectangle> logoList){
  LOGGER.info("String_Node_Str");
  this.logoList.clear();
  this.logoList.addAll(logoList);
  tableLogo.setItems(this.logoList);
}
Program: 78057
Project: 78057
Buggy source:
@Override public void changed(ObservableValue ov,Profile t,Profile selectedProfil){
  try {
    refreshTablePosition(pservice.getAllPositions());
    int selectedProfilID=((Profile)profilList.getSelectionModel().getSelectedItem()) == null ? 0 : ((Profile)profilList.getSelectionModel().getSelectedItem()).getId();
    kamPosList.removeAll(kamPosList);
    kamPosList.addAll(pservice.getAllPairCameraPositionOfProfile(selectedProfilID));
    tableKamPos.setItems(kamPosList);
    refreshTableLogo(pservice.getAllLogosOfProfile(selectedProfil));
  }
 catch (  ServiceException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void changed(ObservableValue ov,Profile t,Profile selectedProfil){
  try {
    refreshTablePosition(pservice.getAllPositions());
    int selectedProfilID=((Profile)profilList.getSelectionModel().getSelectedItem()) == null ? 0 : ((Profile)profilList.getSelectionModel().getSelectedItem()).getId();
    kamPosList.removeAll(kamPosList);
    kamPosList.addAll(pservice.getAllPairCameraPositionOfProfile(selectedProfilID));
    tableKamPos.setItems(kamPosList);
    refreshTableLogo(pservice.getAllPairLogoRelativeRectangle(selectedProfilID));
  }
 catch (  ServiceException e) {
    e.printStackTrace();
  }
}
Program: 78059
Project: 78059
Buggy source:
public javafx.scene.image.Image getImage(String path){
  javafx.scene.image.Image img=null;
  if (path == null) {
    return new javafx.scene.image.Image("String_Node_Str" + System.getProperty("String_Node_Str") + "String_Node_Str",true);
  }
 else   return new javafx.scene.image.Image("String_Node_Str" + path,true);
}

Fixed version (ground truth):
public Image getImage(String path){
  if (new File(path).isFile()) {
    return new Image("String_Node_Str" + path,true);
  }
 else   if (new File("String_Node_Str" + System.getProperty("String_Node_Str") + "String_Node_Str"+ path).isFile()) {
    return new Image("String_Node_Str" + System.getProperty("String_Node_Str") + "String_Node_Str"+ path,true);
  }
 else   return new Image("String_Node_Str" + System.getProperty("String_Node_Str") + "String_Node_Str",true);
}
Program: 78060
Project: 78060
Buggy source:
public javafx.scene.image.Image getImage(String path){
  javafx.scene.image.Image img=null;
  if (path == null) {
    return new javafx.scene.image.Image("String_Node_Str" + System.getProperty("String_Node_Str") + "String_Node_Str",true);
  }
 else   return new javafx.scene.image.Image("String_Node_Str" + path,true);
}

Fixed version (ground truth):
public Image getImage(String path){
  Image img=null;
  if (path == null) {
    return new Image("String_Node_Str" + System.getProperty("String_Node_Str") + "String_Node_Str",true);
  }
 else   return new javafx.scene.image.Image("String_Node_Str" + path,true);
}
Program: 78061
Project: 78061
Buggy source:
@FXML public void onFilter1Pressed(){
  try {
    changeActiveFilter(filterView1);
    ivfullscreenImage.setImage(new Image(new FileInputStream(filterGaussian(ivfullscreenImage.getId())),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@FXML public void onFilter1Pressed(){
  try {
    if (changeActiveFilter(filterView1)) {
      filteredImgPath=filterGaussian(ivfullscreenImage.getId());
      ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
    }
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}
Program: 78062
Project: 78062
Buggy source:
public void changeImage(int imgID){
  try {
    at.ac.tuwien.sepm.ws16.qse01.entities.Image img=imageService.read(imgID);
    if (new File(img.getImagepath()).isFile()) {
      ivfullscreenImage.setImage(new Image(new FileInputStream(img.getImagepath()),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
      ivfullscreenImage.setId(img.getImagepath());
    }
 else {
      ivfullscreenImage.setImage(new Image(new FileInputStream(System.getProperty("String_Node_Str") + "String_Node_Str" + img.getImagepath()),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
      ivfullscreenImage.setId(System.getProperty("String_Node_Str") + "String_Node_Str" + img.getImagepath());
    }
    checkStorageDir();
    makePreviewFilter(img.getImagepath());
  }
 catch (  FileNotFoundException e) {
    LOGGER.debug(("String_Node_Str" + e.getMessage()));
  }
catch (  ServiceException e) {
    LOGGER.debug(("String_Node_Str" + e.getMessage()));
  }
}

Fixed version (ground truth):
public void changeImage(int imgID){
  try {
    at.ac.tuwien.sepm.ws16.qse01.entities.Image img=imageService.read(imgID);
    if (new File(img.getImagepath()).isFile()) {
      ivfullscreenImage.setImage(new Image(new FileInputStream(img.getImagepath()),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
      ivfullscreenImage.setId(img.getImagepath());
    }
    checkStorageDir();
    makePreviewFilter(img.getImagepath());
  }
 catch (  FileNotFoundException e) {
    LOGGER.debug(("String_Node_Str" + e.getMessage()));
  }
catch (  ServiceException e) {
    LOGGER.debug(("String_Node_Str" + e.getMessage()));
  }
}
Program: 78063
Project: 78063
Buggy source:
@FXML public void onFilter4Pressed(){
  try {
    changeActiveFilter(filterView4);
    ivfullscreenImage.setImage(new Image(new FileInputStream(filterThreshZero(ivfullscreenImage.getId())),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@FXML public void onFilter4Pressed(){
  try {
    if (changeActiveFilter(filterView4)) {
      filteredImgPath=filterThreshZero(ivfullscreenImage.getId());
      ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
    }
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}
Program: 78064
Project: 78064
Buggy source:
@FXML public void onFilter5Pressed(){
  try {
    changeActiveFilter(filterView5);
    ivfullscreenImage.setImage(new Image(new FileInputStream(filterThreshBinaryInvert(ivfullscreenImage.getId())),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@FXML public void onFilter5Pressed(){
  try {
    if (changeActiveFilter(filterView5)) {
      filteredImgPath=filterThreshBinaryInvert(ivfullscreenImage.getId());
      ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
    }
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}
Program: 78065
Project: 78065
Buggy source:
@FXML public void onFilter2Pressed(){
  try {
    changeActiveFilter(filterView2);
    ivfullscreenImage.setImage(new Image(new FileInputStream(filterGrayScale(ivfullscreenImage.getId())),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@FXML public void onFilter2Pressed(){
  try {
    if (changeActiveFilter(filterView2)) {
      filteredImgPath=filterGrayScale(ivfullscreenImage.getId());
      ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
    }
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}
Program: 78066
Project: 78066
Buggy source:
@FXML public void onFilter3Pressed(){
  try {
    changeActiveFilter(filterView3);
    ivfullscreenImage.setImage(new Image(new FileInputStream(filterColorSpace(ivfullscreenImage.getId())),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@FXML public void onFilter3Pressed(){
  try {
    if (changeActiveFilter(filterView3)) {
      filteredImgPath=filterColorSpace(ivfullscreenImage.getId());
      ivfullscreenImage.setImage(new Image(new FileInputStream(filteredImgPath),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
    }
  }
 catch (  FileNotFoundException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
  }
}
Program: 78067
Project: 78067
Buggy source:
public void changeActiveFilter(ImageView imageView){
  if (!imageView.equals(activeFilterImageView)) {
    if (activeFilterImageView != null) {
      activeFilterImageView.setFitHeight(130);
      activeFilterImageView.setPreserveRatio(false);
      activeFilterImageView.setY(15);
    }
    imageView.setFitHeight(150);
    imageView.setPreserveRatio(false);
    imageView.setY(0);
    activeFilterImageView=imageView;
  }
}

Fixed version (ground truth):
public boolean changeActiveFilter(ImageView imageView){
  if (!imageView.equals(activeFilterImageView)) {
    saveFilteredButton.setVisible(true);
    if (activeFilterImageView != null) {
      activeFilterImageView.setFitHeight(130);
      activeFilterImageView.setPreserveRatio(false);
      activeFilterImageView.setY(15);
    }
    imageView.setFitHeight(150);
    imageView.setPreserveRatio(false);
    imageView.setY(0);
    activeFilterImageView=imageView;
    return true;
  }
 else {
    activeFilterImageView.setFitHeight(130);
    activeFilterImageView.setPreserveRatio(false);
    activeFilterImageView.setY(15);
    activeFilterImageView=null;
    saveFilteredButton.setVisible(false);
    try {
      ivfullscreenImage.setImage(new Image(new FileInputStream(ivfullscreenImage.getId()),ivfullscreenImage.getFitWidth(),ivfullscreenImage.getFitHeight(),true,true));
    }
 catch (    FileNotFoundException e) {
      LOGGER.error("String_Node_Str" + e.getMessage());
    }
    return false;
  }
}
Program: 78068
Project: 78068
Buggy source:
public String resize(String imgPath,int width,int height){
  Mat source=Imgcodecs.imread(System.getProperty("String_Node_Str") + "String_Node_Str" + imgPath,Imgcodecs.CV_LOAD_IMAGE_COLOR);
  Mat resizeimage=new Mat();
  Size sz=new Size(width,height);
  Imgproc.resize(source,resizeimage,sz);
  String[] parts=imgPath.split("String_Node_Str");
  String imgFilterName=parts[parts.length - 1].replace("String_Node_Str","String_Node_Str");
  System.out.println(storageDir + imgFilterName);
  Imgcodecs.imwrite(storageDir + imgFilterName,resizeimage);
  return storageDir + imgFilterName;
}

Fixed version (ground truth):
public String resize(String imgPath,int width,int height){
  Mat source=Imgcodecs.imread(imgPath,Imgcodecs.CV_LOAD_IMAGE_COLOR);
  Mat resizeimage=new Mat();
  Size sz=new Size(width,height);
  Imgproc.resize(source,resizeimage,sz);
  String[] parts=imgPath.split("String_Node_Str");
  String imgFilterName=parts[parts.length - 1].replace("String_Node_Str","String_Node_Str");
  System.out.println(storageDir + imgFilterName);
  Imgcodecs.imwrite(storageDir + imgFilterName,resizeimage);
  return storageDir + imgFilterName;
}
Program: 78070
Project: 78070
Buggy source:
/** 
 * defines the first image and initialises the image list
 * @param imgID image id given from miniaturframe
 */
public void changeImage(int imgID){
  try {
    if (shootingService.searchIsActive().getActive()) {
      activ=shootingService.searchIsActive().getId();
      imageList=imageService.getAllImages(activ);
    }
    if (imageList != null) {
      LOGGER.debug("String_Node_Str" + imageList.size());
      for (int i=0; i < imageList.size(); i++) {
        if (imageList.get(i).getImageID() == imgID) {
          currentIndex=i;
        }
        LOGGER.debug("String_Node_Str" + imageList.get(i).getImageID());
      }
      if (currentIndex == 0) {
        button4.setVisible(false);
      }
      if (currentIndex == imageList.size() - 1) {
        button3.setVisible(false);
      }
      ivfullscreenImage.setImage(new Image(new FileInputStream(imageService.read(imgID).getImagepath()),base.getWidth(),base.getHeight(),true,true));
    }
 else {
      windowManager.showMiniatureFrame();
    }
  }
 catch (  ServiceException e) {
    informationDialog("String_Node_Str");
    LOGGER.debug(e.getMessage());
  }
catch (  FileNotFoundException e) {
    LOGGER.debug(e.getMessage());
    informationDialog("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * defines the first image and initialises the image list
 * @param imgID image id given from miniaturframe
 */
public void changeImage(int imgID){
  try {
    if (shootingService.searchIsActive().getActive()) {
      activ=shootingService.searchIsActive().getId();
      imageList=imageService.getAllImages(activ);
    }
    if (imageList != null) {
      LOGGER.debug("String_Node_Str" + imageList.size());
      for (int i=0; i < imageList.size(); i++) {
        if (imageList.get(i).getImageID() == imgID) {
          currentIndex=i;
        }
        LOGGER.debug("String_Node_Str" + imageList.get(i).getImageID());
      }
      if (currentIndex == 0) {
        button4.setVisible(false);
      }
      if (currentIndex == imageList.size() - 1) {
        button3.setVisible(false);
      }
      at.ac.tuwien.sepm.ws16.qse01.entities.Image img=imageService.read(imgID);
      ivfullscreenImage.setImage(new Image(new FileInputStream(img.getImagepath()),base.getWidth(),base.getHeight(),true,true));
      ivfullscreenImage.setId(img.getImagepath());
      makePreviewFilter(img.getImagepath());
    }
 else {
      windowManager.showMiniatureFrame();
    }
  }
 catch (  ServiceException e) {
    informationDialog("String_Node_Str");
    LOGGER.debug(e.getMessage());
  }
catch (  FileNotFoundException e) {
    LOGGER.debug(e.getMessage());
    informationDialog("String_Node_Str");
  }
}
Program: 78071
Project: 78071
Buggy source:
@Autowired public FullScreenImageController(SpringFXMLLoader springFXMLLoader,WindowManager windowManager,ShootingService shootingService,ImageService imageService,ImagePrinter imagePrinter) throws ServiceException {
  this.imageService=imageService;
  this.shootingService=shootingService;
  this.windowManager=windowManager;
  this.imagePrinter=imagePrinter;
  this.springFXMLLoader=springFXMLLoader;
}

Fixed version (ground truth):
@Autowired public FullScreenImageController(SpringFXMLLoader springFXMLLoader,WindowManager windowManager,ShootingService shootingService,ImageService imageService,ImagePrinter imagePrinter) throws ServiceException {
  this.imageService=imageService;
  this.shootingService=shootingService;
  this.windowManager=windowManager;
  this.imagePrinter=imagePrinter;
  this.springFXMLLoader=springFXMLLoader;
  this.activeShooting=shootingService.searchIsActive();
}
Program: 78072
Project: 78072
Buggy source:
/** 
 * iniziaising full screen image view if the List == null and there is an activ shooting avalible the imageList gets initialised if the list is not empty, the chosen image gets displayed catches ServiceException which can be thrown by all metodes requering an Service class catches FileNotFoundException which can be thrown by all FileInputStream´s
 */
@FXML private void initialize(){
}

Fixed version (ground truth):
/** 
 * iniziaising full screen image view if the List == null and there is an activ shooting avalible the imageList gets initialised if the list is not empty, the chosen image gets displayed catches ServiceException which can be thrown by all metodes requering an Service class catches FileNotFoundException which can be thrown by all FileInputStream´s
 */
@FXML private void initialize(){
  planbottom=new GridPane();
  planbottom.setPrefHeight(100);
  planbottom.setStyle("String_Node_Str");
}
Program: 78075
Project: 78075
Buggy source:
@Override public Profile read(int id) throws PersistenceException {
  LOGGER.debug("String_Node_Str" + id);
  String sqlString="String_Node_Str" + "String_Node_Str";
  PreparedStatement stmt=null;
  try {
    stmt=this.con.prepareStatement(sqlString);
    stmt.setInt(1,id);
    ResultSet rs=stmt.executeQuery();
    if (!rs.next()) {
      return null;
    }
    Profile p=new Profile(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),pairCameraPositionDAO.readAllWithProfileID(id),pairLogoRelativeRectangleDAO.readAllWithProfileID(id),rs.getBoolean("String_Node_Str"),rs.getBoolean("String_Node_Str"),rs.getBoolean("String_Node_Str"),rs.getBoolean(("String_Node_Str")),rs.getBoolean("String_Node_Str"));
    p.setWatermark(rs.getString("String_Node_Str"));
    return p;
  }
 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 Profile 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()) {
      Profile profile=new Profile(rs.getInt("String_Node_Str"),rs.getString("String_Node_Str"),pairCameraPositionDAO.readAllWithProfileID(id),pairLogoRelativeRectangleDAO.readAllWithProfileID(id),rs.getBoolean("String_Node_Str"),rs.getBoolean("String_Node_Str"),rs.getBoolean("String_Node_Str"),rs.getBoolean("String_Node_Str"),rs.getString("String_Node_Str"),rs.getBoolean("String_Node_Str"));
      return profile;
    }
 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);
    }
  }
}
Program: 78078
Project: 78078
Buggy source:
@Override public boolean delete(Profile profile) throws PersistenceException {
  LOGGER.debug("String_Node_Str" + profile);
  String sqlString="String_Node_Str";
  PreparedStatement stmt=null;
  try {
    stmt=this.con.prepareStatement(sqlString);
    stmt.setInt(1,profile.getId());
    stmt.executeUpdate();
    ResultSet rs=stmt.getResultSet();
    if (rs.next()) {
      return true;
    }
 else {
      return false;
    }
  }
 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 boolean delete(Profile profile) throws PersistenceException {
  LOGGER.debug("String_Node_Str" + profile);
  if (profile == null)   throw new IllegalArgumentException("String_Node_Str");
  ResultSet rs;
  String sqlString;
  PreparedStatement stmt=null;
  sqlString="String_Node_Str";
  try {
    stmt=this.con.prepareStatement(sqlString);
    stmt.setInt(1,profile.getId());
    int returnUpdateCount=stmt.executeUpdate();
    if (returnUpdateCount == 1) {
      LOGGER.debug("String_Node_Str");
      return true;
    }
 else     if (returnUpdateCount == 0) {
      LOGGER.debug("String_Node_Str");
      return false;
    }
 else {
      throw new PersistenceException("String_Node_Str");
    }
  }
 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);
    }
  }
}
Program: 78079
Project: 78079
Buggy source:
@Override public List<Profile> readAll() throws PersistenceException {
  LOGGER.debug("String_Node_Str");
  String sqlString="String_Node_Str";
  PreparedStatement stmt=null;
  try {
    stmt=this.con.prepareStatement(sqlString);
    ResultSet rs=stmt.executeQuery();
    List<Profile> pList=new ArrayList<>();
    while (rs.next()) {
      Profile profile=this.read(rs.getInt("String_Node_Str"));
      pList.add(profile);
    }
    return pList;
  }
 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 List<Profile> readAll() throws PersistenceException {
  LOGGER.debug("String_Node_Str");
  String sqlString="String_Node_Str";
  PreparedStatement stmt=null;
  try {
    stmt=this.con.prepareStatement(sqlString);
    ResultSet rs=stmt.executeQuery();
    List<Profile> returnList=new ArrayList<>();
    while (rs.next()) {
      Profile profile=this.read(rs.getInt("String_Node_Str"));
      returnList.add(profile);
    }
    LOGGER.debug("String_Node_Str" + returnList);
    return returnList;
  }
 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);
    }
  }
}
Program: 78080
Project: 78080
Buggy source:
/** 
 * Constructor with unknown id will set id to Integer.MIN_VALUE and persistence layer has to provide a valid id
 * @param name - no empty profile name
 */
public Profile(String name){
  this(Integer.MIN_VALUE,name,null,null,false,false,false,false,false);
}

Fixed version (ground truth):
/** 
 * Constructor with unknown id will set id to Integer.MIN_VALUE and persistence layer has to provide a valid id
 * @param name - no empty profile name
 */
public Profile(String name){
  this(Integer.MIN_VALUE,name,null,null,false,false,false,false,"String_Node_Str",false);
}
Program: 78081
Project: 78081
Buggy source:
@Override public boolean equals(Object object){
  return object instanceof PairLogoRelativeRectangle && ((PairLogoRelativeRectangle)object).getId() == this.getId() && ((PairLogoRelativeRectangle)object).getProfileId() == this.getProfileId() && ((PairLogoRelativeRectangle)object).getLogo().equals(this.getLogo()) && ((PairLogoRelativeRectangle)object).getRelativeRectangle().equals(this.getRelativeRectangle());
}

Fixed version (ground truth):
@Override public boolean equals(Object object){
  return object instanceof PairLogoRelativeRectangle && ((PairLogoRelativeRectangle)object).getId() == this.getId();
}
Program: 78082
Project: 78082
Buggy source:
@FXML private void saveProfil(){
  LOGGER.debug("String_Node_Str");
  String name=txProfilName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    LOGGER.debug("String_Node_Str");
    showError("String_Node_Str");
  }
 else {
    Profile p=new Profile(name,txProfilDrucken.isSelected(),txProfilFilter.isSelected(),txProfilGreen.isSelected(),txProfilMobil.isSelected());
    if (txProfilWatermark.getText().compareTo("String_Node_Str") != 0)     p.setWatermark(txProfilWatermark.getText());
    try {
      LOGGER.info("String_Node_Str");
      profList.add(p);
      pservice.add(p);
    }
 catch (    ServiceException e) {
      LOGGER.debug("String_Node_Str" + e.getMessage());
    }
  }
}

Fixed version (ground truth):
@FXML private void saveProfil(){
  LOGGER.debug("String_Node_Str");
  String name=txProfilName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    LOGGER.debug("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");
      profList.add(p);
      pservice.add(p);
    }
 catch (    ServiceException e) {
      LOGGER.debug("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 78083
Project: 78083
Buggy source:
@FXML private void saveProfil(){
  LOGGER.debug("String_Node_Str");
  String name=txProfilName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    LOGGER.debug("String_Node_Str");
    Alert alert=new Alert(Alert.AlertType.ERROR);
    alert.setHeaderText("String_Node_Str");
    alert.setContentText("String_Node_Str");
    alert.initModality(Modality.WINDOW_MODAL);
    alert.initOwner(windowManager.getStage());
    alert.show();
  }
 else {
    Profile p=new Profile(name,txProfilDrucken.isSelected(),txProfilFilter.isSelected(),txProfilGreen.isSelected(),txProfilMobil.isSelected());
    if (txProfilWatermark.getText().compareTo("String_Node_Str") != 0)     p.setWatermark(txProfilWatermark.getText());
    try {
      LOGGER.info("String_Node_Str");
      profList.add(p);
      pservice.add(p);
    }
 catch (    ServiceException e) {
      LOGGER.debug("String_Node_Str" + e.getMessage());
    }
  }
}

Fixed version (ground truth):
@FXML private void saveProfil(){
  LOGGER.debug("String_Node_Str");
  String name=txProfilName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    LOGGER.debug("String_Node_Str");
    showError("String_Node_Str");
  }
 else {
    Profile p=new Profile(name,txProfilDrucken.isSelected(),txProfilFilter.isSelected(),txProfilGreen.isSelected(),txProfilMobil.isSelected());
    if (txProfilWatermark.getText().compareTo("String_Node_Str") != 0)     p.setWatermark(txProfilWatermark.getText());
    try {
      LOGGER.info("String_Node_Str");
      profList.add(p);
      pservice.add(p);
    }
 catch (    ServiceException e) {
      LOGGER.debug("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 78084
Project: 78084
Buggy source:
@FXML private void saveLogo(){
}

Fixed version (ground truth):
@FXML private void saveLogo(){
  LOGGER.debug("String_Node_Str");
  String name=txLogoName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0 || txLogoLogo.getText().compareTo("String_Node_Str") == 0) {
    LOGGER.debug("String_Node_Str");
    showError("String_Node_Str");
  }
 else {
    try {
      Logo newLogo=new Logo(name,txLogoLogo.getText());
      RelativeRectangle newPosition=new RelativeRectangle(Double.valueOf(txLogoX.getText()),Double.valueOf(txLogoY.getText()),Double.valueOf(txLogoHoehe.getText()),Double.valueOf(txLogoBreite.getText()));
      Profile.PairLogoRelativeRectangle p=new Profile.PairLogoRelativeRectangle(newLogo,newPosition);
      LOGGER.info("String_Node_Str");
      logoList.add(p);
    }
 catch (    NumberFormatException e) {
      showError("String_Node_Str");
      LOGGER.error("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 78085
Project: 78085
Buggy source:
@FXML private void savePosition(){
  LOGGER.debug("String_Node_Str");
  String name=txPositionName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    Alert alert=new Alert(Alert.AlertType.ERROR);
    alert.setHeaderText("String_Node_Str");
    alert.setContentText("String_Node_Str");
    alert.initModality(Modality.WINDOW_MODAL);
    alert.initOwner(windowManager.getStage());
    alert.show();
  }
 else {
    Position p=new Position(name);
    if (txPositionBild.getText().compareTo("String_Node_Str") != 0)     p.setButtonImagePath(txPositionBild.getText());
    try {
      LOGGER.info("String_Node_Str");
      posList.add(p);
      pservice.addPosition(p);
    }
 catch (    ServiceException e) {
      LOGGER.debug("String_Node_Str" + e.getMessage());
    }
  }
}

Fixed version (ground truth):
@FXML private void savePosition(){
  LOGGER.debug("String_Node_Str");
  String name=txPositionName.getText();
  if (name.trim().compareTo("String_Node_Str") == 0) {
    showError("String_Node_Str");
  }
 else {
    Position p=new Position(name);
    if (txPositionBild.getText().compareTo("String_Node_Str") != 0)     p.setButtonImagePath(txPositionBild.getText());
    try {
      LOGGER.info("String_Node_Str");
      posList.add(p);
      pservice.addPosition(p);
    }
 catch (    ServiceException e) {
      LOGGER.debug("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 78086
Project: 78086
Buggy source:
/** 
 * @Test public void readProfileWithValidArgumentThatExistsInPersistenceStore() throws PersistenceException{ Profile profile = new Profile(100, "Testprofile100",null,null,false,false,false,false); profileDAO.create(profile); profile = profileDAO.read(100); assertTrue(profile.getName() == "Testprofile100" && profile.getId() == 100); }
 */
public void readProfileWithValidArgumentThatDoesNotExistInPersistenceStore() throws PersistenceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,false);
  profileDAO.create(profile);
  profile=profileDAO.read(101);
  assertTrue(profile == null);
}

Fixed version (ground truth):
/** 
 * @Test public void readProfileWithValidArgumentThatExistsInPersistenceStore() throws PersistenceException{ Profile profile = new Profile(100, "Testprofile100",null,null,false,false,false,false); profileDAO.create(profile); profile = profileDAO.read(100); assertTrue(profile.getName() == "Testprofile100" && profile.getId() == 100); }
 */
public void readProfileWithValidArgumentThatDoesNotExistInPersistenceStore() throws PersistenceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,"String_Node_Str",false);
  profileDAO.create(profile);
  profile=profileDAO.read(101);
  assertTrue(profile == null);
}
Program: 78087
Project: 78087
Buggy source:
public void deleteProfileWithValidArgumentThatExistsInPersistenceStore() throws PersistenceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,false);
  profileDAO.create(profile);
  profile=profileDAO.read(100);
  assertTrue(profile.getName() == "String_Node_Str" && profile.getId() == 100);
  profileDAO.delete(profile);
  profile=profileDAO.read(100);
  assertTrue(profile == null);
}

Fixed version (ground truth):
public void deleteProfileWithValidArgumentThatExistsInPersistenceStore() throws PersistenceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,"String_Node_Str",false);
  profileDAO.create(profile);
  profile=profileDAO.read(100);
  assertTrue(profile.getName() == "String_Node_Str" && profile.getId() == 100);
  profileDAO.delete(profile);
  profile=profileDAO.read(100);
  assertTrue(profile == null);
}
Program: 78088
Project: 78088
Buggy source:
/** 
 * @Test public void getProfileWithValidArgumentThatExistsInPersistenceStore() throws ServiceException{ Profile profile = new Profile(100, "Testprofile100", null,null,false,false,false,false); profileService.add(profile); profile = profileService.get(100); assertTrue(profile.getName() == "Testprofile100" && profile.getId() == 100); }
 */
public void readProfileWithValidArgumentThatDoesNotExistInPersistenceStore() throws ServiceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,false);
  profileService.add(profile);
  profile=profileService.get(101);
  assertTrue(profile == null);
}

Fixed version (ground truth):
/** 
 * @Test public void getProfileWithValidArgumentThatExistsInPersistenceStore() throws ServiceException{ Profile profile = new Profile(100, "Testprofile100", null,null,false,false,false,false); profileService.add(profile); profile = profileService.get(100); assertTrue(profile.getName() == "Testprofile100" && profile.getId() == 100); }
 */
public void readProfileWithValidArgumentThatDoesNotExistInPersistenceStore() throws ServiceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,"String_Node_Str",false);
  profileService.add(profile);
  profile=profileService.get(101);
  assertTrue(profile == null);
}
Program: 78089
Project: 78089
Buggy source:
public void deleteProfileWithValidArgumentThatExistsInPersistenceStore() throws ServiceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,false);
  profileService.add(profile);
  profile=profileService.get(100);
  assertTrue(profile.getName() == "String_Node_Str" && profile.getId() == 100);
  profileService.erase(profile);
  profile=profileService.get(100);
  assertTrue(profile == null);
}

Fixed version (ground truth):
public void deleteProfileWithValidArgumentThatExistsInPersistenceStore() throws ServiceException {
  Profile profile=new Profile(100,"String_Node_Str",null,null,false,false,false,false,"String_Node_Str",false);
  profileService.add(profile);
  profile=profileService.get(100);
  assertTrue(profile.getName() == "String_Node_Str" && profile.getId() == 100);
  profileService.erase(profile);
  profile=profileService.get(100);
  assertTrue(profile == null);
}
Program: 78090
Project: 78090
Buggy source:
public ProfileCheckboxCell(ObservableList<Profile> pList,ProfileService pservice,String checkboxTyp){
  this.pList=pList;
  this.pservice=pservice;
  this.checkboxTyp=checkboxTyp;
  cellCheckbox.setOnMouseClicked(new EventHandler<MouseEvent>(){
    @Override public void handle(    MouseEvent event){
      Profile currentProfile=(Profile)ProfileCheckboxCell.this.getTableView().getItems().get(ProfileCheckboxCell.this.getIndex());
      if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
      try {
        pservice.edit(currentProfile);
      }
 catch (      ServiceException e) {
        e.printStackTrace();
      }
    }
  }
);
}

Fixed version (ground truth):
public ProfileCheckboxCell(ObservableList<Profile> pList,ProfileService pservice,String checkboxTyp){
  this.pList=pList;
  this.pservice=pservice;
  this.checkboxTyp=checkboxTyp;
  cellCheckbox.setOnMouseClicked(new EventHandler<MouseEvent>(){
    @Override public void handle(    MouseEvent event){
      Profile currentProfile=(Profile)ProfileCheckboxCell.this.getTableView().getItems().get(ProfileCheckboxCell.this.getIndex());
      LOGGER.info("String_Node_Str" + currentProfile.isFilerEnabled() + "String_Node_Str"+ currentProfile.isGreenscreenEnabled()+ "String_Node_Str"+ currentProfile.isMobilEnabled()+ "String_Node_Str"+ currentProfile.isPrintEnabled());
      if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
      try {
        pservice.edit(currentProfile);
      }
 catch (      ServiceException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
);
}
Program: 78091
Project: 78091
Buggy source:
@Override public void handle(MouseEvent event){
  Profile currentProfile=(Profile)ProfileCheckboxCell.this.getTableView().getItems().get(ProfileCheckboxCell.this.getIndex());
  if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
  try {
    pservice.edit(currentProfile);
  }
 catch (  ServiceException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void handle(MouseEvent event){
  Profile currentProfile=(Profile)ProfileCheckboxCell.this.getTableView().getItems().get(ProfileCheckboxCell.this.getIndex());
  LOGGER.info("String_Node_Str" + currentProfile.isFilerEnabled() + "String_Node_Str"+ currentProfile.isGreenscreenEnabled()+ "String_Node_Str"+ currentProfile.isMobilEnabled()+ "String_Node_Str"+ currentProfile.isPrintEnabled());
  if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setMobilEnabled(cellCheckbox.isSelected());
  try {
    pservice.edit(currentProfile);
  }
 catch (  ServiceException e) {
    LOGGER.debug("String_Node_Str" + e.getMessage());
  }
}
Program: 78092
Project: 78092
Buggy source:
@Autowired public SettingFrameController(SpringFXMLLoader springFXMLLoader,ProfileService pservice,CameraService cameraService,WindowManager windowmanager) throws ServiceException {
  this.springFXMLLoader=springFXMLLoader;
  this.pservice=pservice;
  this.cameraService=cameraService;
  this.windowManager=windowmanager;
}

Fixed version (ground truth):
@Autowired public SettingFrameController(SpringFXMLLoader springFXMLLoader,ProfileService pservice,LogoWatermarkService logoService,CameraService cameraService,WindowManager windowmanager) throws ServiceException {
  this.springFXMLLoader=springFXMLLoader;
  this.pservice=pservice;
  this.cameraService=cameraService;
  this.windowManager=windowmanager;
  this.logoService=logoService;
}
Program: 78094
Project: 78094
Buggy source:
public ProfileImgCell(ObservableList<Profile> pList,ProfileService pservice){
  this.pList=pList;
  this.pservice=pservice;
  img.setFitHeight(35);
  img.setFitWidth(35);
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      FileChooser fileChooser=new FileChooser();
      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) {
        try {
          Profile p=pList.get(getIndex());
          p.setWatermark(file.getAbsolutePath());
          pservice.edit(p);
          pList.removeAll(pList);
          pList.addAll(pservice.getAllProfiles());
        }
 catch (        ServiceException e) {
          e.printStackTrace();
        }
      }
    }
  }
);
  img.addEventHandler(MouseEvent.MOUSE_CLICKED,new EventHandler<MouseEvent>(){
    @Override public void handle(    MouseEvent event){
      try {
        if (pList.get(getIndex()).getWatermark() == null)         desktop.getDesktop().open(new File(System.getProperty("String_Node_Str") + "String_Node_Str"));
 else         desktop.getDesktop().open(new File(pList.get(getIndex()).getWatermark()));
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
);
}

Fixed version (ground truth):
public ProfileImgCell(ObservableList<Profile> pList,ProfileService pservice){
  this.pList=pList;
  this.pservice=pservice;
  img.setFitHeight(35);
  img.setFitWidth(35);
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      FileChooser fileChooser=new FileChooser();
      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) {
        try {
          Profile p=pList.get(getIndex());
          p.setWatermark(file.getAbsolutePath());
          pList.removeAll(pList);
          pList.addAll(pservice.getAllProfiles());
          pservice.edit(p);
        }
 catch (        ServiceException e) {
          e.printStackTrace();
        }
      }
    }
  }
);
  img.addEventHandler(MouseEvent.MOUSE_CLICKED,new EventHandler<MouseEvent>(){
    @Override public void handle(    MouseEvent event){
      try {
        if (pList.get(getIndex()).getWatermark() == null)         desktop.getDesktop().open(new File(System.getProperty("String_Node_Str") + "String_Node_Str"));
 else         desktop.getDesktop().open(new File(pList.get(getIndex()).getWatermark()));
      }
 catch (      IOException e) {
        e.printStackTrace();
      }
    }
  }
);
}
Program: 78095
Project: 78095
Buggy source:
/** 
 * Shows a preview of the resulting image, if the given logo would be added at the position specified by the given RelativeRectangle. imageWidth and imageHeight must be set correctly. If the width or the height of the relative rectangle, representing a logo position is set to -1 the width or height will be automatically scaled according to the given logo. If both width and length are set to -1 the absolute pixel values will be used
 * @param logo the given logo, which will be contained in the preview
 * @param position specifies the position of the logo
 * @param imageWidth specifies the width of the resulting image in pixel
 * @param imageHeight specifies the height of the resulting image in pixel
 * @return the preview where the logo is added at the specified position
 * @throws ServiceException if an error during the image processing or opening of the logo image occurs
 */
Image getPreviewForLogo(Logo logo,RelativeRectangle position,int imageWidth,int imageHeight) throws ServiceException ;

Fixed version (ground truth):
/** 
 * Shows a preview of the resulting image, if the given logo would be added at the position specified by the given RelativeRectangle. imageWidth and imageHeight must be set correctly. If the width or the height of the relative rectangle, representing a logo position is set to -1 the width or height will be automatically scaled according to the given logo. If both width and length are set to -1 the absolute pixel values will be used
 * @param logo the given logo, which will be contained in the preview
 * @param position specifies the position of the logo
 * @param imageWidth specifies the width of the resulting image in pixel
 * @param imageHeight specifies the height of the resulting image in pixel
 * @return the preview where the logo is added at the specified position
 * @throws ServiceException if an error during the image processing or opening of the logo image occurs
 */
BufferedImage getPreviewForLogo(Logo logo,RelativeRectangle position,int imageWidth,int imageHeight) throws ServiceException ;
Program: 78096
Project: 78096
Buggy source:
@Override public Image getPreviewForLogo(Logo logo,RelativeRectangle position,int imageWidth,int imageHeight) throws ServiceException {
  BufferedImage img=createPreviewImage(imageWidth,imageHeight);
  BufferedImage logoImage=openImageFromLogo(logo);
  addLogoAtPosition(img,logoImage,position);
  return img;
}

Fixed version (ground truth):
@Override public BufferedImage getPreviewForLogo(Logo logo,RelativeRectangle position,int imageWidth,int imageHeight) throws ServiceException {
  BufferedImage img=createPreviewImage(imageWidth,imageHeight);
  BufferedImage logoImage=openImageFromLogo(logo);
  addLogoAtPosition(img,logoImage,position);
  return img;
}
Program: 78097
Project: 78097
Buggy source:
@FXML public void openMainFrame(){
  LOGGER.info("String_Node_Str");
  windowManager.showShootingAdministration();
}

Fixed version (ground truth):
@FXML public void openMainFrame(){
  LOGGER.info("String_Node_Str");
  windowManager.showAdminLogin(WindowManager.SHOW_MAINSCENE);
}
Program: 78098
Project: 78098
Buggy source:
private void addLogoAtPosition(BufferedImage img,BufferedImage logo,RelativeRectangle position) throws ServiceException {
  double imgWidth=img.getWidth();
  double imgHeight=img.getHeight();
  double relativeXPosition=position.getX();
  double relativeYPosition=position.getY();
  int absoluteXPosition=(int)(imgWidth * relativeXPosition / (100d));
  int absoluteYPosition=(int)(imgHeight * relativeYPosition / (100d));
  RelativeRectangle calculatedPosition=calculatePosition(position,imgWidth,imgHeight,logo.getWidth(),logo.getHeight());
  double relativeLogoWidth=calculatedPosition.getWidth();
  double relativeLogoHeight=calculatedPosition.getHeight();
  double absoluteLogoHeight=relativeLogoHeight / (100d) * imgHeight;
  double absoluteLogoWidth=relativeLogoWidth / (100d) * imgWidth;
  Graphics2D g=img.createGraphics();
  g.drawImage(logo,absoluteXPosition,absoluteYPosition,(int)absoluteLogoWidth,(int)absoluteLogoHeight,null);
}

Fixed version (ground truth):
private void addLogoAtPosition(BufferedImage img,BufferedImage logo,RelativeRectangle position) throws ServiceException {
  double imgWidth=img.getWidth();
  double imgHeight=img.getHeight();
  double relativeXPosition=position.getX();
  double relativeYPosition=position.getY();
  int absoluteXPosition=(int)(imgWidth * relativeXPosition / (100d));
  int absoluteYPosition=(int)(imgHeight * relativeYPosition / (100d));
  RelativeRectangle calculatedPosition=calculatePosition(position,imgWidth,imgHeight,logo.getWidth(),logo.getHeight());
  double relativeLogoWidth=calculatedPosition.getWidth();
  double relativeLogoHeight=calculatedPosition.getHeight();
  if (relativeLogoWidth <= 0 || relativeLogoHeight <= 0) {
    LOGGER.error("String_Node_Str");
    throw new ServiceException("String_Node_Str");
  }
  double absoluteLogoHeight=relativeLogoHeight / (100d) * imgHeight;
  double absoluteLogoWidth=relativeLogoWidth / (100d) * imgWidth;
  Graphics2D g=img.createGraphics();
  g.drawImage(logo,absoluteXPosition,absoluteYPosition,(int)absoluteLogoWidth,(int)absoluteLogoHeight,null);
}