Produce the $initial properties declaration
974318
private function getInitialPropertiesDeclaration()
    {

        $initialProperties = array();

        foreach( $this->entity->dataTypes as $name => $dataType ) {
            if( $dataType->isInitialProperty() ) {
                $initialProperties[] = "'{$name}'";
            }
        }

        $this->class->classComponents[] = new VariableDeclaration(
            'initialProperties',
            new SFormatf( <<<'PHP'
                /**
                 * Initial properties to be stored by a entity.
                 * @var array
                 */
                protected $initialProperties = [%s];
PHP
                , implode(', ', $initialProperties)
            )
        );

    }
246092
def build_ascii_property_table(output):
    """"""

    if not os.path.exists(output):
        os.mkdir(output)
    gen_properties(output, ascii_props=True, append=True)
4329
function initVar (key, envKey, def) {
        var negate = !def;
        switch (true) {
            case cacheObj.hasOwnProperty(key):
                return cacheObj[key];
            case process.env.hasOwnProperty(envGlobalCacheKey):
                return process.env[envGlobalCacheKey] !== '';
            case process.env.hasOwnProperty(envKey):
                return negate ? process.env[envKey] === 'YES' : process.env[envKey] !== 'NO';
            default:
                return def;
        }
    }
949783
function init(properties) {
            this.eventListeners = [];

            if (typeof properties !== 'undefined') {
                Object.keys(properties).forEach(function (property) {
                    this[property] = properties[property];
                }, this);
            }

            return this;
        }
1096831
function createContext(script) {
  const INITIAL_CONTEXT = {
    vars: {
      target: script.config.target,
      $environment: script._environment,
      $processEnvironment: process.env
    },
    funcs: {
      $randomNumber: $randomNumber,
      $randomString: $randomString,
      $template: input => engineUtil.template(input, { vars: result.vars })
    }
  };

  let result = _.cloneDeep(INITIAL_CONTEXT);

  // variables from payloads:
  const variableValues1 = datafileVariables(script);
  Object.assign(result.vars, variableValues1);
  // inline variables:
  const variableValues2 = inlineVariables(script);
  Object.assign(result.vars, variableValues2);

  result._uid = uuid.v4();
  result.vars.$uuid = result._uid;
  return result;
}
774107
function buildExportInitializationStatements(
  programPath: NodePath,
  metadata: ModuleMetadata,
  loose: boolean = false,
) {
  const initStatements = [];

  const exportNames = [];
  for (const [localName, data] of metadata.local) {
    if (data.kind === "import") {
      // No-open since these are explicitly set with the "reexports" block.
    } else if (data.kind === "hoisted") {
      initStatements.push(
        buildInitStatement(metadata, data.names, t.identifier(localName)),
      );
    } else {
      exportNames.push(...data.names);
    }
  }

  for (const data of metadata.source.values()) {
    if (!loose) {
      initStatements.push(...buildReexportsFromMeta(metadata, data, loose));
    }
    for (const exportName of data.reexportNamespace) {
      exportNames.push(exportName);
    }
  }

  initStatements.push(
    ...chunk(exportNames, 100).map(members => {
      return buildInitStatement(
        metadata,
        members,
        programPath.scope.buildUndefinedNode(),
      );
    }),
  );

  return initStatements;
}
205547
function buildInitStatement(metadata, exportNames, initExpr) {
  return t.expressionStatement(
    exportNames.reduce(
      (acc, exportName) =>
        template.expression`EXPORTS.NAME = VALUE`({
          EXPORTS: metadata.exportName,
          NAME: exportName,
          VALUE: acc,
        }),
      initExpr,
    ),
  );
}
46341
public String generateInitScript(EnvVars env) throws IOException, InterruptedException {
        StringBuilder initScript = new StringBuilder();
        InputStream templateStream = getClass().getResourceAsStream("/initscripttemplate.gradle");
        String templateAsString = IOUtils.toString(templateStream, Charsets.UTF_8.name());
        File extractorJar = PluginDependencyHelper.getExtractorJar(env);
        FilePath dependencyDir = PluginDependencyHelper.getActualDependencyDirectory(extractorJar, rootPath);
        String absoluteDependencyDirPath = dependencyDir.getRemote();
        absoluteDependencyDirPath = absoluteDependencyDirPath.replace("\\", "/");
        String str = templateAsString.replace("${pluginLibDir}", absoluteDependencyDirPath);
        initScript.append(str);
        return initScript.toString();
    }
1103104
public void init(ScreenLocation itsLocation, BasePanel parentScreen, Converter fieldConverter, int iDisplayFieldDesc, Map<String, Object> properties)
    {
        super.init(itsLocation, parentScreen, fieldConverter, iDisplayFieldDesc, properties);
        for (int iIndex = 0; iIndex < 32; iIndex++)
        {
            Object icon = this.getIcon(iIndex);
            if (icon == null)
                break;
            this.addIcon(icon, iIndex);
        }
    }
