Program: 168381
Project: 168381
Buggy source:
public void login(final String username,final String password,final String serverURL){
  RequestQueue queue=Volley.newRequestQueue(mContext);
  encodeAuthorizationToken(username,password);
  String loginURL=serverURL + API.REST_ENDPOINT + API.AUTHORISATION_END_POINT;
  logger.i("String_Node_Str" + loginURL);
  JsonObjectRequestWrapper jsObjRequest=new JsonObjectRequestWrapper(Request.Method.GET,loginURL,null,new Response.Listener<JSONObject>(){
    @Override public void onResponse(    JSONObject response){
      logger.d(response.toString());
      try {
        String sessionToken=response.getString(SESSION_ID_KEY);
        Boolean isAuthenticated=Boolean.parseBoolean(response.getString(AUTHENTICATION_KEY));
        if (isAuthenticated) {
          if (!mOpenMRS.getUsername().equals(username) || !mOpenMRS.getServerUrl().equals(serverURL)) {
            mOpenMRS.deleteDatabase(OpenMRSSQLiteOpenHelper.DATABASE_NAME);
            OpenMRS.clearODKDirs();
          }
          mOpenMRS.setServerUrl(serverURL);
          mOpenMRS.setSessionToken(sessionToken);
          mOpenMRS.setUsername(username);
          (new VisitsManager(mContext)).getVisitType();
          new UserManager(mContext).getUserInformation(username);
          new FormsManger(mContext).getAvailableFormsList();
          ((LoginActivity)mContext).saveLocationsToDatabase();
          ((LoginActivity)mContext).finish();
        }
 else {
          mContext.sendBroadcast(new Intent(ApplicationConstants.CustomIntentActions.ACTION_AUTH_FAILED_BROADCAST));
        }
      }
 catch (      JSONException e) {
        logger.d(e.toString());
      }
    }
  }
,new GeneralErrorListenerImpl(mContext)){
    @Override public Map<String,String> getHeaders() throws AuthFailureError {
      HashMap<String,String> params=new HashMap<String,String>();
      params.put(ApplicationConstants.AUTHORIZATION_PARAM,mOpenMRS.getAuthorizationToken());
      return params;
    }
  }
;
  queue.add(jsObjRequest);
}

Fixed version (ground truth):
public void login(final String username,final String password,final String serverURL){
  RequestQueue queue=Volley.newRequestQueue(mContext);
  encodeAuthorizationToken(username,password);
  String loginURL=serverURL + API.REST_ENDPOINT + API.AUTHORISATION_END_POINT;
  logger.i("String_Node_Str" + loginURL);
  JsonObjectRequestWrapper jsObjRequest=new JsonObjectRequestWrapper(Request.Method.GET,loginURL,null,new Response.Listener<JSONObject>(){
    @Override public void onResponse(    JSONObject response){
      logger.d(response.toString());
      try {
        String sessionToken=response.getString(SESSION_ID_KEY);
        Boolean isAuthenticated=Boolean.parseBoolean(response.getString(AUTHENTICATION_KEY));
        if (isAuthenticated) {
          if (isDBCleaningRequired(username,serverURL)) {
            mOpenMRS.deleteDatabase(OpenMRSSQLiteOpenHelper.DATABASE_NAME);
            OpenMRS.clearODKDirs();
          }
          mOpenMRS.setServerUrl(serverURL);
          mOpenMRS.setSessionToken(sessionToken);
          mOpenMRS.setUsername(username);
          (new VisitsManager(mContext)).getVisitType();
          new UserManager(mContext).getUserInformation(username);
          new FormsManger(mContext).getAvailableFormsList();
          ((LoginActivity)mContext).saveLocationsToDatabase();
          ((LoginActivity)mContext).finish();
        }
 else {
          mContext.sendBroadcast(new Intent(ApplicationConstants.CustomIntentActions.ACTION_AUTH_FAILED_BROADCAST));
        }
      }
 catch (      JSONException e) {
        logger.d(e.toString());
      }
    }
  }
,new GeneralErrorListenerImpl(mContext)){
    @Override public Map<String,String> getHeaders() throws AuthFailureError {
      HashMap<String,String> params=new HashMap<String,String>();
      params.put(ApplicationConstants.AUTHORIZATION_PARAM,mOpenMRS.getAuthorizationToken());
      return params;
    }
  }
;
  queue.add(jsObjRequest);
}