nus-yam/ex-repair huggingface dataset:
Program: 178316
Project: 178316
Buggy source:
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  double globalPrice=0;
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      globalPrice+=callPrice;
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      globalPrice+=smsPrice;
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  if (globalPrice < minimumMonthFee) {
    ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MONTH_FEE),minimumMonthFee - globalPrice,this.getCurrency()));
  }
  return ret;
}

Fixed version (ground truth):
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  double globalPrice=0;
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      globalPrice+=callPrice;
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      globalPrice+=smsPrice;
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  if (globalPrice < minimumMonthFee) {
    ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MINIMUM_MONTH_FEE),minimumMonthFee - globalPrice,this.getCurrency()));
  }
  return ret;
}
Program: 178317
Project: 178317
Buggy source:
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  double globalPrice=0;
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      globalPrice+=callPrice;
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      globalPrice+=smsPrice;
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  if (globalPrice < minimumMonthFee) {
    ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MONTH_FEE),minimumMonthFee - globalPrice,this.getCurrency()));
  }
  return ret;
}

Fixed version (ground truth):
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  double globalPrice=0;
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      globalPrice+=callPrice;
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      globalPrice+=smsPrice;
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  if (globalPrice < minimumMonthFee) {
    ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MINIMUM_MONTH_FEE),minimumMonthFee - globalPrice,this.getCurrency()));
  }
  return ret;
}
Program: 178318
Project: 178318
Buggy source:
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  double globalPrice=0;
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      globalPrice+=callPrice;
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      globalPrice+=smsPrice;
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  if (globalPrice < minimumMonthFee) {
    ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MONTH_FEE),minimumMonthFee - globalPrice,this.getCurrency()));
  }
  return ret;
}

Fixed version (ground truth):
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  double globalPrice=0;
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      globalPrice+=callPrice;
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      globalPrice+=smsPrice;
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  if (globalPrice < minimumMonthFee) {
    ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MINIMUM_MONTH_FEE),minimumMonthFee - globalPrice,this.getCurrency()));
  }
  return ret;
}
Program: 178319
Project: 178319
Buggy source:
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MONTH_FEE),monthFee,this.getCurrency()));
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  return ret;
}

Fixed version (ground truth):
public PlanSummary process(ArrayList<Chargeable> data){
  PlanSummary ret=new PlanSummary(this);
  ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MONTH_FEE),monthFee,this.getCurrency()));
  double globalPrice=0;
  for (  Chargeable chargeable : data) {
    if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_CALL) {
      Call call=(Call)chargeable;
      if (call.getType() != Call.CALL_TYPE_SENT) {
        continue;
      }
      double callPrice=0;
      if (call.getContact().getMsisdnType() == MsisdnType.ES_SPECIAL_ZER0) {
        callPrice=0;
      }
 else {
        callPrice=initialPrice + (call.getDuration() * pricePerSecond);
      }
      globalPrice+=callPrice;
      ret.addPlanCall(new PlanChargeable(call,callPrice,this.getCurrency()));
    }
 else     if (chargeable.getChargeableType() == Chargeable.CHARGEABLE_TYPE_SMS) {
      Sms sms=(Sms)chargeable;
      if (sms.getType() == Sms.SMS_TYPE_RECEIVED) {
        continue;
      }
      globalPrice+=smsPrice;
      ret.addPlanCall(new PlanChargeable(chargeable,smsPrice,this.getCurrency()));
    }
  }
  if (globalPrice < minimumMonthFee) {
    ret.addPlanCall(new PlanChargeable(new ChargeableMessage(ChargeableMessage.MESSAGE_MINIMUM_MONTH_FEE),minimumMonthFee - globalPrice,this.getCurrency()));
  }
  return ret;
}
Program: 178321
Project: 178321
Buggy source:
private boolean deletePoiRecords(){
  publishProgress(3);
  ContentResolver mContentResolver=context.getContentResolver();
  try {
    mContentResolver.delete(LocationsContract.CONTENT_URI,null,null);
  }
 catch (  SQLException e) {
    Log.e(TAG,"String_Node_Str",e);
    return false;
  }
  publishProgress(4);
  return true;
}

Fixed version (ground truth):
private boolean deletePoiRecords(){
  publishProgress(3);
  ContentResolver mContentResolver=context.getContentResolver();
  try {
    mContentResolver.delete(PointsOfInterestContract.CONTENT_URI,null,null);
  }
 catch (  SQLException e) {
    Log.e(TAG,"String_Node_Str",e);
    return false;
  }
  publishProgress(4);
  return true;
}
Program: 178322
Project: 178322
Buggy source:
private boolean deletePhotoFiles(){
  publishProgress(7);
  try {
    FileUtils.deleteFilesInDir(MediaUtils.getMediaStore(),null);
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
    return false;
  }
  publishProgress(8);
  return true;
}

Fixed version (ground truth):
private boolean deletePhotoFiles(){
  publishProgress(7);
  try {
    FileUtils.deleteFilesInDir(MediaUtils.getMediaStore(),null);
    FileUtils.deleteDirectory(MediaUtils.getMediaStore());
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
    return false;
  }
  publishProgress(8);
  return true;
}
Program: 178323
Project: 178323
Buggy source:
/** 
 * get a list of files in a directory
 * @param dirPath the directory to search for files
 * @param extensions a list of extensions to filter the list of files, if null all files are returns
 * @return an array of file names or null if no files match
 * @throws IOException
 */
