nus-yam/ex-repair huggingface dataset:
Program: 85088
Project: 85088
Buggy source:
/** 
 * Create new connection
 */
private ExchangeClient initClient(URL url){
  String str=url.getParameter(Constants.CLIENT_KEY,url.getParameter(Constants.SERVER_KEY,Constants.DEFAULT_REMOTING_CLIENT));
  String version=url.getParameter(Constants.DUBBO_VERSION_KEY);
  boolean compatible=(version != null && version.startsWith("String_Node_Str"));
  url=url.addParameter(Constants.CODEC_KEY,DubboCodec.NAME);
  url=url.addParameterIfAbsent(Constants.HEARTBEAT_KEY,String.valueOf(Constants.DEFAULT_HEARTBEAT));
  if (str != null && str.length() > 0 && !ExtensionLoader.getExtensionLoader(Transporter.class).hasExtension(str)) {
    throw new RpcException("String_Node_Str" + str + "String_Node_Str"+ "String_Node_Str"+ StringUtils.join(ExtensionLoader.getExtensionLoader(Transporter.class).getSupportedExtensions(),"String_Node_Str"));
  }
  ExchangeClient client;
  try {
    if (url.getParameter(Constants.LAZY_CONNECT_KEY,false)) {
      client=new LazyConnectExchangeClient(url,requestHandler);
    }
 else {
      client=Exchangers.connect(url,requestHandler);
    }
  }
 catch (  RemotingException e) {
    throw new RpcException("String_Node_Str" + url + "String_Node_Str"+ e.getMessage(),e);
  }
  return client;
}

Fixed version (ground truth):
/** 
 * Create new connection
 */
private ExchangeClient initClient(URL url){
  String str=url.getParameter(Constants.CLIENT_KEY,url.getParameter(Constants.SERVER_KEY,Constants.DEFAULT_REMOTING_CLIENT));
  url=url.addParameter(Constants.CODEC_KEY,DubboCodec.NAME);
  url=url.addParameterIfAbsent(Constants.HEARTBEAT_KEY,String.valueOf(Constants.DEFAULT_HEARTBEAT));
  if (str != null && str.length() > 0 && !ExtensionLoader.getExtensionLoader(Transporter.class).hasExtension(str)) {
    throw new RpcException("String_Node_Str" + str + "String_Node_Str"+ "String_Node_Str"+ StringUtils.join(ExtensionLoader.getExtensionLoader(Transporter.class).getSupportedExtensions(),"String_Node_Str"));
  }
  ExchangeClient client;
  try {
    if (url.getParameter(Constants.LAZY_CONNECT_KEY,false)) {
      client=new LazyConnectExchangeClient(url,requestHandler);
    }
 else {
      client=Exchangers.connect(url,requestHandler);
    }
  }
 catch (  RemotingException e) {
    throw new RpcException("String_Node_Str" + url + "String_Node_Str"+ e.getMessage(),e);
  }
  return client;
}
Program: 85089
Project: 85089
Buggy source:
@SuppressWarnings("String_Node_Str") protected <T>T doRefer(final Class<T> serviceType,final URL url) throws RpcException {
  final RmiProxyFactoryBean rmiProxyFactoryBean=new RmiProxyFactoryBean();
  rmiProxyFactoryBean.setRemoteInvocationFactory(new RemoteInvocationFactory(){
    public RemoteInvocation createRemoteInvocation(    MethodInvocation methodInvocation){
      return new RmiRemoteInvocation(methodInvocation);
    }
  }
);
  rmiProxyFactoryBean.setServiceUrl(url.toIdentityString());
  rmiProxyFactoryBean.setServiceInterface(serviceType);
  rmiProxyFactoryBean.setCacheStub(true);
  rmiProxyFactoryBean.setLookupStubOnStartup(true);
  rmiProxyFactoryBean.setRefreshStubOnConnectFailure(true);
  rmiProxyFactoryBean.afterPropertiesSet();
  return (T)rmiProxyFactoryBean.getObject();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") protected <T>T doRefer(final Class<T> serviceType,final URL url) throws RpcException {
  final RmiProxyFactoryBean rmiProxyFactoryBean=new RmiProxyFactoryBean();
  if (url.getParameter(Constants.DUBBO_VERSION_KEY,Version.getVersion()).equals(Version.getVersion())) {
    rmiProxyFactoryBean.setRemoteInvocationFactory(new RemoteInvocationFactory(){
      public RemoteInvocation createRemoteInvocation(      MethodInvocation methodInvocation){
        return new RmiRemoteInvocation(methodInvocation);
      }
    }
);
  }
  rmiProxyFactoryBean.setServiceUrl(url.toIdentityString());
  rmiProxyFactoryBean.setServiceInterface(serviceType);
  rmiProxyFactoryBean.setCacheStub(true);
  rmiProxyFactoryBean.setLookupStubOnStartup(true);
  rmiProxyFactoryBean.setRefreshStubOnConnectFailure(true);
  rmiProxyFactoryBean.afterPropertiesSet();
  return (T)rmiProxyFactoryBean.getObject();
}
Program: 85090
Project: 85090
Buggy source:
public void destroy(){
  super.destroy();
  for (  String key : new ArrayList<String>(serverMap.keySet())) {
    ExchangeServer server=serverMap.remove(key);
    if (server != null) {
      try {
        if (logger.isInfoEnabled()) {
          logger.info("String_Node_Str" + server.getLocalAddress());
        }
        server.close(getServerShutdownTimeout());
      }
 catch (      Throwable t) {
        logger.warn(t.getMessage(),t);
      }
    }
  }
}

Fixed version (ground truth):
public void destroy(){
  super.destroy();
  for (  String key : new ArrayList<String>(serverMap.keySet())) {
    ExchangeServer server=serverMap.remove(key);
    if (server != null) {
      try {
        if (logger.isInfoEnabled()) {
          logger.info("String_Node_Str" + server.getLocalAddress());
        }
        server.close(ConfigUtils.getServerShutdownTimeout());
      }
 catch (      Throwable t) {
        logger.warn(t.getMessage(),t);
      }
    }
  }
}
Program: 85091
Project: 85091
Buggy source:
private Set<String> resolvePackagesToScan(Set<String> packagesToScan){
  Set<String> resolvedPackagesToScan=new LinkedHashSet<String>(packagesToScan.size());
  for (  String packageToScan : packagesToScan) {
    String resolvedPackageToScan=environment.resolvePlaceholders(packageToScan);
    resolvedPackagesToScan.add(resolvedPackageToScan);
  }
  return resolvedPackagesToScan;
}

