Copies all information of the current operating system entry to the given user agent builder.

@param builder
user agent builder
519394
public void copyTo(@Nonnull final UserAgent.Builder builder) {
		final OperatingSystemFamily f = OperatingSystemFamily.evaluate(family);
		final VersionNumber version = VersionNumber.parseOperatingSystemVersion(f, builder.getUserAgentString());
		builder.setOperatingSystem(new net.sf.uadetector.OperatingSystem(f, family, icon, name, producer, producerUrl, url, version));
	}
564055
public static GsonBuilder registerAll(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    registerDateMidnight(builder);
    registerDateTime(builder);
    registerDuration(builder);
    registerLocalDate(builder);
    registerLocalDateTime(builder);
    registerLocalTime(builder);
    registerInterval(builder);
    registerPeriod(builder);
    registerInstant(builder);
    registerDateTimeZone(builder);

    return builder;
  }
632769
@SuppressWarnings("unchecked")
	protected void copySRE() {
		final IStructuredSelection selection = (IStructuredSelection) this.sresList.getSelection();
		final Iterator<ISREInstall> it = selection.iterator();

		final List<ISREInstall> newEntries = new ArrayList<>();
		while (it.hasNext()) {
			final ISREInstall selectedSRE = it.next();

			final ISREInstall copy = selectedSRE.copy(createUniqueIdentifier());
			copy.setName(createUniqueName(selectedSRE.getName()));

			final EditSREInstallWizard wizard = new EditSREInstallWizard(
					copy, this.sreArray.toArray(new ISREInstall[this.sreArray.size()]));
			final WizardDialog dialog = new WizardDialog(getShell(), wizard);
			final int dlgResult = dialog.open();
			if (dlgResult == Window.OK) {
				newEntries.add(copy);
			} else {
				assert dlgResult == Window.CANCEL;
				// Canceling one wizard should cancel all subsequent wizards
				break;
			}
		}
		if (!newEntries.isEmpty()) {
			this.sreArray.addAll(newEntries);
			refreshSREListUI();
			this.sresList.setSelection(new StructuredSelection(newEntries.toArray()));
		} else {
			this.sresList.setSelection(selection);
		}
		this.sresList.refresh(true);
		updateUI();
	}
398970
private void appendRoles(final StringBuilder builder, final User user) {
        for (final UserRoleName role : user.getRoles()) {
            append(builder, ",", role.name());
        }
    }
353829
public void registerOnRequest(Message.Builder builder) {
    requestMap.put(builder.getDescriptorForType().getFullName(), builder);
  }
929318
public Datatype.Builder setBuilder(Type builder) {
    this.builder = Objects.requireNonNull(builder);
    _unsetProperties.remove(Property.BUILDER);
    return (Datatype.Builder) this;
  }
139284
private void appendUserInfoFields(final StringBuilder builder,
            final User user) {
        append(builder, user.getUsername(), ",");
        append(builder, user.getFirstname(), ",");
        append(builder, user.getLastname(), ",");
        append(builder, user.getEmail(), ",");
        append(builder, user.getPassword(), "");
    }
1350570
private ProcessBuilder appendExecutablePath(ProcessBuilder builder) {
    String executable = builder.command().get(0);
    if (executable == null) {
      throw new IllegalArgumentException(
          "No executable provided to the Process Builder... we will do... nothing... ");
    }
    builder.command().set(0,
        FileUtils.getFileResourceId(configuration.getWorkerPath(), executable).toString());
    return builder;
  }
1103038
public void setUserAgent(String agent, String agentVersion) {
    userAgent = String.format("Algolia for Java (%s); JVM (%s); %s (%s)", version, System.getProperty("java.version"), agent, agentVersion);
  }
228320
private void appendPropertyToBuilder(StringBuilder builder, String replicateOnWrite, String keyword)
    {
        String replicateOn_Write = CQLTranslator.getKeyword(keyword);
        builder.append(replicateOn_Write);
        builder.append(CQLTranslator.EQ_CLAUSE);
        builder.append(replicateOnWrite);
        builder.append(CQLTranslator.AND_CLAUSE);
    }
608245
public static void saveBuildInfo(BuildInfo buildInfo, FilePath ws, Run build, Log logger) throws Exception {
        String jobBuildNumber = BuildUniqueIdentifierHelper.getBuildNumber(build);
        String buildInfoId = createBuildInfoId(build, buildInfo.getName(), buildInfo.getNumber());

        BuildDataFile buildDataFile = new BuildDataFile(BuildInfoStep.STEP_NAME, buildInfoId);
        buildDataFile.putPOJO(buildInfo);
        writeBuildDataFile(ws, jobBuildNumber, buildDataFile, logger);
    }
