nus-yam/ex-repair huggingface dataset:
Program: 29523
Project: 29523
Buggy source:
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=Map.class,required=false)},output={@HandlerOutput(name="String_Node_Str",type=List.class)}) public static void sendRequestToCollectionResource(HandlerContext handlerCtx){
  Map<String,Object> attrs=(Map<String,Object>)handlerCtx.getInputValue("String_Node_Str");
  String endpoint=fixEndpoint((String)handlerCtx.getInputValue("String_Node_Str"));
  Response resp=RestUtil.getJerseyClient().target(endpoint).request(RestUtil.RESPONSE_TYPE).cookie(new Cookie(RestUtil.REST_TOKEN_COOKIE,RestUtil.getRestToken())).get(Response.class);
  if (!isSuccess(resp.getStatus())) {
    throw new RuntimeException(resp.readEntity(String.class));
  }
  List list=resp.readEntity(List.class);
  handlerCtx.setOutputValue("String_Node_Str",list);
}

Fixed version (ground truth):
@Handler(id="String_Node_Str",input={@HandlerInput(name="String_Node_Str",type=String.class,required=true),@HandlerInput(name="String_Node_Str",type=Map.class,required=false)},output={@HandlerOutput(name="String_Node_Str",type=List.class)}) public static void sendRequestToCollectionResource(HandlerContext handlerCtx){
  String endpoint=fixEndpoint((String)handlerCtx.getInputValue("String_Node_Str"));
  Response resp=RestUtil.getJerseyClient().target(endpoint).request(RestUtil.RESPONSE_TYPE).cookie(new Cookie(RestUtil.REST_TOKEN_COOKIE,RestUtil.getRestToken())).get(Response.class);
  if (!isSuccess(resp.getStatus())) {
    throw new RuntimeException(resp.readEntity(String.class));
  }
  List list=resp.readEntity(List.class);
  handlerCtx.setOutputValue("String_Node_Str",list);
}
Program: 29524
Project: 29524
Buggy source:
/** 
 * Get naming context full name.
 */
public String getNamingContextName(){
  if (namingContextName == null) {
    Container parent=getParent();
    if (parent == null) {
      namingContextName=getName();
    }
 else {
      Stack<String> stk=new Stack<String>();
      StringBuilder buff=new StringBuilder();
      while (parent != null) {
        stk.push(parent.getName());
        parent=parent.getParent();
      }
      while (!stk.empty()) {
        buff.append("String_Node_Str").append(stk.pop());
      }
      buff.append(getName());
      namingContextName=buff.toString();
    }
    namingContextName+=instanceIDCounter++;
  }
  return namingContextName;
}

Fixed version (ground truth):
/** 
 * Get naming context full name.
 */
public String getNamingContextName(){
  if (namingContextName == null) {
    Container parent=getParent();
    if (parent == null) {
      namingContextName=getName();
    }
 else {
      Stack<String> stk=new Stack<String>();
      StringBuilder buff=new StringBuilder();
      while (parent != null) {
        stk.push(parent.getName());
        parent=parent.getParent();
      }
      while (!stk.empty()) {
        buff.append("String_Node_Str").append(stk.pop());
      }
      buff.append(getName());
      namingContextName=buff.toString();
    }
    namingContextName+=instanceIDCounter.getAndIncrement();
  }
  return namingContextName;
}
Program: 29525
Project: 29525
Buggy source:
public void stop(Logger logger){
  if (getDeployer() != null) {
    Inhabitant i=((Habitat)registry.habitat).getInhabitantByType(getDeployer().getClass());
    if (i != null) {
      i.release();
    }
  }
  if (getContainer() != null) {
    Inhabitant i=((Habitat)registry.habitat).getInhabitantByType(getContainer().getClass());
    if (i != null) {
      i.release();
    }
  }
  registry.removeContainer(this);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + getContainer().getName() + "String_Node_Str");
  }
}

Fixed version (ground truth):
public void stop(Logger logger){
  if (getDeployer() != null) {
    ServiceHandle<?> i=registry.habitat.getServiceHandle(getDeployer().getClass());
    if (i != null) {
      i.destroy();
    }
  }
  if (getContainer() != null) {
    ServiceHandle<?> i=registry.habitat.getServiceHandle(getContainer().getClass());
    if (i != null) {
      i.destroy();
    }
  }
  registry.removeContainer(this);
  if (logger.isLoggable(Level.FINE)) {
    logger.fine("String_Node_Str" + getContainer().getName() + "String_Node_Str");
  }
}
Program: 29526
Project: 29526
Buggy source:
/** 
 * convert an xml attribute name to variable name representing it.
 * @param attributeName the attribute name in "-" separated form as appears in the domain.xml
 * @return the class instance variable which represent that attributeName
 */
private static String convertAttributeToPropertyName(String attributeName){
  StringTokenizer tokenizer=new StringTokenizer(attributeName,"String_Node_Str",false);
  StringBuilder propertyName=new StringBuilder();
  boolean isFirst=true;
  while (tokenizer.hasMoreTokens()) {
    String part=tokenizer.nextToken();
    if (!isFirst) {
      part=part.replaceFirst(part.substring(0,1),part.substring(0,1).toUpperCase());
    }
    isFirst=false;
    propertyName.append(part);
  }
  return propertyName.toString();
}

Fixed version (ground truth):
/** 
 * convert an xml attribute name to variable name representing it.
 * @param attributeName the attribute name in "-" separated form as appears in the domain.xml
 * @return the class instance variable which represent that attributeName
 */
private static String convertAttributeToPropertyName(String attributeName){
  StringTokenizer tokenizer=new StringTokenizer(attributeName,"String_Node_Str",false);
  StringBuilder propertyName=new StringBuilder();
  boolean isFirst=true;
  while (tokenizer.hasMoreTokens()) {
    String part=tokenizer.nextToken();
    if (!isFirst) {
      Locale loc=Locale.getDefault();
      part=part.replaceFirst(part.substring(0,1),part.substring(0,1).toUpperCase(loc));
    }
    isFirst=false;
    propertyName.append(part);
  }
  return propertyName.toString();
}
Program: 29527
Project: 29527
Buggy source:
/** 
 * convert a configuration element name to representing class name
 * @param name the configuration element name we want to convert to class name
 * @return the class name which the configuration element represent.
 */
