nus-yam/ex-repair huggingface dataset:
Program: 167741
Project: 167741
Buggy source:
@Override protected boolean compare(Object left,Object right){
  if (left == null) {
    return right != null;
  }
  return !left.equals(right);
}

Fixed version (ground truth):
@Override protected boolean compare(Object left,Object right){
  if (((ModelNode)left).getType() != ((ModelNode)right).getType()) {
    return true;
  }
  if (left == null) {
    return right != null;
  }
  return !left.equals(right);
}
Program: 167742
Project: 167742
Buggy source:
@Test public void testSimpleInt() throws Exception {
  ModelNode node=new ModelNode();
  node.get("String_Node_Str").set(11);
  assertFalse(node,"String_Node_Str");
  node.get("String_Node_Str").set(111);
  assertTrue(node,"String_Node_Str");
  node.get("String_Node_Str").set("String_Node_Str");
  assertFalse(node,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testSimpleInt() throws Exception {
  ModelNode node=new ModelNode();
  node.get("String_Node_Str").set(11);
  assertFalse(node,"String_Node_Str");
  node.get("String_Node_Str").set(111);
  assertTrue(node,"String_Node_Str");
  node.get("String_Node_Str").set("String_Node_Str");
  assertTrue(node,"String_Node_Str");
}
Program: 167743
Project: 167743
Buggy source:
@Test public void testPathBoolean() throws Exception {
  ModelNode node=new ModelNode();
  node.get("String_Node_Str").get("String_Node_Str").set(true);
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  node.get("String_Node_Str").get("String_Node_Str").set(false);
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  node.get("String_Node_Str").get("String_Node_Str").set(false);
  assertTrue(node,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testPathBoolean() throws Exception {
  ModelNode node=new ModelNode();
  node.get("String_Node_Str").get("String_Node_Str").set(true);
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  assertTrue(node,"String_Node_Str");
  node.get("String_Node_Str").get("String_Node_Str").set(false);
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  assertTrue(node,"String_Node_Str");
  node.get("String_Node_Str").get("String_Node_Str").set(false);
  assertTrue(node,"String_Node_Str");
}
Program: 167744
Project: 167744
Buggy source:
@Test public void testUndefined() throws Exception {
  ModelNode node=new ModelNode();
  node.get("String_Node_Str");
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  assertFalse(node,"String_Node_Str");
  node.get("String_Node_Str").set("String_Node_Str");
  assertFalse(node,"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testUndefined() throws Exception {
  ModelNode node=new ModelNode();
  node.get("String_Node_Str");
  assertFalse(node,"String_Node_Str");
  assertTrue(node,"String_Node_Str");
  assertTrue(node,"String_Node_Str");
  node.get("String_Node_Str").set("String_Node_Str");
  assertTrue(node,"String_Node_Str");
}
Program: 167745
Project: 167745
Buggy source:
private boolean isGlobalAlias(final ImmutableManagementResourceRegistration registry,final Property child){
  if (isSquatterResource(registry,child.getName())) {
    ImmutableManagementResourceRegistration squatterRegistration=registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(child.getName(),child.getValue().asString())));
    return squatterRegistration != null && squatterRegistration.isAlias();
  }
  String key=child.getName();
  ImmutableManagementResourceRegistration wildCardChildRegistration=registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(key)));
  boolean isAlias=wildCardChildRegistration.isAlias();
  Set<String> registredNames=registry.getChildNames(PathAddress.pathAddress(PathElement.pathElement(key)));
  if (registredNames != null && !registredNames.isEmpty() && isAlias) {
    for (    String value : registredNames) {
      ImmutableManagementResourceRegistration childRegistration=registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(key,value)));
      isAlias=isAlias && childRegistration != null && childRegistration.isAlias();
      if (!isAlias) {
        return false;
      }
    }
  }
  return isAlias;
}

Fixed version (ground truth):
private boolean isGlobalAlias(final ImmutableManagementResourceRegistration registry,final Property child){
  if (isSquatterResource(registry,child.getName())) {
    Set<PathElement> childrenPath=registry.getChildAddresses(PathAddress.EMPTY_ADDRESS);
    boolean found=false;
    boolean alias=true;
    for (    PathElement childPath : childrenPath) {
      if (childPath.getKey().equals(child.getName())) {
        found=true;
        ImmutableManagementResourceRegistration squatterRegistration=registry.getSubModel(PathAddress.pathAddress(childPath));
        alias=alias && (squatterRegistration != null && squatterRegistration.isAlias());
      }
    }
    if (found && alias) {
      return true;
    }
    ImmutableManagementResourceRegistration squatterRegistration=registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(child.getName(),child.getValue().asString())));
    return squatterRegistration != null && squatterRegistration.isAlias();
  }
  String key=child.getName();
  ImmutableManagementResourceRegistration wildCardChildRegistration=registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(key)));
  boolean isAlias=wildCardChildRegistration.isAlias();
  Set<String> registredNames=registry.getChildNames(PathAddress.pathAddress(PathElement.pathElement(key)));
  if (registredNames != null && !registredNames.isEmpty() && isAlias) {
    for (    String value : registredNames) {
      ImmutableManagementResourceRegistration childRegistration=registry.getSubModel(PathAddress.pathAddress(PathElement.pathElement(key,value)));
      isAlias=isAlias && childRegistration != null && childRegistration.isAlias();
      if (!isAlias) {
        return false;
      }
    }
  }
  return isAlias;
}
Program: 167747
Project: 167747
Buggy source:
@Override public void validateParameter(String parameterName,ModelNode value) throws OperationFailedException {
  super.validateParameter(parameterName,value);
  if (value.isDefined()) {
    final String suffix=value.asString();
    try {
      if (denySeconds && (suffix.contains("String_Node_Str") || suffix.contains("String_Node_Str"))) {
        throw createOperationFailure(LoggingLogger.ROOT_LOGGER.invalidSuffix(suffix));
      }
      new SimpleDateFormat(suffix);
    }
 catch (    IllegalArgumentException e) {
      throw createOperationFailure(LoggingLogger.ROOT_LOGGER.invalidSuffix(suffix));
    }
  }
}

