nus-yam/ex-repair huggingface dataset:
Program: 155714
Project: 155714
Buggy source:
/** 
 * Initializes the Realm library and creates a default configuration that is ready to use. It is required to call this method before interacting with any other of the Realm API's. A good place is in an   {@link android.app.Application} subclass:<pre> {@code}public class MyApplication extends Application  \@Override public void onCreate() { super.onCreate(); Realm.init(this); } } } </pre> Remember to register it in the   {@code AndroidManifest.xml} file:<pre> {@code <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.realm.example"> <application android:name=".MyApplication"> // ... </application> </manifest>}</pre>
 * @param context the Application Context.
 * @throws IllegalArgumentException if a {@code null} context is provided.
 * @see #getDefaultInstance()
 */
public static synchronized void init(Context context){
  if (BaseRealm.applicationContext == null) {
    if (context == null) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    RealmCore.loadLibrary(context);
    RealmLog.add(BuildConfig.DEBUG ? new AndroidLogger(Log.DEBUG) : new AndroidLogger(Log.WARN));
    defaultConfiguration=new RealmConfiguration.Builder(context).build();
    ObjectServerFacade.getSyncFacadeIfPossible().init(context);
    BaseRealm.applicationContext=context.getApplicationContext();
  }
}

Fixed version (ground truth):
/** 
 * Initializes the Realm library and creates a default configuration that is ready to use. It is required to call this method before interacting with any other of the Realm API's. A good place is in an   {@link android.app.Application} subclass:<pre> {@code}public class MyApplication extends Application  \@Override public void onCreate() { super.onCreate(); Realm.init(this); } } } </pre> Remember to register it in the   {@code AndroidManifest.xml} file:<pre> {@code <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.realm.example"> <application android:name=".MyApplication"> // ... </application> </manifest>}</pre>
 * @param context the Application Context.
 * @throws IllegalArgumentException if a {@code null} context is provided.
 * @see #getDefaultInstance()
 */
public static synchronized void init(Context context){
  if (BaseRealm.applicationContext == null) {
    if (context == null) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    RealmCore.loadLibrary(context);
    RealmLog.add(io.realm.BuildConfig.DEBUG ? new AndroidLogger(Log.DEBUG) : new AndroidLogger(Log.WARN));
    defaultConfiguration=new RealmConfiguration.Builder(context).build();
    ObjectServerFacade.getSyncFacadeIfPossible().init(context);
    BaseRealm.applicationContext=context.getApplicationContext();
  }
}
Program: 155715
Project: 155715
Buggy source:
/** 
 * Returns the last user that has logged in and who is still valid. A user is invalidated when he/she logs out or the user's access token expire.
 * @return last {@link User} that has logged in and who is still valid. {@code null} if no current user or user hasbeen invalidated.
 */
public static User currentUser(){
  User user=SyncManager.getUserStore().get(UserStore.CURRENT_USER_KEY);
  if (user != null && user.isValid()) {
    user.getSyncUser().scheduleRefresh();
    return user;
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns the last user that has logged in and who is still valid. A user is invalidated when he/she logs out or the user's access token expire.
 * @return last {@link User} that has logged in and who is still valid. {@code null} if no current user or user hasbeen invalidated.
 */
public static User currentUser(){
  User user=SyncManager.getUserStore().get(UserStore.CURRENT_USER_KEY);
  if (user != null && user.isValid()) {
    return user;
  }
  return null;
}
Program: 155716
Project: 155716
Buggy source:
/** 
 * Authenticate the given credentials on the specified Realm Authentication Server.
 */
@Override public AuthenticateResponse loginUser(Credentials credentials,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.fromCredentials(credentials).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.OTHER_ERROR,Util.getStackTrace(e)));
  }
}

Fixed version (ground truth):
/** 
 * Authenticate the given credentials on the specified Realm Authentication Server.
 */
@Override public AuthenticateResponse loginUser(Credentials credentials,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.userLogin(credentials).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.OTHER_ERROR,Util.getStackTrace(e)));
  }
}
Program: 155717
Project: 155717
Buggy source:
@Override public AuthenticateResponse refreshUser(Token userToken,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.fromRefreshToken(userToken).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.UNKNOWN,e));
  }
}

Fixed version (ground truth):
@Override public AuthenticateResponse refreshUser(Token userToken,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.userRefresh(userToken).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.UNKNOWN,e));
  }
}
Program: 155718
Project: 155718
Buggy source:
@Override public AuthenticateResponse loginToRealm(Token refreshToken,URI serverUrl,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.fromRefreshToken(refreshToken).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.UNKNOWN,e));
  }
}

Fixed version (ground truth):
@Override public AuthenticateResponse loginToRealm(Token refreshToken,URI serverUrl,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.realmLogin(refreshToken,serverUrl).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.UNKNOWN,e));
  }
}
Program: 155719
Project: 155719
Buggy source:
private synchronized void authenticate(final SyncSession session){
  session.authenticateRealm(new Runnable(){
    @Override public void run(){
      gotoNextState(SessionState.BINDING);
    }
  }
,new Session.ErrorHandler(){
    @Override public void onError(    Session s,    ObjectServerError error){
      session.onError(error);
    }
  }
);
}

