Program: 198993
Project: 198993
Buggy source:
/** 
 * Updates the state, given the specified context 
 */
void update(Context context){
  SharedPreferences settings=context.getSharedPreferences(context.getPackageName(),0);
  Resources res=context.getResources();
  DisplayMetrics dm=res.getDisplayMetrics();
  mDisplayMetrics=dm;
  debugModeEnabled=settings.getBoolean(Constants.Values.App.Key_DebugModeEnabled,false);
  animationPxMovementPerSecond=res.getDimensionPixelSize(R.dimen.recents_animation_movement_in_dps_per_second);
  filteringCurrentViewsAnimDuration=res.getInteger(R.integer.recents_filter_animate_current_views_duration);
  filteringNewViewsAnimDuration=res.getInteger(R.integer.recents_filter_animate_new_views_duration);
  displayRect.set(0,0,dm.widthPixels,dm.heightPixels);
  isLandscape=res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
  transposeRecentsLayoutWithOrientation=res.getBoolean(R.bool.recents_transpose_layout_with_orientation);
  searchBarSpaceHeightPx=res.getDimensionPixelSize(R.dimen.recents_search_bar_space_height);
  searchBarAppWidgetId=settings.getInt(Constants.Values.App.Key_SearchAppWidgetId,-1);
  TypedValue widthPaddingPctValue=new TypedValue();
  res.getValue(R.dimen.recents_stack_width_padding_percentage,widthPaddingPctValue,true);
  taskStackWidthPaddingPct=widthPaddingPctValue.getFloat();
  taskStackMaxDim=res.getInteger(R.integer.recents_max_task_stack_view_dim);
  taskStackTopPaddingPx=res.getDimensionPixelSize(R.dimen.recents_stack_top_padding);
  taskViewEnterFromHomeDuration=res.getInteger(R.integer.recents_animate_task_enter_from_home_duration);
  taskViewEnterFromHomeDelay=res.getInteger(R.integer.recents_animate_task_enter_from_home_delay);
  taskViewExitToHomeDuration=res.getInteger(R.integer.recents_animate_task_exit_to_home_duration);
  taskViewRemoveAnimDuration=res.getInteger(R.integer.recents_animate_task_view_remove_duration);
  taskViewRemoveAnimTranslationXPx=res.getDimensionPixelSize(R.dimen.recents_task_view_remove_anim_translation_x);
  taskViewRoundedCornerRadiusPx=res.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
  taskViewHighlightPx=res.getDimensionPixelSize(R.dimen.recents_task_view_highlight);
  taskViewTranslationZMinPx=res.getDimensionPixelSize(R.dimen.recents_task_view_z_min);
  taskViewTranslationZIncrementPx=res.getDimensionPixelSize(R.dimen.recents_task_view_z_increment);
  taskViewShadowOutlineBottomInsetPx=res.getDimensionPixelSize(R.dimen.recents_task_view_shadow_outline_bottom_inset);
  taskBarViewDefaultBackgroundColor=res.getColor(R.color.recents_task_bar_default_background_color);
  taskBarViewLightTextColor=res.getColor(R.color.recents_task_bar_light_text_color);
  taskBarViewDarkTextColor=res.getColor(R.color.recents_task_bar_dark_text_color);
  taskBarViewHighlightColor=res.getColor(R.color.recents_task_bar_highlight_color);
  taskBarEnterAnimDuration=res.getInteger(R.integer.recents_animate_task_bar_enter_duration);
  taskBarEnterAnimDelay=res.getInteger(R.integer.recents_animate_task_bar_enter_delay);
  taskBarExitAnimDuration=res.getInteger(R.integer.recents_animate_task_bar_exit_duration);
  taskBarDismissDozeDelaySeconds=res.getInteger(R.integer.recents_task_bar_dismiss_delay_seconds);
  navBarScrimEnterDuration=res.getInteger(R.integer.recents_nav_bar_scrim_enter_duration);
  if (Console.Enabled) {
    Console.log(Constants.Log.UI.MeasureAndLayout,"String_Node_Str",isLandscape ? "String_Node_Str" : "String_Node_Str",Console.AnsiGreen);
  }
}

