nus-yam/ex-repair huggingface dataset:
Program: 5771
Project: 5771
Buggy source:
/** 
 * Create a namespace in the File System and Hive.
 * @param namespaceMeta {@link NamespaceMeta} for the namespace to create
 * @throws IOException if there are errors while creating the namespace in the File System
 * @throws ExploreException if there are errors while creating the namespace in Hive
 * @throws SQLException if there are errors while creating the namespace in Hive
 */
@Override public void create(NamespaceMeta namespaceMeta) throws IOException, ExploreException, SQLException {
  createLocation(namespaceMeta);
  if (cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED)) {
    try {
      exploreFacade.createNamespace(namespaceMeta);
    }
 catch (    ExploreException|SQLException e) {
      deleteLocation(namespaceMeta.getNamespaceId());
      throw e;
    }
  }
}

Fixed version (ground truth):
/** 
 * Create a namespace in the File System and Hive.
 * @param namespaceMeta {@link NamespaceMeta} for the namespace to create
 * @throws IOException if there are errors while creating the namespace in the File System
 * @throws ExploreException if there are errors while creating the namespace in Hive
 * @throws SQLException if there are errors while creating the namespace in Hive
 */
@Override public void create(NamespaceMeta namespaceMeta) throws IOException, ExploreException, SQLException {
  createLocation(namespaceMeta);
  if (cConf.getBoolean(Constants.Explore.EXPLORE_ENABLED)) {
    try {
      exploreFacade.createNamespace(namespaceMeta);
    }
 catch (    ExploreException|SQLException e) {
      try {
        deleteLocation(namespaceMeta.getNamespaceId());
      }
 catch (      Exception e2) {
        e.addSuppressed(e2);
      }
      throw e;
    }
  }
}
Program: 5772
Project: 5772
Buggy source:
@Override public void create(NamespaceMeta namespaceMeta) throws IOException, ExploreException, SQLException {
  super.create(namespaceMeta);
  if (NamespaceId.DEFAULT.equals(namespaceMeta.getNamespaceId())) {
    return;
  }
  String hbaseNamespace=tableUtil.getHBaseNamespace(namespaceMeta);
  try (HBaseAdmin admin=new HBaseAdmin(hConf)){
    if (Strings.isNullOrEmpty(namespaceMeta.getConfig().getHbaseNamespace())) {
      try {
        tableUtil.createNamespaceIfNotExists(admin,hbaseNamespace);
      }
 catch (      Throwable t) {
        super.delete(namespaceMeta.getNamespaceId());
        throw t;
      }
    }
    if (!tableUtil.hasNamespace(admin,hbaseNamespace)) {
      throw new IOException(String.format("String_Node_Str",hbaseNamespace,namespaceMeta.getName()));
    }
  }
 }

Fixed version (ground truth):
@Override public void create(NamespaceMeta namespaceMeta) throws IOException, ExploreException, SQLException {
  super.create(namespaceMeta);
  if (NamespaceId.DEFAULT.equals(namespaceMeta.getNamespaceId())) {
    return;
  }
  String hbaseNamespace=tableUtil.getHBaseNamespace(namespaceMeta);
  try (HBaseAdmin admin=new HBaseAdmin(hConf)){
    if (Strings.isNullOrEmpty(namespaceMeta.getConfig().getHbaseNamespace())) {
      try {
        tableUtil.createNamespaceIfNotExists(admin,hbaseNamespace);
      }
 catch (      Throwable t) {
        try {
          super.delete(namespaceMeta.getNamespaceId());
        }
 catch (        Exception e) {
          t.addSuppressed(e);
        }
        throw t;
      }
    }
    if (!tableUtil.hasNamespace(admin,hbaseNamespace)) {
      throw new IOException(String.format("String_Node_Str",hbaseNamespace,namespaceMeta.getName()));
    }
  }
 }
