set @sssn if not exist
963504
def intern_sssn
      @sssn ||=
          if (sid = request.session_options[:id])
            Edgarj::Sssn.find_by_session_id(sid) ||
                Edgarj::Sssn.new(session_id: sid)
          else
            Edgarj::Sssn.new
          end
    end
1162445
def absent(name, auth=None, **kwargs):
    '''
    

    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    kwargs = __utils__['args.clean_kwargs'](**kwargs)

    __salt__['neutronng.setup_clouds'](auth)

    kwargs['name'] = name
    network = __salt__['neutronng.network_get'](name=name)

    if network:
        if __opts__['test'] is True:
            ret['result'] = None
            ret['changes'] = {'id': network.id}
            ret['comment'] = 'Network will be deleted.'
            return ret

        __salt__['neutronng.network_delete'](name=network)
        ret['changes']['id'] = network.id
        ret['comment'] = 'Deleted network'

    return ret
878247
def _fssys(name, value=None, log_lvl=None, log_msg=None):
    '''
    
    '''
    fspath = _fspath()
    if not fspath:
        return False
    else:
        return _sysfs_attr([fspath, name], value, log_lvl, log_msg)
277950
def set_insn(self, insn):
        
        self.insn = insn
        self.size = len(self.insn)
136608
public function setAwsSdk()
    {
        $this->_awssdk = new Aws\Sdk(array_merge([ 
                                        'credentials' => $this->credentials,
                                        'region'=>$this->region,
                                        'version'=>$this->version
                                    ],$this->extra));
    }
40289
def absent(name, auth=None, **kwargs):
    '''
    

    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    kwargs = __utils__['args.clean_kwargs'](**kwargs)

    __salt__['neutronng.setup_clouds'](auth)

    kwargs['project_id'] = __salt__['keystoneng.project_get'](
        name=kwargs['project_name'])

    secgroup = __salt__['neutronng.security_group_get'](
        name=name,
        filters={'project_id': kwargs['project_id']}
    )

    if secgroup:
        if __opts__['test'] is True:
            ret['result'] = None
            ret['changes'] = {'id': secgroup.id}
            ret['comment'] = 'Security group will be deleted.'
            return ret

        __salt__['neutronng.security_group_delete'](name=secgroup)
        ret['changes']['id'] = name
        ret['comment'] = 'Deleted security group'

    return ret
1331215
void setHandshakeSessionSE(SSLSessionImpl handshakeSession) {
        if (conn != null) {
            conn.setHandshakeSession(handshakeSession);
        } else {
            engine.setHandshakeSession(handshakeSession);
        }
    }
1247863
def set(name, contents = '', type = 500)
      sd = @client.sd.update(name, contents)
      if sd.is_a?(Hash) && (sd["errorCode"] == -22) # doesn't exist
        sd = @client.sd.create(name, contents)
      end
      sd
    end
415356
def _update_rs_with_primary_from_member(
        sds,
        replica_set_name,
        server_description):
    
    assert replica_set_name is not None

    if replica_set_name != server_description.replica_set_name:
        sds.pop(server_description.address)
    elif (server_description.me and
          server_description.address != server_description.me):
        sds.pop(server_description.address)

    # Had this member been the primary?
    return _check_has_primary(sds)
1250603
def set_if_empty(*keys, value: nil, &block)
      return unless deep_find(@settings, keys.last.to_s).nil?
      block ? set(*keys, &block) : set(*keys, value: value)
    end