Fixed version (ground truth):
@Override public void validateParameter(String parameterName,ModelNode value) throws OperationFailedException {
  super.validateParameter(parameterName,value);
  if (value.isDefined()) {
    final String suffix=value.asString();
    try {
      if (denySeconds && (suffix.contains("String_Node_Str") || suffix.contains("String_Node_Str"))) {
        throw createOperationFailure(LoggingLogger.ROOT_LOGGER.suffixContainsMillis(suffix));
      }
      new SimpleDateFormat(suffix);
    }
 catch (    IllegalArgumentException e) {
      throw createOperationFailure(LoggingLogger.ROOT_LOGGER.invalidSuffix(suffix));
    }
  }
}
Program: 167750
Project: 167750
Buggy source:
@Override public void requestsComplete(){
  if (count.decrementAndGet() == 0) {
    delegate.requestsComplete();
  }
}

Fixed version (ground truth):
@Override public void requestsComplete(){
  if (count.decrementAndGet() == 0) {
    if (delegate != null) {
      delegate.requestsComplete();
    }
  }
}
Program: 167751
Project: 167751
Buggy source:
@Override public void unPaused(){
  if (canceled.compareAndSet(false,true)) {
    delegate.unPaused();
  }
}

Fixed version (ground truth):
@Override public void unPaused(){
  if (canceled.compareAndSet(false,true)) {
    if (delegate != null) {
      delegate.unPaused();
    }
  }
}
Program: 167752
Project: 167752
Buggy source:
/** 
 * resumed a given deployment
 * @param deployment The deployment to resume
 */
public synchronized void resumeDeployment(final String deployment){
  final List<ControlPoint> eps=new ArrayList<ControlPoint>();
  for (  ControlPoint ep : entryPoints.values()) {
    if (ep.getDeployment().equals(deployment)) {
      ep.resume();
    }
  }
}

Fixed version (ground truth):
/** 
 * resumed a given deployment
 * @param deployment The deployment to resume
 */
public synchronized void resumeDeployment(final String deployment){
  for (  ControlPoint ep : entryPoints.values()) {
    if (ep.getDeployment().equals(deployment)) {
      ep.resume();
    }
  }
}
Program: 167753
Project: 167753
Buggy source:
/** 
 * Pauses a given deployment
 * @param deployment The deployment to pause
 * @param listener The listener that will be notified when the pause is complete
 */
public synchronized void pauseDeployment(final String deployment,ServerActivityListener listener){
  final List<ControlPoint> eps=new ArrayList<ControlPoint>();
  for (  ControlPoint ep : entryPoints.values()) {
    if (ep.getDeployment().equals(deployment)) {
      eps.add(ep);
    }
  }
  CountingRequestCountListener realListener=new CountingRequestCountListener(eps.size(),listener);
  for (  ControlPoint ep : eps) {
    ep.pause(realListener);
  }
}

Fixed version (ground truth):
/** 
 * Pauses a given deployment
 * @param deployment The deployment to pause
 * @param listener The listener that will be notified when the pause is complete
 */
public synchronized void pauseDeployment(final String deployment,ServerActivityListener listener){
  final List<ControlPoint> eps=new ArrayList<ControlPoint>();
  for (  ControlPoint ep : entryPoints.values()) {
    if (ep.getDeployment().equals(deployment)) {
      if (!ep.isPaused()) {
        eps.add(ep);
      }
    }
  }
  CountingRequestCountListener realListener=new CountingRequestCountListener(eps.size(),listener);
  for (  ControlPoint ep : eps) {
    ep.pause(realListener);
  }
}
Program: 167754
Project: 167754
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  EntryPointIdentifier that=(EntryPointIdentifier)o;
  if (deployment != null ? !deployment.equals(that.deployment) : that.deployment != null)   return false;
  if (name != null ? !name.equals(that.name) : that.name != null)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (o == null || getClass() != o.getClass())   return false;
  ControlPointIdentifier that=(ControlPointIdentifier)o;
  if (deployment != null ? !deployment.equals(that.deployment) : that.deployment != null)   return false;
  if (name != null ? !name.equals(that.name) : that.name != null)   return false;
  return true;
}
Program: 167756
Project: 167756
Buggy source:
@Override public void transformResource(final ResourceTransformationContext context,final PathAddress address,final Resource resource) throws OperationFailedException {
  if (resource.isProxy() || resource.isRuntime()) {
    return;
  }
  ResourceTransformationContext current=context;
  Iterator<Map.Entry<ModelVersionPair,ChainedPlaceholderResolver>> it=placeholderResolvers.entrySet().iterator();
  if (it.hasNext()) {
    ChainedPlaceholderResolver resolver=it.next().getValue();
    current=ChainedTransformationTools.initialiseChain(current,resolver);
    resolver.getDescription().getResourceTransformer().transformResource(current,address,resource);
  }
  while (it.hasNext()) {
    ChainedPlaceholderResolver resolver=it.next().getValue();
    current=ChainedTransformationTools.nextInChain(current,resolver);
    try {
      Resource currentResource=current.readResourceFromRoot(address);
      resolver.getDescription().getResourceTransformer().transformResource(current,address,currentResource);
    }
 catch (    Resource.NoSuchResourceException e) {
      continue;
    }
  }
  Resource transformed=current.getTransformedRoot();
  Resource originalTransformed=context.getTransformedRoot();
  copy(transformed,originalTransformed,address);
}

