nus-yam/ex-repair huggingface dataset:
Program: 40562
Project: 40562
Buggy source:
@Override public void requestUserLocation(Context context){
  view.setStatusText(R.string.network_status_location_search);
  if (isEmulator()) {
    Location location=new Location("String_Node_Str");
    location.setLongitude(56.476181);
    location.setLatitude(84.950168);
    getNearestNode(location);
    view.onLocationReady();
  }
 else {
    locationManager.getLocation(context,this);
  }
}

Fixed version (ground truth):
@Override public void requestUserLocation(Context context){
  view.setStatusText(R.string.network_status_location_search);
  if (isEmulator()) {
    Location location=new Location("String_Node_Str");
    location.setLongitude(56.476181);
    location.setLatitude(84.950168);
    getNearestNode(location);
  }
 else {
    locationManager.getLocation(context,this);
  }
}
Program: 40563
Project: 40563
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main_menu);
  ButterKnife.bind(this);
  refreshLayout.setOnRefreshListener(this);
  attachPresenter();
  initViews();
  attachFragment();
  setSearchViewDebounce();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main_menu);
  ButterKnife.bind(this);
  attachPresenter();
  initViews();
  attachFragment();
  setSearchViewDebounce();
}
Program: 40564
Project: 40564
Buggy source:
private String unixTimeToDays(long unixTimeSec){
  long days=0;
  long hours=0;
  long min=0;
  String daysStr="String_Node_Str";
  String hoursStr="String_Node_Str";
  String minStr="String_Node_Str";
  if (unixTimeSec > 86400000) {
    days=unixTimeSec / 86400000;
    days=(int)days;
    daysStr=((days <= 9) ? "String_Node_Str" + String.valueOf(days) : String.valueOf(days));
  }
  if (unixTimeSec > 3600000) {
    hours=(unixTimeSec % 86400000) / 3600000;
    hours=(int)hours;
    hoursStr=((hours <= 9) ? "String_Node_Str" + String.valueOf(hours) : String.valueOf(hours));
  }
  if (unixTimeSec > 60000) {
    min=((unixTimeSec % 86400000) % 3600000) / 60000;
    min=(int)min;
    minStr=((min <= 9) ? "String_Node_Str" + String.valueOf(min) : String.valueOf(min));
  }
  long sec=(((unixTimeSec % 86400000) % 3600000) % 60000) / 1000;
  sec=(int)sec;
  String secStr=((sec <= 9) ? "String_Node_Str" + String.valueOf(sec) : String.valueOf(sec));
  return daysStr + "String_Node_Str" + hoursStr+ "String_Node_Str"+ minStr+ "String_Node_Str"+ secStr;
}

Fixed version (ground truth):
private String unixTimeToDays(long unixTimeSec){
  long days=0;
  long hours=0;
  long min=0;
  long sec=0;
  String daysStr="String_Node_Str";
  String hoursStr="String_Node_Str";
  String minStr="String_Node_Str";
  String secStr="String_Node_Str";
  if (unixTimeSec > 86400000) {
    days=unixTimeSec / 86400000;
    days=(int)days;
    daysStr=((days <= 9) ? "String_Node_Str" + String.valueOf(days) : String.valueOf(days));
  }
  if (unixTimeSec % 86400000 > 3600000) {
    hours=(unixTimeSec % 86400000) / 3600000;
    hours=(int)hours;
    hoursStr=((hours <= 9) ? "String_Node_Str" + String.valueOf(hours) : String.valueOf(hours));
  }
  if (((unixTimeSec % 86400000) % 3600000) > 60000) {
    min=((unixTimeSec % 86400000) % 3600000) / 60000;
    min=(int)min;
    minStr=((min <= 9) ? "String_Node_Str" + String.valueOf(min) : String.valueOf(min));
  }
  if ((((unixTimeSec % 86400000) % 3600000) % 60000) > 1000) {
    sec=(((unixTimeSec % 86400000) % 3600000) % 60000) / 1000;
    sec=(int)sec;
    secStr=((sec <= 9) ? "String_Node_Str" + String.valueOf(sec) : String.valueOf(sec));
  }
  return daysStr + "String_Node_Str" + hoursStr+ "String_Node_Str"+ minStr+ "String_Node_Str"+ secStr;
}
Program: 40565
Project: 40565
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main_menu);
  ButterKnife.bind(this);
  attachPresenter();
  initViews();
  attachFragment();
  setSearchViewDebounce();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main_menu);
  ButterKnife.bind(this);
  refreshLayout.setOnRefreshListener(this);
  attachPresenter();
  initViews();
  attachFragment();
  setSearchViewDebounce();
}
Program: 40566
Project: 40566
Buggy source:
private static void setupWithCustomUrl(String url){
  Log.d(TAG,"String_Node_Str" + BASE_URL);
  HttpLoggingInterceptor interceptor=new HttpLoggingInterceptor();
  interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
  OkHttpClient client=new OkHttpClient.Builder().addInterceptor(interceptor).hostnameVerifier((hostname,session) -> true).sslSocketFactory(getSllSocketFactory()).build();
  Gson gson=new GsonBuilder().registerTypeAdapterFactory(new ResultAdapterFactory()).create();
  Retrofit retrofit=new Retrofit.Builder().baseUrl(url).addConverterFactory(GsonConverterFactory.create(gson)).addCallAdapterFactory(RxJavaCallAdapterFactory.create()).client(client).build();
  customApi=retrofit.create(ServerApi.class);
}

Fixed version (ground truth):
private static void setupWithCustomUrl(String url){
  Log.d(TAG,"String_Node_Str" + BASE_URL);
  HttpLoggingInterceptor interceptor=new HttpLoggingInterceptor();
  interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
  OkHttpClient client=new OkHttpClient.Builder().addInterceptor(interceptor).hostnameVerifier((hostname,session) -> true).sslSocketFactory(getSllSocketFactory()).build();
  Gson gson=new GsonBuilder().registerTypeAdapterFactory(new ResultAdapterFactory()).setLenient().create();
  Retrofit retrofit=new Retrofit.Builder().baseUrl(url).addConverterFactory(GsonConverterFactory.create(gson)).addCallAdapterFactory(RxJavaCallAdapterFactory.create()).client(client).build();
  customApi=retrofit.create(ServerApi.class);
}
Program: 40567
Project: 40567
Buggy source:
private static void setupWithRest(){
  Log.d(TAG,"String_Node_Str" + BASE_URL);
  HttpLoggingInterceptor interceptor=new HttpLoggingInterceptor();
  interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
  OkHttpClient client=new OkHttpClient.Builder().addInterceptor(interceptor).hostnameVerifier((hostname,session) -> true).sslSocketFactory(getSllSocketFactory()).build();
  Gson gson=new GsonBuilder().registerTypeAdapterFactory(new ResultAdapterFactory()).create();
  Retrofit retrofit=new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create(gson)).addCallAdapterFactory(RxJavaCallAdapterFactory.create()).client(client).build();
  restApi=retrofit.create(ServerApi.class);
}

