nus-yam/ex-repair huggingface dataset:
Program: 70613
Project: 70613
Buggy source:
public void disconnect(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTING)) {
    if (mAuth == null) {
      return disconnect_from_google();
    }
    FirebaseUser firebaseUser=mAuth.getCurrentUser();
    if (firebaseUser != null) {
      firebaseUser.unlink(GoogleAuthProvider.PROVIDER_ID).addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
        @Override public void onComplete(        @NonNull Task<AuthResult> task){
          if (task != null && task.isSuccessful()) {
            disconnect_from_google();
          }
 else {
            String message=task.getException().getMessage();
            Log.w(TAG,"String_Node_Str" + task.getException());
            updateConnectionStatus(GodotConnectStatus.CONNECTED);
            GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
          }
        }
      }
);
    }
 else {
      disconnect_from_google();
    }
  }
}

Fixed version (ground truth):
public void disconnect(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTING)) {
    if (mAuth == null) {
      disconnect_from_google();
      return;
    }
    FirebaseUser firebaseUser=mAuth.getCurrentUser();
    if (firebaseUser != null) {
      firebaseUser.unlink(GoogleAuthProvider.PROVIDER_ID).addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
        @Override public void onComplete(        @NonNull Task<AuthResult> task){
          if (task != null && task.isSuccessful()) {
            disconnect_from_google();
          }
 else {
            String message=task.getException().getMessage();
            Log.w(TAG,"String_Node_Str" + task.getException());
            updateConnectionStatus(GodotConnectStatus.CONNECTED);
            GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
          }
        }
      }
);
    }
 else {
      disconnect_from_google();
    }
  }
}
Program: 70614
Project: 70614
Buggy source:
public synchronized void onDisconnected(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
    Log.i(TAG,"String_Node_Str");
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
  }
}

Fixed version (ground truth):
public synchronized void onDisconnected(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
    Log.i(TAG,"String_Node_Str");
    GoogleAchievements.getInstance(activity).disconnected();
    GoogleLeaderboard.getInstance(activity).disconnected();
    GooglePlayer.getInstance(activity).disconnected();
    GoogleSnapshot.getInstance(activity).disconnected();
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
  }
}
Program: 70615
Project: 70615
Buggy source:
protected boolean is_connected(){
  GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
  return googleAuthentication.isConnected();
}

Fixed version (ground truth):
protected boolean is_connected(){
  GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
  boolean isConnected=googleAuthentication.isConnected();
  if (!isConnected) {
    mLeaderboardsClient=null;
  }
  return isConnected;
}
Program: 70616
Project: 70616
Buggy source:
protected LeaderboardsClient get_leaderboard_client(){
  GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
  return Games.getLeaderboardsClient(activity,googleAuthentication.get_account());
}

Fixed version (ground truth):
protected LeaderboardsClient get_leaderboard_client(){
  if (mLeaderboardsClient == null) {
    GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
    mLeaderboardsClient=Games.getLeaderboardsClient(activity,googleAuthentication.get_account());
  }
  return mLeaderboardsClient;
}
Program: 70617
Project: 70617
Buggy source:
protected boolean is_connected(){
  GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
  return googleAuthentication.isConnected();
}

Fixed version (ground truth):
protected boolean is_connected(){
  GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
  boolean isConnected=googleAuthentication.isConnected();
  if (!isConnected) {
    mPlayersClient=null;
  }
  return isConnected;
}
Program: 70618
Project: 70618
Buggy source:
protected PlayersClient get_player_client(){
  GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
  return Games.getPlayersClient(activity,googleAuthentication.get_account());
}

Fixed version (ground truth):
protected PlayersClient get_player_client(){
  if (mPlayersClient == null) {
    GoogleAuthentication googleAuthentication=GoogleAuthentication.getInstance(activity);
    mPlayersClient=Games.getPlayersClient(activity,googleAuthentication.get_account());
  }
  return mPlayersClient;
}
Program: 70619
Project: 70619
Buggy source:
public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == GodotAndroidRequest.GOOGLE_AUTHENTICATION_REQUEST) {
    GoogleSignInResult result=Auth.GoogleSignInApi.getSignInResultFromIntent(data);
    if (result.isSuccess()) {
      GoogleSignInAccount account=result.getSignInAccount();
      firebaseAuthWithGoogle(account);
    }
 else {
      onDisconnected();
      Log.w(TAG,"String_Node_Str" + result.getStatus());
      GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{result.getStatus().getStatusMessage()});
    }
  }
}

Fixed version (ground truth):
public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == GodotAndroidRequest.GOOGLE_AUTHENTICATION_REQUEST) {
    GoogleSignInResult result=Auth.GoogleSignInApi.getSignInResultFromIntent(data);
    if (result != null && result.isSuccess()) {
      GoogleSignInAccount account=result.getSignInAccount();
      firebaseAuthWithGoogle(account);
    }
 else {
      onDisconnected();
      Log.w(TAG,"String_Node_Str" + result.getStatus());
      GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{result.getStatus().getStatusMessage()});
    }
  }
}
Program: 70620
Project: 70620
Buggy source:
public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == GodotAndroidRequest.GODOT_SHARE_REQUEST) {
    if (resultCode == activity.RESULT_OK) {
      Log.e(TAG,"String_Node_Str");
      GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
    }
 else {
      String message="String_Node_Str" + resultCode;
      Log.e(TAG,message);
      GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
    }
  }
}

