Begin 249841, 256836
358043
public void aggregateQueryStringParams(String additionalQueryString, boolean setQS)
    {
        // 321485
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"aggregateQueryStringParams", "entry qs --> " + additionalQueryString + " set --> " + String.valueOf(setQS));
        }
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        QSListItem tmpQS = null;
        SRTServletRequestThreadData reqData = SRTServletRequestThreadData.getInstance();        
        if (reqData.getParameters() == null)
        {
            if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))   //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"aggregateQueryStringParams", "The paramater stack is currently null");
            // Begin 258025, Part 2
            LinkedList queryStringList = SRTServletRequestThreadData.getInstance().getQueryStringList();
            if (queryStringList == null || queryStringList.isEmpty())
            {
                if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
                    logger.logp(Level.FINE, CLASS_NAME,"aggregateQueryStringParams", "The queryStringList is empty");
                if (queryStringList == null)
                   queryStringList = new LinkedList();

                if (getQueryString()!=null){
                    if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))  //306998.15
                        logger.logp(Level.FINE, CLASS_NAME,"aggregateQueryStringParams", "getQueryString will be added first in the QSList wih value->"+getQueryString());
                    tmpQS = new QSListItem(getQueryString(), null);
                    queryStringList.add(tmpQS);
                }
                SRTServletRequestThreadData.getInstance().setQueryStringList(queryStringList);

            }
            // End 258025, Part 2
            if (additionalQueryString !=null){
                tmpQS = new QSListItem(additionalQueryString, null);
                queryStringList.add(tmpQS);
            }
            
       }
        if (setQS){
            setQueryString(additionalQueryString);
        }

        // if _parameters is not null, then this is part of a forward or include...add the additional query parms
        // if _parameters is null, then the string will be parsed if needed
        if (reqData.getParameters() != null && additionalQueryString != null)
        {
            Hashtable parameters = RequestUtils.parseQueryString(additionalQueryString, getReaderEncoding(true));
            // end 249841, 256836
            String[] valArray;
            for (Enumeration e = parameters.keys(); e.hasMoreElements();)
            {
                String key = (String) e.nextElement();
                String[] newVals = (String[]) parameters.get(key);

                // Check to see if a parameter with the key already exists
                // and prepend the values since QueryString takes precedence
                //
                if (reqData.getParameters().containsKey(key))
                {
                    String[] oldVals = (String[]) reqData.getParameters().get(key);
                    Vector v = new Vector();

                    for (int i = 0; i < newVals.length; i++)
                    {
                        v.add(newVals[i]);
                    }

                    for (int i = 0; i < oldVals.length; i++)
                    {
                        // 249841, do not check to see if values already exist
                        v.add(oldVals[i]);
                    }

                    valArray = new String[v.size()];
                    v.toArray(valArray);

                    reqData.getParameters().put(key, valArray);
                }
                else
                {
                    reqData.getParameters().put(key, newVals);
                }
            }
        }
    }
107455
private HashMap<String, Integer> getWisley_500() {
        HashMap<String, Integer> map = new HashMap<String, Integer>();

        map.put("C", 39);
        map.put("H", 72);
        map.put("N", 20);
        map.put("O", 20);
        map.put("P", 9);
        map.put("S", 10);
        map.put("F", 16);
        map.put("Cl", 10);
        map.put("Br", 4);
        map.put("Si", 8);

        return map;
    }
545553
public long nzNumber(ImapRequestLineReader request) throws ProtocolException {
        long number = number(request);
        if (number == 0) {
            throw new ProtocolException("Zero value not permitted.");
        }
        return number;
    }
164576
def get_numbers(s):
    """"""

    result = map(int, re.findall(r'[0-9]+', unicode(s)))
    return result + [1] * (2 - len(result))
857757
function require302(message) {
  return function(ctx, next) {
    if (ctx.res && ctx.res.statusCode === 302) {
      return next(false);
    } else if (ctx.res) {
      if (ctx.err) {
        if (!ctx.res.headers['x-error']) ctx.err.message = message;
      } else {
        ctx.err = new Error(message);
      }

      return next(ctx.err);
    }

    next();
  };
}
930826
def phone():
        
        result = ""
        result += "(" + str(RandomInteger.next_integer(111, 999)) + ") "
        result += str(RandomInteger.next_integer(111, 999))
        result += "-" + str(RandomInteger.next_integer(0, 9999))
        return result
