nus-yam/ex-repair huggingface dataset:
Program: 17263
Project: 17263
Buggy source:
@Override public synchronized void handleEvents(List<Event> inputEvents) throws IOException {
  if (numInputs == 0) {
    throw new RuntimeException("String_Node_Str");
  }
  if (!isStarted.get()) {
    if (firstEventReceivedTime == -1) {
      firstEventReceivedTime=System.currentTimeMillis();
    }
    pendingEvents.addAll(inputEvents);
    return;
  }
  inputEventHandler.handleEvents(inputEvents);
}

Fixed version (ground truth):
@Override public void handleEvents(List<Event> inputEvents) throws IOException {
synchronized (this) {
    if (numInputs == 0) {
      throw new RuntimeException("String_Node_Str");
    }
    if (!isStarted.get()) {
      if (firstEventReceivedTime == -1) {
        firstEventReceivedTime=System.currentTimeMillis();
      }
      pendingEvents.addAll(inputEvents);
      return;
    }
  }
  inputEventHandler.handleEvents(inputEvents);
}
Program: 17264
Project: 17264
Buggy source:
@Override public void setNumPhysicalOutputs(int numOutputs){
  Preconditions.checkArgument(numOutputs == 1,"String_Node_Str" + this.getClass().getName());
}

Fixed version (ground truth):
@Override public synchronized void setNumPhysicalOutputs(int numOutputs){
  Preconditions.checkArgument(numOutputs == 1,"String_Node_Str" + this.getClass().getName());
}
Program: 17265
Project: 17265
Buggy source:
@Override public KeyValueWriter getWriter() throws Exception {
  return kvWriter;
}

Fixed version (ground truth):
@Override public synchronized KeyValueWriter getWriter() throws Exception {
  return kvWriter;
}
Program: 17266
Project: 17266
Buggy source:
@Override public void start(){
}

Fixed version (ground truth):
@Override public synchronized void start(){
}
Program: 17267
Project: 17267
Buggy source:
@Override public List<Event> initialize(TezOutputContext outputContext) throws Exception {
  this.outputContext=outputContext;
  this.conf=TezUtils.createConfFromUserPayload(outputContext.getUserPayload());
  this.conf.setStrings(TezJobConfig.LOCAL_DIRS,outputContext.getWorkDirs());
  this.outputContext.requestInitialMemory(0l,null);
  this.dataViaEventsEnabled=conf.getBoolean(TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_ENABLED,TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_ENABLED_DEFAULT);
  this.dataViaEventsMaxSize=conf.getInt(TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_MAX_SIZE,TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_MAX_SIZE_DEFAULT);
  LOG.info(this.getClass().getSimpleName() + "String_Node_Str" + "String_Node_Str"+ dataViaEventsEnabled+ "String_Node_Str"+ dataViaEventsMaxSize);
  this.kvWriter=new FileBasedKVWriter(outputContext,conf);
  return Collections.emptyList();
}

Fixed version (ground truth):
@Override public synchronized List<Event> initialize(TezOutputContext outputContext) throws Exception {
  this.outputContext=outputContext;
  this.conf=TezUtils.createConfFromUserPayload(outputContext.getUserPayload());
  this.conf.setStrings(TezJobConfig.LOCAL_DIRS,outputContext.getWorkDirs());
  this.outputContext.requestInitialMemory(0l,null);
  this.dataViaEventsEnabled=conf.getBoolean(TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_ENABLED,TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_ENABLED_DEFAULT);
  this.dataViaEventsMaxSize=conf.getInt(TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_MAX_SIZE,TezJobConfig.TEZ_RUNTIME_BROADCAST_DATA_VIA_EVENTS_MAX_SIZE_DEFAULT);
  LOG.info(this.getClass().getSimpleName() + "String_Node_Str" + "String_Node_Str"+ dataViaEventsEnabled+ "String_Node_Str"+ dataViaEventsMaxSize);
  this.kvWriter=new FileBasedKVWriter(outputContext,conf);
  return Collections.emptyList();
}
Program: 17268
Project: 17268
Buggy source:
@Override public void handleEvents(List<Event> outputEvents){
  throw new TezUncheckedException("String_Node_Str");
}

Fixed version (ground truth):
@Override public synchronized void handleEvents(List<Event> outputEvents){
  throw new TezUncheckedException("String_Node_Str");
}
Program: 17273
Project: 17273
Buggy source:
/** 
 * Do some basic verification on the input received -- Being defensive
 * @param compressedLength
 * @param decompressedLength
 * @param forReduce
 * @param remaining
 * @param mapId
 * @return true/false, based on if the verification succeeded or not
 */