public static String convertConfigElementNameToClassName(String name){
  StringTokenizer tokenizer=new StringTokenizer(name,"String_Node_Str",false);
  StringBuilder className=new StringBuilder();
  while (tokenizer.hasMoreTokens()) {
    String part=tokenizer.nextToken();
    part=part.replaceFirst(part.substring(0,1),part.substring(0,1).toUpperCase());
    className.append(part);
  }
  return className.toString();
}

Fixed version (ground truth):
/** 
 * convert a configuration element name to representing class name
 * @param name the configuration element name we want to convert to class name
 * @return the class name which the configuration element represent.
 */
public static String convertConfigElementNameToClassName(String name){
  StringTokenizer tokenizer=new StringTokenizer(name,"String_Node_Str",false);
  StringBuilder className=new StringBuilder();
  while (tokenizer.hasMoreTokens()) {
    String part=tokenizer.nextToken();
    Locale loc=Locale.getDefault();
    part=part.replaceFirst(part.substring(0,1),part.substring(0,1).toUpperCase(loc));
    className.append(part);
  }
  return className.toString();
}
Program: 29529
Project: 29529
Buggy source:
private JSONArray getProperties(Class<?> clazz){
  Map<String,ParamMetadata> map=new HashMap<String,ParamMetadata>();
  JSONArray props=new JSONArray();
  for (  Class<?> ifaces : clazz.getInterfaces()) {
    for (    Method m : ifaces.getDeclaredMethods()) {
    }
  }
  return props;
}

Fixed version (ground truth):
private JSONArray getProperties(Class<?> clazz){
  JSONArray props=new JSONArray();
  for (  Class<?> ifaces : clazz.getInterfaces()) {
    for (    Method m : ifaces.getDeclaredMethods()) {
    }
  }
  return props;
}
Program: 29530
Project: 29530
Buggy source:
protected void registerTimerMonitorableComponent(){
  if (isTimedObject()) {
    String invokerId=EjbMonitoringUtils.getInvokerId(containerInfo.appName,containerInfo.modName,containerInfo.ejbName);
    try {
      ProbeProviderFactory probeFactory=ejbContainerUtilImpl.getProbeProviderFactory();
      timerProbeNotifier=probeFactory.getProbeProvider(EjbTimedObjectProbeProvider.class,invokerId);
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str" + timerProbeNotifier.getClass().getName());
      }
    }
 catch (    Exception ex) {
      timerProbeNotifier=new EjbTimedObjectProbeProvider();
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str");
      }
    }
    timerProbeListener=new EjbTimedObjectStatsProvider(containerInfo.appName,containerInfo.modName,containerInfo.ejbName,getContainerId());
    timerProbeListener.register();
  }
  _logger.log(Level.FINE,"String_Node_Str");
}

Fixed version (ground truth):
protected void registerTimerMonitorableComponent(){
  if (isTimedObject()) {
    String invokerId=EjbMonitoringUtils.getInvokerId(containerInfo.appName,containerInfo.modName,containerInfo.ejbName);
    try {
      ProbeProviderFactory probeFactory=ejbContainerUtilImpl.getProbeProviderFactory();
      timerProbeNotifier=probeFactory.getProbeProvider(EjbTimedObjectProbeProvider.class,invokerId);
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str" + timerProbeNotifier.getClass().getName());
      }
    }
 catch (    Exception ex) {
      timerProbeNotifier=new EjbTimedObjectProbeProvider();
      if (_logger.isLoggable(Level.FINE)) {
        _logger.log(Level.FINE,"String_Node_Str");
      }
    }
    timerProbeListener=new EjbTimedObjectStatsProvider(containerInfo.appName,containerInfo.modName,containerInfo.ejbName);
    timerProbeListener.register();
  }
  _logger.log(Level.FINE,"String_Node_Str");
}
Program: 29531
Project: 29531
Buggy source:
public EjbTimedObjectStatsProvider(String appName,String moduleName,String beanName,long beanId){
  this.appName=appName;
  this.moduleName=moduleName;
  this.beanName=beanName;
  this.beanId=beanId;
}

Fixed version (ground truth):
public EjbTimedObjectStatsProvider(String appName,String moduleName,String beanName){
  this.appName=appName;
  this.moduleName=moduleName;
  this.beanName=beanName;
}
Program: 29532
Project: 29532
Buggy source:
public void registerTenantWithAppInDomainXML(final String appName,final ExtendedDeploymentContext context) throws TransactionFailure {
  final Transaction t=new Transaction();
  try {
    final DeployCommandParameters commandParams=context.getCommandParameters(DeployCommandParameters.class);
    final AppTenant appTenant_w=writeableTenantForApp(appName,t);
    appTenant_w.setContextRoot(context.getAppProps().getProperty(ServerTags.CONTEXT_ROOT));
    appTenant_w.setTenant(context.getTenant());
    t.commit();
  }
 catch (  TransactionFailure ex) {
    t.rollback();
    throw ex;
  }
catch (  Throwable ex) {
    t.rollback();
    throw new TransactionFailure(ex.getLocalizedMessage(),ex);
  }
}

Fixed version (ground truth):
public void registerTenantWithAppInDomainXML(final String appName,final ExtendedDeploymentContext context) throws TransactionFailure {
  final Transaction t=new Transaction();
  try {
    final AppTenant appTenant_w=writeableTenantForApp(appName,t);
    appTenant_w.setContextRoot(context.getAppProps().getProperty(ServerTags.CONTEXT_ROOT));
    appTenant_w.setTenant(context.getTenant());
    t.commit();
  }
 catch (  TransactionFailure ex) {
    t.rollback();
    throw ex;
  }
catch (  Throwable ex) {
    t.rollback();
    throw new TransactionFailure(ex.getLocalizedMessage(),ex);
  }
}
Program: 29534
Project: 29534
Buggy source:
public void setClassLoader(ClassLoader cloader){
  this.cloader=cloader;
}

