Program: 41109
Project: 41109
Buggy source:
/** 
 * Copy the fields from delta into this Configuration object, keeping track of which ones have changed.  Any undefined fields in <var>delta</var> are ignored and not copied in to the current Configuration.
 * @return Returns a bit mask of the changed fields, as per{@link #diff}.
 */
public int updateFrom(Configuration delta){
  int changed=0;
  if (delta.fontScale > 0 && fontScale != delta.fontScale) {
    changed|=ActivityInfo.CONFIG_FONT_SCALE;
    fontScale=delta.fontScale;
  }
  if (delta.mcc != 0 && mcc != delta.mcc) {
    changed|=ActivityInfo.CONFIG_MCC;
    mcc=delta.mcc;
  }
  if (delta.mnc != 0 && mnc != delta.mnc) {
    changed|=ActivityInfo.CONFIG_MNC;
    mnc=delta.mnc;
  }
  if (delta.locale != null && (locale == null || !locale.equals(delta.locale))) {
    changed|=ActivityInfo.CONFIG_LOCALE;
    locale=delta.locale != null ? (Locale)delta.locale.clone() : null;
  }
  if (delta.userSetLocale && (!userSetLocale || ((changed & ActivityInfo.CONFIG_LOCALE) != 0))) {
    userSetLocale=true;
    changed|=ActivityInfo.CONFIG_LOCALE;
  }
  if (delta.touchscreen != TOUCHSCREEN_UNDEFINED && touchscreen != delta.touchscreen) {
    changed|=ActivityInfo.CONFIG_TOUCHSCREEN;
    touchscreen=delta.touchscreen;
  }
  if (delta.keyboard != KEYBOARD_UNDEFINED && keyboard != delta.keyboard) {
    changed|=ActivityInfo.CONFIG_KEYBOARD;
    keyboard=delta.keyboard;
  }
  if (delta.keyboardHidden != KEYBOARDHIDDEN_UNDEFINED && keyboardHidden != delta.keyboardHidden) {
    changed|=ActivityInfo.CONFIG_KEYBOARD_HIDDEN;
    keyboardHidden=delta.keyboardHidden;
  }
  if (delta.hardKeyboardHidden != HARDKEYBOARDHIDDEN_UNDEFINED && hardKeyboardHidden != delta.hardKeyboardHidden) {
    changed|=ActivityInfo.CONFIG_KEYBOARD_HIDDEN;
    hardKeyboardHidden=delta.hardKeyboardHidden;
  }
  if (delta.navigation != NAVIGATION_UNDEFINED && navigation != delta.navigation) {
    changed|=ActivityInfo.CONFIG_NAVIGATION;
    navigation=delta.navigation;
  }
  if (delta.navigationHidden != NAVIGATIONHIDDEN_UNDEFINED && navigationHidden != delta.navigationHidden) {
    changed|=ActivityInfo.CONFIG_KEYBOARD_HIDDEN;
    navigationHidden=delta.navigationHidden;
  }
  if (delta.orientation != ORIENTATION_UNDEFINED && orientation != delta.orientation) {
    changed|=ActivityInfo.CONFIG_ORIENTATION;
    orientation=delta.orientation;
  }
  if (delta.screenLayout != SCREENLAYOUT_SIZE_UNDEFINED && screenLayout != delta.screenLayout) {
    changed|=ActivityInfo.CONFIG_SCREEN_LAYOUT;
    screenLayout=delta.screenLayout;
  }
  if (delta.uiMode != (UI_MODE_TYPE_UNDEFINED | UI_MODE_NIGHT_UNDEFINED) && uiMode != delta.uiMode) {
    changed|=ActivityInfo.CONFIG_UI_MODE;
    if ((delta.uiMode & UI_MODE_TYPE_MASK) != UI_MODE_TYPE_UNDEFINED) {
      uiMode=(uiMode & ~UI_MODE_TYPE_MASK) | (delta.uiMode & UI_MODE_TYPE_MASK);
    }
    if ((delta.uiMode & UI_MODE_NIGHT_MASK) != UI_MODE_NIGHT_UNDEFINED) {
      uiMode=(uiMode & ~UI_MODE_NIGHT_MASK) | (delta.uiMode & UI_MODE_NIGHT_MASK);
    }
  }
  if (delta.seq != 0) {
    seq=delta.seq;
  }
  if (!CustomTheme.nullSafeEquals(delta.customTheme,customTheme)) {
    changed|=ActivityInfo.CONFIG_THEME_RESOURCE;
    customTheme=(delta != null ? (CustomTheme)delta.customTheme.clone() : CustomTheme.getDefault());
  }
  return changed;
}