Fixed version (ground truth):
private synchronized void authenticate(final SyncSession session){
  session.authenticateRealm(new Runnable(){
    @Override public void run(){
      RealmLog.debug("String_Node_Str",session.getConfiguration().getPath());
      gotoNextState(SessionState.BINDING);
    }
  }
,new Session.ErrorHandler(){
    @Override public void onError(    Session s,    ObjectServerError error){
      RealmLog.debug("String_Node_Str",session.getConfiguration().getPath(),error.getErrorCode());
      session.onError(error);
    }
  }
);
}
Program: 155720
Project: 155720
Buggy source:
@Override public void onError(Session s,ObjectServerError error){
  session.onError(error);
}

Fixed version (ground truth):
@Override public void onError(Session s,ObjectServerError error){
  RealmLog.debug("String_Node_Str",session.getConfiguration().getPath(),error.getErrorCode());
  session.onError(error);
}
Program: 155721
Project: 155721
Buggy source:
@Override public void run(){
  gotoNextState(SessionState.BINDING);
}

Fixed version (ground truth):
@Override public void run(){
  RealmLog.debug("String_Node_Str",session.getConfiguration().getPath());
  gotoNextState(SessionState.BINDING);
}
Program: 155722
Project: 155722
Buggy source:
public void clearTokens(){
  realms.clear();
  refreshToken=null;
  if (refreshTask != null) {
    refreshTask.cancel();
    refreshTask=null;
  }
}

Fixed version (ground truth):
public void clearTokens(){
  realms.clear();
  refreshToken=null;
}
Program: 155723
Project: 155723
Buggy source:
public void setRefreshToken(final Token refreshToken){
  this.refreshToken=refreshToken;
  scheduleRefresh();
}

Fixed version (ground truth):
public void setRefreshToken(final Token refreshToken){
  this.refreshToken=refreshToken;
}
Program: 155724
Project: 155724
Buggy source:
/** 
 * Logs in the user to the Realm Object Server. This is done synchronously, so calling this method on the Android UI thread will always crash. A logged in user is required to be able to create a   {@link SyncConfiguration}.
 * @param credentials credentials to use.
 * @param authenticationUrl server that can authenticate against.
 * @throws ObjectServerError if the login failed.
 * @throws IllegalArgumentException if the URL is malformed.
 */
public static User login(final Credentials credentials,final String authenticationUrl) throws ObjectServerError {
  final URL authUrl;
  try {
    authUrl=new URL(authenticationUrl);
  }
 catch (  MalformedURLException e) {
    throw new IllegalArgumentException("String_Node_Str" + authenticationUrl + "String_Node_Str",e);
  }
  final AuthenticationServer server=SyncManager.getAuthServer();
  try {
    AuthenticateResponse result=server.loginUser(credentials,authUrl);
    if (result.isValid()) {
      SyncUser syncUser=new SyncUser(result.getRefreshToken(),authUrl);
      User user=new User(syncUser);
      RealmLog.info("String_Node_Str",user);
      SyncManager.getUserStore().put(UserStore.CURRENT_USER_KEY,user);
      SyncManager.notifyUserLoggedIn(user);
      return user;
    }
 else {
      RealmLog.info("String_Node_Str",result.getError());
      throw result.getError();
    }
  }
 catch (  IOException e) {
    throw new ObjectServerError(ErrorCode.IO_EXCEPTION,e);
  }
catch (  Throwable e) {
    throw new ObjectServerError(ErrorCode.UNKNOWN,e);
  }
}

Fixed version (ground truth):
/** 
 * Logs in the user to the Realm Object Server. This is done synchronously, so calling this method on the Android UI thread will always crash. A logged in user is required to be able to create a   {@link SyncConfiguration}.
 * @param credentials credentials to use.
 * @param authenticationUrl server that can authenticate against.
 * @throws ObjectServerError if the login failed.
 * @throws IllegalArgumentException if the URL is malformed.
 */
public static User login(final Credentials credentials,final String authenticationUrl) throws ObjectServerError {
  final URL authUrl;
  try {
    authUrl=new URL(authenticationUrl);
  }
 catch (  MalformedURLException e) {
    throw new IllegalArgumentException("String_Node_Str" + authenticationUrl + "String_Node_Str",e);
  }
  final AuthenticationServer server=SyncManager.getAuthServer();
  ObjectServerError error;
  try {
    AuthenticateResponse result=server.loginUser(credentials,authUrl);
    if (result.isValid()) {
      SyncUser syncUser=new SyncUser(result.getRefreshToken(),authUrl);
      User user=new User(syncUser);
      RealmLog.info("String_Node_Str",user);
      SyncManager.getUserStore().put(UserStore.CURRENT_USER_KEY,user);
      SyncManager.notifyUserLoggedIn(user);
      return user;
    }
 else {
      RealmLog.info("String_Node_Str",result.getError());
      error=result.getError();
    }
  }
 catch (  Throwable e) {
    throw new ObjectServerError(ErrorCode.UNKNOWN,e);
  }
  throw error;
}
Program: 155725
Project: 155725
Buggy source:
/** 
 * Authenticate the given credentials on the specified Realm Authentication Server.
 */
@Override public AuthenticateResponse loginUser(Credentials credentials,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.userLogin(credentials).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.OTHER_ERROR,Util.getStackTrace(e)));
  }
}

Fixed version (ground truth):
/** 
 * Authenticate the given credentials on the specified Realm Authentication Server.
 */
