of passing file name from builder.
326801
@SuppressWarnings("squid:S1160")
    public void pipelinePerform(@Nonnull Run<?, ?> build, @Nonnull FilePath workspace, @Nonnull Launcher launcher,
                                @Nonnull TaskListener listener, @Nonnull Map<String, String> builderResultNames)
            throws IOException, InterruptedException {
        final List<String> mergedResultNames = new ArrayList<String>();
        runReportList = new ArrayList<FilePath>();
        final List<String> fileSystemResultNames = new ArrayList<String>();
        fileSystemResultNames.add(builderResultNames.get(RunFromFileBuilder.class.getName()));

        mergedResultNames.addAll(builderResultNames.values());

        if (mergedResultNames.isEmpty()) {
            listener.getLogger().println("RunResultRecorder: no results xml File provided");
            return;
        }

        recordRunResults(build, workspace, launcher, listener, mergedResultNames, fileSystemResultNames);
        return;
    }
791192
def file_name
      name = ""
      name += @user.nickname
      name += "-"
      name += @organization.name.parameterize
      name += "-"
      name += token
      name + ".zip"
    end
534228
@Override
	public String name() {

		if (file == null) {
			return null;
		}

		String name = null;

		try (Tx tx = StructrApp.getInstance(securityContext).tx()) {

			name = file.getName();
			tx.success();

		} catch (FrameworkException fex) {
			logger.error("", fex);
		}

		return name;
	}
222328
protected void addAdditionalFilesToBook(final BuildData buildData) throws BuildProcessingException {
        final FileProvider fileProvider = providerFactory.getProvider(FileProvider.class);
        final ContentSpec contentSpec = buildData.getContentSpec();

        if (contentSpec.getFiles() != null) {
            log.info("\tDownloading Additional Files");

            for (final org.jboss.pressgang.ccms.contentspec.File file : contentSpec.getFiles()) {
                try {
                    final FileWrapper fileEntity = fileProvider.getFile(file.getId(), file.getRevision());

                    // Find the file that matches this locale. If the locale isn't found then use the default locale
                    LanguageFileWrapper languageFileFile = null;
                    if (fileEntity.getLanguageFiles() != null && fileEntity.getLanguageFiles().getItems() != null) {
                        final List<LanguageFileWrapper> languageFiles = fileEntity.getLanguageFiles().getItems();
                        for (final LanguageFileWrapper languageFile : languageFiles) {
                            if (languageFile.getLocale().getValue().equals(buildData.getBuildLocale())) {
                                languageFileFile = languageFile;
                            } else if (languageFile.getLocale().getValue().equals(buildData.getDefaultLocale()) && languageFileFile == null) {
                                languageFileFile = languageFile;
                            }
                        }
                    }

                    if (languageFileFile != null && languageFileFile.getFileData() != null) {
                        // Determine the file path
                        final String filePath;
                        if (!isNullOrEmpty(fileEntity.getFilePath())) {
                            if (fileEntity.getFilePath().endsWith("/") || fileEntity.getFilePath().endsWith("\\")) {
                                filePath = fileEntity.getFilePath();
                            } else {
                                filePath = fileEntity.getFilePath() + "/";
                            }
                        } else {
                            filePath = "";
                        }

                        // Explode the ZIP archive if requested
                        if (fileEntity.isExplodeArchive()) {
                            try {
                                final Map<String, byte[]> files = ZipUtilities.unzipFile(languageFileFile.getFileData(), false);
                                for (final Entry<String, byte[]> entry : files.entrySet()) {
                                    addToZip(buildData.getBookFilesFolder() + filePath + entry.getKey(), entry.getValue(), buildData);
                                }
                            } catch (IOException e) {
                                throw new BuildProcessingException(e);
                            }
                        } else {
                            addToZip(buildData.getBookFilesFolder() + filePath + fileEntity.getFilename(), languageFileFile.getFileData(),
                                    buildData);
                        }
                    } else {
                        throw new BuildProcessingException("File ID " + fileEntity.getId() + " has no language files!");
                    }
                } catch (NotFoundException e) {
                    throw new BuildProcessingException("File ID " + file.getId() + " could not be found!");
                }
            }
        }
    }