416370
public synchronized void notifySSLConfigChangeListener(String alias, String state) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "notifySSLConfigChangeListener", new Object[] { alias, state });

        if (alias != null) {
            List<SSLConfigChangeListener> listenerList = sslConfigListenerMap.get(alias);

            if (listenerList != null && listenerList.size() > 0) {
                SSLConfigChangeListener[] listenerArray = listenerList.toArray(new SSLConfigChangeListener[listenerList.size()]);

                for (int i = 0; i < listenerArray.length; i++) {
                    SSLConfigChangeEvent event = null;

                    // get the event associated with the listener
                    event = sslConfigListenerEventMap.get(listenerArray[i]);

                    if (event != null) {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                            Tr.debug(tc, "Notifying listener[" + i + "]: " + listenerArray[i].getClass().getName());
                        event.setState(state);
                        SSLConfig changedConfig = sslConfigMap.get(alias);
                        event.setChangedSSLConfig(changedConfig);
                        listenerArray[i].stateChanged(event);

                        if (state.equals(Constants.CONFIG_STATE_DELETED)) {
                            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                                Tr.debug(tc, "Deregistering event for listener.");
                            sslConfigListenerEventMap.remove(listenerArray[i]);
                        }
                    }
                }

                if (state.equals(Constants.CONFIG_STATE_DELETED)) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                        Tr.debug(tc, "Deregistering all listeners for this alias due to alias deletion.");
                    sslConfigListenerMap.remove(alias);
                }
            }
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "notifySSLConfigChangeListener");
    }
573115
protected void onHandshakeFinish(SSLEngine engine) {
        // PK16095 - control the SSLSession cache inside the JSSE2 code

        // security is creating the contexts, which should not change but might.
        // we keep the last seen in an attempt to set these values only once
        // per context. The alternative is to keep a list of each unique one
        // seen but who knows how large that might grow to, so simply update
        // based on last seen.
        SSLSessionContext context = null;
        try {
            final SSLEngine localEngine = engine;
            context = AccessController.doPrivileged(new PrivilegedExceptionAction<SSLSessionContext>() {
                @Override
                public SSLSessionContext run() throws Exception {
                    return localEngine.getSession().getSessionContext();
                }
            });
        } catch (Exception e) {
            FFDCFilter.processException(e,
                                        getClass().getName() + ".onHandshakeFinish", "814");
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Exception querying sessioncontext; " + e);
            }
            return;
        }
        if (null == context || context.equals(this.sessionContext)) {
            return;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Channel [" + this + "] saving context: " + context);
        }
        this.sessionContext = context;
        context.setSessionCacheSize(getConfig().getSSLSessionCacheSize());
        context.setSessionTimeout(getConfig().getSSLSessionTimeout());
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Session cache size set to " + context.getSessionCacheSize());
            Tr.debug(tc, "Session timeout set to " + context.getSessionTimeout());
        }
    }
1204718
def absent(name, auth=None):
    '''
    

    '''
    ret = {'name': name,
           'changes': {},
           'result': True,
           'comment': ''}

    __salt__['neutronng.setup_clouds'](auth)

    subnet = __salt__['neutronng.subnet_get'](name=name)

    if subnet:
        if __opts__['test'] is True:
            ret['result'] = None
            ret['changes'] = {'id': subnet.id}
            ret['comment'] = 'Project will be deleted.'
            return ret

        __salt__['neutronng.subnet_delete'](name=subnet)
        ret['changes']['id'] = name
        ret['comment'] = 'Deleted subnet'

    return ret
218867
public static boolean isSSN(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        String normalizedSSN = stripCharsInBag(s, SSNDelimiters);

        return (isInteger(normalizedSSN) && normalizedSSN.length() == digitsInSocialSecurityNumber);
    }
1042698
def ss(name):
    '''
    

    '''
    sanitize_name = six.text_type(name)
    ss_infos = __salt__['cmd.run']("ss -neap")
    found_infos = []
    ret = []
    for info in ss_infos.splitlines():
        if info.find(sanitize_name) != -1:
            found_infos.append(info)
    ret.extend([sanitize_name, found_infos])
    return ret
187468
public static void assureSet(String s, String varName) {
    Objects.requireNonNull(varName);
    if (isEmpty(s.trim())) {
      throw new IllegalArgumentException(varName + " cannot be empty or whitespace only");
    }
  }
1045177
def set(self, key, val, time=0, min_compress_len=0):
        """"""
        if not self.servers:
            return

        key = self._qualified_key(key)
        hashed_key = self.key_hasher(key)
        val = (key, val)

        self.client.set(key=hashed_key,
                        val=val,
                        time=time,
                        min_compress_len=min_compress_len)
        self.logger("SET: %s", key)