public static String[] listFilesInDir(String dirPath,String[] extensions) throws IOException {
  String[] mFileList=null;
  if (TextUtils.isEmpty(dirPath) == true) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isDirectoryWritable(dirPath) == false) {
    throw new IOException("String_Node_Str" + dirPath);
  }
  File mDir=new File(dirPath);
  File[] mFiles=mDir.listFiles(new ExtensionFileFilter(extensions));
  if (mFiles != null) {
    mFileList=new String[mFiles.length];
    for (int i=0; i < mFiles.length; i++) {
      mFileList[i]=mFiles[i].getName();
    }
  }
  return mFileList;
}

Fixed version (ground truth):
/** 
 * get a list of files in a directory
 * @param dirPath the directory to search for files
 * @param extensions a list of extensions to filter the list of files, if null all files are returns
 * @return an array of file names or null if no files match
 * @throws IOException
 */
public static String[] listFilesInDir(String dirPath,String[] extensions) throws IOException {
  String[] mFileList=null;
  if (TextUtils.isEmpty(dirPath) == true) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isDirectoryWritable(dirPath) == false) {
    throw new IOException("String_Node_Str" + dirPath);
  }
  File mDir=new File(dirPath);
  File[] mFiles=mDir.listFiles(new ExtensionFileFilter(extensions));
  if (mFiles != null && mFiles.length > 0) {
    mFileList=new String[mFiles.length];
    for (int i=0; i < mFiles.length; i++) {
      mFileList[i]=mFiles[i].getName();
    }
  }
  return mFileList;
}
Program: 178324
Project: 178324
Buggy source:
public boolean accept(File pathname){
  if (pathname.isDirectory()) {
    return false;
  }
  if (pathname.canRead() == false) {
    return false;
  }
  String name=pathname.getName().toLowerCase();
  if (extensions == null) {
    if (!name.startsWith("String_Node_Str")) {
      return true;
    }
  }
 else {
    for (    String mExtension : extensions) {
      if (name.endsWith(mExtension)) {
        return true;
      }
    }
    return false;
  }
  return false;
}

