nus-yam/ex-repair huggingface dataset:
Program: 94530
Project: 94530
Buggy source:
@Override public MapOp convertToMapOp(ParserNode node) throws ParserException {
  MapOp mapOp=null;
  if (node instanceof ParserFunctionNode) {
    mapOp=convertToMapOp((ParserFunctionNode)node);
  }
  if (node instanceof ParserConstantNode) {
    mapOp=convertToMapOp((ParserConstantNode)node);
  }
  if (node instanceof ParserVariableNode) {
    mapOp=convertToMapOp((ParserVariableNode)node);
  }
  if (mapOp != null) {
    if (mapOp.getConf() == null) {
      mapOp.setConf(new Configuration(this.conf));
    }
    if (mapOp.getProviderProperties() == null) {
      mapOp.setProviderProperties(providerProperties);
    }
    if (mapOp.getProtectionLevel() == null) {
      mapOp.setProtectionLevel(protectionLevel);
    }
    return mapOp;
  }
  throw new ParserException();
}

Fixed version (ground truth):
@Override public MapOp convertToMapOp(ParserNode node) throws ParserException {
  MapOp mapOp=null;
  if (node instanceof ParserFunctionNode) {
    mapOp=convertToMapOp((ParserFunctionNode)node);
  }
  if (node instanceof ParserConstantNode) {
    mapOp=convertToMapOp((ParserConstantNode)node);
  }
  if (node instanceof ParserVariableNode) {
    mapOp=convertToMapOp((ParserVariableNode)node);
  }
  if (mapOp != null) {
    if (mapOp.getProviderProperties() == null) {
      mapOp.setProviderProperties(providerProperties);
    }
    if (mapOp.getProtectionLevel() == null) {
      mapOp.setProtectionLevel(protectionLevel);
    }
    return mapOp;
  }
  throw new ParserException();
}
Program: 94531
Project: 94531
Buggy source:
public MapOp parse(String expression) throws ParserException, FileNotFoundException, IOException {
  log.debug("String_Node_Str" + expression);
  String exp=expression;
  _variables.clear();
  getPreprocessors();
  String[] lines=exp.split("String_Node_Str");
  ArrayList<String> cleaned=new ArrayList<String>();
  for (  String line : lines) {
    line=line.trim();
    if (!line.startsWith("String_Node_Str")) {
      int comment=line.indexOf('#');
      if (comment > 0) {
        line=line.substring(0,comment).trim();
      }
      cleaned.add(line);
    }
  }
  exp=StringUtils.join(cleaned,"String_Node_Str");
  log.debug("String_Node_Str" + exp);
  exp=mapFilesToVariables(exp);
  log.debug("String_Node_Str" + exp);
  MapOp root=null;
  try {
    ParserNode rootNode=parser.parse(exp,this);
    if (rootNode != null) {
      root=convertToMapOp(rootNode);
    }
  }
 catch (  ParserException e) {
    log.warn(exp);
    throw e;
  }
  log.debug("String_Node_Str" + root.toString());
  return root;
}

Fixed version (ground truth):
public MapOp parse(String expression) throws ParserException, FileNotFoundException, IOException {
  log.debug("String_Node_Str" + expression);
  String exp=expression;
  _variables.clear();
  getPreprocessors();
  String[] lines=exp.split("String_Node_Str");
  ArrayList<String> cleaned=new ArrayList<String>();
  for (  String line : lines) {
    line=line.trim();
    if (!line.startsWith("String_Node_Str")) {
      int comment=line.indexOf('#');
      if (comment > 0) {
        line=line.substring(0,comment).trim();
      }
      cleaned.add(line);
    }
  }
  exp=StringUtils.join(cleaned,"String_Node_Str");
  log.debug("String_Node_Str" + exp);
  exp=mapFilesToVariables(exp);
  log.debug("String_Node_Str" + exp);
  MapOp root=null;
  try {
    ParserNode rootNode=parser.parse(exp,this);
    if (rootNode != null) {
      root=convertToMapOp(rootNode);
      root.setDefaultConfiguration(conf);
    }
  }
 catch (  ParserException e) {
    log.warn(exp);
    throw e;
  }
  log.debug("String_Node_Str" + root.toString());
  return root;
}
Program: 94532
Project: 94532
Buggy source:
@Override public void postBuild(Progress p,boolean buildPyramid) throws IOException, JobFailedException, JobCancelledException {
  if (buildPyramid) {
    MrsImagePyramid pyramid=MrsImagePyramid.open(_outputName,getProviderProperties());
    MrsImagePyramidMetadata metadata=pyramid.getMetadata();
    Aggregator aggregator;
    if (metadata.getClassification() == Classification.Continuous) {
      aggregator=new MeanAggregator();
    }
 else {
      aggregator=new ModeAggregator();
    }
    BuildPyramidDriver.build(_outputName,aggregator,getConf(),getProviderProperties());
  }
  p.complete();
}

