nus-yam/ex-repair huggingface dataset:
Program: 110092
Project: 110092
Buggy source:
private void prepareVideoStreaming(final String videoId){
  logI("String_Node_Str" + videoId);
  YTHacker.YtHackListener listener=new YTHacker.YtHackListener(){
    @Override public void onPreHack(    YTHacker ythack,    String ytvid,    Object user){
    }
    @Override public void onPostHack(    final YTHacker ythack,    Err result,    final NetLoader loader,    String ytvid,    Object user){
      if (mYtHack != ythack) {
        logD("String_Node_Str");
        loader.close();
        return;
      }
      mYtHack=null;
      if (null != mLoader)       mLoader.close();
      mLoader=loader;
      if (Err.NO_ERR != result) {
        logW("String_Node_Str" + result.name());
        mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo());
        return;
      }
      YTHacker.YtVideo ytv=ythack.getVideo(getVideoQualityScore());
      try {
        mpSetDataSource(Uri.parse(ytv.url));
      }
 catch (      IOException e) {
        logW("String_Node_Str" + e.getMessage());
        mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo(),500);
        return;
      }
      new Thread(new Runnable(){
        @Override public void run(){
          mDb.updateVideo(DB.ColVideo.VIDEOID,videoId,DB.ColVideo.TIME_PLAYED,System.currentTimeMillis());
        }
      }
).start();
      mpPrepareAsync();
    }
    @Override public void onHackCancelled(    YTHacker ythack,    String ytvid,    Object user){
      if (mYtHack != ythack) {
        logD("String_Node_Str");
        return;
      }
      mYtHack=null;
    }
  }
;
  mYtHack=new YTHacker(videoId,null,listener);
  mYtHack.startAsync();
}

Fixed version (ground truth):
private void prepareVideoStreaming(final String videoId){
  logI("String_Node_Str" + videoId);
  YTHacker.YtHackListener listener=new YTHacker.YtHackListener(){
    @Override public void onPreHack(    YTHacker ythack,    String ytvid,    Object user){
    }
    @Override public void onPostHack(    final YTHacker ythack,    Err result,    final NetLoader loader,    String ytvid,    Object user){
      if (mYtHack != ythack) {
        logD("String_Node_Str");
        loader.close();
        return;
      }
      mYtHack=null;
      if (null != mLoader)       mLoader.close();
      mLoader=loader;
      if (Err.NO_ERR != result) {
        logW("String_Node_Str" + result.name());
        mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo());
        return;
      }
      YTHacker.YtVideo ytv=ythack.getVideo(getVideoQualityScore());
      try {
        mpSetDataSource(Uri.parse(ytv.url));
      }
 catch (      IOException e) {
        logW("String_Node_Str" + e.getMessage());
        mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo(),500);
        return;
      }
      mpPrepareAsync();
    }
    @Override public void onHackCancelled(    YTHacker ythack,    String ytvid,    Object user){
      if (mYtHack != ythack) {
        logD("String_Node_Str");
        return;
      }
      mYtHack=null;
    }
  }
;
  mYtHack=new YTHacker(videoId,null,listener);
  mYtHack.startAsync();
}
Program: 110093
Project: 110093
Buggy source:
@Override public void onPostHack(final YTHacker ythack,Err result,final NetLoader loader,String ytvid,Object user){
  if (mYtHack != ythack) {
    logD("String_Node_Str");
    loader.close();
    return;
  }
  mYtHack=null;
  if (null != mLoader)   mLoader.close();
  mLoader=loader;
  if (Err.NO_ERR != result) {
    logW("String_Node_Str" + result.name());
    mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo());
    return;
  }
  YTHacker.YtVideo ytv=ythack.getVideo(getVideoQualityScore());
  try {
    mpSetDataSource(Uri.parse(ytv.url));
  }
 catch (  IOException e) {
    logW("String_Node_Str" + e.getMessage());
    mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo(),500);
    return;
  }
  new Thread(new Runnable(){
    @Override public void run(){
      mDb.updateVideo(DB.ColVideo.VIDEOID,videoId,DB.ColVideo.TIME_PLAYED,System.currentTimeMillis());
    }
  }
).start();
  mpPrepareAsync();
}

Fixed version (ground truth):
@Override public void onPostHack(final YTHacker ythack,Err result,final NetLoader loader,String ytvid,Object user){
  if (mYtHack != ythack) {
    logD("String_Node_Str");
    loader.close();
    return;
  }
  mYtHack=null;
  if (null != mLoader)   mLoader.close();
  mLoader=loader;
  if (Err.NO_ERR != result) {
    logW("String_Node_Str" + result.name());
    mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo());
    return;
  }
  YTHacker.YtVideo ytv=ythack.getVideo(getVideoQualityScore());
  try {
    mpSetDataSource(Uri.parse(ytv.url));
  }
 catch (  IOException e) {
    logW("String_Node_Str" + e.getMessage());
    mStartVideoRecovery.executeRecoveryStart(mVlm.getActiveVideo(),500);
    return;
  }
  mpPrepareAsync();
}
Program: 110094
Project: 110094
Buggy source:
public void unsetController(Context context){
  if (context == mVContext) {
    mPlayerv=null;
    mVContext=null;
    mVlm.clearOnListChangedListener();
  }
}

Fixed version (ground truth):
public void unsetController(Context context){
  if (context == mVContext) {
    mPlayerv=null;
    mVContext=null;
    mPlayerDrawer=null;
    mVlm.clearOnListChangedListener();
  }
}
Program: 110095
Project: 110095
Buggy source:
private void pvEnableDrawer(ViewGroup playerDrawer){
  if (null == playerDrawer || !mVlm.hasActiveVideo())   return;
  eAssert(null != mVContext);
  ListView lv=(ListView)playerDrawer.findViewById(R.id.music_player_drawer_content);
  playerDrawer.setVisibility(View.VISIBLE);
  lv=(ListView)playerDrawer.findViewById(R.id.music_player_drawer_content);
  YTPlayerVidArrayAdapter adapter=new YTPlayerVidArrayAdapter(mVContext,mVlm.getVideoList());
  adapter.setActiveItem(mVlm.getActiveVideoIndex());
  lv.setAdapter(adapter);
}

