| Chunk |
|---|
| Conflicting content |
|---|
*
*/
public class AccountSelector {
<<<<<<< HEAD
=======
private static final String ACCOUNT_TYPE = "com.google";
private static final String ACCOUNT_NAME = "@google.com";
>>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a
private Context context;
private Checkin checkin;
private String authToken = null; |
| Solution content |
|---|
*
*/
public class AccountSelector {
private static final String ACCOUNT_TYPE = "com.google";
private static final String ACCOUNT_NAME = "@google.com";
private Context context;
private Checkin checkin;
private String authToken = null; |
| File |
|---|
| AccountSelector.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
AccountManager accountManager = AccountManager.get(
context.getApplicationContext());
<<<<<<< HEAD
Account[] accounts = accountManager.getAccountsByType("com.google");
=======
if (this.authToken != null) {
// There will be no effect on the token if it is still valid
accountManager.invalidateAuthToken(ACCOUNT_TYPE, this.authToken);
}
Account[] accounts = accountManager.getAccountsByType(ACCOUNT_TYPE);
>>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a
Log.i(SpeedometerApp.TAG, "Got " + accounts.length + " accounts");
if (accounts != null && accounts.length > 0) { |
| Solution content |
|---|
AccountManager accountManager = AccountManager.get(
context.getApplicationContext());
if (this.authToken != null) {
// There will be no effect on the token if it is still valid
accountManager.invalidateAuthToken(ACCOUNT_TYPE, this.authToken);
}
Account[] accounts = accountManager.getAccountsByType(ACCOUNT_TYPE);
Log.i(SpeedometerApp.TAG, "Got " + accounts.length + " accounts");
if (accounts != null && accounts.length > 0) { |
| File |
|---|
| AccountSelector.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
// User input required. (A UI will pop up for user's consent to allow
// this app access account information.)
Log.i(SpeedometerApp.TAG, "Starting account manager activity");
<<<<<<< HEAD
=======
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
>>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a
context.startActivity(intent);
} else {
Log.i(SpeedometerApp.TAG, "Executing getCookie task"); |
| Solution content |
|---|
// User input required. (A UI will pop up for user's consent to allow
// this app access account information.)
Log.i(SpeedometerApp.TAG, "Starting account manager activity");
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
} else {
Log.i(SpeedometerApp.TAG, "Executing getCookie task"); |
| File |
|---|
| AccountSelector.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
PhoneUtils.setGlobalContext(getApplicationContext());
// We only need one instance of scheduler thread
<<<<<<< HEAD
Intent schedulerIntent = new Intent(this, MeasurementScheduler.class);
this.startService(schedulerIntent);
}
@Override
protected void onStart() {
super.onStart();
// Bind to LocalService
Intent intent = new Intent(this, MeasurementScheduler.class);
bindService(intent, serviceConn, Context.BIND_AUTO_CREATE);
=======
if (this.scheduler != null) {
new Thread(this.scheduler).start();
this.scheduler.resume();
this.scheduler.setIsCheckinEnabled(true);
} else {
// Should never happen
Log.wtf(TAG, "Scheduler thread cannot be started");
}
>>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a
}
@Override |
| Solution content |
|---|
// We only need one instance of scheduler thread
Intent schedulerIntent = new Intent(this, MeasurementScheduler.class);
this.startService(schedulerIntent);
}
@Override
protected void onStart() {
super.onStart();
// Bind to LocalService
Intent intent = new Intent(this, MeasurementScheduler.class);
bindService(intent, serviceConn, Context.BIND_AUTO_CREATE);
}
@Override |
| File |
|---|
| SpeedometerApp.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Annotation |
| Comment |
| If statement |
| Method invocation |
| Method signature |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
======= import com.google.wireless.speed.speedometer.MeasurementError; import com.google.wireless.speed.speedometer.MeasurementResult; import com.google.wireless.speed.speedometer.MeasurementTask; <<<<<<< HEAD import android.content.Context; import com.google.wireless.speed.speedometer.SpeedometerApp; import com.google.wireless.speed.speedometer.util.MeasurementJsonConvertor; import com.google.wireless.speed.speedometer.util.RuntimeUtil; import android.util.Log; >>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a import java.io.InvalidClassException; import java.net.InetAddress; |
| Solution content |
|---|
import com.google.wireless.speed.speedometer.MeasurementError; import com.google.wireless.speed.speedometer.MeasurementResult; import com.google.wireless.speed.speedometer.MeasurementTask; import com.google.wireless.speed.speedometer.SpeedometerApp; import com.google.wireless.speed.speedometer.util.MeasurementJsonConvertor; import com.google.wireless.speed.speedometer.util.RuntimeUtil; import android.content.Context; import android.util.Log; import java.io.InvalidClassException; import java.net.InetAddress; |
| File |
|---|
| DnsLookupTask.java |
| Developer's decision |
|---|
| Combination |
| Kind of conflict |
|---|
| Import |
| Chunk |
|---|
| Conflicting content |
|---|
protected Instrumentation inst;
// The system console for the test case to print debugging message to the phone screen
protected TextView systemConsole;
<<<<<<< HEAD
protected MeasurementScheduler scheduler;
=======
protected MeasurementScheduler scherduler;
>>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a
@SuppressWarnings("unchecked")
public TestMeasurementTaskBase() { |
| Solution content |
|---|
protected Instrumentation inst;
// The system console for the test case to print debugging message to the phone screen
protected TextView systemConsole;
protected MeasurementScheduler scheduler;
@SuppressWarnings("unchecked")
public TestMeasurementTaskBase() { |
| File |
|---|
| TestMeasurementTaskBase.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Chunk |
|---|
| Conflicting content |
|---|
public void setUp() throws Exception {
super.setUp();
this.activity = getActivity();
<<<<<<< HEAD
this.inst = getInstrumentation();
this.scheduler = this.activity.getScheduler();
=======
this.scherduler = MeasurementScheduler.getInstance(this.activity);
this.scherduler.setIsCheckinEnabled(false);
this.scherduler.pause();
>>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a
this.systemConsole = (TextView)
activity.findViewById(com.google.wireless.speed.speedometer.R.viewId.systemConsole);
} |
| Solution content |
|---|
public void setUp() throws Exception {
super.setUp();
this.activity = getActivity();
this.inst = getInstrumentation();
this.scheduler = this.activity.getScheduler();
this.systemConsole = (TextView)
activity.findViewById(com.google.wireless.speed.speedometer.R.viewId.systemConsole);
} |
| File |
|---|
| TestMeasurementTaskBase.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
// submitTask will notify the waiting scheduler thread upon success
this.scheduler.submitTask(task);
<<<<<<< HEAD
=======
this.scheduler.resume();
>>>>>>> 9cc8092e02d2559d76db715b24d43b914d123a4a
/* TODO(Wenjie): Before we figure out how to verify the output of a traceroute
* measurement is correct, we simply use this test case as a driver to submit |
| Solution content |
|---|
// submitTask will notify the waiting scheduler thread upon success
this.scheduler.submitTask(task);
this.scheduler.resume();
/* TODO(Wenjie): Before we figure out how to verify the output of a traceroute
* measurement is correct, we simply use this test case as a driver to submit |
| File |
|---|
| TestTracerouteTask.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Method invocation |