Program: 28537
Project: 28537
Buggy source:
@Nullable private static ColorStateList inflateFromParser(Context context,LayoutParser parser){
  ColorStateList result=null;
  if (parser.isString("String_Node_Str")) {
    String colorType=parser.getString("String_Node_Str");
    if (TextUtils.equals(colorType,"String_Node_Str")) {
      if (parser.isArray("String_Node_Str")) {
        parser.peek();
        int listAllocated=20;
        int listSize=0;
        int[] colorList=new int[listAllocated];
        int[][] stateSpecList=new int[listAllocated][];
        while (parser.hasNext()) {
          if (!parser.isObject()) {
            continue;
          }
          parser.peek();
          if (parser.size() == 0) {
            continue;
          }
          int j=0;
          Integer baseColor=null;
          float alphaMod=1.0f;
          int[] stateSpec=new int[parser.size() - 1];
          boolean ignoreItem=false;
          while (parser.hasNext()) {
            parser.next();
            if (ignoreItem) {
              break;
            }
            if (!parser.isString()) {
              continue;
            }
            Integer attributeId=getAttribute(parser.getName());
            if (null != attributeId) {
switch (attributeId) {
case android.R.attr.type:
                if (!TextUtils.equals("String_Node_Str",parser.getString())) {
                  ignoreItem=true;
                }
              break;
case android.R.attr.color:
            String colorRes=parser.getString();
          if (!TextUtils.isEmpty(colorRes)) {
            baseColor=getColorFromAttributeValue(context,colorRes);
          }
        break;
case android.R.attr.alpha:
      String alphaStr=parser.getString();
    if (!TextUtils.isEmpty(alphaStr)) {
      alphaMod=Float.parseFloat(alphaStr);
    }
  break;
default :
stateSpec[j++]=parser.getBoolean() ? attributeId : -attributeId;
break;
}
}
}
if (!ignoreItem) {
stateSpec=StateSet.trimStateSet(stateSpec,j);
if (null == baseColor) {
throw new IllegalStateException("String_Node_Str");
}
if (listSize + 1 >= listAllocated) {
listAllocated=idealIntArraySize(listSize + 1);
int[] ncolor=new int[listAllocated];
System.arraycopy(colorList,0,ncolor,0,listSize);
int[][] nstate=new int[listAllocated][];
System.arraycopy(stateSpecList,0,nstate,0,listSize);
colorList=ncolor;
stateSpecList=nstate;
}
final int color=modulateColorAlpha(baseColor,alphaMod);
colorList[listSize]=color;
stateSpecList[listSize]=stateSpec;
listSize++;
}
}
if (listSize > 0) {
int[] colors=new int[listSize];
int[][] stateSpecs=new int[listSize][];
System.arraycopy(colorList,0,colors,0,listSize);
System.arraycopy(stateSpecList,0,stateSpecs,0,listSize);
result=new ColorStateList(stateSpecs,colors);
}
}
}
}
return result;
}

Fixed version (ground truth):
@Nullable private static ColorStateList inflateFromParser(Context context,LayoutParser parser){
  ColorStateList result=null;
  if (parser.isString("String_Node_Str")) {
    String colorType=parser.getString("String_Node_Str");
    if (TextUtils.equals(colorType,"String_Node_Str")) {
      if (parser.isArray("String_Node_Str")) {
        LayoutParser children=parser.peek("String_Node_Str");
        LayoutParser child;
        int listAllocated=20;
        int listSize=0;
        int[] colorList=new int[listAllocated];
        int[][] stateSpecList=new int[listAllocated][];
        while (children.hasNext()) {
          children.next();
          if (!children.isObject()) {
            continue;
          }
          child=children.peek();
          if (child.size() == 0) {
            continue;
          }
          int j=0;
          Integer baseColor=null;
          float alphaMod=1.0f;
          int[] stateSpec=new int[child.size() - 1];
          boolean ignoreItem=false;
          while (child.hasNext()) {
            child.next();
            if (ignoreItem) {
              break;
            }
            if (!child.isString()) {
              continue;
            }
            Integer attributeId=getAttribute(child.getName());
            if (null != attributeId) {
switch (attributeId) {
case android.R.attr.type:
                if (!TextUtils.equals("String_Node_Str",child.getString())) {
                  ignoreItem=true;
                }
              break;
case android.R.attr.color:
            String colorRes=child.getString();
          if (!TextUtils.isEmpty(colorRes)) {
            baseColor=getColorFromAttributeValue(context,colorRes);
          }
        break;
case android.R.attr.alpha:
      String alphaStr=child.getString();
    if (!TextUtils.isEmpty(alphaStr)) {
      alphaMod=Float.parseFloat(alphaStr);
    }
  break;
default :
stateSpec[j++]=child.getBoolean() ? attributeId : -attributeId;
break;
}
}
}
if (!ignoreItem) {
stateSpec=StateSet.trimStateSet(stateSpec,j);
if (null == baseColor) {
throw new IllegalStateException("String_Node_Str");
}
if (listSize + 1 >= listAllocated) {
listAllocated=idealIntArraySize(listSize + 1);
int[] ncolor=new int[listAllocated];
System.arraycopy(colorList,0,ncolor,0,listSize);
int[][] nstate=new int[listAllocated][];
System.arraycopy(stateSpecList,0,nstate,0,listSize);
colorList=ncolor;
stateSpecList=nstate;
}
final int color=modulateColorAlpha(baseColor,alphaMod);
colorList[listSize]=color;
stateSpecList[listSize]=stateSpec;
listSize++;
}
}
if (listSize > 0) {
int[] colors=new int[listSize];
int[][] stateSpecs=new int[listSize][];
System.arraycopy(colorList,0,colors,0,listSize);
System.arraycopy(stateSpecList,0,stateSpecs,0,listSize);
result=new ColorStateList(stateSpecs,colors);
}
}
}
}
return result;
}