Fixed version (ground truth):
@Override public void transformResource(final ResourceTransformationContext context,final PathAddress address,final Resource resource) throws OperationFailedException {
  if (resource.isProxy() || resource.isRuntime()) {
    return;
  }
  ResourceTransformationContext current=context;
  Iterator<Map.Entry<ModelVersionPair,ChainedPlaceholderResolver>> it=placeholderResolvers.entrySet().iterator();
  if (it.hasNext()) {
    ChainedPlaceholderResolver resolver=it.next().getValue();
    current=ChainedTransformationTools.initialiseChain(current,resolver);
    resolver.getDescription().getResourceTransformer().transformResource(current,address,resource);
  }
  while (it.hasNext()) {
    ChainedPlaceholderResolver resolver=it.next().getValue();
    current=ChainedTransformationTools.nextInChainResource(current,resolver);
    try {
      Resource currentResource=current.readResourceFromRoot(address);
      resolver.getDescription().getResourceTransformer().transformResource(current,address,currentResource);
    }
 catch (    Resource.NoSuchResourceException e) {
      continue;
    }
  }
  Resource transformed=current.getTransformedRoot();
  Resource originalTransformed=context.getTransformedRoot();
  copy(transformed,originalTransformed,address);
}
Program: 167757
Project: 167757
Buggy source:
public synchronized ManagedQueueExecutorService getValue() throws IllegalStateException {
  final ManagedQueueExecutorService value=this.executor;
  if (value == null) {
    throw ThreadsLogger.ROOT_LOGGER.boundedQueueThreadPoolExecutorUninitialized();
  }
  return value;
}

Fixed version (ground truth):
public ManagedQueueExecutorService getValue() throws IllegalStateException {
  final ManagedQueueExecutorService value;
synchronized (this) {
    value=this.executor;
  }
  if (value == null) {
    throw ThreadsLogger.ROOT_LOGGER.boundedQueueThreadPoolExecutorUninitialized();
  }
  return value;
}
Program: 167758
Project: 167758
Buggy source:
public synchronized void stop(final StopContext context){
  final ManagedQueueExecutorService executor=getValue();
  context.asynchronous();
  executor.internalShutdown();
  executor.addShutdownListener(new EventListener<StopContext>(){
    public void handleEvent(    final StopContext stopContext){
      stopContext.complete();
    }
  }
,context);
  this.executor=null;
}

Fixed version (ground truth):
public void stop(final StopContext context){
  final ManagedQueueExecutorService executor;
synchronized (this) {
    executor=this.executor;
    this.executor=null;
  }
  context.asynchronous();
  executor.internalShutdown();
  executor.addShutdownListener(StopContextEventListener.getInstance(),context);
}
Program: 167759
Project: 167759
Buggy source:
public synchronized ManagedQueuelessExecutorService getValue() throws IllegalStateException {
  final ManagedQueuelessExecutorService value=this.executor;
  if (value == null) {
    throw ThreadsLogger.ROOT_LOGGER.queuelessThreadPoolExecutorUninitialized();
  }
  return value;
}

Fixed version (ground truth):
public ManagedQueuelessExecutorService getValue() throws IllegalStateException {
  final ManagedQueuelessExecutorService value;
synchronized (this) {
    value=this.executor;
  }
  if (value == null) {
    throw ThreadsLogger.ROOT_LOGGER.queuelessThreadPoolExecutorUninitialized();
  }
  return value;
}
Program: 167760
Project: 167760
Buggy source:
public synchronized void stop(final StopContext context){
  final ManagedQueuelessExecutorService executor=getValue();
  context.asynchronous();
  executor.internalShutdown();
  executor.addShutdownListener(new EventListener<StopContext>(){
    public void handleEvent(    final StopContext stopContext){
      stopContext.complete();
    }
  }
,context);
  this.executor=null;
}

Fixed version (ground truth):
public void stop(final StopContext context){
  final ManagedQueuelessExecutorService executor;
synchronized (this) {
    executor=this.executor;
    this.executor=null;
  }
  context.asynchronous();
  executor.internalShutdown();
  executor.addShutdownListener(StopContextEventListener.getInstance(),context);
}
Program: 167761
Project: 167761
Buggy source:
public synchronized void start(final StartContext context) throws StartException {
  ScheduledThreadPoolExecutor scheduledExecutor=new ExecutorImpl(0,threadFactoryValue.getValue());
  scheduledExecutor.setCorePoolSize(maxThreads);
  if (keepAlive != null)   scheduledExecutor.setKeepAliveTime(keepAlive.getDuration(),keepAlive.getUnit());
  executor=new ManagedScheduledExecutorService(scheduledExecutor);
}

Fixed version (ground truth):
public void start(final StartContext context) throws StartException {
  ScheduledThreadPoolExecutor scheduledExecutor=new ExecutorImpl(0,threadFactoryValue.getValue());
  scheduledExecutor.setCorePoolSize(maxThreads);
  if (keepAlive != null)   scheduledExecutor.setKeepAliveTime(keepAlive.getDuration(),keepAlive.getUnit());
  final ManagedScheduledExecutorService executorService=new ManagedScheduledExecutorService(scheduledExecutor);
synchronized (this) {
    executor=executorService;
  }
}
Program: 167762
Project: 167762
Buggy source:
public synchronized ManagedScheduledExecutorService getValue() throws IllegalStateException {
  final ManagedScheduledExecutorService value=this.executor;
  if (value == null) {
    throw ThreadsLogger.ROOT_LOGGER.scheduledThreadPoolExecutorUninitialized();
  }
  return value;
}

Fixed version (ground truth):
public ManagedScheduledExecutorService getValue() throws IllegalStateException {
  final ManagedScheduledExecutorService value;
synchronized (this) {
    value=this.executor;
  }
  if (value == null) {
    throw ThreadsLogger.ROOT_LOGGER.scheduledThreadPoolExecutorUninitialized();
  }
  return value;
}
Program: 167763
Project: 167763
Buggy source:
public synchronized void stop(final StopContext context){
  final ManagedScheduledExecutorService executor=getValue();
  this.context=context;
  context.asynchronous();
  executor.internalShutdown();
  this.executor=null;
}