Fixed version (ground truth):
@Override public void postBuild(Progress p,boolean buildPyramid) throws IOException, JobFailedException, JobCancelledException {
  if (buildPyramid) {
    MrsImagePyramid pyramid=MrsImagePyramid.open(_outputName,getProviderProperties());
    MrsImagePyramidMetadata metadata=pyramid.getMetadata();
    Aggregator aggregator;
    if (metadata.getClassification() == Classification.Continuous) {
      aggregator=new MeanAggregator();
    }
 else {
      aggregator=new ModeAggregator();
    }
    BuildPyramidDriver.build(_outputName,aggregator,createConfiguration(),getProviderProperties());
  }
  p.complete();
}
Program: 94533
Project: 94533
Buggy source:
private static void findJars(File file,Set<File> paths,Set<String> filesLeft,boolean recurseDirectories) throws IOException {
  if (file.exists()) {
    if (file.isDirectory()) {
      File[] files=file.listFiles();
      if (files != null) {
        for (        File f : files) {
          if (filesLeft.contains(f.getName())) {
            log.debug("String_Node_Str" + file.getName() + "String_Node_Str");
            paths.add(file);
            filesLeft.remove(file.getName());
            if (filesLeft.isEmpty()) {
              return;
            }
          }
          if (recurseDirectories) {
            log.debug("String_Node_Str" + f.getPath() + "String_Node_Str"+ paths.size()+ "String_Node_Str"+ filesLeft.size());
            findJars(f,paths,filesLeft,recurseDirectories);
            if (filesLeft.isEmpty()) {
              return;
            }
          }
        }
      }
    }
 else     if (filesLeft.contains(file.getName())) {
      log.debug("String_Node_Str" + file.getName() + "String_Node_Str");
      paths.add(file);
      filesLeft.remove(file.getName());
    }
  }
}

