nus-yam/ex-repair huggingface dataset:
Program: 7586
Project: 7586
Buggy source:
@Inject public InMemoryTransactionService(@Named("String_Node_Str") CConfiguration conf,DiscoveryService discoveryService,Provider<InMemoryTransactionManager> txManagerProvider){
  this.discoveryService=discoveryService;
  this.txManagerProvider=txManagerProvider;
  address=conf.get(Constants.Transaction.Container.ADDRESS);
  threads=conf.getInt(Constants.Transaction.Service.CFG_DATA_TX_SERVER_THREADS,Constants.Transaction.Service.DEFAULT_DATA_TX_SERVER_THREADS);
  ioThreads=conf.getInt(Constants.Transaction.Service.CFG_DATA_TX_SERVER_IO_THREADS,Constants.Transaction.Service.DEFAULT_DATA_TX_SERVER_IO_THREADS);
  maxReadBufferBytes=conf.getInt(com.continuuity.common.conf.Constants.Thrift.MAX_READ_BUFFER,com.continuuity.common.conf.Constants.Thrift.DEFAULT_MAX_READ_BUFFER);
  LOG.info("String_Node_Str" + "String_Node_Str" + address + "String_Node_Str"+ threads+ "String_Node_Str"+ ioThreads+ "String_Node_Str"+ maxReadBufferBytes);
}

Fixed version (ground truth):
@Inject public InMemoryTransactionService(CConfiguration conf,DiscoveryService discoveryService,Provider<InMemoryTransactionManager> txManagerProvider){
  this.discoveryService=discoveryService;
  this.txManagerProvider=txManagerProvider;
  address=conf.get(Constants.Transaction.Container.ADDRESS);
  threads=conf.getInt(Constants.Transaction.Service.CFG_DATA_TX_SERVER_THREADS,Constants.Transaction.Service.DEFAULT_DATA_TX_SERVER_THREADS);
  ioThreads=conf.getInt(Constants.Transaction.Service.CFG_DATA_TX_SERVER_IO_THREADS,Constants.Transaction.Service.DEFAULT_DATA_TX_SERVER_IO_THREADS);
  maxReadBufferBytes=conf.getInt(com.continuuity.common.conf.Constants.Thrift.MAX_READ_BUFFER,com.continuuity.common.conf.Constants.Thrift.DEFAULT_MAX_READ_BUFFER);
  LOG.info("String_Node_Str" + "String_Node_Str" + address + "String_Node_Str"+ threads+ "String_Node_Str"+ ioThreads+ "String_Node_Str"+ maxReadBufferBytes);
}
Program: 7588
Project: 7588
Buggy source:
private StreamConfig createStreamConfig(String stream) throws IOException {
  return new StreamConfig(stream,3600000,10000,new LocalLocationFactory(tmpFolder.newFolder()).create(stream));
}

Fixed version (ground truth):
private StreamConfig createStreamConfig(String stream) throws IOException {
  return new StreamConfig(stream,3600000,10000,Long.MAX_VALUE,new LocalLocationFactory(tmpFolder.newFolder()).create(stream));
}
Program: 7589
Project: 7589
Buggy source:
private StreamConfig createStreamConfig(String stream) throws IOException {
  return new StreamConfig(stream,3600000,10000,new LocalLocationFactory(tmpFolder.newFolder()).create(stream));
}

Fixed version (ground truth):
private StreamConfig createStreamConfig(String stream) throws IOException {
  return new StreamConfig(stream,3600000,10000,Long.MAX_VALUE,new LocalLocationFactory(tmpFolder.newFolder()).create(stream));
}
Program: 7590
Project: 7590
Buggy source:
@Override public void updateConfig(String streamName,StreamConfig config) throws IOException {
  Location streamLocation=streamBaseLocation.append(streamName);
  Preconditions.checkArgument(streamLocation.isDirectory(),"String_Node_Str",streamName);
  StreamConfig originalConfig=getConfig(streamName);
  Preconditions.checkArgument(isValidConfigUpdate(originalConfig,config),"String_Node_Str",streamName);
  Location configLocation=streamLocation.append(CONFIG_FILE_NAME);
  Location tempLocation=configLocation.getTempFile("String_Node_Str");
  Writer writer=new OutputStreamWriter(tempLocation.getOutputStream(),Charsets.UTF_8);
  try {
    writer.write(GSON.toJson(config));
  }
  finally {
    Closeables.closeQuietly(writer);
  }
  Preconditions.checkState(tempLocation.renameTo(configLocation) != null,"String_Node_Str",tempLocation,configLocation);
  Preconditions.checkState(tempLocation.delete(),"String_Node_Str",tempLocation);
}