Fixed version (ground truth):
public synchronized void setClassLoader(ClassLoader cloader){
  this.cloader=cloader;
}
Program: 29535
Project: 29535
Buggy source:
private boolean setFromMasterPasswordFile(){
  try {
    File mp=env.getMasterPasswordFile();
    if (!mp.isFile()) {
      logger.fine("String_Node_Str" + mp.getAbsolutePath() + "String_Node_Str");
      return false;
    }
    PasswordAdapter p=new PasswordAdapter(mp.getAbsolutePath(),FIXED_KEY.toCharArray());
    this.masterPassword=p.getPasswordForAlias(FIXED_KEY).toCharArray();
    if (masterPassword == null) {
      return false;
    }
    return true;
  }
 catch (  Exception ex) {
    logger.fine("String_Node_Str" + ex.getMessage());
    return false;
  }
}

Fixed version (ground truth):
private boolean setFromMasterPasswordFile(){
  try {
    File mp=env.getMasterPasswordFile();
    if (!mp.isFile()) {
      logger.fine("String_Node_Str" + mp.getAbsolutePath() + "String_Node_Str");
      return false;
    }
    PasswordAdapter p=new PasswordAdapter(mp.getAbsolutePath(),FIXED_KEY.toCharArray());
    String mpstr=p.getPasswordForAlias(FIXED_KEY);
    if (mpstr == null) {
      return false;
    }
    masterPassword=mpstr.toCharArray();
    return true;
  }
 catch (  Exception ex) {
    logger.fine("String_Node_Str" + ex.getMessage());
    return false;
  }
}
Program: 29537
Project: 29537
Buggy source:
public char[] getMasterPassword(){
  if (_masterPassword == null) {
    return null;
  }
  return Arrays.copyOf(_masterPassword,_masterPassword.length);
}

Fixed version (ground truth):
public char[] getMasterPassword(){
  return idm == null ? null : idm.getMasterPassword();
}
Program: 29538
Project: 29538
Buggy source:
public PasswordAdapter getMasterPasswordAdapter() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException {
  PasswordAdapter passwordAdapter=new PasswordAdapter(_masterPassword);
  return passwordAdapter;
}

Fixed version (ground truth):
@Override public PasswordAdapter getMasterPasswordAdapter() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException {
  char pw[]=idm == null ? null : idm.getMasterPassword();
  return new PasswordAdapter(pw);
}
Program: 29539
Project: 29539
Buggy source:
public void postConstruct(){
  boolean success;
  boolean readStdin=sc.getArguments().containsKey(STDIN_OPTION_TO_ASMAIN);
  if (readStdin) {
    success=setFromStdin();
  }
 else {
    success=setFromMasterPasswordFile();
    if (!success) {
      success=setFromAsMainArguments();
    }
  }
  if (!success) {
    masterPassword="String_Node_Str".toCharArray();
  }
  if (masterPasswordHelper != null)   masterPasswordHelper.setMasterPassword(masterPassword);
  if (jmxMasterPasswordHelper != null)   jmxMasterPasswordHelper.setMasterPassword(masterPassword);
  Arrays.fill(masterPassword,' ');
  masterPassword=null;
}

Fixed version (ground truth):
public void postConstruct(){
  boolean success;
  boolean readStdin=sc.getArguments().containsKey(STDIN_OPTION_TO_ASMAIN);
  if (readStdin) {
    success=setFromStdin();
  }
 else {
    success=setFromMasterPasswordFile();
    if (!success) {
      success=setFromAsMainArguments();
    }
  }
  if (!success) {
    masterPassword="String_Node_Str".toCharArray();
  }
}
Program: 29540
Project: 29540
Buggy source:
char[] getMasterPassword(){
  if (_masterPassword == null) {
    return null;
  }
  return Arrays.copyOf(_masterPassword,_masterPassword.length);
}

Fixed version (ground truth):
public char[] getMasterPassword(){
  return idm == null ? null : idm.getMasterPassword();
}
Program: 29541
Project: 29541
Buggy source:
public PasswordAdapter getMasterPasswordAdapter() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException {
  PasswordAdapter passwordAdapter=new PasswordAdapter(_masterPassword);
  return passwordAdapter;
}

Fixed version (ground truth):
@Override public PasswordAdapter getMasterPasswordAdapter() throws CertificateException, IOException, KeyStoreException, NoSuchAlgorithmException {
  char pw[]=idm == null ? null : idm.getMasterPassword();
  return new PasswordAdapter(pw);
}
Program: 29543
Project: 29543
Buggy source:
private void checkJspGroupProperties(WebBundleDescriptor descriptor,Result result,ComponentNameConstructor compName){
  JspConfigDescriptor jspC=((WebBundleDescriptorImpl)descriptor).getJspConfigDescriptor();
  if (jspC == null)   return;
  for (  JspPropertyGroupDescriptor desc : jspC.getJspPropertyGroups()) {
    for (    String urlPattern : desc.getUrlPatterns()) {
      checkUrlPatternAndSetResult(urlPattern,descriptor,result,compName);
    }
  }
}

Fixed version (ground truth):
private void checkJspGroupProperties(WebBundleDescriptor descriptor,Result result,ComponentNameConstructor compName){
  JspConfigDescriptorImpl jspC=((WebBundleDescriptorImpl)descriptor).getJspConfigDescriptor();
  if (jspC == null)   return;
  for (  JspPropertyGroupDescriptor desc : jspC.getJspPropertyGroups()) {
    for (    String urlPattern : desc.getUrlPatterns()) {
      checkUrlPatternAndSetResult(urlPattern,descriptor,result,compName);
    }
  }
}
Program: 29544
Project: 29544
Buggy source:
private void setErrorPageContentType(Response response,String location,Context context){
  if (response.getContentType() == null && location != null) {
    String str=location.substring(location.lastIndexOf('.') + 1);
    str=context.findMimeMapping(str.toLowerCase());
    if (str != null)     ((ServletResponse)response).setContentType(str);
  }
}

Fixed version (ground truth):
private void setErrorPageContentType(Response response,String location,Context context){
  if (response.getContentType() == null && location != null) {
    String str=location.substring(location.lastIndexOf('.') + 1);
    str=context.findMimeMapping(str.toLowerCase(Locale.ENGLISH));
    if (str != null)     ((ServletResponse)response).setContentType(str);
  }
}
Program: 29545
Project: 29545
Buggy source:
/** 
 * Configure <code>jsp-config</code> element contained in the deployment descriptor
 */
