nus-yam/ex-repair huggingface dataset:
Program: 44701
Project: 44701
Buggy source:
public long getSetUID(SharedPreferences sp,Context ctx){
  long tempID=this.getUID();
  if (tempID >= 0) {
    return tempID;
  }
  final AccountManager manager=AccountManager.get(ctx);
  final Account[] accounts=manager.getAccounts();
  String username=getGmail(accounts);
  if (!username.equals("String_Node_Str")) {
    long uid=sp.getLong("String_Node_Str",-1);
    UIDtoken.INSTANCE.setUID(uid);
    if (uid < 0) {
      NetHelper NH=new NetHelper();
      long UID=NH.getID(username);
      SharedPreferences.Editor editor=sp.edit();
      editor.putLong("String_Node_Str",UID);
      editor.putString("String_Node_Str",username);
      editor.commit();
      UIDtoken.INSTANCE.setUID(UID);
      return UID;
    }
 else {
      return -1;
    }
  }
 else {
    Context context=ctx;
    String loginPrompt=ctx.getString(R.string.error_login_message);
    CharSequence text=loginPrompt;
    Toast toast=Toast.makeText(context,text,1000);
    toast.show();
  }
  return -5;
}

Fixed version (ground truth):
public long getSetUID(SharedPreferences sp,Context ctx){
  long tempID=this.getUID();
  if (tempID >= 0) {
    return tempID;
  }
  final AccountManager manager=AccountManager.get(ctx);
  final Account[] accounts=manager.getAccounts();
  String username=getGmail(accounts);
  if (!username.equals("String_Node_Str")) {
    long uid=sp.getLong("String_Node_Str",-1);
    UIDtoken.INSTANCE.setUID(uid);
    if (uid < 0) {
      NetHelper NH=new NetHelper();
      long UID=NH.getID(username);
      if (UID < 0) {
        return UID;
      }
      SharedPreferences.Editor editor=sp.edit();
      editor.putLong("String_Node_Str",UID);
      editor.putString("String_Node_Str",username);
      editor.commit();
    }
 else {
      UIDtoken.INSTANCE.setUID(uid);
      return uid;
    }
  }
 else {
    Context context=ctx;
    String loginPrompt=ctx.getString(R.string.error_login_message);
    CharSequence text=loginPrompt;
    Toast toast=Toast.makeText(context,text,1000);
    toast.show();
  }
  return -5;
}
Program: 44703
Project: 44703
Buggy source:
private void drawRecentLocal(){
  if (!(isMoved() || isTimeChanged())) {
    return;
  }
  center=map.getMapCenter();
  zoomLevel=map.getZoomLevel();
  ArrayList<HappyBottle> temp=newBottles;
  newBottles=updateToView();
  if (newBottles != null && newBottles.size() != 0) {
    timeReference=newBottles.get(0).getTime();
  }
  if (!(newBottles.equals(temp))) {
    handler.removeCallbacks(latestThread);
    latestThread=new Runnable(){
      @Override public void run(){
        emotionOverlayFiller(1,newBottles,happyOverlay);
        emotionOverlayFiller(0,newBottles,sadOverlay);
        map.invalidate();
      }
    }
;
    handler.postDelayed(latestThread,10);
    return;
  }
}

Fixed version (ground truth):
private void drawRecentLocal(){
  if (!(isMoved() || isTimeChanged())) {
    return;
  }
  center=map.getMapCenter();
  zoomLevel=map.getZoomLevel();
  ArrayList<HappyBottle> temp=newBottles;
  newBottles=updateToView();
  if (!(newBottles.equals(temp))) {
    handler.removeCallbacks(latestThread);
    latestThread=new Runnable(){
      @Override public void run(){
        emotionOverlayAdder(1,newBottles,happyOverlay);
        emotionOverlayAdder(0,newBottles,sadOverlay);
        map.invalidate();
      }
    }
;
    handler.postDelayed(latestThread,10);
    return;
  }
}
Program: 44704
Project: 44704
Buggy source:
@Override public void run(){
  emotionOverlayFiller(1,newBottles,happyOverlay);
  emotionOverlayFiller(0,newBottles,sadOverlay);
  map.invalidate();
}

Fixed version (ground truth):
@Override public void run(){
  emotionOverlayAdder(1,newBottles,happyOverlay);
  emotionOverlayAdder(0,newBottles,sadOverlay);
  map.invalidate();
}
Program: 44705
Project: 44705
Buggy source:
/** 
 * This method updates the overlays for only the current the current view
 */
private ArrayList<HappyBottle> updateToView(){
  epochChecker=epochTime;
  GeoPoint center=map.getMapCenter();
  int centerLat=center.getLatitudeE6();
  int centerLong=center.getLongitudeE6();
  int width=map.getLongitudeSpan();
  int height=map.getLatitudeSpan();
  int minLong=centerLong - width / 2;
  int maxLong=centerLong + width / 2;
  int maxLat=centerLat + height / 2;
  int minLat=centerLat - height / 2;
  Log.d("String_Node_Str","String_Node_Str" + minLong + "String_Node_Str"+ minLat+ "String_Node_Str"+ maxLong+ "String_Node_Str"+ maxLat);
  return datahelper.getMyLocalRecent(minLat,maxLat,minLong,maxLong,100);
}

Fixed version (ground truth):
/** 
 * This method updates the overlays for only the current the current view
 */
