Program: 42990
Project: 42990
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Context context=getContext();
  if (sStatusBar == null) {
    sStatusBar=(StatusBarManager)context.getSystemService(Context.STATUS_BAR_SERVICE);
  }
  setContentView(com.android.internal.R.layout.power_dialog);
  getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
  setTitle(context.getText(R.string.power_dialog));
  mKeyguard=(Button)findViewById(R.id.keyguard);
  mPower=(Button)findViewById(R.id.off);
  mRadioPower=(Button)findViewById(R.id.radio_power);
  mSilent=(Button)findViewById(R.id.silent);
  if (mKeyguard != null) {
    mKeyguard.setOnKeyListener(this);
    mKeyguard.setOnClickListener(this);
  }
  if (mPower != null) {
    mPower.setOnClickListener(this);
  }
  if (mRadioPower != null) {
    mRadioPower.setOnClickListener(this);
  }
  if (mSilent != null) {
    mSilent.setOnClickListener(this);
    mSilent.setVisibility(View.GONE);
  }
  CharSequence text;
  text=context.getText(R.string.screen_lock);
  mKeyguard.setText(text);
  mKeyguard.requestFocus();
  try {
    ITelephony phone=ITelephony.Stub.asInterface(ServiceManager.checkService("String_Node_Str"));
    if (phone != null) {
      text=phone.isRadioOn() ? context.getText(R.string.turn_off_radio) : context.getText(R.string.turn_on_radio);
    }
  }
 catch (  RemoteException ex) {
  }
  mRadioPower.setText(text);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Context context=getContext();
  if (sStatusBar == null) {
    sStatusBar=(StatusBarManager)context.getSystemService(Context.STATUS_BAR_SERVICE);
  }
  setContentView(com.android.internal.R.layout.power_dialog);
  getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
  if (!getContext().getResources().getBoolean(com.android.internal.R.bool.config_sf_slowBlur)) {
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
  }
  getWindow().setFlags(WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM,WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM);
  setTitle(context.getText(R.string.power_dialog));
  mKeyguard=(Button)findViewById(R.id.keyguard);
  mPower=(Button)findViewById(R.id.off);
  mRadioPower=(Button)findViewById(R.id.radio_power);
  mSilent=(Button)findViewById(R.id.silent);
  if (mKeyguard != null) {
    mKeyguard.setOnKeyListener(this);
    mKeyguard.setOnClickListener(this);
  }
  if (mPower != null) {
    mPower.setOnClickListener(this);
  }
  if (mRadioPower != null) {
    mRadioPower.setOnClickListener(this);
  }
  if (mSilent != null) {
    mSilent.setOnClickListener(this);
    mSilent.setVisibility(View.GONE);
  }
  CharSequence text;
  text=context.getText(R.string.screen_lock);
  mKeyguard.setText(text);
  mKeyguard.requestFocus();
  try {
    ITelephony phone=ITelephony.Stub.asInterface(ServiceManager.checkService("String_Node_Str"));
    if (phone != null) {
      text=phone.isRadioOn() ? context.getText(R.string.turn_off_radio) : context.getText(R.string.turn_on_radio);
    }
  }
 catch (  RemoteException ex) {
  }
  mRadioPower.setText(text);
}