Program: 160941
Project: 160941
Buggy source:
/** 
 * Gets the list of contacts of the user. this may not be available for all providers.
 * @return List of contact objects representing Contacts. Only name will beavailable
 */
@Override public List<Contact> getContactList() throws Exception {
  if (!isVerify || accessToken == null) {
    throw new SocialAuthException("String_Node_Str");
  }
  List<Contact> plist=new ArrayList<Contact>();
  String contactURL=String.format(CONTACTS_URL,accessToken);
  LOG.info("String_Node_Str" + contactURL);
  String respStr;
  try {
    Response response=HttpUtil.doHttpRequest(contactURL,MethodType.GET.toString(),null,null);
    respStr=response.getResponseBodyAsString(Constants.ENCODING);
  }
 catch (  Exception e) {
    throw new SocialAuthException("String_Node_Str" + contactURL,e);
  }
  try {
    LOG.debug("String_Node_Str" + respStr);
    JSONArray resp=new JSONArray(respStr);
    for (int i=0; i < resp.length(); i++) {
      JSONObject obj=resp.getJSONObject(i);
      Contact p=new Contact();
      String name=obj.getString("String_Node_Str");
      p.setDisplayName(name);
      JSONObject userContactDetails=obj.getJSONObject("String_Node_Str");
      JSONArray emailArr=userContactDetails.getJSONArray("String_Node_Str");
      JSONObject eobj=emailArr.getJSONObject(0);
      if (eobj.has("String_Node_Str")) {
        p.setEmail(eobj.getString("String_Node_Str"));
      }
      p.setId(obj.getString("String_Node_Str"));
      p.setProfileUrl(obj.getString("String_Node_Str"));
      plist.add(p);
    }
  }
 catch (  Exception e) {
    throw new ServerDataException("String_Node_Str" + respStr,e);
  }
  return plist;
}

Fixed version (ground truth):
/** 
 * Gets the list of contacts of the user. this may not be available for all providers.
 * @return List of contact objects representing Contacts. Only name will beavailable
 */
@Override public List<Contact> getContactList() throws Exception {
  if (!isVerify || accessToken == null) {
    throw new SocialAuthException("String_Node_Str");
  }
  List<Contact> plist=new ArrayList<Contact>();
  String contactURL=String.format(CONTACTS_URL,accessToken);
  Map<String,String> headerParam=new HashMap<String,String>();
  headerParam.put("String_Node_Str","String_Node_Str" + accessToken);
  LOG.info("String_Node_Str" + contactURL);
  String respStr;
  try {
    Response response=HttpUtil.doHttpRequest(contactURL,MethodType.GET.toString(),null,headerParam);
    respStr=response.getResponseBodyAsString(Constants.ENCODING);
  }
 catch (  Exception e) {
    throw new SocialAuthException("String_Node_Str" + contactURL,e);
  }
  try {
    LOG.debug("String_Node_Str" + respStr);
    JSONArray resp=new JSONArray(respStr);
    for (int i=0; i < resp.length(); i++) {
      JSONObject obj=resp.getJSONObject(i);
      Contact p=new Contact();
      String name=obj.getString("String_Node_Str");
      p.setDisplayName(name);
      JSONObject userContactDetails=obj.getJSONObject("String_Node_Str");
      JSONArray emailArr=userContactDetails.getJSONArray("String_Node_Str");
      JSONObject eobj=emailArr.getJSONObject(0);
      if (eobj.has("String_Node_Str")) {
        p.setEmail(eobj.getString("String_Node_Str"));
      }
      p.setId(obj.getString("String_Node_Str"));
      p.setProfileUrl(obj.getString("String_Node_Str"));
      plist.add(p);
    }
  }
 catch (  Exception e) {
    throw new ServerDataException("String_Node_Str" + respStr,e);
  }
  return plist;
}