nus-yam/ex-repair huggingface dataset:
Program: 153178
Project: 153178
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.app_update_page);
  String[] columns={InstalledAppDb.COLUMN_ID,InstalledAppDb.COLUMN_CODE,InstalledAppDb.COLUMN_APP_NAME,InstalledAppDb.COLUMN_AUTHOR,InstalledAppDb.COLUMN_VERSION,InstalledAppDb.COLUMN_IMAGE_URL,InstalledAppDb.COLUMN_DOWNLOAD_URI,InstalledAppDb.COLUMN_PKG_NAME};
  String where=InstalledAppDb.COLUMN_STATE + "String_Node_Str";
  String[] whereArgs={InstalledAppDb.PackageState.install_succeeded.name()};
  mCursor=managedQuery(BehooProvider.INSTALLED_APP_CONTENT_URI,columns,where,whereArgs,null);
  mListView=(ListView)findViewById(R.id.app_update_list);
  mListAdapter=new ListAdapter(this,R.layout.applist_item_layout,mCursor);
  mListView.setAdapter(mListAdapter);
  mListView.setOnItemSelectedListener(this);
  Button button=(Button)findViewById(R.id.appupdate_btn_update);
  mButtonGuard=new InstallButtonGuard(this,button,null);
  mButtonGuard.setOnInstallClickListener(this);
  mAppImage=(ImageView)findViewById(R.id.main_app_logo);
  Intent i=new Intent(this,DownloadInstallService.class);
  startService(i);
  showDialog(WAITING_DIALOG);
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.app_update_page);
  String[] columns={InstalledAppDb.COLUMN_ID,InstalledAppDb.COLUMN_CODE,InstalledAppDb.COLUMN_APP_NAME,InstalledAppDb.COLUMN_AUTHOR,InstalledAppDb.COLUMN_VERSION,InstalledAppDb.COLUMN_IMAGE_URL,InstalledAppDb.COLUMN_DOWNLOAD_URI,InstalledAppDb.COLUMN_PKG_NAME};
  String where=InstalledAppDb.COLUMN_STATE + "String_Node_Str";
  String[] whereArgs={InstalledAppDb.PackageState.install_succeeded.name()};
  mCursor=managedQuery(BehooProvider.INSTALLED_APP_CONTENT_URI,columns,where,whereArgs,null);
  mListView=(ListView)findViewById(R.id.app_update_list);
  mListAdapter=new ListAdapter(this,R.layout.applist_item_layout,mCursor);
  mListView.setAdapter(mListAdapter);
  mListView.setOnItemSelectedListener(this);
  Button button=(Button)findViewById(R.id.appupdate_btn_update);
  mButtonGuard=new InstallButtonGuard(this,button,null);
  mButtonGuard.setOnInstallClickListener(this);
  mAppImage=(ImageView)findViewById(R.id.main_app_logo);
  Intent i=new Intent(this,DownloadInstallService.class);
  i.setAction(Constants.ACTION_START_CHECK_UPDATE);
  startService(i);
  showDialog(WAITING_DIALOG);
}
Program: 153179
Project: 153179
Buggy source:
public void uninstall(String code){
  String[] columns={InstalledAppDb.COLUMN_PKG_NAME,InstalledAppDb.COLUMN_DOWNLOAD_URI};
  String where=InstalledAppDb.COLUMN_CODE + "String_Node_Str";
  String[] whereArgs={code};
  Cursor c=this.getContentResolver().query(BehooProvider.INSTALLED_APP_CONTENT_URI,columns,where,whereArgs,null);
  String pkgName=null;
  String downloadUri=null;
  if (null != c) {
    c.moveToFirst();
    int pkgNameId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_PKG_NAME);
    int downloadUriId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_DOWNLOAD_URI);
    pkgName=c.getString(pkgNameId);
    downloadUri=c.getString(downloadUriId);
    c.close();
    Log.i(TAG,"String_Node_Str" + code + "String_Node_Str"+ downloadUriId);
    String token=null;
    if (null != ServiceManager.inst().getSyncHandler()) {
      token=ServiceManager.inst().getSyncHandler().getToken();
    }
    UninstallThread thrd=new UninstallThread(this,code,pkgName,downloadUri,token);
    thrd.start();
  }
 else {
    String tempPkgName=(null != pkgName ? pkgName : "String_Node_Str");
    PackageStateSender.sendPackageUninstallBroadcast(this,code,tempPkgName,false);
  }
}

Fixed version (ground truth):
public void uninstall(String code){
  String[] columns={InstalledAppDb.COLUMN_PKG_NAME,InstalledAppDb.COLUMN_DOWNLOAD_URI};
  String where=InstalledAppDb.COLUMN_CODE + "String_Node_Str";
  String[] whereArgs={code};
  Cursor c=this.getContentResolver().query(BehooProvider.INSTALLED_APP_CONTENT_URI,columns,where,whereArgs,null);
  String pkgName=null;
  String downloadUri=null;
  if (null != c) {
    c.moveToFirst();
    int pkgNameId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_PKG_NAME);
    int downloadUriId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_DOWNLOAD_URI);
    pkgName=c.getString(pkgNameId);
    downloadUri=c.getString(downloadUriId);
    c.close();
    Log.i(TAG,"String_Node_Str" + code + "String_Node_Str"+ downloadUriId);
    String token=null;
    try {
      if (null != ServiceManager.inst().getSyncHandler()) {
        token=ServiceManager.inst().getSyncHandler().getToken();
      }
    }
 catch (    Throwable tr) {
      Log.w(TAG,tr.getLocalizedMessage());
    }
    UninstallThread thrd=new UninstallThread(this,code,pkgName,downloadUri,token);
    thrd.start();
  }
 else {
    String tempPkgName=(null != pkgName ? pkgName : "String_Node_Str");
    PackageStateSender.sendPackageUninstallBroadcast(this,code,tempPkgName,false);
  }
}
Program: 153180
Project: 153180
Buggy source:
public void onClick(View v){
  if (v.getId() == R.id.applist_btn_detail) {
    int pos=mListView.getSelectedItemPosition();
    Log.i(TAG,"String_Node_Str" + Integer.toString(pos));
    if (ListView.INVALID_POSITION != pos) {
      Intent intent=new Intent();
      intent.setClass(AppListPage.this,AppDetailsPage.class);
      String[] value={mAppList.get(pos).mAppName,mAppList.get(pos).mAppVersion,mAppList.get(pos).mAppCode,mAppList.get(pos).mAppAuthor,mAppList.get(pos).mAppImageUrl,mAppList.get(pos).mAppDesc};
      intent.putExtra(AppDetailsPage.EXTRA_KAY,value);
      startActivity(intent);
    }
  }
}

