nus-yam/ex-repair huggingface dataset:
Program: 78015
Project: 78015
Buggy source:
public LogoButtonCell(ObservableList<Profile.PairLogoRelativeRectangle> posList,ProfileService pservice,Stage primaryStage){
  this.posList=posList;
  this.pservice=pservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Profile.PairLogoRelativeRectangle currentProfile=(Profile.PairLogoRelativeRectangle)LogoButtonCell.this.getTableView().getItems().get(LogoButtonCell.this.getIndex());
        posList.remove(currentProfile);
        setGraphic(null);
      }
    }
  }
);
}

Fixed version (ground truth):
public LogoButtonCell(ObservableList<Profile.PairLogoRelativeRectangle> posList,ProfileService pservice,Stage primaryStage){
  this.posList=posList;
  this.pservice=pservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Profile.PairLogoRelativeRectangle currentPairLogo=(Profile.PairLogoRelativeRectangle)LogoButtonCell.this.getTableView().getItems().get(LogoButtonCell.this.getIndex());
        posList.remove(currentPairLogo);
        try {
          pservice.erasePairLogoRelativeRectangle(currentPairLogo);
        }
 catch (        ServiceException e) {
          e.printStackTrace();
        }
        setGraphic(null);
      }
    }
  }
);
}
Program: 78016
Project: 78016
Buggy source:
@Override public boolean editPairLogoRelativeRectangle(Profile.PairLogoRelativeRectangle pairLogoRelativeRectangle) throws ServiceException {
  Profile profile=this.get(pairLogoRelativeRectangle.getProfileId());
  List<Profile.PairLogoRelativeRectangle> pairLogoRelativeRectangles=profile.getPairLogoRelativeRectangles();
  for (  Profile.PairLogoRelativeRectangle auxPairLogoRelativeRectangle : pairLogoRelativeRectangles) {
    if (auxPairLogoRelativeRectangle.getId() == pairLogoRelativeRectangle.getId()) {
      auxPairLogoRelativeRectangle.setLogo(pairLogoRelativeRectangle.getLogo());
      auxPairLogoRelativeRectangle.setRelativeRectangle(pairLogoRelativeRectangle.getRelativeRectangle());
    }
  }
  profile.setPairLogoRelativeRectangles(pairLogoRelativeRectangles);
  return this.edit(profile);
}

Fixed version (ground truth):
@Override public boolean editPairLogoRelativeRectangle(Profile.PairLogoRelativeRectangle pairLogoRelativeRectangle) throws ServiceException {
  Profile profile=this.get(pairLogoRelativeRectangle.getProfileId());
  List<Profile.PairLogoRelativeRectangle> pairLogoRelativeRectangles=profile.getPairLogoRelativeRectangles();
  for (  Profile.PairLogoRelativeRectangle auxPairLogoRelativeRectangle : pairLogoRelativeRectangles) {
    if (auxPairLogoRelativeRectangle.getId() == pairLogoRelativeRectangle.getId()) {
      auxPairLogoRelativeRectangle.setLogo(pairLogoRelativeRectangle.getLogo());
      auxPairLogoRelativeRectangle.setRelativeRectangle(pairLogoRelativeRectangle.getRelativeRectangle());
    }
  }
  profile.setPairLogoRelativeRectangles(pairLogoRelativeRectangles);
  editLogo(pairLogoRelativeRectangle.getLogo());
  return this.edit(profile);
}
Program: 78017
Project: 78017
Buggy source:
@Override public boolean erasePairLogoRelativeRectangle(Profile.PairLogoRelativeRectangle pairLogoRelativeRectangle) throws ServiceException {
  Profile profile=this.get(pairLogoRelativeRectangle.getProfileId());
  List<Profile.PairLogoRelativeRectangle> pairLogoRelativeRectangles=profile.getPairLogoRelativeRectangles();
  for (  Profile.PairLogoRelativeRectangle auxPairLogoRelativeRectangle : pairLogoRelativeRectangles) {
    if (auxPairLogoRelativeRectangle.getId() == pairLogoRelativeRectangle.getId()) {
      pairLogoRelativeRectangles.remove(auxPairLogoRelativeRectangle);
    }
  }
  profile.setPairLogoRelativeRectangles(pairLogoRelativeRectangles);
  return this.edit(profile);
}