Fixed version (ground truth):
public void onActivityResult(int requestCode,int resultCode,Intent data){
  if (requestCode == GodotAndroidRequest.GODOT_SHARE_REQUEST) {
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
  }
}
Program: 70621
Project: 70621
Buggy source:
public void onConnected(){
  if (updateConnectionStatus(GodotConnectStatus.CONNECTED)) {
    FirebaseUser firebaseUser=mAuth.getCurrentUser();
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{firebaseUser.getDisplayName()});
    Games.getGamesClient(activity,mAccount).setViewForPopups(activity.getWindow().getDecorView().findViewById(android.R.id.content));
    GooglePlayer googlePlayer=GooglePlayer.getInstance(activity);
    googlePlayer.load_current_player();
  }
}

Fixed version (ground truth):
public synchronized void onConnected(){
  if (updateConnectionStatus(GodotConnectStatus.CONNECTED)) {
    FirebaseUser firebaseUser=mAuth.getCurrentUser();
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{firebaseUser.getDisplayName()});
    Games.getGamesClient(activity,mAccount).setViewForPopups(activity.getWindow().getDecorView().findViewById(android.R.id.content));
    GooglePlayer googlePlayer=GooglePlayer.getInstance(activity);
    googlePlayer.load_current_player();
  }
}
Program: 70622
Project: 70622
Buggy source:
public void onDisconnected(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
    Log.i(TAG,"String_Node_Str");
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
  }
}

Fixed version (ground truth):
public synchronized void onDisconnected(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
    Log.i(TAG,"String_Node_Str");
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
  }
}
Program: 70623
Project: 70623
Buggy source:
public String godot_get_country_code_iso(){
  try {
    final TelephonyManager telephonyManager=(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
    final String simCountry=telephonyManager.getSimCountryIso();
    if (simCountry != null && simCountry.length() == 2) {
      return simCountry.toLowerCase(Locale.US);
    }
 else     if (telephonyManager.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA) {
      String networkCountry=telephonyManager.getNetworkCountryIso();
      if (networkCountry != null && networkCountry.length() == 2) {
        return networkCountry.toLowerCase(Locale.US);
      }
    }
  }
 catch (  Exception ex) {
    Log.i(TAG,"String_Node_Str" + ex.getMessage());
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
public String godot_get_country_code_iso(){
  try {
    final TelephonyManager telephonyManager=(TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
    if (telephonyManager.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA) {
      String networkCountry=telephonyManager.getNetworkCountryIso();
      if (networkCountry != null && networkCountry.length() == 2) {
        return networkCountry.toLowerCase(Locale.US);
      }
    }
    final String simCountry=telephonyManager.getSimCountryIso();
    if (simCountry != null && simCountry.length() == 2) {
      return simCountry.toLowerCase(Locale.US);
    }
  }
 catch (  Exception ex) {
    Log.i(TAG,"String_Node_Str" + ex.getMessage());
  }
  return "String_Node_Str";
}
Program: 70624
Project: 70624
Buggy source:
private void firebaseAuthWithGoogle(final GoogleSignInAccount account){
  AuthCredential credential=GoogleAuthProvider.getCredential(account.getIdToken(),null);
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    for (    UserInfo userInfo : firebaseUser.getProviderData()) {
      if (userInfo.getProviderId().equals(GoogleAuthProvider.PROVIDER_ID)) {
        if (userInfo.getUid().equals(account.getId())) {
          Log.i(TAG,"String_Node_Str");
          onConnected();
        }
 else {
          String message="String_Node_Str" + userInfo.getUid() + "String_Node_Str"+ account.getId()+ "String_Node_Str";
          Log.w(TAG,message);
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
          onDisconnected();
        }
        return;
      }
    }
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        mAccount=account;
        onConnected();
      }
 else {
        String message=task.getException().getMessage();
        Log.w(TAG,"String_Node_Str" + task.getException());
        GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
        onDisconnected();
      }
    }
  }
);
}

Fixed version (ground truth):
private void firebaseAuthWithGoogle(final GoogleSignInAccount account){
  AuthCredential credential=GoogleAuthProvider.getCredential(account.getIdToken(),null);
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    for (    UserInfo userInfo : firebaseUser.getProviderData()) {
      if (userInfo.getProviderId().equals(GoogleAuthProvider.PROVIDER_ID)) {
        if (userInfo.getUid().equals(account.getId())) {
          Log.i(TAG,"String_Node_Str");
          mAccount=account;
          onConnected();
        }
 else {
          String message="String_Node_Str" + userInfo.getUid() + "String_Node_Str"+ account.getId()+ "String_Node_Str";
          Log.w(TAG,message);
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
          onDisconnected();
        }
        return;
      }
    }
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        mAccount=account;
        onConnected();
      }
 else {
        String message=task.getException().getMessage();
        Log.w(TAG,"String_Node_Str" + task.getException());
        GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
        onDisconnected();
      }
    }
  }
);
}
Program: 70625
Project: 70625
Buggy source:
@Override public void onMessageReceived(RemoteMessage remoteMessage){
  RemoteMessage.Notification notification=remoteMessage.getNotification();
  if (notification != null) {
    Map<String,String> payloadMap=remoteMessage.getData();
    Dictionary payload=new Dictionary();
    payload.putAll(payloadMap);
    String title=notification.getTitle();
    String body=notification.getBody();
    String tag=notification.getTag();
    String link=notification.getLink().toString();
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{title,body,tag,link,payload});
  }
}

