Program: 94403
Project: 94403
Buggy source:
@Override public int run(final String[] args,Configuration conf,ProviderProperties providerProperties){
  log.info("String_Node_Str");
  try {
    final Options options=createOptions();
    CommandLine line;
    try {
      final CommandLineParser parser=new PosixParser();
      line=parser.parse(options,args);
      if (line == null || line.hasOption("String_Node_Str")) {
        new HelpFormatter().printHelp("String_Node_Str",options);
        return 1;
      }
      if (line.hasOption("String_Node_Str") && (line.hasOption("String_Node_Str") || line.hasOption("String_Node_Str") || line.hasOption("String_Node_Str"))) {
        log.debug("String_Node_Str");
        throw new ParseException("String_Node_Str");
      }
      if (line.hasOption("String_Node_Str") && line.hasOption("String_Node_Str")) {
        log.debug("String_Node_Str");
        throw new ParseException("String_Node_Str");
      }
      if (line.hasOption("String_Node_Str")) {
        LoggingUtils.setDefaultLogLevel(LoggingUtils.INFO);
      }
      if (line.hasOption("String_Node_Str")) {
        LoggingUtils.setDefaultLogLevel(LoggingUtils.DEBUG);
      }
      if (line.hasOption("String_Node_Str")) {
        System.out.println("String_Node_Str");
        HadoopUtils.setupLocalRunner(conf);
      }
      String outputbase=line.getOptionValue("String_Node_Str");
      if (line.hasOption("String_Node_Str")) {
        maxTiles=Integer.parseInt(line.getOptionValue("String_Node_Str"));
      }
      useRand=line.hasOption("String_Node_Str");
      boolean all=line.hasOption("String_Node_Str");
      boolean singleImage=line.hasOption("String_Node_Str");
      mosaicTiles=line.hasOption("String_Node_Str");
      if (mosaicTiles) {
        mosaicTileCount=Integer.parseInt(line.getOptionValue("String_Node_Str"));
      }
      useBounds=line.hasOption("String_Node_Str");
      if (useBounds) {
        final String boundsOption=line.getOptionValue("String_Node_Str");
        bounds=parseBounds(boundsOption);
      }
      if (line.hasOption("String_Node_Str")) {
        colorscale=ColorScaleManager.fromName(line.getOptionValue("String_Node_Str"));
      }
      boolean useTileSet=line.hasOption("String_Node_Str");
      if (useTileSet) {
        final String tileIdOption=line.getOptionValue("String_Node_Str");
        final String[] tileIds=tileIdOption.split("String_Node_Str");
        for (        final String tileId : tileIds) {
          tileset.add(Long.valueOf(tileId));
        }
      }
      int zoomlevel=-1;
      if (line.hasOption("String_Node_Str")) {
        zoomlevel=Integer.parseInt(line.getOptionValue("String_Node_Str"));
      }
      String format="String_Node_Str";
      if (line.hasOption("String_Node_Str")) {
        format=line.getOptionValue("String_Node_Str");
      }
      useTMS=line.hasOption("String_Node_Str");
      for (      final String arg : line.getArgs()) {
        MrsPyramid imagePyramid;
        MrsPyramid pyramid=null;
        String pyramidName="String_Node_Str";
        try {
          MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(arg,DataProviderFactory.AccessMode.READ,providerProperties);
          imagePyramid=MrsPyramid.open(dp);
          pyramidName=dp.getSimpleResourceName();
          pyramid=imagePyramid;
        }
 catch (        IOException e) {
          imagePyramid=null;
        }
        if (imagePyramid == null) {
          throw new IOException("String_Node_Str");
        }
        if (zoomlevel <= 0) {
          zoomlevel=pyramid.getMaximumLevel();
        }
        int end=zoomlevel;
        if (all) {
          end=1;
        }
        while (zoomlevel >= end) {
          MrsImage image=imagePyramid.getImage(zoomlevel);
          try {
            final Set<Long> tiles=calculateTiles(pyramid,zoomlevel);
            int tilesize=imagePyramid.getTileSize();
            if (singleImage) {
              saveMultipleTiles(outputbase,pyramidName,format,image,ArrayUtils.toPrimitive(tiles.toArray(new Long[tiles.size()])));
            }
 else             if (mosaicTiles && mosaicTileCount > 0) {
              if (!outputbase.contains(X) || !outputbase.contains(Y) || !outputbase.contains(LAT)|| !outputbase.contains(LON)) {
                outputbase=outputbase + "String_Node_Str";
              }
              for (              final Long tileid : tiles) {
                final Tile t=TMSUtils.tileid(tileid,zoomlevel);
                final Set<Long> tilesToMosaic=new HashSet<>();
                final LongRectangle tileBounds=pyramid.getTileBounds(zoomlevel);
                for (long ty1=t.ty; ((ty1 < (t.ty + mosaicTileCount)) && (ty1 <= tileBounds.getMaxY())); ty1++) {
                  for (long tx1=t.tx; ((tx1 < (t.tx + mosaicTileCount)) && (tx1 <= tileBounds.getMaxX())); tx1++) {
                    tilesToMosaic.add(TMSUtils.tileid(tx1,ty1,zoomlevel));
                  }
                }
                saveMultipleTiles(outputbase,pyramidName,format,image,ArrayUtils.toPrimitive(tilesToMosaic.toArray(new Long[tilesToMosaic.size()])));
              }
            }
 else {
              for (              final Long tileid : tiles) {
                saveSingleTile(outputbase,pyramidName,image,format,tileid,zoomlevel,tilesize);
              }
            }
          }
  finally {
            if (image != null) {
              image.close();
            }
          }
          zoomlevel--;
        }
      }
    }
 catch (    final ParseException e) {
      new HelpFormatter().printHelp("String_Node_Str",options);
      return 1;
    }
    return 0;
  }
 catch (  ColorScale.ColorScaleException|IOException e) {
    e.printStackTrace();
  }
  return -1;
}