Program: 5773
Project: 5773
Buggy source:
public String getPrompt(CLIConnectionConfig config){
  try {
    return "String_Node_Str" + config.getURI().resolve("String_Node_Str" + config.getNamespace()) + "String_Node_Str";
  }
 catch (  DisconnectedException e) {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
public String getPrompt(CLIConnectionConfig config){
  try {
    return "String_Node_Str" + config.getURI().resolve("String_Node_Str" + config.getNamespace().getId()) + "String_Node_Str";
  }
 catch (  DisconnectedException e) {
    return "String_Node_Str";
  }
}
Program: 5778
Project: 5778
Buggy source:
/** 
 * Packages all the dependencies of the Spark job. It contains all CDAP classes that are needed to run the user spark program.
 * @param targetDir directory for the file to be created in
 * @return {@link File} of the dependency jar in the given target directory
 * @throws IOException if failed to package the jar
 */
private File buildDependencyJar(File targetDir) throws IOException {
  Location tempLocation=new LocalLocationFactory(targetDir).create(CDAP_SPARK_JAR);
  final HadoopClassExcluder hadoopClassExcluder=new HadoopClassExcluder();
  ApplicationBundler appBundler=new ApplicationBundler(new ClassAcceptor(){
    @Override public boolean accept(    String className,    URL classUrl,    URL classPathUrl){
      if (className.startsWith("String_Node_Str") || className.startsWith("String_Node_Str") || classPathUrl.toString().contains("String_Node_Str")) {
        return false;
      }
      return hadoopClassExcluder.accept(className,classUrl,classPathUrl);
    }
  }
);
  appBundler.createBundle(tempLocation,SparkMainWrapper.class,HBaseTableUtilFactory.getHBaseTableUtilClass());
  return new File(tempLocation.toURI());
}

Fixed version (ground truth):
/** 
 * Packages all the dependencies of the Spark job. It contains all CDAP classes that are needed to run the user spark program.
 * @param targetDir directory for the file to be created in
 * @return {@link File} of the dependency jar in the given target directory
 * @throws IOException if failed to package the jar
 */
private File buildDependencyJar(File targetDir) throws IOException {
  Location tempLocation=new LocalLocationFactory(targetDir).create(CDAP_SPARK_JAR);
  final HadoopClassExcluder hadoopClassExcluder=new HadoopClassExcluder();
  ApplicationBundler appBundler=new ApplicationBundler(new ClassAcceptor(){
    @Override public boolean accept(    String className,    URL classUrl,    URL classPathUrl){
      if (className.startsWith("String_Node_Str") || className.startsWith("String_Node_Str") || classPathUrl.toString().contains("String_Node_Str")) {
        return false;
      }
      return hadoopClassExcluder.accept(className,classUrl,classPathUrl);
    }
  }
);
  List<Class<?>> classes=new ArrayList<>();
  classes.add(SparkMainWrapper.class);
  classes.add(HBaseTableUtilFactory.getHBaseTableUtilClass());
  if (SecureStoreUtils.isKMSBacked(cConf) && SecureStoreUtils.isKMSCapable()) {
    classes.add(SecureStoreUtils.getKMSSecureStore());
  }
  appBundler.createBundle(tempLocation,classes);
  return new File(tempLocation.toURI());
}
Program: 5779
Project: 5779
Buggy source:
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
private void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}

Fixed version (ground truth):
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
@VisibleForTesting void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}
Program: 5780
Project: 5780
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5781
Project: 5781
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5782
Project: 5782
Buggy source:
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
private void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}

Fixed version (ground truth):
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
@VisibleForTesting void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}
Program: 5783
Project: 5783
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5784
Project: 5784
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5785
Project: 5785
Buggy source:
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,NamespaceQueryAdmin namespaceQueryAdmin,Store store){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.namespaceQueryAdmin=namespaceQueryAdmin;
  this.store=store;
}

Fixed version (ground truth):
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,NamespaceQueryAdmin namespaceQueryAdmin,Store store,Impersonator impersonator){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.namespaceQueryAdmin=namespaceQueryAdmin;
  this.store=store;
  this.impersonator=impersonator;
}
Program: 5786
Project: 5786
Buggy source:
public void scanAllQueues() throws Exception {
  QueueStatistics totalStats=new QueueStatistics();
  List<NamespaceMeta> namespaceMetas=namespaceQueryAdmin.list();
  for (  NamespaceMeta namespaceMeta : namespaceMetas) {
    Id.Namespace namespaceId=Id.Namespace.from(namespaceMeta.getName());
    Collection<ApplicationSpecification> apps=store.getAllApplications(namespaceId);
    for (    ApplicationSpecification app : apps) {
      Id.Application appId=Id.Application.from(namespaceId,app.getName());
      for (      FlowSpecification flow : app.getFlows().values()) {
        Id.Flow flowId=Id.Flow.from(appId,flow.getName());
        SimpleQueueSpecificationGenerator queueSpecGenerator=new SimpleQueueSpecificationGenerator(flowId.getApplication());
        Table<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> table=queueSpecGenerator.create(flow);
        for (        Table.Cell<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> cell : table.cellSet()) {
          if (cell.getRowKey().getType() == FlowletConnection.Type.FLOWLET) {
            for (            QueueSpecification queue : cell.getValue()) {
              QueueStatistics queueStats=scanQueue(queue.getQueueName(),null);
              totalStats.add(queueStats);
            }
          }
        }
      }
    }
  }
  System.out.printf("String_Node_Str",totalStats.getReport(showTxTimestampOnly()));
}