protected static void configureJspConfig(WebModule webModule,WebBundleDescriptorImpl wmd){
  webModule.setJspConfigDescriptor(wmd.getJspConfigDescriptor());
  JspConfigDescriptor jspConfig=wmd.getJspConfigDescriptor();
  if (jspConfig != null) {
    for (    JspPropertyGroupDescriptor jspGroup : jspConfig.getJspPropertyGroups()) {
      for (      String urlPattern : jspGroup.getUrlPatterns()) {
        webModule.addJspMapping(urlPattern);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Configure <code>jsp-config</code> element contained in the deployment descriptor
 */
protected static void configureJspConfig(WebModule webModule,WebBundleDescriptorImpl wmd){
  webModule.setJspConfigDescriptor(wmd.getJspConfigDescriptor());
  JspConfigDescriptorImpl jspConfig=wmd.getJspConfigDescriptor();
  if (jspConfig != null) {
    for (    JspPropertyGroupDescriptor jspGroup : jspConfig.getJspPropertyGroups()) {
      for (      String urlPattern : jspGroup.getUrlPatterns()) {
        webModule.addJspMapping(urlPattern);
      }
    }
  }
}
Program: 29546
Project: 29546
Buggy source:
/** 
 * Return a String array of my static transport types.
 */
public static final String[] getTransportGuaranteeChoices(){
  return transportGuaranteeChoices;
}

Fixed version (ground truth):
/** 
 * Return a String array of my static transport types.
 */
private static final String[] getTransportGuaranteeChoices(){
  return transportGuaranteeChoices;
}
Program: 29547
Project: 29547
Buggy source:
public void setJspConfigDescriptor(JspConfigDescriptor jspC){
  jspConfigDescriptor=jspC;
}

Fixed version (ground truth):
public void setJspConfigDescriptor(JspConfigDescriptorImpl jspC){
  jspConfigDescriptor=jspC;
}
Program: 29549
Project: 29549
Buggy source:
public JspConfigDescriptor getJspConfigDescriptor(){
  return jspConfigDescriptor;
}

Fixed version (ground truth):
public JspConfigDescriptorImpl getJspConfigDescriptor(){
  return jspConfigDescriptor;
}
Program: 29550
Project: 29550
Buggy source:
@Override public void combineConnectorResourceDefinitionDescriptors(JndiNameEnvironment env){
  for (  ConnectorResourceDefinitionDescriptor crdd : env.getConnectorResourceDefinitionDescriptors()) {
    ConnectorResourceDefinitionDescriptor desc=getConnectorResourceDefinitionDescriptor(crdd.getName());
    if (desc != null) {
      if (desc.isConflict(crdd)) {
        conflictConnectorResourceDefinition=true;
      }
    }
 else {
      addConnectorResourceDefinitionDescriptor(desc);
    }
  }
}

Fixed version (ground truth):
@Override public void combineConnectorResourceDefinitionDescriptors(JndiNameEnvironment env){
  for (  ConnectorResourceDefinitionDescriptor crdd : env.getConnectorResourceDefinitionDescriptors()) {
    ConnectorResourceDefinitionDescriptor desc=getConnectorResourceDefinitionDescriptor(crdd.getName());
    if (desc != null) {
      if (desc.isConflict(crdd)) {
        conflictConnectorResourceDefinition=true;
      }
    }
 else {
      addConnectorResourceDefinitionDescriptor(null);
    }
  }
}
Program: 29551
Project: 29551
Buggy source:
/** 
 * @return the descriptor instance to associate with this XMLNode
 */
@Override public JspConfigDescriptor getDescriptor(){
  if (descriptor == null) {
    descriptor=new JspConfigDescriptor();
  }
  return descriptor;
}

Fixed version (ground truth):
/** 
 * @return the descriptor instance to associate with this XMLNode
 */
@Override public JspConfigDescriptorImpl getDescriptor(){
  if (descriptor == null) {
    descriptor=new JspConfigDescriptorImpl();
  }
  return descriptor;
}
Program: 29552
Project: 29552
Buggy source:
/** 
 * write the descriptor class to a DOM tree and return it
 * @param parent node in the DOM tree 
 * @param node name for the root element of this xml fragment      
 * @param the descriptor to write
 * @return the DOM tree top node
 */
public Node writeDescriptor(Node parent,String nodeName,JspConfigDescriptor descriptor){
  Node myNode=appendChild(parent,nodeName);
  TagLibNode lNode=new TagLibNode();
  for (  TaglibDescriptor desc : descriptor.getTaglibs()) {
    lNode.writeDescriptor(myNode,WebTagNames.TAGLIB,(TagLibConfigurationDescriptor)desc);
  }
  JspGroupNode jspGroup=new JspGroupNode();
  for (  JspPropertyGroupDescriptor desc : descriptor.getJspPropertyGroups()) {
    jspGroup.writeDescriptor(myNode,WebTagNames.JSP_GROUP,(JspGroupDescriptor)desc);
  }
  return myNode;
}

Fixed version (ground truth):
/** 
 * write the descriptor class to a DOM tree and return it
 * @param parent node in the DOM tree 
 * @param node name for the root element of this xml fragment      
 * @param the descriptor to write
 * @return the DOM tree top node
 */
public Node writeDescriptor(Node parent,String nodeName,JspConfigDescriptorImpl descriptor){
  Node myNode=appendChild(parent,nodeName);
  TagLibNode lNode=new TagLibNode();
  for (  TaglibDescriptor desc : descriptor.getTaglibs()) {
    lNode.writeDescriptor(myNode,WebTagNames.TAGLIB,(TagLibConfigurationDescriptor)desc);
  }
  JspGroupNode jspGroup=new JspGroupNode();
  for (  JspPropertyGroupDescriptor desc : descriptor.getJspPropertyGroups()) {
    jspGroup.writeDescriptor(myNode,WebTagNames.JSP_GROUP,(JspGroupDescriptor)desc);
  }
  return myNode;
}
Program: 29555
Project: 29555
Buggy source:
/** 
 * Handle the HTTP status code (and corresponding message) generated while processing the specified Request to produce the specified Response.  Any exceptions that occur during generation of the error report are logged and swallowed.
 * @param request The request being processed
 * @param response The response being generated
 */
protected void status(Request request,Response response){
  Context context=request.getContext();
  if (context == null)   return;
  if (!response.isError()) {
    return;
  }
  int statusCode=((HttpResponse)response).getStatus();
  ErrorPage errorPage=context.findErrorPage(statusCode);
  if (errorPage != null) {
    dispatchToErrorPage(request,response,errorPage,null,null,statusCode);
  }
 else   if (statusCode >= 400 && statusCode < 600 && context.getDefaultErrorPage() != null) {
    dispatchToErrorPage(request,response,context.getDefaultErrorPage(),null,null,statusCode);
  }
 else {
    errorPage=((StandardHost)getContainer()).findErrorPage(statusCode);
    if (errorPage != null) {
      try {
        handleHostErrorPage(response,errorPage,statusCode);
      }
 catch (      Exception e) {
        log("String_Node_Str" + errorPage,e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Handle the HTTP status code (and corresponding message) generated while processing the specified Request to produce the specified Response.  Any exceptions that occur during generation of the error report are logged and swallowed.
 * @param request The request being processed
 * @param response The response being generated
 */
protected void status(Request request,Response response){
  Context context=request.getContext();
  if (context == null)   return;
  if (!response.isError()) {
    return;
  }
  int statusCode=((HttpResponse)response).getStatus();
  ErrorPage errorPage=context.findErrorPage(statusCode);
  if (errorPage != null) {
    setErrorPageContentType(response,errorPage.getLocation(),context);
    dispatchToErrorPage(request,response,errorPage,null,null,statusCode);
  }
 else   if (statusCode >= 400 && statusCode < 600 && context.getDefaultErrorPage() != null) {
    dispatchToErrorPage(request,response,context.getDefaultErrorPage(),null,null,statusCode);
  }
 else {
    errorPage=((StandardHost)getContainer()).findErrorPage(statusCode);
    if (errorPage != null) {
      try {
        setErrorPageContentType(response,errorPage.getLocation(),context);
        handleHostErrorPage(response,errorPage,statusCode);
      }
 catch (      Exception e) {
        log("String_Node_Str" + errorPage,e);
      }
    }
  }
}
Program: 29558
Project: 29558
Buggy source:
/** 
 * Get the Permissions for a CodeSource.  If this instance of WebappClassLoader is for a web application context, add read FilePermission or JndiPermissions for the base directory (if unpacked), the context URL, and jar file resources.
 * @param codeSource where the code was loaded from
 * @return PermissionCollection for CodeSource
 */
@Override protected PermissionCollection getPermissions(CodeSource codeSource){
  String codeUrl=codeSource.getLocation().toString();
  PermissionCollection pc;
  if ((pc=loaderPC.get(codeUrl)) == null) {
    pc=super.getPermissions(codeSource);
    if (pc != null) {
      Iterator<Permission> perms=permissionList.iterator();
      while (perms.hasNext()) {
        Permission p=perms.next();
        pc.add(p);
      }
      loaderPC.put(codeUrl,pc);
    }
  }
  return (pc);
}

Fixed version (ground truth):
/** 
 * Get the Permissions for a CodeSource.  If this instance of WebappClassLoader is for a web application context, add read FilePermission or JndiPermissions for the base directory (if unpacked), the context URL, and jar file resources.
 * @param codeSource where the code was loaded from
 * @return PermissionCollection for CodeSource
 */
@Override protected PermissionCollection getPermissions(CodeSource codeSource){
  String codeUrl=codeSource.getLocation().toString();
  PermissionCollection pc;
  if ((pc=loaderPC.get(codeUrl)) == null) {
    pc=super.getPermissions(codeSource);
    if (pc != null) {
      Iterator<Permission> perms=permissionList.iterator();
      while (perms.hasNext()) {
        Permission p=perms.next();
        pc.add(p);
      }
      PermissionCollection tmpPc=loaderPC.putIfAbsent(codeUrl,pc);
      if (tmpPc != null) {
        pc=tmpPc;
      }
    }
  }
  return (pc);
}
Program: 29559
Project: 29559
Buggy source:
public ServletRegistration.Dynamic addServletFacade(String servletName,String className){
  if (servletName == null || className == null) {
    throw new NullPointerException("String_Node_Str");
  }
  DynamicServletRegistrationImpl regis=(DynamicServletRegistrationImpl)servletRegisMap.get(servletName);
  if (regis == null) {
    StandardWrapper wrapper=new StandardWrapper();
    wrapper.setName(servletName);
    wrapper.setServletClassName(className);
    regis=(DynamicServletRegistrationImpl)createDynamicServletRegistrationImpl((StandardWrapper)wrapper);
    servletRegisMap.put(servletName,regis);
    servlets.put(servletName,className);
  }
  return regis;
}

Fixed version (ground truth):
public ServletRegistration.Dynamic addServletFacade(String servletName,String className){
  if (servletName == null || className == null) {
    throw new NullPointerException("String_Node_Str");
  }
  DynamicServletRegistrationImpl regis=(DynamicServletRegistrationImpl)servletRegisMap.get(servletName);
  if (regis == null) {
    StandardWrapper wrapper=new StandardWrapper();
    wrapper.setName(servletName);
    wrapper.setServletClassName(className);
    regis=(DynamicServletRegistrationImpl)createDynamicServletRegistrationImpl(wrapper);
    DynamicServletRegistrationImpl tmpRegis=(DynamicServletRegistrationImpl)servletRegisMap.putIfAbsent(servletName,regis);
    if (tmpRegis != null) {
      regis=tmpRegis;
    }
    servlets.put(servletName,className);
  }
  return regis;
}
Program: 29560
Project: 29560
Buggy source:
/** 
 * Retrieve the Singleton DeploymentFactoryManager
 * @return DeploymentFactoryManager instance
 */
public static DeploymentFactoryManager getInstance(){
  if (deploymentFactoryManager == null) {
    deploymentFactoryManager=new DeploymentFactoryManager();
  }
  return deploymentFactoryManager;
}

Fixed version (ground truth):
/** 
 * Retrieve the Singleton DeploymentFactoryManager
 * @return DeploymentFactoryManager instance
 */
public static DeploymentFactoryManager getInstance(){
  return deploymentFactoryManager;
}
Program: 29561
Project: 29561
Buggy source:
@Override public boolean handles(ReadableArchive archive) throws IOException {
  return DeploymentUtils.isCAR(archive);
}

Fixed version (ground truth):
@Override public boolean handles(ReadableArchive archive) throws IOException {
  try {
    if (archive.exists(APPLICATION_CLIENT_XML) || archive.exists(SUN_APPLICATION_CLIENT_XML) || archive.exists(GF_APPLICATION_CLIENT_XML)) {
      return true;
    }
    Manifest manifest=archive.getManifest();
    if (manifest != null && manifest.getMainAttributes().containsKey(Attributes.Name.MAIN_CLASS)) {
      return true;
    }
  }
 catch (  IOException ioe) {
  }
  return false;
}
Program: 29562
Project: 29562
Buggy source:
/** 
 * {@inheritDoc}
 */
public boolean handles(ReadableArchive archive) throws IOException {
  boolean handles=DeploymentUtils.isRAR(archive);
  if (!handles && (archive instanceof FileArchive)) {
    GenericAnnotationDetector detector=new GenericAnnotationDetector(connectorAnnotations);
    handles=detector.hasAnnotationInArchive(archive);
  }
  return handles;
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
public boolean handles(ReadableArchive archive) throws IOException {
  boolean handles=false;
  try {
    if (Util.getURIName(archive.getURI()).endsWith(RAR_EXTENSION)) {
      return true;
    }
    handles=archive.exists(RA_XML);
  }
 catch (  IOException ioe) {
  }
  if (!handles && (archive instanceof FileArchive)) {
    GenericAnnotationDetector detector=new GenericAnnotationDetector(connectorAnnotations);
    handles=detector.hasAnnotationInArchive(archive);
  }
  return handles;
}
Program: 29563
Project: 29563
Buggy source:
/** 
 * check whether the archive is a JavaEE archive
 * @param archive archive to be tested
 * @param habitat
 * @return whether the archive is a JavaEE archive
 */
public static boolean isJavaEE(ReadableArchive archive,BaseServiceLocator habitat){
  if (DeploymentUtils.isEAR(archive) || DeploymentUtils.isWebArchive(archive) || DeploymentUtils.isCAR(archive)|| DeploymentUtils.isRAR(archive,habitat)|| DeploymentUtils.isEjbJar(archive,habitat)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * check whether the archive is a JavaEE archive
 * @param archive archive to be tested
 * @param context deployment context
 * @param habitat
 * @return whether the archive is a JavaEE archive
 */
public static boolean isJavaEE(ReadableArchive archive,DeploymentContext context,BaseServiceLocator habitat){
  if (DeploymentUtils.isArchiveOfType(archive,DOLUtils.earType(),context,habitat) || DeploymentUtils.isArchiveOfType(archive,DOLUtils.warType(),context,habitat) || DeploymentUtils.isArchiveOfType(archive,DOLUtils.carType(),context,habitat)|| DeploymentUtils.isArchiveOfType(archive,DOLUtils.rarType(),context,habitat)|| DeploymentUtils.isArchiveOfType(archive,DOLUtils.ejbType(),context,habitat)) {
    return true;
  }
  return false;
}
Program: 29564
Project: 29564
Buggy source:
@Override public boolean handles(ReadableArchive archive) throws IOException {
  return DeploymentUtils.isEAR(archive);
}

Fixed version (ground truth):
@Override public boolean handles(ReadableArchive archive) throws IOException {
  boolean isEar=false;
  try {
    if (Util.getURIName(archive.getURI()).endsWith(EAR_EXTENSION)) {
      return true;
    }
    isEar=archive.exists(APPLICATION_XML) || archive.exists(SUN_APPLICATION_XML) || archive.exists(GF_APPLICATION_XML);
    if (!isEar) {
      isEar=isEARFromIntrospecting(archive);
    }
  }
 catch (  IOException ioe) {
  }
  return isEar;
}
Program: 29565
Project: 29565
Buggy source:
/** 
 * Returns true if the passed file or directory is recognized by this instance.
 * @param location the file or directory to explore
 * @return true if this sniffer handles this application type
 */
@Override public boolean handles(ReadableArchive location){
  return DeploymentUtils.isEAR(location);
}

Fixed version (ground truth):
/** 
 * Returns true if the passed file or directory is recognized by this instance.
 * @param location the file or directory to explore
 * @return true if this sniffer handles this application type
 */
@Override public boolean handles(ReadableArchive location){
  return DeploymentUtils.isArchiveOfType(location,earType,locator);
}
Program: 29566
Project: 29566
Buggy source:
@Override public boolean handles(ReadableArchive archive){
  return DeploymentUtils.isEjbJar(archive,baseServiceLocator);
}

Fixed version (ground truth):
@Override public boolean handles(ReadableArchive archive){
  try {
    if (archive.exists(EJB_JAR_XML) || archive.exists(SUN_EJB_JAR_XML) || archive.exists(GF_EJB_JAR_XML)) {
      return true;
    }
    GenericAnnotationDetector detector=new GenericAnnotationDetector(sniffer.getAnnotationTypes());
    return detector.hasAnnotationInArchive(archive);
  }
 catch (  IOException ioe) {
  }
  return false;
}
Program: 29567
Project: 29567
Buggy source:
/** 
 * Returns true if the passed file or directory is recognized by this instance.
 * @param location the file or directory to explore
 * @return true if this sniffer handles this application type
 */
public boolean handles(ReadableArchive location){
  boolean result=super.handles(location);
  if (result == false) {
    try {
      result=location.exists("String_Node_Str") || location.exists("String_Node_Str");
    }
 catch (    IOException ioe) {
    }
  }
  if (result == false) {
    try {
      result=location.exists("String_Node_Str");
    }
 catch (    IOException ioEx) {
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Returns true if the passed file or directory is recognized by this instance.
 * @param location the file or directory to explore
 * @return true if this sniffer handles this application type
 */
@Override public boolean handles(ReadableArchive location){
  boolean result=super.handles(location);
  if (result == false) {
    try {
      result=location.exists("String_Node_Str") || location.exists("String_Node_Str");
    }
 catch (    IOException ioe) {
    }
  }
  if (result == false) {
    try {
      result=location.exists("String_Node_Str");
    }
 catch (    IOException ioEx) {
    }
  }
  return result;
}
Program: 29568
Project: 29568
Buggy source:
@Override protected boolean postHandles(ReadableArchive abstractArchive) throws IOException {
  AnnotationDetector detector=new AnnotationDetector(new EjbComponentAnnotationScanner());
  return (!DeploymentUtils.isWebArchive(abstractArchive)) && detector.hasAnnotationInArchiveWithNoScanning(abstractArchive);
}

Fixed version (ground truth):
@Override protected boolean postHandles(ReadableArchive abstractArchive) throws IOException {
  AnnotationDetector detector=new AnnotationDetector(new EjbComponentAnnotationScanner());
  return (!DeploymentUtils.isArchiveOfType(abstractArchive,DOLUtils.warType(),locator)) && detector.hasAnnotationInArchiveWithNoScanning(abstractArchive);
}
Program: 29569
Project: 29569
Buggy source:
/** 
 * Returns true if the passed file or directory is recognized by this instance.
 * @param archive the file or directory to explore
 * @return true if this sniffer handles this application type
 */
@Override public boolean handles(ReadableArchive archive){
  return DeploymentUtils.hasResourcesXML(archive);
}

Fixed version (ground truth):
/** 
 * Returns true if the passed file or directory is recognized by this instance.
 * @param archive the file or directory to explore
 * @return true if this sniffer handles this application type
 */
@Override public boolean handles(ReadableArchive archive){
  return ResourceUtil.hasResourcesXML(archive,locator);
}
Program: 29570
Project: 29570
Buggy source:
@Override public boolean stop(ApplicationContext stopContext){
  if (stopContext instanceof DeploymentContext) {
    DeploymentContext deployContext=(DeploymentContext)stopContext;
    Properties props=null;
    boolean keepSessions=isKeepState(deployContext,false);
    if (keepSessions) {
      props=new Properties();
    }
    container.unloadWebModule(getDescriptor().getContextRoot(),null,wmInfo.getVirtualServers(),props);
    if (keepSessions) {
      Properties actionReportProps=getActionReportProperties(deployContext);
      if (actionReportProps != null) {
        actionReportProps.putAll(props);
      }
    }
  }
  stopCoherenceWeb();
  return true;
}

Fixed version (ground truth):
@Override public boolean stop(ApplicationContext stopContext){
  if (stopContext instanceof DeploymentContext) {
    DeploymentContext deployContext=(DeploymentContext)stopContext;
    Properties props=null;
    boolean keepSessions=isKeepState(deployContext,false);
    if (keepSessions) {
      props=new Properties();
    }
    container.unloadWebModule(getDescriptor().getContextRoot(),getDescriptor().getApplication().getRegistrationName(),wmInfo.getVirtualServers(),props);
    if (keepSessions) {
      Properties actionReportProps=getActionReportProperties(deployContext);
      if (actionReportProps != null) {
        actionReportProps.putAll(props);
      }
    }
  }
  stopCoherenceWeb();
  return true;
}
Program: 29572
Project: 29572
Buggy source:
/** 
 * Delete virtual-server.
 * @param httpService element which contains the configuration info.
 */
public void deleteHost(HttpService httpService) throws LifecycleException {
  VirtualServer virtualServer;
  Container[] virtualServers=getEngine().findChildren();
  for (int i=0; i < virtualServers.length; i++) {
    for (    com.sun.enterprise.config.serverbeans.VirtualServer vse : httpService.getVirtualServer()) {
      if (virtualServers[i].getName().equals(vse.getId())) {
        virtualServers[i]=null;
        break;
      }
    }
  }
  for (  Container virtualServer1 : virtualServers) {
    virtualServer=(VirtualServer)virtualServer1;
    if (virtualServer != null) {
      if (virtualServer.getID().equals(org.glassfish.api.web.Constants.ADMIN_VS)) {
        throw new LifecycleException("String_Node_Str");
      }
      Container[] webModules=virtualServer.findChildren();
      for (      Container webModule : webModules) {
        unloadWebModule(webModule.getName(),webModule.getName(),virtualServer.getID(),null);
      }
      try {
        virtualServer.destroy();
      }
 catch (      Exception e) {
        String msg=rb.getString("String_Node_Str");
        msg=MessageFormat.format(msg,virtualServer.getID());
        _logger.log(Level.WARNING,msg,e);
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Delete virtual-server.
 * @param httpService element which contains the configuration info.
 */
public void deleteHost(HttpService httpService) throws LifecycleException {
  VirtualServer virtualServer;
  Container[] virtualServers=getEngine().findChildren();
  for (int i=0; i < virtualServers.length; i++) {
    for (    com.sun.enterprise.config.serverbeans.VirtualServer vse : httpService.getVirtualServer()) {
      if (virtualServers[i].getName().equals(vse.getId())) {
        virtualServers[i]=null;
        break;
      }
    }
  }
  for (  Container virtualServer1 : virtualServers) {
    virtualServer=(VirtualServer)virtualServer1;
    if (virtualServer != null) {
      if (virtualServer.getID().equals(org.glassfish.api.web.Constants.ADMIN_VS)) {
        throw new LifecycleException("String_Node_Str");
      }
      Container[] webModules=virtualServer.findChildren();
      for (      Container webModule : webModules) {
        String appName=webModule.getName();
        if (webModule instanceof WebModule) {
          appName=((WebModule)webModule).getWebBundleDescriptor().getApplication().getRegistrationName();
        }
        unloadWebModule(webModule.getName(),appName,virtualServer.getID(),null);
      }
      try {
        virtualServer.destroy();
      }
 catch (      Exception e) {
        String msg=rb.getString("String_Node_Str");
        msg=MessageFormat.format(msg,virtualServer.getID());
        _logger.log(Level.WARNING,msg,e);
      }
    }
  }
}
Program: 29573
Project: 29573
Buggy source:
/** 
 * Return a Habitat used just for reading man pages from the modules in the modules directory.
 */
private static synchronized Habitat getManHabitat(){
  if (manHabitat != null)   return manHabitat;
  ModulesRegistry registry=new StaticModulesRegistry(getModuleClassLoader());
  manHabitat=new Habitat();
  return manHabitat;
}

Fixed version (ground truth):
/** 
 * Return a Habitat used just for reading man pages from the modules in the modules directory.
 */
private static synchronized Habitat getManHabitat(){
  if (manHabitat != null)   return manHabitat;
  manHabitat=new Habitat();
  return manHabitat;
}
Program: 29574
Project: 29574
Buggy source:
private void createActiveResourceAdapter(String rarModuleName) throws ConnectorRuntimeException {
  ConnectorRuntime cr=connectorRuntimeProvider.get();
  ConnectorRegistry creg=ConnectorRegistry.getInstance();
  if (creg.isRegistered(rarModuleName))   return;
  if (ConnectorAdminServiceUtils.isEmbeddedConnectorModule(rarModuleName)) {
    cr.createActiveResourceAdapterForEmbeddedRar(rarModuleName);
  }
 else {
    String moduleDir;
    if (ConnectorsUtil.belongsToSystemRA(rarModuleName)) {
      moduleDir=ConnectorsUtil.getSystemModuleLocation(rarModuleName);
    }
 else {
      moduleDir=ConfigBeansUtilities.getLocation(rarModuleName);
    }
    ClassLoader loader=cr.createConnectorClassLoader(moduleDir,null,rarModuleName);
    cr.createActiveResourceAdapter(moduleDir,rarModuleName,loader);
  }
}

Fixed version (ground truth):
private void createActiveResourceAdapter(String rarModuleName) throws ConnectorRuntimeException {
  ConnectorRuntime cr=connectorRuntimeProvider.get();
  ConnectorRegistry creg=ConnectorRegistry.getInstance();
  if (creg.isRegistered(rarModuleName))   return;
  if (ConnectorAdminServiceUtils.isEmbeddedConnectorModule(rarModuleName)) {
    cr.createActiveResourceAdapterForEmbeddedRar(rarModuleName);
  }
 else {
    String moduleDir;
    if (ConnectorsUtil.belongsToSystemRA(rarModuleName)) {
      moduleDir=ConnectorsUtil.getSystemModuleLocation(rarModuleName);
    }
 else {
      moduleDir=configBeansUtilities.getLocation(rarModuleName);
    }
    ClassLoader loader=cr.createConnectorClassLoader(moduleDir,null,rarModuleName);
    cr.createActiveResourceAdapter(moduleDir,rarModuleName,loader);
  }
}
Program: 29575
Project: 29575
Buggy source:
public static String getLocation(String moduleName) throws ConnectorRuntimeException {
  String location=null;
  if (ConnectorsUtil.belongsToSystemRA(moduleName)) {
    location=ConnectorsUtil.getSystemModuleLocation(moduleName);
  }
 else {
    location=ConfigBeansUtilities.getLocation(moduleName);
    if (location == null) {
      String rarName=getRarNameFromApplication(moduleName);
      String appName=getApplicationNameOfEmbeddedRar(moduleName);
      if (appName != null && rarName != null) {
        location=ConfigBeansUtilities.getLocation(appName);
        if (location != null) {
          location=location + File.separator + rarName+ "String_Node_Str";
        }
 else {
          throw new ConnectorRuntimeException("String_Node_Str" + moduleName);
        }
      }
    }
  }
  return location;
}

Fixed version (ground truth):
public static String getLocation(String moduleName) throws ConnectorRuntimeException {
  String location=null;
  if (ConnectorsUtil.belongsToSystemRA(moduleName)) {
    location=ConnectorsUtil.getSystemModuleLocation(moduleName);
  }
 else {
    location=internalGetLocation(moduleName);
    if (location == null) {
      String rarName=getRarNameFromApplication(moduleName);
      String appName=getApplicationNameOfEmbeddedRar(moduleName);
      if (appName != null && rarName != null) {
        location=internalGetLocation(appName);
        if (location != null) {
          location=location + File.separator + rarName+ "String_Node_Str";
        }
 else {
          throw new ConnectorRuntimeException("String_Node_Str" + moduleName);
        }
      }
    }
  }
  return location;
}
Program: 29576
Project: 29576
Buggy source:
public static boolean isStandAloneRA(String moduleName){
  return ConfigBeansUtilities.getModule(moduleName) != null;
}

Fixed version (ground truth):
public static boolean isStandAloneRA(String moduleName){
  ConfigBeansUtilities cbu=getConfigBeansUtilities();
  ApplicationName an=null;
  if (cbu != null) {
    an=cbu.getModule(moduleName);
  }
  return (an != null);
}
Program: 29577
Project: 29577
Buggy source:
private void deleteResourceRef(String jndiName,String target) throws TransactionFailure {
  if (target.equals(DOMAIN)) {
    return;
  }
  if (domain.getConfigNamed(target) != null) {
    return;
  }
  Server server=ConfigBeansUtilities.getServerNamed(target);
  if (server != null) {
    if (server.isResourceRefExists(jndiName)) {
      server.deleteResourceRef(jndiName);
    }
  }
 else {
    Cluster cluster=domain.getClusterNamed(target);
    if (cluster != null) {
      if (cluster.isResourceRefExists(jndiName)) {
        cluster.deleteResourceRef(jndiName);
        Target tgt=habitat.getComponent(Target.class);
        List<Server> instances=tgt.getInstances(target);
        for (        Server svr : instances) {
          if (svr.isResourceRefExists(jndiName)) {
            svr.deleteResourceRef(jndiName);
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void deleteResourceRef(String jndiName,String target) throws TransactionFailure {
  if (target.equals(DOMAIN)) {
    return;
  }
  if (domain.getConfigNamed(target) != null) {
    return;
  }
  Server server=configBeansUtilities.getServerNamed(target);
  if (server != null) {
    if (server.isResourceRefExists(jndiName)) {
      server.deleteResourceRef(jndiName);
    }
  }
 else {
    Cluster cluster=domain.getClusterNamed(target);
    if (cluster != null) {
      if (cluster.isResourceRefExists(jndiName)) {
        cluster.deleteResourceRef(jndiName);
        Target tgt=habitat.getComponent(Target.class);
        List<Server> instances=tgt.getInstances(target);
        for (        Server svr : instances) {
          if (svr.isResourceRefExists(jndiName)) {
            svr.deleteResourceRef(jndiName);
          }
        }
      }
    }
  }
}