@Override public AuthenticateResponse loginUser(Credentials credentials,URL authenticationUrl){
  try {
    String requestBody=AuthenticateRequest.userLogin(credentials).toJson();
    return authenticate(authenticationUrl,requestBody);
  }
 catch (  Exception e) {
    return AuthenticateResponse.from(new ObjectServerError(ErrorCode.UNKNOWN,e));
  }
}
Program: 155727
Project: 155727
Buggy source:
/** 
 * Helper method for creating the proper Authenticate response. This method will set the appropriate error depending on any HTTP response codes or IO errors.
 */
public static AuthenticateResponse createFrom(Response response){
  String serverResponse;
  try {
    serverResponse=response.body().string();
  }
 catch (  IOException e) {
    ObjectServerError error=new ObjectServerError(ErrorCode.IO_EXCEPTION,e);
    return new AuthenticateResponse(error);
  }
  RealmLog.debug("String_Node_Str" + serverResponse);
  if (response.code() != 200) {
    try {
      JSONObject obj=new JSONObject(serverResponse);
      String type=obj.getString("String_Node_Str");
      String hint=obj.optString("String_Node_Str",null);
      String title=obj.optString("String_Node_Str",null);
      ErrorCode errorCode=ErrorCode.fromInt(obj.optInt("String_Node_Str",-1));
      ObjectServerError error=new ObjectServerError(errorCode,title,hint,type);
      return new AuthenticateResponse(error);
    }
 catch (    JSONException e) {
      ObjectServerError error=new ObjectServerError(ErrorCode.JSON_EXCEPTION,"String_Node_Str" + response.code() + "String_Node_Str",e);
      return new AuthenticateResponse(error);
    }
  }
 else {
    return new AuthenticateResponse(serverResponse);
  }
}

Fixed version (ground truth):
/** 
 * Helper method for creating the proper Authenticate response. This method will set the appropriate error depending on any HTTP response codes or IO errors.
 */
static AuthenticateResponse createFrom(Response response){
  String serverResponse;
  try {
    serverResponse=response.body().string();
  }
 catch (  IOException e) {
    ObjectServerError error=new ObjectServerError(ErrorCode.IO_EXCEPTION,e);
    return new AuthenticateResponse(error);
  }
  RealmLog.debug("String_Node_Str" + serverResponse);
  if (response.code() != 200) {
    try {
      JSONObject obj=new JSONObject(serverResponse);
      String type=obj.getString("String_Node_Str");
      String hint=obj.optString("String_Node_Str",null);
      String title=obj.optString("String_Node_Str",null);
      ErrorCode errorCode=ErrorCode.fromInt(obj.optInt("String_Node_Str",-1));
      ObjectServerError error=new ObjectServerError(errorCode,title,hint,type);
      return new AuthenticateResponse(error);
    }
 catch (    JSONException e) {
      ObjectServerError error=new ObjectServerError(ErrorCode.JSON_EXCEPTION,"String_Node_Str" + response.code() + "String_Node_Str",e);
      return new AuthenticateResponse(error);
    }
  }
 else {
    return new AuthenticateResponse(serverResponse);
  }
}
Program: 155728
Project: 155728
Buggy source:
/** 
 * Parse a valid (200) server response. It might still result in a unsuccessful authentication attempt, if the JSON response could not be parsed correctly.
 */
public AuthenticateResponse(String serverResponse){
  ObjectServerError error;
  String identifier;
  String path;
  String appId;
  Token accessToken;
  Token refreshToken;
  try {
    JSONObject obj=new JSONObject(serverResponse);
    accessToken=obj.has("String_Node_Str") ? Token.from(obj.getJSONObject("String_Node_Str")) : null;
    refreshToken=obj.has("String_Node_Str") ? Token.from(obj.getJSONObject("String_Node_Str")) : null;
    error=null;
  }
 catch (  JSONException ex) {
    accessToken=null;
    refreshToken=null;
    error=new ObjectServerError(ErrorCode.JSON_EXCEPTION,ex);
  }
  this.accessToken=accessToken;
  this.refreshToken=refreshToken;
  this.error=error;
}

Fixed version (ground truth):
/** 
 * Parses a valid (200) server response. It might still result in a unsuccessful authentication attempt, if the JSON response could not be parsed correctly.
 */
private AuthenticateResponse(String serverResponse){
  ObjectServerError error;
  Token accessToken;
  Token refreshToken;
  try {
    JSONObject obj=new JSONObject(serverResponse);
    accessToken=obj.has(JSON_FIELD_ACCESS_TOKEN) ? Token.from(obj.getJSONObject(JSON_FIELD_ACCESS_TOKEN)) : null;
    refreshToken=obj.has(JSON_FIELD_REFRESH_TOKEN) ? Token.from(obj.getJSONObject(JSON_FIELD_REFRESH_TOKEN)) : null;
    error=null;
  }
 catch (  JSONException ex) {
    accessToken=null;
    refreshToken=null;
    error=new ObjectServerError(ErrorCode.JSON_EXCEPTION,ex);
  }
  this.accessToken=accessToken;
  this.refreshToken=refreshToken;
  this.error=error;
}
Program: 155729
Project: 155729
Buggy source:
private void basicCRUD(Realm realm){
  showStatus("String_Node_Str");
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      Person person=realm.createObject(Person.class);
      person.setId(1);
      person.setName("String_Node_Str");
      person.setAge(14);
    }
  }
);
  final Person person=realm.where(Person.class).findFirst();
  showStatus(person.getName() + "String_Node_Str" + person.getAge());
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      person.setName("String_Node_Str");
      person.setAge(99);
      showStatus(person.getName() + "String_Node_Str" + person.getAge());
      realm.commitTransaction();
    }
  }
);
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      realm.delete(Person.class);
    }
  }
);
}