Fixed version (ground truth):
public void scanAllQueues() throws Exception {
  final QueueStatistics totalStats=new QueueStatistics();
  List<NamespaceMeta> namespaceMetas=namespaceQueryAdmin.list();
  for (  NamespaceMeta namespaceMeta : namespaceMetas) {
    final Id.Namespace namespaceId=Id.Namespace.from(namespaceMeta.getName());
    final Collection<ApplicationSpecification> apps=store.getAllApplications(namespaceId);
    impersonator.doAs(namespaceMeta,new Callable<Void>(){
      @Override public Void call() throws Exception {
        for (        ApplicationSpecification app : apps) {
          Id.Application appId=Id.Application.from(namespaceId,app.getName());
          for (          FlowSpecification flow : app.getFlows().values()) {
            Id.Flow flowId=Id.Flow.from(appId,flow.getName());
            SimpleQueueSpecificationGenerator queueSpecGenerator=new SimpleQueueSpecificationGenerator(flowId.getApplication());
            Table<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> table=queueSpecGenerator.create(flow);
            for (            Table.Cell<QueueSpecificationGenerator.Node,String,Set<QueueSpecification>> cell : table.cellSet()) {
              if (cell.getRowKey().getType() == FlowletConnection.Type.FLOWLET) {
                for (                QueueSpecification queue : cell.getValue()) {
                  QueueStatistics queueStats=scanQueue(queue.getQueueName(),null);
                  totalStats.add(queueStats);
                }
              }
            }
          }
        }
        return null;
      }
    }
);
  }
  System.out.printf("String_Node_Str",totalStats.getReport(showTxTimestampOnly()));
}
Program: 5788
Project: 5788
Buggy source:
public UpgradeTool() throws Exception {
  this.cConf=CConfiguration.create();
  this.hConf=HBaseConfiguration.create();
  Injector injector=createInjector();
  this.txService=injector.getInstance(TransactionService.class);
  this.zkClientService=injector.getInstance(ZKClientService.class);
  this.dsFramework=injector.getInstance(DatasetFramework.class);
  this.metadataStore=injector.getInstance(MetadataStore.class);
  this.streamStateStoreUpgrader=injector.getInstance(StreamStateStoreUpgrader.class);
  this.dsUpgrade=injector.getInstance(DatasetUpgrader.class);
  this.dsSpecUpgrader=injector.getInstance(DatasetSpecificationUpgrader.class);
  this.queueAdmin=injector.getInstance(QueueAdmin.class);
  this.nsStore=injector.getInstance(NamespaceStore.class);
  this.authorizationService=injector.getInstance(AuthorizationEnforcementService.class);
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      try {
        UpgradeTool.this.stop();
      }
 catch (      Throwable e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
  this.existingEntitySystemMetadataWriter=injector.getInstance(ExistingEntitySystemMetadataWriter.class);
  this.upgradeDatasetServiceManager=injector.getInstance(UpgradeDatasetServiceManager.class);
}

Fixed version (ground truth):
public UpgradeTool() throws Exception {
  this.cConf=CConfiguration.create();
  SecurityUtil.loginForMasterService(cConf);
  this.hConf=HBaseConfiguration.create();
  Injector injector=createInjector();
  this.txService=injector.getInstance(TransactionService.class);
  this.zkClientService=injector.getInstance(ZKClientService.class);
  this.dsFramework=injector.getInstance(DatasetFramework.class);
  this.metadataStore=injector.getInstance(MetadataStore.class);
  this.streamStateStoreUpgrader=injector.getInstance(StreamStateStoreUpgrader.class);
  this.dsUpgrade=injector.getInstance(DatasetUpgrader.class);
  this.dsSpecUpgrader=injector.getInstance(DatasetSpecificationUpgrader.class);
  this.queueAdmin=injector.getInstance(QueueAdmin.class);
  this.nsStore=injector.getInstance(NamespaceStore.class);
  this.authorizationService=injector.getInstance(AuthorizationEnforcementService.class);
  Runtime.getRuntime().addShutdownHook(new Thread(){
    @Override public void run(){
      try {
        UpgradeTool.this.stop();
      }
 catch (      Throwable e) {
        LOG.error("String_Node_Str",e);
      }
    }
  }
);
  this.existingEntitySystemMetadataWriter=injector.getInstance(ExistingEntitySystemMetadataWriter.class);
  this.upgradeDatasetServiceManager=injector.getInstance(UpgradeDatasetServiceManager.class);
}
Program: 5789
Project: 5789
Buggy source:
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
private void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}

Fixed version (ground truth):
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
@VisibleForTesting void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}
Program: 5790
Project: 5790
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5791
Project: 5791
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5792
Project: 5792
Buggy source:
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
private void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}

Fixed version (ground truth):
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
@VisibleForTesting void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}
Program: 5793
Project: 5793
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5794
Project: 5794
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5795
Project: 5795
Buggy source:
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,NamespaceQueryAdmin namespaceQueryAdmin,Store store,Impersonator impersonator){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.namespaceQueryAdmin=namespaceQueryAdmin;
  this.store=store;
  this.impersonator=impersonator;
}

Fixed version (ground truth):
@Inject public HBaseQueueDebugger(HBaseTableUtil tableUtil,HBaseQueueAdmin queueAdmin,HBaseQueueClientFactory queueClientFactory,ZKClientService zkClientService,TransactionExecutorFactory txExecutorFactory,NamespaceQueryAdmin namespaceQueryAdmin,Store store,Impersonator impersonator,AuthorizationEnforcementService authorizationEnforcementService){
  this.tableUtil=tableUtil;
  this.queueAdmin=queueAdmin;
  this.queueClientFactory=queueClientFactory;
  this.zkClientService=zkClientService;
  this.txExecutorFactory=txExecutorFactory;
  this.namespaceQueryAdmin=namespaceQueryAdmin;
  this.store=store;
  this.impersonator=impersonator;
  this.authorizationEnforcementService=authorizationEnforcementService;
}
Program: 5796
Project: 5796
Buggy source:
@Override protected void shutDown() throws Exception {
  zkClientService.stopAndWait();
}

Fixed version (ground truth):
@Override protected void shutDown() throws Exception {
  authorizationEnforcementService.stopAndWait();
  zkClientService.stopAndWait();
}
Program: 5797
Project: 5797
Buggy source:
@Override protected void startUp() throws Exception {
  zkClientService.startAndWait();
}

