Program: 13363
Project: 13363
Buggy source:
protected void initializeViews(){
  setSupportActionBar(toolbar);
{
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      Window window=getWindow();
      window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
      window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
      window.setStatusBarColor(statusBarColor);
    }
  }
{
    appBar.addOnOffsetChangedListener(this);
  }
{
    toolbar.setBackgroundColor(toolbarColor);
    AppBarLayout.LayoutParams params=(AppBarLayout.LayoutParams)toolbar.getLayoutParams();
    params.setScrollFlags(toolbarScrollFlags);
    toolbar.setLayoutParams(params);
  }
{
    title.setText(titleDefault);
    title.setTextSize(TypedValue.COMPLEX_UNIT_PX,titleSize);
    title.setTypeface(TypefaceHelper.get(this,titleFont));
    title.setTextColor(titleColor);
    urlTv.setText(UrlParser.getHost(url));
    urlTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,urlSize);
    urlTv.setTypeface(TypefaceHelper.get(this,urlFont));
    urlTv.setTextColor(urlColor);
    requestCenterLayout();
  }
{
    close.setBackgroundResource(iconSelector);
    back.setBackgroundResource(iconSelector);
    forward.setBackgroundResource(iconSelector);
    more.setBackgroundResource(iconSelector);
    if (showMenuRefresh || showMenuShareVia || showMenuCopyLink|| showMenuOpenWith)     more.setVisibility(View.VISIBLE);
 else     more.setVisibility(View.GONE);
  }
{
    webView.setWebChromeClient(new MyWebChromeClient());
    webView.setWebViewClient(new MyWebViewClient());
    webView.getSettings().setJavaScriptEnabled(webViewJavaScriptEnabled);
    webView.getSettings().setAppCacheEnabled(webViewAppCacheEnabled);
    webView.getSettings().setAllowFileAccess(webViewAllowFileAccess);
    webView.getSettings().setUseWideViewPort(webViewUseWideViewPort);
    webView.getSettings().setLoadWithOverviewMode(webViewLoadWithOverviewMode);
    webView.getSettings().setDomStorageEnabled(webViewDomStorageEnabled);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)     webView.getSettings().setDisplayZoomControls(webViewDisplayZoomControls);
    webView.getSettings().setBuiltInZoomControls(webViewBuiltInZoomControls);
    if (webViewBuiltInZoomControls) {
      ((ViewGroup)webView.getParent()).removeAllViews();
      swipeRefreshLayout.addView(webView);
      swipeRefreshLayout.removeViewAt(1);
    }
    if (webViewDesktopMode)     webView.getSettings().setUserAgentString("String_Node_Str");
    webView.loadUrl(url);
  }
{
    swipeRefreshLayout.setEnabled(showSwipeRefreshLayout);
    if (showSwipeRefreshLayout) {
      swipeRefreshLayout.post(new Runnable(){
        @Override public void run(){
          swipeRefreshLayout.setRefreshing(true);
        }
      }
);
    }
    if (swipeRefreshColors == null)     swipeRefreshLayout.setColorSchemeColors(swipeRefreshColor);
 else     swipeRefreshLayout.setColorSchemeColors(swipeRefreshColors);
    swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
      @Override public void onRefresh(){
        webView.reload();
      }
    }
);
  }
{
    gradient.setVisibility(showDivider && gradientDivider ? View.VISIBLE : View.GONE);
    divider.setVisibility(showDivider && !gradientDivider ? View.VISIBLE : View.GONE);
    if (gradientDivider) {
      int dividerWidth=ScreenHelper.getWidth(this);
      Bitmap bitmap=BitmapHelper.getGradientBitmap(dividerWidth,(int)dividerHeight,dividerColor);
      BitmapDrawable drawable=new BitmapDrawable(getResources(),bitmap);
      if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
        gradient.setBackgroundDrawable(drawable);
      }
 else {
        gradient.setBackground(drawable);
      }
      CoordinatorLayout.LayoutParams params=(CoordinatorLayout.LayoutParams)gradient.getLayoutParams();
      params.height=(int)dividerHeight;
      gradient.setLayoutParams(params);
    }
 else {
      divider.setBackgroundColor(dividerColor);
      LinearLayout.LayoutParams params=(LinearLayout.LayoutParams)divider.getLayoutParams();
      params.height=(int)dividerHeight;
      divider.setLayoutParams(params);
    }
  }
{
    progressBar.setVisibility(showProgressBar ? View.VISIBLE : View.GONE);
    progressBar.getProgressDrawable().setColorFilter(progressBarColor,PorterDuff.Mode.SRC_IN);
    progressBar.setMinimumHeight((int)progressBarHeight);
    CoordinatorLayout.LayoutParams params=new CoordinatorLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,(int)progressBarHeight);
    float toolbarHeight=getResources().getDimension(R.dimen.toolbarHeight);