156726
def build(self, builder):
        """"""

        params = dict(
            OID=self.oid,
            Name=self.name,
            DataType=self.datatype.value,
            Length=str(self.length),
        )

        if self.date_time_format is not None:
            params["mdsol:DateTimeFormat"] = self.date_time_format

        params["mdsol:Active"] = bool_to_yes_no(self.active)

        if self.significant_digits is not None:
            params["SignificantDigits"] = str(self.significant_digits)

        if self.sas_field_name is not None:
            params["SASFieldName"] = self.sas_field_name

        if self.sds_var_name is not None:
            params["SDSVarName"] = self.sds_var_name

        if self.origin is not None:
            params["Origin"] = self.origin

        if self.comment is not None:
            params["Comment"] = self.comment

        if self.control_type is not None:
            params["mdsol:ControlType"] = self.control_type.value

        if self.acceptable_file_extensions is not None:
            params["mdsol:AcceptableFileExtensions"] = self.acceptable_file_extensions

        if self.default_value is not None:
            params["mdsol:DefaultValue"] = str(self.default_value)

        params["mdsol:SourceDocument"] = bool_to_yes_no(self.source_document_verify)
        params["mdsol:IndentLevel"] = str(self.indent_level)

        if self.sas_format is not None:
            params["mdsol:SASFormat"] = self.sas_format

        if self.sas_label is not None:
            params["mdsol:SASLabel"] = self.sas_label

        params["mdsol:QueryFutureDate"] = bool_to_yes_no(self.query_future_date)
        params["mdsol:Visible"] = bool_to_yes_no(self.visible)
        params["mdsol:TranslationRequired"] = bool_to_yes_no(self.translation_required)
        params["mdsol:QueryNonConformance"] = bool_to_yes_no(self.query_non_conformance)
        params["mdsol:OtherVisits"] = bool_to_yes_no(self.other_visits)
        params["mdsol:CanSetItemGroupDate"] = bool_to_yes_no(
            self.can_set_item_group_date
        )
        params["mdsol:CanSetFormDate"] = bool_to_yes_no(self.can_set_form_date)
        params["mdsol:CanSetStudyEventDate"] = bool_to_yes_no(
            self.can_set_study_event_date
        )
        params["mdsol:CanSetSubjectDate"] = bool_to_yes_no(self.can_set_subject_date)
        params["mdsol:VisualVerify"] = bool_to_yes_no(self.visual_verify)
        params["mdsol:DoesNotBreakSignature"] = bool_to_yes_no(
            self.does_not_break_signature
        )

        if self.field_number is not None:
            params["mdsol:FieldNumber"] = self.field_number

        if self.variable_oid is not None:
            params["mdsol:VariableOID"] = self.variable_oid

        builder.start("ItemDef", params)

        if self.question is not None:
            self.question.build(builder)

        if self.codelistref is not None:
            self.codelistref.build(builder)

        for mur in self.measurement_unit_refs:
            mur.build(builder)

        for range_check in self.range_checks:
            range_check.build(builder)

        if self.header_text is not None:
            self.header_text.build(builder)

        for view_restriction in self.view_restrictions:
            view_restriction.build(builder)

        for entry_restriction in self.entry_restrictions:
            entry_restriction.build(builder)

        for help_text in self.help_texts:
            help_text.build(builder)

        for review_group in self.review_groups:
            review_group.build(builder)

        for alias in self.aliases:
            alias.build(builder)

        builder.end("ItemDef")
1182209
public function main()
    {
        if ($this->name !== null) {
            if ($this->value === null && $this->reference === null) {
                throw new BuildException(
                    "You must specify value or refid with the name attribute",
                    $this->getLocation()
                );
            }
        } else {
            if ($this->file === null && $this->env === null) {
                throw new BuildException(
                    "You must specify file or environment when not using the name attribute",
                    $this->getLocation()
                );
            }
        }

        if ($this->file === null && $this->prefix !== null) {
            throw new BuildException("Prefix is only valid when loading from a file.", $this->getLocation());
        }

        if (($this->name !== null) && ($this->value !== null)) {
            $this->addProperty($this->name, $this->value);
        }

        if ($this->file !== null) {
            $this->loadFile($this->file);
        }

        if ($this->env !== null) {
            $this->loadEnvironment($this->env);
        }

        if (($this->name !== null) && ($this->reference !== null)) {
            // get the refereced property
            try {
                $referencedObject = $this->reference->getReferencedObject($this->project);

                if ($referencedObject instanceof Exception) {
                    $reference = $referencedObject->getMessage();
                } else {
                    $reference = (string) $referencedObject;
                }

                $this->addProperty($this->name, $reference);
            } catch (BuildException $be) {
                if ($this->fallback !== null) {
                    $referencedObject = $this->reference->getReferencedObject($this->fallback);

                    if ($referencedObject instanceof Exception) {
                        $reference = $referencedObject->getMessage();
                    } else {
                        $reference = (string) $referencedObject;
                    }
                    $this->addProperty($this->name, $reference);
                } else {
                    throw $be;
                }
            }
        }
    }