Fixed version (ground truth):
@Override protected void startUp() throws Exception {
  zkClientService.startAndWait();
  authorizationEnforcementService.startAndWait();
}
Program: 5799
Project: 5799
Buggy source:
/** 
 * Packages all the dependencies of the Spark job. It contains all CDAP classes that are needed to run the user spark program.
 * @param targetDir directory for the file to be created in
 * @return {@link File} of the dependency jar in the given target directory
 * @throws IOException if failed to package the jar
 */
private File buildDependencyJar(File targetDir) throws IOException {
  Location tempLocation=new LocalLocationFactory(targetDir).create(CDAP_SPARK_JAR);
  final HadoopClassExcluder hadoopClassExcluder=new HadoopClassExcluder();
  ApplicationBundler appBundler=new ApplicationBundler(new ClassAcceptor(){
    @Override public boolean accept(    String className,    URL classUrl,    URL classPathUrl){
      if (className.startsWith("String_Node_Str") || className.startsWith("String_Node_Str") || classPathUrl.toString().contains("String_Node_Str")) {
        return false;
      }
      return hadoopClassExcluder.accept(className,classUrl,classPathUrl);
    }
  }
);
  appBundler.createBundle(tempLocation,SparkMainWrapper.class,HBaseTableUtilFactory.getHBaseTableUtilClass());
  return new File(tempLocation.toURI());
}

Fixed version (ground truth):
/** 
 * Packages all the dependencies of the Spark job. It contains all CDAP classes that are needed to run the user spark program.
 * @param targetDir directory for the file to be created in
 * @return {@link File} of the dependency jar in the given target directory
 * @throws IOException if failed to package the jar
 */
private File buildDependencyJar(File targetDir) throws IOException {
  Location tempLocation=new LocalLocationFactory(targetDir).create(CDAP_SPARK_JAR);
  final HadoopClassExcluder hadoopClassExcluder=new HadoopClassExcluder();
  ApplicationBundler appBundler=new ApplicationBundler(new ClassAcceptor(){
    @Override public boolean accept(    String className,    URL classUrl,    URL classPathUrl){
      if (className.startsWith("String_Node_Str") || className.startsWith("String_Node_Str") || classPathUrl.toString().contains("String_Node_Str")) {
        return false;
      }
      return hadoopClassExcluder.accept(className,classUrl,classPathUrl);
    }
  }
);
  List<Class<?>> classes=new ArrayList<>();
  classes.add(SparkMainWrapper.class);
  classes.add(HBaseTableUtilFactory.getHBaseTableUtilClass());
  if (SecureStoreUtils.isKMSBacked(cConf) && SecureStoreUtils.isKMSCapable()) {
    classes.add(SecureStoreUtils.getKMSSecureStore());
  }
  appBundler.createBundle(tempLocation,classes);
  return new File(tempLocation.toURI());
}
Program: 5800
Project: 5800
Buggy source:
@Override public void run(){
  if (outboundChannel.equals(inboundChannel.getAttachment())) {
    closeOnFlush(inboundChannel);
  }
}

Fixed version (ground truth):
@Override public void run(){
  if (e.getChannel().isWritable()) {
    LOG.trace("String_Node_Str");
    outboundChannel.setReadable(true);
  }
 else {
    LOG.trace("String_Node_Str");
    outboundChannel.setReadable(false);
  }
}
Program: 5802
Project: 5802
Buggy source:
@Override public void getLog(LoggingContext loggingContext,long fromTimeMs,long toTimeMs,Filter filter,Callback callback){
  long fromOffset=getOffset(fromTimeMs / 1000);
  long toOffset=getOffset(toTimeMs / 1000);
  getLogNext(loggingContext,new ReadRange(fromTimeMs,toTimeMs,fromOffset),(int)(toOffset - fromOffset),filter,callback);
}

Fixed version (ground truth):
@Override public CloseableIterator<LogEvent> getLog(LoggingContext loggingContext,long fromTimeMs,long toTimeMs,Filter filter){
  CollectingCallback collectingCallback=new CollectingCallback();
  long fromOffset=getOffset(fromTimeMs / 1000);
  long toOffset=getOffset(toTimeMs / 1000);
  getLogNext(loggingContext,new ReadRange(fromTimeMs,toTimeMs,fromOffset),(int)(toOffset - fromOffset),filter,collectingCallback);
  final Iterator<LogEvent> iterator=collectingCallback.getLogEvents().iterator();
  return new CloseableIterator<LogEvent>(){
    @Override public boolean hasNext(){
      return iterator.hasNext();
    }
    @Override public LogEvent next(){
      return iterator.next();
    }
    @Override public void remove(){
      iterator.remove();
    }
    @Override public void close(){
    }
  }
;
}
Program: 5803
Project: 5803
Buggy source:
@Test public void testRouterAsync() throws Exception {
  int numElements=123;
  AsyncHttpClientConfig.Builder configBuilder=new AsyncHttpClientConfig.Builder();
  final AsyncHttpClient asyncHttpClient=new AsyncHttpClient(new NettyAsyncHttpProvider(configBuilder.build()),configBuilder.build());
  final CountDownLatch latch=new CountDownLatch(numElements);
  final AtomicInteger numSuccessfulRequests=new AtomicInteger(0);
  for (int i=0; i < numElements; ++i) {
    final int elem=i;
    final Request request=new RequestBuilder("String_Node_Str").setUrl(resolveURI(DEFAULT_SERVICE,String.format("String_Node_Str","String_Node_Str","String_Node_Str",i))).build();
    asyncHttpClient.executeRequest(request,new AsyncCompletionHandler<Void>(){
      @Override public Void onCompleted(      Response response) throws Exception {
        latch.countDown();
        Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusCode());
        numSuccessfulRequests.incrementAndGet();
        return null;
      }
      @Override public void onThrowable(      Throwable t){
        LOG.error("String_Node_Str",elem,t);
        latch.countDown();
      }
    }
);
    TimeUnit.MILLISECONDS.sleep(1);
  }
  latch.await();
  asyncHttpClient.close();
  Assert.assertEquals(numElements,numSuccessfulRequests.get());
  Assert.assertTrue(numElements == (defaultServer1.getNumRequests() + defaultServer2.getNumRequests()));
}