switch (progressBarPosition) {
case TOP_OF_TOOLBAR:
      params.setMargins(0,0,0,0);
    break;
case BOTTON_OF_TOOLBAR:
  params.setMargins(0,(int)toolbarHeight - (int)progressBarHeight,0,0);
break;
case TOP_OF_WEBVIEW:
params.setMargins(0,(int)toolbarHeight,0,0);
break;
case BOTTOM_OF_WEBVIEW:
params.setMargins(0,ScreenHelper.getHeight(this) - (int)progressBarHeight,0,0);
break;
}
progressBar.setLayoutParams(params);
}
{
GradientDrawable drawable=new GradientDrawable();
drawable.setCornerRadius(getResources().getDimension(R.dimen.defaultMenuCornerRadius));
drawable.setColor(menuColor);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) menuBackground.setBackground(drawable);
 else menuBackground.setBackgroundDrawable(drawable);
shadowLayout.setShadowColor(menuDropShadowColor);
shadowLayout.setShadowSize(menuDropShadowSize);
RelativeLayout.LayoutParams params=(RelativeLayout.LayoutParams)shadowLayout.getLayoutParams();
int margin=(int)(getResources().getDimension(R.dimen.defaultMenuLayoutMargin) - menuDropShadowSize);
params.setMargins(0,margin,margin,0);
shadowLayout.setLayoutParams(params);
menuRefresh.setVisibility(showMenuRefresh ? View.VISIBLE : View.GONE);
menuRefresh.setBackgroundResource(menuSelector);
menuRefreshTv.setText(stringResRefresh);
menuRefreshTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuRefreshTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuRefreshTv.setTextColor(menuTextColor);
menuShareVia.setVisibility(showMenuShareVia ? View.VISIBLE : View.GONE);
menuShareVia.setBackgroundResource(menuSelector);
menuShareViaTv.setText(stringResShareVia);
menuShareViaTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuShareViaTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuShareViaTv.setTextColor(menuTextColor);
menuCopyLink.setVisibility(showMenuCopyLink ? View.VISIBLE : View.GONE);
menuCopyLink.setBackgroundResource(menuSelector);
menuCopyLinkTv.setText(stringResCopyLink);
menuCopyLinkTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuCopyLinkTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuCopyLinkTv.setTextColor(menuTextColor);
menuOpenWith.setVisibility(showMenuOpenWith ? View.VISIBLE : View.GONE);
menuOpenWith.setBackgroundResource(menuSelector);
menuOpenWithTv.setText(stringResOpenWith);
menuOpenWithTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuOpenWithTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuOpenWithTv.setTextColor(menuTextColor);
}
}

Fixed version (ground truth):
protected void initializeViews(){
  setSupportActionBar(toolbar);
{
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
      Window window=getWindow();
      window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
      window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
      window.setStatusBarColor(statusBarColor);
    }
  }
{
    appBar.addOnOffsetChangedListener(this);
  }
{
    toolbar.setBackgroundColor(toolbarColor);
    AppBarLayout.LayoutParams params=(AppBarLayout.LayoutParams)toolbar.getLayoutParams();
    params.setScrollFlags(toolbarScrollFlags);
    toolbar.setLayoutParams(params);
  }
{
    title.setText(titleDefault);
    title.setTextSize(TypedValue.COMPLEX_UNIT_PX,titleSize);
    title.setTypeface(TypefaceHelper.get(this,titleFont));
    title.setTextColor(titleColor);
    urlTv.setVisibility(showUrl ? View.VISIBLE : View.GONE);
    urlTv.setText(UrlParser.getHost(url));
    urlTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,urlSize);
    urlTv.setTypeface(TypefaceHelper.get(this,urlFont));
    urlTv.setTextColor(urlColor);
    requestCenterLayout();
  }
{
    close.setBackgroundResource(iconSelector);
    back.setBackgroundResource(iconSelector);
    forward.setBackgroundResource(iconSelector);
    more.setBackgroundResource(iconSelector);
    if (showMenuRefresh || showMenuShareVia || showMenuCopyLink|| showMenuOpenWith)     more.setVisibility(View.VISIBLE);
 else     more.setVisibility(View.GONE);
  }
{
    webView.setWebChromeClient(new MyWebChromeClient());
    webView.setWebViewClient(new MyWebViewClient());
    webView.getSettings().setJavaScriptEnabled(webViewJavaScriptEnabled);
    webView.getSettings().setAppCacheEnabled(webViewAppCacheEnabled);
    webView.getSettings().setAllowFileAccess(webViewAllowFileAccess);
    webView.getSettings().setUseWideViewPort(webViewUseWideViewPort);
    webView.getSettings().setLoadWithOverviewMode(webViewLoadWithOverviewMode);
    webView.getSettings().setDomStorageEnabled(webViewDomStorageEnabled);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)     webView.getSettings().setDisplayZoomControls(webViewDisplayZoomControls);
    webView.getSettings().setBuiltInZoomControls(webViewBuiltInZoomControls);
    if (webViewBuiltInZoomControls) {
      ((ViewGroup)webView.getParent()).removeAllViews();
      swipeRefreshLayout.addView(webView);
      swipeRefreshLayout.removeViewAt(1);
    }
    if (webViewDesktopMode)     webView.getSettings().setUserAgentString("String_Node_Str");
    webView.loadUrl(url);
  }
{
    swipeRefreshLayout.setEnabled(showSwipeRefreshLayout);
    if (showSwipeRefreshLayout) {
      swipeRefreshLayout.post(new Runnable(){
        @Override public void run(){
          swipeRefreshLayout.setRefreshing(true);
        }
      }
);
    }
    if (swipeRefreshColors == null)     swipeRefreshLayout.setColorSchemeColors(swipeRefreshColor);
 else     swipeRefreshLayout.setColorSchemeColors(swipeRefreshColors);
    swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener(){
      @Override public void onRefresh(){
        webView.reload();
      }
    }
);
  }
{
    gradient.setVisibility(showDivider && gradientDivider ? View.VISIBLE : View.GONE);
    divider.setVisibility(showDivider && !gradientDivider ? View.VISIBLE : View.GONE);
    if (gradientDivider) {
      int dividerWidth=ScreenHelper.getWidth(this);
      Bitmap bitmap=BitmapHelper.getGradientBitmap(dividerWidth,(int)dividerHeight,dividerColor);
      BitmapDrawable drawable=new BitmapDrawable(getResources(),bitmap);
      if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
        gradient.setBackgroundDrawable(drawable);
      }
 else {
        gradient.setBackground(drawable);
      }
      CoordinatorLayout.LayoutParams params=(CoordinatorLayout.LayoutParams)gradient.getLayoutParams();
      params.height=(int)dividerHeight;
      gradient.setLayoutParams(params);
    }
 else {
      divider.setBackgroundColor(dividerColor);
      LinearLayout.LayoutParams params=(LinearLayout.LayoutParams)divider.getLayoutParams();
      params.height=(int)dividerHeight;
      divider.setLayoutParams(params);
    }
  }
{
    progressBar.setVisibility(showProgressBar ? View.VISIBLE : View.GONE);
    progressBar.getProgressDrawable().setColorFilter(progressBarColor,PorterDuff.Mode.SRC_IN);
    progressBar.setMinimumHeight((int)progressBarHeight);
    CoordinatorLayout.LayoutParams params=new CoordinatorLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,(int)progressBarHeight);
    float toolbarHeight=getResources().getDimension(R.dimen.toolbarHeight);