Fixed version (ground truth):
@Override public boolean erasePairLogoRelativeRectangle(Profile.PairLogoRelativeRectangle pairLogoRelativeRectangle) throws ServiceException {
  Profile profile=this.get(pairLogoRelativeRectangle.getProfileId());
  List<Profile.PairLogoRelativeRectangle> pairLogoRelativeRectangles=profile.getPairLogoRelativeRectangles();
  for (  Profile.PairLogoRelativeRectangle auxPairLogoRelativeRectangle : pairLogoRelativeRectangles) {
    if (auxPairLogoRelativeRectangle.getId() == pairLogoRelativeRectangle.getId()) {
      pairLogoRelativeRectangles.remove(auxPairLogoRelativeRectangle);
    }
  }
  profile.setPairLogoRelativeRectangles(pairLogoRelativeRectangles);
  eraseLogo(pairLogoRelativeRectangle.getLogo());
  return this.edit(profile);
}
Program: 78019
Project: 78019
Buggy source:
private ImageView createImageView(final File imageFile){
  ImageView imageView;
  try {
    final Image image=new Image(new FileInputStream(imageFile),150,0,true,true);
    imageView=new ImageView(image);
    imageView.setFitWidth(150);
    imageView.setFitHeight(150);
    imageView.setOnMouseClicked(mouseEvent -> {
      if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {
        ImageView imgView=(ImageView)mouseEvent.getSource();
        if (mouseEvent.getClickCount() == 1) {
          imageClicked1(imgView);
        }
      }
    }
);
    return imageView;
  }
 catch (  FileNotFoundException ex) {
    LOGGER.debug("String_Node_Str" + ex.getMessage());
  }
  return null;
}

Fixed version (ground truth):
private ImageView createImageView(final File imageFile){
  ImageView imageView;
  try {
    final Image image=new Image(new FileInputStream(imageFile),150,150,true,true);
    imageView=new ImageView(image);
    imageView.setStyle("String_Node_Str");
    imageView.setOnMouseClicked(mouseEvent -> {
      if (mouseEvent.getButton().equals(MouseButton.PRIMARY)) {
        ImageView imgView=(ImageView)mouseEvent.getSource();
        if (mouseEvent.getClickCount() == 1) {
          imageClicked1(imgView);
        }
      }
    }
);
    return imageView;
  }
 catch (  FileNotFoundException ex) {
    LOGGER.debug("String_Node_Str" + ex.getMessage());
  }
  return null;
}
Program: 78020
Project: 78020
Buggy source:
private void imageClicked1(ImageView imageView){
  if (!imageView.equals(activeImageView)) {
    ((VBox)imageView.getParent()).getChildren().get(1).setVisible(true);
    if (activeImageView != null) {
      activeImageView.setFitHeight(150);
      activeImageView.setFitWidth(150);
      ((VBox)activeImageView.getParent()).getChildren().get(1).setVisible(false);
    }
    imageView.setFitWidth(180);
    imageView.setFitHeight(180);
    activeImageView=imageView;
  }
}

Fixed version (ground truth):
private void imageClicked1(ImageView imageView){
  if (!imageView.equals(activeImageView)) {
    ((VBox)imageView.getParent()).getChildren().get(1).setVisible(true);
    if (activeImageView != null) {
      activeImageView.setFitHeight(150);
      activeImageView.setFitWidth(150);
      activeImageView.setPreserveRatio(true);
      imageView.setStyle("String_Node_Str");
      ((VBox)activeImageView.getParent()).getChildren().get(1).setVisible(false);
    }
    imageView.setPreserveRatio(false);
    imageView.setFitWidth(180);
    imageView.setFitHeight(180);
    imageView.setStyle("String_Node_Str");
    activeImageView=imageView;
  }
}
Program: 78021
Project: 78021
Buggy source:
@Autowired public MiniaturFrameController(ImageService imageService,WindowManager windowManager) throws ServiceException {
  this.imageService=imageService;
  this.windowManager=windowManager;
}

Fixed version (ground truth):
@Autowired public MiniaturFrameController(ImageService imageService,ShootingService shootingService,WindowManager windowManager) throws ServiceException {
  this.imageService=imageService;
  this.shootingService=shootingService;
  this.windowManager=windowManager;
}
Program: 78022
Project: 78022
Buggy source:
private void refreshTableKameraPosition(List<Profile.PairCameraPosition> camposList){
  LOGGER.info("String_Node_Str");
  this.kamPosList.clear();
  for (  Profile.PairCameraPosition cp : camposList) {
    System.out.println("String_Node_Str" + cp.getCamera() + "String_Node_Str"+ cp.getPosition().getName());
  }
  this.kamPosList.addAll(camposList);
  tableKamPos.setItems(this.kamPosList);
}