630107
function ( init )
	{
		$.extend( true, this.s, ColVis.defaults, init );

		// Slightly messy overlap for the camelCase notation
		if ( ! this.s.showAll && this.s.bShowAll ) {
			this.s.showAll = this.s.sShowAll;
		}

		if ( ! this.s.restore && this.s.bRestore ) {
			this.s.restore = this.s.sRestore;
		}

		// CamelCase to Hungarian for the column groups 
		var groups = this.s.groups;
		var hungarianGroups = this.s.aoGroups;
		if ( groups ) {
			for ( var i=0, ien=groups.length ; i<ien ; i++ ) {
				if ( groups[i].title ) {
					hungarianGroups[i].sTitle = groups[i].title;
				}
				if ( groups[i].columns ) {
					hungarianGroups[i].aiColumns = groups[i].columns;
				}
			}
		}
	}
276394
function GenerateDefaultValues(neode, model, properties) {
    const output = GenerateDefaultValuesAsync(neode, model, properties);

    return Promise.resolve(output);
}
1021539
def init_running_properties(self):
        
        for prop, entry in list(self.__class__.running_properties.items()):
            val = entry.default
            # Make a copy of the value for complex iterable types
            # As such, each instance has its own copy and not a simple reference
            setattr(self, prop, copy(val) if isinstance(val, (set, list, dict)) else val)
72846
function (properties) {
		properties = properties || {};
		_.forEach(properties, function (property, name) {
			this.initProperty(name, property);
		}, this);
	}
1086377
function initProperties() {
    var that = this;

    that.options = {};
    that.container = null;
    that.showTransitionStartAnimation = null;
    that.showTransitionEndTimeout = null;
    that.hideTransitionStartAnimation = null;
    that.hideTransitionEndTimeout = null;
    that.showing = false;
    that.hiding = false;
    that.hidden = false;

    return that;
  }
243907
private WyalFile.VariableDeclaration[] generatePreconditionParameters(WyilFile.Decl.Callable declaration,
			LocalEnvironment environment) {
		Tuple<WyilFile.Decl.Variable> params = declaration.getParameters();
		WyalFile.VariableDeclaration[] vars = new WyalFile.VariableDeclaration[params.size()];
		// second, set initial environment
		for (int i = 0; i != params.size(); ++i) {
			WyilFile.Decl.Variable var = params.get(i);
			vars[i] = environment.read(var);
		}
		return vars;
	}
1085517
function getPropertiesGroupsData(src) {
        var groups = [],
            objectName;

        // intersection for restoring paths sequence
        grunt.util._.intersection(src, grunt.file.expand(options.initFiles)).forEach(function (path) {

            objectName = paths.getObjectNameByInitFile(path.replace(
                new RegExp('^' + utils.toRegExpText(options.base.replace(/^\.\//, ''))),
                ''
            ).replace(/^\/+/, ''));

            grunt.verbose.ok(objectName);

            groups.push({
                objectName:          objectName,
                initFilePath:        path,
                pattern:             new RegExp('^' + utils.toRegExpText(objectName) + (objectName ? '\\.' : ''), 'i'),
                inlineProperties:    [],
                prototypeProperties: []
            });
        });

        return groups;
    }
3717
protected function initializeProperties($properties = null)
    {
        $this->getPropertiesInfo();

        // Initialize the properties that were defined using the Initialize / InitializeObject annotations
        $initializeValueValidationEnabled = Configuration::isInitializeValuesValidationEnabled();
        foreach ($this->_initialPropertiesValues as $propertyName => $initialization) {
            $value = null;
            switch ($initialization['type']) {
                case 'initialize':
                    $value = $initialization['value'];
                    break;
                default:
                    $className = $initialization['value'];
                    $value = new $className();
                    break;
            }

            if ($initializeValueValidationEnabled) {
                $this->assertPropertyValue($propertyName, $value);
            }

            $this->$propertyName = $value;
            $this->updateInitializedPropertyValue($propertyName, $value);
        }

        // Initialize the propeties using given arguments
        if ($this->_initializationNeededArguments !== null && $properties !== null) {
            $numberOfNeededArguments = count($this->_initializationNeededArguments);

            MethodCallManager::assertArgsNumber($numberOfNeededArguments, $properties);

            for ($i = 0; $i < $numberOfNeededArguments; $i++) {
                $propertyName = $this->_initializationNeededArguments[$i];
                $argument = $properties[$i];

                $this->assertPropertyValue($propertyName, $argument);
                $this->$propertyName = $argument;
                $this->updateInitializedPropertyValue($propertyName, $argument);
            }
        }
    }