Fixed version (ground truth):
public boolean accept(File pathname){
  if (pathname.isDirectory()) {
    return false;
  }
  if (pathname.canRead() == false) {
    return false;
  }
  String name=pathname.getName().toLowerCase();
  if (extensions == null) {
    if (!name.equals("String_Node_Str") || !name.equals("String_Node_Str")) {
      return true;
    }
  }
 else {
    for (    String mExtension : extensions) {
      if (name.endsWith(mExtension)) {
        return true;
      }
    }
    return false;
  }
  return false;
}
Program: 178325
Project: 178325
Buggy source:
@Override protected void onHandleIntent(Intent arg0){
  String mMapDataPath=Environment.getExternalStorageDirectory().getPath();
  mMapDataPath+=getString(R.string.system_path_map_data);
  String[] mMapDataFiles=new String[0];
  Intent mBroadcastIntent=new Intent("String_Node_Str");
  if (FileUtils.isDirectoryReadable(mMapDataPath) == false) {
    Log.e(TAG,"String_Node_Str");
  }
 else {
    try {
      mMapDataFiles=FileUtils.listFilesInDir(mMapDataPath,EXTENSIONS);
    }
 catch (    IOException e) {
      Log.e(TAG,"String_Node_Str",e);
      mMapDataFiles=new String[0];
    }
  }
  if (mMapDataFiles.length > 0) {
    ArrayList<MapDataInfo> mMapDataInfoList=new ArrayList<MapDataInfo>();
    for (    String mMapDataFile : mMapDataFiles) {
      MapDataInfo mMapDataInfo=new MapDataInfo(mMapDataFile);
      try {
        mMapDataInfo.setMetadata(MapUtils.getMetadata(mMapDataPath + mMapDataFile));
        mMapDataInfoList.add(mMapDataInfo);
      }
 catch (      Exception e) {
        Log.e(TAG,"String_Node_Str" + mMapDataPath + mMapDataFile+ "String_Node_Str",e);
      }
      if (V_LOG) {
        Log.v(TAG,mMapDataInfo.toString());
      }
    }
    mBroadcastIntent.putParcelableArrayListExtra("String_Node_Str",mMapDataInfoList);
    mBroadcastIntent.putExtra("String_Node_Str",mMapDataInfoList.size());
  }
 else   mBroadcastIntent.putExtra("String_Node_Str",0);
  this.sendBroadcast(mBroadcastIntent,"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void onHandleIntent(Intent arg0){
  String mMapDataPath=Environment.getExternalStorageDirectory().getPath();
  mMapDataPath+=getString(R.string.system_path_map_data);
  String[] mMapDataFiles=new String[0];
  Intent mBroadcastIntent=new Intent("String_Node_Str");
  if (FileUtils.isDirectoryReadable(mMapDataPath) == false) {
    Log.e(TAG,"String_Node_Str");
  }
 else {
    try {
      mMapDataFiles=FileUtils.listFilesInDir(mMapDataPath,EXTENSIONS);
    }
 catch (    IOException e) {
      Log.e(TAG,"String_Node_Str",e);
      mMapDataFiles=new String[0];
    }
  }
  if (mMapDataFiles.length > 0) {
    ArrayList<MapDataInfo> mMapDataInfoList=new ArrayList<MapDataInfo>();
    for (    String mMapDataFile : mMapDataFiles) {
      MapDataInfo mMapDataInfo=new MapDataInfo(mMapDataFile);
      try {
        mMapDataInfo.setMetadata(MapUtils.getMetadata(mMapDataPath + mMapDataFile));
        mMapDataInfoList.add(mMapDataInfo);
      }
 catch (      Exception e) {
        Log.e(TAG,"String_Node_Str" + mMapDataPath + mMapDataFile+ "String_Node_Str",e);
      }
      if (V_LOG) {
        Log.v(TAG,mMapDataInfo.toString());
      }
    }
    mBroadcastIntent.putParcelableArrayListExtra("String_Node_Str",mMapDataInfoList);
    mBroadcastIntent.putExtra("String_Node_Str",mMapDataInfoList.size());
  }
 else {
    mBroadcastIntent.putExtra("String_Node_Str",0);
  }
  this.sendBroadcast(mBroadcastIntent,"String_Node_Str");
}
Program: 178328
Project: 178328
Buggy source:
/** 
 * construct a new location read worker
 * @param context the context object used to access a content resolver
 * @param uri the path to the binary file
 */
public PointsOfInterestWorker(Context context,Uri uri){
  this.context=context;
  this.uri=uri;
}

Fixed version (ground truth):
/** 
 * construct a new location read worker
 * @param context the context object used to access a content resolver
 * @param uri the path to the binary file
 */
public PointsOfInterestWorker(Context context,Uri dataFile){
  this.context=context;
  this.dataFile=dataFile;
}
Program: 178331
Project: 178331
Buggy source:
@Override protected Integer doInBackground(String... taskType){
  if (V_LOG) {
    Log.v(TAG,"String_Node_Str" + taskType[0]);
  }
  Integer recordCount=-1;
  if (taskType[0].equals("String_Node_Str") == true) {
    recordCount=doAllExport();
  }
 else   if (taskType[0].equals("String_Node_Str") == true) {
    recordCount=doLocationExport();
  }
 else {
    recordCount=doPoiExport();
  }
  return recordCount;
}

Fixed version (ground truth):
@Override protected Integer doInBackground(String... taskType){
  if (V_LOG) {
    Log.v(TAG,"String_Node_Str" + taskType[0]);
  }
  if (taskType[0].equals("String_Node_Str") == true) {
    recordCount=doAllExport();
  }
 else   if (taskType[0].equals("String_Node_Str") == true) {
    recordCount=doLocationExport();
  }
 else {
    recordCount=doPoiExport();
  }
  return recordCount;
}
Program: 178332
Project: 178332
Buggy source:
@Override protected void onPostExecute(Integer result){
  if (V_LOG) {
    Log.v(TAG,"String_Node_Str");
  }
  progressBar.setVisibility(View.INVISIBLE);
  progressBar.setProgress(0);
  progressLabel.setVisibility(View.INVISIBLE);
  Button mButton=(Button)context.findViewById(R.id.export_ui_btn_export);
  mButton.setEnabled(true);
}

Fixed version (ground truth):
@Override protected void onPostExecute(Integer result){
  if (V_LOG) {
    Log.v(TAG,"String_Node_Str");
  }
  progressBar.setVisibility(View.INVISIBLE);
  progressBar.setProgress(0);
  progressLabel.setVisibility(View.INVISIBLE);
  Button mButton=(Button)context.findViewById(R.id.export_ui_btn_export);
  mButton.setEnabled(true);
  String mMessage=String.format(context.getString(R.string.export_ui_finished_msg),recordCount,context.getString(R.string.system_path_export_data));
  AlertDialog.Builder mBuilder=new AlertDialog.Builder(context);
  mBuilder.setMessage(mMessage).setCancelable(false).setPositiveButton(android.R.string.ok,new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int id){
      dialog.cancel();
    }
  }
);
  AlertDialog mAlert=mBuilder.create();
  mAlert.show();
}
Program: 178333
Project: 178333
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  Log.d(TAG,"String_Node_Str");
  if (intent.getStringExtra("String_Node_Str") != null) {
    application.setPhoneNumber(intent.getStringExtra("String_Node_Str"));
  }
 else {
    Log.e(TAG,"String_Node_Str");
  }
  if (intent.getStringExtra("String_Node_Str") != null) {
    application.setSid(intent.getStringExtra("String_Node_Str"));
  }
 else {
    Log.e(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  if (intent.getStringExtra("String_Node_Str") != null) {
    application.setPhoneNumber(intent.getStringExtra("String_Node_Str"));
  }
 else {
    Log.e(TAG,"String_Node_Str");
  }
  if (intent.getStringExtra("String_Node_Str") != null) {
    application.setSid(intent.getStringExtra("String_Node_Str"));
  }
 else {
    Log.e(TAG,"String_Node_Str");
  }
}
Program: 178334
Project: 178334
Buggy source:
/** 
 * add a file to the Rhizome repository
 * @param context a context object used to get access to system resources
 * @param filePath the full path to the file
 */
public static void addFile(Context context,String filePath){
  if (context == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (FileUtils.isFileReadable(filePath) == false) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  SharedPreferences mPreferences=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  String mVersionName=new File(filePath).getName() + "String_Node_Str";
  Long mVersion=mPreferences.getLong(mVersionName,0);
  mVersion++;
  String mName=context.getString(R.string.app_name);
  Intent mIntent=new Intent("String_Node_Str");
  mIntent.putExtra("String_Node_Str",filePath);
  mIntent.putExtra("String_Node_Str",mVersion);
  mIntent.putExtra("String_Node_Str",mName);
  context.getApplicationContext().startService(mIntent);
  Editor mEditor=mPreferences.edit();
  mEditor.putLong(mVersionName,mVersion);
  mEditor.commit();
}

Fixed version (ground truth):
/** 
 * add a file to the Rhizome repository
 * @param context a context object used to get access to system resources
 * @param filePath the full path to the file
 */
public static void addFile(Context context,String filePath){
  if (context == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (FileUtils.isFileReadable(filePath) == false) {
    throw new IllegalArgumentException("String_Node_Str" + filePath + "String_Node_Str");
  }
  SharedPreferences mPreferences=context.getSharedPreferences("String_Node_Str",Context.MODE_PRIVATE);
  String mVersionName=new File(filePath).getName() + "String_Node_Str";
  Long mVersion=mPreferences.getLong(mVersionName,0);
  mVersion++;
  String mName=context.getString(R.string.app_name);
  Intent mIntent=new Intent("String_Node_Str");
  mIntent.putExtra("String_Node_Str",filePath);
  mIntent.putExtra("String_Node_Str",mVersion);
  mIntent.putExtra("String_Node_Str",mName);
  context.getApplicationContext().startService(mIntent);
  Editor mEditor=mPreferences.edit();
  mEditor.putLong(mVersionName,mVersion);
  mEditor.commit();
}
Program: 178335
Project: 178335
Buggy source:
/** 
 * Create a File for saving an image or video 
 */
private static File getOutputMediaFile(int type){
  File mediaStorageDir=new File(getMediaStore());
  String timeStamp=new SimpleDateFormat("String_Node_Str").format(new Date());
  File mediaFile;
  if (type == MEDIA_TYPE_IMAGE) {
    mediaFile=new File(mediaStorageDir.getPath() + "String_Node_Str" + timeStamp+ "String_Node_Str");
  }
 else   if (type == MEDIA_TYPE_VIDEO) {
    mediaFile=new File(mediaStorageDir.getPath() + "String_Node_Str" + timeStamp+ "String_Node_Str");
  }
 else {
    return null;
  }
  return mediaFile;
}

Fixed version (ground truth):
/** 
 * Create a File for saving an image or video 
 */
private static File getOutputMediaFile(int type){
  File mediaStorageDir=new File(getMediaStore());
  String timeStamp=new SimpleDateFormat("String_Node_Str").format(new Date());
  File mediaFile;
  if (type == MEDIA_TYPE_IMAGE) {
    mediaFile=new File(mediaStorageDir.getPath() + File.separatorChar + "String_Node_Str"+ timeStamp+ "String_Node_Str");
  }
 else   if (type == MEDIA_TYPE_VIDEO) {
    mediaFile=new File(mediaStorageDir.getPath() + File.separatorChar + "String_Node_Str"+ timeStamp+ "String_Node_Str");
  }
 else {
    return null;
  }
  return mediaFile;
}
Program: 178337
Project: 178337
Buggy source:
/** 
 * copies a file into a directory
 * @param filePath path to the source file
 * @param dirPath path to the destination directory
 * @return the full path of the destination file
 * @throws IOException 
 */
public static String copyFileToDir(String filePath,String dirPath) throws IOException {
  if (TextUtils.isEmpty(filePath) == true) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (TextUtils.isEmpty(dirPath) == true) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isFileReadable(filePath) == false) {
    throw new IOException("String_Node_Str");
  }
  if (isDirectoryWritable(dirPath) == false) {
    throw new IOException("String_Node_Str");
  }
  String mFileName=new File(filePath).getName();
  FileChannel mInputChannel=new FileInputStream(filePath).getChannel();
  FileChannel mOutputChannel=new FileOutputStream(dirPath + mFileName).getChannel();
  mOutputChannel.transferFrom(mInputChannel,0,mInputChannel.size());
  mInputChannel.close();
  mOutputChannel.close();
  return dirPath + mFileName;
}

Fixed version (ground truth):
/** 
 * copies a file into a directory
 * @param filePath path to the source file
 * @param dirPath path to the destination directory
 * @return the full path of the destination file
 * @throws IOException 
 */
public static String copyFileToDir(String filePath,String dirPath) throws IOException {
  if (TextUtils.isEmpty(filePath) == true) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (TextUtils.isEmpty(dirPath) == true) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (isFileReadable(filePath) == false) {
    throw new IOException("String_Node_Str");
  }
  if (isDirectoryWritable(dirPath) == false) {
    throw new IOException("String_Node_Str");
  }
  String mFileName=new File(filePath).getName();
  if (dirPath.endsWith(File.separator) == false) {
    dirPath=dirPath + File.separator;
  }
  FileChannel mInputChannel=new FileInputStream(filePath).getChannel();
  FileChannel mOutputChannel=new FileOutputStream(dirPath + mFileName).getChannel();
  mOutputChannel.transferFrom(mInputChannel,0,mInputChannel.size());
  mInputChannel.close();
  mOutputChannel.close();
  return dirPath + mFileName;
}
Program: 178341
Project: 178341
Buggy source:
@Override protected Dialog onCreateDialog(int id){
  AlertDialog.Builder mBuilder=new AlertDialog.Builder(this);
  Dialog mDialog=null;
switch (id) {
case NO_FILES_DIALOG:
    mBuilder.setMessage(R.string.disclaimer_ui_dialog_no_files).setCancelable(false).setPositiveButton(R.string.misc_dialog_yes_button,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int id){
        showMapActivity(null);
      }
    }
).setNegativeButton(R.string.misc_dialog_no_button,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int id){
        dialog.cancel();
      }
    }
);
  mDialog=mBuilder.create();
