nus-yam/ex-repair huggingface dataset:
Program: 49792
Project: 49792
Buggy source:
static void refresh(long id){
  if (resume) {
    boolean changed=false;
    String code=queue.get(String.valueOf(id));
    if (code != null) {
      queue.remove(String.valueOf(id));
      queue.remove(code);
      for (      Map<String,String> map : data) {
        if (String.valueOf(map.get("String_Node_Str")).equalsIgnoreCase(code)) {
          changed=true;
          String action=bible.getContext().getString(R.string.uninstall);
          map.put("String_Node_Str",action);
          map.put("String_Node_Str",action);
        }
      }
      if (changed) {
        adapter.notifyDataSetChanged();
        adapter.getFilter().filter(filter);
      }
    }
  }
}

Fixed version (ground truth):
static void refresh(long id){
  if (resume) {
    boolean changed=false;
    String code=queue.get(String.valueOf(id));
    if (code != null) {
      queue.remove(String.valueOf(id));
      queue.remove(code);
      data.clear();
      for (      Map<String,String> map : versions) {
        if (String.valueOf(map.get("String_Node_Str")).equalsIgnoreCase(code)) {
          changed=true;
          String action=bible.getContext().getString(R.string.uninstall);
          map.put("String_Node_Str",action);
          map.put("String_Node_Str",action);
        }
        data.add(map);
      }
      if (changed) {
        adapter.notifyDataSetChanged();
        adapter.getFilter().filter(filter);
      }
    }
  }
}
Program: 49793
Project: 49793
Buggy source:
@Override protected FilterResults performFiltering(CharSequence prefix){
  FilterResults results=new FilterResults();
  String filter=null;
  if (prefix != null && prefix.length() > 0) {
    filter=prefix.toString().toLowerCase(Locale.US);
  }
  data.clear();
  List<Map<String,String>> values=versions;
  for (  Map<String,String> map : values) {
    if (filter == null) {
      data.add(map);
    }
 else {
      for (      String value : map.values()) {
        if (value.toLowerCase(Locale.US).contains(filter)) {
          data.add(map);
          break;
        }
      }
    }
  }
  results.count=data.size();
  return results;
}

Fixed version (ground truth):
@Override protected FilterResults performFiltering(CharSequence prefix){
  FilterResults results=new FilterResults();
  String filter=null;
  if (prefix != null && prefix.length() > 0) {
    filter=prefix.toString().toLowerCase(Locale.US);
  }
  data.clear();
  for (  Map<String,String> map : versions) {
    if (filter == null) {
      data.add(map);
    }
 else {
      for (      String value : map.values()) {
        if (value.toLowerCase(Locale.US).contains(filter)) {
          data.add(map);
          break;
        }
      }
    }
  }
  results.count=data.size();
  return results;
}
Program: 49794
Project: 49794
Buggy source:
public boolean checkVersions(){
  if (!setDatabasePath()) {
    return false;
  }
  File path=getExternalFilesDirWrapper();
  File oldpath=new File(Environment.getExternalStorageDirectory(),"String_Node_Str");
  Long oldmtime=mtime.get(path.getAbsolutePath());
  if (oldmtime == null) {
    oldmtime=0L;
  }
  if (versions.size() != 0 && path.lastModified() <= oldmtime && (!oldpath.exists() || !oldpath.isDirectory() || oldpath.lastModified() <= oldmtime)) {
    return true;
  }
  versions.clear();
  checkVersion(oldpath);
  checkVersion(path);
  Collections.sort(versions);
  if (versions.size() == 0) {
    setDemoVersions();
    unpacked=true;
    if (Locale.getDefault().equals(Locale.SIMPLIFIED_CHINESE)) {
      versions.add("String_Node_Str");
      versions.add("String_Node_Str");
    }
 else {
      versions.add("String_Node_Str");
      versions.add("String_Node_Str");
    }
    checkVersion(mContext.getFilesDir());
  }
  mtime.put(path.getAbsolutePath(),path.lastModified());
  return true;
}

Fixed version (ground truth):
public boolean checkVersions(){
  if (!setDatabasePath()) {
    checkInternalVersions();
    return false;
  }
  File path=getExternalFilesDirWrapper();
  File oldpath=new File(Environment.getExternalStorageDirectory(),"String_Node_Str");
  Long oldmtime=mtime.get(path.getAbsolutePath());
  if (oldmtime == null) {
    oldmtime=0L;
  }
  if (versions.size() != 0 && path.lastModified() <= oldmtime && (!oldpath.exists() || !oldpath.isDirectory() || oldpath.lastModified() <= oldmtime)) {
    return true;
  }
  versions.clear();
  checkVersion(oldpath);
  checkVersion(path);
  Collections.sort(versions);
  if (versions.size() == 0) {
    checkInternalVersions();
  }
  mtime.put(path.getAbsolutePath(),path.lastModified());
  return true;
}
Program: 49795
Project: 49795
Buggy source:
public boolean setVersion(String version){
  if (version == null) {
    return false;
  }
  File file=getFile(version);
  if (file == null || !file.exists() || !file.isFile()) {
    if ("String_Node_Str".equals(databaseVersion)) {
      return setDefaultVersion();
    }
 else {
      return false;
    }
  }
  if (database != null) {
    if (databaseVersion.equals(version)) {
      return true;
    }
    Log.d(TAG,"String_Node_Str" + database.getPath() + "String_Node_Str");
    database.close();
  }
  databaseVersion=version;
  try {
    database=SQLiteDatabase.openDatabase(file.getAbsolutePath(),null,SQLiteDatabase.OPEN_READONLY | SQLiteDatabase.NO_LOCALIZED_COLLATORS);
    Log.d(TAG,"String_Node_Str" + database.getPath() + "String_Node_Str");
    setMetadata(database,databaseVersion);
    return true;
  }
 catch (  Exception e) {
    try {
      file.delete();
    }
 catch (    Exception f) {
    }
    checkVersions();
    return setDefaultVersion();
  }
}

