Program: 28782
Project: 28782
Buggy source:
protected void configureContextXmlAttribute(WebappClassLoader cloader,File base,DeploymentContext dc) throws XMLStreamException, FileNotFoundException {
  boolean consistent=true;
  Boolean value=null;
  File warContextXml=new File(base.getAbsolutePath(),WAR_CONTEXT_XML);
  if (warContextXml.exists()) {
    ContextXmlParser parser=new ContextXmlParser(warContextXml);
    value=parser.getClearReferencesStatic();
  }
  if (value == null) {
    Boolean domainCRS=null;
    File defaultContextXml=new File(serverEnvironment.getInstanceRoot(),DEFAULT_CONTEXT_XML);
    if (defaultContextXml.exists()) {
      ContextXmlParser parser=new ContextXmlParser(defaultContextXml);
      domainCRS=parser.getClearReferencesStatic();
    }
    List<Boolean> csrs=new ArrayList<Boolean>();
    HttpService httpService=serverConfig.getHttpService();
    DeployCommandParameters params=dc.getCommandParameters(DeployCommandParameters.class);
    String vsIDs=params.virtualservers;
    List<String> vsList=StringUtils.parseStringList(vsIDs,"String_Node_Str");
    if (httpService != null && vsList != null && !vsList.isEmpty()) {
      for (      VirtualServer vsBean : httpService.getVirtualServer()) {
        if (vsList.contains(vsBean.getId())) {
          Boolean csr=null;
          Property prop=vsBean.getProperty("String_Node_Str");
          if (prop != null) {
            File contextXml=new File(serverEnvironment.getInstanceRoot(),prop.getValue());
            if (contextXml.exists()) {
              ContextXmlParser parser=new ContextXmlParser(contextXml);
              csr=parser.getClearReferencesStatic();
            }
          }
          if (csr == null) {
            csr=domainCRS;
          }
          csrs.add(csr);
        }
      }
      for (      Boolean b : csrs) {
        if (b != null) {
          if (value != null && !b.equals(value)) {
            consistent=false;
            break;
          }
          value=b;
        }
      }
    }
  }
  if (consistent) {
    if (value != null) {
      cloader.setClearReferencesStatic(value);
    }
  }
 else   if (logger.isLoggable(Level.WARNING)) {
    logger.log(Level.WARNING,INCONSISTENT_CLEAR_REFERENCE_STATIC);
  }
}

Fixed version (ground truth):
protected void configureContextXmlAttribute(WebappClassLoader cloader,File base,DeploymentContext dc) throws XMLStreamException, IOException {
  boolean consistent=true;
  Boolean value=null;
  File warContextXml=new File(base.getAbsolutePath(),WAR_CONTEXT_XML);
  if (warContextXml.exists()) {
    ContextXmlParser parser=new ContextXmlParser(warContextXml);
    value=parser.getClearReferencesStatic();
  }
  if (value == null) {
    Boolean domainCRS=null;
    File defaultContextXml=new File(serverEnvironment.getInstanceRoot(),DEFAULT_CONTEXT_XML);
    if (defaultContextXml.exists()) {
      ContextXmlParser parser=new ContextXmlParser(defaultContextXml);
      domainCRS=parser.getClearReferencesStatic();
    }
    List<Boolean> csrs=new ArrayList<Boolean>();
    HttpService httpService=serverConfig.getHttpService();
    DeployCommandParameters params=dc.getCommandParameters(DeployCommandParameters.class);
    String vsIDs=params.virtualservers;
    List<String> vsList=StringUtils.parseStringList(vsIDs,"String_Node_Str");
    if (httpService != null && vsList != null && !vsList.isEmpty()) {
      for (      VirtualServer vsBean : httpService.getVirtualServer()) {
        if (vsList.contains(vsBean.getId())) {
          Boolean csr=null;
          Property prop=vsBean.getProperty("String_Node_Str");
          if (prop != null) {
            File contextXml=new File(serverEnvironment.getInstanceRoot(),prop.getValue());
            if (contextXml.exists()) {
              ContextXmlParser parser=new ContextXmlParser(contextXml);
              csr=parser.getClearReferencesStatic();
            }
          }
          if (csr == null) {
            csr=domainCRS;
          }
          csrs.add(csr);
        }
      }
      for (      Boolean b : csrs) {
        if (b != null) {
          if (value != null && !b.equals(value)) {
            consistent=false;
            break;
          }
          value=b;
        }
      }
    }
  }
  if (consistent) {
    if (value != null) {
      cloader.setClearReferencesStatic(value);
    }
  }
 else   if (logger.isLoggable(Level.WARNING)) {
    logger.log(Level.WARNING,INCONSISTENT_CLEAR_REFERENCE_STATIC);
  }
}