Program: 185001
Project: 185001
Buggy source:
@Override protected void onNewIntent(Intent intent){
  TabControl.Tab current=mTabControl.getCurrentTab();
  if (current == null) {
    current=mTabControl.getTab(0);
    if (current == null) {
      return;
    }
    mTabControl.setCurrentTab(current);
    if (CUSTOM_BROWSER_BAR) {
      mTitleBar.setCurrentTab(mTabControl.getTabIndex(current));
    }
    attachTabToContentView(current);
    resetTitleAndIcon(current.getWebView());
  }
  final String action=intent.getAction();
  final int flags=intent.getFlags();
  if (Intent.ACTION_MAIN.equals(action) || (flags & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
    return;
  }
  if (Intent.ACTION_VIEW.equals(action) || Intent.ACTION_SEARCH.equals(action) || MediaStore.INTENT_ACTION_MEDIA_SEARCH.equals(action)|| Intent.ACTION_WEB_SEARCH.equals(action)) {
    if (handleWebSearchIntent(intent)) {
      return;
    }
    UrlData urlData=getUrlDataFromIntent(intent);
    if (urlData.isEmpty()) {
      urlData=new UrlData(mSettings.getHomePage());
    }
    urlData.setPostData(intent.getByteArrayExtra(Browser.EXTRA_POST_DATA));
    final String appId=intent.getStringExtra(Browser.EXTRA_APPLICATION_ID);
    if (Intent.ACTION_VIEW.equals(action) && !getPackageName().equals(appId) && (flags & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
      TabControl.Tab appTab=mTabControl.getTabFromId(appId);
      if (appTab != null) {
        Log.i(LOGTAG,"String_Node_Str" + appId);
        dismissSubWindow(appTab);
        removeTabFromContentView(appTab);
        boolean needsLoad=mTabControl.recreateWebView(appTab,urlData.mUrl);
        if (current != appTab) {
          switchToTab(mTabControl.getTabIndex(appTab));
          if (needsLoad) {
            urlData.loadIn(appTab.getWebView());
          }
        }
 else {
          attachTabToContentView(appTab);
          if (needsLoad) {
            urlData.loadIn(appTab.getWebView());
          }
        }
        return;
      }
 else {
        appTab=mTabControl.findUnusedTabWithUrl(urlData.mUrl);
        if (appTab != null && current != appTab) {
          switchToTab(mTabControl.getTabIndex(appTab));
        }
 else {
          openTabAndShow(urlData,true,appId);
        }
      }
    }
 else {
      if ("String_Node_Str".equals(urlData.mUrl)) {
        mSettings.toggleDebugSettings();
        return;
      }
      dismissSubWindow(current);
      urlData.loadIn(current.getWebView());
    }
  }
}

Fixed version (ground truth):
@Override protected void onNewIntent(Intent intent){
  TabControl.Tab current=mTabControl.getCurrentTab();
  if (current == null) {
    current=mTabControl.getTab(0);
    if (current == null) {
      return;
    }
    mTabControl.setCurrentTab(current);
    if (CUSTOM_BROWSER_BAR) {
      mTitleBar.setCurrentTab(mTabControl.getTabIndex(current));
    }
    attachTabToContentView(current);
    resetTitleAndIcon(current.getWebView());
  }
  final String action=intent.getAction();
  final int flags=intent.getFlags();
  if (Intent.ACTION_MAIN.equals(action) || (flags & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
    return;
  }
  if (Intent.ACTION_VIEW.equals(action) || Intent.ACTION_SEARCH.equals(action) || MediaStore.INTENT_ACTION_MEDIA_SEARCH.equals(action)|| Intent.ACTION_WEB_SEARCH.equals(action)) {
    if (handleWebSearchIntent(intent)) {
      return;
    }
    UrlData urlData=getUrlDataFromIntent(intent);
    if (urlData.isEmpty()) {
      urlData=new UrlData(mSettings.getHomePage());
    }
    urlData.setPostData(intent.getByteArrayExtra(Browser.EXTRA_POST_DATA));
    final String appId=intent.getStringExtra(Browser.EXTRA_APPLICATION_ID);
    if (Intent.ACTION_VIEW.equals(action) && !getPackageName().equals(appId) && (flags & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) {
      TabControl.Tab appTab=mTabControl.getTabFromId(appId);
      if (appTab != null) {
        Log.i(LOGTAG,"String_Node_Str" + appId);
        dismissSubWindow(appTab);
        removeTabFromContentView(appTab);
        boolean needsLoad=mTabControl.recreateWebView(appTab,urlData.mUrl);
        if (current != appTab) {
          switchToTab(mTabControl.getTabIndex(appTab));
          if (needsLoad) {
            urlData.loadIn(appTab.getWebView());
          }
        }
 else {
          attachTabToContentView(appTab);
          if (needsLoad) {
            urlData.loadIn(appTab.getWebView());
          }
        }
        return;
      }
 else {
        appTab=mTabControl.findUnusedTabWithUrl(urlData.mUrl);
        if (appTab != null) {
          if (current != appTab) {
            switchToTab(mTabControl.getTabIndex(appTab));
          }
        }
 else {
          openTabAndShow(urlData,true,appId);
        }
      }
    }
 else {
      if ("String_Node_Str".equals(urlData.mUrl)) {
        mSettings.toggleDebugSettings();
        return;
      }
      dismissSubWindow(current);
      urlData.loadIn(current.getWebView());
    }
  }
}