Program: 121505
Project: 121505
Buggy source:
@Override public String exportPigudf(IProcessor processor,Property property,boolean isExport) throws ProcessorException {
  try {
    CorePlugin.getDefault().getRunProcessService().getJavaProject().getProject().build(IncrementalProjectBuilder.AUTO_BUILD,null);
  }
 catch (  CoreException e) {
    throw new ProcessorException(e);
  }
  Map<ExportChoice,Object> exportChoiceMap=new EnumMap<ExportChoice,Object>(ExportChoice.class);
  exportChoiceMap.put(ExportChoice.needPigudf,true);
  ProcessItem processItem=(ProcessItem)property.getItem();
  ExportFileResource fileResource=new ExportFileResource(processItem,property.getLabel());
  ExportFileResource[] exportFileResources=new ExportFileResource[]{fileResource};
  JobScriptsManager jobScriptsManager=JobScriptsManagerFactory.createManagerInstance(exportChoiceMap,processor.getContext().getName(),JobScriptsManager.ALL_ENVIRONMENTS,-1,-1,JobExportType.POJO);
  URL url=jobScriptsManager.getExportPigudfResources(exportFileResources);
  if (url == null) {
    return null;
  }
  File file=new File(url.getFile());
  String librariesPath=processor.getCodeProject().getLocation() + "String_Node_Str";
  String targetFileName=JobJavaScriptsManager.USERPIGUDF_JAR;
  if (!isExport) {
    targetFileName=property.getLabel() + "String_Node_Str" + property.getVersion()+ "String_Node_Str"+ JobJavaScriptsManager.USERPIGUDF_JAR;
  }
  File target=new File(librariesPath + targetFileName);
  try {
    FilesUtils.copyFile(file,target);
  }
 catch (  IOException e) {
    throw new ProcessorException(e.getMessage());
  }
  return targetFileName;
}

Fixed version (ground truth):
@Override public String exportPigudf(IProcessor processor,Property property,boolean isExport) throws ProcessorException {
  try {
    CorePlugin.getDefault().getRunProcessService().getJavaProject().getProject().build(IncrementalProjectBuilder.AUTO_BUILD,null);
  }
 catch (  CoreException e) {
    throw new ProcessorException(e);
  }
  Map<ExportChoice,Object> exportChoiceMap=new EnumMap<ExportChoice,Object>(ExportChoice.class);
  exportChoiceMap.put(ExportChoice.needPigudf,true);
  ProcessItem processItem=(ProcessItem)property.getItem();
  ExportFileResource fileResource=new ExportFileResource(processItem,property.getLabel());
  ExportFileResource[] exportFileResources=new ExportFileResource[]{fileResource};
  IContext context=processor.getContext();
  String contextName="String_Node_Str";
  if (context != null) {
    contextName=context.getName();
  }
  JobScriptsManager jobScriptsManager=JobScriptsManagerFactory.createManagerInstance(exportChoiceMap,contextName,JobScriptsManager.ALL_ENVIRONMENTS,-1,-1,JobExportType.POJO);
  URL url=jobScriptsManager.getExportPigudfResources(exportFileResources);
  if (url == null) {
    return null;
  }
  File file=new File(url.getFile());
  String librariesPath=processor.getCodeProject().getLocation() + "String_Node_Str";
  String targetFileName=JobJavaScriptsManager.USERPIGUDF_JAR;
  if (!isExport) {
    targetFileName=property.getLabel() + "String_Node_Str" + property.getVersion()+ "String_Node_Str"+ JobJavaScriptsManager.USERPIGUDF_JAR;
  }
  File target=new File(librariesPath + targetFileName);
  try {
    FilesUtils.copyFile(file,target);
  }
 catch (  IOException e) {
    throw new ProcessorException(e.getMessage());
  }
  return targetFileName;
}