Fixed version (ground truth):
private void pvEnableDrawer(ViewGroup playerDrawer){
  if (null == playerDrawer || !mVlm.hasActiveVideo())   return;
  eAssert(null != mVContext);
  ListView lv=(ListView)playerDrawer.findViewById(R.id.music_player_drawer_content);
  SlidingDrawer drawer=(SlidingDrawer)playerDrawer.findViewById(R.id.music_player_sliding_drawer);
  playerDrawer.setVisibility(View.VISIBLE);
  lv=(ListView)playerDrawer.findViewById(R.id.music_player_drawer_content);
  YTPlayerVidArrayAdapter adapter=new YTPlayerVidArrayAdapter(mVContext,mVlm.getVideoList());
  adapter.setActiveItem(mVlm.getActiveVideoIndex());
  lv.setAdapter(adapter);
  drawer.close();
}
Program: 110097
Project: 110097
Buggy source:
private void adjustPageUserAction(){
  int lastPage=getLastPage();
  eAssert(mSearchSt.curPage >= 1 && mSearchSt.curPage <= lastPage);
  View barv=findViewById(R.id.bottombar);
  ImageView nextBtn=(ImageView)barv.findViewById(R.id.next);
  ImageView prevBtn=(ImageView)barv.findViewById(R.id.prev);
  prevBtn.setVisibility(View.VISIBLE);
  nextBtn.setVisibility(View.VISIBLE);
  if (1 == mSearchSt.curPage)   prevBtn.setVisibility(View.INVISIBLE);
  if (lastPage == mSearchSt.curPage)   nextBtn.setVisibility(View.INVISIBLE);
  LinearLayout ll=(LinearLayout)findViewById(R.id.indexgroup);
  ll.removeAllViews();
  int nrPages=mSearchSt.totalResults / NR_ENTRY_PER_PAGE + 1;
  int mini=mSearchSt.curPage - (Policy.YTSEARCH_NR_PAGE_INDEX / 2);
  if (mini < 1)   mini=1;
  int maxi=mini + Policy.YTSEARCH_NR_PAGE_INDEX - 1;
  if (maxi > nrPages)   maxi=nrPages;
  for (int i=mini; i <= maxi; i++) {
    int bi=i - mini;
    mPageBtnHolder[bi].setText("String_Node_Str" + i);
    mPageBtnHolder[bi].setTag(i);
    mPageBtnHolder[bi].setBackgroundResource(R.drawable.btnbg_normal);
    ll.addView(mPageBtnHolder[bi],mPageBtnLPHolder);
  }
  mPageBtnHolder[mSearchSt.curPage - mini].setBackgroundResource(R.drawable.btnbg_focused);
}

Fixed version (ground truth):
private void adjustPageUserAction(){
  int lastPage=getLastPage();
  eAssert(mSearchSt.curPage >= 1 && mSearchSt.curPage <= lastPage);
  View barv=findViewById(R.id.bottombar);
  ImageView nextBtn=(ImageView)barv.findViewById(R.id.next);
  ImageView prevBtn=(ImageView)barv.findViewById(R.id.prev);
  prevBtn.setVisibility(View.VISIBLE);
  nextBtn.setVisibility(View.VISIBLE);
  if (1 == mSearchSt.curPage)   prevBtn.setVisibility(View.INVISIBLE);
  if (lastPage == mSearchSt.curPage)   nextBtn.setVisibility(View.INVISIBLE);
  LinearLayout ll=(LinearLayout)findViewById(R.id.indexgroup);
  ll.removeAllViews();
  int nrPages=mSearchSt.totalResults / NR_ENTRY_PER_PAGE + 1;
  int mini=mSearchSt.curPage - (Policy.YTSEARCH_NR_PAGE_INDEX / 2);
  if (mini < 1)   mini=1;
  int maxi=mini + Policy.YTSEARCH_NR_PAGE_INDEX - 1;
  if (maxi > nrPages) {
    maxi=nrPages;
    mini=maxi - Policy.YTSEARCH_NR_PAGE_INDEX + 1;
    if (mini < 1)     mini=1;
  }
  for (int i=mini; i <= maxi; i++) {
    int bi=i - mini;
    mPageBtnHolder[bi].setText("String_Node_Str" + i);
    mPageBtnHolder[bi].setTag(i);
    mPageBtnHolder[bi].setBackgroundResource(R.drawable.btnbg_normal);
    ll.addView(mPageBtnHolder[bi],mPageBtnLPHolder);
  }
  mPageBtnHolder[mSearchSt.curPage - mini].setBackgroundResource(R.drawable.btnbg_focused);
}
Program: 110098
Project: 110098
Buggy source:
@Override protected void onResume(){
  super.onResume();
  ViewGroup playerv=(ViewGroup)findViewById(R.id.player);
  mMp.setController(this,playerv);
  if (mMp.isVideoPlaying())   playerv.setVisibility(View.VISIBLE);
 else   playerv.setVisibility(View.GONE);
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  ViewGroup playerv=(ViewGroup)findViewById(R.id.player);
  mMp.setController(this,playerv);
  if (mMp.hasActiveVideo())   playerv.setVisibility(View.VISIBLE);
 else   playerv.setVisibility(View.GONE);
}
Program: 110099
Project: 110099
Buggy source:
@Override protected void onResume(){
  super.onResume();
  ViewGroup playerv=(ViewGroup)findViewById(R.id.player);
  mMp.setController(this,playerv);
  if (mMp.isVideoPlaying())   playerv.setVisibility(View.VISIBLE);
 else   playerv.setVisibility(View.GONE);
  if (mDb.isRegisteredToPlaylistTableWatcher(this) && mDb.isPlaylistTableUpdated(this))   getAdapter().reloadCursorAsync();
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  ViewGroup playerv=(ViewGroup)findViewById(R.id.player);
  mMp.setController(this,playerv);
  if (mMp.hasActiveVideo())   playerv.setVisibility(View.VISIBLE);
 else   playerv.setVisibility(View.GONE);
  if (mDb.isRegisteredToPlaylistTableWatcher(this) && mDb.isPlaylistTableUpdated(this))   getAdapter().reloadCursorAsync();
}
Program: 110100
Project: 110100
Buggy source:
@Override protected void onResume(){
  super.onResume();
  ViewGroup playerv=(ViewGroup)findViewById(R.id.player);
  mMp.setController(this,playerv);
  if (mMp.isVideoPlaying())   playerv.setVisibility(View.VISIBLE);
 else   playerv.setVisibility(View.GONE);
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  ViewGroup playerv=(ViewGroup)findViewById(R.id.player);
  mMp.setController(this,playerv);
  if (mMp.hasActiveVideo())   playerv.setVisibility(View.VISIBLE);
 else   playerv.setVisibility(View.GONE);
}
Program: 110101
Project: 110101
Buggy source:
void pauseVideo(){
  if (isVideoPlaying())   mpPause();
}