switch (progressBarPosition) {
case TOP_OF_TOOLBAR:
      params.setMargins(0,0,0,0);
    break;
case BOTTON_OF_TOOLBAR:
  params.setMargins(0,(int)toolbarHeight - (int)progressBarHeight,0,0);
break;
case TOP_OF_WEBVIEW:
params.setMargins(0,(int)toolbarHeight,0,0);
break;
case BOTTOM_OF_WEBVIEW:
params.setMargins(0,ScreenHelper.getHeight(this) - (int)progressBarHeight,0,0);
break;
}
progressBar.setLayoutParams(params);
}
{
GradientDrawable drawable=new GradientDrawable();
drawable.setCornerRadius(getResources().getDimension(R.dimen.defaultMenuCornerRadius));
drawable.setColor(menuColor);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) menuBackground.setBackground(drawable);
 else menuBackground.setBackgroundDrawable(drawable);
shadowLayout.setShadowColor(menuDropShadowColor);
shadowLayout.setShadowSize(menuDropShadowSize);
RelativeLayout.LayoutParams params=(RelativeLayout.LayoutParams)shadowLayout.getLayoutParams();
int margin=(int)(getResources().getDimension(R.dimen.defaultMenuLayoutMargin) - menuDropShadowSize);
params.setMargins(0,margin,margin,0);
shadowLayout.setLayoutParams(params);
menuRefresh.setVisibility(showMenuRefresh ? View.VISIBLE : View.GONE);
menuRefresh.setBackgroundResource(menuSelector);
menuRefreshTv.setText(stringResRefresh);
menuRefreshTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuRefreshTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuRefreshTv.setTextColor(menuTextColor);
menuShareVia.setVisibility(showMenuShareVia ? View.VISIBLE : View.GONE);
menuShareVia.setBackgroundResource(menuSelector);
menuShareViaTv.setText(stringResShareVia);
menuShareViaTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuShareViaTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuShareViaTv.setTextColor(menuTextColor);
menuCopyLink.setVisibility(showMenuCopyLink ? View.VISIBLE : View.GONE);
menuCopyLink.setBackgroundResource(menuSelector);
menuCopyLinkTv.setText(stringResCopyLink);
menuCopyLinkTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuCopyLinkTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuCopyLinkTv.setTextColor(menuTextColor);
menuOpenWith.setVisibility(showMenuOpenWith ? View.VISIBLE : View.GONE);
menuOpenWith.setBackgroundResource(menuSelector);
menuOpenWithTv.setText(stringResOpenWith);
menuOpenWithTv.setTextSize(TypedValue.COMPLEX_UNIT_PX,menuTextSize);
menuOpenWithTv.setTypeface(TypefaceHelper.get(this,menuTextFont));
menuOpenWithTv.setTextColor(menuTextColor);
}
}