Fixed version (ground truth):
private static void setupWithRest(){
  Log.d(TAG,"String_Node_Str" + BASE_URL);
  HttpLoggingInterceptor interceptor=new HttpLoggingInterceptor();
  interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
  OkHttpClient client=new OkHttpClient.Builder().addInterceptor(interceptor).hostnameVerifier((hostname,session) -> true).sslSocketFactory(getSllSocketFactory()).build();
  Gson gson=new GsonBuilder().registerTypeAdapterFactory(new ResultAdapterFactory()).setLenient().create();
  Retrofit retrofit=new Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(GsonConverterFactory.create(gson)).addCallAdapterFactory(RxJavaCallAdapterFactory.create()).client(client).build();
  restApi=retrofit.create(ServerApi.class);
}
Program: 40568
Project: 40568
Buggy source:
@Override public T read(JsonReader in) throws IOException {
  JsonElement jsonElement=elementAdapter.read(in);
  if (jsonElement.isJsonObject()) {
    JsonObject jsonObject=jsonElement.getAsJsonObject();
    if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() == 200) {
      jsonElement=jsonObject.get("String_Node_Str");
    }
 else     if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() != 200) {
      throw new IOException(jsonObject.get("String_Node_Str").getAsString());
    }
  }
  return delegate.fromJsonTree(jsonElement);
}

Fixed version (ground truth):
@Override public T read(JsonReader in) throws IOException {
  JsonElement jsonElement=elementAdapter.read(in);
  if (jsonElement.isJsonObject()) {
    JsonObject jsonObject=jsonElement.getAsJsonObject();
    if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() == 200) {
      jsonElement=jsonObject.get("String_Node_Str");
    }
 else     if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() != 200) {
      throw new IOException(jsonObject.get("String_Node_Str").getAsString());
    }
  }
  try {
    if (jsonElement.getAsString().isEmpty()) {
      return (T)new IcoTeam();
    }
  }
 catch (  Exception e) {
  }
  return delegate.fromJsonTree(jsonElement);
}
Program: 40569
Project: 40569
Buggy source:
@Override public <T>TypeAdapter<T> create(Gson gson,TypeToken<T> type){
  final TypeAdapter<T> delegate=gson.getDelegateAdapter(this,type);
  final TypeAdapter<JsonElement> elementAdapter=gson.getAdapter(JsonElement.class);
  return new TypeAdapter<T>(){
    @Override public void write(    JsonWriter out,    T value) throws IOException {
      delegate.write(out,value);
    }
    @Override public T read(    JsonReader in) throws IOException {
      JsonElement jsonElement=elementAdapter.read(in);
      if (jsonElement.isJsonObject()) {
        JsonObject jsonObject=jsonElement.getAsJsonObject();
        if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() == 200) {
          jsonElement=jsonObject.get("String_Node_Str");
        }
 else         if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() != 200) {
          throw new IOException(jsonObject.get("String_Node_Str").getAsString());
        }
      }
      return delegate.fromJsonTree(jsonElement);
    }
  }
.nullSafe();
}

Fixed version (ground truth):
@Override public <T>TypeAdapter<T> create(Gson gson,TypeToken<T> type){
  final TypeAdapter<T> delegate=gson.getDelegateAdapter(this,type);
  final TypeAdapter<JsonElement> elementAdapter=gson.getAdapter(JsonElement.class);
  return new TypeAdapter<T>(){
    @Override public void write(    JsonWriter out,    T value) throws IOException {
      delegate.write(out,value);
    }
    @Override public T read(    JsonReader in) throws IOException {
      JsonElement jsonElement=elementAdapter.read(in);
      if (jsonElement.isJsonObject()) {
        JsonObject jsonObject=jsonElement.getAsJsonObject();
        if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() == 200) {
          jsonElement=jsonObject.get("String_Node_Str");
        }
 else         if (jsonObject.has("String_Node_Str") && jsonObject.get("String_Node_Str").getAsInt() != 200) {
          throw new IOException(jsonObject.get("String_Node_Str").getAsString());
        }
      }
      try {
        if (jsonElement.getAsString().isEmpty()) {
          return (T)new IcoTeam();
        }
      }
 catch (      Exception e) {
      }
      return delegate.fromJsonTree(jsonElement);
    }
  }
.nullSafe();
}
Program: 40570
Project: 40570
Buggy source:
public ArrayList<String> getIcoScreenShotsUrl(){
  ArrayList<String> images=new ArrayList<>();
  for (  String picture : icoInfo.pictures) {
    images.add(RestApi.ICON_URL + app.hashTagICO + "String_Node_Str"+ app.hashICO+ "String_Node_Str"+ picture);
  }
  return images;
}

Fixed version (ground truth):
public ArrayList<String> getIcoScreenShotsUrl(){
  ArrayList<String> images=new ArrayList<>();
  for (  String picture : infoICO.pictures) {
    images.add(RestApi.ICON_URL + app.hashTagICO + "String_Node_Str"+ app.hashICO+ "String_Node_Str"+ picture);
  }
  return images;
}
Program: 40571
Project: 40571
Buggy source:
public String getIcoIcon(){
  return RestApi.ICON_URL + app.hashTagICO + "String_Node_Str"+ app.hashICO+ "String_Node_Str"+ icoInfo.iconUrl;
}

Fixed version (ground truth):
public String getIcoIcon(){
  return RestApi.ICON_URL + app.hashTagICO + "String_Node_Str"+ app.hashICO+ "String_Node_Str"+ infoICO.iconUrl;
}
Program: 40572
Project: 40572
Buggy source:
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeParcelable(this.app,flags);
  dest.writeString(this.description);
  dest.writeParcelable(this.pictures,flags);
  dest.writeParcelable(this.icoInfo,flags);
}

