Program: 192286
Project: 192286
Buggy source:
/** 
 * Decides whether to update an Activity's configuration and whether to tell the Activity/Component about it.
 * @param cb The component callback to notify of configuration change.
 * @param activityToken The Activity binder token for which this configuration change happened.If the change is global, this is null.
 * @param newConfig The new configuration.
 * @param overrideConfig The override config that differentiates the Activity's configurationfrom the base global configuration.
 * @param reportToActivity Notify the Activity of the change.
 */
private void performConfigurationChanged(ComponentCallbacks2 cb,IBinder activityToken,Configuration newConfig,Configuration overrideConfig,boolean reportToActivity){
  Activity activity=(cb instanceof Activity) ? (Activity)cb : null;
  if (activity != null) {
    activity.mCalled=false;
  }
  boolean shouldChangeConfig=false;
  if ((activity == null) || (activity.mCurrentConfig == null)) {
    shouldChangeConfig=true;
  }
 else {
    int diff=activity.mCurrentConfig.diff(newConfig);
    if (diff != 0) {
      if ((~activity.mActivityInfo.getRealConfigChanged() & diff) == 0 || !reportToActivity) {
        shouldChangeConfig=true;
      }
    }
  }
  if (DEBUG_CONFIGURATION) {
    Slog.v(TAG,"String_Node_Str" + cb + "String_Node_Str"+ shouldChangeConfig);
  }
  if (shouldChangeConfig) {
    if (activityToken != null) {
      mResourcesManager.updateResourcesForActivity(activityToken,overrideConfig);
    }
    if (reportToActivity) {
      cb.onConfigurationChanged(newConfig);
    }
    if (activity != null) {
      if (reportToActivity && !activity.mCalled) {
        throw new SuperNotCalledException("String_Node_Str" + activity.getLocalClassName() + "String_Node_Str");
      }
      activity.mConfigChangeFlags=0;
      activity.mCurrentConfig=new Configuration(newConfig);
    }
  }
}

Fixed version (ground truth):
/** 
 * Decides whether to update an Activity's configuration and whether to tell the Activity/Component about it.
 * @param cb The component callback to notify of configuration change.
 * @param activityToken The Activity binder token for which this configuration change happened.If the change is global, this is null.
 * @param newConfig The new configuration.
 * @param overrideConfig The override config that differentiates the Activity's configurationfrom the base global configuration.
 * @param reportToActivity Notify the Activity of the change.
 */
private void performConfigurationChanged(ComponentCallbacks2 cb,IBinder activityToken,Configuration newConfig,Configuration overrideConfig,boolean reportToActivity){
  Activity activity=(cb instanceof Activity) ? (Activity)cb : null;
  if (activity != null) {
    activity.mCalled=false;
  }
  boolean shouldChangeConfig=false;
  if ((activity == null) || (activity.mCurrentConfig == null)) {
    shouldChangeConfig=true;
  }
 else {
    int diff=activity.mCurrentConfig.diff(newConfig);
    if (diff != 0) {
      if ((~activity.mActivityInfo.getRealConfigChanged() & diff) == 0 || !reportToActivity) {
        shouldChangeConfig=true;
      }
    }
  }
  if (DEBUG_CONFIGURATION) {
    Slog.v(TAG,"String_Node_Str" + cb + "String_Node_Str"+ shouldChangeConfig);
  }
  if (shouldChangeConfig) {
    if (activityToken != null) {
      mResourcesManager.updateResourcesForActivity(activityToken,overrideConfig);
    }
    if (reportToActivity) {
      Configuration configToReport=newConfig;
      if (cb instanceof ContextThemeWrapper) {
        ContextThemeWrapper contextThemeWrapper=(ContextThemeWrapper)cb;
        final Configuration localOverrideConfig=contextThemeWrapper.getOverrideConfiguration();
        if (localOverrideConfig != null) {
          configToReport=new Configuration(newConfig);
          configToReport.updateFrom(localOverrideConfig);
        }
      }
      cb.onConfigurationChanged(configToReport);
    }
    if (activity != null) {
      if (reportToActivity && !activity.mCalled) {
        throw new SuperNotCalledException("String_Node_Str" + activity.getLocalClassName() + "String_Node_Str");
      }
      activity.mConfigChangeFlags=0;
      activity.mCurrentConfig=new Configuration(newConfig);
    }
  }
}