Fixed version (ground truth):
@Override public void onMessageReceived(RemoteMessage remoteMessage){
}
Program: 70626
Project: 70626
Buggy source:
private void firebaseAuthWithFacebook(final AccessToken accessToken){
  Log.d(TAG,"String_Node_Str");
  AuthCredential credential=FacebookAuthProvider.getCredential(accessToken.getToken());
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        if (updateConnectionStatus(GodotConnectStatus.CONNECTED)) {
          FirebaseUser firebaseUser=mAuth.getCurrentUser();
          Log.d(TAG,"String_Node_Str");
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{firebaseUser.getDisplayName()});
        }
      }
 else {
        if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
          Log.w(TAG,task.getException());
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{task.getException().toString()});
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void firebaseAuthWithFacebook(final AccessToken accessToken){
  Log.d(TAG,"String_Node_Str");
  AuthCredential credential=FacebookAuthProvider.getCredential(accessToken.getToken());
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    for (    UserInfo userInfo : firebaseUser.getProviderData()) {
      if (userInfo.getProviderId().equals(FacebookAuthProvider.PROVIDER_ID)) {
        if (userInfo.getUid().equals(accessToken.getUserId())) {
          onConnected();
        }
 else {
          onConnectionFailed("String_Node_Str" + userInfo.getUid() + "String_Node_Str"+ accessToken.getUserId()+ "String_Node_Str");
        }
        return;
      }
    }
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  if (authResultTask != null) {
    authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
      @Override public void onComplete(      @NonNull Task<AuthResult> task){
        if (task.isSuccessful()) {
          onConnected();
        }
 else {
          onConnectionFailed(task.getException().toString());
        }
      }
    }
);
  }
 else {
    onConnected();
  }
}
Program: 70627
Project: 70627
Buggy source:
public void onStart(){
  if (updateConnectionStatus(GodotConnectStatus.CONNECTING)) {
    AsyncTask<Void,Void,Void> task=new AsyncTask<Void,Void,Void>(){
      @Override protected Void doInBackground(      Void... params){
        Log.d(TAG,"String_Node_Str");
        AccessToken accessToken=AccessToken.getCurrentAccessToken();
        if (accessToken != null && !accessToken.isExpired()) {
          firebaseAuthWithFacebook(accessToken);
        }
 else {
          updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
          Log.d(TAG,"String_Node_Str");
        }
        return null;
      }
    }
;
    task.execute();
  }
}

Fixed version (ground truth):
public void onStart(){
  if (updateConnectionStatus(GodotConnectStatus.CONNECTING)) {
    AsyncTask<Void,Void,Void> task=new AsyncTask<Void,Void,Void>(){
      @Override protected Void doInBackground(      Void... params){
        Log.d(TAG,"String_Node_Str");
        AccessToken accessToken=AccessToken.getCurrentAccessToken();
        if (accessToken != null && !accessToken.isExpired()) {
          firebaseAuthWithFacebook(accessToken);
        }
 else {
          refreshToken();
        }
        return null;
      }
    }
;
    task.execute();
  }
}
Program: 70628
Project: 70628
Buggy source:
@Override protected Void doInBackground(Void... params){
  Log.d(TAG,"String_Node_Str");
  AccessToken accessToken=AccessToken.getCurrentAccessToken();
  if (accessToken != null && !accessToken.isExpired()) {
    firebaseAuthWithFacebook(accessToken);
  }
 else {
    updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
    Log.d(TAG,"String_Node_Str");
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doInBackground(Void... params){
  Log.d(TAG,"String_Node_Str");
  AccessToken accessToken=AccessToken.getCurrentAccessToken();
  if (accessToken != null && !accessToken.isExpired()) {
    firebaseAuthWithFacebook(accessToken);
  }
 else {
    refreshToken();
  }
  return null;
}
Program: 70629
Project: 70629
Buggy source:
@Override public void onMessageReceived(RemoteMessage remoteMessage){
  RemoteMessage.Notification notification=remoteMessage.getNotification();
  if (notification != null) {
    Map<String,String> payloadMap=remoteMessage.getData();
    Dictionary payload=new Dictionary();
    payload.putAll(payloadMap);
    String title=notification.getTitle();
    String body=notification.getBody();
    String tag=notification.getTag();
    Uri link_uri=notification.getLink();
    String link="String_Node_Str";
    if (link_uri != null) {
      link=link_uri.toString();
    }
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{title,body,tag,link,payload});
  }
}

Fixed version (ground truth):
@Override public void onMessageReceived(RemoteMessage remoteMessage){
  RemoteMessage.Notification notification=remoteMessage.getNotification();
  if (notification != null) {
    Map<String,String> payloadMap=remoteMessage.getData();
    Dictionary payload=new Dictionary();
    payload.putAll(payloadMap);
    String title=notification.getTitle();
    String body=notification.getBody();
    Log.d(TAG,"String_Node_Str" + title + "String_Node_Str"+ body+ "String_Node_Str"+ payload);
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{title,body,payload});
  }
}
Program: 70630
Project: 70630
Buggy source:
public FirebaseCurrentNotification(Activity p_activity){
  activity=p_activity;
  mAuth=FirebaseAuth.getInstance();
}