Fixed version (ground truth):
private void basicCRUD(Realm realm){
  showStatus("String_Node_Str");
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      Person person=realm.createObject(Person.class);
      person.setId(1);
      person.setName("String_Node_Str");
      person.setAge(14);
    }
  }
);
  final Person person=realm.where(Person.class).findFirst();
  showStatus(person.getName() + "String_Node_Str" + person.getAge());
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      person.setName("String_Node_Str");
      person.setAge(99);
      showStatus(person.getName() + "String_Node_Str" + person.getAge());
    }
  }
);
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      realm.delete(Person.class);
    }
  }
);
}
Program: 155730
Project: 155730
Buggy source:
/** 
 * Initialize Timer logging
 */
protected abstract void initializeTimber();

Fixed version (ground truth):
/** 
 * Initialize Timber logging
 */
protected abstract void initializeTimber();
Program: 155731
Project: 155731
Buggy source:
/** 
 * Updates a story.
 * @param storyId story to update
 * @param read {@code true} if the story has been read, {@code false} otherwise.
 */
@UiThread public void updateStoryReadState(final String storyId,final boolean read){
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      NYTimesStory persistedStory=realm.where(NYTimesStory.class).equalTo(NYTimesStory.URL,storyId).findFirst();
      if (persistedStory != null) {
        persistedStory.setRead(read);
      }
 else {
        Timber.e("String_Node_Str" + storyId);
      }
    }
  }
,new DefaultTransactionCallback());
}

Fixed version (ground truth):
/** 
 * Updates a story.
 * @param storyId story to update
 * @param read {@code true} if the story has been read, {@code false} otherwise.
 */
@UiThread public void updateStoryReadState(final String storyId,final boolean read){
  realm.executeTransactionAsync(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      NYTimesStory persistedStory=realm.where(NYTimesStory.class).equalTo(NYTimesStory.URL,storyId).findFirst();
      if (persistedStory != null) {
        persistedStory.setRead(read);
      }
 else {
        Timber.e("String_Node_Str" + storyId);
      }
    }
  }
,new Realm.Transaction.OnError(){
    @Override public void onError(    Throwable throwable){
      Timber.e(throwable,"String_Node_Str");
    }
  }
);
}
Program: 155732
Project: 155732
Buggy source:
private void processAndAddData(final Realm realm,final String sectionKey,final List<NYTimesStory> stories){
  if (stories.isEmpty())   return;
  realm.executeTransaction(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      for (      NYTimesStory story : stories) {
        Date parsedPublishedDate=inputDateFormat.parse(story.getPublishedDate(),new ParsePosition(0));
        story.setSortTimeStamp(parsedPublishedDate.getTime());
        story.setPublishedDate(outputDateFormat.format(parsedPublishedDate));
        NYTimesStory persistedStory=realm.where(NYTimesStory.class).equalTo(NYTimesStory.URL,story.getUrl()).findFirst();
        if (persistedStory != null) {
          story.setRead(persistedStory.isRead());
        }
        if (persistedStory == null || !persistedStory.getUpdatedDate().equals(story.getUpdatedDate())) {
          story.setApiSection(sectionKey);
          realm.copyToRealmOrUpdate(story);
        }
      }
    }
  }
,new DefaultTransactionCallback());
}

Fixed version (ground truth):
private void processAndAddData(final Realm realm,final String sectionKey,final List<NYTimesStory> stories){
  if (stories.isEmpty())   return;
  realm.executeTransactionAsync(new Realm.Transaction(){
    @Override public void execute(    Realm realm){
      for (      NYTimesStory story : stories) {
        Date parsedPublishedDate=inputDateFormat.parse(story.getPublishedDate(),new ParsePosition(0));
        story.setSortTimeStamp(parsedPublishedDate.getTime());
        story.setPublishedDate(outputDateFormat.format(parsedPublishedDate));
        NYTimesStory persistedStory=realm.where(NYTimesStory.class).equalTo(NYTimesStory.URL,story.getUrl()).findFirst();
        if (persistedStory != null) {
          story.setRead(persistedStory.isRead());
        }
        if (persistedStory == null || !persistedStory.getUpdatedDate().equals(story.getUpdatedDate())) {
          story.setApiSection(sectionKey);
          realm.copyToRealmOrUpdate(story);
        }
      }
    }
  }
,new Realm.Transaction.OnError(){
    @Override public void onError(    Throwable throwable){
      Timber.e(throwable,"String_Node_Str");
    }
  }
);
}
Program: 155733
Project: 155733
Buggy source:
@Override public void onResume(){
  Subscription detailsSubscription=model.getStory(storyId).subscribe(new Action1<NYTimesStory>(){
    @Override public void call(    NYTimesStory story){
      view.hideLoader();
      view.showStory(story);
      view.setRead(story.isRead());
    }
  }
);
  Subscription timerSubscription=Observable.timer(2,TimeUnit.SECONDS).subscribe(new Action1<Long>(){
    @Override public void call(    Long aLong){
      model.markAsRead(storyId,true);
    }
  }
);
  subscriptions=new CompositeSubscription(detailsSubscription,timerSubscription);
}

