Program: 39407
Project: 39407
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_gesture_lock);
  mGestureLockViewGroup=(GestureLockViewGroup)findViewById(R.id.id_gestureLockViewGroup);
  mForget=(TextView)findViewById(R.id.forget_secret);
  isSetting=getIntent().getBooleanExtra(IntentConstant.SETTING_MODE,false);
  mHeadImg=(CircleImageView)findViewById(R.id.profile_image);
  new UserManager(this).getMe(new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      if (msg.what == Constant.MSG_SUCCESS) {
        User user=(User)msg.obj;
        Glide.with(GestureLockActivity.this).load(user.getHeadImage()).placeholder(R.mipmap.suda).into(mHeadImg);
      }
    }
  }
);
  mForget.setText(Html.fromHtml("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
  mForget.setVisibility(isSetting ? View.INVISIBLE : View.VISIBLE);
  mForget.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Intent intent=new Intent(GestureLockActivity.this,LoginActivity.class);
      intent.putExtra(IntentConstant.FORGET_GESTURE,true);
      startActivityForResult(intent,REQUEST_CODE_FORGET_GESTURE);
    }
  }
);
  if (!isSetting) {
    secret=(String)SPUtils.get(this,Constant.SP_GESTURE,"String_Node_Str");
    mGestureLockViewGroup.setAnswer(secret);
  }
  if (TextUtils.isEmpty(secret) && !isSetting) {
    enterMain();
  }
  mTvTip=(TextView)findViewById(R.id.setting_tips);
  mTvTip.setText("String_Node_Str");
  mGestureLockViewGroup.setIsSetting(isSetting);
  mGestureLockViewGroup.setUnMatchExceedBoundary(mTryTime);
  mGestureLockViewGroup.setOnGestureLockViewListener(new GestureLockViewGroup.OnGestureLockViewListener(){
    @Override public void onUnmatchedExceedBoundary(    int errorCode){
      if (errorCode == GestureLockViewGroup.CODE_IN_VALID) {
        mTvTip.setText("String_Node_Str");
      }
      if (errorCode == GestureLockViewGroup.CODE_NOT_SAME) {
        mTvTip.setText("String_Node_Str");
        new Handler().postDelayed(new Runnable(){
          @Override public void run(){
            new UserManager(GestureLockActivity.this).logOut();
            enterMain();
          }
        }
,300);
      }
    }
    @Override public void onGestureEvent(    boolean matched){
      if (!matched) {
        mTryTime--;
        mTvTip.setText("String_Node_Str" + mTryTime + "String_Node_Str");
      }
 else       enterMain();
    }
    @Override public void onBlockSelected(    int cId){
    }
    @Override public void showSelect(    String value){
      if (isSetting) {
        if (TextUtils.isEmpty(secret)) {
          secret=value;
          mTvTip.setText("String_Node_Str");
        }
 else {
          if (!value.equals(secret)) {
            secret=value;
            mTvTip.setText("String_Node_Str");
          }
 else           if (value.equals(secret)) {
            mTvTip.setText("String_Node_Str");
            SPUtils.put(GestureLockActivity.this,Constant.SP_GESTURE,secret);
            finish();
          }
        }
      }
    }
  }
);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_gesture_lock);
  mGestureLockViewGroup=(GestureLockViewGroup)findViewById(R.id.id_gestureLockViewGroup);
  mForget=(TextView)findViewById(R.id.forget_secret);
  isSetting=getIntent().getBooleanExtra(IntentConstant.SETTING_MODE,false);
  mHeadImg=(CircleImageView)findViewById(R.id.profile_image);
  new UserManager(this).getMe(new Handler(){
    @Override public void handleMessage(    Message msg){
      super.handleMessage(msg);
      if (msg.what == Constant.MSG_SUCCESS) {
        User user=(User)msg.obj;
        Glide.with(GestureLockActivity.this).load(user.getHeadImage()).placeholder(R.mipmap.suda).into(mHeadImg);
      }
    }
  }
);
  mForget.setText(Html.fromHtml("String_Node_Str" + "String_Node_Str" + "String_Node_Str"));
  mForget.setVisibility(isSetting ? View.INVISIBLE : View.VISIBLE);
  mForget.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Intent intent=new Intent(GestureLockActivity.this,LoginActivity.class);
      intent.putExtra(IntentConstant.FORGET_GESTURE,true);
      startActivityForResult(intent,REQUEST_CODE_FORGET_GESTURE);
    }
  }
);
  if (!isSetting) {
    secret=(String)SPUtils.get(this,Constant.SP_GESTURE,"String_Node_Str");
    mGestureLockViewGroup.setAnswer(secret);
  }
  if (TextUtils.isEmpty(secret) && !isSetting) {
    enterMain();
  }
  mTvTip=(TextView)findViewById(R.id.setting_tips);
  mTvTip.setText("String_Node_Str");
  mGestureLockViewGroup.setIsSetting(isSetting);
  mGestureLockViewGroup.setUnMatchExceedBoundary(mTryTime);
  mGestureLockViewGroup.setOnGestureLockViewListener(new GestureLockViewGroup.OnGestureLockViewListener(){
    @Override public void onUnmatchedExceedBoundary(    int errorCode){
      if (errorCode == GestureLockViewGroup.CODE_IN_VALID) {
        mTvTip.setText("String_Node_Str");
      }
      if (errorCode == GestureLockViewGroup.CODE_NOT_SAME) {
        mTvTip.setText("String_Node_Str");
        new Handler().postDelayed(new Runnable(){
          @Override public void run(){
            new UserManager(GestureLockActivity.this).logOut();
            enterMain();
          }
        }
,300);
      }
    }
    @Override public void onGestureEvent(    boolean matched){
      if (!matched) {
        mTryTime--;
        mTvTip.setText("String_Node_Str" + mTryTime + "String_Node_Str");
      }
 else       enterMain();
    }
    @Override public void onBlockSelected(    int cId){
    }
    @Override public void showSelect(    String value){
      if (isSetting) {
        if (TextUtils.isEmpty(secret)) {
          secret=value;
          mTvTip.setText("String_Node_Str");
        }
 else {
          if (!value.equals(secret)) {
            mTvTip.setText("String_Node_Str");
          }
 else           if (value.equals(secret)) {
            mTvTip.setText("String_Node_Str");
            SPUtils.put(GestureLockActivity.this,Constant.SP_GESTURE,secret);
            finish();
          }
        }
      }
    }
  }
);
}