Program: 16851
Project: 16851
Buggy source:
private List<Location> parseLocationString(String string,int versus) throws ParserException {
  Matcher m;
  List<Location> boundedLocationsCollection=new ArrayList();
  List<String> tokens=splitString(string);
  for (  String t : tokens) {
    m=genbankSplitPattern.matcher(t);
    if (!m.find()) {
      throw new ParserException("String_Node_Str" + t + "String_Node_Str"+ string);
    }
    String splitQualifier=m.group(1);
    String splitString=m.group(2);
    if (!splitQualifier.isEmpty()) {
      int localVersus=splitQualifier.equalsIgnoreCase("String_Node_Str") ? -1 : 1;
      List<Location> subLocations=parseLocationString(splitString,versus * localVersus);
switch (complexFeaturesAppendMode) {
case FLATTEN:
        boundedLocationsCollection.addAll(subLocations);
      break;
case HIERARCHICAL:
    if (subLocations.size() == 1) {
      boundedLocationsCollection.addAll(subLocations);
    }
 else {
      Point min=Location.Tools.getMin(subLocations).getStart();
      Point max=Location.Tools.getMax(subLocations).getEnd();
      AbstractLocation motherLocation=new SimpleLocation(min,max);
      if (splitQualifier.equalsIgnoreCase("String_Node_Str")) {
        motherLocation=new InsdcLocations.GroupLocation(subLocations);
      }
      if (splitQualifier.equalsIgnoreCase("String_Node_Str")) {
        motherLocation=new InsdcLocations.OrderLocation(subLocations);
      }
      if (splitQualifier.equalsIgnoreCase("String_Node_Str")) {
        motherLocation=new InsdcLocations.BondLocation(subLocations);
      }
      motherLocation.setStrand(getGroupLocationStrand(subLocations));
      boundedLocationsCollection.add(motherLocation);
    }
  break;
}
}
 else {
m=singleLocationPattern.matcher(splitString);
if (!m.find()) {
throw new ParserException("String_Node_Str" + splitString + "String_Node_Str"+ string);
}
String accession=m.group(1);
Strand s=versus == 1 ? Strand.POSITIVE : Strand.NEGATIVE;
int start=new Integer(m.group(3));
int end=m.group(6) == null ? start : new Integer(m.group(6));
if (featureGlobalStart > start) {
featureGlobalStart=start;
}
if (featureGlobalEnd < end) {
featureGlobalEnd=end;
}
AbstractLocation l=new SimpleLocation(start,end,s);
if (m.group(4) != null && m.group(4).equals("String_Node_Str")) l.setBetweenCompounds(true);
if (m.group(2).equals("String_Node_Str")) {
l.setPartialOn5prime(true);
}
if (m.group(5) != null && (m.group(5).equals("String_Node_Str") || m.group(7).equals("String_Node_Str"))) {
l.setPartialOn3prime(true);
}
if (!(accession == null || "String_Node_Str".equals(accession))) l.setAccession(new AccessionID(accession));
boundedLocationsCollection.add(l);
}
}
return boundedLocationsCollection;
}

Fixed version (ground truth):
private List<Location> parseLocationString(String string,int versus) throws ParserException {
  Matcher m;
  List<Location> boundedLocationsCollection=new ArrayList<Location>();
  List<String> tokens=splitString(string);
  for (  String t : tokens) {
    m=genbankSplitPattern.matcher(t);
    if (!m.find()) {
      throw new ParserException("String_Node_Str" + t + "String_Node_Str"+ string);
    }
    String splitQualifier=m.group(1);
    String splitString=m.group(2);
    if (!splitQualifier.isEmpty()) {
      int localVersus=splitQualifier.equalsIgnoreCase("String_Node_Str") ? -1 : 1;
      List<Location> subLocations=parseLocationString(splitString,versus * localVersus);
switch (complexFeaturesAppendMode) {
case FLATTEN:
        boundedLocationsCollection.addAll(subLocations);
      break;
case HIERARCHICAL:
    if (subLocations.size() == 1) {
      boundedLocationsCollection.addAll(subLocations);
    }
 else {
      Point min=Location.Tools.getMin(subLocations).getStart();
      Point max=Location.Tools.getMax(subLocations).getEnd();
      AbstractLocation motherLocation=new SimpleLocation(min,max);
      if (splitQualifier.equalsIgnoreCase("String_Node_Str")) {
        motherLocation=new InsdcLocations.GroupLocation(subLocations);
      }
      if (splitQualifier.equalsIgnoreCase("String_Node_Str")) {
        motherLocation=new InsdcLocations.OrderLocation(subLocations);
      }
      if (splitQualifier.equalsIgnoreCase("String_Node_Str")) {
        motherLocation=new InsdcLocations.BondLocation(subLocations);
      }
      motherLocation.setStrand(getGroupLocationStrand(subLocations));
      boundedLocationsCollection.add(motherLocation);
    }
  break;
}
}
 else {
m=singleLocationPattern.matcher(splitString);
if (!m.find()) {
throw new ParserException("String_Node_Str" + splitString + "String_Node_Str"+ string);
}
String accession=m.group(1);
Strand s=versus == 1 ? Strand.POSITIVE : Strand.NEGATIVE;
int start=new Integer(m.group(3));
int end=m.group(6) == null ? start : new Integer(m.group(6));
if (featureGlobalStart > start) {
featureGlobalStart=start;
}
if (featureGlobalEnd < end) {
featureGlobalEnd=end;
}
AbstractLocation l=new SimpleLocation(start,end,s);
if (m.group(4) != null && m.group(4).equals("String_Node_Str")) l.setBetweenCompounds(true);
if (m.group(2).equals("String_Node_Str")) {
l.setPartialOn5prime(true);
}
if (m.group(5) != null && (m.group(5).equals("String_Node_Str") || m.group(7).equals("String_Node_Str"))) {
l.setPartialOn3prime(true);
}
if (!(accession == null || "String_Node_Str".equals(accession))) l.setAccession(new AccessionID(accession));
boundedLocationsCollection.add(l);
}
}
return boundedLocationsCollection;
}