nus-yam/ex-repair huggingface dataset:
Program: 55343
Project: 55343
Buggy source:
/** 
 * Writes the JAR files of all vertices in array <code>jobVertices</code> to the specified output stream.
 * @param kryo the kryo object
 * @param out the output stream to write the JAR files to
 * @param jobVertices array of job vertices whose required JAR file are to be written to the output stream
 * @throws IOException thrown if an error occurs while writing to the stream
 */
private void writeRequiredJarFiles(final Kryo kryo,final Output out,final AbstractJobVertex[] jobVertices) throws IOException {
  final FileSystem fs=FileSystem.getLocalFileSystem();
  for (int i=0; i < this.userJars.size(); i++) {
    if (!fs.exists(this.userJars.get(i))) {
      throw new IOException("String_Node_Str" + this.userJars.get(i));
    }
  }
  out.writeInt(this.userJars.size());
  for (int i=0; i < this.userJars.size(); i++) {
    final Path jar=this.userJars.get(i);
    kryo.writeObject(out,jar);
    final FileStatus file=fs.getFileStatus(jar);
    out.writeLong(file.getLen());
    final FSDataInputStream inStream=fs.open(this.userJars.get(i));
    final byte[] buf=new byte[BUFFERSIZE];
    int read=inStream.read(buf,0,buf.length);
    while (read > 0) {
      out.write(buf,0,read);
      read=inStream.read(buf,0,buf.length);
    }
  }
}

Fixed version (ground truth):
/** 
 * Writes the JAR files of all vertices in array <code>jobVertices</code> to the specified output stream.
 * @param kryo the kryo object
 * @param out the output stream to write the JAR files to
 * @param jobVertices array of job vertices whose required JAR file are to be written to the output stream
 * @throws IOException thrown if an error occurs while writing to the stream
 */
private void writeRequiredJarFiles(final Kryo kryo,final Output out,final AbstractJobVertex[] jobVertices) throws IOException {
  final FileSystem fs=FileSystem.getLocalFileSystem();
  for (int i=0; i < this.userJars.size(); i++) {
    if (!fs.exists(this.userJars.get(i))) {
      throw new IOException("String_Node_Str" + this.userJars.get(i));
    }
  }
  out.writeInt(this.userJars.size());
  for (int i=0; i < this.userJars.size(); i++) {
    final Path jar=this.userJars.get(i);
    jar.write(kryo,out);
    final FileStatus file=fs.getFileStatus(jar);
    out.writeInt((int)file.getLen());
    final FSDataInputStream inStream=fs.open(this.userJars.get(i));
    final byte[] buf=new byte[BUFFERSIZE];
    int read=inStream.read(buf,0,buf.length);
    while (read > 0) {
      out.write(buf,0,read);
      read=inStream.read(buf,0,buf.length);
    }
  }
}
Program: 55344
Project: 55344
Buggy source:
/** 
 * Reads required JAR files from an input stream and adds them to the library cache manager.
 * @param kryo the kryo object
 * @param input the data stream to read the JAR files from
 * @throws IOException thrown if an error occurs while reading the stream
 */
private void readRequiredJarFiles(final Kryo kryo,final Input input) throws IOException {
  final int numJars=input.readInt();
  if (numJars > 0) {
    for (int i=0; i < numJars; i++) {
      final Path p=kryo.readObject(input,Path.class);
      this.userJars.add(p);
      final int sizeOfJar=input.readInt();
      LibraryCacheManager.addLibrary(this.jobID,p,sizeOfJar,input);
    }
  }
  LibraryCacheManager.register(this.jobID,this.userJars.toArray(new Path[0]));
}

Fixed version (ground truth):
/** 
 * Reads required JAR files from an input stream and adds them to the library cache manager.
 * @param kryo the kryo object
 * @param input the data stream to read the JAR files from
 * @throws IOException thrown if an error occurs while reading the stream
 */
private void readRequiredJarFiles(final Kryo kryo,final Input input) throws IOException {
  final int numJars=input.readInt();
  if (numJars > 0) {
    for (int i=0; i < numJars; i++) {
      final Path p=new Path();
      p.read(kryo,input);
      this.userJars.add(p);
      final int sizeOfJar=input.readInt();
      LibraryCacheManager.addLibrary(this.jobID,p,sizeOfJar,input);
    }
  }
  LibraryCacheManager.register(this.jobID,this.userJars.toArray(new Path[0]));
}
Program: 55345
Project: 55345
Buggy source:
/** 
 * Creates a copy of the given object by an in-memory serialization and subsequent deserialization.
 * @param original the original object to be copied
 * @return the copy of original object created by the original object's serialization/deserialization methods
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
public static <T>T createCopy(final T original){
  final Kryo kryo=new Kryo();
  return (T)kryo.copy(original);
}

Fixed version (ground truth):
/** 
 * Creates a copy of the given object by an in-memory serialization and subsequent deserialization.
 * @param original the original object to be copied
 * @return the copy of original object created by the original object's serialization/deserialization methods
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
@SuppressWarnings("String_Node_Str") public static <T>T createCopy(final T original){
  final Kryo kryo=new Kryo();
  final byte[] buf=new byte[8192];
  final Output output=new Output(buf);
  kryo.writeObject(output,original);
  output.flush();
  final Input input=new Input(buf);
  return (T)kryo.readObject(input,original.getClass());
}
Program: 55346
Project: 55346
Buggy source:
/** 
 * Creates a copy of the given object by an in-memory serialization and subsequent deserialization.
 * @param original the original object to be copied
 * @return the copy of original object
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
@SuppressWarnings("String_Node_Str") public static <T>T createCopy(final T original){
  final Kryo kryo=new Kryo();
  final byte[] buf=new byte[8192];
  Output output=new Output(buf);
  kryo.writeObject(output,original);
  output.flush();
  Input input=new Input(buf);
  return (T)kryo.readObject(input,original.getClass());
}

Fixed version (ground truth):
/** 
 * Creates a copy of the given object by an in-memory serialization and subsequent deserialization.
 * @param original the original object to be copied
 * @return the copy of original object
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
@SuppressWarnings("String_Node_Str") public static <T>T createCopy(final T original){
  final Kryo kryo=new Kryo();
  final byte[] buf=new byte[8192];
  final Output output=new Output(buf);
  kryo.writeObject(output,original);
  output.flush();
  final Input input=new Input(buf);
  return (T)kryo.readObject(input,original.getClass());
}
Program: 55349
Project: 55349
Buggy source:
/** 
 * Returns the query.
 * @return the query
 */