1144158
private boolean matches10000( ApiDifference apiDiff )
    {
        throwIfMissing( false, false, true, true );

        int fromVersion = 0;
        int toVersion = 0;
        try
        {
            fromVersion = Integer.parseInt( from );
        }
        catch ( NumberFormatException e )
        {
            throw new IllegalArgumentException( "Failed to parse the \"from\" parameter as a number for " + this );
        }

        try
        {
            toVersion = Integer.parseInt( to );
        }
        catch ( NumberFormatException e )
        {
            throw new IllegalArgumentException( "Failed to parse the \"to\" parameter as a number for " + this );
        }

        String[] args = getArgs( apiDiff );

        int reportedOld = Integer.parseInt( args[0] );
        int reportedNew = Integer.parseInt( args[1] );

        return fromVersion == reportedOld && toVersion == reportedNew;
    }
1324825
function(s) {
		var n = 1, u = 'b';
		
		if (s == 'unknown') {
			return this.i18n('unknown');
		}
		
		if (s > 1073741824) {
			n = 1073741824;
			u = 'GB';
		} else if (s > 1048576) {
			n = 1048576;
			u = 'MB';
		} else if (s > 1024) {
			n = 1024;
			u = 'KB';
		}
		s = s/n;
		return (s > 0 ? n >= 1048576 ? s.toFixed(2) : Math.round(s) : 0) +' '+u;
	}
234251
async def right(self):
        """"""
        await self._send_commands(
            self._move('Down', 0, 50, 100),
            self._move('Move', 1, 55, 100),
            self._move('Move', 3, 60, 100),
            self._move('Move', 4, 65, 100),
            self._move('Move', 5, 70, 100),
            self._move('Move', 6, 75, 100),
            self._move('Up', 7, 75, 100))
275516
def parse(self, fo):
        
        #KDIC|6.124756232026243
        #A|517.9999999999999 42.99999999999999 345.99999999999994 25.999999999999996 602.9999999999999 155.99999999999997 2.9999999999999996 91.99999999999999
        #C|5.999999999999999 4.999999999999999 2.9999999999999996 956.9999999999999 91.99999999999999 17.999999999999996 22.999999999999996 275.99999999999994
        #G|340.99999999999994 943.9999999999999 630.9999999999999 6.999999999999999 16.999999999999996 48.99999999999999 960.9999999999999 14.999999999999998
        #T|134.99999999999997 7.999999999999999 19.999999999999996 9.999999999999998 287.99999999999994 776.9999999999999 12.999999999999998 616.9999999999999
        #N|999.9999999999998
        line = fo.readline()
        if not line:
            return []
        
        while not line.startswith("A|"):
            line = fo.readline() 
        matrix = []
        for _ in range(4):
            matrix.append([float(x) for x in line.strip().split("|")[1].split(" ")])
            line = fo.readline()
        #print matrix
        matrix = [[matrix[x][y] for x in range(4)] for y in range(len(matrix[0]))]
        #print matrix
        m = Motif(matrix)
        m.id = "ChIPMunk_w%s" % len(m)
        return [m]
347322
function ip2long( a, b, c, d ) {
   for (
     c = b = 0;
     d = a.split('.')[b++];
     c +=
     d >> 8
     |
     b > 4 ?
     NaN
     :
     d * (1 << -8 * b)
     )
   d = parseInt(
     +d
     &&
     d
     );
   return c
   }
570602
function hash256(data) {
  const out = Buffer.allocUnsafe(32);
  ctx.init();
  ctx.update(data);
  ctx._finish(out);
  ctx.init();
  ctx.update(out);
  ctx._finish(out);
  return out;
}
905561
function writeFixed32 (num, buf, offset) {
  buf.writeUInt16BE(Math.floor(num) % (256 * 256), offset)
  buf.writeUInt16BE(Math.floor(num * 256 * 256) % (256 * 256), offset + 2)
}
92912
def replace_u_start_day(day):
    """"""
    day = day.lstrip('-')
    if day == 'uu' or day == '0u':
        return '01'
    if day == 'u0':
        return '10'
    return day.replace('u', '0')
1164317
function JSR() {
		var t = PC - 1;
		push( ( t & HIGH ) >> 8 );
		push( t & LOW );
		PC = address;
	}
846295
function yy_r123(){
    $this->_retvalue = ['key', $this->yystack[$this->yyidx + -1]->minor, $this->yystack[$this->yyidx + 0]->minor];
    }
660233
def I(self):
    "'"
    if self.timezone and self.timezone.dst(self.data):
      return u'1'
    else:
      return u'0'