Program: 170584
Project: 170584
Buggy source:
@SuppressWarnings("String_Node_Str") public CameraView(@NonNull Context context,@Nullable AttributeSet attrs){
  super(context,attrs);
  if (attrs != null) {
    TypedArray a=context.getTheme().obtainStyledAttributes(attrs,R.styleable.CameraView,0,0);
    try {
      mFacing=a.getInteger(R.styleable.CameraView_ckFacing,CameraKit.Defaults.DEFAULT_FACING);
      mFlash=a.getInteger(R.styleable.CameraView_ckFlash,CameraKit.Defaults.DEFAULT_FLASH);
      mFocus=a.getInteger(R.styleable.CameraView_ckFocus,CameraKit.Defaults.DEFAULT_FOCUS);
      mMethod=a.getInteger(R.styleable.CameraView_ckMethod,CameraKit.Defaults.DEFAULT_METHOD);
      mZoom=a.getInteger(R.styleable.CameraView_ckZoom,CameraKit.Defaults.DEFAULT_ZOOM);
      mPermissions=a.getInteger(R.styleable.CameraView_ckPermissions,CameraKit.Defaults.DEFAULT_PERMISSIONS);
      mVideoQuality=a.getInteger(R.styleable.CameraView_ckVideoQuality,CameraKit.Defaults.DEFAULT_VIDEO_QUALITY);
      mJpegQuality=a.getInteger(R.styleable.CameraView_ckJpegQuality,CameraKit.Defaults.DEFAULT_JPEG_QUALITY);
      mCropOutput=a.getBoolean(R.styleable.CameraView_ckCropOutput,CameraKit.Defaults.DEFAULT_CROP_OUTPUT);
      mAdjustViewBounds=a.getBoolean(R.styleable.CameraView_android_adjustViewBounds,CameraKit.Defaults.DEFAULT_ADJUST_VIEW_BOUNDS);
    }
  finally {
      a.recycle();
    }
  }
  mCameraListener=new CameraListenerMiddleWare();
  mPreviewImpl=new TextureViewPreview(context,this);
  mCameraImpl=new Camera1(mCameraListener,mPreviewImpl);
  setFacing(mFacing);
  setFlash(mFlash);
  setFocus(mFocus);
  setMethod(mMethod);
  setZoom(mZoom);
  setPermissions(mPermissions);
  setVideoQuality(mVideoQuality);
  mDisplayOrientationDetector=new DisplayOrientationDetector(context){
    @Override public void onDisplayOrientationChanged(    int displayOrientation){
      mCameraImpl.setDisplayOrientation(displayOrientation);
      mPreviewImpl.setDisplayOrientation(displayOrientation);
    }
  }
;
  final FocusMarkerLayout focusMarkerLayout=new FocusMarkerLayout(getContext());
  addView(focusMarkerLayout);
  focusMarkerLayout.setOnTouchListener(new OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent motionEvent){
      int action=motionEvent.getAction();
      if (motionEvent.getAction() == MotionEvent.ACTION_UP && mFocus == CameraKit.Constants.FOCUS_TAP_WITH_MARKER) {
        focusMarkerLayout.focus(motionEvent.getX(),motionEvent.getY());
      }
      mPreviewImpl.getView().dispatchTouchEvent(motionEvent);
      return true;
    }
  }
);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public CameraView(@NonNull Context context,@Nullable AttributeSet attrs){
  super(context,attrs);
  if (attrs != null) {
    TypedArray a=context.getTheme().obtainStyledAttributes(attrs,R.styleable.CameraView,0,0);
    try {
      mFacing=a.getInteger(R.styleable.CameraView_ckFacing,CameraKit.Defaults.DEFAULT_FACING);
      mFlash=a.getInteger(R.styleable.CameraView_ckFlash,CameraKit.Defaults.DEFAULT_FLASH);
      mFocus=a.getInteger(R.styleable.CameraView_ckFocus,CameraKit.Defaults.DEFAULT_FOCUS);
      mMethod=a.getInteger(R.styleable.CameraView_ckMethod,CameraKit.Defaults.DEFAULT_METHOD);
      mZoom=a.getInteger(R.styleable.CameraView_ckZoom,CameraKit.Defaults.DEFAULT_ZOOM);
      mPermissions=a.getInteger(R.styleable.CameraView_ckPermissions,CameraKit.Defaults.DEFAULT_PERMISSIONS);
      mVideoQuality=a.getInteger(R.styleable.CameraView_ckVideoQuality,CameraKit.Defaults.DEFAULT_VIDEO_QUALITY);
      mJpegQuality=a.getInteger(R.styleable.CameraView_ckJpegQuality,CameraKit.Defaults.DEFAULT_JPEG_QUALITY);
      mCropOutput=a.getBoolean(R.styleable.CameraView_ckCropOutput,CameraKit.Defaults.DEFAULT_CROP_OUTPUT);
      mAdjustViewBounds=a.getBoolean(R.styleable.CameraView_android_adjustViewBounds,CameraKit.Defaults.DEFAULT_ADJUST_VIEW_BOUNDS);
    }
  finally {
      a.recycle();
    }
  }
  mCameraListener=new CameraListenerMiddleWare();
  mPreviewImpl=new TextureViewPreview(context,this);
  mCameraImpl=new Camera1(mCameraListener,mPreviewImpl);
  setFacing(mFacing);
  setFlash(mFlash);
  setFocus(mFocus);
  setMethod(mMethod);
  setZoom(mZoom);
  setPermissions(mPermissions);
  setVideoQuality(mVideoQuality);
  if (!isInEditMode()) {
    mDisplayOrientationDetector=new DisplayOrientationDetector(context){
      @Override public void onDisplayOrientationChanged(      int displayOrientation){
        mCameraImpl.setDisplayOrientation(displayOrientation);
        mPreviewImpl.setDisplayOrientation(displayOrientation);
      }
    }
;
  }
  final FocusMarkerLayout focusMarkerLayout=new FocusMarkerLayout(getContext());
  addView(focusMarkerLayout);
  focusMarkerLayout.setOnTouchListener(new OnTouchListener(){
    @Override public boolean onTouch(    View v,    MotionEvent motionEvent){
      int action=motionEvent.getAction();
      if (motionEvent.getAction() == MotionEvent.ACTION_UP && mFocus == CameraKit.Constants.FOCUS_TAP_WITH_MARKER) {
        focusMarkerLayout.focus(motionEvent.getX(),motionEvent.getY());
      }
      mPreviewImpl.getView().dispatchTouchEvent(motionEvent);
      return true;
    }
  }
);
}