Fixed version (ground truth):
public void stop(final StopContext context){
  final ManagedScheduledExecutorService executor;
synchronized (this) {
    executor=this.executor;
    this.context=context;
    this.executor=null;
  }
  context.asynchronous();
  executor.internalShutdown();
}
Program: 167764
Project: 167764
Buggy source:
protected void terminated(){
synchronized (ScheduledThreadPoolService.this) {
    super.terminated();
    context.complete();
    context=null;
  }
}

Fixed version (ground truth):
protected void terminated(){
  super.terminated();
  StopContext context;
synchronized (ScheduledThreadPoolService.this) {
    context=ScheduledThreadPoolService.this.context;
    ScheduledThreadPoolService.this.context=null;
  }
  context.complete();
}
Program: 167765
Project: 167765
Buggy source:
public synchronized void stop(final StopContext context){
  final ManagedJBossThreadPoolExecutorService executor=getValue();
  context.asynchronous();
  executor.internalShutdown();
  executor.addShutdownListener(new EventListener<StopContext>(){
    public void handleEvent(    final StopContext stopContext){
      stopContext.complete();
    }
  }
,context);
  this.executor=null;
}

Fixed version (ground truth):
public void stop(final StopContext context){
  final ManagedJBossThreadPoolExecutorService executor;
synchronized (this) {
    executor=this.executor;
    this.executor=null;
  }
  context.asynchronous();
  executor.internalShutdown();
  executor.addShutdownListener(StopContextEventListener.getInstance(),context);
}
Program: 167767
Project: 167767
Buggy source:
public static boolean isExecute(ModelControllerClient client,String[] parent,OperationRequestAddress address,String operation){
  final ModelNode accessControl=getAccessControl(client,parent,address,true);
  if (accessControl == null) {
    return false;
  }
  if (!accessControl.has(Util.DEFAULT)) {
    log.warn("String_Node_Str" + accessControl);
    return false;
  }
  final ModelNode defaults=accessControl.get(Util.DEFAULT);
  if (!defaults.has(Util.OPERATIONS)) {
    log.warn("String_Node_Str" + accessControl);
    return false;
  }
  final ModelNode operations=defaults.get(Util.OPERATIONS);
  if (!operations.has(operation)) {
    if (log.isTraceEnabled()) {
      log.trace("String_Node_Str" + operation);
    }
    return false;
  }
  final ModelNode opAC=operations.get(operation);
  if (!opAC.has(Util.EXECUTE)) {
    log.warn("String_Node_Str" + operation + "String_Node_Str"+ accessControl);
    return false;
  }
  return opAC.get(Util.EXECUTE).asBoolean();
}

Fixed version (ground truth):
public static boolean isExecute(ModelControllerClient client,String[] parent,OperationRequestAddress address,String operation){
  final ModelNode accessControl=getAccessControl(client,parent,address,true);
  if (accessControl == null) {
    return false;
  }
  if (!accessControl.has(Util.DEFAULT)) {
    log.warn("String_Node_Str" + accessControl);
    return false;
  }
  final ModelNode defaults=accessControl.get(Util.DEFAULT);
  if (!defaults.has(Util.OPERATIONS)) {
    log.warn("String_Node_Str" + defaults);
    return false;
  }
  final ModelNode operations=defaults.get(Util.OPERATIONS);
  if (!operations.has(operation)) {
    if (log.isTraceEnabled()) {
      log.trace("String_Node_Str" + operation);
    }
    return false;
  }
  final ModelNode opAC=operations.get(operation);
  if (!opAC.has(Util.EXECUTE)) {
    log.warn("String_Node_Str" + operation + "String_Node_Str"+ accessControl);
    return false;
  }
  return opAC.get(Util.EXECUTE).asBoolean();
}
Program: 167768
Project: 167768
Buggy source:
@Override public IoFuture<Connection> connect() throws IOException {
  final URI uri;
  try {
    uri=this.getConnectionURI();
  }
 catch (  URISyntaxException e) {
    throw MESSAGES.couldNotConnect(e);
  }
  final Endpoint endpoint=this.endpointInjectedValue.getValue();
  final CallbackHandler callbackHandler;
  final CallbackHandlerFactory cbhFactory;
  SSLContext sslContext=null;
  SecurityRealm realm=securityRealmInjectedValue.getOptionalValue();
  if (realm != null && (cbhFactory=realm.getSecretCallbackHandlerFactory()) != null && username != null) {
    callbackHandler=cbhFactory.getCallbackHandler(username);
  }
 else {
    callbackHandler=getCallbackHandler();
  }
  if (realm != null) {
    sslContext=realm.getSSLContext();
  }
  final OptionMap.Builder builder=OptionMap.builder();
  builder.set(SASL_POLICY_NOANONYMOUS,Boolean.FALSE);
  builder.set(SASL_POLICY_NOPLAINTEXT,Boolean.FALSE);
  builder.set(Options.SASL_DISALLOWED_MECHANISMS,Sequence.of(JBOSS_LOCAL_USER));
  builder.set(Options.SSL_ENABLED,true);
  builder.set(Options.SSL_STARTTLS,true);
  builder.addAll(this.connectionCreationOptions);
  return endpoint.connect(uri,builder.getMap(),callbackHandler,sslContext);
}

