Program: 85300
Project: 85300
Buggy source:
private ArrayList<AnnotationElem> handleAnnotationElement(AnnotationElement ae,List<? extends EncodedValue> evList){
  ArrayList<AnnotationElem> aelemList=new ArrayList<AnnotationElem>();
  for (  EncodedValue ev : evList) {
    int type=ev.getValueType();
    AnnotationElem elem=null;
    Debug.printDbg("String_Node_Str",type);
switch (type) {
case 0x00:
{
        ByteEncodedValue v=(ByteEncodedValue)ev;
        elem=new AnnotationIntElem(v.getValue(),'B',ae.getName());
        break;
      }
case 0x02:
{
      ShortEncodedValue v=(ShortEncodedValue)ev;
      elem=new AnnotationIntElem(v.getValue(),'S',ae.getName());
      break;
    }
case 0x03:
{
    CharEncodedValue v=(CharEncodedValue)ev;
    elem=new AnnotationIntElem(v.getValue(),'C',ae.getName());
    break;
  }
case 0x04:
{
  IntEncodedValue v=(IntEncodedValue)ev;
  elem=new AnnotationIntElem(v.getValue(),'I',ae.getName());
  break;
}
case 0x06:
{
LongEncodedValue v=(LongEncodedValue)ev;
elem=new AnnotationLongElem(v.getValue(),'J',ae.getName());
break;
}
case 0x10:
{
FloatEncodedValue v=(FloatEncodedValue)ev;
elem=new AnnotationFloatElem(v.getValue(),'F',ae.getName());
break;
}
case 0x11:
{
DoubleEncodedValue v=(DoubleEncodedValue)ev;
elem=new AnnotationDoubleElem(v.getValue(),'D',ae.getName());
break;
}
case 0x17:
{
StringEncodedValue v=(StringEncodedValue)ev;
elem=new AnnotationStringElem(v.getValue(),'s',ae.getName());
Debug.printDbg("String_Node_Str",v.getValue());
break;
}
case 0x18:
{
TypeEncodedValue v=(TypeEncodedValue)ev;
elem=new AnnotationClassElem(DexType.toSootAT(v.getValue()),'c',ae.getName());
break;
}
case 0x19:
{
FieldEncodedValue v=(FieldEncodedValue)ev;
FieldReference fr=v.getValue();
String fieldSig="String_Node_Str";
fieldSig+=DexType.toSootAT(fr.getDefiningClass()) + "String_Node_Str";
fieldSig+=DexType.toSootAT(fr.getType()) + "String_Node_Str";
fieldSig+=fr.getName();
Debug.printDbg("String_Node_Str",fieldSig);
elem=new AnnotationStringElem(fieldSig,'f',ae.getName());
break;
}
case 0x1a:
{
MethodEncodedValue v=(MethodEncodedValue)ev;
MethodReference mr=v.getValue();
String className=DexType.toSootICAT(mr.getDefiningClass());
String returnType=DexType.toSootAT(mr.getReturnType());
String methodName=mr.getName();
String parameters="String_Node_Str";
for (CharSequence p : mr.getParameterTypes()) {
parameters+=DexType.toSootAT(p.toString());
}
String mSig=className + "String_Node_Str" + methodName+ "String_Node_Str"+ parameters+ "String_Node_Str"+ returnType;
elem=new AnnotationStringElem(mSig,'M',ae.getName());
break;
}
case 0x1b:
{
EnumEncodedValue v=(EnumEncodedValue)ev;
FieldReference fr=v.getValue();
elem=new AnnotationEnumElem(DexType.toSootAT(fr.getType()).toString(),fr.getName(),'e',ae.getName());
break;
}
case 0x1c:
{
ArrayEncodedValue v=(ArrayEncodedValue)ev;
ArrayList<AnnotationElem> l=handleAnnotationElement(ae,v.getValue());
if (l != null) elem=new AnnotationArrayElem(l,'[',ae.getName());
break;
}
case 0x1d:
{
AnnotationEncodedValue v=(AnnotationEncodedValue)ev;
AnnotationTag t=new AnnotationTag(DexType.toSootAT(v.getType()).toString());
for (AnnotationElement newElem : v.getElements()) {
List<EncodedValue> l=new ArrayList<EncodedValue>();
l.add(newElem.getValue());
List<AnnotationElem> aList=handleAnnotationElement(newElem,l);
if (aList != null) for (AnnotationElem e : aList) t.addElem(e);
}
elem=new AnnotationAnnotationElem(t,'@',ae.getName());
break;
}
case 0x1e:
{
elem=new AnnotationStringElem(null,'N',ae.getName());
break;
}
case 0x1f:
{
BooleanEncodedValue v=(BooleanEncodedValue)ev;
elem=new AnnotationBooleanElem(v.getValue(),'Z',ae.getName());
break;
}
default :
{
throw new RuntimeException("String_Node_Str" + Integer.toHexString(type));
}
}
if (elem != null) aelemList.add(elem);
}
return aelemList;
}

