#fixed code
                                public static GoogleMachineEventsTraceReader getInstance(
        final String filePath,
        final Function<MachineEvent, Host> hostCreationFunction)
    {
        final InputStream reader = ResourceLoader.newInputStream(filePath, GoogleMachineEventsTraceReader.class);
        return new GoogleMachineEventsTraceReader(filePath, reader, hostCreationFunction);
    }
#vulnerable code 
                                public static GoogleMachineEventsTraceReader getInstance(
        final String filePath,
        final Function<MachineEvent, Host> hostCreationFunction)
    {
        final InputStream reader = ResourceLoader.getInputStream(filePath, GoogleMachineEventsTraceReader.class);
        return new GoogleMachineEventsTraceReader(filePath, reader, hostCreationFunction);
    } 
                            #location 6 
                            #vulnerability type RESOURCE_LEAK