Fixed version (ground truth):
public FirebaseCurrentNotification(Activity p_activity){
  activity=p_activity;
}
Program: 70631
Project: 70631
Buggy source:
@Override public void onMessageReceived(RemoteMessage remoteMessage){
  Bundle notification=remoteMessage.getNotification();
  if (notification != null) {
    Map<String,String> payloadMap=remoteMessage.getData();
    Dictionary payload=new Dictionary();
    payload.putAll(payloadMap);
    String title=notification.geTitle();
    String body=notification.getBody();
    String tag=notification.getTag();
    String link=notification.getLink().toString();
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{title,body,tag,link,payload});
  }
}

Fixed version (ground truth):
@Override public void onMessageReceived(RemoteMessage remoteMessage){
  RemoteMessage.Notification notification=remoteMessage.getNotification();
  if (notification != null) {
    Map<String,String> payloadMap=remoteMessage.getData();
    Dictionary payload=new Dictionary();
    payload.putAll(payloadMap);
    String title=notification.getTitle();
    String body=notification.getBody();
    String tag=notification.getTag();
    String link=notification.getLink().toString();
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{title,body,tag,link,payload});
  }
}
Program: 70632
Project: 70632
Buggy source:
public void disconnect(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTING)) {
    Log.d(TAG,"String_Node_Str");
    mLoginManager.logOut();
    updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
  }
}

Fixed version (ground truth):
public void disconnect(){
  if (updateConnectionStatus(GodotConnectStatus.DISCONNECTING)) {
    Log.d(TAG,"String_Node_Str");
    mLoginManager.logOut();
    FirebaseUser firebaseUser=mAuth.getCurrentUser();
    if (firebaseUser != null) {
      firebaseUser.unlink(FacebookAuthProvider.PROVIDER_ID).addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
        @Override public void onComplete(        @NonNull Task<AuthResult> task){
          if (task.isSuccessful()) {
            updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
            GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
          }
 else {
            String message=task.getException().getMessage();
            Log.w(TAG,"String_Node_Str" + task.getException());
            updateConnectionStatus(GodotConnectStatus.CONNECTED);
            GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
          }
        }
      }
);
    }
 else {
      updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
      GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
    }
  }
}
Program: 70633
Project: 70633
Buggy source:
@Override public void onComplete(@NonNull Task<AuthResult> task){
  if (task.isSuccessful()) {
    if (updateConnectionStatus(GodotConnectStatus.CONNECTED)) {
      FirebaseUser firebaseUser=mAuth.getCurrentUser();
      Log.d(TAG,"String_Node_Str");
      GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{firebaseUser.getDisplayName()});
    }
  }
 else {
    if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
      Log.w(TAG,task.getException());
      GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{task.getException().toString()});
    }
  }
}

Fixed version (ground truth):
@Override public void onComplete(@NonNull Task<AuthResult> task){
  if (task.isSuccessful()) {
    updateConnectionStatus(GodotConnectStatus.DISCONNECTED);
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{});
  }
 else {
    String message=task.getException().getMessage();
    Log.w(TAG,"String_Node_Str" + task.getException());
    updateConnectionStatus(GodotConnectStatus.CONNECTED);
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
  }
}
Program: 70634
Project: 70634
Buggy source:
private void firebaseAuthWithFacebook(final AccessToken accessToken){
  Log.d(TAG,"String_Node_Str");
  AuthCredential credential=FacebookAuthProvider.getCredential(accessToken.getToken());
  mAuth.signInWithCredential(credential).addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        if (updateConnectionStatus(GodotConnectStatus.CONNECTED)) {
          FirebaseUser firebaseUser=mAuth.getCurrentUser();
          Log.d(TAG,"String_Node_Str");
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{firebaseUser.getDisplayName()});
        }
      }
 else {
        if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
          Log.w(TAG,task.getException());
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{task.getException().toString()});
        }
      }
    }
  }
);
}

Fixed version (ground truth):
private void firebaseAuthWithFacebook(final AccessToken accessToken){
  Log.d(TAG,"String_Node_Str");
  AuthCredential credential=FacebookAuthProvider.getCredential(accessToken.getToken());
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        if (updateConnectionStatus(GodotConnectStatus.CONNECTED)) {
          FirebaseUser firebaseUser=mAuth.getCurrentUser();
          Log.d(TAG,"String_Node_Str");
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{firebaseUser.getDisplayName()});
        }
      }
 else {
        if (updateConnectionStatus(GodotConnectStatus.DISCONNECTED)) {
          Log.w(TAG,task.getException());
          GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{task.getException().toString()});
        }
      }
    }
  }
);
}
Program: 70635
Project: 70635
Buggy source:
private void firebaseAuthWithGoogle(final GoogleSignInAccount account){
  AuthCredential credential=GoogleAuthProvider.getCredential(account.getIdToken(),null);
  mAuth.signInWithCredential(credential).addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        mAccount=account;
        onConnected();
      }
 else {
        String message=task.getException().getMessage();
        Log.w(TAG,"String_Node_Str" + task.getException());
        GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
        onDisconnected();
      }
    }
  }
);
}

