nus-yam/ex-repair huggingface dataset:
Program: 17534
Project: 17534
Buggy source:
/** 
 * Users of this fragment must call this method to set up the navigation drawer interactions.
 * @param fragmentId   The android:id of this fragment in its activity's layout.
 * @param drawerLayout The DrawerLayout containing this fragment's UI.
 */
public void setUp(int fragmentId,DrawerLayout drawerLayout){
  mFragmentContainerView=getActivity().findViewById(fragmentId);
  mDrawerLayout=drawerLayout;
  ActionBar ab=getSupportActivity().getSupportActionBar();
  if (ab != null) {
    mDrawerListView.setAdapter(new ArrayAdapter<>(ab.getThemedContext(),R.layout.drawer_list_item,android.R.id.text1,new String[]{getString(R.string.flasher),getString(R.string.recovery_script_manager),getString(R.string.donate),getString(R.string.settings)}));
    mDrawerToggle=new ActionBarDrawerToggle(getActivity(),mDrawerLayout,getSupportActivity().getToolbar(),R.string.app_name,R.string.app_name){
      @Override public void onDrawerClosed(      View drawerView){
        super.onDrawerClosed(drawerView);
        if (!isAdded()) {
          return;
        }
        getSupportActivity().invalidateOptionsMenu();
      }
      @Override public void onDrawerOpened(      View drawerView){
        super.onDrawerOpened(drawerView);
        if (!isAdded()) {
          return;
        }
        getSupportActivity().invalidateOptionsMenu();
      }
    }
;
    mDrawerLayout.post(new Runnable(){
      @Override public void run(){
        mDrawerToggle.syncState();
      }
    }
);
    mDrawerLayout.setDrawerListener(mDrawerToggle);
    selectItem(0);
  }
}

Fixed version (ground truth):
/** 
 * Users of this fragment must call this method to set up the navigation drawer interactions.
 * @param fragmentId   The android:id of this fragment in its activity's layout.
 * @param drawerLayout The DrawerLayout containing this fragment's UI.
 */
public void setUp(int fragmentId,DrawerLayout drawerLayout){
  mFragmentContainerView=getActivity().findViewById(fragmentId);
  mDrawerLayout=drawerLayout;
  ActionBar ab=getSupportActivity().getSupportActionBar();
  if (ab != null) {
    mDrawerListView.setAdapter(new ArrayAdapter<>(ab.getThemedContext(),R.layout.drawer_list_item,android.R.id.text1,new String[]{getString(R.string.flasher),getString(R.string.recovery_script_manager),getString(R.string.donate),getString(R.string.settings)}));
    mDrawerToggle=new ActionBarDrawerToggle(getActivity(),mDrawerLayout,getSupportActivity().getToolbar(),R.string.app_name,R.string.app_name){
      @Override public void onDrawerClosed(      View drawerView){
        super.onDrawerClosed(drawerView);
        if (!isAdded()) {
          return;
        }
        getSupportActivity().invalidateOptionsMenu();
      }
      @Override public void onDrawerOpened(      View drawerView){
        super.onDrawerOpened(drawerView);
        if (!isAdded()) {
          return;
        }
        getSupportActivity().invalidateOptionsMenu();
      }
    }
;
    mDrawerLayout.post(new Runnable(){
      @Override public void run(){
        mDrawerToggle.syncState();
      }
    }
);
    mDrawerLayout.setDrawerListener(mDrawerToggle);
  }
}
Program: 17536
Project: 17536
Buggy source:
public void switchTo(Fragment fragment){
  getSupportFragmentManager().beginTransaction().setCustomAnimations(R.anim.abc_fade_in,R.anim.abc_fade_out).replace(R.id.container,fragment).commitAllowingStateLoss();
}

Fixed version (ground truth):
public void switchTo(Fragment fragment){
  getSupportFragmentManager().beginTransaction().setCustomAnimations(R.anim.abc_grow_fade_in_from_bottom,R.anim.abc_shrink_fade_out_from_bottom).replace(R.id.container,fragment).commitAllowingStateLoss();
}
Program: 17541
Project: 17541
Buggy source:
private void placeImgBack() throws IOException, FailedExecuteCommand {
  mShell.execCommand(Const.Busybox + "String_Node_Str" + tmpFile);
  Common.copyFile(tmpFile,mCustomIMG);
}

Fixed version (ground truth):
private void placeImgBack() throws IOException, FailedExecuteCommand {
  mShell.execCommand(Const.Busybox + "String_Node_Str" + tmpFile+ "String_Node_Str");
  Common.copyFile(tmpFile,mCustomIMG);
}
Program: 17542
Project: 17542
Buggy source:
public void MTD() throws FailedExecuteCommand, IOException {
  String Command;
  if (isJobRecovery()) {
    Command="String_Node_Str";
  }
 else   if (isJobKernel()) {
    Command="String_Node_Str";
  }
 else {
    return;
  }
  if (isJobFlash() || isJobRestore()) {
    Command=flash_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile.getAbsolutePath()+ "String_Node_Str";
  }
 else   if (isJobBackup()) {
    Command=dump_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile.getAbsolutePath()+ "String_Node_Str";
  }
  mShell.execCommand(Command);
  if (isJobBackup())   placeImgBack();
}