Fixed version (ground truth):
public void onClick(View v){
  if (v.getId() == R.id.applist_btn_detail) {
    int pos=mListView.getSelectedItemPosition();
    Log.i(TAG,"String_Node_Str" + Integer.toString(pos));
    if (ListView.INVALID_POSITION != pos) {
      Intent intent=new Intent();
      intent.setClass(AppListPage.this,AppDetailsPage.class);
      String[] value={mAppList.get(pos).mAppName,mAppList.get(pos).mAppVersion,mAppList.get(pos).mAppCode,mAppList.get(pos).mAppAuthor,mAppList.get(pos).mAppImageUrl,mAppList.get(pos).mAppShortDesc};
      intent.putExtra(AppDetailsPage.EXTRA_KAY,value);
      startActivity(intent);
    }
  }
}
Program: 153181
Project: 153181
Buggy source:
public void onClick(View v){
  if (v.getId() == R.id.main_btn_applist_page) {
    Intent intent=new Intent();
    intent.setClass(this,AppListPage.class);
    startActivity(intent);
  }
 else   if (v.getId() == R.id.main_btn_update_page) {
    Intent intent=new Intent();
    intent.setClass(this,AppUpdatePage.class);
    startActivity(intent);
  }
 else   if (v.getId() == R.id.main_btn_download_page) {
    Intent intent=new Intent();
    intent.setClass(this,AppDownloadPage.class);
    startActivity(intent);
  }
 else {
    for (int i=0; i < mImageViewIds.length; ++i) {
      if (v.getId() == mImageViewIds[i]) {
        Intent intent=new Intent();
        intent.setClass(this,AppDetailsPage.class);
        String[] value={mAppLib.get(i).mAppName,mAppLib.get(i).mAppVersion,mAppLib.get(i).mAppCode,mAppLib.get(i).mAppAuthor,mAppLib.get(i).mAppImageUrl,mAppLib.get(i).mAppDesc};
        intent.putExtra(AppDetailsPage.EXTRA_KAY,value);
        startActivity(intent);
        break;
      }
    }
  }
}

Fixed version (ground truth):
public void onClick(View v){
  if (v.getId() == R.id.main_btn_applist_page) {
    Intent intent=new Intent();
    intent.setClass(this,AppListPage.class);
    startActivity(intent);
  }
 else   if (v.getId() == R.id.main_btn_update_page) {
    Intent intent=new Intent();
    intent.setClass(this,AppUpdatePage.class);
    startActivity(intent);
  }
 else   if (v.getId() == R.id.main_btn_download_page) {
    Intent intent=new Intent();
    intent.setClass(this,AppDownloadPage.class);
    startActivity(intent);
  }
 else {
    for (int i=0; i < mImageViewIds.length; ++i) {
      if (v.getId() == mImageViewIds[i]) {
        Intent intent=new Intent();
        intent.setClass(this,AppDetailsPage.class);
        String[] value={mAppLib.get(i).mAppName,mAppLib.get(i).mAppVersion,mAppLib.get(i).mAppCode,mAppLib.get(i).mAppAuthor,mAppLib.get(i).mAppImageUrl,mAppLib.get(i).mAppShortDesc};
        intent.putExtra(AppDetailsPage.EXTRA_KAY,value);
        startActivity(intent);
        break;
      }
    }
  }
}
Program: 153183
Project: 153183
Buggy source:
public void uninstall(String code){
  String[] columns={InstalledAppDb.COLUMN_PKG_NAME,InstalledAppDb.COLUMN_DOWNLOAD_URI};
  String where=InstalledAppDb.COLUMN_CODE + "String_Node_Str";
  String[] whereArgs={code};
  Cursor c=this.getContentResolver().query(BehooProvider.INSTALLED_APP_CONTENT_URI,columns,where,whereArgs,null);
  String pkgName=null;
  String downloadUri=null;
  if (null != c) {
    c.moveToFirst();
    int pkgNameId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_PKG_NAME);
    int downloadUriId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_DOWNLOAD_URI);
    pkgName=c.getString(pkgNameId);
    downloadUri=c.getString(downloadUriId);
    c.close();
    Log.i(TAG,"String_Node_Str" + code + "String_Node_Str"+ downloadUriId);
    UninstallThread thrd=new UninstallThread(this,code,pkgName,downloadUri);
    thrd.start();
  }
 else {
    String tempPkgName=(null != pkgName ? pkgName : "String_Node_Str");
    PackageStateSender.sendPackageUninstallBroadcast(this,code,tempPkgName,false);
  }
}

Fixed version (ground truth):
public void uninstall(String code){
  String[] columns={InstalledAppDb.COLUMN_PKG_NAME,InstalledAppDb.COLUMN_DOWNLOAD_URI};
  String where=InstalledAppDb.COLUMN_CODE + "String_Node_Str";
  String[] whereArgs={code};
  Cursor c=this.getContentResolver().query(BehooProvider.INSTALLED_APP_CONTENT_URI,columns,where,whereArgs,null);
  String pkgName=null;
  String downloadUri=null;
  if (null != c) {
    c.moveToFirst();
    int pkgNameId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_PKG_NAME);
    int downloadUriId=c.getColumnIndexOrThrow(InstalledAppDb.COLUMN_DOWNLOAD_URI);
    pkgName=c.getString(pkgNameId);
    downloadUri=c.getString(downloadUriId);
    c.close();
    Log.i(TAG,"String_Node_Str" + code + "String_Node_Str"+ downloadUriId);
    String token=null;
    if (null != ServiceManager.inst().getSyncHandler()) {
      token=ServiceManager.inst().getSyncHandler().getToken();
    }
    UninstallThread thrd=new UninstallThread(this,code,pkgName,downloadUri,token);
    thrd.start();
  }
 else {
    String tempPkgName=(null != pkgName ? pkgName : "String_Node_Str");
    PackageStateSender.sendPackageUninstallBroadcast(this,code,tempPkgName,false);
  }
}
Program: 153184
Project: 153184
Buggy source:
public View getView(int position,View convertView,ViewGroup parent){
  View view=null;
  if (convertView == null) {
    view=mInflater.inflate(R.layout.applist_item_layout,parent,false);
    view.setFocusable(true);
  }
 else {
    view=convertView;
  }
  AppInfo appInfo=mAppList.get(position);
  TextView titleView=(TextView)view.findViewById(R.id.applist_item_title);
  titleView.setText(appInfo.mAppName);
  TextView subTitleView=(TextView)view.findViewById(R.id.applist_item_subtitle);
  subTitleView.setText(appInfo.mAppAuthor);
  return view;
}

