Program: 184820
Project: 184820
Buggy source:
/** 
 * Updates the "on hold" box in the "other call" info area (ie. the stuff in the otherCallOnHoldInfo block) based on the specified Call. Or, clear out the "on hold" box if the specified call is null or idle.
 */
private void displayOnHoldCallStatus(Phone phone,Call call){
  if (DBG)   log("String_Node_Str" + call + "String_Node_Str");
  if ((call == null) || (PhoneApp.getInstance().isOtaCallInActiveState())) {
    mOtherCallOnHoldInfoArea.setVisibility(View.GONE);
    return;
  }
  String name=null;
  Call.State state=call.getState();
switch (state) {
case HOLDING:
    if (PhoneUtils.isConferenceCall(call)) {
      if (DBG)       log("String_Node_Str");
      name=getContext().getString(R.string.confCall);
    }
 else {
      if (DBG)       log("String_Node_Str");
      PhoneUtils.CallerInfoToken info=PhoneUtils.startGetCallerInfo(getContext(),call,this,mOtherCallOnHoldName);
      name=PhoneUtils.getCompactNameFromCallerInfo(info.currentInfo,getContext());
    }
  mOtherCallOnHoldName.setText(name);
mOtherCallOnHoldName.setTextColor(mTextColorOnHold);
mOtherCallOnHoldStatus.setTextColor(mTextColorOnHold);
mOtherCallOnHoldInfoArea.setVisibility(View.VISIBLE);
break;
case ACTIVE:
if (mApplication.phone.getPhoneName().equals("String_Node_Str")) {
List<Connection> connections=call.getConnections();
if (connections.size() > 2) {
name=getContext().getString(R.string.card_title_in_call);
}
 else {
Connection conn=call.getEarliestConnection();
PhoneUtils.CallerInfoToken info=PhoneUtils.startGetCallerInfo(getContext(),conn,this,mOtherCallOnHoldName);
name=PhoneUtils.getCompactNameFromCallerInfo(info.currentInfo,getContext());
}
mOtherCallOnHoldName.setText(name);
mOtherCallOnHoldName.setTextColor(mTextColorOnHold);
mOtherCallOnHoldStatus.setTextColor(mTextColorOnHold);
mOtherCallOnHoldInfoArea.setVisibility(View.VISIBLE);
}
break;
default :
mOtherCallOnHoldInfoArea.setVisibility(View.GONE);
break;
}
}

Fixed version (ground truth):
/** 
 * Updates the "on hold" box in the "other call" info area (ie. the stuff in the otherCallOnHoldInfo block) based on the specified Call. Or, clear out the "on hold" box if the specified call is null or idle.
 */
private void displayOnHoldCallStatus(Phone phone,Call call){
  if (DBG)   log("String_Node_Str" + call + "String_Node_Str");
  if ((call == null) || (PhoneApp.getInstance().isOtaCallInActiveState())) {
    mOtherCallOnHoldInfoArea.setVisibility(View.GONE);
    return;
  }
  String name=null;
  Call.State state=call.getState();
switch (state) {
case HOLDING:
    if (PhoneUtils.isConferenceCall(call)) {
      if (DBG)       log("String_Node_Str");
      name=getContext().getString(R.string.confCall);
    }
 else {
      if (DBG)       log("String_Node_Str");
      PhoneUtils.CallerInfoToken info=PhoneUtils.startGetCallerInfo(getContext(),call,this,mOtherCallOnHoldName);
      name=PhoneUtils.getCompactNameFromCallerInfo(info.currentInfo,getContext());
    }
  mOtherCallOnHoldName.setText(name);
mOtherCallOnHoldName.setTextColor(mTextColorOnHold);
mOtherCallOnHoldStatus.setTextColor(mTextColorOnHold);
mOtherCallOnHoldInfoArea.setVisibility(View.VISIBLE);
break;
case ACTIVE:
if (mApplication.phone.getPhoneName().equals("String_Node_Str")) {
List<Connection> connections=call.getConnections();
if (connections.size() > 2) {
name=getContext().getString(R.string.card_title_in_call);
}
 else {
Connection conn=call.getEarliestConnection();
PhoneUtils.CallerInfoToken infoToken=PhoneUtils.startGetCallerInfo(getContext(),conn,this,mOtherCallOnHoldName);
CallerInfo info=infoToken.currentInfo;
name=PhoneUtils.getCompactNameFromCallerInfo(info,getContext());
if (info != null && info.numberPresentation != Connection.PRESENTATION_ALLOWED) {
name=getPresentationString(info.numberPresentation);
}
}
mOtherCallOnHoldName.setText(name);
mOtherCallOnHoldName.setTextColor(mTextColorOnHold);
mOtherCallOnHoldStatus.setTextColor(mTextColorOnHold);
mOtherCallOnHoldInfoArea.setVisibility(View.VISIBLE);
}
break;
default :
mOtherCallOnHoldInfoArea.setVisibility(View.GONE);
break;
}
}