Fixed version (ground truth):
private void refreshTableKameraPosition(List<Profile.PairCameraPosition> camposList){
  LOGGER.info("String_Node_Str");
  this.kamPosList.removeAll(kamPosList);
  for (  Profile.PairCameraPosition cp : camposList) {
    System.out.println("String_Node_Str" + cp.getCamera() + "String_Node_Str"+ cp.getPosition().getName());
  }
  this.kamPosList.addAll(camposList);
  tableKamPos.setItems(this.kamPosList);
}
Program: 78024
Project: 78024
Buggy source:
@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());
    }
  }
}

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);
      int selectedProfilID=((Profile)profilList.getSelectionModel().getSelectedItem()) == null ? 0 : ((Profile)profilList.getSelectionModel().getSelectedItem()).getId();
      kamPosList.clear();
      kamPosList.addAll(pservice.getAllPairCameraPositionOfProfile(selectedProfilID));
    }
 catch (    ServiceException e) {
      LOGGER.debug("String_Node_Str" + e.getMessage());
    }
  }
}
Program: 78025
Project: 78025
Buggy source:
@Override public void changed(ObservableValue ov,Profile t,Profile selectedProfil){
  try {
    refreshTablePosition(pservice.getAllPositionsOfProfile(selectedProfil));
    refreshTableKameraPosition(pservice.getAllPairCameraPositionOfProfile(selectedProfil.getId()));
    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.getAllLogosOfProfile(selectedProfil));
  }
 catch (  ServiceException e) {
    e.printStackTrace();
  }
}
Program: 78026
Project: 78026
Buggy source:
public CamPosComboBoxCell(ObservableList<Profile.PairCameraPosition> camPosList,ProfileService pservice,ObservableList<Position> posList){
  this.camPosList=camPosList;
  this.pservice=pservice;
  this.posList.setPromptText("String_Node_Str");
  this.posList.valueProperty().addListener(new ChangeListener<Profile.PairCameraPosition>(){
    @Override public void changed(    ObservableValue ov,    Profile.PairCameraPosition t,    Profile.PairCameraPosition selectedCamPos){
      Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
      currentCamPos.setPosition(selectedCamPos.getPosition());
      try {
        pservice.editPairCameraPosition(currentCamPos,currentCamPos.getCamera().getId(),currentCamPos.getPosition().getId(),false);
      }
 catch (      ServiceException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
);
}

Fixed version (ground truth):
public CamPosComboBoxCell(ObservableList<Profile.PairCameraPosition> camPosList,ProfileService pservice,ObservableList<Position> posList){
  this.camPosList=camPosList;
  this.posList=posList;
  this.pservice=pservice;
  this.comboBox.setItems(posList);
  this.comboBox.setPromptText("String_Node_Str");
  this.comboBox.valueProperty().addListener(new ChangeListener<Position>(){
    @Override public void changed(    ObservableValue ov,    Position t,    Position selectedPos){
      Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
      currentCamPos.setPosition(selectedPos);
      LOGGER.debug("String_Node_Str" + (selectedPos == null ? "String_Node_Str" : selectedPos.getName()));
      try {
        pservice.editPairCameraPosition(currentCamPos,currentCamPos.getCamera().getId(),currentCamPos.getPosition().getId(),false);
      }
 catch (      ServiceException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
catch (      NullPointerException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
);
}
Program: 78027
Project: 78027
Buggy source:
@Override protected void updateItem(Boolean item,boolean empty){
  super.updateItem(item,empty);
  if (empty) {
    setGraphic(null);
  }
 else {
    LOGGER.info("String_Node_Str" + getIndex());
    Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
    try {
      int index2select=-1;
      int i=0;
      for (      Position pos : pservice.getAllPositions()) {
        this.posList.getItems().add(pos.getName());
        if (currentCamPos.getPosition().getId() == pos.getId())         index2select=i;
        i++;
      }
      if (index2select != -1)       this.posList.getSelectionModel().select(index2select);
    }
 catch (    ServiceException e) {
      e.printStackTrace();
    }
    setGraphic(posList);
  }
}

Fixed version (ground truth):
@Override protected void updateItem(Boolean item,boolean empty){
  super.updateItem(item,empty);
  if (empty) {
    setGraphic(null);
  }
 else {
    System.out.println("String_Node_Str" + getIndex() + "String_Node_Str"+ this.comboBox.getItems().size());
    Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
    try {
      int index2select=-1;
      int i=0;
      for (      Position pos : pservice.getAllPositions()) {
        if (currentCamPos.getPosition() != null) {
          System.out.println(currentCamPos.getPosition().getId() + "String_Node_Str" + pos.getId());
          if (currentCamPos.getPosition().getId() == pos.getId())           index2select=i;
        }
        i++;
      }
      if (index2select != -1)       this.comboBox.getSelectionModel().select(index2select);
    }
 catch (    ServiceException e) {
      e.printStackTrace();
    }
    setGraphic(comboBox);
  }
}
Program: 78028
Project: 78028
Buggy source:
@Override public void changed(ObservableValue ov,Profile.PairCameraPosition t,Profile.PairCameraPosition selectedCamPos){
  Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
  currentCamPos.setPosition(selectedCamPos.getPosition());
  try {
    pservice.editPairCameraPosition(currentCamPos,currentCamPos.getCamera().getId(),currentCamPos.getPosition().getId(),false);
  }
 catch (  ServiceException e) {
    LOGGER.debug("String_Node_Str" + e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void changed(ObservableValue ov,Position t,Position selectedPos){
  Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
  currentCamPos.setPosition(selectedPos);
  LOGGER.debug("String_Node_Str" + (selectedPos == null ? "String_Node_Str" : selectedPos.getName()));
  try {
    pservice.editPairCameraPosition(currentCamPos,currentCamPos.getCamera().getId(),currentCamPos.getPosition().getId(),false);
  }
 catch (  ServiceException e) {
    LOGGER.debug("String_Node_Str" + e.getMessage());
  }
catch (  NullPointerException e) {
    LOGGER.debug("String_Node_Str" + e.getMessage());
  }
}
Program: 78029
Project: 78029
Buggy source:
public PositionButtonCell(ObservableList<Position> posList,ProfileService pservice,Stage primaryStage){
  this.posList=posList;
  this.pservice=pservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Position currentPosition=(Position)PositionButtonCell.this.getTableView().getItems().get(PositionButtonCell.this.getIndex());
        posList.remove(currentPosition);
        try {
          pservice.erasePosition(currentPosition);
        }
 catch (        ServiceException e) {
          e.printStackTrace();
        }
        setGraphic(null);
      }
    }
  }
);
}

Fixed version (ground truth):
public PositionButtonCell(ObservableList<Position> posList,ObservableList<Profile.PairCameraPosition> kamPosList,int selectedProfilID,ProfileService pservice,Stage primaryStage){
  this.posList=posList;
  this.pservice=pservice;
  cellButton.setOnAction(new EventHandler<ActionEvent>(){
    @Override public void handle(    ActionEvent t){
      Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
      alert.setTitle("String_Node_Str");
      alert.setHeaderText("String_Node_Str");
      alert.setContentText("String_Node_Str");
      alert.initOwner(primaryStage);
      ButtonType butJa=new ButtonType("String_Node_Str");
      ButtonType butNein=new ButtonType("String_Node_Str");
      alert.getButtonTypes().setAll(butJa,butNein);
      Optional<ButtonType> result=alert.showAndWait();
      if (result.get() == butJa) {
        Position currentPosition=(Position)PositionButtonCell.this.getTableView().getItems().get(PositionButtonCell.this.getIndex());
        posList.remove(currentPosition);
        try {
          pservice.erasePosition(currentPosition);
          kamPosList.clear();
          kamPosList.addAll(pservice.getAllPairCameraPositionOfProfile(selectedProfilID));
        }
 catch (        ServiceException e) {
          e.printStackTrace();
        }
        setGraphic(null);
      }
    }
  }
);
}
Program: 78030
Project: 78030
Buggy source:
@Override public void handle(ActionEvent t){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
  alert.setTitle("String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  alert.setContentText("String_Node_Str");
  alert.initOwner(primaryStage);
  ButtonType butJa=new ButtonType("String_Node_Str");
  ButtonType butNein=new ButtonType("String_Node_Str");
  alert.getButtonTypes().setAll(butJa,butNein);
  Optional<ButtonType> result=alert.showAndWait();
  if (result.get() == butJa) {
    Position currentPosition=(Position)PositionButtonCell.this.getTableView().getItems().get(PositionButtonCell.this.getIndex());
    posList.remove(currentPosition);
    try {
      pservice.erasePosition(currentPosition);
    }
 catch (    ServiceException e) {
      e.printStackTrace();
    }
    setGraphic(null);
  }
}

Fixed version (ground truth):
@Override public void handle(ActionEvent t){
  Alert alert=new Alert(Alert.AlertType.CONFIRMATION);
  alert.setTitle("String_Node_Str");
  alert.setHeaderText("String_Node_Str");
  alert.setContentText("String_Node_Str");
  alert.initOwner(primaryStage);
  ButtonType butJa=new ButtonType("String_Node_Str");
  ButtonType butNein=new ButtonType("String_Node_Str");
  alert.getButtonTypes().setAll(butJa,butNein);
  Optional<ButtonType> result=alert.showAndWait();
  if (result.get() == butJa) {
    Position currentPosition=(Position)PositionButtonCell.this.getTableView().getItems().get(PositionButtonCell.this.getIndex());
    posList.remove(currentPosition);
    try {
      pservice.erasePosition(currentPosition);
      kamPosList.clear();
      kamPosList.addAll(pservice.getAllPairCameraPositionOfProfile(selectedProfilID));
    }
 catch (    ServiceException e) {
      e.printStackTrace();
    }
    setGraphic(null);
  }
}
Program: 78031
Project: 78031
Buggy source:
private void refreshTableKameraPosition(List<Camera> camList,List<Position> posList){
  LOGGER.info("String_Node_Str");
  this.kamPosList.clear();
  this.kamPosList.add(new Profile.PairCameraPosition(new Camera(1,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),new Position("String_Node_Str"),true));
  this.kamPosList.add(new Profile.PairCameraPosition(new Camera(2,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str"),new Position("String_Node_Str"),true));
  tableKamPos.setItems(this.kamPosList);
}

Fixed version (ground truth):
private void refreshTableKameraPosition(List<Profile.PairCameraPosition> camposList){
  LOGGER.info("String_Node_Str");
  this.kamPosList.clear();
  for (  Profile.PairCameraPosition cp : camposList) {
    System.out.println("String_Node_Str" + cp.getCamera() + "String_Node_Str"+ cp.getPosition().getName());
  }
  this.kamPosList.addAll(camposList);
  tableKamPos.setItems(this.kamPosList);
}
Program: 78033
Project: 78033
Buggy source:
@Override public void changed(ObservableValue ov,Profile t,Profile selectedProfil){
  try {
    refreshTablePosition(pservice.getAllPositionsOfProfile(selectedProfil));
    refreshTableKameraPosition(pservice.getAllCamerasOfProfile(selectedProfil),pservice.getAllPositionsOfProfile(selectedProfil));
    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.getAllPositionsOfProfile(selectedProfil));
    refreshTableKameraPosition(pservice.getAllPairCameraPositionOfProfile(selectedProfil.getId()));
    refreshTableLogo(pservice.getAllLogosOfProfile(selectedProfil));
  }
 catch (  ServiceException e) {
    e.printStackTrace();
  }
}
Program: 78034
Project: 78034
Buggy source:
public CamPosComboBoxCell(ObservableList<Profile.PairCameraPosition> camPosList,ProfileService pservice,ObservableList<Position> posList){
  this.camPosList=camPosList;
  this.pservice=pservice;
  this.posList.setPromptText("String_Node_Str");
  this.posList.valueProperty().addListener(new ChangeListener<Profile.PairCameraPosition>(){
    @Override public void changed(    ObservableValue ov,    Profile.PairCameraPosition t,    Profile.PairCameraPosition selectedCamPos){
      Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
      currentCamPos.setPosition(selectedCamPos.getPosition());
    }
  }
);
}

Fixed version (ground truth):
public CamPosComboBoxCell(ObservableList<Profile.PairCameraPosition> camPosList,ProfileService pservice,ObservableList<Position> posList){
  this.camPosList=camPosList;
  this.pservice=pservice;
  this.posList.setPromptText("String_Node_Str");
  this.posList.valueProperty().addListener(new ChangeListener<Profile.PairCameraPosition>(){
    @Override public void changed(    ObservableValue ov,    Profile.PairCameraPosition t,    Profile.PairCameraPosition selectedCamPos){
      Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
      currentCamPos.setPosition(selectedCamPos.getPosition());
      try {
        pservice.editPairCameraPosition(currentCamPos,currentCamPos.getCamera().getId(),currentCamPos.getPosition().getId(),false);
      }
 catch (      ServiceException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
);
}
Program: 78035
Project: 78035
Buggy source:
@Override public void changed(ObservableValue ov,Profile.PairCameraPosition t,Profile.PairCameraPosition selectedCamPos){
  Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
  currentCamPos.setPosition(selectedCamPos.getPosition());
}

Fixed version (ground truth):
@Override public void changed(ObservableValue ov,Profile.PairCameraPosition t,Profile.PairCameraPosition selectedCamPos){
  Profile.PairCameraPosition currentCamPos=(Profile.PairCameraPosition)getTableView().getItems().get(getIndex());
  currentCamPos.setPosition(selectedCamPos.getPosition());
  try {
    pservice.editPairCameraPosition(currentCamPos,currentCamPos.getCamera().getId(),currentCamPos.getPosition().getId(),false);
  }
 catch (  ServiceException e) {
    LOGGER.debug("String_Node_Str" + e.getMessage());
  }
}
Program: 78036
Project: 78036
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());
      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());
      }
    }
  }
);
}

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());
      if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setMobilEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setGreenscreenEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setFilerEnabled(cellCheckbox.isSelected());
 else       if (checkboxTyp.equals("String_Node_Str"))       currentProfile.setPrintEnabled(cellCheckbox.isSelected());
      LOGGER.info("String_Node_Str" + checkboxTyp + "String_Node_Str"+ cellCheckbox.isSelected()+ "String_Node_Str"+ currentProfile.getName()+ "String_Node_Str"+ currentProfile.isFilerEnabled()+ "String_Node_Str"+ currentProfile.isGreenscreenEnabled()+ "String_Node_Str"+ currentProfile.isMobilEnabled()+ "String_Node_Str"+ currentProfile.isPrintEnabled());
      try {
        pservice.edit(currentProfile);
      }
 catch (      ServiceException e) {
        LOGGER.debug("String_Node_Str" + e.getMessage());
      }
    }
  }
);
}
Program: 78037
Project: 78037
Buggy source:
@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());
  }
}

