<commit_before># the patches correct bugs of the default configuration:
#   * several concurrent jvm memory options are stated
#   * jvm runs in client mode (dev and prod mode)
#   * jvm options are not jdk7 compatible
#

patch_wls_domain()
{
  if [ "${1}" == "" ] ; then
    error "ERROR: Parameter missing"
    exit 0
  fi
  
  local src=${1}
  
  # wl_home
  if grep -e 'PRODUCTION_MODE="true"' ${WL_HOME}/common/bin/commEnv.sh >/dev/null ; then
    log "WL_HOME already patch, nothing to do"
  else
    patch -b ${WL_HOME}/common/bin/commEnv.sh <${src}/wl_home/commEnv.sh.patch
    log "WL_HOME patched: ${WL_HOME}"
  fi
  
  # admin domain
  if ! [ -a ${ADMIN_HOME}/bin/setCustDomainEnv.sh ]; then
    cp ${src}/domain/setCustDomainEnv.sh ${ADMIN_HOME}/bin/
  fi
  
  if ! grep setCustDomainEnv ${ADMIN_HOME}/bin/setDomainEnv.sh >/dev/null 2>&1 ; then
    patch -b ${ADMIN_HOME}/bin/setDomainEnv.sh <${src}/domain/setDomainEnv.sh.patch
    log "ADMIN_HOME patched: ${ADMIN_HOME}"
  fi
  
  # local domain
  if ! [ -a ${WRK_HOME}/bin/setCustDomainEnv.sh ]; then
    cp ${src}/domain/setCustDomainEnv.sh ${WRK_HOME}/bin/
  fi
  
  if ! grep setCustDomainEnv ${WRK_HOME}/bin/setDomainEnv.sh >/dev/null 2>&1 ; then
    patch -b ${WRK_HOME}/bin/setDomainEnv.sh <${src}/domain/setDomainEnv.sh.patch
    log "WRK_HOME patched: ${WRK_HOME}"
  fi
}<commit_msg>separated wls and domain functions<commit_after># the patches correct bugs of the default configuration:
#   * several concurrent jvm memory options are stated
#   * jvm runs in client mode (dev and prod mode)
#   * jvm options are not jdk7 compatible
#

patch_wls_bin()
{
  if [ "${1}" == "" ] ; then
    error "ERROR: Parameter missing"
    exit 0
  fi
  
  local _p=${1}
  local _src=${DEPLOYER}/lib/weblogic

  # wl_home
  if grep -e 'PRODUCTION_MODE="true"' ${iam_top}/${_p}/wlserver_10.3/common/bin/commEnv.sh >/dev/null ; then
    log "WL_HOME already patch, nothing to do"
  else
    patch -b ${iam_top}/${_p}/common/bin/commEnv.sh <${_src}/weblogic/commEnv.sh.patch
    log "WL_HOME patched: ${iam_top}/${_p}"
  fi
}

patch_wls_domain()
{
  if [ "${1}" == "" ] ; then
    error "ERROR: Parameter missing"
    exit 0
  fi

  local _domain=${1}
  local _src=${DEPLOYER}/lib/${_domain}

  # admin domain
  if ! [ -a ${ADMIN_HOME}/bin/setCustDomainEnv.sh ]; then
    cp ${_src}/domain/setCustDomainEnv.sh ${ADMIN_HOME}/bin/
  fi

  if ! grep setCustDomainEnv ${ADMIN_HOME}/bin/setDomainEnv.sh >/dev/null 2>&1 ; then
    patch -b ${ADMIN_HOME}/bin/setDomainEnv.sh <${_src}//domain/setDomainEnv.sh.patch
    log "ADMIN_HOME patched: ${ADMIN_HOME}"
  fi

  # local domain
  if ! [ -a ${WRK_HOME}/bin/setCustDomainEnv.sh ]; then
    cp ${_src}/domain/setCustDomainEnv.sh ${WRK_HOME}/bin/
  fi

  if ! grep setCustDomainEnv ${WRK_HOME}/bin/setDomainEnv.sh >/dev/null 2>&1 ; then
    patch -b ${WRK_HOME}/bin/setDomainEnv.sh <${_src}/domain/setDomainEnv.sh.patch
    log "WRK_HOME patched: ${WRK_HOME}"
  fi
}
{'fraction_non_alphanumeric': 0.14878542510121456, 'fraction_numerical': 0.007422402159244264, 'mean_word_length': 3.418777943368107, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6094026', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1116, 'n_words': 263}