Fixed version (ground truth):
public boolean setVersion(String version){
  if (version == null) {
    return false;
  }
  File file=getFile(version);
  if (file == null || !file.isFile()) {
    if ("String_Node_Str".equals(databaseVersion)) {
      return setDefaultVersion();
    }
 else {
      return false;
    }
  }
  if (database != null) {
    if (databaseVersion.equals(version)) {
      return true;
    }
    Log.d(TAG,"String_Node_Str" + database.getPath() + "String_Node_Str");
    database.close();
  }
  databaseVersion=version;
  try {
    database=SQLiteDatabase.openDatabase(file.getAbsolutePath(),null,SQLiteDatabase.OPEN_READONLY | SQLiteDatabase.NO_LOCALIZED_COLLATORS);
    Log.d(TAG,"String_Node_Str" + database.getPath() + "String_Node_Str");
    setMetadata(database,databaseVersion);
    return true;
  }
 catch (  Exception e) {
    try {
      file.delete();
    }
 catch (    Exception f) {
    }
    checkVersions();
    return setDefaultVersion();
  }
}
Program: 49796
Project: 49796
Buggy source:
public boolean deleteVersion(String version){
  File file=getFile(version);
  return file.delete();
}

Fixed version (ground truth):
public boolean deleteVersion(String version){
}
Program: 49797
Project: 49797
Buggy source:
public boolean setDefaultVersion(){
  if (versions.size() == 0) {
    return false;
  }
  String version=PreferenceManager.getDefaultSharedPreferences(mContext).getString("String_Node_Str",null);
  if (version != null && getPosition(TYPE.VERSION,version) < 0) {
    version=null;
  }
  if (version == null && getCount(TYPE.VERSION) > 0) {
    version=get(TYPE.VERSION,0);
  }
  if (version != null) {
    return setVersion(version);
  }
  return false;
}

Fixed version (ground truth):
public boolean setDefaultVersion(){
  if (versions.size() == 0) {
    return false;
  }
  String version=PreferenceManager.getDefaultSharedPreferences(mContext).getString("String_Node_Str",null);
  if (version != null) {
    File file=getFile(version);
    if (file == null || !file.isFile()) {
      checkVersions();
      version=null;
    }
  }
  if (version == null && getCount(TYPE.VERSION) > 0) {
    version=get(TYPE.VERSION,0);
  }
  if (version != null) {
    return setVersion(version);
  }
  return false;
}
Program: 49798
Project: 49798
Buggy source:
private void setDemoVersions(){
  if (unpacked) {
    return;
  }
  int demoVersion=PreferenceManager.getDefaultSharedPreferences(mContext).getInt("String_Node_Str",0);
  int versionCode=0;
  try {
    versionCode=mContext.getPackageManager().getPackageInfo(mContext.getPackageName(),0).versionCode;
  }
 catch (  Throwable t) {
  }
  boolean newVersion=(demoVersion != versionCode);
  boolean unpack=unpackRaw(newVersion,R.raw.niv84demo,new File(mContext.getFilesDir(),"String_Node_Str"));
  if (unpack) {
    unpack=unpackRaw(newVersion,R.raw.cunpssdemo,new File(mContext.getFilesDir(),"String_Node_Str"));
  }
  if (newVersion && unpack) {
    PreferenceManager.getDefaultSharedPreferences(mContext).edit().putInt("String_Node_Str",versionCode).commit();
  }
}

Fixed version (ground truth):
private void setDemoVersions(){
  int demoVersion=PreferenceManager.getDefaultSharedPreferences(mContext).getInt("String_Node_Str",0);
  int versionCode=0;
  try {
    versionCode=mContext.getPackageManager().getPackageInfo(mContext.getPackageName(),0).versionCode;
  }
 catch (  Throwable t) {
  }
  boolean newVersion=(demoVersion != versionCode);
  boolean unpack=unpackRaw(newVersion,R.raw.niv84demo,new File(mContext.getFilesDir(),"String_Node_Str"));
  if (unpack) {
    unpack=unpackRaw(newVersion,R.raw.cunpssdemo,new File(mContext.getFilesDir(),"String_Node_Str"));
  }
  if (newVersion && unpack) {
    PreferenceManager.getDefaultSharedPreferences(mContext).edit().putInt("String_Node_Str",versionCode).commit();
  }
}
Program: 49799
Project: 49799
Buggy source:
private Bible(Context context){
  Log.d(TAG,"String_Node_Str");
  mContext=context;
  checkLocale();
  checkVersions();
  setDefaultVersion();
}

Fixed version (ground truth):
private Bible(Context context){
  Log.d(TAG,"String_Node_Str");
  mContext=context;
  checkLocale();
  checkVersions();
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")) {
  }
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")) {
  }
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")) {
  }
  setDefaultVersion();
}
Program: 49800
Project: 49800
Buggy source:
public void run(){
  setMetadata(datapath,dataversion);
}

Fixed version (ground truth):
public void run(){
  getBible(context);
}
Program: 49802
Project: 49802
Buggy source:
private boolean setDefaultVersion(){
  if (versions.size() == 0) {
    return false;
  }
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")) {
  }
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")) {
  }
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")) {
  }
  String version=PreferenceManager.getDefaultSharedPreferences(mContext).getString("String_Node_Str",null);
  if (version != null && getPosition(TYPE.VERSION,version) < 0) {
    version=null;
  }
  if (version == null && getCount(TYPE.VERSION) > 0) {
    version=get(TYPE.VERSION,0);
  }
  if (version != null) {
    return setVersion(version);
  }
  return false;
}

