Program: 93321
Project: 93321
Buggy source:
private List<Way> processWays(QueryParameters queryParameters,int numberOfWays,BoundingBox boundingBox,boolean filterRequired){
  List<Way> ways=new ArrayList<Way>();
  Tag[] wayTags=this.mapFileHeader.getMapFileInfo().wayTags;
  BoundingBox wayFilterBbox=boundingBox.extend(wayFilterDistance);
  for (int elementCounter=numberOfWays; elementCounter != 0; --elementCounter) {
    if (this.mapFileHeader.getMapFileInfo().debugFile) {
      this.signatureWay=this.readBuffer.readUTF8EncodedString(SIGNATURE_LENGTH_WAY);
      if (!this.signatureWay.startsWith("String_Node_Str")) {
        LOGGER.warning("String_Node_Str" + this.signatureWay);
        LOGGER.warning(DEBUG_SIGNATURE_BLOCK + this.signatureBlock);
        return null;
      }
    }
    int wayDataSize=this.readBuffer.readUnsignedInt();
    if (wayDataSize < 0) {
      LOGGER.warning("String_Node_Str" + wayDataSize);
      if (this.mapFileHeader.getMapFileInfo().debugFile) {
        LOGGER.warning(DEBUG_SIGNATURE_BLOCK + this.signatureBlock);
      }
      return null;
    }
    if (queryParameters.useTileBitmask) {
      int tileBitmask=this.readBuffer.readShort();
      if ((queryParameters.queryTileBitmask & tileBitmask) == 0) {
        this.readBuffer.skipBytes(wayDataSize - 2);
        continue;
      }
    }
 else {
      this.readBuffer.skipBytes(2);
    }
    byte specialByte=this.readBuffer.readByte();
    byte layer=(byte)((specialByte & WAY_LAYER_BITMASK) >>> WAY_LAYER_SHIFT);
    byte numberOfTags=(byte)(specialByte & WAY_NUMBER_OF_TAGS_BITMASK);
    List<Tag> tags=new ArrayList<Tag>();
    for (byte tagIndex=numberOfTags; tagIndex != 0; --tagIndex) {
      int tagId=this.readBuffer.readUnsignedInt();
      if (tagId < 0 || tagId >= wayTags.length) {
        LOGGER.warning("String_Node_Str" + tagId);
        logDebugSignatures();
        return null;
      }
      tags.add(wayTags[tagId]);
    }
    byte featureByte=this.readBuffer.readByte();
    boolean featureName=(featureByte & WAY_FEATURE_NAME) != 0;
    boolean featureHouseNumber=(featureByte & WAY_FEATURE_HOUSE_NUMBER) != 0;
    boolean featureRef=(featureByte & WAY_FEATURE_REF) != 0;
    boolean featureLabelPosition=(featureByte & WAY_FEATURE_LABEL_POSITION) != 0;
    boolean featureWayDataBlocksByte=(featureByte & WAY_FEATURE_DATA_BLOCKS_BYTE) != 0;
    boolean featureWayDoubleDeltaEncoding=(featureByte & WAY_FEATURE_DOUBLE_DELTA_ENCODING) != 0;
    if (featureName) {
      tags.add(new Tag(TAG_KEY_NAME,this.readBuffer.readUTF8EncodedString()));
    }
    if (featureHouseNumber) {
      tags.add(new Tag(TAG_KEY_HOUSE_NUMBER,this.readBuffer.readUTF8EncodedString()));
    }
    if (featureRef) {
      tags.add(new Tag(TAG_KEY_REF,this.readBuffer.readUTF8EncodedString()));
    }
    LatLong labelPosition=readOptionalLabelPosition(featureLabelPosition);
    int wayDataBlocks=readOptionalWayDataBlocksByte(featureWayDataBlocksByte);
    if (wayDataBlocks < 1) {
      LOGGER.warning("String_Node_Str" + wayDataBlocks);
      logDebugSignatures();
      return null;
    }
    for (int wayDataBlock=0; wayDataBlock < wayDataBlocks; ++wayDataBlock) {
      LatLong[][] wayNodes=processWayDataBlock(featureWayDoubleDeltaEncoding);
      if (wayNodes != null) {
        if (filterRequired && wayFilterEnabled) {
          if (!wayFilterBbox.intersectsArea(wayNodes)) {
            continue;
          }
        }
        ways.add(new Way(layer,tags,wayNodes,labelPosition));
      }
    }
  }
  return ways;
}