Fixed version (ground truth):
@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.setGreenscreenEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setFilerEnabled(cellCheckbox.isSelected());
 else   if (checkboxTyp.equals("String_Node_Str"))   currentProfile.setPrintEnabled(cellCheckbox.isSelected());
  LOGGER.info("String_Node_Str" + checkboxTyp + "String_Node_Str"+ cellCheckbox.isSelected()+ "String_Node_Str"+ currentProfile.getName()+ "String_Node_Str"+ currentProfile.isFilerEnabled()+ "String_Node_Str"+ currentProfile.isGreenscreenEnabled()+ "String_Node_Str"+ currentProfile.isMobilEnabled()+ "String_Node_Str"+ currentProfile.isPrintEnabled());
  try {
    pservice.edit(currentProfile);
  }
 catch (  ServiceException e) {
    LOGGER.debug("String_Node_Str" + e.getMessage());
  }
}
Program: 78038
Project: 78038
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());
          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();
      }
    }
  }
);
}

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());
          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();
      }
    }
  }
);
}
Program: 78039
Project: 78039
Buggy source:
@Override public boolean equals(Object object){
  if (object instanceof Logo && ((Logo)object).getId() == this.getId() && ((Logo)object).getLabel() == this.getLabel() && ((Logo)object).getPath() == this.getPath() && ((Logo)object).isDeleted() == this.isDeleted()) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean equals(Object object){
  return object instanceof Logo && ((Logo)object).getId() == this.getId() && ((Logo)object).getLabel().equals(this.getLabel()) && ((Logo)object).getPath().equals(this.getPath()) && ((Logo)object).isDeleted() == this.isDeleted();
}
Program: 78040
Project: 78040
Buggy source:
@Override public boolean equals(Object object){
  return object instanceof Position && ((Position)object).getId() == this.getId() && ((Position)object).getName() == this.getName() && ((Position)object).getButtonImagePath() == this.getButtonImagePath() && ((Position)object).isDeleted() == this.isDeleted();
}

Fixed version (ground truth):
@Override public boolean equals(Object object){
  return object instanceof Position && ((Position)object).getId() == this.getId() && ((Position)object).getName().equals(this.getName()) && ((Position)object).getButtonImagePath().equals(this.getButtonImagePath()) && ((Position)object).isDeleted() == this.isDeleted();
}
Program: 78041
Project: 78041
Buggy source:
@Test public void test_delete_withNotExistingInputparameter_fail() throws Exception {
  Position returnValue=positionDAO.create(position1000000);
  assertTrue(position1000000.getId() == 1000000);
  assertTrue(position1000000.getName() == "String_Node_Str");
  assertTrue(position1000000.getButtonImagePath() == "String_Node_Str");
  assertTrue(!position1000000.isDeleted());
  assertTrue(positionDAO.delete(returnValue));
  assertFalse(positionDAO.delete(returnValue));
}

Fixed version (ground truth):
@Test public void test_delete_withNotExistingInputparameter_fail() throws Exception {
  Position returnValue=positionDAO.create(position1000000);
  assertTrue(position1000000.getId() == 1000000);
  assertTrue(position1000000.getName().equals("String_Node_Str"));
  assertTrue(position1000000.getButtonImagePath().equals("String_Node_Str"));
  assertTrue(!position1000000.isDeleted());
  assertTrue(positionDAO.delete(returnValue));
  assertFalse(positionDAO.delete(returnValue));
}
Program: 78042
Project: 78042
Buggy source:
@Test public void test_update_withValidInputParameter() throws Exception {
  assertTrue(positionA.getId() == Integer.MIN_VALUE);
  assertTrue(positionA.getName() == "String_Node_Str");
  assertTrue(positionA.getButtonImagePath() == "String_Node_Str");
  assertTrue(!positionA.isDeleted());
  Position returnValue=positionDAO.create(positionA);
  assertTrue(positionA.getId() >= 1);
  assertTrue(positionA.getName() == "String_Node_Str");
  assertTrue(positionA.getButtonImagePath() == "String_Node_Str");
  assertTrue(!positionA.isDeleted());
  returnValue.setName("String_Node_Str");
  returnValue.setButtonImagePath("String_Node_Str");
  boolean returnBoolean=positionDAO.update(returnValue);
  assertTrue(returnBoolean);
}

Fixed version (ground truth):
@Test public void test_update_withValidInputParameter() throws Exception {
  positionA=positionDAO.create(positionA);
  positionA.setName("String_Node_Str");
  positionA.setButtonImagePath("String_Node_Str");
  boolean returnBoolean=positionDAO.update(positionA);
  assertTrue(returnBoolean);
}
Program: 78043
Project: 78043
Buggy source:
@Test(expected=PersistenceException.class) public void testmock_create_withPersistenceTroubles_Fail() throws Exception {
  when(mockConnection.prepareStatement(anyString(),anyInt())).thenThrow(SQLException.class);
  mockPositionDAO.create(this.positionA);
}

Fixed version (ground truth):
@Test(expected=PersistenceException.class) public void testmock_create_withPersistenceTroubles_Fail() throws Exception {
  when(mockConnection.prepareStatement(anyString(),anyInt())).thenThrow(SQLException.class);
  mockPositionDAO.create(this.positionB);
}
Program: 78044
Project: 78044
Buggy source:
@Test public void test_create_withValidInputArguments() throws Exception {
  assertTrue(positionA.getId() == Integer.MIN_VALUE);
  assertTrue(positionA.getName() == "String_Node_Str");
  assertTrue(positionA.getButtonImagePath() == "String_Node_Str");
  assertTrue(!positionA.isDeleted());
  Position returnValue=positionDAO.create(positionA);
  assertTrue(returnValue.getId() >= 1);
  assertTrue(returnValue.getName() == "String_Node_Str");
  assertTrue(returnValue.getButtonImagePath() == "String_Node_Str");
  assertTrue(!returnValue.isDeleted());
}

Fixed version (ground truth):
@Test public void test_create_withValidInputArguments() throws Exception {
  assertTrue(positionB.getId() == Integer.MIN_VALUE);
  assertTrue(positionB.getName().equals("String_Node_Str"));
  assertTrue(positionB.getButtonImagePath().equals("String_Node_Str"));
  assertTrue(!positionA.isDeleted());
  Position returnValue=positionDAO.create(positionB);
  assertTrue(returnValue.getId() >= 1);
  assertTrue(returnValue.getName().equals("String_Node_Str"));
  assertTrue(returnValue.getButtonImagePath().equals("String_Node_Str"));
  assertTrue(!returnValue.isDeleted());
}
Program: 78045
Project: 78045
Buggy source:
@Test public void test_update_WithNotExisting() throws Exception {
  assertTrue(positionA.getId() == Integer.MIN_VALUE);
  assertTrue(positionA.getName() == "String_Node_Str");
  assertTrue(positionA.getButtonImagePath() == "String_Node_Str");
  assertTrue(!positionA.isDeleted());
  Position returnValue=positionDAO.create(positionA);
  assertTrue(positionA.getId() >= 1);
  assertTrue(positionA.getName() == "String_Node_Str");
  assertTrue(positionA.getButtonImagePath() == "String_Node_Str");
  assertTrue(!positionA.isDeleted());
  returnValue.setId(returnValue.getId() + 1);
  returnValue.setName("String_Node_Str");
  returnValue.setButtonImagePath("String_Node_Str");
  boolean returnBoolean=positionDAO.update(returnValue);
  assertTrue(!returnBoolean);
}

Fixed version (ground truth):
@Test public void test_update_WithNotExisting() throws Exception {
  positionA.setId(positionA.getId() + 1);
  positionA.setName("String_Node_Str");
  positionA.setButtonImagePath("String_Node_Str");
  boolean returnBoolean=positionDAO.update(positionA);
  assertTrue(!returnBoolean);
}
Program: 78046
Project: 78046
Buggy source:
@Test public void test_readAll_withEmptyReturnList() throws Exception {
  positionDAO.delete(positionDAO.read(1));
  positionDAO.delete(positionDAO.read(2));
  assertTrue(positionDAO.readAll().size() == 0);
}

Fixed version (ground truth):
@Test public void test_readAll_withEmptyReturnList() throws Exception {
  positionDAO.delete(positionDAO.read(1));
  positionDAO.delete(positionDAO.read(2));
  positionDAO.delete(positionA);
  assertTrue(positionDAO.readAll().size() == 0);
}
Program: 78047
Project: 78047
Buggy source:
@Test(expected=PersistenceException.class) public void test_create_withAlreadyExistingInputparameter_fail() throws Exception {
  assertTrue(position1000000.getId() == 1000000);
  assertTrue(position1000000.getName() == "String_Node_Str");
  assertTrue(position1000000.getButtonImagePath() == "String_Node_Str");
  assertTrue(!position1000000.isDeleted());
  Position returnValue=positionDAO.create(position1000000);
  assertTrue(position1000000.getId() == 1000000);
  assertTrue(position1000000.getName() == "String_Node_Str");
  assertTrue(position1000000.getButtonImagePath() == "String_Node_Str");
  assertTrue(!position1000000.isDeleted());
  Position returnValue2=positionDAO.create(position1000000);
}

Fixed version (ground truth):
@Test(expected=PersistenceException.class) public void test_create_withAlreadyExistingInputparameter_fail() throws Exception {
  assertTrue(position1000000.getId() == 1000000);
  assertTrue(position1000000.getName().equals("String_Node_Str"));
  assertTrue(position1000000.getButtonImagePath().equals("String_Node_Str"));
  assertTrue(!position1000000.isDeleted());
  Position returnValue=positionDAO.create(position1000000);
  assertTrue(position1000000.getId() == 1000000);
  assertTrue(position1000000.getName().equals("String_Node_Str"));
  assertTrue(position1000000.getButtonImagePath().equals("String_Node_Str"));
  assertTrue(!position1000000.isDeleted());
  Position returnValue2=positionDAO.create(position1000000);
}
Program: 78048
Project: 78048
Buggy source:
@Test public void test_delete_withValidInputArguments() throws Exception {
  Position returnValue1=positionDAO.create(positionA);
  Position returnValue2=positionDAO.create(positionB);
  Position returnValue3=positionDAO.create(positionC);
  assertTrue(positionDAO.delete(returnValue1));
  assertTrue(positionDAO.read(returnValue1.getId()) == null);
  assertTrue(positionDAO.delete(returnValue2));
  assertTrue(positionDAO.read(returnValue2.getId()) == null);
  assertTrue(positionDAO.delete(returnValue3));
  assertTrue(positionDAO.read(returnValue3.getId()) == null);
}

Fixed version (ground truth):
@Test public void test_delete_withValidInputArguments() throws Exception {
  positionA=positionDAO.create(positionA);
  Position returnValue2=positionDAO.create(positionB);
  Position returnValue3=positionDAO.create(positionC);
  assertTrue(positionDAO.delete(positionA));
  assertTrue(positionDAO.read(positionA.getId()) == null);
  assertTrue(positionDAO.delete(returnValue2));
  assertTrue(positionDAO.read(returnValue2.getId()) == null);
  assertTrue(positionDAO.delete(returnValue3));
  assertTrue(positionDAO.read(returnValue3.getId()) == null);
}
Program: 78049
Project: 78049
Buggy source:
@Test public void test_read_NotExisting() throws Exception {
  Position returnValue1=positionDAO.create(positionA);
  assertTrue(positionDAO.read(returnValue1.getId() + 1) == null);
}

Fixed version (ground truth):
@Test public void test_read_NotExisting() throws Exception {
  assertTrue(positionDAO.read(positionA.getId() + 1) == null);
}
Program: 78050
Project: 78050
Buggy source:
/** 
 * List<Position> readAll() throws PersistenceException;
 */
@Test public void test_readAll_withNonEmptyReturnList() throws Exception {
  Position returnValue1=positionDAO.create(positionA);
  Position returnValue2=positionDAO.create(positionB);
  Position returnValue3=positionDAO.create(positionC);
  List<Position> returnList=positionDAO.readAll();
  assertTrue(returnList.contains(returnValue1) && returnList.contains(returnValue2) && returnList.contains(returnValue3));
}

Fixed version (ground truth):
/** 
 * List<Position> readAll() throws PersistenceException;
 */
@Test public void test_readAll_withNonEmptyReturnList() throws Exception {
  positionA=positionDAO.create(positionA);
  Position returnValue2=positionDAO.create(positionB);
  Position returnValue3=positionDAO.create(positionC);
  List<Position> returnList=positionDAO.readAll();
  assertTrue(returnList.contains(positionA) && returnList.contains(returnValue2) && returnList.contains(returnValue3));
}
Program: 78051
Project: 78051
Buggy source:
/** 
 * TESTING method: Position read(int id) throws PersistenceException;
 */
@Test public void test_read_withValidInt() throws Exception {
  Position returnValue1=positionDAO.create(positionA);
  Position returnValue2=positionDAO.create(positionB);
  Position returnValue3=positionDAO.create(positionC);
  assertTrue(positionDAO.read(returnValue1.getId()).equals(returnValue1));
  assertTrue(positionDAO.read(returnValue2.getId()).equals(returnValue2));
  assertTrue(positionDAO.read(returnValue3.getId()).equals(returnValue3));
}

Fixed version (ground truth):
/** 
 * TESTING method: Position read(int id) throws PersistenceException;
 */
@Test public void test_read_withValidInt() throws Exception {
  positionA=positionDAO.create(positionA);
  Position returnValue2=positionDAO.create(positionB);
  Position returnValue3=positionDAO.create(positionC);
  assertTrue(positionDAO.read(positionA.getId()).equals(positionA));
  assertTrue(positionDAO.read(returnValue2.getId()).equals(returnValue2));
  assertTrue(positionDAO.read(returnValue3.getId()).equals(returnValue3));
}
Program: 78052
Project: 78052
Buggy source:
@Test public void testmock_create_withValidInputArguments() throws Exception {
  when(mockResultSet.next()).thenReturn(Boolean.TRUE);
  when(mockResultSet.getInt(1)).thenReturn(id);
  Position returnvalue=mockPositionDAO.create(this.positionA);
  verify(mockPreparedStatement).executeUpdate();
  assertTrue(returnvalue.getId() == 1);
  assertTrue(returnvalue.getName() == "String_Node_Str");
  assertTrue(returnvalue.getButtonImagePath() == "String_Node_Str");
}

Fixed version (ground truth):
@Test public void testmock_create_withValidInputArguments() throws Exception {
  when(mockResultSet.next()).thenReturn(Boolean.TRUE);
  when(mockResultSet.getInt(1)).thenReturn(id);
  Position returnvalue=mockPositionDAO.create(this.positionB);
  verify(mockPreparedStatement).executeUpdate();
  assertTrue(returnvalue.getId() == 1);
  assertTrue(returnvalue.getName().equals("String_Node_Str"));
  assertTrue(returnvalue.getButtonImagePath().equals("String_Node_Str"));
}
Program: 78053
Project: 78053
Buggy source:
private void refreshTableKameraPosition(List<Profile.PairCameraPosition> camposList){
  LOGGER.info("String_Node_Str");
  this.kamPosList.removeAll(kamPosList);
  for (  Profile.PairCameraPosition cp : camposList) {
    System.out.println("String_Node_Str" + cp.getCamera() + "String_Node_Str"+ cp.getPosition().getName());
  }
  this.kamPosList.addAll(camposList);
  tableKamPos.setItems(this.kamPosList);
}

Fixed version (ground truth):
private void refreshTableKameraPosition(List<Profile.PairCameraPosition> camposList){
  LOGGER.info("String_Node_Str");
  this.kamPosList.removeAll(kamPosList);
  this.kamPosList.addAll(camposList);
  tableKamPos.setItems(this.kamPosList);
}