1211367
def from_file(self, fname):
        """"""
        f = open(fname, "rb")
        data = f.read()
        self.update(data)
        f.close()
1368336
def extractor(
        builder_name: str, builder: Builder, build_file_path: str,
        build_context) -> types.FunctionType:
    """"""
    build_module = to_build_module(build_file_path, build_context.conf)

    def extract_target(*args, **kwargs):
        """The actual target extraction function that is executed when any
           builder function is called in a build file."""
        target = Target(builder_name=builder_name)
        # convert args/kwargs to target.props and handle arg types
        args_to_props(target, builder, args, kwargs)
        raw_name = target.props.name
        handle_typed_args(target, builder, build_module)
        logger.debug('Extracting target: {}', target)
        # promote the `name` and `deps` from props to the target instance
        target.name = target.props.pop('name')
        target.deps = target.props.pop('deps', [])
        if target.deps:
            logger.debug('Got deps for target "{0.name}": {0.deps}', target)
        # invoke builder hooks on extracted target
        for hook_name, hook in Plugin.get_hooks_for_builder(builder_name):
            logger.debug('About to invoke hook {} on target {}',
                         hook_name, target)
            hook(build_context, target)
        # save the target in the build context
        build_context.register_target(target)
        logger.debug('Registered {}', target)

    return extract_target
770794
def generate_filename(self, directory=os.getcwd(), prefix='tile',
                          format='png', path=True):
        """"""
        filename = prefix + '_{col:02d}_{row:02d}.{ext}'.format(
                      col=self.column, row=self.row, ext=format.lower().replace('jpeg', 'jpg'))
        if not path:
            return filename
        return os.path.join(directory, filename)
192035
def generate_file_name(self):
        """"""
        if not self.project:
            raise UnderDefined("project name not given")

        out_data_dir = prms.Paths.outdatadir
        project_dir = os.path.join(out_data_dir, self.project)
        file_name = "cellpy_batch_%s.json" % self.name
        self.file_name = os.path.join(project_dir, file_name)
247192
public String getFileName(String strFileName, String strPackage, CodeType codeType, ClassProject recClassProject)
    {
        return recClassProject.getFileName(strFileName, strPackage, codeType, true, true);
    }
818354
public static String generatedNameOf(Class<?> clazz, String name)
    {
        return builder(clazz, name).build();
    }
232698
def set_src_builder(self, builder):
        """"""
        self.sbuilder = builder
        if not self.has_builder():
            self.builder_set(builder)
210956
public static String getFileNameOr(TaskResponse response, NameGenerator nameGenerator) {
        String name = getFileName(response);
        if (null == name) {
            name = nameGenerator.name();
        }
        return name;
    }
339752
def build(self, builder):
        """"""
        params = {}
        if self.lang is not None:
            params["xml:lang"] = self.lang
        builder.start("TranslatedText", params)
        builder.data(self.text)
        builder.end("TranslatedText")
1247017
def build_filename(self, binary):
        """"""
        template = '%(APP)s-%(VERSION)s.%(LOCALE)s.%(PLATFORM)s%(STUB)s' \
                   '.%(EXT)s'
        return template % {'APP': self.application,
                           'VERSION': self.version,
                           'LOCALE': self.locale,
                           'PLATFORM': self.platform,
                           'STUB': '-stub' if self.is_stub_installer else '',
                           'EXT': self.extension}
1275195
function push_file (builders, file) {
	FUNCTION(builders.push).apply(builders, require(file) );
}