Fixed version (ground truth):
@Override public void writeToParcel(Parcel dest,int flags){
  dest.writeParcelable(this.app,flags);
  dest.writeString(this.description);
  dest.writeParcelable(this.pictures,flags);
  dest.writeParcelable(this.infoICO,flags);
}
Program: 40573
Project: 40573
Buggy source:
protected AppInfo(Parcel in){
  this.app=in.readParcelable(App.class.getClassLoader());
  this.description=in.readString();
  this.pictures=in.readParcelable(PicturesResponse.class.getClassLoader());
  this.icoInfo=in.readParcelable(IcoInfo.class.getClassLoader());
}

Fixed version (ground truth):
protected AppInfo(Parcel in){
  this.app=in.readParcelable(App.class.getClassLoader());
  this.description=in.readString();
  this.pictures=in.readParcelable(PicturesResponse.class.getClassLoader());
  this.infoICO=in.readParcelable(IcoInfo.class.getClassLoader());
}
Program: 40575
Project: 40575
Buggy source:
@OnClick(R.id.cancel_transfer_button) void cancelButtonClicked(){
  setContinueButtonVisibility(View.VISIBLE);
  back();
}

Fixed version (ground truth):
@OnClick(R.id.cancel_transfer_button) void cancelButtonClicked(){
  back();
}
Program: 40576
Project: 40576
Buggy source:
private void back(){
  if (transferViewPager.getCurrentItem() == 1) {
    goToTransferInfo();
  }
 else {
    this.finish();
  }
}

Fixed version (ground truth):
private void back(){
  if (transferViewPager.getCurrentItem() == 1) {
    TransferConfirmFragment transferConfirmFragment=(TransferConfirmFragment)transferAdapter.getItem(1);
    transferConfirmFragment.disposedFingerprint();
    setContinueButtonVisibility(View.VISIBLE);
    goToTransferInfo();
  }
 else {
    this.finish();
  }
}
Program: 40577
Project: 40577
Buggy source:
public void showError(){
  senderPasswordEditText.setError(getResources().getString(R.string.wrong_password));
  senderPasswordEditText.requestFocus();
}

Fixed version (ground truth):
public void showError(){
  passwordTextInputLayout.setPasswordVisibilityToggleTintList(AppCompatResources.getColorStateList(getContext(),R.color.red_error_color));
  passwordTextInputLayout.setError(getResources().getString(R.string.wrong_password));
}
Program: 40578
Project: 40578
Buggy source:
public void initFingerprint(){
  fingerprintLayout.setVisibility(View.VISIBLE);
  passwordLayout.setVisibility(View.GONE);
  enableFingerprint();
}

Fixed version (ground truth):
public void initFingerprint(){
  fingerprintLayout.setVisibility(View.VISIBLE);
  usePasswordButton.setVisibility(View.VISIBLE);
  passwordLayout.setVisibility(View.GONE);
  enableFingerprint();
}
Program: 40579
Project: 40579
Buggy source:
public void initPassword(){
  fingerprintLayout.setVisibility(View.GONE);
  passwordLayout.setVisibility(View.VISIBLE);
  fingerprintDisposable.dispose();
  ((TransferActivity)getActivity()).setContinueButtonVisibility(View.VISIBLE);
}

Fixed version (ground truth):
public void initPassword(){
  fingerprintLayout.setVisibility(View.GONE);
  passwordLayout.setVisibility(View.VISIBLE);
  usePasswordButton.setVisibility(View.GONE);
  disposedFingerprint();
  ((TransferActivity)getActivity()).setContinueButtonVisibility(View.VISIBLE);
}
Program: 40580
Project: 40580
Buggy source:
private void ethSelect(){
  ethTextView.setBackgroundResource(R.drawable.transfer_selected_button);
  ethTextView.setTextColor(Color.parseColor("String_Node_Str"));
  weiTextView.setBackgroundResource(R.drawable.transfer_unselected_button);
  weiTextView.setTextColor(Color.parseColor("String_Node_Str"));
  amountInfoTextView.setText(amountEditText.getText().toString() + "String_Node_Str" + "String_Node_Str");
  transferViewModel.transferAmount.setValue(amountEditText.getText().toString());
  isEth=true;
  transferViewModel.isEth.setValue(isEth);
  transferViewModel.dimension.setValue(ETH);
}

Fixed version (ground truth):
private void ethSelect(){
  ethTextView.setBackgroundResource(R.drawable.transfer_selected_button);
  ethTextView.setTextColor(getResources().getColor(R.color.white));
  weiTextView.setBackgroundResource(R.drawable.transfer_unselected_button);
  weiTextView.setTextColor(getResources().getColor(R.color.green_color));
  amountTextView.setText(amountEditText.getText());
  dimensionTextView.setText(ETH);
  transferViewModel.transferAmount.setValue(amountEditText.getText().toString());
  isEth=true;
  transferViewModel.isEth.setValue(isEth);
  transferViewModel.dimension.setValue(ETH);
}
Program: 40581
Project: 40581
Buggy source:
private void weiSelect(){
  weiTextView.setBackgroundResource(R.drawable.transfer_selected_button);
  weiTextView.setTextColor(Color.parseColor("String_Node_Str"));
  ethTextView.setBackgroundResource(R.drawable.transfer_unselected_button);
  ethTextView.setTextColor(Color.parseColor("String_Node_Str"));
  amountInfoTextView.setText(amountEditText.getText().toString() + "String_Node_Str" + "String_Node_Str");
  transferViewModel.transferAmount.setValue(amountEditText.getText().toString());
  isEth=false;
  transferViewModel.isEth.setValue(isEth);
  transferViewModel.dimension.setValue(WEI);
}

Fixed version (ground truth):
private void weiSelect(){
  weiTextView.setBackgroundResource(R.drawable.transfer_selected_button);
  weiTextView.setTextColor(getResources().getColor(R.color.white));
  ethTextView.setBackgroundResource(R.drawable.transfer_unselected_button);
  ethTextView.setTextColor(getResources().getColor(R.color.green_color));
  amountTextView.setText(amountEditText.getText());
  dimensionTextView.setText(WEI);
  transferViewModel.transferAmount.setValue(amountEditText.getText().toString());
  isEth=false;
  transferViewModel.isEth.setValue(isEth);
  transferViewModel.dimension.setValue(WEI);
}
Program: 40582
Project: 40582
Buggy source:
@OnTextChanged(value=R.id.amount_editText,callback=OnTextChanged.Callback.AFTER_TEXT_CHANGED) void onAmountChanged(Editable editable){
  String dimension;
  if (isEth)   dimension="String_Node_Str";
 else   (dimension)="String_Node_Str";
  amountInfoTextView.setText(editable.toString() + "String_Node_Str" + dimension);
  transferViewModel.transferAmount.setValue(editable.toString());
}