Fixed version (ground truth):
private boolean setDefaultVersion(){
  if (versions.size() == 0) {
    return false;
  }
  String version=PreferenceManager.getDefaultSharedPreferences(mContext).getString("String_Node_Str",null);
  if (version != null && getPosition(TYPE.VERSION,version) < 0) {
    version=null;
  }
  if (version == null && getCount(TYPE.VERSION) > 0) {
    version=get(TYPE.VERSION,0);
  }
  if (version != null) {
    return setVersion(version);
  }
  return false;
}
Program: 49803
Project: 49803
Buggy source:
private void setMetadata(String datapath,String dataversion){
  SQLiteDatabase metadata=SQLiteDatabase.openDatabase(datapath,null,SQLiteDatabase.OPEN_READONLY | SQLiteDatabase.NO_LOCALIZED_COLLATORS);
  Cursor cursor=metadata.query(Provider.TABLE_BOOKS,Provider.COLUMNS_BOOKS,null,null,null,null,null);
  osiss.clear();
  books.clear();
  chapters.clear();
  humans.clear();
  try {
    while (cursor.moveToNext()) {
      String osis=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_OSIS));
      String human=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_HUMAN));
      String chapter=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_CHAPTERS));
      if ("String_Node_Str".equals(human)) {
        human="String_Node_Str";
      }
      if (!isCJK(human)) {
        humanEN.put(osis,human);
      }
 else       if (isVersionZHCN(dataversion)) {
        humanZHCN.put(osis,human);
      }
 else       if (isVersionZHTW(dataversion)) {
        humanZHTW.put(osis,human);
      }
      osiss.add(osis);
      if (scale > 1.0f) {
        books.add(human);
      }
 else {
        if (dataversion.endsWith("String_Node_Str")) {
          books.add(getResourceValue(osisZHTW,osis));
        }
 else         if (dataversion.endsWith("String_Node_Str") || dataversion.equals("String_Node_Str")) {
          books.add(getResourceValue(osisZHCN,osis));
        }
 else {
          books.add(osis);
        }
      }
      chapters.add(chapter);
      humans.add(human);
    }
  }
  finally {
    cursor.close();
  }
  metadata.close();
}

Fixed version (ground truth):
private void setMetadata(SQLiteDatabase metadata,String dataversion){
  Cursor cursor=metadata.query(Provider.TABLE_BOOKS,Provider.COLUMNS_BOOKS,null,null,null,null,null);
  osiss.clear();
  books.clear();
  chapters.clear();
  humans.clear();
  try {
    while (cursor.moveToNext()) {
      String osis=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_OSIS));
      String human=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_HUMAN));
      String chapter=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_CHAPTERS));
      if ("String_Node_Str".equals(human)) {
        human="String_Node_Str";
      }
      if (!isCJK(human)) {
        humanEN.put(osis,human);
      }
 else       if (isVersionZHCN(dataversion)) {
        humanZHCN.put(osis,human);
      }
 else       if (isVersionZHTW(dataversion)) {
        humanZHTW.put(osis,human);
      }
      osiss.add(osis);
      if (scale > 1.0f) {
        books.add(human);
      }
 else {
        if (dataversion.endsWith("String_Node_Str")) {
          books.add(getResourceValue(osisZHTW,osis));
        }
 else         if (dataversion.endsWith("String_Node_Str") || dataversion.equals("String_Node_Str")) {
          books.add(getResourceValue(osisZHCN,osis));
        }
 else {
          books.add(osis);
        }
      }
      chapters.add(chapter);
      humans.add(human);
    }
  }
  finally {
    cursor.close();
  }
}
Program: 49804
Project: 49804
Buggy source:
@Override public void onPause(){
  getVerse();
  Log.d(TAG,"String_Node_Str");
  storeOsisVersion();
  super.onPause();
}

Fixed version (ground truth):
@Override public void onPause(){
  getVerse();
  Log.d(TAG,"String_Node_Str");
  storeOsisVersion();
  hasIntentData=false;
  super.onPause();
}
Program: 49805
Project: 49805
Buggy source:
private boolean openOsis(String newOsis,String verse,String end){
  if (newOsis == null || newOsis.equals("String_Node_Str")) {
    return false;
  }
  if (!osis.equals(newOsis)) {
    uri=Provider.CONTENT_URI_CHAPTER.buildUpon().appendEncodedPath(newOsis).build();
    this.verse=verse;
    this.end=end;
    showUri();
  }
  return true;
}

Fixed version (ground truth):
private boolean openOsis(String newOsis,String verse,String end){
  if (newOsis == null || newOsis.equals("String_Node_Str")) {
    return false;
  }
  if (!osis.equals(newOsis)) {
    uri=Provider.CONTENT_URI_CHAPTER.buildUpon().appendEncodedPath(newOsis).build();
    if ("String_Node_Str".equals(this.verse)) {
      this.verse=verse;
    }
    this.end=end;
    showUri();
  }
  return true;
}
Program: 49806
Project: 49806
Buggy source:
public void setItemText(int index){
  if (items != null && index >= 0 && index < items.size()) {
    OsisItem item=items.get(index);
    String book=bible.get(Bible.TYPE.BOOK,bible.getPosition(Bible.TYPE.OSIS,item.book)) + item.chapter;
    if (!verse.equals("String_Node_Str") || !end.equals("String_Node_Str")) {
      book+="String_Node_Str" + verse + "String_Node_Str"+ end;
    }
    ((TextView)findViewById(R.id.items)).setText(book);
  }
}

Fixed version (ground truth):
public void setItemText(int index){
  if (items != null && index >= 0 && index < items.size()) {
    OsisItem item=items.get(index);
    String book=bible.get(Bible.TYPE.BOOK,bible.getPosition(Bible.TYPE.OSIS,item.book)) + item.chapter;
    if (!item.verse.equals("String_Node_Str") || !item.end.equals("String_Node_Str")) {
      book+="String_Node_Str" + item.verse + "String_Node_Str"+ item.end;
    }
    ((TextView)findViewById(R.id.items)).setText(book);
  }
}
Program: 49808
Project: 49808
Buggy source:
@Override public void onResume(){
  super.onResume();
  Log.d(TAG,"String_Node_Str" + items);
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  verse=sp.getString("String_Node_Str","String_Node_Str");
  if (items == null && search == null) {
    if (!"String_Node_Str".equals(sp.getString("String_Node_Str","String_Node_Str"))) {
      index=sp.getInt("String_Node_Str",0);
      Log.d(TAG,"String_Node_Str");
      Intent passageIntent=new Intent(getApplicationContext(),Passage.class);
      passageIntent.setAction(Intent.ACTION_VIEW);
      passageIntent.setData(Uri.parse("String_Node_Str" + sp.getString("String_Node_Str","String_Node_Str")));
      startActivity(passageIntent);
      finish();
    }
  }
  showData();
}