Fixed version (ground truth):
public View getView(int position,View convertView,ViewGroup parent){
  View view=null;
  if (convertView == null) {
    view=mInflater.inflate(R.layout.applist_item_layout,parent,false);
  }
 else {
    view=convertView;
  }
  AppInfo appInfo=mAppList.get(position);
  TextView titleView=(TextView)view.findViewById(R.id.applist_item_title);
  titleView.setText(appInfo.mAppName);
  TextView subTitleView=(TextView)view.findViewById(R.id.applist_item_subtitle);
  subTitleView.setText(appInfo.mAppAuthor);
  return view;
}
Program: 153185
Project: 153185
Buggy source:
public View getView(int position,View convertView,ViewGroup parent){
  View view=null;
  if (convertView == null) {
    view=mInflater.inflate(R.layout.applist_item_layout,parent,false);
    view.setFocusable(true);
  }
 else {
    view=convertView;
  }
  AppInfo appInfo=mAppLib.get(position);
  TextView titleView=(TextView)view.findViewById(R.id.applist_item_title);
  titleView.setText(appInfo.mAppName);
  TextView subTitleView=(TextView)view.findViewById(R.id.applist_item_subtitle);
  subTitleView.setText(appInfo.mAppAuthor);
  return view;
}

Fixed version (ground truth):
public View getView(int position,View convertView,ViewGroup parent){
  View view=null;
  if (convertView == null) {
    view=mInflater.inflate(R.layout.applist_item_layout,parent,false);
  }
 else {
    view=convertView;
  }
  AppInfo appInfo=mAppLib.get(position);
  TextView titleView=(TextView)view.findViewById(R.id.applist_item_title);
  titleView.setText(appInfo.mAppName);
  TextView subTitleView=(TextView)view.findViewById(R.id.applist_item_subtitle);
  subTitleView.setText(appInfo.mAppAuthor);
  return view;
}
Program: 153187
Project: 153187
Buggy source:
public void run(){
synchronized (SYNC_OBJ) {
    boolean ret=false;
    try {
      Log.i(TAG,"String_Node_Str" + mPkgSrcUri);
      ContentValues cv=new ContentValues();
      cv.put(PackageDbHelper.COLUMN_STATE,Constants.PackageState.installing.name());
      mPkgDBHelper.update(mPkgCode,cv);
      PackageStateSender.sendPackageStateBroadcast(mContext,mPkgCode,Constants.PackageState.installing.name());
      PackageInstaller installer=new PackageInstaller(mContext);
      ret=installer.installPackage(Uri.parse(mPkgSrcUri));
    }
 catch (    Throwable tr) {
      ret=false;
    }
    String status=(ret ? Constants.PackageState.install_succeeded.name() : Constants.PackageState.install_failed.name());
    ContentValues cv2=new ContentValues();
    cv2.put(PackageDbHelper.COLUMN_STATE,status);
    if (ret) {
      PackageParser.Package pkgInfo=PackageUtils.getPackageInfo(Uri.parse(mPkgSrcUri));
      cv2.put(PackageDbHelper.COLUMN_PKG_NAME,pkgInfo.packageName);
      String where=Downloads.COLUMN_NOTIFICATION_EXTRAS + "String_Node_Str";
      String[] whereArgs={mPkgCode};
      int delCount=mContext.getContentResolver().delete(Downloads.CONTENT_URI,where,whereArgs);
      Log.i(TAG,"String_Node_Str" + mPkgCode + "String_Node_Str"+ Integer.toString(delCount));
    }
    mPkgDBHelper.update(mPkgCode,cv);
    PackageStateSender.sendPackageStateBroadcast(mContext,mPkgCode,status);
    Log.i(TAG,"String_Node_Str" + status + "String_Node_Str"+ mPkgSrcUri);
  }
}

Fixed version (ground truth):
public void run(){
synchronized (SYNC_OBJ) {
    boolean ret=false;
    try {
      Log.i(TAG,"String_Node_Str" + mPkgSrcUri);
      ContentValues cv=new ContentValues();
      cv.put(PackageDbHelper.COLUMN_STATE,Constants.PackageState.installing.name());
      mPkgDBHelper.update(mPkgCode,cv);
      PackageStateSender.sendPackageStateBroadcast(mContext,mPkgCode,Constants.PackageState.installing.name());
      PackageInstaller installer=new PackageInstaller(mContext);
      ret=installer.installPackage(Uri.parse(mPkgSrcUri));
    }
 catch (    Throwable tr) {
      ret=false;
    }
    String status=(ret ? Constants.PackageState.install_succeeded.name() : Constants.PackageState.install_failed.name());
    ContentValues cv2=new ContentValues();
    cv2.put(PackageDbHelper.COLUMN_STATE,status);
    if (ret) {
      PackageParser.Package pkgInfo=PackageUtils.getPackageInfo(Uri.parse(mPkgSrcUri));
      cv2.put(PackageDbHelper.COLUMN_PKG_NAME,pkgInfo.packageName);
      String where=Downloads.COLUMN_NOTIFICATION_EXTRAS + "String_Node_Str";
      String[] whereArgs={mPkgCode};
      int delCount=mContext.getContentResolver().delete(Downloads.CONTENT_URI,where,whereArgs);
      Log.i(TAG,"String_Node_Str" + mPkgCode + "String_Node_Str"+ Integer.toString(delCount));
    }
    mPkgDBHelper.update(mPkgCode,cv2);
    PackageStateSender.sendPackageStateBroadcast(mContext,mPkgCode,status);
    Log.i(TAG,"String_Node_Str" + status + "String_Node_Str"+ mPkgSrcUri);
  }
}
Program: 153188
Project: 153188
Buggy source:
private void addAppInfo(String code){
  if (!mCodeAppInfoMap.containsKey(code)) {
    String where=PackageDbHelper.COLUMN_CODE + "String_Node_Str";
    String[] whereArgs={code};
    ArrayList<AppInfo> appList=ServiceManager.inst().getDownloadHandler().getAppList(where,whereArgs);
    Assert.assertTrue(null != appList && appList.size() == 1);
    mCodeAppInfoMap.put(code,appList.get(0));
  }
}

Fixed version (ground truth):
private void addAppInfo(String code){
  if (!mCodeAppInfoMap.containsKey(code)) {
    String where=PackageDbHelper.COLUMN_CODE + "String_Node_Str";
    String[] whereArgs={code};
    ArrayList<AppInfo> appList=ServiceManager.inst().getDownloadHandler().getAppList(where,whereArgs);
    if (null != appList && appList.size() == 1) {
      mCodeAppInfoMap.put(code,appList.get(0));
    }
  }
}
Program: 153189
Project: 153189
Buggy source:
public boolean doTask(){
  try {
    String url=UrlHelpers.getAppListUrl(ServiceManager.inst().getSyncHandler().getToken(),mAppList.size() + 1,PAGE_SIZE);
    Log.i(TAG,"String_Node_Str" + url);
    ArrayList<AppInfo> appLib=mAppListProxy.getAppList(url,PAGE_SIZE);
    if (null != appLib) {
      mAppList.addAll(appLib);
      mContinueDownload=(appLib.size() > 0);
      return true;
    }
  }
 catch (  Throwable tr) {
    Log.w(TAG,"String_Node_Str" + tr.getLocalizedMessage());
  }
  return false;
}

