Program: 92747
Project: 92747
Buggy source:
public MaterialSection(Context ctx,int iconType,boolean hasRippleSupport,int target){
  rippleSupport=hasRippleSupport;
  if (rippleAnimationSupport()) {
switch (iconType) {
case ICON_NO_ICON:
      view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_ripple,null);
    text=(TextView)view.findViewById(R.id.section_text);
  notifications=(TextView)view.findViewById(R.id.section_notification);
ripple=(RevealColorView)view.findViewById(R.id.section_ripple);
break;
case ICON_24DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon_ripple,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
ripple=(RevealColorView)view.findViewById(R.id.section_ripple);
break;
case ICON_40DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon_large_ripple,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
ripple=(RevealColorView)view.findViewById(R.id.section_ripple);
break;
}
}
 else {
switch (iconType) {
case ICON_NO_ICON:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section,null);
text=(TextView)view.findViewById(R.id.section_text);
notifications=(TextView)view.findViewById(R.id.section_notification);
break;
case ICON_24DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
break;
case ICON_40DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon_large,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
break;
}
}
view.setOnTouchListener(this);
Resources.Theme theme=ctx.getTheme();
TypedValue typedValue=new TypedValue();
theme.resolveAttribute(R.attr.sectionStyle,typedValue,true);
TypedArray values=theme.obtainStyledAttributes(typedValue.resourceId,R.styleable.MaterialSection);
try {
colorPressed=values.getColor(R.styleable.MaterialSection_sectionBackgroundColorPressed,0x16000000);
colorUnpressed=values.getColor(R.styleable.MaterialSection_sectionBackgroundColor,0x00FFFFFF);
colorSelected=values.getColor(R.styleable.MaterialSection_sectionBackgroundColorSelected,0x0A000000);
iconColor=values.getColor(R.styleable.MaterialSection_sectionColorIcon,0x000);
textColor=values.getColor(R.styleable.MaterialSection_sectionColorText,0x000);
notificationColor=values.getColor(R.styleable.MaterialSection_sectionColorNotification,0x000);
if (textColor != 0x000) {
text.setTextColor(textColor);
}
if (notificationColor != 0x000) {
notifications.setTextColor(notificationColor);
}
}
  finally {
values.recycle();
}
isSelected=false;
hasSectionColor=false;
hasColorDark=false;
touchable=true;
realColor=false;
targetType=target;
numberNotifications=0;
}

Fixed version (ground truth):
public MaterialSection(Context ctx,int iconType,boolean hasRippleSupport,int target){
  rippleSupport=hasRippleSupport;
  if (rippleAnimationSupport()) {
switch (iconType) {
case ICON_NO_ICON:
      view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_ripple,null);
    text=(TextView)view.findViewById(R.id.section_text);
  notifications=(TextView)view.findViewById(R.id.section_notification);
ripple=(RevealColorView)view.findViewById(R.id.section_ripple);
break;
case ICON_24DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon_ripple,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
ripple=(RevealColorView)view.findViewById(R.id.section_ripple);
break;
case ICON_40DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon_large_ripple,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
ripple=(RevealColorView)view.findViewById(R.id.section_ripple);
break;
}
}
 else {
switch (iconType) {
case ICON_NO_ICON:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section,null);
text=(TextView)view.findViewById(R.id.section_text);
notifications=(TextView)view.findViewById(R.id.section_notification);
break;
case ICON_24DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
break;
case ICON_40DP:
view=LayoutInflater.from(ctx).inflate(R.layout.layout_material_section_icon_large,null);
text=(TextView)view.findViewById(R.id.section_text);
icon=(ImageView)view.findViewById(R.id.section_icon);
notifications=(TextView)view.findViewById(R.id.section_notification);
break;
}
}
view.setOnTouchListener(this);
Resources.Theme theme=ctx.getTheme();
TypedValue typedValue=new TypedValue();
theme.resolveAttribute(R.attr.sectionStyle,typedValue,true);
TypedArray values=theme.obtainStyledAttributes(typedValue.resourceId,R.styleable.MaterialSection);
try {
colorPressed=values.getColor(R.styleable.MaterialSection_sectionBackgroundColorPressed,0x16000000);
colorUnpressed=values.getColor(R.styleable.MaterialSection_sectionBackgroundColor,0x00FFFFFF);
colorSelected=values.getColor(R.styleable.MaterialSection_sectionBackgroundColorSelected,0x0A000000);
iconColor=values.getColor(R.styleable.MaterialSection_sectionColorIcon,0x000);
textColor=values.getColor(R.styleable.MaterialSection_sectionColorText,0x000);
notificationColor=values.getColor(R.styleable.MaterialSection_sectionColorNotification,0x000);
if (textColor != 0x000) {
text.setTextColor(textColor);
}
if (notificationColor != 0x000) {
notifications.setTextColor(notificationColor);
}
if (!rippleAnimationSupport()) view.setBackgroundColor(colorUnpressed);
 else ripple.reveal(0,0,colorUnpressed,0,0,null);
}
  finally {
values.recycle();
}
isSelected=false;
hasSectionColor=false;
hasColorDark=false;
touchable=true;
realColor=false;
targetType=target;
numberNotifications=0;
}