Fixed version (ground truth):
@Override public void onResume(){
  super.onResume();
  Log.d(TAG,"String_Node_Str" + items);
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  if (!hasIntentData) {
    verse=sp.getString("String_Node_Str","String_Node_Str");
  }
  if (items == null && search == null) {
    if (!"String_Node_Str".equals(sp.getString("String_Node_Str","String_Node_Str"))) {
      index=sp.getInt("String_Node_Str",0);
      Log.d(TAG,"String_Node_Str");
      Intent passageIntent=new Intent(getApplicationContext(),Passage.class);
      passageIntent.setAction(Intent.ACTION_VIEW);
      passageIntent.setData(Uri.parse("String_Node_Str" + sp.getString("String_Node_Str","String_Node_Str")));
      startActivity(passageIntent);
      finish();
    }
  }
  showData();
}
Program: 49809
Project: 49809
Buggy source:
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  setIntent(intent);
  setIntentData();
}

Fixed version (ground truth):
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  setIntent(intent);
  setIntentData();
  hasIntentData=true;
}
Program: 49812
Project: 49812
Buggy source:
@Override public void onClick(View v){
  if (bible.getCount(Bible.TYPE.VERSION) == 0 && bible.getDatabase() == null && v.getId() != R.id.version) {
    return;
  }
switch (v.getId()) {
case R.id.version:
    getVerse();
case R.id.book:
case R.id.chapter:
case R.id.items:
  showSpinner(v);
break;
case R.id.search:
onSearchRequested();
break;
case R.id.share:
if (!copytext.equals("String_Node_Str")) {
Intent sendIntent=new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT,copytext);
sendIntent.setType("String_Node_Str");
startActivity(Intent.createChooser(sendIntent,getResources().getText(R.string.share)));
}
}
}

Fixed version (ground truth):
@Override public void onClick(View v){
  gridview.setVisibility(View.GONE);
  if (bible.getCount(Bible.TYPE.VERSION) == 0 && bible.getDatabase() == null && v.getId() != R.id.version) {
    return;
  }
switch (v.getId()) {
case R.id.version:
    getVerse();
case R.id.book:
case R.id.chapter:
case R.id.items:
  showSpinner(v);
break;
case R.id.search:
onSearchRequested();
break;
case R.id.share:
if (!copytext.equals("String_Node_Str")) {
Intent sendIntent=new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT,copytext);
sendIntent.setType("String_Node_Str");
startActivity(Intent.createChooser(sendIntent,getResources().getText(R.string.share)));
}
}
}
Program: 49813
Project: 49813
Buggy source:
private void storeOsisVersion(){
  final Editor editor=PreferenceManager.getDefaultSharedPreferences(this).edit();
  editor.putString("String_Node_Str",osis);
  if (!version.endsWith("String_Node_Str") && !version.equals("String_Node_Str")) {
    editor.putString("String_Node_Str",version);
  }
  editor.putString("String_Node_Str",verse);
  editor.putInt("String_Node_Str",fontsize);
  if (items != null && items.size() > 0 && search != null && !search.equals("String_Node_Str")) {
    editor.putString("String_Node_Str",search);
    editor.putInt("String_Node_Str",index);
  }
 else {
    editor.remove("String_Node_Str");
    editor.remove("String_Node_Str");
  }
  if (!book.equals("String_Node_Str") && !chapter.equals("String_Node_Str")) {
    editor.putString(book,chapter);
  }
  if (!version.equals("String_Node_Str")) {
    editor.putInt("String_Node_Str" + version,fontsize);
  }
  editor.commit();
}

Fixed version (ground truth):
private void storeOsisVersion(){
  final Editor editor=PreferenceManager.getDefaultSharedPreferences(this).edit();
  editor.putString("String_Node_Str",osis);
  if (!version.endsWith("String_Node_Str") && !version.equals("String_Node_Str")) {
    editor.putString("String_Node_Str",version);
  }
  editor.putString("String_Node_Str",verse);
  editor.putInt("String_Node_Str",fontsize);
  if (items != null && items.size() > 0 && search != null && !search.equals("String_Node_Str")) {
    editor.putString("String_Node_Str",search);
    editor.putInt("String_Node_Str",index);
  }
 else {
    search=null;
    editor.remove("String_Node_Str");
    editor.remove("String_Node_Str");
  }
  if (!book.equals("String_Node_Str") && !chapter.equals("String_Node_Str")) {
    editor.putString(book,chapter);
  }
  if (!version.equals("String_Node_Str")) {
    editor.putInt("String_Node_Str" + version,fontsize);
  }
  editor.commit();
}
Program: 49814
Project: 49814
Buggy source:
private void setBookChapter(String osis){
  book=osis.split("String_Node_Str")[0];
  chapter=osis.split("String_Node_Str")[1];
  Log.d(TAG,"String_Node_Str" + osis);
  setItemText();
  ((TextView)findViewById(R.id.version)).setText(bible.getVersionName(bible.getVersion()));
  ((TextView)findViewById(R.id.book)).setText(bible.get(Bible.TYPE.BOOK,bible.getPosition(Bible.TYPE.OSIS,book)));
  ((TextView)findViewById(R.id.chapter)).setText(chapter);
}

