Program: 15646
Project: 15646
Buggy source:
@Override protected void onCreate(Bundle args){
  super.onCreate(args);
  readArticleIdSet=new HashSet<String>();
  sharedAdapterHelper=SharedArticlesAdapterHelper.getInstance();
  if (sharedAdapterHelper.getArticleItems().size() == 0) {
    finish();
    return;
  }
  requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
  requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
  setContentView(R.layout.article_activity);
  getActionBar().setDisplayHomeAsUpEnabled(true);
  getActionBar().setHomeButtonEnabled(true);
  OnPageChangeListener onPageChangeListener=new OnPageChangeListener(){
    @Override public void onPageSelected(    int position){
      if (position + 1 >= sharedAdapterHelper.getArticleItems().size()) {
        sharedAdapterHelper.load(ArticleActivity.this);
      }
      final JSONObject article=sharedAdapterHelper.getArticleItems().get(position);
      String articleId=article.optString("String_Node_Str");
      if (!readArticleIdSet.contains(articleId) && !article.optBoolean("String_Node_Str")) {
        readArticleIdSet.add(article.optString("String_Node_Str"));
      }
      drawerList.setItemChecked(position,true);
      drawerList.smoothScrollToPositionFromTop(position,100);
      drawerList.invalidate();
      updateActionBar();
    }
    @Override public void onPageScrolled(    int position,    float positionOffset,    int positionOffsetPixels){
      drawerList.invalidate();
    }
    @Override public void onPageScrollStateChanged(    int state){
    }
  }
;
  setTitle(getIntent().getStringExtra("String_Node_Str"));
  viewPager=(ViewPager)findViewById(R.id.viewPager);
  final ArticlesPagerAdapter adapter=new ArticlesPagerAdapter(getSupportFragmentManager());
  sharedAdapterHelper.addAdapter(adapter,articlesHelperListener);
  viewPager.setAdapter(adapter);
  int position=getIntent().getIntExtra("String_Node_Str",0);
  UnderlinePageIndicator indicator=(UnderlinePageIndicator)findViewById(R.id.indicator);
  indicator.setViewPager(viewPager,position);
  indicator.setOnPageChangeListener(onPageChangeListener);
  drawerList=(ListView)findViewById(R.id.drawer_list);
  ArticlesAdapter listAdapter=new ArticlesAdapter(this);
  sharedAdapterHelper.addAdapter(listAdapter,null);
  AQuery aq=new AQuery(this);
  aq.id(R.id.drawer_list).adapter(listAdapter).scrolled(new AbsListView.OnScrollListener(){
    @Override public void onScrollStateChanged(    AbsListView view,    int scrollState){
    }
    @Override public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (firstVisibleItem + visibleItemCount >= totalItemCount - 2) {
        SharedArticlesAdapterHelper.getInstance().load(ArticleActivity.this);
      }
    }
  }
);
  drawerList.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      viewPager.setCurrentItem(position);
      if (drawerLayout != null) {
        drawerLayout.closeDrawer(drawer);
      }
    }
  }
);
  drawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  drawer=findViewById(R.id.left_drawer);
  if (drawerLayout != null) {
    drawerLayout.setDrawerShadow(R.drawable.drawer_shadow,GravityCompat.START);
    drawerLayout.setDrawerListener(new DrawerLayout.DrawerListener(){
      @Override public void onDrawerSlide(      View view,      float v){
      }
      @Override public void onDrawerStateChanged(      int i){
      }
      @Override public void onDrawerOpened(      View view){
        invalidateOptionsMenu();
        getActionBar().show();
      }
      @Override public void onDrawerClosed(      View view){
        invalidateOptionsMenu();
      }
    }
);
  }
  viewPager.setCurrentItem(position);
  onPageChangeListener.onPageSelected(position);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle args){
  super.onCreate(args);
  readArticleIdSet=new HashSet<String>();
  sharedAdapterHelper=SharedArticlesAdapterHelper.getInstance();
  if (sharedAdapterHelper.getArticleItems().size() == 0) {
    finish();
    return;
  }
  requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
  requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);
  setContentView(R.layout.article_activity);
  getActionBar().setDisplayHomeAsUpEnabled(true);
  getActionBar().setHomeButtonEnabled(true);
  OnPageChangeListener onPageChangeListener=new OnPageChangeListener(){
    @Override public void onPageSelected(    int position){
      if (position + 1 >= sharedAdapterHelper.getArticleItems().size()) {
        sharedAdapterHelper.load(ArticleActivity.this);
      }
      final JSONObject article=sharedAdapterHelper.getArticleItems().get(position);
      String articleId=article.optString("String_Node_Str");
      if (!readArticleIdSet.contains(articleId) && !article.optBoolean("String_Node_Str")) {
        readArticleIdSet.add(article.optString("String_Node_Str"));
      }
      if (drawerLayout == null) {
        if (drawerList.getCheckedItemCount() == 0) {
          drawerList.setSelectionFromTop(position,100);
        }
 else {
          drawerList.smoothScrollToPositionFromTop(position,100);
        }
        drawerList.setItemChecked(position,true);
      }
      updateActionBar();
    }
    @Override public void onPageScrolled(    int position,    float positionOffset,    int positionOffsetPixels){
    }
    @Override public void onPageScrollStateChanged(    int state){
    }
  }
