Buggy code:
public class RequestServer extends NanoHTTPD { public static final int H2O_REST_API_VERSION = 3 ; public static RequestServer SERVER ; private RequestServer ( ServerSocket socket ) throws IOException { } private static final String _htmlTemplateFromFile = RequestServer . loadTemplate ( "//page.html" ) ; private static volatile String _htmlTemplate = "" ; private static final LinkedHashMap < Pattern , Route > _routes = new LinkedHashMap < > ( ) ; private static final LinkedHashMap < Pattern , Route > _fallbacks = new LinkedHashMap < > ( ) ; public static final int numRoutes ( ) { } public static final Collection < Route > routes ( ) { } private static HashMap < String , ArrayList < RequestServer . MenuItem > > _navbar = new HashMap < > ( ) ; private static ArrayList < String > _navbarOrdering = new ArrayList < > ( ) ; private static Pattern version_pattern = null ; private static Pattern getVersionPattern ( ) { } @ Deprecated public static Route register ( String uri_pattern , String http_method , Class < ? extends Handler > handler_class , String handler_method , String summary ) { } @ Deprecated public static Route register ( String uri_pattern , String http_method , Class < ? extends Handler > handler_class , String handler_method , String [ ] path_params , String summary ) { } public static Route register ( String uri_pattern , String http_method , Class < ? extends Handler > handler_class , String handler_method , String doc_method , String summary ) { } public static Route register ( String uri_pattern_raw , String http_method , Class < ? extends Handler > handler_class , String handler_method , String doc_method , String [ ] path_params , String summary ) { } public static Route register ( String uri_pattern_raw , String http_method , Class < ? extends Handler > handler_class , String handler_method , String doc_method , String [ ] path_params , String summary , HandlerFactory handler_factory ) { } protected static Route lookup ( String http_method , String uri ) { } public static Runnable start ( ) { } void alwaysLogRequest ( String uri , String method , Properties parms ) { } void maybeLogRequest ( String method , String uri , String pattern , Properties parms , Properties header ) { } private void capturePathParms ( Properties parms , String path , Route route ) { } private Response response404 ( String what , RequestType type ) { } @ Override public Response serve ( String uri , String method , Properties header , Properties parms ) { } private Schema handle ( RequestType type , Route route , int version , Properties parms ) throws Exception { } private Response wrap ( Schema s , RequestType type ) { } private Response wrapDownloadData ( String http_code , Schema s ) { } private static final NonBlockingHashMap < String , byte [ ] > _cache = new NonBlockingHashMap ( ) ; private Response getResource ( RequestType request_type , String uri ) { } private static byte [ ] toByteArray ( InputStream is ) throws IOException { } private static String loadTemplate ( String name ) { } private static class MenuItem { private final String _handler ; private final String _name ; private MenuItem ( String handler , String name ) { } private void toHTML ( StringBuilder sb ) { } } private static String initializeNavBar ( String template ) { } public static String addToNavbar ( Route route , String base_url , String name , String category ) { } static String [ ] frameChoices ( int version , Frame fr ) { } private String getOutputLogStem ( ) { } private byte [ ] zipLogs ( byte [ ] [ ] results , String topDir ) throws IOException { } private Response downloadLogs ( ) { Log . info ( "\nCollecting<seq2seq4repair_space>logs." ) ; H2ONode [ ] members = CLOUD . members ( ) ; byte [ ] [ ] perNodeZipByteArray = new byte [ members . length ] [ ] ; for ( int i = 0 ; i < ( members . length ) ; i ++ ) { byte [ ] bytes ; try { boolean healthy = ( ( System . currentTimeMillis ( ) ) - ( members [ i ] . _last_heard_from ) ) < ( HeartBeatThread . TIMEOUT ) ; if ( healthy ) { GetLogsFromNode g = new GetLogsFromNode ( ) ; <START_BUG> g . nodeidx = 0 ; <END_BUG> g . doIt ( ) ; bytes = g . bytes ; } else { bytes = "Node<seq2seq4repair_space>not<seq2seq4repair_space>healthy" . getBytes ( ) ; } } catch ( Exception e ) { bytes = e . toString ( ) . getBytes ( ) ; } perNodeZipByteArray [ i ] = bytes ; } String outputFileStem = getOutputLogStem ( ) ; byte [ ] finalZipByteArray ; try { finalZipByteArray = zipLogs ( perNodeZipByteArray , outputFileStem ) ; } catch ( Exception e ) { finalZipByteArray = e . toString ( ) . getBytes ( ) ; } NanoHTTPD . Response res = new Response ( NanoHTTPD . HTTP_OK , NanoHTTPD . MIME_DEFAULT_BINARY , new ByteArrayInputStream ( finalZipByteArray ) ) ; res . addHeader ( "Content-Length" , Long . toString ( finalZipByteArray . length ) ) ; res . addHeader ( "Content-Disposition" , ( ( "attachment;<seq2seq4repair_space>filename=" + outputFileStem ) + ".zip" ) ) ; return res ; } private Response downloadNps ( String categoryName , String keyName ) { } private Response redirectToFlow ( ) { } }

Fix:
g . nodeidx = i ;