<commit_before>#!/usr/bin/env bash
function log_deployment() {

  _deploy_db="$1"
  _change_type="$2"
  _filename="$3"
  _state="$4"
  _additional_fields=''
  _additonal_values=''

  if [ "${_deploy_db}" != "${deployment_db}" ]
  then
    _additional_fields=",
    deployed_by,
    deployed_as,
    reference_url"
    _additional_values=",
    '${deployed_by}',
    '${deployed_as}',
    '${change_control}'"
  fi

  _query_string="
  insert into deployment_tracker 
  ( 
    dbname, 
    deployment_type , 
    deployment_name , 
    deployment_outcome
    $_additional_fields
  )
  values 
  ( 
    '${_deploy_db}', 
    '${_change_type}', 
    '${_filename}', 
    '${_state}'
    $_additional_values
  )
  ;"


  ${db_binary} ${deployment_db} ${server_flag} ${user_flag} ${port_flag} -c "${_query_string}" > /dev/null 2>&1
  rc=$?

  unset _deploy_db
  unset _change_type
  unset _filename
  unset _state
  unset _query_string

  if [ ${rc} -eq 0 ] 
  then
    return 0
  else
    return 1
  fi
}<commit_msg>added unset for internal variables<commit_after>#!/usr/bin/env bash
function log_deployment() {

  _deploy_db="$1"
  _change_type="$2"
  _filename="$3"
  _state="$4"
  _additional_fields=''
  _additonal_values=''

  if [ "${_deploy_db}" != "${deployment_db}" ]
  then
    _additional_fields=",
    deployed_by,
    deployed_as,
    reference_url"
    _additional_values=",
    '${deployed_by}',
    '${deployed_as}',
    '${change_control}'"
  fi

  _query_string="
  insert into deployment_tracker 
  ( 
    dbname, 
    deployment_type , 
    deployment_name , 
    deployment_outcome
    $_additional_fields
  )
  values 
  ( 
    '${_deploy_db}', 
    '${_change_type}', 
    '${_filename}', 
    '${_state}'
    $_additional_values
  )
  ;"


  ${db_binary} ${deployment_db} ${server_flag} ${user_flag} ${port_flag} -c "${_query_string}" > /dev/null 2>&1
  rc=$?

  unset _deploy_db
  unset _change_type
  unset _filename
  unset _state
  unset _query_string
  unset _additional_fields
  unset _additional_values

  if [ ${rc} -eq 0 ] 
  then
    return 0
  else
    return 1
  fi
}
{'fraction_non_alphanumeric': 0.1391138637446403, 'fraction_numerical': 0.00857551214864221, 'mean_word_length': 3.191616766467066, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4419451', 'n_tokens_mistral': 827, 'n_tokens_neox': 788, 'n_words': 146}