Fixed version (ground truth):
/** 
 * Updates the state, given the specified context 
 */
void update(Context context){
  SharedPreferences settings=context.getSharedPreferences(context.getPackageName(),0);
  Resources res=context.getResources();
  DisplayMetrics dm=res.getDisplayMetrics();
  mDisplayMetrics=dm;
  debugModeEnabled=settings.getBoolean(Constants.Values.App.Key_DebugModeEnabled,false);
  if (debugModeEnabled) {
    Console.Enabled=true;
  }
  animationPxMovementPerSecond=res.getDimensionPixelSize(R.dimen.recents_animation_movement_in_dps_per_second);
  filteringCurrentViewsAnimDuration=res.getInteger(R.integer.recents_filter_animate_current_views_duration);
  filteringNewViewsAnimDuration=res.getInteger(R.integer.recents_filter_animate_new_views_duration);
  displayRect.set(0,0,dm.widthPixels,dm.heightPixels);
  isLandscape=res.getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
  transposeRecentsLayoutWithOrientation=res.getBoolean(R.bool.recents_transpose_layout_with_orientation);
  searchBarSpaceHeightPx=res.getDimensionPixelSize(R.dimen.recents_search_bar_space_height);
  searchBarAppWidgetId=settings.getInt(Constants.Values.App.Key_SearchAppWidgetId,-1);
  TypedValue widthPaddingPctValue=new TypedValue();
  res.getValue(R.dimen.recents_stack_width_padding_percentage,widthPaddingPctValue,true);
  taskStackWidthPaddingPct=widthPaddingPctValue.getFloat();
  taskStackMaxDim=res.getInteger(R.integer.recents_max_task_stack_view_dim);
  taskStackTopPaddingPx=res.getDimensionPixelSize(R.dimen.recents_stack_top_padding);
  taskViewEnterFromHomeDuration=res.getInteger(R.integer.recents_animate_task_enter_from_home_duration);
  taskViewEnterFromHomeDelay=res.getInteger(R.integer.recents_animate_task_enter_from_home_delay);
  taskViewExitToHomeDuration=res.getInteger(R.integer.recents_animate_task_exit_to_home_duration);
  taskViewRemoveAnimDuration=res.getInteger(R.integer.recents_animate_task_view_remove_duration);
  taskViewRemoveAnimTranslationXPx=res.getDimensionPixelSize(R.dimen.recents_task_view_remove_anim_translation_x);
  taskViewRoundedCornerRadiusPx=res.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
  taskViewHighlightPx=res.getDimensionPixelSize(R.dimen.recents_task_view_highlight);
  taskViewTranslationZMinPx=res.getDimensionPixelSize(R.dimen.recents_task_view_z_min);
  taskViewTranslationZIncrementPx=res.getDimensionPixelSize(R.dimen.recents_task_view_z_increment);
  taskViewShadowOutlineBottomInsetPx=res.getDimensionPixelSize(R.dimen.recents_task_view_shadow_outline_bottom_inset);
  taskBarViewDefaultBackgroundColor=res.getColor(R.color.recents_task_bar_default_background_color);
  taskBarViewLightTextColor=res.getColor(R.color.recents_task_bar_light_text_color);
  taskBarViewDarkTextColor=res.getColor(R.color.recents_task_bar_dark_text_color);
  taskBarViewHighlightColor=res.getColor(R.color.recents_task_bar_highlight_color);
  taskBarEnterAnimDuration=res.getInteger(R.integer.recents_animate_task_bar_enter_duration);
  taskBarEnterAnimDelay=res.getInteger(R.integer.recents_animate_task_bar_enter_delay);
  taskBarExitAnimDuration=res.getInteger(R.integer.recents_animate_task_bar_exit_duration);
  taskBarDismissDozeDelaySeconds=res.getInteger(R.integer.recents_task_bar_dismiss_delay_seconds);
  navBarScrimEnterDuration=res.getInteger(R.integer.recents_nav_bar_scrim_enter_duration);
  if (Console.Enabled) {
    Console.log(Constants.Log.UI.MeasureAndLayout,"String_Node_Str",isLandscape ? "String_Node_Str" : "String_Node_Str",Console.AnsiGreen);
  }
}