Fixed version (ground truth):
private ArrayList<AnnotationElem> handleAnnotationElement(AnnotationElement ae,List<? extends EncodedValue> evList){
  ArrayList<AnnotationElem> aelemList=new ArrayList<AnnotationElem>();
  for (  EncodedValue ev : evList) {
    int type=ev.getValueType();
    AnnotationElem elem=null;
    Debug.printDbg("String_Node_Str",type);
switch (type) {
case 0x00:
{
        ByteEncodedValue v=(ByteEncodedValue)ev;
        elem=new AnnotationIntElem(v.getValue(),'B',ae.getName());
        break;
      }
case 0x02:
{
      ShortEncodedValue v=(ShortEncodedValue)ev;
      elem=new AnnotationIntElem(v.getValue(),'S',ae.getName());
      break;
    }
case 0x03:
{
    CharEncodedValue v=(CharEncodedValue)ev;
    elem=new AnnotationIntElem(v.getValue(),'C',ae.getName());
    break;
  }
case 0x04:
{
  IntEncodedValue v=(IntEncodedValue)ev;
  elem=new AnnotationIntElem(v.getValue(),'I',ae.getName());
  break;
}
case 0x06:
{
LongEncodedValue v=(LongEncodedValue)ev;
elem=new AnnotationLongElem(v.getValue(),'J',ae.getName());
break;
}
case 0x10:
{
FloatEncodedValue v=(FloatEncodedValue)ev;
elem=new AnnotationFloatElem(v.getValue(),'F',ae.getName());
break;
}
case 0x11:
{
DoubleEncodedValue v=(DoubleEncodedValue)ev;
elem=new AnnotationDoubleElem(v.getValue(),'D',ae.getName());
break;
}
case 0x17:
{
StringEncodedValue v=(StringEncodedValue)ev;
elem=new AnnotationStringElem(v.getValue(),'s',ae.getName());
Debug.printDbg("String_Node_Str",v.getValue());
break;
}
case 0x18:
{
TypeEncodedValue v=(TypeEncodedValue)ev;
elem=new AnnotationClassElem(v.getValue(),'c',ae.getName());
break;
}
case 0x19:
{
FieldEncodedValue v=(FieldEncodedValue)ev;
FieldReference fr=v.getValue();
String fieldSig="String_Node_Str";
fieldSig+=DexType.toSootAT(fr.getDefiningClass()) + "String_Node_Str";
fieldSig+=DexType.toSootAT(fr.getType()) + "String_Node_Str";
fieldSig+=fr.getName();
Debug.printDbg("String_Node_Str",fieldSig);
elem=new AnnotationStringElem(fieldSig,'f',ae.getName());
break;
}
case 0x1a:
{
MethodEncodedValue v=(MethodEncodedValue)ev;
MethodReference mr=v.getValue();
String className=DexType.toSootICAT(mr.getDefiningClass());
String returnType=DexType.toSootAT(mr.getReturnType());
String methodName=mr.getName();
String parameters="String_Node_Str";
for (CharSequence p : mr.getParameterTypes()) {
parameters+=DexType.toSootAT(p.toString());
}
String mSig=className + "String_Node_Str" + methodName+ "String_Node_Str"+ parameters+ "String_Node_Str"+ returnType;
elem=new AnnotationStringElem(mSig,'M',ae.getName());
break;
}
case 0x1b:
{
EnumEncodedValue v=(EnumEncodedValue)ev;
FieldReference fr=v.getValue();
elem=new AnnotationEnumElem(DexType.toSootAT(fr.getType()).toString(),fr.getName(),'e',ae.getName());
break;
}
case 0x1c:
{
ArrayEncodedValue v=(ArrayEncodedValue)ev;
ArrayList<AnnotationElem> l=handleAnnotationElement(ae,v.getValue());
if (l != null) elem=new AnnotationArrayElem(l,'[',ae.getName());
break;
}
case 0x1d:
{
AnnotationEncodedValue v=(AnnotationEncodedValue)ev;
AnnotationTag t=new AnnotationTag(DexType.toSootAT(v.getType()).toString());
for (AnnotationElement newElem : v.getElements()) {
List<EncodedValue> l=new ArrayList<EncodedValue>();
l.add(newElem.getValue());
List<AnnotationElem> aList=handleAnnotationElement(newElem,l);
if (aList != null) for (AnnotationElem e : aList) t.addElem(e);
}
elem=new AnnotationAnnotationElem(t,'@',ae.getName());
break;
}
case 0x1e:
{
elem=new AnnotationStringElem(null,'N',ae.getName());
break;
}
case 0x1f:
{
BooleanEncodedValue v=(BooleanEncodedValue)ev;
elem=new AnnotationBooleanElem(v.getValue(),'Z',ae.getName());
break;
}
default :
{
throw new RuntimeException("String_Node_Str" + Integer.toHexString(type));
}
}
if (elem != null) aelemList.add(elem);
}
return aelemList;
}