Fixed version (ground truth):
@Override public void onResume(){
  Subscription detailsSubscription=model.getStory(storyId).subscribe(new Action1<NYTimesStory>(){
    @Override public void call(    NYTimesStory story){
      view.hideLoader();
      view.showStory(story);
      view.setRead(story.isRead());
    }
  }
);
  Subscription timerSubscription=Observable.timer(2,TimeUnit.SECONDS).observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<Long>(){
    @Override public void call(    Long aLong){
      model.markAsRead(storyId,true);
    }
  }
);
  subscriptions=new CompositeSubscription(detailsSubscription,timerSubscription);
}
Program: 155734
Project: 155734
Buggy source:
public AnnotationIndexTypes getFieldObject(){
  return this.fieldObject;
}

Fixed version (ground truth):
public AnnotationIndexTypes getFieldObject(){
  return realmGetter$fieldObject();
}
Program: 155735
Project: 155735
Buggy source:
public void setFieldObject(AnnotationIndexTypes object){
  this.fieldObject=object;
}

Fixed version (ground truth):
public void setFieldObject(AnnotationIndexTypes fieldObject){
  realmSetter$fieldObject(fieldObject);
}
Program: 155736
Project: 155736
Buggy source:
@Test public void testRemoveAllChangeListenersThrowExceptionOnNonLooperThread(){
  final CountDownLatch signalTestFinished=new CountDownLatch(1);
  Thread thread=new Thread(new Runnable(){
    @Override public void run(){
      Realm realm=Realm.getInstance(testConfig);
      try {
        realm.removeAllChangeListeners();
        fail("String_Node_Str");
      }
 catch (      IllegalStateException e) {
        signalTestFinished.countDown();
      }
 finally {
        realm.close();
      }
    }
  }
);
  thread.start();
  try {
    TestHelper.awaitOrFail(signalTestFinished);
  }
  finally {
    thread.interrupt();
  }
}

Fixed version (ground truth):
@Test public void testRemoveAllChangeListenersThrowExceptionOnNonLooperThread(){
  final CountDownLatch signalTestFinished=new CountDownLatch(1);
  Thread thread=new Thread(new Runnable(){
    @Override public void run(){
      Realm realm=Realm.getInstance(testConfig);
      try {
        realm.removeAllChangeListeners();
        fail("String_Node_Str");
      }
 catch (      IllegalStateException ignored) {
      }
 finally {
        realm.close();
        signalTestFinished.countDown();
      }
    }
  }
);
  thread.start();
  try {
    TestHelper.awaitOrFail(signalTestFinished);
  }
  finally {
    thread.interrupt();
  }
}
Program: 155737
Project: 155737
Buggy source:
@Test public void testRemoveChangeListenerThrowExceptionOnNonLooperThread(){
  final CountDownLatch signalTestFinished=new CountDownLatch(1);
  Thread thread=new Thread(new Runnable(){
    @Override public void run(){
      Realm realm=Realm.getInstance(testConfig);
      try {
        realm.removeChangeListener(new RealmChangeListener(){
          @Override public void onChange(){
          }
        }
);
        fail("String_Node_Str");
      }
 catch (      IllegalStateException e) {
        signalTestFinished.countDown();
      }
 finally {
        realm.close();
      }
    }
  }
);
  thread.start();
  try {
    TestHelper.awaitOrFail(signalTestFinished);
  }
  finally {
    thread.interrupt();
  }
}

Fixed version (ground truth):
@Test public void testRemoveChangeListenerThrowExceptionOnNonLooperThread(){
  final CountDownLatch signalTestFinished=new CountDownLatch(1);
  Thread thread=new Thread(new Runnable(){
    @Override public void run(){
      Realm realm=Realm.getInstance(testConfig);
      try {
        realm.removeChangeListener(new RealmChangeListener(){
          @Override public void onChange(){
          }
        }
);
        fail("String_Node_Str");
      }
 catch (      IllegalStateException ignored) {
      }
 finally {
        realm.close();
        signalTestFinished.countDown();
      }
    }
  }
);
  thread.start();
  try {
    TestHelper.awaitOrFail(signalTestFinished);
  }
  finally {
    thread.interrupt();
  }
}
Program: 155738
Project: 155738
Buggy source:
/** 
 * All changes since   {@link io.realm.Realm#beginTransaction()} are persisted to disk and the Realm reverts back tobeing read-only. An event is sent to notify all other Realm instances that a change has occurred. When the event is received, the other Realms will get their objects and  {@link io.realm.RealmResults} updated to reflect thechanges from this commit.
 */
