Program: 184571
Project: 184571
Buggy source:
private synchronized IImageList allImages(boolean assumeMounted){
  if (mAllImages == null) {
    mNoImagesView=findViewById(R.id.no_images);
    mInclusion=ImageManager.INCLUDE_IMAGES | ImageManager.INCLUDE_VIDEOS;
    Intent intent=getIntent();
    if (intent != null) {
      String type=intent.resolveType(this);
      TextView leftText=(TextView)findViewById(R.id.left_text);
      if (type != null) {
        if (isImageType(type)) {
          mInclusion=ImageManager.INCLUDE_IMAGES;
          if (isPickIntent()) {
            leftText.setText(R.string.pick_photos_gallery_title);
          }
 else {
            leftText.setText(R.string.photos_gallery_title);
          }
        }
        if (isVideoType(type)) {
          mInclusion=ImageManager.INCLUDE_VIDEOS;
          if (isPickIntent()) {
            leftText.setText(R.string.pick_videos_gallery_title);
          }
 else {
            leftText.setText(R.string.videos_gallery_title);
          }
        }
      }
      Bundle extras=intent.getExtras();
      String title=(extras != null) ? extras.getString("String_Node_Str") : null;
      if (title != null && title.length() > 0) {
        leftText.setText(title);
      }
      if (extras != null) {
        mInclusion=(ImageManager.INCLUDE_IMAGES | ImageManager.INCLUDE_VIDEOS) & extras.getInt("String_Node_Str",mInclusion);
      }
      if (extras != null && extras.getBoolean("String_Node_Str")) {
        Log.d(TAG,"String_Node_Str");
        mInclusion=ImageManager.INCLUDE_DRM_IMAGES;
      }
    }
    Uri uri=getIntent().getData();
    if (!assumeMounted) {
      mAllImages=ImageManager.emptyImageList();
    }
 else {
      mAllImages=ImageManager.allImages(getContentResolver(),ImageManager.DataLocation.NONE,mInclusion,mSortAscending ? ImageManager.SORT_ASCENDING : ImageManager.SORT_DESCENDING,(uri != null) ? uri.getQueryParameter("String_Node_Str") : null);
    }
  }
  return mAllImages;
}

Fixed version (ground truth):
private IImageList allImages(boolean assumeMounted){
  if (mAllImages == null) {
    mNoImagesView=findViewById(R.id.no_images);
    mInclusion=ImageManager.INCLUDE_IMAGES | ImageManager.INCLUDE_VIDEOS;
    Intent intent=getIntent();
    if (intent != null) {
      String type=intent.resolveType(this);
      TextView leftText=(TextView)findViewById(R.id.left_text);
      if (type != null) {
        if (isImageType(type)) {
          mInclusion=ImageManager.INCLUDE_IMAGES;
          if (isPickIntent()) {
            leftText.setText(R.string.pick_photos_gallery_title);
          }
 else {
            leftText.setText(R.string.photos_gallery_title);
          }
        }
        if (isVideoType(type)) {
          mInclusion=ImageManager.INCLUDE_VIDEOS;
          if (isPickIntent()) {
            leftText.setText(R.string.pick_videos_gallery_title);
          }
 else {
            leftText.setText(R.string.videos_gallery_title);
          }
        }
      }
      Bundle extras=intent.getExtras();
      String title=(extras != null) ? extras.getString("String_Node_Str") : null;
      if (title != null && title.length() > 0) {
        leftText.setText(title);
      }
      if (extras != null) {
        mInclusion=(ImageManager.INCLUDE_IMAGES | ImageManager.INCLUDE_VIDEOS) & extras.getInt("String_Node_Str",mInclusion);
      }
      if (extras != null && extras.getBoolean("String_Node_Str")) {
        Log.d(TAG,"String_Node_Str");
        mInclusion=ImageManager.INCLUDE_DRM_IMAGES;
      }
    }
    Uri uri=getIntent().getData();
    if (!assumeMounted) {
      mAllImages=ImageManager.emptyImageList();
    }
 else {
      mAllImages=ImageManager.allImages(getContentResolver(),ImageManager.DataLocation.NONE,mInclusion,mSortAscending ? ImageManager.SORT_ASCENDING : ImageManager.SORT_DESCENDING,(uri != null) ? uri.getQueryParameter("String_Node_Str") : null);
    }
  }
  return mAllImages;
}