Fixed version (ground truth):
public boolean doTask(){
  try {
    String url=UrlHelpers.getAppListUrl(ServiceManager.inst().getSyncHandler().getToken(),mAppList.size() + 1,PAGE_SIZE);
    Log.i(TAG,"String_Node_Str" + url);
    ArrayList<AppInfo> appLib=mAppListProxy.getAppList(url,PAGE_SIZE);
    mAppList.addAll(appLib);
    mContinueDownload=(mAppListProxy.getAppListTotal() > mAppList.size());
    return (appLib.size() > 0);
  }
 catch (  Throwable tr) {
    Log.w(TAG,"String_Node_Str" + tr.getLocalizedMessage());
  }
  return false;
}
Program: 153190
Project: 153190
Buggy source:
protected void onTaskCanceled(DialogInterface dlg){
  mHttpTask.cancel();
}

Fixed version (ground truth):
protected void onTaskCanceled(DialogInterface dlg){
  mHttpTask.setHandler(null);
  mHttpTask.cancel();
}
Program: 153191
Project: 153191
Buggy source:
protected void onTaskCompleted(boolean result){
  if (result) {
    if (mAppLib.size() > 0) {
      mCurrentSelection=0;
    }
    for (int i=0; i < mImageViewIds.length; ++i) {
      ImageView iv=(ImageView)findViewById(mImageViewIds[i]);
      if (i < mAppLib.size()) {
        mCodeIndexMap.put(mAppLib.get(i).mAppCode,i);
        iv.setVisibility(View.VISIBLE);
        iv.setImageResource(R.drawable.appicon_default);
        iv.setFocusable(true);
        iv.setOnFocusChangeListener(this);
        iv.setTag(new Integer(i));
        iv.setPadding(5,5,5,5);
        if (i == mCurrentSelection) {
          iv.requestFocus();
          updateInstallButtonGuard();
        }
        executeImageTask(mAppLib.get(i).mAppImageUrl,mAppLib.get(i).mAppCode);
      }
 else {
        iv.setVisibility(View.INVISIBLE);
      }
    }
  }
}

Fixed version (ground truth):
protected void onTaskCompleted(boolean result){
  if (result) {
    if (mAppLib.size() > 0) {
      mCurrentSelection=0;
    }
    for (int i=0; i < mImageViewIds.length; ++i) {
      ImageView iv=(ImageView)findViewById(mImageViewIds[i]);
      if (i < mAppLib.size()) {
        mCodeIndexMap.put(mAppLib.get(i).mAppCode,i);
        iv.setVisibility(View.VISIBLE);
        iv.setImageResource(R.drawable.appicon_default);
        iv.setFocusable(true);
        iv.setOnFocusChangeListener(this);
        iv.setTag(new Integer(i));
        iv.setPadding(8,8,8,8);
        if (i == mCurrentSelection) {
          iv.requestFocus();
          updateInstallButtonGuard();
        }
        executeImageTask(mAppLib.get(i).mAppImageUrl,mAppLib.get(i).mAppCode);
      }
 else {
        iv.setVisibility(View.INVISIBLE);
      }
    }
  }
}
Program: 153192
Project: 153192
Buggy source:
protected boolean doTask(){
  try {
    String url=UrlHelpers.getPromotionUrl(ServiceManager.inst().getSyncHandler().getToken());
    Log.i(TAG,"String_Node_Str" + url);
    ArrayList<AppInfo> appLib=mAppListProxy.getAppList(url,APP_PROMOTION_NUM);
    if (null != appLib) {
      mAppLib=appLib;
      return true;
    }
  }
 catch (  RemoteException e) {
    Log.w(TAG,"String_Node_Str" + e.getLocalizedMessage());
    return false;
  }
  return false;
}

Fixed version (ground truth):
protected boolean doTask(){
  try {
    String url=UrlHelpers.getPromotionUrl(ServiceManager.inst().getSyncHandler().getToken());
    Log.i(TAG,"String_Node_Str" + url);
    ArrayList<AppInfo> appLib=mAppListProxy.getPromotionList(url,APP_PROMOTION_NUM);
    mAppLib=appLib;
    return (mAppLib.size() > 0);
  }
 catch (  RemoteException e) {
    Log.w(TAG,"String_Node_Str" + e.getLocalizedMessage());
    return false;
  }
}
Program: 153193
Project: 153193
Buggy source:
protected void onTaskCanceled(DialogInterface dlg){
  mHttpTask.cancel();
}

Fixed version (ground truth):
protected void onTaskCanceled(DialogInterface dlg){
  mHttpTask.setHandler(null);
  mHttpTask.cancel();
}
Program: 153194
Project: 153194
Buggy source:
public void onDestroy(){
  super.onDestroy();
  mThreadPool.resume();
  mThreadPool.shutdown();
}

Fixed version (ground truth):
public void onDestroy(){
  super.onDestroy();
  mExiting=true;
  mThreadPool.resume();
  mThreadPool.shutdown();
}
Program: 153195
Project: 153195
Buggy source:
public void handleMessage(Message msg){
switch (msg.what) {
case DownloadConstants.MSG_PROTOCOL_SUCCEED:
    AsyncTaskActivity.this.dismissDialog(AsyncTaskActivity.WAITING_DIALOG);
  AsyncTaskActivity.this.onTaskCompleted(true);
break;
case DownloadConstants.MSG_PROTOCOL_FAILURE:
Log.w(TAG,"String_Node_Str" + "String_Node_Str");
AsyncTaskActivity.this.dismissDialog(AsyncTaskActivity.WAITING_DIALOG);
AsyncTaskActivity.this.onTaskCompleted(false);
showDialog(TASK_ERROR_DIALOG);
break;
case DownloadConstants.MSG_IMG_SUCCEED:
{
Bundle data=msg.getData();
AsyncTaskActivity.this.onImageCompleted(true,data.getString(DownloadConstants.MSG_DATA_URL),data.getString(DownloadConstants.MSG_DATA_APPCODE));
break;
}
case DownloadConstants.MSG_IMG_FAILURE:
{
Bundle data=msg.getData();
AsyncTaskActivity.this.onImageCompleted(false,data.getString(DownloadConstants.MSG_DATA_URL),data.getString(DownloadConstants.MSG_DATA_APPCODE));
break;
}
default :
break;
}
super.handleMessage(msg);
}