break;
case MANY_FILES_DIALOG:
mFileNames=new CharSequence[mapDataInfoList.size()];
for (int i=0; i < mapDataInfoList.size(); i++) {
MapDataInfo mInfo=mapDataInfoList.get(i);
mFileNames[i]=mInfo.getFileName();
}
mBuilder.setTitle(R.string.disclaimer_ui_dialog_many_files_title).setCancelable(false).setItems(mFileNames,new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog,int item){
showMapActivity(mFileNames[item].toString());
}
}
);
mDialog=mBuilder.create();
break;
case NO_SERVAL_DIALOG:
mBuilder.setMessage(R.string.disclaimer_ui_dialog_no_serval).setCancelable(false).setPositiveButton(R.string.misc_dialog_ok_button,new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog,int id){
return;
}
}
);
mDialog=mBuilder.create();
break;
default :
mDialog=null;
}
return mDialog;
}

Fixed version (ground truth):
@Override protected Dialog onCreateDialog(int id){
  AlertDialog.Builder mBuilder=new AlertDialog.Builder(this);
  Dialog mDialog=null;
switch (id) {
case NO_FILES_DIALOG:
    mBuilder.setMessage(R.string.disclaimer_ui_dialog_no_files).setCancelable(false).setPositiveButton(R.string.misc_dialog_yes_button,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int id){
        showMapActivity(null);
      }
    }
).setNegativeButton(R.string.misc_dialog_no_button,new DialogInterface.OnClickListener(){
      public void onClick(      DialogInterface dialog,      int id){
        dialog.cancel();
      }
    }
);
  mDialog=mBuilder.create();