Fixed version (ground truth):
@OnTextChanged(value=R.id.amount_editText,callback=OnTextChanged.Callback.AFTER_TEXT_CHANGED) void onAmountChanged(Editable editable){
  amountTextView.setText(editable);
  transferViewModel.transferAmount.setValue(editable.toString());
}
Program: 40584
Project: 40584
Buggy source:
@Before public void setUp() throws Exception {
  loginPage=new LoginPage();
  activityStreamPage=loginPage.login(adminUsername,adminPassword);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  loginPage=new LoginPage();
  activityStreamPage=loginPage.login(adminUsername,adminPassword);
  activityStreamPage.getActivityStreamPage();
}
Program: 40585
Project: 40585
Buggy source:
@Before public void setUp() throws Exception {
  loginPage=new LoginPage();
  activityStreamPage=loginPage.login(portalAdminUsername,portalAdminPassword);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  loginPage=new LoginPage();
  activityStreamPage=loginPage.login(portalAdminUsername,portalAdminPassword);
  activityStreamPage.getActivityStreamPage();
}
Program: 40586
Project: 40586
Buggy source:
@Before public void setUp() throws Exception {
  loginPage=new LoginPage();
  activityStreamPage=loginPage.login(username,password);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  loginPage=new LoginPage();
  activityStreamPage=loginPage.login(username,password);
  activityStreamPage.getActivityStreamPage();
}
Program: 40587
Project: 40587
Buggy source:
@Override public void delete(E entity){
  em.remove(entity);
}

Fixed version (ground truth):
@Override public void delete(E entity){
  if (!em.contains(entity)) {
    entity=em.merge(entity);
  }
  em.remove(entity);
}
Program: 40588
Project: 40588
Buggy source:
public void deleteFile(File file){
  LOG.info("String_Node_Str" + file);
  communityService.deleteFile(file);
}

Fixed version (ground truth):
public void deleteFile(File file){
  LOG.info("String_Node_Str" + file);
  try {
    communityService.deleteFile(file);
    try {
      context.redirect("String_Node_Str");
    }
 catch (    IOException e) {
      LOG.error("String_Node_Str");
    }
  }
 catch (  ServiceException e) {
    errorMsg="String_Node_Str";
    LOG.error(errorMsg);
    setErrorMsg(errorMsg);
  }
}
Program: 40589
Project: 40589
Buggy source:
public void uploadFile(FileUploadEvent event){
  UploadedFile uploadedFile=event.getFile();
  try {
    communityService.uploadFile(user,uploadedFile);
  }
 catch (  ServiceException e) {
    errorMsg="String_Node_Str";
    LOG.error(errorMsg);
    setErrorMsg(errorMsg);
  }
}

Fixed version (ground truth):
public void uploadFile(FileUploadEvent event){
  UploadedFile uploadedFile=event.getFile();
  try {
    communityService.uploadFile(user,uploadedFile);
    try {
      context.redirect("String_Node_Str");
    }
 catch (    IOException e) {
      LOG.error("String_Node_Str");
    }
  }
 catch (  ServiceException e) {
    errorMsg="String_Node_Str";
    LOG.error(errorMsg);
    setErrorMsg(errorMsg);
  }
}
Program: 40590
Project: 40590
Buggy source:
@Override public User login(String username,String password){
  LOG.debug("String_Node_Str" + username);
  ArgumentChecker.assertNotNullAndEmpty(username,"String_Node_Str");
  ArgumentChecker.assertNotNullAndEmpty(password,"String_Node_Str");
  User user=loadUserByUsername(username);
  ArgumentChecker.assertNotNull(user,"String_Node_Str");
  return pwEncoder.checkPassword(password,user.getPassword()) ? user : null;
}

Fixed version (ground truth):
@Override public User login(String username,String password){
  LOG.debug("String_Node_Str" + username);
  ArgumentChecker.assertNotNullAndEmpty(username,"String_Node_Str");
  ArgumentChecker.assertNotNullAndEmpty(password,"String_Node_Str");
  User user=loadUserByUsername(username);
  return pwEncoder.checkPassword(password,user.getPassword()) ? user : null;
}
Program: 40591
Project: 40591
Buggy source:
private User loadUserByUsername(String username){
  ArgumentChecker.assertNotNullAndEmpty(username,"String_Node_Str");
  try {
    return userDAO.findByUsername(username);
  }
 catch (  IllegalArgumentException e) {
    String msg="String_Node_Str";
    LOG.error(msg,e);
    throw new ServiceException(msg);
  }
catch (  Exception e) {
    String msg="String_Node_Str";
    LOG.error(msg,e);
    throw new ServiceException(msg);
  }
}

Fixed version (ground truth):
private User loadUserByUsername(String username){
  ArgumentChecker.assertNotNullAndEmpty(username,"String_Node_Str");
  try {
    return userDAO.findByUsername(username);
  }
 catch (  NoResultException e) {
    String msg="String_Node_Str" + username;
    LOG.warn(msg,e);
    throw new ServiceException(msg);
  }
catch (  IllegalArgumentException e) {
    String msg="String_Node_Str";
    LOG.error(msg,e);
    throw new ServiceException(msg);
  }
catch (  Exception e) {
    String msg="String_Node_Str";
    LOG.error(msg,e);
    throw new ServiceException(msg);
  }
}
Program: 40592
Project: 40592
Buggy source:
public void doLogin(){
  try {
    user=service.login(getUsername(),getPassword());
  }
 catch (  ServiceException e) {
    String erroMsg="String_Node_Str";
    LOG.error(erroMsg,e);
    setErrorMsg(erroMsg);
  }
  if (user == null) {
    setErrorMsg("String_Node_Str");
  }
 else {
    context=FacesContext.getCurrentInstance().getExternalContext();
    context.getSessionMap().put("String_Node_Str",user.getId());
    RedirectHelper.redirect("String_Node_Str");
  }
}

