Program: 190987
Project: 190987
Buggy source:
static void updateDataType(int slot,int type,boolean showAtLeast3G,boolean show4GforLte,boolean hspaDistinguishable,int inet){
  log(TAG,"String_Node_Str" + String.format("String_Node_Str",slot,type,inet) + "String_Node_Str"+ String.valueOf(showAtLeast3G)+ "String_Node_Str"+ String.valueOf(show4GforLte)+ "String_Node_Str"+ String.valueOf(hspaDistinguishable));
  String resName=mDataTypeArray[slot];
  int resId=mRes.getIdentifier(resName,null,NS);
  String[] dataTypeArray=mRes.getStringArray(resId);
  log(TAG,"String_Node_Str" + resName + "String_Node_Str"+ resId);
switch (type) {
case TelephonyManager.NETWORK_TYPE_UNKNOWN:
    if (!showAtLeast3G) {
      mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
      mSelectedQSDataTypeIcon[slot]=0;
      mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
      mSelectedDataActivityIndex[slot]=0;
      mSelectedSignalStreagthIndex[slot]=0;
      break;
    }
 else {
    }
case TelephonyManager.NETWORK_TYPE_EDGE:
  if (!showAtLeast3G) {
    mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
    mSelectedQSDataTypeIcon[slot]=QS_DATA_E;
    mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
    mSelectedDataActivityIndex[slot]=DATA_TYPE_E;
    mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_E;
    break;
  }
 else {
  }
case TelephonyManager.NETWORK_TYPE_UMTS:
case TelephonyManager.NETWORK_TYPE_TD_SCDMA:
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_UMTS;
break;
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPA:
if (hspaDistinguishable || MobileSignalController.isCarrierOneSupported()) {
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
if (type == TelephonyManager.NETWORK_TYPE_HSPA && MobileSignalController.isCarrierOneSupported()) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_HP;
mSelectedDataTypeIcon[slot]=ICON_H_PLUS;
mSelectedQSDataTypeIcon[slot]=QS_DATA_H_PLUS;
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_HP;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_H;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_H;
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_H;
}
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[0],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[0];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
}
break;
case TelephonyManager.NETWORK_TYPE_HSPAP:
if (hspaDistinguishable || MobileSignalController.isCarrierOneSupported()) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_HP;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_H;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_HP;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[0],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
if (mRes.getBoolean(R.bool.config_show4gForHspap) || mRes.getBoolean(R.bool.show_network_indicators)) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_4G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[3],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_4G;
}
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[0];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
}
break;
case TelephonyManager.NETWORK_TYPE_CDMA:
if (!showAtLeast3G) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_1X;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_1X;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_CDMA;
break;
}
 else {
}
case TelephonyManager.NETWORK_TYPE_1xRTT:
if (!showAtLeast3G) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_1X;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_1X;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_1X;
break;
}
 else {
}
case TelephonyManager.NETWORK_TYPE_EVDO_0:
case TelephonyManager.NETWORK_TYPE_EVDO_A:
case TelephonyManager.NETWORK_TYPE_EVDO_B:
case TelephonyManager.NETWORK_TYPE_EHRPD:
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
break;
case TelephonyManager.NETWORK_TYPE_LTE:
case TelephonyManager.NETWORK_TYPE_LTE_CA:
if (!show4GforLte || MobileSignalController.isCarrierOneSupported()) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_LTE;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
if (type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
mSelectedQSDataTypeIcon[slot]=QS_DATA_LTE_PLUS;
}
 else {
mSelectedQSDataTypeIcon[slot]=QS_DATA_LTE;
}
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_4G;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_4G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[1],null,NS);
if (type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[2],null,NS);
}
mSelectedQSDataTypeIcon[slot]=QS_DATA_4G;
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[1];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_4G;
}
break;
case TelephonyManager.NETWORK_TYPE_GPRS:
case TelephonyManager.NETWORK_TYPE_GSM:
if (!showAtLeast3G) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_G;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_G;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[0],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[0];
;
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
}
break;
default :
mSelectedDataActivityIndex[slot]=DATA_TYPE_UNKNOWN;
mSelectedDataTypeIcon[slot]=0;
mSelectedQSDataTypeIcon[slot]=0;
mSelectedDataTypeDesc[slot]="String_Node_Str";
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_G;
break;
}
log(TAG,"String_Node_Str" + String.format("String_Node_Str",slot,mSelectedDataTypeIcon[slot],mSelectedDataActivityIndex[slot]));
}