Fixed version (ground truth):
@Test public void testRouterAsync() throws Exception {
  int numElements=123;
  AsyncHttpClientConfig.Builder configBuilder=new AsyncHttpClientConfig.Builder();
  final AsyncHttpClient asyncHttpClient=new AsyncHttpClient(new NettyAsyncHttpProvider(configBuilder.build()),configBuilder.build());
  final CountDownLatch latch=new CountDownLatch(numElements);
  final AtomicInteger numSuccessfulRequests=new AtomicInteger(0);
  for (int i=0; i < numElements; ++i) {
    final int elem=i;
    final Request request=new RequestBuilder("String_Node_Str").setUrl(resolveURI(DEFAULT_SERVICE,String.format("String_Node_Str","String_Node_Str","String_Node_Str",i))).build();
    asyncHttpClient.executeRequest(request,new AsyncCompletionHandler<Void>(){
      @Override public Void onCompleted(      Response response) throws Exception {
        latch.countDown();
        Assert.assertEquals(HttpResponseStatus.OK.getCode(),response.getStatusCode());
        String responseBody=response.getResponseBody();
        LOG.trace("String_Node_Str",responseBody);
        Assert.assertEquals("String_Node_Str" + elem,responseBody);
        numSuccessfulRequests.incrementAndGet();
        return null;
      }
      @Override public void onThrowable(      Throwable t){
        LOG.error("String_Node_Str",elem,t);
        latch.countDown();
      }
    }
);
    TimeUnit.MILLISECONDS.sleep(1);
  }
  latch.await();
  asyncHttpClient.close();
  Assert.assertEquals(numElements,numSuccessfulRequests.get());
  Assert.assertTrue(numElements == (defaultServer1.getNumRequests() + defaultServer2.getNumRequests()));
}
Program: 5804
Project: 5804
Buggy source:
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
private void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}

Fixed version (ground truth):
/** 
 * Serialize the   {@link ApplicationSpecification} to the configuration.
 */
@VisibleForTesting void setApplicationSpecification(ApplicationSpecification spec){
  hConf.set(HCONF_ATTR_APP_SPEC,GSON.toJson(spec,ApplicationSpecification.class));
}
Program: 5805
Project: 5805
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5806
Project: 5806
Buggy source:
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.get(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}

Fixed version (ground truth):
/** 
 * @return the {@link ApplicationSpecification} stored in the configuration.
 */
public ApplicationSpecification getApplicationSpecification(){
  return GSON.fromJson(hConf.getRaw(HCONF_ATTR_APP_SPEC),ApplicationSpecification.class);
}
Program: 5807
Project: 5807
Buggy source:
/** 
 * Gets a TableId for stream consumer state stores within a given namespace.
 * @param namespace the namespace for which the table is for.
 * @return constructed TableId
 */
public static TableId getStateStoreTableId(Id.Namespace namespace){
  String tableName=String.format("String_Node_Str",Id.Namespace.SYSTEM.getId(),QueueConstants.QueueType.STREAM.toString());
  return TableId.from(namespace.getId(),tableName);
}

Fixed version (ground truth):
/** 
 * Gets a TableId for stream consumer state stores within a given namespace.
 * @param namespace the namespace for which the table is for.
 * @return constructed TableId. Note that the namespace in the returned TableId is the CDAP namespace (CDAP-7344).
 */
public static TableId getStateStoreTableId(Id.Namespace namespace){
  String tableName=String.format("String_Node_Str",Id.Namespace.SYSTEM.getId(),QueueConstants.QueueType.STREAM.toString());
  return TableId.from(namespace.getId(),tableName);
}
Program: 5808
Project: 5808
Buggy source:
/** 
 * Lists all tables in the specified namespace
 * @param admin the {@link HBaseAdmin} to use to communicate with HBase
 * @param namespaceId namespace for which the tables are being requested
 */
public abstract List<TableId> listTablesInNamespace(HBaseAdmin admin,String namespaceId) throws IOException ;

Fixed version (ground truth):
/** 
 * Lists all tables in the specified namespace
 * @param admin the {@link HBaseAdmin} to use to communicate with HBase
 * @param namespaceId HBase namespace for which the tables are being requested
 */