Fixed version (ground truth):
void pauseVideo(){
  if (isVideoPlaying() && MPState.PREPARING != mpGetState())   mpPause();
}
Program: 110102
Project: 110102
Buggy source:
void startVideo(){
  if (isVideoPlaying())   mpStart();
}

Fixed version (ground truth):
void startVideo(){
  if (isVideoPlaying() && MPState.PREPARING != mpGetState())   mpStart();
}
Program: 110103
Project: 110103
Buggy source:
public boolean isVideoPlaying(){
  return mVlm.hasActiveVideo() && MPState.ERROR != mMpS && MPState.END != mMpS && MPState.PREPARING != mMpS;
}

Fixed version (ground truth):
private boolean isVideoPlaying(){
  return mVlm.hasActiveVideo() && MPState.ERROR != mMpS && MPState.END != mMpS;
}
Program: 110104
Project: 110104
Buggy source:
boolean hasActiveVideo(){
  return null != getActiveVideo();
}

Fixed version (ground truth):
public boolean hasActiveVideo(){
  return mVlm.hasActiveVideo();
}
Program: 110105
Project: 110105
Buggy source:
@Override public void onConnCancelled(YTVideoConnector ytconn,String ytvid,Object user){
  mYtConn=null;
}

Fixed version (ground truth):
void onConnCancelled(YTVideoConnector ytconn,String ytvid,Object user){
  if (mYtConn != ytconn) {
    logD("String_Node_Str");
    return;
  }
  mYtConn=null;
}
Program: 110106
Project: 110106
Buggy source:
private void startVideo(final String videoId,int volume,boolean recovery){
  eAssert(0 <= volume && volume <= 100);
  if (recovery) {
    mErrRetry--;
    if (mErrRetry <= 0) {
      stopPlay(StopState.UNKNOWN_ERROR);
      return;
    }
  }
 else   mErrRetry=PLAYER_ERR_RETRY;
  mpStop();
  mpRelease();
  mpNewInstance();
  mpReset();
  mpSetVolume(volume);
  YTVideoConnector.YtVideoConnListener listener=new YTVideoConnector.YtVideoConnListener(){
    @Override public void onPreConn(    YTVideoConnector ytconn,    String ytvid,    Object user){
    }
    @Override public void onPostConn(    YTVideoConnector ytconn,    Err result,    String ytvid,    Object user){
      mYtConn=null;
      if (Err.NO_ERR != result) {
        logW("String_Node_Str" + result.name());
        startVideo(mVlm.getActiveVideo(),true);
        return;
      }
      YTVideoConnector.YtVideo ytv=ytconn.getVideo(YTVideoConnector.YTQUALITY_SCORE_LOWEST);
      try {
        mpSetDataSource(Uri.parse(ytv.url));
      }
 catch (      IOException e) {
        eAssert(false);
      }
      mpPrepareAsync();
    }
    @Override public void onConnCancelled(    YTVideoConnector ytconn,    String ytvid,    Object user){
      mYtConn=null;
    }
  }
;
  mYtConn=new YTVideoConnector(videoId,volume,listener);
  mYtConn.execute();
}

Fixed version (ground truth):
private void startVideo(final String videoId,final int volume,boolean recovery){
}
Program: 110107
Project: 110107
Buggy source:
private void startNext(){
  if (!mVlm.hasActiveVideo())   return;
  if (mVlm.moveToNext())   startVideo(mVlm.getActiveVideo(),false);
 else   stopPlay(StopState.DONE);
}

Fixed version (ground truth):
void startNext(){
  if (!mVlm.hasActiveVideo())   return;
  if (mVlm.moveToNext())   startVideo(mVlm.getActiveVideo(),false);
 else   stopPlay(StopState.DONE);
}
Program: 110108
Project: 110108
Buggy source:
@Override public void onPrepared(MediaPlayer mp){
  logD("String_Node_Str");
  mpSetState(MPState.PREPARED);
  mpStart();
}

Fixed version (ground truth):
@Override public void onPrepared(MediaPlayer mp){
  if (mp != mpGet()) {
    logD("String_Node_Str");
    return;
  }
  logD("String_Node_Str");
  mpSetState(MPState.PREPARED);
  mpStart();
}
Program: 110109
Project: 110109
Buggy source:
private void initMediaPlayer(MediaPlayer mp){
  mp.setOnBufferingUpdateListener(this);
  mp.setOnCompletionListener(this);
  mp.setOnPreparedListener(this);
  mp.setOnVideoSizeChangedListener(this);
  mp.setOnSeekCompleteListener(this);
  mp.setOnErrorListener(this);
  mp.setOnInfoListener(this);
  mp.setScreenOnWhilePlaying(false);
  mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
}

Fixed version (ground truth):
private void initMediaPlayer(MediaPlayer mp){
  mp.setOnBufferingUpdateListener(this);
  mp.setOnCompletionListener(this);
  mp.setOnVideoSizeChangedListener(this);
  mp.setOnSeekCompleteListener(this);
  mp.setOnErrorListener(this);
  mp.setOnInfoListener(this);
  mp.setScreenOnWhilePlaying(false);
  mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
  mp.setOnPreparedListener(this);
}
Program: 110110
Project: 110110
Buggy source:
@Override public void onCreateContextMenu(ContextMenu menu,View v,ContextMenuInfo menuInfo){
  super.onCreateContextMenu(menu,v,menuInfo);
  MenuInflater inflater=getMenuInflater();
  inflater.inflate(R.menu.musics_context,menu);
  if (isUserPlayList(mPlid))   menu.findItem(R.id.plthumbnail).setVisible(true);
 else   menu.findItem(R.id.plthumbnail).setVisible(false);
}

Fixed version (ground truth):
@Override public void onCreateContextMenu(ContextMenu menu,View v,ContextMenuInfo menuInfo){
  super.onCreateContextMenu(menu,v,menuInfo);
  MenuInflater inflater=getMenuInflater();
  inflater.inflate(R.menu.musics_context,menu);
  if (isUserPlayList(mPlid)) {
    menu.findItem(R.id.plthumbnail).setVisible(true);
    menu.findItem(R.id.delete).setVisible(true);
  }
 else {
    menu.findItem(R.id.plthumbnail).setVisible(false);
    menu.findItem(R.id.delete).setVisible(false);
  }
}
Program: 110111
Project: 110111
Buggy source:
private String dbgStateName(int state){
switch (state) {
case YTPSTATE_UNSTARTED:
    return "String_Node_Str";
case YTPSTATE_ENDED:
  return "String_Node_Str";
case YTPSTATE_PLAYING:
return "String_Node_Str";
case YTPSTATE_PAUSED:
return "String_Node_Str";
case YTPSTATE_BUFFERING:
return "String_Node_Str";
case YTPSTATE_VIDEO_CUED:
return "String_Node_Str";
case YTPSTATE_ERROR:
return "String_Node_Str";
default :
eAssert(false);
}
return null;
}