Fixed version (ground truth):
private void setBookChapter(String osis){
  book=osis.split("String_Node_Str")[0];
  chapter=osis.split("String_Node_Str")[1];
  Log.d(TAG,"String_Node_Str" + osis);
  setItemText(this.index);
  ((TextView)findViewById(R.id.version)).setText(bible.getVersionName(bible.getVersion()));
  ((TextView)findViewById(R.id.book)).setText(bible.get(Bible.TYPE.BOOK,bible.getPosition(Bible.TYPE.OSIS,book)));
  ((TextView)findViewById(R.id.chapter)).setText(chapter);
}
Program: 49815
Project: 49815
Buggy source:
public void setItemText(){
  if (items != null && index >= 0 && index < items.size()) {
    OsisItem item=items.get(index);
    String book=bible.get(Bible.TYPE.BOOK,bible.getPosition(Bible.TYPE.OSIS,item.book)) + "String_Node_Str" + item.chapter;
    if (!verse.equals("String_Node_Str") || !end.equals("String_Node_Str")) {
      book+="String_Node_Str" + verse + "String_Node_Str"+ end;
    }
    ((TextView)findViewById(R.id.items)).setText(book);
  }
}

Fixed version (ground truth):
public void setItemText(int index){
  if (items != null && index >= 0 && index < items.size()) {
    OsisItem item=items.get(index);
    String book=bible.get(Bible.TYPE.BOOK,bible.getPosition(Bible.TYPE.OSIS,item.book)) + item.chapter;
    if (!verse.equals("String_Node_Str") || !end.equals("String_Node_Str")) {
      book+="String_Node_Str" + verse + "String_Node_Str"+ end;
    }
    ((TextView)findViewById(R.id.items)).setText(book);
  }
}
Program: 49818
Project: 49818
Buggy source:
public void showItem(int index){
  osis="String_Node_Str";
  if (items == null) {
    showView(R.id.items,false);
    showView(R.id.book,true);
    showView(R.id.chapter,true);
    openOsis(this.index > index ? osis_prev : osis_next);
  }
 else   if (index >= 0 && index < items.size()) {
    showView(R.id.items,true);
    showView(R.id.book,false);
    showView(R.id.chapter,false);
    this.index=index;
    setItemText();
    OsisItem item=items.get(index);
    Log.d(TAG,String.format("String_Node_Str",item.book,item.chapter,item.verse,item.end));
    if (item.chapter.equals("String_Node_Str")) {
      item.chapter=PreferenceManager.getDefaultSharedPreferences(this).getString(item.book,"String_Node_Str");
    }
    openOsis(item.book + "String_Node_Str" + item.chapter,item.verse,item.end);
  }
}

Fixed version (ground truth):
public void showItem(int index){
  osis="String_Node_Str";
  if (items == null || items.size() < 2) {
    showView(R.id.items,false);
    showView(R.id.book,true);
    showView(R.id.chapter,true);
    if (items == null || items.size() == 0) {
      openOsis(this.index > index ? osis_prev : osis_next);
    }
 else {
      setItemText(0);
      OsisItem item=items.get(0);
      if (item.chapter.equals("String_Node_Str")) {
        item.chapter=PreferenceManager.getDefaultSharedPreferences(this).getString(item.book,"String_Node_Str");
      }
      items.clear();
      Log.d(TAG,"String_Node_Str" + item.book + "String_Node_Str"+ item.chapter);
      openOsis(item.book + "String_Node_Str" + item.chapter,item.verse,item.end);
    }
    openOsis(this.index > index ? osis_prev : osis_next);
  }
 else   if (index >= 0 && index < items.size()) {
    showView(R.id.items,true);
    showView(R.id.book,false);
    showView(R.id.chapter,false);
    this.index=index;
    setItemText(index);
    OsisItem item=items.get(index);
    Log.d(TAG,String.format("String_Node_Str",item.book,item.chapter,item.verse,item.end));
    if (item.chapter.equals("String_Node_Str")) {
      item.chapter=PreferenceManager.getDefaultSharedPreferences(this).getString(item.book,"String_Node_Str");
    }
    openOsis(item.book + "String_Node_Str" + item.chapter,item.verse,item.end);
  }
}
Program: 49819
Project: 49819
Buggy source:
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  setIntent(intent);
}

Fixed version (ground truth):
@Override protected void onNewIntent(Intent intent){
  super.onNewIntent(intent);
  setIntent(intent);
  setIntentData();
}
Program: 49820
Project: 49820
Buggy source:
private boolean setDefaultVersion(){
  if (setVersion("String_Node_Str") || setVersion("String_Node_Str") || setVersion("String_Node_Str")) {
  }
  if (setVersion("String_Node_Str") || setVersion("String_Node_Str") || setVersion("String_Node_Str")|| setVersion("String_Node_Str")) {
  }
  if (setVersion("String_Node_Str") || setVersion("String_Node_Str")) {
  }
  String version=PreferenceManager.getDefaultSharedPreferences(mContext).getString("String_Node_Str",null);
  if (version != null && getPosition(TYPE.VERSION,version) < 0) {
    version=null;
  }
  if (version == null && getCount(TYPE.VERSION) > 0) {
    version=get(TYPE.VERSION,0);
  }
  if (version != null) {
    return setVersion(version);
  }
  return false;
}