public abstract List<TableId> listTablesInNamespace(HBaseAdmin admin,String namespaceId) throws IOException ;
Program: 5809
Project: 5809
Buggy source:
/** 
 * Gets the system configuration table prefix.
 * @param prefix Prefix string
 * @return System configuration table prefix (full table name minus the table qualifier).Example input: "cdap_ns.table.name"  -->  output: "cdap_system."   (hbase 94) Example input: "cdap.table.name"     -->  output: "cdap_system."   (hbase 94. input table is in default namespace) Example input: "cdap_ns:table.name"  -->  output: "cdap_system:"   (hbase 96, 98)
 */
public String getSysConfigTablePrefix(String prefix){
  return prefix + "String_Node_Str" + NamespaceId.SYSTEM.getNamespace()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Gets the system configuration table prefix.
 * @param prefix Prefix string
 * @return System configuration table prefix (full table name minus the table qualifier).Example input: "cdap.table.name"     -->  output: "cdap_system."   (input table is in default namespace) Example input: "cdap_ns:table.name"  -->  output: "cdap_system:"   (input table is in a custom namespace)
 */
public String getSysConfigTablePrefix(String prefix){
  return prefix + "String_Node_Str" + NamespaceId.SYSTEM.getNamespace()+ "String_Node_Str";
}
Program: 5812
Project: 5812
Buggy source:
@Override public TableId apply(NamespaceMeta input){
  return StreamUtils.getStateStoreTableId(Id.Namespace.from(input.getName()));
}

Fixed version (ground truth):
@Override public TableId apply(NamespaceMeta input){
  try {
    TableId tableId=StreamUtils.getStateStoreTableId(input.getNamespaceId().toId());
    return tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()),tableId.getTableName());
  }
 catch (  IOException e) {
    throw Throwables.propagate(e);
  }
}
Program: 5813
Project: 5813
Buggy source:
@Override protected Iterable<TableId> getTableIds() throws Exception {
  return Lists.transform(namespaceQueryAdmin.list(),new Function<NamespaceMeta,TableId>(){
    @Override public TableId apply(    NamespaceMeta input){
      return StreamUtils.getStateStoreTableId(Id.Namespace.from(input.getName()));
    }
  }
);
}

Fixed version (ground truth):
@Override protected Iterable<TableId> getTableIds() throws Exception {
  return Lists.transform(namespaceQueryAdmin.list(),new Function<NamespaceMeta,TableId>(){
    @Override public TableId apply(    NamespaceMeta input){
      try {
        TableId tableId=StreamUtils.getStateStoreTableId(input.getNamespaceId().toId());
        return tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()),tableId.getTableName());
      }
 catch (      IOException e) {
        throw Throwables.propagate(e);
      }
    }
  }
);
}
Program: 5814
Project: 5814
Buggy source:
/** 
 * Gets a TableId for stream consumer state stores within a given namespace.
 * @param namespace the namespace for which the table is for.
 * @return constructed TableId
 */
public static TableId getStateStoreTableId(Id.Namespace namespace){
  String tableName=String.format("String_Node_Str",Id.Namespace.SYSTEM.getId(),QueueConstants.QueueType.STREAM.toString());
  return TableId.from(namespace.getId(),tableName);
}

Fixed version (ground truth):
/** 
 * Gets a TableId for stream consumer state stores within a given namespace.
 * @param namespace the namespace for which the table is for.
 * @return constructed TableId. Note that the namespace in the returned TableId is the CDAP namespace (CDAP-7344).
 */
public static TableId getStateStoreTableId(Id.Namespace namespace){
  String tableName=String.format("String_Node_Str",Id.Namespace.SYSTEM.getId(),QueueConstants.QueueType.STREAM.toString());
  return TableId.from(namespace.getId(),tableName);
}
Program: 5815
Project: 5815
Buggy source:
/** 
 * Lists all tables in the specified namespace
 * @param admin the {@link HBaseAdmin} to use to communicate with HBase
 * @param namespaceId namespace for which the tables are being requested
 */
public abstract List<TableId> listTablesInNamespace(HBaseAdmin admin,String namespaceId) throws IOException ;

Fixed version (ground truth):
/** 
 * Lists all tables in the specified namespace
 * @param admin the {@link HBaseAdmin} to use to communicate with HBase
 * @param namespaceId HBase namespace for which the tables are being requested
 */
public abstract List<TableId> listTablesInNamespace(HBaseAdmin admin,String namespaceId) throws IOException ;
Program: 5816
Project: 5816
Buggy source:
/** 
 * Gets the system configuration table prefix.
 * @param prefix Prefix string
 * @return System configuration table prefix (full table name minus the table qualifier).Example input: "cdap_ns.table.name"  -->  output: "cdap_system."   (hbase 94) Example input: "cdap.table.name"     -->  output: "cdap_system."   (hbase 94. input table is in default namespace) Example input: "cdap_ns:table.name"  -->  output: "cdap_system:"   (hbase 96, 98)
 */