Fixed version (ground truth):
private String dbgStateName(int state){
switch (state) {
case YTPSTATE_UNSTARTED:
    return "String_Node_Str";
case YTPSTATE_ENDED:
  return "String_Node_Str";
case YTPSTATE_PLAYING:
return "String_Node_Str";
case YTPSTATE_PAUSED:
return "String_Node_Str";
case YTPSTATE_BUFFERING:
return "String_Node_Str";
case YTPSTATE_VIDEO_CUED:
return "String_Node_Str";
case YTPSTATE_ERROR:
return "String_Node_Str";
case YTPSTATE_INVALID:
return "String_Node_Str";
default :
eAssert(false);
}
return null;
}
Program: 110112
Project: 110112
Buggy source:
public Err init(){
  new File(Utils.getAppContext().getFilesDir().getAbsolutePath() + "String_Node_Str" + YTPLAYER_SCRIPT).delete();
  Utils.copyAssetFile(YTPLAYER_SCRIPT);
  try {
    new NanoHTTPD(WEBSERVER_PORT,Utils.getAppContext().getFilesDir());
  }
 catch (  IOException e) {
    logI("String_Node_Str");
  }
  return Err.NO_ERR;
}

Fixed version (ground truth):
public Err init(){
  File fScript=new File(Utils.getAppContext().getFilesDir().getAbsolutePath() + "String_Node_Str" + YTPLAYER_SCRIPT);
  if (!fScript.exists())   Utils.copyAssetFile(YTPLAYER_SCRIPT);
  try {
    new NanoHTTPD(WEBSERVER_PORT,Utils.getAppContext().getFilesDir());
  }
 catch (  IOException e) {
    logI("String_Node_Str");
  }
  return Err.NO_ERR;
}
Program: 110113
Project: 110113
Buggy source:
public boolean isPlayerReady(){
  return null != mWv;
}

Fixed version (ground truth):
public boolean isPlayerReady(){
  return YTPSTATE_INVALID != ytpGetState();
}
Program: 110114
Project: 110114
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (YTJSPlayer.get().isPlayerReady()) {
    launchPlaylistActivity();
    return;
  }
  setContentView(R.layout.main);
  ImageView progimg=(ImageView)findViewById(R.id.progressimg);
  if (!Utils.isNetworkAvailable()) {
    progimg.setImageResource(R.drawable.ic_block);
    UiUtils.showTextToast(this,R.string.msg_appinit_network_unavailable);
    delayedFinish(APPINIT_FAIL_NOTI_DURATION);
    return;
  }
  ((ImageView)findViewById(R.id.progressimg)).startAnimation(AnimationUtils.loadAnimation(this,R.anim.rotate));
  final WebView wv=(WebView)findViewById(R.id.webview);
  YTJSPlayer.get().prepare(wv,this);
  Utils.getUiHandler().postDelayed(mAppInitTimeOut,APPINIT_TIMEOUT);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (YTJSPlayer.get().isPlayerReady()) {
    launchPlaylistActivity();
    return;
  }
  setContentView(R.layout.main);
  if (!Utils.isNetworkAvailable()) {
    UiUtils.showTextToast(this,R.string.msg_appinit_network_unavailable);
    finish();
    return;
  }
  ((ImageView)findViewById(R.id.progressimg)).startAnimation(AnimationUtils.loadAnimation(this,R.anim.rotate));
  final WebView wv=(WebView)findViewById(R.id.webview);
  YTJSPlayer.get().prepare(wv,this);
  Utils.getUiHandler().postDelayed(mAppInitTimeOut,Policy.Constants.APPINIT_TIMEOUT);
}
Program: 110115
Project: 110115
Buggy source:
@Override public void run(){
  YTMPActivity.this.finish();
}

Fixed version (ground truth):
@Override public void run(){
  ImageView prog=(ImageView)findViewById(R.id.progressimg);
  prog.clearAnimation();
  prog.setVisibility(View.GONE);
  UiUtils.showTextToast(YTMPActivity.this,R.string.msg_appinit_fail);
  finish();
}
Program: 110116
Project: 110116
Buggy source:
public static void showTextToast(Context context,int textid){
  Toast t=Toast.makeText(context,textid,Toast.LENGTH_SHORT);
  t.setGravity(Gravity.CENTER,0,0);
  t.show();
}

Fixed version (ground truth):
public static void showTextToast(Context context,int textid){
  Toast t=Toast.makeText(context,textid,Toast.LENGTH_LONG);
  t.setGravity(Gravity.CENTER,0,0);
  t.show();
}
Program: 110117
Project: 110117
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  ImageView progimg=(ImageView)findViewById(R.id.progressimg);
  if (!Utils.isNetworkAvailable()) {
    progimg.setImageResource(R.drawable.ic_block);
    UiUtils.showTextToast(this,R.string.msg_appinit_network_unavailable);
    delayedFinish(APPINIT_FAIL_NOTI_DURATION);
    return;
  }
  ((TextView)findViewById(R.id.message)).setText(R.string.msg_initialize_app);
  ((ImageView)findViewById(R.id.progressimg)).startAnimation(AnimationUtils.loadAnimation(this,R.anim.rotate));
  final WebView wv=(WebView)findViewById(R.id.webview);
  YTJSPlayer.get().prepare(wv,this);
  Utils.getUiHandler().postDelayed(mAppInitTimeOut,APPINIT_TIMEOUT);
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (YTJSPlayer.get().isPlayerReady()) {
    launchPlaylistActivity();
    return;
  }
  setContentView(R.layout.main);
  ImageView progimg=(ImageView)findViewById(R.id.progressimg);
  if (!Utils.isNetworkAvailable()) {
    progimg.setImageResource(R.drawable.ic_block);
    UiUtils.showTextToast(this,R.string.msg_appinit_network_unavailable);
    delayedFinish(APPINIT_FAIL_NOTI_DURATION);
    return;
  }
  ((TextView)findViewById(R.id.message)).setText(R.string.msg_initialize_app);
  ((ImageView)findViewById(R.id.progressimg)).startAnimation(AnimationUtils.loadAnimation(this,R.anim.rotate));
  final WebView wv=(WebView)findViewById(R.id.webview);
  YTJSPlayer.get().prepare(wv,this);
  Utils.getUiHandler().postDelayed(mAppInitTimeOut,APPINIT_TIMEOUT);
}
Program: 110118
Project: 110118
Buggy source:
@Override public void onPlayerReady(WebView wv){
  Utils.getUiHandler().removeCallbacks(mAppInitTimeOut);
  Intent i=new Intent(this,PlaylistActivity.class);
  startActivity(i);
  finish();
}

