FIXME: Kod metod 'put' 'contains' i 'get' do optymalizacji!!!
512372
@Override
	public void put(String key, String groupId, String templateId, String version, Template<?> template) {
		if(key == null) {
			Map<String, Template<?>> vMap = gtvTable.get(groupId, templateId);
			if(vMap == null) {
				vMap = new HashMap<String, Template<?>>();
				gtvTable.put(groupId, templateId, vMap);
			} else if(vMap.containsKey(version)) {
				throw new IllegalStateException("Powtórzona definicja szablonu " + groupId + ":" + templateId + ":" + version + " (" + key + ")");
			}
			vMap.put(version, template);
		} else if(key.indexOf(':') > 0) {
			StringTokenizer tokenizer = new StringTokenizer(key, ":", false);
			groupId = tokenizer.nextToken();
			templateId = tokenizer.nextToken();
			version = tokenizer.nextToken();

			Map<String, Template<?>> vMap = gtvTable.get(groupId, templateId);
			if(vMap == null) {
				vMap = new HashMap<String, Template<?>>();
				gtvTable.put(groupId, templateId, vMap);
			} else if(vMap.containsKey(version)) {
				throw new IllegalStateException("Powtórzona definicja szablonu " + groupId + ":" + templateId + ":" + version + " (" + key + ")");
			}
			vMap.put(version, template);
		} else {
			if(kMap.containsKey(key)) {
				throw new IllegalStateException("Powtórzony klucz szablonu: " + key);
			}
			kMap.put(key, template);
		}
	}
278076
function bnpDAddOffset(n,w) {
  while(this.t <= w) this[this.t++] = 0;
  this[w] += n;
  while(this[w] >= this.DV) {
    this[w] -= this.DV;
    if(++w >= this.t) this[this.t++] = 0;
    ++this[w];
  }
}
56900
function init(input) {

		// rgba
		result = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(input);
		if (result) {
			rgba = [pInt(result[1]), pInt(result[2]), pInt(result[3]), parseFloat(result[4], 10)];
		} else { // hex
			result = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(input);
			if (result) {
				rgba = [pInt(result[1], 16), pInt(result[2], 16), pInt(result[3], 16), 1];
			}
		}

	}
1363754
private void put(final Item i) {
        if (index > threshold) {
            int ll = items.length;
            int nl = ll * 2 + 1;
            Item[] newItems = new Item[nl];
            for (int l = ll - 1; l >= 0; --l) {
                Item j = items[l];
                while (j != null) {
                    int index = j.hashCode % newItems.length;
                    Item k = j.next;
                    j.next = newItems[index];
                    newItems[index] = j;
                    j = k;
                }
            }
            items = newItems;
            threshold = (int) (nl * 0.75);
        }
        int index = i.hashCode % items.length;
        i.next = items[index];
        items[index] = i;
    }
30998
function insert(match, commenttype, statement, file) {
    var location = path.resolve(reference, file)
      , data = '';

    //
    // If it's not an absolute path, try to require.resolve the file.
    //
    if (!fs.existsSync(location)) try {
      location = require.resolve(file);
    } catch (e) { }

    if (!fs.existsSync(location)) {
      return self.critical(
          '// [square] @%s statement %s in %s does not exist'
        , statement
        , file.red
        , reference.red
      );
    }

    if (~seen.indexOf(location)) {
      return self.critical('recursive [square] import statement detected %s', match);
    }

    // We processed the file, mark it as seen to protect us against recursive
    // includes.
    seen.push(location);

    data += self.commentWrap('[square] Directive: ' + location, extension);
    data += fs.readFileSync(location, 'utf8').trim();

    // Pass the contents back in to the directive again so we can also process
    // the directives inside the directive.
    return self.directive(data, extension, path.dirname(location), seen);
  }
419415
function Optimize($i = -1)
	{
		// check the file description
		if (!$this->fd || $this->mode != 'w')
		{
			trigger_error("XDB::Optimize(), null db handler or readonly.", E_USER_WARNING);
			return false;
		}

		// get the index zone:
		if ($i < 0 || $i >= $this->hash_prime)
		{
			$i = 0;
			$j = $this->hash_prime;
		}
		else
		{
			$j = $i + 1;
		}

		// optimize every index
		while ($i < $j)
		{
			$this->_optimize_index($i);
			$i++;
		}
	}
1258167
public final TypeV putIfMatchUnlocked( Object key, Object newVal, Object oldVal ) {
    if( oldVal == null ) oldVal = TOMBSTONE;
    if( newVal == null ) newVal = TOMBSTONE;
    final TypeV res = (TypeV)putIfMatch( this, _kvs, key, newVal, oldVal );
    assert !(res instanceof Prime);
    //assert res != null;
    return res == TOMBSTONE ? null : res;
  }
1215603
def fixminimized(self, alphabet):
        
        endstate = len(list(self.states))
        for state in self.states:
            for char in alphabet:
                found = 0
                for arc in state.arcs:
                    if self.isyms.find(arc.ilabel) == char:
                        found = 1
                        break
                if found == 0:
                    self.add_arc(state.stateid, endstate, char)

        self[endstate].final = TropicalWeight(float('inf'))

        for char in alphabet:
            self.add_arc(endstate, endstate, char)
752379
def puts(string)
      util = output
      util.write(prefix)
      util.puts(string)
      self
    end
