Program: 96473
Project: 96473
Buggy source:
public void exportBundles(List modules,FrameworkInstanceConfiguration config,final IPath location,final IPath tmpLocation){
  final FeatureExportInfo info=new FeatureExportInfo();
  info.toDirectory=true;
  info.useJarFormat=true;
  info.exportSource=true;
  info.exportSourceBundle=false;
  info.allowBinaryCycles=true;
  info.useWorkspaceCompiledClasses=true;
  info.destinationDirectory=tmpLocation == null ? location.makeAbsolute().toOSString() : tmpLocation.makeAbsolute().toOSString();
  List<Object> allWsBundles=new ArrayList<Object>();
  List<IProject> allBinBundles=new ArrayList<IProject>();
  for (  Object module : modules) {
    try {
      IModule[] moduleArr=(IModule[])module;
      for (      IModule iModule : moduleArr) {
        IProject project=iModule.getProject();
        IPluginModelBase pmb=PluginRegistry.findModel(project);
        ModelEntry entry=null;
        if (pmb != null)         entry=PluginRegistry.findEntry(pmb.getBundleDescription().getSymbolicName());
        if (!WorkspaceModelManager.isBinaryProject(project) && WorkspaceModelManager.isPluginProject(project)) {
          if (entry.getModel() != null && isValidModel(entry.getModel()) && hasBuildProperties((IPluginModelBase)entry.getModel())) {
            allWsBundles.add(entry.getModel());
          }
 else {
            allBinBundles.add(project);
          }
        }
 else         if (WorkspaceModelManager.isBinaryProject(project) && WorkspaceModelManager.isPluginProject(project)) {
          allBinBundles.add(project);
        }
      }
    }
 catch (    SecurityException e) {
      e.printStackTrace();
    }
catch (    IllegalArgumentException e) {
      e.printStackTrace();
    }
  }
  copyBinaryJars(allBinBundles,(tmpLocation == null ? location : tmpLocation));
  info.items=allWsBundles.toArray();
  info.signingInfo=null;
  info.qualifier="String_Node_Str";
  final PluginExportOperation job=new PluginExportOperation(info,PDEUIMessages.PluginExportJob_name);
  job.setUser(true);
  job.setRule(ResourcesPlugin.getWorkspace().getRoot());
  job.setProperty(IProgressConstants.ICON_PROPERTY,PDEPluginImages.DESC_PLUGIN_OBJ);
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      if (event.getResult().isOK()) {
        try {
          if (tmpLocation != null) {
            File sourceFiles=tmpLocation.append("String_Node_Str").toFile();
            for (            File jars : sourceFiles.listFiles()) {
              File destFile=location.append(jars.getName()).toFile();
              if (!destFile.exists()) {
                destFile.createNewFile();
              }
              FileChannel source=null;
              FileChannel destination=null;
              try {
                source=new FileInputStream(jars).getChannel();
                destination=new FileOutputStream(destFile).getChannel();
                destination.transferFrom(source,0,source.size());
              }
  finally {
                if (source != null) {
                  source.close();
                }
                if (destination != null) {
                  destination.close();
                }
              }
            }
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
);
  job.schedule();
}

Fixed version (ground truth):
/** 
 * @param modules
 * @param config not really used
 * @param location
 * @param tmpLocation
 */
public void exportBundles(List<IModule[]> modules,FrameworkInstanceConfiguration config,final IPath location,final IPath tmpLocation){
  final FeatureExportInfo info=new FeatureExportInfo();
  info.toDirectory=true;
  info.useJarFormat=true;
  info.exportSource=true;
  info.exportSourceBundle=false;
  info.allowBinaryCycles=true;
  info.useWorkspaceCompiledClasses=true;
  info.destinationDirectory=tmpLocation == null ? location.makeAbsolute().toOSString() : tmpLocation.makeAbsolute().toOSString();
  List<Object> allWsBundles=new ArrayList<Object>();
  List<IProject> allBinBundles=new ArrayList<IProject>();
  for (  IModule[] moduleArr : modules) {
    try {
      for (      IModule iModule : moduleArr) {
        IProject project=iModule.getProject();
        IPluginModelBase pmb=PluginRegistry.findModel(project);
        ModelEntry entry=null;
        if (pmb != null)         entry=PluginRegistry.findEntry(pmb.getBundleDescription().getSymbolicName());
        if (!WorkspaceModelManager.isBinaryProject(project) && WorkspaceModelManager.isPluginProject(project)) {
          if (entry != null && entry.getModel() != null && isValidModel(entry.getModel()) && hasBuildProperties(entry.getModel())) {
            allWsBundles.add(entry.getModel());
          }
 else {
            allBinBundles.add(project);
          }
        }
 else         if (WorkspaceModelManager.isBinaryProject(project) && WorkspaceModelManager.isPluginProject(project)) {
          allBinBundles.add(project);
        }
      }
    }
 catch (    SecurityException e) {
      e.printStackTrace();
    }
catch (    IllegalArgumentException e) {
      e.printStackTrace();
    }
  }
  copyBinaryJars(allBinBundles,(tmpLocation == null ? location : tmpLocation));
  info.items=allWsBundles.toArray();
  info.signingInfo=null;
  info.qualifier="String_Node_Str";
  final PluginExportOperation job=new PluginExportOperation(info,PDEUIMessages.PluginExportJob_name);
  job.setUser(true);
  job.setRule(ResourcesPlugin.getWorkspace().getRoot());
  job.setProperty(IProgressConstants.ICON_PROPERTY,PDEPluginImages.DESC_PLUGIN_OBJ);
  job.addJobChangeListener(new JobChangeAdapter(){
    @Override public void done(    IJobChangeEvent event){
      if (event.getResult().isOK()) {
        try {
          if (tmpLocation != null) {
            File sourceFiles=tmpLocation.append("String_Node_Str").toFile();
            File[] fileList=sourceFiles.listFiles();
            if (fileList != null)             for (            File jars : fileList) {
              File destFile=location.append(jars.getName()).toFile();
              if (!destFile.exists()) {
                if (!destFile.createNewFile()) {
                  throw new IOException("String_Node_Str" + destFile);
                }
              }
              FileInputStream fIn=null;
              FileOutputStream fOut=null;
              FileChannel source=null;
              FileChannel destination=null;
              try {
                source=(fIn=new FileInputStream(jars)).getChannel();
                destination=(fOut=new FileOutputStream(destFile)).getChannel();
                destination.transferFrom(source,0,source.size());
              }
  finally {
                if (fIn != null) {
                  try {
                    fIn.close();
                  }
 catch (                  IOException x) {
                    x.printStackTrace();
                  }
                }
                if (fOut != null) {
                  try {
                    fOut.close();
                  }
 catch (                  IOException x) {
                    x.printStackTrace();
                  }
                }
              }
            }
          }
        }
 catch (        Exception e) {
          e.printStackTrace();
        }
      }
    }
  }
);
  job.schedule();
}