Program: 25667
Project: 25667
Buggy source:
@Override public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  final ViewHolder holder;
  if (convertView == null) {
    convertView=mInflater.inflate(R.layout.templateentry,parent);
    holder=new ViewHolder(convertView);
    convertView.setTag(holder);
  }
 else   holder=(ViewHolder)convertView.getTag();
  final int userId=Util.getUserId(Process.myUid());
  final String restrictionName=(String)getGroup(groupPosition);
  final Hook hook=(Hook)getChild(groupPosition,childPosition);
  final String settingName=restrictionName + "String_Node_Str" + hook.getName();
  String parentValue=PrivacyManager.getSetting(userId,getTemplate(),restrictionName,Boolean.toString(!ondemand) + "String_Node_Str");
  boolean parentRestricted=parentValue.contains("String_Node_Str");
  boolean parentAsked=(!ondemand || parentValue.contains("String_Node_Str"));
  String value=PrivacyManager.getSetting(userId,getTemplate(),settingName,null);
  if (value == null)   value=Boolean.toString(parentRestricted && !hook.isDangerous()) + (parentAsked || (hook.isDangerous() && hook.whitelist() == null) ? "String_Node_Str" : "String_Node_Str");
  holder.restricted=value.contains("String_Node_Str");
  holder.asked=(!ondemand || value.contains("String_Node_Str"));
  Bitmap bmRestricted=(parentRestricted && holder.restricted ? getFullCheckBox() : getOffCheckBox());
  Bitmap bmAsked=(parentAsked || holder.asked ? getOffCheckBox() : getOnDemandCheckBox());
  holder.imgIndicator.setVisibility(View.INVISIBLE);
  if (hook.isDangerous())   holder.row.setBackgroundColor(getResources().getColor(getThemed(hook.isDangerousDefined() ? R.attr.color_dangerous : R.attr.color_dangerous_user)));
 else   holder.row.setBackgroundColor(hook.isDangerousDefined() ? getResources().getColor(getThemed(R.attr.color_dangerous_off)) : Color.TRANSPARENT);
  holder.tvRestriction.setText(hook.getName());
  holder.imgCbRestrict.setEnabled(parentRestricted);
  holder.imgCbRestrict.setImageBitmap(bmRestricted);
  holder.imgCbAsk.setEnabled(!parentAsked);
  holder.imgCbAsk.setImageBitmap(bmAsked);
  holder.imgCbAsk.setVisibility(ondemand ? View.VISIBLE : View.GONE);
  if (Util.getUserId(Process.myUid()) == 0)   holder.tvRestriction.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View view){
      hook.toggleDangerous();
      if (hook.isDangerous())       holder.row.setBackgroundColor(getResources().getColor(getThemed(hook.isDangerousDefined() ? R.attr.color_dangerous : R.attr.color_dangerous_user)));
 else       holder.row.setBackgroundColor(hook.isDangerousDefined() ? getResources().getColor(getThemed(R.attr.color_dangerous_off)) : Color.TRANSPARENT);
      notifyDataSetChanged();
      return true;
    }
  }
);
  holder.imgCbRestrict.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View view){
      holder.restricted=!holder.restricted;
      PrivacyManager.setSetting(userId,getTemplate(),settingName,(holder.restricted ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + (holder.asked ? "String_Node_Str" : "String_Node_Str"));
      notifyDataSetChanged();
    }
  }
);
  holder.imgCbAsk.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View view){
      holder.asked=!holder.asked;
      PrivacyManager.setSetting(userId,getTemplate(),settingName,(holder.restricted ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + (holder.asked ? "String_Node_Str" : "String_Node_Str"));
      notifyDataSetChanged();
    }
  }
);
  return convertView;
}

Fixed version (ground truth):
@Override @SuppressLint("String_Node_Str") public View getChildView(int groupPosition,int childPosition,boolean isLastChild,View convertView,ViewGroup parent){
  final ViewHolder holder;
  if (convertView == null) {
    convertView=mInflater.inflate(R.layout.templateentry,null);
    holder=new ViewHolder(convertView);
    convertView.setTag(holder);
  }
 else   holder=(ViewHolder)convertView.getTag();
  final int userId=Util.getUserId(Process.myUid());
  final String restrictionName=(String)getGroup(groupPosition);
  final Hook hook=(Hook)getChild(groupPosition,childPosition);
  final String settingName=restrictionName + "String_Node_Str" + hook.getName();
  String parentValue=PrivacyManager.getSetting(userId,getTemplate(),restrictionName,Boolean.toString(!ondemand) + "String_Node_Str");
  boolean parentRestricted=parentValue.contains("String_Node_Str");
  boolean parentAsked=(!ondemand || parentValue.contains("String_Node_Str"));
  String value=PrivacyManager.getSetting(userId,getTemplate(),settingName,null);
  if (value == null)   value=Boolean.toString(parentRestricted && !hook.isDangerous()) + (parentAsked || (hook.isDangerous() && hook.whitelist() == null) ? "String_Node_Str" : "String_Node_Str");
  holder.restricted=value.contains("String_Node_Str");
  holder.asked=(!ondemand || value.contains("String_Node_Str"));
  Bitmap bmRestricted=(parentRestricted && holder.restricted ? getFullCheckBox() : getOffCheckBox());
  Bitmap bmAsked=(parentAsked || holder.asked ? getOffCheckBox() : getOnDemandCheckBox());
  holder.imgIndicator.setVisibility(View.INVISIBLE);
  if (hook.isDangerous())   holder.row.setBackgroundColor(getResources().getColor(getThemed(hook.isDangerousDefined() ? R.attr.color_dangerous : R.attr.color_dangerous_user)));
 else   holder.row.setBackgroundColor(hook.isDangerousDefined() ? getResources().getColor(getThemed(R.attr.color_dangerous_off)) : Color.TRANSPARENT);
  holder.tvRestriction.setText(hook.getName());
  holder.imgCbRestrict.setEnabled(parentRestricted);
  holder.imgCbRestrict.setImageBitmap(bmRestricted);
  holder.imgCbAsk.setEnabled(!parentAsked);
  holder.imgCbAsk.setImageBitmap(bmAsked);
  holder.imgCbAsk.setVisibility(ondemand ? View.VISIBLE : View.GONE);
  if (Util.getUserId(Process.myUid()) == 0)   holder.tvRestriction.setOnLongClickListener(new View.OnLongClickListener(){
    @Override public boolean onLongClick(    View view){
      hook.toggleDangerous();
      if (hook.isDangerous())       holder.row.setBackgroundColor(getResources().getColor(getThemed(hook.isDangerousDefined() ? R.attr.color_dangerous : R.attr.color_dangerous_user)));
 else       holder.row.setBackgroundColor(hook.isDangerousDefined() ? getResources().getColor(getThemed(R.attr.color_dangerous_off)) : Color.TRANSPARENT);
      notifyDataSetChanged();
      return true;
    }
  }
);
  holder.imgCbRestrict.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View view){
      holder.restricted=!holder.restricted;
      PrivacyManager.setSetting(userId,getTemplate(),settingName,(holder.restricted ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + (holder.asked ? "String_Node_Str" : "String_Node_Str"));
      notifyDataSetChanged();
    }
  }
);
  holder.imgCbAsk.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View view){
      holder.asked=!holder.asked;
      PrivacyManager.setSetting(userId,getTemplate(),settingName,(holder.restricted ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str" + (holder.asked ? "String_Node_Str" : "String_Node_Str"));
      notifyDataSetChanged();
    }
  }
);
  return convertView;
}