552386
function putbytes($s, $l)
	{
		for($i = 0; $i < $l; $i++)
		{
			$this->fout .= pack('C*', $s[$i]);
		}
	}
676521
private static void updateDirecotryDigest(final String path, final File file, MessageDigest md) throws Exception {
		String relativePath = file.getCanonicalPath().substring(path.length());
		relativePath = relativePath.replace('\\', '/');		// normalizacja ścieżki
		if(file.isDirectory()) {
			md.update(relativePath.getBytes(Charset.forName("UTF8")));
			if(logger.isLoggable(LOG_LEVEL)) {
				countDigest(md.getAlgorithm(), new PathNameInputStream(relativePath));
			}

			final File[] content = file.listFiles();
			Arrays.sort(content, new Comparator<File>() {
				@Override
				public int compare(File f1, File f2) {
					return f1.getName().compareTo(f2.getName());
				}
			});

			for(File subFile : content) {
				updateDirecotryDigest(path, subFile, md);
			}
		} else {
			md.update(relativePath.getBytes(Charset.forName("UTF8")));
			if(logger.isLoggable(LOG_LEVEL)) {
				countDigest(md.getAlgorithm(), new PathNameInputStream(relativePath));
			}

			updateDigest(md, new FileInputStream(file));
			if(logger.isLoggable(LOG_LEVEL)) {
				countDigest(md.getAlgorithm(), new FileNameInputStream(file, relativePath));
			}
		}
	}
1075717
function (opts) {
        var target   = opts.target,
            priority = opts.priority,
            paused   = opts.paused

        var i, len
        var entry = {target: target, priority: priority, paused: paused}
        var added = false

        if (priority === 0) {
            this.updates0.push(entry)
        } else if (priority < 0) {
            for (i = 0, len = this.updatesNeg.length; i < len; i++) {
                if (priority < this.updatesNeg[i].priority) {
                    this.updatesNeg.splice(i, 0, entry)
                    added = true
                    break
                }
            }

            if (!added) {
                this.updatesNeg.push(entry)
            }
        } else /* priority > 0 */{
            for (i = 0, len = this.updatesPos.length; i < len; i++) {
                if (priority < this.updatesPos[i].priority) {
                    this.updatesPos.splice(i, 0, entry)
                    added = true
                    break
                }
            }

            if (!added) {
                this.updatesPos.push(entry)
            }
        }

        this.hashForUpdates[target.id] = entry
    }
1164026
function checkAdd(list, key, func) {
    list.push({key: key, func: func});
  }
966748
function $(tok) {
        var tokType = typeof tok,
            match, length;

        // Either match a single character in the input,
        // or match a regexp in the current chunk (`current`).
        //
        if (tokType === "string") {
            if (input.charAt(i) !== tok) {
                return null;
            }
            skipWhitespace(1);
            return tok;
        }

        // regexp
        sync ();
        if (! (match = tok.exec(current))) {
            return null;
        }

        length = match[0].length;

        // The match is confirmed, add the match length to `i`,
        // and consume any extra white-space characters (' ' || '\n')
        // which come after that. The reason for this is that LeSS's
        // grammar is mostly white-space insensitive.
        //
        skipWhitespace(length);

        if(typeof(match) === 'string') {
            return match;
        } else {
            return match.length === 1 ? match[0] : match;
        }
    }
642890
function(input, shallow, strict, output) {
    if (shallow && _.every(input, _.isArray)) {
      return concat.apply(output, input);
    }
    for (var i = 0, length = input.length; i < length; i++) {
      var value = input[i];
      if (!_.isArray(value) && !_.isArguments(value)) {
        if (!strict) output.push(value);
      } else if (shallow) {
        push.apply(output, value);
      } else {
        flatten(value, shallow, strict, output);
      }
    }
    return output;
  }
165044
protected function _updateRecordDataBeforeSave()
    {
        //jeśli formularz nie ma rekordu
        if (!$this->hasRecord()) {
            return;
        }
        //dla każdego elementu formularza
        foreach ($this->getElements() as $element) {
            //pomijamy inne elementy niż TinyMce
            if (!$element instanceof \Cms\Form\Element\TinyMce || !$element->getUploaderObject()) {
                continue;
            }
            //dla każdego elementu TinyMce
            $value = $element->getValue();
            foreach (\Cms\Orm\CmsFileQuery::byObjectJoinedOriginal('tmp-' . $element->getUploaderObject(), $element->getUploaderId())
                ->find() as $file) {
                if (!$file->getJoined('original_file') || !$file->getJoined('original_file')->name) {
                    continue;
                }
                $oName = $file->getJoined('original_file')->name;
                $tName = $file->name;
                $value = preg_replace('@/data/' . $tName[0] . '/' . $tName[1] . '/' . $tName[2] . '/' . $tName[3] . '/(scalecrop|scalex|scaley|default)/([0-9x]{0,10})/' . $tName . '@', '/data/' . $oName[0] . '/' . $oName[1] . '/' . $oName[2] . '/' . $oName[3] . '/$1/$2/' . $oName, $value);
            }
            $element->setValue($value);
            $this->_record->setFromArray([$element->getName() => $value]);
        }
    }
106730
boolean putIfMissing(Key key, V value){

		if(containsKey(key)){
			return false;
		}

		put(key, value);

		return true;
	}