Fixed version (ground truth):
private boolean setDefaultVersion(){
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")) {
  }
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")|| setVersionMetaData("String_Node_Str")) {
  }
  if (setVersionMetaData("String_Node_Str") || setVersionMetaData("String_Node_Str")) {
  }
  String version=PreferenceManager.getDefaultSharedPreferences(mContext).getString("String_Node_Str",null);
  if (version != null && getPosition(TYPE.VERSION,version) < 0) {
    version=null;
  }
  if (version == null && getCount(TYPE.VERSION) > 0) {
    version=get(TYPE.VERSION,0);
  }
  if (version != null) {
    return setVersion(version);
  }
  return false;
}
Program: 49821
Project: 49821
Buggy source:
private void setDemoVersions(){
  int demoVersion=PreferenceManager.getDefaultSharedPreferences(mContext).getInt("String_Node_Str",0);
  int versionCode=0;
  try {
    versionCode=mContext.getPackageManager().getPackageInfo(mContext.getPackageName(),0).versionCode;
  }
 catch (  NameNotFoundException e) {
  }
  boolean newVersion=(demoVersion != versionCode);
  boolean unpack=unpackRaw(newVersion,R.raw.niv84demo,new File(mContext.getFilesDir(),"String_Node_Str"));
  if (unpack) {
    unpack=unpackRaw(newVersion,R.raw.cunpssdemo,new File(mContext.getFilesDir(),"String_Node_Str"));
  }
  if (newVersion && unpack) {
    PreferenceManager.getDefaultSharedPreferences(mContext).edit().putInt("String_Node_Str",versionCode).commit();
  }
  if (!versions.contains("String_Node_Str")) {
    versions.add("String_Node_Str");
  }
  if (!versions.contains("String_Node_Str")) {
    versions.add("String_Node_Str");
  }
}

Fixed version (ground truth):
private void setDemoVersions(){
  int demoVersion=PreferenceManager.getDefaultSharedPreferences(mContext).getInt("String_Node_Str",0);
  int versionCode=0;
  try {
    versionCode=mContext.getPackageManager().getPackageInfo(mContext.getPackageName(),0).versionCode;
  }
 catch (  Exception e) {
  }
  boolean newVersion=(demoVersion != versionCode);
  boolean unpack=unpackRaw(newVersion,R.raw.niv84demo,new File(mContext.getFilesDir(),"String_Node_Str"));
  if (unpack) {
    unpack=unpackRaw(newVersion,R.raw.cunpssdemo,new File(mContext.getFilesDir(),"String_Node_Str"));
  }
  if (newVersion && unpack) {
    PreferenceManager.getDefaultSharedPreferences(mContext).edit().putInt("String_Node_Str",versionCode).commit();
  }
  if (!versions.contains("String_Node_Str")) {
    versions.add("String_Node_Str");
  }
  if (!versions.contains("String_Node_Str")) {
    versions.add("String_Node_Str");
  }
}
Program: 49822
Project: 49822
Buggy source:
private void showUri(Uri uri){
  version=bible.getVersion();
  if (uri == null) {
    Log.d(TAG,"String_Node_Str");
    uri=Provider.CONTENT_URI_CHAPTER.buildUpon().appendEncodedPath(null).fragment(version).build();
  }
  Cursor cursor=null;
  try {
    cursor=getContentResolver().query(uri,null,null,null,null);
  }
 catch (  SQLiteException e) {
    showContent("String_Node_Str",getString(R.string.queryerror));
    return;
  }
  if (cursor != null) {
    cursor.moveToFirst();
    osis=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_OSIS));
    osis_next=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_NEXT));
    osis_prev=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_PREVIOUS));
    final String human=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_HUMAN));
    final String content=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_CONTENT));
    cursor.close();
    setBookChapter(osis);
    showContent(human + "String_Node_Str" + version,content);
  }
 else {
    Log.d(TAG,"String_Node_Str");
    Uri nulluri=Provider.CONTENT_URI_CHAPTER.buildUpon().appendEncodedPath(null).fragment(version).build();
    if (!nulluri.equals(uri)) {
      showUri(nulluri);
    }
 else {
      showContent("String_Node_Str",getString(R.string.queryerror));
    }
  }
}

Fixed version (ground truth):
private void showUri(Uri uri){
  version=bible.getVersion();
  if (uri == null) {
    Log.d(TAG,"String_Node_Str");
    uri=Provider.CONTENT_URI_CHAPTER.buildUpon().appendEncodedPath(null).fragment(version).build();
  }
  Cursor cursor=null;
  try {
    cursor=getContentResolver().query(uri,null,null,null,null);
  }
 catch (  SQLiteException e) {
    showContent("String_Node_Str",getString(R.string.queryerror));
    return;
  }
catch (  Exception e) {
  }
  if (cursor != null) {
    cursor.moveToFirst();
    osis=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_OSIS));
    osis_next=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_NEXT));
    osis_prev=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_PREVIOUS));
    final String human=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_HUMAN));
    final String content=cursor.getString(cursor.getColumnIndexOrThrow(Provider.COLUMN_CONTENT));
    cursor.close();
    setBookChapter(osis);
    showContent(human + "String_Node_Str" + version,content);
  }
 else {
    Log.d(TAG,"String_Node_Str");
    Uri nulluri=Provider.CONTENT_URI_CHAPTER.buildUpon().appendEncodedPath(null).fragment(version).build();
    if (!nulluri.equals(uri)) {
      showUri(nulluri);
    }
 else {
      showContent("String_Node_Str",getString(R.string.queryerror));
    }
  }
}
Program: 49823
Project: 49823
Buggy source:
public static ArrayList<OsisItem> parseSearch(String s,Context context){
  ArrayList<OsisItem> items=new ArrayList<OsisItem>();
  if (s == null) {
    return items;
  }
  s=s.replace("String_Node_Str","String_Node_Str");
  s=s.replace("String_Node_Str","String_Node_Str");
  s=s.replace("String_Node_Str","String_Node_Str");
  Pattern p=Pattern.compile("String_Node_Str");
  Matcher m=p.matcher(s);
  while (m.find()) {
    String book=m.group(1);
    String osis=Bible.getBible(context).getOsis(book);
    String start_chapter=m.group(2);
    String start_verse=m.group(3);
    String end_chapter=m.group(4);
    String end_verse=m.group(5);
    if (osis == null) {
      continue;
    }
    if ("String_Node_Str".equals(start_chapter)) {
      items.add(new OsisItem(osis));
    }
 else     if ("String_Node_Str".equals(end_chapter) || (!"String_Node_Str".equals(start_verse) && "String_Node_Str".equals(end_verse))) {
      items.add(new OsisItem(osis,start_chapter,start_verse,end_chapter));
    }
 else     if ("String_Node_Str".equals(start_verse) || (!"String_Node_Str".equals(start_verse) && !"String_Node_Str".equals(end_verse))) {
      int start=Integer.parseInt(start_chapter);
      int end=Integer.parseInt(end_chapter);
      items.add(new OsisItem(osis,start_chapter,start_verse));
      for (int i=start + 1; i < end; i++) {
        items.add(new OsisItem(osis,i));
      }
      if (end > start) {
        items.add(new OsisItem(osis,end_chapter,"String_Node_Str",end_verse));
      }
    }
  }
  return items;
}