break;
case MANY_FILES_DIALOG:
mFileNames=new CharSequence[mapDataInfoList.size()];
File mFile=null;
for (int i=0; i < mapDataInfoList.size(); i++) {
MapDataInfo mInfo=mapDataInfoList.get(i);
mFile=new File(mInfo.getFileName());
mFileNames[i]=mFile.getName();
}
mBuilder.setTitle(R.string.disclaimer_ui_dialog_many_files_title).setCancelable(false).setItems(mFileNames,new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog,int item){
showMapActivity(mFileNames[item].toString());
}
}
);
mDialog=mBuilder.create();
break;
case NO_SERVAL_DIALOG:
mBuilder.setMessage(R.string.disclaimer_ui_dialog_no_serval).setCancelable(false).setPositiveButton(R.string.misc_dialog_ok_button,new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog,int id){
return;
}
}
);
mDialog=mBuilder.create();
break;
default :
mDialog=null;
}
return mDialog;
}
Program: 178346
Project: 178346
Buggy source:
/** 
 * Returns list of suitable Template classes to load/unload
 * @param classes loaded classes
 * @return list of Template classes to load/unload
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private static Set<Class<? extends Template<?>>> getSuitableClasses(Class<?>[] classes){
  final Set<Class<? extends Template<?>>> suitable=CollectionFactory.newSet();
  for (  Class<?> clazz : classes) {
    if (!ClassUtils.isSubclass(clazz,Template.class))     continue;
    if (Modifier.isAbstract(clazz.getModifiers()) || Modifier.isInterface(clazz.getModifiers()))     continue;
    if (!Modifier.isPublic(clazz.getModifiers()))     continue;
    if (clazz.isAnnotationPresent(DisabledPlugin.class))     continue;
    suitable.add((Class<? extends Template<?>>)clazz);
  }
  return suitable;
}

Fixed version (ground truth):
/** 
 * Returns list of suitable Template classes to load/unload
 * @param classes loaded classes
 * @return list of Template classes to load/unload
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) private static Set<Class<? extends Template>> getSuitableClasses(Class<?>[] classes){
  final Set<Class<? extends Template>> suitable=CollectionFactory.newSet();
  for (  Class<?> clazz : classes) {
    if (!ClassUtils.isSubclass(clazz,Template.class))     continue;
    if (Modifier.isAbstract(clazz.getModifiers()) || Modifier.isInterface(clazz.getModifiers()))     continue;
    if (!Modifier.isPublic(clazz.getModifiers()))     continue;
    if (clazz.isAnnotationPresent(DisabledPlugin.class))     continue;
    suitable.add((Class<? extends Template>)clazz);
  }
  return suitable;
}
Program: 178347
Project: 178347
Buggy source:
@Override public Path resolve(String path){
  log.debug("String_Node_Str",path);
  return root.resolve(path);
}

Fixed version (ground truth):
@Override public Path resolve(Path path){
  log.debug("String_Node_Str",path);
  return root.resolve(path);
}
Program: 178348
Project: 178348
Buggy source:
@Override public Path resolveDataFile(String path){
  log.debug("String_Node_Str",path);
  return dataRoot.resolve(path);
}

Fixed version (ground truth):
@Override public Path resolveDataFile(Path path){
  log.debug("String_Node_Str",path);
  return dataRoot.resolve(path);
}
Program: 178349
Project: 178349
Buggy source:
@Override public Path resolve(String path){
  log.debug("String_Node_Str",path);
  return root.resolve(path);
}

Fixed version (ground truth):
@Override public Path resolve(Path path){
  log.debug("String_Node_Str",path);
  return root.resolve(path);
}
Program: 178350
Project: 178350
Buggy source:
@Override public Path resolveDataFile(String path){
  log.debug("String_Node_Str",path);
  return dataRoot.resolve(path);
}

Fixed version (ground truth):
@Override public Path resolveDataFile(Path path){
  log.debug("String_Node_Str",path);
  return dataRoot.resolve(path);
}
Program: 178351
Project: 178351
Buggy source:
@Override protected void doStart() throws ServiceStartException {
  root=new TPath(config.getRoot().toAbsolutePath());
  log.debug("String_Node_Str",root);
  dataRoot=root.resolve(config.getDataPath());
  log.debug("String_Node_Str",root);
}

Fixed version (ground truth):
@Override protected void doStart() throws ServiceStartException {
  root=new TPath(config.getRoot().normalize());
  log.debug("String_Node_Str",root);
  dataRoot=root.resolve(config.getDataPath());
  log.debug("String_Node_Str",root);
}
Program: 178352
Project: 178352
Buggy source:
/** 
 * Resolves an file. If the file cannot be resolved, null will be returned. <p> Please note that even if the file DOES NOT exists a valid object will be returned.
 * @param path the file path as an string
 * @return the resolved file. Will return null if could not resolve.
 */