Fixed version (ground truth):
public void handleMessage(Message msg){
  Log.i(TAG,"String_Node_Str" + msg.what + "String_Node_Str"+ (AsyncTaskActivity.this.mExiting ? "String_Node_Str" : "String_Node_Str"));
switch (msg.what) {
case DownloadConstants.MSG_PROTOCOL_SUCCEED:
    if (!mExiting) {
      AsyncTaskActivity.this.dismissDialog(AsyncTaskActivity.WAITING_DIALOG);
      AsyncTaskActivity.this.onTaskCompleted(true);
    }
  break;
case DownloadConstants.MSG_PROTOCOL_FAILURE:
if (!mExiting) {
  Log.w(TAG,"String_Node_Str" + "String_Node_Str");
  AsyncTaskActivity.this.dismissDialog(AsyncTaskActivity.WAITING_DIALOG);
  AsyncTaskActivity.this.onTaskCompleted(false);
  showDialog(TASK_ERROR_DIALOG);
}
break;
case DownloadConstants.MSG_IMG_SUCCEED:
if (!mExiting) {
Bundle data=msg.getData();
AsyncTaskActivity.this.onImageCompleted(true,data.getString(DownloadConstants.MSG_DATA_URL),data.getString(DownloadConstants.MSG_DATA_APPCODE));
break;
}
case DownloadConstants.MSG_IMG_FAILURE:
if (!mExiting) {
Bundle data=msg.getData();
AsyncTaskActivity.this.onImageCompleted(false,data.getString(DownloadConstants.MSG_DATA_URL),data.getString(DownloadConstants.MSG_DATA_APPCODE));
break;
}
default :
break;
}
super.handleMessage(msg);
}
Program: 153198
Project: 153198
Buggy source:
public void onServiceConnected(ComponentName cname,IBinder binder){
  mInstallService=((DownloadInstallService.LocalServiceBinder)binder).getService();
  mInstallButtonGuard=new InstallButtonGuard(mInstallButton,null,mInstallService);
}

Fixed version (ground truth):
public void onServiceConnected(ComponentName cname,IBinder binder){
  mInstallService=((DownloadInstallService.LocalServiceBinder)binder).getService();
  int pos=mListView.getSelectedItemPosition();
  if (ListView.INVALID_POSITION != pos) {
    String code=(String)mListView.getItemAtPosition(pos);
    if (null != code) {
      mInstallButtonGuard=new InstallButtonGuard(mInstallButton,mAppMap.get(code),mInstallService);
    }
  }
}
Program: 153199
Project: 153199
Buggy source:
protected void onTaskCompleted(boolean result){
  Log.i(TAG,String.format("String_Node_Str",result,mAppList.size()));
  mListView.invalidate();
  if (mListView.getCount() > 0)   mListView.setSelection(0);
  updateUIState();
}

Fixed version (ground truth):
protected void onTaskCompleted(boolean result){
  Log.i(TAG,String.format("String_Node_Str",result ? 1 : 0,mAppList.size()));
  mListView.invalidate();
  if (mListView.getCount() > 0)   mListView.setSelection(0);
  updateUIState();
}
Program: 153200
Project: 153200
Buggy source:
public void onServiceConnected(ComponentName cname,IBinder binder){
  mInstallService=((DownloadInstallService.LocalServiceBinder)binder).getService();
  if (-1 != mCurrentSelection) {
    mInstallButtonGuard=new InstallButtonGuard(mButtonInstall,mAppLib.get(mCurrentSelection),mInstallService);
    mInstallButtonGuard.setOnInstallListener(AppMarket.this);
  }
}

Fixed version (ground truth):
public void onServiceConnected(ComponentName cname,IBinder binder){
  mInstallService=((DownloadInstallService.LocalServiceBinder)binder).getService();
  createInstallButtonGuard();
}
Program: 153201
Project: 153201
Buggy source:
public void onFocusChange(View v,boolean hasFocus){
  Integer index=-1;
  int min=mImageViewIds[0];
  int max=mImageViewIds[mImageViewIds.length - 1];
  if (v.getId() <= max && v.getId() >= min) {
    index=(Integer)v.getTag();
    mCurrentSelection=index;
    if (hasFocus) {
      updateUIState();
      v.setBackgroundResource(R.drawable.focus);
      mButtonInstall.setNextFocusDownId(v.getId());
      mButtonAppList.setNextFocusUpId(v.getId());
      mButtonUpdate.setNextFocusUpId(v.getId());
      mButtonDownloadMgr.setNextFocusUpId(v.getId());
      mInstallButtonGuard.setAppInfo(mAppLib.get(index));
    }
 else {
      v.setBackgroundResource(0);
    }
  }
}

Fixed version (ground truth):
public void onFocusChange(View v,boolean hasFocus){
  Integer index=(Integer)v.getTag();
  if (0 <= index && index < mImageViewIds.length) {
    if (hasFocus) {
      mCurrentSelection=index;
      Log.i(TAG,"String_Node_Str" + Integer.toString(index));
      updateUIState();
      v.setBackgroundResource(R.drawable.focus);
      mButtonInstall.setNextFocusDownId(v.getId());
      mButtonAppList.setNextFocusUpId(v.getId());
      mButtonUpdate.setNextFocusUpId(v.getId());
      mButtonDownloadMgr.setNextFocusUpId(v.getId());
    }
 else {
      v.setBackgroundResource(0);
    }
  }
}
Program: 153202
Project: 153202
Buggy source:
protected void onTaskCompleted(boolean result){
  if (mAppLib.size() > 0) {
    mCurrentSelection=0;
  }
  for (int i=0; i < mImageViewIds.length; ++i) {
    ImageView iv=(ImageView)findViewById(mImageViewIds[i]);
    if (i < mAppLib.size()) {
      iv.setImageResource(R.drawable.test);
      iv.setFocusable(true);
      iv.setOnFocusChangeListener(this);
      iv.setTag(new Integer(i));
      iv.setPadding(5,5,5,5);
      if (i == mCurrentSelection) {
        iv.requestFocus();
      }
      if (null != mAppLib.get(i).mAppImageUrl) {
        executeImageTask(mAppLib.get(i));
      }
    }
 else {
      iv.setVisibility(View.INVISIBLE);
    }
  }
  updateUIState();
}

Fixed version (ground truth):
protected void onTaskCompleted(boolean result){
  if (mAppLib.size() > 0) {
    mCurrentSelection=0;
  }
  for (int i=0; i < mImageViewIds.length; ++i) {
    ImageView iv=(ImageView)findViewById(mImageViewIds[i]);
    if (i < mAppLib.size()) {
      iv.setImageResource(R.drawable.test);
      iv.setFocusable(true);
      iv.setOnFocusChangeListener(this);
      iv.setTag(new Integer(i));
      iv.setPadding(5,5,5,5);
      if (i == mCurrentSelection) {
        iv.requestFocus();
        createInstallButtonGuard();
      }
      if (null != mAppLib.get(i).mAppImageUrl) {
        executeImageTask(mAppLib.get(i));
      }
    }
 else {
      iv.setVisibility(View.INVISIBLE);
    }
  }
  updateUIState();
}
Program: 153203
Project: 153203
Buggy source:
private void updateUIState(){
  if (mAppLib.size() > 0) {
    assert(mCurrentSelection >= 0 && mCurrentSelection < mAppLib.size());
    AppInfo appInfo=mAppLib.get(mCurrentSelection);
    TextView tv=(TextView)findViewById(R.id.main_app_title);
    tv.setText(appInfo.mAppName);
    tv=(TextView)findViewById(R.id.main_app_author);
    tv.setText(appInfo.mAppAuthor);
    tv=(TextView)findViewById(R.id.main_app_version);
    tv.setText(appInfo.mAppVersion);
    tv=(TextView)findViewById(R.id.main_app_desc);
    tv.setText(appInfo.mAppShortDesc);
    if (appInfo.getDrawable() != null) {
      ImageView iv=(ImageView)findViewById(mImageViewIds[mCurrentSelection]);
      Assert.assertTrue(true);
      iv.setImageDrawable(appInfo.getDrawable());
    }
  }
}

