Program: 11201
Project: 11201
Buggy source:
public TilerConsole() throws Exception {
  File file=new File("String_Node_Str");
  File outputDir=new File("String_Node_Str");
  String outputExt="String_Node_Str";
  double lztd=20d;
  int tilesize=150;
  int outside=-9999;
  boolean overviews=true;
  boolean saveAlpha=false;
  int outputType=gdalconstConstants.GDT_Int16;
  Dataset dataset=GDALUtil.open(file);
  Sector sector=GDALUtil.getSector(dataset);
  int levels=GDALUtil.levelCount(dataset,lztd,sector,tilesize);
  double width=dataset.getRasterXSize();
  double height=dataset.getRasterYSize();
  int bufferType=1;
  int[] outsidea=null;
  int level=levels - 1;
  double tilesizedegrees=Math.pow(0.5,level) * lztd;
  System.out.println("String_Node_Str" + level + "String_Node_Str"+ tilesizedegrees+ "String_Node_Str"+ (tilesizedegrees * height / sector.getDeltaLongitude())+ "String_Node_Str"+ (tilesizedegrees * width / sector.getDeltaLatitude())+ "String_Node_Str");
  int minX=GDALUtil.getTileX(sector.getMinLongitude(),level,lztd);
  int maxX=GDALUtil.getTileX(sector.getMaxLongitude(),level,lztd);
  int minY=GDALUtil.getTileY(sector.getMinLatitude(),level,lztd);
  int maxY=GDALUtil.getTileY(sector.getMaxLatitude(),level,lztd);
  ProgressReporter progress=new SimpleProgressReporter();
  int size=(maxX - minX + 1) * (maxY - minY + 1);
  int count=0;
  for (int Y=minY; Y <= maxY; Y++) {
    File rowDir=new File(outputDir,String.valueOf(level));
    rowDir=new File(rowDir,GDALUtil.paddedInt(Y,4));
    if (!rowDir.exists()) {
      rowDir.mkdirs();
    }
    for (int X=minX; X <= maxX; X++) {
      count++;
      System.out.println("String_Node_Str" + X + "String_Node_Str"+ Y+ "String_Node_Str"+ count+ "String_Node_Str"+ size+ "String_Node_Str"+ (count * 100 / size)+ "String_Node_Str"+ (X - minX + 1)+ "String_Node_Str"+ (maxX - minX + 1)+ "String_Node_Str"+ (Y - minY + 1)+ "String_Node_Str"+ (maxY - minY + 1)+ "String_Node_Str");
      final double lat1=(Y * tilesizedegrees) - 90;
      final double lon1=(X * tilesizedegrees) - 180;
      final double lat2=lat1 + tilesizedegrees;
      final double lon2=lon1 + tilesizedegrees;
      final File dst=new File(rowDir,GDALUtil.paddedInt(Y,4) + "String_Node_Str" + GDALUtil.paddedInt(X,4)+ "String_Node_Str"+ outputExt);
      if (dst.exists()) {
        System.out.println(dst.getAbsolutePath() + "String_Node_Str");
      }
 else {
        GDALTile tile=new GDALTile(dataset,tilesize,tilesize,lat1,lon1,lat2,lon2,saveAlpha,-1);
        tile=tile.convertToType(outputType);
        outsidea=new int[tile.getBandCount()];
        for (int i=0; i < tile.getBandCount(); i++)         outsidea[i]=outside;
        tile.fillOutside(outsidea);
        bufferType=tile.getBufferType();
        if (outputExt.toLowerCase().equals("String_Node_Str")) {
          try {
            ByteBuffer bb=tile.getBuffer();
            bb.rewind();
            FileChannel fc=new RandomAccessFile(dst,"String_Node_Str").getChannel();
            MappedByteBuffer mbb=fc.map(MapMode.READ_WRITE,0,bb.limit());
            mbb.order(bb.order());
            mbb.put(bb);
            fc.close();
          }
 catch (          IOException e) {
            e.printStackTrace();
          }
        }
 else {
          BufferedImage image=tile.getAsImage();
          try {
            ImageIO.write(image,outputExt,dst);
          }
 catch (          IOException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
  if (overviews) {
    System.out.println();
    System.out.println("String_Node_Str");
    if (outputExt.toLowerCase().equals("String_Node_Str")) {
      Overviewer.createElevationOverviews(outputDir,tilesize,tilesize,bufferType,ByteOrder.LITTLE_ENDIAN,outsidea,sector,lztd,progress);
    }
 else {
      Overviewer.createImageOverviews(outputDir,outputExt,tilesize,tilesize,outsidea,sector,lztd,progress);
    }
  }
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
public TilerConsole() throws Exception {
  File file=new File("String_Node_Str");
  File outputDir=new File("String_Node_Str");
  String outputExt="String_Node_Str";
  double lztd=20d;
  int tilesize=150;
  long outside=-9999;
  boolean overviews=true;
  boolean saveAlpha=false;
  int outputType=gdalconstConstants.GDT_Int16;
  Dataset dataset=GDALUtil.open(file);
  Sector sector=GDALUtil.getSector(dataset);
  int levels=GDALUtil.levelCount(dataset,lztd,sector,tilesize);
  double width=dataset.getRasterXSize();
  double height=dataset.getRasterYSize();
  int bufferType=1;
  NumberArray outsidea=null;
  int level=levels - 1;
  double tilesizedegrees=Math.pow(0.5,level) * lztd;
  System.out.println("String_Node_Str" + level + "String_Node_Str"+ tilesizedegrees+ "String_Node_Str"+ (tilesizedegrees * height / sector.getDeltaLongitude())+ "String_Node_Str"+ (tilesizedegrees * width / sector.getDeltaLatitude())+ "String_Node_Str");
  int minX=GDALUtil.getTileX(sector.getMinLongitude(),level,lztd);
  int maxX=GDALUtil.getTileX(sector.getMaxLongitude(),level,lztd);
  int minY=GDALUtil.getTileY(sector.getMinLatitude(),level,lztd);
  int maxY=GDALUtil.getTileY(sector.getMaxLatitude(),level,lztd);
  ProgressReporter progress=new SimpleProgressReporter();
  int size=(maxX - minX + 1) * (maxY - minY + 1);
  int count=0;
  for (int Y=minY; Y <= maxY; Y++) {
    File rowDir=new File(outputDir,String.valueOf(level));
    rowDir=new File(rowDir,GDALUtil.paddedInt(Y,4));
    if (!rowDir.exists()) {
      rowDir.mkdirs();
    }
    for (int X=minX; X <= maxX; X++) {
      count++;
      System.out.println("String_Node_Str" + X + "String_Node_Str"+ Y+ "String_Node_Str"+ count+ "String_Node_Str"+ size+ "String_Node_Str"+ (count * 100 / size)+ "String_Node_Str"+ (X - minX + 1)+ "String_Node_Str"+ (maxX - minX + 1)+ "String_Node_Str"+ (Y - minY + 1)+ "String_Node_Str"+ (maxY - minY + 1)+ "String_Node_Str");
      final double lat1=(Y * tilesizedegrees) - 90;
      final double lon1=(X * tilesizedegrees) - 180;
      final double lat2=lat1 + tilesizedegrees;
      final double lon2=lon1 + tilesizedegrees;
      final File dst=new File(rowDir,GDALUtil.paddedInt(Y,4) + "String_Node_Str" + GDALUtil.paddedInt(X,4)+ "String_Node_Str"+ outputExt);
      if (dst.exists()) {
        System.out.println(dst.getAbsolutePath() + "String_Node_Str");
      }
 else {
        GDALTile tile=new GDALTile(dataset,tilesize,tilesize,lat1,lon1,lat2,lon2,saveAlpha,-1);
        tile=tile.convertToType(outputType);
        outsidea=new NumberArray(tile.getBandCount());
        for (int i=0; i < tile.getBandCount(); i++)         outsidea.setLong(i,outside);
        tile.fillOutside(outsidea);
        bufferType=tile.getBufferType();
        if (outputExt.toLowerCase().equals("String_Node_Str")) {
          try {
            ByteBuffer bb=tile.getBuffer();
            bb.rewind();
            FileChannel fc=new RandomAccessFile(dst,"String_Node_Str").getChannel();
            MappedByteBuffer mbb=fc.map(MapMode.READ_WRITE,0,bb.limit());
            mbb.order(bb.order());
            mbb.put(bb);
            fc.close();
          }
 catch (          IOException e) {
            e.printStackTrace();
          }
        }
 else {
          BufferedImage image=tile.getAsImage();
          try {
            ImageIO.write(image,outputExt,dst);
          }
 catch (          IOException e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
  if (overviews) {
    System.out.println();
    System.out.println("String_Node_Str");
    if (outputExt.toLowerCase().equals("String_Node_Str")) {
      Overviewer.createElevationOverviews(outputDir,tilesize,tilesize,bufferType,ByteOrder.LITTLE_ENDIAN,outsidea,sector,lztd,progress);
    }
 else {
      Overviewer.createImageOverviews(outputDir,outputExt,tilesize,tilesize,outsidea,sector,lztd,progress);
    }
  }
  System.out.println("String_Node_Str");
}