Program: 56612
Project: 56612
Buggy source:
private void calculateConstructMarks(){
  MapRectangle area=this.mapArea;
  EBuildingType currBuildingType=this.buildingType;
  if (currBuildingType == null || area == null) {
    return;
  }
  if (lastArea != null) {
    removeConstructionMarks(lastArea,area);
  }
  final short minX=(short)(area.getLineStartX(0));
  final short maxX=(short)(area.getLineEndX(area.getLines() - 1));
  final short minY=(area.getMinY());
  final short width=(short)(maxX - minX + 1);
  final short height=area.getHeight();
  final short setWidth=(short)(width + buildingSet.width);
  final short setHeight=(short)(height + buildingSet.height);
  BitSet areaSet=new BitSet(setWidth * setHeight);
  final ELandscapeType[] landscapeTypes=buildingType.getGroundtypes();
  for (short y=0; y < setHeight; y++) {
    for (short x=0; x < setWidth; x++) {
      boolean canConstruct=map.canUsePositionForConstruction((short)(minX + x),(short)(y + minY),landscapeTypes,player);
      areaSet.set(x + y * setWidth,canConstruct);
    }
  }
  for (short y=(short)-buildingSet.minY; y < height; y++) {
    for (short x=(short)-buildingSet.minX; x < width; x++) {
      final short mapX=(short)(minX + x);
      final short mapY=(short)(minY + y);
      if (map.isInBounds(mapX,mapY)) {
        byte value;
        if (checkPosition(x,y,areaSet,setWidth,buildingSet)) {
          value=(byte)1;
        }
 else {
          value=-1;
        }
        map.setConstructMarking(mapX,mapY,value);
      }
    }
  }
  lastArea=area;
}

Fixed version (ground truth):
private void calculateConstructMarks(){
  MapRectangle area=this.mapArea;
  EBuildingType currBuildingType=this.buildingType;
  if (currBuildingType == null || area == null) {
    return;
  }
  if (lastArea != null) {
    removeConstructionMarks(lastArea,area);
  }
  final BuildingAreaBitSet buildingSet=buildingType.getBuildingAreaBitSet();
  final short minX=(short)(area.getLineStartX(0));
  final short maxX=(short)(area.getLineEndX(area.getLines() - 1));
  final short minY=(area.getMinY());
  final short width=(short)(maxX - minX + 1);
  final short height=area.getHeight();
  final short setWidth=(short)(width + buildingSet.width);
  final short setHeight=(short)(height + buildingSet.height);
  BitSet areaSet=new BitSet(setWidth * setHeight);
  final ELandscapeType[] landscapeTypes=buildingType.getGroundtypes();
  for (short y=0; y < setHeight; y++) {
    for (short x=0; x < setWidth; x++) {
      boolean canConstruct=map.canUsePositionForConstruction((short)(minX + buildingSet.minX + x),(short)(y + buildingSet.minY + minY),landscapeTypes,player);
      areaSet.set(x + y * setWidth,canConstruct);
    }
  }
  for (short line=0; line < area.getLines(); line++) {
    final short mapY=(short)area.getLineY(line);
    final int endX=area.getLineEndX(line);
    for (short mapX=(short)area.getLineStartX(line); mapX < endX; mapX++) {
      if (map.isInBounds(mapX,mapY)) {
        byte value;
        if (checkPosition(mapX - minX,mapY - minY,areaSet,setWidth,buildingSet)) {
          value=(byte)1;
        }
 else {
          value=-1;
        }
        map.setConstructMarking(mapX,mapY,value);
      }
    }
  }
  lastArea=area;
}