nus-yam/ex-repair huggingface dataset:
Program: 167993
Project: 167993
Buggy source:
public void start() throws ServerStartException {
  final File standalone=new File(environment.getServerConfigurationDir(),STANDALONE_XML);
  if (!standalone.isFile()) {
    throw new ServerStartException("String_Node_Str" + standalone.getAbsolutePath() + "String_Node_Str");
  }
  if (!standalone.canWrite()) {
    throw new ServerStartException("String_Node_Str" + standalone.getAbsolutePath() + "String_Node_Str");
  }
  final List<AbstractServerModelUpdate<?>> updates=new ArrayList<AbstractServerModelUpdate<?>>();
  try {
    final XMLMapper mapper=XMLMapper.Factory.create();
    extensionRegistrar.registerStandardStandaloneReaders(mapper);
    mapper.parseDocument(updates,XMLInputFactory.newInstance().createXMLStreamReader(new BufferedReader(new FileReader(standalone))));
  }
 catch (  Exception e) {
    throw new ServerStartException("String_Node_Str",e);
  }
  final ServerStartTask startTask=new ServerStartTask("String_Node_Str",0,null,Collections.<ServiceActivator>emptyList(),updates);
  startTask.run(Collections.<ServiceActivator>emptyList());
  new Thread(){
{
      setName("String_Node_Str");
      setDaemon(false);
      setPriority(MIN_PRIORITY);
    }
    public void run(){
      for (; ; )       try {
        sleep(1000000L);
      }
 catch (      InterruptedException ignore) {
      }
    }
  }
.start();
}

Fixed version (ground truth):
public void start() throws ServerStartException {
  final File standalone=new File(environment.getServerConfigurationDir(),STANDALONE_XML);
  if (!standalone.isFile()) {
    throw new ServerStartException("String_Node_Str" + standalone.getAbsolutePath() + "String_Node_Str");
  }
  if (!standalone.canWrite()) {
    throw new ServerStartException("String_Node_Str" + standalone.getAbsolutePath() + "String_Node_Str");
  }
  final List<AbstractServerModelUpdate<?>> updates=new ArrayList<AbstractServerModelUpdate<?>>();
  try {
    final XMLMapper mapper=XMLMapper.Factory.create();
    extensionRegistrar.registerStandardStandaloneReaders(mapper);
    mapper.parseDocument(updates,XMLInputFactory.newInstance().createXMLStreamReader(new BufferedReader(new FileReader(standalone))));
  }
 catch (  Exception e) {
    throw new ServerStartException("String_Node_Str",e);
  }
  final ServerStartTask startTask=new ServerStartTask("String_Node_Str",0,null,Collections.<ServiceActivator>emptyList(),updates,environment);
  startTask.run(Collections.<ServiceActivator>emptyList());
  new Thread(){
{
      setName("String_Node_Str");
      setDaemon(false);
      setPriority(MIN_PRIORITY);
    }
    @Override public void run(){
      for (; ; )       try {
        sleep(1000000L);
      }
 catch (      InterruptedException ignore) {
      }
    }
  }
.start();
}
Program: 167994
Project: 167994
Buggy source:
public void run(){
  for (; ; )   try {
    sleep(1000000L);
  }
 catch (  InterruptedException ignore) {
  }
}

