Program: 184698
Project: 184698
Buggy source:
@Override public void onCreate(Bundle instanceState){
  super.onCreate(instanceState);
  Intent intent=getIntent();
  mCameraReviewMode=intent.getBooleanExtra("String_Node_Str",false);
  mFullScreenInNormalMode=intent.getBooleanExtra(MediaStore.EXTRA_FULL_SCREEN,true);
  mShowActionIcons=intent.getBooleanExtra(MediaStore.EXTRA_SHOW_ACTION_ICONS,false);
  mPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  mCurrentOrientation=getResources().getConfiguration().orientation;
  setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.viewimage);
  mImageViews[0]=(ImageViewTouch)findViewById(R.id.image1);
  mImageViews[1]=(ImageViewTouch)findViewById(R.id.image2);
  mImageViews[2]=(ImageViewTouch)findViewById(R.id.image3);
  for (  ImageViewTouch v : mImageViews) {
    v.setEnableTrackballScroll(!mShowActionIcons);
  }
  mScroller=(ScrollHandler)findViewById(R.id.scroller);
  makeGetter();
  mAnimationIndex=-1;
  mSlideShowInAnimation=new Animation[]{makeInAnimation(R.anim.transition_in),makeInAnimation(R.anim.slide_in),makeInAnimation(R.anim.slide_in_vertical)};
  mSlideShowOutAnimation=new Animation[]{makeOutAnimation(R.anim.transition_out),makeOutAnimation(R.anim.slide_out),makeOutAnimation(R.anim.slide_out_vertical)};
  mSlideShowImageViews[0]=(ImageViewTouch)findViewById(R.id.image1_slideShow);
  mSlideShowImageViews[1]=(ImageViewTouch)findViewById(R.id.image2_slideShow);
  for (  ImageViewTouch v : mSlideShowImageViews) {
    v.setImageBitmapResetBase(null,true,true);
    v.setVisibility(View.INVISIBLE);
    v.setEnableTrackballScroll(!mShowActionIcons);
  }
  mActionIconPanel=findViewById(R.id.action_icon_panel);
{
    int[] pickIds={R.id.attach,R.id.cancel};
    int[] normalIds={R.id.gallery,R.id.setas,R.id.share,R.id.discard};
    int[] hideIds=pickIds;
    int[] connectIds=normalIds;
    if (isPickIntent()) {
      hideIds=normalIds;
      connectIds=pickIds;
    }
    for (    int id : hideIds) {
      mActionIconPanel.findViewById(id).setVisibility(View.GONE);
    }
    for (    int id : connectIds) {
      View view=mActionIconPanel.findViewById(id);
      view.setOnClickListener(this);
      Animation animation=new AlphaAnimation(0F,1F);
      animation.setDuration(500);
      view.setAnimation(animation);
    }
  }
  mShutterButton=findViewById(R.id.shutter_button);
  mShutterButton.setOnClickListener(this);
  Uri uri=getIntent().getData();
  if (Config.LOGV)   Log.v(TAG,"String_Node_Str" + uri);
  if (instanceState != null) {
    if (instanceState.containsKey("String_Node_Str")) {
      uri=Uri.parse(instanceState.getString("String_Node_Str"));
    }
  }
  if (uri == null) {
    finish();
    return;
  }
  init(uri);
  Bundle b=getIntent().getExtras();
  boolean slideShow=b != null ? b.getBoolean("String_Node_Str",false) : false;
  if (slideShow) {
    setMode(MODE_SLIDESHOW);
    loadNextImage(mCurrentPosition,0,true);
  }
 else {
    if (mFullScreenInNormalMode) {
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
    if (mShowActionIcons) {
      mActionIconPanel.setVisibility(View.VISIBLE);
      mShutterButton.setVisibility(View.VISIBLE);
    }
  }
  setupZoomButtonController(findViewById(R.id.rootLayout));
  setupDismissOnScreenControlRunnable();
  mNextImageView=findViewById(R.id.next_image);
  mPrevImageView=findViewById(R.id.prev_image);
  mNextImageView.setOnClickListener(this);
  mPrevImageView.setOnClickListener(this);
  if (mShowActionIcons) {
    mNextImageView.setFocusable(true);
    mPrevImageView.setFocusable(true);
  }
  setOrientation();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle instanceState){
  super.onCreate(instanceState);
  Intent intent=getIntent();
  mCameraReviewMode=intent.getBooleanExtra("String_Node_Str",false);
  mFullScreenInNormalMode=intent.getBooleanExtra(MediaStore.EXTRA_FULL_SCREEN,true);
  mShowActionIcons=intent.getBooleanExtra(MediaStore.EXTRA_SHOW_ACTION_ICONS,false);
  setRequestedOrientation();
  mPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  setDefaultKeyMode(DEFAULT_KEYS_SHORTCUT);
  requestWindowFeature(Window.FEATURE_NO_TITLE);
  setContentView(R.layout.viewimage);
  mImageViews[0]=(ImageViewTouch)findViewById(R.id.image1);
  mImageViews[1]=(ImageViewTouch)findViewById(R.id.image2);
  mImageViews[2]=(ImageViewTouch)findViewById(R.id.image3);
  for (  ImageViewTouch v : mImageViews) {
    v.setEnableTrackballScroll(!mShowActionIcons);
  }
  mScroller=(ScrollHandler)findViewById(R.id.scroller);
  makeGetter();
  mAnimationIndex=-1;
  mSlideShowInAnimation=new Animation[]{makeInAnimation(R.anim.transition_in),makeInAnimation(R.anim.slide_in),makeInAnimation(R.anim.slide_in_vertical)};
  mSlideShowOutAnimation=new Animation[]{makeOutAnimation(R.anim.transition_out),makeOutAnimation(R.anim.slide_out),makeOutAnimation(R.anim.slide_out_vertical)};
  mSlideShowImageViews[0]=(ImageViewTouch)findViewById(R.id.image1_slideShow);
  mSlideShowImageViews[1]=(ImageViewTouch)findViewById(R.id.image2_slideShow);
  for (  ImageViewTouch v : mSlideShowImageViews) {
    v.setImageBitmapResetBase(null,true,true);
    v.setVisibility(View.INVISIBLE);
    v.setEnableTrackballScroll(!mShowActionIcons);
  }
  mActionIconPanel=findViewById(R.id.action_icon_panel);
{
    int[] pickIds={R.id.attach,R.id.cancel};
    int[] normalIds={R.id.gallery,R.id.setas,R.id.share,R.id.discard};
    int[] hideIds=pickIds;
    int[] connectIds=normalIds;
    if (isPickIntent()) {
      hideIds=normalIds;
      connectIds=pickIds;
    }
    for (    int id : hideIds) {
      mActionIconPanel.findViewById(id).setVisibility(View.GONE);
    }
    for (    int id : connectIds) {
      View view=mActionIconPanel.findViewById(id);
      view.setOnClickListener(this);
      Animation animation=new AlphaAnimation(0F,1F);
      animation.setDuration(500);
      view.setAnimation(animation);
    }
  }
  mShutterButton=findViewById(R.id.shutter_button);
  mShutterButton.setOnClickListener(this);
  Uri uri=getIntent().getData();
  if (Config.LOGV)   Log.v(TAG,"String_Node_Str" + uri);
  if (instanceState != null) {
    if (instanceState.containsKey("String_Node_Str")) {
      uri=Uri.parse(instanceState.getString("String_Node_Str"));
    }
  }
  if (uri == null) {
    finish();
    return;
  }
  init(uri);
  Bundle b=getIntent().getExtras();
  boolean slideShow=b != null ? b.getBoolean("String_Node_Str",false) : false;
  if (slideShow) {
    setMode(MODE_SLIDESHOW);
    loadNextImage(mCurrentPosition,0,true);
  }
 else {
    if (mFullScreenInNormalMode) {
      getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
    if (mShowActionIcons) {
      mActionIconPanel.setVisibility(View.VISIBLE);
      mShutterButton.setVisibility(View.VISIBLE);
    }
  }
  setupZoomButtonController(findViewById(R.id.rootLayout));
  setupDismissOnScreenControlRunnable();
  mNextImageView=findViewById(R.id.next_image);
  mPrevImageView=findViewById(R.id.prev_image);
  mNextImageView.setOnClickListener(this);
  mPrevImageView.setOnClickListener(this);
  if (mShowActionIcons) {
    mNextImageView.setFocusable(true);
    mPrevImageView.setFocusable(true);
  }
}