Fixed version (ground truth):
/** 
 * Copy the fields from delta into this Configuration object, keeping track of which ones have changed.  Any undefined fields in <var>delta</var> are ignored and not copied in to the current Configuration.
 * @return Returns a bit mask of the changed fields, as per{@link #diff}.
 */
public int updateFrom(Configuration delta){
  int changed=0;
  if (delta.fontScale > 0 && fontScale != delta.fontScale) {
    changed|=ActivityInfo.CONFIG_FONT_SCALE;
    fontScale=delta.fontScale;
  }
  if (delta.mcc != 0 && mcc != delta.mcc) {
    changed|=ActivityInfo.CONFIG_MCC;
    mcc=delta.mcc;
  }
  if (delta.mnc != 0 && mnc != delta.mnc) {
    changed|=ActivityInfo.CONFIG_MNC;
    mnc=delta.mnc;
  }
  if (delta.locale != null && (locale == null || !locale.equals(delta.locale))) {
    changed|=ActivityInfo.CONFIG_LOCALE;
    locale=delta.locale != null ? (Locale)delta.locale.clone() : null;
  }
  if (delta.userSetLocale && (!userSetLocale || ((changed & ActivityInfo.CONFIG_LOCALE) != 0))) {
    userSetLocale=true;
    changed|=ActivityInfo.CONFIG_LOCALE;
  }
  if (delta.touchscreen != TOUCHSCREEN_UNDEFINED && touchscreen != delta.touchscreen) {
    changed|=ActivityInfo.CONFIG_TOUCHSCREEN;
    touchscreen=delta.touchscreen;
  }
  if (delta.keyboard != KEYBOARD_UNDEFINED && keyboard != delta.keyboard) {
    changed|=ActivityInfo.CONFIG_KEYBOARD;
    keyboard=delta.keyboard;
  }
  if (delta.keyboardHidden != KEYBOARDHIDDEN_UNDEFINED && keyboardHidden != delta.keyboardHidden) {
    changed|=ActivityInfo.CONFIG_KEYBOARD_HIDDEN;
    keyboardHidden=delta.keyboardHidden;
  }
  if (delta.hardKeyboardHidden != HARDKEYBOARDHIDDEN_UNDEFINED && hardKeyboardHidden != delta.hardKeyboardHidden) {
    changed|=ActivityInfo.CONFIG_KEYBOARD_HIDDEN;
    hardKeyboardHidden=delta.hardKeyboardHidden;
  }
  if (delta.navigation != NAVIGATION_UNDEFINED && navigation != delta.navigation) {
    changed|=ActivityInfo.CONFIG_NAVIGATION;
    navigation=delta.navigation;
  }
  if (delta.navigationHidden != NAVIGATIONHIDDEN_UNDEFINED && navigationHidden != delta.navigationHidden) {
    changed|=ActivityInfo.CONFIG_KEYBOARD_HIDDEN;
    navigationHidden=delta.navigationHidden;
  }
  if (delta.orientation != ORIENTATION_UNDEFINED && orientation != delta.orientation) {
    changed|=ActivityInfo.CONFIG_ORIENTATION;
    orientation=delta.orientation;
  }
  if (delta.screenLayout != SCREENLAYOUT_SIZE_UNDEFINED && screenLayout != delta.screenLayout) {
    changed|=ActivityInfo.CONFIG_SCREEN_LAYOUT;
    screenLayout=delta.screenLayout;
  }
  if (delta.uiMode != (UI_MODE_TYPE_UNDEFINED | UI_MODE_NIGHT_UNDEFINED) && uiMode != delta.uiMode) {
    changed|=ActivityInfo.CONFIG_UI_MODE;
    if ((delta.uiMode & UI_MODE_TYPE_MASK) != UI_MODE_TYPE_UNDEFINED) {
      uiMode=(uiMode & ~UI_MODE_TYPE_MASK) | (delta.uiMode & UI_MODE_TYPE_MASK);
    }
    if ((delta.uiMode & UI_MODE_NIGHT_MASK) != UI_MODE_NIGHT_UNDEFINED) {
      uiMode=(uiMode & ~UI_MODE_NIGHT_MASK) | (delta.uiMode & UI_MODE_NIGHT_MASK);
    }
  }
  if (delta.seq != 0) {
    seq=delta.seq;
  }
  if (delta.customTheme != null && (customTheme == null || !customTheme.equals(delta.customTheme))) {
    changed|=ActivityInfo.CONFIG_THEME_RESOURCE;
    customTheme=(CustomTheme)delta.customTheme.clone();
  }
  return changed;
}