Fixed version (ground truth):
@Override public void updateConfig(String streamName,StreamConfig config) throws IOException {
  Location streamLocation=streamBaseLocation.append(streamName);
  Preconditions.checkArgument(streamLocation.isDirectory(),"String_Node_Str",streamName);
  StreamConfig originalConfig=getConfig(streamName);
  Preconditions.checkArgument(isValidConfigUpdate(originalConfig,config),"String_Node_Str",streamName);
  Location configLocation=streamLocation.append(CONFIG_FILE_NAME);
  Location tempLocation=configLocation.getTempFile("String_Node_Str");
  Writer writer=new OutputStreamWriter(tempLocation.getOutputStream(),Charsets.UTF_8);
  try {
    writer.write(GSON.toJson(config));
  }
  finally {
    Closeables.closeQuietly(writer);
  }
  Preconditions.checkState(tempLocation.renameTo(configLocation) != null,"String_Node_Str",tempLocation,configLocation);
}
Program: 7591
Project: 7591
Buggy source:
@Test public void testHiveDatasetsJoin() throws Exception {
  datasetManager.addInstance("String_Node_Str","String_Node_Str",DatasetInstanceProperties.EMPTY);
  DatasetAdmin admin=datasetManager.getAdmin("String_Node_Str",null);
  admin.create();
  Transaction tx1=transactionManager.startShort(100);
  KeyValueTableDefinition.KeyValueTable table=datasetManager.getDataset("String_Node_Str",null);
  Assert.assertNotNull(table);
  table.startTx(tx1);
  table.put("String_Node_Str","String_Node_Str");
  table.put("String_Node_Str","String_Node_Str");
  table.put("String_Node_Str","String_Node_Str");
  Assert.assertTrue(table.commitTx());
  transactionManager.canCommit(tx1,table.getTxChanges());
  transactionManager.commit(tx1);
  table.postTxCommit();
  Transaction tx2=transactionManager.startShort(100);
  table.startTx(tx2);
  Assert.assertEquals("String_Node_Str",table.get("String_Node_Str"));
  hiveClient.sendCommand("String_Node_Str",null,null);
  hiveClient.sendCommand("String_Node_Str" + "String_Node_Str" + "String_Node_Str",null,null);
  hiveClient.sendCommand("String_Node_Str",null,null);
  hiveClient.sendCommand("String_Node_Str" + "String_Node_Str" + "String_Node_Str",null,null);
  HiveClientTestUtils.assertCmdFindPattern(hiveClient,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void testHiveDatasetsJoin() throws Exception {
  datasetFramework.addInstance("String_Node_Str","String_Node_Str",DatasetInstanceProperties.EMPTY);
  DatasetAdmin admin=datasetFramework.getAdmin("String_Node_Str",null);
  admin.create();
  Transaction tx1=transactionManager.startShort(100);
  KeyValueTableDefinition.KeyValueTable table=datasetFramework.getDataset("String_Node_Str",null);
  Assert.assertNotNull(table);
  table.startTx(tx1);
  table.put("String_Node_Str","String_Node_Str");
  table.put("String_Node_Str","String_Node_Str");
  table.put("String_Node_Str","String_Node_Str");
  Assert.assertTrue(table.commitTx());
  transactionManager.canCommit(tx1,table.getTxChanges());
  transactionManager.commit(tx1);
  table.postTxCommit();
  Transaction tx2=transactionManager.startShort(100);
  table.startTx(tx2);
  Assert.assertEquals("String_Node_Str",table.get("String_Node_Str"));
  hiveClient.sendCommand("String_Node_Str",null,null);
  hiveClient.sendCommand("String_Node_Str" + "String_Node_Str" + "String_Node_Str",null,null);
  hiveClient.sendCommand("String_Node_Str",null,null);
  hiveClient.sendCommand("String_Node_Str" + "String_Node_Str" + "String_Node_Str",null,null);
  HiveClientTestUtils.assertCmdFindPattern(hiveClient,"String_Node_Str","String_Node_Str");
}
Program: 7592
Project: 7592
Buggy source:
@Test public void testHiveSchemaFor() throws Exception {
  Assert.assertEquals("String_Node_Str",Scannables.hiveSchemaFor(Int.class));
  Assert.assertEquals("String_Node_Str",Scannables.hiveSchemaFor(Longg.class));
  Assert.assertEquals("String_Node_Str",Scannables.hiveSchemaFor(new TypeToken<ImmutablePair<Integer,String>>(){
  }
.getType()));
  Assert.assertEquals("String_Node_Str" + "String_Node_Str",Scannables.hiveSchemaFor(Record.class));
  Assert.assertEquals("String_Node_Str",Scannables.hiveSchemaFor(new ObjectStore<ImmutablePair<Integer,String>>("String_Node_Str",new TypeToken<ImmutablePair<Integer,String>>(){
  }
.getType())));
}

Fixed version (ground truth):
@Test public void testHiveSchemaFor() throws Exception {
  Assert.assertEquals("String_Node_Str",Scannables.hiveSchemaFor(Int.class));
  Assert.assertEquals("String_Node_Str",Scannables.hiveSchemaFor(Longg.class));
  Assert.assertEquals("String_Node_Str",Scannables.hiveSchemaFor(new TypeToken<ImmutablePair<Integer,String>>(){
  }
.getType()));
  Assert.assertEquals("String_Node_Str" + "String_Node_Str",Scannables.hiveSchemaFor(Record.class));
}
Program: 7593
Project: 7593
Buggy source:
public static Dataset getDataSetInstance(String datasetName,Transaction tx) throws IOException {
  DatasetManager manager=HiveServer.getDatasetManager();
  try {
    Dataset dataset=manager.getDataset(datasetName,null);
    if (dataset instanceof TransactionAware) {
      ((TransactionAware)dataset).startTx(tx);
    }
    return dataset;
  }
 catch (  DatasetManagementException e) {
    throw new IOException(e);
  }
}

Fixed version (ground truth):
public static Dataset getDataSetInstance(String datasetName,Transaction tx) throws IOException {
  DatasetManager manager=RuntimeHiveServer.getDatasetManager();
  try {
    Dataset dataset=manager.getDataset(datasetName,null);
    if (dataset instanceof TransactionAware) {
      ((TransactionAware)dataset).startTx(tx);
    }
    return dataset;
  }
 catch (  DatasetManagementException e) {
    throw new IOException(e);
  }
}
Program: 7594
Project: 7594
Buggy source:
@Override public Module getSingleNodeModules(){
  System.setProperty("String_Node_Str",conf.get(Constants.CFG_DATA_LEVELDB_DIR));
  return getLocalModules();
}

Fixed version (ground truth):
@Override public Module getSingleNodeModules(){
  File warehouseDir=new File(new File(conf.get(Constants.CFG_LOCAL_DATA_DIR),"String_Node_Str"),"String_Node_Str");
  File databaseDir=new File(new File(conf.get(Constants.CFG_LOCAL_DATA_DIR),"String_Node_Str"),"String_Node_Str");
  LOG.debug("String_Node_Str",Constants.Hive.METASTORE_WAREHOUSE_DIR,warehouseDir.getAbsolutePath());
  LOG.debug("String_Node_Str",Constants.Hive.DATABASE_DIR,databaseDir.getAbsolutePath());
  System.setProperty(Constants.Hive.METASTORE_WAREHOUSE_DIR,warehouseDir.getAbsolutePath());
  System.setProperty(Constants.Hive.DATABASE_DIR,databaseDir.getAbsolutePath());
  return getLocalModules();
}
Program: 7595
Project: 7595
Buggy source:
@Override public Module getInMemoryModules(){
  String tmpDir=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str"+ Long.toString(System.currentTimeMillis());
  System.setProperty("String_Node_Str",tmpDir);
  return getLocalModules();
}

Fixed version (ground truth):
@Override public Module getInMemoryModules(){
  String warehouseDir=System.getProperty("String_Node_Str") + System.getProperty("String_Node_Str") + "String_Node_Str"+ System.getProperty("String_Node_Str")+ "String_Node_Str"+ Long.toString(System.currentTimeMillis());
  LOG.debug("String_Node_Str",Constants.Hive.METASTORE_WAREHOUSE_DIR,warehouseDir);
  System.setProperty(Constants.Hive.METASTORE_WAREHOUSE_DIR,warehouseDir);
  return getLocalModules();
}
Program: 7596
Project: 7596
Buggy source:
@Override protected void startUp() throws Exception {
  int hiveServerPort=hiveConf.getInt("String_Node_Str",0);
  Preconditions.checkArgument(hiveServerPort != 0,"String_Node_Str");
  LOG.info("String_Node_Str",hostname,hiveServerPort,2.1);
  hiveServer2=new HiveServer2();
  hiveServer2.init(hiveConf);
  hiveServer2.start();
  waitForPort(hostname.getHostName(),hiveServerPort);
  LOG.info("String_Node_Str");
  final InetSocketAddress socketAddress=new InetSocketAddress(hostname,hiveServerPort);
  discoveryService.register(new Discoverable(){
    @Override public String getName(){
      return Constants.Service.HIVE;
    }
    @Override public InetSocketAddress getSocketAddress(){
      return socketAddress;
    }
  }
);
  LOG.info("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  int hiveServerPort=hiveConf.getInt("String_Node_Str",0);
  Preconditions.checkArgument(hiveServerPort != 0,"String_Node_Str");
  LOG.info("String_Node_Str",hostname,hiveServerPort);
  hiveServer2=new HiveServer2();
  hiveServer2.init(hiveConf);
  hiveServer2.start();
  waitForPort(hostname.getHostName(),hiveServerPort);
  LOG.info("String_Node_Str");
  final InetSocketAddress socketAddress=new InetSocketAddress(hostname,hiveServerPort);
  discoveryService.register(new Discoverable(){
    @Override public String getName(){
      return Constants.Service.HIVE;
    }
    @Override public InetSocketAddress getSocketAddress(){
      return socketAddress;
    }
  }
);
  LOG.info("String_Node_Str");
}
Program: 7597
Project: 7597
Buggy source:
@Override public void doInit(TwillContext context){
  LOG.info("String_Node_Str",name);
  System.setProperty("String_Node_Str",new File(System.getProperty("String_Node_Str")).getAbsolutePath());
  try {
    LOG.info("String_Node_Str",name,context.getHost().getCanonicalHostName());
    getCConfiguration().set(Constants.Hive.Container.SERVER_ADDRESS,context.getHost().getCanonicalHostName());
    Map<String,String> configs=context.getSpecification().getConfigs();
    hiveConf=new HiveConf();
    hiveConf.clear();
    hiveConf.addResource(new File(configs.get(hiveConfName)).toURI().toURL());
    int hiveServerPort=PortDetector.findFreePort();
    LOG.info("String_Node_Str",hiveServerPort);
    hiveConf.setInt("String_Node_Str",hiveServerPort);
    Injector injector=createGuiceInjector(getCConfiguration(),getConfiguration(),hiveConf);
    zkClient=injector.getInstance(ZKClientService.class);
    hiveServer=injector.getInstance(HiveServer.class);
    LOG.info("String_Node_Str",name);
  }
 catch (  Throwable t) {
    LOG.error(t.getMessage(),t);
    throw Throwables.propagate(t);
  }
}

Fixed version (ground truth):
@Override public void doInit(TwillContext context){
  LOG.info("String_Node_Str",name);
  System.setProperty("String_Node_Str",new File(System.getProperty("String_Node_Str")).getAbsolutePath());
  try {
    LOG.info("String_Node_Str",name,context.getHost().getCanonicalHostName());
    getCConfiguration().set(Constants.Hive.Container.SERVER_ADDRESS,context.getHost().getCanonicalHostName());
    Map<String,String> configs=context.getSpecification().getConfigs();
    hiveConf=new HiveConf();
    hiveConf.clear();
    hiveConf.addResource(new File(configs.get("String_Node_Str")).toURI().toURL());
    int hiveServerPort=PortDetector.findFreePort();
    LOG.info("String_Node_Str",hiveServerPort);
    hiveConf.setInt("String_Node_Str",hiveServerPort);
    Injector injector=createGuiceInjector(getCConfiguration(),getConfiguration(),hiveConf);
    zkClient=injector.getInstance(ZKClientService.class);
    hiveServer=injector.getInstance(HiveServer.class);
    LOG.info("String_Node_Str",name);
  }
 catch (  Throwable t) {
    LOG.error(t.getMessage(),t);
    throw Throwables.propagate(t);
  }
}
Program: 7598
Project: 7598
Buggy source:
/** 
 * Reads or skips a   {@link StreamEvent}.
 * @param filter to determine to accept or skip a stream event.
 * @return The next StreamEvent or {@code null} if the event is rejected by the filter or reached EOF.
 */
private PositionStreamEvent nextStreamEvent(ReadFilter filter) throws IOException {
  PositionStreamEvent event=null;
  boolean done=false;
  while (!done) {
    if (timestamp < 0) {
      timestamp=readTimestamp();
    }
    if (timestamp == -1L) {
      eof=true;
      break;
    }
    if (length < 0) {
      length=readLength();
    }
    if (length > 0) {
      long startPos=eventInput.getPos();
      if (filter.acceptOffset(startPos)) {
        event=new DefaultPositionStreamEvent(readStreamData(),timestamp,startPos);
      }
 else {
        skipStreamData();
      }
      long endPos=eventInput.getPos();
      done=true;
      length-=(int)(endPos - startPos);
    }
    if (length == 0) {
      timestamp=-1L;
      length=-1;
    }
  }
  return event;
}

Fixed version (ground truth):
/** 
 * Reads or skips a   {@link StreamEvent}.
 * @param filter to determine to accept or skip a stream event.
 * @return The next StreamEvent or {@code null} if the event is rejected by the filter or reached EOF.
 */
private PositionStreamEvent nextStreamEvent(ReadFilter filter) throws IOException {
  PositionStreamEvent event=null;
  boolean done=false;
  while (!done) {
    if (timestamp < 0) {
      timestamp=readTimestamp();
    }
    if (timestamp == -1L) {
      eof=true;
      break;
    }
    boolean isReadBlockLength=length < 0;
    if (isReadBlockLength) {
      length=readLength();
    }
    if (length > 0) {
      long startPos=eventInput.getPos();
      try {
        if (filter.acceptOffset(startPos)) {
          event=new DefaultPositionStreamEvent(readStreamData(),timestamp,startPos);
        }
 else {
          skipStreamData();
        }
      }
 catch (      IOException e) {
        if (isReadBlockLength) {
          timestamp=-1L;
          length=-1;
        }
        throw e;
      }
      long endPos=eventInput.getPos();
      done=true;
      length-=(int)(endPos - startPos);
    }
    if (length == 0) {
      timestamp=-1L;
      length=-1;
    }
  }
  return event;
}
Program: 7600
Project: 7600
Buggy source:
@Test public void testExplodeA() throws Exception {
  URL jarUrl=getClass().getResource("String_Node_Str");
  Assert.assertNotNull(jarUrl);
  File dest=tempFolder.newFolder();
  int numFiles=JarExploder.explode(new File(jarUrl.toURI()),dest,new Predicate<JarEntry>(){
    @Override public boolean apply(    JarEntry input){
      return input.getName().startsWith("String_Node_Str");
    }
  }
);
  Assert.assertEquals(aFileContentMap.size(),numFiles);
  verifyA(dest);
}

Fixed version (ground truth):
@Test public void testExplodeA() throws Exception {
  URL jarUrl=getClass().getResource("String_Node_Str");
  Assert.assertNotNull(jarUrl);
  File dest=TEMP_FOLDER.newFolder();
  int numFiles=JarExploder.explode(new File(jarUrl.toURI()),dest,new Predicate<JarEntry>(){
    @Override public boolean apply(    JarEntry input){
      return input.getName().startsWith("String_Node_Str");
    }
  }
);
  Assert.assertEquals(aFileContentMap.size(),numFiles);
  verifyA(dest);
}
Program: 7601
Project: 7601
Buggy source:
/** 
 * Prints the usage based on declared Options in the class.
 * @param options extracted options from introspecting a class
 * @param out Stream to output the usage.
 */
private static void printUsage(Map<String,OptionSpec> options,String appName,String appVersion,PrintStream out){
  final String NON_DEFAULT_FORMAT_STRING="String_Node_Str";
  final String DEFAULT_FORMAT_STRING="String_Node_Str";
  out.print(String.format("String_Node_Str",appName,appVersion));
  out.println("String_Node_Str");
  if (!options.containsKey("String_Node_Str")) {
    out.printf(NON_DEFAULT_FORMAT_STRING,"String_Node_Str","String_Node_Str","String_Node_Str");
  }
  for (  OptionSpec option : options.values()) {
    if (option.isHidden()) {
      continue;
    }
    String usage=option.getUsage();
    if (!usage.isEmpty()) {
      usage="String_Node_Str" + usage;
    }
    String def=option.getDefaultValue();
    if ("String_Node_Str".equals(def)) {
      out.printf(NON_DEFAULT_FORMAT_STRING,option.getName(),"String_Node_Str" + option.getTypeName() + "String_Node_Str",usage);
    }
 else {
      out.printf(DEFAULT_FORMAT_STRING,option.getName(),"String_Node_Str" + option.getTypeName() + "String_Node_Str",usage,option.getDefaultValue());
    }
  }
}

Fixed version (ground truth):
/** 
 * Prints the usage based on declared Options in the class.
 * @param options extracted options from introspecting a class
 * @param out Stream to output the usage.
 */
private static void printUsage(Map<String,OptionSpec> options,String appName,String appVersion,PrintStream out){
  out.print(String.format("String_Node_Str",appName,appVersion));
  out.println("String_Node_Str");
  if (!options.containsKey("String_Node_Str")) {
    out.printf(NON_DEFAULT_FORMAT_STRING,"String_Node_Str","String_Node_Str","String_Node_Str");
  }
  for (  OptionSpec option : options.values()) {
    if (option.isHidden()) {
      continue;
    }
    String usage=option.getUsage();
    if (!usage.isEmpty()) {
      usage="String_Node_Str" + usage;
    }
    String def=option.getDefaultValue();
    if ("String_Node_Str".equals(def)) {
      out.printf(NON_DEFAULT_FORMAT_STRING,option.getName(),"String_Node_Str" + option.getTypeName() + "String_Node_Str",usage);
    }
 else {
      out.printf(DEFAULT_FORMAT_STRING,option.getName(),"String_Node_Str" + option.getTypeName() + "String_Node_Str",usage,option.getDefaultValue());
    }
  }
}
Program: 7602
Project: 7602
Buggy source:
/** 
 * Splits a comma separated value <code>String</code>, trimming leading and trailing whitespace on each value.
 * @param str a comma separated <String> with values
 * @return an array of <code>String</code> values
 */
public static String[] getTrimmedStrings(String str){
  if (null == str || "String_Node_Str".equals(str.trim())) {
    return emptyStringArray;
  }
  return str.trim().split("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Splits a comma separated value <code>String</code>, trimming leading and trailing whitespace on each value.
 * @param str a comma separated <String> with values
 * @return an array of <code>String</code> values
 */
public static String[] getTrimmedStrings(String str){
  if (null == str || "String_Node_Str".equals(str.trim())) {
    return EMPTY_STRING_ARRAY;
  }
  return str.trim().split("String_Node_Str");
}
Program: 7603
Project: 7603
Buggy source:
@Override public void readFields(DataInput in) throws IOException {
  try {
    ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
    if (classLoader == null) {
      classLoader=getClass().getClassLoader();
    }
    Class<? extends Split> splitClass=(Class<Split>)classLoader.loadClass(Text.readString(in));
    dataSetSplit=new Gson().fromJson(Text.readString(in),splitClass);
  }
 catch (  ClassNotFoundException e) {
    throw Throwables.propagate(e);
  }
}

Fixed version (ground truth):
@Override public void readFields(DataInput in) throws IOException {
  try {
    ClassLoader classLoader=Thread.currentThread().getContextClassLoader();
    if (classLoader == null) {
      classLoader=getClass().getClassLoader();
    }
    Class<? extends Split> splitClass=(Class<Split>)classLoader.loadClass(Text.readString(in));
    dataSetSplit=new Gson().fromJson(Text.readString(in),splitClass);
    dummyPath=new Path(Text.readString(in));
  }
 catch (  ClassNotFoundException e) {
    throw Throwables.propagate(e);
  }
}
Program: 7604
Project: 7604
Buggy source:
public DatasetInputSplit(Split dataSetSplit){
  this.dataSetSplit=dataSetSplit;
}

Fixed version (ground truth):
public DatasetInputSplit(Split dataSetSplit,Path dummyPath){
  this.dataSetSplit=dataSetSplit;
  this.dummyPath=dummyPath;
}
Program: 7605
Project: 7605
Buggy source:
@Override public void write(DataOutput out) throws IOException {
  Text.writeString(out,dataSetSplit.getClass().getName());
  String ser=new Gson().toJson(dataSetSplit);
  Text.writeString(out,ser);
}

Fixed version (ground truth):
@Override public void write(DataOutput out) throws IOException {
  Text.writeString(out,dataSetSplit.getClass().getName());
  String ser=new Gson().toJson(dataSetSplit);
  Text.writeString(out,ser);
  Text.writeString(out,dummyPath.toUri().toString());
}
Program: 7606
Project: 7606
Buggy source:
@Override public InputSplit[] getSplits(JobConf jobConf,int numSplits) throws IOException {
  RowScannable rowScannable=getDataset(jobConf.get(DATASET_NAME));
  List<Split> dsSplits=rowScannable.getSplits();
  InputSplit[] inputSplits=new InputSplit[dsSplits.size()];
  for (int i=0; i < dsSplits.size(); i++) {
    inputSplits[i]=new DatasetInputSplit(dsSplits.get(i));
  }
  return inputSplits;
}

Fixed version (ground truth):
@Override public InputSplit[] getSplits(JobConf jobConf,int numSplits) throws IOException {
  RowScannable rowScannable=getDataset(jobConf.get(DATASET_NAME));
  Job job=new Job(jobConf);
  JobContext jobContext=ShimLoader.getHadoopShims().newJobContext(job);
  Path[] tablePaths=FileInputFormat.getInputPaths(jobContext);
  List<Split> dsSplits=rowScannable.getSplits();
  InputSplit[] inputSplits=new InputSplit[dsSplits.size()];
  for (int i=0; i < dsSplits.size(); i++) {
    inputSplits[i]=new DatasetInputSplit(dsSplits.get(i),tablePaths[0]);
  }
  return inputSplits;
}
Program: 7607
Project: 7607
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected final <T>T getDataSetClient(String name,Class<? extends T> type,@Nullable Properties props) throws Exception {
  if (type == InMemoryOcTableClient.class) {
    return (T)new InMemoryOcTableClient(name,ConflictDetection.NONE);
  }
 else   if (type == OrderedColumnarTable.class) {
    ConflictDetection level=null;
    int ttl=-1;
    if (props != null) {
      String levelProperty=props.getProperty("String_Node_Str");
      level=levelProperty == null ? null : ConflictDetection.valueOf(levelProperty);
      String ttlProperty=props.getProperty(TxConstants.PROPERTY_TTL);
      ttl=ttlProperty == null ? null : Integer.valueOf(ttlProperty);
    }
    level=level == null ? ConflictDetection.ROW : level;
    return getOcTableClient(name,level,ttl);
  }
  if (type == MetricsTable.class) {
    return getMetricsTableClient(name);
  }
  return null;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected final <T>T getDataSetClient(String name,Class<? extends T> type,@Nullable Properties props) throws Exception {
  if (type == InMemoryOcTableClient.class) {
    return (T)new InMemoryOcTableClient(name,ConflictDetection.NONE);
  }
 else   if (type == OrderedColumnarTable.class) {
    ConflictDetection level=null;
    int ttl=-1;
    if (props != null) {
      String levelProperty=props.getProperty("String_Node_Str");
      level=levelProperty == null ? null : ConflictDetection.valueOf(levelProperty);
      String ttlProperty=props.getProperty(TxConstants.PROPERTY_TTL);
      ttl=ttlProperty == null ? -1 : Integer.valueOf(ttlProperty);
    }
    level=level == null ? ConflictDetection.ROW : level;
    return getOcTableClient(name,level,ttl);
  }
  if (type == MetricsTable.class) {
    return getMetricsTableClient(name);
  }
  return null;
}
Program: 7608
Project: 7608
Buggy source:
public static void setFlowletInstances(AppFabricHttpHandler httpHandler,String applicationId,String flowId,String flowletName,int instances){
  MockResponder responder=new MockResponder();
  String uri=String.format("String_Node_Str",applicationId,flowId,flowletName,instances);
  HttpRequest request=new DefaultHttpRequest(HttpVersion.HTTP_1_1,HttpMethod.PUT,uri);
  request.addHeader("String_Node_Str",instances);
  httpHandler.setFlowletInstances(request,responder,applicationId,flowId,flowletName);
  Preconditions.checkArgument(responder.getStatus().getCode() == 200,"String_Node_Str");
}

Fixed version (ground truth):
public static void setFlowletInstances(AppFabricHttpHandler httpHandler,String applicationId,String flowId,String flowletName,int instances){
  MockResponder responder=new MockResponder();
  String uri=String.format("String_Node_Str",applicationId,flowId,flowletName,instances);
  HttpRequest request=new DefaultHttpRequest(HttpVersion.HTTP_1_1,HttpMethod.PUT,uri);
  JsonObject json=new JsonObject();
  json.addProperty("String_Node_Str",instances);
  request.setContent(ChannelBuffers.wrappedBuffer(json.toString().getBytes()));
  httpHandler.setFlowletInstances(request,responder,applicationId,flowId,flowletName);
  Preconditions.checkArgument(responder.getStatus().getCode() == 200,"String_Node_Str");
}
Program: 7609
Project: 7609
Buggy source:
@Test public void testChangeInstance() throws Exception {
  StreamAdmin streamAdmin=getStreamAdmin();
  String streamName="String_Node_Str";
  streamAdmin.create(streamName);
  StreamConfig config=streamAdmin.getConfig(streamName);
  StreamConsumerState state=generateState(0L,0,config,0L,4);
  StreamConsumerStateStore stateStore=createStateStore(config);
  stateStore.save(state);
  streamAdmin.configureInstances(QueueName.fromStream(streamName),0L,2);
  StreamConsumerState newState=stateStore.get(0L,1);
  Assert.assertTrue(Iterables.elementsEqual(state.getState(),newState.getState()));
  StreamFileOffset fileOffset=Iterables.get(state.getState(),0);
  long oldOffset=fileOffset.getOffset();
  long newOffset=oldOffset + 100000;
  fileOffset.setOffset(newOffset);
  stateStore.save(state);
  state=stateStore.get(0L,0);
  Assert.assertEquals(newOffset,Iterables.get(state.getState(),0).getOffset());
  streamAdmin.configureInstances(QueueName.fromStream(streamName),0L,3);
  state=stateStore.get(0L,0);
  Assert.assertEquals(oldOffset,Iterables.get(state.getState(),0).getOffset());
  List<StreamConsumerState> states=Lists.newArrayList();
  stateStore.getByGroup(0L,states);
  Assert.assertEquals(3,states.size());
  Assert.assertTrue(Iterables.elementsEqual(states.get(0).getState(),states.get(1).getState()));
  Assert.assertTrue(Iterables.elementsEqual(states.get(0).getState(),states.get(2).getState()));
}

Fixed version (ground truth):
@Test public void testChangeInstance() throws Exception {
  StreamAdmin streamAdmin=getStreamAdmin();
  String streamName="String_Node_Str";
  streamAdmin.create(streamName);
  StreamConfig config=streamAdmin.getConfig(streamName);
  StreamConsumerState state=generateState(0L,0,config,0L,4);
  StreamConsumerStateStore stateStore=createStateStore(config);
  stateStore.save(state);
  streamAdmin.configureInstances(QueueName.fromStream(streamName),0L,2);
  StreamConsumerState newState=stateStore.get(0L,1);
  Assert.assertTrue(Iterables.elementsEqual(state.getState(),newState.getState()));
  StreamFileOffset fileOffset=Iterables.get(state.getState(),0);
  long oldOffset=fileOffset.getOffset();
  long newOffset=oldOffset + 100000;
  fileOffset.setOffset(newOffset);
  stateStore.save(state);
  state=stateStore.get(0L,0);
  Assert.assertEquals(newOffset,Iterables.get(state.getState(),0).getOffset());
  streamAdmin.configureInstances(QueueName.fromStream(streamName),0L,3);
  state=stateStore.get(0L,0);
  Assert.assertEquals(oldOffset,Iterables.get(state.getState(),0).getOffset());
  Assert.assertEquals(4,Iterables.size(state.getState()));
  List<StreamConsumerState> states=Lists.newArrayList();
  stateStore.getByGroup(0L,states);
  Assert.assertEquals(3,states.size());
  Assert.assertTrue(Iterables.elementsEqual(states.get(0).getState(),states.get(1).getState()));
  Assert.assertTrue(Iterables.elementsEqual(states.get(0).getState(),states.get(2).getState()));
}
Program: 7610
Project: 7610
Buggy source:
private void getAppDetails(HttpRequest request,HttpResponder responder,String appid){
  if (appid != null && appid.isEmpty()) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,"String_Node_Str");
    return;
  }
  try {
    String accountId=getAuthenticatedAccountId(request);
    Id.Account accId=Id.Account.from(accountId);
    List<Map<String,String>> result=Lists.newArrayList();
    List<ApplicationSpecification> specList;
    if (appid == null) {
      specList=new ArrayList<ApplicationSpecification>(store.getAllApplications(accId));
    }
 else {
      ApplicationSpecification appSpec=store.getApplication(new Id.Application(accId,appid));
      if (appSpec == null) {
        responder.sendStatus(HttpResponseStatus.NOT_FOUND);
        return;
      }
      specList=Collections.singletonList(store.getApplication(new Id.Application(accId,appid)));
    }
    for (    ApplicationSpecification appSpec : specList) {
      result.add(makeAppRecord(appSpec));
    }
    String json=new Gson().toJson(result);
    responder.sendByteArray(HttpResponseStatus.OK,json.getBytes(Charsets.UTF_8),ImmutableMultimap.of(HttpHeaders.Names.CONTENT_TYPE,"String_Node_Str"));
  }
 catch (  SecurityException e) {
    responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);
  }
catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
    responder.sendStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
  }
}

Fixed version (ground truth):
private void getAppDetails(HttpRequest request,HttpResponder responder,String appid){
  if (appid != null && appid.isEmpty()) {
    responder.sendString(HttpResponseStatus.BAD_REQUEST,"String_Node_Str");
    return;
  }
  try {
    String accountId=getAuthenticatedAccountId(request);
    Id.Account accId=Id.Account.from(accountId);
    List<Map<String,String>> result=Lists.newArrayList();
    List<ApplicationSpecification> specList;
    if (appid == null) {
      specList=new ArrayList<ApplicationSpecification>(store.getAllApplications(accId));
    }
 else {
      ApplicationSpecification appSpec=store.getApplication(new Id.Application(accId,appid));
      if (appSpec == null) {
        responder.sendStatus(HttpResponseStatus.NOT_FOUND);
        return;
      }
      specList=Collections.singletonList(store.getApplication(new Id.Application(accId,appid)));
    }
    for (    ApplicationSpecification appSpec : specList) {
      result.add(makeAppRecord(appSpec));
    }
    String json;
    if (appid == null) {
      json=new Gson().toJson(result);
    }
 else {
      json=new Gson().toJson(result.get(0));
    }
    responder.sendByteArray(HttpResponseStatus.OK,json.getBytes(Charsets.UTF_8),ImmutableMultimap.of(HttpHeaders.Names.CONTENT_TYPE,"String_Node_Str"));
  }
 catch (  SecurityException e) {
    responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);
  }
catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
    responder.sendStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
  }
}
Program: 7612
Project: 7612
Buggy source:
/** 
 * Tests procedure instances.
 */
