Program: 17508
Project: 17508
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setTitle(R.string.uv_feedback_forum);
  suggestions=new ArrayList<Suggestion>();
  getListView().setDivider(null);
  setListAdapter(new PaginatedAdapter<Suggestion>(this,R.layout.suggestion_item,suggestions){
    @Override public int getViewTypeCount(){
      return super.getViewTypeCount() + 2;
    }
    @Override public boolean isEnabled(    int position){
      return getItemViewType(position) == 2 || super.isEnabled(position);
    }
    @Override public int getCount(){
      return super.getCount() + 2;
    }
    @Override public int getItemViewType(    int position){
      if (position == 0)       return 2;
      if (position == 1)       return 3;
      return super.getItemViewType(position - 2);
    }
    @Override public Object getItem(    int position){
      return super.getItem(position - 2);
    }
    @Override public View getView(    int position,    View convertView,    ViewGroup parent){
      int type=getItemViewType(position);
      if (type == 2 || type == 3) {
        View view=convertView;
        if (view == null) {
          if (type == 2) {
            view=getLayoutInflater().inflate(R.layout.text_item,null);
            TextView text=(TextView)view.findViewById(R.id.text);
            text.setText(R.string.uv_post_an_idea);
            view.findViewById(R.id.divider).setVisibility(View.GONE);
            view.findViewById(R.id.text2).setVisibility(View.GONE);
          }
 else           if (type == 3) {
            view=getLayoutInflater().inflate(R.layout.header_item_light,null);
            TextView text=(TextView)view.findViewById(R.id.header_text);
            text.setText(R.string.uv_idea_text_heading);
          }
        }
        return view;
      }
 else {
        return super.getView(position,convertView,parent);
      }
    }
    @Override protected void customizeLayout(    View view,    Suggestion model){
      TextView textView=(TextView)view.findViewById(R.id.suggestion_title);
      textView.setText(model.getTitle());
      textView=(TextView)view.findViewById(R.id.subscriber_count);
      textView.setText(String.valueOf(model.getNumberOfSubscribers()));
      textView=(TextView)view.findViewById(R.id.suggestion_status);
      View colorView=view.findViewById(R.id.suggestion_status_color);
      if (model.getStatus() == null) {
        textView.setVisibility(View.GONE);
        colorView.setVisibility(View.GONE);
      }
 else {
        int color=Color.parseColor(model.getStatusColor());
        textView.setVisibility(View.VISIBLE);
        textView.setTextColor(color);
        textView.setText(model.getStatus().toUpperCase(Locale.getDefault()));
        colorView.setVisibility(View.VISIBLE);
        colorView.setBackgroundColor(color);
      }
    }
    @Override public void loadPage(    int page,    Callback<List<Suggestion>> callback){
      Suggestion.loadSuggestions(forum,page,callback);
    }
    @Override public RestTask search(    final String query,    final Callback<List<Suggestion>> callback){
      return Suggestion.searchSuggestions(forum,query,new Callback<List<Suggestion>>(){
        @Override public void onModel(        List<Suggestion> model){
          Babayaga.track(Babayaga.Event.SEARCH_IDEAS,query,model);
          callback.onModel(model);
        }
        @Override public void onError(        RestResult error){
          callback.onError(error);
        }
      }
);
    }
    @Override public int getTotalNumberOfObjects(){
      return forum.getNumberOfOpenSuggestions();
    }
  }
);
  getListView().setOnScrollListener(new PaginationScrollListener(getModelAdapter()){
    @Override public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (forum != null)       super.onScroll(view,firstVisibleItem,visibleItemCount,totalItemCount);
    }
  }
);
  getListView().setOnItemClickListener(new OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      if (position == 0) {
        startActivity(new Intent(ForumActivity.this,PostIdeaActivity.class));
      }
 else       if (position != 1) {
        Suggestion suggestion=(Suggestion)getModelAdapter().getItem(position);
        Session.getInstance().setSuggestion(suggestion);
        SuggestionDialogFragment dialog=new SuggestionDialogFragment(suggestion);
        dialog.show(getSupportFragmentManager(),"String_Node_Str");
      }
    }
  }
);
  Babayaga.track(Babayaga.Event.VIEW_FORUM,forum.getId());
  new InitManager(this,new Runnable(){
    @Override public void run(){
      loadForum();
      Session.getInstance().setSignInListener(new Runnable(){
        @Override public void run(){
          getModelAdapter().reload();
        }
      }
);
    }
  }
).init();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setTitle(R.string.uv_feedback_forum);
  suggestions=new ArrayList<Suggestion>();
  getListView().setDivider(null);
  setListAdapter(new PaginatedAdapter<Suggestion>(this,R.layout.suggestion_item,suggestions){
    @Override public int getViewTypeCount(){
      return super.getViewTypeCount() + 2;
    }
    @Override public boolean isEnabled(    int position){
      return getItemViewType(position) == 2 || super.isEnabled(position);
    }
    @Override public int getCount(){
      return super.getCount() + 2;
    }
    @Override public int getItemViewType(    int position){
      if (position == 0)       return 2;
      if (position == 1)       return 3;
      return super.getItemViewType(position - 2);
    }
    @Override public Object getItem(    int position){
      return super.getItem(position - 2);
    }
    @Override public View getView(    int position,    View convertView,    ViewGroup parent){
      int type=getItemViewType(position);
      if (type == 2 || type == 3) {
        View view=convertView;
        if (view == null) {
          if (type == 2) {
            view=getLayoutInflater().inflate(R.layout.text_item,null);
            TextView text=(TextView)view.findViewById(R.id.text);
            text.setText(R.string.uv_post_an_idea);
            view.findViewById(R.id.divider).setVisibility(View.GONE);
            view.findViewById(R.id.text2).setVisibility(View.GONE);
          }
 else           if (type == 3) {
            view=getLayoutInflater().inflate(R.layout.header_item_light,null);
            TextView text=(TextView)view.findViewById(R.id.header_text);
            text.setText(R.string.uv_idea_text_heading);
          }
        }
        return view;
      }
 else {
        return super.getView(position,convertView,parent);
      }
    }
    @Override protected void customizeLayout(    View view,    Suggestion model){
      TextView textView=(TextView)view.findViewById(R.id.suggestion_title);
      textView.setText(model.getTitle());
      textView=(TextView)view.findViewById(R.id.subscriber_count);
      textView.setText(String.valueOf(model.getNumberOfSubscribers()));
      textView=(TextView)view.findViewById(R.id.suggestion_status);
      View colorView=view.findViewById(R.id.suggestion_status_color);
      if (model.getStatus() == null) {
        textView.setVisibility(View.GONE);
        colorView.setVisibility(View.GONE);
      }
 else {
        int color=Color.parseColor(model.getStatusColor());
        textView.setVisibility(View.VISIBLE);
        textView.setTextColor(color);
        textView.setText(model.getStatus().toUpperCase(Locale.getDefault()));
        colorView.setVisibility(View.VISIBLE);
        colorView.setBackgroundColor(color);
      }
    }
    @Override public void loadPage(    int page,    Callback<List<Suggestion>> callback){
      Suggestion.loadSuggestions(forum,page,callback);
    }
    @Override public RestTask search(    final String query,    final Callback<List<Suggestion>> callback){
      return Suggestion.searchSuggestions(forum,query,new Callback<List<Suggestion>>(){
        @Override public void onModel(        List<Suggestion> model){
          Babayaga.track(Babayaga.Event.SEARCH_IDEAS,query,model);
          callback.onModel(model);
        }
        @Override public void onError(        RestResult error){
          callback.onError(error);
        }
      }
);
    }
    @Override public int getTotalNumberOfObjects(){
      return forum.getNumberOfOpenSuggestions();
    }
  }
);
  getListView().setOnScrollListener(new PaginationScrollListener(getModelAdapter()){
    @Override public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (forum != null)       super.onScroll(view,firstVisibleItem,visibleItemCount,totalItemCount);
    }
  }
);
  getListView().setOnItemClickListener(new OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      if (position == 0) {
        startActivity(new Intent(ForumActivity.this,PostIdeaActivity.class));
      }
 else       if (position != 1) {
        Suggestion suggestion=(Suggestion)getModelAdapter().getItem(position);
        Session.getInstance().setSuggestion(suggestion);
        SuggestionDialogFragment dialog=new SuggestionDialogFragment(suggestion);
        dialog.show(getSupportFragmentManager(),"String_Node_Str");
      }
    }
  }
);
  new InitManager(this,new Runnable(){
    @Override public void run(){
      loadForum();
      Session.getInstance().setSignInListener(new Runnable(){
        @Override public void run(){
          getModelAdapter().reload();
        }
      }
);
    }
  }
).init();
}