Program: 55030
Project: 55030
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.layout_novel_info);
  aid=getIntent().getIntExtra("String_Node_Str",1);
  from=getIntent().getStringExtra("String_Node_Str");
  title=getIntent().getStringExtra("String_Node_Str");
  Toolbar mToolbar=findViewById(R.id.toolbar_actionbar);
  setSupportActionBar(mToolbar);
  final Drawable upArrow=getResources().getDrawable(R.drawable.ic_svg_back);
  if (getSupportActionBar() != null && upArrow != null) {
    getSupportActionBar().setHomeButtonEnabled(true);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    upArrow.setColorFilter(getResources().getColor(R.color.default_white),PorterDuff.Mode.SRC_ATOP);
    getSupportActionBar().setHomeAsUpIndicator(upArrow);
  }
  if (Build.VERSION.SDK_INT >= 16) {
    SystemBarTintManager tintManager=new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setNavigationBarTintEnabled(true);
    tintManager.setTintAlpha(0.15f);
    tintManager.setNavigationBarAlpha(0.0f);
    tintManager.setTintColor(getResources().getColor(android.R.color.black));
    if (Build.VERSION.SDK_INT >= 21)     getWindow().setNavigationBarColor(getResources().getColor(R.color.myNavigationColor));
  }
  if (ImageLoader.getInstance() == null || !ImageLoader.getInstance().isInited()) {
    GlobalConfig.initImageLoader(this);
  }
  rlMask=findViewById(R.id.white_mask);
  mLinearLayout=findViewById(R.id.novel_info_scroll);
  LinearLayout llCardLayout=findViewById(R.id.item_card);
  ImageView ivNovelCover=findViewById(R.id.novel_cover);
  tvNovelTitle=findViewById(R.id.novel_title);
  tvNovelAuthor=findViewById(R.id.novel_author);
  tvNovelStatus=findViewById(R.id.novel_status);
  tvNovelUpdate=findViewById(R.id.novel_update);
  TextView tvLatestChapterNameText=findViewById(R.id.novel_item_text_shortinfo);
  tvLatestChapter=findViewById(R.id.novel_intro);
  tvNovelFullIntro=findViewById(R.id.novel_intro_full);
  ImageButton ibNovelOption=findViewById(R.id.novel_option);
  fabFavorite=findViewById(R.id.fab_favorate);
  FloatingActionButton fabDownload=findViewById(R.id.fab_download);
  famMenu=findViewById(R.id.multiple_actions);
  spb=findViewById(R.id.spb);
  tvNovelTitle.setText(title);
  if (LightCache.testFileExist(GlobalConfig.getFirstStoragePath() + "String_Node_Str" + File.separator+ aid+ "String_Node_Str"))   ImageLoader.getInstance().displayImage("String_Node_Str" + GlobalConfig.getFirstStoragePath() + "String_Node_Str"+ File.separator+ aid+ "String_Node_Str",ivNovelCover);
 else   if (LightCache.testFileExist(GlobalConfig.getSecondStoragePath() + "String_Node_Str" + File.separator+ aid+ "String_Node_Str"))   ImageLoader.getInstance().displayImage("String_Node_Str" + GlobalConfig.getSecondStoragePath() + "String_Node_Str"+ File.separator+ aid+ "String_Node_Str",ivNovelCover);
 else   ImageLoader.getInstance().displayImage(Wenku8API.getCoverURL(aid),ivNovelCover);
  tvLatestChapterNameText.setText(getResources().getText(R.string.novel_item_latest_chapter));
  ibNovelOption.setVisibility(ImageButton.INVISIBLE);
  fabFavorite.setColorFilter(getResources().getColor(R.color.default_white),PorterDuff.Mode.SRC_ATOP);
  fabDownload.setColorFilter(getResources().getColor(R.color.default_white),PorterDuff.Mode.SRC_ATOP);
  llCardLayout.setBackgroundResource(R.color.menu_transparent);
  if (GlobalConfig.testInLocalBookshelf(aid)) {
    fabFavorite.setIcon(R.drawable.ic_favorate_pressed);
  }
  getSupportActionBar().setTitle(R.string.action_novel_info);
  spb.setVisibility(View.INVISIBLE);
  Handler handler=new Handler();
  handler.postDelayed(() -> {
    spb.setVisibility(View.VISIBLE);
    if (from.equals(FromLocal))     refreshInfoFromLocal();
 else     refreshInfoFromCloud();
  }
,500);
  famMenu.setOnFloatingActionsMenuUpdateListener(new FloatingActionsMenu.OnFloatingActionsMenuUpdateListener(){
    @Override public void onMenuExpanded(){
      rlMask.setVisibility(View.VISIBLE);
    }
    @Override public void onMenuCollapsed(){
      rlMask.setVisibility(View.INVISIBLE);
    }
  }
);
  rlMask.setOnClickListener(v -> {
    if (famMenu.isExpanded())     famMenu.collapse();
  }
);
  if (Build.VERSION.SDK_INT >= 16) {
    tvNovelTitle.setBackground(getResources().getDrawable(R.drawable.btn_menu_item));
    tvNovelAuthor.setBackground(getResources().getDrawable(R.drawable.btn_menu_item));
    tvLatestChapter.setBackground(getResources().getDrawable(R.drawable.btn_menu_item));
  }
  tvNovelTitle.setOnClickListener(v -> {
    if (isLoading) {
      Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.system_loading_please_wait),Toast.LENGTH_SHORT).show();
      return;
    }
    new MaterialDialog.Builder(NovelInfoActivity.this).theme(Theme.LIGHT).titleColorRes(R.color.dlgTitleColor).backgroundColorRes(R.color.dlgBackgroundColor).contentColorRes(R.color.dlgContentColor).positiveColorRes(R.color.dlgPositiveButtonColor).title(R.string.dialog_content_novel_title).content(aid + "String_Node_Str" + mNovelItemMeta.title).contentGravity(GravityEnum.CENTER).positiveText(R.string.dialog_positive_known).show();
  }
);
  tvNovelAuthor.setOnClickListener(v -> {
    if (isLoading) {
      Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.system_loading_please_wait),Toast.LENGTH_SHORT).show();
      return;
    }
    new MaterialDialog.Builder(NovelInfoActivity.this).theme(Theme.LIGHT).onPositive((ignored1,ignored2) -> {
      Intent intent=new Intent(NovelInfoActivity.this,SearchResultActivity.class);
      intent.putExtra("String_Node_Str",mNovelItemMeta.author);
      intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
      startActivity(intent);
      overridePendingTransition(R.anim.fade_in,R.anim.hold);
    }
).content(R.string.dialog_content_search_author).positiveText(R.string.dialog_positive_ok).negativeText(R.string.dialog_negative_biao).show();
  }
);
  fabFavorite.setOnClickListener(v -> {
    if (isLoading) {
      Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.system_loading_please_wait),Toast.LENGTH_SHORT).show();
      return;
    }
    if (GlobalConfig.testInLocalBookshelf(aid)) {
      new MaterialDialog.Builder(NovelInfoActivity.this).onPositive((ignored1,ignored2) -> {
        AsyncRemoveBookFromCloud arbfc=new AsyncRemoveBookFromCloud();
        arbfc.execute(aid);
      }
).theme(Theme.LIGHT).backgroundColorRes(R.color.dlgBackgroundColor).contentColorRes(R.color.dlgContentColor).positiveColorRes(R.color.dlgPositiveButtonColor).negativeColorRes(R.color.dlgNegativeButtonColor).content(R.string.dialog_content_sure_to_unfav).contentGravity(GravityEnum.CENTER).positiveText(R.string.dialog_positive_yes).negativeText(R.string.dialog_negative_preferno).show();
    }
 else {
      GlobalConfig.writeFullFileIntoSaveFolder("String_Node_Str",aid + "String_Node_Str",novelFullMeta);
      GlobalConfig.writeFullFileIntoSaveFolder("String_Node_Str",aid + "String_Node_Str",novelFullIntro);
      GlobalConfig.writeFullFileIntoSaveFolder("String_Node_Str",aid + "String_Node_Str",novelFullVolume);
      GlobalConfig.addToLocalBookshelf(aid);
      if (GlobalConfig.testInLocalBookshelf(aid)) {
        Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.bookshelf_added),Toast.LENGTH_SHORT).show();
        fabFavorite.setIcon(R.drawable.ic_favorate_pressed);
      }
 else {
        Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.bookshelf_error),Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  fabDownload.setOnClickListener(v -> {
    if (isLoading) {
      Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.system_loading_please_wait),Toast.LENGTH_SHORT).show();
      return;
    }
 else     if (!GlobalConfig.testInLocalBookshelf(aid)) {
      Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.system_fav_it_first),Toast.LENGTH_SHORT).show();
      return;
    }
    new MaterialDialog.Builder(NovelInfoActivity.this).theme(Theme.LIGHT).title(R.string.dialog_title_choose_download_option).backgroundColorRes(R.color.dlgBackgroundColor).titleColorRes(R.color.dlgTitleColor).negativeText(R.string.dialog_negative_pass).negativeColorRes(R.color.dlgNegativeButtonColor).itemsGravity(GravityEnum.CENTER).items(R.array.download_option).itemsCallback((dialog,view,which,text) -> {
switch (which) {
case 0:
        optionCheckUpdates();
      break;
case 1:
    optionDownloadUpdates();
  break;
case 2:
optionDownloadOverride();
break;
case 3:
optionDownloadSelected();
break;
}
}
).show();
}
);
tvLatestChapter.setOnClickListener(view -> {
if (mNovelItemMeta != null && mNovelItemMeta.latestSectionCid != 0) showDirectJumpToReaderDialog(mNovelItemMeta.latestSectionCid);
 else Toast.makeText(this,getResources().getText(R.string.reader_msg_please_refresh_and_retry),Toast.LENGTH_SHORT).show();
}
);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.layout_novel_info);
  aid=getIntent().getIntExtra("String_Node_Str",1);
  from=getIntent().getStringExtra("String_Node_Str");
  title=getIntent().getStringExtra("String_Node_Str");
  Toolbar mToolbar=findViewById(R.id.toolbar_actionbar);
  setSupportActionBar(mToolbar);
  final Drawable upArrow=getResources().getDrawable(R.drawable.ic_svg_back);
  if (getSupportActionBar() != null && upArrow != null) {
    getSupportActionBar().setHomeButtonEnabled(true);
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    upArrow.setColorFilter(getResources().getColor(R.color.default_white),PorterDuff.Mode.SRC_ATOP);
    getSupportActionBar().setHomeAsUpIndicator(upArrow);
  }
  if (Build.VERSION.SDK_INT >= 16) {
    SystemBarTintManager tintManager=new SystemBarTintManager(this);
    tintManager.setStatusBarTintEnabled(true);
    tintManager.setNavigationBarTintEnabled(true);
    tintManager.setTintAlpha(0.15f);
    tintManager.setNavigationBarAlpha(0.0f);
    tintManager.setTintColor(getResources().getColor(android.R.color.black));
    if (Build.VERSION.SDK_INT >= 21)     getWindow().setNavigationBarColor(getResources().getColor(R.color.myNavigationColor));
  }
  if (ImageLoader.getInstance() == null || !ImageLoader.getInstance().isInited()) {
    GlobalConfig.initImageLoader(this);
  }
  rlMask=findViewById(R.id.white_mask);
  mLinearLayout=findViewById(R.id.novel_info_scroll);
  LinearLayout llCardLayout=findViewById(R.id.item_card);
  ImageView ivNovelCover=findViewById(R.id.novel_cover);
  tvNovelTitle=findViewById(R.id.novel_title);
  tvNovelAuthor=findViewById(R.id.novel_author);
  tvNovelStatus=findViewById(R.id.novel_status);
  tvNovelUpdate=findViewById(R.id.novel_update);
  TextView tvLatestChapterNameText=findViewById(R.id.novel_item_text_shortinfo);
  tvLatestChapter=findViewById(R.id.novel_intro);
  tvNovelFullIntro=findViewById(R.id.novel_intro_full);
  ImageButton ibNovelOption=findViewById(R.id.novel_option);
  fabFavorite=findViewById(R.id.fab_favorate);
  FloatingActionButton fabDownload=findViewById(R.id.fab_download);
  famMenu=findViewById(R.id.multiple_actions);
  spb=findViewById(R.id.spb);
  tvNovelTitle.setText(title);
  if (LightCache.testFileExist(GlobalConfig.getFirstStoragePath() + "String_Node_Str" + File.separator+ aid+ "String_Node_Str"))   ImageLoader.getInstance().displayImage("String_Node_Str" + GlobalConfig.getFirstStoragePath() + "String_Node_Str"+ File.separator+ aid+ "String_Node_Str",ivNovelCover);
 else   if (LightCache.testFileExist(GlobalConfig.getSecondStoragePath() + "String_Node_Str" + File.separator+ aid+ "String_Node_Str"))   ImageLoader.getInstance().displayImage("String_Node_Str" + GlobalConfig.getSecondStoragePath() + "String_Node_Str"+ File.separator+ aid+ "String_Node_Str",ivNovelCover);
 else   ImageLoader.getInstance().displayImage(Wenku8API.getCoverURL(aid),ivNovelCover);
  tvLatestChapterNameText.setText(getResources().getText(R.string.novel_item_latest_chapter));
  ibNovelOption.setVisibility(ImageButton.INVISIBLE);
  fabFavorite.setColorFilter(getResources().getColor(R.color.default_white),PorterDuff.Mode.SRC_ATOP);
  fabDownload.setColorFilter(getResources().getColor(R.color.default_white),PorterDuff.Mode.SRC_ATOP);
  llCardLayout.setBackgroundResource(R.color.menu_transparent);
  if (GlobalConfig.testInLocalBookshelf(aid)) {
    fabFavorite.setIcon(R.drawable.ic_favorate_pressed);
  }
  getSupportActionBar().setTitle(R.string.action_novel_info);
  spb.setVisibility(View.INVISIBLE);
  Handler handler=new Handler();
  handler.postDelayed(() -> {
    spb.setVisibility(View.VISIBLE);
    if (from.equals(FromLocal))     refreshInfoFromLocal();
 else     refreshInfoFromCloud();
  }
,500);
  famMenu.setOnFloatingActionsMenuUpdateListener(new FloatingActionsMenu.OnFloatingActionsMenuUpdateListener(){
    @Override public void onMenuExpanded(){
      rlMask.setVisibility(View.VISIBLE);
    }
    @Override public void onMenuCollapsed(){
      rlMask.setVisibility(View.INVISIBLE);
    }
  }
);
  rlMask.setOnClickListener(v -> {
    if (famMenu.isExpanded())     famMenu.collapse();
  }
);
  if (Build.VERSION.SDK_INT >= 16) {
    tvNovelTitle.setBackground(getResources().getDrawable(R.drawable.btn_menu_item));
    tvNovelAuthor.setBackground(getResources().getDrawable(R.drawable.btn_menu_item));
    tvLatestChapter.setBackground(getResources().getDrawable(R.drawable.btn_menu_item));
  }
  tvNovelTitle.setOnClickListener(v -> {
    if (runLoadingChecker())     return;
    new MaterialDialog.Builder(NovelInfoActivity.this).theme(Theme.LIGHT).titleColorRes(R.color.dlgTitleColor).backgroundColorRes(R.color.dlgBackgroundColor).contentColorRes(R.color.dlgContentColor).positiveColorRes(R.color.dlgPositiveButtonColor).title(R.string.dialog_content_novel_title).content(aid + "String_Node_Str" + mNovelItemMeta.title).contentGravity(GravityEnum.CENTER).positiveText(R.string.dialog_positive_known).show();
  }
);
  tvNovelAuthor.setOnClickListener(v -> {
    if (runLoadingChecker())     return;
    new MaterialDialog.Builder(NovelInfoActivity.this).theme(Theme.LIGHT).onPositive((ignored1,ignored2) -> {
      Intent intent=new Intent(NovelInfoActivity.this,SearchResultActivity.class);
      intent.putExtra("String_Node_Str",mNovelItemMeta.author);
      intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
      startActivity(intent);
      overridePendingTransition(R.anim.fade_in,R.anim.hold);
    }
).content(R.string.dialog_content_search_author).positiveText(R.string.dialog_positive_ok).negativeText(R.string.dialog_negative_biao).show();
  }
);
  fabFavorite.setOnClickListener(v -> {
    if (runLoadingChecker())     return;
    if (GlobalConfig.testInLocalBookshelf(aid)) {
      new MaterialDialog.Builder(NovelInfoActivity.this).onPositive((ignored1,ignored2) -> {
        AsyncRemoveBookFromCloud arbfc=new AsyncRemoveBookFromCloud();
        arbfc.execute(aid);
      }
).theme(Theme.LIGHT).backgroundColorRes(R.color.dlgBackgroundColor).contentColorRes(R.color.dlgContentColor).positiveColorRes(R.color.dlgPositiveButtonColor).negativeColorRes(R.color.dlgNegativeButtonColor).content(R.string.dialog_content_sure_to_unfav).contentGravity(GravityEnum.CENTER).positiveText(R.string.dialog_positive_yes).negativeText(R.string.dialog_negative_preferno).show();
    }
 else {
      GlobalConfig.writeFullFileIntoSaveFolder("String_Node_Str",aid + "String_Node_Str",novelFullMeta);
      GlobalConfig.writeFullFileIntoSaveFolder("String_Node_Str",aid + "String_Node_Str",novelFullIntro);
      GlobalConfig.writeFullFileIntoSaveFolder("String_Node_Str",aid + "String_Node_Str",novelFullVolume);
      GlobalConfig.addToLocalBookshelf(aid);
      if (GlobalConfig.testInLocalBookshelf(aid)) {
        Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.bookshelf_added),Toast.LENGTH_SHORT).show();
        fabFavorite.setIcon(R.drawable.ic_favorate_pressed);
      }
 else {
        Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.bookshelf_error),Toast.LENGTH_SHORT).show();
      }
    }
  }
);
  fabDownload.setOnClickListener(v -> {
    if (runLoadingChecker())     return;
    if (!GlobalConfig.testInLocalBookshelf(aid)) {
      Toast.makeText(NovelInfoActivity.this,getResources().getString(R.string.system_fav_it_first),Toast.LENGTH_SHORT).show();
      return;
    }
    new MaterialDialog.Builder(NovelInfoActivity.this).theme(Theme.LIGHT).title(R.string.dialog_title_choose_download_option).backgroundColorRes(R.color.dlgBackgroundColor).titleColorRes(R.color.dlgTitleColor).negativeText(R.string.dialog_negative_pass).negativeColorRes(R.color.dlgNegativeButtonColor).itemsGravity(GravityEnum.CENTER).items(R.array.download_option).itemsCallback((dialog,view,which,text) -> {
switch (which) {
case 0:
        optionCheckUpdates();
      break;
case 1:
    optionDownloadUpdates();
  break;
case 2:
optionDownloadOverride();
break;
case 3:
optionDownloadSelected();
break;
}
}
).show();
}
);
tvLatestChapter.setOnClickListener(view -> {
if (runLoadingChecker()) return;
if (mNovelItemMeta != null && mNovelItemMeta.latestSectionCid != 0) showDirectJumpToReaderDialog(mNovelItemMeta.latestSectionCid);
 else Toast.makeText(this,getResources().getText(R.string.reader_msg_please_refresh_and_retry),Toast.LENGTH_SHORT).show();
}
);
}