Fixed version (ground truth):
public void doLogin(){
  try {
    user=service.login(getUsername(),getPassword());
    context=FacesContext.getCurrentInstance().getExternalContext();
    context.getSessionMap().put("String_Node_Str",user.getId());
    RedirectHelper.redirect("String_Node_Str");
  }
 catch (  ServiceException e) {
    String erroMsg="String_Node_Str";
    LOG.error(erroMsg,e);
    setErrorMsg(erroMsg);
  }
catch (  Exception e) {
    String msg="String_Node_Str";
    LOG.error(msg,e);
    setErrorMsg(msg);
  }
}
Program: 40593
Project: 40593
Buggy source:
private void handleButton(Map<String,Object> session){
  if (id == null) {
    id=String.valueOf(flash.get("String_Node_Str"));
  }
  if (id != null) {
    flash.put("String_Node_Str",id);
    if (id.equals(String.valueOf(session.get("String_Node_Str")))) {
      setOwnProfile(true);
    }
 else {
      setOwnProfile(false);
    }
  }
  hideAddRemove=context.getRequestParameterMap().get("String_Node_Str");
  fromHeader=context.getRequestParameterMap().get("String_Node_Str");
  flash.put("String_Node_Str",id);
  flash.put("String_Node_Str",hideAddRemove);
  flash.put("String_Node_Str",fromHeader);
  hideAddRemoveCheck=String.valueOf(context.getFlash().get("String_Node_Str"));
  if ("String_Node_Str".equals(hideAddRemoveCheck)) {
    setOwnProfile(true);
  }
}

Fixed version (ground truth):
private void handleButton(Map<String,Object> session){
  if (id == null) {
    id=String.valueOf(flash.get("String_Node_Str"));
  }
  if (id != null) {
    flash.put("String_Node_Str",id);
    if (id.equals(String.valueOf(session.get("String_Node_Str")))) {
      setOwnProfile(true);
    }
 else {
      setOwnProfile(false);
    }
  }
  hideAddRemove=context.getRequestParameterMap().get("String_Node_Str");
  flash.put("String_Node_Str",id);
  flash.put("String_Node_Str",hideAddRemove);
  hideAddRemoveCheck=String.valueOf(context.getFlash().get("String_Node_Str"));
  if ("String_Node_Str".equals(hideAddRemoveCheck)) {
    setOwnProfile(true);
  }
}
Program: 40594
Project: 40594
Buggy source:
@PostConstruct public void init(){
  context=FacesContext.getCurrentInstance().getExternalContext();
  Map<String,Object> session=context.getSessionMap();
  if (session.size() != 0 && session.get("String_Node_Str") != null) {
    flash=context.getFlash();
    id=context.getRequestParameterMap().get("String_Node_Str");
    handleButton(session);
    userId=(int)session.get("String_Node_Str");
    userProfId=String.valueOf(context.getFlash().get("String_Node_Str"));
    fromHeaderCheck=String.valueOf(context.getFlash().get("String_Node_Str"));
    if (fromHeaderCheck != null && fromHeaderCheck.equals("String_Node_Str")) {
      userProfId=null;
    }
    this.initializeProfile(userId,userProfId);
    try {
      loadContactsCommunitiesAndUserprofile();
      validateUserPriviles(loggedInUser);
    }
 catch (    ServiceException e) {
      errorMsg="String_Node_Str";
      LOG.error(errorMsg);
      setErrorMsg(errorMsg);
    }
  }
 else {
    RedirectHelper.redirect("String_Node_Str");
  }
}

Fixed version (ground truth):
@PostConstruct public void init(){
  context=FacesContext.getCurrentInstance().getExternalContext();
  Map<String,Object> session=context.getSessionMap();
  if (session.size() != 0 && session.get("String_Node_Str") != null) {
    flash=context.getFlash();
    id=context.getRequestParameterMap().get("String_Node_Str");
    handleButton(session);
    userId=(int)session.get("String_Node_Str");
    userProfId=String.valueOf(context.getFlash().get("String_Node_Str"));
    this.initializeProfile(userId,userProfId);
    try {
      loadContactsCommunitiesAndUserprofile();
      validateUserPriviles(loggedInUser);
    }
 catch (    ServiceException e) {
      errorMsg="String_Node_Str";
      LOG.error(errorMsg);
      setErrorMsg(errorMsg);
    }
  }
}
Program: 40595
Project: 40595
Buggy source:
@Override public void insert(Post post,Community community){
  LOG.debug("String_Node_Str" + post);
  ArgumentChecker.assertNotNull(post,"String_Node_Str");
  try {
    if (community == null) {
      dao.insert(post);
    }
 else {
      dao.insert(post,community);
    }
  }
 catch (  Exception e) {
    String message="String_Node_Str";
    LOG.error(message,e);
    throw new ServiceException(message + post);
  }
}

Fixed version (ground truth):
@Override public void insert(Post post,Community community){
  LOG.debug("String_Node_Str" + post);
  ArgumentChecker.assertNotNull(post,"String_Node_Str");
  try {
    if (community == null) {
      dao.insert(post);
    }
 else {
      dao.insert(post,community);
    }
  }
 catch (  IllegalArgumentException e) {
    String msg="String_Node_Str";
    LOG.error(msg,e);
    throw new ServiceException(msg);
  }
catch (  Exception e) {
    String message="String_Node_Str";
    LOG.error(message,e);
    throw new ServiceException(message + post);
  }
}
Program: 40596
Project: 40596
Buggy source:
@Override public File findById(int id){
  return super.findById(id);
}

Fixed version (ground truth):
@Override public File findById(int id){
  LOG.debug("String_Node_Str" + id + "String_Node_Str");
  return super.findById(id);
}
Program: 40597
Project: 40597
Buggy source:
@Override public File insert(File entity){
  return super.insert(entity);
}

Fixed version (ground truth):
@Override public File insert(File entity){
  LOG.debug("String_Node_Str" + entity + "String_Node_Str");
  return super.insert(entity);
}
Program: 40598
Project: 40598
Buggy source:
@Override public File update(File entity){
  return super.update(entity);
}

Fixed version (ground truth):
@Override public File update(File entity){
  LOG.debug("String_Node_Str" + entity + "String_Node_Str");
  return super.update(entity);
}
Program: 40599
Project: 40599
Buggy source:
@Override public void delete(File entity){
  em.remove(em.contains(entity) ? entity : em.merge(entity));
}

