Program: 142296
Project: 142296
Buggy source:
@Override protected Integer doInBackground(FormRecord... params){
  int progress=0;
  int target=params.length;
  while (progress < target && !isCancelled()) {
    FormRecord current=null;
synchronized (priorityQueue) {
      if (!priorityQueue.isEmpty()) {
        current=priorityQueue.poll();
        loaded.add(current.getID());
      }
      if (current == null) {
        current=params[progress++];
        if (loaded.contains(current.getID())) {
          continue;
        }
 else {
          loaded.add(current.getID());
        }
      }
    }
    ArrayList<String> cache=new ArrayList<String>();
    cache.add(android.text.format.DateUtils.formatDateTime(context,current.lastModified().getTime(),android.text.format.DateUtils.FORMAT_NO_MONTH_DAY | android.text.format.DateUtils.FORMAT_NO_YEAR).toLowerCase());
    SessionStateDescriptor ssd=null;
    try {
      ssd=descriptorStorage.getRecordForValue(SessionStateDescriptor.META_FORM_RECORD_ID,current.getID());
    }
 catch (    NoSuchElementException nsee) {
    }
    String dataTitle="String_Node_Str";
    if (ssd != null) {
      String descriptor=ssd.getSessionDescriptor();
      if (!descriptorCache.containsKey(descriptor)) {
        AndroidSessionWrapper asw=new AndroidSessionWrapper(platform);
        asw.loadFromStateDescription(ssd);
        try {
          dataTitle=asw.getTitle();
        }
 catch (        RuntimeException e) {
          dataTitle="String_Node_Str";
        }
        dataTitle=dataTitle == null ? "String_Node_Str" : dataTitle;
        descriptorCache.put(descriptor,dataTitle);
      }
 else {
        dataTitle=descriptorCache.get(descriptor);
      }
    }
    cache.add(dataTitle);
    this.publishProgress(new Pair<Integer,ArrayList<String>>(current.getID(),cache));
  }
  return 1;
}

Fixed version (ground truth):
@Override protected Integer doInBackground(FormRecord... params){
  int progress=0;
  int target=params.length;
  while (progress < target && !isCancelled()) {
    FormRecord current=null;
synchronized (priorityQueue) {
      if (!priorityQueue.isEmpty()) {
        current=priorityQueue.poll();
        loaded.add(current.getID());
      }
      if (current == null) {
        current=params[progress++];
        if (loaded.contains(current.getID())) {
          continue;
        }
 else {
          loaded.add(current.getID());
        }
      }
    }
    ArrayList<String> cache=new ArrayList<String>();
    cache.add(android.text.format.DateUtils.formatDateTime(context,current.lastModified().getTime(),android.text.format.DateUtils.FORMAT_NO_MONTH_DAY | android.text.format.DateUtils.FORMAT_NO_YEAR).toLowerCase());
    SessionStateDescriptor ssd=null;
    try {
      ssd=descriptorStorage.getRecordForValue(SessionStateDescriptor.META_FORM_RECORD_ID,current.getID());
    }
 catch (    NoSuchElementException nsee) {
    }
    String dataTitle="String_Node_Str";
    if (ssd != null) {
      String descriptor=ssd.getSessionDescriptor();
      if (!descriptorCache.containsKey(descriptor)) {
        AndroidSessionWrapper asw=new AndroidSessionWrapper(platform);
        asw.loadFromStateDescription(ssd);
        try {
          dataTitle=asw.getTitle();
        }
 catch (        RuntimeException e) {
          dataTitle="String_Node_Str";
        }
        dataTitle=dataTitle == null ? "String_Node_Str" : dataTitle;
        descriptorCache.put(descriptor,dataTitle);
      }
 else {
        dataTitle=descriptorCache.get(descriptor);
      }
    }
    cache.add(dataTitle);
    if (formNames.containsKey(current.getFormNamespace())) {
      Text name=formNames.get(current.getFormNamespace());
      cache.add(name.evaluate());
    }
    this.publishProgress(new Pair<Integer,ArrayList<String>>(current.getID(),cache));
  }
  return 1;
}