Program: 116993
Project: 116993
Buggy source:
public boolean shouldOverrideUrlLoadingNoIntercept(WebView view,final String url){
  if (url == null)   return false;
  boolean checkLoginSignup=((LeanWebView)view).checkLoginSignup();
  ((LeanWebView)view).setCheckLoginSignup(true);
  Uri uri=Uri.parse(url);
  final AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (checkLoginSignup && appConfig.loginUrl != null && LeanUtils.urlsMatchOnPath(url,appConfig.loginUrl)) {
    mainActivity.launchWebForm("String_Node_Str","String_Node_Str");
    return true;
  }
 else   if (checkLoginSignup && appConfig.signupUrl != null && LeanUtils.urlsMatchOnPath(url,appConfig.signupUrl)) {
    mainActivity.launchWebForm("String_Node_Str","String_Node_Str");
    return true;
  }
  if (!isInternalUri(uri)) {
    Intent intent=new Intent(Intent.ACTION_VIEW,uri);
    try {
      view.getContext().startActivity(intent);
    }
 catch (    ActivityNotFoundException e) {
      Log.e(TAG,e.getMessage(),e);
    }
    return true;
  }
  int currentLevel=mainActivity.getUrlLevel();
  int newLevel=mainActivity.urlLevelForUrl(url);
  if (currentLevel >= 0 && newLevel >= 0) {
    if (newLevel > currentLevel) {
      Intent intent=new Intent(mainActivity.getBaseContext(),MainActivity.class);
      intent.putExtra("String_Node_Str",false);
      intent.putExtra("String_Node_Str",url);
      intent.putExtra("String_Node_Str",currentLevel);
      intent.putExtra("String_Node_Str",mainActivity.postLoadJavascript);
      mainActivity.startActivityForResult(intent,MainActivity.REQUEST_WEB_ACTIVITY);
      return true;
    }
 else     if (newLevel < currentLevel && newLevel <= mainActivity.getParentUrlLevel()) {
      Intent returnIntent=new Intent();
      returnIntent.putExtra("String_Node_Str",url);
      returnIntent.putExtra("String_Node_Str",newLevel);
      returnIntent.putExtra("String_Node_Str",mainActivity.postLoadJavascript);
      mainActivity.setResult(Activity.RESULT_OK,returnIntent);
      mainActivity.finish();
      return true;
    }
  }
  if (newLevel >= 0) {
    mainActivity.setUrlLevel(newLevel);
  }
  final String newTitle=mainActivity.titleForUrl(url);
  if (newTitle != null) {
    mainActivity.runOnUiThread(new Runnable(){
      @Override public void run(){
        mainActivity.setTitle(newTitle);
      }
    }
);
  }
  mainActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      mainActivity.showLogoInActionBar(appConfig.shouldShowNavigationTitleImageForUrl(url));
    }
  }
);
  Pair<LeanWebView,WebViewPoolDisownPolicy> pair=WebViewPool.getInstance().webviewForUrl(url);
  LeanWebView poolWebview=pair.first;
  WebViewPoolDisownPolicy poolDisownPolicy=pair.second;
  if (poolWebview != null && poolDisownPolicy == WebViewPoolDisownPolicy.Always) {
    this.mainActivity.switchToWebview(poolWebview,true);
    this.mainActivity.checkNavigationForPage(url);
    WebViewPool.getInstance().disownWebview(poolWebview);
    LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(this.FINISHED_LOADING_MESSAGE));
    return true;
  }
  if (poolWebview != null && poolDisownPolicy == WebViewPoolDisownPolicy.Never) {
    this.mainActivity.switchToWebview(poolWebview,true);
    this.mainActivity.checkNavigationForPage(url);
    return true;
  }
  if (poolWebview != null && poolDisownPolicy == WebViewPoolDisownPolicy.Reload && !LeanUtils.urlsMatchOnPath(url,view.getUrl())) {
    this.mainActivity.switchToWebview(poolWebview,true);
    this.mainActivity.checkNavigationForPage(url);
    return true;
  }
  if (this.mainActivity.isPoolWebview) {
    WebViewPool.getInstance().disownWebview(view);
    this.mainActivity.isPoolWebview=false;
  }
  return false;
}

