| Chunk |
|---|
| Conflicting content |
|---|
JSONArray commitsJSON = new JSONObject(gh.Commits.list(m_repo_owner, m_repo_name, m_branches.get(m_position), m_username, m_token).resp).getJSONArray("commits");
Log.d("debug1",commitsJSON.toString());
m_commitListAdapter = new CommitListAdapter(CommitsList.this, commitsJSON);
<<<<<<< HEAD
m_commitData = commitsJSON;
} catch (MalformedURLException e) {
e.printStackTrace();
=======
>>>>>>> 9cd669c340d32984398ff396aa331d098ff8628f
} catch (JSONException e) {
e.printStackTrace();
} |
| Solution content |
|---|
JSONArray commitsJSON = new JSONObject(gh.Commits.list(m_repo_owner, m_repo_name, m_branches.get(m_position), m_username, m_token).resp).getJSONArray("commits");
Log.d("debug1",commitsJSON.toString());
m_commitListAdapter = new CommitListAdapter(CommitsList.this, commitsJSON);
} catch (JSONException e) {
e.printStackTrace();
} |
| File |
|---|
| CommitsList.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Catch clause |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
=======
public void initializeList() {
try {
<<<<<<< HEAD
if (m_type.equals(REPO_TYPE)) {
URL query = new URL(
"http://github.com/api/v2/json/repos/search/"
+ URLEncoder
.encode(((EditText) findViewById(R.id.et_search_search_box))
.getText().toString()));
JSONObject response = Hubroid.make_api_request(query);
String query = ((EditText) findViewById(R.id.et_search_search_box)).getText().toString();
if (m_type.equals(REPO_TYPE)) {
JSONObject response = new JSONObject(gh.Repository.search(query, m_username, m_token).resp);
>>>>>>> 9cd669c340d32984398ff396aa331d098ff8628f
if (response == null) {
runOnUiThread(new Runnable() { |
| Solution content |
|---|
public void initializeList() {
try {
String query = ((EditText) findViewById(R.id.et_search_search_box)).getText().toString();
if (m_type.equals(REPO_TYPE)) {
JSONObject response = new JSONObject(gh.Repository.search(query, m_username, m_token).resp);
if (response == null) {
runOnUiThread(new Runnable() { |
| File |
|---|
| Search.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
});
} else {
m_repositoriesData = response.getJSONArray(REPO_TYPE);
<<<<<<< HEAD
m_repositories_adapter = new RepositoriesListAdapter(
getApplicationContext(), m_repositoriesData);
}
} else if (m_type.equals(USER_TYPE)) {
URL query = new URL(
"http://github.com/api/v2/json/user/search/"
+ URLEncoder
.encode(((EditText) findViewById(R.id.et_search_search_box))
.getText().toString()));
JSONObject response = Hubroid.make_api_request(query);
=======
m_repositories_adapter = new RepositoriesListAdapter(getApplicationContext(), m_repositoriesData);
}
} else if (m_type.equals(USER_TYPE)) {
JSONObject response = new JSONObject(gh.User.search(query).resp);
>>>>>>> 9cd669c340d32984398ff396aa331d098ff8628f
if (response == null) {
runOnUiThread(new Runnable() { |
| Solution content |
|---|
});
} else {
m_repositoriesData = response.getJSONArray(REPO_TYPE);
m_repositories_adapter = new RepositoriesListAdapter(getApplicationContext(), m_repositoriesData);
}
} else if (m_type.equals(USER_TYPE)) {
JSONObject response = new JSONObject(gh.User.search(query).resp);
if (response == null) {
runOnUiThread(new Runnable() { |
| File |
|---|
| Search.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| If statement |
| Method invocation |
| Variable |
| Chunk |
|---|
| Conflicting content |
|---|
});
} else {
m_usersData = response.getJSONArray(USER_TYPE);
<<<<<<< HEAD
m_users_adapter = new SearchUsersListAdapter(
getApplicationContext(), m_usersData);
=======
m_users_adapter = new SearchUsersListAdapter(getApplicationContext(), m_usersData);
>>>>>>> 9cd669c340d32984398ff396aa331d098ff8628f
}
}
} catch (JSONException e) { |
| Solution content |
|---|
});
} else {
m_usersData = response.getJSONArray(USER_TYPE);
m_users_adapter = new SearchUsersListAdapter(getApplicationContext(), m_usersData);
}
}
} catch (JSONException e) { |
| File |
|---|
| Search.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
EditText search_box = (EditText) findViewById(R.id.et_search_search_box);
if (!search_box.getText().toString().equals("")) {
if (m_type.equals(REPO_TYPE)) {
<<<<<<< HEAD
m_progressDialog = ProgressDialog
.show(Search.this, "Please wait...",
"Searching Repositories...", true);
=======
m_progressDialog = ProgressDialog.show(Search.this, "Please wait...", "Searching Repositories...", true);
>>>>>>> 9cd669c340d32984398ff396aa331d098ff8628f
Thread thread = new Thread(new Runnable() {
public void run() {
initializeList(); |
| Solution content |
|---|
EditText search_box = (EditText) findViewById(R.id.et_search_search_box);
if (!search_box.getText().toString().equals("")) {
if (m_type.equals(REPO_TYPE)) {
m_progressDialog = ProgressDialog.show(Search.this, "Please wait...", "Searching Repositories...", true);
Thread thread = new Thread(new Runnable() {
public void run() {
initializeList(); |
| File |
|---|
| Search.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
});
thread.start();
} else if (m_type.equals(USER_TYPE)) {
<<<<<<< HEAD
m_progressDialog = ProgressDialog.show(Search.this,
"Please wait...", "Searching Users...", true);
=======
m_progressDialog = ProgressDialog.show(Search.this, "Please wait...", "Searching Users...", true);
>>>>>>> 9cd669c340d32984398ff396aa331d098ff8628f
Thread thread = new Thread(new Runnable() {
public void run() {
initializeList(); |
| Solution content |
|---|
});
thread.start();
} else if (m_type.equals(USER_TYPE)) {
m_progressDialog = ProgressDialog.show(Search.this, "Please wait...", "Searching Users...", true);
Thread thread = new Thread(new Runnable() {
public void run() {
initializeList(); |
| File |
|---|
| Search.java |
| Developer's decision |
|---|
| Version 1 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |
| Chunk |
|---|
| Conflicting content |
|---|
m_prefs = getSharedPreferences(Hubroid.PREFS_NAME, 0);
m_editor = m_prefs.edit();
m_type = REPO_TYPE;
<<<<<<< HEAD
=======
m_token = m_prefs.getString("token", "");
>>>>>>> 9cd669c340d32984398ff396aa331d098ff8628f
Bundle extras = getIntent().getExtras();
if (extras != null) { |
| Solution content |
|---|
m_prefs = getSharedPreferences(Hubroid.PREFS_NAME, 0);
m_editor = m_prefs.edit();
m_type = REPO_TYPE;
m_token = m_prefs.getString("token", "");
Bundle extras = getIntent().getExtras();
if (extras != null) { |
| File |
|---|
| Search.java |
| Developer's decision |
|---|
| Version 2 |
| Kind of conflict |
|---|
| Attribute |
| Method invocation |