Fixed version (ground truth):
@Override public IoFuture<Connection> connect() throws IOException {
  final URI uri;
  try {
    uri=this.getConnectionURI();
  }
 catch (  URISyntaxException e) {
    throw MESSAGES.couldNotConnect(e);
  }
  final Endpoint endpoint=this.endpointInjectedValue.getValue();
  final CallbackHandler callbackHandler;
  final CallbackHandlerFactory cbhFactory;
  SSLContext sslContext=null;
  SecurityRealm realm=securityRealmInjectedValue.getOptionalValue();
  if (realm != null && (cbhFactory=realm.getSecretCallbackHandlerFactory()) != null && username != null) {
    callbackHandler=cbhFactory.getCallbackHandler(username);
  }
 else {
    callbackHandler=getCallbackHandler();
  }
  if (realm != null) {
    sslContext=realm.getSSLContext();
  }
  final OptionMap.Builder builder=OptionMap.builder();
  builder.set(SASL_POLICY_NOANONYMOUS,Boolean.FALSE);
  builder.set(SASL_POLICY_NOPLAINTEXT,Boolean.FALSE);
  builder.set(Options.SASL_DISALLOWED_MECHANISMS,Sequence.of(JBOSS_LOCAL_USER));
  if (uri.getScheme().equals(HTTP_REMOTING)) {
    builder.set(SSL_ENABLED,false);
  }
 else   if (uri.getScheme().equals(HTTPS_REMOTING)) {
    builder.set(SSL_ENABLED,true);
    builder.set(SSL_STARTTLS,false);
  }
 else {
    builder.set(Options.SSL_ENABLED,true);
    builder.set(Options.SSL_STARTTLS,true);
  }
  builder.addAll(this.connectionCreationOptions);
  return endpoint.connect(uri,builder.getMap(),callbackHandler,sslContext);
}
Program: 167769
Project: 167769
Buggy source:
public static void addDeploymentProcessor(final String subsystemName,Phase phase,int priority,DeploymentUnitProcessor processor){
  final EnumMap<Phase,Set<RegisteredDeploymentUnitProcessor>> deployerMap=INSTANCE.deployerMap;
  deployerMap.get(phase).add(new RegisteredDeploymentUnitProcessor(priority,processor,subsystemName));
}

Fixed version (ground truth):
public static void addDeploymentProcessor(final String subsystemName,Phase phase,int priority,DeploymentUnitProcessor processor){
  final EnumMap<Phase,Set<RegisteredDeploymentUnitProcessor>> deployerMap=INSTANCE.deployerMap;
  Set<RegisteredDeploymentUnitProcessor> registeredDeploymentUnitProcessors=deployerMap.get(phase);
  RegisteredDeploymentUnitProcessor registeredDeploymentUnitProcessor=new RegisteredDeploymentUnitProcessor(priority,processor,subsystemName);
  if (registeredDeploymentUnitProcessors.contains(registeredDeploymentUnitProcessor)) {
    throw ServerMessages.MESSAGES.duplicateDeploymentUnitProcessor(priority,processor.getClass());
  }
  registeredDeploymentUnitProcessors.add(registeredDeploymentUnitProcessor);
}
Program: 167770
Project: 167770
Buggy source:
@Override public int compareTo(final RegisteredDeploymentUnitProcessor o){
  final int rel=Integer.signum(priority - o.priority);
  return rel == 0 ? processor.getClass().getName().compareTo(o.getClass().getName()) : rel;
}

Fixed version (ground truth):
@Override public int compareTo(final RegisteredDeploymentUnitProcessor o){
  final int rel=Integer.signum(priority - o.priority);
  return rel == 0 ? processor.getClass().getName().compareTo(o.processor.getClass().getName()) : rel;
}
Program: 167771
Project: 167771
Buggy source:
public static void registerJBossXMLParsers(){
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER,new JBossAllXmlParserRegisteringProcessor<DeploymentDependencies>(ROOT_1_0,DeploymentDependencies.ATTACHMENT_KEY,DeploymentDependenciesParserV_1_0.INSTANCE));
}

Fixed version (ground truth):
public static void registerJBossXMLParsers(){
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_DEPLOYMENT_DEPS,new JBossAllXmlParserRegisteringProcessor<DeploymentDependencies>(ROOT_1_0,DeploymentDependencies.ATTACHMENT_KEY,DeploymentDependenciesParserV_1_0.INSTANCE));
}
Program: 167772
Project: 167772
Buggy source:
public static void registerJBossXMLParsers(){
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER,new JBossAllXmlParserRegisteringProcessor<ParseResult>(ROOT_1_0,RESULT_ATTACHMENT_KEY,JBossDeploymentStructureParser10.JBOSS_ALL_XML_PARSER));
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER,new JBossAllXmlParserRegisteringProcessor<ParseResult>(ROOT_1_1,RESULT_ATTACHMENT_KEY,JBossDeploymentStructureParser11.JBOSS_ALL_XML_PARSER));
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_XML_PARSER,new JBossAllXmlParserRegisteringProcessor<ParseResult>(ROOT_1_2,RESULT_ATTACHMENT_KEY,JBossDeploymentStructureParser12.JBOSS_ALL_XML_PARSER));
}

