Program: 3044
Project: 3044
Buggy source:
public static Experiences getAllSharedExperiencesFromServer(User user){
  try {
    Log.i("String_Node_Str","String_Node_Str");
    GsonBuilder gsonB=new GsonBuilder();
    gsonB.registerTypeAdapter(EventItem.class,new EventItemDeserializer());
    gsonB.serializeNulls();
    Gson gson=gsonB.create();
    Reader r=new InputStreamReader(getJSONData("String_Node_Str" + user.getUserName() + "String_Node_Str"));
    Experiences experiences=gson.fromJson(r,Experiences.class);
    List<BaseEvent> baseEvents=new ArrayList<BaseEvent>();
    for (    Experience experience : experiences.getExperiences()) {
      for (      BaseEvent be : experience.getEvents()) {
        Location location=new Location("String_Node_Str");
        location.setLatitude(be.getLatitude());
        location.setLongitude(be.getLongitude());
        if (be.getClassName().equals(Event.class.getSimpleName())) {
          BaseEvent bEvent=new BaseEvent(be.getId(),be.getExperienceid(),new Date(be.getDatetimemillis()),location,be.getUser());
          bEvent.setEmotionList(be.getEmotionList());
          bEvent.setEventItems(be.getEventItems());
          bEvent.setShared(be.isShared());
          baseEvents.add(bEvent);
        }
 else         if (be.getClassName().equals(MoodEvent.class.getSimpleName())) {
          MoodEvent me=new MoodEvent(be.getId(),be.getExperienceid(),new Date(be.getDatetimemillis()),location,MoodEnum.getType(be.getMoodInt()),be.getUser());
          me.setShared(true);
          me.setAverage(be.isAverage());
          baseEvents.add(me);
        }
      }
      experience.setEvents(baseEvents);
    }
    Log.i("String_Node_Str","String_Node_Str" + experiences.getExperiences().size() + "String_Node_Str");
    return experiences;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
public static Experiences getAllSharedExperiencesFromServer(User user){
  try {
    Log.i("String_Node_Str","String_Node_Str");
    GsonBuilder gsonB=new GsonBuilder();
    gsonB.registerTypeAdapter(EventItem.class,new EventItemDeserializer());
    gsonB.serializeNulls();
    Gson gson=gsonB.create();
    Reader r=new InputStreamReader(getJSONData("String_Node_Str" + user.getUserName() + "String_Node_Str"));
    Experiences experiences=gson.fromJson(r,Experiences.class);
    for (    Experience experience : experiences.getExperiences()) {
      List<BaseEvent> baseEvents=new ArrayList<BaseEvent>();
      if (experience.getEvents() != null) {
        for (        BaseEvent be : experience.getEvents()) {
          Location location=new Location("String_Node_Str");
          location.setLatitude(be.getLatitude());
          location.setLongitude(be.getLongitude());
          if (be.getClassName().equals(Event.class.getSimpleName())) {
            Event event=new Event(be.getId(),be.getExperienceid(),new Date(be.getDatetimemillis()),location,be.getUser());
            event.setEmotionList(be.getEmotionList());
            event.setEventItems(be.getEventItems());
            event.setShared(be.isShared());
            baseEvents.add(event);
          }
 else           if (be.getClassName().equals(MoodEvent.class.getSimpleName())) {
            MoodEvent me=new MoodEvent(be.getId(),be.getExperienceid(),new Date(be.getDatetimemillis()),location,MoodEnum.getType(be.getMoodInt()),be.getUser());
            me.setShared(true);
            me.setAverage(be.isAverage());
            baseEvents.add(me);
          }
        }
      }
      experience.setEvents(baseEvents);
    }
    Log.i("String_Node_Str","String_Node_Str" + experiences.getExperiences().size() + "String_Node_Str");
    return experiences;
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}