Fixed version (ground truth):
@Override public void run(){
  for (; ; )   try {
    sleep(1000000L);
  }
 catch (  InterruptedException ignore) {
  }
}
Program: 167995
Project: 167995
Buggy source:
@Override public void start(StartContext context) throws StartException {
  ServerEnvironment env;
  try {
    env=serverEnvironment.getValue();
  }
 catch (  IllegalStateException ise) {
    throw new StartException(ServerEnvironment.class.getSimpleName() + "String_Node_Str");
  }
  if (env.isStandalone()) {
    File configDir=serverEnvironment.getValue().getServerConfigurationDir();
    if (configDir.exists()) {
      if (!configDir.isDirectory()) {
        throw new StartException(configDir.getAbsolutePath() + "String_Node_Str");
      }
 else       if (!configDir.canWrite()) {
        throw new StartException(configDir.getAbsolutePath() + "String_Node_Str");
      }
    }
 else     if (!configDir.mkdirs()) {
      throw new StartException("String_Node_Str" + configDir.getAbsolutePath());
    }
    configFile=new File(configDir,"String_Node_Str");
    if (configFile.exists()) {
      if (configFile.isDirectory()) {
        throw new StartException(configFile.getAbsolutePath() + "String_Node_Str");
      }
 else       if (!configDir.canWrite()) {
        throw new StartException(configFile.getAbsolutePath() + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
@Override public void start(StartContext context) throws StartException {
  ServerEnvironment env;
  try {
    env=serverEnvironment.getValue();
  }
 catch (  IllegalStateException ise) {
    throw new StartException(ServerEnvironment.class.getSimpleName() + "String_Node_Str");
  }
  if (env.isStandalone()) {
    File configDir=env.getServerConfigurationDir();
    if (configDir.exists()) {
      if (!configDir.isDirectory()) {
        throw new StartException(configDir.getAbsolutePath() + "String_Node_Str");
      }
 else       if (!configDir.canWrite()) {
        throw new StartException(configDir.getAbsolutePath() + "String_Node_Str");
      }
    }
 else     if (!configDir.mkdirs()) {
      throw new StartException("String_Node_Str" + configDir.getAbsolutePath());
    }
    configFile=new File(configDir,"String_Node_Str");
    if (configFile.exists()) {
      if (configFile.isDirectory()) {
        throw new StartException(configFile.getAbsolutePath() + "String_Node_Str");
      }
 else       if (!configDir.canWrite()) {
        throw new StartException(configFile.getAbsolutePath() + "String_Node_Str");
      }
    }
  }
}
Program: 167996
Project: 167996
Buggy source:
private UpdateResultHandler<R,P> getDelegate(){
  return this.delegate;
}

Fixed version (ground truth):
private UpdateResultHandler<? super R,P> getDelegate(){
  return this.delegate;
}
Program: 167997
Project: 167997
Buggy source:
@Override public void handleRollbackFailure(Throwable cause,P param){
  rollbackFailed();
  if (delegate != null) {
    delegate.handleRollbackFailure(cause,param);
  }
}

Fixed version (ground truth):
@Override public void handleRollbackFailure(Throwable cause,P param){
  rollbackFailed();
  if (delegate != null) {
    delegate.handleRollbackFailure(cause,param);
  }
  logger.errorf(cause,"String_Node_Str",param);
}
Program: 167998
Project: 167998
Buggy source:
/** 
 * Add a new update to the set of updates to be executed.
 * @param < R > the result type provided by the update
 * @param < P > the parameter type expected by the result handler
 * @param update the update. Cannot be {@code null}
 * @param resultHandler a handler for the update result. May be {@code null}
 * @param param parameter to pass to {@code resultHandler}. May be   {@code null}if   {@code <P>} is {@code Void} or {@code resultHandler} is{@code null}.
 * @throws IllegalStateException if {@link #getStatus()} is not {@link Status#PENDING}
 */
public <R,P>void addServerModelUpdate(AbstractServerModelUpdate<R> update,UpdateResultHandler<R,P> resultHandler,P param){
synchronized (this) {
    if (status != Status.PENDING)     throw new IllegalStateException("String_Node_Str");
    updates.add(new ServerModelUpdateTuple<R,P>(update,resultHandler,param));
  }
}

Fixed version (ground truth):
/** 
 * Add a new update to the set of updates to be executed.
 * @param < R > the result type provided by the update
 * @param < P > the parameter type expected by the result handler
 * @param update the update. Cannot be {@code null}
 * @param resultHandler a handler for the update result. May be {@code null}
 * @param param parameter to pass to {@code resultHandler}. May be   {@code null}if   {@code <P>} is {@code Void} or {@code resultHandler} is{@code null}.
 * @throws IllegalStateException if {@link #getStatus()} is not {@link Status#PENDING}
 */
public <R,P>void addServerModelUpdate(AbstractServerModelUpdate<R> update,UpdateResultHandler<? super R,P> resultHandler,P param){
synchronized (this) {
    if (status != Status.PENDING)     throw new IllegalStateException("String_Node_Str");
    updates.add(new ServerModelUpdateTuple<R,P>(update,resultHandler,param));
  }
}
Program: 167999
Project: 167999
Buggy source:
@Override public void handleFailure(Throwable cause,P param){
  updateFailed();
  if (delegate != null) {
    delegate.handleFailure(cause,param);
  }
}

Fixed version (ground truth):
@Override public void handleFailure(Throwable cause,P param){
  updateFailed();
  if (delegate != null) {
    delegate.handleFailure(cause,param);
  }
  logger.errorf(cause,"String_Node_Str",param);
}
Program: 168000
Project: 168000
Buggy source:
private DelegatingUpdateResultHandler(final UpdateResultHandler<R,P> delegate){
  this.delegate=delegate;
}

Fixed version (ground truth):
private DelegatingUpdateResultHandler(final UpdateResultHandler<? super R,P> delegate){
  this.delegate=delegate;
}
Program: 168001
Project: 168001
Buggy source:
public ServerModelUpdateTuple(final AbstractServerModelUpdate<R> update,final UpdateResultHandler<R,P> resultHandler,final P param){
  if (update == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.update=update;
  this.resultHandler=new DelegatingUpdateResultHandler<R,P>(resultHandler);
  this.param=param;
}

Fixed version (ground truth):
public ServerModelUpdateTuple(final AbstractServerModelUpdate<R> update,final UpdateResultHandler<? super R,P> resultHandler,final P param){
  if (update == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  this.update=update;
  this.resultHandler=new DelegatingUpdateResultHandler<R,P>(resultHandler);
  this.param=param;
}
Program: 168002
Project: 168002
Buggy source:
private void generateResult(Status status){
  Map<UUID,ServerDeploymentActionResult> planResults=new HashMap<UUID,ServerDeploymentActionResult>();
  for (  Map.Entry<UUID,ServerDeploymentActionResult> entry : updateResults.entrySet()) {
    if (entry.getValue().getResult() != Result.NOT_EXECUTED) {
      ServerDeploymentActionResult rollbackResult=null;
      if (successfulRollbacks.contains(entry.getKey())) {
        rollbackResult=new SimpleServerDeploymentActionResult(entry.getKey(),Result.EXECUTED);
      }
 else       if (failedRollbacks.containsKey(entry.getKey())) {
        Throwable cause=failedRollbacks.get(entry.getKey());
        rollbackResult=new SimpleServerDeploymentActionResult(entry.getKey(),cause);
      }
      if (rollbackResult != null) {
        AbstractServerUpdateActionResult.installRollbackResult((AbstractServerUpdateActionResult<ServerDeploymentActionResult>)entry.getValue(),rollbackResult);
      }
    }
    planResults.put(entry.getKey(),entry.getValue());
  }
  DeploymentPlanResultImpl result=new DeploymentPlanResultImpl(plan.getId(),planResults);
  future.set(result);
}

Fixed version (ground truth):
private void generateResult(Status status){
  Map<UUID,ServerDeploymentActionResult> planResults=new HashMap<UUID,ServerDeploymentActionResult>();
  for (  Map.Entry<UUID,ServerDeploymentActionResult> entry : updateResults.entrySet()) {
    ServerDeploymentActionResult actionResult=entry.getValue();
    if (actionResult == null) {
      actionResult=new SimpleServerDeploymentActionResult(entry.getKey(),Result.EXECUTED);
    }
    if (actionResult.getResult() != Result.NOT_EXECUTED) {
      ServerDeploymentActionResult rollbackResult=null;
      if (successfulRollbacks.contains(entry.getKey())) {
        rollbackResult=new SimpleServerDeploymentActionResult(entry.getKey(),Result.EXECUTED);
      }
 else       if (failedRollbacks.containsKey(entry.getKey())) {
        Throwable cause=failedRollbacks.get(entry.getKey());
        rollbackResult=new SimpleServerDeploymentActionResult(entry.getKey(),cause);
      }
      if (rollbackResult != null) {
        AbstractServerUpdateActionResult.installRollbackResult((AbstractServerUpdateActionResult<ServerDeploymentActionResult>)entry.getValue(),rollbackResult);
      }
    }
    planResults.put(entry.getKey(),actionResult);
  }
  DeploymentPlanResultImpl result=new DeploymentPlanResultImpl(plan.getId(),planResults);
  future.set(result);
}
Program: 168003
Project: 168003
Buggy source:
@Override public void handleTimeout(UUID param){
synchronized (updateResults) {
  }
}

Fixed version (ground truth):
@Override public void handleTimeout(UUID param){
synchronized (updateResults) {
    updateResults.put(param,new SimpleServerDeploymentActionResult(param,Result.FAILED));
  }
}
Program: 168004
Project: 168004
Buggy source:
@Override public void handleCancellation(UUID param){
synchronized (updateResults) {
  }
}

Fixed version (ground truth):
@Override public void handleCancellation(UUID param){
synchronized (updateResults) {
    updateResults.put(param,new SimpleServerDeploymentActionResult(param,Result.NOT_EXECUTED));
  }
}
Program: 168006
Project: 168006
Buggy source:
@Override public void handleSuccess(ServerDeploymentActionResult result,UUID param){
synchronized (updateResults) {
    updateResults.put(param,result);
  }
}

Fixed version (ground truth):
@Override public void handleSuccess(Object result,UUID param){
synchronized (updateResults) {
    if (result instanceof ServerDeploymentActionResult) {
      updateResults.put(param,(ServerDeploymentActionResult)result);
    }
 else {
      updateResults.put(param,new SimpleServerDeploymentActionResult(param,Result.EXECUTED));
    }
  }
}
Program: 168007
Project: 168007
Buggy source:
@Override public byte[] distributeReplacementDeploymentContent(String name,String commonName,InputStream stream) throws IOException {
  return getDeploymentRepository().addDeploymentContent(name,stream);
}

Fixed version (ground truth):
@Override public byte[] distributeReplacementDeploymentContent(String name,String runtimeName,InputStream stream) throws IOException {
  return getDeploymentRepository().addDeploymentContent(name,runtimeName,stream);
}
Program: 168008
Project: 168008
Buggy source:
@Override public void handleFailure(Throwable cause,UUID param){
synchronized (updateResults) {
  }
}

Fixed version (ground truth):
@Override public void handleFailure(Throwable cause,UUID param){
synchronized (updateResults) {
    updateResults.put(param,new SimpleServerDeploymentActionResult(param,cause));
  }
}
Program: 168009
Project: 168009
Buggy source:
@Override public Future<ServerDeploymentPlanResult> execute(final DeploymentPlan plan){
  if (!(plan instanceof DeploymentPlanImpl)) {
    throw new IllegalArgumentException("String_Node_Str" + DeploymentPlan.class.getSimpleName() + "String_Node_Str"+ plan.getClass().getName());
  }
  final SimpleFuture<ServerDeploymentPlanResult> resultFuture=new SimpleFuture<ServerDeploymentPlanResult>();
  final UpdateResultHandlerImpl resultHandler=new UpdateResultHandlerImpl(resultFuture,plan);
  final ServerUpdateController controller=new ServerUpdateController(getServerConfiguration(),getServiceContainer(),getDeploymentExecutor(),resultHandler,plan.isGlobalRollback(),plan.isShutdown());
  DeploymentPlanImpl planImpl=(DeploymentPlanImpl)plan;
  for (  DeploymentActionImpl action : planImpl.getDeploymentActionImpls()) {
    addServerGroupDeploymentUpdate(action,resultHandler,controller);
  }
  Runnable r=new Runnable(){
    @Override public void run(){
      logger.debugf("String_Node_Str",plan.getId().toString());
      controller.executeUpdates();
    }
  }
;
  getDeploymentExecutor().execute(r);
  return resultFuture;
}

Fixed version (ground truth):
@Override public Future<ServerDeploymentPlanResult> execute(final DeploymentPlan plan){
  if (!(plan instanceof DeploymentPlanImpl)) {
    throw new IllegalArgumentException("String_Node_Str" + DeploymentPlan.class.getSimpleName() + "String_Node_Str"+ plan.getClass().getName());
  }
  final SimpleFuture<ServerDeploymentPlanResult> resultFuture=new SimpleFuture<ServerDeploymentPlanResult>();
  final UpdateResultHandlerImpl resultHandler=new UpdateResultHandlerImpl(resultFuture,plan);
  final ServerUpdateController controller=new ServerUpdateController(getServerConfiguration(),getServiceContainer(),getDeploymentExecutor(),resultHandler,plan.isGlobalRollback(),!plan.isShutdown());
  DeploymentPlanImpl planImpl=(DeploymentPlanImpl)plan;
  for (  DeploymentActionImpl action : planImpl.getDeploymentActionImpls()) {
    addServerGroupDeploymentUpdate(action,resultHandler,controller);
  }
  Runnable r=new Runnable(){
    @Override public void run(){
      logger.debugf("String_Node_Str",plan.getId().toString());
      controller.executeUpdates();
    }
  }
;
  getDeploymentExecutor().execute(r);
  return resultFuture;
}
Program: 168010
Project: 168010
Buggy source:
@Override public byte[] distributeDeploymentContent(String name,String commonName,InputStream stream) throws IOException, DuplicateDeploymentNameException {
  return getDeploymentRepository().addDeploymentContent(name,stream);
}

Fixed version (ground truth):
@Override public byte[] distributeDeploymentContent(String name,String runtimeName,InputStream stream) throws IOException, DuplicateDeploymentNameException {
  if (ServerDeploymentManagerImpl.this.serverConfiguration.getDeployment(name) != null) {
    throw new DuplicateDeploymentNameException(name,false);
  }
  return getDeploymentRepository().addDeploymentContent(name,runtimeName,stream);
}
Program: 168011
Project: 168011
Buggy source:
/** 
 * Creates a new StandaloneDeploymentManagerImpl.
 * @param serverConfiguration the server's configuration model. Cannot be <code>null</code>
 * @param serviceContainer the server's service container. Cannot be <code>null</code>
 * @throws IllegalArgumentException if a required parameter is <code>null</code>
 */
public ServerDeploymentManagerImpl(ServerModel serverConfiguration,ServiceContainer serviceContainer){
  if (serverConfiguration == null)   throw new IllegalArgumentException("String_Node_Str");
  if (serviceContainer == null)   throw new IllegalArgumentException("String_Node_Str");
  this.serverConfiguration=serverConfiguration;
  this.serviceContainer=serviceContainer;
  this.contentDistributor=new DeploymentContentDistributor(){
    @Override public byte[] distributeDeploymentContent(    String name,    String commonName,    InputStream stream) throws IOException, DuplicateDeploymentNameException {
      return getDeploymentRepository().addDeploymentContent(name,stream);
    }
    @Override public byte[] distributeReplacementDeploymentContent(    String name,    String commonName,    InputStream stream) throws IOException {
      return getDeploymentRepository().addDeploymentContent(name,stream);
    }
  }
;
}

Fixed version (ground truth):
/** 
 * Creates a new StandaloneDeploymentManagerImpl.
 * @param serverConfiguration the server's configuration model. Cannot be <code>null</code>
 * @param serviceContainer the server's service container. Cannot be <code>null</code>
 * @throws IllegalArgumentException if a required parameter is <code>null</code>
 */
public ServerDeploymentManagerImpl(final ServerModel serverConfiguration,ServiceContainer serviceContainer){
  if (serverConfiguration == null)   throw new IllegalArgumentException("String_Node_Str");
  if (serviceContainer == null)   throw new IllegalArgumentException("String_Node_Str");
  this.serverConfiguration=serverConfiguration;
  this.serviceContainer=serviceContainer;
  this.contentDistributor=new DeploymentContentDistributor(){
    @Override public byte[] distributeDeploymentContent(    String name,    String runtimeName,    InputStream stream) throws IOException, DuplicateDeploymentNameException {
      if (ServerDeploymentManagerImpl.this.serverConfiguration.getDeployment(name) != null) {
        throw new DuplicateDeploymentNameException(name,false);
      }
      return getDeploymentRepository().addDeploymentContent(name,runtimeName,stream);
    }
    @Override public byte[] distributeReplacementDeploymentContent(    String name,    String runtimeName,    InputStream stream) throws IOException {
      return getDeploymentRepository().addDeploymentContent(name,runtimeName,stream);
    }
  }
;
}
Program: 168012
Project: 168012
Buggy source:
@Override public byte[] addDeploymentContent(String name,InputStream stream) throws IOException {
  log.debugf("String_Node_Str",name);
  byte[] sha1Bytes=null;
  File tmp=File.createTempFile(name,"String_Node_Str",repoRoot);
  FileOutputStream fos=new FileOutputStream(tmp);
synchronized (messageDigest) {
    messageDigest.reset();
    try {
      DigestOutputStream dos=new DigestOutputStream(fos,messageDigest);
      BufferedInputStream bis=new BufferedInputStream(stream);
      byte[] bytes=new byte[8192];
      int read;
      while ((read=bis.read(bytes)) > -1) {
        dos.write(bytes,0,read);
      }
    }
  finally {
      try {
        fos.close();
      }
 catch (      Exception ignored) {
      }
    }
    sha1Bytes=messageDigest.digest();
  }
  String sha1=bytesToHexString(sha1Bytes);
  String partA=sha1.substring(0,2);
  String partB=sha1.substring(2);
  File base=new File(repoRoot,partA);
  validateDir(base);
  File realDir=new File(base,partB);
  if (!realDir.exists() && !realDir.mkdirs()) {
    throw new IllegalStateException("String_Node_Str" + realDir.getAbsolutePath());
  }
  File realFile=new File(realDir,"String_Node_Str");
  if (realFile.exists()) {
    if (!tmp.delete()) {
      tmp.deleteOnExit();
    }
    log.debugf("String_Node_Str",name,realFile.getAbsolutePath());
  }
 else {
    moveTempToPermanent(tmp,realFile);
    log.infof("String_Node_Str",name,realFile.getAbsolutePath());
  }
  return sha1Bytes;
}

Fixed version (ground truth):
@Override public byte[] addDeploymentContent(String name,String runtimeName,InputStream stream) throws IOException {
  log.debugf("String_Node_Str",name);
  byte[] sha1Bytes=null;
  File tmp=File.createTempFile(name,"String_Node_Str",repoRoot);
  FileOutputStream fos=new FileOutputStream(tmp);
synchronized (messageDigest) {
    messageDigest.reset();
    try {
      DigestOutputStream dos=new DigestOutputStream(fos,messageDigest);
      BufferedInputStream bis=new BufferedInputStream(stream);
      byte[] bytes=new byte[8192];
      int read;
      while ((read=bis.read(bytes)) > -1) {
        dos.write(bytes,0,read);
      }
    }
  finally {
      try {
        fos.close();
      }
 catch (      Exception ignored) {
      }
    }
    sha1Bytes=messageDigest.digest();
  }
  String sha1=bytesToHexString(sha1Bytes);
  String partA=sha1.substring(0,2);
  String partB=sha1.substring(2);
  File base=new File(repoRoot,partA);
  validateDir(base);
  File realDir=new File(base,partB);
  if (!realDir.exists() && !realDir.mkdirs()) {
    throw new IllegalStateException("String_Node_Str" + realDir.getAbsolutePath());
  }
  File realFile=new File(realDir,CONTENT);
  if (realFile.exists()) {
    if (!tmp.delete()) {
      tmp.deleteOnExit();
    }
    log.debugf("String_Node_Str",name,realFile.getAbsolutePath());
  }
 else {
    moveTempToPermanent(tmp,realFile);
    log.infof("String_Node_Str",name,realFile.getAbsolutePath());
  }
  return sha1Bytes;
}
Program: 168013
Project: 168013
Buggy source:
@Override public Closeable mountDeploymentContent(String name,byte[] deploymentHash,VirtualFile mountPoint) throws IOException {
  String sha1=bytesToHexString(deploymentHash);
  String partA=sha1.substring(0,2);
  String partB=sha1.substring(2);
  File base=new File(repoRoot,partA);
  File hashDir=new File(base,partB);
  File content=new File(hashDir,"String_Node_Str");
  return VFS.mountZip(content,mountPoint,TempFileProviderService.provider());
}

Fixed version (ground truth):
@Override public Closeable mountDeploymentContent(String name,String runtimeName,byte[] deploymentHash,VirtualFile mountPoint) throws IOException {
  String sha1=bytesToHexString(deploymentHash);
  String partA=sha1.substring(0,2);
  String partB=sha1.substring(2);
  File base=new File(repoRoot,partA);
  File hashDir=new File(base,partB);
  File content=new File(hashDir,CONTENT);
  return VFS.mountZip(content,mountPoint,TempFileProviderService.provider());
}
Program: 168014
Project: 168014
Buggy source:
protected void applyUpdate(final ThreadsSubsystemElement element) throws UpdateFailedException {
  final UnboundedQueueThreadPoolElement poolElement=new UnboundedQueueThreadPoolElement(getName());
  poolElement.setKeepaliveTime(getKeepaliveTime());
  poolElement.setThreadFactory(getThreadFactory());
  poolElement.setMaxThreads(getMaxThreads());
  element.addExecutor(getName(),new ChildElement<UnboundedQueueThreadPoolElement>(Element.UNBOUNDED_QUEUE_THREAD_POOL.getLocalName(),poolElement));
}

Fixed version (ground truth):
@Override protected void applyUpdate(final ThreadsSubsystemElement element) throws UpdateFailedException {
  final ScheduledThreadPoolElement poolElement=new ScheduledThreadPoolElement(getName());
  poolElement.setKeepaliveTime(getKeepaliveTime());
  poolElement.setThreadFactory(getThreadFactory());
  poolElement.setMaxThreads(getMaxThreads());
  element.addExecutor(getName(),new ChildElement<ScheduledThreadPoolElement>(Element.SCHEDULED_THREAD_POOL.getLocalName(),poolElement));
}
Program: 168015
Project: 168015
Buggy source:
@Override public BatchServiceBuilder addInjectionValue(Injector target,Value value){
  delegate.addInjection(target,value);
  return this;
}

Fixed version (ground truth):
@Override public <I>BatchServiceBuilder<T> addInjectionValue(Injector<? super I> target,Value<I> value){
  delegate.<I>addInjectionValue(target,value);
  return this;
}
Program: 168016
Project: 168016
Buggy source:
@Override public BatchServiceBuilder addInjection(Injector target,Object value){
  delegate.addInjection(target,value);
  return this;
}

Fixed version (ground truth):
@Override public <I>BatchServiceBuilder<T> addInjection(Injector<? super I> target,I value){
  delegate.addInjection(target,value);
  return this;
}
Program: 168017
Project: 168017
Buggy source:
@Override public BatchServiceBuilder addOptionalDependency(ServiceName dependency,Class type,Injector target){
  delegate.addOptionalDependency(dependency,type,target);
  return this;
}

Fixed version (ground truth):
@Override public <I>BatchServiceBuilder<T> addOptionalDependency(ServiceName dependency,Class<I> type,Injector<I> target){
  delegate.addOptionalDependency(dependency,type,target);
  return this;
}
Program: 168018
Project: 168018
Buggy source:
@Override public BatchServiceBuilder addAliases(ServiceName... aliases){
  delegate.addAliases(aliases);
  return this;
}

Fixed version (ground truth):
@Override public BatchServiceBuilder<T> addAliases(ServiceName... aliases){
  delegate.addAliases(aliases);
  return this;
}
Program: 168019
Project: 168019
Buggy source:
@Override public BatchServiceBuilder addDependency(ServiceName dependency,Class type,Injector target){
  delegate.addDependency(dependency,type,target);
  return this;
}

Fixed version (ground truth):
@Override public <I>BatchServiceBuilder<T> addDependency(ServiceName dependency,Class<I> type,Injector<I> target){
  delegate.addDependency(dependency,type,target);
  return this;
}
Program: 168020
Project: 168020
Buggy source:
@Override public BatchServiceBuilder addDependencies(Iterable<ServiceName> dependencies){
  delegate.addDependencies(dependencies);
  return this;
}

Fixed version (ground truth):
@Override public BatchServiceBuilder<T> addDependencies(Iterable<ServiceName> dependencies){
  delegate.addDependencies(dependencies);
  return this;
}
Program: 168021
Project: 168021
Buggy source:
@Override public BatchServiceBuilder setLocation(Location location){
  delegate.setLocation(location);
  return this;
}

Fixed version (ground truth):
@Override public BatchServiceBuilder<T> setLocation(Location location){
  delegate.setLocation(location);
  return this;
}
Program: 168022
Project: 168022
Buggy source:
@Override public BatchServiceBuilder setInitialMode(ServiceController.Mode mode){
  if (mode.equals(ServiceController.Mode.ON_DEMAND)) {
    ServerStartBatchBuilder.this.serverStartupListener.expectOnDemand(serviceName);
  }
 else {
    ServerStartBatchBuilder.this.serverStartupListener.unexpectOnDemand(serviceName);
  }
  delegate.setInitialMode(mode);
  return this;
}

Fixed version (ground truth):
@Override public BatchServiceBuilder<T> setInitialMode(ServiceController.Mode mode){
  if (mode.equals(ServiceController.Mode.ON_DEMAND)) {
    serverStartupListener.expectOnDemand(serviceName);
  }
 else {
    serverStartupListener.unexpectOnDemand(serviceName);
  }
  delegate.setInitialMode(mode);
  return this;
}
Program: 168023
Project: 168023
Buggy source:
@Override public BatchServiceBuilder addOptionalDependencies(Iterable<ServiceName> dependencies){
  delegate.addOptionalDependencies(dependencies);
  return this;
}

Fixed version (ground truth):
@Override public BatchServiceBuilder<T> addOptionalDependencies(Iterable<ServiceName> dependencies){
  delegate.addOptionalDependencies(dependencies);
  return this;
}
Program: 168024
Project: 168024
Buggy source:
@Override public BatchServiceBuilder addListener(Collection<? extends ServiceListener<? super T>> collection){
  delegate.addListener(collection);
  return this;
}

Fixed version (ground truth):
@Override public BatchServiceBuilder<T> addListener(Collection<? extends ServiceListener<? super T>> collection){
  delegate.addListener(collection);
  return this;
}
Program: 168025
Project: 168025
Buggy source:
/** 
 * {@inheritDoc} 
 */
protected Class<RemotingSubsystemElement> getElementClass(){
  return RemotingSubsystemElement.class;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override protected Class<RemotingSubsystemElement> getElementClass(){
  return RemotingSubsystemElement.class;
}
Program: 168026
Project: 168026
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void activate(final ServiceActivatorContext context){
  log.info("String_Node_Str");
  final BatchBuilder batchBuilder=context.getBatchBuilder();
  final EndpointService endpointService=new EndpointService();
  final Injector<Executor> executorInjector=endpointService.getExecutorInjector();
  final BatchServiceBuilder<Endpoint> serviceBuilder=batchBuilder.addService(JBOSS_REMOTING_ENDPOINT,endpointService);
  serviceBuilder.addDependency(JBOSS_THREAD_SCHEDULED_EXECUTOR.append(threadPoolName),Executor.class,executorInjector);
  serviceBuilder.setInitialMode(ServiceController.Mode.ON_DEMAND);
  endpointService.setOptionMap(OptionMap.EMPTY);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void activate(final ServiceActivatorContext context){
  log.info("String_Node_Str");
  final BatchBuilder batchBuilder=context.getBatchBuilder();
  final EndpointService endpointService=new EndpointService();
  final Injector<Executor> executorInjector=endpointService.getExecutorInjector();
  final BatchServiceBuilder<Endpoint> serviceBuilder=batchBuilder.addService(JBOSS_REMOTING_ENDPOINT,endpointService);
  serviceBuilder.addDependency(JBOSS_THREAD_SCHEDULED_EXECUTOR.append(threadPoolName),Executor.class,executorInjector);
  serviceBuilder.setInitialMode(ServiceController.Mode.ON_DEMAND);
  endpointService.setOptionMap(OptionMap.EMPTY);
}
Program: 168027
Project: 168027
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  for (  ConnectorElement element : connectors.values()) {
    streamWriter.writeStartElement("String_Node_Str");
    element.writeContent(streamWriter);
  }
  streamWriter.writeEndElement();
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute(Attribute.THREAD_POOL.getLocalName(),threadPoolName);
  for (  ConnectorElement element : connectors.values()) {
    streamWriter.writeStartElement("String_Node_Str");
    element.writeContent(streamWriter);
  }
  streamWriter.writeEndElement();
}
Program: 168028
Project: 168028
Buggy source:
/** 
 * {@inheritDoc} 
 */
public long elementHash(){
  return calculateElementHashOf(connectors.values(),0L);
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
@Override public long elementHash(){
  return calculateElementHashOf(connectors.values(),0L);
}
Program: 168029
Project: 168029
Buggy source:
protected static TimeSpec readTimeSpecElement(final XMLExtendedStreamReader reader) throws XMLStreamException {
  TimeUnit unit=null;
  long qty=-1L;
  final int count=reader.getAttributeCount();
  for (int i=0; i < count; i++) {
switch (Attribute.forName(reader.getAttributeLocalName(i))) {
case TIME:
{
        qty=reader.getLongAttributeValue(i);
        break;
      }
case UNIT:
{
      unit=reader.getAttributeValue(i,TimeUnit.class);
      break;
    }
default :
{
    throw unexpectedAttribute(reader,i);
  }
}
}
if (qty == -1L) throw missingRequired(reader,Collections.singleton(Attribute.TIME));
if (unit == null) throw missingRequired(reader,Collections.singleton(Attribute.UNIT));
requireNoContent(reader);
return new TimeSpec(unit,qty);
}

Fixed version (ground truth):
protected static TimeSpec readTimeSpecElement(final XMLExtendedStreamReader reader) throws XMLStreamException {
  TimeUnit unit=null;
  long qty=-1L;
  final int count=reader.getAttributeCount();
  for (int i=0; i < count; i++) {
switch (Attribute.forName(reader.getAttributeLocalName(i))) {
case TIME:
{
        qty=reader.getLongAttributeValue(i);
        break;
      }
case UNIT:
{
      String val=reader.getAttributeValue(i);
      unit=Enum.valueOf(TimeUnit.class,val.toUpperCase());
      break;
    }
default :
{
    throw unexpectedAttribute(reader,i);
  }
}
}
if (qty == -1L) throw missingRequired(reader,Collections.singleton(Attribute.TIME));
if (unit == null) throw missingRequired(reader,Collections.singleton(Attribute.UNIT));
requireNoContent(reader);
return new TimeSpec(unit,qty);
}
Program: 168030
Project: 168030
Buggy source:
public long elementHash(){
  long hash=name.hashCode() & 0xFFFFFFFFL;
  if (threadFactory != null)   hash=Long.rotateLeft(hash,1) ^ threadFactory.hashCode() & 0xFFFFFFFFL;
  if (maxThreads != null)   hash=Long.rotateLeft(hash,1) ^ maxThreads.elementHash();
  if (keepaliveTime != null)   hash=Long.rotateLeft(hash,1) ^ keepaliveTime.elementHash();
  return hash;
}

Fixed version (ground truth):
@Override public long elementHash(){
  long hash=name.hashCode() & 0xFFFFFFFFL;
  if (threadFactory != null)   hash=Long.rotateLeft(hash,1) ^ threadFactory.hashCode() & 0xFFFFFFFFL;
  if (maxThreads != null)   hash=Long.rotateLeft(hash,1) ^ maxThreads.elementHash();
  if (keepaliveTime != null)   hash=Long.rotateLeft(hash,1) ^ keepaliveTime.elementHash();
  return hash;
}
Program: 168031
Project: 168031
Buggy source:
protected Class<BoundedQueueThreadPoolExecutorElement> getElementClass(){
  return BoundedQueueThreadPoolExecutorElement.class;
}

Fixed version (ground truth):
@Override protected Class<BoundedQueueThreadPoolExecutorElement> getElementClass(){
  return BoundedQueueThreadPoolExecutorElement.class;
}
Program: 168032
Project: 168032
Buggy source:
public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  if (blocking) {
    streamWriter.writeAttribute("String_Node_Str","String_Node_Str");
  }
  if (allowCoreTimeout) {
    streamWriter.writeAttribute("String_Node_Str","String_Node_Str");
  }
  if (coreThreads != null) {
    writeScaledCountElement(streamWriter,coreThreads,"String_Node_Str");
  }
  writeScaledCountElement(streamWriter,queueLength,"String_Node_Str");
  writeScaledCountElement(streamWriter,getMaxThreads(),"String_Node_Str");
  final TimeSpec keepaliveTime=getKeepaliveTime();
  if (keepaliveTime != null)   writeTimeSpecElement(streamWriter,keepaliveTime,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  if (handoffExecutor != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",handoffExecutor);
  }
  streamWriter.writeEndElement();
}

Fixed version (ground truth):
@Override public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  if (blocking) {
    streamWriter.writeAttribute("String_Node_Str","String_Node_Str");
  }
  if (allowCoreTimeout) {
    streamWriter.writeAttribute("String_Node_Str","String_Node_Str");
  }
  if (coreThreads != null) {
    writeScaledCountElement(streamWriter,coreThreads,"String_Node_Str");
  }
  writeScaledCountElement(streamWriter,queueLength,"String_Node_Str");
  writeScaledCountElement(streamWriter,getMaxThreads(),"String_Node_Str");
  final TimeSpec keepaliveTime=getKeepaliveTime();
  if (keepaliveTime != null)   writeTimeSpecElement(streamWriter,keepaliveTime,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  if (handoffExecutor != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",handoffExecutor);
  }
  streamWriter.writeEndElement();
}
Program: 168033
Project: 168033
Buggy source:
public long elementHash(){
  long hash=super.elementHash();
  hash=Long.rotateLeft(hash,1) ^ Boolean.valueOf(blocking).hashCode() & 0xffffffffL;
  hash=Long.rotateLeft(hash,1) ^ Boolean.valueOf(allowCoreTimeout).hashCode() & 0xffffffffL;
  if (handoffExecutor != null)   hash=Long.rotateLeft(hash,1) ^ handoffExecutor.hashCode() & 0xffffffffL;
  hash=Long.rotateLeft(hash,1) ^ queueLength.elementHash();
  if (coreThreads != null)   hash=Long.rotateLeft(hash,1) ^ coreThreads.elementHash();
  return hash;
}

Fixed version (ground truth):
@Override public long elementHash(){
  long hash=super.elementHash();
  hash=Long.rotateLeft(hash,1) ^ Boolean.valueOf(blocking).hashCode() & 0xffffffffL;
  hash=Long.rotateLeft(hash,1) ^ Boolean.valueOf(allowCoreTimeout).hashCode() & 0xffffffffL;
  if (handoffExecutor != null)   hash=Long.rotateLeft(hash,1) ^ handoffExecutor.hashCode() & 0xffffffffL;
  hash=Long.rotateLeft(hash,1) ^ queueLength.elementHash();
  if (coreThreads != null)   hash=Long.rotateLeft(hash,1) ^ coreThreads.elementHash();
  return hash;
}
Program: 168034
Project: 168034
Buggy source:
protected Class<QueuelessThreadPoolExecutorElement> getElementClass(){
  return QueuelessThreadPoolExecutorElement.class;
}

Fixed version (ground truth):
@Override protected Class<QueuelessThreadPoolExecutorElement> getElementClass(){
  return QueuelessThreadPoolExecutorElement.class;
}
Program: 168035
Project: 168035
Buggy source:
public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  streamWriter.writeAttribute("String_Node_Str",Boolean.toString(blocking));
  final ScaledCount maxThreads=getMaxThreads();
  if (maxThreads != null)   writeScaledCountElement(streamWriter,maxThreads,"String_Node_Str");
  final TimeSpec keepaliveTime=getKeepaliveTime();
  if (keepaliveTime != null)   writeTimeSpecElement(streamWriter,keepaliveTime,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  if (handoffExecutor != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",handoffExecutor);
  }
  streamWriter.writeEndElement();
}

Fixed version (ground truth):
@Override public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  streamWriter.writeAttribute("String_Node_Str",Boolean.toString(blocking));
  final ScaledCount maxThreads=getMaxThreads();
  if (maxThreads != null)   writeScaledCountElement(streamWriter,maxThreads,"String_Node_Str");
  final TimeSpec keepaliveTime=getKeepaliveTime();
  if (keepaliveTime != null)   writeTimeSpecElement(streamWriter,keepaliveTime,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  if (handoffExecutor != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",handoffExecutor);
  }
  streamWriter.writeEndElement();
}
Program: 168036
Project: 168036
Buggy source:
public long elementHash(){
  return super.elementHash();
}

Fixed version (ground truth):
@Override public long elementHash(){
  return super.elementHash();
}
Program: 168037
Project: 168037
Buggy source:
protected Class<ScheduledThreadPoolExecutorElement> getElementClass(){
  return ScheduledThreadPoolExecutorElement.class;
}

Fixed version (ground truth):
@Override protected Class<ScheduledThreadPoolExecutorElement> getElementClass(){
  return ScheduledThreadPoolExecutorElement.class;
}
Program: 168038
Project: 168038
Buggy source:
public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  final ScaledCount maxThreads=getMaxThreads();
  if (maxThreads != null)   writeScaledCountElement(streamWriter,maxThreads,"String_Node_Str");
  final TimeSpec keepaliveTime=getKeepaliveTime();
  if (keepaliveTime != null)   writeTimeSpecElement(streamWriter,keepaliveTime,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  streamWriter.writeEndElement();
}

Fixed version (ground truth):
@Override public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  final ScaledCount maxThreads=getMaxThreads();
  if (maxThreads != null)   writeScaledCountElement(streamWriter,maxThreads,"String_Node_Str");
  final TimeSpec keepaliveTime=getKeepaliveTime();
  if (keepaliveTime != null)   writeTimeSpecElement(streamWriter,keepaliveTime,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  streamWriter.writeEndElement();
}
Program: 168039
Project: 168039
Buggy source:
public long elementHash(){
  return super.elementHash();
}

Fixed version (ground truth):
@Override public long elementHash(){
  return super.elementHash();
}
Program: 168040
Project: 168040
Buggy source:
protected Class<ThreadFactoryExecutorElement> getElementClass(){
  return ThreadFactoryExecutorElement.class;
}

Fixed version (ground truth):
@Override protected Class<ThreadFactoryExecutorElement> getElementClass(){
  return ThreadFactoryExecutorElement.class;
}
Program: 168041
Project: 168041
Buggy source:
public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  if (blocking) {
    streamWriter.writeAttribute("String_Node_Str","String_Node_Str");
  }
  final ScaledCount maxThreads=getMaxThreads();
  if (maxThreads != null)   writeScaledCountElement(streamWriter,maxThreads,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  streamWriter.writeEndElement();
}

Fixed version (ground truth):
@Override public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
  streamWriter.writeAttribute("String_Node_Str",getName());
  if (blocking) {
    streamWriter.writeAttribute("String_Node_Str","String_Node_Str");
  }
  final ScaledCount maxThreads=getMaxThreads();
  if (maxThreads != null)   writeScaledCountElement(streamWriter,maxThreads,"String_Node_Str");
  final String threadFactory=getThreadFactory();
  if (threadFactory != null) {
    streamWriter.writeEmptyElement("String_Node_Str");
    streamWriter.writeAttribute("String_Node_Str",threadFactory);
  }
  final PropertiesElement properties=getProperties();
  if (properties != null) {
    streamWriter.writeStartElement("String_Node_Str");
    properties.writeContent(streamWriter);
  }
  streamWriter.writeEndElement();
}
Program: 168042
Project: 168042
Buggy source:
public long elementHash(){
  return super.elementHash();
}

Fixed version (ground truth):
@Override public long elementHash(){
  return super.elementHash();
}
Program: 168043
Project: 168043
Buggy source:
public void activate(final ServiceActivatorContext context){
  log.info("String_Node_Str");
  for (  ThreadFactoryElement element : threadFactories.values()) {
    element.activate(context);
  }
  for (  ScheduledThreadPoolExecutorElement element : scheduledExecutors.values()) {
    element.activate(context);
  }
  for (  AbstractExecutorElement<?> element : executors.values()) {
    element.activate(context);
  }
}

Fixed version (ground truth):
@Override public void activate(final ServiceActivatorContext context){
  log.info("String_Node_Str");
  for (  ThreadFactoryElement element : threadFactories.values()) {
    element.activate(context);
  }
  for (  ScheduledThreadPoolExecutorElement element : scheduledExecutors.values()) {
    element.activate(context);
  }
  for (  AbstractExecutorElement<?> element : executors.values()) {
    element.activate(context);
  }
}
Program: 168044
Project: 168044
Buggy source:
protected Class<ThreadsSubsystemElement> getElementClass(){
  return null;
}

Fixed version (ground truth):
@Override protected Class<ThreadsSubsystemElement> getElementClass(){
  return null;
}
Program: 168045
Project: 168045
Buggy source:
public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
}

Fixed version (ground truth):
@Override public void writeContent(final XMLExtendedStreamWriter streamWriter) throws XMLStreamException {
synchronized (threadFactories) {
    for (    ThreadFactoryElement tfe : threadFactories.values()) {
      streamWriter.writeStartElement(Element.THREAD_FACTORY.getLocalName());
      tfe.writeContent(streamWriter);
    }
  }
synchronized (scheduledExecutors) {
    for (    ScheduledThreadPoolExecutorElement stpe : scheduledExecutors.values()) {
      streamWriter.writeStartElement(Element.SCHEDULED_THREAD_POOL_EXECUTOR.getLocalName());
      stpe.writeContent(streamWriter);
    }
  }
synchronized (executors) {
    for (    AbstractExecutorElement<?> aee : executors.values()) {
      streamWriter.writeStartElement(aee.getStandardElement().getLocalName());
      aee.writeContent(streamWriter);
    }
  }
  streamWriter.writeEndElement();
}
Program: 168046
Project: 168046
Buggy source:
public long elementHash(){
  long hash=0L;
  hash=calculateElementHashOf(threadFactories.values(),hash);
  return hash;
}

Fixed version (ground truth):
@Override public long elementHash(){
  long hash=0L;
  hash=calculateElementHashOf(threadFactories.values(),hash);
  return hash;
}