428184
@SuppressWarnings("unchecked")
    public <T> ProcessorBuilder<T> register(final Class<T> type, final ProcessorBuilder<T> builder) {
        return (ProcessorBuilder<T>)this.builderMap.put(type, builder);
    }
309482
public static Set<GuiceyConfigurationHook> run(final GuiceBundle.Builder builder) {
        final Set<GuiceyConfigurationHook> hooks = HOOKS.get();
        if (hooks != null) {
            hooks.forEach(l -> l.configure(builder));
        }
        // clear hooks just after init
        reset();
        return hooks;
    }
732263
public void registerManufacturerSpecificBuilder(int companyId, ADManufacturerSpecificBuilder builder)
    {
        if (companyId < 0 || 0xFFFF < companyId)
        {
            String message = String.format("'companyId' is out of the valid range: %d", companyId);
            throw new IllegalArgumentException(message);
        }

        if (builder == null)
        {
            return;
        }

        // Use the company ID as the key for the builder.
        Integer key = Integer.valueOf(companyId);

        // Get the existing list of builders for the company ID.
        List<ADManufacturerSpecificBuilder> builders = mMSBuilders.get(key);

        // If no builder has been registered for the company ID yet.
        if (builders == null)
        {
            builders = new ArrayList<ADManufacturerSpecificBuilder>();
            mMSBuilders.put(key, builders);
        }

        // Register the builder at the beginning of the builder list.
        builders.add(0, builder);
    }
1358819
def build(self, builder):
        
        params = dict(Context=self.context, Name=self.name)
        builder.start("Alias", params)
        builder.end("Alias")
519393
private static WebDriver getDriver(final Builder builder) {
		// this is the default value
		DesiredCapabilities capabilities = getCapabilitiesBrowser(builder.browser);
		WebDriver driver = null;

		/**
		 * Setting the proxy
		 */
		LOG.info("Proxy seetings set");
		org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
		if (builder.proxyHost != null && !builder.proxyHost.isEmpty()) {
			if (!builder.proxyHost.equals("direct")) {
				proxy.setAutodetect(false);
				proxy.setHttpProxy(builder.proxyHost + ":" + builder.proxyPort)
						.setFtpProxy(
								builder.proxyHost + ":" + builder.proxyPort)
						.setSslProxy(
								builder.proxyHost + ":" + builder.proxyPort)
						.setNoProxy(builder.noProxyFor);
			} else {
				proxy.setProxyType(ProxyType.DIRECT);
			}
			capabilities.setCapability(CapabilityType.PROXY, proxy);
		}

		/**
		 * the Driver will take screenshots
		 */
		LOG.info("Screenshot capability set");
		capabilities.setCapability(CapabilityType.TAKES_SCREENSHOT, true);

		/**
		 * setting the platform: LINUX, MAC or Windows. Remember that sometimes
		 * the browsers are linked to a platform like IE for example
		 */
		if (builder.platform != null) {
			capabilities.setCapability(CapabilityType.PLATFORM,
					builder.platform);
		}

		if (builder.browserVersion != null) {
			capabilities.setCapability(CapabilityType.VERSION,
					builder.browserVersion);
		}

		/**
		 * set if javascript is enabled
		 */
		capabilities.setJavascriptEnabled(builder.jsEnabled);

		/**
		 * set if the browser will accept all certificates, including the
		 * self-signed ones
		 */
		capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS,
				builder.acceptAllCertificates);

		/**
		 * this will actually create firefox profiles, chrome options and others
		 */
		LOG.info("Adding specific browser settings");
		addSpecificBrowserSettings(capabilities, builder);

		/**
		 * getting an actual WebDriver implementation now
		 */
		LOG.info("Detecting running mode");
		if (builder.runMode.equalsIgnoreCase(Constants.RunMode.GRID)) {
			LOG.info("Run mode GRID. Setting GRID properties");
			try {
				driver = new RemoteWebDriver(new URL(builder.gridUrl),
						capabilities);
				((RemoteWebDriver) driver).setLogLevel(Level.SEVERE);
			} catch (Exception e) {
				LOG.debug("Exception while initiating remote driver:", e);
			}
		} else {
			LOG.info("Normal run mode. Getting driver instance");
			driver = getDriverInstance(capabilities, builder);
		}

		LOG.info("Returning the following driver: " + driver);
		LOG.info("With capabilities: " + capabilities);
		return driver;
	}
1204347
def copy_user_agent_from_driver(self):
        
        selenium_user_agent = self.driver.execute_script("return navigator.userAgent;")
        self.headers.update({"user-agent": selenium_user_agent})