Fixed version (ground truth):
@Override public void onPlayerReady(WebView wv){
  Utils.getUiHandler().removeCallbacks(mAppInitTimeOut);
  launchPlaylistActivity();
}
Program: 110119
Project: 110119
Buggy source:
/** 
 * Execute the command.
 * @param sender  the sender of the command
 * @param command the command being done
 * @param label   the name of the command
 * @param args    the arguments supplied
 */
@Override public void execute(CommandSender sender,Command command,String label,String[] args){
  if (!hasPermission()) {
    sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str"));
    return;
  }
  if (args.length < 2) {
    sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str"));
    sendUsage();
    return;
  }
  Plugin plugin=PluginUtil.findByCommand(args[1]);
  if (plugin == null) {
    sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str",args[1]));
    return;
  }
  sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str",args[1],plugin.getName()));
}

Fixed version (ground truth):
/** 
 * Execute the command.
 * @param sender  the sender of the command
 * @param command the command being done
 * @param label   the name of the command
 * @param args    the arguments supplied
 */
@Override public void execute(CommandSender sender,Command command,String label,String[] args){
  if (!hasPermission()) {
    sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str"));
    return;
  }
  if (args.length < 2) {
    sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str"));
    sendUsage();
    return;
  }
  List<String> plugins=PluginUtil.findByCommand(args[1]);
  if (plugins.isEmpty()) {
    sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str",args[1]));
    return;
  }
  sender.sendMessage(PlugMan.getInstance().getMessageFormatter().format("String_Node_Str",args[1],Joiner.on("String_Node_Str").join(plugins)));
}
Program: 110121
Project: 110121
Buggy source:
/** 
 * TkSaveEmail can save email.
 * @throws Exception If there is some problem inside
 */