Fixed version (ground truth):
@Override public void delete(File entity){
  LOG.debug("String_Node_Str" + entity + "String_Node_Str");
  em.remove(em.contains(entity) ? entity : em.merge(entity));
}
Program: 40600
Project: 40600
Buggy source:
@Override public List<File> findAll(){
  return super.findAll();
}

Fixed version (ground truth):
@Override public List<File> findAll(){
  LOG.debug("String_Node_Str");
  return super.findAll();
}
Program: 40601
Project: 40601
Buggy source:
public void setCreated(Date created){
  LOG.debug("String_Node_Str" + created + "String_Node_Str");
  ArgumentChecker.assertNotNull(created,"String_Node_Str");
  this.created=new Date(created.getTime());
  ;
}

Fixed version (ground truth):
public void setCreated(Date created){
  LOG.debug("String_Node_Str" + created + "String_Node_Str");
  ArgumentChecker.assertNotNull(created,"String_Node_Str");
  this.created=new Date(created.getTime());
}
Program: 40602
Project: 40602
Buggy source:
public void setPicture(byte[] picture){
  this.picture=picture;
}

Fixed version (ground truth):
public void setPicture(byte[] picture){
  this.picture=Arrays.copyOf(picture,picture.length);
}
Program: 40603
Project: 40603
Buggy source:
public byte[] getPicture(){
  return picture;
}

Fixed version (ground truth):
public byte[] getPicture(){
  return Arrays.copyOf(picture,picture.length);
}
Program: 40604
Project: 40604
Buggy source:
public void setData(byte[] file){
  this.data=file;
}

Fixed version (ground truth):
public void setData(byte[] file){
  this.data=Arrays.copyOf(file,file.length);
}
Program: 40605
Project: 40605
Buggy source:
public byte[] getData(){
  return data;
}

Fixed version (ground truth):
public byte[] getData(){
  return Arrays.copyOf(data,data.length);
}
Program: 40606
Project: 40606
Buggy source:
public Date getCreated(){
  LOG.debug("String_Node_Str" + created);
  return created;
}

Fixed version (ground truth):
public Date getCreated(){
  LOG.debug("String_Node_Str" + created);
  return new Date(created.getTime());
}
Program: 40607
Project: 40607
Buggy source:
public void setCreated(Date created){
  LOG.debug("String_Node_Str" + created + "String_Node_Str");
  ArgumentChecker.assertNotNull(created,"String_Node_Str");
  this.created=created;
}

Fixed version (ground truth):
public void setCreated(Date created){
  LOG.debug("String_Node_Str" + created + "String_Node_Str");
  ArgumentChecker.assertNotNull(created,"String_Node_Str");
  this.created=new Date(created.getTime());
  ;
}
Program: 40608
Project: 40608
Buggy source:
public byte[] getPicture(){
  return picture;
}

Fixed version (ground truth):
public byte[] getPicture(){
  return Arrays.copyOf(picture,picture.length);
}
Program: 40609
Project: 40609
Buggy source:
public void setPicture(byte[] picture){
  this.picture=picture;
}

Fixed version (ground truth):
public void setPicture(byte[] picture){
  this.picture=Arrays.copyOf(picture,picture.length);
}
Program: 40610
Project: 40610
Buggy source:
public List<Post> getChildPosts(Post post){
  postChildren=new ArrayList<Post>();
  postChildren=post.getChildPosts();
  return postChildren;
}