Fixed version (ground truth):
public static ArrayList<OsisItem> parseSearch(String s,Context context){
  ArrayList<OsisItem> items=new ArrayList<OsisItem>();
  if (s == null) {
    return items;
  }
  s=s.replace("String_Node_Str","String_Node_Str");
  s=s.replace("String_Node_Str","String_Node_Str");
  s=s.replace("String_Node_Str","String_Node_Str");
  Pattern p=Pattern.compile("String_Node_Str");
  Matcher m=p.matcher(s);
  while (m.find()) {
    String book=m.group(1);
    String osis=Bible.getBible(context).getOsis(book);
    String start_chapter=m.group(2);
    String start_verse=m.group(3);
    String end_chapter=m.group(4);
    String end_verse=m.group(5);
    if (osis == null) {
      continue;
    }
    if ("String_Node_Str".equals(start_chapter)) {
      items.add(new OsisItem(osis));
    }
 else     if ("String_Node_Str".equals(end_chapter) || (!"String_Node_Str".equals(start_verse) && "String_Node_Str".equals(end_verse))) {
      items.add(new OsisItem(osis,start_chapter,start_verse,end_chapter));
    }
 else     if ("String_Node_Str".equals(start_verse) || (!"String_Node_Str".equals(start_verse) && !"String_Node_Str".equals(end_verse))) {
      int start=Integer.parseInt(start_chapter);
      int end=Integer.parseInt(end_chapter);
      items.add(new OsisItem(osis,start_chapter,start_verse));
      for (int i=start + 1; i < end; i++) {
        items.add(new OsisItem(osis,i));
      }
      if (end > start) {
        items.add(new OsisItem(osis,end_chapter,end_verse.equals("String_Node_Str") ? "String_Node_Str" : "String_Node_Str",end_verse));
      }
    }
  }
  return items;
}
Program: 49824
Project: 49824
Buggy source:
private void showContent(String content){
  String context=content;
  context=context.replaceAll("String_Node_Str","String_Node_Str");
  context=context.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
  context=context.replaceAll('『','‘').replaceAll('』','’');
  context=context.replaceAll("String_Node_Str","String_Node_Str");
  String body="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str" + fontsize + "String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+=context;
  body+="String_Node_Str";
  webview.clearCache(true);
  webview.loadData(body,"String_Node_Str","String_Node_Str");
  webview.getSettings().setSupportZoom(true);
  webview.getSettings().setBuiltInZoomControls(true);
  webview.computeScroll();
}

