Program: 11060
Project: 11060
Buggy source:
@Override public void addLine(String line){
  Matcher matcher;
  matcher=vertexPattern.matcher(line);
  if (matcher.matches()) {
    int id=Integer.parseInt(matcher.group(1));
    if (vertexIdMap.containsKey(id)) {
      throw new IllegalArgumentException("String_Node_Str" + id);
    }
    double x=Double.parseDouble(matcher.group(2));
    double y=Double.parseDouble(matcher.group(3));
    double z=Double.parseDouble(matcher.group(4));
    z=zPositive ? z : -z;
    if (parameters.getCoordinateTransformation() != null) {
      double[] transformed=new double[3];
      parameters.getCoordinateTransformation().TransformPoint(transformed,x,y,z);
      x=transformed[0];
      y=transformed[1];
      z=transformed[2];
    }
    Position position=Position.fromDegrees(y,x,z);
    vertexIdMap.put(id,positions.size());
    positions.add(position);
    float value=Float.NaN;
    if (paintedVariableId <= 0) {
      value=(float)z;
    }
 else {
      double[] values=splitStringToDoubles(matcher.group(5));
      if (paintedVariableId <= values.length) {
        value=(float)values[paintedVariableId - 1];
      }
    }
    if (!Float.isNaN(value) && value != noDataValue) {
      min=Math.min(min,value);
      max=Math.max(max,value);
    }
    values.add(value);
    return;
  }
  matcher=atomPattern.matcher(line);
  if (matcher.matches()) {
    int id1=Integer.parseInt(matcher.group(1));
    int id2=Integer.parseInt(matcher.group(2));
    if (vertexIdMap.containsKey(id1)) {
      throw new IllegalArgumentException("String_Node_Str" + id1);
    }
    if (!vertexIdMap.containsKey(id2)) {
      throw new IllegalArgumentException("String_Node_Str" + id2);
    }
    Position position=positions.get(vertexIdMap.get(id2));
    vertexIdMap.put(id1,positions.size());
    positions.add(position);
    float value=Float.NaN;
    if (paintedVariableId <= 0) {
      value=(float)position.elevation;
    }
 else {
      double[] values=splitStringToDoubles(matcher.group(3));
      if (paintedVariableId <= values.length) {
        value=(float)values[paintedVariableId - 1];
      }
    }
    if (!Float.isNaN(value) && value != noDataValue) {
      min=Math.min(min,value);
      max=Math.max(max,value);
    }
    values.add(value);
    return;
  }
  matcher=trianglePattern.matcher(line);
  if (matcher.matches()) {
    int t1=Integer.parseInt(matcher.group(1));
    int t2=Integer.parseInt(matcher.group(2));
    int t3=Integer.parseInt(matcher.group(3));
    triangleIds.add(t1);
    triangleIds.add(t2);
    triangleIds.add(t3);
    return;
  }
  matcher=colorPattern.matcher(line);
  if (matcher.matches()) {
    color=GocadColor.gocadLineToColor(line);
    return;
  }
  matcher=namePattern.matcher(line);
  if (matcher.matches()) {
    name=matcher.group(1);
    return;
  }
  matcher=zpositivePattern.matcher(line);
  if (matcher.matches()) {
    zPositive=!matcher.group(1).equalsIgnoreCase("String_Node_Str");
    return;
  }
  matcher=paintedVariablePattern.matcher(line);
  if (matcher.matches()) {
    if (parameters.getPaintedVariable() == null) {
      paintedVariableName=matcher.group(1);
    }
    return;
  }
  matcher=propertiesPattern.matcher(line);
  if (matcher.matches()) {
    String properties=matcher.group(1).trim();
    String[] split=properties.split("String_Node_Str");
    for (int i=0; i < split.length; i++) {
      if (split[i].equalsIgnoreCase(paintedVariableName)) {
        paintedVariableId=i + 1;
        break;
      }
    }
    return;
  }
  matcher=nodataPattern.matcher(line);
  if (matcher.matches()) {
    double[] values=splitStringToDoubles(matcher.group(1));
    if (paintedVariableId <= values.length) {
      noDataValue=(float)values[paintedVariableId - 1];
    }
    return;
  }
}

