Program: 62151
Project: 62151
Buggy source:
private void getPrecontinues(GraphPart parent,GraphPart part,List<Loop> loops,List<GraphPart> stopPart,int level,List<GraphPart> visited){
  boolean debugMode=true;
  if (stopPart == null) {
    stopPart=new ArrayList<>();
  }
  if (debugMode) {
    System.err.println("String_Node_Str" + part);
  }
  if (stopPart.contains(part)) {
    return;
  }
  for (  Loop el : loops) {
    if ((el.phase == 2) && (el.loopContinue == part)) {
      throw new RuntimeException("String_Node_Str" + el);
    }
    if (el.phase != 1) {
      if (debugMode) {
      }
      continue;
    }
    if (el.loopContinue == part) {
      return;
    }
    if (el.loopPreContinue == part) {
      return;
    }
    if (el.loopBreak == part) {
      return;
    }
  }
  if (visited.contains(part)) {
    List<GraphPart> nextList=new ArrayList<>();
    populateParts(part,nextList);
    Loop nearestLoop=null;
    loopn:     for (    GraphPart n : nextList) {
      for (      Loop l : loops) {
        if (l.loopContinue == n) {
          nearestLoop=l;
          break loopn;
        }
      }
    }
    if ((nearestLoop != null) && (nearestLoop.loopContinue != part)) {
      if (nearestLoop.phase == 1) {
        if ((nearestLoop.loopPreContinue == null)) {
          nearestLoop.loopPreContinue=part;
          return;
        }
      }
    }
  }
  if (!visited.contains(part)) {
    visited.add(part);
  }
  List<GraphPart> loopContinues=getLoopsContinues(loops);
  boolean isLoop=false;
  Loop currentLoop=null;
  for (  Loop el : loops) {
    if ((el.phase == 0) && (el.loopContinue == part)) {
      isLoop=true;
      currentLoop=el;
      el.phase=1;
      break;
    }
  }
  List<GraphPart> nextParts=checkPrecoNextParts(part);
  if (nextParts == null) {
    nextParts=part.nextParts;
  }
  if (nextParts.size() == 2) {
    GraphPart next=getCommonPart(nextParts,loops);
    List<GraphPart> stopParts2=new ArrayList<>();
    if (next != null) {
      stopParts2.add(next);
    }
 else     if (!stopPart.isEmpty()) {
      stopParts2.add(stopPart.get(stopPart.size() - 1));
    }
    if (next != nextParts.get(0)) {
      getPrecontinues(part,nextParts.get(0),loops,next == null ? stopPart : stopParts2,level + 1,visited);
    }
    if (next != nextParts.get(1)) {
      getPrecontinues(part,nextParts.get(1),loops,next == null ? stopPart : stopParts2,level + 1,visited);
    }
    if (next != null) {
      getPrecontinues(part,next,loops,stopPart,level,visited);
    }
  }
  if (nextParts.size() > 2) {
    GraphPart next=getCommonPart(nextParts,loops);
    List<GraphPart> vis=new ArrayList<>();
    for (    GraphPart p : nextParts) {
      if (vis.contains(p)) {
        continue;
      }
      List<GraphPart> stopPart2=new ArrayList<>();
      if (next != null) {
        stopPart2.add(next);
      }
 else       if (!stopPart.isEmpty()) {
        stopPart2.add(stopPart.get(stopPart.size() - 1));
      }
      for (      GraphPart p2 : nextParts) {
        if (p2 == p) {
          continue;
        }
        List<GraphPart> p12=new ArrayList<>();
        p12.add(p);
        p12.add(p2);
        GraphPart n=getCommonPart(p12,loops);
        if (!stopPart2.contains(n)) {
          stopPart2.add(n);
        }
        if (!stopPart2.contains(p2)) {
          stopPart2.add(p2);
        }
      }
      if (next != p) {
        getPrecontinues(part,p,loops,stopPart2,level + 1,visited);
        vis.add(p);
      }
    }
    if (next != null) {
      getPrecontinues(part,next,loops,stopPart,level,visited);
    }
  }
  if (nextParts.size() == 1) {
    getPrecontinues(part,nextParts.get(0),loops,stopPart,level,visited);
  }
  for (  GraphPart t : part.throwParts) {
    if (!visited.contains(t)) {
      getPrecontinues(part,t,loops,stopPart,level,visited);
    }
  }
  if (isLoop) {
    if (currentLoop.loopBreak != null) {
      currentLoop.phase=2;
      getPrecontinues(null,currentLoop.loopBreak,loops,stopPart,level,visited);
    }
  }
}

Fixed version (ground truth):
private void getPrecontinues(GraphPart parent,GraphPart part,List<Loop> loops,List<GraphPart> stopPart){
  markLevels(part,loops);
  looploops:   for (  Loop l : loops) {
    if (l.loopContinue != null) {
      Set<GraphPart> uniqueRefs=new HashSet<>();
      uniqueRefs.addAll(l.loopContinue.refs);
      if (uniqueRefs.size() == 2) {
        List<GraphPart> uniqueRefsList=new ArrayList<>(uniqueRefs);
        if (uniqueRefsList.get(0).discoveredTime > uniqueRefsList.get(1).discoveredTime) {
          part=uniqueRefsList.get(0);
        }
 else {
          part=uniqueRefsList.get(1);
        }
        if (part == l.loopContinue) {
          continue looploops;
        }
        while (part.refs.size() == 1) {
          if (part.refs.get(0).nextParts.size() != 1) {
            continue looploops;
          }
          part=part.refs.get(0);
          if (part == l.loopContinue) {
            break;
          }
        }
        if (part.level == 0 && part != l.loopContinue) {
          l.loopPreContinue=part;
        }
      }
    }
  }
}