Fixed version (ground truth):
private Set<String> resolvePackagesToScan(Set<String> packagesToScan){
  Set<String> resolvedPackagesToScan=new LinkedHashSet<String>(packagesToScan.size());
  for (  String packageToScan : packagesToScan) {
    if (StringUtils.hasText(packageToScan)) {
      String resolvedPackageToScan=environment.resolvePlaceholders(packageToScan.trim());
      resolvedPackagesToScan.add(resolvedPackageToScan);
    }
  }
  return resolvedPackagesToScan;
}
Program: 85092
Project: 85092
Buggy source:
@Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
  Set<String> resolvedPackagesToScan=resolvePackagesToScan(packagesToScan);
  registerServiceBeans(resolvedPackagesToScan,registry);
}

Fixed version (ground truth):
@Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
  Set<String> resolvedPackagesToScan=resolvePackagesToScan(packagesToScan);
  if (!CollectionUtils.isEmpty(resolvedPackagesToScan)) {
    registerServiceBeans(resolvedPackagesToScan,registry);
  }
 else {
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str");
    }
  }
}
Program: 85093
Project: 85093
Buggy source:
/** 
 * Registers   {@link ServiceBean} from new annotated {@link Service} {@link BeanDefinition}
 * @param beanDefinitionHolder
 * @param registry
 * @see ServiceBean
 * @see BeanDefinition
 */
private void registerServiceBean(BeanDefinitionHolder beanDefinitionHolder,BeanDefinitionRegistry registry){
  Class<?> beanClass=resolveClass(beanDefinitionHolder);
  Service service=findAnnotation(beanClass,Service.class);
  Class<?> interfaceClass=resolveServiceInterfaceClass(beanClass,service);
  String beanName=beanDefinitionHolder.getBeanName();
  AbstractBeanDefinition serviceBeanDefinition=buildServiceBeanDefinition(service,interfaceClass,beanName);
  registerWithGeneratedName(serviceBeanDefinition,registry);
}

Fixed version (ground truth):
/** 
 * Registers   {@link ServiceBean} from new annotated {@link Service} {@link BeanDefinition}
 * @param beanDefinitionHolder
 * @param registry
 * @param scanner
 * @see ServiceBean
 * @see BeanDefinition
 */
private void registerServiceBean(BeanDefinitionHolder beanDefinitionHolder,BeanDefinitionRegistry registry,DubboClassPathBeanDefinitionScanner scanner){
  Class<?> beanClass=resolveClass(beanDefinitionHolder);
  Service service=findAnnotation(beanClass,Service.class);
  Class<?> interfaceClass=resolveServiceInterfaceClass(beanClass,service);
  String annotatedServiceBeanName=beanDefinitionHolder.getBeanName();
  AbstractBeanDefinition serviceBeanDefinition=buildServiceBeanDefinition(service,interfaceClass,annotatedServiceBeanName);
  String beanName=generateServiceBeanName(interfaceClass,annotatedServiceBeanName);
  if (scanner.checkCandidate(beanName,serviceBeanDefinition)) {
    registry.registerBeanDefinition(beanName,serviceBeanDefinition);
    if (logger.isInfoEnabled()) {
      logger.warn("String_Node_Str" + serviceBeanDefinition + "String_Node_Str"+ beanName);
    }
  }
 else {
    if (logger.isWarnEnabled()) {
      logger.warn("String_Node_Str" + serviceBeanDefinition + "String_Node_Str"+ beanName+ "String_Node_Str");
    }
  }
}
Program: 85094
Project: 85094
Buggy source:
/** 
 * Registers Beans whose classes was annotated   {@link Service}
 * @param packagesToScan The base packages to scan
 * @param registry       {@link BeanDefinitionRegistry}
 */