Fixed version (ground truth):
private void firebaseAuthWithGoogle(final GoogleSignInAccount account){
  AuthCredential credential=GoogleAuthProvider.getCredential(account.getIdToken(),null);
  FirebaseUser firebaseUser=mAuth.getCurrentUser();
  Task<AuthResult> authResultTask;
  if (firebaseUser != null) {
    authResultTask=firebaseUser.linkWithCredential(credential);
  }
 else {
    authResultTask=mAuth.signInWithCredential(credential);
  }
  authResultTask.addOnCompleteListener(activity,new OnCompleteListener<AuthResult>(){
    @Override public void onComplete(    @NonNull Task<AuthResult> task){
      if (task.isSuccessful()) {
        mAccount=account;
        onConnected();
      }
 else {
        String message=task.getException().getMessage();
        Log.w(TAG,"String_Node_Str" + task.getException());
        GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{message});
        onDisconnected();
      }
    }
  }
);
}
Program: 70636
Project: 70636
Buggy source:
@Override public void onMessageReceived(RemoteMessage remoteMessage){
}

Fixed version (ground truth):
@Override public void onMessageReceived(RemoteMessage remoteMessage){
  RemoteMessage.Notification notification=remoteMessage.getNotification();
  if (notification != null) {
    Map<String,String> payloadMap=remoteMessage.getData();
    Dictionary payload=new Dictionary();
    payload.putAll(payloadMap);
    String title=notification.getTitle();
    String body=notification.getBody();
    String tag=notification.getTag();
    Uri link_uri=notification.getLink();
    String link="String_Node_Str";
    if (link_uri != null) {
      link=link_uri.toString();
    }
    GodotLib.calldeferred(instance_id,"String_Node_Str",new Object[]{title,body,tag,link,payload});
  }
}
Program: 70637
Project: 70637
Buggy source:
private static void appendAttributeValue(StringBuilder buffer,Object value){
  if (value instanceof String) {
    char[] v=value.toString().replace('\n',' ').replace('\r',' ').replace("String_Node_Str","String_Node_Str").toCharArray();
    logCharTypes(v);
    char[] decoded=new char[v.length];
    for (int i=0; i < v.length; i++) {
      decoded[i]=toPrintable(v[i]);
    }
    buffer.append(decoded);
  }
 else {
    buffer.append(value.getClass().getName());
  }
}

Fixed version (ground truth):
private static void appendAttributeValue(StringBuilder buffer,Object value){
  if (value instanceof String) {
    char[] v=value.toString().replace('\n',' ').replace('\r',' ').replace("String_Node_Str","String_Node_Str").toCharArray();
    logCharTypes(v);
    char[] decoded=new char[v.length];
    for (int i=0; i < v.length; i++) {
      logCharType(v[i]);
      decoded[i]=toPrintable(v[i]);
    }
    buffer.append(decoded);
  }
 else {
    buffer.append(value.getClass().getName());
  }
}
Program: 70638
Project: 70638
Buggy source:
public String getTableName(){
  return this.getClass().getSimpleName();
}

Fixed version (ground truth):
public String getTableName(){
  return this.getClass().getSimpleName().toLowerCase();
}
Program: 70639
Project: 70639
Buggy source:
protected <T extends Model>ArrayList<T> hasMany(Class<T> theClass) throws ModelException {
  try {
    return hasMany(theClass,this.getClass().getSimpleName() + "String_Node_Str");
  }
 catch (  Exception e) {
    throw new ModelException("String_Node_Str");
  }
}

Fixed version (ground truth):
protected <T extends Model>ArrayList<T> hasMany(Class<T> theClass) throws ModelException {
  try {
    return hasMany(theClass,this.getClass().getSimpleName().toLowerCase() + "String_Node_Str");
  }
 catch (  Exception e) {
    throw new ModelException("String_Node_Str");
  }
}
Program: 70640
Project: 70640
Buggy source:
@Override public synchronized void run(){
  logSize=logSize + m_logStr.length();
  logOutView.append(m_logStr);
  if (logSize >= 20000) {
    String logStr=logOutView.getText().toString();
    logStr=logStr.substring(logSize - 10000);
    logSize=logStr.length();
    logOutView.setText(logStr);
  }
  logOutView.setSelection(logSize);
  scrollView.fullScroll(ScrollView.FOCUS_DOWN);
  setTitle("String_Node_Str" + DNSFilterService.openConnectionsCount() + "String_Node_Str");
  dnsField.setText(DNSCommunicator.getInstance().getLastDNSAddress());
}