;
  setTitle(getIntent().getStringExtra("String_Node_Str"));
  viewPager=(ViewPager)findViewById(R.id.viewPager);
  final ArticlesPagerAdapter adapter=new ArticlesPagerAdapter(getSupportFragmentManager());
  sharedAdapterHelper.addAdapter(adapter,articlesHelperListener);
  viewPager.setAdapter(adapter);
  int position=getIntent().getIntExtra("String_Node_Str",0);
  UnderlinePageIndicator indicator=(UnderlinePageIndicator)findViewById(R.id.indicator);
  if (indicator != null) {
    indicator.setViewPager(viewPager,position);
    indicator.setOnPageChangeListener(onPageChangeListener);
  }
 else {
    viewPager.setOnPageChangeListener(onPageChangeListener);
  }
  drawerList=(ListView)findViewById(R.id.drawer_list);
  ArticlesAdapter listAdapter=new ArticlesAdapter(this);
  sharedAdapterHelper.addAdapter(listAdapter,null);
  AQuery aq=new AQuery(this);
  aq.id(R.id.drawer_list).adapter(listAdapter).scrolled(new AbsListView.OnScrollListener(){
    @Override public void onScrollStateChanged(    AbsListView view,    int scrollState){
    }
    @Override public void onScroll(    AbsListView view,    int firstVisibleItem,    int visibleItemCount,    int totalItemCount){
      if (firstVisibleItem + visibleItemCount >= totalItemCount - 2) {
        SharedArticlesAdapterHelper.getInstance().load(ArticleActivity.this);
      }
    }
  }
);
  drawerList.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      viewPager.setCurrentItem(position);
      if (drawerLayout != null) {
        drawerLayout.closeDrawer(drawer);
      }
    }
  }
);
  drawerLayout=(DrawerLayout)findViewById(R.id.drawer_layout);
  drawer=findViewById(R.id.left_drawer);
  if (drawerLayout != null) {
    drawerLayout.setDrawerShadow(R.drawable.drawer_shadow,GravityCompat.START);
    drawerLayout.setDrawerListener(new DrawerLayout.DrawerListener(){
      @Override public void onDrawerSlide(      View view,      float v){
      }
      @Override public void onDrawerStateChanged(      int i){
      }
      @Override public void onDrawerOpened(      View view){
        invalidateOptionsMenu();
        getActionBar().show();
        int position=viewPager.getCurrentItem();
        drawerList.setItemChecked(position,true);
        if (position <= drawerList.getFirstVisiblePosition() || position >= drawerList.getLastVisiblePosition()) {
          drawerList.setSelectionFromTop(position,100);
        }
      }
      @Override public void onDrawerClosed(      View view){
        invalidateOptionsMenu();
      }
    }
);
  }
  viewPager.setCurrentItem(position);
  onPageChangeListener.onPageSelected(position);
}