Fixed version (ground truth):
@Override public int run(final String[] args,Configuration conf,ProviderProperties providerProperties){
  log.info("String_Node_Str");
  try {
    final Options options=createOptions();
    CommandLine line;
    try {
      final CommandLineParser parser=new PosixParser();
      line=parser.parse(options,args);
      if (line == null || line.hasOption("String_Node_Str")) {
        new HelpFormatter().printHelp("String_Node_Str",options);
        return 1;
      }
      if (line.hasOption("String_Node_Str") && (line.hasOption("String_Node_Str") || line.hasOption("String_Node_Str") || line.hasOption("String_Node_Str"))) {
        log.debug("String_Node_Str");
        throw new ParseException("String_Node_Str");
      }
      if (line.hasOption("String_Node_Str") && line.hasOption("String_Node_Str")) {
        log.debug("String_Node_Str");
        throw new ParseException("String_Node_Str");
      }
      if (line.hasOption("String_Node_Str")) {
        LoggingUtils.setDefaultLogLevel(LoggingUtils.INFO);
      }
      if (line.hasOption("String_Node_Str")) {
        LoggingUtils.setDefaultLogLevel(LoggingUtils.DEBUG);
      }
      if (line.hasOption("String_Node_Str")) {
        System.out.println("String_Node_Str");
        HadoopUtils.setupLocalRunner(conf);
      }
      String outputbase=line.getOptionValue("String_Node_Str");
      if (line.hasOption("String_Node_Str")) {
        maxTiles=Integer.parseInt(line.getOptionValue("String_Node_Str"));
      }
      useRand=line.hasOption("String_Node_Str");
      boolean all=line.hasOption("String_Node_Str");
      boolean singleImage=line.hasOption("String_Node_Str");
      mosaicTiles=line.hasOption("String_Node_Str");
      if (mosaicTiles) {
        mosaicTileCount=Integer.parseInt(line.getOptionValue("String_Node_Str"));
      }
      useBounds=line.hasOption("String_Node_Str");
      if (useBounds) {
        final String boundsOption=line.getOptionValue("String_Node_Str");
        bounds=parseBounds(boundsOption);
      }
      if (line.hasOption("String_Node_Str")) {
        colorscale=ColorScaleManager.fromName(line.getOptionValue("String_Node_Str"));
      }
      boolean useTileSet=line.hasOption("String_Node_Str");
      if (useTileSet) {
        tileset=new HashSet<Long>();
        final String tileIdOption=line.getOptionValue("String_Node_Str");
        final String[] tileIds=tileIdOption.split("String_Node_Str");
        for (        final String tileId : tileIds) {
          tileset.add(Long.valueOf(tileId));
        }
      }
      int zoomlevel=-1;
      if (line.hasOption("String_Node_Str")) {
        zoomlevel=Integer.parseInt(line.getOptionValue("String_Node_Str"));
      }
      String format="String_Node_Str";
      if (line.hasOption("String_Node_Str")) {
        format=line.getOptionValue("String_Node_Str");
      }
      useTMS=line.hasOption("String_Node_Str");
      for (      final String arg : line.getArgs()) {
        MrsPyramid imagePyramid;
        MrsPyramid pyramid=null;
        String pyramidName="String_Node_Str";
        try {
          MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(arg,DataProviderFactory.AccessMode.READ,providerProperties);
          imagePyramid=MrsPyramid.open(dp);
          pyramidName=dp.getSimpleResourceName();
          pyramid=imagePyramid;
        }
 catch (        IOException e) {
          imagePyramid=null;
        }
        if (imagePyramid == null) {
          throw new IOException("String_Node_Str");
        }
        if (zoomlevel <= 0) {
          zoomlevel=pyramid.getMaximumLevel();
        }
        int end=zoomlevel;
        if (all) {
          end=1;
        }
        while (zoomlevel >= end) {
          MrsImage image=imagePyramid.getImage(zoomlevel);
          try {
            final Set<Long> tiles=calculateTiles(pyramid,zoomlevel);
            int tilesize=imagePyramid.getTileSize();
            if (singleImage) {
              saveMultipleTiles(outputbase,pyramidName,format,image,ArrayUtils.toPrimitive(tiles.toArray(new Long[tiles.size()])));
            }
 else             if (mosaicTiles && mosaicTileCount > 0) {
              if (!outputbase.contains(X) || !outputbase.contains(Y) || !outputbase.contains(LAT)|| !outputbase.contains(LON)) {
                outputbase=outputbase + "String_Node_Str";
              }
              for (              final Long tileid : tiles) {
                final Tile t=TMSUtils.tileid(tileid,zoomlevel);
                final Set<Long> tilesToMosaic=new HashSet<>();
                final LongRectangle tileBounds=pyramid.getTileBounds(zoomlevel);
                for (long ty1=t.ty; ((ty1 < (t.ty + mosaicTileCount)) && (ty1 <= tileBounds.getMaxY())); ty1++) {
                  for (long tx1=t.tx; ((tx1 < (t.tx + mosaicTileCount)) && (tx1 <= tileBounds.getMaxX())); tx1++) {
                    tilesToMosaic.add(TMSUtils.tileid(tx1,ty1,zoomlevel));
                  }
                }
                saveMultipleTiles(outputbase,pyramidName,format,image,ArrayUtils.toPrimitive(tilesToMosaic.toArray(new Long[tilesToMosaic.size()])));
              }
            }
 else {
              for (              final Long tileid : tiles) {
                saveSingleTile(outputbase,pyramidName,image,format,tileid,zoomlevel,tilesize);
              }
            }
          }
  finally {
            if (image != null) {
              image.close();
            }
          }
          zoomlevel--;
        }
      }
    }
 catch (    final ParseException e) {
      new HelpFormatter().printHelp("String_Node_Str",options);
      return 1;
    }
    return 0;
  }
 catch (  ColorScale.ColorScaleException|IOException e) {
    e.printStackTrace();
  }
  return -1;
}