private ArrayList<HappyBottle> updateToView(){
  epochChecker=epochTime;
  GeoPoint center=map.getMapCenter();
  int centerLat=center.getLatitudeE6();
  int centerLong=center.getLongitudeE6();
  int width=map.getLongitudeSpan();
  int height=map.getLatitudeSpan();
  int minLong=centerLong - width / 2;
  int maxLong=centerLong + width / 2;
  int maxLat=centerLat + height / 2;
  int minLat=centerLat - height / 2;
  Log.d("String_Node_Str","String_Node_Str" + minLong + "String_Node_Str"+ minLat+ "String_Node_Str"+ maxLong+ "String_Node_Str"+ maxLat);
  return datahelper.getMyLocalRecent(minLat,maxLat,minLong,maxLong,5);
}
Program: 44706
Project: 44706
Buggy source:
public long getSetUID(SharedPreferences sp,Context ctx){
  long tempID=this.getUID();
  if (tempID >= 0) {
    return tempID;
  }
  final AccountManager manager=AccountManager.get(ctx);
  final Account[] accounts=manager.getAccounts();
  String username=getGmail(accounts);
  if (!username.equals("String_Node_Str")) {
    long uid=sp.getLong("String_Node_Str",-1);
    UIDtoken.INSTANCE.setUID(uid);
    if (uid < 0) {
      NetHelper NH=new NetHelper();
      long UID=NH.getID(username);
      if (UID < 0) {
        return UID;
      }
      SharedPreferences.Editor editor=sp.edit();
      editor.putLong("String_Node_Str",UID);
      editor.putString("String_Node_Str",username);
      editor.commit();
    }
 else {
      UIDtoken.INSTANCE.setUID(uid);
      return uid;
    }
  }
 else {
    Context context=ctx;
    String loginPrompt=ctx.getString(R.string.error_login_message);
    CharSequence text=loginPrompt;
    Toast toast=Toast.makeText(context,text,1000);
    toast.show();
  }
  return -5;
}

Fixed version (ground truth):
public long getSetUID(SharedPreferences sp,Context ctx){
  long tempID=this.getUID();
  if (tempID >= 0) {
    return tempID;
  }
  final AccountManager manager=AccountManager.get(ctx);
  final Account[] accounts=manager.getAccounts();
  String username=getGmail(accounts);
  if (!username.equals("String_Node_Str")) {
    long uid=sp.getLong("String_Node_Str",-1);
    UIDtoken.INSTANCE.setUID(uid);
    if (uid < 0) {
      NetHelper NH=new NetHelper();
      uid=NH.getID(username);
      if (uid < 0) {
        return uid;
      }
      SharedPreferences.Editor editor=sp.edit();
      editor.putLong("String_Node_Str",uid);
      editor.putString("String_Node_Str",username);
      editor.commit();
    }
 else {
    }
    UIDtoken.INSTANCE.setUID(uid);
    return uid;
  }
 else {
    Context context=ctx;
    String loginPrompt=ctx.getString(R.string.error_login_message);
    CharSequence text=loginPrompt;
    Toast toast=Toast.makeText(context,text,1000);
    toast.show();
  }
  return -5;
}
Program: 44708
Project: 44708
Buggy source:
/** 
 * The same as downloadLocalBefore, except we have a new parameter: timebefore. Only return bottles created before time timebefore.  It will download the most recent <limit> number of bottles, within the view defined by min/max lat/long, but only those before timebefore. If timebefore < 0, it ignores that parameter. 
 * @param minLat
 * @param maxLat
 * @param minLong
 * @param maxLong
 * @param limit
 * @param timebefore
 * @return ArrayList of HappyBottles we download.
 */
