Program: 43075
Project: 43075
Buggy source:
/** 
 * @param context The context.
 * @param lockPatternUtils Used to lookup lock pattern settings.
 * @param updateMonitor Used to lookup state affecting keyguard.
 * @param callback Used to notify the manager when we're done, etc.
 * @param totalFailedAttempts The current number of failed attempts.
 * @param enableFallback True if a backup unlock option is available when the user has forgottentheir pattern (e.g they have a google account so we can show them the account based backup option).
 */
UnlockScreen(Context context,LockPatternUtils lockPatternUtils,KeyguardUpdateMonitor updateMonitor,KeyguardScreenCallback callback,int totalFailedAttempts,boolean enableFallback){
  super(context);
  mLockPatternUtils=lockPatternUtils;
  mUpdateMonitor=updateMonitor;
  mCallback=callback;
  mTotalFailedPatternAttempts=totalFailedAttempts;
  mEnableFallback=enableFallback;
  mFailedPatternAttemptsSinceLastTimeout=totalFailedAttempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT;
  if (mUpdateMonitor.isInPortrait()) {
    LayoutInflater.from(context).inflate(R.layout.keyguard_screen_unlock_portrait,this,true);
  }
 else {
    LayoutInflater.from(context).inflate(R.layout.keyguard_screen_unlock_landscape,this,true);
  }
  mCarrier=(TextView)findViewById(R.id.carrier);
  mCenterDot=(TextView)findViewById(R.id.centerDot);
  mDate=(TextView)findViewById(R.id.date);
  mTime=(TextView)findViewById(R.id.time);
  mCenterDot.setText("String_Node_Str");
  refreshTimeAndDateDisplay();
  mStatus1=(TextView)findViewById(R.id.status1);
  mStatusSep=(TextView)findViewById(R.id.statusSep);
  mStatus2=(TextView)findViewById(R.id.status2);
  resetStatusInfo();
  mLockPatternView=(LockPatternView)findViewById(R.id.lockPattern);
  mFooterNormal=(ViewGroup)findViewById(R.id.footerNormal);
  mFooterForgotPattern=(ViewGroup)findViewById(R.id.footerForgotPattern);
  final OnClickListener emergencyClick=new OnClickListener(){
    public void onClick(    View v){
      mCallback.takeEmergencyCallAction();
    }
  }
;
  Button emergencyAlone=(Button)findViewById(R.id.emergencyCallAlone);
  emergencyAlone.setFocusable(false);
  emergencyAlone.setOnClickListener(emergencyClick);
  Button emergencyTogether=(Button)findViewById(R.id.emergencyCallTogether);
  emergencyTogether.setFocusable(false);
  emergencyTogether.setOnClickListener(emergencyClick);
  mForgotPatternButton=(Button)findViewById(R.id.forgotPattern);
  mForgotPatternButton.setText(R.string.lockscreen_forgot_pattern_button_text);
  mForgotPatternButton.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      mCallback.forgotPattern(true);
    }
  }
);
  setDefaultTouchRecepient(mLockPatternView);
  mLockPatternView.setSaveEnabled(false);
  mLockPatternView.setFocusable(false);
  mLockPatternView.setOnPatternListener(new UnlockPatternListener());
  mLockPatternView.setInStealthMode(!mLockPatternUtils.isVisiblePatternEnabled());
  mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
  updateFooter(FooterMode.Normal);
  mCreatedInPortrait=updateMonitor.isInPortrait();
  updateMonitor.registerInfoCallback(this);
  updateMonitor.registerSimStateCallback(this);
  updateMonitor.registerConfigurationChangeCallback(this);
  setFocusableInTouchMode(true);
  mCarrier.setText(LockScreen.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),mUpdateMonitor.getTelephonySpn()));
}

Fixed version (ground truth):
/** 
 * @param context The context.
 * @param lockPatternUtils Used to lookup lock pattern settings.
 * @param updateMonitor Used to lookup state affecting keyguard.
 * @param callback Used to notify the manager when we're done, etc.
 * @param totalFailedAttempts The current number of failed attempts.
 * @param enableFallback True if a backup unlock option is available when the user has forgottentheir pattern (e.g they have a google account so we can show them the account based backup option).
 */
UnlockScreen(Context context,LockPatternUtils lockPatternUtils,KeyguardUpdateMonitor updateMonitor,KeyguardScreenCallback callback,int totalFailedAttempts){
  super(context);
  mLockPatternUtils=lockPatternUtils;
  mUpdateMonitor=updateMonitor;
  mCallback=callback;
  mTotalFailedPatternAttempts=totalFailedAttempts;
  mFailedPatternAttemptsSinceLastTimeout=totalFailedAttempts % LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT;
  if (mUpdateMonitor.isInPortrait()) {
    LayoutInflater.from(context).inflate(R.layout.keyguard_screen_unlock_portrait,this,true);
  }
 else {
    LayoutInflater.from(context).inflate(R.layout.keyguard_screen_unlock_landscape,this,true);
  }
  mCarrier=(TextView)findViewById(R.id.carrier);
  mCenterDot=(TextView)findViewById(R.id.centerDot);
  mDate=(TextView)findViewById(R.id.date);
  mTime=(TextView)findViewById(R.id.time);
  mCenterDot.setText("String_Node_Str");
  refreshTimeAndDateDisplay();
  mStatus1=(TextView)findViewById(R.id.status1);
  mStatusSep=(TextView)findViewById(R.id.statusSep);
  mStatus2=(TextView)findViewById(R.id.status2);
  resetStatusInfo();
  mLockPatternView=(LockPatternView)findViewById(R.id.lockPattern);
  mFooterNormal=(ViewGroup)findViewById(R.id.footerNormal);
  mFooterForgotPattern=(ViewGroup)findViewById(R.id.footerForgotPattern);
  final OnClickListener emergencyClick=new OnClickListener(){
    public void onClick(    View v){
      mCallback.takeEmergencyCallAction();
    }
  }
;
  Button emergencyAlone=(Button)findViewById(R.id.emergencyCallAlone);
  emergencyAlone.setFocusable(false);
  emergencyAlone.setOnClickListener(emergencyClick);
  Button emergencyTogether=(Button)findViewById(R.id.emergencyCallTogether);
  emergencyTogether.setFocusable(false);
  emergencyTogether.setOnClickListener(emergencyClick);
  mForgotPatternButton=(Button)findViewById(R.id.forgotPattern);
  mForgotPatternButton.setText(R.string.lockscreen_forgot_pattern_button_text);
  mForgotPatternButton.setOnClickListener(new OnClickListener(){
    public void onClick(    View v){
      mCallback.forgotPattern(true);
    }
  }
);
  setDefaultTouchRecepient(mLockPatternView);
  mLockPatternView.setSaveEnabled(false);
  mLockPatternView.setFocusable(false);
  mLockPatternView.setOnPatternListener(new UnlockPatternListener());
  mLockPatternView.setInStealthMode(!mLockPatternUtils.isVisiblePatternEnabled());
  mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());
  updateFooter(FooterMode.Normal);
  mCreatedInPortrait=updateMonitor.isInPortrait();
  updateMonitor.registerInfoCallback(this);
  updateMonitor.registerSimStateCallback(this);
  updateMonitor.registerConfigurationChangeCallback(this);
  setFocusableInTouchMode(true);
  mCarrier.setText(LockScreen.getCarrierString(mUpdateMonitor.getTelephonyPlmn(),mUpdateMonitor.getTelephonySpn()));
}