public void commitTransaction(){
  checkIfValid();
  sharedGroupManager.commitAndContinueAsRead();
  for (  Map.Entry<Handler,String> handlerIntegerEntry : handlers.entrySet()) {
    Handler handler=handlerIntegerEntry.getKey();
    String realmPath=handlerIntegerEntry.getValue();
    if (handler.equals(this.handler)) {
      handlerController.notifyGlobalListeners();
      handlerController.notifyTypeBasedListeners();
      if (handlerController.threadContainsAsyncEmptyRealmObject()) {
        handlerController.updateAsyncEmptyRealmObject();
      }
      continue;
    }
    if (realmPath.equals(configuration.getPath()) && !handler.hasMessages(HandlerController.REALM_CHANGED) && handler.getLooper().getThread().isAlive()&& !handler.sendEmptyMessage(HandlerController.REALM_CHANGED)) {
      RealmLog.w("String_Node_Str" + "String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Commits transaction, runs the given runnable and then sends notifications. The runnable is useful to meet some timing conditions like the async transaction. In async transaction, the background Realm has to be closed before other threads see the changes to majoyly avoid the flaky tests.
 * @param runAfterCommit runnable will run after transaction committed but before notification sent.
 */
void commitTransaction(Runnable runAfterCommit){
  checkIfValid();
  sharedGroupManager.commitAndContinueAsRead();
  if (runAfterCommit != null) {
    runAfterCommit.run();
  }
  for (  Map.Entry<Handler,String> handlerIntegerEntry : handlers.entrySet()) {
    Handler handler=handlerIntegerEntry.getKey();
    String realmPath=handlerIntegerEntry.getValue();
    if (handler.equals(this.handler)) {
      handlerController.notifyGlobalListeners();
      handlerController.notifyTypeBasedListeners();
      if (handlerController.threadContainsAsyncEmptyRealmObject()) {
        handlerController.updateAsyncEmptyRealmObject();
      }
      continue;
    }
    if (realmPath.equals(configuration.getPath()) && !handler.hasMessages(HandlerController.REALM_CHANGED) && handler.getLooper().getThread().isAlive()&& !handler.sendEmptyMessage(HandlerController.REALM_CHANGED)) {
      RealmLog.w("String_Node_Str" + "String_Node_Str");
    }
  }
}
Program: 155739
Project: 155739
Buggy source:
@Override public void run(){
  callback.onError(e);
}

Fixed version (ground truth):
@Override public void run(){
  callback.onError(exception[0]);
}
Program: 155741
Project: 155741
Buggy source:
/** 
 * Searches this   {@link RealmResults} for the specified object.
 * @param object the object to search for.
 * @return {@code true} if {@code object} is an element of this {@code RealmResults},  {@code false} otherwise
 */
@Override public boolean contains(Object object){
  boolean contains=false;
  if (isLoaded()) {
    if (object instanceof RealmObject) {
      RealmObject realmObject=(RealmObject)object;
      if (realmObject.row != null && realm.getPath().equals(realmObject.realm.getPath()) && realmObject.row != InvalidRow.INSTANCE) {
        contains=(table.sourceRowIndex(realmObject.row.getIndex()) != TableOrView.NO_MATCH);
      }
    }
  }
  return contains;
}

Fixed version (ground truth):
/** 
 * Searches this   {@link RealmResults} for the specified object.
 * @param object the object to search for.
 * @return {@code true} if {@code object} is an element of this {@code RealmResults},  {@code false} otherwise
 */
@Override public boolean contains(Object object){
  boolean contains=false;
  if (isLoaded() && object instanceof RealmObject) {
    RealmObject realmObject=(RealmObject)object;
    if (realmObject.row != null && realm.getPath().equals(realmObject.realm.getPath()) && realmObject.row != InvalidRow.INSTANCE) {
      contains=(table.sourceRowIndex(realmObject.row.getIndex()) != TableOrView.NO_MATCH);
    }
  }
  return contains;
}
Program: 155742
Project: 155742
Buggy source:
@Override protected void after(){
  try {
    for (    RealmConfiguration configuration : configurations) {
      Realm.deleteRealm(configuration);
    }
  }
  finally {
    super.after();
  }
}

Fixed version (ground truth):
@Override protected void after(){
  try {
    for (    RealmConfiguration configuration : configurations) {
      Realm.deleteRealm(configuration);
    }
  }
 catch (  IllegalStateException e) {
    if (!unitTestFailed) {
      throw e;
    }
  }
 finally {
    super.after();
  }
}
Program: 155743
Project: 155743
Buggy source:
@Test @RunTestInLooperThread public void testFindAllAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final RealmResults<AllTypes> realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",0,4).findAllAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertEquals(5,realmResults.size());
      assertTrue(realmResults.get(4).isValid());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertEquals(0,realmResults.size());
  Realm.asyncQueryExecutor.resume();
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testFindAllAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final RealmResults<AllTypes> realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",0,4).findAllAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertEquals(5,realmResults.size());
      assertTrue(realmResults.get(4).isValid());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertEquals(0,realmResults.size());
  Realm.asyncQueryExecutor.resume();
  workerThread.keepStrongReference.add(realmResults);
}
Program: 155744
Project: 155744
Buggy source:
@Test @RunTestInLooperThread public void testCombiningAsyncAndSync(){
  populateTestRealm(workerThread.realm,10);
  Realm.asyncQueryExecutor.pause();
  final RealmResults<AllTypes> allTypesAsync=workerThread.realm.where(AllTypes.class).greaterThan("String_Node_Str",5).findAllAsync();
  final RealmResults<AllTypes> allTypesSync=allTypesAsync.where().greaterThan("String_Node_Str",3).findAll();
  assertEquals(0,allTypesAsync.size());
  assertEquals(6,allTypesSync.size());
  allTypesAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertEquals(4,allTypesAsync.size());
      assertEquals(6,allTypesSync.size());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  Realm.asyncQueryExecutor.resume();
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testCombiningAsyncAndSync(){
  populateTestRealm(workerThread.realm,10);
  Realm.asyncQueryExecutor.pause();
  final RealmResults<AllTypes> allTypesAsync=workerThread.realm.where(AllTypes.class).greaterThan("String_Node_Str",5).findAllAsync();
  final RealmResults<AllTypes> allTypesSync=allTypesAsync.where().greaterThan("String_Node_Str",3).findAll();
  assertEquals(0,allTypesAsync.size());
  assertEquals(6,allTypesSync.size());
  allTypesAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertEquals(4,allTypesAsync.size());
      assertEquals(6,allTypesSync.size());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  Realm.asyncQueryExecutor.resume();
  workerThread.keepStrongReference.add(allTypesAsync);
}
Program: 155745
Project: 155745
Buggy source:
@Test @RunTestInLooperThread public void testFindFirstAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final AllTypes realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",4,9).findFirstAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertTrue(realmResults.isValid());
      assertEquals("String_Node_Str",realmResults.getColumnString());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertFalse(realmResults.isValid());
  try {
    realmResults.setColumnString("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalStateException ignored) {
  }
  Realm.asyncQueryExecutor.resume();
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testFindFirstAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final AllTypes realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",4,9).findFirstAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertTrue(realmResults.isValid());
      assertEquals("String_Node_Str",realmResults.getColumnString());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertFalse(realmResults.isValid());
  try {
    realmResults.setColumnString("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalStateException ignored) {
  }
  Realm.asyncQueryExecutor.resume();
  workerThread.keepStrongReference.add(realmResults);
}
Program: 155746
Project: 155746
Buggy source:
@Test @RunTestInLooperThread public void testFindFirstAsyncWithInitialEmptyRow() throws Throwable {
  final AllTypes firstAsync=workerThread.realm.where(AllTypes.class).findFirstAsync();
  firstAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(firstAsync.load());
      assertTrue(firstAsync.isLoaded());
      assertTrue(firstAsync.isValid());
      assertEquals(0,firstAsync.getColumnLong());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertTrue(firstAsync.load());
  assertTrue(firstAsync.isLoaded());
  assertFalse(firstAsync.isValid());
  populateTestRealm(workerThread.realm,10);
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testFindFirstAsyncWithInitialEmptyRow() throws Throwable {
  final AllTypes firstAsync=workerThread.realm.where(AllTypes.class).findFirstAsync();
  firstAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(firstAsync.load());
      assertTrue(firstAsync.isLoaded());
      assertTrue(firstAsync.isValid());
      assertEquals(0,firstAsync.getColumnLong());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertTrue(firstAsync.load());
  assertTrue(firstAsync.isLoaded());
  assertFalse(firstAsync.isValid());
  populateTestRealm(workerThread.realm,10);
  workerThread.keepStrongReference.add(firstAsync);
}
Program: 155747
Project: 155747
Buggy source:
@Test @RunTestInLooperThread public void testFindAllAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final RealmResults<AllTypes> realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",0,4).findAllAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertEquals(5,realmResults.size());
      assertTrue(realmResults.get(4).isValid());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertEquals(0,realmResults.size());
  Realm.asyncQueryExecutor.resume();
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testFindAllAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final RealmResults<AllTypes> realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",0,4).findAllAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertEquals(5,realmResults.size());
      assertTrue(realmResults.get(4).isValid());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertEquals(0,realmResults.size());
  Realm.asyncQueryExecutor.resume();
  workerThread.keepStrongReference.add(realmResults);
}
Program: 155748
Project: 155748
Buggy source:
@Test @RunTestInLooperThread public void testCombiningAsyncAndSync(){
  populateTestRealm(workerThread.realm,10);
  Realm.asyncQueryExecutor.pause();
  final RealmResults<AllTypes> allTypesAsync=workerThread.realm.where(AllTypes.class).greaterThan("String_Node_Str",5).findAllAsync();
  final RealmResults<AllTypes> allTypesSync=allTypesAsync.where().greaterThan("String_Node_Str",3).findAll();
  assertEquals(0,allTypesAsync.size());
  assertEquals(6,allTypesSync.size());
  allTypesAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertEquals(4,allTypesAsync.size());
      assertEquals(6,allTypesSync.size());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  Realm.asyncQueryExecutor.resume();
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testCombiningAsyncAndSync(){
  populateTestRealm(workerThread.realm,10);
  Realm.asyncQueryExecutor.pause();
  final RealmResults<AllTypes> allTypesAsync=workerThread.realm.where(AllTypes.class).greaterThan("String_Node_Str",5).findAllAsync();
  final RealmResults<AllTypes> allTypesSync=allTypesAsync.where().greaterThan("String_Node_Str",3).findAll();
  assertEquals(0,allTypesAsync.size());
  assertEquals(6,allTypesSync.size());
  allTypesAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertEquals(4,allTypesAsync.size());
      assertEquals(6,allTypesSync.size());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  Realm.asyncQueryExecutor.resume();
  workerThread.keepStrongReference.add(allTypesAsync);
}
Program: 155749
Project: 155749
Buggy source:
@Test @RunTestInLooperThread public void testFindFirstAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final AllTypes realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",4,9).findFirstAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertTrue(realmResults.isValid());
      assertEquals("String_Node_Str",realmResults.getColumnString());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertFalse(realmResults.isValid());
  try {
    realmResults.setColumnString("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalStateException ignored) {
  }
  Realm.asyncQueryExecutor.resume();
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testFindFirstAsyncWithNotification() throws Throwable {
  Realm.asyncQueryExecutor.pause();
  populateTestRealm(workerThread.realm,10);
  final AllTypes realmResults=workerThread.realm.where(AllTypes.class).between("String_Node_Str",4,9).findFirstAsync();
  realmResults.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(realmResults.isLoaded());
      assertTrue(realmResults.isValid());
      assertEquals("String_Node_Str",realmResults.getColumnString());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertFalse(realmResults.isLoaded());
  assertFalse(realmResults.isValid());
  try {
    realmResults.setColumnString("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalStateException ignored) {
  }
  Realm.asyncQueryExecutor.resume();
  workerThread.keepStrongReference.add(realmResults);
}
Program: 155750
Project: 155750
Buggy source:
@Test @RunTestInLooperThread public void testFindFirstAsyncWithInitialEmptyRow() throws Throwable {
  final AllTypes firstAsync=workerThread.realm.where(AllTypes.class).findFirstAsync();
  firstAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(firstAsync.load());
      assertTrue(firstAsync.isLoaded());
      assertTrue(firstAsync.isValid());
      assertEquals(0,firstAsync.getColumnLong());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertTrue(firstAsync.load());
  assertTrue(firstAsync.isLoaded());
  assertFalse(firstAsync.isValid());
  populateTestRealm(workerThread.realm,10);
}

Fixed version (ground truth):
@Test @RunTestInLooperThread public void testFindFirstAsyncWithInitialEmptyRow() throws Throwable {
  final AllTypes firstAsync=workerThread.realm.where(AllTypes.class).findFirstAsync();
  firstAsync.addChangeListener(new RealmChangeListener(){
    @Override public void onChange(){
      assertTrue(firstAsync.load());
      assertTrue(firstAsync.isLoaded());
      assertTrue(firstAsync.isValid());
      assertEquals(0,firstAsync.getColumnLong());
      workerThread.signalTestCompleted.countDown();
    }
  }
);
  assertTrue(firstAsync.load());
  assertTrue(firstAsync.isLoaded());
  assertFalse(firstAsync.isValid());
  populateTestRealm(workerThread.realm,10);
  workerThread.keepStrongReference.add(firstAsync);
}
Program: 155751
Project: 155751
Buggy source:
@Override public void run(){
  try {
    queriesCompleted.await();
    Realm bgRealm=Realm.getInstance(realm.getConfiguration());
    bgRealm.beginTransaction();
    bgRealm.createObject(AllTypes.class);
    bgRealm.createObject(AnnotationIndexTypes.class);
    bgRealm.commitTransaction();
    bgRealm.close();
  }
 catch (  InterruptedException e) {
    fail(e.getMessage());
  }
}

Fixed version (ground truth):
@Override public void run(){
  Realm instance=Realm.getInstance(configuration);
  instance.beginTransaction();
  Dog dog=instance.createObject(Dog.class);
  dog.setAge(10);
  dog.setName("String_Node_Str");
  Owner kiba=instance.createObject(Owner.class);
  kiba.setName("String_Node_Str");
  dog.setOwner(kiba);
  instance.commitTransaction();
  wait.countDown();
}
Program: 155752
Project: 155752
Buggy source:
@Override public void onChange(){
switch (findDistinctInvocation.incrementAndGet()) {
case 1:
{
      queriesCompleted.countDown();
      break;
    }
case 2:
{
    if (batchUpdateCompleted.incrementAndGet() == 4) {
      handler.post(new Runnable(){
        @Override public void run(){
          realm.close();
          signalTestFinished.countDown();
        }
      }
);
    }
    break;
  }
}
}

Fixed version (ground truth):
@Override public void onChange(){
switch (numberOfInvocations.incrementAndGet()) {
case 1:
{
      assertEquals(0,allAsync.size());
      assertTrue(allAsync.isLoaded());
      assertTrue(allAsync.isValid());
      assertTrue(allAsync.isEmpty());
      final CountDownLatch wait=new CountDownLatch(1);
      final RealmConfiguration configuration=realm[0].getConfiguration();
      new Thread(){
        @Override public void run(){
          Realm instance=Realm.getInstance(configuration);
          instance.beginTransaction();
          Dog dog=instance.createObject(Dog.class);
          dog.setAge(10);
          dog.setName("String_Node_Str");
          Owner kiba=instance.createObject(Owner.class);
          kiba.setName("String_Node_Str");
          dog.setOwner(kiba);
          instance.commitTransaction();
          wait.countDown();
        }
      }
.start();
      try {
        wait.await();
      }
 catch (      InterruptedException e) {
        fail(e.getMessage());
      }
      break;
    }
case 2:
{
    assertEquals(1,realm[0].allObjects(Dog.class).size());
    assertEquals(1,realm[0].allObjects(Owner.class).size());
    assertEquals(1,allAsync.size());
    assertTrue(allAsync.isLoaded());
    assertTrue(allAsync.isValid());
    assertFalse(allAsync.isEmpty());
    assertEquals(1,allAsync.size());
    assertEquals("String_Node_Str",allAsync.get(0).getName());
    assertEquals("String_Node_Str",allAsync.get(0).getOwner().getName());
    signalCallbackFinished.countDown();
    break;
  }
default :
throw new IllegalStateException("String_Node_Str");
}
}
Program: 155753
Project: 155753
Buggy source:
public void setFieldByte(byte fieldByte){
  this.fieldByte=fieldByte;
}

Fixed version (ground truth):
public void setFieldByte(byte fieldByte){
  realmSetter$fieldByte(fieldByte);
}
Program: 155754
Project: 155754
Buggy source:
public float getFieldFloat(){
  return fieldFloat;
}

Fixed version (ground truth):
public float getFieldFloat(){
  return realmGetter$fieldFloat();
}