Fixed version (ground truth):
@Override public synchronized void run(){
  logSize=logSize + m_logStr.length();
  logOutView.append(m_logStr);
  if (logSize >= 20000) {
    String logStr=logOutView.getText().toString();
    logStr=logStr.substring(logSize - 10000);
    logSize=logStr.length();
    logOutView.setText(logStr);
  }
  logOutView.setSelection(logOutView.getText().length());
  scrollView.fullScroll(ScrollView.FOCUS_DOWN);
  setTitle("String_Node_Str" + DNSFilterService.openConnectionsCount() + "String_Node_Str");
  dnsField.setText(DNSCommunicator.getInstance().getLastDNSAddress());
}
Program: 70641
Project: 70641
Buggy source:
@Override public void onClick(View destination){
  persistConfig();
  if (destination == startBtn)   handleStart();
  if (destination == stopBtn)   handleStop();
  if (destination == reloadFilterBtn)   handlefilterReload();
  if (destination == advancedConfigCheck || destination == editAdditionalHostsCheck || destination == editFilterLoadCheck) {
    handleAdvancedConfig();
  }
  if (destination == keepAwakeCheck) {
    if (keepAwakeCheck.isChecked()) {
      wifiLock=((WifiManager)getApplicationContext().getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL,"String_Node_Str");
      wifiLock.acquire();
      wakeLock=((PowerManager)getSystemService(Context.POWER_SERVICE)).newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,"String_Node_Str");
      wakeLock.acquire();
      Logger.getLogger().logLine("String_Node_Str");
    }
 else {
      if (wifiLock != null && wakeLock != null) {
        wifiLock.release();
        wakeLock.release();
        wifiLock=null;
        wakeLock=null;
        Logger.getLogger().logLine("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
@Override public void onClick(View destination){
  persistConfig();
  if (destination == startBtn || destination == enableAdFilterCheck)   handleStart();
  if (destination == stopBtn)   handleStop();
  if (destination == reloadFilterBtn)   handlefilterReload();
  if (destination == advancedConfigCheck || destination == editAdditionalHostsCheck || destination == editFilterLoadCheck) {
    handleAdvancedConfig();
  }
  if (destination == keepAwakeCheck) {
    if (keepAwakeCheck.isChecked()) {
      wifiLock=((WifiManager)getApplicationContext().getSystemService(Context.WIFI_SERVICE)).createWifiLock(WifiManager.WIFI_MODE_FULL,"String_Node_Str");
      wifiLock.acquire();
      wakeLock=((PowerManager)getSystemService(Context.POWER_SERVICE)).newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,"String_Node_Str");
      wakeLock.acquire();
      Logger.getLogger().logLine("String_Node_Str");
    }
 else {
      if (wifiLock != null && wakeLock != null) {
        wifiLock.release();
        wakeLock.release();
        wifiLock=null;
        wakeLock=null;
        Logger.getLogger().logLine("String_Node_Str");
      }
    }
  }
}
Program: 70642
Project: 70642
Buggy source:
private String getFormattedAdvCfgText(Properties config){
  String advCfg="String_Node_Str";
  String filterReloadURL=config.getProperty("String_Node_Str","String_Node_Str");
  StringTokenizer urlTokens=new StringTokenizer(filterReloadURL,"String_Node_Str");
  int urlCnt=urlTokens.countTokens();
  for (int i=0; i < urlCnt; i++) {
    String url=urlTokens.nextToken().trim();
    advCfg=advCfg + "String_Node_Str" + url;
    if (i < urlCnt)     advCfg=advCfg + "String_Node_Str";
  }
  advCfg=advCfg + "String_Node_Str" + config.getProperty("String_Node_Str","String_Node_Str")+ "String_Node_Str";
  return advCfg;
}

Fixed version (ground truth):
private String getFormattedAdvCfgText(Properties config){
  String advCfg="String_Node_Str";
  String filterReloadURL=config.getProperty("String_Node_Str","String_Node_Str");
  StringTokenizer urlTokens=new StringTokenizer(filterReloadURL,"String_Node_Str");
  int urlCnt=urlTokens.countTokens();
  for (int i=0; i < urlCnt; i++) {
    String url=urlTokens.nextToken().trim();
    advCfg=advCfg + "String_Node_Str" + url;
    if (i + 1 < urlCnt)     advCfg=advCfg + "String_Node_Str";
 else     advCfg=advCfg + "String_Node_Str";
  }
  advCfg=advCfg + "String_Node_Str" + config.getProperty("String_Node_Str","String_Node_Str")+ "String_Node_Str";
  return advCfg;
}
Program: 70643
Project: 70643
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_detail);
  MAX_DRAG=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,150,getResources().getDisplayMetrics());
  detail=getIntent().getParcelableExtra(PAR_DETAIL);
  initViews();
  pager.setAdapter(new InfoPageAdapter(getSupportFragmentManager(),detail.detailInfoPages()));
  tabStrip.setViewPager(pager);
  mainLay.addDragView(iv_icon,iv_icon_cover);
  mainLay.setDragController(new DraggableConstraintLayout.DragController(){
    @Override public void onDragDrop(    View view,    boolean captured){
    }
    @Override public void onDrag(    int dy){
      Log.d(TAG,"String_Node_Str" + dy + "String_Node_Str");
      if (dy > 0 && dy <= MAX_DRAG) {
        iv_cover.setRampDy(dy);
      }
    }
  }
);
  bindViews();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_detail);
  MAX_DRAG=(int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,150,getResources().getDisplayMetrics());
  detail=getIntent().getParcelableExtra(PAR_DETAIL);
  initViews();
  pager.setAdapter(new InfoPageAdapter(getSupportFragmentManager(),detail.detailInfoPages()));
  tabStrip.setViewPager(pager);
  mainLay.addDragView(iv_icon,iv_icon_cover);
  mainLay.setDragController(new DraggableConstraintLayout.DragController(){
    @Override public void onDragDrop(    View view,    boolean captured){
    }
    @Override public void onDrag(    int dy){
      Log.d(TAG,"String_Node_Str" + dy + "String_Node_Str");
      if (dy > 0 && dy <= MAX_DRAG) {
        iv_cover.setRampDy(dy);
        cv.setTranslationY(dy);
      }
    }
  }
);
  bindViews();
}
Program: 70644
Project: 70644
Buggy source:
@Override public void onDrag(int dy){
  Log.d(TAG,"String_Node_Str" + dy + "String_Node_Str");
  if (dy > 0 && dy <= MAX_DRAG) {
    iv_cover.setRampDy(dy);
  }
}