Path resolve(String path);

Fixed version (ground truth):
/** 
 * Resolves an file. If the file cannot be resolved, null will be returned. <p> Please note that even if the file DOES NOT exists a valid object will be returned.
 * @param path the file path
 * @return the resolved file. Will return null if could not resolve.
 */
Path resolve(Path path);
Program: 178353
Project: 178353
Buggy source:
/** 
 * Resolves an file inside the data storage file system. If the file cannot be resolved, null will be returned. <p> Please note that, differently from   {@link #resolve(String)}, if the file does not exists, <code>null</code> is returned.
 * @param path the file path as an string
 * @return the resolved file. Will return null if could not resolve.
 */
Path resolveDataFile(String path);

Fixed version (ground truth):
/** 
 * Resolves an file inside the data storage file system. If the file cannot be resolved, null will be returned. <p> Please note that, differently from   {@link #resolve(String)}, if the file does not exists, <code>null</code> is returned.
 * @param path the file path
 * @return the resolved file. Will return null if could not resolve.
 */
Path resolveDataFile(Path path);
Program: 178354
Project: 178354
Buggy source:
/** 
 * Returns the ServiceDescriptor binded to <code>serviceClass</code>. If no implementation of <code>serviceClass</code>, <code>null</code> is returned.
 * @param serviceClass the service class
 * @return the {@link ServiceDescriptor} for the requested service
 */
@SuppressWarnings("String_Node_Str") public <T extends Service>ServiceDescriptor<T> getServiceDescriptor(Class<T> serviceClass){
  return (ServiceDescriptor<T>)descriptors.get(serviceClass);
}

Fixed version (ground truth):
/** 
 * Returns the ServiceDescriptor binded to <code>serviceClass</code>. If no implementation of <code>serviceClass</code>, <code>null</code> is returned.
 * @param < T > the service type
 * @param serviceClass the service class
 * @return the {@link ServiceDescriptor} for the requested service
 */
@SuppressWarnings("String_Node_Str") public <T extends Service>ServiceDescriptor<T> getServiceDescriptor(Class<T> serviceClass){
  return (ServiceDescriptor<T>)descriptors.get(serviceClass);
}
Program: 178355
Project: 178355
Buggy source:
/** 
 * Get the configuration for the given service
 * @param service the service
 * @param serviceInterface the service interface
 * @return the configuration object
 */
<C extends ServiceConfiguration>C getServiceConfiguration(ConfigurableService<?> service,Class<? extends Service> serviceInterface);

Fixed version (ground truth):
/** 
 * Get the configuration for the given service
 * @param < C > the service configuration instance type
 * @param service the service
 * @param serviceInterface the service interface
 * @return the configuration object
 */
<C extends ServiceConfiguration>C getServiceConfiguration(ConfigurableService<?> service,Class<? extends Service> serviceInterface);
Program: 178356
Project: 178356
Buggy source:
/** 
 * Searches for the <code>expected</code> item to be in the <code>array</code>.
 * @param array the array to search in
 * @param expected the item to be looked in the array
 * @return <code>true</code> if the item exists, <code>false</code>otherwise
 */
public final static <T>boolean contains(T[] array,T expected){
  return Arrays.binarySearch(array,expected) >= 0;
}

Fixed version (ground truth):
/** 
 * Searches for the <code>expected</code> item to be in the <code>array</code>.
 * @param < T > the array component type
 * @param array the array to search in
 * @param expected the item to be looked in the array
 * @return <code>true</code> if the item exists, <code>false</code>otherwise
 */