@Test public void testProcedureInstances() throws Exception {
  HttpResponse response=deploy(WordCountApp.class);
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  response=AppFabricTestsSuite.doGet("String_Node_Str");
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  String s=EntityUtils.toString(response.getEntity());
  Map<String,String> result=new Gson().fromJson(s,MAP_STRING_STRING_TYPE);
  Assert.assertEquals(1,result.size());
  Assert.assertEquals(1,Integer.parseInt(result.get("String_Node_Str")));
  JsonObject json=new JsonObject();
  json.addProperty("String_Node_Str",10);
  response=AppFabricTestsSuite.doPut("String_Node_Str",json.toString());
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  response=AppFabricTestsSuite.doGet("String_Node_Str");
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  s=EntityUtils.toString(response.getEntity());
  result=new Gson().fromJson(s,MAP_STRING_STRING_TYPE);
  Assert.assertEquals(1,result.size());
  Assert.assertEquals(10,Integer.parseInt(result.get("String_Node_Str")));
  Assert.assertEquals(200,AppFabricTestsSuite.doDelete("String_Node_Str").getStatusLine().getStatusCode());
}

Fixed version (ground truth):
/** 
 * Tests procedure instances.
 */
@Test public void testProcedureInstances() throws Exception {
  Assert.assertEquals(200,AppFabricTestsSuite.doDelete("String_Node_Str").getStatusLine().getStatusCode());
  Assert.assertEquals(200,AppFabricTestsSuite.doPost("String_Node_Str").getStatusLine().getStatusCode());
  HttpResponse response=deploy(WordCountApp.class);
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  response=AppFabricTestsSuite.doGet("String_Node_Str");
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  String s=EntityUtils.toString(response.getEntity());
  Map<String,String> result=new Gson().fromJson(s,MAP_STRING_STRING_TYPE);
  Assert.assertEquals(1,result.size());
  Assert.assertEquals(1,Integer.parseInt(result.get("String_Node_Str")));
  JsonObject json=new JsonObject();
  json.addProperty("String_Node_Str",10);
  response=AppFabricTestsSuite.doPut("String_Node_Str",json.toString());
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  response=AppFabricTestsSuite.doGet("String_Node_Str");
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  s=EntityUtils.toString(response.getEntity());
  result=new Gson().fromJson(s,MAP_STRING_STRING_TYPE);
  Assert.assertEquals(1,result.size());
  Assert.assertEquals(10,Integer.parseInt(result.get("String_Node_Str")));
  Assert.assertEquals(200,AppFabricTestsSuite.doDelete("String_Node_Str").getStatusLine().getStatusCode());
}
Program: 7613
Project: 7613
Buggy source:
public void handleError(Throwable t){
  try {
    os.close();
    sessionInfo.setStatus(DeployStatus.FAILED);
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void handleError(Throwable t){
  try {
    os.close();
    sessionInfo.setStatus(DeployStatus.FAILED);
    responder.sendString(HttpResponseStatus.INTERNAL_SERVER_ERROR,t.getCause().getMessage());
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    save(sessionInfo.setStatus(sessionInfo.getStatus()),accountId);
    sessions.remove(accountId);
  }
}
Program: 7615
Project: 7615
Buggy source:
@BeforeClass public static void setup() throws Exception {
  Injector injector=Guice.createInjector(new IOModule(),new ConfigModule(),new FileBasedSecurityModule());
  CConfiguration conf=injector.getInstance(CConfiguration.class);
  keyIdentifierCodec=injector.getInstance(KeyIdentifierCodec.class);
  keyLength=conf.getInt(Constants.Security.TOKEN_DIGEST_KEY_LENGTH,Constants.Security.DEFAULT_TOKEN_DIGEST_KEY_LENGTH);
  keyAlgo=conf.get(Constants.Security.TOKEN_DIGEST_ALGO,Constants.Security.DEFAULT_TOKEN_DIGEST_ALGO);
  keyGenerator=KeyGenerator.getInstance(keyAlgo);
  keyGenerator.init(keyLength);
}

Fixed version (ground truth):
@BeforeClass public static void setup() throws Exception {
  Injector injector=Guice.createInjector(new IOModule(),new ConfigModule(),new FileBasedSecurityModule(),new DiscoveryRuntimeModule().getInMemoryModules());
  CConfiguration conf=injector.getInstance(CConfiguration.class);
  keyIdentifierCodec=injector.getInstance(KeyIdentifierCodec.class);
  keyLength=conf.getInt(Constants.Security.TOKEN_DIGEST_KEY_LENGTH,Constants.Security.DEFAULT_TOKEN_DIGEST_KEY_LENGTH);
  keyAlgo=conf.get(Constants.Security.TOKEN_DIGEST_ALGO,Constants.Security.DEFAULT_TOKEN_DIGEST_ALGO);
  keyGenerator=KeyGenerator.getInstance(keyAlgo);
  keyGenerator.init(keyLength);
}
Program: 7616
Project: 7616
Buggy source:
/** 
 * Tests taking a snapshot of the transaction manager
 */
@Test public void testTxManagerSnapshot() throws Exception {
  Long currentTs=System.currentTimeMillis();
  HttpResponse response=AppFabricTestsSuite.doGet("String_Node_Str");
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  InputStream in=response.getEntity().getContent();
  SnapshotCodecV2 codec=new SnapshotCodecV2();
  TransactionSnapshot snapshot=codec.decodeState(in);
  Assert.assertTrue(snapshot.getTimestamp() >= currentTs);
}

Fixed version (ground truth):
/** 
 * Tests taking a snapshot of the transaction manager
 */
@Test public void testTxManagerSnapshot() throws Exception {
  Long currentTs=System.currentTimeMillis();
  HttpResponse response=AppFabricTestsSuite.doGet("String_Node_Str");
  Assert.assertEquals(200,response.getStatusLine().getStatusCode());
  InputStream in=response.getEntity().getContent();
  try {
    SnapshotCodecV2 codec=new SnapshotCodecV2();
    TransactionSnapshot snapshot=codec.decodeState(in);
    Assert.assertTrue(snapshot.getTimestamp() >= currentTs);
  }
  finally {
    in.close();
  }
}
Program: 7617
Project: 7617
Buggy source:
private void doSnapshot(boolean closing) throws IOException {
  long snapshotTime=0L;
  TransactionSnapshot snapshot=null;
  TransactionLog oldLog=null;
  try {
    this.logWriteLock.lock();
    try {
synchronized (this) {
        if (!isRunning() && !closing) {
          return;
        }
        long now=System.currentTimeMillis();
        if (now == lastSnapshotTime || (currentLog != null && now == currentLog.getTimestamp())) {
          try {
            TimeUnit.MILLISECONDS.sleep(1);
          }
 catch (          InterruptedException ie) {
          }
        }
        snapshot=getCurrentState();
        snapshotTime=snapshot.getTimestamp();
        LOG.info("String_Node_Str",snapshotTime);
        LOG.info("String_Node_Str" + snapshot);
        oldLog=currentLog;
        if (!closing) {
          currentLog=persistor.createLog(snapshotTime);
        }
      }
      if (oldLog != null) {
        oldLog.close();
      }
    }
  finally {
      this.logWriteLock.unlock();
    }
    persistor.writeSnapshot(snapshot);
    lastSnapshotTime=snapshotTime;
    long oldestRetainedTimestamp=persistor.deleteOldSnapshots(snapshotRetainCount);
    persistor.deleteLogsOlderThan(oldestRetainedTimestamp);
  }
 catch (  IOException ioe) {
    abortService("String_Node_Str" + snapshotTime + "String_Node_Str"+ ioe.getMessage(),ioe);
  }
}

Fixed version (ground truth):
private void doSnapshot(boolean closing) throws IOException {
  long snapshotTime=0L;
  TransactionSnapshot snapshot=null;
  TransactionLog oldLog=null;
  try {
    this.logWriteLock.lock();
    try {
      snapshot=getSnapshot();
synchronized (this) {
        if (snapshot == null && !closing) {
          return;
        }
        if (snapshot != null) {
          snapshotTime=snapshot.getTimestamp();
        }
        oldLog=currentLog;
        if (!closing) {
          currentLog=persistor.createLog(snapshot.getTimestamp());
        }
      }
      if (oldLog != null) {
        oldLog.close();
      }
    }
  finally {
      this.logWriteLock.unlock();
    }
    persistor.writeSnapshot(snapshot);
    lastSnapshotTime=snapshotTime;
    long oldestRetainedTimestamp=persistor.deleteOldSnapshots(snapshotRetainCount);
    persistor.deleteLogsOlderThan(oldestRetainedTimestamp);
  }
 catch (  IOException ioe) {
    abortService("String_Node_Str" + snapshotTime + "String_Node_Str"+ ioe.getMessage(),ioe);
  }
}
Program: 7618
Project: 7618
Buggy source:
public TransactionSnapshot getSnapshot() throws IOException {
  long snapshotTime=0L;
  TransactionSnapshot snapshot=null;
  this.logWriteLock.lock();
  try {
    if (!isRunning()) {
      return null;
    }
    long now=System.currentTimeMillis();
    if (now == lastSnapshotTime || (currentLog != null && now == currentLog.getTimestamp())) {
      try {
        TimeUnit.MILLISECONDS.sleep(1);
      }
 catch (      InterruptedException ie) {
      }
    }
    snapshot=getCurrentState();
    snapshotTime=snapshot.getTimestamp();
    LOG.info("String_Node_Str",snapshotTime);
    LOG.info("String_Node_Str" + snapshot);
    return snapshot;
  }
  finally {
    this.logWriteLock.unlock();
  }
}

Fixed version (ground truth):
public synchronized TransactionSnapshot getSnapshot() throws IOException {
  TransactionSnapshot snapshot=null;
  if (!isRunning()) {
    return null;
  }
  long now=System.currentTimeMillis();
  if (now == lastSnapshotTime || (currentLog != null && now == currentLog.getTimestamp())) {
    try {
      TimeUnit.MILLISECONDS.sleep(1);
    }
 catch (    InterruptedException ie) {
    }
  }
  snapshot=getCurrentState();
  LOG.info("String_Node_Str",snapshot.getTimestamp());
  LOG.info("String_Node_Str" + snapshot);
  return snapshot;
}
Program: 7620
Project: 7620
Buggy source:
@Override public void init(String[] args){
  CConfiguration cConf=CConfiguration.create();
  Configuration hConf=HBaseConfiguration.create(new HdfsConfiguration());
  injector=Guice.createInjector(new ConfigModule(cConf,hConf),new IOModule(),new ZKClientModule(),new KafkaClientModule(),new TwillModule(),new LocationRuntimeModule().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new AppFabricServiceRuntimeModule().getDistributedModules(),new ProgramRunnerRuntimeModule().getDistributedModules(),new DataFabricModules(cConf,hConf).getDistributedModules(),new MetricsClientRuntimeModule().getDistributedModules());
  zkClientService=injector.getInstance(ZKClientService.class);
  kafkaClientService=injector.getInstance(KafkaClientService.class);
}

Fixed version (ground truth):
@Override public void init(String[] args){
  CConfiguration cConf=CConfiguration.create();
  Configuration hConf=HBaseConfiguration.create(new HdfsConfiguration());
  injector=Guice.createInjector(new ConfigModule(cConf,hConf),new IOModule(),new AuthModule(),new ZKClientModule(),new KafkaClientModule(),new TwillModule(),new LocationRuntimeModule().getDistributedModules(),new DiscoveryRuntimeModule().getDistributedModules(),new AppFabricServiceRuntimeModule().getDistributedModules(),new ProgramRunnerRuntimeModule().getDistributedModules(),new DataFabricModules(cConf,hConf).getDistributedModules(),new MetricsClientRuntimeModule().getDistributedModules());
  zkClientService=injector.getInstance(ZKClientService.class);
  kafkaClientService=injector.getInstance(KafkaClientService.class);
}
Program: 7621
Project: 7621
Buggy source:
private void runnableStatus(HttpRequest request,HttpResponder responder,ProgramId id){
  String accountId="String_Node_Str";
  id.setAccountId(accountId);
  try {
    AuthToken token=new AuthToken(request.getHeader(Constants.Gateway.CONTINUUITY_API_KEY));
    ProgramStatus status=getProgramStatus(token,id);
    if (status.getStatus().equals("String_Node_Str")) {
      responder.sendStatus(HttpResponseStatus.NOT_FOUND);
    }
 else {
      JsonObject o=new JsonObject();
      o.addProperty("String_Node_Str",status.getStatus());
      responder.sendJson(HttpResponseStatus.OK,o);
    }
  }
 catch (  SecurityException e) {
    responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);
  }
catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
    responder.sendStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
  }
}