Fixed version (ground truth):
private void updateUIState(){
  if (mAppLib.size() > 0) {
    assert(mCurrentSelection >= 0 && mCurrentSelection < mAppLib.size());
    AppInfo appInfo=mAppLib.get(mCurrentSelection);
    TextView tv=(TextView)findViewById(R.id.main_app_title);
    tv.setText(appInfo.mAppName);
    tv=(TextView)findViewById(R.id.main_app_author);
    tv.setText(appInfo.mAppAuthor);
    tv=(TextView)findViewById(R.id.main_app_version);
    tv.setText(appInfo.mAppVersion);
    tv=(TextView)findViewById(R.id.main_app_desc);
    tv.setText(appInfo.mAppShortDesc);
    if (appInfo.getDrawable() != null) {
      ImageView iv=(ImageView)findViewById(mImageViewIds[mCurrentSelection]);
      Assert.assertTrue(true);
      iv.setImageDrawable(appInfo.getDrawable());
      iv=(ImageView)findViewById(R.id.main_app_logo);
      iv.setImageDrawable(appInfo.getDrawable());
    }
  }
}
Program: 153204
Project: 153204
Buggy source:
public void updateListView(){
  mAppLib=mInstallService.getUpdateList();
  mListView.invalidate();
  if (ListView.INVALID_POSITION == mListView.getSelectedItemPosition() && mListView.getCount() > 0) {
    mListView.setSelection(0);
  }
 else {
    updateUIState();
  }
}

Fixed version (ground truth):
public void updateListView(){
  ArrayList<AppInfo> appLib=mInstallService.getUpdateList();
  if (null != appLib) {
    mAppLib=appLib;
    mListView.invalidate();
    if (ListView.INVALID_POSITION == mListView.getSelectedItemPosition() && mListView.getCount() > 0) {
      mListView.setSelection(0);
    }
 else {
      updateUIState();
    }
  }
}
Program: 153205
Project: 153205
Buggy source:
@Override public TaskFlow toNextColumn() throws IOException {
  TaskFlow taskFlow;
  try {
    taskFlow=to(TaskLocation.NEXT);
  }
 catch (  InternalServerErrorKanbaneryException e) {
    throw new TaskAlreadyInLastColumnException("String_Node_Str",e);
  }
  return taskFlow;
}

Fixed version (ground truth):
@Override public TaskFlow toNextColumn() throws IOException {
  TaskFlow taskFlow;
  taskFlow=to(TaskLocation.NEXT);
  return taskFlow;
}
Program: 153206
Project: 153206
Buggy source:
/** 
 * This will give you back the position of a repository which is stored inside the <b>target</b> directory.
 * @return The directory where the repository has been stored.
 */
public String getRepositoryDirectory(){
  return getTargetDir() + File.separatorChar + "String_Node_Str";
}

Fixed version (ground truth):
public String getRepositoryDirectory(String supplemental){
  return getTargetDir() + File.separatorChar + "String_Node_Str"+ supplemental;
}
Program: 153207
Project: 153207
Buggy source:
/** 
 * This will give you back the position of an index directory which is stored inside the <b>target</b> directory.
 * @return The directory where the index is stored.
 */
public String getIndexDirectory(){
  return getTargetDir() + File.separatorChar + "String_Node_Str";
}

Fixed version (ground truth):
public String getIndexDirectory(String supplemental){
  return getTargetDir() + File.separatorChar + "String_Node_Str"+ supplemental+ "String_Node_Str";
}
Program: 153208
Project: 153208
Buggy source:
public void scanEndRevision(Long revision,Integer changeSetSize){
}

Fixed version (ground truth):
public void scanEndRevision(Long revision,Integer changeSetSize){
  System.out.print("String_Node_Str");
}
Program: 153209
Project: 153209
Buggy source:
public void scanBeginRevision(Long revision,Integer changeSetSize){
  Long div=revision * 100 / numberOfRevisions;
  System.out.printf("String_Node_Str",div,numberOfRevisions,changeSetSize,revision);
}