Fixed version (ground truth):
@Override public void onDrag(int dy){
  Log.d(TAG,"String_Node_Str" + dy + "String_Node_Str");
  if (dy > 0 && dy <= MAX_DRAG) {
    iv_cover.setRampDy(dy);
    cv.setTranslationY(dy);
  }
}
Program: 70645
Project: 70645
Buggy source:
@Override public void requestLayout(){
  super.requestLayout();
  if (releasedChild != null && startX != 0) {
    Log.d(TAG,"String_Node_Str");
    releasedChild.post(() -> {
      mDragViewCover.setVisibility(INVISIBLE);
      releasedChild.setVisibility(VISIBLE);
      releasedChild.setX(startX);
      releasedChild.setY(startY);
      releasedChild.setTranslationX(startTX);
      releasedChild.setTranslationX(startTY);
    }
);
  }
}

Fixed version (ground truth):
@Override public void requestLayout(){
  super.requestLayout();
  if (releasedChild != null && startX != 0) {
    Log.d(TAG,"String_Node_Str");
    releasedChild.post(() -> {
      mDragViewCover.setVisibility(INVISIBLE);
      releasedChild.setVisibility(VISIBLE);
      releasedChild.setX(startX);
      releasedChild.setY(startY);
      for (int i=0; i < getChildCount(); i++) {
        getChildAt(i).setTranslationY(0);
        getChildAt(i).setTranslationX(0);
      }
    }
);
  }
}
Program: 70646
Project: 70646
Buggy source:
@Override public void actionPerformed(ActionEvent e){
  if (!myMasked) {
    Font base=(Font)myComboBox.getSelectedItem();
    Float f=(Float)(myFontSize.getSelectedItem());
    int size=(int)f.intValue();
    int style=0;
    if (myBold.isSelected()) {
      style|=Font.BOLD;
    }
    if (myItalic.isSelected()) {
      style|=Font.ITALIC;
    }
    Font value=base.deriveFont(style,size);
    Object validValue=validateValue(value,null);
    if (validValue != value) {
      updateDisplay();
    }
    if (updateValue(validValue)) {
      updateDisplay();
    }
  }
}

Fixed version (ground truth):
@Override public void actionPerformed(ActionEvent e){
  if (!myMasked) {
    Font base=(Font)myComboBox.getSelectedItem();
    int size=(int)((Number)(myFontSize.getSelectedItem())).intValue();
    int style=0;
    if (myBold.isSelected()) {
      style|=Font.BOLD;
    }
    if (myItalic.isSelected()) {
      style|=Font.ITALIC;
    }
    Font value=base.deriveFont(style,size);
    Object validValue=validateValue(value,null);
    if (validValue != value) {
      updateDisplay();
    }
    if (updateValue(validValue)) {
      updateDisplay();
    }
  }
}
Program: 70650
Project: 70650
Buggy source:
private static boolean canCollapseEdge(HalfEdge he){
  Vertex3d head=he.head;
  Vertex3d tail=he.tail;
  HalfEdge hprev=he.face.getPreviousEdge(he);
  if (hprev.tail == head) {
    return false;
  }
  HalfEdgeNode node=tail.incidentHedges;
  while (node != null) {
    HalfEdge ee=node.he;
    if (ee != he.opposite) {
      if (ee.tail == head) {
        return false;
      }
      if (ee.next.tail == head) {
        return false;
      }
    }
    node=node.next;
  }
  return true;
}