Fixed version (ground truth):
public List<Post> getChildPosts(Post post){
  postChildren=post.getChildPosts();
  return postChildren;
}
Program: 40611
Project: 40611
Buggy source:
public void doLogin(){
  try {
    user=service.login(getUsername(),getPassword());
  }
 catch (  Exception e) {
    String erroMsg="String_Node_Str";
    LOG.error(erroMsg);
    setErrorMsg(erroMsg);
  }
  if (user == null) {
    setErrorMsg("String_Node_Str");
  }
  if (user != null) {
    FacesContext context=FacesContext.getCurrentInstance();
    context.getExternalContext().getSessionMap().put("String_Node_Str",user.getId());
    Map<String,Object> session=context.getExternalContext().getSessionMap();
    for (    String key : session.keySet()) {
      LOG.info(key + "String_Node_Str" + session.get(key));
    }
    try {
      context.getExternalContext().redirect("String_Node_Str");
    }
 catch (    IOException e) {
      LOG.error("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
public void doLogin(){
  try {
    user=service.login(getUsername(),getPassword());
  }
 catch (  Exception e) {
    String erroMsg="String_Node_Str";
    LOG.error(erroMsg);
    setErrorMsg(erroMsg);
  }
  if (user == null) {
    setErrorMsg("String_Node_Str");
  }
  if (user != null) {
    FacesContext context=FacesContext.getCurrentInstance();
    context.getExternalContext().getSessionMap().put("String_Node_Str",user.getId());
    Map<String,Object> session=context.getExternalContext().getSessionMap();
    for (    Map.Entry<String,Object> e : session.entrySet()) {
      LOG.info(e.getKey() + "String_Node_Str" + e.getValue());
    }
    try {
      context.getExternalContext().redirect("String_Node_Str");
    }
 catch (    IOException e) {
      LOG.error("String_Node_Str");
    }
  }
}
Program: 40612
Project: 40612
Buggy source:
public boolean isImageExists(){
  if (user != null) {
    return user.getUserProfile().getPicture() != null;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean isImageExists(){
  if (user == null) {
    return false;
  }
 else {
    return user.getUserProfile().getPicture() != null;
  }
}
Program: 40613
Project: 40613
Buggy source:
public StreamedContent getImage(){
  if (user.getUserProfile().getPicture() != null) {
    return new DefaultStreamedContent(new ByteArrayInputStream(user.getUserProfile().getPicture()));
  }
  return null;
}

Fixed version (ground truth):
public StreamedContent getImage(){
  return new DefaultStreamedContent(new ByteArrayInputStream(user.getUserProfile().getPicture()));
}
Program: 40614
Project: 40614
Buggy source:
@Test public void testProfilepicture(){
  byte[] bytearray="String_Node_Str".getBytes();
  up.setPicture(bytearray);
  Assert.assertEquals(bytearray,up.getPicture());
}

Fixed version (ground truth):
@Test public void testProfilepicture(){
  byte[] bytearray="String_Node_Str".getBytes();
  bytearray=Arrays.copyOf(bytearray,bytearray.length);
  up.setPicture(bytearray);
  Assert.assertArrayEquals(bytearray,up.getPicture());
}
Program: 40615
Project: 40615
Buggy source:
public void removeLike(User user,Post post){
  if (likedby.contains(user))   likedby.remove(user);
  if (liked.contains(post))   ;
  liked.remove(post);
  user.getLikes().remove(this);
  post.getLikes().remove(this);
}

Fixed version (ground truth):
public void removeLike(User user,Post post){
  if (likedby.contains(user))   likedby.remove(user);
  if (liked.contains(post))   liked.remove(post);
  user.getLikes().remove(this);
  post.getLikes().remove(this);
}
Program: 40616
Project: 40616
Buggy source:
@Override public void insert(Post post,Community community){
  LOG.debug("String_Node_Str" + post);
  try {
    if (community == null) {
      dao.insert(post);
    }
 else {
      dao.insert(post,community);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + post,e);
    throw new ServiceException("String_Node_Str" + post);
  }
}

Fixed version (ground truth):
@Override public void insert(Post post,Community community){
  LOG.debug("String_Node_Str" + post);
  if (post == null) {
    throw new ServiceException("String_Node_Str");
  }
  try {
    if (community == null) {
      dao.insert(post);
    }
 else {
      dao.insert(post,community);
    }
  }
 catch (  Exception e) {
    LOG.error("String_Node_Str" + post,e);
    throw new ServiceException("String_Node_Str" + post,e);
  }
}
Program: 40617
Project: 40617
Buggy source:
public void newPost(Post parentpost){
  if (parentpost == null) {
    flash.put("String_Node_Str",inputText);
    try {
      post=pservice.createPost(getLoggedInUser(),inputText,new Date());
    }
 catch (    DatabaseException e) {
      LOG.error("String_Node_Str",e);
    }
  }
 else {
    flash.put("String_Node_Str",inputTextChild);
    try {
      post=pservice.createPost(parentpost,parentpost.getCommunity(),getLoggedInUser(),inputTextChild,new Date());
    }
 catch (    DatabaseException e) {
      LOG.error("String_Node_Str",e);
    }
  }
  flash.put("String_Node_Str",post);
  LOG.info("String_Node_Str" + flash.toString());
  service.insert(post);
  refreshPage();
}

Fixed version (ground truth):
public void newPost(Post parentpost){
  if (parentpost == null) {
    flash.put("String_Node_Str",inputText);
    try {
      post=pservice.createPost(getLoggedInUser(),inputText,new Date());
    }
 catch (    DatabaseException e) {
      LOG.error("String_Node_Str",e);
    }
  }
 else {
    flash.put("String_Node_Str",inputTextChild);
    try {
      post=pservice.createPost(parentpost,parentpost.getCommunity(),getLoggedInUser(),inputTextChild,new Date());
    }
 catch (    DatabaseException e) {
      LOG.error("String_Node_Str",e);
    }
  }
  flash.put("String_Node_Str",post);
  LOG.info("String_Node_Str" + flash.toString());
  refreshPage();
}
Program: 40618
Project: 40618
Buggy source:
@Ignore @Test public void addContact_Succesful(){
  expect(userDAO.findByUsername(USERNAME)).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExist(user1.getId())).andReturn(false);
  expect(userContactDAO.insert(userContact2)).andReturn(userContact2);
  replay(userContactDAO);
  userService.addContact(user2,user1.getUsername());
}

Fixed version (ground truth):
@Test public void addContact_Succesful(){
  expect(userDAO.findByUsername(USERNAME)).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExistForUserId(user1.getId(),user2.getId())).andReturn(false);
  expect(userContactDAO.insert(userContact2)).andReturn(userContact2);
  replay(userContactDAO);
  userService.addContact(user2,user1.getUsername());
}
Program: 40619
Project: 40619
Buggy source:
@Ignore @Test(expected=ServiceException.class) public void addContact_Fail(){
  expect(userDAO.findByUsername(USERNAME)).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExist(user1.getId())).andReturn(true);
  replay(userContactDAO);
  userService.addContact(user2,user1.getUsername());
}

Fixed version (ground truth):
@Test(expected=ServiceException.class) public void addContact_Fail(){
  expect(userDAO.findByUsername(USERNAME)).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExistForUserId(user1.getId(),user2.getId())).andReturn(true);
  replay(userContactDAO);
  userService.addContact(user2,user1.getUsername());
}
Program: 40620
Project: 40620
Buggy source:
@Ignore @Test public void removeContact_Succesfull(){
  expect(userDAO.findByUsername(user1.getUsername())).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExist(user1.getId())).andReturn(true);
  expect(userContactDAO.findById(user1.getId())).andReturn(userContact2);
  userContactDAO.delete(userContact2);
  replay(userContactDAO);
  userService.removeContact(user1,user1.getUsername());
}

Fixed version (ground truth):
@Test public void removeContact_Succesfull(){
  expect(userDAO.findByUsername(user1.getUsername())).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExistForUserId(user1.getId(),user2.getId())).andReturn(true);
  expect(userContactDAO.findById(user1.getId())).andReturn(userContact2);
  userContactDAO.delete(userContact2);
  replay(userContactDAO);
  userService.removeContact(user2,user1.getUsername());
}
Program: 40621
Project: 40621
Buggy source:
@Ignore @Test(expected=ServiceException.class) public void removeContact_Fail(){
  expect(userDAO.findByUsername(user1.getUsername())).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExist(user1.getId())).andReturn(false);
  replay(userContactDAO);
  userService.removeContact(user1,user1.getUsername());
}

Fixed version (ground truth):
@Test(expected=ServiceException.class) public void removeContact_Fail(){
  expect(userDAO.findByUsername(user1.getUsername())).andReturn(user1);
  replay(userDAO);
  expect(userContactDAO.doesContactExistForUserId(user1.getId(),user2.getId())).andReturn(false);
  replay(userContactDAO);
  userService.removeContact(user2,user1.getUsername());
}
Program: 40622
Project: 40622
Buggy source:
void insert(UserContact contact);