Fixed version (ground truth):
public static void registerJBossXMLParsers(){
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_STRUCTURE_1_0,new JBossAllXmlParserRegisteringProcessor<ParseResult>(ROOT_1_0,RESULT_ATTACHMENT_KEY,JBossDeploymentStructureParser10.JBOSS_ALL_XML_PARSER));
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_STRUCTURE_1_1,new JBossAllXmlParserRegisteringProcessor<ParseResult>(ROOT_1_1,RESULT_ATTACHMENT_KEY,JBossDeploymentStructureParser11.JBOSS_ALL_XML_PARSER));
  DeployerChainAddHandler.addDeploymentProcessor(ServerService.SERVER_NAME,Phase.STRUCTURE,Phase.STRUCTURE_REGISTER_JBOSS_ALL_STRUCTURE_1_2,new JBossAllXmlParserRegisteringProcessor<ParseResult>(ROOT_1_2,RESULT_ATTACHMENT_KEY,JBossDeploymentStructureParser12.JBOSS_ALL_XML_PARSER));
}
Program: 167773
Project: 167773
Buggy source:
static Locale getLocale(OperationContext context,final ModelNode operation) throws OperationFailedException {
  if (!operation.hasDefined(LOCALE.getName())) {
    return null;
  }
  String unparsed=normalizeLocale(operation.get(LOCALE.getName()).asString());
  int len=unparsed.length();
  if (len != 2 && len != 5 && len < 7) {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  char char0=unparsed.charAt(0);
  char char1=unparsed.charAt(1);
  if (char0 < 'a' || char0 > 'z' || char1 < 'a' || char1 > 'z') {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  if (len == 2) {
    return new Locale(unparsed,"String_Node_Str");
  }
  if (!isLocaleSeparator(unparsed.charAt(2))) {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  char char3=unparsed.charAt(3);
  if (isLocaleSeparator(char3)) {
    return new Locale(unparsed.substring(0,2),"String_Node_Str",unparsed.substring(4));
  }
  char char4=unparsed.charAt(4);
  if (char3 < 'A' || char3 > 'Z' || char4 < 'A' || char4 > 'Z') {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  if (len == 5) {
    return new Locale(unparsed.substring(0,2),unparsed.substring(3));
  }
  if (!isLocaleSeparator(unparsed.charAt(5))) {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  return new Locale(unparsed.substring(0,2),unparsed.substring(3,5),unparsed.substring(6));
}

Fixed version (ground truth):
static Locale getLocale(OperationContext context,final ModelNode operation) throws OperationFailedException {
  if (!operation.hasDefined(GlobalOperationAttributes.LOCALE.getName())) {
    return null;
  }
  String unparsed=normalizeLocale(operation.get(GlobalOperationAttributes.LOCALE.getName()).asString());
  int len=unparsed.length();
  if (len != 2 && len != 5 && len < 7) {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  char char0=unparsed.charAt(0);
  char char1=unparsed.charAt(1);
  if (char0 < 'a' || char0 > 'z' || char1 < 'a' || char1 > 'z') {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  if (len == 2) {
    return new Locale(unparsed,"String_Node_Str");
  }
  if (!isLocaleSeparator(unparsed.charAt(2))) {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  char char3=unparsed.charAt(3);
  if (isLocaleSeparator(char3)) {
    return new Locale(unparsed.substring(0,2),"String_Node_Str",unparsed.substring(4));
  }
  char char4=unparsed.charAt(4);
  if (char3 < 'A' || char3 > 'Z' || char4 < 'A' || char4 > 'Z') {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  if (len == 5) {
    return new Locale(unparsed.substring(0,2),unparsed.substring(3));
  }
  if (!isLocaleSeparator(unparsed.charAt(5))) {
    reportInvalidLocaleFormat(context,unparsed);
    return null;
  }
  return new Locale(unparsed.substring(0,2),unparsed.substring(3,5),unparsed.substring(6));
}
Program: 167775
Project: 167775
Buggy source:
@Override public boolean implies(Permission permission){
  if (permission instanceof ManagementPermission) {
    ManagementPermission mperm=(ManagementPermission)permission;
    ManagementPermission provided=permissions.get(mperm.getActionEffect());
    return provided != null && provided.implies(mperm);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean implies(Permission permission){
  if (permission instanceof ManagementPermission) {
    ManagementPermission mperm=(ManagementPermission)permission;
    ManagementPermission provided;
synchronized (permissions) {
      provided=permissions.get(mperm.getActionEffect());
    }
    return provided != null && provided.implies(mperm);
  }
  return false;
}
Program: 167776
Project: 167776
Buggy source:
public static void safeClose(final Closeable closeable){
  if (closeable != null) {
    try {
      closeable.close();
    }
 catch (    IOException e) {
    }
  }
}

Fixed version (ground truth):
public static void safeClose(final ZipFile closeable){
  if (closeable != null) {
    try {
      closeable.close();
    }
 catch (    IOException e) {
    }
  }
}
Program: 167777
Project: 167777
Buggy source:
/** 
 * Creates an exception indicating the   {@link ObjectName} could not be created for the address.
 * @param cause   the cause of the error.
 * @param address the address.
 * @return a {@link RuntimeException} for the error.
 */
@Message(id=11332,value="String_Node_Str") RuntimeException cannotCreateObjectName(@Cause Throwable cause,PathAddress address);

Fixed version (ground truth):
/** 
 * Creates an exception indicating the   {@link ObjectName} could not be created for the address.
 * @param cause   the cause of the error.
 * @param address the address.
 * @param s
 * @return a {@link RuntimeException} for the error.
 */
@Message(id=11332,value="String_Node_Str") RuntimeException cannotCreateObjectName(@Cause Throwable cause,PathAddress address,String s);
Program: 167778
Project: 167778
Buggy source:
static ObjectName createObjectName(final String domain,final PathAddress pathAddress){
  if (pathAddress.size() == 0) {
    return ModelControllerMBeanHelper.createRootObjectName(domain);
  }
  final StringBuilder sb=new StringBuilder(domain);
  sb.append("String_Node_Str");
  boolean first=true;
  for (  PathElement element : pathAddress) {
    if (first) {
      first=false;
    }
 else {
      sb.append("String_Node_Str");
    }
    escapeKey(ESCAPED_KEY_CHARACTERS,sb,element.getKey());
    sb.append("String_Node_Str");
    escapeValue(sb,element.getValue());
  }
  try {
    return ObjectName.getInstance(sb.toString());
  }
 catch (  MalformedObjectNameException e) {
    throw MESSAGES.cannotCreateObjectName(e,pathAddress);
  }
}

Fixed version (ground truth):
static ObjectName createObjectName(final String domain,final PathAddress pathAddress){
  if (pathAddress.size() == 0) {
    return ModelControllerMBeanHelper.createRootObjectName(domain);
  }
  final StringBuilder sb=new StringBuilder(domain);
  sb.append("String_Node_Str");
  boolean first=true;
  for (  PathElement element : pathAddress) {
    if (first) {
      first=false;
    }
 else {
      sb.append("String_Node_Str");
    }
    escapeKey(ESCAPED_KEY_CHARACTERS,sb,element.getKey());
    sb.append("String_Node_Str");
    escapeValue(sb,element.getValue());
  }
  try {
    return ObjectName.getInstance(sb.toString());
  }
 catch (  MalformedObjectNameException e) {
    throw MESSAGES.cannotCreateObjectName(e,pathAddress,sb.toString());
  }
}
Program: 167779
Project: 167779
Buggy source:
private static void escapeValue(final StringBuilder sb,final String value){
  final boolean containsAsterix=value.contains("String_Node_Str");
  final boolean containsBackslash=value.contains("String_Node_Str");
  final boolean containsColon=value.contains("String_Node_Str");
  final boolean containsEquals=value.contains("String_Node_Str");
  final boolean containsNewLine=value.contains("String_Node_Str");
  final boolean containsQuestionMark=value.contains("String_Node_Str");
  final boolean containsQuote=value.contains("String_Node_Str");
  boolean quoted=containsAsterix || containsBackslash || containsColon|| containsEquals|| containsNewLine|| containsQuestionMark|| containsQuote;
  if (quoted) {
    String replaced=value;
    sb.append("String_Node_Str");
    replaced=checkAndReplace(containsAsterix,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsBackslash,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsNewLine,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsQuestionMark,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsQuote,replaced,"String_Node_Str","String_Node_Str");
    sb.append(replaced);
    sb.append("String_Node_Str");
  }
 else {
    sb.append(value);
  }
}

Fixed version (ground truth):
private static void escapeValue(final StringBuilder sb,final String value){
  final boolean containsAsterix=value.contains("String_Node_Str");
  final boolean containsBackslash=value.contains("String_Node_Str");
  final boolean containsColon=value.contains("String_Node_Str");
  final boolean containsEquals=value.contains("String_Node_Str");
  final boolean containsNewLine=value.contains("String_Node_Str");
  final boolean containsQuestionMark=value.contains("String_Node_Str");
  final boolean containsQuote=value.contains("String_Node_Str");
  final boolean containsComma=value.contains("String_Node_Str");
  boolean quoted=containsAsterix || containsBackslash || containsColon|| containsEquals|| containsNewLine|| containsQuestionMark|| containsQuote|| containsComma;
  if (quoted) {
    String replaced=value;
    sb.append("String_Node_Str");
    replaced=checkAndReplace(containsAsterix,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsBackslash,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsNewLine,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsQuestionMark,replaced,"String_Node_Str","String_Node_Str");
    replaced=checkAndReplace(containsQuote,replaced,"String_Node_Str","String_Node_Str");
    sb.append(replaced);
    sb.append("String_Node_Str");
  }
 else {
    sb.append(value);
  }
}
Program: 167780
Project: 167780
Buggy source:
private void fillHistory(ModelNode result,PatchType type,String oneOffPatchID,File historyDir) throws Exception {
  ModelNode history=new ModelNode();
  history.get(type.getName()).set(oneOffPatchID);
  File timestampFile=new File(historyDir,CommonAttributes.TIMESTAMP);
  String timestamp=PatchUtils.readRef(timestampFile);
  history.get(CommonAttributes.APPLIED_AT).set(timestamp);
  result.add(history);
}

Fixed version (ground truth):
private void fillHistory(ModelNode result,PatchType type,String oneOffPatchID,File historyDir) throws Exception {
  ModelNode history=new ModelNode();
  history.get(type.getName()).set(oneOffPatchID);
  File timestampFile=new File(historyDir,Constants.TIMESTAMP);
  String timestamp=PatchUtils.readRef(timestampFile);
  history.get(Constants.APPLIED_AT).set(timestamp);
  result.add(history);
}
Program: 167782
Project: 167782
Buggy source:
static PatchingTask createMiscTask(final ContentModification modification,final MiscContentItem item,final PatchingContext context){
  final File target=context.getTargetFile(item);
  final File backup=context.getBackupFile(item);
  final ModificationType type=modification.getType();
switch (type) {
case ADD:
    return new FileAddTask(item,target,backup,modification);
case MODIFY:
  return new FileModifyTask(item,target,backup,modification);
case REMOVE:
return new FileRemoveTask(item,target,backup,modification);
default :
throw new IllegalStateException();
}
}

Fixed version (ground truth):
static PatchingTask createMiscTask(final ContentModification modification,final MiscContentItem item,final PatchingContext context){
  final File target=context.getTargetFile(item);
  final File backup=context.getBackupFile(item);
  final ModificationType type=modification.getType();
switch (type) {
case ADD:
    return new FileAddTask(item,target,backup,modification);
case MODIFY:
  return new FileUpdateTask(item,target,backup,modification);
case REMOVE:
return new FileRemoveTask(item,target,backup,modification);
default :
throw new IllegalStateException();
}
}
Program: 167785
Project: 167785
Buggy source:
@Override protected void performRuntime(OperationContext context,ModelNode operation,ModelNode model,ServiceVerificationHandler verificationHandler,List<ServiceController<?>> newControllers) throws OperationFailedException {
  final PathAddress address=PathAddress.pathAddress(operation.get(OP_ADDR));
  final String name=address.getLastElement().getValue();
  int bufferSize=BUFFER_SIZE.resolveModelAttribute(context,model).asInt();
  int bufferPerSlice=BUFFER_PER_SLICE.resolveModelAttribute(context,model).asInt();
  boolean direct=DIRECT_BUFFERS.resolveModelAttribute(context,model).asBoolean();
  final BufferPoolService service=new BufferPoolService(bufferSize,bufferPerSlice,direct);
  final ServiceBuilder<Pool<ByteBuffer>> serviceBuilder=context.getServiceTarget().addService(IOServices.BUFFER_POOL.append(name),service);
  serviceBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
  final ServiceController<Pool<ByteBuffer>> serviceController=serviceBuilder.install();
  if (newControllers != null) {
    newControllers.add(serviceController);
  }
}

Fixed version (ground truth):
@Override protected void performRuntime(OperationContext context,ModelNode operation,ModelNode model,ServiceVerificationHandler verificationHandler,List<ServiceController<?>> newControllers) throws OperationFailedException {
  final PathAddress address=PathAddress.pathAddress(operation.get(OP_ADDR));
  final String name=address.getLastElement().getValue();
  int bufferSize=BUFFER_SIZE.resolveModelAttribute(context,model).asInt();
  int bufferPerSlice=BUFFER_PER_SLICE.resolveModelAttribute(context,model).asInt();
  boolean direct=true;
  ModelNode directBuffersModel=DIRECT_BUFFERS.resolveModelAttribute(context,model);
  if (directBuffersModel.isDefined()) {
    direct=directBuffersModel.asBoolean();
  }
  final BufferPoolService service=new BufferPoolService(bufferSize,bufferPerSlice,direct);
  final ServiceBuilder<Pool<ByteBuffer>> serviceBuilder=context.getServiceTarget().addService(IOServices.BUFFER_POOL.append(name),service);
  serviceBuilder.setInitialMode(ServiceController.Mode.ACTIVE);
  final ServiceController<Pool<ByteBuffer>> serviceController=serviceBuilder.install();
  if (newControllers != null) {
    newControllers.add(serviceController);
  }
}
Program: 167787
Project: 167787
Buggy source:
private static void checkFailedTransformedWriteAttributeOperation(ModelTestKernelServices<?> mainServices,ModelVersion modelVersion,ModelNode operation,FailedOperationTransformationConfig config) throws OperationFailedException {
  TransformedOperation transformedOperation=mainServices.transformOperation(modelVersion,operation.clone());
  if (config.expectFailedWriteAttributeOperation(operation)) {
    Assert.assertNotNull("String_Node_Str" + operation,transformedOperation.getFailureDescription());
    if (config.canCorrectMore(operation)) {
      checkFailedTransformedWriteAttributeOperation(mainServices,modelVersion,config.correctWriteAttributeOperation(operation),config);
    }
  }
 else {
    ModelNode result=mainServices.executeOperation(modelVersion,transformedOperation);
    Assert.assertEquals("String_Node_Str" + operation + "String_Node_Str"+ result,SUCCESS,result.get(OUTCOME).asString());
  }
}

Fixed version (ground truth):
private static void checkFailedTransformedWriteAttributeOperation(ModelTestKernelServices<?> mainServices,ModelVersion modelVersion,ModelNode operation,FailedOperationTransformationConfig config) throws OperationFailedException {
  TransformedOperation transformedOperation=mainServices.transformOperation(modelVersion,operation.clone());
  if (config.expectFailedWriteAttributeOperation(operation)) {
    Assert.assertNotNull("String_Node_Str" + operation,transformedOperation.getFailureDescription());
    checkFailedTransformedWriteAttributeOperation(mainServices,modelVersion,config.correctWriteAttributeOperation(operation),config);
  }
 else {
    ModelNode result=mainServices.executeOperation(modelVersion,transformedOperation);
    Assert.assertEquals("String_Node_Str" + operation + "String_Node_Str"+ result,SUCCESS,result.get(OUTCOME).asString());
  }
}
Program: 167788
Project: 167788
Buggy source:
private void revertBindingReinstall(OperationContext context,String bindingName,ModelNode bindingModel,String attributeName,ModelNode previousValue){
  context.removeService(SOCKET_BINDING.append(bindingName));
  ModelNode unresolvedConfig=bindingModel.clone();
  unresolvedConfig.get(attributeName).set(previousValue);
  try {
    BindingAddHandler.installBindingService(context,unresolvedConfig,bindingName);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
private void revertBindingReinstall(OperationContext context,String bindingName,ModelNode bindingModel,String attributeName,ModelNode previousValue){
  context.removeService(SOCKET_BINDING.append(bindingName));
  ModelNode unresolvedConfig=bindingModel.clone();
  unresolvedConfig.get(attributeName).set(previousValue);
  try {
    BindingAddHandler.installBindingService(context,unresolvedConfig,bindingName,null);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 167789
Project: 167789
Buggy source:
private void handleBindingReinstall(OperationContext context,String bindingName,ModelNode bindingModel) throws OperationFailedException {
  context.removeService(SOCKET_BINDING.append(bindingName));
  try {
    BindingAddHandler.installBindingService(context,bindingModel,bindingName);
  }
 catch (  UnknownHostException e) {
    throw new OperationFailedException(new ModelNode().set(e.toString()));
  }
}

Fixed version (ground truth):
private void handleBindingReinstall(OperationContext context,String bindingName,ModelNode bindingModel) throws OperationFailedException {
  context.removeService(SOCKET_BINDING.append(bindingName));
  try {
    BindingAddHandler.installBindingService(context,bindingModel,bindingName,null);
  }
 catch (  UnknownHostException e) {
    throw new OperationFailedException(new ModelNode().set(e.toString()));
  }
}
Program: 167790
Project: 167790
Buggy source:
@Override protected void performRuntime(OperationContext context,ModelNode operation,ModelNode model,ServiceVerificationHandler verificationHandler,List<ServiceController<?>> newControllers) throws OperationFailedException {
  PathAddress address=PathAddress.pathAddress(operation.get(OP_ADDR));
  String name=address.getLastElement().getValue();
  try {
    newControllers.add(installBindingService(context,model,name));
  }
 catch (  UnknownHostException e) {
    throw new OperationFailedException(new ModelNode().set(e.getLocalizedMessage()));
  }
}

Fixed version (ground truth):
@Override protected void performRuntime(OperationContext context,ModelNode operation,ModelNode model,ServiceVerificationHandler verificationHandler,List<ServiceController<?>> newControllers) throws OperationFailedException {
  PathAddress address=PathAddress.pathAddress(operation.get(OP_ADDR));
  String name=address.getLastElement().getValue();
  try {
    newControllers.add(installBindingService(context,model,name,verificationHandler));
  }
 catch (  UnknownHostException e) {
    throw new OperationFailedException(new ModelNode().set(e.getLocalizedMessage()));
  }
}