Fixed version (ground truth):
public void MTD() throws FailedExecuteCommand, IOException {
  String Command;
  if (isJobRecovery()) {
    Command="String_Node_Str";
  }
 else   if (isJobKernel()) {
    Command="String_Node_Str";
  }
 else {
    return;
  }
  if (isJobFlash() || isJobRestore()) {
    Command=flash_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile+ "String_Node_Str";
  }
 else   if (isJobBackup()) {
    Command=dump_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile+ "String_Node_Str";
  }
  mShell.execCommand(Command);
  if (isJobBackup())   placeImgBack();
}
Program: 17543
Project: 17543
Buggy source:
public void download(){
  if (onDownloadListener != null) {
    mDownloader.setOnDownloadListener(new Downloader.OnDownloadListener(){
      @Override public void onSuccess(      File file){
        mDownloadDialog.dismiss();
        onDownloadListener.onSuccess(file);
      }
      @Override public void onFail(      Exception e){
        mDownloadDialog.dismiss();
        onDownloadListener.onFail(e);
      }
    }
);
  }
  ConnectingDialog.setTitle(mContext.getResources().getString(R.string.connecting));
  ConnectingDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  ConnectingDialog.setMessage(mDownloader.getURL().toString());
  if (mCancelable) {
    ConnectingDialog.setButton(DialogInterface.BUTTON_NEGATIVE,mContext.getString(R.string.cancel),new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
        mDownloader.cancel();
      }
    }
);
  }
  ConnectingDialog.show();
  mDownloader.setOnUpdateListener(new Downloader.OnUpdateListener(){
    @Override public void onUpdate(    int MAX,    int Downloaded){
      updateProgress(MAX,Downloaded);
    }
  }
);
  mDownloader.download();
  Log.i(TAG,"String_Node_Str");
}

Fixed version (ground truth):
public void download(){
  mDownloader.setOnDownloadListener(new Downloader.OnDownloadListener(){
    @Override public void onSuccess(    File file){
      mDownloadDialog.dismiss();
      if (onDownloadListener != null) {
        onDownloadListener.onSuccess(file);
      }
    }
    @Override public void onFail(    Exception e){
      ConnectingDialog.dismiss();
      mDownloadDialog.dismiss();
      if (e != null) {
        Toast.makeText(mContext,e.toString(),Toast.LENGTH_SHORT).show();
      }
      if (onDownloadListener != null) {
        onDownloadListener.onFail(e);
      }
    }
  }
);
  ConnectingDialog.setTitle(mContext.getResources().getString(R.string.connecting));
  ConnectingDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
  ConnectingDialog.setMessage(mDownloader.getURL().toString());
  if (mCancelable) {
    ConnectingDialog.setButton(DialogInterface.BUTTON_NEGATIVE,mContext.getString(R.string.cancel),new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialog,      int which){
        mDownloader.cancel();
      }
    }
);
  }
  ConnectingDialog.show();
  mDownloader.setOnUpdateListener(new Downloader.OnUpdateListener(){
    @Override public void onUpdate(    int MAX,    int Downloaded){
      updateProgress(MAX,Downloaded);
    }
  }
);
  mDownloader.download();
  Log.i(TAG,"String_Node_Str");
}
Program: 17549
Project: 17549
Buggy source:
private void placeImgBack() throws IOException, FailedExecuteCommand {
  mToolbox.setFilePermissions(tmpFile,"String_Node_Str");
  Common.copyFile(tmpFile,mCustomIMG);
}

Fixed version (ground truth):
private void placeImgBack() throws IOException, FailedExecuteCommand {
  mShell.execCommand(Const.Busybox + "String_Node_Str" + tmpFile);
  Common.copyFile(tmpFile,mCustomIMG);
}
Program: 17550
Project: 17550
Buggy source:
public void MTD() throws FailedExecuteCommand, IOException {
  String Command;
  if (isJobRecovery()) {
    Command="String_Node_Str";
  }
 else   if (isJobKernel()) {
    Command="String_Node_Str";
  }
 else {
    return;
  }
  if (isJobFlash() || isJobRestore()) {
    Command=flash_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile.getAbsolutePath()+ "String_Node_Str";
  }
 else   if (isJobBackup()) {
    Command=dump_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile.getAbsolutePath()+ "String_Node_Str";
  }
  mShell.execCommand(Command,true);
  if (isJobBackup())   placeImgBack();
}

Fixed version (ground truth):
public void MTD() throws FailedExecuteCommand, IOException {
  String Command;
  if (isJobRecovery()) {
    Command="String_Node_Str";
  }
 else   if (isJobKernel()) {
    Command="String_Node_Str";
  }
 else {
    return;
  }
  if (isJobFlash() || isJobRestore()) {
    Command=flash_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile.getAbsolutePath()+ "String_Node_Str";
  }
 else   if (isJobBackup()) {
    Command=dump_image.getAbsolutePath() + Command + "String_Node_Str"+ tmpFile.getAbsolutePath()+ "String_Node_Str";
  }
  mShell.execCommand(Command);
  if (isJobBackup())   placeImgBack();
}
Program: 17552
Project: 17552
Buggy source:
public void checkUpdates(final int currentVersion){
  try {
    File versionsFile=new File(mContext.getFilesDir(),"String_Node_Str");
    DownloadDialog version=new DownloadDialog(mContext,new URL(Const.RASHR_VERSION_URL),versionsFile);
    version.setOverrideFile(true);
    version.setHidden(true);
    version.setOnDownloadListener(new DownloadDialog.OnDownloadListener(){
      @Override public void success(      File file){
        try {
          if (currentVersion < Integer.valueOf(Common.fileContent(file))) {
            new AlertDialog.Builder(mContext).setTitle(R.string.update_available).setMessage(R.string.download_update).setPositiveButton(R.string.open_playstore,new DialogInterface.OnClickListener(){
              @Override public void onClick(              DialogInterface dialog,              int which){
                startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str" + getPackageName())));
              }
            }
).setCancelable(false).show();
          }
 else {
            if (Common.getBooleanPref(mContext,Const.PREF_NAME,Const.PREF_KEY_HIDE_UPDATE_HINTS)) {
              Toast.makeText(mContext,R.string.app_uptodate,Toast.LENGTH_SHORT).show();
            }
          }
        }
 catch (        IOException ignore) {
        }
      }
      @Override public void failed(      Exception e){
        Toast.makeText(mContext,R.string.failed_update,Toast.LENGTH_SHORT).show();
      }
    }
);
    version.execute();
  }
 catch (  MalformedURLException ignore) {
  }
}