public ArrayList<HappyBottle> downloadLocalBefore(int minLat,int maxLat,int minLong,int maxLong,int limit,int timebefore){
  String page="String_Node_Str";
  try {
    HttpGet request=new HttpGet();
    if (timebefore < 0) {
      request.setURI(new URI("String_Node_Str" + minLat + "String_Node_Str"+ maxLat+ "String_Node_Str"+ minLong+ "String_Node_Str"+ maxLong+ "String_Node_Str"+ limit+ "String_Node_Str"));
    }
 else {
      request.setURI(new URI("String_Node_Str" + minLat + "String_Node_Str"+ maxLat+ "String_Node_Str"+ minLong+ "String_Node_Str"+ maxLong+ "String_Node_Str"+ limit+ "String_Node_Str"+ timebefore+ "String_Node_Str"));
    }
    Log.d(TAG,request.getURI().toString());
    BasicHeader declareAuth=new BasicHeader("String_Node_Str","String_Node_Str" + Base64.encodeToString("String_Node_Str".getBytes(),Base64.DEFAULT) + "String_Node_Str");
    request.setHeader(declareAuth);
    page=connectionHelper(request);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return parse(page);
}

Fixed version (ground truth):
/** 
 * The same as downloadLocalBefore, except we have a new parameter: timebefore. Only return bottles created before time timebefore.  It will download the most recent <limit> number of bottles, within the view defined by min/max lat/long, but only those before timebefore. If timebefore < 0, it ignores that parameter. 
 * @param minLat
 * @param maxLat
 * @param minLong
 * @param maxLong
 * @param limit
 * @param timebefore
 * @return ArrayList of HappyBottles we download.
 */
public ArrayList<HappyBottle> downloadLocalBefore(int minLat,int maxLat,int minLong,int maxLong,int limit,long timebefore){
  String page="String_Node_Str";
  try {
    HttpGet request=new HttpGet();
    if (timebefore < 0) {
      request.setURI(new URI("String_Node_Str" + minLat + "String_Node_Str"+ maxLat+ "String_Node_Str"+ minLong+ "String_Node_Str"+ maxLong+ "String_Node_Str"+ limit+ "String_Node_Str"));
    }
 else {
      request.setURI(new URI("String_Node_Str" + minLat + "String_Node_Str"+ maxLat+ "String_Node_Str"+ minLong+ "String_Node_Str"+ maxLong+ "String_Node_Str"+ limit+ "String_Node_Str"+ timebefore+ "String_Node_Str"));
    }
    Log.d(TAG,request.getURI().toString());
    BasicHeader declareAuth=new BasicHeader("String_Node_Str","String_Node_Str" + Base64.encodeToString("String_Node_Str".getBytes(),Base64.DEFAULT) + "String_Node_Str");
    request.setHeader(declareAuth);
    page=connectionHelper(request);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
  return parse(page);
}
Program: 44709
Project: 44709
Buggy source:
public double[] percentages(ArrayList<HappyBottle> plottables){
  Iterator<HappyBottle> itr=plottables.iterator();
  double happy=0;
  double sad=0;
  double[] values=new double[2];
  while (itr.hasNext()) {
    HappyBottle element=itr.next();
    int x=new Timestamp(element.getTime()).getDate();
    int date=Calendar.getInstance().get(Calendar.DATE);
    if (x == date) {
      if (element.getEmo() == 1) {
        happy+=1;
      }
 else {
        sad+=1;
      }
    }
  }
  double happyprctg=(happy * 100) / (happy + sad);
  double sadprctg=100 - happyprctg;
  int happytransf=(int)(happyprctg * 100);
  int sadtrans=(int)(sadprctg * 100);
  happyprctg=(double)happytransf / 100;
  sadprctg=(double)sadtrans / 100;
  values[0]=happyprctg;
  values[1]=sadprctg;
  return values;
}

Fixed version (ground truth):
public double[] percentages(ArrayList<HappyBottle> plottables){
  Iterator<HappyBottle> itr=plottables.iterator();
  double happy=0;
  double sad=0;
  double[] values=new double[2];
  while (itr.hasNext()) {
    HappyBottle element=itr.next();
    int x=new Timestamp(element.getTime()).getMonth() + 1;
    int y=new Timestamp(element.getTime()).getYear() + 1900;
    int z=new Timestamp(element.getTime()).getDate();
    int month=Calendar.getInstance().get(Calendar.MONTH) + 1;
    int year=Calendar.getInstance().get(Calendar.YEAR);
    int date=Calendar.getInstance().get(Calendar.DATE);
    if (x == month && y == year && z == date) {
      if (element.getEmo() == 1) {
        happy+=1;
      }
 else {
        sad+=1;
      }
    }
  }
  double happyprctg=(happy * 100) / (happy + sad);
  double sadprctg=100 - happyprctg;
  int happytransf=(int)(happyprctg * 100);
  int sadtrans=(int)(sadprctg * 100);
  happyprctg=(double)happytransf / 100;
  sadprctg=(double)sadtrans / 100;
  values[0]=happyprctg;
  values[1]=sadprctg;
  return values;
}
Program: 44710
Project: 44710
Buggy source:
public int test(ArrayList<HappyBottle> plottables){
  Iterator<HappyBottle> itr=plottables.iterator();
  HappyBottle element=itr.next();
  int x=new Timestamp(element.getTime()).getMonth();
  return x;
}

Fixed version (ground truth):
public int test(ArrayList<HappyBottle> plottables){
  Iterator<HappyBottle> itr=plottables.iterator();
  HappyBottle element=itr.next();
  int x=new Timestamp(element.getTime()).getYear();
  return x;
}
Program: 44711
Project: 44711
Buggy source:
public double[] percentages(ArrayList<HappyBottle> plottables){
  Iterator<HappyBottle> itr=plottables.iterator();
  double happy=0;
  double sad=0;
  double[] values=new double[2];
  while (itr.hasNext()) {
    HappyBottle element=itr.next();
    int x=new Timestamp(element.getTime()).getMonth() + 1;
    int y=new Timestamp(element.getTime()).getYear();
    int month=Calendar.getInstance().get(Calendar.MONTH) + 1;
    int year=Calendar.getInstance().get(Calendar.YEAR);
    if (x == month) {
      if (element.getEmo() == 1) {
        happy+=1;
      }
 else {
        sad+=1;
      }
    }
  }
  double happyprctg=(happy * 100) / (happy + sad);
  double sadprctg=100 - happyprctg;
  int happytransf=(int)(happyprctg * 100);
  int sadtrans=(int)(sadprctg * 100);
  happyprctg=(double)happytransf / 100;
  sadprctg=(double)sadtrans / 100;
  values[0]=happyprctg;
  values[1]=sadprctg;
  return values;
}

Fixed version (ground truth):
public double[] percentages(ArrayList<HappyBottle> plottables){
  Iterator<HappyBottle> itr=plottables.iterator();
  double happy=0;
  double sad=0;
  double[] values=new double[2];
  while (itr.hasNext()) {
    HappyBottle element=itr.next();
    int x=new Timestamp(element.getTime()).getMonth() + 1;
    int y=new Timestamp(element.getTime()).getYear() + 1900;
    int month=Calendar.getInstance().get(Calendar.MONTH) + 1;
    int year=Calendar.getInstance().get(Calendar.YEAR);
    if (y == year && x == month) {
      if (element.getEmo() == 1) {
        happy+=1;
      }
 else {
        sad+=1;
      }
    }
  }
  double happyprctg=(happy * 100) / (happy + sad);
  double sadprctg=100 - happyprctg;
  int happytransf=(int)(happyprctg * 100);
  int sadtrans=(int)(sadprctg * 100);
  happyprctg=(double)happytransf / 100;
  sadprctg=(double)sadtrans / 100;
  values[0]=happyprctg;
  values[1]=sadprctg;
  return values;
}
Program: 44712
Project: 44712
Buggy source:
/** 
 * Invoked when a view is clicked
 */
@Override public void onClick(View v){
switch (v.getId()) {
case R.id.switchView:
    if (streetView == 0) {
      map.setStreetView(true);
      streetView=1;
      map.setSatellite(false);
    }
 else {
      map.setStreetView(false);
      streetView=0;
      map.setSatellite(true);
    }
  map.invalidate();
break;
case R.id.showHappy:
if (checkHappy == 0) {
map.getOverlays().add(happyOverlay);
checkHappy=1;
}
 else {
map.getOverlays().clear();
if (checkSad == 1) {
  map.getOverlays().add(sadOverlay);
}
checkHappy=0;
}
invalidateOverlay();
break;
case R.id.showSad:
if (checkSad == 0) {
map.getOverlays().add(sadOverlay);
checkSad=1;
}
 else {
map.getOverlays().clear();
if (checkHappy == 1) {
map.getOverlays().add(happyOverlay);
}
checkSad=0;
}
invalidateOverlay();
break;
case R.id.map:
Intent j=new Intent(this,MyMap.class);
j.putExtra("String_Node_Str",streetView);
j.putExtra("String_Node_Str",false);
j.putExtra("String_Node_Str",checkHappy);
j.putExtra("String_Node_Str",checkSad);
startActivity(j);
finish();
break;
case R.id.myTrack_button:
startActivity(new Intent(this,History.class));
break;
case R.id.myChart_button:
startActivity(new Intent(this,ChartList.class));
break;
}
map.invalidate();
}

Fixed version (ground truth):
/** 
 * Invoked when a view is clicked
 */
@Override public void onClick(View v){
switch (v.getId()) {
case R.id.switchView:
    if (streetView == 0) {
      map.setStreetView(true);
      streetView=1;
      map.setSatellite(false);
    }
 else {
      map.setStreetView(false);
      streetView=0;
      map.setSatellite(true);
    }
  map.invalidate();
break;
case R.id.showHappy:
if (checkHappy == 0) {
map.getOverlays().add(happyOverlay);
checkHappy=1;
}
 else {
map.getOverlays().clear();
if (checkSad == 1) {
  map.getOverlays().add(sadOverlay);
}
checkHappy=0;
}
invalidateOverlay();
break;
case R.id.showSad:
if (checkSad == 0) {
map.getOverlays().add(sadOverlay);
checkSad=1;
}
 else {
map.getOverlays().clear();
if (checkHappy == 1) {
map.getOverlays().add(happyOverlay);
}
checkSad=0;
}
invalidateOverlay();
break;
case R.id.map:
Intent j=new Intent(this,MyMap.class);
j.putExtra("String_Node_Str",streetView);
j.putExtra("String_Node_Str",false);
j.putExtra("String_Node_Str",checkHappy);
j.putExtra("String_Node_Str",checkSad);
startActivity(j);
finish();
break;
case R.id.myTrack_button:
startActivity(new Intent(this,History.class));
break;
case R.id.myChart_button:
HappyData datahelper=new HappyData(this);
ArrayList<HappyBottle> plottables=datahelper.getMyHistory();
chartEnable(plottables);
if (enableChart) {
startActivity(new Intent(this,ChartList.class));
}
 else {
Toast toast=Toast.makeText(getApplicationContext(),"String_Node_Str",100);
toast.show();
}
break;
}
map.invalidate();
}
Program: 44713
Project: 44713
Buggy source:
/** 
 * Invoked when a view is clicked
 */
@Override public void onClick(View v){
switch (v.getId()) {
case R.id.switchView:
    if (streetView == 0) {
      map.setStreetView(true);
      streetView=1;
      map.setSatellite(false);
    }
 else {
      map.setStreetView(false);
      streetView=0;
      map.setSatellite(true);
    }
  map.invalidate();
break;
case R.id.showHappy:
if (checkHappy == 0) {
map.getOverlays().add(happyOverlay);
checkHappy=1;
}
 else {
map.getOverlays().clear();
if (checkSad == 1) {
  map.getOverlays().add(sadOverlay);
}
checkHappy=0;
}
invalidateOverlay();
break;
case R.id.showSad:
if (checkSad == 0) {
map.getOverlays().add(sadOverlay);
checkSad=1;
}
 else {
map.getOverlays().clear();
if (checkHappy == 1) {
map.getOverlays().add(happyOverlay);
}
checkSad=0;
}
invalidateOverlay();
break;
case R.id.map:
Intent j=new Intent(this,GlobalMap.class);
j.putExtra("String_Node_Str",streetView);
j.putExtra("String_Node_Str",false);
j.putExtra("String_Node_Str",checkHappy);
j.putExtra("String_Node_Str",checkSad);
startActivity(j);
finish();
break;
case R.id.myTrack_button:
startActivity(new Intent(this,History.class));
break;
case R.id.myChart_button:
startActivity(new Intent(this,ChartList.class));
break;
}
map.invalidate();
}

Fixed version (ground truth):
/** 
 * Invoked when a view is clicked
 */
@Override public void onClick(View v){
switch (v.getId()) {
case R.id.switchView:
    if (streetView == 0) {
      map.setStreetView(true);
      streetView=1;
      map.setSatellite(false);
    }
 else {
      map.setStreetView(false);
      streetView=0;
      map.setSatellite(true);
    }
  map.invalidate();
break;
case R.id.showHappy:
if (checkHappy == 0) {
map.getOverlays().add(happyOverlay);
checkHappy=1;
}
 else {
map.getOverlays().clear();
if (checkSad == 1) {
  map.getOverlays().add(sadOverlay);
}
checkHappy=0;
}
invalidateOverlay();
break;
case R.id.showSad:
if (checkSad == 0) {
map.getOverlays().add(sadOverlay);
checkSad=1;
}
 else {
map.getOverlays().clear();
if (checkHappy == 1) {
map.getOverlays().add(happyOverlay);
}
checkSad=0;
}
invalidateOverlay();
break;
case R.id.map:
Intent j=new Intent(this,GlobalMap.class);
j.putExtra("String_Node_Str",streetView);
j.putExtra("String_Node_Str",false);
j.putExtra("String_Node_Str",checkHappy);
j.putExtra("String_Node_Str",checkSad);
startActivity(j);
finish();
break;
case R.id.myTrack_button:
startActivity(new Intent(this,History.class));
break;
case R.id.myChart_button:
HappyData datahelper=new HappyData(this);
ArrayList<HappyBottle> plottables=datahelper.getMyHistory();
chartEnable(plottables);
if (enableChart) {
startActivity(new Intent(this,ChartList.class));
}
 else {
Toast toast=Toast.makeText(getApplicationContext(),"String_Node_Str",100);
toast.show();
}
break;
}
map.invalidate();
}
Program: 44714
Project: 44714
Buggy source:
/** 
 * Saves the update as a bottle and adds the bottle to the DB
 * @param msg
 */
private void saveUpdate(String msg){
  if (GPS_longitude == 0 && GPS_latitude == 0) {
    GPS_longitude=Network_longitude;
    GPS_latitude=Network_latitude;
  }
  if (GPS_longitude == 0 && GPS_latitude == 0) {
    Location lastKnownGPSLocation=gpsLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
    Location lastKnownNetworkLocation=networkLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
    Location lastBestKnownLocation;
    if (lastKnownGPSLocation.getTime() > lastKnownNetworkLocation.getTime()) {
      lastBestKnownLocation=lastKnownGPSLocation;
    }
 else {
      lastBestKnownLocation=lastKnownNetworkLocation;
    }
    GPS_latitude=(int)(lastBestKnownLocation.getLatitude() * 1E6);
    GPS_longitude=(int)(lastBestKnownLocation.getLongitude() * 1E6);
  }
  HappyBottle b=new HappyBottle(myID,GPS_latitude,GPS_longitude,emotion,msg,System.currentTimeMillis());
  dataHelper=new HappyData(this);
  dataHelper.addBottle(b);
}

Fixed version (ground truth):
/** 
 * Saves the update as a bottle and adds the bottle to the DB
 * @param msg
 */
private void saveUpdate(String msg){
  if (GPS_longitude == 0 && GPS_latitude == 0) {
    GPS_longitude=Network_longitude;
    GPS_latitude=Network_latitude;
  }
  if (GPS_longitude == 0 && GPS_latitude == 0) {
    Location lastKnownGPSLocation=gpsLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
    Location lastKnownNetworkLocation=networkLocationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
    Location lastBestKnownLocation;
    try {
      if (lastKnownGPSLocation.getTime() > lastKnownNetworkLocation.getTime()) {
        lastBestKnownLocation=lastKnownGPSLocation;
      }
 else {
        lastBestKnownLocation=lastKnownNetworkLocation;
      }
      GPS_latitude=(int)(lastBestKnownLocation.getLatitude() * 1E6);
      GPS_longitude=(int)(lastBestKnownLocation.getLongitude() * 1E6);
    }
 catch (    Exception e) {
    }
  }
  HappyBottle b=new HappyBottle(myID,GPS_latitude,GPS_longitude,emotion,msg,System.currentTimeMillis());
  dataHelper=new HappyData(this);
  dataHelper.addBottle(b);
}
Program: 44715
Project: 44715
Buggy source:
public long getSetUID(SharedPreferences sp,Context ctx){
  long tempID=this.getUID();
  if (tempID >= 0) {
    return tempID;
  }
  final AccountManager manager=AccountManager.get(ctx);
  final Account[] accounts=manager.getAccounts();
  if (accounts.length > 1) {
    String username=new String(accounts[0].name);
    long uid=sp.getLong("String_Node_Str",-1);
    UIDtoken.INSTANCE.setUID(uid);
    if (uid < 0) {
      NetHelper NH=new NetHelper();
      long UID=NH.getID(username);
      SharedPreferences.Editor editor=sp.edit();
      editor.putLong("String_Node_Str",UID);
      editor.putString("String_Node_Str",username);
      editor.commit();
      UIDtoken.INSTANCE.setUID(UID);
      return UID;
    }
 else {
      return -1;
    }
  }
  return -5;
}

Fixed version (ground truth):
public long getSetUID(SharedPreferences sp,Context ctx){
  long tempID=this.getUID();
  if (tempID >= 0) {
    return tempID;
  }
  final AccountManager manager=AccountManager.get(ctx);
  final Account[] accounts=manager.getAccounts();
  if (accounts.length >= 1) {
    String username=new String(accounts[0].name);
    long uid=sp.getLong("String_Node_Str",-1);
    UIDtoken.INSTANCE.setUID(uid);
    if (uid < 0) {
      NetHelper NH=new NetHelper();
      long UID=NH.getID(username);
      SharedPreferences.Editor editor=sp.edit();
      editor.putLong("String_Node_Str",UID);
      editor.putString("String_Node_Str",username);
      editor.commit();
      UIDtoken.INSTANCE.setUID(UID);
      return UID;
    }
 else {
      return -1;
    }
  }
  return -5;
}
Program: 44716
Project: 44716
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  View sadButton=findViewById(R.id.sad_button);
  View happyButton=findViewById(R.id.happy_button);
  happyButton.setOnClickListener(this);
  sadButton.setOnClickListener(this);
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  Log.d(TAG,"String_Node_Str");
  Log.v(TAG,"String_Node_Str" + TABLE_NAME + "String_Node_Str"+ _ID+ "String_Node_Str"+ UID+ "String_Node_Str"+ LAT+ "String_Node_Str"+ LONG+ "String_Node_Str"+ EMO+ "String_Node_Str"+ MSG+ "String_Node_Str"+ TIME+ "String_Node_Str");
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  View sadButton=findViewById(R.id.sad_button);
  View happyButton=findViewById(R.id.happy_button);
  happyButton.setOnClickListener(this);
  sadButton.setOnClickListener(this);
}
Program: 44718
Project: 44718
Buggy source:
/** 
 * Removes a player from jail to a location. Throws a JailException that contains a formatted message, meant to be sent to a player.
 * @param name
 * @param location
 * @throws JailException 
 */
public void unjailPlayer(String name,Location loc) throws JailException {
  Player player=this.getServer().getPlayer(name);
  name=player == null || !player.isOnline() ? name.toLowerCase() : player.getName().toLowerCase();
  PlayerUnjailEvent e=new PlayerUnjailEvent(new JailInfo(name,jailed.getString(name + "String_Node_Str")),unjailLoc);
  e.getInfo().addProperties((Map<String,Object>)jailed.get(name + "String_Node_Str"));
  this.getServer().getPluginManager().callEvent(e);
  if (e.isCancelled())   return;
  if (jailed.get(name) == null) {
    throw new JailException("String_Node_Str",JailMessage.NOT_IN_JAIL.message(name));
  }
  if (player == null || !player.isOnline()) {
    jailed.set(name + "String_Node_Str","String_Node_Str");
    return;
  }
  player.teleport(e.getUnjailLocation());
  this.setGroups(name,jailed.getStringList(name + "String_Node_Str"));
  jailed.set(name,null);
  this.saveJail();
  JailMessage.UNJAILED.send(player);
}

Fixed version (ground truth):
/** 
 * Removes a player from jail to a location. Throws a JailException that contains a formatted message, meant to be sent to a player.
 * @param name
 * @param location
 * @throws JailException 
 */
public void unjailPlayer(String name,Location loc) throws JailException {
  Player player=this.getServer().getPlayer(name);
  name=player == null || !player.isOnline() ? name.toLowerCase() : player.getName().toLowerCase();
  PlayerUnjailEvent e=new PlayerUnjailEvent(new JailInfo(name,jailed.getString(name + "String_Node_Str")),unjailLoc);
  if (jailed.getConfigurationSection(name + "String_Node_Str") != null)   e.getInfo().addProperties(jailed.getConfigurationSection(name + "String_Node_Str").getValues(true));
  this.getServer().getPluginManager().callEvent(e);
  if (e.isCancelled())   return;
  if (jailed.get(name) == null) {
    throw new JailException("String_Node_Str",JailMessage.NOT_IN_JAIL.message(name));
  }
  if (player == null || !player.isOnline()) {
    jailed.set(name + "String_Node_Str","String_Node_Str");
    return;
  }
  player.teleport(e.getUnjailLocation());
  this.setGroups(name,jailed.getStringList(name + "String_Node_Str"));
  jailed.set(name,null);
  this.saveJail();
  JailMessage.UNJAILED.send(player);
}
Program: 44719
Project: 44719
Buggy source:
/** 
 * Sets the current jailed status of a player.
 * @param player the player to check for
 * @return 
 */
public void setPlayerStatus(String player,JailStatus status){
  jailed.set(player.toLowerCase() + "String_Node_Str",status);
}

Fixed version (ground truth):
/** 
 * Sets the current jailed status of a player.
 * @param player the player to check for
 * @return 
 */
public void setPlayerStatus(String player,JailStatus status){
  jailed.set(player.toLowerCase() + "String_Node_Str",status.toString());
}
Program: 44720
Project: 44720
Buggy source:
public void loadConfig(){
  YamlConfiguration config=(YamlConfiguration)this.getConfig();
  jailLoc=new Location(this.getServer().getWorld(config.getString("String_Node_Str",this.getServer().getWorlds().get(0).getName())),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0));
  unjailLoc=new Location(this.getServer().getWorld(config.getString("String_Node_Str",this.getServer().getWorlds().get(0).getName())),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0));
  jailGroup=config.getString("String_Node_Str","String_Node_Str");
  File f=new File(this.getDataFolder().getPath() + File.separator + "String_Node_Str");
  try {
    if (!f.exists())     f.createNewFile();
  }
 catch (  IOException ex) {
  }
  jailed=new YamlConfiguration();
  try {
    config.save(this.getConfig().getCurrentPath());
    jailed.load(f);
  }
 catch (  Exception ex) {
  }
}

