in Guava 15 when released
485233
private static String escapeJavaString(String input)
    {
        int len = input.length();
        // assume (for performance, not for correctness) that string will not expand by more than 10 chars
        StringBuilder out = new StringBuilder(len + 10);
        for (int i = 0; i < len; i++) {
            char c = input.charAt(i);
            if (c >= 32 && c <= 0x7f) {
                if (c == '"') {
                    out.append('\\');
                    out.append('"');
                } else if (c == '\\') {
                    out.append('\\');
                    out.append('\\');
                } else {
                    out.append(c);
                }
            } else {
                out.append('\\');
                out.append('u');
                // one liner hack to have the hex string of length exactly 4
                out.append(Integer.toHexString(c | 0x10000).substring(1));
            }
        }
        return out.toString();
    }
715486
function init$15() {

        /* Place parameters in static storage for common use
         -------------------------------------------------*/
        this.sin_p14 = Math.sin(this.lat0);
        this.cos_p14 = Math.cos(this.lat0);
        // Approximation for projecting points to the horizon (infinity)
        this.infinity_dist = 1000 * this.a;
        this.rc = 1;
    }
1225309
protected function generateSlugOnCreate()
    {
        $this->slugOptions = $this->getSlugOptions();

        if (!$this->slugOptions->generateSlugOnCreate) {
            return;
        }

        $this->createSlug();
    }
290459
def pre_upgrade(self):
        """"""
        sql = text('select 1 from upgrade where upgrade = :upgrade')
        if not db.engine.execute(
            sql, upgrade='invenio_upgrader_2015_11_12_innodb_removal'
           ).fetchall():
            warnings.warn("Upgrade '{}' was not applied.".format(
                'invenio_upgrader_2015_11_12_innodb_removal'))
550346
public function exportAction() {
        $mem = new Garp_Util_Memory();
        $mem->useHighMemory();

        $params = new Garp_Util_Configuration($this->getRequest()->getParams());
        // make sure some required parameters are in place
        $params->obligate('exporttype')
            ->obligate('model')
            ->obligate('selection')
            ->setDefault('fields', Zend_Db_Select::SQL_WILDCARD);

        // fetch exporter
        $exporter = Garp_Content_Export_Factory::getExporter($params['exporttype']);
        $bytes = $exporter->getOutput($params);
        $filename = $exporter->getFilename($params);

        $download = Zend_Controller_Action_HelperBroker::getStaticHelper('download');
        $download->force($bytes, $filename, $this->_response);
        $this->_helper->viewRenderer->setNoRender();
    }
630122
def gpg_version():
    """"""
    cmd = flatten([gnupg_bin(), "--version"])
    output = stderr_output(cmd)
    output = output \
        .split('\n')[0] \
        .split(" ")[2] \
        .split('.')
    return tuple([int(x) for x in output])
1005909
function yy_r156()
    {
        $this->_retvalue =
            array_merge($this->yystack[ $this->yyidx + - 2 ]->minor, array($this->yystack[ $this->yyidx + 0 ]->minor));
    }
593310
private boolean is16(Connector connector)
   {
      if (connector == null ||
          connector.getVersion() == Connector.Version.V_16 ||
          connector.getVersion() == Connector.Version.V_17)
         return true;

      return false;
   }
1208919
def release():
    """"""
    release_check()
    build()
    print("Releasing %s version %s." % (env.projname, env.version))
    local("git tag %s" % env.version)
    local('gpg --detach-sign --armor dist/coursera-*.tar.gz*')
    local('twine upload dist/coursera-*.tar.gz*')
    local("git push")
    local("git push --tags")
298713
function inMultiFingerRelease() {
			
			var withinThreshold = false;
			
			if(previousTouchEndTime) {	
				var diff = getTimeStamp() - previousTouchEndTime	
				if( diff<=options.fingerReleaseThreshold ) {
					withinThreshold = true;
				}
			}
			
			return withinThreshold;	
		}
326219
function ensureSizzle( Release, callback ) {
	console.log();
	console.log( "Checking Sizzle version..." );
	getLatestSizzle( function( latest ) {
		var match = rversion.exec( fs.readFileSync( sizzleLoc, "utf8" ) ),
			version = match ? match[ 1 ] : "Not Found";

		if ( version !== latest ) {

			// colors is inherited from jquery-release
			console.log(
				"The Sizzle version in the src folder (" + chalk.red( version ) +
				") is not the latest tag (" + chalk.green( latest ) + ")."
			);
			Release.confirm( callback );
		} else {
			console.log( "Sizzle is latest (" + chalk.green( latest ) + ")" );
			callback();
		}
	} );
}
760517
function generateRELEASES(entries) {
    return _.map(entries, function(entry) {
        var filename = entry.filename;

        if (!filename) {
            filename = [
                entry.app,
                entry.version,
                entry.isDelta? 'delta.nupkg' : 'full.nupkg'
            ].join('-');
        }

        return [
            entry.sha,
            filename,
            entry.size
        ].join(' ');
    })
    .join('\n');
}
728687
public function show()
	{
		$package = $this->arguments->getOpt('package');
		if (!empty($package))
		{
			$versions = Composer::findRemotePackages($package, '*');
			$this->output->addRawFromAssocArray($versions);
		}
		else
		{
			$installed = Composer::getLocalPackages();
			$this->output->addRawFromAssocArray($installed);
		}
	}