Fixed version (ground truth):
private static boolean canCollapseEdge(HalfEdge he){
  Vertex3d head=he.head;
  Vertex3d tail=he.tail;
  HalfEdge hprev=he.face.getPreviousEdge(he);
  if (hprev.tail == head) {
    return false;
  }
  HalfEdge hopp=he.opposite;
  if (hopp != null) {
    HalfEdge hnext=hopp.next;
    if (hnext.head == hopp.tail) {
      return false;
    }
  }
  HalfEdgeNode node=tail.incidentHedges;
  while (node != null) {
    HalfEdge ee=node.he;
    if (ee != he.opposite) {
      if (ee.tail == head) {
        return false;
      }
      if (ee.next != he && ee.next.head == head) {
        return false;
      }
    }
    node=node.next;
  }
  return true;
}
Program: 70651
Project: 70651
Buggy source:
private static boolean disconnectFaceIfDegenerate(Face face){
  HalfEdge he=face.firstHalfEdge();
  HalfEdge hn=he.next;
  if (hn.next == he) {
    he.head.removeIncidentHalfEdge(he);
    hn.head.removeIncidentHalfEdge(hn);
    HalfEdge heOpp=he.opposite;
    HalfEdge hnOpp=hn.opposite;
    if (heOpp != null) {
      heOpp.opposite=hnOpp;
      he.opposite=null;
    }
    if (hnOpp != null) {
      hnOpp.opposite=heOpp;
      hn.opposite=null;
    }
    if (heOpp != null && hnOpp != null) {
      if (heOpp.isHard() || hnOpp.isHard()) {
        heOpp.setHard(true);
        hnOpp.setHard(true);
      }
      if (heOpp.isPrimary() == hnOpp.isPrimary()) {
        hnOpp.setPrimary(!hnOpp.isPrimary());
      }
    }
 else {
      if (heOpp != null) {
        heOpp.setHard(false);
      }
      if (hnOpp != null) {
        hnOpp.setHard(false);
      }
    }
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
private static boolean disconnectFaceIfDegenerate(Face face){
  HalfEdge he=face.firstHalfEdge();
  HalfEdge hn=he.next;
  if (hn.next == he) {
    he.head.removeIncidentHalfEdge(he);
    hn.head.removeIncidentHalfEdge(hn);
    HalfEdge heOpp=he.opposite;
    HalfEdge hnOpp=hn.opposite;
    if (heOpp != null) {
      heOpp.opposite=hnOpp;
      he.opposite=null;
    }
    if (hnOpp != null) {
      hnOpp.opposite=heOpp;
      hn.opposite=null;
    }
    if (heOpp != null && hnOpp != null) {
      if (heOpp.isHard() || hnOpp.isHard()) {
        heOpp.setHard(true);
        hnOpp.setHard(true);
      }
      if (heOpp.isPrimary() == hnOpp.isPrimary()) {
        hnOpp.setPrimary(!hnOpp.isPrimary());
      }
    }
 else {
      if (heOpp != null) {
        heOpp.setHard(false);
        heOpp.setPrimary(true);
      }
      if (hnOpp != null) {
        hnOpp.setHard(false);
        hnOpp.setPrimary(true);
      }
    }
    return true;
  }
 else {
    return false;
  }
}
Program: 70652
Project: 70652
Buggy source:
public PointAttachment getAttachment(Vertex3d vtx){
  if (getGrandParent() instanceof RigidBody) {
    RigidBody rb=(RigidBody)getGrandParent();
    return new PointFrameAttachment(rb,null,vtx.getWorldPoint());
  }
  return null;
}

Fixed version (ground truth):
public PointAttachment getAttachment(Vertex3d vtx){
  if (getGrandParent() instanceof RigidBody) {
    RigidBody rb=(RigidBody)getGrandParent();
    return new PointFrameAttachment(rb,null,vtx.getPosition());
  }
  return null;
}
Program: 70653
Project: 70653
Buggy source:
/** 
 * Find and collect objects starting at the nearest and working outwards  until a given criteria is met
 * @param bvh bounding object hierarchy
 * @param dcalc distance calculator
 * @param cond distance condition
 */
public void nearestObjects(BVTree bvh,ObjectDistanceCalculator dcalc,ObjectDistanceCollector cond){
  dcalc.reset();
  PriorityQueue<BVCheckRequest> queue=new PriorityQueue<BVCheckRequest>(11,new BVCheckComparator());
  double d=dcalc.nearestDistance(bvh.getRoot());
  if (d != -1) {
    queue.add(new BVCheckRequest(bvh.getRoot(),d));
  }
  while (!queue.isEmpty()) {
    BVCheckRequest req=queue.poll();
    if (!cond.check(req)) {
      break;
    }
    BVNode node=req.myNode;
    if (node.isLeaf()) {
      Boundable[] elems=node.getElements();
      for (int i=0; i < elems.length; i++) {
        d=dcalc.nearestDistance(elems[i]);
        if (d != -1) {
          cond.add(elems[i],d);
        }
      }
    }
 else {
      BVNode child;
      for (child=node.myFirstChild; child != null; child=child.myNext) {
        d=dcalc.nearestDistance(child);
        if (d != -1) {
          queue.add(new BVCheckRequest(child,d));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Find and collect objects starting at the nearest and working outwards  until a given criteria is met
 * @param bvh bounding object hierarchy
 * @param dcalc distance calculator
 * @param coll distance condition
 */
public void nearestObjects(BVTree bvh,ObjectDistanceCalculator dcalc,ObjectDistanceCollector coll){
  dcalc.reset();
  PriorityQueue<BVCheckRequest> queue=new PriorityQueue<BVCheckRequest>(11,new BVCheckComparator());
  double d=dcalc.nearestDistance(bvh.getRoot());
  if (d != -1) {
    queue.add(new BVCheckRequest(bvh.getRoot(),d));
  }
  while (!queue.isEmpty()) {
    BVCheckRequest req=queue.poll();
    if (!coll.check(req)) {
      break;
    }
    BVNode node=req.myNode;
    if (node.isLeaf()) {
      Boundable[] elems=node.getElements();
      for (int i=0; i < elems.length; i++) {
        d=dcalc.nearestDistance(elems[i]);
        if (d != -1) {
          coll.add(elems[i],d);
        }
      }
    }
 else {
      BVNode child;
      for (child=node.myFirstChild; child != null; child=child.myNext) {
        d=dcalc.nearestDistance(child);
        if (d != -1) {
          queue.add(new BVCheckRequest(child,d));
        }
      }
    }
  }
}
Program: 70654
Project: 70654
Buggy source:
@Override public void nearestPoint(Point3d nearest,Point3d pnt){
  nearest.set(getWorldPoint());
}

Fixed version (ground truth):
@Override public void nearestPoint(Point3d nearest,Point3d pnt){
  nearest.set(getPosition());
}
Program: 70656
Project: 70656
Buggy source:
protected void clearCachedData(ComponentChangeEvent e){
  super.clearCachedData(e);
  myForcesNeedUpdating=true;
  invalidateStressAndStiffness();
  invalidateIntegrationIndices();
  myBVTreeValid=false;
}

Fixed version (ground truth):
protected void clearCachedData(ComponentChangeEvent e){
  super.clearCachedData(e);
  myForcesNeedUpdating=true;
  invalidateStressAndStiffness();
  invalidateIntegrationIndices();
  myAABBTree=null;
  myBVTreeValid=false;
}