Fixed version (ground truth):
public void scanBeginRevision(Long revision,Integer changeSetSize){
  Long div=revision * 100 / numberOfRevisions;
  System.out.printf("String_Node_Str",div,numberOfRevisions,revision,changeSetSize);
}
Program: 153212
Project: 153212
Buggy source:
public ConfigurationRepositories(String configFile){
  setConfigFile(configFile);
  try {
    iniFile=new Ini(new FileInputStream(configFile));
  }
 catch (  InvalidFileFormatException e) {
    LOGGER.error("String_Node_Str" + e);
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
public ConfigurationRepositories(String configFile){
  setConfigFile(configFile);
  try {
    iniFile=new Ini(new FileInputStream(configFile));
  }
 catch (  InvalidFileFormatException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 153213
Project: 153213
Buggy source:
public RepositoryJobConfiguration(String configFile,RepositoryConfiguration reposConfig) throws Exception {
  setConfigFile(configFile);
  setReposConfig(reposConfig);
  File f=new File(configFile);
  if (f.exists()) {
    setNewCreated(false);
    try {
      FileInputStream fin=new FileInputStream(f);
      iniFile=new Ini(fin);
      configData=iniFile.get(REPOSITORY_CONFIG_SECTION).as(IReposConfig.class);
    }
 catch (    InvalidFileFormatException e) {
      LOGGER.error("String_Node_Str" + e);
      throw e;
    }
catch (    IOException e) {
      LOGGER.error("String_Node_Str" + e);
      throw e;
    }
  }
 else {
    LOGGER.debug("String_Node_Str" + configFile);
    setNewCreated(true);
    iniFile=new Ini();
    iniFile.add(REPOSITORY_CONFIG_SECTION);
    configData=iniFile.get(REPOSITORY_CONFIG_SECTION).as(IReposConfig.class);
    configData.setFromrev(Long.toString(reposConfig.getFromRev()));
    configData.setTorev(reposConfig.getToRev());
    try {
      if (f.createNewFile()) {
        FileWriter out=new FileWriter(f);
        iniFile.store(out);
        out.close();
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str" + e);
    }
  }
}

Fixed version (ground truth):
public RepositoryJobConfiguration(String configFile,RepositoryConfiguration reposConfig) throws Exception {
  setConfigFile(configFile);
  setReposConfig(reposConfig);
  File f=new File(configFile);
  if (f.exists()) {
    setNewCreated(false);
    try {
      FileInputStream fin=new FileInputStream(f);
      iniFile=new Ini(fin);
      configData=iniFile.get(REPOSITORY_CONFIG_SECTION).as(IReposConfig.class);
    }
 catch (    InvalidFileFormatException e) {
      LOGGER.error("String_Node_Str",e);
      throw e;
    }
catch (    IOException e) {
      LOGGER.error("String_Node_Str",e);
      throw e;
    }
  }
 else {
    LOGGER.debug("String_Node_Str" + configFile);
    setNewCreated(true);
    iniFile=new Ini();
    iniFile.add(REPOSITORY_CONFIG_SECTION);
    configData=iniFile.get(REPOSITORY_CONFIG_SECTION).as(IReposConfig.class);
    configData.setFromrev(Long.toString(reposConfig.getFromRev()));
    configData.setTorev(reposConfig.getToRev());
    try {
      if (f.createNewFile()) {
        FileWriter out=new FileWriter(f);
        iniFile.store(out);
        out.close();
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str",e);
    }
  }
}
Program: 153214
Project: 153214
Buggy source:
public void save(){
  try {
    LOGGER.debug("String_Node_Str");
    FileWriter out=new FileWriter(new File(getConfigFile()));
    Section sec=iniFile.get(REPOSITORY_CONFIG_SECTION);
    sec.from(configData);
    iniFile.store(out);
    out.close();
    LOGGER.debug("String_Node_Str" + getConfigFile() + "String_Node_Str");
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
public void save(){
  try {
    LOGGER.debug("String_Node_Str");
    FileWriter out=new FileWriter(new File(getConfigFile()));
    Section sec=iniFile.get(REPOSITORY_CONFIG_SECTION);
    sec.from(configData);
    iniFile.store(out);
    out.close();
    LOGGER.debug("String_Node_Str" + getConfigFile() + "String_Node_Str");
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 153215
Project: 153215
Buggy source:
public IndexWriter createIndexWriter(String indexDirectory){
  LOGGER.debug("String_Node_Str" + indexDirectory + "String_Node_Str");
  setIndexDirectory(indexDirectory);
  File indexDir=new File(getIndexDirectory());
  IndexWriter writer=null;
  try {
    LOGGER.debug("String_Node_Str");
    if (isCreate()) {
      LOGGER.debug("String_Node_Str");
      writer=new IndexWriter(indexDir,getAnalyzer(),true,MaxFieldLength.UNLIMITED);
    }
 else {
      LOGGER.debug("String_Node_Str");
      writer=new IndexWriter(indexDir,getAnalyzer(),MaxFieldLength.UNLIMITED);
    }
    LOGGER.debug("String_Node_Str");
    writer.setUseCompoundFile(isUseCompoundFile());
    writer.setMergeFactor(getMergeFactor());
    writer.setMaxBufferedDocs(getMaxBufferedDocs());
  }
 catch (  CorruptIndexException e) {
    LOGGER.error("String_Node_Str" + e);
  }
catch (  LockObtainFailedException e) {
    LOGGER.error("String_Node_Str" + e);
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str" + e);
  }
  return writer;
}

Fixed version (ground truth):
public IndexWriter createIndexWriter(String indexDirectory){
  LOGGER.debug("String_Node_Str" + indexDirectory + "String_Node_Str");
  setIndexDirectory(indexDirectory);
  File indexDir=new File(getIndexDirectory());
  IndexWriter writer=null;
  try {
    LOGGER.debug("String_Node_Str");
    if (isCreate()) {
      LOGGER.debug("String_Node_Str");
      writer=new IndexWriter(indexDir,getAnalyzer(),true,MaxFieldLength.UNLIMITED);
    }
 else {
      LOGGER.debug("String_Node_Str");
      writer=new IndexWriter(indexDir,getAnalyzer(),MaxFieldLength.UNLIMITED);
    }
    LOGGER.debug("String_Node_Str");
    writer.setUseCompoundFile(isUseCompoundFile());
    writer.setMergeFactor(getMergeFactor());
    writer.setMaxBufferedDocs(getMaxBufferedDocs());
  }
 catch (  CorruptIndexException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  LockObtainFailedException e) {
    LOGGER.error("String_Node_Str",e);
  }
catch (  IOException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return writer;
}
Program: 153216
Project: 153216
Buggy source:
/** 
 * Merge all given indexes together to a single index.
 * @param destination This will define the destination directoryof the index where all other indexes will be merged to.
 * @param indexList This is the list of indexes which aremerged into the destination index.
 */
public static void mergeIndex(String destination,List<String> indexList){
  LOGGER.debug("String_Node_Str" + destination);
  Index index=new Index();
  index.setCreate(false);
  IndexWriter indexWriter=index.createIndexWriter(destination);
  try {
    LOGGER.info("String_Node_Str");
    FSDirectory[] fsDirs=new FSDirectory[indexList.size()];
    for (int i=0; i < indexList.size(); i++) {
      fsDirs[i]=FSDirectory.getDirectory(indexList.get(i));
    }
    indexWriter.addIndexesNoOptimize(fsDirs);
    indexWriter.optimize();
    indexWriter.close();
    LOGGER.info("String_Node_Str");
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
/** 
 * Merge all given indexes together to a single index.
 * @param destination This will define the destination directoryof the index where all other indexes will be merged to.
 * @param indexList This is the list of indexes which aremerged into the destination index.
 */
public static void mergeIndex(String destination,List<String> indexList){
  LOGGER.debug("String_Node_Str" + destination);
  Index index=new Index();
  index.setCreate(false);
  IndexWriter indexWriter=index.createIndexWriter(destination);
  try {
    LOGGER.info("String_Node_Str");
    FSDirectory[] fsDirs=new FSDirectory[indexList.size()];
    for (int i=0; i < indexList.size(); i++) {
      fsDirs[i]=FSDirectory.getDirectory(indexList.get(i));
    }
    indexWriter.addIndexesNoOptimize(fsDirs);
    indexWriter.optimize();
    indexWriter.close();
    LOGGER.info("String_Node_Str");
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 153218
Project: 153218
Buggy source:
public void execute(JobExecutionContext context) throws JobExecutionException {
  try {
    subexecute(context);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
public void execute(JobExecutionContext context) throws JobExecutionException {
  try {
    subexecute(context);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
  }
}
Program: 153219
Project: 153219
Buggy source:
/** 
 * This will initialize the repository access, based on the given  <code>repositoryURL</code>.
 */
private void initRepository(){
  try {
    LOGGER.info("String_Node_Str");
    repository=SVNRepositoryFactory.create(SVNURL.parseURIEncoded(getUrl()));
  }
 catch (  SVNException svne) {
    LOGGER.error("String_Node_Str" + getUrl() + "String_Node_Str"+ svne);
  }
}

Fixed version (ground truth):
/** 
 * This will initialize the repository access, based on the given  <code>repositoryURL</code>.
 */
private void initRepository(){
  try {
    LOGGER.info("String_Node_Str");
    repository=SVNRepositoryFactory.create(SVNURL.parseURIEncoded(getUrl()));
  }
 catch (  SVNException svne) {
    LOGGER.error("String_Node_Str" + getUrl() + "String_Node_Str",svne);
  }
}
Program: 153220
Project: 153220
Buggy source:
/** 
 * This will try to do a connection to the repository. This is used to check the the user name/password combination.
 * @return If true the connection could be established success fullfalse otherwise.
 */
public boolean validConnection(){
  LOGGER.debug("String_Node_Str");
  try {
    repository.testConnection();
    setUuid(repository.getRepositoryUUID(false));
  }
 catch (  SVNException e) {
    LOGGER.error("String_Node_Str" + e.getMessage());
    return false;
  }
  LOGGER.info("String_Node_Str");
  return true;
}

Fixed version (ground truth):
/** 
 * This will try to do a connection to the repository. This is used to check the the user name/password combination.
 * @return If true the connection could be established success fullfalse otherwise.
 */
public boolean validConnection(){
  LOGGER.debug("String_Node_Str");
  try {
    repository.testConnection();
    setUuid(repository.getRepositoryUUID(false));
  }
 catch (  SVNException e) {
    LOGGER.error("String_Node_Str",e);
    return false;
  }
  LOGGER.info("String_Node_Str");
  return true;
}
Program: 153221
Project: 153221
Buggy source:
public void execute(Repository repository,SVNDirEntry dirEntry,String path,long revision){
  FileName fn=new FileName(path);
  if (fn.getExt().length() > 0) {
    try {
      String className=FileExtensionProperty.getInstance().getProperty(fn.getExt());
      try {
        Class handlerClass=Class.forName(className);
        AScanDocument dh=(AScanDocument)handlerClass.newInstance();
        dh.setProperties(getFileProperties());
        dh.setDocument(doc);
        dh.indexDocument(repository,dirEntry,path,revision);
      }
 catch (      ClassNotFoundException e) {
        LOGGER.error("String_Node_Str" + className + "String_Node_Str"+ e);
      }
catch (      InstantiationException e) {
        LOGGER.error("String_Node_Str" + className + "String_Node_Str"+ e);
      }
catch (      IllegalAccessException e) {
        LOGGER.error("String_Node_Str" + className + "String_Node_Str"+ e);
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str" + fn.getExt() + "String_Node_Str");
      indexDefaultDoc(repository,dirEntry,path,revision);
    }
  }
 else {
    LOGGER.warn("String_Node_Str" + path + "String_Node_Str");
    indexDefaultDoc(repository,dirEntry,path,revision);
  }
}

Fixed version (ground truth):
public void execute(Repository repository,SVNDirEntry dirEntry,String path,long revision){
  FileName fn=new FileName(path);
  if (fn.getExt().length() > 0) {
    try {
      String className=FileExtensionProperty.getInstance().getProperty(fn.getExt());
      try {
        Class handlerClass=Class.forName(className);
        AScanDocument dh=(AScanDocument)handlerClass.newInstance();
        dh.setProperties(getFileProperties());
        dh.setDocument(doc);
        dh.indexDocument(repository,dirEntry,path,revision);
      }
 catch (      ClassNotFoundException e) {
        LOGGER.error("String_Node_Str" + className,e);
      }
catch (      InstantiationException e) {
        LOGGER.error("String_Node_Str" + className,e);
      }
catch (      IllegalAccessException e) {
        LOGGER.error("String_Node_Str" + className,e);
      }
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str" + fn.getExt() + "String_Node_Str",e);
      indexDefaultDoc(repository,dirEntry,path,revision);
    }
  }
 else {
    LOGGER.warn("String_Node_Str" + path + "String_Node_Str");
    indexDefaultDoc(repository,dirEntry,path,revision);
  }
}
Program: 153222
Project: 153222
Buggy source:
public static SVNDirEntry getInformationAboutEntry(Repository repository,long revision,String path){
  SVNDirEntry dirEntry=null;
  try {
    LOGGER.debug("String_Node_Str" + path + "String_Node_Str"+ revision);
    dirEntry=repository.getRepository().info(path,revision);
  }
 catch (  SVNException e) {
    LOGGER.error("String_Node_Str" + e);
  }
  return dirEntry;
}

Fixed version (ground truth):
public static SVNDirEntry getInformationAboutEntry(Repository repository,long revision,String path){
  SVNDirEntry dirEntry=null;
  try {
    LOGGER.debug("String_Node_Str" + path + "String_Node_Str"+ revision);
    dirEntry=repository.getRepository().info(path,revision);
  }
 catch (  SVNException e) {
    LOGGER.error("String_Node_Str",e);
  }
  return dirEntry;
}
Program: 153225
Project: 153225
Buggy source:
public ScanRepositoryBase(){
  setInterceptors(new ArrayList<ScanInterceptor>());
}

Fixed version (ground truth):
public ScanRepositoryBase(){
  super();
  setInterceptors(new ArrayList<ScanInterceptor>());
}
Program: 153226
Project: 153226
Buggy source:
public ScanRepositoryBaseLogEntry(){
  setLogEntryInterceptors(new ArrayList<LogEntryInterceptor>());
}

Fixed version (ground truth):
public ScanRepositoryBaseLogEntry(){
  super();
  setLogEntryInterceptors(new ArrayList<LogEntryInterceptor>());
}
Program: 153227
Project: 153227
Buggy source:
@Override public void indexDocument(Repository repository,SVNDirEntry dirEntry,String path,long revision){
  LOGGER.debug("String_Node_Str");
  try {
    if (isBinary()) {
      LOGGER.debug("String_Node_Str");
      addTokenizedField(FieldNames.CONTENTS,"String_Node_Str");
    }
 else {
      LOGGER.debug("String_Node_Str");
      if (dirEntry.getSize() > 10 * 1024 * 1024) {
        LOGGER.warn("String_Node_Str");
      }
 else {
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        repository.getRepository().getFile(path,revision,null,baos);
        addTokenizedField(FieldNames.CONTENTS,baos.toString());
      }
    }
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
@Override public void indexDocument(Repository repository,SVNDirEntry dirEntry,String path,long revision){
  LOGGER.debug("String_Node_Str");
  try {
    if (isBinary()) {
      LOGGER.debug("String_Node_Str");
      addTokenizedField(FieldNames.CONTENTS,"String_Node_Str");
    }
 else {
      LOGGER.debug("String_Node_Str");
      if (dirEntry.getSize() > 10 * 1024 * 1024) {
        LOGGER.warn("String_Node_Str");
      }
 else {
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        repository.getRepository().getFile(path,revision,null,baos);
        addTokenizedField(FieldNames.CONTENTS,baos.toString());
      }
    }
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
  }
}