public final static <T>boolean contains(T[] array,T expected){
  return Arrays.binarySearch(array,expected) >= 0;
}
Program: 178357
Project: 178357
Buggy source:
/** 
 * Copy an entire array except objects in <code>except</code> array.
 * @param array the source array
 * @param except the objects to not be copied
 * @return the copied array
 */
@SafeVarargs @SuppressWarnings("String_Node_Str") public final static <T>T[] copyArrayExcept(T[] array,T... except){
  final List<T> values=CollectionFactory.newList();
  for (  final T item : array) {
    if (Arrays.binarySearch(except,item,new Comparator<T>(){
      @Override public int compare(      Object o1,      Object o2){
        return (o1 == o2 ? 1 : 0);
      }
    }
) >= 0) {
      values.add(item);
    }
  }
  return (T[])Arrays.copyOf(values.toArray(),values.size(),array.getClass());
}

Fixed version (ground truth):
/** 
 * Copy an entire array except objects in <code>except</code> array.
 * @param < T > the array component type
 * @param array the source array
 * @param except the objects to not be copied
 * @return the copied array
 */
@SafeVarargs @SuppressWarnings("String_Node_Str") public final static <T>T[] copyArrayExcept(T[] array,T... except){
  final List<T> values=CollectionFactory.newList();
  for (  final T item : array) {
    if (Arrays.binarySearch(except,item,new Comparator<T>(){
      @Override public int compare(      Object o1,      Object o2){
        return (o1 == o2 ? 1 : 0);
      }
    }
) >= 0) {
      values.add(item);
    }
  }
  return (T[])Arrays.copyOf(values.toArray(),values.size(),array.getClass());
}
Program: 178358
Project: 178358
Buggy source:
/** 
 * Recursively searches for an annotation <h1>Search order</h1> <p> <ol> <li><code>cls</code> class</li> <li><code>cls</code> implementing interfaces</code></li> <li><code>cls</code> super class</code></li> </ol> If after all those steps, no annotation is found, <code>null</code> is returned.
 * @param annotationClass the annotation class
 * @param cls the class to start searching
 * @return the annotation, if found.
 */
public static <T extends Annotation>T getAnnotation(Class<T> annotationClass,Class<?> cls){
  T annotation=cls.getAnnotation(annotationClass);
  if (annotation == null) {
    for (    final Class<?> interfaceCls : cls.getInterfaces()) {
      annotation=getAnnotation(annotationClass,interfaceCls);
      if (annotation != null)       break;
    }
  }
  if (annotation == null && cls.getSuperclass() != null && cls.getSuperclass() != Object.class)   annotation=getAnnotation(annotationClass,cls.getSuperclass());
  return annotation;
}

Fixed version (ground truth):
/** 
 * Recursively searches for an annotation <h1>Search order</h1> <p> <ol> <li><code>cls</code> class</li> <li><code>cls</code> implementing interfaces</code></li> <li><code>cls</code> super class</code></li> </ol> If after all those steps, no annotation is found, <code>null</code> is returned.
 * @param < T > the annotation type
 * @param annotationClass the annotation class
 * @param cls the class to start searching
 * @return the annotation, if found.
 */
public static <T extends Annotation>T getAnnotation(Class<T> annotationClass,Class<?> cls){
  T annotation=cls.getAnnotation(annotationClass);
  if (annotation == null) {
    for (    final Class<?> interfaceCls : cls.getInterfaces()) {
      annotation=getAnnotation(annotationClass,interfaceCls);
      if (annotation != null)       break;
    }
  }
  if (annotation == null && cls.getSuperclass() != null && cls.getSuperclass() != Object.class)   annotation=getAnnotation(annotationClass,cls.getSuperclass());
  return annotation;
}
Program: 178359
Project: 178359
Buggy source:
@Override public int transaction(TransactionExecutor executor){
  final ODatabaseDocumentTx database=ODatabaseDocumentPool.global().acquire(config.getUrl(),config.getUsername(),config.getPassword());
  transaction.set(database);
  try {
    database.begin(OTransaction.TXTYPE.OPTIMISTIC);
    int returnValue=executor.perform();
    database.commit();
    return returnValue;
  }
 catch (  DatabaseException e) {
    database.rollback();
    throw e;
  }
catch (  Exception e) {
    database.rollback();
    throw new DatabaseException(e);
  }
 finally {
    transaction.set(null);
    database.close();
  }
}

Fixed version (ground truth):
@Override public int transaction(TransactionExecutor executor){
  final ODatabaseDocumentTx database=ODatabaseDocumentPool.global().acquire(config.getUrl(),config.getUsername(),config.getPassword());
  database.declareIntent(new OIntentMassiveInsert());
  transaction.set(database);
  try {
    database.begin(OTransaction.TXTYPE.OPTIMISTIC);
    int returnValue=executor.perform();
    database.commit();
    return returnValue;
  }
 catch (  DatabaseException e) {
    database.rollback();
    throw e;
  }
catch (  Exception e) {
    database.rollback();
    throw new DatabaseException(e);
  }
 finally {
    transaction.set(null);
    database.declareIntent(null);
    database.close();
  }
}
Program: 178360
Project: 178360
Buggy source:
@Override public void process(final Lineage2Client conn){
  try {
    final L2Character character=characterService.create(name,sex,characterClass,hairStyle,hairColor,face);
    if (character != null)     conn.write(SM_CHAR_CREATE_OK.INSTANCE);
 else     conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_CREATION_FAILED));
  }
 catch (  CharacterInvalidNameException e) {
    conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_16_ENG_CHARS));
  }