@Test public void savesEmail() throws Exception {
  final MkBase base=new MkBase();
  final String urn="String_Node_Str";
  final User user=base.user(new URN(urn));
  user.aliases().add("String_Node_Str");
  final Alias alias=user.aliases().iterate().iterator().next();
  alias.email("String_Node_Str");
  new TkAuth(new TkSaveEmail(base,false),new PsFixed(new Identity.Simple(urn))).act(new RqForm.Fake(new RqFake(),TkSaveEmailTest.EMAIL,"String_Node_Str"));
  MatcherAssert.assertThat(alias.email(),Matchers.equalTo("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * TkSaveEmail can save email.
 * @throws Exception If there is some problem inside
 */
@Test public void savesEmail() throws Exception {
  final Base base=new CdBase(new MkBase());
  final String urn="String_Node_Str";
  final User user=base.user(new URN(urn));
  user.aliases().add("String_Node_Str");
  final Alias alias=user.aliases().iterate().iterator().next();
  alias.email("String_Node_Str");
  new TkAuth(new TkSaveEmail(base,false),new PsFixed(new Identity.Simple(urn))).act(new RqForm.Fake(new RqFake(),TkSaveEmailTest.EMAIL,"String_Node_Str"));
  MatcherAssert.assertThat(alias.email(),Matchers.equalTo("String_Node_Str"));
}
Program: 110123
Project: 110123
Buggy source:
@Override public Response act(final Request req) throws IOException {
  final Inbox inbox=new RqAlias(this.base,req).alias().inbox();
  final long number=inbox.start();
  final Bout bout=inbox.bout(number);
  final StringBuilder msg=new StringBuilder(String.format("String_Node_Str",number));
  final Href href=new RqHref.Base(req).href();
  this.rename(bout,msg,href);
  this.invite(bout,msg,href);
  final Iterator<String> post=href.param("String_Node_Str").iterator();
  while (post.hasNext()) {
    try {
      bout.messages().post(post.next());
    }
 catch (    final Messages.BrokenPostException ex) {
      this.discard(bout);
      throw new RsFailure(ex);
    }
    msg.append("String_Node_Str");
  }
  throw new RsForward(new RsFlash(msg.toString()),new RqHref.Smart(new RqHref.Base(req)).home().path("String_Node_Str").path(Long.toString(number)));
}

Fixed version (ground truth):
@Override public Response act(final Request req) throws IOException {
  final Href href=new RqHref.Base(req).href();
  final Iterator<String> token=href.param("String_Node_Str").iterator();
  String key="String_Node_Str";
  long diff=0;
  final Inbox inbox;
  while (token.hasNext()) {
    key=token.next();
  }
  if (key.isEmpty()) {
    inbox=new RqAlias(this.base,req).alias().inbox();
  }
 else   if (this.tokens.containsKey(key)) {
    final Pair<Date,Inbox> cached=this.tokens.get(key);
    diff=(new Date()).getTime() - (cached.getLeft()).getTime();
    if ((TimeUnit.MILLISECONDS.toDays(diff)) <= 2) {
      inbox=cached.getRight();
    }
 else {
      this.tokens.remove(key);
      inbox=new RqAlias(this.base,req).alias().inbox();
    }
  }
 else {
    inbox=new RqAlias(this.base,req).alias().inbox();
    this.tokens.put(key,Pair.of(new Date(),inbox));
  }
  diff=(new Date()).getTime() - checked.getTime();
  if ((TimeUnit.MILLISECONDS.toHours(diff)) >= 1) {
    checked=new Date();
    clearCache();
  }
  final long number=inbox.start();
  final Bout bout=inbox.bout(number);
  final StringBuilder msg=new StringBuilder(String.format("String_Node_Str",number));
  this.rename(bout,msg,href);
  this.invite(bout,msg,href);
  final Iterator<String> post=href.param("String_Node_Str").iterator();
  while (post.hasNext()) {
    try {
      bout.messages().post(post.next());
    }
 catch (    final Messages.BrokenPostException ex) {
      this.discard(bout);
      throw new RsFailure(ex);
    }
    msg.append("String_Node_Str");
  }
  throw new RsForward(new RsFlash(msg.toString()),new RqHref.Smart(new RqHref.Base(req)).home().path("String_Node_Str").path(Long.toString(number)));
}
Program: 110126
Project: 110126
Buggy source:
@Override public Response act(final Request req) throws IOException {
  final Inbox inbox=new RqAlias(this.base,req).alias().inbox();
  final long number=inbox.start();
  final Bout bout=inbox.bout(number);
  final StringBuilder msg=new StringBuilder(String.format("String_Node_Str",number));
  final Href href=new RqHref.Base(req).href();
  this.rename(bout,msg,href);
  this.invite(bout,msg,href);
  final Iterator<String> post=href.param("String_Node_Str").iterator();
  while (post.hasNext()) {
    try {
      bout.messages().post(post.next());
    }
 catch (    final Messages.BrokenPostException ex) {
      this.discard(bout);
      throw new RsFailure(ex);
    }
    msg.append("String_Node_Str");
  }
  throw new RsForward(new RsFlash(msg.toString()),new RqHref.Smart(new RqHref.Base(req)).home().path("String_Node_Str").path(Long.toString(number)));
}

Fixed version (ground truth):
@Override public Response act(final Request req) throws IOException {
  final Href href=new RqHref.Base(req).href();
  final Iterator<String> token=href.param("String_Node_Str").iterator();
  String tokenkey="String_Node_Str";
  final Inbox inbox;
  long number=0;
  while (token.hasNext()) {
    tokenkey=token.next();
  }
  if (tokenkey.equals("String_Node_Str")) {
    inbox=new RqAlias(this.base,req).alias().inbox();
  }
 else {
    if (this.tokencache.containsKey(tokenkey)) {
      final int hoursInDay=24;
      final int minsInHours=60;
      final int secsInMins=60;
      final int micsInSecs=1000;
      final Object[] cache=this.tokencache.get(tokenkey);
      final Date today=new Date();
      final long diff=Math.abs(today.getTime() - ((Date)cache[0]).getTime());
      final long diffDays=diff / (hoursInDay * minsInHours * secsInMins* micsInSecs);
      if (diffDays <= 2) {
        inbox=(Inbox)cache[1];
      }
 else {
        this.tokencache.remove(tokenkey);
        inbox=new RqAlias(this.base,req).alias().inbox();
      }
    }
 else {
      inbox=new RqAlias(this.base,req).alias().inbox();
      this.tokencache.put(tokenkey,new Object[]{new Date(),inbox});
    }
  }
  number=inbox.start();
  final Bout bout=inbox.bout(number);
  final StringBuilder msg=new StringBuilder(String.format("String_Node_Str",number));
  this.rename(bout,msg,href);
  this.invite(bout,msg,href);
  final Iterator<String> post=href.param("String_Node_Str").iterator();
  while (post.hasNext()) {
    try {
      bout.messages().post(post.next());
    }
 catch (    final Messages.BrokenPostException ex) {
      this.discard(bout);
      throw new RsFailure(ex);
    }
    msg.append("String_Node_Str");
  }
  throw new RsForward(new RsFlash(msg.toString()),new RqHref.Smart(new RqHref.Base(req)).home().path("String_Node_Str").path(Long.toString(number)));
}
Program: 110128
Project: 110128
Buggy source:
@Override public Response act(final Request req) throws IOException {
  return new RsReturn(new RsRedirect("String_Node_Str"),new RqHref.Base(req).href().bare());
}

Fixed version (ground truth):
@Override public Response act(final Request req) throws IOException {
  return new RsReturn(new RsRedirect("String_Node_Str"),new RqHref.Base(req).href().toString());
}
Program: 110129
Project: 110129
Buggy source:
/** 
 * Create alias.
 * @return Alias
 * @throws IOException If fails
 */
public Alias alias(final String name) throws IOException {
  final User user=user(URN.create(String.format("String_Node_Str",new SecureRandom().nextInt(Integer.MAX_VALUE))));
  final Aliases aliases=user.aliases();
  aliases.add(name);
  final Alias alias=aliases.iterate().iterator().next();
  alias.email(String.format("String_Node_Str",alias.name()));
  return alias;
}

Fixed version (ground truth):
/** 
 * Create alias.
 * @param name Name of the alias
 * @return Alias
 * @throws IOException If fails
 */
public Alias alias(final String name) throws IOException {
  final User user=this.user(URN.create(String.format("String_Node_Str",new SecureRandom().nextInt(Integer.MAX_VALUE))));
  final Aliases aliases=user.aliases();
  aliases.add(name);
  final Alias alias=aliases.iterate().iterator().next();
  alias.email(String.format("String_Node_Str",alias.name()));
  return alias;
}
Program: 110130
Project: 110130
Buggy source:
/** 
 * Random alias.
 * @return Alias
 * @throws IOException If fails
 */
public Alias randomAlias() throws IOException {
  return alias(String.format("String_Node_Str",MkBase.RANDOM.nextInt(Integer.MAX_VALUE)));
}

Fixed version (ground truth):
/** 
 * Random alias.
 * @return Alias
 * @throws IOException If fails
 */
public Alias randomAlias() throws IOException {
  return this.alias(String.format("String_Node_Str",MkBase.RANDOM.nextInt(Integer.MAX_VALUE)));
}
Program: 110131
Project: 110131
Buggy source:
/** 
 * Read text from stream.
 * @param stream Stream to read from
 * @throws IOException If cant write
 */
public static BigText read(final DataInputStream stream) throws IOException {
  final byte[] bytes=new byte[stream.readInt()];
  for (int num=0; num < bytes.length; ++num) {
    bytes[num]=stream.readByte();
  }
  return new BigText(new String(bytes,CharEncoding.UTF_8));
}

Fixed version (ground truth):
/** 
 * Read text from stream.
 * @param stream Stream to read from
 * @return New instance of this class, with text inside
 * @throws IOException If cant write
 */
public static BigText read(final DataInputStream stream) throws IOException {
  final byte[] bytes=new byte[stream.readInt()];
  for (int num=0; num < bytes.length; ++num) {
    bytes[num]=stream.readByte();
  }
  return new BigText(new String(bytes,CharEncoding.UTF_8));
}
Program: 110132
Project: 110132
Buggy source:
/** 
 * Write text to stream.
 * @param stream Stream to write to
 * @throws IOException If cant write
 */
public void write(final DataOutputStream stream) throws IOException {
  final byte[] bytes=text.getBytes(CharEncoding.UTF_8);
  stream.writeInt(bytes.length);
  for (  byte data : bytes) {
    stream.writeByte(data);
  }
}

Fixed version (ground truth):
/** 
 * Write text to stream.
 * @param stream Stream to write to
 * @throws IOException If cant write
 */
public void write(final DataOutputStream stream) throws IOException {
  final byte[] bytes=this.text.getBytes(CharEncoding.UTF_8);
  stream.writeInt(bytes.length);
  for (  byte data : bytes) {
    stream.writeByte(data);
  }
}
Program: 110133
Project: 110133
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public MessageNotice read(final DataInputStream stream) throws IOException {
  final long number=stream.readLong();
  final Urn author=Urn.create(stream.readUTF());
  final String text=stream.readUTF();
  final Date date=new Date(stream.readLong());
  final Bout bout=new BoutNotice.Serial().read(stream).bout();
  return new MessageNotice(){
    @Override public Message message(){
      return new Message(){
        @Override public int hashCode(){
          return this.number().hashCode();
        }
        @Override public boolean equals(        final Object msg){
          return this == msg || (msg instanceof Message && this.number().equals(Message.class.cast(msg).number()));
        }
        @Override public Long number(){
          return number;
        }
        @Override public String text(){
          return text;
        }
        @Override public Identity author(){
          return IdentityNotice.Serial.toIdentity(author);
        }
        @Override public Boolean seen(){
          throw new UnsupportedOperationException();
        }
        @Override public Date date(){
          return date;
        }
        @Override public int compareTo(        final Message msg){
          return this.number().compareTo(msg.number());
        }
        @Override public Bout bout(){
          return bout;
        }
      }
;
    }
  }
;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public MessageNotice read(final DataInputStream stream) throws IOException {
  final long number=stream.readLong();
  final Urn author=Urn.create(stream.readUTF());
  final String text=BigText.read(stream).toString();
  final Date date=new Date(stream.readLong());
  final Bout bout=new BoutNotice.Serial().read(stream).bout();
  return new MessageNotice(){
    @Override public Message message(){
      return new Message(){
        @Override public int hashCode(){
          return this.number().hashCode();
        }
        @Override public boolean equals(        final Object msg){
          return this == msg || (msg instanceof Message && this.number().equals(Message.class.cast(msg).number()));
        }
        @Override public Long number(){
          return number;
        }
        @Override public String text(){
          return text;
        }
        @Override public Identity author(){
          return IdentityNotice.Serial.toIdentity(author);
        }
        @Override public Boolean seen(){
          throw new UnsupportedOperationException();
        }
        @Override public Date date(){
          return date;
        }
        @Override public int compareTo(        final Message msg){
          return this.number().compareTo(msg.number());
        }
        @Override public Bout bout(){
          return bout;
        }
      }
;
    }
  }
;
}
Program: 110134
Project: 110134
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void write(final MessageNotice notice,final DataOutputStream stream) throws IOException {
  stream.writeLong(notice.message().number());
  stream.writeUTF(notice.message().author().name().toString());
  stream.writeUTF(notice.message().text());
  stream.writeLong(notice.message().date().getTime());
  new BoutNotice.Serial().write(new BoutNotice(){
    @Override public Bout bout(){
      return notice.message().bout();
    }
  }
,stream);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void write(final MessageNotice notice,final DataOutputStream stream) throws IOException {
  stream.writeLong(notice.message().number());
  stream.writeUTF(notice.message().author().name().toString());
  new BigText(notice.message().text()).write(stream);
  stream.writeLong(notice.message().date().getTime());
  new BoutNotice.Serial().write(new BoutNotice(){
    @Override public Bout bout(){
      return notice.message().bout();
    }
  }
,stream);
}
Program: 110135
Project: 110135
Buggy source:
/** 
 * Clean some previous apprequests (or all of them).
 * @param marker The marker to avoid duplicate reminders (or empty stringif you want ALL apprequests to be cleaned for this person)
 * @return Is it clean now and we should post again?
 */
@SuppressWarnings("String_Node_Str") public boolean clean(final String marker){
  final Connection<AppRequest> reqs=this.client.fetchConnection(this.path,AppRequest.class);
  boolean clean=true;
  if (!reqs.getData().isEmpty()) {
    for (    AppRequest request : reqs.getData()) {
      if (request.getData().equals(marker) && !marker.isEmpty()) {
        clean=false;
      }
 else {
        this.client.deleteObject(request.getId());
        Logger.info(this,"String_Node_Str",marker,request.getId());
      }
    }
  }
  return clean;
}

Fixed version (ground truth):
/** 
 * Clean some previous apprequests (or all of them).
 * @param marker The marker to avoid duplicate reminders (or empty stringif you want ALL apprequests to be cleaned for this person)
 * @return Is it clean now and we should post again?
 */
@SuppressWarnings("String_Node_Str") public boolean clean(final String marker){
  final Connection<AppRequest> reqs=this.client.fetchConnection(this.path,AppRequest.class);
  boolean clean=true;
  if (!reqs.getData().isEmpty()) {
    for (    AppRequest request : reqs.getData()) {
      if (request.getData().equals(marker) && !marker.isEmpty()) {
        clean=false;
      }
 else {
        this.client.deleteObject(request.getId());
        Logger.info(this,"String_Node_Str",marker,request.getId());
      }
    }
  }
  Logger.info(this,"String_Node_Str",marker,clean);
  return clean;
}
Program: 110136
Project: 110136
Buggy source:
/** 
 * Get application access token.
 * @return The token
 */
public String build(){
  final URI uri=UriBuilder.fromPath("String_Node_Str").replaceQueryParam("String_Node_Str","String_Node_Str").replaceQueryParam("String_Node_Str","String_Node_Str").replaceQueryParam("String_Node_Str","String_Node_Str").build(Manifests.read("String_Node_Str"),Manifests.read("String_Node_Str"));
  final String response=RestTester.start(uri).get("String_Node_Str").assertStatus(HttpURLConnection.HTTP_OK).assertBody(Matchers.startsWith("String_Node_Str")).getBody();
  return response.split("String_Node_Str",2)[1];
}

Fixed version (ground truth):
/** 
 * Get application access token.
 * @return The token
 */
public String build(){
  final URI uri=UriBuilder.fromPath("String_Node_Str").queryParam("String_Node_Str","String_Node_Str").queryParam("String_Node_Str","String_Node_Str").queryParam("String_Node_Str","String_Node_Str").build(Manifests.read("String_Node_Str"),Manifests.read("String_Node_Str"));
  final String response=RestTester.start(uri).get("String_Node_Str").assertStatus(HttpURLConnection.HTTP_OK).assertBody(Matchers.startsWith("String_Node_Str")).getBody();
  return response.split("String_Node_Str",2)[1];
}
Program: 110137
Project: 110137
Buggy source:
/** 
 * Login page.
 * @return The JAX-RS response
 * @see <a href="http://developers.facebook.com/docs/authentication/">facebook.com</a>
 */
@GET @SuppressWarnings("String_Node_Str") public Response login(){
  final UriBuilder fburi=UriBuilder.fromUri(UriBuilder.fromPath("String_Node_Str").replaceQueryParam("String_Node_Str","String_Node_Str").replaceQueryParam("String_Node_Str","String_Node_Str").build(Manifests.read("String_Node_Str"),this.base().path("String_Node_Str").build()));
  return new PageBuilder().stylesheet("String_Node_Str").build(BasePage.class).init(this,false).link("String_Node_Str",fburi).render().preserved().build();
}

Fixed version (ground truth):
/** 
 * Login page.
 * @return The JAX-RS response
 * @see <a href="http://developers.facebook.com/docs/authentication/">facebook.com</a>
 */
@GET @SuppressWarnings("String_Node_Str") public Response login(){
  final UriBuilder fburi=UriBuilder.fromUri(UriBuilder.fromPath("String_Node_Str").queryParam("String_Node_Str","String_Node_Str").queryParam("String_Node_Str","String_Node_Str").build(Manifests.read("String_Node_Str"),this.base().path("String_Node_Str").build()));
  return new PageBuilder().stylesheet("String_Node_Str").build(BasePage.class).init(this,false).link("String_Node_Str",fburi).render().preserved().build();
}
Program: 110138
Project: 110138
Buggy source:
/** 
 * Authenticate as remote identity.
 * @param iname Identity name
 * @param secret Secret word
 * @return Identity
 * @throws IOException If some problem
 */
private RemoteIdentity remote(final Urn iname,final String secret) throws IOException {
  RemoteIdentity remote;
  URL entry;
  try {
    entry=this.resolver.authority(iname);
  }
 catch (  com.netbout.spi.UnreachableUrnException ex) {
    throw new IOException(ex);
  }
  final URI uri=UriBuilder.fromUri(entry.toString()).replaceQueryParam("String_Node_Str","String_Node_Str").replaceQueryParam("String_Node_Str","String_Node_Str").build(iname,secret);
  try {
    remote=this.load(uri);
  }
 catch (  IOException ex) {
    throw new IOException(String.format("String_Node_Str",iname,uri),ex);
  }
  if (!remote.name().equals(iname) && !iname.nss().isEmpty()) {
    throw new IOException(String.format("String_Node_Str",remote.name(),uri,iname));
  }
  return remote;
}

Fixed version (ground truth):
/** 
 * Authenticate as remote identity.
 * @param iname Identity name
 * @param secret Secret word
 * @return Identity
 * @throws IOException If some problem
 */
private RemoteIdentity remote(final Urn iname,final String secret) throws IOException {
  RemoteIdentity remote;
  URL entry;
  try {
    entry=this.resolver.authority(iname);
  }
 catch (  com.netbout.spi.UnreachableUrnException ex) {
    throw new IOException(ex);
  }
  final URI uri=UriBuilder.fromUri(entry.toString()).queryParam("String_Node_Str","String_Node_Str").queryParam("String_Node_Str","String_Node_Str").build(iname,secret);
  try {
    remote=this.load(uri);
  }
 catch (  IOException ex) {
    throw new IOException(String.format("String_Node_Str",iname,uri),ex);
  }
  if (!remote.name().equals(iname) && !iname.nss().isEmpty()) {
    throw new IOException(String.format("String_Node_Str",remote.name(),uri,iname));
  }
  return remote;
}
Program: 110139
Project: 110139
Buggy source:
/** 
 * Set goto URI.
 * @param uri The URI
 */
@CookieParam(RestSession.GOTO_COOKIE) public void setGoto(final String uri){
  if (uri != null) {
    try {
      this.forward=new URI(SecureString.valueOf(uri).toString());
    }
 catch (    com.netbout.text.StringDecryptionException ex) {
      Logger.warn(this,"String_Node_Str",uri,ex);
    }
catch (    java.net.URISyntaxException ex) {
      Logger.warn(this,"String_Node_Str",uri,ex);
    }
  }
  System.out.println("String_Node_Str" + this.forward);
}

Fixed version (ground truth):
/** 
 * Set goto URI.
 * @param uri The URI
 */
@CookieParam(RestSession.GOTO_COOKIE) public void setGoto(final String uri){
  if (uri != null) {
    try {
      this.forward=new URI(SecureString.valueOf(uri).text());
    }
 catch (    com.netbout.text.StringDecryptionException ex) {
      Logger.warn(this,"String_Node_Str",uri,ex);
    }
catch (    java.net.URISyntaxException ex) {
      Logger.warn(this,"String_Node_Str",uri,ex);
    }
  }
}
Program: 110140
Project: 110140
Buggy source:
/** 
 * Post something to this stage.
 * @param body Raw HTTP post body
 * @return The JAX-RS response
 */
@POST public Response post(final String body){
  this.coords.normalize(this.hub(),this.bout);
  final String dest=this.hub().make("String_Node_Str").synchronously().inBout(this.bout).arg(this.bout.number()).arg(this.identity().name()).arg(this.coords.stage()).arg(this.coords.place()).arg(body).asDefault("String_Node_Str").exec();
  return new PageBuilder().build(AbstractPage.class).init(this).authenticated(this.identity()).status(Response.Status.SEE_OTHER).location(this.base().path("String_Node_Str").queryParam(BoutRs.PLACE_PARAM,dest).build(this.bout.number())).build();
}

Fixed version (ground truth):
/** 
 * Post something to this stage.
 * @param body Raw HTTP post body
 * @return The JAX-RS response
 */
@POST public Response post(final String body){
  this.coords.normalize(this.hub(),this.bout);
  final String dest=this.hub().make("String_Node_Str").synchronously().inBout(this.bout).arg(this.bout.number()).arg(this.identity().name()).arg(this.coords.stage()).arg(this.coords.place()).arg(body).asDefault("String_Node_Str").exec();
  return new PageBuilder().build(AbstractPage.class).init(this).authenticated(this.identity()).status(Response.Status.SEE_OTHER).location(this.base().path("String_Node_Str").queryParam(BoutRs.PLACE_PARAM,"String_Node_Str").build(this.bout.number(),dest)).build();
}