[Demonstration 1]

[Buggy Method]
@Override
protected void onStart() {
    super.onStart();
    activity.onStart();
}

[Buggy Hunk]
activity.onStart();

[Patch]
ServiceActivityHolder.activity.onStart();

[Demonstration 2]

[Buggy Method]
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    userId = intent.getStringExtra(MainActivity.KEY_USERID);
    LocationManager mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
    Log.d("put location", "started");
    //        Log.d("last known", mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).toString());
    //        currentLocation = new linkup.geese.io.linkup.data.Location(mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLongitude(), mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(), mLocationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getTime());
    if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
        // TODO: Consider calling
        //    ActivityCompat#requestPermissions
        // here to request the missing permissions, and then overriding
        //   public void onRequestPermissionsResult(int requestCode, String[] permissions,
        //                                          int[] grantResults)
        // to handle the case where the user grants the permission. See the documentation
        // for ActivityCompat#requestPermissions for more details.
        return Service.START_NOT_STICKY;
    }
    mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocationListener);
    GPSTracker gps = new GPSTracker(this);
    currentLocation = new linkup.geese.io.linkup.data.Location(gps.getLongitude(), gps.getLatitude(), Calendar.getInstance().getTimeInMillis());
    Cache cache = Cache.getInstance(this);
    cache.setLocation(userId, currentLocation);
    return Service.START_NOT_STICKY;
}

[Buggy Hunk]
currentLocation = new linkup.geese.io.linkup.data.Location(gps.getLongitude(), gps.getLatitude(), Calendar.getInstance().getTimeInMillis());

[Patch]
currentLocation = new linkup.geese.io.linkup.data.Location(43.4727525, -80.5401467, Calendar.getInstance().getTimeInMillis());

[Demonstration 3]

[Buggy Method]
@Override
public void onStart() {
    super.onStart();
    mPresenter.onStart();
}

[Buggy Hunk]
public void onStart() {

[Patch]
public synchronized void onStart() {