public SopremoPlan getQuery(){
  if (this.query != null || this.planBuffer == null)   return this.query;
  final JobID dummId=new JobID();
  try {
    LibraryCacheManager.register(dummId,this.requiredPackages.toArray(new String[this.requiredPackages.size()]));
    this.query=SopremoUtil.byteArrayToSerializable(this.planBuffer,LibraryCacheManager.getClassLoader(dummId));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      LibraryCacheManager.unregister(dummId);
    }
 catch (    IOException e) {
    }
  }
  return this.query;
}

Fixed version (ground truth):
/** 
 * Returns the query.
 * @return the query
 */
public SopremoPlan getQuery(){
  if (this.query != null || this.planBuffer == null)   return this.query;
  final JobID dummId=new JobID();
  try {
    LibraryCacheManager.register(dummId,this.requiredPackages.toArray(new String[this.requiredPackages.size()]));
    this.query=SopremoUtil.byteArrayToSerializable(this.planBuffer,SopremoPlan.class,LibraryCacheManager.getClassLoader(dummId));
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
 finally {
    try {
      LibraryCacheManager.unregister(dummId);
    }
 catch (    IOException e) {
    }
  }
  return this.query;
}
Program: 55350
Project: 55350
Buggy source:
@SuppressWarnings("String_Node_Str") public static <T extends Serializable>T byteArrayToSerializable(byte[] buffer,final ClassLoader classLoader) throws IOException {
  final ObjectInputStream ois=new ObjectInputStream(new ByteArrayInputStream(buffer)){
    @Override protected Class<?> resolveClass(    ObjectStreamClass desc) throws IOException, ClassNotFoundException {
      try {
        return classLoader.loadClass(desc.getName());
      }
 catch (      ClassNotFoundException e) {
        return super.resolveClass(desc);
      }
    }
  }
;
  try {
    return (T)ois.readObject();
  }
 catch (  ClassNotFoundException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static <T extends Serializable>T byteArrayToSerializable(byte[] buffer,Class<T> clazz,final ClassLoader classLoader) throws IOException {
  final ObjectInputStream ois=new ObjectInputStream(new ByteArrayInputStream(buffer)){
    @Override protected Class<?> resolveClass(    ObjectStreamClass desc) throws IOException, ClassNotFoundException {
      try {
        return classLoader.loadClass(desc.getName());
      }
 catch (      ClassNotFoundException e) {
        return super.resolveClass(desc);
      }
    }
  }
;
  try {
    return (T)ois.readObject();
  }
 catch (  ClassNotFoundException e) {
    throw new IllegalStateException("String_Node_Str",e);
  }
}
Program: 55351
Project: 55351
Buggy source:
/** 
 * Deserializes an   {@link Serializable} from a {@link DataInput}.<br> Please note that this method is not very efficient.
 */
public static <T extends Serializable>T deserializeObject(DataInput in,Class<T> clazz) throws IOException {
  byte[] buffer=new byte[in.readInt()];
  in.readFully(buffer);
  return byteArrayToSerializable(buffer,clazz.getClassLoader());
}

Fixed version (ground truth):
/** 
 * Deserializes an   {@link Serializable} from a {@link DataInput}.<br> Please note that this method is not very efficient.
 */
public static <T extends Serializable>T deserializeObject(DataInput in,Class<T> clazz) throws IOException {
  byte[] buffer=new byte[in.readInt()];
  in.readFully(buffer);
  return byteArrayToSerializable(buffer,clazz,clazz.getClassLoader());
}
Program: 55352
Project: 55352
Buggy source:
/** 
 * Tests whether the job manager has been shut down completely.
 * @return <code>true</code> if the job manager has been shut down completely, <code>false</code> otherwise
 */
public boolean isShutDown(){
  return this.isShutDown.get();
}

Fixed version (ground truth):
/** 
 * Tests whether the job manager has been shut down completely.
 * @return <code>true</code> if the job manager has been shut down completely, <code>false</code> otherwise
 */
public boolean isShutDown(){
  return this.isShutDown;
}
Program: 55353
Project: 55353
Buggy source:
public void shutdown(){
  if (this.isShutDown.compareAndSet(false,true)) {
    return;
  }
  if (this.instanceManager != null) {
    this.instanceManager.shutdown();
  }
  DiscoveryService.stopDiscoveryService();
  if (this.profiler != null) {
    this.profiler.shutdown();
  }
  if (this.jobManagerServer != null) {
    this.jobManagerServer.stop();
  }
  if (this.executorService != null) {
    this.executorService.shutdown();
    try {
      this.executorService.awaitTermination(5000L,TimeUnit.MILLISECONDS);
    }
 catch (    InterruptedException e) {
      if (LOG.isDebugEnabled()) {
        LOG.debug(StringUtils.stringifyException(e));
      }
    }
  }
  final Iterator<JobManagerPlugin> it=this.jobManagerPlugins.values().iterator();
  while (it.hasNext()) {
    it.next().shutdown();
  }
  if (this.eventCollector != null) {
    this.eventCollector.shutdown();
  }
  if (this.scheduler != null) {
    this.scheduler.shutdown();
  }
  this.isShutDown.set(true);
  LOG.debug("String_Node_Str");
}

Fixed version (ground truth):
public void shutdown(){
  if (!this.isShutdownInProgress.compareAndSet(false,true)) {
    return;
  }
  if (this.instanceManager != null) {
    this.instanceManager.shutdown();
  }
  DiscoveryService.stopDiscoveryService();
  if (this.profiler != null) {
    this.profiler.shutdown();
  }
  if (this.jobManagerServer != null) {
    this.jobManagerServer.stop();
  }
  if (this.executorService != null) {
    this.executorService.shutdown();
    try {
      this.executorService.awaitTermination(5000L,TimeUnit.MILLISECONDS);
    }
 catch (    InterruptedException e) {
      if (LOG.isDebugEnabled()) {
        LOG.debug(StringUtils.stringifyException(e));
      }
    }
  }
  final Iterator<JobManagerPlugin> it=this.jobManagerPlugins.values().iterator();
  while (it.hasNext()) {
    it.next().shutdown();
  }
  if (this.eventCollector != null) {
    this.eventCollector.shutdown();
  }
  if (this.scheduler != null) {
    this.scheduler.shutdown();
  }
  this.isShutDown=true;
  LOG.debug("String_Node_Str");
}
Program: 55354
Project: 55354
Buggy source:
private void process(String[] args){
  CommandLine cmd=this.parseOptions(args);
  final SopremoPlan plan=this.parseScript(cmd);
  this.configureClient(cmd);
  this.sopremoClient.submit(plan,new StateListener(){
    @Override public void stateChanged(    ExecutionState executionState,    String detail){
switch (executionState) {
case ENQUEUED:
        System.out.print("String_Node_Str");
      break;
case RUNNING:
    System.out.print("String_Node_Str");
  break;
case FINISHED:
System.out.println("String_Node_Str" + detail);
break;
case ERROR:
System.err.println("String_Node_Str" + detail);
break;
}
}
@Override public void progressUpdate(ExecutionState status,String detail){
super.progressUpdate(status,detail);
System.out.print("String_Node_Str");
}
}
,cmd.hasOption("String_Node_Str"));
this.sopremoClient.close();
}

Fixed version (ground truth):
private void process(String[] args){
  CommandLine cmd=this.parseOptions(args);
  final SopremoPlan plan=this.parseScript(cmd);
  this.configureClient(cmd);
  this.sopremoClient.submit(plan,new StateListener(){
    @Override public void stateChanged(    ExecutionState executionState,    String detail){
      System.out.println();
switch (executionState) {
case ENQUEUED:
        System.out.print("String_Node_Str");
      break;
case RUNNING:
    System.out.print("String_Node_Str");
  break;
case FINISHED:
System.out.print(detail);
break;
case ERROR:
System.out.print(detail);
break;
}
}
@Override protected void stateNotChanged(ExecutionState state,String detail){
System.out.print("String_Node_Str");
}
}
,cmd.hasOption("String_Node_Str"));
this.sopremoClient.close();
}
Program: 55355
Project: 55355
Buggy source:
protected void dealWithError(Exception e,final String message){
  System.err.print(message);
  if (e != null) {
    System.err.print("String_Node_Str");
    System.err.print(e);
  }
  System.err.println();
  System.exit(1);
}

Fixed version (ground truth):
protected void dealWithError(Exception e,final String message,Object... args){
  System.err.print(String.format(message,args));
  if (e != null) {
    System.err.print("String_Node_Str");
    System.err.print(e);
  }
  System.err.println();
  System.exit(1);
}
Program: 55356
Project: 55356
Buggy source:
@Override public void stateChanged(ExecutionState executionState,String detail){
switch (executionState) {
case ENQUEUED:
    System.out.print("String_Node_Str");
  break;
case RUNNING:
System.out.print("String_Node_Str");
break;
case FINISHED:
System.out.println("String_Node_Str" + detail);
break;
case ERROR:
System.err.println("String_Node_Str" + detail);
break;
}
}

Fixed version (ground truth):
@Override public void stateChanged(ExecutionState executionState,String detail){
  System.out.println();
switch (executionState) {
case ENQUEUED:
    System.out.print("String_Node_Str");
  break;
case RUNNING:
System.out.print("String_Node_Str");
break;
case FINISHED:
System.out.print(detail);
break;
case ERROR:
System.out.print(detail);
break;
}
}
Program: 55357
Project: 55357
Buggy source:
private SopremoPlan parseScript(CommandLine cmd){
  File file=new File(cmd.getOptionValue("String_Node_Str"));
  if (!file.exists())   this.dealWithError(null,"String_Node_Str");
  try {
    return new QueryParser().tryParse(new FileInputStream(file));
  }
 catch (  IOException e) {
    this.dealWithError(e,"String_Node_Str");
    return null;
  }
}

Fixed version (ground truth):
private SopremoPlan parseScript(CommandLine cmd){
  File file=new File(cmd.getOptionValue("String_Node_Str"));
  if (!file.exists())   this.dealWithError(null,"String_Node_Str",file);
  try {
    return new QueryParser().tryParse(new FileInputStream(file));
  }
 catch (  IOException e) {
    this.dealWithError(e,"String_Node_Str");
    return null;
  }
}
Program: 55358
Project: 55358
Buggy source:
private void configureClient(CommandLine cmd){
  String configDir=cmd.getOptionValue("String_Node_Str");
  GlobalConfiguration.loadConfiguration(configDir);
  this.sopremoClient=new DefaultClient();
  int updateTime=1000;
  if (cmd.hasOption("String_Node_Str"))   updateTime=Integer.parseInt(cmd.getOptionValue("String_Node_Str"));
  this.sopremoClient.setUpdateTime(updateTime);
  String address=cmd.getOptionValue("String_Node_Str"), port=cmd.getOptionValue("String_Node_Str");
  if (address != null || port != null) {
    this.sopremoClient.setServerAddress(new InetSocketAddress(address == null ? "String_Node_Str" : address,port == null ? SopremoConstants.DEFAULT_SOPREMO_SERVER_IPC_PORT : Integer.parseInt(port)));
  }
  this.sopremoClient.setExecutionMode(ExecutionMode.RUN_WITH_STATISTICS);
}

Fixed version (ground truth):
private void configureClient(CommandLine cmd){
  String configDir=cmd.getOptionValue("String_Node_Str");
  GlobalConfiguration.loadConfiguration(configDir);
  this.sopremoClient=new DefaultClient(GlobalConfiguration.getConfiguration());
  int updateTime=1000;
  if (cmd.hasOption("String_Node_Str"))   updateTime=Integer.parseInt(cmd.getOptionValue("String_Node_Str"));
  this.sopremoClient.setUpdateTime(updateTime);
  String address=cmd.getOptionValue("String_Node_Str"), port=cmd.getOptionValue("String_Node_Str");
  if (address != null || port != null) {
    this.sopremoClient.setServerAddress(new InetSocketAddress(address == null ? "String_Node_Str" : address,port == null ? SopremoConstants.DEFAULT_SOPREMO_SERVER_IPC_PORT : Integer.parseInt(port)));
  }
  this.sopremoClient.setExecutionMode(ExecutionMode.RUN_WITH_STATISTICS);
}
Program: 55359
Project: 55359
Buggy source:
/** 
 * Executes all operators. If expected values have been specified, the actual outputs values are compared to the expected values.
 */
public void run(){
  final SopremoPlan sopremoPlan=new SopremoPlan();
  sopremoPlan.setContext(this.evaluationContext);
  sopremoPlan.setSinks(this.getOutputOperators(0,this.expectedOutputs.length));
  final Collection<Contract> sinks=sopremoPlan.assemblePact();
  this.testPlan=new TestPlan(sinks);
  Schema schema=sopremoPlan.getSchema();
  for (  final Input input : this.inputs)   input.prepare(this.testPlan,schema);
  for (  final ExpectedOutput output : this.expectedOutputs)   output.prepare(this.testPlan,schema);
  if (this.trace)   SopremoUtil.trace();
  this.testPlan.run();
  if (this.trace)   SopremoUtil.untrace();
  for (  final ActualOutput output : this.actualOutputs)   output.load(this.testPlan);
}

Fixed version (ground truth):
/** 
 * Executes all operators. If expected values have been specified, the actual outputs values are compared to the expected values.
 */
public void run(){
  final SopremoPlan sopremoPlan=new SopremoPlan();
  sopremoPlan.setContext(this.evaluationContext);
  sopremoPlan.setSinks(this.getOutputOperators(0,this.expectedOutputs.length));
  final Collection<Contract> sinks=sopremoPlan.assemblePact();
  this.testPlan=new TestPlan(sinks);
  Schema schema=sopremoPlan.getSchema();
  for (  final Input input : this.inputs)   input.prepare(this.testPlan,schema);
  for (  final ExpectedOutput output : this.expectedOutputs)   output.prepare(this.testPlan,schema);
  if (this.dop > 0)   this.testPlan.setDegreeOfParallelism(this.dop);
  if (this.trace)   SopremoUtil.trace();
  this.testPlan.run();
  if (this.trace)   SopremoUtil.untrace();
  for (  final ActualOutput output : this.actualOutputs)   output.load(this.testPlan);
}
Program: 55360
Project: 55360
Buggy source:
/** 
 * Returns the degree of parallelism of the test plan.
 */
public void setDegreeOfParallelism(final int dop){
  if (dop < 1)   throw new IllegalArgumentException("String_Node_Str");
  this.testPlan.setDegreeOfParallelism(dop);
}

Fixed version (ground truth):
/** 
 * Returns the degree of parallelism of the test plan.
 */
public void setDegreeOfParallelism(final int dop){
  if (dop < 1)   throw new IllegalArgumentException("String_Node_Str");
  this.dop=dop;
}
Program: 55361
Project: 55361
Buggy source:
/** 
 * the iteration head prepares the backchannel: it allocates memory, instantiates a   {@link BlockingBackChannel} andhands it to the iteration tail via a  {@link Broker} singleton
 */
private BlockingBackChannel initBackChannel() throws Exception {
  TaskConfig taskConfig=getTaskConfig();
  long completeMemorySize=taskConfig.getMemorySize();
  long backChannelMemorySize=(long)(completeMemorySize * taskConfig.getBackChannelMemoryFraction());
  taskConfig.setMemorySize(completeMemorySize - backChannelMemorySize);
  List<MemorySegment> segments=Lists.newArrayList();
  int segmentSize=getMemoryManager().getPageSize();
  getMemoryManager().allocatePages(this,segments,backChannelMemorySize);
  BlockingBackChannel backChannel=new BlockingBackChannel(new SerializedUpdateBuffer(segments,segmentSize,getIOManager()));
  Broker<BlockingBackChannel> broker=BlockingBackChannelBroker.instance();
  broker.handIn(identifier(),backChannel);
  return backChannel;
}

Fixed version (ground truth):
/** 
 * the iteration head prepares the backchannel: it allocates memory, instantiates a   {@link BlockingBackChannel} andhands it to the iteration tail via a  {@link Broker} singleton
 */
private BlockingBackChannel initBackChannel() throws Exception {
  TaskConfig taskConfig=getTaskConfig();
  long completeMemorySize=taskConfig.getMemorySize();
  long backChannelMemorySize=(long)(completeMemorySize * taskConfig.getBackChannelMemoryFraction());
  taskConfig.setMemorySize(completeMemorySize - backChannelMemorySize);
  List<MemorySegment> segments=Lists.newArrayList();
  int segmentSize=getMemoryManager().getPageSize();
  getMemoryManager().allocatePages(this,segments,backChannelMemorySize);
  BlockingBackChannel backChannel=new BlockingBackChannel(new SerializedUpdateBuffer(segments,segmentSize,getIOManager()));
  Broker<BlockingBackChannel> broker=BlockingBackChannelBroker.instance();
  broker.handIn(brokerKey(),backChannel);
  return backChannel;
}
Program: 55362
Project: 55362
Buggy source:
private BlockingBackChannel retrieveBackChannel() throws Exception {
  Broker<BlockingBackChannel> broker=BlockingBackChannelBroker.instance();
  return broker.get(identifier());
}

Fixed version (ground truth):
private BlockingBackChannel retrieveBackChannel() throws Exception {
  Broker<BlockingBackChannel> broker=BlockingBackChannelBroker.instance();
  return broker.get(brokerKey());
}
Program: 55363
Project: 55363
Buggy source:
@Override protected void fillArray(IJsonNode[] result){
  this.children.toArray(new IJsonNode[this.children.size()]);
}

Fixed version (ground truth):
@Override protected void fillArray(IJsonNode[] result){
  IJsonNode[] array=this.children.toArray(new IJsonNode[this.children.size()]);
  for (int i=0; i < this.children.size(); i++) {
    result[i]=array[i];
  }
}
Program: 55367
Project: 55367
Buggy source:
@Override protected void computeValidPlanAlternatives(List<? extends OptimizerNode> altSubPlans,CostEstimator estimator,List<OptimizerNode> outputPlans){
  ShipStrategy ss=ShipStrategy.NONE;
  ShipStrategy hintSS=this.inConn.getShipStrategy();
  if (hintSS == ShipStrategy.BROADCAST || hintSS == ShipStrategy.SFR)   return;
 else   ss=hintSS;
  if (ss == ShipStrategy.NONE)   ss=ShipStrategy.FORWARD;
  for (  OptimizerNode subPlan : altSubPlans) {
    GlobalProperties gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan,this,ss);
    LocalProperties lp=PactConnection.getLocalPropertiesAfterConnection(subPlan,this,ss);
    MapNode nMap=new MapNode(this,subPlan,this.inConn,gp,lp);
    nMap.inConn.setShipStrategy(ss);
    nMap.getGlobalProperties().filterByNodesConstantSet(this,0);
    nMap.getLocalProperties().filterByNodesConstantSet(this,0);
    estimator.costOperator(nMap);
    outputPlans.add(nMap);
  }
}

Fixed version (ground truth):
@Override protected void computeValidPlanAlternatives(List<? extends OptimizerNode> altSubPlans,CostEstimator estimator,List<OptimizerNode> outputPlans){
  ShipStrategy ss=ShipStrategy.NONE;
  ShipStrategy hintSS=this.inConn.getShipStrategy();
  if (hintSS == ShipStrategy.BROADCAST || hintSS == ShipStrategy.SFR)   return;
 else   ss=hintSS;
  if (ss == ShipStrategy.NONE)   ss=ShipStrategy.FORWARD;
  for (  OptimizerNode subPlan : altSubPlans) {
    GlobalProperties gp=PactConnection.getGlobalPropertiesAfterConnection(subPlan,this,0,ss);
    LocalProperties lp=PactConnection.getLocalPropertiesAfterConnection(subPlan,this,ss);
    MapNode nMap=new MapNode(this,subPlan,this.inConn,gp,lp);
    nMap.inConn.setShipStrategy(ss);
    nMap.getGlobalProperties().filterByNodesConstantSet(this,0);
    nMap.getLocalProperties().filterByNodesConstantSet(this,0);
    estimator.costOperator(nMap);
    outputPlans.add(nMap);
  }
}
Program: 55372
Project: 55372
Buggy source:
public RandomAccessInputView(ArrayList<MemorySegment> segments,int segmentSize,int limitInLastSegment){
  super(segments.get(0),segmentSize,0);
  this.segments=segments;
  this.currentSegmentIndex=0;
  this.segmentSize=segmentSize;
  this.segmentSizeBits=MathUtils.log2strict(segmentSize);
  this.segmentSizeMask=segmentSize - 1;
  this.limitInLastSegment=limitInLastSegment;
}

Fixed version (ground truth):
public RandomAccessInputView(ArrayList<MemorySegment> segments,int segmentSize,int limitInLastSegment){
  super(segments.get(0),segments.size() > 1 ? segmentSize : limitInLastSegment,0);
  this.segments=segments;
  this.currentSegmentIndex=0;
  this.segmentSize=segmentSize;
  this.segmentSizeBits=MathUtils.log2strict(segmentSize);
  this.segmentSizeMask=segmentSize - 1;
  this.limitInLastSegment=limitInLastSegment;
}
Program: 55373
Project: 55373
Buggy source:
@Override public void setReadPosition(long position){
  final int bufferNum=(int)(position >>> this.segmentSizeBits);
  final int offset=(int)(position & this.segmentSizeMask);
  this.currentSegmentIndex=bufferNum;
  seekInput(this.segments.get(bufferNum),offset,this.segmentSize);
}

Fixed version (ground truth):
@Override public void setReadPosition(long position){
  final int bufferNum=(int)(position >>> this.segmentSizeBits);
  final int offset=(int)(position & this.segmentSizeMask);
  this.currentSegmentIndex=bufferNum;
  seekInput(this.segments.get(bufferNum),offset,bufferNum < this.segments.size() - 1 ? this.segmentSize : this.limitInLastSegment);
}
Program: 55377
Project: 55377
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void requestClose() throws IOException, InterruptedException {
  if (!this.closeRequested) {
    this.closeRequested=true;
    if (this.serializationBuffer.dataLeftFromPreviousSerialization()) {
      flush();
    }
    if (!isBroadcastChannel() || getChannelIndex() == 0) {
      transferEvent(new ByteBufferedChannelCloseEvent());
      flush();
    }
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void requestClose() throws IOException, InterruptedException {
  if (!this.closeRequested) {
    this.closeRequested=true;
    if (this.serializationBuffer.dataLeftFromPreviousSerialization()) {
      flush();
    }
    if (getType() == ChannelType.INMEMORY || !isBroadcastChannel() || getChannelIndex() == 0) {
      transferEvent(new ByteBufferedChannelCloseEvent());
      flush();
    }
  }
}
Program: 55379
Project: 55379
Buggy source:
/** 
 * Creates a new block location
 * @param blockLocation the original HDFS block location
 */
public DistributedBlockLocation(org.apache.hadoop.fs.BlockLocation blockLocation){
  this.blockLocation=blockLocation;
}

Fixed version (ground truth):
/** 
 * Creates a new block location
 * @param blockLocation the original HDFS block location
 */
public DistributedBlockLocation(final org.apache.hadoop.fs.BlockLocation blockLocation){
  this.blockLocation=blockLocation;
}
Program: 55380
Project: 55380
Buggy source:
@Override public long getOffset(){
  return blockLocation.getOffset();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public long getOffset(){
  return this.blockLocation.getOffset();
}
Program: 55381
Project: 55381
Buggy source:
@Override public long getLength(){
  return blockLocation.getLength();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public long getLength(){
  return this.blockLocation.getLength();
}
Program: 55382
Project: 55382
Buggy source:
@Override public int compareTo(BlockLocation o){
  long diff=getOffset() - o.getOffset();
  return diff < 0 ? -1 : diff > 0 ? 1 : 0;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public int compareTo(final BlockLocation o){
  final long diff=getOffset() - o.getOffset();
  return diff < 0 ? -1 : diff > 0 ? 1 : 0;
}
Program: 55383
Project: 55383
Buggy source:
@Override public String[] getHosts() throws IOException {
  return blockLocation.getHosts();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public String[] getHosts() throws IOException {
  if (this.hostnames == null) {
    final String[] hadoopHostnames=blockLocation.getHosts();
    this.hostnames=new String[hadoopHostnames.length];
    for (int i=0; i < hadoopHostnames.length; ++i) {
      this.hostnames[i]=stripHostname(hadoopHostnames[i]);
    }
  }
  return this.hostnames;
}
Program: 55384
Project: 55384
Buggy source:
public String toString(){
  if (this.indexes.size() == 0) {
    return "String_Node_Str";
  }
  final StringBuffer buf=new StringBuffer();
  for (int i=0; i < indexes.size(); i++) {
    if (buf.length() == 0) {
      buf.append("String_Node_Str");
    }
 else {
      buf.append("String_Node_Str");
    }
    buf.append(this.indexes.get(i));
    buf.append("String_Node_Str");
    buf.append(this.types.get(i).getName());
    buf.append("String_Node_Str");
    buf.append(this.orders.get(i).name());
  }
  buf.append("String_Node_Str");
  return buf.toString();
}

Fixed version (ground truth):
public String toString(){
  if (this.indexes.size() == 0) {
    return "String_Node_Str";
  }
  final StringBuffer buf=new StringBuffer();
  for (int i=0; i < indexes.size(); i++) {
    if (buf.length() == 0) {
      buf.append("String_Node_Str");
    }
 else {
      buf.append("String_Node_Str");
    }
    buf.append(this.indexes.get(i));
    if (this.types.get(i) != null) {
      buf.append("String_Node_Str");
      buf.append(this.types.get(i).getName());
    }
    buf.append("String_Node_Str");
    buf.append(this.orders.get(i).name());
  }
  buf.append("String_Node_Str");
  return buf.toString();
}
Program: 55386
Project: 55386
Buggy source:
/** 
 * Checks if another thread requested the vertex to cancel while it was in state STARTING. If so, the method clears the respective flag and repeats the cancel request.
 */
private void checkCancelRequestedFlag(){
  if (this.cancelRequested.compareAndSet(true,false)) {
    final TaskCancelResult tsr=cancelTask();
    if (tsr.getReturnCode() != AbstractTaskResult.ReturnCode.SUCCESS || tsr.getReturnCode() != AbstractTaskResult.ReturnCode.TASK_NOT_FOUND) {
      LOG.error("String_Node_Str" + this + "String_Node_Str"+ tsr.getReturnCode().toString()+ ((tsr.getDescription() != null) ? ("String_Node_Str" + tsr.getDescription() + "String_Node_Str") : "String_Node_Str"));
    }
  }
}

Fixed version (ground truth):
/** 
 * Checks if another thread requested the vertex to cancel while it was in state STARTING. If so, the method clears the respective flag and repeats the cancel request.
 */
private void checkCancelRequestedFlag(){
  if (this.cancelRequested.compareAndSet(true,false)) {
    final TaskCancelResult tsr=cancelTask();
    if (tsr.getReturnCode() != AbstractTaskResult.ReturnCode.SUCCESS && tsr.getReturnCode() != AbstractTaskResult.ReturnCode.TASK_NOT_FOUND) {
      LOG.error("String_Node_Str" + this + "String_Node_Str"+ tsr.getReturnCode().toString()+ ((tsr.getDescription() != null) ? ("String_Node_Str" + tsr.getDescription() + "String_Node_Str") : "String_Node_Str"));
    }
  }
}
Program: 55387
Project: 55387
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void setCompressedDataBuffer(Buffer buffer){
  if (buffer == null) {
    this.compressedBuffer=null;
    this.compressedDataBuffer=null;
    this.compressedDataBufferLength=0;
  }
 else {
    this.compressedDataBuffer=getInternalByteBuffer(buffer);
    this.compressedBuffer=buffer;
    this.compressedDataBufferLength=bufferToInt(this.compressedDataBuffer,0);
    this.uncompressedDataBufferLength=bufferToInt(this.compressedDataBuffer,4);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void setCompressedDataBuffer(final MemoryBuffer buffer){
  if (buffer == null) {
    this.compressedBuffer=null;
    this.compressedDataBuffer=null;
    this.compressedDataBufferLength=0;
  }
 else {
    this.compressedDataBuffer=buffer.getByteBuffer();
    this.compressedBuffer=buffer;
    this.compressedDataBufferLength=bufferToInt(this.compressedDataBuffer,0);
    this.uncompressedDataBufferLength=bufferToInt(this.compressedDataBuffer,4);
  }
}
Program: 55389
Project: 55389
Buggy source:
/** 
 * Creates a copy of the given   {@link IOReadableWritable} object by an in-memory serialization and subsequentdeserialization.
 * @param original the original object to be copied
 * @return the copy of original object created by the original object's serialization/deserialization methods
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
@SuppressWarnings("String_Node_Str") public static IOReadableWritable createCopy(IOReadableWritable original) throws IOException {
  final ByteArrayOutputStream baos=new ByteArrayOutputStream();
  final DataOutputStream dos=new DataOutputStream(baos);
  original.write(dos);
  final String className=original.getClass().getName();
  if (className == null) {
    fail("String_Node_Str");
  }
  Class<? extends IOReadableWritable> clazz=null;
  try {
    clazz=(Class<? extends IOReadableWritable>)Class.forName(className);
  }
 catch (  ClassNotFoundException e) {
    fail(e.getMessage());
  }
  if (clazz == null) {
    fail("String_Node_Str" + className);
  }
  IOReadableWritable copy=null;
  try {
    copy=clazz.newInstance();
  }
 catch (  InstantiationException e) {
    fail(e.getMessage());
  }
catch (  IllegalAccessException e) {
    fail(e.getMessage());
  }
  if (copy == null) {
    fail("String_Node_Str" + className + "String_Node_Str");
  }
  final ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray());
  final DataInputStream dis=new DataInputStream(bais);
  copy.read(dis);
  return copy;
}

Fixed version (ground truth):
/** 
 * Creates a copy of the given   {@link IOReadableWritable} object by an in-memory serialization and subsequentdeserialization.
 * @param original the original object to be copied
 * @return the copy of original object created by the original object's serialization/deserialization methods
 * @throws IOException thrown if an error occurs while creating the copy of the object
 */
@SuppressWarnings("String_Node_Str") public static <T extends IOReadableWritable>T createCopy(final T original) throws IOException {
  final ByteArrayOutputStream baos=new ByteArrayOutputStream();
  final DataOutputStream dos=new DataOutputStream(baos);
  original.write(dos);
  final String className=original.getClass().getName();
  if (className == null) {
    fail("String_Node_Str");
  }
  Class<T> clazz=null;
  try {
    clazz=(Class<T>)Class.forName(className);
  }
 catch (  ClassNotFoundException e) {
    fail(e.getMessage());
  }
  if (clazz == null) {
    fail("String_Node_Str" + className);
  }
  T copy=null;
  try {
    copy=clazz.newInstance();
  }
 catch (  InstantiationException e) {
    fail(e.getMessage());
  }
catch (  IllegalAccessException e) {
    fail(e.getMessage());
  }
  if (copy == null) {
    fail("String_Node_Str" + className + "String_Node_Str");
  }
  final ByteArrayInputStream bais=new ByteArrayInputStream(baos.toByteArray());
  final DataInputStream dis=new DataInputStream(bais);
  copy.read(dis);
  return copy;
}
Program: 55390
Project: 55390
Buggy source:
/** 
 * Unregisters the   {@link ExecutionListener} object for this vertex. This objectwill no longer be notified about particular events during the vertex's lifetime.
 * @param checkpointStateChangeListener the object to be unregistered
 */
public void unregisterExecutionListener(final ExecutionListener executionListener){
  this.executionListeners.remove(executionListener);
}

Fixed version (ground truth):
/** 
 * Unregisters the   {@link ExecutionListener} object for this vertex. This objectwill no longer be notified about particular events during the vertex's lifetime.
 * @param checkpointStateChangeListener the object to be unregistered
 */
public void unregisterExecutionListener(final ExecutionListener executionListener){
  this.executionListeners.remove(Integer.valueOf(executionListener.getPriority()));
}
Program: 55392
Project: 55392
Buggy source:
public boolean compareAndUpdateExecutionState(final ExecutionState expected,final ExecutionState update){
  if (update == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!this.executionState.compareAndSet(expected,update)) {
    return false;
  }
  ExecutionStateTransition.checkTransition(true,toString(),expected,update);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,update,null);
  }
  return true;
}

Fixed version (ground truth):
public boolean compareAndUpdateExecutionState(final ExecutionState expected,final ExecutionState update){
  if (update == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!this.executionState.compareAndSet(expected,update)) {
    return false;
  }
  ExecutionStateTransition.checkTransition(true,toString(),expected,update);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,update,null);
  }
  checkCancelRequestedFlag();
  return true;
}
Program: 55393
Project: 55393
Buggy source:
/** 
 * Updates the vertex's current execution state.
 * @param newExecutionState the new execution state
 * @param optionalMessage an optional message related to the state change
 */
public ExecutionState updateExecutionState(ExecutionState newExecutionState,final String optionalMessage){
  if (newExecutionState == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final ExecutionState currentExecutionState=this.executionState.get();
  if (currentExecutionState == ExecutionState.CANCELING) {
    if (newExecutionState == ExecutionState.FINISHING) {
      return currentExecutionState;
    }
    if (newExecutionState == ExecutionState.FINISHED) {
      LOG.info("String_Node_Str" + toString() + "String_Node_Str");
      newExecutionState=ExecutionState.CANCELED;
    }
  }
  final ExecutionState previousState=this.executionState.getAndSet(newExecutionState);
  if (previousState == newExecutionState) {
    return previousState;
  }
  ExecutionStateTransition.checkTransition(true,toString(),previousState,newExecutionState);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,newExecutionState,optionalMessage);
  }
  return previousState;
}

Fixed version (ground truth):
/** 
 * Updates the vertex's current execution state.
 * @param newExecutionState the new execution state
 * @param optionalMessage an optional message related to the state change
 */
public ExecutionState updateExecutionState(ExecutionState newExecutionState,final String optionalMessage){
  if (newExecutionState == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  final ExecutionState currentExecutionState=this.executionState.get();
  if (currentExecutionState == ExecutionState.CANCELING) {
    if (newExecutionState == ExecutionState.FINISHING) {
      return currentExecutionState;
    }
    if (newExecutionState == ExecutionState.FINISHED) {
      LOG.info("String_Node_Str" + toString() + "String_Node_Str");
      newExecutionState=ExecutionState.CANCELED;
    }
  }
  final ExecutionState previousState=this.executionState.getAndSet(newExecutionState);
  if (previousState == newExecutionState) {
    return previousState;
  }
  ExecutionStateTransition.checkTransition(true,toString(),previousState,newExecutionState);
  final Iterator<ExecutionListener> it=this.executionListeners.values().iterator();
  while (it.hasNext()) {
    it.next().executionStateChanged(this.executionGraph.getJobID(),this.vertexID,newExecutionState,optionalMessage);
  }
  checkCancelRequestedFlag();
  return previousState;
}
Program: 55394
Project: 55394
Buggy source:
public boolean readRecord(PactRecord target,byte[] bytes,int offset,int numBytes){
  PactString str=this.theString;
  if (this.ascii) {
    str.setValueAscii(bytes,offset,numBytes);
  }
 else {
    ByteBuffer byteWrapper=this.byteWrapper;
    if (bytes != byteWrapper.array()) {
      byteWrapper=ByteBuffer.wrap(bytes,0,bytes.length);
      this.byteWrapper=byteWrapper;
    }
    byteWrapper.position(offset);
    byteWrapper.limit(numBytes);
    try {
      CharBuffer result=this.decoder.decode(byteWrapper);
      str.setValue(result);
    }
 catch (    CharacterCodingException e) {
      byte[] copy=new byte[numBytes];
      System.arraycopy(bytes,offset,copy,0,numBytes);
      LOG.warn("String_Node_Str" + Arrays.toString(copy),e);
      return false;
    }
  }
  target.clear();
  target.addField(str);
  return true;
}

Fixed version (ground truth):
public boolean readRecord(PactRecord target,byte[] bytes,int offset,int numBytes){
  PactString str=this.theString;
  if (this.ascii) {
    str.setValueAscii(bytes,offset,numBytes);
  }
 else {
    ByteBuffer byteWrapper=this.byteWrapper;
    if (bytes != byteWrapper.array()) {
      byteWrapper=ByteBuffer.wrap(bytes,0,bytes.length);
      this.byteWrapper=byteWrapper;
    }
    byteWrapper.clear();
    byteWrapper.position(offset);
    byteWrapper.limit(offset + numBytes);
    try {
      CharBuffer result=this.decoder.decode(byteWrapper);
      str.setValue(result);
    }
 catch (    CharacterCodingException e) {
      byte[] copy=new byte[numBytes];
      System.arraycopy(bytes,offset,copy,0,numBytes);
      LOG.warn("String_Node_Str" + Arrays.toString(copy),e);
      return false;
    }
  }
  target.clear();
  target.addField(str);
  return true;
}
Program: 55395
Project: 55395
Buggy source:
/** 
 * Gets the type of the input splits that are processed by this input format.
 * @return The type of the input splits.
 */
public Class<T> getInputSplitType();

Fixed version (ground truth):
/** 
 * Gets the type of the input splits that are processed by this input format.
 * @return The type of the input splits.
 */
public Class<? extends T> getInputSplitType();
Program: 55396
Project: 55396
Buggy source:
@Override public Class<GenericInputSplit> getInputSplitType(){
  return GenericInputSplit.class;
}

Fixed version (ground truth):
@Override public Class<? extends GenericInputSplit> getInputSplitType(){
  return GenericInputSplit.class;
}
Program: 55397
Project: 55397
Buggy source:
@Override public Class<InputSplit> getInputSplitType(){
  if (this.format == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return (Class<InputSplit>)this.format.getInputSplitType();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public Class<InputSplit> getInputSplitType(){
  if (this.format == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  return (Class<InputSplit>)this.format.getInputSplitType();
}
Program: 55399
Project: 55399
Buggy source:
/** 
 * Copy constructor to create a copy of a node with a different predecessor. The predecessor is assumed to be of the same type and merely a copy with different strategies, as they are created in the process of the plan enumeration.
 * @param template The node to create a copy of.
 * @param predNode The new predecessor.
 * @param inConn The old connection to copy properties from.
 * @param globalProps The global properties of this copy.
 * @param localProps The local properties of this copy.
 */
protected SingleInputNode(SingleInputNode template,OptimizerNode predNode,PactConnection inConn,GlobalProperties globalProps,LocalProperties localProps){
  super(template,globalProps,localProps);
  this.constantSet=template.constantSet;
  this.keyList=template.keyList;
  this.inConn=new PactConnection(inConn,predNode,this);
  if (predNode.branchPlan != null && predNode.branchPlan.size() > 0) {
    this.branchPlan=new HashMap<OptimizerNode,OptimizerNode>(predNode.branchPlan);
  }
 else {
    this.branchPlan=null;
  }
}

Fixed version (ground truth):
/** 
 * Copy constructor to create a copy of a node with a different predecessor. The predecessor is assumed to be of the same type and merely a copy with different strategies, as they are created in the process of the plan enumeration.
 * @param template The node to create a copy of.
 * @param predNode The new predecessor.
 * @param inConn The old connection to copy properties from.
 * @param globalProps The global properties of this copy.
 * @param localProps The local properties of this copy.
 */
protected SingleInputNode(SingleInputNode template,OptimizerNode predNode,PactConnection inConn,GlobalProperties globalProps,LocalProperties localProps){
  super(template,globalProps,localProps);
  this.constantSet=template.constantSet;
  this.keyList=template.keyList;
  this.inConn=new PactConnection(inConn,predNode,this);
  if (this.branchPlan == null) {
    this.branchPlan=predNode.branchPlan;
  }
 else   if (predNode.branchPlan != null) {
    this.branchPlan.putAll(predNode.branchPlan);
  }
}
Program: 55401
Project: 55401
Buggy source:
@Override public void closeTask() throws Exception {
  while (!canceled && this.combinerThread.isAlive()) {
    try {
      this.combinerThread.join();
    }
 catch (    InterruptedException iex) {
    }
  }
  if (this.exception != null) {
    throw new ExceptionInChainedStubException(this.taskName,this.exception);
  }
  if (this.parent != null && this.combinerThread != null) {
    this.parent.userThreadFinished(this.combinerThread);
  }
  this.sorter.close();
  if (this.canceled)   return;
  AbstractPactTask.closeUserCode(this.combiner);
}

Fixed version (ground truth):
@Override public void closeTask() throws Exception {
  while (!this.canceled && this.combinerThread.isAlive()) {
    try {
      this.combinerThread.join();
    }
 catch (    InterruptedException iex) {
      cancelTask();
      throw iex;
    }
  }
  if (this.parent != null && this.combinerThread != null) {
    this.parent.userThreadFinished(this.combinerThread);
  }
  if (this.exception != null) {
    throw new ExceptionInChainedStubException(this.taskName,this.exception);
  }
  this.sorter.close();
  if (this.canceled)   return;
  AbstractPactTask.closeUserCode(this.combiner);
}
Program: 55402
Project: 55402
Buggy source:
@Override public void cancelTask(){
  this.canceled=true;
  this.exception=new Exception("String_Node_Str");
  this.combinerThread.cancel();
  this.inputCollector.close();
  this.sorter.close();
}

Fixed version (ground truth):
@Override public void cancelTask(){
  this.canceled=true;
  this.exception=new Exception("String_Node_Str");
  this.combinerThread.cancel();
  this.inputCollector.close();
  this.sorter.close();
  try {
    this.combinerThread.join();
  }
 catch (  InterruptedException iex) {
  }
 finally {
    if (this.parent != null && this.combinerThread != null) {
      this.parent.userThreadFinished(this.combinerThread);
    }
  }
}