Fixed version (ground truth):
public void checkUpdates(final int currentVersion){
  try {
    File versionsFile=new File(mContext.getFilesDir(),"String_Node_Str");
    Downloader downloader=new Downloader(new URL(Const.RASHR_VERSION_URL),versionsFile);
    downloader.setOverrideFile(true);
    downloader.setOnDownloadListener(new Downloader.OnDownloadListener(){
      @Override public void onSuccess(      File file){
        try {
          if (currentVersion < Integer.valueOf(Common.fileContent(file))) {
            new AlertDialog.Builder(mContext).setTitle(R.string.update_available).setMessage(R.string.download_update).setPositiveButton(R.string.open_playstore,new DialogInterface.OnClickListener(){
              @Override public void onClick(              DialogInterface dialog,              int which){
                startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse("String_Node_Str" + getPackageName())));
              }
            }
).setCancelable(false).show();
          }
 else {
            if (Common.getBooleanPref(mContext,Const.PREF_NAME,Const.PREF_KEY_HIDE_UPDATE_HINTS)) {
              Toast.makeText(mContext,R.string.app_uptodate,Toast.LENGTH_SHORT).show();
            }
          }
        }
 catch (        IOException ignore) {
        }
      }
      @Override public void onFail(      Exception e){
        Toast.makeText(mContext,R.string.failed_update,Toast.LENGTH_SHORT).show();
      }
    }
);
    downloader.download();
  }
 catch (  MalformedURLException ignore) {
  }
}
Program: 17553
Project: 17553
Buggy source:
private void extractFiles() throws IOException {
  Const.RecoveryCollectionFile=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.RecoveryCollectionFile,R.raw.recovery_sums,mVersionChanged);
  Const.KernelCollectionFile=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.KernelCollectionFile,R.raw.kernel_sums,mVersionChanged);
  Const.Busybox=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.Busybox,R.raw.busybox,mVersionChanged);
  try {
    mToolbox.setFilePermissions(Const.Busybox,"String_Node_Str");
  }
 catch (  FailedExecuteCommand failedExecuteCommand) {
    failedExecuteCommand.printStackTrace();
  }
  File PartLayoutsZip=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,PartLayoutsZip,R.raw.partlayouts,mVersionChanged);
  File flash_image=new File(getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,flash_image,R.raw.flash_image,mVersionChanged);
  File dump_image=new File(getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,dump_image,R.raw.dump_image,mVersionChanged);
  Const.LokiPatch=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.LokiPatch,R.raw.loki_patch,mVersionChanged);
  Const.LokiFlash=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.LokiFlash,R.raw.loki_flash,mVersionChanged);
}