private boolean verifySanity(long compressedLength,long decompressedLength,int forReduce,Set<InputAttemptIdentifier> remaining,InputAttemptIdentifier srcAttemptId){
  if (compressedLength < 0 || decompressedLength < 0) {
    wrongLengthErrs.increment(1);
    LOG.warn(getName() + "String_Node_Str" + srcAttemptId+ "String_Node_Str"+ compressedLength+ "String_Node_Str"+ decompressedLength);
    return false;
  }
  if (!remaining.contains(srcAttemptId)) {
    wrongMapErrs.increment(1);
    LOG.warn("String_Node_Str" + srcAttemptId);
    return false;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Do some basic verification on the input received -- Being defensive
 * @param compressedLength
 * @param decompressedLength
 * @param forReduce
 * @param remaining
 * @param mapId
 * @return true/false, based on if the verification succeeded or not
 */
private boolean verifySanity(long compressedLength,long decompressedLength,int forReduce,Set<InputAttemptIdentifier> remaining,InputAttemptIdentifier srcAttemptId){
  if (compressedLength < 0 || decompressedLength < 0) {
    wrongLengthErrs.increment(1);
    LOG.warn(getName() + "String_Node_Str" + srcAttemptId+ "String_Node_Str"+ compressedLength+ "String_Node_Str"+ decompressedLength);
    return false;
  }
  if (forReduce != currentPartition) {
    wrongReduceErrs.increment(1);
    LOG.warn(getName() + "String_Node_Str" + srcAttemptId+ "String_Node_Str"+ compressedLength+ "String_Node_Str"+ decompressedLength+ "String_Node_Str"+ forReduce+ "String_Node_Str"+ currentPartition);
    return false;
  }
  if (!remaining.contains(srcAttemptId)) {
    wrongMapErrs.increment(1);
    LOG.warn("String_Node_Str" + srcAttemptId);
    return false;
  }
  return true;
}
Program: 17275
Project: 17275
Buggy source:
@Override public void memoryAssigned(long assignedSize){
  this.availableMemoryMb=(int)(assignedSize >> 20);
}

Fixed version (ground truth):
@Override public void memoryAssigned(long assignedSize){
  this.availableMemoryMb=(int)(assignedSize >> 20);
  if (this.availableMemoryMb == 0) {
    LOG.warn("String_Node_Str" + this.availableMemoryMb + "String_Node_Str"+ initialMemRequestMb);
    this.availableMemoryMb=initialMemRequestMb;
  }
}
Program: 17278
Project: 17278
Buggy source:
public void addKnownInput(String hostName,int port,InputAttemptIdentifier srcAttemptIdentifier,int partition){
  InputHost host=knownSrcHosts.get(hostName);
  if (host == null) {
    host=new InputHost(hostName,port,inputContext.getApplicationId());
    InputHost old=knownSrcHosts.putIfAbsent(hostName,host);
    if (old != null) {
      host=old;
    }
  }
  host.addKnownInput(srcAttemptIdentifier);
  lock.lock();
  try {
    pendingHosts.add(host);
    wakeLoop.signal();
  }
  finally {
    lock.unlock();
  }
}

Fixed version (ground truth):
public void addKnownInput(String hostName,int port,InputAttemptIdentifier srcAttemptIdentifier,int partition){
  InputHost host=knownSrcHosts.get(hostName);
  if (host == null) {
    host=new InputHost(hostName,port,inputContext.getApplicationId());
    InputHost old=knownSrcHosts.putIfAbsent(hostName,host);
    if (old != null) {
      host=old;
    }
  }
  if (LOG.isDebugEnabled()) {
    LOG.debug("String_Node_Str" + srcAttemptIdentifier + "String_Node_Str"+ host);
  }
  host.addKnownInput(srcAttemptIdentifier);
  lock.lock();
  try {
    boolean added=pendingHosts.offer(host);
    if (!added) {
      String errorMessage="String_Node_Str" + host.getHost() + "String_Node_Str";
      LOG.error(errorMessage);
      throw new TezUncheckedException(errorMessage);
    }
    wakeLoop.signal();
  }
  finally {
    lock.unlock();
  }
}
Program: 17280
Project: 17280
Buggy source:
public void initWriter() throws IOException {
  Path outputFile=ouputFileManager.getOutputFileForWrite();
  this.writer=new IFile.Writer(conf,rfs,outputFile,keyClass,valClass,codec,null);
}

Fixed version (ground truth):
public void initWriter() throws IOException {
  Path outputFile=ouputFileManager.getOutputFileForWrite();
  LOG.info("String_Node_Str" + outputFile);
  this.writer=new IFile.Writer(conf,rfs,outputFile,keyClass,valClass,codec,null);
}
Program: 17281
Project: 17281
Buggy source:
/** 
 * @return true if any output was generated. false otherwise
 * @throws IOException
 */
public boolean close() throws IOException {
  this.writer.close();
  TezIndexRecord rec=new TezIndexRecord(0,writer.getRawLength(),writer.getCompressedLength());
  TezSpillRecord sr=new TezSpillRecord(1);
  sr.putIndex(rec,0);
  Path indexFile=ouputFileManager.getOutputIndexFileForWrite(INDEX_RECORD_LENGTH);
  sr.writeToFile(indexFile,conf);
  return numRecords > 0;
}

Fixed version (ground truth):
/** 
 * @return true if any output was generated. false otherwise
 * @throws IOException
 */
public boolean close() throws IOException {
  this.writer.close();
  TezIndexRecord rec=new TezIndexRecord(0,writer.getRawLength(),writer.getCompressedLength());
  TezSpillRecord sr=new TezSpillRecord(1);
  sr.putIndex(rec,0);
  Path indexFile=ouputFileManager.getOutputIndexFileForWrite(INDEX_RECORD_LENGTH);
  LOG.info("String_Node_Str" + indexFile);
  sr.writeToFile(indexFile,conf);
  return numRecords > 0;
}
Program: 17282
Project: 17282
Buggy source:
private Fetcher constructFetcherForHost(InputHost inputHost){
  FetcherBuilder fetcherBuilder=new FetcherBuilder(BroadcastShuffleManager.this,inputManager,inputContext.getApplicationId(),shuffleSecret,conf);
  fetcherBuilder.setConnectionParameters(connectionTimeout,readTimeout);
  fetcherBuilder.setCompressionParameters(codec,decompressor);
  List<InputAttemptIdentifier> pendingInputsForHost=inputHost.clearAndGetPendingInputs();
  for (Iterator<InputAttemptIdentifier> inputIter=pendingInputsForHost.iterator(); inputIter.hasNext(); ) {
    InputAttemptIdentifier input=inputIter.next();
    if (completedInputSet.contains(input.getInputIdentifier())) {
      inputIter.remove();
    }
    if (obsoletedInputs.contains(input)) {
      inputIter.remove();
      obsoletedInputs.remove(input);
    }
  }
  fetcherBuilder.assignWork(inputHost.getHost(),inputHost.getPort(),0,pendingInputsForHost);
  return fetcherBuilder.build();
}

Fixed version (ground truth):
private Fetcher constructFetcherForHost(InputHost inputHost){
  FetcherBuilder fetcherBuilder=new FetcherBuilder(BroadcastShuffleManager.this,inputManager,inputContext.getApplicationId(),shuffleSecret,conf);
  fetcherBuilder.setConnectionParameters(connectionTimeout,readTimeout);
  fetcherBuilder.setCompressionParameters(codec,decompressor);
  List<InputAttemptIdentifier> pendingInputsForHost=inputHost.clearAndGetPendingInputs();
  for (Iterator<InputAttemptIdentifier> inputIter=pendingInputsForHost.iterator(); inputIter.hasNext(); ) {
    InputAttemptIdentifier input=inputIter.next();
    if (completedInputSet.contains(input.getInputIdentifier())) {
      inputIter.remove();
    }
    if (obsoletedInputs.contains(input)) {
      inputIter.remove();
      obsoletedInputs.remove(input);
    }
  }
  fetcherBuilder.assignWork(inputHost.getHost(),inputHost.getPort(),0,pendingInputsForHost);
  LOG.info("String_Node_Str" + inputHost.getHost() + "String_Node_Str"+ pendingInputsForHost);
  return fetcherBuilder.build();
}
Program: 17284
Project: 17284
Buggy source:
public void run(){
  RunBroadcastShuffleCallable callable=new RunBroadcastShuffleCallable();
  runShuffleFuture=new FutureTask<Void>(callable);
  Thread runThread=new Thread(runShuffleFuture,"String_Node_Str");
  runThread.setDaemon(true);
  runThread.start();
}

Fixed version (ground truth):
public void run(){
  RunBroadcastShuffleCallable callable=new RunBroadcastShuffleCallable();
  ListenableFuture<Void> runShuffleFuture=schedulerExecutor.submit(callable);
  Futures.addCallback(runShuffleFuture,new SchedulerFutureCallback());
  schedulerExecutor.shutdown();
}
Program: 17286
Project: 17286
Buggy source:
private void processDataMovementEvent(DataMovementEvent dmEvent){
  DataMovementEventPayloadProto shufflePayload;
  try {
    shufflePayload=DataMovementEventPayloadProto.parseFrom(dmEvent.getUserPayload());
  }
 catch (  InvalidProtocolBufferException e) {
    throw new TezUncheckedException("String_Node_Str",e);
  }
  int partitionId=dmEvent.getSourceIndex();
  URI baseUri=getBaseURI(shufflePayload.getHost(),shufflePayload.getPort(),partitionId);
  LOG.info("String_Node_Str" + baseUri);
  InputAttemptIdentifier srcAttemptIdentifier=new InputAttemptIdentifier(dmEvent.getTargetIndex(),dmEvent.getVersion(),shufflePayload.getPathComponent());
  scheduler.addKnownMapOutput(shufflePayload.getHost(),partitionId,baseUri.toString(),srcAttemptIdentifier);
  int duration=shufflePayload.getRunDuration();
  if (duration > maxMapRuntime) {
    maxMapRuntime=duration;
    scheduler.informMaxMapRunTime(maxMapRuntime);
  }
}

Fixed version (ground truth):
private void processDataMovementEvent(DataMovementEvent dmEvent){
  DataMovementEventPayloadProto shufflePayload;
  try {
    shufflePayload=DataMovementEventPayloadProto.parseFrom(dmEvent.getUserPayload());
  }
 catch (  InvalidProtocolBufferException e) {
    throw new TezUncheckedException("String_Node_Str",e);
  }
  int partitionId=dmEvent.getSourceIndex();
  URI baseUri=getBaseURI(shufflePayload.getHost(),shufflePayload.getPort(),partitionId);
  InputAttemptIdentifier srcAttemptIdentifier=new InputAttemptIdentifier(dmEvent.getTargetIndex(),dmEvent.getVersion(),shufflePayload.getPathComponent());
  LOG.info("String_Node_Str" + baseUri + "String_Node_Str"+ srcAttemptIdentifier);
  scheduler.addKnownMapOutput(shufflePayload.getHost(),partitionId,baseUri.toString(),srcAttemptIdentifier);
  int duration=shufflePayload.getRunDuration();
  if (duration > maxMapRuntime) {
    maxMapRuntime=duration;
    scheduler.informMaxMapRunTime(maxMapRuntime);
  }
}
Program: 17287
Project: 17287
Buggy source:
public synchronized int getNumPendingInputs(){
  return inputs.size();
}

Fixed version (ground truth):
public int getNumPendingInputs(){
  return inputs.size();
}
Program: 17288
Project: 17288
Buggy source:
public synchronized void addKnownInput(InputAttemptIdentifier srcAttempt){
  inputs.add(srcAttempt);
}

Fixed version (ground truth):
public void addKnownInput(InputAttemptIdentifier srcAttempt){
  inputs.add(srcAttempt);
}
Program: 17289
Project: 17289
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str"+ inputs+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + host + "String_Node_Str"+ port+ "String_Node_Str";
}
Program: 17290
Project: 17290
Buggy source:
public synchronized List<InputAttemptIdentifier> clearAndGetPendingInputs(){
  List<InputAttemptIdentifier> inputsCopy=new ArrayList<InputAttemptIdentifier>(inputs);
  inputs.clear();
  return inputsCopy;
}

Fixed version (ground truth):
public List<InputAttemptIdentifier> clearAndGetPendingInputs(){
  List<InputAttemptIdentifier> inputsCopy=new ArrayList<InputAttemptIdentifier>(inputs.size());
  inputs.drainTo(inputsCopy);
  return inputsCopy;
}
Program: 17291
Project: 17291
Buggy source:
@Override public void readFields(DataInput in) throws IOException {
  int procDescLength=in.readInt();
  byte[] procDescBytes=new byte[procDescLength];
  in.readFully(procDescBytes);
  processorDescriptor=DagTypeConverters.convertProcessorDescriptorFromDAGPlan(TezEntityDescriptorProto.parseFrom(procDescBytes));
  int numInputSpecs=in.readInt();
  inputSpecList=new ArrayList<InputSpec>(numInputSpecs);
  for (int i=0; i < numInputSpecs; i++) {
    InputSpec inputSpec=new InputSpec();
    inputSpec.readFields(in);
    inputSpecList.add(inputSpec);
  }
  int numOutputSpecs=in.readInt();
  outputSpecList=new ArrayList<OutputSpec>(numOutputSpecs);
  for (int i=0; i < numOutputSpecs; i++) {
    OutputSpec outputSpec=new OutputSpec();
    outputSpec.readFields(in);
    outputSpecList.add(outputSpec);
  }
}

Fixed version (ground truth):
@Override public void readFields(DataInput in) throws IOException {
  taskAttemptId=new TezTaskAttemptID();
  taskAttemptId.readFields(in);
  vertexName=in.readUTF();
  int procDescLength=in.readInt();
  byte[] procDescBytes=new byte[procDescLength];
  in.readFully(procDescBytes);
  processorDescriptor=DagTypeConverters.convertProcessorDescriptorFromDAGPlan(TezEntityDescriptorProto.parseFrom(procDescBytes));
  int numInputSpecs=in.readInt();
  inputSpecList=new ArrayList<InputSpec>(numInputSpecs);
  for (int i=0; i < numInputSpecs; i++) {
    InputSpec inputSpec=new InputSpec();
    inputSpec.readFields(in);
    inputSpecList.add(inputSpec);
  }
  int numOutputSpecs=in.readInt();
  outputSpecList=new ArrayList<OutputSpec>(numOutputSpecs);
  for (int i=0; i < numOutputSpecs; i++) {
    OutputSpec outputSpec=new OutputSpec();
    outputSpec.readFields(in);
    outputSpecList.add(outputSpec);
  }
}
Program: 17292
Project: 17292
Buggy source:
public TaskSpec(TezTaskAttemptID taskAttemptID,String user,String vertexName,ProcessorDescriptor processorDescriptor,List<InputSpec> inputSpecList,List<OutputSpec> outputSpecList){
  this.taskAttemptId=taskAttemptID;
  this.user=user;
  this.vertexName=vertexName;
  this.processorDescriptor=processorDescriptor;
  this.inputSpecList=inputSpecList;
  this.outputSpecList=outputSpecList;
}

Fixed version (ground truth):
public TaskSpec(TezTaskAttemptID taskAttemptID,String user,String vertexName,ProcessorDescriptor processorDescriptor,List<InputSpec> inputSpecList,List<OutputSpec> outputSpecList){
  this.taskAttemptId=taskAttemptID;
  this.vertexName=vertexName;
  this.user=user;
  this.processorDescriptor=processorDescriptor;
  this.inputSpecList=inputSpecList;
  this.outputSpecList=outputSpecList;
}
Program: 17293
Project: 17293
Buggy source:
@Override public String toString(){
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str" + processorDescriptor.getClassName() + "String_Node_Str"+ inputSpecList.size()+ "String_Node_Str"+ outputSpecList.size());
  sb.append("String_Node_Str");
  for (  InputSpec i : inputSpecList) {
    sb.append("String_Node_Str" + i.toString() + "String_Node_Str");
  }
  sb.append("String_Node_Str");
  for (  OutputSpec i : outputSpecList) {
    sb.append("String_Node_Str" + i.toString() + "String_Node_Str");
  }
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuffer sb=new StringBuffer();
  sb.append("String_Node_Str" + taskAttemptId);
  sb.append("String_Node_Str" + processorDescriptor.getClassName() + "String_Node_Str"+ inputSpecList.size()+ "String_Node_Str"+ outputSpecList.size());
  sb.append("String_Node_Str");
  for (  InputSpec i : inputSpecList) {
    sb.append("String_Node_Str" + i.toString() + "String_Node_Str");
  }
  sb.append("String_Node_Str");
  for (  OutputSpec i : outputSpecList) {
    sb.append("String_Node_Str" + i.toString() + "String_Node_Str");
  }
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 17294
Project: 17294
Buggy source:
@Override public void write(DataOutput out) throws IOException {
  byte[] procDesc=DagTypeConverters.convertToDAGPlan(processorDescriptor).toByteArray();
  out.writeInt(procDesc.length);
  out.write(procDesc);
  out.writeInt(inputSpecList.size());
  for (  InputSpec inputSpec : inputSpecList) {
    inputSpec.write(out);
  }
  out.writeInt(outputSpecList.size());
  for (  OutputSpec outputSpec : outputSpecList) {
    outputSpec.write(out);
  }
}

Fixed version (ground truth):
@Override public void write(DataOutput out) throws IOException {
  taskAttemptId.write(out);
  out.writeUTF(vertexName);
  byte[] procDesc=DagTypeConverters.convertToDAGPlan(processorDescriptor).toByteArray();
  out.writeInt(procDesc.length);
  out.write(procDesc);
  out.writeInt(inputSpecList.size());
  for (  InputSpec inputSpec : inputSpecList) {
    inputSpec.write(out);
  }
  out.writeInt(outputSpecList.size());
  for (  OutputSpec outputSpec : outputSpecList) {
    outputSpec.write(out);
  }
}
Program: 17298
Project: 17298
Buggy source:
@Override public void initialize(Configuration conf,byte[] userPayload,Master master) throws IOException, InterruptedException {
  DeprecatedKeys.init();
  Configuration taskConf;
  if (userPayload != null) {
    taskConf=MRHelpers.createConfFromUserPayload(userPayload);
    if (LOG.isDebugEnabled()) {
      Iterator<Entry<String,String>> iter=taskConf.iterator();
      String taskIdStr=mrTask.getTaskAttemptId().getTaskID().toString();
      while (iter.hasNext()) {
        Entry<String,String> confEntry=iter.next();
        LOG.debug("String_Node_Str" + "String_Node_Str" + taskIdStr + "String_Node_Str"+ confEntry.getKey()+ "String_Node_Str"+ confEntry.getValue());
      }
    }
  }
 else {
    taskConf=new Configuration(false);
  }
  copyTezConfigParameters(taskConf,conf);
  final JobConf job=new JobConf(taskConf);
  job.set(MRJobConfig.VERTEX_NAME,taskContext.getVertexName());
  MRTask mrTask=(MRTask)getProcessor();
  this.mrTask=mrTask;
  configureMRTask(job,mrTask);
  this.conf=job;
  this.master=master;
  processor.initialize(this.conf,this.master);
}

Fixed version (ground truth):
@Override public void initialize(Configuration conf,byte[] userPayload,Master master) throws IOException, InterruptedException {
  DeprecatedKeys.init();
  Configuration taskConf;
  if (userPayload != null) {
    taskConf=MRHelpers.createConfFromUserPayload(userPayload);
  }
 else {
    taskConf=new Configuration(false);
  }
  copyTezConfigParameters(taskConf,conf);
  final JobConf job=new JobConf(taskConf);
  job.set(MRJobConfig.VERTEX_NAME,taskContext.getVertexName());
  MRTask mrTask=(MRTask)getProcessor();
  this.mrTask=mrTask;
  if (LOG.isDebugEnabled() && userPayload != null) {
    Iterator<Entry<String,String>> iter=taskConf.iterator();
    String taskIdStr=mrTask.getTaskAttemptId().getTaskID().toString();
    while (iter.hasNext()) {
      Entry<String,String> confEntry=iter.next();
      LOG.debug("String_Node_Str" + "String_Node_Str" + taskIdStr + "String_Node_Str"+ confEntry.getKey()+ "String_Node_Str"+ confEntry.getValue());
    }
  }
  configureMRTask(job,mrTask);
  this.conf=job;
  this.master=master;
  processor.initialize(this.conf,this.master);
}
Program: 17300
Project: 17300
Buggy source:
@Private public void setName(String name){
  setStrings(name,name);
}

Fixed version (ground truth):
@Private public void setName(String name){
  set(TEZ_DAG_NAME,name);
}
Program: 17301
Project: 17301
Buggy source:
@Public @Stable public String getName(){
}

Fixed version (ground truth):
@Public @Stable public String getName(){
  String name=get(TEZ_DAG_NAME);
  return name;
}
Program: 17303
Project: 17303
Buggy source:
/** 
 * Create and initialize (but don't start) a single dag. 
 */
protected DAG createDAG(DAGConfiguration dagPlan){
  DAG newDag=new DAGImpl(dagId,appAttemptID,conf,dagPlan,dispatcher.getEventHandler(),taskAttemptListener,jobTokenSecretManager,fsTokens,clock,currentUser.getUserName(),appSubmitTime,taskHeartbeatHandler,context,dagLocationHint);
  ((RunningAppContext)context).setDAG(newDag);
  dispatcher.register(DAGFinishEvent.Type.class,createDAGFinishEventHandler());
  return newDag;
}

Fixed version (ground truth):
/** 
 * Create and initialize (but don't start) a single dag. 
 */
protected DAG createDAG(DAGConfiguration dagPlan){
  DAG newDag=new DAGImpl(dagId,appAttemptID,conf,dagPlan,dispatcher.getEventHandler(),taskAttemptListener,jobTokenSecretManager,fsTokens,clock,currentUser.getShortUserName(),appSubmitTime,taskHeartbeatHandler,context,dagLocationHint);
  ((RunningAppContext)context).setDAG(newDag);
  dispatcher.register(DAGFinishEvent.Type.class,createDAGFinishEventHandler());
  return newDag;
}
Program: 17304
Project: 17304
Buggy source:
@Override public String getUser(){
  return this.conf.get(TezConfiguration.USER_NAME);
}

Fixed version (ground truth):
@Override public String getUser(){
  return dag.getUserName();
}
Program: 17305
Project: 17305
Buggy source:
public DAGImpl(TezDAGID dagId,ApplicationAttemptId applicationAttemptId,TezConfiguration conf,DAGConfiguration dagPlan,EventHandler eventHandler,TaskAttemptListener taskAttemptListener,JobTokenSecretManager jobTokenSecretManager,Credentials fsTokenCredentials,Clock clock,String userName,long appSubmitTime,TaskHeartbeatHandler thh,AppContext appContext,DAGLocationHint dagLocationHint){
  this.applicationAttemptId=applicationAttemptId;
  this.dagId=dagId;
  this.dagName=dagPlan.getName();
  this.conf=conf;
  this.dagPlan=dagPlan;
  this.clock=clock;
  this.appContext=appContext;
  this.userName=userName;
  this.queueName=conf.get(MRJobConfig.QUEUE_NAME,"String_Node_Str");
  this.appSubmitTime=appSubmitTime;
  this.taskAttemptListener=taskAttemptListener;
  this.taskHeartbeatHandler=thh;
  this.eventHandler=eventHandler;
  ReadWriteLock readWriteLock=new ReentrantReadWriteLock();
  this.readLock=readWriteLock.readLock();
  this.writeLock=readWriteLock.writeLock();
  this.fsTokens=fsTokenCredentials;
  this.jobTokenSecretManager=jobTokenSecretManager;
  this.aclsManager=new ApplicationACLsManager(conf);
  this.username=System.getProperty("String_Node_Str");
  this.dagLocationHint=dagLocationHint;
  stateMachine=stateMachineFactory.make(this);
}

Fixed version (ground truth):
public DAGImpl(TezDAGID dagId,ApplicationAttemptId applicationAttemptId,TezConfiguration conf,DAGConfiguration dagPlan,EventHandler eventHandler,TaskAttemptListener taskAttemptListener,JobTokenSecretManager jobTokenSecretManager,Credentials fsTokenCredentials,Clock clock,String appUserName,long appSubmitTime,TaskHeartbeatHandler thh,AppContext appContext,DAGLocationHint dagLocationHint){
  this.applicationAttemptId=applicationAttemptId;
  this.dagId=dagId;
  this.dagPlan=dagPlan;
  this.conf=conf;
  this.dagName=(dagPlan.getName() != null) ? dagPlan.getName() : "String_Node_Str";
  this.userName=appUserName;
  this.clock=clock;
  this.appContext=appContext;
  this.queueName=conf.get(MRJobConfig.QUEUE_NAME,"String_Node_Str");
  this.appSubmitTime=appSubmitTime;
  this.taskAttemptListener=taskAttemptListener;
  this.taskHeartbeatHandler=thh;
  this.eventHandler=eventHandler;
  ReadWriteLock readWriteLock=new ReentrantReadWriteLock();
  this.readLock=readWriteLock.readLock();
  this.writeLock=readWriteLock.writeLock();
  this.fsTokens=fsTokenCredentials;
  this.jobTokenSecretManager=jobTokenSecretManager;
  this.aclsManager=new ApplicationACLsManager(conf);
  this.dagLocationHint=dagLocationHint;
  stateMachine=stateMachineFactory.make(this);
}
Program: 17308
Project: 17308
Buggy source:
private static void populateMRToDagParamMap(){
  mrParamToDAGParamMap.put(MRJobConfig.JOB_SUBMIT_DIR,TezConfiguration.JOB_SUBMIT_DIR);
  mrParamToDAGParamMap.put(MRJobConfig.APPLICATION_TOKENS_FILE,TezConfiguration.APPLICATION_TOKENS_FILE);
  mrParamToDAGParamMap.put(MRJobConfig.JOB_NAME,TezConfiguration.JOB_NAME);
  mrParamToDAGParamMap.put(MRJobConfig.MR_AM_TASK_LISTENER_THREAD_COUNT,TezConfiguration.DAG_AM_TASK_LISTENER_THREAD_COUNT);
  mrParamToDAGParamMap.put(MRJobConfig.USER_NAME,TezConfiguration.USER_NAME);
  mrParamToDAGParamMap.put(MRJobConfig.MAX_TASK_FAILURES_PER_TRACKER,TezConfiguration.DAG_MAX_TASK_FAILURES_PER_NODE);
  mrParamToDAGParamMap.put(MRJobConfig.MR_AM_JOB_NODE_BLACKLISTING_ENABLE,TezConfiguration.DAG_NODE_BLACKLISTING_ENABLED);
  mrParamToDAGParamMap.put(MRJobConfig.MR_AM_IGNORE_BLACKLISTING_BLACKLISTED_NODE_PERECENT,TezConfiguration.DAG_NODE_BLACKLISTING_IGNORE_THRESHOLD);
}

Fixed version (ground truth):
private static void populateMRToDagParamMap(){
  mrParamToDAGParamMap.put(MRJobConfig.JOB_SUBMIT_DIR,TezConfiguration.JOB_SUBMIT_DIR);
  mrParamToDAGParamMap.put(MRJobConfig.APPLICATION_TOKENS_FILE,TezConfiguration.APPLICATION_TOKENS_FILE);
  mrParamToDAGParamMap.put(MRJobConfig.MR_AM_TASK_LISTENER_THREAD_COUNT,TezConfiguration.DAG_AM_TASK_LISTENER_THREAD_COUNT);
  mrParamToDAGParamMap.put(MRJobConfig.MAX_TASK_FAILURES_PER_TRACKER,TezConfiguration.DAG_MAX_TASK_FAILURES_PER_NODE);
  mrParamToDAGParamMap.put(MRJobConfig.MR_AM_JOB_NODE_BLACKLISTING_ENABLE,TezConfiguration.DAG_NODE_BLACKLISTING_ENABLED);
  mrParamToDAGParamMap.put(MRJobConfig.MR_AM_IGNORE_BLACKLISTING_BLACKLISTED_NODE_PERECENT,TezConfiguration.DAG_NODE_BLACKLISTING_IGNORE_THRESHOLD);
}
Program: 17309
Project: 17309
Buggy source:
private void setDAGParamsFromMRConf(DAG dag){
  Configuration mrConf=this.conf;
  Map<String,String> mrParamToDAGParamMap=DeprecatedKeys.getMRToDAGParamMap();
  for (  Entry<String,String> entry : mrParamToDAGParamMap.entrySet()) {
    if (mrConf.get(entry.getKey()) != null) {
      LOG.info("String_Node_Str" + entry.getValue());
      if (entry.getValue().equals(TezConfiguration.JOB_NAME)) {
        dag.setName(mrConf.get(entry.getKey()));
      }
 else {
        dag.addConfiguration(entry.getValue(),mrConf.get(entry.getKey()));
      }
    }
  }
}

Fixed version (ground truth):
private void setDAGParamsFromMRConf(DAG dag){
  Configuration mrConf=this.conf;
  Map<String,String> mrParamToDAGParamMap=DeprecatedKeys.getMRToDAGParamMap();
  for (  Entry<String,String> entry : mrParamToDAGParamMap.entrySet()) {
    if (mrConf.get(entry.getKey()) != null) {
      LOG.info("String_Node_Str" + entry.getValue());
      dag.addConfiguration(entry.getValue(),mrConf.get(entry.getKey()));
    }
  }
  String jobName=mrConf.get(MRJobConfig.JOB_NAME);
  if (jobName != null) {
    dag.setName(jobName);
  }
}
Program: 17310
Project: 17310
Buggy source:
/** 
 * Disconnect from Pusher. <p>Calls are ignored if the   {@link Pusher.getConnection().getState()} is not {@link com.pusher.client.connection.ConnectionState.CONNECTED}.</p>
 */
public void disconnect(){
  if (connection.getState() == ConnectionState.CONNECTED) {
    connection.disconnect();
  }
}

Fixed version (ground truth):
/** 
 * Disconnect from Pusher. <p>Calls are ignored if the   {@link Connection#getState()} is not {@link com.pusher.client.connection.ConnectionState#CONNECTED}.</p>
 */
public void disconnect(){
  if (connection.getState() == ConnectionState.CONNECTED) {
    connection.disconnect();
  }
}
Program: 17311
Project: 17311
Buggy source:
/** 
 * Subscribes to a   {@link com.pusher.client.channel.PrivateChannel} which requires authentication.
 * @param channelName The name of the channel to subscribe to.
 * @param listener A listener to be informed of both Pusher channel protocol events and subscription data events.
 * @param eventNames An optional list of names of events to be bound to on the channel. The equivalent of calling {@link com.pusher.client.channel.Channel.bind(String, SubscriptionListener)} on or more times.
 * @return A new {@link com.pusher.client.channel.PrivateChannel} representing the subscription.
 * @throws IllegalStateException if a {@link com.pusher.client.Authorizer} has not been set for the {@link Pusher} instance via {@link #Pusher(String,PusherOptions)}.
 */
public PrivateChannel subscribePrivate(String channelName,PrivateChannelEventListener listener,String... eventNames){
  throwExceptionIfNoAuthorizerHasBeenSet();
  PrivateChannelImpl channel=factory.newPrivateChannel(connection,channelName,pusherOptions.getAuthorizer());
  channelManager.subscribeTo(channel,listener,eventNames);
  return channel;
}

Fixed version (ground truth):
/** 
 * Subscribes to a   {@link com.pusher.client.channel.PrivateChannel} which requires authentication.
 * @param channelName The name of the channel to subscribe to.
 * @param listener A listener to be informed of both Pusher channel protocol events and subscription data events.
 * @param eventNames An optional list of names of events to be bound to on the channel. The equivalent of calling {@link com.pusher.client.channel.Channel#bind(String,SubscriptionEventListener)} on or more times.
 * @return A new {@link com.pusher.client.channel.PrivateChannel} representing the subscription.
 * @throws IllegalStateException if a {@link com.pusher.client.Authorizer} has not been set for the {@link Pusher} instance via {@link #Pusher(String,PusherOptions)}.
 */
public PrivateChannel subscribePrivate(String channelName,PrivateChannelEventListener listener,String... eventNames){
  throwExceptionIfNoAuthorizerHasBeenSet();
  PrivateChannelImpl channel=factory.newPrivateChannel(connection,channelName,pusherOptions.getAuthorizer());
  channelManager.subscribeTo(channel,listener,eventNames);
  return channel;
}
Program: 17312
Project: 17312
Buggy source:
/** 
 * Subscribes to a   {@link com.pusher.client.channel.PresenceChannel} which requires authentication.
 * @param channelName The name of the channel to subscribe to.
 * @param listener A listener to be informed of Pusher channel protocol, including presence-specific events, and subscription data events.
 * @param eventNames An optional list of names of events to be bound to on the channel. The equivalent of calling {@link com.pusher.client.channel.Channel.bind(String, SubscriptionListener)} on or more times.
 * @return A new {@link com.pusher.client.channel.PresenceChannel} representing the subscription.
 * @throws IllegalStateException if a {@link com.pusher.client.Authorizer} has not been set for the {@link Pusher} instance via {@link #Pusher(String,PusherOptions)}.
 */
public PresenceChannel subscribePresence(String channelName,PresenceChannelEventListener listener,String... eventNames){
  throwExceptionIfNoAuthorizerHasBeenSet();
  PresenceChannelImpl channel=factory.newPresenceChannel(connection,channelName,pusherOptions.getAuthorizer());
  channelManager.subscribeTo(channel,listener,eventNames);
  return channel;
}

Fixed version (ground truth):
/** 
 * Subscribes to a   {@link com.pusher.client.channel.PresenceChannel} which requires authentication.
 * @param channelName The name of the channel to subscribe to.
 * @param listener A listener to be informed of Pusher channel protocol, including presence-specific events, and subscription data events.
 * @param eventNames An optional list of names of events to be bound to on the channel. The equivalent of calling {@link com.pusher.client.channel.Channel#bind(String,SubscriptionEventListener)} on or more times.
 * @return A new {@link com.pusher.client.channel.PresenceChannel} representing the subscription.
 * @throws IllegalStateException if a {@link com.pusher.client.Authorizer} has not been set for the {@link Pusher} instance via {@link #Pusher(String,PusherOptions)}.
 */
public PresenceChannel subscribePresence(String channelName,PresenceChannelEventListener listener,String... eventNames){
  throwExceptionIfNoAuthorizerHasBeenSet();
  PresenceChannelImpl channel=factory.newPresenceChannel(connection,channelName,pusherOptions.getAuthorizer());
  channelManager.subscribeTo(channel,listener,eventNames);
  return channel;
}
Program: 17314
Project: 17314
Buggy source:
/** 
 * The host to which connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param hostname
 * @return this, for chaining
 */
public PusherOptions setHost(String host){
  this.host=host;
  return this;
}

Fixed version (ground truth):
/** 
 * The host to which connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param host
 * @return this, for chaining
 */
public PusherOptions setHost(String host){
  this.host=host;
  return this;
}
Program: 17315
Project: 17315
Buggy source:
/** 
 * The port to which unencrypted connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param non-SSL port number
 * @return this, for chaining
 */
public PusherOptions setWsPort(int wsPort){
  this.wsPort=wsPort;
  return this;
}

Fixed version (ground truth):
/** 
 * The port to which unencrypted connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param wsPort port number
 * @return this, for chaining
 */
public PusherOptions setWsPort(int wsPort){
  this.wsPort=wsPort;
  return this;
}
Program: 17316
Project: 17316
Buggy source:
/** 
 * The port to which encrypted connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param SSL port number
 * @return this, for chaining
 */
public PusherOptions setWssPort(int wssPort){
  this.wssPort=wssPort;
  return this;
}

Fixed version (ground truth):
/** 
 * The port to which encrypted connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param wssPort port number
 * @return this, for chaining
 */
public PusherOptions setWssPort(int wssPort){
  this.wssPort=wssPort;
  return this;
}
Program: 17317
Project: 17317
Buggy source:
/** 
 * No need to call this via the API. Instead use   {@link com.pusher.client.Pusher.connect()}.
 */
void connect();

Fixed version (ground truth):
/** 
 * No need to call this via the API. Instead use   {@link com.pusher.client.Pusher#connect()}.
 */
void connect();
Program: 17318
Project: 17318
Buggy source:
/** 
 * <p>Callback that indicates either: <ul> <li>An error message has been received from Pusher, or</li> <li>An error has occurred in the client library.</li> </ul></p> <p>All   {@linkplain ConnectionEventListener}s that have been registered by calling   {@link Connection#bind(ConnectionState,ConnectionEventListener)}will receive this callback, even if the   {@linkplain ConnectionEventListener} is only bound to specificconnection status changes.</p>
 * @param message A message indicating the cause of the error.
 * @param code The error code for the message. Can be null.
 * @param e The exception that was thrown, if any. Can be null.
 */
void onError(String message,String code,Exception e);

Fixed version (ground truth):
/** 
 * Callback that indicates either: <ul> <li>An error message has been received from Pusher, or</li> <li>An error has occurred in the client library.</li> </ul> <p>All   {@linkplain ConnectionEventListener}s that have been registered by calling   {@link Connection#bind(ConnectionState,ConnectionEventListener)}will receive this callback, even if the   {@linkplain ConnectionEventListener} is only bound to specificconnection status changes.</p>
 * @param message A message indicating the cause of the error.
 * @param code The error code for the message. Can be null.
 * @param e The exception that was thrown, if any. Can be null.
 */
void onError(String message,String code,Exception e);
Program: 17319
Project: 17319
Buggy source:
/** 
 * The previous connections state. The state the connection has transitioned from.
 * @return
 */
public ConnectionState getPreviousState(){
  return previousState;
}

Fixed version (ground truth):
/** 
 * The previous connections state. The state the connection has transitioned from.
 * @return the previous connection state
 */
public ConnectionState getPreviousState(){
  return previousState;
}
Program: 17320
Project: 17320
Buggy source:
/** 
 * The current connection state. The state the connection has transitioned to.
 * @return
 */
public ConnectionState getCurrentState(){
  return currentState;
}

Fixed version (ground truth):
/** 
 * The current connection state. The state the connection has transitioned to.
 * @return the current connection state
 */
public ConnectionState getCurrentState(){
  return currentState;
}
Program: 17321
Project: 17321
Buggy source:
/** 
 * Identifies if the HTTP request will be sent over HTTPS.
 * @return
 */
public Boolean isSSL(){
  return this.endPoint.getProtocol().equals("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Identifies if the HTTP request will be sent over HTTPS.
 * @return true if the endpoint protocol is 'https'
 */
public Boolean isSSL(){
  return this.endPoint.getProtocol().equals("String_Node_Str");
}
Program: 17322
Project: 17322
Buggy source:
/** 
 * Disconnect from Pusher. <p> Calls are ignored if the   {@link Pusher.getConnection().getState()} is not{@link com.pusher.client.connection.ConnectionState.CONNECTED}. </p>
 */
public void disconnect(){
  if (connection.getState() == ConnectionState.CONNECTED) {
    connection.disconnect();
  }
}

Fixed version (ground truth):
/** 
 * Disconnect from Pusher. <p> Calls are ignored if the   {@link Connection#getState()}, retrieved from   {@link Pusher#getConnection}, is not  {@link com.pusher.client.connection.ConnectionState#CONNECTED}. </p>
 */
public void disconnect(){
  if (connection.getState() == ConnectionState.CONNECTED) {
    connection.disconnect();
  }
}
Program: 17323
Project: 17323
Buggy source:
/** 
 * Get a channel with the given name
 * @param channelName
 * @return The channel with the given name if it's present, otherwise <code>null</code>
 */
public Channel getChannel(String channelName){
  return channelManager.getChannel(channelName);
}

Fixed version (ground truth):
/** 
 * Get a channel with the given name
 * @param channelName The name of the channel
 * @return The channel with the given name if it's present, otherwise <code>null</code>
 */
public Channel getChannel(String channelName){
  return channelManager.getChannel(channelName);
}
Program: 17324
Project: 17324
Buggy source:
/** 
 * The host to which connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param host
 * @return this, for chaining
 */
public PusherOptions setHost(final String host){
  this.host=host;
  return this;
}

Fixed version (ground truth):
/** 
 * The host to which connections will be made. Note that if you wish to connect to a standard Pusher cluster, the convenience method setCluster will set the host and ports correctly from a single argument.
 * @param host The host
 * @return this, for chaining
 */
public PusherOptions setHost(final String host){
  this.host=host;
  return this;
}
Program: 17325
Project: 17325
Buggy source:
/** 
 * Sets an encrypted (SSL) connection should be used when connecting to Pusher.
 * @param encrypted
 * @return this, for chaining
 */
public PusherOptions setEncrypted(final boolean encrypted){
  this.encrypted=encrypted;
  return this;
}

Fixed version (ground truth):
/** 
 * Sets whether an encrypted (SSL) connection should be used when connecting to Pusher.
 * @param encrypted Whether to use an SSL connection
 * @return this, for chaining
 */
public PusherOptions setEncrypted(final boolean encrypted){
  this.encrypted=encrypted;
  return this;
}
Program: 17326
Project: 17326
Buggy source:
/** 
 * Construct the URL for the WebSocket connection based on the options previous set on this object and the provided API key
 * @param apiKey
 * @return the WebSocket URL
 */
public String buildUrl(final String apiKey){
  return String.format("String_Node_Str",encrypted ? WSS_SCHEME : WS_SCHEME,host,encrypted ? wssPort : wsPort,apiKey,URI_SUFFIX);
}

Fixed version (ground truth):
/** 
 * Construct the URL for the WebSocket connection based on the options previous set on this object and the provided API key
 * @param apiKey The API key
 * @return the WebSocket URL
 */
public String buildUrl(final String apiKey){
  return String.format("String_Node_Str",encrypted ? WSS_SCHEME : WS_SCHEME,host,encrypted ? wssPort : wsPort,apiKey,URI_SUFFIX);
}
Program: 17327
Project: 17327
Buggy source:
/** 
 * Create a new user. Users should not be created within an application. Users are created within the library and represent subscriptions to presence channels.
 * @param id
 * @param jsonData
 */
public User(final String id,final String jsonData){
  this.id=id;
  this.jsonData=jsonData;
}

Fixed version (ground truth):
/** 
 * Create a new user. Users should not be created within an application. Users are created within the library and represent subscriptions to presence channels.
 * @param id The user id
 * @param jsonData The user JSON data
 */
public User(final String id,final String jsonData){
  this.id=id;
  this.jsonData=jsonData;
}
Program: 17328
Project: 17328
Buggy source:
/** 
 * <p> Custom additional information about a user decoded as a new instance of the provided POJO bean type </p> <p> e.g. if   {@link #getInfo()} returns<code>{"name":"Mr User","number":9}</code> then you might implement as follows: </p> <pre> public class UserInfo { private String name; private Integer number; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getNumber() { return number; } public void setNumber(Integer number) { this.number = number; } } UserInfo info = user.getInfo(UserInfo.class); info.getName() // returns "Mr User" info.getNumber() // returns 9 </pre>
 * @param clazz the class into which the user info JSON representation should be parsed.
 * @return An instance of clazz, populated with the user info
 */
public <V>V getInfo(final Class<V> clazz){
  return new Gson().fromJson(jsonData,clazz);
}

Fixed version (ground truth):
/** 
 * <p> Custom additional information about a user decoded as a new instance of the provided POJO bean type </p> <p> e.g. if   {@link #getInfo()} returns<code>{"name":"Mr User","number":9}</code> then you might implement as follows: </p> <pre> public class UserInfo { private String name; private Integer number; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getNumber() { return number; } public void setNumber(Integer number) { this.number = number; } } UserInfo info = user.getInfo(UserInfo.class); info.getName() // returns "Mr User" info.getNumber() // returns 9 </pre>
 * @param < V > The class of the info
 * @param clazz the class into which the user info JSON representation should be parsed.
 * @return V An instance of clazz, populated with the user info
 */
public <V>V getInfo(final Class<V> clazz){
  return new Gson().fromJson(jsonData,clazz);
}
Program: 17329
Project: 17329
Buggy source:
/** 
 * No need to call this via the API. Instead use   {@link
     * com.pusher.client.Pusher.connect()}.
 */
void connect();

Fixed version (ground truth):
/** 
 * No need to call this via the API. Instead use   {@link com.pusher.client.Pusher#connect}.
 */
void connect();
Program: 17330
Project: 17330
Buggy source:
/** 
 * <p> Callback that indicates either: <ul> <li>An error message has been received from Pusher, or</li> <li>An error has occurred in the client library.</li> </ul> </p> <p> All   {@linkplain ConnectionEventListener}s that have been registered by calling   {@link Connection#bind(ConnectionState,ConnectionEventListener)}will receive this callback, even if the  {@linkplain ConnectionEventListener} is only bound to specific connectionstatus changes. </p>
 * @param message A message indicating the cause of the error.
 * @param code The error code for the message. Can be null.
 * @param e The exception that was thrown, if any. Can be null.
 */
void onError(String message,String code,Exception e);

Fixed version (ground truth):
/** 
 * Callback that indicates either: <ul> <li>An error message has been received from Pusher, or</li> <li>An error has occurred in the client library.</li> </ul> <p> All   {@linkplain ConnectionEventListener}s that have been registered by calling   {@link Connection#bind(ConnectionState,ConnectionEventListener)}will receive this callback, even if the  {@linkplain ConnectionEventListener} is only bound to specific connectionstatus changes. </p>
 * @param message A message indicating the cause of the error.
 * @param code The error code for the message. Can be null.
 * @param e The exception that was thrown, if any. Can be null.
 */
void onError(String message,String code,Exception e);