public String getSysConfigTablePrefix(String prefix){
  return prefix + "String_Node_Str" + NamespaceId.SYSTEM.getNamespace()+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Gets the system configuration table prefix.
 * @param prefix Prefix string
 * @return System configuration table prefix (full table name minus the table qualifier).Example input: "cdap.table.name"     -->  output: "cdap_system."   (input table is in default namespace) Example input: "cdap_ns:table.name"  -->  output: "cdap_system:"   (input table is in a custom namespace)
 */
public String getSysConfigTablePrefix(String prefix){
  return prefix + "String_Node_Str" + NamespaceId.SYSTEM.getNamespace()+ "String_Node_Str";
}
Program: 5819
Project: 5819
Buggy source:
@Override public TableId apply(NamespaceMeta input){
  return StreamUtils.getStateStoreTableId(Id.Namespace.from(input.getName()));
}

Fixed version (ground truth):
@Override public TableId apply(NamespaceMeta input){
  try {
    TableId tableId=StreamUtils.getStateStoreTableId(input.getNamespaceId().toId());
    return tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()),tableId.getTableName());
  }
 catch (  IOException e) {
    throw Throwables.propagate(e);
  }
}
Program: 5820
Project: 5820
Buggy source:
@Override protected Iterable<TableId> getTableIds() throws Exception {
  return Lists.transform(namespaceQueryAdmin.list(),new Function<NamespaceMeta,TableId>(){
    @Override public TableId apply(    NamespaceMeta input){
      return StreamUtils.getStateStoreTableId(Id.Namespace.from(input.getName()));
    }
  }
);
}

Fixed version (ground truth):
@Override protected Iterable<TableId> getTableIds() throws Exception {
  return Lists.transform(namespaceQueryAdmin.list(),new Function<NamespaceMeta,TableId>(){
    @Override public TableId apply(    NamespaceMeta input){
      try {
        TableId tableId=StreamUtils.getStateStoreTableId(input.getNamespaceId().toId());
        return tableUtil.createHTableId(new NamespaceId(tableId.getNamespace()),tableId.getTableName());
      }
 catch (      IOException e) {
        throw Throwables.propagate(e);
      }
    }
  }
);
}
Program: 5821
Project: 5821
Buggy source:
@Override public void run(DatasetContext context) throws Exception {
  BatchPhaseSpec phaseSpec=GSON.fromJson(sec.getSpecification().getProperty(Constants.PIPELINEID),BatchPhaseSpec.class);
  try (InputStream is=new FileInputStream(sec.getLocalizationContext().getLocalFile("String_Node_Str"))){
    sourceFactory=SparkBatchSourceFactory.deserialize(is);
    sinkFactory=SparkBatchSinkFactory.deserialize(is);
    DataInputStream dataInputStream=new DataInputStream(is);
    stagePartitions=GSON.fromJson(dataInputStream.readUTF(),MAP_TYPE);
  }
   datasetContext=context;
  runPipeline(phaseSpec.getPhase(),BatchSource.PLUGIN_TYPE,sec,stagePartitions);
}

Fixed version (ground truth):
@Override public void run(DatasetContext context) throws Exception {
  BatchPhaseSpec phaseSpec=GSON.fromJson(sec.getSpecification().getProperty(Constants.PIPELINEID),BatchPhaseSpec.class);
  Path configFile=sec.getLocalizationContext().getLocalFile("String_Node_Str").toPath();
  try (BufferedReader reader=Files.newBufferedReader(configFile,StandardCharsets.UTF_8)){
    String object=reader.readLine();
    SparkBatchSourceSinkFactoryInfo sourceSinkInfo=GSON.fromJson(object,SparkBatchSourceSinkFactoryInfo.class);
    sourceFactory=sourceSinkInfo.getSparkBatchSourceFactory();
    sinkFactory=sourceSinkInfo.getSparkBatchSinkFactory();
    stagePartitions=sourceSinkInfo.getStagePartitions();
  }
   datasetContext=context;
  runPipeline(phaseSpec.getPhase(),BatchSource.PLUGIN_TYPE,sec,stagePartitions);
}
Program: 5823
Project: 5823
Buggy source:
/** 
 * Unregisters all usage information of an application.
 * @param applicationId application
 */
@Override public void unregister(final Id.Application applicationId){
  execute(new TransactionExecutor.Procedure<UsageDataset>(){
    @Override public void apply(    UsageDataset usageDataset) throws Exception {
      usageDataset.unregister(applicationId);
    }
  }
);
  for (  DatasetUsageKey key : usageCache.asMap().keySet()) {
    if (applicationId.equals(key.getOwner().getApplication())) {
      usageCache.invalidate(key);
    }
  }
}

Fixed version (ground truth):
/** 
 * Unregisters all usage information of an application.
 * @param applicationId application
 */
@Override public void unregister(final Id.Application applicationId){
  execute(new TransactionExecutor.Procedure<UsageDataset>(){
    @Override public void apply(    UsageDataset usageDataset) throws Exception {
      usageDataset.unregister(applicationId);
    }
  }
);
}
Program: 5824
Project: 5824
Buggy source:
@Inject public DefaultUsageRegistry(TransactionExecutorFactory executorFactory,DatasetFramework datasetFramework){
  this.executorFactory=executorFactory;
  this.datasetFramework=datasetFramework;
  this.usageCache=CacheBuilder.newBuilder().maximumSize(1024).build(new CacheLoader<DatasetUsageKey,Boolean>(){
    @Override public Boolean load(    DatasetUsageKey key) throws Exception {
      doRegister(key.getOwner(),key.getDataset());
      return true;
    }
  }
);
}