Fixed version (ground truth):
static void updateDataType(int slot,int type,boolean showAtLeast3G,boolean show4GforLte,boolean hspaDistinguishable,int inet){
  log(TAG,"String_Node_Str" + String.format("String_Node_Str",slot,type,inet) + "String_Node_Str"+ String.valueOf(showAtLeast3G)+ "String_Node_Str"+ String.valueOf(show4GforLte)+ "String_Node_Str"+ String.valueOf(hspaDistinguishable));
  String resName=mDataTypeArray[slot];
  int resId=mRes.getIdentifier(resName,null,NS);
  String[] dataTypeArray=mRes.getStringArray(resId);
  log(TAG,"String_Node_Str" + resName + "String_Node_Str"+ resId);
switch (type) {
case TelephonyManager.NETWORK_TYPE_UNKNOWN:
    if (!showAtLeast3G) {
      mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
      mSelectedQSDataTypeIcon[slot]=0;
      mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
      mSelectedDataActivityIndex[slot]=0;
      mSelectedSignalStreagthIndex[slot]=0;
      break;
    }
 else {
    }
case TelephonyManager.NETWORK_TYPE_EDGE:
  if (!showAtLeast3G) {
    mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
    mSelectedQSDataTypeIcon[slot]=QS_DATA_E;
    mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
    mSelectedDataActivityIndex[slot]=DATA_TYPE_E;
    mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_E;
    break;
  }
 else {
  }
case TelephonyManager.NETWORK_TYPE_UMTS:
case TelephonyManager.NETWORK_TYPE_TD_SCDMA:
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_UMTS;
break;
case TelephonyManager.NETWORK_TYPE_HSDPA:
case TelephonyManager.NETWORK_TYPE_HSUPA:
case TelephonyManager.NETWORK_TYPE_HSPA:
if (hspaDistinguishable || MobileSignalController.isCarrierOneSupported()) {
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
if (type == TelephonyManager.NETWORK_TYPE_HSPA && MobileSignalController.isCarrierOneSupported()) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_HP;
mSelectedDataTypeIcon[slot]=ICON_H_PLUS;
mSelectedQSDataTypeIcon[slot]=QS_DATA_H_PLUS;
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_HP;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_H;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_H;
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_H;
}
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[0],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[0];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
}
break;
case TelephonyManager.NETWORK_TYPE_HSPAP:
if (hspaDistinguishable || MobileSignalController.isCarrierOneSupported()) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_HP;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_H;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_HP;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[0],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
if (mRes.getBoolean(R.bool.config_show4gForHspap) || mRes.getBoolean(R.bool.show_network_indicators)) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_4G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[3],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_4G;
}
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[0];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
}
break;
case TelephonyManager.NETWORK_TYPE_CDMA:
if (!showAtLeast3G) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_1X;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_1X;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_CDMA;
break;
}
 else {
}
case TelephonyManager.NETWORK_TYPE_1xRTT:
if (!showAtLeast3G) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_1X;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_1X;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_1X;
break;
}
 else {
}
case TelephonyManager.NETWORK_TYPE_EVDO_0:
case TelephonyManager.NETWORK_TYPE_EVDO_A:
case TelephonyManager.NETWORK_TYPE_EVDO_B:
case TelephonyManager.NETWORK_TYPE_EHRPD:
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
break;
case TelephonyManager.NETWORK_TYPE_LTE:
case TelephonyManager.NETWORK_TYPE_LTE_CA:
if (!show4GforLte || MobileSignalController.isCarrierOneSupported()) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_LTE;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
if (type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
mSelectedQSDataTypeIcon[slot]=QS_DATA_LTE_PLUS;
}
 else {
mSelectedQSDataTypeIcon[slot]=QS_DATA_LTE;
}
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_4G;
}
 else {
if (type == TelephonyManager.NETWORK_TYPE_LTE_CA) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_4G_PLUS;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[2],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_4G_PLUS;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_4G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[1],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_4G;
}
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[1];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_4G;
}
break;
case TelephonyManager.NETWORK_TYPE_GPRS:
case TelephonyManager.NETWORK_TYPE_GSM:
if (!showAtLeast3G) {
mSelectedDataActivityIndex[slot]=DATA_TYPE_G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(dataTypeArray[type],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_G;
mSelectedDataTypeDesc[slot]=mDataTypeDescriptionArray[type];
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_G;
}
 else {
mSelectedDataActivityIndex[slot]=DATA_TYPE_3G;
mSelectedDataTypeIcon[slot]=mRes.getIdentifier(mDataTypeGenerationArray[0],null,NS);
mSelectedQSDataTypeIcon[slot]=QS_DATA_3G;
mSelectedDataTypeDesc[slot]=mDataTypeGenerationDescArray[0];
;
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_3G;
}
break;
default :
mSelectedDataActivityIndex[slot]=DATA_TYPE_UNKNOWN;
mSelectedDataTypeIcon[slot]=0;
mSelectedQSDataTypeIcon[slot]=0;
mSelectedDataTypeDesc[slot]="String_Node_Str";
mSelectedSignalStreagthIndex[slot]=SIGNAL_STRENGTH_TYPE_G;
break;
}
log(TAG,"String_Node_Str" + String.format("String_Node_Str",slot,mSelectedDataTypeIcon[slot],mSelectedDataActivityIndex[slot]));
}