Program: 4974
Project: 4974
Buggy source:
public static void main(String[] args) throws Exception {
  if (args.length < 1) {
    System.out.println(String.format("String_Node_Str",StreamTailer.class.getName()));
    return;
  }
  String streamName=args[0];
  CConfiguration cConf=CConfiguration.create();
  Configuration hConf=new Configuration();
  Injector injector=Guice.createInjector(new ConfigModule(cConf,hConf),new DataFabricModules().getDistributedModules(),new DataSetsModules().getDistributedModules(),new LocationRuntimeModule().getDistributedModules(),new ExploreClientModule(),new ViewAdminModules().getDistributedModules(),new StreamAdminModules().getDistributedModules(),new AuthorizationEnforcementModule().getDistributedModules(),new AuthenticationContextModules().getMasterModule(),new NotificationFeedClientModule());
  StreamAdmin streamAdmin=injector.getInstance(StreamAdmin.class);
  StreamId streamId=NamespaceId.DEFAULT.stream(streamName);
  StreamConfig streamConfig=streamAdmin.getConfig(streamId);
  Location streamLocation=streamConfig.getLocation();
  List<Location> eventFiles=Lists.newArrayList();
  for (  Location partition : streamLocation.list()) {
    if (!partition.isDirectory()) {
      continue;
    }
    for (    Location file : partition.list()) {
      if (StreamFileType.EVENT.isMatched(file.getName())) {
        eventFiles.add(file);
      }
    }
  }
  int generation=StreamUtils.getGeneration(streamConfig);
  MultiLiveStreamFileReader reader=new MultiLiveStreamFileReader(streamConfig,ImmutableList.copyOf(Iterables.transform(eventFiles,createOffsetConverter(generation))));
  List<StreamEvent> events=Lists.newArrayList();
  while (reader.read(events,10,100,TimeUnit.MILLISECONDS) >= 0) {
    for (    StreamEvent event : events) {
      System.out.println(event.getTimestamp() + "String_Node_Str" + Charsets.UTF_8.decode(event.getBody()));
    }
    events.clear();
  }
  reader.close();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  if (args.length < 1) {
    System.out.println(String.format("String_Node_Str",StreamTailer.class.getName()));
    return;
  }
  String streamName=args[0];
  CConfiguration cConf=CConfiguration.create();
  Configuration hConf=new Configuration();
  String txClientId=StreamTailer.class.getName();
  Injector injector=Guice.createInjector(new ConfigModule(cConf,hConf),new DataFabricModules(txClientId).getDistributedModules(),new DataSetsModules().getDistributedModules(),new LocationRuntimeModule().getDistributedModules(),new ExploreClientModule(),new ViewAdminModules().getDistributedModules(),new StreamAdminModules().getDistributedModules(),new AuthorizationEnforcementModule().getDistributedModules(),new AuthenticationContextModules().getMasterModule(),new NotificationFeedClientModule());
  StreamAdmin streamAdmin=injector.getInstance(StreamAdmin.class);
  StreamId streamId=NamespaceId.DEFAULT.stream(streamName);
  StreamConfig streamConfig=streamAdmin.getConfig(streamId);
  Location streamLocation=streamConfig.getLocation();
  List<Location> eventFiles=Lists.newArrayList();
  for (  Location partition : streamLocation.list()) {
    if (!partition.isDirectory()) {
      continue;
    }
    for (    Location file : partition.list()) {
      if (StreamFileType.EVENT.isMatched(file.getName())) {
        eventFiles.add(file);
      }
    }
  }
  int generation=StreamUtils.getGeneration(streamConfig);
  MultiLiveStreamFileReader reader=new MultiLiveStreamFileReader(streamConfig,ImmutableList.copyOf(Iterables.transform(eventFiles,createOffsetConverter(generation))));
  List<StreamEvent> events=Lists.newArrayList();
  while (reader.read(events,10,100,TimeUnit.MILLISECONDS) >= 0) {
    for (    StreamEvent event : events) {
      System.out.println(event.getTimestamp() + "String_Node_Str" + Charsets.UTF_8.decode(event.getBody()));
    }
    events.clear();
  }
  reader.close();
}