Fixed version (ground truth):
private void showContent(String content){
  String context=content;
  context=context.replaceAll("String_Node_Str","String_Node_Str");
  context=context.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
  context=context.replaceAll("String_Node_Str","String_Node_Str").replaceAll("String_Node_Str","String_Node_Str");
  context=context.replaceAll("String_Node_Str","String_Node_Str");
  String body="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str" + fontsize + "String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+="String_Node_Str";
  body+=context;
  body+="String_Node_Str";
  webview.clearCache(true);
  webview.loadData(body,"String_Node_Str","String_Node_Str");
  webview.getSettings().setSupportZoom(true);
  webview.getSettings().setBuiltInZoomControls(true);
  webview.computeScroll();
}
Program: 49825
Project: 49825
Buggy source:
@Override public Cursor query(Uri uri,String[] projection,String selection,String[] selectionArgs,String sortOrder){
  if (uri == null) {
    return null;
  }
  Log.d(TAG,"String_Node_Str" + uri);
  String version=uri.getFragment();
  if (version != null && !setVersion(version)) {
    return null;
  }
  Log.d(TAG,"String_Node_Str" + database.getPath() + "String_Node_Str");
  if (databaseVersion.equals("String_Node_Str")) {
    return null;
  }
switch (uriMatcher.match(uri)) {
case URI_SEARCH:
    String query=uri.getLastPathSegment();
  return queryVerse(query);
case URI_VERSE:
String id=uri.getLastPathSegment();
return getVerse(id);
case URI_CHAPTER:
String osis=uri.getLastPathSegment();
return getChapter(osis);
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
}

Fixed version (ground truth):
@Override public Cursor query(Uri uri,String[] projection,String selection,String[] selectionArgs,String sortOrder){
  if (uri == null) {
    return null;
  }
  Log.d(TAG,"String_Node_Str" + uri);
  String version=uri.getFragment();
  if (version != null && !setVersion(version)) {
    return null;
  }
  if (database == null) {
    return null;
  }
  Log.d(TAG,"String_Node_Str" + database.getPath() + "String_Node_Str");
  if (databaseVersion.equals("String_Node_Str")) {
    return null;
  }
switch (uriMatcher.match(uri)) {
case URI_SEARCH:
    String query=uri.getLastPathSegment();
  return queryVerse(query);
case URI_VERSE:
String id=uri.getLastPathSegment();
return getVerse(id);
case URI_CHAPTER:
String osis=uri.getLastPathSegment();
return getChapter(osis);
default :
throw new IllegalArgumentException("String_Node_Str" + uri);
}
}
Program: 49826
Project: 49826
Buggy source:
private void init(){
  NodeIterator rdfsIterator=model.listObjectsOfProperty(resource,Constants.RDFS_LABEL);
  while (rdfsIterator.hasNext()) {
    RDFNode rdfNode=(RDFNode)rdfsIterator.next();
    String language=rdfNode.asLiteral().getLanguage();
    String label=rdfNode.asLiteral().getLexicalForm();
    this.labels.put(language,label);
  }
  NodeIterator skosAltIterator=model.listObjectsOfProperty(resource,Constants.SKOS_ALT_LABEL);
  while (skosAltIterator.hasNext()) {
    RDFNode rdfNode=(RDFNode)skosAltIterator.next();
    String language=rdfNode.asLiteral().getLanguage();
    String label=rdfNode.asLiteral().getLexicalForm();
    this.altLabels.get(language).add(label);
  }
  NodeIterator sameAsIterator=model.listObjectsOfProperty(resource,Constants.OWL_SAME_AS);
  while (sameAsIterator.hasNext()) {
    RDFNode rdfNode=(RDFNode)sameAsIterator.next();
    this.owlSameAs.add(rdfNode.asResource());
  }
}

Fixed version (ground truth):
private void init(){
  NodeIterator rdfsIterator=model.listObjectsOfProperty(resource,Constants.RDFS_LABEL);
  while (rdfsIterator.hasNext()) {
    RDFNode rdfNode=(RDFNode)rdfsIterator.next();
    String language=rdfNode.asLiteral().getLanguage();
    String label=rdfNode.asLiteral().getLexicalForm();
    this.labels.put(language,label);
  }
  NodeIterator skosAltIterator=model.listObjectsOfProperty(resource,Constants.SKOS_ALT_LABEL);
  while (skosAltIterator.hasNext()) {
    RDFNode rdfNode=(RDFNode)skosAltIterator.next();
    String language=rdfNode.asLiteral().getLanguage();
    String label=rdfNode.asLiteral().getLexicalForm();
    this.altLabels.get(language).add(label);
  }
  NodeIterator sameAsIterator=model.listObjectsOfProperty(resource,Constants.OWL_SAME_AS);
  while (sameAsIterator.hasNext()) {
    RDFNode rdfNode=(RDFNode)sameAsIterator.next();
    this.owlSameAs.add(rdfNode.asResource());
    NodeIterator listObjectsOfProperty=model.listObjectsOfProperty(rdfNode.asResource(),Constants.SKOS_ALT_LABEL);
    while (listObjectsOfProperty.hasNext()) {
      RDFNode node=listObjectsOfProperty.next();
      this.altLabels.get(node.asLiteral().getLanguage()).add(node.asLiteral().getLexicalForm());
    }
  }
}
Program: 49827
Project: 49827
Buggy source:
/** 
 * Creates a new DefactoModel. The model uses the filename of the provided file as name and is initialized as <code>isCorrect</code>. The model  supports the provided languages (e.g. 'en', 'fr' and 'de'). If the file is not found a  FileNotFoundExcpetion is thrown.
 * @param pathToModel - the absolute path to the file
 * @param isCorrect - true if the fact is true, false otherwise
 * @param languages - a list of iso code languages
 * @return a new DefactoModel(true, de/fr/en)
 * @throws FileNotFoundException
 */
public static final DefactoModel readModel(String pathToModel,Boolean isCorrect,List<String> languages) throws FileNotFoundException {
  Model model=ModelFactory.createDefaultModel();
  model.read(new FileReader(pathToModel),"String_Node_Str","String_Node_Str");
  String absolutePath=new File(pathToModel).getAbsolutePath();
  absolutePath=absolutePath.replace("String_Node_Str","String_Node_Str");
  return new DefactoModel(model,absolutePath,isCorrect,languages);
}

Fixed version (ground truth):
/** 
 * Creates a new DefactoModel. The model uses the filename of the provided file as name and is initialized as <code>isCorrect</code>. The model  supports the provided languages (e.g. 'en', 'fr' and 'de'). If the file is not found a  FileNotFoundExcpetion is thrown.
 * @param pathToModel - the absolute path to the file
 * @param isCorrect - true if the fact is true, false otherwise
 * @param languages - a list of iso code languages
 * @return a new DefactoModel(true, de/fr/en)
 * @throws FileNotFoundException
 */
public static final DefactoModel readModel(String pathToModel,Boolean isCorrect,List<String> languages) throws FileNotFoundException {
  Model model=ModelFactory.createDefaultModel();
  model.read(new FileReader(pathToModel),"String_Node_Str","String_Node_Str");
  String absolutePath=new File(pathToModel).getAbsolutePath();
  absolutePath=absolutePath.replace("String_Node_Str","String_Node_Str");
  DefactoModel defactoModel=new DefactoModel(model,absolutePath,isCorrect,languages);
  return defactoModel;
}
Program: 49829
Project: 49829
Buggy source:
public static void main(String[] args){
  Defacto.init();
  BoaPatternSearcher bps=new BoaPatternSearcher();
  for (  Pattern p : bps.getNaturalLanguageRepresentations("String_Node_Str","String_Node_Str")) {
    System.out.println(p.naturalLanguageRepresentation);
  }
  System.out.println("String_Node_Str");
  for (  Pattern p : bps.getNaturalLanguageRepresentations("String_Node_Str","String_Node_Str")) {
    System.out.println(p.naturalLanguageRepresentation);
  }
  System.out.println("String_Node_Str");
  for (  Pattern p : bps.getNaturalLanguageRepresentations("String_Node_Str","String_Node_Str")) {
    System.out.println(p.naturalLanguageRepresentation);
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  Defacto.init();
  queryPatterns("String_Node_Str");
}
Program: 49831
Project: 49831
Buggy source:
/** 
 * @param args
 * @throws FileNotFoundException 
 */
public static void main(String[] args) throws FileNotFoundException {
  Defacto.init();
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * @param args
 * @throws FileNotFoundException 
 */
public static void main(String[] args) throws FileNotFoundException {
  Defacto.init();
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
  generateArffFiles("String_Node_Str");
}