Fixed version (ground truth):
@Inject DefaultUsageRegistry(TransactionExecutorFactory executorFactory,DatasetFramework datasetFramework){
  this.executorFactory=executorFactory;
  this.datasetFramework=datasetFramework;
}
Program: 5826
Project: 5826
Buggy source:
private ResolvingDiscoverable(Discoverable discoverable){
  super(discoverable.getName(),discoverable.getSocketAddress());
}

Fixed version (ground truth):
private ResolvingDiscoverable(Discoverable discoverable){
  super(discoverable.getName(),discoverable.getSocketAddress(),discoverable.getPayload());
}
Program: 5827
Project: 5827
Buggy source:
@Override public JsonElement serialize(Discoverable src,Type typeOfSrc,JsonSerializationContext context){
  JsonObject jsonObj=new JsonObject();
  jsonObj.addProperty("String_Node_Str",src.getName());
  jsonObj.addProperty("String_Node_Str",src.getSocketAddress().getHostName());
  jsonObj.addProperty("String_Node_Str",src.getSocketAddress().getPort());
  return jsonObj;
}

Fixed version (ground truth):
@Override public JsonElement serialize(Discoverable src,Type typeOfSrc,JsonSerializationContext context){
  JsonObject jsonObj=new JsonObject();
  jsonObj.addProperty("String_Node_Str",src.getName());
  jsonObj.addProperty("String_Node_Str",src.getSocketAddress().getHostName());
  jsonObj.addProperty("String_Node_Str",src.getSocketAddress().getPort());
  jsonObj.add("String_Node_Str",context.serialize(src.getPayload()));
  return jsonObj;
}
Program: 5828
Project: 5828
Buggy source:
@Override public Discoverable deserialize(JsonElement json,Type typeOfT,JsonDeserializationContext context) throws JsonParseException {
  JsonObject jsonObj=json.getAsJsonObject();
  String service=jsonObj.get("String_Node_Str").getAsString();
  String hostname=jsonObj.get("String_Node_Str").getAsString();
  int port=jsonObj.get("String_Node_Str").getAsInt();
  InetSocketAddress address=new InetSocketAddress(hostname,port);
  return new Discoverable(service,address);
}

Fixed version (ground truth):
@Override public Discoverable deserialize(JsonElement json,Type typeOfT,JsonDeserializationContext context) throws JsonParseException {
  JsonObject jsonObj=json.getAsJsonObject();
  String service=jsonObj.get("String_Node_Str").getAsString();
  String hostname=jsonObj.get("String_Node_Str").getAsString();
  int port=jsonObj.get("String_Node_Str").getAsInt();
  InetSocketAddress address=new InetSocketAddress(hostname,port);
  byte[] payload=context.deserialize(jsonObj.get("String_Node_Str"),BYTE_ARRAY_TYPE);
  return new Discoverable(service,address,payload);
}
Program: 5829
Project: 5829
Buggy source:
@Override public boolean accept(String className,URL classUrl,URL classPathUrl){
  String resourceName=className.replace('.','/') + "String_Node_Str";
  if (visibleResources.contains(resourceName)) {
    return false;
  }
  if (resourceName.startsWith("String_Node_Str")) {
    return true;
  }
  try {
    getClass().getClassLoader().loadClass("String_Node_Str");
    return !SparkRuntimeUtils.SPARK_PROGRAM_CLASS_LOADER_FILTER.acceptResource(resourceName);
  }
 catch (  ClassNotFoundException e) {
    LOG.warn("String_Node_Str",e);
    return true;
  }
}

Fixed version (ground truth):
@Override public boolean accept(String className,URL classUrl,URL classPathUrl){
  String resourceName=className.replace('.','/') + "String_Node_Str";
  if (visibleResources.contains(resourceName)) {
    return false;
  }
  if (resourceName.startsWith("String_Node_Str")) {
    return true;
  }
  try {
    getClass().getClassLoader().loadClass("String_Node_Str");
    return !SparkRuntimeUtils.SPARK_PROGRAM_CLASS_LOADER_FILTER.acceptResource(resourceName);
  }
 catch (  ClassNotFoundException e) {
    if (logWarnOnce.compareAndSet(false,true)) {
      LOG.warn("String_Node_Str");
    }
    return true;
  }
}
Program: 5830
Project: 5830
Buggy source:
@Override public boolean accept(String className,URL classUrl,URL classPathUrl){
  String resourceName=className.replace('.','/') + "String_Node_Str";
  if (visibleResources.contains(resourceName)) {
    return false;
  }
  if (resourceName.startsWith("String_Node_Str")) {
    return true;
  }
  return !SparkRuntimeUtils.SPARK_PROGRAM_CLASS_LOADER_FILTER.acceptResource(resourceName);
}

Fixed version (ground truth):
@Override public boolean accept(String className,URL classUrl,URL classPathUrl){
  String resourceName=className.replace('.','/') + "String_Node_Str";
  if (visibleResources.contains(resourceName)) {
    return false;
  }
  if (resourceName.startsWith("String_Node_Str")) {
    return true;
  }
  try {
    getClass().getClassLoader().loadClass("String_Node_Str");
    return !SparkRuntimeUtils.SPARK_PROGRAM_CLASS_LOADER_FILTER.acceptResource(resourceName);
  }
 catch (  ClassNotFoundException e) {
    LOG.warn("String_Node_Str",e);
    return true;
  }
}