Program: 63495
Project: 63495
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (savedInstanceState != null) {
    mGfyName=savedInstanceState.getString(INSTANCE_GFY_NAME);
    mGfyMetadata=savedInstanceState.getParcelable(INSTANCE_GFY_METADATA);
    mCurrentPosition=savedInstanceState.getInt(INSTANCE_CURRENT_POSITION);
    mRecordedStats=savedInstanceState.getBoolean(INSTANCE_RECORDED_STATS);
  }
  GfycatApplication.get(this).inject(this);
  setContentView(R.layout.activity_main);
  ButterKnife.inject(this);
  mGestureDetector=new GestureDetector(this,mOnGestureListener);
  mVideoView.setSurfaceTextureListener(mSurfaceTextureListener);
  if (mGfyName == null && mGifUrl == null) {
    Intent intent=getIntent();
    if (Intent.ACTION_SEND.equals(intent.getAction())) {
      CharSequence sharedText=intent.getCharSequenceExtra(Intent.EXTRA_TEXT);
      if (!TextUtils.isEmpty(sharedText) && URLUtil.isNetworkUrl(sharedText.toString())) {
        mGifUrl=sharedText.toString();
      }
    }
 else {
      Uri data=intent.getData();
      String host=data.getHost();
      if (host != null && host.endsWith("String_Node_Str")) {
        List<String> pathSegments=data.getPathSegments();
        if (pathSegments.size() == 0) {
          showErrorDialog();
        }
 else         if (pathSegments.size() == 1) {
          mGfyName=pathSegments.get(0);
        }
 else         if (pathSegments.size() > 1 && pathSegments.get(0).equals("String_Node_Str")) {
          String strUrl=data.toString();
          mGifUrl=strUrl.substring(strUrl.indexOf("String_Node_Str") + 6);
        }
      }
 else {
        mGifUrl=data.toString();
      }
    }
    if (mGifUrl == null && mGfyName == null) {
      showErrorDialog();
      return;
    }
  }
  if (savedInstanceState == null) {
    mContainer.setAlpha(0);
    mContainer.animate().alpha(1);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  if (savedInstanceState != null) {
    mGfyName=savedInstanceState.getString(INSTANCE_GFY_NAME);
    mGfyMetadata=savedInstanceState.getParcelable(INSTANCE_GFY_METADATA);
    mCurrentPosition=savedInstanceState.getInt(INSTANCE_CURRENT_POSITION);
    mRecordedStats=savedInstanceState.getBoolean(INSTANCE_RECORDED_STATS);
  }
  GfycatApplication.get(this).inject(this);
  setContentView(R.layout.activity_main);
  ButterKnife.inject(this);
  mGestureDetector=new GestureDetector(this,mOnGestureListener);
  mVideoView.setSurfaceTextureListener(mSurfaceTextureListener);
  if (mGfyName == null && mGifUrl == null) {
    Intent intent=getIntent();
    if (Intent.ACTION_SEND.equals(intent.getAction())) {
      CharSequence sharedText=intent.getCharSequenceExtra(Intent.EXTRA_TEXT);
      if (!TextUtils.isEmpty(sharedText) && URLUtil.isNetworkUrl(sharedText.toString())) {
        mGifUrl=sharedText.toString();
      }
    }
 else {
      Uri data=intent.getData();
      if (data.getHost() != null && data.getHost().endsWith("String_Node_Str")) {
        List<String> pathSegments=data.getPathSegments();
        if (pathSegments.size() == 0) {
          showErrorDialog();
        }
 else         if (pathSegments.size() == 1) {
          mGfyName=pathSegments.get(0);
        }
 else         if (pathSegments.size() > 1 && pathSegments.get(0).equals("String_Node_Str")) {
          String strUrl=data.toString();
          mGifUrl=strUrl.substring(strUrl.indexOf("String_Node_Str") + 6);
        }
      }
 else {
        mGifUrl=data.toString();
      }
    }
    if (mGifUrl == null && mGfyName == null) {
      showErrorDialog();
      return;
    }
  }
  if (savedInstanceState == null) {
    mContainer.setAlpha(0);
    mContainer.animate().alpha(1);
  }
}