catch (  CharacterInvalidAppearanceException e) {
    conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_CREATION_FAILED));
  }
catch (  CharacterNameAlreadyExistsException e) {
    conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_NAME_ALREADY_EXISTS));
  }
}

Fixed version (ground truth):
@Override public void process(final Lineage2Client conn){
  try {
    final L2Character character=characterService.create(name,conn.getSession().getAccountID(),sex,characterClass,hairStyle,hairColor,face);
    if (character != null)     conn.write(SM_CHAR_CREATE_OK.INSTANCE);
 else     conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_CREATION_FAILED));
  }
 catch (  CharacterInvalidNameException e) {
    conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_16_ENG_CHARS));
  }
catch (  CharacterInvalidAppearanceException e) {
    conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_CREATION_FAILED));
  }
catch (  CharacterNameAlreadyExistsException e) {
    conn.write(new SM_CHAR_CREATE_FAIL(SM_CHAR_CREATE_FAIL.Reason.REASON_NAME_ALREADY_EXISTS));
  }
}
Program: 178361
Project: 178361
Buggy source:
@Override public void process(final Lineage2Client conn){
  final List<L2Character> chars=characterDao.selectByAccount(conn.getSession().getAccountID());
  conn.write(SM_CHAR_LIST.fromL2Session(conn.getSession(),chars.toArray(new L2Character[0])));
}

Fixed version (ground truth):
@Override public void process(final Lineage2Client conn){
  final List<L2Character> chars=characterDao.selectByAccount(conn.getSession().getAccountID());
  conn.write(SM_CHAR_LIST.fromL2Session(conn.getSession(),chars.toArray(new L2Character[chars.size()])));
}
Program: 178362
Project: 178362
Buggy source:
@Override protected L2Character createInstance(){
  return new L2Character(id);
}

Fixed version (ground truth):
@Override protected L2Character createInstance(){
  final L2Character character=new L2Character(id);
  character.setCharacterClass(getCharacterClass());
  character.setRace(getRace());
  return character;
}
Program: 178363
Project: 178363
Buggy source:
@Override public List<CharacterID> selectIDs(){
  return database.query(new SelectListQuery<CharacterID,Integer,CharacterID,QCharacter>(QCharacter.character,mapper.getIDMapper(QCharacter.character)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QCharacter e){
      return record;
    }
  }
);
}

Fixed version (ground truth):
@Override public List<CharacterID> selectIDs(){
  return database.query(new SelectListQuery<CharacterID,Integer,CharacterID,QCharacter>(QCharacter.character,mapper.getIDMapper(QCharacter.character)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QCharacter e){
      return null;
    }
  }
);
}
Program: 178364
Project: 178364
Buggy source:
@Override public List<FriendID> selectIDs(){
  return database.query(new SelectListQuery<FriendID,FriendID,FriendID,QCharacterFriend>(QCharacterFriend.characterFriend,mapper.getIDMapper(QCharacterFriend.characterFriend)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QCharacterFriend e){
      return record;
    }
  }
);
}

Fixed version (ground truth):
@Override public List<FriendID> selectIDs(){
  return database.query(new SelectListQuery<FriendID,FriendID,FriendID,QCharacterFriend>(QCharacterFriend.characterFriend,mapper.getIDMapper(QCharacterFriend.characterFriend)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QCharacterFriend e){
      return null;
    }
  }
);
}
Program: 178365
Project: 178365
Buggy source:
@Override public List<CharacterShortcutID> selectIDs(){
  return database.query(new SelectListQuery<CharacterShortcutID,Integer,CharacterShortcutID,QCharacterShortcut>(QCharacterShortcut.characterShortcut,mapper.getIDMapper(QCharacterShortcut.characterShortcut)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QCharacterShortcut e){
      return record;
    }
  }
);
}

Fixed version (ground truth):
@Override public List<CharacterShortcutID> selectIDs(){
  return database.query(new SelectListQuery<CharacterShortcutID,Integer,CharacterShortcutID,QCharacterShortcut>(QCharacterShortcut.characterShortcut,mapper.getIDMapper(QCharacterShortcut.characterShortcut)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QCharacterShortcut e){
      return null;
    }
  }
);
}
Program: 178366
Project: 178366
Buggy source:
@Override public Collection<ChatMessageID> selectIDs(){
  return database.query(new SelectListQuery<ChatMessageID,Integer,ChatMessageID,QLogChat>(QLogChat.logChat,mapper.getIDMapper(QLogChat.logChat)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QLogChat e){
      return record;
    }
  }
);
}

Fixed version (ground truth):
@Override public Collection<ChatMessageID> selectIDs(){
  return database.query(new SelectListQuery<ChatMessageID,Integer,ChatMessageID,QLogChat>(QLogChat.logChat,mapper.getIDMapper(QLogChat.logChat)){
    @Override protected OQueryContextNative query(    OQueryContextNative record,    QLogChat e){
      return null;
    }
  }
);
}