Fixed version (ground truth):
private void runnableStatus(HttpRequest request,HttpResponder responder,ProgramId id){
  String accountId=getAuthenticatedAccountId(request);
  id.setAccountId(accountId);
  try {
    AuthToken token=new AuthToken(request.getHeader(Constants.Gateway.CONTINUUITY_API_KEY));
    ProgramStatus status=getProgramStatus(token,id);
    if (status.getStatus().equals("String_Node_Str")) {
      responder.sendStatus(HttpResponseStatus.NOT_FOUND);
    }
 else {
      JsonObject o=new JsonObject();
      o.addProperty("String_Node_Str",status.getStatus());
      responder.sendJson(HttpResponseStatus.OK,o);
    }
  }
 catch (  SecurityException e) {
    responder.sendStatus(HttpResponseStatus.UNAUTHORIZED);
  }
catch (  Throwable e) {
    LOG.error("String_Node_Str",e);
    responder.sendStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR);
  }
}
Program: 7622
Project: 7622
Buggy source:
/** 
 * Returns status of a flow.
 */
@Path("String_Node_Str") @GET public void flowStatus(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") final String appId,@PathParam("String_Node_Str") final String flowId){
  ProgramId id=new ProgramId();
  id.setApplicationId(appId);
  id.setFlowId(flowId);
  id.setType(EntityType.FLOW);
  runnableStatus(request,responder,id);
}

Fixed version (ground truth):
/** 
 * Returns status of a flow.
 */
@Path("String_Node_Str") @GET public void flowStatus(HttpRequest request,HttpResponder responder,@PathParam("String_Node_Str") final String appId,@PathParam("String_Node_Str") final String flowId){
  ProgramId id=new ProgramId();
  id.setApplicationId(appId);
  id.setFlowId(flowId);
  id.setType(EntityType.FLOW);
  LOG.info("String_Node_Str",appId,flowId);
  runnableStatus(request,responder,id);
}