Fixed version (ground truth):
private List<Way> processWays(QueryParameters queryParameters,int numberOfWays,BoundingBox boundingBox,boolean filterRequired){
  List<Way> ways=new ArrayList<Way>();
  Tag[] wayTags=this.mapFileHeader.getMapFileInfo().wayTags;
  BoundingBox wayFilterBbox=boundingBox.extend(wayFilterDistance);
  for (int elementCounter=numberOfWays; elementCounter != 0; --elementCounter) {
    if (this.mapFileHeader.getMapFileInfo().debugFile) {
      this.signatureWay=this.readBuffer.readUTF8EncodedString(SIGNATURE_LENGTH_WAY);
      if (!this.signatureWay.startsWith("String_Node_Str")) {
        LOGGER.warning("String_Node_Str" + this.signatureWay);
        LOGGER.warning(DEBUG_SIGNATURE_BLOCK + this.signatureBlock);
        return null;
      }
    }
    int wayDataSize=this.readBuffer.readUnsignedInt();
    if (wayDataSize < 0) {
      LOGGER.warning("String_Node_Str" + wayDataSize);
      if (this.mapFileHeader.getMapFileInfo().debugFile) {
        LOGGER.warning(DEBUG_SIGNATURE_BLOCK + this.signatureBlock);
      }
      return null;
    }
    if (queryParameters.useTileBitmask) {
      int tileBitmask=this.readBuffer.readShort();
      if ((queryParameters.queryTileBitmask & tileBitmask) == 0) {
        this.readBuffer.skipBytes(wayDataSize - 2);
        continue;
      }
    }
 else {
      this.readBuffer.skipBytes(2);
    }
    byte specialByte=this.readBuffer.readByte();
    byte layer=(byte)((specialByte & WAY_LAYER_BITMASK) >>> WAY_LAYER_SHIFT);
    byte numberOfTags=(byte)(specialByte & WAY_NUMBER_OF_TAGS_BITMASK);
    List<Tag> tags=new ArrayList<Tag>();
    for (byte tagIndex=numberOfTags; tagIndex != 0; --tagIndex) {
      int tagId=this.readBuffer.readUnsignedInt();
      if (tagId < 0 || tagId >= wayTags.length) {
        LOGGER.warning("String_Node_Str" + tagId);
        logDebugSignatures();
        return null;
      }
      tags.add(wayTags[tagId]);
    }
    byte featureByte=this.readBuffer.readByte();
    boolean featureName=(featureByte & WAY_FEATURE_NAME) != 0;
    boolean featureHouseNumber=(featureByte & WAY_FEATURE_HOUSE_NUMBER) != 0;
    boolean featureRef=(featureByte & WAY_FEATURE_REF) != 0;
    boolean featureLabelPosition=(featureByte & WAY_FEATURE_LABEL_POSITION) != 0;
    boolean featureWayDataBlocksByte=(featureByte & WAY_FEATURE_DATA_BLOCKS_BYTE) != 0;
    boolean featureWayDoubleDeltaEncoding=(featureByte & WAY_FEATURE_DOUBLE_DELTA_ENCODING) != 0;
    if (featureName) {
      tags.add(new Tag(TAG_KEY_NAME,this.readBuffer.readUTF8EncodedString()));
    }
    if (featureHouseNumber) {
      tags.add(new Tag(TAG_KEY_HOUSE_NUMBER,this.readBuffer.readUTF8EncodedString()));
    }
    if (featureRef) {
      tags.add(new Tag(TAG_KEY_REF,this.readBuffer.readUTF8EncodedString()));
    }
    LatLong labelPosition=readOptionalLabelPosition(featureLabelPosition);
    int wayDataBlocks=readOptionalWayDataBlocksByte(featureWayDataBlocksByte);
    if (wayDataBlocks < 1) {
      LOGGER.warning("String_Node_Str" + wayDataBlocks);
      logDebugSignatures();
      return null;
    }
    for (int wayDataBlock=0; wayDataBlock < wayDataBlocks; ++wayDataBlock) {
      LatLong[][] wayNodes=processWayDataBlock(featureWayDoubleDeltaEncoding);
      if (wayNodes != null) {
        if (filterRequired && wayFilterEnabled && !wayFilterBbox.intersectsArea(wayNodes)) {
          continue;
        }
        ways.add(new Way(layer,tags,wayNodes,labelPosition));
      }
    }
  }
  return ways;
}