Fixed version (ground truth):
public boolean shouldOverrideUrlLoadingNoIntercept(final WebView view,final String url){
  if (url == null)   return false;
  boolean checkLoginSignup=((LeanWebView)view).checkLoginSignup();
  ((LeanWebView)view).setCheckLoginSignup(true);
  Uri uri=Uri.parse(url);
  final AppConfig appConfig=AppConfig.getInstance(mainActivity);
  if (checkLoginSignup && appConfig.loginUrl != null && LeanUtils.urlsMatchOnPath(url,appConfig.loginUrl)) {
    mainActivity.launchWebForm("String_Node_Str","String_Node_Str");
    return true;
  }
 else   if (checkLoginSignup && appConfig.signupUrl != null && LeanUtils.urlsMatchOnPath(url,appConfig.signupUrl)) {
    mainActivity.launchWebForm("String_Node_Str","String_Node_Str");
    return true;
  }
  if (!isInternalUri(uri)) {
    Intent intent=new Intent(Intent.ACTION_VIEW,uri);
    try {
      view.getContext().startActivity(intent);
    }
 catch (    ActivityNotFoundException e) {
      Log.e(TAG,e.getMessage(),e);
    }
    return true;
  }
  int currentLevel=mainActivity.getUrlLevel();
  int newLevel=mainActivity.urlLevelForUrl(url);
  if (currentLevel >= 0 && newLevel >= 0) {
    if (newLevel > currentLevel) {
      Intent intent=new Intent(mainActivity.getBaseContext(),MainActivity.class);
      intent.putExtra("String_Node_Str",false);
      intent.putExtra("String_Node_Str",url);
      intent.putExtra("String_Node_Str",currentLevel);
      intent.putExtra("String_Node_Str",mainActivity.postLoadJavascript);
      mainActivity.startActivityForResult(intent,MainActivity.REQUEST_WEB_ACTIVITY);
      return true;
    }
 else     if (newLevel < currentLevel && newLevel <= mainActivity.getParentUrlLevel()) {
      Intent returnIntent=new Intent();
      returnIntent.putExtra("String_Node_Str",url);
      returnIntent.putExtra("String_Node_Str",newLevel);
      returnIntent.putExtra("String_Node_Str",mainActivity.postLoadJavascript);
      mainActivity.setResult(Activity.RESULT_OK,returnIntent);
      mainActivity.finish();
      return true;
    }
  }
  if (newLevel >= 0) {
    mainActivity.setUrlLevel(newLevel);
  }
  final String newTitle=mainActivity.titleForUrl(url);
  if (newTitle != null) {
    mainActivity.runOnUiThread(new Runnable(){
      @Override public void run(){
        mainActivity.setTitle(newTitle);
      }
    }
);
  }
  mainActivity.runOnUiThread(new Runnable(){
    @Override public void run(){
      mainActivity.showLogoInActionBar(appConfig.shouldShowNavigationTitleImageForUrl(url));
    }
  }
);
  Pair<LeanWebView,WebViewPoolDisownPolicy> pair=WebViewPool.getInstance().webviewForUrl(url);
  final LeanWebView poolWebview=pair.first;
  WebViewPoolDisownPolicy poolDisownPolicy=pair.second;
  if (poolWebview != null && poolDisownPolicy == WebViewPoolDisownPolicy.Always) {
    this.mainActivity.runOnUiThread(new Runnable(){
      @Override public void run(){
        mainActivity.switchToWebview(poolWebview,true);
        mainActivity.checkNavigationForPage(url);
      }
    }
);
    WebViewPool.getInstance().disownWebview(poolWebview);
    LocalBroadcastManager.getInstance(mainActivity).sendBroadcast(new Intent(LeanWebviewClient.FINISHED_LOADING_MESSAGE));
    return true;
  }
  if (poolWebview != null && poolDisownPolicy == WebViewPoolDisownPolicy.Never) {
    this.mainActivity.runOnUiThread(new Runnable(){
      @Override public void run(){
        mainActivity.switchToWebview(poolWebview,true);
        mainActivity.checkNavigationForPage(url);
      }
    }
);
    return true;
  }
  if (poolWebview != null && poolDisownPolicy == WebViewPoolDisownPolicy.Reload && !LeanUtils.urlsMatchOnPath(url,view.getUrl())) {
    this.mainActivity.runOnUiThread(new Runnable(){
      @Override public void run(){
        mainActivity.switchToWebview(poolWebview,true);
        mainActivity.checkNavigationForPage(url);
      }
    }
);
    return true;
  }
  if (this.mainActivity.isPoolWebview) {
    WebViewPool.getInstance().disownWebview(view);
    this.mainActivity.isPoolWebview=false;
  }
  return false;
}