Fixed version (ground truth):
private void extractFiles() throws IOException {
  Const.RecoveryCollectionFile=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.RecoveryCollectionFile,R.raw.recovery_sums,mVersionChanged);
  Const.KernelCollectionFile=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.KernelCollectionFile,R.raw.kernel_sums,mVersionChanged);
  Const.Busybox=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.Busybox,R.raw.busybox,mVersionChanged);
  try {
    mShell.execCommand("String_Node_Str" + Const.Busybox);
  }
 catch (  FailedExecuteCommand failedExecuteCommand) {
    failedExecuteCommand.printStackTrace();
  }
  File PartLayoutsZip=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,PartLayoutsZip,R.raw.partlayouts,mVersionChanged);
  File flash_image=new File(getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,flash_image,R.raw.flash_image,mVersionChanged);
  File dump_image=new File(getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,dump_image,R.raw.dump_image,mVersionChanged);
  Const.LokiPatch=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.LokiPatch,R.raw.loki_patch,mVersionChanged);
  Const.LokiFlash=new File(mContext.getFilesDir(),"String_Node_Str");
  Common.pushFileFromRAW(mContext,Const.LokiFlash,R.raw.loki_flash,mVersionChanged);
}
Program: 17557
Project: 17557
Buggy source:
private void logCommand(SimpleCommand command){
  try {
    if (mContext != null) {
      if (mContext.getSharedPreferences(PREF_NAME,Context.MODE_PRIVATE).getBoolean(PREF_LOG,false)) {
        String Log="String_Node_Str";
        if (command.getExitCode() == 0) {
          Log+="String_Node_Str" + command.getCommand();
          if (!command.getOutput().equals("String_Node_Str")) {
            Log+="String_Node_Str" + command.getOutput();
          }
        }
 else {
          Log+="String_Node_Str" + command.getCommand() + "String_Node_Str";
          if (!command.getOutput().equals("String_Node_Str")) {
            Log+="String_Node_Str" + command.getOutput() + "String_Node_Str";
          }
        }
        FileOutputStream fo=mContext.openFileOutput(Logs,Context.MODE_APPEND);
        fo.write(Log.getBytes());
      }
    }
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void logCommand(SimpleCommand command){
  try {
    if (mContext != null) {
      if (mContext.getSharedPreferences(PREF_NAME,Context.MODE_PRIVATE).getBoolean(PREF_LOG,false)) {
        String Log="String_Node_Str";
        if (command.getExitCode() == 0) {
          Log+="String_Node_Str" + command.getCommand();
        }
 else {
          Log+="String_Node_Str" + command.getCommand() + "String_Node_Str";
        }
        if (!command.getOutput().equals("String_Node_Str")) {
          Log+="String_Node_Str" + command.getOutput();
        }
        FileOutputStream fo=mContext.openFileOutput(Logs,Context.MODE_APPEND);
        fo.write(Log.getBytes());
        fo.close();
      }
    }
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 17561
Project: 17561
Buggy source:
@Test public void getTicketsById() throws Exception {
  createClientWithTokenOrPassword();
  long count=22;
  for (  Ticket t : instance.getTickets(22,24,26)) {
    assertThat(t.getSubject(),notNullValue());
    assertThat(t.getId(),is(count));
    count+=2;
  }
  assertThat(count,is(28L));
}

Fixed version (ground truth):
@Test public void getTicketsById() throws Exception {
  createClientWithTokenOrPassword();
  long count=24;
  for (  Ticket t : instance.getTickets(24,26,28)) {
    assertThat(t.getSubject(),notNullValue());
    assertThat(t.getId(),is(count));
    count+=2;
  }
  assertThat(count,is(30L));
}
Program: 17562
Project: 17562
Buggy source:
protected <T>PagedAsyncCompletionHandler<List<T>> handleIncrementalList(final Class<T> clazz,final String name){
  return new PagedAsyncListCompletionHandler<T>(clazz,name){
    @Override public void setPagedProperties(    JsonNode responseNode,    Class<?> clazz){
      JsonNode node=responseNode.get(NEXT_PAGE);
      if (node == null) {
        throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      JsonNode endTimeNode=responseNode.get(END_TIME);
      if (endTimeNode == null || endTimeNode.asLong() == 0) {
        throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
        setNextPage(null);
      }
 else {
        setNextPage(node.asText());
      }
    }
  }
;
}

Fixed version (ground truth):
protected <T>PagedAsyncCompletionHandler<List<T>> handleIncrementalList(final Class<T> clazz,final String name){
  return new PagedAsyncListCompletionHandler<T>(clazz,name){
    @Override public void setPagedProperties(    JsonNode responseNode,    Class<?> clazz){
      JsonNode node=responseNode.get(NEXT_PAGE);
      if (node == null) {
        throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      JsonNode endTimeNode=responseNode.get(END_TIME);
      if (endTimeNode == null || endTimeNode.asLong() == 0) {
        throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
        setNextPage(null);
      }
 else {
        JsonNode countNode=responseNode.get(COUNT);
        if (countNode == null) {
          throw new NullPointerException(COUNT + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
        }
        if (countNode.asInt() < INCREMENTAL_EXPORT_MAX_COUNT_BY_REQUEST) {
          setNextPage(null);
        }
 else {
          setNextPage(node.asText());
        }
      }
    }
  }
;
}
Program: 17563
Project: 17563
Buggy source:
@Override public void setPagedProperties(JsonNode responseNode,Class<?> clazz){
  JsonNode node=responseNode.get(NEXT_PAGE);
  if (node == null) {
    throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  JsonNode endTimeNode=responseNode.get(END_TIME);
  if (endTimeNode == null || endTimeNode.asLong() == 0) {
    throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
    setNextPage(null);
  }
 else {
    setNextPage(node.asText());
  }
}

Fixed version (ground truth):
@Override public void setPagedProperties(JsonNode responseNode,Class<?> clazz){
  JsonNode node=responseNode.get(NEXT_PAGE);
  if (node == null) {
    throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  JsonNode endTimeNode=responseNode.get(END_TIME);
  if (endTimeNode == null || endTimeNode.asLong() == 0) {
    throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
    setNextPage(null);
  }
 else {
    JsonNode countNode=responseNode.get(COUNT);
    if (countNode == null) {
      throw new NullPointerException(COUNT + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
    }
    if (countNode.asInt() < INCREMENTAL_EXPORT_MAX_COUNT_BY_REQUEST) {
      setNextPage(null);
    }
 else {
      setNextPage(node.asText());
    }
  }
}
Program: 17564
Project: 17564
Buggy source:
protected PagedAsyncCompletionHandler<List<SearchResultEntity>> handleSearchList(final String name){
  return new PagedAsyncCompletionHandler<List<SearchResultEntity>>(){
    @Override public List<SearchResultEntity> onCompleted(    Response response) throws Exception {
      logResponse(response);
      if (isStatus2xx(response)) {
        JsonNode responseNode=mapper.readTree(response.getResponseBodyAsStream()).get(name);
        setPagedProperties(responseNode,null);
        List<SearchResultEntity> values=new ArrayList<SearchResultEntity>();
        for (        JsonNode node : responseNode) {
          Class<? extends SearchResultEntity> clazz=searchResultTypes.get(node.get("String_Node_Str"));
          if (clazz != null) {
            values.add(mapper.convertValue(node,clazz));
          }
        }
        return values;
      }
      throw new ZendeskResponseException(response);
    }
  }
;
}

Fixed version (ground truth):
protected PagedAsyncCompletionHandler<List<SearchResultEntity>> handleSearchList(final String name){
  return new PagedAsyncCompletionHandler<List<SearchResultEntity>>(){
    @Override public List<SearchResultEntity> onCompleted(    Response response) throws Exception {
      logResponse(response);
      if (isStatus2xx(response)) {
        JsonNode responseNode=mapper.readTree(response.getResponseBodyAsStream()).get(name);
        setPagedProperties(responseNode,null);
        List<SearchResultEntity> values=new ArrayList<SearchResultEntity>();
        for (        JsonNode node : responseNode) {
          Class<? extends SearchResultEntity> clazz=searchResultTypes.get(node.get("String_Node_Str").asText());
          if (clazz != null) {
            values.add(mapper.convertValue(node,clazz));
          }
        }
        return values;
      }
      throw new ZendeskResponseException(response);
    }
  }
;
}
Program: 17565
Project: 17565
Buggy source:
protected <T>PagedAsyncCompletionHandler<List<T>> handleIncrementalList(final Class<T> clazz,final String name){
  return new PagedAsyncListCompletionHandler<T>(clazz,name){
    @Override public void setPagedProperties(    JsonNode responseNode,    Class<?> clazz){
      JsonNode node=responseNode.get(NEXT_PAGE);
      if (node == null) {
        throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      JsonNode endTimeNode=responseNode.get(END_TIME);
      if (endTimeNode == null || endTimeNode.asLong() == 0) {
        throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
        setNextPage(null);
      }
 else {
        setNextPage(node.asText());
      }
    }
  }
;
}

Fixed version (ground truth):
protected <T>PagedAsyncCompletionHandler<List<T>> handleIncrementalList(final Class<T> clazz,final String name){
  return new PagedAsyncListCompletionHandler<T>(clazz,name){
    @Override public void setPagedProperties(    JsonNode responseNode,    Class<?> clazz){
      JsonNode node=responseNode.get(NEXT_PAGE);
      if (node == null) {
        throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      JsonNode endTimeNode=responseNode.get(END_TIME);
      if (endTimeNode == null || endTimeNode.asLong() == 0) {
        throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
      }
      if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
        setNextPage(null);
      }
 else {
        JsonNode countNode=responseNode.get(COUNT);
        if (countNode == null) {
          throw new NullPointerException(COUNT + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
        }
        if (countNode.asInt() < INCREMENTAL_EXPORT_MAX_COUNT_BY_REQUEST) {
          setNextPage(null);
        }
 else {
          setNextPage(node.asText());
        }
      }
    }
  }
;
}
Program: 17566
Project: 17566
Buggy source:
@Override public void setPagedProperties(JsonNode responseNode,Class<?> clazz){
  JsonNode node=responseNode.get(NEXT_PAGE);
  if (node == null) {
    throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  JsonNode endTimeNode=responseNode.get(END_TIME);
  if (endTimeNode == null || endTimeNode.asLong() == 0) {
    throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
    setNextPage(null);
  }
 else {
    setNextPage(node.asText());
  }
}

Fixed version (ground truth):
@Override public void setPagedProperties(JsonNode responseNode,Class<?> clazz){
  JsonNode node=responseNode.get(NEXT_PAGE);
  if (node == null) {
    throw new NullPointerException(NEXT_PAGE + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  JsonNode endTimeNode=responseNode.get(END_TIME);
  if (endTimeNode == null || endTimeNode.asLong() == 0) {
    throw new NullPointerException(END_TIME + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
  }
  if (TimeUnit.SECONDS.toMillis(endTimeNode.asLong()) > System.currentTimeMillis() - FIVE_MINUTES) {
    setNextPage(null);
  }
 else {
    JsonNode countNode=responseNode.get(COUNT);
    if (countNode == null) {
      throw new NullPointerException(COUNT + "String_Node_Str" + (clazz != null ? "String_Node_Str" + clazz.getName() : "String_Node_Str"));
    }
    if (countNode.asInt() < INCREMENTAL_EXPORT_MAX_COUNT_BY_REQUEST) {
      setNextPage(null);
    }
 else {
      setNextPage(node.asText());
    }
  }
}
Program: 17567
Project: 17567
Buggy source:
public boolean hasNext(){
  if (current == null || !current.hasNext()) {
    if (page > 0) {
      List<T> values=complete(submit(req("String_Node_Str",url,page++),handler));
      if (values.isEmpty()) {
        page=-1;
      }
      current=values.iterator();
    }
 else {
      return false;
    }
  }
  return current.hasNext();
}

Fixed version (ground truth):
public boolean hasNext(){
  if (current == null || !current.hasNext()) {
    if (page > 0) {
      List<T> values=complete(submit(req("String_Node_Str",url,page++),handler));
      if (values == null || values.isEmpty()) {
        page=-1;
      }
 else {
synchronized (this) {
          size+=values.size();
        }
        current=values.iterator();
      }
    }
 else {
      return false;
    }
  }
  return current.hasNext();
}
Program: 17568
Project: 17568
Buggy source:
protected <T>AsyncCompletionHandler<List<T>> handleList(final Class<T> clazz,final String name){
  return new AsyncCompletionHandler<List<T>>(){
    @Override public List<T> onCompleted(    Response response) throws Exception {
      logResponse(response);
      if (isStatus2xx(response)) {
        List<T> values=new ArrayList<T>();
        for (        JsonNode node : mapper.readTree(response.getResponseBodyAsBytes()).get(name)) {
          values.add(mapper.convertValue(node,clazz));
        }
        return values;
      }
      throw new ZendeskResponseException(response);
    }
  }
;
}

Fixed version (ground truth):
protected <T>AsyncCompletionHandler<List<T>> handleList(final Class<T> clazz,final String name){
  final AtomicInteger readCount=new AtomicInteger(0);
  return new AsyncCompletionHandler<List<T>>(){
    @Override public List<T> onCompleted(    Response response) throws Exception {
      logResponse(response);
      if (isStatus2xx(response)) {
        JsonNode responseNode=mapper.readTree(response.getResponseBodyAsBytes());
        int count=responseNode.get("String_Node_Str").asInt();
        if (count > readCount.get()) {
          List<T> values=new ArrayList<T>();
          for (          JsonNode node : responseNode.get(name)) {
            values.add(mapper.convertValue(node,clazz));
            readCount.incrementAndGet();
          }
          return values;
        }
 else {
          return null;
        }
      }
      throw new ZendeskResponseException(response);
    }
  }
;
}
Program: 17569
Project: 17569
Buggy source:
@Override public List<Target> onCompleted(Response response) throws Exception {
  logResponse(response);
  if (isStatus2xx(response)) {
    List<Target> values=new ArrayList<Target>();
    for (    JsonNode node : mapper.readTree(response.getResponseBodyAsBytes()).get(name)) {
      Class<? extends Target> clazz=targetTypes.get(node.get("String_Node_Str").asText());
      if (clazz != null) {
        values.add(mapper.convertValue(node,clazz));
      }
    }
    return values;
  }
  throw new ZendeskResponseException(response);
}

Fixed version (ground truth):
@Override public List<Target> onCompleted(Response response) throws Exception {
  logResponse(response);
  if (isStatus2xx(response)) {
    JsonNode responseNode=mapper.readTree(response.getResponseBodyAsBytes());
    int count=responseNode.get("String_Node_Str").asInt();
    if (count > readCount.get()) {
      List<Target> values=new ArrayList<Target>();
      for (      JsonNode node : responseNode.get(name)) {
        Class<? extends Target> clazz=targetTypes.get(node.get("String_Node_Str").asText());
        if (clazz != null) {
          values.add(mapper.convertValue(node,clazz));
        }
        readCount.incrementAndGet();
      }
      return values;
    }
 else {
      return null;
    }
  }
  throw new ZendeskResponseException(response);
}
Program: 17570
Project: 17570
Buggy source:
protected AsyncCompletionHandler<List<Target>> handleTargetList(final String name){
  return new AsyncCompletionHandler<List<Target>>(){
    @Override public List<Target> onCompleted(    Response response) throws Exception {
      logResponse(response);
      if (isStatus2xx(response)) {
        List<Target> values=new ArrayList<Target>();
        for (        JsonNode node : mapper.readTree(response.getResponseBodyAsBytes()).get(name)) {
          Class<? extends Target> clazz=targetTypes.get(node.get("String_Node_Str").asText());
          if (clazz != null) {
            values.add(mapper.convertValue(node,clazz));
          }
        }
        return values;
      }
      throw new ZendeskResponseException(response);
    }
  }
;
}

Fixed version (ground truth):
protected AsyncCompletionHandler<List<Target>> handleTargetList(final String name){
  final AtomicInteger readCount=new AtomicInteger(0);
  return new AsyncCompletionHandler<List<Target>>(){
    @Override public List<Target> onCompleted(    Response response) throws Exception {
      logResponse(response);
      if (isStatus2xx(response)) {
        JsonNode responseNode=mapper.readTree(response.getResponseBodyAsBytes());
        int count=responseNode.get("String_Node_Str").asInt();
        if (count > readCount.get()) {
          List<Target> values=new ArrayList<Target>();
          for (          JsonNode node : responseNode.get(name)) {
            Class<? extends Target> clazz=targetTypes.get(node.get("String_Node_Str").asText());
            if (clazz != null) {
              values.add(mapper.convertValue(node,clazz));
            }
            readCount.incrementAndGet();
          }
          return values;
        }
 else {
          return null;
        }
      }
      throw new ZendeskResponseException(response);
    }
  }
;
}
Program: 17571
Project: 17571
Buggy source:
public void setForumType(final String forumType){
  this.forumType=forumType;
}

Fixed version (ground truth):
public void setForumType(final Topic.TopicType forumType){
  this.forumType=forumType;
}
Program: 17572
Project: 17572
Buggy source:
public void setAccess(final String access){
  this.access=access;
}

Fixed version (ground truth):
public void setAccess(final Access access){
  this.access=access;
}
Program: 17573
Project: 17573
Buggy source:
public String getAccess(){
  return access;
}

Fixed version (ground truth):
public Access getAccess(){
  return access;
}
Program: 17574
Project: 17574
Buggy source:
@JsonProperty("String_Node_Str") public String getForumType(){
  return forumType;
}

Fixed version (ground truth):
@JsonProperty("String_Node_Str") public Topic.TopicType getForumType(){
  return forumType;
}
Program: 17575
Project: 17575
Buggy source:
private Request req(String method,Uri template,int page){
  RequestBuilder builder=new RequestBuilder(method);
  if (realm != null) {
    builder.setRealm(realm);
  }
  builder.addQueryParameter("String_Node_Str",Integer.toString(page));
  builder.setUrl(template.toString());
  return builder.build();
}

Fixed version (ground truth):
private Request req(String method,Uri template,int page){
  RequestBuilder builder=new RequestBuilder(method);
  if (realm != null) {
    builder.setRealm(realm);
  }
  builder.addQueryParameter("String_Node_Str",Integer.toString(page));
  builder.setUrl(template.toString().replace("String_Node_Str","String_Node_Str"));
  return builder.build();
}
Program: 17576
Project: 17576
Buggy source:
private Try<TestExecution> runShapes(){
  return Try.of(() -> {
    val shapesSource=SchemaSourceFactory.createSchemaSourceSimple(getId(),getShapesGraphUri(),new RdfModelReader(getDataGraph()));
    val testSuite=new TestSuite(new ShaclTestGenerator().generate(shapesSource));
    val testSource=new TestSourceBuilder().setImMemSingle().setInMemReader(new RdfModelReader(getDataGraph())).setPrefixUri(getId(),getDataGraphUri()).setReferenceSchemata(SchemaSourceFactory.createSchemaSourceSimple(getShapesGraphUri())).build();
    return RDFUnitStaticValidator.validate(shaclFullTestCaseResult,getDataGraph(),testSuite);
  }
);
}

Fixed version (ground truth):
private Try<TestExecution> runShapes(){
  return Try.of(() -> {
    val shapesSource=SchemaSourceFactory.createSchemaSourceSimple(getId(),getShapesGraphUri(),new RdfModelReader(getShapesGraph()));
    val testSuite=new TestSuite(new ShaclTestGenerator().generate(shapesSource));
    return RDFUnitStaticValidator.validate(shaclFullTestCaseResult,getDataGraph(),testSuite);
  }
);
}
Program: 17577
Project: 17577
Buggy source:
public Set<TestCase> generateTestCases(){
  ImmutableSet.Builder<TestCase> testCaseBuilder=ImmutableSet.builder();
  shapesGraph.getComponents().forEach(component -> {
    allTargets.entrySet().forEach(entry -> {
      testCaseBuilder.addAll(ConstraintTestCaseFactory.createFromComponentAndShape(component,entry.getKey(),entry.getValue()));
      testCaseBuilder.addAll(ConstraintTestCaseFactory.createFromSparqlContraintInShape(entry.getKey(),entry.getValue()));
    }
);
  }
);
  return testCaseBuilder.build();
}

Fixed version (ground truth):
public Set<TestCase> generateTestCases(){
  ImmutableSet.Builder<TestCase> testCaseBuilder=ImmutableSet.builder();
  allTargets.entrySet().forEach(entry -> {
    testCaseBuilder.addAll(ConstraintTestCaseFactory.createFromSparqlContraintInShape(entry.getKey(),entry.getValue()));
    shapesGraph.getComponents().forEach(component -> {
      testCaseBuilder.addAll(ConstraintTestCaseFactory.createFromComponentAndShape(component,entry.getKey(),entry.getValue()));
    }
);
  }
);
  return testCaseBuilder.build();
}
Program: 17579
Project: 17579
Buggy source:
/** 
 * <p>generateTestSuite.</p>
 * @param testFolder a {@link java.lang.String} object.
 * @param dataset a {@link org.aksw.rdfunit.sources.Source} object.
 * @param autoGenerators a {@link java.util.Collection} object.
 * @return a {@link org.aksw.rdfunit.model.interfaces.TestSuite} object.
 */
public TestSuite generateTestSuite(String testFolder,TestSource dataset,Collection<TestGenerator> autoGenerators){
  Collection<SchemaSource> sources=dataset.getReferencesSchemata();
  for (  TestGeneratorExecutorMonitor monitor : progressMonitors) {
    monitor.generationStarted(dataset,sources.size());
  }
  Collection<TestCase> allTests=new ArrayList<>();
  for (  SchemaSource s : sources) {
    if (isCanceled) {
      break;
    }
    if (s.getModel() == null || s.getModel().isEmpty()) {
      log.error("String_Node_Str",s.getUri());
      continue;
    }
    if (useAutoTests) {
      allTests.addAll(generateAutoTestsForSchemaSource(testFolder,s,autoGenerators));
    }
    if (useManualTests) {
      allTests.addAll(generateManualTestsForSource(testFolder,s));
    }
    allTests.addAll(new ShaclTestGenerator().generate(s));
  }
  if (!isCanceled && useManualTests) {
    allTests.addAll(generateManualTestsForSource(testFolder,dataset));
  }
  for (  TestGeneratorExecutorMonitor monitor : progressMonitors) {
    monitor.generationFinished();
  }
  return new TestSuite(allTests);
}

Fixed version (ground truth):
/** 
 * <p>generateTestSuite.</p>
 * @param testFolder a {@link java.lang.String} object.
 * @param dataset a {@link org.aksw.rdfunit.sources.Source} object.
 * @param autoGenerators a {@link java.util.Collection} object.
 * @return a {@link org.aksw.rdfunit.model.interfaces.TestSuite} object.
 */
public TestSuite generateTestSuite(String testFolder,TestSource dataset,Collection<TestGenerator> autoGenerators){
  Collection<SchemaSource> sources=dataset.getReferencesSchemata();
  for (  TestGeneratorExecutorMonitor monitor : progressMonitors) {
    monitor.generationStarted(dataset,sources.size());
  }
  Collection<TestCase> allTests=new ArrayList<>();
  for (  SchemaSource s : sources) {
    if (isCanceled) {
      break;
    }
    if (s.getModel() == null || s.getModel().isEmpty()) {
      log.error("String_Node_Str",s.getUri());
      continue;
    }
    if (useAutoTests) {
      allTests.addAll(generateAutoTestsForSchemaSource(testFolder,s,autoGenerators));
    }
    if (useManualTests) {
      allTests.addAll(generateManualTestsForSource(testFolder,s));
    }
  }
  if (!isCanceled && useManualTests) {
    allTests.addAll(generateManualTestsForSource(testFolder,dataset));
  }
  for (  TestGeneratorExecutorMonitor monitor : progressMonitors) {
    monitor.generationFinished();
  }
  return new TestSuite(allTests);
}
Program: 17580
Project: 17580
Buggy source:
private void testMap(Map<String,Integer> datasets,TestSuite testSuite,SchemaSource ontologySource){
  DatasetOverviewResults overviewResults=new DatasetOverviewResults();
  for (  Map.Entry<String,Integer> entry : datasets.entrySet()) {
    String resource=entry.getKey();
    int errors=datasets.get(resource);
    long failedTestCases=-1;
    for (    TestCaseExecutionType executionType : TestCaseExecutionType.values()) {
      final TestSource modelSource=new TestSourceBuilder().setImMemSingle().setPrefixUri("String_Node_Str",resource).setInMemReader(RdfReaderFactory.createResourceReader(resourcePrefix + resource)).setReferenceSchemata(ontologySource).build();
      RDFUnitStaticValidator.validate(executionType,modelSource,testSuite,overviewResults);
      if (!executionType.equals(TestCaseExecutionType.statusTestCaseResult)) {
        assertEquals(executionType + "String_Node_Str" + resource,errors,overviewResults.getIndividualErrors());
      }
      if (failedTestCases == -1) {
        failedTestCases=overviewResults.getFailedTests();
      }
 else {
        assertEquals(executionType + "String_Node_Str" + resource,failedTestCases,overviewResults.getFailedTests());
      }
      assertEquals(executionType + "String_Node_Str" + resource,0,overviewResults.getErrorTests());
    }
  }
}

Fixed version (ground truth):
private void testMap(Map<String,Integer> datasets,TestSuite testSuite,SchemaSource ontologySource) throws RdfReaderException {
  DatasetOverviewResults overviewResults=new DatasetOverviewResults();
  for (  Map.Entry<String,Integer> entry : datasets.entrySet()) {
    String resource=resourcePrefix + entry.getKey();
    int errors=entry.getValue();
    long failedTestCases=-1;
    for (    TestCaseExecutionType executionType : TestCaseExecutionType.values()) {
      final TestSource modelSource=new TestSourceBuilder().setImMemSingle().setPrefixUri("String_Node_Str",resource).setInMemReader(new RdfModelReader(RdfReaderFactory.createResourceReader(resource).read())).setReferenceSchemata(ontologySource).build();
      RDFUnitStaticValidator.validate(executionType,modelSource,testSuite,overviewResults);
      if (!executionType.equals(TestCaseExecutionType.statusTestCaseResult)) {
        assertEquals(executionType + "String_Node_Str" + resource,errors,overviewResults.getIndividualErrors());
      }
      if (failedTestCases == -1) {
        failedTestCases=overviewResults.getFailedTests();
      }
 else {
        assertEquals(executionType + "String_Node_Str" + resource,failedTestCases,overviewResults.getFailedTests());
      }
      assertEquals(executionType + "String_Node_Str" + resource,0,overviewResults.getErrorTests());
    }
  }
}
Program: 17581
Project: 17581
Buggy source:
/** 
 * {@inheritDoc} 
 */
@Override public ExtendedTestCaseResult read(final Resource resource){
  checkNotNull(resource);
  RLOGTestCaseResult test=RLOGTestCaseResultReader.create().read(resource);
  SimpleAnnotationSet annotationSet=SimpleAnnotationSet.create();
  Set<Property> excludesProperties=ImmutableSet.of(RLOG.level,RLOG.resource,RLOG.message,PROV.wasGeneratedBy,DCTerms.date);
  Set<Resource> excludesTypes=ImmutableSet.of(RDFUNITv.RLOGTestCaseResult,RDFUNITv.TestCaseResult,RLOG.Entry);
  for (  Statement smt : resource.listProperties().toList()) {
    if (excludesProperties.contains(smt.getPredicate())) {
      continue;
    }
    if (RDF.type.equals(smt.getPredicate()) && excludesTypes.contains(smt.getObject().asResource())) {
      continue;
    }
    annotationSet.add(smt.getPredicate(),smt.getObject());
  }
  return new ExtendedTestCaseResultImpl(resource,test.getTestCaseUri(),test.getSeverity(),test.getMessage(),test.getTimestamp(),test.getFailingResource(),annotationSet.getAnnotations());
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public ExtendedTestCaseResult read(final Resource resource){
  checkNotNull(resource);
  RLOGTestCaseResult test=RLOGTestCaseResultReader.create().read(resource);
  SimpleAnnotationSet annotationSet=SimpleAnnotationSet.create();
  Set<Property> excludesProperties=ImmutableSet.of(RLOG.level,RLOG.resource,RLOG.message,PROV.wasGeneratedBy,DCTerms.date,RDFUNITv.testCase);
  Set<Resource> excludesTypes=ImmutableSet.of(RDFUNITv.RLOGTestCaseResult,RDFUNITv.TestCaseResult,RLOG.Entry);
  for (  Statement smt : resource.listProperties().toList()) {
    if (excludesProperties.contains(smt.getPredicate())) {
      continue;
    }
    if (RDF.type.equals(smt.getPredicate()) && excludesTypes.contains(smt.getObject().asResource())) {
      continue;
    }
    annotationSet.add(smt.getPredicate(),smt.getObject());
  }
  return new ExtendedTestCaseResultImpl(resource,test.getTestCaseUri(),test.getSeverity(),test.getMessage(),test.getTimestamp(),test.getFailingResource(),annotationSet.getAnnotations());
}
Program: 17583
Project: 17583
Buggy source:
@Test public void test() throws Exception {
  assertThat(inputModel.isEmpty()).isFalse();
  Model outputModel=ModelFactory.createDefaultModel();
  outputModel.setNsPrefixes(inputModel.getNsPrefixMap());
  for (  Resource testExecutionResource : inputModel.listResourcesWithProperty(RDF.type,RDFUNITv.TestExecution).toList()) {
    TestExecution testExecution=TestExecutionReader.create().read(testExecutionResource);
    TestExecutionWriter writer=TestExecutionWriter.create(testExecution);
    writer.write(outputModel);
  }
  Model difference=inputModel.difference(outputModel);
  assertThat(difference.isEmpty()).isTrue();
}

Fixed version (ground truth):
@Test public void test() throws Exception {
  assertThat(inputModel.isEmpty()).isFalse();
  Model outputModel=ModelFactory.createDefaultModel();
  outputModel.setNsPrefixes(inputModel.getNsPrefixMap());
  for (  Resource testExecutionResource : inputModel.listResourcesWithProperty(RDF.type,RDFUNITv.TestExecution).toList()) {
    TestExecution testExecution=TestExecutionReader.create().read(testExecutionResource);
    TestExecutionWriter writer=TestExecutionWriter.create(testExecution);
    writer.write(outputModel);
  }
  assertThat(inputModel.isIsomorphicWith(outputModel)).isTrue();
}