Fixed version (ground truth):
UserContact insert(UserContact contact);
Program: 40623
Project: 40623
Buggy source:
void update(UserContact contact);

Fixed version (ground truth):
UserContact update(UserContact contact);
Program: 40624
Project: 40624
Buggy source:
@Override public void insert(UserContact contact){
  LOG.info("String_Node_Str" + contact + "String_Node_Str");
  em.persist(contact);
}

Fixed version (ground truth):
@Override public UserContact insert(UserContact contact){
  LOG.info("String_Node_Str" + contact + "String_Node_Str");
  em.persist(contact);
  return contact;
}
Program: 40625
Project: 40625
Buggy source:
@Override public void update(UserContact contact){
  LOG.info("String_Node_Str" + contact + "String_Node_Str");
  em.merge(contact);
}

Fixed version (ground truth):
@Override public UserContact update(UserContact contact){
  LOG.info("String_Node_Str" + contact + "String_Node_Str");
  em.merge(contact);
  return contact;
}
Program: 40626
Project: 40626
Buggy source:
@Override public List<UserContact> findAll(){
  LOG.info("String_Node_Str");
  final String hql="String_Node_Str" + UserProfile.class.getName() + "String_Node_Str";
  return em.createQuery(hql).getResultList();
}

Fixed version (ground truth):
@Override public List<UserContact> findAll(){
  LOG.info("String_Node_Str");
  final String hql="String_Node_Str" + UserContact.class.getName() + "String_Node_Str";
  return em.createQuery(hql).getResultList();
}
Program: 40627
Project: 40627
Buggy source:
void insert(UserProfile up);

Fixed version (ground truth):
UserProfile insert(UserProfile up);
Program: 40628
Project: 40628
Buggy source:
void update(UserProfile up);

Fixed version (ground truth):
UserProfile update(UserProfile up);
Program: 40629
Project: 40629
Buggy source:
@Override public void insert(UserProfile up){
  LOG.info("String_Node_Str" + up + "String_Node_Str");
  em.persist(up);
}

Fixed version (ground truth):
@Override public UserProfile insert(UserProfile up){
  LOG.info("String_Node_Str" + up + "String_Node_Str");
  em.persist(up);
  return up;
}
Program: 40630
Project: 40630
Buggy source:
@Override public void update(UserProfile up){
  LOG.info("String_Node_Str" + up + "String_Node_Str");
  em.merge(up);
}

Fixed version (ground truth):
@Override public UserProfile update(UserProfile up){
  LOG.info("String_Node_Str" + up + "String_Node_Str");
  em.merge(up);
  return up;
}
Program: 40631
Project: 40631
Buggy source:
@Bean public SpringVertx vertx(ObjectProvider<VertxOptions> optionsProvider,ObjectProvider<ClusterManager> clusterManagerProvider,ObjectProvider<List<VertxListener>> listenersProvider,ObjectProvider<List<VertxConfigurer>> configurersProvider){
  SpringVertx.Builder builder=SpringVertx.builder();
  VertxOptions options=optionsProvider.getIfAvailable();
  if (options != null) {
    builder.options(options);
  }
  ClusterManager clusterManager=clusterManagerProvider.getIfAvailable();
  if (clusterManager != null) {
    builder.clusterManager(clusterManager);
  }
  List<VertxListener> listeners=listenersProvider.getIfAvailable();
  if (listeners != null) {
    for (    VertxListener listener : listeners) {
      builder.listener(listener);
    }
  }
  List<VertxConfigurer> configurers=configurersProvider.getIfAvailable();
  if (configurers != null) {
    List<VertxConfigurer> sortedConfigurers=new ArrayList<>(configurers);
    AnnotationAwareOrderComparator.sort(sortedConfigurers);
    for (    VertxConfigurer configurer : sortedConfigurers) {
      logger.debug("String_Node_Str",configurer);
      configurer.configure(builder);
    }
  }
  return builder.build();
}

Fixed version (ground truth):
@Bean public SpringVertx vertx(ObjectProvider<VertxOptions> optionsProvider,ObjectProvider<ClusterManager> clusterManagerProvider,ObjectProvider<List<VertxListener>> listenersProvider,ObjectProvider<List<VertxConfigurer>> configurersProvider){
  SpringVertx.Builder builder=SpringVertx.builder();
  List<VertxConfigurer> configurers=new ArrayList<>();
  ClusterManager clusterManager=clusterManagerProvider.getIfAvailable();
  if (clusterManager != null) {
    configurers.add(new ClusterManagerConfigurer(clusterManager));
  }
  List<VertxListener> listeners=listenersProvider.getIfAvailable();
  if (listeners != null) {
    for (    VertxListener listener : listeners) {
      builder.listener(listener);
    }
  }
  List<VertxConfigurer> injectedConfigurers=configurersProvider.getIfAvailable();
  if (injectedConfigurers != null) {
    configurers.addAll(injectedConfigurers);
  }
  if (!configurers.isEmpty()) {
    List<VertxConfigurer> sortedConfigurers=new ArrayList<>(configurers);
    AnnotationAwareOrderComparator.sort(sortedConfigurers);
    for (    VertxConfigurer configurer : sortedConfigurers) {
      logger.debug("String_Node_Str",configurer);
      configurer.configure(builder);
    }
  }
  VertxOptions options=optionsProvider.getIfAvailable();
  if (options != null) {
    builder.options(options);
  }
  return builder.build();
}
Program: 40632
Project: 40632
Buggy source:
static void vi(String message){
  if (!verboseInternal && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str",message);
}

Fixed version (ground truth):
static void vi(String message){
  if (!verboseInternal && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str","String_Node_Str" + message);
}
Program: 40633
Project: 40633
Buggy source:
static void d(String message){
  if (!debug && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str",message);
}

Fixed version (ground truth):
static void d(String message){
  if (!debug && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str","String_Node_Str" + message);
}
Program: 40634
Project: 40634
Buggy source:
static void e(String message){
  if (!error && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str",message);
}

Fixed version (ground truth):
static void e(String message){
  if (!error && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str","String_Node_Str" + message);
}
Program: 40635
Project: 40635
Buggy source:
static void v(String message){
  if (!verbose && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str",message);
}

Fixed version (ground truth):
static void v(String message){
  if (!verbose && message != null && !message.isEmpty())   return;
  Log.d("String_Node_Str","String_Node_Str" + message);
}