private void registerServiceBeans(Set<String> packagesToScan,BeanDefinitionRegistry registry){
  DubboClassPathBeanDefinitionScanner scanner=new DubboClassPathBeanDefinitionScanner(registry,environment,resourceLoader);
  BeanNameGenerator beanNameGenerator=resolveBeanNameGenerator(registry);
  scanner.setBeanNameGenerator(beanNameGenerator);
  scanner.addIncludeFilter(new AnnotationTypeFilter(Service.class));
  for (  String packageToScan : packagesToScan) {
    Set<BeanDefinitionHolder> beanDefinitionHolders=scanner.doScan(packageToScan);
    if (CollectionUtils.isEmpty(beanDefinitionHolders)) {
      if (logger.isInfoEnabled()) {
        logger.info("String_Node_Str" + "String_Node_Str");
        logger.info("String_Node_Str");
      }
      beanDefinitionHolders=findServiceBeanDefinitionHolders(scanner,packageToScan,registry,beanNameGenerator);
    }
    if (!CollectionUtils.isEmpty(beanDefinitionHolders)) {
      for (      BeanDefinitionHolder beanDefinitionHolder : beanDefinitionHolders) {
        registerServiceBean(beanDefinitionHolder,registry);
      }
      if (logger.isInfoEnabled()) {
        logger.info(beanDefinitionHolders.size() + "String_Node_Str" + beanDefinitionHolders+ "String_Node_Str"+ packageToScan+ "String_Node_Str");
      }
    }
 else {
      if (logger.isWarnEnabled()) {
        logger.warn("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Registers Beans whose classes was annotated   {@link Service}
 * @param packagesToScan The base packages to scan
 * @param registry       {@link BeanDefinitionRegistry}
 */
private void registerServiceBeans(Set<String> packagesToScan,BeanDefinitionRegistry registry){
  DubboClassPathBeanDefinitionScanner scanner=new DubboClassPathBeanDefinitionScanner(registry,environment,resourceLoader);
  BeanNameGenerator beanNameGenerator=resolveBeanNameGenerator(registry);
  scanner.setBeanNameGenerator(beanNameGenerator);
  scanner.addIncludeFilter(new AnnotationTypeFilter(Service.class));
  for (  String packageToScan : packagesToScan) {
    scanner.scan(packageToScan);
    Set<BeanDefinitionHolder> beanDefinitionHolders=findServiceBeanDefinitionHolders(scanner,packageToScan,registry,beanNameGenerator);
    if (!CollectionUtils.isEmpty(beanDefinitionHolders)) {
      for (      BeanDefinitionHolder beanDefinitionHolder : beanDefinitionHolders) {
        registerServiceBean(beanDefinitionHolder,registry,scanner);
      }
      if (logger.isInfoEnabled()) {
        logger.info(beanDefinitionHolders.size() + "String_Node_Str" + beanDefinitionHolders+ "String_Node_Str"+ packageToScan+ "String_Node_Str");
      }
    }
 else {
      if (logger.isWarnEnabled()) {
        logger.warn("String_Node_Str" + packageToScan + "String_Node_Str");
      }
    }
  }
}
Program: 85095
Project: 85095
Buggy source:
public void init(){
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ApplicationConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ModuleConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(RegistryConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(MonitorConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ProviderConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ConsumerConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ProtocolConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ServiceBean.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ReferenceBean.class,false));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(AnnotationBean.class,true));
}

Fixed version (ground truth):
public void init(){
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ApplicationConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ModuleConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(RegistryConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(MonitorConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ProviderConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ConsumerConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ProtocolConfig.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ServiceBean.class,true));
  registerBeanDefinitionParser("String_Node_Str",new DubboBeanDefinitionParser(ReferenceBean.class,false));
  registerBeanDefinitionParser("String_Node_Str",new AnnotationBeanDefinitionParser());
}
Program: 85097
Project: 85097
Buggy source:
public void index(Provider provider,Map<String,Object> context){
  String service=(String)context.get("String_Node_Str");
  String application=(String)context.get("String_Node_Str");
  String address=(String)context.get("String_Node_Str");
  String value="String_Node_Str";
  String separators="String_Node_Str";
  List<Provider> providers=null;
  if (service != null && service.length() > 0) {
    providers=providerService.findByService(service);
    value=service + separators + request.getRequestURI();
  }
 else   if (address != null && address.length() > 0) {
    providers=providerService.findByAddress(address);
    value=address + separators + request.getRequestURI();
  }
 else   if (application != null && application.length() > 0) {
    providers=providerService.findByApplication(application);
    value=application + separators + request.getRequestURI();
  }
 else {
    providers=providerService.findAll();
  }
  context.put("String_Node_Str",providers);
  setSearchHistroy(context,value);
}

Fixed version (ground truth):
public void index(Provider provider,Map<String,Object> context){
  String service=(String)context.get("String_Node_Str");
  String application=(String)context.get("String_Node_Str");
  String address=(String)context.get("String_Node_Str");
  String value="String_Node_Str";
  String separators="String_Node_Str";
  List<Provider> providers=null;
  if (service != null && service.length() > 0) {
    providers=providerService.findByService(service);
    value=service + separators + request.getRequestURI();
  }
 else   if (address != null && address.length() > 0) {
    providers=providerService.findByAddress(address);
    value=address + separators + request.getRequestURI();
  }
 else   if (application != null && application.length() > 0) {
    providers=providerService.findByApplication(application);
    value=application + separators + request.getRequestURI();
  }
 else {
    providers=providerService.findAll();
  }
  context.put("String_Node_Str",providers);
  context.put("String_Node_Str",getServiceAppMap(providers));
  setSearchHistroy(context,value);
}
Program: 85098
Project: 85098
Buggy source:
@Override public String toString(){
  return getInterface() + "String_Node_Str" + getUrl() == null ? "String_Node_Str" : getUrl().toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return getInterface() + "String_Node_Str" + (getUrl() == null ? "String_Node_Str" : getUrl().toString());
}
Program: 85099
Project: 85099
Buggy source:
/** 
 * Adds the   {@code Runnable} and accompanying {@code Executor} to the list oflisteners to execute. If execution has already begun, the listener is executed immediately. <p> <p>Note: For fast, lightweight listeners that would be safe to execute in any thread, consider  {@link MoreExecutors#sameThreadExecutor}. For heavier listeners,   {@code sameThreadExecutor()} carries some caveats: First, thethread that the listener runs in depends on whether the  {@code ExecutionList} has been executed at the time it is added. In particular,listeners may run in the thread that calls  {@code add}. Second, the thread that calls   {@link #execute} may be an internal implementation thread, suchas an RPC network thread, and  {@code sameThreadExecutor()} listeners mayrun in this thread. Finally, during the execution of a  {@code sameThreadExecutor} listener, all other registered but unexecutedlisteners are prevented from running, even if those listeners are to run in other executors.
 */
public void add(Runnable runnable,Executor executor){
  if (runnable == null || executor == null) {
    throw new NullPointerException("String_Node_Str");
  }
synchronized (this) {
    if (!executed) {
      runnables=new RunnableExecutorPair(runnable,executor,runnables);
      return;
    }
  }
  executeListener(runnable,executor);
}

Fixed version (ground truth):
/** 
 * Adds the   {@code Runnable} and accompanying {@code Executor} to the list oflisteners to execute. If execution has already begun, the listener is executed immediately. <p> <p>Note: For fast, lightweight listeners that would be safe to execute in any thread, consider  {@link MoreExecutors#sameThreadExecutor}. For heavier listeners,   {@code sameThreadExecutor()} carries some caveats: First, thethread that the listener runs in depends on whether the  {@code ExecutionList} has been executed at the time it is added. In particular,listeners may run in the thread that calls  {@code add}. Second, the thread that calls   {@link #execute} may be an internal implementation thread, suchas an RPC network thread, and  {@code sameThreadExecutor()} listeners mayrun in this thread. Finally, during the execution of a  {@code sameThreadExecutor} listener, all other registered but unexecutedlisteners are prevented from running, even if those listeners are to run in other executors.
 */
public void add(Runnable runnable,Executor executor){
  if (runnable == null) {
    throw new NullPointerException("String_Node_Str");
  }
  if (executor == null) {
    logger.info("String_Node_Str");
    executor=DEFAULT_EXECUTOR;
  }
synchronized (this) {
    if (!executed) {
      runnables=new RunnableExecutorPair(runnable,executor,runnables);
      return;
    }
  }
  executeListener(runnable,executor);
}
Program: 85100
Project: 85100
Buggy source:
/** 
 * Registers a listener to be   {@linkplain Executor#execute(Runnable) run} onthe given executor.  The listener will run when the  {@code Future}'s computation is   {@linkplain Future#isDone() complete} or, if the computationis already complete, immediately. <p> <p>There is no guaranteed ordering of execution of listeners, but any listener added through this method is guaranteed to be called once the computation is complete. <p> <p>Exceptions thrown by a listener will be propagated up to the executor. Any exception thrown during  {@code Executor.execute} (e.g., a {@code RejectedExecutionException} or an exception thrown by {@linkplain MoreExecutors#sameThreadExecutor inline execution}) will be caught and logged. <p> <p>Note: For fast, lightweight listeners that would be safe to execute in any thread, consider   {@link MoreExecutors#sameThreadExecutor}. For heavier listeners,   {@code sameThreadExecutor()} carries some caveats.  Forexample, the listener may run on an unpredictable or undesirable thread: <p> <ul> <li>If this  {@code Future} is done at the time {@code addListener} iscalled,  {@code addListener} will execute the listener inline.<li>If this  {@code Future} is not yet done, {@code addListener} willschedule the listener to be run by the thread that completes this  {@code Future}, which may be an internal system thread such as an RPC network thread. </ul> <p> <p>Also note that, regardless of which thread executes the  {@code sameThreadExecutor()} listener, all other registered but unexecutedlisteners are prevented from running during its execution, even if those listeners are to run in other executors. <p> <p>This is the most general listener interface. For common operations performed using listeners, see  {@link com.google.common.util.concurrent.Futures}. For a simplified but general listener interface, see   {@link com.google.common.util.concurrent.Futures#addCallback addCallback()}.
 * @param listener the listener to run when the computation is complete
 * @param executor the executor to run the listener in
 * @throws NullPointerException       if the executor or listener was null
 * @throws RejectedExecutionException if we tried to execute the listenerimmediately but the executor rejected it.
 */
void addListener(Runnable listener,Executor executor);

Fixed version (ground truth):
void addListener(Runnable listener);
Program: 85101
Project: 85101
Buggy source:
@Override public void addListener(Runnable listener,Executor exec){
  executionList.add(listener,exec);
}

Fixed version (ground truth):
@Override public void addListener(Runnable listener){
  executionList.add(listener,null);
}
Program: 85102
Project: 85102
Buggy source:
public static void notNull(Object obj,String message){
  if (obj == null) {
    throw new IllegalArgumentException(message);
  }
}

Fixed version (ground truth):
public static void notNull(Object obj,RuntimeException exeception){
  if (obj == null) {
    throw exeception;
  }
}
Program: 85103
Project: 85103
Buggy source:
public Monitor getMonitor(URL url){
  url=url.setPath(MonitorService.class.getName()).addParameter(Constants.INTERFACE_KEY,MonitorService.class.getName());
  String key=url.toServiceStringWithoutResolving();
  Monitor monitor=MONITORS.get(key);
  Future<Monitor> future=FUTURES.get(key);
  if (monitor != null || future != null) {
    return monitor;
  }
  LOCK.lock();
  try {
    monitor=MONITORS.get(key);
    future=FUTURES.get(key);
    if (monitor != null || future != null) {
      return monitor;
    }
    final URL monitorUrl=url;
    final ListenableFutureTask<Monitor> listenableFutureTask=ListenableFutureTask.create(new MonitorCreator(monitorUrl));
    listenableFutureTask.addListener(new MonitorListener(key),executor);
    executor.execute(listenableFutureTask);
    FUTURES.put(key,listenableFutureTask);
    return null;
  }
  finally {
    LOCK.unlock();
  }
}

Fixed version (ground truth):
public Monitor getMonitor(URL url){
  url=url.setPath(MonitorService.class.getName()).addParameter(Constants.INTERFACE_KEY,MonitorService.class.getName());
  String key=url.toServiceStringWithoutResolving();
  Monitor monitor=MONITORS.get(key);
  Future<Monitor> future=FUTURES.get(key);
  if (monitor != null || future != null) {
    return monitor;
  }
  LOCK.lock();
  try {
    monitor=MONITORS.get(key);
    future=FUTURES.get(key);
    if (monitor != null || future != null) {
      return monitor;
    }
    final URL monitorUrl=url;
    final ListenableFutureTask<Monitor> listenableFutureTask=ListenableFutureTask.create(new MonitorCreator(monitorUrl));
    listenableFutureTask.addListener(new MonitorListener(key));
    executor.execute(listenableFutureTask);
    FUTURES.put(key,listenableFutureTask);
    return null;
  }
  finally {
    LOCK.unlock();
  }
}
Program: 85104
Project: 85104
Buggy source:
public CuratorZookeeperClient(URL url){
  super(url);
  try {
    CuratorFrameworkFactory.Builder builder=CuratorFrameworkFactory.builder().connectString(url.getBackupAddress()).retryPolicy(new RetryNTimes(Integer.MAX_VALUE,1000)).connectionTimeoutMs(5000);
    String authority=url.getAuthority();
    if (authority != null && authority.length() > 0) {
      builder=builder.authorization("String_Node_Str",authority.getBytes());
    }
    client=builder.build();
    client.getConnectionStateListenable().addListener(new ConnectionStateListener(){
      public void stateChanged(      CuratorFramework client,      ConnectionState state){
        if (state == ConnectionState.LOST) {
          CuratorZookeeperClient.this.stateChanged(StateListener.DISCONNECTED);
        }
 else         if (state == ConnectionState.CONNECTED) {
          CuratorZookeeperClient.this.stateChanged(StateListener.CONNECTED);
        }
 else         if (state == ConnectionState.RECONNECTED) {
          CuratorZookeeperClient.this.stateChanged(StateListener.RECONNECTED);
        }
      }
    }
);
    client.start();
  }
 catch (  Exception e) {
    throw new IllegalStateException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
public CuratorZookeeperClient(URL url){
  super(url);
  try {
    CuratorFrameworkFactory.Builder builder=CuratorFrameworkFactory.builder().connectString(url.getBackupAddress()).retryPolicy(new RetryNTimes(1,1000)).connectionTimeoutMs(5000);
    String authority=url.getAuthority();
    if (authority != null && authority.length() > 0) {
      builder=builder.authorization("String_Node_Str",authority.getBytes());
    }
    client=builder.build();
    client.getConnectionStateListenable().addListener(new ConnectionStateListener(){
      public void stateChanged(      CuratorFramework client,      ConnectionState state){
        if (state == ConnectionState.LOST) {
          CuratorZookeeperClient.this.stateChanged(StateListener.DISCONNECTED);
        }
 else         if (state == ConnectionState.CONNECTED) {
          CuratorZookeeperClient.this.stateChanged(StateListener.CONNECTED);
        }
 else         if (state == ConnectionState.RECONNECTED) {
          CuratorZookeeperClient.this.stateChanged(StateListener.RECONNECTED);
        }
      }
    }
);
    client.start();
  }
 catch (  Exception e) {
    throw new IllegalStateException(e.getMessage(),e);
  }
}
Program: 85105
Project: 85105
Buggy source:
public ZkclientZookeeperClient(URL url){
  super(url);
  client=new ZkClient(url.getBackupAddress());
  client.subscribeStateChanges(new IZkStateListener(){
    public void handleStateChanged(    KeeperState state) throws Exception {
      ZkclientZookeeperClient.this.state=state;
      if (state == KeeperState.Disconnected) {
        stateChanged(StateListener.DISCONNECTED);
      }
 else       if (state == KeeperState.SyncConnected) {
        stateChanged(StateListener.CONNECTED);
      }
    }
    public void handleNewSession() throws Exception {
      stateChanged(StateListener.RECONNECTED);
    }
  }
);
}

Fixed version (ground truth):
public ZkclientZookeeperClient(URL url){
  super(url);
  client=new ZkClientWrapper(url.getBackupAddress(),30000);
  client.addListener(new IZkStateListener(){
    public void handleStateChanged(    KeeperState state) throws Exception {
      ZkclientZookeeperClient.this.state=state;
      if (state == KeeperState.Disconnected) {
        stateChanged(StateListener.DISCONNECTED);
      }
 else       if (state == KeeperState.SyncConnected) {
        stateChanged(StateListener.CONNECTED);
      }
    }
    public void handleNewSession() throws Exception {
      stateChanged(StateListener.RECONNECTED);
    }
  }
);
  client.start();
}
Program: 85106
Project: 85106
Buggy source:
public void createPersistent(String path){
  try {
    client.createPersistent(path,true);
  }
 catch (  ZkNodeExistsException e) {
  }
}

Fixed version (ground truth):
public void createPersistent(String path){
  try {
    client.createPersistent(path);
  }
 catch (  ZkNodeExistsException e) {
  }
}
Program: 85107
Project: 85107
Buggy source:
public void process(WatchedEvent event) throws Exception {
  if (listener != null) {
    listener.childChanged(event.getPath(),client.getChildren().usingWatcher(this).forPath(event.getPath()));
  }
}

Fixed version (ground truth):
public void process(WatchedEvent event) throws Exception {
  if (listener != null) {
    String path=event.getPath() == null ? "String_Node_Str" : event.getPath();
    listener.childChanged(path,StringUtils.isNotEmpty(path) ? client.getChildren().usingWatcher(this).forPath(path) : Collections.<String>emptyList());
  }
}
Program: 85108
Project: 85108
Buggy source:
public void doSaveProperties(long version){
  if (version < lastCacheChanged.get()) {
    return;
  }
  if (file == null) {
    return;
  }
  Properties newProperties=new Properties();
  InputStream in=null;
  try {
    if (file.exists()) {
      in=new FileInputStream(file);
      newProperties.load(in);
    }
  }
 catch (  Throwable e) {
    logger.warn("String_Node_Str" + e.getMessage(),e);
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException e) {
        logger.warn(e.getMessage(),e);
      }
    }
  }
  try {
    newProperties.putAll(properties);
    File lockfile=new File(file.getAbsolutePath() + "String_Node_Str");
    if (!lockfile.exists()) {
      lockfile.createNewFile();
    }
    RandomAccessFile raf=new RandomAccessFile(lockfile,"String_Node_Str");
    try {
      FileChannel channel=raf.getChannel();
      try {
        FileLock lock=channel.tryLock();
        if (lock == null) {
          throw new IOException("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str");
        }
        try {
          if (!file.exists()) {
            file.createNewFile();
          }
          FileOutputStream outputFile=new FileOutputStream(file);
          try {
            newProperties.store(outputFile,"String_Node_Str");
          }
  finally {
            outputFile.close();
          }
        }
  finally {
          lock.release();
        }
      }
  finally {
        channel.close();
      }
    }
  finally {
      raf.close();
    }
  }
 catch (  Throwable e) {
    if (version < lastCacheChanged.get()) {
      return;
    }
 else {
      registryCacheExecutor.execute(new SaveProperties(lastCacheChanged.incrementAndGet()));
    }
    logger.warn("String_Node_Str" + e.getMessage(),e);
  }
}

Fixed version (ground truth):
public void doSaveProperties(long version){
  if (version < lastCacheChanged.get()) {
    return;
  }
  if (file == null) {
    return;
  }
  try {
    File lockfile=new File(file.getAbsolutePath() + "String_Node_Str");
    if (!lockfile.exists()) {
      lockfile.createNewFile();
    }
    RandomAccessFile raf=new RandomAccessFile(lockfile,"String_Node_Str");
    try {
      FileChannel channel=raf.getChannel();
      try {
        FileLock lock=channel.tryLock();
        if (lock == null) {
          throw new IOException("String_Node_Str" + file.getAbsolutePath() + "String_Node_Str");
        }
        try {
          if (!file.exists()) {
            file.createNewFile();
          }
          FileOutputStream outputFile=new FileOutputStream(file);
          try {
            properties.store(outputFile,"String_Node_Str");
          }
  finally {
            outputFile.close();
          }
        }
  finally {
          lock.release();
        }
      }
  finally {
        channel.close();
      }
    }
  finally {
      raf.close();
    }
  }
 catch (  Throwable e) {
    if (version < lastCacheChanged.get()) {
      return;
    }
 else {
      registryCacheExecutor.execute(new SaveProperties(lastCacheChanged.incrementAndGet()));
    }
    logger.warn("String_Node_Str" + e.getMessage(),e);
  }
}
Program: 85109
Project: 85109
Buggy source:
public AbstractRegistry(URL url){
  setUrl(url);
  syncSaveFile=url.getParameter(Constants.REGISTRY_FILESAVE_SYNC_KEY,false);
  String filename=url.getParameter(Constants.FILE_KEY,System.getProperty("String_Node_Str") + "String_Node_Str" + url.getHost()+ "String_Node_Str");
  File file=null;
  if (ConfigUtils.isNotEmpty(filename)) {
    file=new File(filename);
    if (!file.exists() && file.getParentFile() != null && !file.getParentFile().exists()) {
      if (!file.getParentFile().mkdirs()) {
        throw new IllegalArgumentException("String_Node_Str" + file + "String_Node_Str"+ file.getParentFile()+ "String_Node_Str");
      }
    }
  }
  this.file=file;
  loadProperties();
  notify(url.getBackupUrls());
}

Fixed version (ground truth):
public AbstractRegistry(URL url){
  setUrl(url);
  syncSaveFile=url.getParameter(Constants.REGISTRY_FILESAVE_SYNC_KEY,false);
  String filename=url.getParameter(Constants.FILE_KEY,System.getProperty("String_Node_Str") + "String_Node_Str" + url.getParameter(Constants.APPLICATION_KEY)+ "String_Node_Str"+ url.getAddress()+ "String_Node_Str");
  File file=null;
  if (ConfigUtils.isNotEmpty(filename)) {
    file=new File(filename);
    if (!file.exists() && file.getParentFile() != null && !file.getParentFile().exists()) {
      if (!file.getParentFile().mkdirs()) {
        throw new IllegalArgumentException("String_Node_Str" + file + "String_Node_Str"+ file.getParentFile()+ "String_Node_Str");
      }
    }
  }
  this.file=file;
  loadProperties();
  notify(url.getBackupUrls());
}
Program: 85110
Project: 85110
Buggy source:
public void create(String path,boolean ephemeral){
  int i=path.lastIndexOf('/');
  if (i > 0) {
    create(path.substring(0,i),false);
  }
  if (ephemeral) {
    createEphemeral(path);
  }
 else {
    createPersistent(path);
  }
}

Fixed version (ground truth):
public void create(String path,boolean ephemeral){
  int i=path.lastIndexOf('/');
  if (i > 0) {
    String parentPath=path.substring(0,i);
    if (!checkExists(parentPath)) {
      create(parentPath,false);
    }
  }
  if (ephemeral) {
    createEphemeral(path);
  }
 else {
    createPersistent(path);
  }
}
Program: 85112
Project: 85112
Buggy source:
protected int getWeight(Invoker<?> invoker,Invocation invocation){
  int weight=invoker.getUrl().getMethodParameter(invocation.getMethodName(),Constants.WEIGHT_KEY,Constants.DEFAULT_WEIGHT);
  if (weight > 0) {
    long timestamp=invoker.getUrl().getParameter(Constants.TIMESTAMP_KEY,0L);
    if (timestamp > 0L) {
      int uptime=(int)(System.currentTimeMillis() - timestamp);
      int warmup=invoker.getUrl().getParameter(Constants.WARMUP_KEY,Constants.DEFAULT_WARMUP);
      if (uptime > 0 && uptime < warmup) {
        weight=calculateWarmupWeight(uptime,warmup,weight);
      }
    }
  }
  return weight;
}

Fixed version (ground truth):
protected int getWeight(Invoker<?> invoker,Invocation invocation){
  int weight=invoker.getUrl().getMethodParameter(invocation.getMethodName(),Constants.WEIGHT_KEY,Constants.DEFAULT_WEIGHT);
  if (weight > 0) {
    long timestamp=invoker.getUrl().getParameter(Constants.REMOTE_TIMESTAMP_KEY,0L);
    if (timestamp > 0L) {
      int uptime=(int)(System.currentTimeMillis() - timestamp);
      int warmup=invoker.getUrl().getParameter(Constants.WARMUP_KEY,Constants.DEFAULT_WARMUP);
      if (uptime > 0 && uptime < warmup) {
        weight=calculateWarmupWeight(uptime,warmup,weight);
      }
    }
  }
  return weight;
}
Program: 85115
Project: 85115
Buggy source:
public Result invoke(Invoker<?> invoker,Invocation invocation) throws RpcException {
  URL url=invoker.getUrl();
  String methodName=invocation.getMethodName();
  Semaphore executesLimit=null;
  boolean acquireResult=false;
  int max=url.getMethodParameter(methodName,Constants.EXECUTES_KEY,0);
  if (max > 0) {
    RpcStatus count=RpcStatus.getStatus(url,invocation.getMethodName());
    executesLimit=count.getSemaphore(max);
    if (executesLimit != null && !(acquireResult=executesLimit.tryAcquire())) {
      throw new RpcException("String_Node_Str" + invocation.getMethodName() + "String_Node_Str"+ url+ "String_Node_Str"+ max+ "String_Node_Str");
    }
  }
  long begin=System.currentTimeMillis();
  boolean isException=false;
  RpcStatus.beginCount(url,methodName);
  try {
    Result result=invoker.invoke(invocation);
    return result;
  }
 catch (  Throwable t) {
    isException=true;
    if (t instanceof RuntimeException) {
      throw (RuntimeException)t;
    }
 else {
      throw new RpcException("String_Node_Str",t);
    }
  }
 finally {
    RpcStatus.endCount(url,methodName,System.currentTimeMillis() - begin,isException);
    if (acquireResult) {
      executesLimit.release();
    }
  }
}

Fixed version (ground truth):
public Result invoke(Invoker<?> invoker,Invocation invocation) throws RpcException {
  URL url=invoker.getUrl();
  String methodName=invocation.getMethodName();
  Semaphore executesLimit=null;
  boolean acquireResult=false;
  int max=url.getMethodParameter(methodName,Constants.EXECUTES_KEY,0);
  if (max > 0) {
    RpcStatus count=RpcStatus.getStatus(url,invocation.getMethodName());
    executesLimit=count.getSemaphore(max);
    if (executesLimit != null && !(acquireResult=executesLimit.tryAcquire())) {
      throw new RpcException("String_Node_Str" + invocation.getMethodName() + "String_Node_Str"+ url+ "String_Node_Str"+ max+ "String_Node_Str");
    }
  }
  long begin=System.currentTimeMillis();
  boolean isSuccess=true;
  RpcStatus.beginCount(url,methodName);
  try {
    Result result=invoker.invoke(invocation);
    return result;
  }
 catch (  Throwable t) {
    isSuccess=false;
    if (t instanceof RuntimeException) {
      throw (RuntimeException)t;
    }
 else {
      throw new RpcException("String_Node_Str",t);
    }
  }
 finally {
    RpcStatus.endCount(url,methodName,System.currentTimeMillis() - begin,isSuccess);
    if (acquireResult) {
      executesLimit.release();
    }
  }
}
Program: 85117
Project: 85117
Buggy source:
protected static void checkPayload(Channel channel,long size) throws IOException {
  int payload=Constants.DEFAULT_PAYLOAD;
  if (channel != null && channel.getUrl() != null) {
    payload=channel.getUrl().getParameter(Constants.PAYLOAD_KEY,Constants.DEFAULT_PAYLOAD);
  }
  if (payload > 0 && size > payload) {
    IOException e=new IOException("String_Node_Str" + size + "String_Node_Str"+ payload+ "String_Node_Str"+ channel);
    logger.error(e);
    throw e;
  }
}

Fixed version (ground truth):
protected static void checkPayload(Channel channel,long size) throws IOException {
  int payload=Constants.DEFAULT_PAYLOAD;
  if (channel != null && channel.getUrl() != null) {
    payload=channel.getUrl().getParameter(Constants.PAYLOAD_KEY,Constants.DEFAULT_PAYLOAD);
  }
  if (payload > 0 && size > payload) {
    ExceedPayloadLimitException e=new ExceedPayloadLimitException("String_Node_Str" + size + "String_Node_Str"+ payload+ "String_Node_Str"+ channel);
    logger.error(e);
    throw e;
  }
}
Program: 85118
Project: 85118
Buggy source:
public HeaderExchangeClient(Client client){
  if (client == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.client=client;
  this.channel=new HeaderExchangeChannel(client);
  String dubbo=client.getUrl().getParameter(Constants.DUBBO_VERSION_KEY);
  this.heartbeat=client.getUrl().getParameter(Constants.HEARTBEAT_KEY,dubbo != null && dubbo.startsWith("String_Node_Str") ? Constants.DEFAULT_HEARTBEAT : 0);
  this.heartbeatTimeout=client.getUrl().getParameter(Constants.HEARTBEAT_TIMEOUT_KEY,heartbeat * 3);
  if (heartbeatTimeout < heartbeat * 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  startHeatbeatTimer();
}

Fixed version (ground truth):
public HeaderExchangeClient(Client client,boolean needHeartbeat){
  if (client == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.client=client;
  this.channel=new HeaderExchangeChannel(client);
  String dubbo=client.getUrl().getParameter(Constants.DUBBO_VERSION_KEY);
  this.heartbeat=client.getUrl().getParameter(Constants.HEARTBEAT_KEY,dubbo != null && dubbo.startsWith("String_Node_Str") ? Constants.DEFAULT_HEARTBEAT : 0);
  this.heartbeatTimeout=client.getUrl().getParameter(Constants.HEARTBEAT_TIMEOUT_KEY,heartbeat * 3);
  if (heartbeatTimeout < heartbeat * 2) {
    throw new IllegalStateException("String_Node_Str");
  }
  if (needHeartbeat) {
    startHeatbeatTimer();
  }
}
Program: 85119
Project: 85119
Buggy source:
public ExchangeClient connect(URL url,ExchangeHandler handler) throws RemotingException {
  return new HeaderExchangeClient(Transporters.connect(url,new DecodeHandler(new HeaderExchangeHandler(handler))));
}

Fixed version (ground truth):
public ExchangeClient connect(URL url,ExchangeHandler handler) throws RemotingException {
  return new HeaderExchangeClient(Transporters.connect(url,new DecodeHandler(new HeaderExchangeHandler(handler))),true);
}
Program: 85120
Project: 85120
Buggy source:
@Override protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv=(RpcInvocation)invocation;
  inv.setAttachment(Constants.PATH_KEY,getInterface().getName());
  inv.setAttachment(Constants.CALLBACK_SERVICE_KEY,serviceKey);
  ExchangeClient currentClient=new HeaderExchangeClient(new ChannelWrapper(this.channel));
  try {
    if (getUrl().getMethodParameter(invocation.getMethodName(),Constants.ASYNC_KEY,false)) {
      currentClient.send(inv,getUrl().getMethodParameter(invocation.getMethodName(),Constants.SENT_KEY,false));
      return new RpcResult();
    }
    int timeout=getUrl().getMethodParameter(invocation.getMethodName(),Constants.TIMEOUT_KEY,Constants.DEFAULT_TIMEOUT);
    if (timeout > 0) {
      return (Result)currentClient.request(inv,timeout).get();
    }
 else {
      return (Result)currentClient.request(inv).get();
    }
  }
 catch (  RpcException e) {
    throw e;
  }
catch (  TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION,e.getMessage(),e);
  }
catch (  RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION,e.getMessage(),e);
  }
catch (  Throwable e) {
    throw new RpcException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override protected Result doInvoke(Invocation invocation) throws Throwable {
  RpcInvocation inv=(RpcInvocation)invocation;
  inv.setAttachment(Constants.PATH_KEY,getInterface().getName());
  inv.setAttachment(Constants.CALLBACK_SERVICE_KEY,serviceKey);
  try {
    if (getUrl().getMethodParameter(invocation.getMethodName(),Constants.ASYNC_KEY,false)) {
      currentClient.send(inv,getUrl().getMethodParameter(invocation.getMethodName(),Constants.SENT_KEY,false));
      return new RpcResult();
    }
    int timeout=getUrl().getMethodParameter(invocation.getMethodName(),Constants.TIMEOUT_KEY,Constants.DEFAULT_TIMEOUT);
    if (timeout > 0) {
      return (Result)currentClient.request(inv,timeout).get();
    }
 else {
      return (Result)currentClient.request(inv).get();
    }
  }
 catch (  RpcException e) {
    throw e;
  }
catch (  TimeoutException e) {
    throw new RpcException(RpcException.TIMEOUT_EXCEPTION,e.getMessage(),e);
  }
catch (  RemotingException e) {
    throw new RpcException(RpcException.NETWORK_EXCEPTION,e.getMessage(),e);
  }
catch (  Throwable e) {
    throw new RpcException(e.getMessage(),e);
  }
}
Program: 85121
Project: 85121
Buggy source:
public ChannelWrappedInvoker(Class<T> serviceType,Channel channel,URL url,String serviceKey){
  super(serviceType,url,new String[]{Constants.GROUP_KEY,Constants.TOKEN_KEY,Constants.TIMEOUT_KEY});
  this.channel=channel;
  this.serviceKey=serviceKey;
}

Fixed version (ground truth):
ChannelWrappedInvoker(Class<T> serviceType,Channel channel,URL url,String serviceKey){
  super(serviceType,url,new String[]{Constants.GROUP_KEY,Constants.TOKEN_KEY,Constants.TIMEOUT_KEY});
  this.channel=channel;
  this.serviceKey=serviceKey;
  this.currentClient=new HeaderExchangeClient(new ChannelWrapper(this.channel),false);
}
Program: 85122
Project: 85122
Buggy source:
public boolean isConnected(){
  return channel == null ? false : channel.isConnected();
}

Fixed version (ground truth):
public boolean isConnected(){
  return channel != null && channel.isConnected();
}
Program: 85123
Project: 85123
Buggy source:
public ChannelWrapper(Channel channel){
  this.channel=channel;
  this.url=channel.getUrl().addParameter("String_Node_Str",DubboCodec.NAME);
}

Fixed version (ground truth):
ChannelWrapper(Channel channel){
  this.channel=channel;
  this.url=channel.getUrl().addParameter("String_Node_Str",DubboCodec.NAME);
}
Program: 85124
Project: 85124
Buggy source:
public boolean isClosed(){
  return channel == null ? true : channel.isClosed();
}

Fixed version (ground truth):
public boolean isClosed(){
  return channel == null || channel.isClosed();
}
Program: 85125
Project: 85125
Buggy source:
public Invoker<T> select(Invocation invocation){
  String key=toKey(invocation.getArguments());
  byte[] digest=md5(key);
  Invoker<T> invoker=sekectForKey(hash(digest,0));
  return invoker;
}

Fixed version (ground truth):
public Invoker<T> select(Invocation invocation){
  String key=toKey(invocation.getArguments());
  byte[] digest=md5(key);
  return selectForKey(hash(digest,0));
}
Program: 85126
Project: 85126
Buggy source:
public ConsistentHashSelector(List<Invoker<T>> invokers,String methodName,int identityHashCode){
  this.virtualInvokers=new TreeMap<Long,Invoker<T>>();
  this.identityHashCode=System.identityHashCode(invokers);
  URL url=invokers.get(0).getUrl();
  this.replicaNumber=url.getMethodParameter(methodName,"String_Node_Str",160);
  String[] index=Constants.COMMA_SPLIT_PATTERN.split(url.getMethodParameter(methodName,"String_Node_Str","String_Node_Str"));
  argumentIndex=new int[index.length];
  for (int i=0; i < index.length; i++) {
    argumentIndex[i]=Integer.parseInt(index[i]);
  }
  for (  Invoker<T> invoker : invokers) {
    for (int i=0; i < replicaNumber / 4; i++) {
      byte[] digest=md5(invoker.getUrl().toFullString() + i);
      for (int h=0; h < 4; h++) {
        long m=hash(digest,h);
        virtualInvokers.put(m,invoker);
      }
    }
  }
}

Fixed version (ground truth):
ConsistentHashSelector(List<Invoker<T>> invokers,String methodName,int identityHashCode){
  this.virtualInvokers=new TreeMap<Long,Invoker<T>>();
  this.identityHashCode=identityHashCode;
  URL url=invokers.get(0).getUrl();
  this.replicaNumber=url.getMethodParameter(methodName,"String_Node_Str",160);
  String[] index=Constants.COMMA_SPLIT_PATTERN.split(url.getMethodParameter(methodName,"String_Node_Str","String_Node_Str"));
  argumentIndex=new int[index.length];
  for (int i=0; i < index.length; i++) {
    argumentIndex[i]=Integer.parseInt(index[i]);
  }
  for (  Invoker<T> invoker : invokers) {
    String address=invoker.getUrl().getAddress();
    for (int i=0; i < replicaNumber / 4; i++) {
      byte[] digest=md5(address + i);
      for (int h=0; h < 4; h++) {
        long m=hash(digest,h);
        virtualInvokers.put(m,invoker);
      }
    }
  }
}
Program: 85127
Project: 85127
Buggy source:
@SuppressWarnings("String_Node_Str") @Override protected <T>Invoker<T> doSelect(List<Invoker<T>> invokers,URL url,Invocation invocation){
  String key=invokers.get(0).getUrl().getServiceKey() + "String_Node_Str" + invocation.getMethodName();
  int identityHashCode=System.identityHashCode(invokers);
  ConsistentHashSelector<T> selector=(ConsistentHashSelector<T>)selectors.get(key);
  if (selector == null || selector.getIdentityHashCode() != identityHashCode) {
    selectors.put(key,new ConsistentHashSelector<T>(invokers,invocation.getMethodName(),identityHashCode));
    selector=(ConsistentHashSelector<T>)selectors.get(key);
  }
  return selector.select(invocation);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override protected <T>Invoker<T> doSelect(List<Invoker<T>> invokers,URL url,Invocation invocation){
  String key=invokers.get(0).getUrl().getServiceKey() + "String_Node_Str" + invocation.getMethodName();
  int identityHashCode=System.identityHashCode(invokers);
  ConsistentHashSelector<T> selector=(ConsistentHashSelector<T>)selectors.get(key);
  if (selector == null || selector.identityHashCode != identityHashCode) {
    selectors.put(key,new ConsistentHashSelector<T>(invokers,invocation.getMethodName(),identityHashCode));
    selector=(ConsistentHashSelector<T>)selectors.get(key);
  }
  return selector.select(invocation);
}