Fixed version (ground truth):
@Override public void addLine(String line){
  Matcher matcher;
  matcher=vertexPattern.matcher(line);
  if (matcher.matches()) {
    int id=Integer.parseInt(matcher.group(1));
    if (vertexIdMap.containsKey(id)) {
      throw new IllegalArgumentException("String_Node_Str" + id);
    }
    double x=Double.parseDouble(matcher.group(2));
    double y=Double.parseDouble(matcher.group(3));
    double z=Double.parseDouble(matcher.group(4));
    z=zPositive ? z : -z;
    if (parameters.getCoordinateTransformation() != null) {
      double[] transformed=new double[3];
      parameters.getCoordinateTransformation().TransformPoint(transformed,x,y,z);
      x=transformed[0];
      y=transformed[1];
      z=transformed[2];
    }
    Position position=Position.fromDegrees(y,x,z);
    vertexIdMap.put(id,positions.size());
    positions.add(position);
    float value=Float.NaN;
    if (paintedVariableId <= 0) {
      value=(float)z;
    }
 else {
      double[] values=splitStringToDoubles(matcher.group(5));
      if (paintedVariableId <= values.length) {
        value=(float)values[paintedVariableId - 1];
      }
    }
    if (!Float.isNaN(value) && value != noDataValue) {
      min=Math.min(min,value);
      max=Math.max(max,value);
    }
    values.add(value);
    return;
  }
  matcher=atomPattern.matcher(line);
  if (matcher.matches()) {
    int id1=Integer.parseInt(matcher.group(1));
    int id2=Integer.parseInt(matcher.group(2));
    if (vertexIdMap.containsKey(id1)) {
      throw new IllegalArgumentException("String_Node_Str" + id1);
    }
    if (!vertexIdMap.containsKey(id2)) {
      throw new IllegalArgumentException("String_Node_Str" + id2);
    }
    Position position=positions.get(vertexIdMap.get(id2));
    vertexIdMap.put(id1,positions.size());
    positions.add(position);
    float value=Float.NaN;
    if (paintedVariableId <= 0) {
      value=(float)position.elevation;
    }
 else {
      double[] values=splitStringToDoubles(matcher.group(3));
      if (paintedVariableId <= values.length) {
        value=(float)values[paintedVariableId - 1];
      }
    }
    if (!Float.isNaN(value) && value != noDataValue) {
      min=Math.min(min,value);
      max=Math.max(max,value);
    }
    values.add(value);
    return;
  }
  matcher=trianglePattern.matcher(line);
  if (matcher.matches()) {
    int t1=Integer.parseInt(matcher.group(1));
    int t2=Integer.parseInt(matcher.group(2));
    int t3=Integer.parseInt(matcher.group(3));
    triangleIds.add(t1);
    triangleIds.add(t2);
    triangleIds.add(t3);
    return;
  }
  matcher=colorPattern.matcher(line);
  if (matcher.matches()) {
    color=GocadColor.gocadLineToColor(line);
    return;
  }
  matcher=namePattern.matcher(line);
  if (matcher.matches()) {
    name=matcher.group(1);
    return;
  }
  matcher=zpositivePattern.matcher(line);
  if (matcher.matches()) {
    zPositive=!matcher.group(1).equalsIgnoreCase("String_Node_Str");
    return;
  }
  matcher=paintedVariablePattern.matcher(line);
  if (matcher.matches()) {
    if (parameters.getPaintedVariable() == null) {
      paintedVariableName=matcher.group(1);
    }
    return;
  }
  matcher=propertiesPattern.matcher(line);
  if (matcher.matches()) {
    String properties=matcher.group(1).trim();
    String[] split=properties.split("String_Node_Str");
    for (int i=0; i < split.length; i++) {
      if (split[i].equalsIgnoreCase(paintedVariableName)) {
        paintedVariableId=i + 1;
        break;
      }
    }
    return;
  }
  matcher=nodataPattern.matcher(line);
  if (matcher.matches()) {
    double[] values=splitStringToDoubles(matcher.group(1));
    if (0 < paintedVariableId && paintedVariableId <= values.length) {
      noDataValue=(float)values[paintedVariableId - 1];
    }
    return;
  }
}