Program: 2095
Project: 2095
Buggy source:
private static void exportMethods(Context context,Object view,BufferedWriter out,Class<?> klass,String prefix) throws IOException {
  final Method[] methods=getExportedPropertyMethods(klass);
  int count=methods.length;
  for (int i=0; i < count; i++) {
    final Method method=methods[i];
    try {
      Object methodValue=method.invoke(view,(Object[])null);
      final Class<?> returnType=method.getReturnType();
      final ExportedProperty property=sAnnotations.get(method);
      String categoryPrefix=property.category().length() != 0 ? property.category() + "String_Node_Str" : "String_Node_Str";
      if (returnType == int.class) {
        if (property.resolveId() && context != null) {
          final int id=(Integer)methodValue;
          methodValue=resolveId(context,id);
        }
 else {
          final FlagToString[] flagsMapping=property.flagMapping();
          if (flagsMapping.length > 0) {
            final int intValue=(Integer)methodValue;
            final String valuePrefix=categoryPrefix + prefix + method.getName()+ '_';
            exportUnrolledFlags(out,flagsMapping,intValue,valuePrefix);
          }
          final IntToString[] mapping=property.mapping();
          if (mapping.length > 0) {
            final int intValue=(Integer)methodValue;
            boolean mapped=false;
            int mappingCount=mapping.length;
            for (int j=0; j < mappingCount; j++) {
              final IntToString mapper=mapping[j];
              if (mapper.from() == intValue) {
                methodValue=mapper.to();
                mapped=true;
                break;
              }
            }
            if (!mapped) {
              methodValue=intValue;
            }
          }
        }
      }
 else       if (returnType == int[].class) {
        final int[] array=(int[])methodValue;
        final String valuePrefix=categoryPrefix + prefix + method.getName()+ '_';
        final String suffix="String_Node_Str";
        exportUnrolledArray(context,out,property,array,valuePrefix,suffix);
        return;
      }
 else       if (!returnType.isPrimitive()) {
        if (property.deepExport()) {
          dumpViewProperties(context,methodValue,out,prefix + property.prefix());
          continue;
        }
      }
      writeEntry(out,categoryPrefix + prefix,method.getName(),"String_Node_Str",methodValue);
    }
 catch (    IllegalAccessException e) {
    }
catch (    InvocationTargetException e) {
    }
  }
}

Fixed version (ground truth):
private static void exportMethods(Context context,Object view,BufferedWriter out,Class<?> klass,String prefix) throws IOException {
  final Method[] methods=getExportedPropertyMethods(klass);
  int count=methods.length;
  for (int i=0; i < count; i++) {
    final Method method=methods[i];
    try {
      Object methodValue=callMethodOnAppropriateTheadBlocking(method,view);
      final Class<?> returnType=method.getReturnType();
      final ExportedProperty property=sAnnotations.get(method);
      String categoryPrefix=property.category().length() != 0 ? property.category() + "String_Node_Str" : "String_Node_Str";
      if (returnType == int.class) {
        if (property.resolveId() && context != null) {
          final int id=(Integer)methodValue;
          methodValue=resolveId(context,id);
        }
 else {
          final FlagToString[] flagsMapping=property.flagMapping();
          if (flagsMapping.length > 0) {
            final int intValue=(Integer)methodValue;
            final String valuePrefix=categoryPrefix + prefix + method.getName()+ '_';
            exportUnrolledFlags(out,flagsMapping,intValue,valuePrefix);
          }
          final IntToString[] mapping=property.mapping();
          if (mapping.length > 0) {
            final int intValue=(Integer)methodValue;
            boolean mapped=false;
            int mappingCount=mapping.length;
            for (int j=0; j < mappingCount; j++) {
              final IntToString mapper=mapping[j];
              if (mapper.from() == intValue) {
                methodValue=mapper.to();
                mapped=true;
                break;
              }
            }
            if (!mapped) {
              methodValue=intValue;
            }
          }
        }
      }
 else       if (returnType == int[].class) {
        final int[] array=(int[])methodValue;
        final String valuePrefix=categoryPrefix + prefix + method.getName()+ '_';
        final String suffix="String_Node_Str";
        exportUnrolledArray(context,out,property,array,valuePrefix,suffix);
        return;
      }
 else       if (!returnType.isPrimitive()) {
        if (property.deepExport()) {
          dumpViewProperties(context,methodValue,out,prefix + property.prefix());
          continue;
        }
      }
      writeEntry(out,categoryPrefix + prefix,method.getName(),"String_Node_Str",methodValue);
    }
 catch (    IllegalAccessException e) {
    }
catch (    InvocationTargetException e) {
    }
catch (    TimeoutException e) {
    }
  }
}