Fixed version (ground truth):
public void loadConfig(){
  YamlConfiguration config=(YamlConfiguration)this.getConfig();
  config.options().copyDefaults(true);
  config.addDefault("String_Node_Str","String_Node_Str");
  config.addDefault("String_Node_Str",this.getServer().getWorlds().get(0).getName());
  config.addDefault("String_Node_Str",0);
  config.addDefault("String_Node_Str",0);
  config.addDefault("String_Node_Str",0);
  config.addDefault("String_Node_Str",this.getServer().getWorlds().get(0).getName());
  config.addDefault("String_Node_Str",0);
  config.addDefault("String_Node_Str",0);
  config.addDefault("String_Node_Str",0);
  jailed=new YamlConfiguration();
  File f=new File(this.getDataFolder().getPath() + File.separator + "String_Node_Str");
  try {
    if (!f.exists()) {
      f.getParentFile().mkdirs();
      f.createNewFile();
    }
  }
 catch (  IOException ex) {
    ex.printStackTrace();
  }
  try {
    jailed.load(f);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
  jailLoc=new Location(this.getServer().getWorld(config.getString("String_Node_Str",this.getServer().getWorlds().get(0).getName())),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0));
  unjailLoc=new Location(this.getServer().getWorld(config.getString("String_Node_Str",this.getServer().getWorlds().get(0).getName())),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0),config.getInt("String_Node_Str",0));
  jailGroup=config.getString("String_Node_Str","String_Node_Str");
  this.saveConfig();
}
Program: 44721
Project: 44721
Buggy source:
public void setUnjail(CommandSender sender,String[] args){
  if (!(sender instanceof Player) && args.length != 4) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (args.length == 0) {
    Player player=(Player)sender;
    unjailLoc=player.getLocation();
  }
 else {
    if (!(new Scanner(args[0]).hasNextInt()) || !(new Scanner(args[1]).hasNextInt()) || !(new Scanner(args[2]).hasNextInt())) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    unjailLoc=new Location(this.getServer().getWorld(args[3]),Integer.parseInt(args[0]),Integer.parseInt(args[1]),Integer.parseInt(args[2]));
  }
  Configuration config=this.getConfiguration();
  config.setProperty("String_Node_Str",unjailLoc.getX());
  config.setProperty("String_Node_Str",unjailLoc.getY());
  config.setProperty("String_Node_Str",unjailLoc.getZ());
  config.setProperty("String_Node_Str",unjailLoc.getWorld().getName());
  config.save();
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}