Fixed version (ground truth):
private static void findJars(File file,Set<File> paths,Set<String> filesLeft,boolean recurseDirectories) throws IOException {
  if (file.exists()) {
    if (file.isDirectory()) {
      File[] files=file.listFiles();
      if (files != null) {
        for (        File f : files) {
          if (filesLeft.contains(f.getName())) {
            log.debug("String_Node_Str" + file.getName() + "String_Node_Str"+ file.getPath());
            paths.add(file);
            filesLeft.remove(file.getName());
            if (filesLeft.isEmpty()) {
              return;
            }
          }
          if (recurseDirectories) {
            log.debug("String_Node_Str" + f.getPath() + "String_Node_Str"+ paths.size()+ "String_Node_Str"+ filesLeft.size());
            findJars(f,paths,filesLeft,recurseDirectories);
            if (filesLeft.isEmpty()) {
              return;
            }
          }
        }
      }
    }
 else     if (filesLeft.contains(file.getName())) {
      log.debug("String_Node_Str" + file.getName() + "String_Node_Str"+ file.getPath());
      paths.add(file);
      filesLeft.remove(file.getName());
    }
  }
}
Program: 94534
Project: 94534
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  MapOp inlineCsvMapOp=_inputs.get(0);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((InlineCsvMapOp)inlineCsvMapOp).getVectorOutput();
  String sourcePoints=ifd.getValues();
  RasterMapOp friction=(RasterMapOp)_inputs.get(1);
  if (zoomLevel < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(friction.getOutputName(),AccessMode.READ,getProviderProperties());
    MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
    zoomLevel=metadata.getMaxZoomLevel();
  }
  try {
    String driverArgs[]=new String[]{"String_Node_Str",friction.getOutputName(),"String_Node_Str","String_Node_Str" + zoomLevel,"String_Node_Str",_outputName,"String_Node_Str",sourcePoints,"String_Node_Str",String.valueOf(maxCost)};
    if (ToolRunner.run(getConf(),new CostDistanceDriver(),driverArgs) < 0) {
      throw new JobFailedException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new JobFailedException(e.getMessage());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  MapOp inlineCsvMapOp=_inputs.get(0);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((InlineCsvMapOp)inlineCsvMapOp).getVectorOutput();
  String sourcePoints=ifd.getValues();
  RasterMapOp friction=(RasterMapOp)_inputs.get(1);
  if (zoomLevel < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(friction.getOutputName(),AccessMode.READ,getProviderProperties());
    MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
    zoomLevel=metadata.getMaxZoomLevel();
  }
  try {
    String driverArgs[]=new String[]{"String_Node_Str",friction.getOutputName(),"String_Node_Str","String_Node_Str" + zoomLevel,"String_Node_Str",_outputName,"String_Node_Str",sourcePoints,"String_Node_Str",String.valueOf(maxCost)};
    if (ToolRunner.run(createConfiguration(),new CostDistanceDriver(),driverArgs) < 0) {
      throw new JobFailedException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new JobFailedException(e.getMessage());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94535
Project: 94535
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  String destPoints=null;
  RasterMapOp inputOp=(RasterMapOp)_inputs.get(0);
  if (inputOp.getOutputName() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String costPyramidName=inputOp.getOutputName();
  if (zoom < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(costPyramidName,AccessMode.READ,getConf());
    if (dp != null) {
      MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
      zoom=metadata.getMaxZoomLevel();
    }
 else {
      throw new IOException("String_Node_Str" + costPyramidName + "String_Node_Str");
    }
  }
  MapOp inlineCsvMapOp=_inputs.get(1);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((VectorMapOp)inlineCsvMapOp).getVectorOutput();
  destPoints=ifd.getValues();
  LeastCostPathCalculator.run(destPoints,costPyramidName,zoom,_outputName,getProviderProperties());
  BasicInputFormatDescriptor result=new BasicInputFormatDescriptor(_outputName);
  _output=result;
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  String destPoints=null;
  RasterMapOp inputOp=(RasterMapOp)_inputs.get(0);
  if (inputOp.getOutputName() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String costPyramidName=inputOp.getOutputName();
  if (zoom < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(costPyramidName,AccessMode.READ,createConfiguration());
    if (dp != null) {
      MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
      zoom=metadata.getMaxZoomLevel();
    }
 else {
      throw new IOException("String_Node_Str" + costPyramidName + "String_Node_Str");
    }
  }
  MapOp inlineCsvMapOp=_inputs.get(1);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((VectorMapOp)inlineCsvMapOp).getVectorOutput();
  destPoints=ifd.getValues();
  LeastCostPathCalculator.run(destPoints,costPyramidName,zoom,_outputName,getProviderProperties());
  BasicInputFormatDescriptor result=new BasicInputFormatDescriptor(_outputName);
  _output=result;
}
Program: 94536
Project: 94536
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  MrsImagePyramid inputPyramid=RasterMapOp.flushRasterMapOpOutput(sourceRaster,0);
  if (aggregatorName == null) {
    MrsImagePyramidMetadata.Classification classification=inputPyramid.getMetadata().getClassification();
    if (classification.equals(Classification.Categorical)) {
      aggregatorName="String_Node_Str";
    }
 else {
      aggregatorName="String_Node_Str";
    }
  }
  p.starting();
  Class<? extends Aggregator> aggregatorClass=null;
  aggregatorClass=AggregatorRegistry.aggregatorRegistry.get(aggregatorName.toUpperCase());
  if (aggregatorClass == null) {
    throw new IllegalArgumentException("String_Node_Str" + aggregatorName);
  }
  String rasterInput=sourceRaster.getOutputName();
  try {
    BuildPyramidDriver.build(rasterInput,aggregatorClass.newInstance(),getConf(),getProviderProperties());
  }
 catch (  InstantiationException e) {
    String msg="String_Node_Str" + aggregatorName + "String_Node_Str"+ rasterInput;
    log.error(msg);
    throw new JobFailedException(msg);
  }
catch (  IllegalAccessException e) {
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
catch (  Exception e) {
    e.printStackTrace();
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
  p.complete();
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  MrsImagePyramid inputPyramid=RasterMapOp.flushRasterMapOpOutput(sourceRaster,0);
  if (aggregatorName == null) {
    MrsImagePyramidMetadata.Classification classification=inputPyramid.getMetadata().getClassification();
    if (classification.equals(Classification.Categorical)) {
      aggregatorName="String_Node_Str";
    }
 else {
      aggregatorName="String_Node_Str";
    }
  }
  p.starting();
  Class<? extends Aggregator> aggregatorClass=null;
  aggregatorClass=AggregatorRegistry.aggregatorRegistry.get(aggregatorName.toUpperCase());
  if (aggregatorClass == null) {
    throw new IllegalArgumentException("String_Node_Str" + aggregatorName);
  }
  String rasterInput=sourceRaster.getOutputName();
  try {
    BuildPyramidDriver.build(rasterInput,aggregatorClass.newInstance(),createConfiguration(),getProviderProperties());
  }
 catch (  InstantiationException e) {
    String msg="String_Node_Str" + aggregatorName + "String_Node_Str"+ rasterInput;
    log.error(msg);
    throw new JobFailedException(msg);
  }
catch (  IllegalAccessException e) {
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
catch (  Exception e) {
    e.printStackTrace();
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
  p.complete();
}
Program: 94537
Project: 94537
Buggy source:
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  MrsImageDataProvider provider=DataProviderFactory.getMrsImageDataProvider(sourcepyramid.getName(),AccessMode.READ,getProviderProperties());
  MrsImagePyramidMetadata metadata=provider.getMetadataReader().read();
  _outputName=source.getOutputName();
  if (metadata.getClassification() != classification) {
    metadata.setClassification(classification);
    metadata.setResamplingMethod(AggregatorRegistry.aggregatorRegistry.inverse().get(aggregator.getClass()));
    provider.getMetadataWriter().write();
    if (sourcepyramid.hasPyramids()) {
      try {
        BuildPyramidDriver.build(sourcepyramid.getName(),aggregator,getConf(),p,jobListener,getProviderProperties());
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  MrsImageDataProvider provider=DataProviderFactory.getMrsImageDataProvider(sourcepyramid.getName(),AccessMode.READ,getProviderProperties());
  MrsImagePyramidMetadata metadata=provider.getMetadataReader().read();
  _outputName=source.getOutputName();
  if (metadata.getClassification() != classification) {
    metadata.setClassification(classification);
    metadata.setResamplingMethod(AggregatorRegistry.aggregatorRegistry.inverse().get(aggregator.getClass()));
    provider.getMetadataWriter().write();
    if (sourcepyramid.hasPyramids()) {
      try {
        BuildPyramidDriver.build(sourcepyramid.getName(),aggregator,createConfiguration(),p,jobListener,getProviderProperties());
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94538
Project: 94538
Buggy source:
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  log.info("String_Node_Str" + _outputName.toString());
  final Job job=new Job(getConf());
  if (bounds == null) {
    bounds=calculateBounds();
  }
  FillRasterDriver.run(job,sourcepyramid,_outputName,fill,filltype,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  log.info("String_Node_Str" + _outputName.toString());
  final Job job=new Job(createConfiguration());
  if (bounds == null) {
    bounds=calculateBounds();
  }
  FillRasterDriver.run(job,sourcepyramid,_outputName,fill,filltype,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94539
Project: 94539
Buggy source:
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final InputFormatDescriptor ifd=((VectorMapOp)_inputs.get(0)).getVectorOutput();
  if (bounds == null) {
    bounds=calculateBounds();
  }
{
    final RasterizeVectorDriver rvd=new RasterizeVectorDriver();
    final Job job=new Job(getConf());
    ifd.populateJobParameters(job);
    rvd.setValueColumn(column);
    rvd.run(job,_outputName,_aggregationType,zoomlevel,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final InputFormatDescriptor ifd=((VectorMapOp)_inputs.get(0)).getVectorOutput();
  if (bounds == null) {
    bounds=calculateBounds();
  }
{
    final RasterizeVectorDriver rvd=new RasterizeVectorDriver();
    final Job job=new Job(createConfiguration());
    ifd.populateJobParameters(job);
    rvd.setValueColumn(column);
    rvd.run(job,_outputName,_aggregationType,zoomlevel,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94540
Project: 94540
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  ProgressHierarchy ph=new ProgressHierarchy(p);
  ph.createChild(1f);
  ph.createChild(1f);
  _writeInputs(ph.getChild(0));
  _connectInputs();
  PigQuerier pq=new PigQuerier();
  log.warn(_script);
  log.warn(_outputName.toString());
  pq.query(_script,new Path(_outputName),getConf());
  ph.getChild(1).complete();
  _output=new BasicInputFormatDescriptor(_outputName);
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  ProgressHierarchy ph=new ProgressHierarchy(p);
  ph.createChild(1f);
  ph.createChild(1f);
  _writeInputs(ph.getChild(0));
  _connectInputs();
  PigQuerier pq=new PigQuerier();
  log.warn(_script);
  log.warn(_outputName.toString());
  pq.query(_script,new Path(_outputName),createConfiguration());
  ph.getChild(1).complete();
  _output=new BasicInputFormatDescriptor(_outputName);
}
Program: 94541
Project: 94541
Buggy source:
/** 
 * Go through each of the MapOp inputs and write the values out to disk. If the values are already on disk then this can be skipped. This may take a while.
 * @throws IOException
 * @throws JobFailedException
 */
protected void _writeInputs(Progress p) throws IOException, JobFailedException, JobCancelledException {
  ProgressHierarchy ph=new ProgressHierarchy(p);
  for (  MapOp input : _inputs) {
    if (input != null && (input instanceof VectorMapOp)) {
      if (((VectorMapOp)input).getOutputName() == null) {
        ph.createChild(1.0f);
      }
    }
  }
  _inputPaths=new ArrayList<Path>();
  int pi=0;
  for (  MapOp input : _inputs) {
    if (input != null && (input instanceof VectorMapOp)) {
      Path inputPath=new Path(((VectorMapOp)input).getOutputName());
      if (inputPath == null) {
        inputPath=new Path(HadoopFileUtils.getTempDir(),HadoopUtils.createRandomString(40) + "String_Node_Str");
        addTempFile(inputPath.toString());
        addTempFile(inputPath.toString() + "String_Node_Str");
        VectorMapOp.writeVectorOutput((InputFormatDescriptor)((VectorMapOp)input).getVectorOutput(),inputPath,getConf(),ph.getChild(pi++));
      }
      _inputPaths.add(inputPath);
    }
  }
}

Fixed version (ground truth):
/** 
 * Go through each of the MapOp inputs and write the values out to disk. If the values are already on disk then this can be skipped. This may take a while.
 * @throws IOException
 * @throws JobFailedException
 */
protected void _writeInputs(Progress p) throws IOException, JobFailedException, JobCancelledException {
  ProgressHierarchy ph=new ProgressHierarchy(p);
  for (  MapOp input : _inputs) {
    if (input != null && (input instanceof VectorMapOp)) {
      if (((VectorMapOp)input).getOutputName() == null) {
        ph.createChild(1.0f);
      }
    }
  }
  _inputPaths=new ArrayList<Path>();
  int pi=0;
  for (  MapOp input : _inputs) {
    if (input != null && (input instanceof VectorMapOp)) {
      Path inputPath=new Path(((VectorMapOp)input).getOutputName());
      if (inputPath == null) {
        inputPath=new Path(HadoopFileUtils.getTempDir(),HadoopUtils.createRandomString(40) + "String_Node_Str");
        addTempFile(inputPath.toString());
        addTempFile(inputPath.toString() + "String_Node_Str");
        VectorMapOp.writeVectorOutput((InputFormatDescriptor)((VectorMapOp)input).getVectorOutput(),inputPath,createConfiguration(),ph.getChild(pi++));
      }
      _inputPaths.add(inputPath);
    }
  }
}
Program: 94542
Project: 94542
Buggy source:
@Override public MapOp convertToMapOp(ParserNode node) throws ParserException {
  MapOp mapOp=null;
  if (node instanceof ParserFunctionNode) {
    mapOp=convertToMapOp((ParserFunctionNode)node);
  }
  if (node instanceof ParserConstantNode) {
    mapOp=convertToMapOp((ParserConstantNode)node);
  }
  if (node instanceof ParserVariableNode) {
    mapOp=convertToMapOp((ParserVariableNode)node);
  }
  if (mapOp != null) {
    if (mapOp.getConf() == null) {
      mapOp.setConf(new Configuration(this.conf));
    }
    if (mapOp.getProviderProperties() == null) {
      mapOp.setProviderProperties(providerProperties);
    }
    if (mapOp.getProtectionLevel() == null) {
      mapOp.setProtectionLevel(protectionLevel);
    }
    return mapOp;
  }
  throw new ParserException();
}

Fixed version (ground truth):
@Override public MapOp convertToMapOp(ParserNode node) throws ParserException {
  MapOp mapOp=null;
  if (node instanceof ParserFunctionNode) {
    mapOp=convertToMapOp((ParserFunctionNode)node);
  }
  if (node instanceof ParserConstantNode) {
    mapOp=convertToMapOp((ParserConstantNode)node);
  }
  if (node instanceof ParserVariableNode) {
    mapOp=convertToMapOp((ParserVariableNode)node);
  }
  if (mapOp != null) {
    if (mapOp.getProviderProperties() == null) {
      mapOp.setProviderProperties(providerProperties);
    }
    if (mapOp.getProtectionLevel() == null) {
      mapOp.setProtectionLevel(protectionLevel);
    }
    return mapOp;
  }
  throw new ParserException();
}
Program: 94543
Project: 94543
Buggy source:
public MapOp parse(String expression) throws ParserException, FileNotFoundException, IOException {
  log.debug("String_Node_Str" + expression);
  String exp=expression;
  _variables.clear();
  getPreprocessors();
  String[] lines=exp.split("String_Node_Str");
  ArrayList<String> cleaned=new ArrayList<String>();
  for (  String line : lines) {
    line=line.trim();
    if (!line.startsWith("String_Node_Str")) {
      int comment=line.indexOf('#');
      if (comment > 0) {
        line=line.substring(0,comment).trim();
      }
      cleaned.add(line);
    }
  }
  exp=StringUtils.join(cleaned,"String_Node_Str");
  log.debug("String_Node_Str" + exp);
  exp=mapFilesToVariables(exp);
  log.debug("String_Node_Str" + exp);
  MapOp root=null;
  try {
    ParserNode rootNode=parser.parse(exp,this);
    if (rootNode != null) {
      root=convertToMapOp(rootNode);
    }
  }
 catch (  ParserException e) {
    log.warn(exp);
    throw e;
  }
  log.debug("String_Node_Str" + root.toString());
  return root;
}

Fixed version (ground truth):
public MapOp parse(String expression) throws ParserException, FileNotFoundException, IOException {
  log.debug("String_Node_Str" + expression);
  String exp=expression;
  _variables.clear();
  getPreprocessors();
  String[] lines=exp.split("String_Node_Str");
  ArrayList<String> cleaned=new ArrayList<String>();
  for (  String line : lines) {
    line=line.trim();
    if (!line.startsWith("String_Node_Str")) {
      int comment=line.indexOf('#');
      if (comment > 0) {
        line=line.substring(0,comment).trim();
      }
      cleaned.add(line);
    }
  }
  exp=StringUtils.join(cleaned,"String_Node_Str");
  log.debug("String_Node_Str" + exp);
  exp=mapFilesToVariables(exp);
  log.debug("String_Node_Str" + exp);
  MapOp root=null;
  try {
    ParserNode rootNode=parser.parse(exp,this);
    if (rootNode != null) {
      root=convertToMapOp(rootNode);
      root.setDefaultConfiguration(conf);
    }
  }
 catch (  ParserException e) {
    log.warn(exp);
    throw e;
  }
  log.debug("String_Node_Str" + root.toString());
  return root;
}
Program: 94544
Project: 94544
Buggy source:
@Override public void postBuild(Progress p,boolean buildPyramid) throws IOException, JobFailedException, JobCancelledException {
  if (buildPyramid) {
    MrsImagePyramid pyramid=MrsImagePyramid.open(_outputName,getProviderProperties());
    MrsImagePyramidMetadata metadata=pyramid.getMetadata();
    Aggregator aggregator;
    if (metadata.getClassification() == Classification.Continuous) {
      aggregator=new MeanAggregator();
    }
 else {
      aggregator=new ModeAggregator();
    }
    BuildPyramidDriver.build(_outputName,aggregator,getConf(),getProviderProperties());
  }
  p.complete();
}

Fixed version (ground truth):
@Override public void postBuild(Progress p,boolean buildPyramid) throws IOException, JobFailedException, JobCancelledException {
  if (buildPyramid) {
    MrsImagePyramid pyramid=MrsImagePyramid.open(_outputName,getProviderProperties());
    MrsImagePyramidMetadata metadata=pyramid.getMetadata();
    Aggregator aggregator;
    if (metadata.getClassification() == Classification.Continuous) {
      aggregator=new MeanAggregator();
    }
 else {
      aggregator=new ModeAggregator();
    }
    BuildPyramidDriver.build(_outputName,aggregator,createConfiguration(),getProviderProperties());
  }
  p.complete();
}
Program: 94545
Project: 94545
Buggy source:
private static void findJars(File file,Set<File> paths,Set<String> filesLeft,boolean recurseDirectories) throws IOException {
  if (file.exists()) {
    if (file.isDirectory()) {
      File[] files=file.listFiles();
      if (files != null) {
        for (        File f : files) {
          if (filesLeft.contains(f.getName())) {
            log.debug("String_Node_Str" + file.getName() + "String_Node_Str");
            paths.add(file);
            filesLeft.remove(file.getName());
            if (filesLeft.isEmpty()) {
              return;
            }
          }
          if (recurseDirectories) {
            log.debug("String_Node_Str" + f.getPath() + "String_Node_Str"+ paths.size()+ "String_Node_Str"+ filesLeft.size());
            findJars(f,paths,filesLeft,recurseDirectories);
            if (filesLeft.isEmpty()) {
              return;
            }
          }
        }
      }
    }
 else     if (filesLeft.contains(file.getName())) {
      log.debug("String_Node_Str" + file.getName() + "String_Node_Str");
      paths.add(file);
      filesLeft.remove(file.getName());
    }
  }
}

Fixed version (ground truth):
private static void findJars(File file,Set<File> paths,Set<String> filesLeft,boolean recurseDirectories) throws IOException {
  if (file.exists()) {
    if (file.isDirectory()) {
      File[] files=file.listFiles();
      if (files != null) {
        for (        File f : files) {
          if (filesLeft.contains(f.getName())) {
            log.debug("String_Node_Str" + file.getName() + "String_Node_Str"+ file.getPath());
            paths.add(file);
            filesLeft.remove(file.getName());
            if (filesLeft.isEmpty()) {
              return;
            }
          }
          if (recurseDirectories) {
            log.debug("String_Node_Str" + f.getPath() + "String_Node_Str"+ paths.size()+ "String_Node_Str"+ filesLeft.size());
            findJars(f,paths,filesLeft,recurseDirectories);
            if (filesLeft.isEmpty()) {
              return;
            }
          }
        }
      }
    }
 else     if (filesLeft.contains(file.getName())) {
      log.debug("String_Node_Str" + file.getName() + "String_Node_Str"+ file.getPath());
      paths.add(file);
      filesLeft.remove(file.getName());
    }
  }
}
Program: 94546
Project: 94546
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  MapOp inlineCsvMapOp=_inputs.get(0);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((InlineCsvMapOp)inlineCsvMapOp).getVectorOutput();
  String sourcePoints=ifd.getValues();
  RasterMapOp friction=(RasterMapOp)_inputs.get(1);
  if (zoomLevel < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(friction.getOutputName(),AccessMode.READ,getProviderProperties());
    MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
    zoomLevel=metadata.getMaxZoomLevel();
  }
  try {
    String driverArgs[]=new String[]{"String_Node_Str",friction.getOutputName(),"String_Node_Str","String_Node_Str" + zoomLevel,"String_Node_Str",_outputName,"String_Node_Str",sourcePoints,"String_Node_Str",String.valueOf(maxCost)};
    if (ToolRunner.run(getConf(),new CostDistanceDriver(),driverArgs) < 0) {
      throw new JobFailedException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new JobFailedException(e.getMessage());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  MapOp inlineCsvMapOp=_inputs.get(0);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((InlineCsvMapOp)inlineCsvMapOp).getVectorOutput();
  String sourcePoints=ifd.getValues();
  RasterMapOp friction=(RasterMapOp)_inputs.get(1);
  if (zoomLevel < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(friction.getOutputName(),AccessMode.READ,getProviderProperties());
    MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
    zoomLevel=metadata.getMaxZoomLevel();
  }
  try {
    String driverArgs[]=new String[]{"String_Node_Str",friction.getOutputName(),"String_Node_Str","String_Node_Str" + zoomLevel,"String_Node_Str",_outputName,"String_Node_Str",sourcePoints,"String_Node_Str",String.valueOf(maxCost)};
    if (ToolRunner.run(createConfiguration(),new CostDistanceDriver(),driverArgs) < 0) {
      throw new JobFailedException("String_Node_Str");
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    throw new JobFailedException(e.getMessage());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94547
Project: 94547
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  String destPoints=null;
  RasterMapOp inputOp=(RasterMapOp)_inputs.get(0);
  if (inputOp.getOutputName() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String costPyramidName=inputOp.getOutputName();
  if (zoom < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(costPyramidName,AccessMode.READ,getConf());
    if (dp != null) {
      MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
      zoom=metadata.getMaxZoomLevel();
    }
 else {
      throw new IOException("String_Node_Str" + costPyramidName + "String_Node_Str");
    }
  }
  MapOp inlineCsvMapOp=_inputs.get(1);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((VectorMapOp)inlineCsvMapOp).getVectorOutput();
  destPoints=ifd.getValues();
  LeastCostPathCalculator.run(destPoints,costPyramidName,zoom,_outputName,getProviderProperties());
  BasicInputFormatDescriptor result=new BasicInputFormatDescriptor(_outputName);
  _output=result;
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  String destPoints=null;
  RasterMapOp inputOp=(RasterMapOp)_inputs.get(0);
  if (inputOp.getOutputName() == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String costPyramidName=inputOp.getOutputName();
  if (zoom < 0) {
    MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(costPyramidName,AccessMode.READ,createConfiguration());
    if (dp != null) {
      MrsImagePyramidMetadata metadata=dp.getMetadataReader().read();
      zoom=metadata.getMaxZoomLevel();
    }
 else {
      throw new IOException("String_Node_Str" + costPyramidName + "String_Node_Str");
    }
  }
  MapOp inlineCsvMapOp=_inputs.get(1);
  assert(inlineCsvMapOp instanceof InlineCsvMapOp);
  InlineCsvInputFormatDescriptor ifd=(InlineCsvInputFormatDescriptor)((VectorMapOp)inlineCsvMapOp).getVectorOutput();
  destPoints=ifd.getValues();
  LeastCostPathCalculator.run(destPoints,costPyramidName,zoom,_outputName,getProviderProperties());
  BasicInputFormatDescriptor result=new BasicInputFormatDescriptor(_outputName);
  _output=result;
}
Program: 94548
Project: 94548
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  MrsImagePyramid inputPyramid=RasterMapOp.flushRasterMapOpOutput(sourceRaster,0);
  if (aggregatorName == null) {
    MrsImagePyramidMetadata.Classification classification=inputPyramid.getMetadata().getClassification();
    if (classification.equals(Classification.Categorical)) {
      aggregatorName="String_Node_Str";
    }
 else {
      aggregatorName="String_Node_Str";
    }
  }
  p.starting();
  Class<? extends Aggregator> aggregatorClass=null;
  aggregatorClass=AggregatorRegistry.aggregatorRegistry.get(aggregatorName.toUpperCase());
  if (aggregatorClass == null) {
    throw new IllegalArgumentException("String_Node_Str" + aggregatorName);
  }
  String rasterInput=sourceRaster.getOutputName();
  try {
    BuildPyramidDriver.build(rasterInput,aggregatorClass.newInstance(),getConf(),getProviderProperties());
  }
 catch (  InstantiationException e) {
    String msg="String_Node_Str" + aggregatorName + "String_Node_Str"+ rasterInput;
    log.error(msg);
    throw new JobFailedException(msg);
  }
catch (  IllegalAccessException e) {
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
catch (  Exception e) {
    e.printStackTrace();
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
  p.complete();
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  MrsImagePyramid inputPyramid=RasterMapOp.flushRasterMapOpOutput(sourceRaster,0);
  if (aggregatorName == null) {
    MrsImagePyramidMetadata.Classification classification=inputPyramid.getMetadata().getClassification();
    if (classification.equals(Classification.Categorical)) {
      aggregatorName="String_Node_Str";
    }
 else {
      aggregatorName="String_Node_Str";
    }
  }
  p.starting();
  Class<? extends Aggregator> aggregatorClass=null;
  aggregatorClass=AggregatorRegistry.aggregatorRegistry.get(aggregatorName.toUpperCase());
  if (aggregatorClass == null) {
    throw new IllegalArgumentException("String_Node_Str" + aggregatorName);
  }
  String rasterInput=sourceRaster.getOutputName();
  try {
    BuildPyramidDriver.build(rasterInput,aggregatorClass.newInstance(),createConfiguration(),getProviderProperties());
  }
 catch (  InstantiationException e) {
    String msg="String_Node_Str" + aggregatorName + "String_Node_Str"+ rasterInput;
    log.error(msg);
    throw new JobFailedException(msg);
  }
catch (  IllegalAccessException e) {
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
catch (  Exception e) {
    e.printStackTrace();
    log.error("String_Node_Str" + rasterInput + "String_Node_Str"+ e);
    throw new JobFailedException("String_Node_Str" + rasterInput);
  }
  p.complete();
}
Program: 94549
Project: 94549
Buggy source:
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  MrsImageDataProvider provider=DataProviderFactory.getMrsImageDataProvider(sourcepyramid.getName(),AccessMode.READ,getProviderProperties());
  MrsImagePyramidMetadata metadata=provider.getMetadataReader().read();
  _outputName=source.getOutputName();
  if (metadata.getClassification() != classification) {
    metadata.setClassification(classification);
    metadata.setResamplingMethod(AggregatorRegistry.aggregatorRegistry.inverse().get(aggregator.getClass()));
    provider.getMetadataWriter().write();
    if (sourcepyramid.hasPyramids()) {
      try {
        BuildPyramidDriver.build(sourcepyramid.getName(),aggregator,getConf(),p,jobListener,getProviderProperties());
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  MrsImageDataProvider provider=DataProviderFactory.getMrsImageDataProvider(sourcepyramid.getName(),AccessMode.READ,getProviderProperties());
  MrsImagePyramidMetadata metadata=provider.getMetadataReader().read();
  _outputName=source.getOutputName();
  if (metadata.getClassification() != classification) {
    metadata.setClassification(classification);
    metadata.setResamplingMethod(AggregatorRegistry.aggregatorRegistry.inverse().get(aggregator.getClass()));
    provider.getMetadataWriter().write();
    if (sourcepyramid.hasPyramids()) {
      try {
        BuildPyramidDriver.build(sourcepyramid.getName(),aggregator,createConfiguration(),p,jobListener,getProviderProperties());
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94550
Project: 94550
Buggy source:
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  log.info("String_Node_Str" + _outputName.toString());
  final Job job=new Job(getConf());
  if (bounds == null) {
    bounds=calculateBounds();
  }
  FillRasterDriver.run(job,sourcepyramid,_outputName,fill,filltype,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final MrsImagePyramid sourcepyramid=RasterMapOp.flushRasterMapOpOutput(source,0);
  log.info("String_Node_Str" + _outputName.toString());
  final Job job=new Job(createConfiguration());
  if (bounds == null) {
    bounds=calculateBounds();
  }
  FillRasterDriver.run(job,sourcepyramid,_outputName,fill,filltype,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94551
Project: 94551
Buggy source:
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final InputFormatDescriptor ifd=((VectorMapOp)_inputs.get(0)).getVectorOutput();
  if (bounds == null) {
    bounds=calculateBounds();
  }
{
    final RasterizeVectorDriver rvd=new RasterizeVectorDriver();
    final Job job=new Job(getConf());
    ifd.populateJobParameters(job);
    rvd.setValueColumn(column);
    rvd.run(job,_outputName,_aggregationType,zoomlevel,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}

Fixed version (ground truth):
@Override public void build(final Progress p) throws IOException, JobFailedException, JobCancelledException {
  if (p != null) {
    p.starting();
  }
  final InputFormatDescriptor ifd=((VectorMapOp)_inputs.get(0)).getVectorOutput();
  if (bounds == null) {
    bounds=calculateBounds();
  }
{
    final RasterizeVectorDriver rvd=new RasterizeVectorDriver();
    final Job job=new Job(createConfiguration());
    ifd.populateJobParameters(job);
    rvd.setValueColumn(column);
    rvd.run(job,_outputName,_aggregationType,zoomlevel,bounds,p,jobListener,getProtectionLevel(),getProviderProperties());
  }
  MrsImageDataProvider dp=DataProviderFactory.getMrsImageDataProvider(_outputName,AccessMode.READ,getProviderProperties());
  _output=MrsPyramidDescriptor.create(dp);
  if (p != null) {
    p.complete();
  }
}
Program: 94552
Project: 94552
Buggy source:
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  ProgressHierarchy ph=new ProgressHierarchy(p);
  ph.createChild(1f);
  ph.createChild(1f);
  _writeInputs(ph.getChild(0));
  _connectInputs();
  PigQuerier pq=new PigQuerier();
  log.warn(_script);
  log.warn(_outputName.toString());
  pq.query(_script,new Path(_outputName),getConf());
  ph.getChild(1).complete();
  _output=new BasicInputFormatDescriptor(_outputName);
}

Fixed version (ground truth):
@Override public void build(Progress p) throws IOException, JobFailedException, JobCancelledException {
  ProgressHierarchy ph=new ProgressHierarchy(p);
  ph.createChild(1f);
  ph.createChild(1f);
  _writeInputs(ph.getChild(0));
  _connectInputs();
  PigQuerier pq=new PigQuerier();
  log.warn(_script);
  log.warn(_outputName.toString());
  pq.query(_script,new Path(_outputName),createConfiguration());
  ph.getChild(1).complete();
  _output=new BasicInputFormatDescriptor(_outputName);
}