nus-yam/ex-repair huggingface dataset:
Program: 162163
Project: 162163
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  Log.v(TAG,"String_Node_Str" + intent.getAction());
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  appWidgetManager=AppWidgetManager.getInstance(context);
  if (intent.getAction() == null) {
    Log.v(TAG,"String_Node_Str");
    Bundle extras=intent.getExtras();
    if (extras != null) {
      int receivedWidgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
      new getJsonResponse(context,receivedWidgetId,false).execute();
    }
  }
 else   if (intent.getAction().equals("String_Node_Str")) {
    ComponentName thisAppWidget=new ComponentName(context.getPackageName(),TransLocWidgetProvider.class.getName());
    int[] appWidgetIds=appWidgetManager.getAppWidgetIds(thisAppWidget);
    for (int i=0; i < appWidgetIds.length; i++) {
      Log.v(TAG,"String_Node_Str" + appWidgetIds[i]);
      new getJsonResponse(context,appWidgetIds[i],true).execute();
    }
  }
 else {
    Log.v(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  Log.v(TAG,"String_Node_Str" + intent.getAction());
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  appWidgetManager=AppWidgetManager.getInstance(context);
  if (intent.getAction() == null) {
    Log.v(TAG,"String_Node_Str");
    Bundle extras=intent.getExtras();
    if (extras != null) {
      int receivedWidgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
      new getJsonResponse(context,receivedWidgetId,false).execute();
    }
  }
 else   if (intent.getAction().equals("String_Node_Str") || intent.getAction().equals("String_Node_Str")) {
    ComponentName thisAppWidget=new ComponentName(context.getPackageName(),TransLocWidgetProvider.class.getName());
    int[] appWidgetIds=appWidgetManager.getAppWidgetIds(thisAppWidget);
    for (int i=0; i < appWidgetIds.length; i++) {
      new getJsonResponse(context,appWidgetIds[i],true).execute();
    }
  }
 else {
    Log.v(TAG,"String_Node_Str");
  }
}
Program: 162165
Project: 162165
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  Log.v(TAG,"String_Node_Str" + intent.getAction());
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  appWidgetManager=AppWidgetManager.getInstance(context);
  if (intent.getAction() == null) {
    Log.v(TAG,"String_Node_Str");
    Bundle extras=intent.getExtras();
    if (extras != null) {
      int receivedWidgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
      new getJsonResponse(context,receivedWidgetId,false).execute();
    }
  }
 else   if (intent.getAction().equals("String_Node_Str")) {
    ComponentName thisAppWidget=new ComponentName(context.getPackageName(),TransLocWidgetProvider.class.getName());
    int[] appWidgetIds=appWidgetManager.getAppWidgetIds(thisAppWidget);
    for (int i=0; i < appWidgetIds.length; i++) {
      Log.v(TAG,"String_Node_Str" + appWidgetIds[i]);
      new getJsonResponse(context,appWidgetIds[i],true).execute();
    }
  }
 else {
    Log.v(TAG,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  Log.v(TAG,"String_Node_Str" + intent.getAction());
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  appWidgetManager=AppWidgetManager.getInstance(context);
  if (intent.getAction() == null) {
    Log.v(TAG,"String_Node_Str");
    Bundle extras=intent.getExtras();
    if (extras != null) {
      int receivedWidgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
      new getJsonResponse(context,receivedWidgetId,false).execute();
    }
  }
 else   if (intent.getAction().equals("String_Node_Str") || intent.getAction().equals("String_Node_Str")) {
    ComponentName thisAppWidget=new ComponentName(context.getPackageName(),TransLocWidgetProvider.class.getName());
    int[] appWidgetIds=appWidgetManager.getAppWidgetIds(thisAppWidget);
    for (int i=0; i < appWidgetIds.length; i++) {
      new getJsonResponse(context,appWidgetIds[i],true).execute();
    }
  }
 else {
    Log.v(TAG,"String_Node_Str");
  }
}
Program: 162171
Project: 162171
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  Log.v("String_Node_Str","String_Node_Str");
  if (intent.getAction() == null) {
    Bundle extras=intent.getExtras();
    if (extras != null) {
      Log.v("String_Node_Str","String_Node_Str");
      appWidgetManager=AppWidgetManager.getInstance(context);
      widgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
      Log.v("String_Node_Str","String_Node_Str" + widgetId);
      getJsonResponse task=new getJsonResponse(context);
      task.execute();
    }
  }
 else {
    super.onReceive(context,intent);
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  Log.v("String_Node_Str","String_Node_Str");
  if (intent.getAction() == null) {
    Bundle extras=intent.getExtras();
    Log.v("String_Node_Str","String_Node_Str");
    appWidgetManager=AppWidgetManager.getInstance(context);
    widgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
    Log.v("String_Node_Str","String_Node_Str" + widgetId);
    Log.v("String_Node_Str","String_Node_Str");
    getJsonResponse task=new getJsonResponse(context);
    task.execute();
  }
 else {
    super.onReceive(context,intent);
  }
}
Program: 162173
Project: 162173
Buggy source:
@Override protected void onPreExecute(){
}

Fixed version (ground truth):
@Override protected void onPreExecute(){
  Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
}
Program: 162174
Project: 162174
Buggy source:
@Override protected TransLocArrivalEstimates doInBackground(Void... voids){
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  String url=prefs.getString("String_Node_Str" + widgetId,"String_Node_Str");
  if (url.equals("String_Node_Str"))   Log.e("String_Node_Str","String_Node_Str");
  Log.v("String_Node_Str",url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
@Override protected TransLocArrivalEstimates doInBackground(Void... voids){
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  String url=prefs.getString("String_Node_Str" + widgetId,"String_Node_Str");
  if (url.equals("String_Node_Str"))   Log.e("String_Node_Str","String_Node_Str");
  Log.v("String_Node_Str",url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 162175
Project: 162175
Buggy source:
@Override public void onUpdate(Context context,AppWidgetManager appWidgetManager,int[] appWidgetIds){
  Log.v("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override public void onUpdate(Context context,AppWidgetManager appWidgetManager,int[] appWidgetIds){
  Log.v("String_Node_Str","String_Node_Str");
  Log.v("String_Node_Str","String_Node_Str");
  if (widgetId != -1) {
    getJsonResponse task=new getJsonResponse(context);
    task.execute();
  }
 else {
  }
}
Program: 162176
Project: 162176
Buggy source:
protected static String getJsonResponse(String url){
  String response="String_Node_Str";
  Log.v("String_Node_Str",url);
  DefaultHttpClient client=new DefaultHttpClient();
  HttpGet httpGet=new HttpGet(url);
  try {
    HttpResponse execute=client.execute(httpGet);
    int statusCode=execute.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_OK) {
      Log.e("String_Node_Str","String_Node_Str");
      throw new Exception();
    }
 else {
      InputStream content=execute.getEntity().getContent();
      BufferedReader buffer=new BufferedReader(new InputStreamReader(content));
      String s="String_Node_Str";
      while ((s=buffer.readLine()) != null) {
        response+=s;
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return response;
}

Fixed version (ground truth):
protected static String getJsonResponse(String url) throws Exception {
  String response="String_Node_Str";
  Log.v("String_Node_Str",url);
  DefaultHttpClient client=new DefaultHttpClient();
  HttpGet httpGet=new HttpGet(url);
  try {
    HttpResponse execute=client.execute(httpGet);
    int statusCode=execute.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_OK) {
      Log.e("String_Node_Str","String_Node_Str");
      throw new Exception();
    }
 else {
      InputStream content=execute.getEntity().getContent();
      BufferedReader buffer=new BufferedReader(new InputStreamReader(content));
      String s="String_Node_Str";
      while ((s=buffer.readLine()) != null) {
        response+=s;
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (response == "String_Node_Str") {
    throw new Exception();
  }
 else {
    return response;
  }
}
Program: 162177
Project: 162177
Buggy source:
protected TransLocArrivalEstimates doInBackground(Void... voids){
  String url="String_Node_Str" + currentAgencyId + "String_Node_Str"+ currentRouteId+ "String_Node_Str"+ currentStopId;
  editor.putString("String_Node_Str" + mAppWidgetId,url).commit();
  Log.v("String_Node_Str","String_Node_Str" + url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
protected TransLocArrivalEstimates doInBackground(Void... voids){
  String url="String_Node_Str" + currentAgencyId + "String_Node_Str"+ currentRouteId+ "String_Node_Str"+ currentStopId;
  editor.putString("String_Node_Str" + mAppWidgetId,url).commit();
  Log.v("String_Node_Str","String_Node_Str" + url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 162178
Project: 162178
Buggy source:
@Override protected void onPreExecute(){
}

Fixed version (ground truth):
@Override protected void onPreExecute(){
  Toast.makeText(context,"String_Node_Str",Toast.LENGTH_SHORT).show();
}
Program: 162179
Project: 162179
Buggy source:
@Override protected TransLocArrivalEstimates doInBackground(Void... voids){
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  String url=prefs.getString("String_Node_Str" + widgetId,"String_Node_Str");
  if (url.equals("String_Node_Str"))   Log.e("String_Node_Str","String_Node_Str");
  Log.v("String_Node_Str",url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
@Override protected TransLocArrivalEstimates doInBackground(Void... voids){
  newView=new RemoteViews(context.getPackageName(),R.layout.widget_layout);
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  String url=prefs.getString("String_Node_Str" + widgetId,"String_Node_Str");
  if (url.equals("String_Node_Str"))   Log.e("String_Node_Str","String_Node_Str");
  Log.v("String_Node_Str",url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 162180
Project: 162180
Buggy source:
@Override public void onUpdate(Context context,AppWidgetManager appWidgetManager,int[] appWidgetIds){
  Log.v("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Override public void onUpdate(Context context,AppWidgetManager appWidgetManager,int[] appWidgetIds){
  Log.v("String_Node_Str","String_Node_Str");
  Log.v("String_Node_Str","String_Node_Str");
  if (widgetId != -1) {
    getJsonResponse task=new getJsonResponse(context);
    task.execute();
  }
 else {
  }
}
Program: 162181
Project: 162181
Buggy source:
protected static String getJsonResponse(String url){
  String response="String_Node_Str";
  Log.v("String_Node_Str",url);
  DefaultHttpClient client=new DefaultHttpClient();
  HttpGet httpGet=new HttpGet(url);
  try {
    HttpResponse execute=client.execute(httpGet);
    int statusCode=execute.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_OK) {
      Log.e("String_Node_Str","String_Node_Str");
      throw new Exception();
    }
 else {
      InputStream content=execute.getEntity().getContent();
      BufferedReader buffer=new BufferedReader(new InputStreamReader(content));
      String s="String_Node_Str";
      while ((s=buffer.readLine()) != null) {
        response+=s;
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return response;
}

Fixed version (ground truth):
protected static String getJsonResponse(String url) throws Exception {
  String response="String_Node_Str";
  Log.v("String_Node_Str",url);
  DefaultHttpClient client=new DefaultHttpClient();
  HttpGet httpGet=new HttpGet(url);
  try {
    HttpResponse execute=client.execute(httpGet);
    int statusCode=execute.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_OK) {
      Log.e("String_Node_Str","String_Node_Str");
      throw new Exception();
    }
 else {
      InputStream content=execute.getEntity().getContent();
      BufferedReader buffer=new BufferedReader(new InputStreamReader(content));
      String s="String_Node_Str";
      while ((s=buffer.readLine()) != null) {
        response+=s;
      }
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  if (response == "String_Node_Str") {
    throw new Exception();
  }
 else {
    return response;
  }
}
Program: 162182
Project: 162182
Buggy source:
protected TransLocArrivalEstimates doInBackground(Void... voids){
  String url="String_Node_Str" + currentAgencyId + "String_Node_Str"+ currentRouteId+ "String_Node_Str"+ currentStopId;
  editor.putString("String_Node_Str" + mAppWidgetId,url).commit();
  Log.v("String_Node_Str","String_Node_Str" + url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  IOException e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
protected TransLocArrivalEstimates doInBackground(Void... voids){
  String url="String_Node_Str" + currentAgencyId + "String_Node_Str"+ currentRouteId+ "String_Node_Str"+ currentStopId;
  editor.putString("String_Node_Str" + mAppWidgetId,url).commit();
  Log.v("String_Node_Str","String_Node_Str" + url);
  try {
    return new ObjectMapper().readValue(Utils.getJsonResponse(url),TransLocArrivalEstimates.class);
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 162184
Project: 162184
Buggy source:
@Override public void onClick(View view){
  Utils.showAlertDialog(getBaseContext(),"String_Node_Str",getString(R.string.help_dialog));
}

Fixed version (ground truth):
@Override public void onClick(View view){
  Utils.showAlertDialog(WidgetConfigurationActivity.this,"String_Node_Str",getString(R.string.help_dialog));
}
Program: 162187
Project: 162187
Buggy source:
@Override public void onClick(View view){
  Utils.showAlertDialog(getBaseContext(),"String_Node_Str",getString(R.string.help_dialog));
}

Fixed version (ground truth):
@Override public void onClick(View view){
  Utils.showAlertDialog(WidgetConfigurationActivity.this,"String_Node_Str",getString(R.string.help_dialog));
}
Program: 162190
Project: 162190
Buggy source:
@Override public void onReceive(Context context,Intent intent){
  Log.v("String_Node_Str","String_Node_Str");
  if (intent.getAction() == null) {
    Bundle extras=intent.getExtras();
    if (extras != null) {
      Log.v("String_Node_Str","String_Node_Str");
      appWidgetManager=AppWidgetManager.getInstance(context);
      widgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
      Log.v("String_Node_Str","String_Node_Str" + widgetId);
      getJsonResponse task=new getJsonResponse(context);
      task.execute();
    }
  }
 else {
    super.onReceive(context,intent);
  }
}

Fixed version (ground truth):
@Override public void onReceive(Context context,Intent intent){
  Log.v("String_Node_Str","String_Node_Str");
  if (intent.getAction() == null) {
    Bundle extras=intent.getExtras();
    Log.v("String_Node_Str","String_Node_Str");
    appWidgetManager=AppWidgetManager.getInstance(context);
    widgetId=extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,AppWidgetManager.INVALID_APPWIDGET_ID);
    Log.v("String_Node_Str","String_Node_Str" + widgetId);
    Log.v("String_Node_Str","String_Node_Str");
    getJsonResponse task=new getJsonResponse(context);
    task.execute();
  }
 else {
    super.onReceive(context,intent);
  }
}
Program: 162192
Project: 162192
Buggy source:
public void onItemSelected(AdapterView<?> parent,View view,int pos,long id){
  sSelectRoute.setEnabled(true);
  PopulateStopsTask task=new PopulateStopsTask();
  task.execute();
}

Fixed version (ground truth):
public void onItemSelected(AdapterView<?> parent,View view,int pos,long id){
  sSelectStop.setEnabled(true);
  PopulateStopsTask task=new PopulateStopsTask();
  task.execute();
}
Program: 162193
Project: 162193
Buggy source:
@Override protected void onPreExecute(){
  int position=sSelectRoute.getSelectedItemPosition();
  routeId=routeIdArray.get(position);
  Log.v("String_Node_Str","String_Node_Str" + routeId);
  routeLongNameArray.clear();
  routeIdArray.clear();
  routeShortNameArray.clear();
  stopIdArray.clear();
  stopNameArray.clear();
  stopShortNameArray.clear();
}

Fixed version (ground truth):
@Override protected void onPreExecute(){
  for (int i=0; i < routeIdArray.size(); i++) {
    Log.v("String_Node_Str",routeLongNameArray.get(i));
    Log.v("String_Node_Str",routeIdArray.get(i));
  }
  int position=sSelectRoute.getSelectedItemPosition();
  routeId=routeIdArray.get(position);
  Log.v("String_Node_Str","String_Node_Str" + routeId);
  stopIdArray.clear();
  stopNameArray.clear();
  stopShortNameArray.clear();
}
Program: 162194
Project: 162194
Buggy source:
@Override protected void onPostExecute(Void result){
  super.onPostExecute(result);
  ArrayAdapter<String> stopArrayAdapter=new ArrayAdapter<String>(getBaseContext(),android.R.layout.simple_list_item_1,stopNameArray);
  sSelectRoute.setAdapter(stopArrayAdapter);
}

Fixed version (ground truth):
@Override protected void onPostExecute(Void result){
  super.onPostExecute(result);
  ArrayAdapter<String> stopArrayAdapter=new ArrayAdapter<String>(getBaseContext(),android.R.layout.simple_list_item_1,stopNameArray);
  sSelectStop.setAdapter(stopArrayAdapter);
}
Program: 162195
Project: 162195
Buggy source:
public void onItemSelected(AdapterView<?> parent,View view,int pos,long id){
  sSelectRoute.setEnabled(true);
  PopulateStopsTask task=new PopulateStopsTask();
  task.execute();
}

Fixed version (ground truth):
public void onItemSelected(AdapterView<?> parent,View view,int pos,long id){
  sSelectStop.setEnabled(true);
  PopulateStopsTask task=new PopulateStopsTask();
  task.execute();
}
Program: 162196
Project: 162196
Buggy source:
@Override protected void onPreExecute(){
  int position=sSelectRoute.getSelectedItemPosition();
  routeId=routeIdArray.get(position);
  Log.v("String_Node_Str","String_Node_Str" + routeId);
  routeLongNameArray.clear();
  routeIdArray.clear();
  routeShortNameArray.clear();
  stopIdArray.clear();
  stopNameArray.clear();
  stopShortNameArray.clear();
}

Fixed version (ground truth):
@Override protected void onPreExecute(){
  for (int i=0; i < routeIdArray.size(); i++) {
    Log.v("String_Node_Str",routeLongNameArray.get(i));
    Log.v("String_Node_Str",routeIdArray.get(i));
  }
  int position=sSelectRoute.getSelectedItemPosition();
  routeId=routeIdArray.get(position);
  Log.v("String_Node_Str","String_Node_Str" + routeId);
  stopIdArray.clear();
  stopNameArray.clear();
  stopShortNameArray.clear();
}
Program: 162197
Project: 162197
Buggy source:
@Override protected void onPostExecute(Void result){
  super.onPostExecute(result);
  ArrayAdapter<String> stopArrayAdapter=new ArrayAdapter<String>(getBaseContext(),android.R.layout.simple_list_item_1,stopNameArray);
  sSelectRoute.setAdapter(stopArrayAdapter);
}

Fixed version (ground truth):
@Override protected void onPostExecute(Void result){
  super.onPostExecute(result);
  ArrayAdapter<String> stopArrayAdapter=new ArrayAdapter<String>(getBaseContext(),android.R.layout.simple_list_item_1,stopNameArray);
  sSelectStop.setAdapter(stopArrayAdapter);
}
Program: 162199
Project: 162199
Buggy source:
/** 
 * Creates a URL for a request to the VDisk API.
 * @param host the VDisk host (i.e., api server, content server, or web server).
 * @param apiVersion the API version to use. You should almost always use {@code VDiskAPI.VERSION} for this.
 * @param target the target path, staring with a '/'.
 * @param params any URL params in an array, with the even numbered elements the parameter names and odd numbered elements the values, e.g. <code>new String[] {"path", "/Public", "locale", "en"}</code>.
 * @return a full URL for making a request.
 */
public static String buildURL(String host,int apiVersion,String target,String[] params){
  if (!target.startsWith("String_Node_Str")) {
    target="String_Node_Str" + target;
  }
  try {
    target=URLEncoder.encode("String_Node_Str" + apiVersion + target,"String_Node_Str");
    target=target.replace("String_Node_Str","String_Node_Str");
    if (params != null && params.length > 0) {
      target+="String_Node_Str" + urlencode(params);
    }
    target=target.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
  }
 catch (  UnsupportedEncodingException uce) {
    return null;
  }
  if (!AbstractSession.NEED_HTTPS_UPLOAD) {
    return "String_Node_Str" + host + target;
  }
  return "String_Node_Str" + host + "String_Node_Str"+ target;
}

Fixed version (ground truth):
/** 
 * Creates a URL for a request to the VDisk API.
 * @param host the VDisk host (i.e., api server, content server, or web server).
 * @param apiVersion the API version to use. You should almost always use {@code VDiskAPI.VERSION} for this.
 * @param target the target path, staring with a '/'.
 * @param params any URL params in an array, with the even numbered elements the parameter names and odd numbered elements the values, e.g. <code>new String[] {"path", "/Public", "locale", "en"}</code>.
 * @return a full URL for making a request.
 */
public static String buildURL(String host,int apiVersion,String target,String[] params){
  if (!target.startsWith("String_Node_Str")) {
    target="String_Node_Str" + target;
  }
  try {
    if (apiVersion >= 1) {
      target=URLEncoder.encode("String_Node_Str" + apiVersion + target,"String_Node_Str");
    }
 else {
      target=URLEncoder.encode(target,"String_Node_Str");
    }
    target=target.replace("String_Node_Str","String_Node_Str");
    if (params != null && params.length > 0) {
      target+="String_Node_Str" + urlencode(params);
    }
    target=target.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str");
  }
 catch (  UnsupportedEncodingException uce) {
    return null;
  }
  if (!AbstractSession.NEED_HTTPS_UPLOAD) {
    return "String_Node_Str" + host + target;
  }
  return "String_Node_Str" + host + "String_Node_Str"+ target;
}
Program: 162201
Project: 162201
Buggy source:
/** 
 */
@Override public void initialize(String rootResourcePath) throws IOException {
  try {
    List<String> discoveredResources=ResourceScanner.getInstance().getResources(rootResourcePath,Pattern.compile("String_Node_Str"),getClass().getClassLoader());
    if (discoveredResources.isEmpty()) {
      throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + rootResourcePath + "String_Node_Str");
    }
    Collections.sort(discoveredResources,COMPARATOR);
    resources=new ArrayList<String>();
    for (    String resource : discoveredResources) {
      System.out.println("String_Node_Str" + resource + "String_Node_Str");
      if (resource.endsWith("String_Node_Str")) {
        resource=resource.substring(resource.indexOf(rootResourcePath));
      }
      resources.add(resource);
    }
  }
 catch (  URISyntaxException e) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + rootResourcePath + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void initialize(String rootResourcePath) throws IOException {
  try {
    List<String> discoveredResources=ResourceScanner.getInstance().getResources(rootResourcePath,Pattern.compile("String_Node_Str"),getClass().getClassLoader());
    if (discoveredResources.isEmpty()) {
      throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + rootResourcePath + "String_Node_Str");
    }
    Collections.sort(discoveredResources,COMPARATOR);
    resources=new ArrayList<String>();
    for (    String resource : discoveredResources) {
      System.out.println("String_Node_Str" + resource + "String_Node_Str");
      if (resource.endsWith("String_Node_Str")) {
        resource=resource.substring(resource.indexOf(rootResourcePath));
        if (resource.contains("String_Node_Str")) {
          continue;
        }
      }
      resources.add(resource);
    }
  }
 catch (  URISyntaxException e) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + rootResourcePath + "String_Node_Str",e);
  }
}
Program: 162202
Project: 162202
Buggy source:
/** 
 * Performs the actual mutation and then updates the recorded schema version
 */
@Override public final void mutate(Context context) throws MutagenException {
  performMutation(context);
  int version=getResultingState().getID();
  try {
    MutationBatch batch=getKeyspace().prepareMutationBatch();
    batch.withRow(CassandraSubject.VERSION_CF,CassandraSubject.ROW_KEY).putColumn(CassandraSubject.VERSION_COLUMN,version);
    batch.execute();
  }
 catch (  ConnectionException e) {
    throw new MutagenException("String_Node_Str" + "String_Node_Str" + version + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Performs the actual mutation and then updates the recorded schema version
 */
@Override public final void mutate(Context context) throws MutagenException {
  performMutation(context);
  int version=getResultingState().getID();
  String change=getChangeSummary();
  if (change == null) {
    change="String_Node_Str";
  }
  String changeHash=md5String(change);
  try {
    MutationBatch batch=getKeyspace().prepareMutationBatch();
    batch.withRow(CassandraSubject.VERSION_CF,CassandraSubject.ROW_KEY).putColumn(CassandraSubject.VERSION_COLUMN,version);
    batch.withRow(CassandraSubject.VERSION_CF,String.format("String_Node_Str",version)).putColumn("String_Node_Str",change).putColumn("String_Node_Str",changeHash);
    batch.execute();
  }
 catch (  ConnectionException e) {
    throw new MutagenException("String_Node_Str" + "String_Node_Str" + version + "String_Node_Str",e);
  }
}
Program: 162203
Project: 162203
Buggy source:
/** 
 */
private void loadCQLStatements(String resourceName){
  String source;
  try {
    source=loadResource(resourceName);
  }
 catch (  IOException e) {
    throw new MutagenException("String_Node_Str" + resourceName + "String_Node_Str",e);
  }
  if (source == null) {
    return;
  }
  String[] lines=source.split("String_Node_Str");
  StringBuilder statement=new StringBuilder();
  for (int i=0; i < lines.length; i++) {
    int index;
    String line=lines[i];
    String trimmedLine=line.trim();
    if (trimmedLine.startsWith("String_Node_Str") || trimmedLine.startsWith("String_Node_Str")) {
    }
 else     if ((index=line.indexOf("String_Node_Str")) != -1) {
      statement.append(line.substring(0,index + 1));
      statements.add(statement.toString());
      if (line.length() > index + 1) {
        statement=new StringBuilder(line.substring(index + 1));
      }
 else {
        statement=new StringBuilder();
      }
    }
 else {
      statement.append("String_Node_Str").append(line);
    }
  }
}

Fixed version (ground truth):
/** 
 */
private void loadCQLStatements(String resourceName){
  try {
    source=loadResource(resourceName);
  }
 catch (  IOException e) {
    throw new MutagenException("String_Node_Str" + resourceName + "String_Node_Str",e);
  }
  if (source == null) {
    return;
  }
  String[] lines=source.split("String_Node_Str");
  StringBuilder statement=new StringBuilder();
  for (int i=0; i < lines.length; i++) {
    int index;
    String line=lines[i];
    String trimmedLine=line.trim();
    if (trimmedLine.startsWith("String_Node_Str") || trimmedLine.startsWith("String_Node_Str")) {
    }
 else     if ((index=line.indexOf("String_Node_Str")) != -1) {
      statement.append("String_Node_Str").append(line.substring(0,index + 1));
      statements.add(statement.toString());
      if (line.length() > index + 1) {
        statement=new StringBuilder(line.substring(index + 1));
      }
 else {
        statement=new StringBuilder();
      }
    }
 else {
      statement.append("String_Node_Str").append(line);
    }
  }
}
Program: 162204
Project: 162204
Buggy source:
/** 
 */
@Override public Plan.Result<Integer> mutate(Keyspace keyspace){
  CassandraCoordinator coordinator=new CassandraCoordinator(keyspace);
  CassandraSubject subject=new CassandraSubject(keyspace);
  List<Mutation<Integer>> mutations=new ArrayList<Mutation<Integer>>();
  Planner<Integer> planner=new CassandraPlanner(keyspace,getResources());
  Plan<Integer> plan=planner.getPlan(subject,coordinator);
  Plan.Result<Integer> result=plan.execute();
  return result;
}

Fixed version (ground truth):
/** 
 */
@Override public Plan.Result<Integer> mutate(Keyspace keyspace){
synchronized (System.class) {
    CassandraCoordinator coordinator=new CassandraCoordinator(keyspace);
    CassandraSubject subject=new CassandraSubject(keyspace);
    Planner<Integer> planner=new CassandraPlanner(keyspace,getResources());
    Plan<Integer> plan=planner.getPlan(subject,coordinator);
    Plan.Result<Integer> result=plan.execute();
    return result;
  }
}
Program: 162205
Project: 162205
Buggy source:
@Override public int compare(String path1,String path2){
  int index1=path1.lastIndexOf("String_Node_Str");
  int index2=path2.lastIndexOf("String_Node_Str");
  String file1=path1.substring(index1 + 1);
  String file2=path2.substring(index2 + 1);
  index1=file1.lastIndexOf("String_Node_Str");
  index2=file2.lastIndexOf("String_Node_Str");
  file1=file1.substring(0,index1);
  file2=file2.substring(0,index2);
  return file1.compareTo(file2);
}

Fixed version (ground truth):
@Override public int compare(String path1,String path2){
  final String origPath1=path1;
  final String origPath2=path2;
  try {
    int index1=path1.lastIndexOf("String_Node_Str");
    int index2=path2.lastIndexOf("String_Node_Str");
    String file1;
    if (index1 != -1) {
      file1=path1.substring(index1 + 1);
    }
 else {
      file1=path1;
    }
    String file2;
    if (index2 != -1) {
      file2=path2.substring(index2 + 1);
    }
 else {
      file2=path2;
    }
    index1=file1.lastIndexOf("String_Node_Str");
    index2=file2.lastIndexOf("String_Node_Str");
    if (index1 > 1) {
      file1=file1.substring(0,index1);
    }
    if (index2 > 1) {
      file2=file2.substring(0,index2);
    }
    return file1.compareTo(file2);
  }
 catch (  StringIndexOutOfBoundsException e) {
    throw new StringIndexOutOfBoundsException(e.getMessage() + "String_Node_Str" + origPath1+ "String_Node_Str"+ origPath2+ "String_Node_Str");
  }
}
Program: 162206
Project: 162206
Buggy source:
/** 
 */
@Override public void initialize(String rootResourcePath) throws IOException {
  try {
    List<String> discoveredResources=ResourceScanner.getInstance().getResources(rootResourcePath,Pattern.compile("String_Node_Str"),getClass().getClassLoader());
    Collections.sort(discoveredResources,COMPARATOR);
    resources=new ArrayList<String>();
    for (    String resource : discoveredResources) {
      System.out.println("String_Node_Str" + resource + "String_Node_Str");
      if (resource.endsWith("String_Node_Str")) {
        resource=resource.substring(resource.indexOf(rootResourcePath));
      }
      resources.add(resource);
    }
  }
 catch (  URISyntaxException e) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + rootResourcePath + "String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 */
@Override public void initialize(String rootResourcePath) throws IOException {
  try {
    List<String> discoveredResources=ResourceScanner.getInstance().getResources(rootResourcePath,Pattern.compile("String_Node_Str"),getClass().getClassLoader());
    if (discoveredResources.isEmpty()) {
      throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + rootResourcePath + "String_Node_Str");
    }
    Collections.sort(discoveredResources,COMPARATOR);
    resources=new ArrayList<String>();
    for (    String resource : discoveredResources) {
      System.out.println("String_Node_Str" + resource + "String_Node_Str");
      if (resource.endsWith("String_Node_Str")) {
        resource=resource.substring(resource.indexOf(rootResourcePath));
      }
      resources.add(resource);
    }
  }
 catch (  URISyntaxException e) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + rootResourcePath + "String_Node_Str",e);
  }
}
Program: 162207
Project: 162207
Buggy source:
@OnClick(R.id.btn_start_simple_polling) public void onStartSimplePollingClicked(){
  _setupLogger();
  _log(String.format("String_Node_Str",_counter));
  _subscriptions.add(Observable.create(new Observable.OnSubscribe<String>(){
    @Override public void call(    final Subscriber<? super String> subscriber){
      Subscription subscription=_worker.schedulePeriodically(new Action0(){
        @Override public void call(){
          subscriber.onNext(_doNetworkCallAndGetStringResult());
        }
      }
,INITIAL_DELAY,POLLING_INTERVAL,TimeUnit.MILLISECONDS);
      subscriber.add(subscription);
    }
  }
).take(10).subscribe(new Action1<String>(){
    @Override public void call(    String s){
      _log(String.format("String_Node_Str",s));
    }
  }
));
}

Fixed version (ground truth):
@OnClick(R.id.btn_start_simple_polling) public void onStartSimplePollingClicked(){
  _setupLogger();
  _subscriptions.add(Observable.interval(INITIAL_DELAY,POLLING_INTERVAL,TimeUnit.MILLISECONDS).map(new Func1<Long,String>(){
    @Override public String call(    Long heartBeat){
      return _doNetworkCallAndGetStringResult();
    }
  }
).take(5).doOnSubscribe(new Action0(){
    @Override public void call(){
      _log(String.format("String_Node_Str",_counter));
    }
  }
).subscribe(new Action1<String>(){
    @Override public void call(    String s){
      _log(String.format("String_Node_Str",s));
    }
  }
));
}
Program: 162208
Project: 162208
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  Timber.plant(new Timber.DebugTree());
  if (savedInstanceState == null) {
    getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new MainFragment(),this.toString()).commit();
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (savedInstanceState == null) {
    getSupportFragmentManager().beginTransaction().replace(android.R.id.content,new MainFragment(),this.toString()).commit();
  }
}
Program: 162209
Project: 162209
Buggy source:
@OnClick(R.id.btn_demo_debounce) public void demoThrottling(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new DebounceSearchEmitterFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_debounce) public void demoThrottling(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(DebounceSearchEmitterFragment.class.toString()).replace(android.R.id.content,new DebounceSearchEmitterFragment(),DebounceSearchEmitterFragment.class.toString()).commit();
}
Program: 162210
Project: 162210
Buggy source:
public void demoTimeout(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new TimeoutDemoFragment(),this.toString()).commit();
}

Fixed version (ground truth):
public void demoTimeout(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(TimeoutDemoFragment.class.toString()).replace(android.R.id.content,new TimeoutDemoFragment(),TimeoutDemoFragment.class.toString()).commit();
}
Program: 162211
Project: 162211
Buggy source:
@OnClick(R.id.btn_demo_timing) public void demoTimerIntervalDelays(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new TimingDemoFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_timing) public void demoTimerIntervalDelays(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(TimingDemoFragment.class.toString()).replace(android.R.id.content,new TimingDemoFragment(),TimingDemoFragment.class.toString()).commit();
}
Program: 162212
Project: 162212
Buggy source:
@OnClick(R.id.btn_demo_schedulers) public void demoConcurrencyWithSchedulers(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new ConcurrencyWithSchedulersDemoFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_schedulers) public void demoConcurrencyWithSchedulers(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(ConcurrencyWithSchedulersDemoFragment.class.getName()).replace(android.R.id.content,new ConcurrencyWithSchedulersDemoFragment(),ConcurrencyWithSchedulersDemoFragment.class.getName()).commit();
}
Program: 162213
Project: 162213
Buggy source:
@OnClick(R.id.btn_demo_double_binding_textview) public void demoDoubleBindingWithPublishSubject(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new DoubleBindingTextViewFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_double_binding_textview) public void demoDoubleBindingWithPublishSubject(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(DoubleBindingTextViewFragment.class.toString()).replace(android.R.id.content,new DoubleBindingTextViewFragment(),DoubleBindingTextViewFragment.class.toString()).commit();
}
Program: 162214
Project: 162214
Buggy source:
@OnClick(R.id.btn_demo_buffer) public void demoBuffer(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new BufferDemoFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_buffer) public void demoBuffer(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(BufferDemoFragment.class.toString()).replace(android.R.id.content,new BufferDemoFragment(),BufferDemoFragment.class.toString()).commit();
}
Program: 162215
Project: 162215
Buggy source:
@OnClick(R.id.btn_demo_rxbus) public void demoRxBus(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new RxBusDemoFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_rxbus) public void demoRxBus(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(RxBusDemoFragment.class.toString()).replace(android.R.id.content,new RxBusDemoFragment(),RxBusDemoFragment.class.toString()).commit();
}
Program: 162216
Project: 162216
Buggy source:
@OnClick(R.id.btn_demo_retrofit) public void demoRetrofitCalls(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new RetrofitFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_retrofit) public void demoRetrofitCalls(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(RetrofitFragment.class.toString()).replace(android.R.id.content,new RetrofitFragment(),RetrofitFragment.class.toString()).commit();
}
Program: 162217
Project: 162217
Buggy source:
@OnClick(R.id.btn_demo_pseudo_cache) public void pseudoCacheDemo(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new PseudoCacheMergeFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_pseudo_cache) public void pseudoCacheDemo(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(PseudoCacheMergeFragment.class.toString()).replace(android.R.id.content,new PseudoCacheMergeFragment(),PseudoCacheMergeFragment.class.toString()).commit();
}
Program: 162218
Project: 162218
Buggy source:
@OnClick(R.id.btn_demo_exponential_backoff) public void demoExponentialBackoff(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new ExponentialBackoffFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_exponential_backoff) public void demoExponentialBackoff(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(ExponentialBackoffFragment.class.toString()).replace(android.R.id.content,new ExponentialBackoffFragment(),ExponentialBackoffFragment.class.toString()).commit();
}
Program: 162219
Project: 162219
Buggy source:
@OnClick(R.id.btn_demo_form_validation_combinel) public void formValidation(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new FormValidationCombineLatestFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@OnClick(R.id.btn_demo_form_validation_combinel) public void formValidation(){
  getActivity().getSupportFragmentManager().beginTransaction().addToBackStack(FormValidationCombineLatestFragment.class.toString()).replace(android.R.id.content,new FormValidationCombineLatestFragment(),FormValidationCombineLatestFragment.class.toString()).commit();
}
Program: 162220
Project: 162220
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  _instance=(MyApp)getApplicationContext();
  _refWatcher=LeakCanary.install(this);
}

Fixed version (ground truth):
@Override public void onCreate(){
  super.onCreate();
  _instance=(MyApp)getApplicationContext();
  _refWatcher=LeakCanary.install(this);
  Timber.plant(new Timber.DebugTree());
}
Program: 162221
Project: 162221
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  Timber.plant(new Timber.DebugTree());
  getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new MainFragment(),this.toString()).commit();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  Timber.plant(new Timber.DebugTree());
  if (savedInstanceState == null) {
    getSupportFragmentManager().beginTransaction().addToBackStack(this.toString()).replace(R.id.activity_main,new MainFragment(),this.toString()).commit();
  }
}
Program: 162222
Project: 162222
Buggy source:
private boolean canInteractWithFragments(){
  tvShowFragment=(TvShowFragment)getFragmentManager().findFragmentById(R.id.f_tv_show);
  tvShowDraggableFragment=(TvShowDraggableFragment)getFragmentManager().findFragmentById(R.id.f_tv_show_draggable);
  ;
  return tvShowDraggableFragment != null || tvShowFragment != null;
}

Fixed version (ground truth):
private boolean canInteractWithFragments(){
  tvShowFragment=(TvShowFragment)getFragmentManager().findFragmentById(R.id.f_tv_show);
  tvShowDraggableFragment=(TvShowDraggableFragment)getFragmentManager().findFragmentById(R.id.f_tv_show_draggable);
  return tvShowDraggableFragment != null || tvShowFragment != null;
}
Program: 162223
Project: 162223
Buggy source:
@Override public void removeAll(Collection<TvShow> tvShows){
  this.tvShows.addAll(tvShows);
}

Fixed version (ground truth):
@Override public void removeAll(Collection<TvShow> tvShows){
  this.tvShows.removeAll(tvShows);
}
Program: 162224
Project: 162224
Buggy source:
public int search(int input[],int search){
  int low=0;
  int high=input.length - 1;
  int mid=0;
  while (low <= high) {
    mid=(low + high) / 2;
    if (input[mid] == search) {
      return mid;
    }
 else     if (input[mid] < search) {
      low=mid + 1;
    }
 else {
      high=mid - 1;
    }
  }
  return -1;
}

Fixed version (ground truth):
public int search(final int input[],int search){
  int low=0;
  int high=input.length - 1;
  int mid;
  while (low <= high) {
    mid=low + ((high - low) / 2);
    if (input[mid] == search) {
      return mid;
    }
 else     if (input[mid] < search) {
      low=mid + 1;
    }
 else {
      high=mid - 1;
    }
  }
  return -1;
}
Program: 162225
Project: 162225
Buggy source:
public static void main(String args[]){
  BinarySearch bs=new BinarySearch();
  int arr1[]={1,2,4,5,7,8};
  System.out.println(bs.search(arr1,-1));
  System.out.println(bs.search(arr1,1));
  System.out.println(bs.search(arr1,8));
  System.out.println(bs.search(arr1,2));
}

Fixed version (ground truth):
public static void main(String args[]){
  BinarySearch bSearch=new BinarySearch();
  final int arr1[]={1,2,4,5,7,8};
  System.out.println(bSearch.search(arr1,-1));
  System.out.println(bSearch.search(arr1,1));
  System.out.println(bSearch.search(arr1,8));
  System.out.println(bSearch.search(arr1,2));
}
Program: 162226
Project: 162226
Buggy source:
public static void main(String args[]){
  int[] input={4,3,13,2,9,7};
  MaximumGap mg=new MaximumGap();
  System.out.println(mg.maxGap(input));
}

Fixed version (ground truth):
public static void main(String args[]){
  int[] input={4,3,13,2,9,7};
  MaximumGap mg=new MaximumGap();
  System.out.println(mg.maximumGap(input));
}
Program: 162227
Project: 162227
Buggy source:
public void build(){
  root=SuffixNode.createNode(1,new End(0));
  root.index=-1;
  active=new Active(root);
  this.end=new End(-1);
  for (int i=0; i < input.length; i++) {
    startPhase(i);
  }
  setIndexUsingDfs(root,0,input.length);
}

Fixed version (ground truth):
public void build(){
  root=SuffixNode.createNode(1,new End(0));
  root.index=-1;
  active=new Active(root);
  this.end=new End(-1);
  for (int i=0; i < input.length; i++) {
    startPhase(i);
  }
  if (remainingSuffixCount != 0) {
    System.out.print("String_Node_Str");
  }
  setIndexUsingDfs(root,0,input.length);
}