Fixed version (ground truth):
public void setUnjail(CommandSender sender,String[] args){
  if (!(sender instanceof Player) && args.length != 4) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (args.length == 0) {
    Player player=(Player)sender;
    unjailLoc=player.getLocation();
  }
 else {
    if (!(new Scanner(args[0]).hasNextInt()) || !(new Scanner(args[1]).hasNextInt()) || !(new Scanner(args[2]).hasNextInt())) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    unjailLoc=new Location(this.getServer().getWorld(args[3]),Integer.parseInt(args[0]),Integer.parseInt(args[1]),Integer.parseInt(args[2]));
  }
  YamlConfiguration config=(YamlConfiguration)this.getConfig();
  config.set("String_Node_Str",unjailLoc.getX());
  config.set("String_Node_Str",unjailLoc.getY());
  config.set("String_Node_Str",unjailLoc.getZ());
  config.set("String_Node_Str",unjailLoc.getWorld().getName());
  this.saveConfig();
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}
Program: 44722
Project: 44722
Buggy source:
public void jailPlayer(CommandSender sender,String[] args){
  Player player=this.getServer().getPlayer(args[0]);
  args[0]=(player == null) ? args[0].toLowerCase() : player.getName().toLowerCase();
  if (jailed.get(args[0]) != null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (player != null)   player.teleport(jailLoc);
  List<String> groupName=this.getGroups(args[0]);
  jailed.set(args[0] + "String_Node_Str",groupName);
  this.setGroup(args[0],jailGroup);
  int minutes=0;
  if (args.length == 2) {
    minutes=this.parseTimeString(args[1]);
    if (minutes != -1) {
      double tempTime=System.currentTimeMillis() + (minutes * 60000);
      jailed.set(args[0] + "String_Node_Str",tempTime);
    }
  }
  try {
    jailed.save(jailed.getCurrentPath());
  }
 catch (  IOException ex) {
  }
  if (player != null) {
    if (args.length == 1 || minutes == -1)     player.sendMessage(ChatColor.AQUA + "String_Node_Str");
 else     player.sendMessage(ChatColor.AQUA + "String_Node_Str" + this.prettifyMinutes(minutes)+ "String_Node_Str");
  }
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}

Fixed version (ground truth):
public void jailPlayer(CommandSender sender,String[] args){
  Player player=this.getServer().getPlayer(args[0]);
  args[0]=(player == null) ? args[0].toLowerCase() : player.getName().toLowerCase();
  if (jailed.get(args[0]) != null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (player != null)   player.teleport(jailLoc);
  List<String> groupName=this.getGroups(args[0]);
  jailed.set(args[0] + "String_Node_Str",groupName);
  this.setGroup(args[0],jailGroup);
  int minutes=0;
  if (args.length == 2) {
    minutes=this.parseTimeString(args[1]);
    if (minutes != -1) {
      double tempTime=System.currentTimeMillis() + (minutes * 60000);
      jailed.set(args[0] + "String_Node_Str",tempTime);
    }
  }
  this.saveJail();
  if (player != null) {
    if (args.length == 1 || minutes == -1)     player.sendMessage(ChatColor.AQUA + "String_Node_Str");
 else     player.sendMessage(ChatColor.AQUA + "String_Node_Str" + this.prettifyMinutes(minutes)+ "String_Node_Str");
  }
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}
Program: 44723
Project: 44723
Buggy source:
public void setJail(CommandSender sender,String[] args){
  if (!(sender instanceof Player) && args.length != 4) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (args.length == 0) {
    Player player=(Player)sender;
    jailLoc=player.getLocation();
  }
 else {
    if (!(new Scanner(args[0]).hasNextInt()) || !(new Scanner(args[1]).hasNextInt()) || !(new Scanner(args[2]).hasNextInt())) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    jailLoc=new Location(this.getServer().getWorld(args[3]),Integer.parseInt(args[0]),Integer.parseInt(args[1]),Integer.parseInt(args[2]));
  }
  Configuration config=this.getConfiguration();
  config.setProperty("String_Node_Str",jailLoc.getX());
  config.setProperty("String_Node_Str",jailLoc.getY());
  config.setProperty("String_Node_Str",jailLoc.getZ());
  config.setProperty("String_Node_Str",jailLoc.getWorld().getName());
  config.save();
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}

Fixed version (ground truth):
public void setJail(CommandSender sender,String[] args){
  if (!(sender instanceof Player) && args.length != 4) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  if (args.length == 0) {
    Player player=(Player)sender;
    jailLoc=player.getLocation();
  }
 else {
    if (!(new Scanner(args[0]).hasNextInt()) || !(new Scanner(args[1]).hasNextInt()) || !(new Scanner(args[2]).hasNextInt())) {
      sender.sendMessage(ChatColor.RED + "String_Node_Str");
      return;
    }
    jailLoc=new Location(this.getServer().getWorld(args[3]),Integer.parseInt(args[0]),Integer.parseInt(args[1]),Integer.parseInt(args[2]));
  }
  YamlConfiguration config=(YamlConfiguration)this.getConfig();
  config.set("String_Node_Str",jailLoc.getX());
  config.set("String_Node_Str",jailLoc.getY());
  config.set("String_Node_Str",jailLoc.getZ());
  config.set("String_Node_Str",jailLoc.getWorld().getName());
  this.saveConfig();
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}
Program: 44724
Project: 44724
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public void onEnable(){
  this.loadConfig();
  if (!useBukkitPermissions)   this.setupPermissions();
  listener=new SimpleJailPlayerListener(this);
  this.getServer().getPluginManager().registerEvent(Event.Type.PLAYER_RESPAWN,listener,Priority.High,this);
  log.info("String_Node_Str" + this.getDescription().getName() + "String_Node_Str"+ this.getDescription().getVersion()+ "String_Node_Str");
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public void onEnable(){
  this.loadConfig();
  if (!useBukkitPermissions)   this.setupPermissions();
 else   bukkitPermissions=(PermissionsPlugin)this.getServer().getPluginManager().getPlugin("String_Node_Str");
  listener=new SimpleJailPlayerListener(this);
  this.getServer().getPluginManager().registerEvent(Event.Type.PLAYER_RESPAWN,listener,Priority.High,this);
  log.info("String_Node_Str" + this.getDescription().getName() + "String_Node_Str"+ this.getDescription().getVersion()+ "String_Node_Str");
}
Program: 44725
Project: 44725
Buggy source:
public void jailPlayer(CommandSender sender,String[] args){
  Player player=this.getServer().getPlayer(args[0]);
  if (player == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + args[0]+ "String_Node_Str");
    return;
  }
  args[0]=player.getName();
  if (!(args[0].equals(args[0].toLowerCase())) && jailed.getProperty(args[0].toLowerCase()) != null) {
    jailed.setProperty(args[0],args[0].toLowerCase());
    jailed.removeProperty(args[0].toLowerCase());
  }
  if (jailed.getProperty(args[0]) != null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  player.teleport(new Location(player.getWorld(),jailCoords[0],jailCoords[1],jailCoords[2]));
  if (useBukkitPermissions || !newPerms) {
    String groupName=permissions.getGroup(this.getServer().getWorlds().get(0).getName(),args[0]);
    jailed.setProperty(args[0],groupName);
    this.setGroup(player,jailGroup);
  }
 else {
    String[] groupName=permissions.getGroups(this.getServer().getWorlds().get(0).getName(),args[0]);
    List groupList=Arrays.asList(groupName);
    if (groupList == null) {
      groupList=new ArrayList();
    }
    jailed.setProperty(args[0],groupList);
    List jailList=new ArrayList();
    jailList.add(jailGroup);
    this.setGroup(player,jailList);
  }
  jailed.save();
  perms.save();
  this.getServer().dispatchCommand(((CraftServer)getServer()).getServer().console,"String_Node_Str");
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}

Fixed version (ground truth):
public void jailPlayer(CommandSender sender,String[] args){
  Player player=this.getServer().getPlayer(args[0]);
  if (player == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + args[0]+ "String_Node_Str");
    return;
  }
  args[0]=player.getName();
  if (!(args[0].equals(args[0].toLowerCase())) && jailed.getProperty(args[0].toLowerCase()) != null) {
    jailed.setProperty(args[0],args[0].toLowerCase());
    jailed.removeProperty(args[0].toLowerCase());
  }
  if (jailed.getProperty(args[0]) != null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  player.teleport(new Location(player.getWorld(),jailCoords[0],jailCoords[1],jailCoords[2]));
  if (useBukkitPermissions || !newPerms) {
    Object groupName;
    if (useBukkitPermissions) {
      groupName=bukkitPermissions.getGroups(player.getName());
    }
 else {
      groupName=permissions.getGroup(this.getServer().getWorlds().get(0).getName(),args[0]);
    }
    jailed.setProperty(args[0],groupName);
    this.setGroup(player,jailGroup);
  }
 else {
    String[] groupName=permissions.getGroups(this.getServer().getWorlds().get(0).getName(),args[0]);
    List groupList=Arrays.asList(groupName);
    if (groupList == null) {
      groupList=new ArrayList();
    }
    jailed.setProperty(args[0],groupList);
    List jailList=new ArrayList();
    jailList.add(jailGroup);
    this.setGroup(player,jailList);
  }
  jailed.save();
  perms.save();
  this.getServer().dispatchCommand(((CraftServer)getServer()).getServer().console,"String_Node_Str");
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}
Program: 44726
Project: 44726
Buggy source:
public void jailPlayer(CommandSender sender,String[] args){
  args[0]=args[0].toLowerCase();
  Player player=this.getServer().getPlayer(args[0]);
  if (player == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + args[0]+ "String_Node_Str");
    return;
  }
  if (jailed.getProperty(args[0]) != null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  player.teleport(new Location(player.getWorld(),jailCoords[0],jailCoords[1],jailCoords[2]));
  if (!newPerms) {
    jailed.setProperty(args[0],perms.getString("String_Node_Str" + args[0] + "String_Node_Str"));
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",jailGroup);
  }
 else {
    List groupList=perms.getList("String_Node_Str" + args[0] + "String_Node_Str");
    if (groupList == null)     groupList=new ArrayList();
    jailed.setProperty(args[0],groupList);
    List jailList=new ArrayList();
    jailList.add(jailGroup);
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",jailList);
  }
  jailed.save();
  perms.save();
  this.getServer().dispatchCommand(((CraftServer)getServer()).getServer().console,"String_Node_Str");
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}

Fixed version (ground truth):
public void jailPlayer(CommandSender sender,String[] args){
  args[0]=args[0].toLowerCase();
  Player player=this.getServer().getPlayer(args[0]);
  if (player == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + args[0]+ "String_Node_Str");
    return;
  }
  if (jailed.getProperty(args[0]) != null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  player.teleport(new Location(player.getWorld(),jailCoords[0],jailCoords[1],jailCoords[2]));
  if (!newPerms) {
    String groupName=permissions.getGroup(this.getServer().getWorlds().get(0).getName(),args[0]);
    jailed.setProperty(args[0],groupName);
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",jailGroup);
  }
 else {
    String[] groupName=permissions.getGroups(this.getServer().getWorlds().get(0).getName(),args[0]);
    List groupList=Arrays.asList(groupName);
    if (groupList == null)     groupList=new ArrayList();
    jailed.setProperty(args[0],groupList);
    List jailList=new ArrayList();
    jailList.add(jailGroup);
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",jailList);
  }
  jailed.save();
  perms.save();
  this.getServer().dispatchCommand(((CraftServer)getServer()).getServer().console,"String_Node_Str");
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}
Program: 44727
Project: 44727
Buggy source:
public void unjailPlayer(CommandSender sender,String[] args){
  args[0]=args[0].toLowerCase();
  Player player=this.getServer().getPlayer(args[0]);
  if (player == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + args[0]+ "String_Node_Str");
    return;
  }
  if (jailed.getProperty(args[0]) == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  player.teleport(new Location(player.getWorld(),unjailCoords[0],unjailCoords[1],unjailCoords[2]));
  if (!newPerms) {
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",jailed.getString(args[0]));
    jailed.removeProperty(args[0]);
  }
 else {
    if (jailed.getProperty(args[0]) instanceof String)     this.convertPermission(args[0]);
    List groupList=jailed.getList(args[0]);
    if (groupList == null)     groupList=new ArrayList();
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",groupList);
    jailed.removeProperty(args[0]);
  }
  jailed.save();
  perms.save();
  this.getServer().dispatchCommand(((CraftServer)getServer()).getServer().console,"String_Node_Str");
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}

Fixed version (ground truth):
public void unjailPlayer(CommandSender sender,String[] args){
  Player player=this.getServer().getPlayer(args[0]);
  if (player == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str" + args[0]+ "String_Node_Str");
    return;
  }
  args[0]=player.getName();
  if (!(args[0].equals(args[0].toLowerCase())) && jailed.getProperty(args[0].toLowerCase()) != null) {
    jailed.setProperty(args[0],args[0].toLowerCase());
    jailed.removeProperty(args[0].toLowerCase());
  }
  if (jailed.getProperty(args[0]) == null) {
    sender.sendMessage(ChatColor.RED + "String_Node_Str");
    return;
  }
  player.teleport(new Location(player.getWorld(),unjailCoords[0],unjailCoords[1],unjailCoords[2]));
  if (!newPerms) {
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",jailed.getString(args[0]));
    jailed.removeProperty(args[0]);
  }
 else {
    if (jailed.getProperty(args[0]) instanceof String)     this.convertPermission(args[0]);
    List groupList=jailed.getList(args[0]);
    if (groupList == null)     groupList=new ArrayList();
    perms.setProperty("String_Node_Str" + args[0] + "String_Node_Str",groupList);
    jailed.removeProperty(args[0]);
  }
  jailed.save();
  perms.save();
  this.getServer().dispatchCommand(((CraftServer)getServer()).getServer().console,"String_Node_Str");
  sender.sendMessage(ChatColor.AQUA + "String_Node_Str");
}