1354714
private static function preReleaseGreaterThan(PreRelease $v1, PreRelease $v2)
    {
        // Pre-releases can be denoted as versionable (X.Y.Z) or greek (alpha.5)
        // We let versionable take precedence
        if (!self::versionableEquals($v1, $v2)) {
            // If v1 is bigger on the versionable level, it's bigger.
            return self::versionableGreaterThan($v1, $v2);
        }

        // "Greek" part is "bigger" for v1
        if ($v1->getGreek() !== $v2->getGreek()) {
            return self::greekLargerThan($v1->getGreek(), $v2->getGreek());
        }

        // Release number for v1 is bigger than v2's
        if ($v1->getReleaseNumber() > $v2->getReleaseNumber()) {
            return true;
        }

        return false;
    }
1317671
public function upgrade(): void
    {
        // These tables were created by webtrees 1.x, and may not exist if we first installed webtrees 2.x
        DB::schema()->dropIfExists('site_access_rule');
        DB::schema()->dropIfExists('next_id');

        // Split the media table into media/media_file so that we can store multiple media
        // files in each media object.
        DB::schema()->create('media_file', static function (Blueprint $table): void {
            $table->integer('id', true);
            $table->string('m_id', 20);
            $table->integer('m_file');
            $table->string('multimedia_file_refn', 248); // GEDCOM only allows 30 characters
            $table->string('multimedia_format', 4);
            $table->string('source_media_type', 15);
            $table->string('descriptive_title', 248);

            $table->index(['m_id', 'm_file']);
            $table->index(['m_file', 'm_id']);
            $table->index(['m_file', 'multimedia_file_refn']);
            $table->index(['m_file', 'multimedia_format']);
            $table->index(['m_file', 'source_media_type']);
            $table->index(['m_file', 'descriptive_title']);
        });

        if (DB::schema()->hasColumn('media', 'm_filename')) {
            (new Builder(DB::connection()))->from('media_file')->insertUsing([
                'm_id',
                'm_file',
                'multimedia_file_refn',
                'multimedia_format',
                'source_media_type',
                'descriptive_title',
            ], static function (Builder $query): void {
                $query->select([
                    'm_id',
                    'm_file',
                    'm_filename',
                    'm_ext',
                    'm_type',
                    'm_titl',
                ])->from('media');
            });

            // SQLite can only drop one column at a time.
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_filename');
            });
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_ext');
            });
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_type');
            });
            DB::schema()->table('media', static function (Blueprint $table): void {
                $table->dropColumn('m_titl');
            });
        }
    }
852673
function prepareRelease() {
  // Load WTF binary. Search a few paths.
  // TODO(benvanik): look in ENV?
  var searchPaths = [
    '.',
    './build-out',
    '../build-out'
  ];
  var modulePath = path.dirname(module.filename);
  var wtfPath = null;
  for (var n = 0; n < searchPaths.length; n++) {
    var searchPath = path.join(
        searchPaths[n], 'wtf_node_js_compiled.js');
    searchPath = path.join(modulePath, searchPath);
    if (fs.existsSync(searchPath)) {
      wtfPath = path.relative(modulePath, searchPath);
      break;
    }
  }
  if (!wtfPath) {
    console.log('Unable to find wtf_node_js_compiled.js');
    process.exit(-1);
    return;
  }
  var wtf = require(wtfPath.replace('.js', ''));
  global.wtf = wtf;
}
526908
private void tryRegisterGuava() {
        try {
            // Guava is not a direct dependency, which is significant in the Java 9 module system
            // to access Guava this module must add a read edge to the module graph
            // but since this code is written for Java 6, we have to do this by reflection
            // yuck
            Class<?> moduleClass = Class.class.getMethod("getModule").getReturnType();
            Object convertModule = Class.class.getMethod("getModule").invoke(StringConvert.class);
            Object layer = convertModule.getClass().getMethod("getLayer").invoke(convertModule);
            if (layer != null) {
                Object optGuava = layer.getClass().getMethod("findModule", String.class).invoke(layer, "com.google.common");
                boolean found = (Boolean) optGuava.getClass().getMethod("isPresent").invoke(optGuava);
                if (found) {
                    Object guavaModule = optGuava.getClass().getMethod("get").invoke(optGuava);
                    moduleClass.getMethod("addReads", moduleClass).invoke(convertModule, guavaModule);
                }
            }

        } catch (Throwable ex) {
            if (LOG) {
                System.err.println("tryRegisterGuava1: " + ex);
            }
        }
        try {
            // can now check for Guava
            // if we have created a read edge, or if we are on the classpath, this will succeed
            loadType("com.google.common.reflect.TypeToken");
            @SuppressWarnings("unchecked")
            Class<?> cls = (Class<TypedStringConverter<?>>) loadType("org.joda.convert.TypeTokenStringConverter");
            TypedStringConverter<?> conv = (TypedStringConverter<?>) cls.getDeclaredConstructor().newInstance();
            registered.put(conv.getEffectiveType(), conv);

        } catch (Throwable ex) {
            if (LOG) {
                System.err.println("tryRegisterGuava2: " + ex);
            }
        }
    }