idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
262,567
public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {<NEW_LINE>DialogAboutBinding binding = DialogAboutBinding.inflate(LayoutInflater.from(requireActivity<MASK><NEW_LINE>binding.designAboutTitle.setText(R.string.app_name);<NEW_LINE>binding.designAboutInfo.setMovementMethod(LinkMovementMethod.getInstance());<NEW_LINE>binding.designAboutInfo.setTransformationMethod(new LinkTransformationMethod(requireActivity()));<NEW_LINE>binding.designAboutInfo.setText(HtmlCompat.fromHtml(getString(R.string.about_view_source_code, "<b><a href=\"https://github.com/LSPosed/LSPosed\">GitHub</a></b>", "<b><a href=\"https://t.me/LSPosed\">Telegram</a></b>"), HtmlCompat.FROM_HTML_MODE_LEGACY));<NEW_LINE>binding.designAboutVersion.setText(String.format(LocaleDelegate.getDefaultLocale(), "%s (%d)", BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE));<NEW_LINE>return new BlurBehindDialogBuilder(requireContext()).setView(binding.getRoot()).create();<NEW_LINE>}
()), null, false);
982,959
public static Entry[] parseHeaderEntries(CharSeeker dataSeeker, Configuration config, IdType idType, Groups groups, Supplier<ZoneId> defaultTimeZone, HeaderEntryFactory entryFactory, Header.Monitor monitor) {<NEW_LINE>try {<NEW_LINE>Mark mark = new Mark();<NEW_LINE>Extractors extractors = new Extractors(config.arrayDelimiter(), config.emptyQuotedStringsAsNull(), config.trimStrings(), defaultTimeZone);<NEW_LINE>Extractor<?> idExtractor = idExtractor(idType, extractors);<NEW_LINE>int delimiter = config.delimiter();<NEW_LINE>List<Header.Entry> columns = new ArrayList<>();<NEW_LINE>for (int i = 0; !mark.isEndOfLine() && dataSeeker.seek(mark, delimiter); i++) {<NEW_LINE>String entryString = dataSeeker.tryExtract(mark, extractors.string()) ? extractors.string().value() : null;<NEW_LINE>HeaderEntrySpec spec = new HeaderEntrySpec(entryString);<NEW_LINE>if ((spec.name == null && spec.type == null) || (spec.type != null && spec.type.equals(Type.IGNORE.name()))) {<NEW_LINE>columns.add(new Header.Entry(null, Type.IGNORE, Group.GLOBAL, null, null));<NEW_LINE>} else {<NEW_LINE>columns.add(entryFactory.create(dataSeeker.sourceDescription(), i, spec.name, spec.type, spec.groupName, extractors, idExtractor, groups, monitor));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return columns.<MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
toArray(new Entry[0]);
1,399,916
public ThingGroupIndexingConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ThingGroupIndexingConfiguration thingGroupIndexingConfiguration = new ThingGroupIndexingConfiguration();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("thingGroupIndexingMode")) {<NEW_LINE>thingGroupIndexingConfiguration.setThingGroupIndexingMode(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("managedFields")) {<NEW_LINE>thingGroupIndexingConfiguration.setManagedFields(new ListUnmarshaller<Field>(FieldJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>} else if (name.equals("customFields")) {<NEW_LINE>thingGroupIndexingConfiguration.setCustomFields(new ListUnmarshaller<Field>(FieldJsonUnmarshaller.getInstance(<MASK><NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return thingGroupIndexingConfiguration;<NEW_LINE>}
)).unmarshall(context));
434,342
public static UpdateExperimentStatusResponse unmarshall(UpdateExperimentStatusResponse updateExperimentStatusResponse, UnmarshallerContext _ctx) {<NEW_LINE>updateExperimentStatusResponse.setRequestId(_ctx.stringValue("UpdateExperimentStatusResponse.requestId"));<NEW_LINE>Result result = new Result();<NEW_LINE>result.setExperimentId(_ctx.stringValue("UpdateExperimentStatusResponse.result.experimentId"));<NEW_LINE>result.setName(_ctx.stringValue("UpdateExperimentStatusResponse.result.name"));<NEW_LINE>result.setDescription(_ctx.stringValue("UpdateExperimentStatusResponse.result.description"));<NEW_LINE>result.setStatus(_ctx.stringValue("UpdateExperimentStatusResponse.result.status"));<NEW_LINE>result.setBase(_ctx.booleanValue("UpdateExperimentStatusResponse.result.base"));<NEW_LINE>result.setOnlineTime<MASK><NEW_LINE>result.setOfflineTime(_ctx.stringValue("UpdateExperimentStatusResponse.result.offlineTime"));<NEW_LINE>List<String> buckets = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("UpdateExperimentStatusResponse.result.buckets.Length"); i++) {<NEW_LINE>buckets.add(_ctx.stringValue("UpdateExperimentStatusResponse.result.buckets[" + i + "]"));<NEW_LINE>}<NEW_LINE>result.setBuckets(buckets);<NEW_LINE>List<Algorithm> algorithms = new ArrayList<Algorithm>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("UpdateExperimentStatusResponse.result.algorithms.Length"); i++) {<NEW_LINE>Algorithm algorithm = new Algorithm();<NEW_LINE>algorithm.setKey(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].key"));<NEW_LINE>algorithm.setName(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].name"));<NEW_LINE>algorithm.setCategory(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].category"));<NEW_LINE>algorithm.setType(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].type"));<NEW_LINE>algorithm.setDefaultValue(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].defaultValue"));<NEW_LINE>algorithm.setExperimentValue(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].experimentValue"));<NEW_LINE>algorithm.setHasConfig(_ctx.booleanValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].hasConfig"));<NEW_LINE>List<ConfigItem> config = new ArrayList<ConfigItem>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].config.Length"); j++) {<NEW_LINE>ConfigItem configItem = new ConfigItem();<NEW_LINE>configItem.setKey(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].config[" + j + "].key"));<NEW_LINE>configItem.setName(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].config[" + j + "].name"));<NEW_LINE>configItem.setDefaultValue(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].config[" + j + "].defaultValue"));<NEW_LINE>configItem.setExperimentValue(_ctx.stringValue("UpdateExperimentStatusResponse.result.algorithms[" + i + "].config[" + j + "].experimentValue"));<NEW_LINE>config.add(configItem);<NEW_LINE>}<NEW_LINE>algorithm.setConfig(config);<NEW_LINE>algorithms.add(algorithm);<NEW_LINE>}<NEW_LINE>result.setAlgorithms(algorithms);<NEW_LINE>updateExperimentStatusResponse.setResult(result);<NEW_LINE>return updateExperimentStatusResponse;<NEW_LINE>}
(_ctx.stringValue("UpdateExperimentStatusResponse.result.onlineTime"));
812,406
public void initializePlugin(StagemonitorPlugin.InitArguments initArguments) throws Exception {<NEW_LINE>final CorePlugin corePlugin = initArguments.getPlugin(CorePlugin.class);<NEW_LINE>corePlugin.getGrafanaClient().sendGrafanaDashboardAsync("grafana/ElasticsearchHostDashboard.json");<NEW_LINE>if (sigar == null) {<NEW_LINE>if (!SigarNativeBindingLoader.loadNativeSigarBindings()) {<NEW_LINE>// redeploys are a problem, because the native libs can only be loaded by one class loader<NEW_LINE>// this would lead to a UnsatisfiedLinkError: Native Library sigar already loaded in another class loader<NEW_LINE>throw new RuntimeException("The OsPlugin only works with one application per JVM " + "and does not work after a redeploy");<NEW_LINE>}<NEW_LINE>sigar = newSigar();<NEW_LINE>}<NEW_LINE>initArguments.getMetricRegistry().registerAll(init(new CpuMetricSet(sigar, sigar.getCpuInfoList()[0])));<NEW_LINE>initArguments.getMetricRegistry().registerAll(init(new MemoryMetricSet(sigar)));<NEW_LINE>initArguments.getMetricRegistry().registerAll(init(new SwapMetricSet(sigar)));<NEW_LINE>Set<String> routedNetworkInterfaces = new HashSet<String>();<NEW_LINE>for (NetRoute netRoute : sigar.getNetRouteList()) {<NEW_LINE>routedNetworkInterfaces.add(netRoute.getIfname());<NEW_LINE>}<NEW_LINE>for (String ifname : routedNetworkInterfaces) {<NEW_LINE>initArguments.getMetricRegistry().registerAll(init(new NetworkMetricSet(ifname, sigar)));<NEW_LINE>}<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final Set<Map.Entry<String, FileSystem>> entries = (Set<Map.Entry<String, FileSystem>>) sigar.getFileSystemMap().entrySet();<NEW_LINE>for (Map.Entry<String, FileSystem> e : entries) {<NEW_LINE>final FileSystem fs = e.getValue();<NEW_LINE>if (fs.getType() == FileSystem.TYPE_LOCAL_DISK || fs.getType() == FileSystem.TYPE_NETWORK) {<NEW_LINE>initArguments.getMetricRegistry().registerAll(init(new FileSystemMetricSet(e.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getKey(), sigar)));
330,051
public Configuration update(String configId, Configuration newConfiguration, boolean override) throws IOException {<NEW_LINE>org.osgi.service.cm.Configuration configuration = null;<NEW_LINE>if (newConfiguration.containsKey(ConfigConstants.SERVICE_CONTEXT)) {<NEW_LINE>try {<NEW_LINE>configuration = getConfigurationWithContext(configId);<NEW_LINE>} catch (InvalidSyntaxException e) {<NEW_LINE>logger.error("Failed to lookup config for PID '{}'", configId);<NEW_LINE>}<NEW_LINE>if (configuration == null) {<NEW_LINE>configuration = configurationAdmin.createFactoryConfiguration(configId, null);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>configuration = configurationAdmin.getConfiguration(configId, null);<NEW_LINE>}<NEW_LINE>Configuration oldConfiguration = toConfiguration(configuration.getProperties());<NEW_LINE>Dictionary<String, Object> properties = getProperties(configuration);<NEW_LINE>Set<Entry<String, Object>> configurationParameters = newConfiguration.getProperties().entrySet();<NEW_LINE>if (override) {<NEW_LINE>Set<String<MASK><NEW_LINE>for (String key : keySet) {<NEW_LINE>properties.remove(key);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (Entry<String, Object> configurationParameter : configurationParameters) {<NEW_LINE>Object value = configurationParameter.getValue();<NEW_LINE>if (value == null) {<NEW_LINE>properties.remove(configurationParameter.getKey());<NEW_LINE>} else if (value instanceof String || value instanceof Integer || value instanceof Boolean || value instanceof Object[] || value instanceof Collection) {<NEW_LINE>properties.put(configurationParameter.getKey(), value);<NEW_LINE>} else {<NEW_LINE>// the config admin does not support complex object types, so let's store the string representation<NEW_LINE>properties.put(configurationParameter.getKey(), value.toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>configuration.update(properties);<NEW_LINE>return oldConfiguration;<NEW_LINE>}
> keySet = oldConfiguration.keySet();
1,231,781
public void read(JmeImporter im) throws IOException {<NEW_LINE>super.read(im);<NEW_LINE>InputCapsule ic = im.getCapsule(this);<NEW_LINE>// if (im.getFormatVersion() == 0) {<NEW_LINE>modelName = ic.readString("modelName", "");<NEW_LINE>// }<NEW_LINE>// FIXME always the same issue, because of the cloning of assets, this won't work<NEW_LINE>// we have to somehow store userdata in the spatial and then recurse the<NEW_LINE>// scene sub scenegraph to find the correct instance of the model<NEW_LINE>// This brings a reflection about the cinematic being an appstate,<NEW_LINE>// shouldn't it be a control over the scene<NEW_LINE>// this would allow to use the cloneForSpatial method and automatically<NEW_LINE>// rebind cloned references of original objects.<NEW_LINE>// for now as nobody probably ever saved a cinematic, this is not a critical issue<NEW_LINE>model = (Spatial) ic.readSavable("model", null);<NEW_LINE>animationName = <MASK><NEW_LINE>blendTime = ic.readFloat("blendTime", 0f);<NEW_LINE>channelIndex = ic.readInt("channelIndex", 0);<NEW_LINE>}
ic.readString("animationName", "");
11,817
private void expectPopupClosed0(int timeout, Runnable onClosed) {<NEW_LINE>StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();<NEW_LINE>AbstractGuiPopup popup = getPopup(mc.currentScreen);<NEW_LINE>if (popup == null) {<NEW_LINE>throw new IllegalStateException("No popup found.");<NEW_LINE>}<NEW_LINE>class EventHandler {<NEW_LINE><NEW_LINE>int framesPassed;<NEW_LINE><NEW_LINE>@SubscribeEvent<NEW_LINE>public void onGuiOpen(TickEvent.RenderTickEvent event) {<NEW_LINE>if (event.phase != TickEvent.Phase.START)<NEW_LINE>return;<NEW_LINE>if (getPopup(mc.currentScreen) != popup) {<NEW_LINE>MinecraftForge.EVENT_BUS.unregister(this);<NEW_LINE>onClosed.run();<NEW_LINE>} else {<NEW_LINE>if (framesPassed < timeout) {<NEW_LINE>framesPassed++;<NEW_LINE>} else {<NEW_LINE>Exception e = new TimeoutException("Timeout while waiting for " + popup + " to be closed.");<NEW_LINE>e.setStackTrace(Arrays.copyOfRange(stackTrace<MASK><NEW_LINE>future.setException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MinecraftForge.EVENT_BUS.register(new EventHandler());<NEW_LINE>}
, 3, stackTrace.length));
457,528
final RemoveRegionResult executeRemoveRegion(RemoveRegionRequest removeRegionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(removeRegionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RemoveRegionRequest> request = null;<NEW_LINE>Response<RemoveRegionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RemoveRegionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(removeRegionRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Directory Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RemoveRegion");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<RemoveRegionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RemoveRegionResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
102,728
private void loadConfigFile() throws IngestModuleException {<NEW_LINE>Document xmlinput;<NEW_LINE>try {<NEW_LINE>String path = PlatformUtil.getUserConfigDirectory() + File.separator + XMLFILE;<NEW_LINE>File f = new File(path);<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.INFO, "Load successful");<NEW_LINE>DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();<NEW_LINE>DocumentBuilder db = dbf.newDocumentBuilder();<NEW_LINE>xmlinput = db.parse(f);<NEW_LINE>if (!XMLUtil.xmlIsValid(xmlinput, SearchEngineURLQueryAnalyzer.class, XSDFILE)) {<NEW_LINE>// NON-NLS<NEW_LINE>logger.log(Level.WARNING, "Error loading Search Engines: could not validate against [" + XSDFILE + "], results may not be accurate.");<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>// NON-NLS<NEW_LINE>throw new IngestModuleException(Bundle.cannotLoadSEUQA() + e.getLocalizedMessage(), e);<NEW_LINE>} catch (ParserConfigurationException pce) {<NEW_LINE>// NON-NLS<NEW_LINE>throw new IngestModuleException(Bundle.cannotBuildXmlParser() + pce.getLocalizedMessage(), pce);<NEW_LINE>} catch (SAXException sxe) {<NEW_LINE>// NON-NLS<NEW_LINE>throw new IngestModuleException(Bundle.cannotParseXml() + sxe.getLocalizedMessage(), sxe);<NEW_LINE>}<NEW_LINE>// NON-NLS<NEW_LINE>NodeList nlist = xmlinput.getElementsByTagName("SearchEngine");<NEW_LINE>SearchEngineURLQueryAnalyzer.SearchEngine[] listEngines = new SearchEngineURLQueryAnalyzer.SearchEngine[nlist.getLength()];<NEW_LINE>for (int i = 0; i < nlist.getLength(); i++) {<NEW_LINE>NamedNodeMap nnm = nlist.<MASK><NEW_LINE>// NON-NLS<NEW_LINE>String EngineName = nnm.getNamedItem("engine").getNodeValue();<NEW_LINE>// NON-NLS<NEW_LINE>String EnginedomainSubstring = nnm.getNamedItem("domainSubstring").getNodeValue();<NEW_LINE>List<KeyPair> keys = new ArrayList<>();<NEW_LINE>// NON-NLS<NEW_LINE>NodeList listSplits = xmlinput.getElementsByTagName("splitToken");<NEW_LINE>for (int k = 0; k < listSplits.getLength(); k++) {<NEW_LINE>if (listSplits.item(k).getParentNode().getAttributes().getNamedItem("engine").getNodeValue().equals(EngineName)) {<NEW_LINE>// NON-NLS<NEW_LINE>// NON-NLS<NEW_LINE>keys.add(new KeyPair(listSplits.item(k).getAttributes().getNamedItem("plainToken").getNodeValue(), listSplits.item(k).getAttributes().getNamedItem("regexToken").getNodeValue()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>SearchEngineURLQueryAnalyzer.SearchEngine Se = new SearchEngineURLQueryAnalyzer.SearchEngine(EngineName, EnginedomainSubstring, keys);<NEW_LINE>listEngines[i] = Se;<NEW_LINE>}<NEW_LINE>engines = listEngines;<NEW_LINE>}
item(i).getAttributes();
1,173,867
private RelNode createModify(RelOptTable targetTable, RelNode source, LogicalTableModify.Operation op, int batchSize, Set<Integer> appendedColumnIndex, SqlNodeList hints) {<NEW_LINE>final ModifiableTable modifiableTable = targetTable.unwrap(ModifiableTable.class);<NEW_LINE>if (modifiableTable != null && modifiableTable == targetTable.unwrap(Table.class)) {<NEW_LINE>return modifiableTable.toModificationRel(cluster, targetTable, catalogReader, source, op, null, null, false);<NEW_LINE>}<NEW_LINE>final ModifiableView modifiableView = targetTable.unwrap(ModifiableView.class);<NEW_LINE>if (modifiableView != null) {<NEW_LINE>final Table delegateTable = modifiableView.getTable();<NEW_LINE>final RelDataType delegateRowType = delegateTable.getRowType(typeFactory);<NEW_LINE>final RelOptTable delegateRelOptTable = RelOptTableImpl.create(null, delegateRowType, delegateTable, modifiableView.getTablePath());<NEW_LINE>final RelNode newSource = createSource(targetTable, source, modifiableView, delegateRowType);<NEW_LINE>return createModify(delegateRelOptTable, newSource, op, batchSize, appendedColumnIndex, hints);<NEW_LINE>}<NEW_LINE>return LogicalTableModify.create(targetTable, catalogReader, source, op, null, null, false, batchSize, appendedColumnIndex, hints, TableInfo<MASK><NEW_LINE>}
.singleSource(targetTable, source));
1,039,721
final DescribeFolderContentsResult executeDescribeFolderContents(DescribeFolderContentsRequest describeFolderContentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeFolderContentsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeFolderContentsRequest> request = null;<NEW_LINE>Response<DescribeFolderContentsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeFolderContentsRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkDocs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeFolderContents");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeFolderContentsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeFolderContentsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(describeFolderContentsRequest));
849,522
public com.amazonaws.services.dataexchange.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.dataexchange.model.ValidationException validationException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("ExceptionCause", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>validationException.setExceptionCause(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return validationException;<NEW_LINE>}
dataexchange.model.ValidationException(null);
1,452,030
private void validateCompactedEndpoint(ApplicationPackage applicationPackage) {<NEW_LINE>Map<List<String>, InstanceEndpoint> instanceEndpoints = new HashMap<>();<NEW_LINE>for (var instanceSpec : applicationPackage.deploymentSpec().instances()) {<NEW_LINE>for (var endpoint : instanceSpec.endpoints()) {<NEW_LINE>List<String> nonCompactableIds = nonCompactableIds(instanceSpec.name(), endpoint);<NEW_LINE>InstanceEndpoint instanceEndpoint = new InstanceEndpoint(instanceSpec.name(<MASK><NEW_LINE>InstanceEndpoint existingEndpoint = instanceEndpoints.get(nonCompactableIds);<NEW_LINE>if (existingEndpoint != null) {<NEW_LINE>throw new IllegalArgumentException("Endpoint with ID '" + endpoint.endpointId() + "' in instance '" + instanceSpec.name().value() + "' clashes with endpoint '" + existingEndpoint.endpointId + "' in instance '" + existingEndpoint.instance + "'");<NEW_LINE>}<NEW_LINE>instanceEndpoints.put(nonCompactableIds, instanceEndpoint);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), endpoint.endpointId());
36,711
public View onCreateDemoView(LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {<NEW_LINE>View view = layoutInflater.inflate(R.layout.cat_navigation_rail_fragment, viewGroup, false);<NEW_LINE><MASK><NEW_LINE>initNavigationRailDemoControls(view);<NEW_LINE>OnItemSelectedListener navigationItemListener = item -> {<NEW_LINE>handleAllNavigationRailSelections(item.getItemId());<NEW_LINE>TextView page1Text = view.findViewById(R.id.page_1);<NEW_LINE>TextView page2Text = view.findViewById(R.id.page_2);<NEW_LINE>TextView page3Text = view.findViewById(R.id.page_3);<NEW_LINE>TextView page4Text = view.findViewById(R.id.page_4);<NEW_LINE>TextView page5Text = view.findViewById(R.id.page_5);<NEW_LINE>TextView page6Text = view.findViewById(R.id.page_6);<NEW_LINE>TextView page7Text = view.findViewById(R.id.page_7);<NEW_LINE>int itemId = item.getItemId();<NEW_LINE>page1Text.setVisibility(itemId == R.id.action_page_1 ? View.VISIBLE : View.GONE);<NEW_LINE>page2Text.setVisibility(itemId == R.id.action_page_2 ? View.VISIBLE : View.GONE);<NEW_LINE>page3Text.setVisibility(itemId == R.id.action_page_3 ? View.VISIBLE : View.GONE);<NEW_LINE>page4Text.setVisibility(itemId == R.id.action_page_4 ? View.VISIBLE : View.GONE);<NEW_LINE>page5Text.setVisibility(itemId == R.id.action_page_5 ? View.VISIBLE : View.GONE);<NEW_LINE>page6Text.setVisibility(itemId == R.id.action_page_6 ? View.VISIBLE : View.GONE);<NEW_LINE>page7Text.setVisibility(itemId == R.id.action_page_7 ? View.VISIBLE : View.GONE);<NEW_LINE>clearAndHideBadge(item.getItemId());<NEW_LINE>return false;<NEW_LINE>};<NEW_LINE>setNavigationRailListeners(navigationItemListener);<NEW_LINE>if (bundle == null) {<NEW_LINE>setupBadging();<NEW_LINE>}<NEW_LINE>return view;<NEW_LINE>}
initNavigationRail(getContext(), view);
708,828
public Result invoke(final Invoker<?> invoker, final Invocation invocation) throws RpcException {<NEW_LINE>final HmilyTransactionContext context = HmilyContextHolder.get();<NEW_LINE>if (Objects.isNull(context)) {<NEW_LINE>return invoker.invoke(invocation);<NEW_LINE>}<NEW_LINE>Class<?> clazz = invoker.getInterface();<NEW_LINE>Class<?>[] args = invocation.getParameterTypes();<NEW_LINE>String methodName = invocation.getMethodName();<NEW_LINE>try {<NEW_LINE>Method method = <MASK><NEW_LINE>Hmily hmily = method.getAnnotation(Hmily.class);<NEW_LINE>if (Objects.isNull(hmily)) {<NEW_LINE>return invoker.invoke(invocation);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LogUtil.error(LOGGER, "hmily find method error {} ", ex::getMessage);<NEW_LINE>return invoker.invoke(invocation);<NEW_LINE>}<NEW_LINE>final Object[] arguments = invocation.getArguments();<NEW_LINE>converterParamsClass(args, arguments);<NEW_LINE>Long participantId = context.getParticipantId();<NEW_LINE>final HmilyParticipant hmilyParticipant = buildParticipant(context, invoker, invocation);<NEW_LINE>Optional.ofNullable(hmilyParticipant).ifPresent(participant -> context.setParticipantId(participant.getParticipantId()));<NEW_LINE>if (context.getRole() == HmilyRoleEnum.PARTICIPANT.getCode()) {<NEW_LINE>context.setParticipantRefId(participantId);<NEW_LINE>}<NEW_LINE>RpcMediator.getInstance().transmit(RpcContext.getContext()::setAttachment, context);<NEW_LINE>final Result result = invoker.invoke(invocation);<NEW_LINE>// if result has not exception<NEW_LINE>if (!result.hasException()) {<NEW_LINE>if (context.getRole() == HmilyRoleEnum.PARTICIPANT.getCode()) {<NEW_LINE>HmilyTransactionHolder.getInstance().registerParticipantByNested(participantId, hmilyParticipant);<NEW_LINE>} else {<NEW_LINE>HmilyTransactionHolder.getInstance().registerStarterParticipant(hmilyParticipant);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new HmilyRuntimeException("rpc invoke exception{}", result.getException());<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
clazz.getMethod(methodName, args);
1,768,088
private static void putBuildXMLSourceFile(AntProjectHelper helper, String antPath) {<NEW_LINE>Element data = Util.getPrimaryConfigurationData(helper);<NEW_LINE>Document doc = data.getOwnerDocument();<NEW_LINE>// NOI18N<NEW_LINE>Element viewEl = XMLUtil.findElement(data, "view", FreeformProjectType.NS_GENERAL);<NEW_LINE>if (viewEl == null) {<NEW_LINE>// NOI18N<NEW_LINE>viewEl = doc.createElementNS(FreeformProjectType.NS_GENERAL, "view");<NEW_LINE>XMLUtil.appendChildElement(data, viewEl, rootElementsOrder);<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>Element itemsEl = XMLUtil.findElement(viewEl, "items", FreeformProjectType.NS_GENERAL);<NEW_LINE>if (itemsEl == null) {<NEW_LINE>// NOI18N<NEW_LINE>itemsEl = doc.createElementNS(FreeformProjectType.NS_GENERAL, "items");<NEW_LINE>XMLUtil.<MASK><NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>Element fileEl = doc.createElementNS(FreeformProjectType.NS_GENERAL, "source-file");<NEW_LINE>// NOI18N<NEW_LINE>Element el = doc.createElementNS(FreeformProjectType.NS_GENERAL, "location");<NEW_LINE>// NOI18N<NEW_LINE>el.appendChild(doc.createTextNode(antPath));<NEW_LINE>fileEl.appendChild(el);<NEW_LINE>XMLUtil.appendChildElement(itemsEl, fileEl, viewItemElementsOrder);<NEW_LINE>Util.putPrimaryConfigurationData(helper, data);<NEW_LINE>}
appendChildElement(viewEl, itemsEl, viewElementsOrder);
1,672,222
public XmlElement serialize(Object object) {<NEW_LINE>XmlElement struct = new XmlElement(SerializerHandler.TYPE_STRUCT);<NEW_LINE>try {<NEW_LINE>XmlElement entry, name, value;<NEW_LINE>// We can safely cast here, this Serializer should only be called when<NEW_LINE>// the parameter is a map.<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Map<String, Object> map = (<MASK><NEW_LINE>for (Map.Entry<String, Object> member : map.entrySet()) {<NEW_LINE>entry = new XmlElement(STRUCT_MEMBER);<NEW_LINE>name = new XmlElement(STRUCT_NAME);<NEW_LINE>value = new XmlElement(STRUCT_VALUE);<NEW_LINE>name.setContent(member.getKey());<NEW_LINE>value.addChildren(serializerHandler.serialize(member.getValue()));<NEW_LINE>entry.addChildren(name);<NEW_LINE>entry.addChildren(value);<NEW_LINE>struct.addChildren(entry);<NEW_LINE>}<NEW_LINE>} catch (XMLRPCException ex) {<NEW_LINE>throw new XMLRPCRuntimeException(ex);<NEW_LINE>}<NEW_LINE>return struct;<NEW_LINE>}
Map<String, Object>) object;
1,622,852
public static void main(String[] args) {<NEW_LINE>// load logging configuration<NEW_LINE>LogConfig.configureRuntime();<NEW_LINE>Config config = buildConfig();<NEW_LINE>Security security = Security.create(config.get("security"));<NEW_LINE>// this is needed for proper encryption/decryption of cookies<NEW_LINE>Contexts.globalContext().register(security);<NEW_LINE>Routing.Builder routing = // IDCS requires a web resource for redirects<NEW_LINE>Routing.builder().register(WebSecurity.create(security, config.get("security"))).register(// web server does not (yet) have possibility to configure routes in config files, so explicit...<NEW_LINE>OidcSupport.create(config)).get("/rest/profile", (req, res) -> {<NEW_LINE>Optional<SecurityContext> securityContext = req.context().get(SecurityContext.class);<NEW_LINE>res.headers().contentType(MediaType<MASK><NEW_LINE>res.send("Response from config based service, you are: \n" + securityContext.flatMap(SecurityContext::user).map(Subject::toString).orElse("Security context is null"));<NEW_LINE>}).get("/loggedout", (req, res) -> res.send("You have been logged out"));<NEW_LINE>theServer = WebServer.create(routing, config.get("server"));<NEW_LINE>IdcsUtil.start(theServer);<NEW_LINE>}
.TEXT_PLAIN.withCharset("UTF-8"));
386,061
private void registerAuthorizer(CatalogApplicationConfig catalogConfig, Environment environment, Jdbi jdbi) throws NoSuchMethodException, ClassNotFoundException, IllegalAccessException, InvocationTargetException, InstantiationException, IOException {<NEW_LINE><MASK><NEW_LINE>AuthenticationConfiguration authenticationConfiguration = catalogConfig.getAuthenticationConfiguration();<NEW_LINE>if (authorizerConf != null) {<NEW_LINE>authorizer = ((Class<Authorizer>) Class.forName(authorizerConf.getClassName())).getConstructor().newInstance();<NEW_LINE>authorizer.init(authorizerConf, jdbi);<NEW_LINE>String filterClazzName = authorizerConf.getContainerRequestFilter();<NEW_LINE>ContainerRequestFilter filter;<NEW_LINE>if (!StringUtils.isEmpty(filterClazzName)) {<NEW_LINE>filter = ((Class<ContainerRequestFilter>) Class.forName(filterClazzName)).getConstructor(AuthenticationConfiguration.class).newInstance(authenticationConfiguration);<NEW_LINE>LOG.info("Registering ContainerRequestFilter: {}", filter.getClass().getCanonicalName());<NEW_LINE>environment.jersey().register(filter);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LOG.info("Authorizer config not set, setting noop authorizer");<NEW_LINE>authorizer = NoopAuthorizer.class.getConstructor().newInstance();<NEW_LINE>authorizer.init(null, jdbi);<NEW_LINE>ContainerRequestFilter filter = NoopFilter.class.getConstructor().newInstance();<NEW_LINE>environment.jersey().register(filter);<NEW_LINE>}<NEW_LINE>}
AuthorizerConfiguration authorizerConf = catalogConfig.getAuthorizerConfiguration();
956,127
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>CommonLayoutParams.adjustChildrenLayoutParams(this, widthMeasureSpec, heightMeasureSpec);<NEW_LINE>// Don't call measure because it will measure content twice.<NEW_LINE>// ScrollView is expected to have single child so we measure only the first child.<NEW_LINE>View child = this.getChildCount() > 0 ? this.getChildAt(0) : null;<NEW_LINE>if (child == null) {<NEW_LINE>this.scrollableLength = 0;<NEW_LINE>this.contentMeasuredWidth = 0;<NEW_LINE>this.contentMeasuredHeight = 0;<NEW_LINE>this.setPadding(0, 0, 0, 0);<NEW_LINE>} else {<NEW_LINE>CommonLayoutParams.measureChild(child, widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED));<NEW_LINE>this.contentMeasuredWidth = CommonLayoutParams.getDesiredWidth(child);<NEW_LINE>this.contentMeasuredHeight = CommonLayoutParams.getDesiredHeight(child);<NEW_LINE>// Android ScrollView does not account to child margins so we set them as paddings. Otherwise you can never scroll to bottom.<NEW_LINE>CommonLayoutParams lp = (CommonLayoutParams) child.getLayoutParams();<NEW_LINE>this.setPadding(lp.leftMargin, lp.topMargin, lp.rightMargin, lp.bottomMargin);<NEW_LINE>}<NEW_LINE>// Don't add in our paddings because they are already added as child margins. (we will include them twice if we add them).<NEW_LINE>// check the previous line - this.setPadding(lp.leftMargin, lp.topMargin, lp.rightMargin, lp.bottomMargin);<NEW_LINE>// this.contentMeasuredWidth += this.getPaddingLeft() + this.getPaddingRight();<NEW_LINE>// this.contentMeasuredHeight += this.getPaddingTop() + this.getPaddingBottom();<NEW_LINE>// Check against our minimum height<NEW_LINE>this.contentMeasuredWidth = Math.max(this.<MASK><NEW_LINE>this.contentMeasuredHeight = Math.max(this.contentMeasuredHeight, this.getSuggestedMinimumHeight());<NEW_LINE>int widthSizeAndState = resolveSizeAndState(this.contentMeasuredWidth, widthMeasureSpec, 0);<NEW_LINE>int heightSizeAndState = resolveSizeAndState(this.contentMeasuredHeight, heightMeasureSpec, 0);<NEW_LINE>this.setMeasuredDimension(widthSizeAndState, heightSizeAndState);<NEW_LINE>}
contentMeasuredWidth, this.getSuggestedMinimumWidth());
1,820,753
private void restLangText() {<NEW_LINE>UNITSERVER = ParallelMessage.get().getMessage("UnitServerConsole.UnitServer");<NEW_LINE>ODBCSERVER = ParallelMessage.get().getMessage("UnitServerConsole.OdbcServer");<NEW_LINE>HTTPSERVER = ParallelMessage.get().getMessage("UnitServerConsole.HttpServer");<NEW_LINE>tabServer.setTitleAt(0, UNITSERVER);<NEW_LINE>tabServer.setToolTipTextAt(0, UNITSERVER);<NEW_LINE>tabServer.setTitleAt(1, ODBCSERVER);<NEW_LINE>tabServer.setToolTipTextAt(1, ODBCSERVER);<NEW_LINE>tabServer.setTitleAt(2, HTTPSERVER);<NEW_LINE>tabServer.setToolTipTextAt(2, HTTPSERVER);<NEW_LINE>setTitle(UNITSERVER);<NEW_LINE>jBStart.setText(ParallelMessage.get().getMessage("UnitServerConsole.start"));<NEW_LINE>jBReset.setText(ParallelMessage.get().getMessage("UnitServerConsole.reset"));<NEW_LINE>jBStatus.setText(ParallelMessage.get<MASK><NEW_LINE>jBStop.setText(ParallelMessage.get().getMessage("UnitServerConsole.stop"));<NEW_LINE>jBQuit.setText(ParallelMessage.get().getMessage("UnitServerConsole.quit"));<NEW_LINE>jBCopy.setText(ParallelMessage.get().getMessage("UnitServerConsole.copy"));<NEW_LINE>jBClean.setText(ParallelMessage.get().getMessage("UnitServerConsole.clean"));<NEW_LINE>jBConfig.setText(ParallelMessage.get().getMessage("UnitServerConsole.config"));<NEW_LINE>MessageManager imm = IdeCommonMessage.get();<NEW_LINE>jBOptions.setText(imm.getMessage(GC.MENU + GC.OPTIONS));<NEW_LINE>}
().getMessage("UnitServerConsole.status"));
1,164,049
public void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {<NEW_LINE>if (in.readableBytes() < 8) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ByteBuf copy = in.slice();<NEW_LINE>int index = copy.readUnsignedByte();<NEW_LINE><MASK><NEW_LINE>// decompress() starts reading here<NEW_LINE>int compression = copy.readUnsignedByte();<NEW_LINE>int compressedFileSize = copy.readInt();<NEW_LINE>assert compression == CompressionType.NONE || compression == CompressionType.BZ2 || compression == CompressionType.GZ;<NEW_LINE>int size = // 1 byte compresion type, 4 byte compressed size<NEW_LINE>compressedFileSize + // compression has leading 4 byte decompressed length<NEW_LINE>5 + (compression != CompressionType.NONE ? 4 : 0);<NEW_LINE>assert size > 0;<NEW_LINE>int breaks = calculateBreaks(size);<NEW_LINE>// 3 for index/file<NEW_LINE>if (size + 3 + breaks > in.readableBytes()) {<NEW_LINE>logger.trace("Index {} archive {}: Not enough data yet {} > {}", index, file, size + 3 + breaks, in.readableBytes());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ByteBuf compressedData = Unpooled.buffer(size);<NEW_LINE>int totalRead = 3;<NEW_LINE>// skip index/file<NEW_LINE>in.skipBytes(3);<NEW_LINE>for (int i = 0; i < breaks + 1; ++i) {<NEW_LINE>int bytesInBlock = CHUNK_SIZE - (totalRead % CHUNK_SIZE);<NEW_LINE>int bytesToRead = Math.min(bytesInBlock, size - compressedData.writerIndex());<NEW_LINE>logger.trace("{}/{}: reading block {}/{}, read so far this block: {}, file status: {}/{}", index, file, (totalRead % CHUNK_SIZE), CHUNK_SIZE, bytesInBlock, compressedData.writerIndex(), size);<NEW_LINE>ByteBuf chunk = in.readBytes(bytesToRead);<NEW_LINE>compressedData.writeBytes(chunk);<NEW_LINE>chunk.release();<NEW_LINE>totalRead += bytesToRead;<NEW_LINE>if (i < breaks) {<NEW_LINE>assert compressedData.writerIndex() < size;<NEW_LINE>int b = in.readUnsignedByte();<NEW_LINE>++totalRead;<NEW_LINE>assert b == 0xff;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>assert compressedData.writerIndex() == size;<NEW_LINE>logger.trace("{}/{}: done downloading file, remaining buffer {}", index, file, in.readableBytes());<NEW_LINE>ArchiveResponsePacket archiveResponse = new ArchiveResponsePacket();<NEW_LINE>archiveResponse.setIndex(index);<NEW_LINE>archiveResponse.setArchive(file);<NEW_LINE>archiveResponse.setData(compressedData.array());<NEW_LINE>out.add(archiveResponse);<NEW_LINE>compressedData.release();<NEW_LINE>}
int file = copy.readUnsignedShort();
695,292
Class<?> lookup(final PluginType pluginType) throws PluginSourceNotMatchException {<NEW_LINE>synchronized (this.cacheMap) {<NEW_LINE>// Synchronize between this.cacheMap.get() and this.cacheMap.put().<NEW_LINE>final Class<?> pluginMainClass = <MASK><NEW_LINE>if (pluginMainClass != null) {<NEW_LINE>return pluginMainClass;<NEW_LINE>}<NEW_LINE>final MavenPluginPaths pluginPaths = this.findPluginPaths(pluginType);<NEW_LINE>final MavenPluginType mavenPluginType = pluginPaths.getPluginType();<NEW_LINE>final Class<?> loadedPluginMainClass;<NEW_LINE>try (final JarPluginLoader loader = JarPluginLoader.load(pluginPaths.getPluginJarPath(), pluginPaths.getPluginDependencyJarPaths(), this.pluginClassLoaderFactory)) {<NEW_LINE>loadedPluginMainClass = loader.getPluginMainClass();<NEW_LINE>} catch (final InvalidJarPluginException ex) {<NEW_LINE>throw new PluginSourceNotMatchException(ex);<NEW_LINE>}<NEW_LINE>logger.info("Loaded plugin {} ({})", "embulk-" + this.category + "-" + mavenPluginType.getName(), mavenPluginType.getFullName());<NEW_LINE>this.cacheMap.put(mavenPluginType, loadedPluginMainClass);<NEW_LINE>return loadedPluginMainClass;<NEW_LINE>}<NEW_LINE>}
this.cacheMap.get(pluginType);
189,435
private Mono<PagedResponse<DiskEncryptionSetInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2021-12-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)).<PagedResponse<DiskEncryptionSetInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
727,611
private form createPageFind(HttpServletRequest request, HttpServletResponse response, WWindowStatus ws) throws ServletException, IOException {<NEW_LINE>boolean hasValue = false;<NEW_LINE>boolean hasName = false;<NEW_LINE>boolean hasDocNo = false;<NEW_LINE>boolean hasDescription = false;<NEW_LINE>if (ws.curTab == null)<NEW_LINE>return new form();<NEW_LINE>// Get Info from target Tab<NEW_LINE>int size = ws.curTab.getFieldCount();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>GridField mField = ws.curTab.getField(i);<NEW_LINE>String columnName = mField.getColumnName();<NEW_LINE>if (mField.isDisplayed()) {<NEW_LINE>if (columnName.equals("Value"))<NEW_LINE>hasValue = true;<NEW_LINE>else if (columnName.equals("Name"))<NEW_LINE>hasName = true;<NEW_LINE>else if (columnName.equals("DocumentNo"))<NEW_LINE>hasDocNo = true;<NEW_LINE>else if (columnName.equals("Description"))<NEW_LINE>hasDescription = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>form myForm = new form("WWindow", form.METHOD_GET);<NEW_LINE>myForm.setName("WFind");<NEW_LINE>myForm.setID("WFind");<NEW_LINE>myForm.setClass("dialog");<NEW_LINE>myForm.addAttribute("selected", "true");<NEW_LINE>myForm.setTarget("_self");<NEW_LINE>// myForm.addElement(createTabs("Find"));<NEW_LINE>fieldset fields = new fieldset();<NEW_LINE>// table.setClass("centerTable");<NEW_LINE>h1 h = new h1("Find");<NEW_LINE>fields.addElement(h);<NEW_LINE>a a = new a("#", "Cancel");<NEW_LINE>a.addAttribute("type", "cancel");<NEW_LINE>a.setClass("button leftButton");<NEW_LINE>fields.addElement(a);<NEW_LINE>a <MASK><NEW_LINE>a.addAttribute("type", "submit");<NEW_LINE>// iui bug workaround http://code.google.com/p/iui/issues/detail?id=80<NEW_LINE>a.addAttribute("onclick", "(function(event) {return true;})()");<NEW_LINE>a.setClass("button");<NEW_LINE>fields.addElement(a);<NEW_LINE>input line = null;<NEW_LINE>if (hasValue) {<NEW_LINE>line = new input(input.TYPE_TEXT, "txtValue", "");<NEW_LINE>line.setID("txtValue");<NEW_LINE>line.addAttribute("placeholder", Msg.translate(ws.ctx, "Value"));<NEW_LINE>fields.addElement(line);<NEW_LINE>}<NEW_LINE>if (hasDocNo) {<NEW_LINE>line = new input(input.TYPE_TEXT, "txtDocumentNo", "");<NEW_LINE>line.addAttribute("placeholder", Msg.translate(ws.ctx, "DocumentNo"));<NEW_LINE>line.setID("txtDocumentNo");<NEW_LINE>fields.addElement(line);<NEW_LINE>}<NEW_LINE>if (hasName) {<NEW_LINE>line = new input(input.TYPE_TEXT, "txtName", "");<NEW_LINE>line.addAttribute("placeholder", Msg.translate(ws.ctx, "Name"));<NEW_LINE>line.setID("txtName");<NEW_LINE>fields.addElement(line);<NEW_LINE>}<NEW_LINE>if (hasDescription) {<NEW_LINE>line = new input(input.TYPE_TEXT, "txtDescription", "");<NEW_LINE>line.addAttribute("placeholder", Msg.translate(ws.ctx, "Description"));<NEW_LINE>line.setID("txtDescription");<NEW_LINE>fields.addElement(line);<NEW_LINE>}<NEW_LINE>if (!hasDescription && !hasDocNo && !hasName && !hasValue) {<NEW_LINE>fields.addElement(new h2("N/A!"));<NEW_LINE>}<NEW_LINE>fields.addElement(new input("hidden", "txtSQL", "FIND").setID("txtSQL"));<NEW_LINE>myForm.addElement(fields);<NEW_LINE>return myForm;<NEW_LINE>}
= new a("javascript:void(1);", "Search");
971,463
protected void processMouseMotionEvent(MouseEvent e) {<NEW_LINE>super.processMouseMotionEvent(e);<NEW_LINE>if (!isShowing())<NEW_LINE>return;<NEW_LINE>if (MouseEvent.MOUSE_DRAGGED == e.getID() && myWasPressedOnMe) {<NEW_LINE>myDragging = true;<NEW_LINE>setCursor(getResizeCursor());<NEW_LINE>if (myGlassPane != null) {<NEW_LINE>myGlassPane.<MASK><NEW_LINE>}<NEW_LINE>myPoint = SwingUtilities.convertPoint(this, e.getPoint(), ThreeComponentsSplitter.this);<NEW_LINE>final int size = getOrientation() ? ThreeComponentsSplitter.this.getHeight() : ThreeComponentsSplitter.this.getWidth();<NEW_LINE>if (getOrientation()) {<NEW_LINE>if (size > 0 || myDividerZone > 0) {<NEW_LINE>if (myIsFirst) {<NEW_LINE>setFirstSize(Math.min(size - myLastSize - getMinSize(myInnerComponent) - getDividerWidth() * visibleDividersCount(), Math.max(getMinSize(myFirstComponent), myPoint.y)));<NEW_LINE>} else {<NEW_LINE>setLastSize(Math.min(size - myFirstSize - getMinSize(myInnerComponent) - getDividerWidth() * visibleDividersCount(), Math.max(getMinSize(myLastComponent), size - myPoint.y - getDividerWidth())));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (size > 0 || myDividerZone > 0) {<NEW_LINE>if (myIsFirst) {<NEW_LINE>setFirstSize(Math.min(size - myLastSize - getMinSize(myInnerComponent) - getDividerWidth() * visibleDividersCount(), Math.max(getMinSize(myFirstComponent), myPoint.x)));<NEW_LINE>} else {<NEW_LINE>setLastSize(Math.min(size - myFirstSize - getMinSize(myInnerComponent) - getDividerWidth() * visibleDividersCount(), Math.max(getMinSize(myLastComponent), size - myPoint.x - getDividerWidth())));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ThreeComponentsSplitter.this.doLayout();<NEW_LINE>} else if (MouseEvent.MOUSE_MOVED == e.getID()) {<NEW_LINE>if (myGlassPane != null) {<NEW_LINE>if (isInside(e.getPoint())) {<NEW_LINE>myGlassPane.setCursor(getResizeCursor(), myListener);<NEW_LINE>e.consume();<NEW_LINE>} else {<NEW_LINE>myGlassPane.setCursor(null, myListener);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (myWasPressedOnMe) {<NEW_LINE>e.consume();<NEW_LINE>}<NEW_LINE>}
setCursor(getResizeCursor(), myListener);
785,116
public final void objectConstructionExpr() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST objectConstructionExpr_AST = null;<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case DOTDOT:<NEW_LINE>{<NEW_LINE>AST tmp47_AST = null;<NEW_LINE>tmp47_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp47_AST);<NEW_LINE>match(DOTDOT);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case LBRACKET:<NEW_LINE>{<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>match(LBRACKET);<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case STRING:<NEW_LINE>{<NEW_LINE>AST tmp49_AST = null;<NEW_LINE>tmp49_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp49_AST);<NEW_LINE>match(STRING);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case ID:<NEW_LINE>{<NEW_LINE>AST tmp50_AST = null;<NEW_LINE>tmp50_AST = astFactory<MASK><NEW_LINE>astFactory.addASTChild(currentAST, tmp50_AST);<NEW_LINE>match(ID);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>{<NEW_LINE>int _cnt36 = 0;<NEW_LINE>_loop36: do {<NEW_LINE>if ((LA(1) == COMMA)) {<NEW_LINE>match(COMMA);<NEW_LINE>{<NEW_LINE>switch(LA(1)) {<NEW_LINE>case STRING:<NEW_LINE>{<NEW_LINE>AST tmp52_AST = null;<NEW_LINE>tmp52_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp52_AST);<NEW_LINE>match(STRING);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case ID:<NEW_LINE>{<NEW_LINE>AST tmp53_AST = null;<NEW_LINE>tmp53_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp53_AST);<NEW_LINE>match(ID);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (_cnt36 >= 1) {<NEW_LINE>break _loop36;<NEW_LINE>} else {<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>_cnt36++;<NEW_LINE>} while (true);<NEW_LINE>}<NEW_LINE>match(RBRACKET);<NEW_LINE>if (inputState.guessing == 0) {<NEW_LINE>objectConstructionExpr_AST = (AST) currentAST.root;<NEW_LINE>objectConstructionExpr_AST = (AST) astFactory.make((new ASTArray(2)).add(astFactory.create(OBJECT_CONSTRUCTION, "Object construction expression:")).add(objectConstructionExpr_AST));<NEW_LINE>currentAST.root = objectConstructionExpr_AST;<NEW_LINE>currentAST.child = objectConstructionExpr_AST != null && objectConstructionExpr_AST.getFirstChild() != null ? objectConstructionExpr_AST.getFirstChild() : objectConstructionExpr_AST;<NEW_LINE>currentAST.advanceChildToEnd();<NEW_LINE>}<NEW_LINE>objectConstructionExpr_AST = (AST) currentAST.root;<NEW_LINE>returnAST = objectConstructionExpr_AST;<NEW_LINE>}
.create(LT(1));
1,424,097
private void childUnlock(final MenuItem item) {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.CustomAlertDialogTheme);<NEW_LINE>builder.setTitle(R.string.action_mode_child_lock);<NEW_LINE>builder.setMessage(R.string.action_mode_dialog_message_unlock);<NEW_LINE>builder.setIcon(R.drawable.ic_lock_outline_blue_24dp);<NEW_LINE>LayoutInflater inflater = getLayoutInflater();<NEW_LINE>@SuppressLint("InflateParams")<NEW_LINE>final View inputView = inflater.inflate(R.<MASK><NEW_LINE>final EditText input = inputView.findViewById(R.id.etForDialog);<NEW_LINE>input.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);<NEW_LINE>builder.setView(inputView);<NEW_LINE>final MainActivity mainActivity = this;<NEW_LINE>builder.setPositiveButton(R.string.ok, (dialogInterface, i) -> {<NEW_LINE>String saved_pass = new String(Base64.decode(preferenceRepository.get().getStringPreference("passwd"), 16));<NEW_LINE>if (saved_pass.replace("-l-o-c-k-e-d", "").equals(input.getText().toString())) {<NEW_LINE>String pass = Base64.encodeToString((input.getText().toString()).getBytes(), 16);<NEW_LINE>preferenceRepository.get().setStringPreference("passwd", pass);<NEW_LINE>Toast.makeText(getApplicationContext(), getText(R.string.action_mode_dialog_unlocked), Toast.LENGTH_SHORT).show();<NEW_LINE>item.setIcon(R.drawable.ic_lock_open_white_24dp);<NEW_LINE>childLockActive = false;<NEW_LINE>DrawerLayout mDrawerLayout = mainActivity.findViewById(R.id.drawer_layout);<NEW_LINE>mDrawerLayout.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);<NEW_LINE>} else {<NEW_LINE>childUnlock(item);<NEW_LINE>Toast.makeText(getApplicationContext(), getText(R.string.action_mode_dialog_wrong_pass), Toast.LENGTH_LONG).show();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>builder.setNegativeButton(R.string.cancel, (dialogInterface, i) -> dialogInterface.cancel());<NEW_LINE>builder.show();<NEW_LINE>}
layout.edit_text_for_dialog, null, false);
303,151
static void vp8_get_inter_mbpred_error(Macroblock mb, VarianceFNs vfp, VarianceResults ret, MV this_mv) {<NEW_LINE>final Block b = mb.block.get();<NEW_LINE>final BlockD d = mb.e_mbd.block.get();<NEW_LINE>final FullAccessIntArrPointer what = b.getSrcPtr();<NEW_LINE>final int what_stride = b.src_stride;<NEW_LINE>final int pre_stride = mb.e_mbd.pre.y_stride;<NEW_LINE>final FullAccessIntArrPointer in_what = d.getOffsetPointer(mb.e_mbd.pre.y_buffer).shallowCopyWithPosInc((this_mv.row >> 3) * pre_stride + (this_mv.col >> 3));<NEW_LINE>final int xoffset = this_mv.col & 7;<NEW_LINE>final <MASK><NEW_LINE>if ((xoffset | yoffset) != 0) {<NEW_LINE>vfp.svf.call(in_what, pre_stride, xoffset, yoffset, what, what_stride, ret);<NEW_LINE>} else {<NEW_LINE>vfp.vf.call(what, what_stride, in_what, pre_stride, ret);<NEW_LINE>}<NEW_LINE>}
int yoffset = this_mv.row & 7;
1,750,755
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,c1,c2".split(",");<NEW_LINE>String epl = "@Name('s0') select a[0].theString as c0, a[1].theString as c1, b.theString as c2 from pattern [a=SupportBean(intPrimitive=0) until b=SupportBean(intPrimitive=1)]";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.milestone(0);<NEW_LINE>sendSupportBean(env, "A1", 0);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.milestone(1);<NEW_LINE><MASK><NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.milestone(2);<NEW_LINE>sendSupportBean(env, "B1", 1);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "A1", "A2", "B1" });<NEW_LINE>env.milestone(3);<NEW_LINE>sendSupportBean(env, "A1", 0);<NEW_LINE>sendSupportBean(env, "B1", 1);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.undeployAll();<NEW_LINE>}
sendSupportBean(env, "A2", 0);
1,843,754
// @SuppressForbidden(reason = "toUpperCase() for consistency level")<NEW_LINE>@Override<NEW_LINE>public void createField(ParseContext context, Object object, Optional<String> keyName) throws IOException {<NEW_LINE>InetAddress address = null;<NEW_LINE>if (object instanceof String) {<NEW_LINE>try {<NEW_LINE>address = InetAddresses.forString((String) object);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>if (ignoreMalformed.value()) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>address = (InetAddress) object;<NEW_LINE>}<NEW_LINE>if (address == null) {<NEW_LINE>String ipAsString = fieldType().nullValueAsString();<NEW_LINE>if (ipAsString == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (com.google.common.net.InetAddresses.isInetAddress(ipAsString)) {<NEW_LINE>address = com.google.common.net.InetAddresses.forString(ipAsString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String fieldName = keyName.orElse(fieldType().name());<NEW_LINE>if (context.includeInAll(includeInAll, this)) {<NEW_LINE>context.allEntries().addText(fieldName, NetworkAddress.format(address), fieldType().boost());<NEW_LINE>}<NEW_LINE>if (fieldType().indexOptions() != IndexOptions.NONE) {<NEW_LINE>context.doc().add(new InetAddressPoint(fieldType().name(), address));<NEW_LINE>}<NEW_LINE>if (fieldType().hasDocValues()) {<NEW_LINE>context.doc().add(new SortedSetDocValuesField(fieldName, new BytesRef(InetAddressPoint.encode(address))));<NEW_LINE>} else if (fieldType().stored() || fieldType().indexOptions() != IndexOptions.NONE) {<NEW_LINE>createFieldNamesField(context, context.<MASK><NEW_LINE>}<NEW_LINE>// for multi fields.<NEW_LINE>super.createField(context, object, keyName);<NEW_LINE>}
doc().getFields());
597,183
void newPolyglotEngineInstance(ObjectReference engine, JPDAThreadImpl thread) {<NEW_LINE>LOG.log(Level.FINE, "Engine created breakpoint hit: engine = {0} in thread = {1}", new Object[] { engine, thread.getThreadReference() });<NEW_LINE>assert inited.get() : "The remote services should have been initialized already from a Truffle class.";<NEW_LINE>if (accessorClass == null) {<NEW_LINE>// No accessor<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>InvocationExceptionTranslated iextr = null;<NEW_LINE>try {<NEW_LINE>// Create an instance of JPDATruffleDebugManager in the backend<NEW_LINE>// and submit breakpoints:<NEW_LINE>thread.notifyMethodInvoking();<NEW_LINE>VirtualMachine vm = ((JPDADebuggerImpl) debugger).getVirtualMachine();<NEW_LINE>if (vm == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>BooleanValue includeInternal = vm.mirrorOf(TruffleOptions.isLanguageDeveloperMode());<NEW_LINE>BooleanValue doStepInto = vm.mirrorOf(isStepInto());<NEW_LINE>Method debugManagerMethod = ClassTypeWrapper.<MASK><NEW_LINE>ThreadReference tr = thread.getThreadReference();<NEW_LINE>List<Value> dmArgs = Arrays.asList(engine, includeInternal, doStepInto);<NEW_LINE>LOG.log(Level.FINE, "Setting engine and step into = {0}", isStepInto());<NEW_LINE>Object ret = ClassTypeWrapper.invokeMethod(accessorClass, tr, debugManagerMethod, dmArgs, ObjectReference.INVOKE_SINGLE_THREADED);<NEW_LINE>if (ret instanceof ObjectReference) {<NEW_LINE>// Can be null when an existing debug manager is reused.<NEW_LINE>// debugManager = (ObjectReference) ret;<NEW_LINE>breakpointsHandler.submitBreakpoints(accessorClass, (ObjectReference) ret, thread);<NEW_LINE>}<NEW_LINE>} catch (VMDisconnectedExceptionWrapper vmd) {<NEW_LINE>} catch (InvocationException iex) {<NEW_LINE>iextr = new InvocationExceptionTranslated(iex, thread.getDebugger());<NEW_LINE>Exceptions.printStackTrace(iex);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>} finally {<NEW_LINE>thread.notifyMethodInvokeDone();<NEW_LINE>}<NEW_LINE>if (iextr != null) {<NEW_LINE>iextr.preload(thread);<NEW_LINE>Exceptions.printStackTrace(iextr);<NEW_LINE>}<NEW_LINE>}
concreteMethodByName(accessorClass, ACCESSOR_SET_UP_DEBUG_MANAGER_FOR, ACCESSOR_SET_UP_DEBUG_MANAGER_FOR_SGN);
82,960
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>Context mContext = getActivity();<NEW_LINE>HashMap<String, String> fonts = FontManager.getFontsMap();<NEW_LINE>mFontPaths = new ArrayList<>();<NEW_LINE>mFontNames = new ArrayList<>();<NEW_LINE>for (String path : fonts.keySet()) {<NEW_LINE>mFontPaths.add(path);<NEW_LINE>mFontNames.add(fonts.get(path));<NEW_LINE>}<NEW_LINE>ThemeHelper themeHelper = new ThemeHelper(getActivity());<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());<NEW_LINE>LayoutInflater inflater = getActivity().getLayoutInflater();<NEW_LINE>View view = inflater.inflate(R.layout.dialog_font_picker, null);<NEW_LINE>view.setBackgroundColor(themeHelper.getBackgroundColor());<NEW_LINE>FontAdapter adapter = new FontAdapter(mContext);<NEW_LINE>builder.setAdapter(adapter, new OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface arg0, int arg1) {<NEW_LINE>mSelectedFont = mFontPaths.get(arg1);<NEW_LINE>mListener.onFontSelected(FontPickerDialog.this);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>LinearLayout titleLinearLayout = new LinearLayout(mContext);<NEW_LINE>titleLinearLayout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));<NEW_LINE>titleLinearLayout.setOrientation(LinearLayout.HORIZONTAL);<NEW_LINE>TextView title = new TextView(mContext);<NEW_LINE>title.<MASK><NEW_LINE>title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 22);<NEW_LINE>title.setTypeface(null, Typeface.BOLD);<NEW_LINE>title.setTextColor(ContextCompat.getColor(mContext, R.color.white));<NEW_LINE>title.setPadding(40, 40, 40, 40);<NEW_LINE>titleLinearLayout.setBackgroundColor(ContextCompat.getColor(mContext, R.color.accent_cyan));<NEW_LINE>titleLinearLayout.addView(title);<NEW_LINE>builder.setCustomTitle(titleLinearLayout);<NEW_LINE>builder.setNegativeButton(getString(R.string.cancel).toUpperCase(), new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>public void onClick(DialogInterface dialog, int id) {<NEW_LINE>// don't have to do anything on cancel<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return builder.create();<NEW_LINE>}
setText(R.string.select_a_font);
35,775
protected org.glassfish.grizzly.http.HttpServerFilter createHttpServerCodecFilter(final Http http, final boolean isChunkedEnabled, final int headerBufferLengthBytes, final String defaultResponseType, final KeepAlive keepAlive, final DelayedExecutor delayedExecutor, final int maxRequestHeaders, final int maxResponseHeaders) {<NEW_LINE>final org.glassfish.grizzly.http.HttpServerFilter httpCodecFilter = new GlassfishHttpCodecFilter(http == null || Boolean.parseBoolean(http.getXpoweredBy()), http == null || Boolean.parseBoolean(http.getServerHeader()), http == null || Boolean.parseBoolean(http.getXframeOptions()), isChunkedEnabled, headerBufferLengthBytes, defaultResponseType, keepAlive, delayedExecutor, maxRequestHeaders, maxResponseHeaders);<NEW_LINE>if (http != null) {<NEW_LINE>// could be null for HTTP redirect<NEW_LINE>httpCodecFilter.setMaxPayloadRemainderToSkip(Integer.parseInt(http.getMaxSwallowingInputBytes()));<NEW_LINE>httpCodecFilter.setAllowPayloadForUndefinedHttpMethods(Boolean.parseBoolean<MASK><NEW_LINE>}<NEW_LINE>return httpCodecFilter;<NEW_LINE>}
(http.getAllowPayloadForUndefinedHttpMethods()));
1,377,379
public void testXA012(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>final TransactionManager tm = TransactionManagerFactory.getTransactionManager();<NEW_LINE>tm.begin();<NEW_LINE>final <MASK><NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAException.XA_RBROLLBACK));<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAResource.XA_RDONLY));<NEW_LINE>tx.enlistResource(new XAResourceImpl().setRollbackAction(XAException.XA_HEURHAZ));<NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAResource.XA_RDONLY));<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>tx.enlistResource(new XAResourceImpl().setPrepareAction(XAResource.XA_RDONLY));<NEW_LINE>tx.enlistResource(new XAResourceImpl());<NEW_LINE>try {<NEW_LINE>tm.commit();<NEW_LINE>throw new Exception();<NEW_LINE>} catch (HeuristicMixedException e) {<NEW_LINE>// As expected<NEW_LINE>}<NEW_LINE>}
Transaction tx = tm.getTransaction();
919,570
public static GetDhcpOptionsSetResponse unmarshall(GetDhcpOptionsSetResponse getDhcpOptionsSetResponse, UnmarshallerContext _ctx) {<NEW_LINE>getDhcpOptionsSetResponse.setRequestId(_ctx.stringValue("GetDhcpOptionsSetResponse.RequestId"));<NEW_LINE>getDhcpOptionsSetResponse.setDhcpOptionsSetDescription(_ctx.stringValue("GetDhcpOptionsSetResponse.DhcpOptionsSetDescription"));<NEW_LINE>getDhcpOptionsSetResponse.setStatus(_ctx.stringValue("GetDhcpOptionsSetResponse.Status"));<NEW_LINE>getDhcpOptionsSetResponse.setDhcpOptionsSetId(_ctx.stringValue("GetDhcpOptionsSetResponse.DhcpOptionsSetId"));<NEW_LINE>getDhcpOptionsSetResponse.setDhcpOptionsSetName(_ctx.stringValue("GetDhcpOptionsSetResponse.DhcpOptionsSetName"));<NEW_LINE>getDhcpOptionsSetResponse.setOwnerId(_ctx.longValue("GetDhcpOptionsSetResponse.OwnerId"));<NEW_LINE>DhcpOptions dhcpOptions = new DhcpOptions();<NEW_LINE>dhcpOptions.setTFTPServerName(_ctx.stringValue("GetDhcpOptionsSetResponse.DhcpOptions.TFTPServerName"));<NEW_LINE>dhcpOptions.setDomainNameServers(_ctx.stringValue("GetDhcpOptionsSetResponse.DhcpOptions.DomainNameServers"));<NEW_LINE>dhcpOptions.setDomainName(_ctx.stringValue("GetDhcpOptionsSetResponse.DhcpOptions.DomainName"));<NEW_LINE>dhcpOptions.setBootFileName(_ctx.stringValue("GetDhcpOptionsSetResponse.DhcpOptions.BootFileName"));<NEW_LINE>getDhcpOptionsSetResponse.setDhcpOptions(dhcpOptions);<NEW_LINE>List<AssociateVpc> associateVpcs = new ArrayList<AssociateVpc>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetDhcpOptionsSetResponse.AssociateVpcs.Length"); i++) {<NEW_LINE>AssociateVpc associateVpc = new AssociateVpc();<NEW_LINE>associateVpc.setAssociateStatus(_ctx.stringValue("GetDhcpOptionsSetResponse.AssociateVpcs[" + i + "].AssociateStatus"));<NEW_LINE>associateVpc.setVpcId(_ctx.stringValue<MASK><NEW_LINE>associateVpcs.add(associateVpc);<NEW_LINE>}<NEW_LINE>getDhcpOptionsSetResponse.setAssociateVpcs(associateVpcs);<NEW_LINE>return getDhcpOptionsSetResponse;<NEW_LINE>}
("GetDhcpOptionsSetResponse.AssociateVpcs[" + i + "].VpcId"));
336,515
private I_C_Invoice_Candidate createCand(final Properties ctx, final I_C_Flatrate_Term term, final I_C_Flatrate_DataEntry dataEntry, final int productId, final BigDecimal priceActual, final String trxName) {<NEW_LINE>final I_C_Invoice_Candidate newCand = InterfaceWrapperHelper.create(<MASK><NEW_LINE>Check.assume(newCand.getAD_Client_ID() == dataEntry.getAD_Client_ID(), "ctx contains the correct AD_Client_ID");<NEW_LINE>final OrgId orgId = OrgId.ofRepoId(dataEntry.getAD_Org_ID());<NEW_LINE>newCand.setAD_Org_ID(orgId.getRepoId());<NEW_LINE>final I_C_Flatrate_Conditions fc = term.getC_Flatrate_Conditions();<NEW_LINE>newCand.setM_PricingSystem_ID(fc.getM_PricingSystem_ID());<NEW_LINE>newCand.setM_Product_ID(productId);<NEW_LINE>newCand.setQtyOrdered(BigDecimal.ONE);<NEW_LINE>// to be computed<NEW_LINE>newCand.setQtyToInvoice(BigDecimal.ZERO);<NEW_LINE>newCand.setPriceActual(priceActual);<NEW_LINE>// 07090 when we set PiceActual, we shall also set PriceUOM.<NEW_LINE>newCand.setPrice_UOM_ID(term.getC_UOM_ID());<NEW_LINE>// cg : task 04917 -- same as price actual<NEW_LINE>newCand.setPriceEntered(priceActual);<NEW_LINE>newCand.setDiscount(BigDecimal.ZERO);<NEW_LINE>newCand.setInvoiceRule(fc.getInvoiceRule());<NEW_LINE>newCand.setC_Currency_ID(term.getC_Currency_ID());<NEW_LINE>InvoiceCandidateLocationAdapterFactory.billLocationAdapter(newCand).setFrom(ContractLocationHelper.extractBillLocation(term));<NEW_LINE>newCand.setDateOrdered(dataEntry.getC_Period().getEndDate());<NEW_LINE>newCand.setAD_Table_ID(adTableDAO.retrieveTableId(I_C_Flatrate_DataEntry.Table_Name));<NEW_LINE>newCand.setRecord_ID(dataEntry.getC_Flatrate_DataEntry_ID());<NEW_LINE>// 07442 activity and tax<NEW_LINE>final ActivityId activityId = findActivityIdOrNull(term, productId);<NEW_LINE>newCand.setC_Activity_ID(ActivityId.toRepoId(activityId));<NEW_LINE>newCand.setIsTaxIncluded(term.isTaxIncluded());<NEW_LINE>final TaxCategoryId taxCategoryId = TaxCategoryId.ofRepoIdOrNull(term.getC_TaxCategory_ID());<NEW_LINE>final BPartnerLocationAndCaptureId shipToLocationId = CoalesceUtil.coalesceSuppliers(() -> ContractLocationHelper.extractDropshipLocationId(term), () -> ContractLocationHelper.extractBillToLocationId(term));<NEW_LINE>final TaxId taxId = // shipDate<NEW_LINE>Services.get(ITaxBL.class).// shipDate<NEW_LINE>getTaxNotNull(// shipDate<NEW_LINE>term, // shipDate<NEW_LINE>taxCategoryId, // shipDate<NEW_LINE>productId, dataEntry.getDate_Reported(), orgId, null, shipToLocationId, SOTrx.SALES);<NEW_LINE>newCand.setC_Tax_ID(taxId.getRepoId());<NEW_LINE>setILCandHandler(ctx, newCand);<NEW_LINE>InterfaceWrapperHelper.save(newCand);<NEW_LINE>return newCand;<NEW_LINE>}
ctx, I_C_Invoice_Candidate.class, trxName);
1,346,945
private File createJoinFile(final String hashId, final Connection connection) throws IOException, DotDataException {<NEW_LINE>final File file = FileUtil.createTemporaryFile("dot-db-storage-recovery", ".tmp", true);<NEW_LINE>try (final FileJoiner fileJoiner = new FileJoiner(file)) {<NEW_LINE>final HashBuilder fileHashBuilder = Try.of(Hashing::sha256).getOrElseThrow(DotRuntimeException::new);<NEW_LINE>final PreparedStatement preparedStatement = connection.prepareStatement("SELECT storage_data.hash_id AS hash, storage_data.data AS data FROM storage_data , storage_x_data " + "WHERE storage_x_data.data_hash = storage_data.hash_id " + "AND storage_x_data.storage_hash = ? order by data_order ASC ");<NEW_LINE>preparedStatement.setString(1, hashId);<NEW_LINE>preparedStatement.setFetchSize(1);<NEW_LINE>final ResultSet resultSet = preparedStatement.executeQuery();<NEW_LINE>while (resultSet.next()) {<NEW_LINE>final String hash = resultSet.getString("hash");<NEW_LINE>final byte[] <MASK><NEW_LINE>final String recoveredHash = Try.of(() -> Encryptor.Hashing.sha256().append(bytes).buildUnixHash()).getOrElseThrow(DotRuntimeException::new);<NEW_LINE>if (hash.equals(recoveredHash)) {<NEW_LINE>fileJoiner.join(bytes, 0, bytes.length);<NEW_LINE>fileJoiner.flush();<NEW_LINE>fileHashBuilder.append(bytes);<NEW_LINE>} else {<NEW_LINE>throw new DotCorruptedDataException(" Checksum hash verification failure. The chunk is not valid");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!hashId.equals(fileHashBuilder.buildUnixHash())) {<NEW_LINE>throw new DotCorruptedDataException(String.format("The file hash `%s` isn't valid. it doesn't match the records in `storage_data/storage_x_data` or they don't exist. ", hashId));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DotDataException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>return file;<NEW_LINE>}
bytes = resultSet.getBytes("data");
1,516,091
public static JSConstructor createErrorConstructor(JSRealm realm, JSErrorType errorType) {<NEW_LINE>JSContext context = realm.getContext();<NEW_LINE>TruffleString name = Strings.fromJavaString(errorType.toString());<NEW_LINE>// (Type)Error<NEW_LINE>JSFunctionObject errorConstructor = realm.lookupFunction(ConstructorBuiltins.BUILTINS, name);<NEW_LINE>// (Type)Error.prototype<NEW_LINE>JSDynamicObject classPrototype = <MASK><NEW_LINE>if (errorType != JSErrorType.Error) {<NEW_LINE>JSObject.setPrototype(errorConstructor, realm.getErrorConstructor(JSErrorType.Error));<NEW_LINE>}<NEW_LINE>JSObjectUtil.putConstructorProperty(context, classPrototype, errorConstructor);<NEW_LINE>JSObjectUtil.putDataProperty(context, classPrototype, NAME, name, MESSAGE_ATTRIBUTES);<NEW_LINE>JSObjectUtil.putConstructorPrototypeProperty(context, errorConstructor, classPrototype);<NEW_LINE>if (errorType == JSErrorType.Error) {<NEW_LINE>JSObjectUtil.putFunctionsFromContainer(realm, errorConstructor, ErrorFunctionBuiltins.BUILTINS);<NEW_LINE>JSObjectUtil.putDataProperty(context, errorConstructor, STACK_TRACE_LIMIT_PROPERTY_NAME, JSContextOptions.STACK_TRACE_LIMIT.getValue(realm.getOptions()), JSAttributes.getDefault());<NEW_LINE>}<NEW_LINE>return new JSConstructor(errorConstructor, classPrototype);<NEW_LINE>}
JSError.createErrorPrototype(realm, errorType);
1,367,313
// GEN-LAST:event_bnTestDatabaseActionPerformed<NEW_LINE>private void bnTestMessageServiceActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_bnTestMessageServiceActionPerformed<NEW_LINE>lbTestMessageService.setIcon(null);<NEW_LINE>lbTestMessageService.paintImmediately(lbTestMessageService.getVisibleRect());<NEW_LINE>lbTestMessageWarning.setText("");<NEW_LINE>lbTestMessageWarning.paintImmediately(lbTestMessageWarning.getVisibleRect());<NEW_LINE>setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));<NEW_LINE>int port;<NEW_LINE>try {<NEW_LINE>port = Integer.parseInt(this.tbMsgPort.getText().trim());<NEW_LINE>} catch (NumberFormatException ex) {<NEW_LINE>lbTestMessageService.setIcon(badIcon);<NEW_LINE>lbTestMessageWarning.setText(NbBundle.getMessage(MultiUserSettingsPanel.class, "MultiUserSettingsPanel.InvalidPortNumber"));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MessageServiceConnectionInfo info = new MessageServiceConnectionInfo(this.tbMsgHostname.getText().trim(), port, this.tbMsgUsername.getText().trim(), new String(this.tbMsgPassword.getPassword()));<NEW_LINE>try {<NEW_LINE>info.tryConnect();<NEW_LINE>lbTestMessageService.setIcon(goodIcon);<NEW_LINE>lbTestMessageWarning.setText("");<NEW_LINE>} catch (MessageServiceException ex) {<NEW_LINE>lbTestMessageService.setIcon(badIcon);<NEW_LINE>lbTestMessageWarning.setText(ex.getMessage());<NEW_LINE>} finally {<NEW_LINE>setCursor(Cursor<MASK><NEW_LINE>}<NEW_LINE>}
.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
571,655
public boolean testMatch(final PwmDomain pwmDomain, final SessionLabel sessionLabel, final UserIdentity userIdentity, final UserPermission userPermission) throws PwmUnrecoverableException {<NEW_LINE>if (userPermission.getLdapBase() != null && !userPermission.getLdapBase().trim().isEmpty()) {<NEW_LINE>final String canonicalBaseDN = pwmDomain.getConfig().getLdapProfiles().get(userIdentity.getLdapProfileID()).readCanonicalDN(sessionLabel, pwmDomain, userPermission.getLdapBase());<NEW_LINE>if (!UserPermissionUtility.testBaseDnMatch(sessionLabel, pwmDomain, canonicalBaseDN, userIdentity)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (userIdentity == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>LOGGER.trace(sessionLabel, () -> "begin check for ldapQuery match for " + userIdentity + " using queryMatch: " + filterString);<NEW_LINE>if (StringUtil.isEmpty(filterString)) {<NEW_LINE>LOGGER.trace(sessionLabel, () -> "missing queryMatch value, skipping check");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if ("(objectClass=*)".equalsIgnoreCase(filterString) || "objectClass=*".equalsIgnoreCase(filterString)) {<NEW_LINE>LOGGER.trace(sessionLabel, () -> "queryMatch check is guaranteed to be true, skipping ldap query");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>LOGGER.trace(sessionLabel, () -> "checking ldap to see if " + userIdentity + " matches '" + filterString + "'");<NEW_LINE>return selfUserSearch(pwmDomain, sessionLabel, userIdentity, filterString);<NEW_LINE>}
String filterString = userPermission.getLdapQuery();
1,662,147
public int updateRows(Set<LinkedHashMap<String, String>> affectPks, LinkedHashMap<String, String> values) throws SQLException {<NEW_LINE>checkRule(values);<NEW_LINE>// temp<NEW_LINE>List<LinkedHashMap<String, String>> dbGroupRows = Lists.newArrayList();<NEW_LINE>for (LinkedHashMap<String, String> affectPk : affectPks) {<NEW_LINE>boolean isTemp = false;<NEW_LINE>for (LinkedHashMap<String, String> tempRow : tempRowList) {<NEW_LINE>if (StringUtil.equals(tempRow.get(COLUMN_NAME), affectPk.get(COLUMN_NAME))) {<NEW_LINE>isTemp = true;<NEW_LINE>tempRow.putAll(values);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!isTemp) {<NEW_LINE>affectPk.putAll(values);<NEW_LINE>dbGroupRows.add(affectPk);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (dbGroupRows.isEmpty()) {<NEW_LINE>return affectPks.size();<NEW_LINE>}<NEW_LINE>List<DBGroup> dbGroupList = affectPks.stream().map(this::transformRowToDBGroup).collect(Collectors.toList());<NEW_LINE>DBConverter dbConverter = new DBConverter();<NEW_LINE>RawJson dbConfig = DbleServer.getInstance().getConfig().getDbConfig();<NEW_LINE>DbGroups dbGroups = dbConverter.dbJsonToBean(dbConfig, false);<NEW_LINE>for (DBGroup dbGroup : dbGroupList) {<NEW_LINE>Optional<DBGroup> dbGroupOp = dbGroups.getDbGroup().stream().filter(sourceDbGroup -> StringUtil.equals(sourceDbGroup.getName(), dbGroup.getName())).findFirst();<NEW_LINE>if (!dbGroupOp.isPresent()) {<NEW_LINE>String msg = String.format("this row[%s] does not exist.", dbGroup.getName());<NEW_LINE>throw new SQLException(<MASK><NEW_LINE>}<NEW_LINE>dbGroup.setDbInstance(dbGroupOp.get().getDbInstance());<NEW_LINE>dbGroups.getDbGroup().removeIf(sourceDbGroup -> StringUtil.equals(sourceDbGroup.getName(), dbGroup.getName()));<NEW_LINE>dbGroups.getDbGroup().add(dbGroup);<NEW_LINE>}<NEW_LINE>dbConfig = DBConverter.dbBeanToJson(dbGroups);<NEW_LINE>DbleTempConfig.getInstance().setDbConfig(dbConfig);<NEW_LINE>return affectPks.size();<NEW_LINE>}
msg, "42S22", ErrorCode.ER_NO_REFERENCED_ROW_2);
42,736
private // SQLERRMSG_s; PROTOCOL TYPE VCS; ENVLID 0x32; Length Override 70<NEW_LINE>void parseSQLCAXGRP(NetSqlca netSqlca) {<NEW_LINE>if (readFastUnsignedByte() == CodePoint.NULLDATA) {<NEW_LINE>netSqlca.setContainsSqlcax(false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// if (DRDAConstants.TARGET_SQL_AM < DRDAConstants.MGRLVL_7) {<NEW_LINE>// // skip over the rdbnam for now<NEW_LINE>// // SQLRDBNME; PROTOCOL TYPE FCS; ENVLID 0x30; Length Override 18<NEW_LINE>// skipFastBytes(18);<NEW_LINE>// }<NEW_LINE>// SQLERRD1 to SQLERRD6; PROTOCOL TYPE I4; ENVLID 0x02; Length Override 4<NEW_LINE>int[] sqlerrd = new int[NetSqlca.SQL_ERR_LENGTH];<NEW_LINE>readFastIntArray(sqlerrd);<NEW_LINE>// SQLWARN0 to SQLWARNA; PROTOCOL TYPE FCS; ENVLID 0x30; Length Override 1<NEW_LINE>byte[] sqlwarn = readFastBytes(11);<NEW_LINE>if (DRDAConstants.TARGET_SQL_AM >= DRDAConstants.MGRLVL_7) {<NEW_LINE>// skip over the rdbnam for now<NEW_LINE>// SQLRDBNAME; PROTOCOL TYPE VCS; ENVLID 0x32; Length Override 1024<NEW_LINE>String rdbname = parseFastVCS();<NEW_LINE>}<NEW_LINE>int sqlerrmcCcsid;<NEW_LINE>byte[] sqlerrmc = readFastLDBytes();<NEW_LINE>if (sqlerrmc != null) {<NEW_LINE>sqlerrmcCcsid <MASK><NEW_LINE>skipFastBytes(2);<NEW_LINE>} else {<NEW_LINE>sqlerrmc = readFastLDBytes();<NEW_LINE>sqlerrmcCcsid = Typdef.targetTypdef.getCcsidSbc();<NEW_LINE>}<NEW_LINE>netSqlca.setSqlerrd(sqlerrd);<NEW_LINE>netSqlca.setSqlwarnBytes(sqlwarn);<NEW_LINE>// sqlerrmc may be null<NEW_LINE>netSqlca.setSqlerrmcBytes(sqlerrmc);<NEW_LINE>}
= Typdef.targetTypdef.getCcsidMbc();
1,588,860
public static void compact(List<TsFileResource> seqFileResources, List<TsFileResource> unseqFileResources, List<TsFileResource> targetFileResources) throws IOException, MetadataException, StorageEngineException, InterruptedException {<NEW_LINE>long queryId = QueryResourceManager.getInstance().assignCompactionQueryId();<NEW_LINE>QueryContext queryContext = new QueryContext(queryId);<NEW_LINE>QueryDataSource queryDataSource = new QueryDataSource(seqFileResources, unseqFileResources);<NEW_LINE>QueryResourceManager.getInstance().getQueryFileManager().addUsedFilesForQuery(queryId, queryDataSource);<NEW_LINE>try (AbstractCompactionWriter compactionWriter = getCompactionWriter(seqFileResources, unseqFileResources, targetFileResources)) {<NEW_LINE>// Do not close device iterator, because tsfile reader is managed by FileReaderManager.<NEW_LINE>MultiTsFileDeviceIterator deviceIterator = new MultiTsFileDeviceIterator(seqFileResources, unseqFileResources);<NEW_LINE>while (deviceIterator.hasNextDevice()) {<NEW_LINE>checkThreadInterrupted(targetFileResources);<NEW_LINE>Pair<String, Boolean> deviceInfo = deviceIterator.nextDevice();<NEW_LINE>String device = deviceInfo.left;<NEW_LINE>boolean isAligned = deviceInfo.right;<NEW_LINE>QueryUtils.fillOrderIndexes(queryDataSource, device, true);<NEW_LINE>if (isAligned) {<NEW_LINE>compactAlignedSeries(device, deviceIterator, compactionWriter, queryContext, queryDataSource);<NEW_LINE>} else {<NEW_LINE>compactNonAlignedSeries(device, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>compactionWriter.endFile();<NEW_LINE>updatePlanIndexes(targetFileResources, seqFileResources, unseqFileResources);<NEW_LINE>} finally {<NEW_LINE>QueryResourceManager.getInstance().endQuery(queryId);<NEW_LINE>}<NEW_LINE>}
deviceIterator, compactionWriter, queryContext, queryDataSource);
1,126,319
private Variable createVar(Function func, int frameOffset, int offset, int refSize) throws InvalidInputException {<NEW_LINE>if (dontCreateNewVariables) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StackFrame frame = func.getStackFrame();<NEW_LINE>int frameLoc = offset + frameOffset;<NEW_LINE>Variable var = frame.getVariableContaining(frameLoc);<NEW_LINE>if (var == null) {<NEW_LINE>try {<NEW_LINE>if (!doLocals && frameLoc <= 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!doParams && frameLoc > 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// only create variables at locations where a variable doesn't exist<NEW_LINE>var = frame.createVariable(null, frameLoc, Undefined.getUndefinedDataType(refSize), SourceType.ANALYSIS);<NEW_LINE>} catch (DuplicateNameException e) {<NEW_LINE>throw new AssertException(e);<NEW_LINE>}<NEW_LINE>} else if (var.getStackOffset() == frameLoc && var.getDataType().getLength() < refSize) {<NEW_LINE>// don't get rid of existing variables, just change their size bigger<NEW_LINE>DataType dt = var.getDataType();<NEW_LINE>if (dt instanceof Undefined || dt == DefaultDataType.dataType) {<NEW_LINE>var.setDataType(Undefined.getUndefinedDataType<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return var;<NEW_LINE>}
(refSize), SourceType.ANALYSIS);
796,520
public final <T> List<T> retrieveAssociatedRecords(@NonNull final Object model, @NonNull final Class<? extends IReferenceNoGenerator> generatorClazz, @NonNull final Class<T> clazz) {<NEW_LINE>final Properties ctx = getCtx(model);<NEW_LINE>final String trxName = getTrxName(model);<NEW_LINE>final I_C_ReferenceNo_Type type = retrieveRefNoTypeByClass(ctx, generatorClazz);<NEW_LINE>final List<I_C_ReferenceNo> referenceNos = retrieveReferenceNos(model, type);<NEW_LINE>final String tableName = getTableName(clazz);<NEW_LINE>final List<T> result = new ArrayList<T>();<NEW_LINE>for (final I_C_ReferenceNo referenceNo : referenceNos) {<NEW_LINE>final List<I_C_ReferenceNo_Doc> refNoDocs = retrieveRefNoDocByRefNoAndTableName(referenceNo, tableName);<NEW_LINE>for (final I_C_ReferenceNo_Doc refNoDoc : refNoDocs) {<NEW_LINE>final T referencedDoc = create(ctx, refNoDoc.<MASK><NEW_LINE>result.add(referencedDoc);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
getRecord_ID(), clazz, trxName);
294,170
private Collection<?> fromBytesLike(Frame frame, PConstructAndRaiseNode constructAndRaiseNode, ToByteArrayNode toBytes, Object cadata) throws KeyStoreException, IOException, NoSuchAlgorithmException {<NEW_LINE>byte[] bytes = toBytes.execute(((PBytesLike) cadata).getSequenceStorage());<NEW_LINE>try {<NEW_LINE>return CertUtils.generateCertificates(bytes);<NEW_LINE>} catch (CertificateException ex) {<NEW_LINE>String msg = ex.getMessage();<NEW_LINE>if (msg != null) {<NEW_LINE>if (msg.contains("No certificate data found")) {<NEW_LINE>throw constructAndRaiseNode.raiseSSLError(frame, SSLErrorCode.ERROR_NOT_ENOUGH_DATA, ErrorMessages.NOT_ENOUGH_DATA);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>msg = "error while reading cadata";<NEW_LINE>}<NEW_LINE>throw constructAndRaiseNode.raiseSSLError(<MASK><NEW_LINE>}<NEW_LINE>}
frame, SSLErrorCode.ERROR_SSL, msg);
1,360,341
public Put toStore(Property<?> prop) {<NEW_LINE>Put put = new Put(Bytes.toBytes<MASK><NEW_LINE>// uid<NEW_LINE>byte[] propName = Bytes.toBytes(prop.getName());<NEW_LINE>put.addColumn(B_FEATURES_CF_PROPERTIES, B_COL_PROPERTY_ID, propName);<NEW_LINE>// type<NEW_LINE>byte[] mytype = (prop.getType() == null) ? null : Bytes.toBytes(prop.getType());<NEW_LINE>put.addColumn(B_FEATURES_CF_PROPERTIES, B_COL_PROPERTY_CLAZZ, mytype);<NEW_LINE>// value<NEW_LINE>byte[] pValue = (prop.asString() == null) ? null : Bytes.toBytes(prop.asString());<NEW_LINE>put.addColumn(B_FEATURES_CF_PROPERTIES, B_COL_PROPERTY_VALUE, pValue);<NEW_LINE>// description<NEW_LINE>byte[] desc = (prop.getDescription() == null) ? null : Bytes.toBytes(prop.getDescription());<NEW_LINE>put.addColumn(B_FEATURES_CF_PROPERTIES, B_COL_PROPERTY_DESCRIPTION, desc);<NEW_LINE>// fixedValue<NEW_LINE>Set<String> fixedValueAsString = new HashSet<>();<NEW_LINE>if (prop.getFixedValues() != null) {<NEW_LINE>for (Object o : prop.getFixedValues()) {<NEW_LINE>fixedValueAsString.add(o.toString());<NEW_LINE>}<NEW_LINE>byte[] pFixedValue = Bytes.toBytes(JsonUtils.permissionsAsJson(fixedValueAsString));<NEW_LINE>put.addColumn(B_FEATURES_CF_PROPERTIES, B_COL_PROPERTY_FIXED, pFixedValue);<NEW_LINE>}<NEW_LINE>return put;<NEW_LINE>}
(prop.getName()));
1,119,171
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>ArrayList<String> availableLanguages = new ArrayList<String>();<NEW_LINE>ArrayList<String> unavailableLanguages = new ArrayList<String>();<NEW_LINE>boolean haveBaseResources = hasBaseResources(this);<NEW_LINE>if (!haveBaseResources || canUpgradeResources(this)) {<NEW_LINE>if (!haveBaseResources) {<NEW_LINE>unavailableLanguages.add(<MASK><NEW_LINE>}<NEW_LINE>returnResults(Engine.CHECK_VOICE_DATA_FAIL, availableLanguages, unavailableLanguages);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final SpeechSynthesis engine = new SpeechSynthesis(this, mSynthReadyCallback);<NEW_LINE>final List<Voice> voices = engine.getAvailableVoices();<NEW_LINE>for (Voice voice : voices) {<NEW_LINE>availableLanguages.add(voice.toString());<NEW_LINE>}<NEW_LINE>returnResults(Engine.CHECK_VOICE_DATA_PASS, availableLanguages, unavailableLanguages);<NEW_LINE>}
Locale.ENGLISH.toString());
36,711
public View onCreateDemoView(LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {<NEW_LINE>View view = layoutInflater.inflate(R.layout.cat_navigation_rail_fragment, viewGroup, false);<NEW_LINE>initNavigationRail(getContext(), view);<NEW_LINE>initNavigationRailDemoControls(view);<NEW_LINE>OnItemSelectedListener navigationItemListener = item -> {<NEW_LINE>handleAllNavigationRailSelections(item.getItemId());<NEW_LINE>TextView page1Text = view.findViewById(R.id.page_1);<NEW_LINE>TextView page2Text = view.<MASK><NEW_LINE>TextView page3Text = view.findViewById(R.id.page_3);<NEW_LINE>TextView page4Text = view.findViewById(R.id.page_4);<NEW_LINE>TextView page5Text = view.findViewById(R.id.page_5);<NEW_LINE>TextView page6Text = view.findViewById(R.id.page_6);<NEW_LINE>TextView page7Text = view.findViewById(R.id.page_7);<NEW_LINE>int itemId = item.getItemId();<NEW_LINE>page1Text.setVisibility(itemId == R.id.action_page_1 ? View.VISIBLE : View.GONE);<NEW_LINE>page2Text.setVisibility(itemId == R.id.action_page_2 ? View.VISIBLE : View.GONE);<NEW_LINE>page3Text.setVisibility(itemId == R.id.action_page_3 ? View.VISIBLE : View.GONE);<NEW_LINE>page4Text.setVisibility(itemId == R.id.action_page_4 ? View.VISIBLE : View.GONE);<NEW_LINE>page5Text.setVisibility(itemId == R.id.action_page_5 ? View.VISIBLE : View.GONE);<NEW_LINE>page6Text.setVisibility(itemId == R.id.action_page_6 ? View.VISIBLE : View.GONE);<NEW_LINE>page7Text.setVisibility(itemId == R.id.action_page_7 ? View.VISIBLE : View.GONE);<NEW_LINE>clearAndHideBadge(item.getItemId());<NEW_LINE>return false;<NEW_LINE>};<NEW_LINE>setNavigationRailListeners(navigationItemListener);<NEW_LINE>if (bundle == null) {<NEW_LINE>setupBadging();<NEW_LINE>}<NEW_LINE>return view;<NEW_LINE>}
findViewById(R.id.page_2);
1,494,554
public static DorisSink buildDorisSink(String table) {<NEW_LINE>DorisSink.Builder<String> builder = DorisSink.builder();<NEW_LINE>DorisOptions.Builder dorisBuilder = DorisOptions.builder();<NEW_LINE>dorisBuilder.setFenodes(HOST + ":" + DORIS_PORT).setTableIdentifier(TARGET_DORIS_DB + "." + table).setUsername("root").setPassword("");<NEW_LINE>Properties pro = new Properties();<NEW_LINE>// json data format<NEW_LINE>pro.setProperty("format", "json");<NEW_LINE>pro.setProperty("read_json_by_line", "true");<NEW_LINE>DorisExecutionOptions executionOptions = // streamload label prefix,<NEW_LINE>DorisExecutionOptions.builder().// streamload label prefix,<NEW_LINE>setLabelPrefix("label-" + table + UUID.randomUUID()).<MASK><NEW_LINE>// serialize according to string<NEW_LINE>builder.setDorisReadOptions(DorisReadOptions.builder().build()).setDorisExecutionOptions(executionOptions).// serialize according to string<NEW_LINE>setSerializer(new SimpleStringSerializer()).setDorisOptions(dorisBuilder.build());<NEW_LINE>return builder.build();<NEW_LINE>}
setStreamLoadProp(pro).build();
1,554,879
private void apply() {<NEW_LINE>this._trace = getBoolean("_trace", false);<NEW_LINE>this.net_collector_ip_port_id_pws = getValue("net_collector_ip_port_id_pws", "127.0.0.1:6100:admin:admin");<NEW_LINE>this.net_webapp_tcp_client_pool_size = getInt("net_webapp_tcp_client_pool_size", 100);<NEW_LINE>this.net_webapp_tcp_client_pool_timeout = getInt("net_webapp_tcp_client_pool_timeout", 15000);<NEW_LINE>this.net_http_api_auth_ip_enabled = getBoolean("net_http_api_auth_ip_enabled", false);<NEW_LINE>this.net_http_api_auth_ip_header_key = getValue("net_http_api_auth_ip_header_key", "");<NEW_LINE>this.net_http_api_auth_session_enabled = getBoolean("net_http_api_auth_session_enabled", false);<NEW_LINE>this.net_http_api_session_timeout = getInt("net_http_api_session_timeout", 3600 * 24);<NEW_LINE>this.net_http_api_auth_bearer_token_enabled = getBoolean("net_http_api_auth_bearer_token_enabled", false);<NEW_LINE>this.net_http_api_gzip_enabled = getBoolean("net_http_api_gzip_enabled", true);<NEW_LINE>this.net_http_api_allow_ips = getValue("net_http_api_allow_ips", "localhost,127.0.0.1,0:0:0:0:0:0:0:1,::1");<NEW_LINE>this.allowIpExact = Stream.of(net_http_api_allow_ips.split(",")).<MASK><NEW_LINE>if (allowIpExact.size() > 0) {<NEW_LINE>this.allowIpMatch = this.allowIpExact.stream().filter(v -> v.contains("*")).map(StrMatch::new).collect(Collectors.toList());<NEW_LINE>} else {<NEW_LINE>this.allowIpMatch = Collections.emptyList();<NEW_LINE>}<NEW_LINE>this.net_http_port = getInt("net_http_port", NetConstants.WEBAPP_HTTP_PORT);<NEW_LINE>this.net_http_extweb_dir = getValue("net_http_extweb_dir", "./extweb");<NEW_LINE>this.net_http_api_swagger_enabled = getBoolean("net_http_api_swagger_enabled", false);<NEW_LINE>this.net_http_api_swagger_host_ip = getValue("net_http_api_swagger_host_ip", "");<NEW_LINE>this.net_http_api_cors_allow_origin = getValue("net_http_api_cors_allow_origin", "*");<NEW_LINE>this.net_http_api_cors_allow_credentials = getValue("net_http_api_cors_allow_credentials", "true");<NEW_LINE>this.log_dir = getValue("log_dir", "./logs");<NEW_LINE>this.log_keep_days = getInt("log_keep_days", 30);<NEW_LINE>this.temp_dir = getValue("temp_dir", "./tempdata");<NEW_LINE>}
collect(Collectors.toSet());
1,325,433
final UpdateMissionProfileResult executeUpdateMissionProfile(UpdateMissionProfileRequest updateMissionProfileRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateMissionProfileRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateMissionProfileRequest> request = null;<NEW_LINE>Response<UpdateMissionProfileResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateMissionProfileRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateMissionProfileRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "GroundStation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateMissionProfile");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateMissionProfileResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateMissionProfileResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
376,633
protected void paintContent(@NotNull final Graphics2D g2d, @NotNull final C c, @NotNull final D d, @NotNull final Rectangle bounds) {<NEW_LINE>// Ensure that text painting is allowed<NEW_LINE>if (!isEmpty(c, d)) {<NEW_LINE>// Applying graphics settings<NEW_LINE>final Font oldFont = GraphicsUtils.setupFont(g2d, getFont(c, d));<NEW_LINE>// Installing text antialias settings<NEW_LINE>final TextRasterization rasterization = getRasterization(c, d);<NEW_LINE>final Map oldHints = SwingUtils.setupTextAntialias(g2d, rasterization);<NEW_LINE>// Paint color<NEW_LINE>final Paint op = GraphicsUtils.setupPaint(g2d, getColor(c, d));<NEW_LINE>// Painting either HTML or plain text<NEW_LINE>if (isHtmlText(c, d)) {<NEW_LINE>paintHtml(g2d, c, d, bounds);<NEW_LINE>} else {<NEW_LINE>final int shadowWidth = isShadow(c, d) ? getShadowSize(c, d) : 0;<NEW_LINE>bounds.x += shadowWidth;<NEW_LINE>bounds.width -= shadowWidth * 2;<NEW_LINE>paintText(g2d, c, d, bounds);<NEW_LINE>}<NEW_LINE>// Restoring paint color<NEW_LINE><MASK><NEW_LINE>// Restoring text antialias settings<NEW_LINE>SwingUtils.restoreTextAntialias(g2d, oldHints);<NEW_LINE>// Restoring graphics settings<NEW_LINE>GraphicsUtils.restoreFont(g2d, oldFont);<NEW_LINE>}<NEW_LINE>}
GraphicsUtils.restorePaint(g2d, op);
916,026
public void onPostExecute(Throwable p1) {<NEW_LINE>mActivity.mPlayButton.setText("Play");<NEW_LINE>mActivity.mPlayButton.setEnabled(true);<NEW_LINE>mActivity.mLaunchProgress.setMax(100);<NEW_LINE>mActivity.mLaunchProgress.setProgress(0);<NEW_LINE>mActivity.statusIsLaunching(false);<NEW_LINE>if (p1 != null && !(p1 instanceof SilentException)) {<NEW_LINE>p1.printStackTrace();<NEW_LINE>Tools.showError(mActivity, p1);<NEW_LINE>}<NEW_LINE>if (!launchWithError) {<NEW_LINE>// mActivity.mCrashView.setLastCrash("");<NEW_LINE>try {<NEW_LINE>Intent mainIntent = new Intent(mActivity, MainActivity.class);<NEW_LINE>// mainIntent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);<NEW_LINE>mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);<NEW_LINE><MASK><NEW_LINE>mActivity.startActivity(mainIntent);<NEW_LINE>mActivity.finish();<NEW_LINE>Log.i("ActCheck", "mainActivity finishing=" + mActivity.isFinishing() + ", destroyed=" + mActivity.isDestroyed());<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Tools.showError(mActivity, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>mActivity.mTask = null;<NEW_LINE>}
mainIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
1,515,323
private static Unbinder parseBindColor(Object target, Field field, View source) {<NEW_LINE>BindColor bindColor = field.getAnnotation(BindColor.class);<NEW_LINE>if (bindColor == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>validateMember(field);<NEW_LINE>int id = bindColor.value();<NEW_LINE>Context context = source.getContext();<NEW_LINE>Object value;<NEW_LINE>Class<?> fieldType = field.getType();<NEW_LINE>if (fieldType == int.class) {<NEW_LINE>value = ContextCompat.getColor(context, id);<NEW_LINE>} else if (fieldType == ColorStateList.class) {<NEW_LINE>value = ContextCompat.getColorStateList(context, id);<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException("@BindColor field type must be 'int' or 'ColorStateList'. (" + field.getDeclaringClass().getName() + '.' + <MASK><NEW_LINE>}<NEW_LINE>trySet(field, target, value);<NEW_LINE>return Unbinder.EMPTY;<NEW_LINE>}
field.getName() + ')');
1,011,334
public RowMap deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {<NEW_LINE>ObjectNode node = jsonParser.getCodec().readTree(jsonParser);<NEW_LINE>JsonNode encrypted = node.get("encrypted");<NEW_LINE>if (encrypted != null) {<NEW_LINE>String iv = encrypted.get("iv").textValue();<NEW_LINE>String bytes = encrypted.get("bytes").textValue();<NEW_LINE>String decryptedData;<NEW_LINE>try {<NEW_LINE>decryptedData = RowEncrypt.decrypt(bytes, this.secret_key, iv);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IOException(e);<NEW_LINE>}<NEW_LINE>JsonNode decrypted = mapper.readTree(decryptedData);<NEW_LINE>if (!(decrypted instanceof ObjectNode)) {<NEW_LINE>throw new ParseException("`encrypted` must be an object after decrypting.");<NEW_LINE>}<NEW_LINE>node.setAll((ObjectNode) decrypted);<NEW_LINE>}<NEW_LINE>JsonNode type = node.get("type");<NEW_LINE>if (type == null) {<NEW_LINE>throw new ParseException("`type` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode database = node.get("database");<NEW_LINE>if (database == null) {<NEW_LINE>throw new ParseException("`database` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode table = node.get("table");<NEW_LINE>if (table == null) {<NEW_LINE>throw new ParseException("`table` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode ts = node.get("ts");<NEW_LINE>if (ts == null) {<NEW_LINE>throw new ParseException("`ts` is required and cannot be null.");<NEW_LINE>}<NEW_LINE>JsonNode xid = node.get("xid");<NEW_LINE>JsonNode commit = node.get("commit");<NEW_LINE>JsonNode data = node.get("data");<NEW_LINE>JsonNode oldData = node.get("old");<NEW_LINE>JsonNode comment = node.get("comment");<NEW_LINE>RowMap rowMap = new RowMap(type.asText(), database.asText(), table.asText(), ts.asLong() * 1000, new ArrayList<String>(), null);<NEW_LINE>if (xid != null) {<NEW_LINE>rowMap.setXid(xid.asLong());<NEW_LINE>}<NEW_LINE>if (commit != null && commit.asBoolean()) {<NEW_LINE>rowMap.setTXCommit();<NEW_LINE>}<NEW_LINE>if (data == null) {<NEW_LINE>throw new ParseException("`data` is required and cannot be null.");<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (oldData != null) {<NEW_LINE>readDataInto(rowMap, oldData, true);<NEW_LINE>}<NEW_LINE>if (comment != null) {<NEW_LINE>rowMap.setComment(comment.asText());<NEW_LINE>}<NEW_LINE>return rowMap;<NEW_LINE>}
readDataInto(rowMap, data, false);
109,482
public void writeBinMultiDataPoint(MetricData metricData) throws MetricProxyException {<NEW_LINE>MetricsAggregator aggregator = MapUtils.getOrCreate(aggregators, metricData.getMetricType(), new ObjectFactory<MetricsAggregator>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public MetricsAggregator create() {<NEW_LINE>return createAggregator(metricData);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>List<String> tagVals = Lists.newArrayList(FoundationService.DEFAULT.getDataCenter(), metricData.getDcName(), metricData.getClusterName(), metricData.getShardName());<NEW_LINE>if (null != metricData.getHostPort()) {<NEW_LINE>tagVals.add(metricData.getHostPort().getHost());<NEW_LINE>tagVals.add(String.valueOf(metricData.getHostPort().getPort()));<NEW_LINE>}<NEW_LINE>Map<String, String<MASK><NEW_LINE>if (metricDataTags != null && !metricDataTags.isEmpty()) {<NEW_LINE>for (String tag : aggregator.getTags()) {<NEW_LINE>if (metricDataTags.containsKey(tag)) {<NEW_LINE>tagVals.add(metricDataTags.get(tag));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>aggregator.add((long) metricData.getValue(), tagVals.toArray(new String[0]));<NEW_LINE>}
> metricDataTags = metricData.getTags();
1,310,767
public static double areaTermBoth(double x0, double y0, double x1, double y1) {<NEW_LINE>double dx = x1 - x0;<NEW_LINE>double dy = y1 - y0;<NEW_LINE>double len = Math.sqrt(dx * dx + dy * dy);<NEW_LINE>double u0x = dx / len;<NEW_LINE>double u0y = dy / len;<NEW_LINE>// normal vector pointing to R of unit<NEW_LINE>double n0x = u0y;<NEW_LINE>double n0y = -u0x;<NEW_LINE>double u1x = -u0x;<NEW_LINE>double u1y = -u0y;<NEW_LINE>// normal vector pointing to L of back unit vector<NEW_LINE>double n1x = -u1y;<NEW_LINE>double n1y = u1x;<NEW_LINE>double areaTerm0 = 0.5 * (x0 * u0x + y0 * u0y) * (x0 * n0x + y0 * n0y);<NEW_LINE>double areaTerm1 = 0.5 * (x1 * u1x + y1 * u1y) * (<MASK><NEW_LINE>return areaTerm0 + areaTerm1;<NEW_LINE>}
x1 * n1x + y1 * n1y);
199,902
public void dataWritten(long offset, long length, Object originator) {<NEW_LINE>if (TRACE) {<NEW_LINE>System.out.println("data written:" + offset + "/" + length);<NEW_LINE>}<NEW_LINE>dataEntry entry = new dataEntry(offset, length);<NEW_LINE>synchronized (data_written) {<NEW_LINE>data_written.add(entry);<NEW_LINE>compact_delay--;<NEW_LINE>if (compact_delay == 0) {<NEW_LINE>compact_delay = COMPACT_DELAY;<NEW_LINE>Iterator<dataEntry> it = data_written.iterator();<NEW_LINE>dataEntry prev_e = null;<NEW_LINE>while (it.hasNext()) {<NEW_LINE>dataEntry this_e = it.next();<NEW_LINE>if (prev_e == null) {<NEW_LINE>prev_e = this_e;<NEW_LINE>} else {<NEW_LINE>long prev_offset = prev_e.getOffset();<NEW_LINE><MASK><NEW_LINE>long this_offset = this_e.getOffset();<NEW_LINE>long this_length = this_e.getLength();<NEW_LINE>if (this_offset <= prev_offset + prev_length) {<NEW_LINE>if (TRACE) {<NEW_LINE>System.out.println("merging: " + prev_e.getString() + "/" + this_e.getString());<NEW_LINE>}<NEW_LINE>it.remove();<NEW_LINE>prev_e.setLength(Math.max(prev_offset + prev_length, this_offset + this_length) - prev_offset);<NEW_LINE>if (TRACE) {<NEW_LINE>System.out.println(" -> " + prev_e.getString());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>prev_e = this_e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < waiters.size(); i++) {<NEW_LINE>waiters.get(i).release();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
long prev_length = prev_e.getLength();
1,711,936
public Node leaveVarNode(VarNode varNode) {<NEW_LINE>Expression init = varNode.getInit();<NEW_LINE>// assignment is right associative, so we end up visiting the value before the name. We have to invert the<NEW_LINE>// children<NEW_LINE>if (!isDefaultNamedFunctionExport(varNode) && !varNode.isFunctionDeclaration() && !(init instanceof ClassNode)) {<NEW_LINE>// Invert the two children of the declaration!<NEW_LINE>IParseNode node = getCurrentNode();<NEW_LINE>if (node.getChildCount() > 1) {<NEW_LINE>IParseNode value = node.getChild(0);<NEW_LINE>IParseNode name = node.getChild(1);<NEW_LINE>((JSNode) node).setChildren(new IParseNode<MASK><NEW_LINE>} else {<NEW_LINE>// If we only have name, add an empty node for value<NEW_LINE>node.addChild(new JSEmptyNode(node.getEndingOffset()));<NEW_LINE>}<NEW_LINE>// decl node<NEW_LINE>JSDeclarationNode declNode = (JSDeclarationNode) popNode();<NEW_LINE>// var node<NEW_LINE>popNode();<NEW_LINE>IdentNode nameNode = varNode.getName();<NEW_LINE>ExportedStatus exportStatus = getExportStatus(nameNode);<NEW_LINE>if (exportStatus.isExported) {<NEW_LINE>// export node<NEW_LINE>JSExportNode exportNode = (JSExportNode) popNode();<NEW_LINE>// Handle when we're exporting default function!<NEW_LINE>if (init instanceof FunctionNode && Module.DEFAULT_EXPORT_BINDING_NAME.equals(nameNode.getName())) {<NEW_LINE>// hoist the function up to be child of export itself<NEW_LINE>JSFunctionNode funcNode = (JSFunctionNode) declNode.getValue();<NEW_LINE>exportNode.setChildren(new IParseNode[] { funcNode });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (init instanceof ClassNode) {<NEW_LINE>// Swap order of body and name<NEW_LINE>// FIXME What if no name?!<NEW_LINE>IParseNode node = getCurrentNode();<NEW_LINE>// optional first child is superclass/heritage<NEW_LINE>int childCount = node.getChildCount();<NEW_LINE>// second-last child should be class body<NEW_LINE>IParseNode body = node.getChild(childCount - 2);<NEW_LINE>// last child should be the class name<NEW_LINE>IParseNode name = node.getChild(childCount - 1);<NEW_LINE>if (childCount == 2) {<NEW_LINE>((JSNode) node).setChildren(new IParseNode[] { name, body });<NEW_LINE>} else {<NEW_LINE>IParseNode heritage = node.getFirstChild();<NEW_LINE>((JSNode) node).setChildren(new IParseNode[] { name, heritage, body });<NEW_LINE>}<NEW_LINE>// class node<NEW_LINE>popNode();<NEW_LINE>}<NEW_LINE>return super.leaveVarNode(varNode);<NEW_LINE>}
[] { name, value });
1,779,763
protected List<IntervalsSource> analyzeGraph(TokenStream source) throws IOException {<NEW_LINE>source.reset();<NEW_LINE>GraphTokenStreamFiniteStrings graph = new GraphTokenStreamFiniteStrings(source);<NEW_LINE>List<IntervalsSource> clauses = new ArrayList<>();<NEW_LINE>int[] articulationPoints = graph.articulationPoints();<NEW_LINE>int lastState = 0;<NEW_LINE>int maxClauseCount = BooleanQuery.getMaxClauseCount();<NEW_LINE>for (int i = 0; i <= articulationPoints.length; i++) {<NEW_LINE>int start = lastState;<NEW_LINE>int end = -1;<NEW_LINE>if (i < articulationPoints.length) {<NEW_LINE>end = articulationPoints[i];<NEW_LINE>}<NEW_LINE>lastState = end;<NEW_LINE>if (graph.hasSidePath(start)) {<NEW_LINE>List<IntervalsSource> paths = new ArrayList<>();<NEW_LINE>Iterator<TokenStream> it = graph.getFiniteStrings(start, end);<NEW_LINE>while (it.hasNext()) {<NEW_LINE>TokenStream ts = it.next();<NEW_LINE>IntervalsSource phrase = combineSources(analyzeTerms(ts), 0, IntervalMode.ORDERED);<NEW_LINE>if (paths.size() >= maxClauseCount) {<NEW_LINE>throw new BooleanQuery.TooManyClauses();<NEW_LINE>}<NEW_LINE>paths.add(phrase);<NEW_LINE>}<NEW_LINE>if (paths.size() > 0) {<NEW_LINE>clauses.add(Intervals.or(paths.toArray(new IntervalsSource[0])));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Iterator<TokenStream> it = graph.getFiniteStrings(start, end);<NEW_LINE>TokenStream ts = it.next();<NEW_LINE>clauses<MASK><NEW_LINE>assert it.hasNext() == false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return clauses;<NEW_LINE>}
.addAll(analyzeTerms(ts));
744,663
public OUser authenticate(ODatabaseSession session, final String username, final String password) {<NEW_LINE>if (delegate == null)<NEW_LINE>throw new OSecurityAccessException("OSymmetricKeySecurity.authenticate() Delegate is null for username: " + username);<NEW_LINE>if (session == null)<NEW_LINE>throw new OSecurityAccessException("OSymmetricKeySecurity.authenticate() Database is null for username: " + username);<NEW_LINE>final String dbName = session.getName();<NEW_LINE>OUser user = <MASK><NEW_LINE>if (user == null)<NEW_LINE>throw new OSecurityAccessException(dbName, "OSymmetricKeySecurity.authenticate() Username or Key is invalid for username: " + username);<NEW_LINE>if (user.getAccountStatus() != OSecurityUser.STATUSES.ACTIVE)<NEW_LINE>throw new OSecurityAccessException(dbName, "OSymmetricKeySecurity.authenticate() User '" + username + "' is not active");<NEW_LINE>try {<NEW_LINE>OUserSymmetricKeyConfig userConfig = new OUserSymmetricKeyConfig(user.getDocument());<NEW_LINE>OSymmetricKey sk = OSymmetricKey.fromConfig(userConfig);<NEW_LINE>String decryptedUsername = sk.decryptAsString(password);<NEW_LINE>if (OSecurityManager.checkPassword(username, decryptedUsername))<NEW_LINE>return user;<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw OException.wrapException(new OSecurityAccessException(dbName, "OSymmetricKeySecurity.authenticate() Exception for session: " + dbName + ", username: " + username + " " + ex.getMessage()), ex);<NEW_LINE>}<NEW_LINE>throw new OSecurityAccessException(dbName, "OSymmetricKeySecurity.authenticate() Username or Key is invalid for session: " + dbName + ", username: " + username);<NEW_LINE>}
delegate.getUser(session, username);
1,735,786
public IQueueActionResult removeFromPickingSlotQueue(final de.metas.picking.model.I_M_PickingSlot pickingSlot, final I_M_HU hu) {<NEW_LINE>Check.assumeNotNull(pickingSlot, "pickingSlot not null");<NEW_LINE>Check.assumeNotNull(hu, "hu not null");<NEW_LINE>final I_M_PickingSlot pickingSlotExt = InterfaceWrapperHelper.<MASK><NEW_LINE>//<NEW_LINE>// Check if HU is the current active from picking slot<NEW_LINE>if (isCurrentHU(pickingSlotExt, hu)) {<NEW_LINE>// NOTE: don't add to picking slot queue because we would delete it from queue anyway (check below)<NEW_LINE>final boolean addToQueue = false;<NEW_LINE>closeCurrentHU(pickingSlotExt, addToQueue);<NEW_LINE>}<NEW_LINE>final IHUPickingSlotDAO pickingSlotDAO = Services.get(IHUPickingSlotDAO.class);<NEW_LINE>//<NEW_LINE>// Check if our handling unit is in a picking slot queue<NEW_LINE>final I_M_PickingSlot_HU pickingSlotHU = pickingSlotDAO.retrievePickingSlotHU(pickingSlotExt, hu);<NEW_LINE>if (pickingSlotHU != null) {<NEW_LINE>InterfaceWrapperHelper.delete(pickingSlotHU);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// 06178 release picking slot when removing PickingSlot-HU association as long,<NEW_LINE>// BUT ONLY as long as the picking slot is not in use on the other end<NEW_LINE>if (pickingSlotExt.getM_HU() == null) {<NEW_LINE>releasePickingSlotIfPossible(pickingSlotExt);<NEW_LINE>}<NEW_LINE>final I_M_PickingSlot_Trx createPickingSlotTrx = createPickingSlotTrx(pickingSlot, hu, X_M_PickingSlot_Trx.ACTION_Remove_HU_From_Queue);<NEW_LINE>return new QueueActionResult(createPickingSlotTrx, pickingSlotHU);<NEW_LINE>}
create(pickingSlot, I_M_PickingSlot.class);
1,677,088
Properties smtpDataToProperties(Customer customer, SmtpData smtpData) {<NEW_LINE>Properties props = new Properties();<NEW_LINE>try {<NEW_LINE>Config runtimeConfig = configFactory.forCustomer(customer);<NEW_LINE>// According to official Java documentation all the parameters should be added<NEW_LINE>// as String.<NEW_LINE>if (smtpData.smtpUsername != null) {<NEW_LINE>props.put("mail.smtp.auth", "true");<NEW_LINE>props.put("mail.smtp.user", smtpData.smtpUsername);<NEW_LINE>} else {<NEW_LINE>props.put("mail.smtp.auth", "false");<NEW_LINE>}<NEW_LINE>props.put("mail.smtp.starttls.enable", String.valueOf(smtpData.useTLS));<NEW_LINE>String smtpServer = StringUtils.isEmpty(smtpData.smtpServer) ? runtimeConfig.getString("yb.health.default_smtp_server") : smtpData.smtpServer;<NEW_LINE>props.put("mail.smtp.host", smtpServer);<NEW_LINE>props.put("mail.smtp.port", String.valueOf(smtpData.smtpPort == -1 ? (smtpData.useSSL ? runtimeConfig.getInt("yb.health.default_smtp_port_ssl") : runtimeConfig.getInt("yb.health.default_smtp_port")) : smtpData.smtpPort));<NEW_LINE>props.put("mail.smtp.ssl.enable", String.valueOf(smtpData.useSSL));<NEW_LINE>if (smtpData.useSSL) {<NEW_LINE>props.put("mail.smtp.ssl.trust", smtpServer);<NEW_LINE>}<NEW_LINE>boolean isDebugMode = runtimeConfig.getBoolean("yb.health.debug_email");<NEW_LINE>if (isDebugMode) {<NEW_LINE>props.put("mail.debug", "true");<NEW_LINE>}<NEW_LINE>// Adding timeout settings.<NEW_LINE>String connectionTimeout = String.valueOf(runtimeConfig.getInt("yb.health.smtp_connection_timeout_ms"));<NEW_LINE>props.put(smtpData.useSSL ? "mail.smtps.connectiontimeout" : "mail.smtp.connectiontimeout", connectionTimeout);<NEW_LINE>String timeout = String.valueOf<MASK><NEW_LINE>props.put(smtpData.useSSL ? "mail.smtps.timeout" : "mail.smtp.timeout", timeout);<NEW_LINE>if (isDebugMode) {<NEW_LINE>LOG.info("SMTP connection timeout: " + connectionTimeout);<NEW_LINE>LOG.info("SMTP timeout: " + timeout);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Error while converting smtpData to Properties", e);<NEW_LINE>throw new IllegalArgumentException("SmtpData is not correctly filled.", e);<NEW_LINE>}<NEW_LINE>if (StringUtils.isEmpty(smtpData.emailFrom)) {<NEW_LINE>throw new IllegalArgumentException("SmtpData is not correctly filled: emailFrom can't be empty.");<NEW_LINE>}<NEW_LINE>return props;<NEW_LINE>}
(runtimeConfig.getInt("yb.health.smtp_timeout_ms"));
351,520
private int emitLocalsAtAddress(int curLocalIdx) throws IOException {<NEW_LINE><MASK><NEW_LINE>// TODO: Don't emit ends implied by starts.<NEW_LINE>while ((curLocalIdx < sz) && (locals.get(curLocalIdx).getAddress() == address)) {<NEW_LINE>LocalList.Entry entry = locals.get(curLocalIdx++);<NEW_LINE>int reg = entry.getRegister();<NEW_LINE>LocalList.Entry prevEntry = lastEntryForReg[reg];<NEW_LINE>if (entry == prevEntry) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// At this point we have a new entry one way or another.<NEW_LINE>lastEntryForReg[reg] = entry;<NEW_LINE>if (entry.isStart()) {<NEW_LINE>if ((prevEntry != null) && entry.matches(prevEntry)) {<NEW_LINE>if (prevEntry.isStart()) {<NEW_LINE>throw new RuntimeException("shouldn't happen");<NEW_LINE>}<NEW_LINE>emitLocalRestart(entry);<NEW_LINE>} else {<NEW_LINE>emitLocalStart(entry);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (entry.getDisposition() != LocalList.Disposition.END_REPLACED) {<NEW_LINE>emitLocalEnd(entry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return curLocalIdx;<NEW_LINE>}
int sz = locals.size();
614,707
private synchronized void handleNewFactories(Collection<RSocketSupplier> newFactories) {<NEW_LINE>Set<RSocketSupplier> current = new HashSet<>(factoryPool.size() + leasedSuppliers.size());<NEW_LINE>current.addAll(factoryPool);<NEW_LINE>current.addAll(leasedSuppliers);<NEW_LINE>Set<RSocketSupplier> removed = new HashSet<>(current);<NEW_LINE>removed.removeAll(newFactories);<NEW_LINE>Set<RSocketSupplier> added = new HashSet<>(newFactories);<NEW_LINE>added.removeAll(current);<NEW_LINE>boolean changed = false;<NEW_LINE>Iterator<RSocketSupplier> it0 = leasedSuppliers.iterator();<NEW_LINE>while (it0.hasNext()) {<NEW_LINE>RSocketSupplier supplier = it0.next();<NEW_LINE>if (removed.contains(supplier)) {<NEW_LINE>it0.remove();<NEW_LINE>try {<NEW_LINE>changed = true;<NEW_LINE>supplier.dispose();<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.warn("Exception while closing a RSocket", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Iterator<RSocketSupplier> it1 = factoryPool.iterator();<NEW_LINE>while (it1.hasNext()) {<NEW_LINE>RSocketSupplier supplier = it1.next();<NEW_LINE>if (removed.contains(supplier)) {<NEW_LINE>it1.remove();<NEW_LINE>try {<NEW_LINE>changed = true;<NEW_LINE>supplier.dispose();<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.warn("Exception while closing a RSocket", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>factoryPool.addAll(added);<NEW_LINE>if (!added.isEmpty()) {<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>if (changed && logger.isDebugEnabled()) {<NEW_LINE>StringBuilder msgBuilder = new StringBuilder();<NEW_LINE>msgBuilder.append("\nUpdated active factories (size: ").append(factoryPool.size()).append(")\n");<NEW_LINE>for (RSocketSupplier f : factoryPool) {<NEW_LINE>msgBuilder.append(" + ").append(f).append('\n');<NEW_LINE>}<NEW_LINE>msgBuilder.append("Active sockets:\n");<NEW_LINE>for (RSocketSupplier socket : leasedSuppliers) {<NEW_LINE>msgBuilder.append(" + ").append(socket).append('\n');<NEW_LINE>}<NEW_LINE>logger.<MASK><NEW_LINE>}<NEW_LINE>}
debug(msgBuilder.toString());
324,803
public void updateChunks() {<NEW_LINE>while (renderDispatcher.runTasksSync(0)) {<NEW_LINE>((WorldRendererAccessor) hooked).setDisplayListEntitiesDirty(true);<NEW_LINE>}<NEW_LINE>// #if MC>=10904<NEW_LINE>PriorityBlockingQueue<ChunkRenderTask> queueChunkUpdates;<NEW_LINE>// #else<NEW_LINE>// $$ BlockingQueue<ChunkCompileTaskGenerator> queueChunkUpdates;<NEW_LINE>// #endif<NEW_LINE>queueChunkUpdates = ((ChunkRenderDispatcherAccessor) renderDispatcher).getQueueChunkUpdates();<NEW_LINE>while (!queueChunkUpdates.isEmpty()) {<NEW_LINE>try {<NEW_LINE>renderWorker.doRunTask(queueChunkUpdates.poll());<NEW_LINE>} catch (InterruptedException ignored) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Iterator<ChunkRenderer> iterator = ((WorldRendererAccessor) hooked)<MASK><NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>ChunkRenderer renderchunk = iterator.next();<NEW_LINE>renderDispatcher.rebuildSync(renderchunk);<NEW_LINE>// #if MC>=10904<NEW_LINE>renderchunk.unscheduleRebuild();<NEW_LINE>// #else<NEW_LINE>// $$ renderchunk.setNeedsUpdate(false);<NEW_LINE>// #endif<NEW_LINE>iterator.remove();<NEW_LINE>}<NEW_LINE>}
.getChunksToUpdate().iterator();
916,436
public AssetPropertyVariant unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>AssetPropertyVariant assetPropertyVariant = new AssetPropertyVariant();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("stringValue")) {<NEW_LINE>assetPropertyVariant.setStringValue(StringJsonUnmarshaller.getInstance<MASK><NEW_LINE>} else if (name.equals("integerValue")) {<NEW_LINE>assetPropertyVariant.setIntegerValue(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("doubleValue")) {<NEW_LINE>assetPropertyVariant.setDoubleValue(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("booleanValue")) {<NEW_LINE>assetPropertyVariant.setBooleanValue(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return assetPropertyVariant;<NEW_LINE>}
().unmarshall(context));
275,307
public void process(CommandProcess process) {<NEW_LINE>RowAffect affect = new RowAffect();<NEW_LINE>Instrumentation inst = process.session().getInstrumentation();<NEW_LINE>if (hashCode == null && classLoaderClass != null) {<NEW_LINE>List<ClassLoader> matchedClassLoaders = ClassLoaderUtils.getClassLoaderByClassName(inst, classLoaderClass);<NEW_LINE>if (matchedClassLoaders.size() == 1) {<NEW_LINE>hashCode = Integer.toHexString(matchedClassLoaders.get(0).hashCode());<NEW_LINE>} else if (matchedClassLoaders.size() > 1) {<NEW_LINE>Collection<ClassLoaderVO> classLoaderVOList = ClassUtils.createClassLoaderVOList(matchedClassLoaders);<NEW_LINE>GetStaticModel getStaticModel = new GetStaticModel().setClassLoaderClass(classLoaderClass).setMatchedClassLoaders(classLoaderVOList);<NEW_LINE>process.appendResult(getStaticModel);<NEW_LINE>process.end(-1, "Found more than one classloader by class name, please specify classloader with '-c <classloader hash>'");<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>process.end(-1, "Can not find classloader by class name: " + classLoaderClass + ".");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<Class<?>> matchedClasses = SearchUtils.searchClassOnly(inst, classPattern, isRegEx, hashCode);<NEW_LINE>try {<NEW_LINE>if (matchedClasses == null || matchedClasses.isEmpty()) {<NEW_LINE>process.end(-1, "No class found for: " + classPattern);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ExitStatus status = null;<NEW_LINE>if (matchedClasses.size() > 1) {<NEW_LINE>status = processMatches(process, matchedClasses);<NEW_LINE>} else {<NEW_LINE>status = processExactMatch(process, affect, inst, matchedClasses);<NEW_LINE>}<NEW_LINE>process.appendResult(new RowAffectModel(affect));<NEW_LINE>CommandUtils.end(process, status);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>logger.error("processing error", e);<NEW_LINE>process.appendResult(new RowAffectModel(affect));<NEW_LINE>process<MASK><NEW_LINE>}<NEW_LINE>}
.end(-1, "processing error");
1,159,407
public void onRender(MatrixStack matrixStack, float partialTicks) {<NEW_LINE>if (currentBlock == null)<NEW_LINE>return;<NEW_LINE>// GL settings<NEW_LINE>GL11.glEnable(GL11.GL_BLEND);<NEW_LINE>GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>GL11.glEnable(GL11.GL_LINE_SMOOTH);<NEW_LINE>GL11.glEnable(GL11.GL_CULL_FACE);<NEW_LINE>GL11.glDisable(GL11.GL_DEPTH_TEST);<NEW_LINE>matrixStack.push();<NEW_LINE>RenderUtils.applyRegionalRenderOffset(matrixStack);<NEW_LINE>BlockPos camPos = RenderUtils.getCameraBlockPos();<NEW_LINE>int regionX = (camPos.getX() >> 9) * 512;<NEW_LINE>int regionZ = (camPos.getZ() >> 9) * 512;<NEW_LINE>// set position<NEW_LINE>matrixStack.translate(currentBlock.getX() - regionX, currentBlock.getY(), <MASK><NEW_LINE>// get progress<NEW_LINE>float progress;<NEW_LINE>if (BlockUtils.getHardness(currentBlock) < 1)<NEW_LINE>progress = IMC.getInteractionManager().getCurrentBreakingProgress();<NEW_LINE>else<NEW_LINE>progress = 1;<NEW_LINE>// set size<NEW_LINE>if (progress < 1) {<NEW_LINE>matrixStack.translate(0.5, 0.5, 0.5);<NEW_LINE>matrixStack.scale(progress, progress, progress);<NEW_LINE>matrixStack.translate(-0.5, -0.5, -0.5);<NEW_LINE>}<NEW_LINE>// get color<NEW_LINE>float red = progress * 2F;<NEW_LINE>float green = 2 - red;<NEW_LINE>// draw box<NEW_LINE>RenderSystem.setShader(GameRenderer::getPositionShader);<NEW_LINE>RenderSystem.setShaderColor(red, green, 0, 0.25F);<NEW_LINE>RenderUtils.drawSolidBox(matrixStack);<NEW_LINE>RenderSystem.setShaderColor(red, green, 0, 0.5F);<NEW_LINE>RenderUtils.drawOutlinedBox(matrixStack);<NEW_LINE>matrixStack.pop();<NEW_LINE>// GL resets<NEW_LINE>RenderSystem.setShaderColor(1, 1, 1, 1);<NEW_LINE>GL11.glEnable(GL11.GL_DEPTH_TEST);<NEW_LINE>GL11.glDisable(GL11.GL_BLEND);<NEW_LINE>GL11.glDisable(GL11.GL_LINE_SMOOTH);<NEW_LINE>}
currentBlock.getZ() - regionZ);
1,802,151
public static void addTermToTarget(Urn labelUrn, Urn targetUrn, String subResource, Urn actor, EntityService entityService) throws URISyntaxException {<NEW_LINE>if (subResource == null || subResource.equals("")) {<NEW_LINE>com.linkedin.common.GlossaryTerms terms = (com.linkedin.common.GlossaryTerms) getAspectFromEntity(targetUrn.toString(), GLOSSARY_TERM_ASPECT_NAME, entityService, new GlossaryTerms());<NEW_LINE>terms.setAuditStamp(getAuditStamp(actor));<NEW_LINE>if (!terms.hasTerms()) {<NEW_LINE>terms.setTerms(new GlossaryTermAssociationArray());<NEW_LINE>}<NEW_LINE>addTermIfNotExistsToEntity(terms, labelUrn);<NEW_LINE>persistAspect(targetUrn, GLOSSARY_TERM_ASPECT_NAME, terms, actor, entityService);<NEW_LINE>} else {<NEW_LINE>com.linkedin.schema.EditableSchemaMetadata editableSchemaMetadata = (com.linkedin.schema.EditableSchemaMetadata) getAspectFromEntity(targetUrn.toString(), EDITABLE_SCHEMA_METADATA, entityService, new EditableSchemaMetadata());<NEW_LINE>EditableSchemaFieldInfo editableFieldInfo = getFieldInfoFromSchema(editableSchemaMetadata, subResource);<NEW_LINE>if (!editableFieldInfo.hasGlossaryTerms()) {<NEW_LINE>editableFieldInfo.setGlossaryTerms(new GlossaryTerms());<NEW_LINE>}<NEW_LINE>editableFieldInfo.getGlossaryTerms()<MASK><NEW_LINE>addTermIfNotExistsToEntity(editableFieldInfo.getGlossaryTerms(), labelUrn);<NEW_LINE>persistAspect(targetUrn, EDITABLE_SCHEMA_METADATA, editableSchemaMetadata, actor, entityService);<NEW_LINE>}<NEW_LINE>}
.setAuditStamp(getAuditStamp(actor));
1,608,445
private long resolveRelativeOffset(long val, DwarfDecodeContext context) throws MemoryAccessException {<NEW_LINE>Program prog = context.getProgram();<NEW_LINE><MASK><NEW_LINE>AddressSpace ram = prog.getAddressFactory().getDefaultAddressSpace();<NEW_LINE>if ((val == 0 || val == addr.getOffset()) && isIndirect) {<NEW_LINE>// if val is 0 don't dereference a null pointer<NEW_LINE>// if val is unchanged, don't enter a dereference-loop via ptrVal() below<NEW_LINE>return val;<NEW_LINE>}<NEW_LINE>switch(appMode) {<NEW_LINE>case DW_EH_PE_absptr:<NEW_LINE>// just pass this through<NEW_LINE>break;<NEW_LINE>case DW_EH_PE_aligned:<NEW_LINE>break;<NEW_LINE>case DW_EH_PE_datarel:<NEW_LINE>val = context.getEhBlock().getStart().add(val).getOffset();<NEW_LINE>break;<NEW_LINE>case DW_EH_PE_funcrel:<NEW_LINE>val = context.getFunctionEntryPoint().add(val).getOffset();<NEW_LINE>break;<NEW_LINE>case DW_EH_PE_pcrel:<NEW_LINE>val = addr.add(val).getOffset();<NEW_LINE>break;<NEW_LINE>case DW_EH_PE_texrel:<NEW_LINE>MemoryBlock txt = prog.getMemory().getBlock(".text");<NEW_LINE>val = txt.getStart().add(val).getOffset();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (isIndirect) {<NEW_LINE>Address toDeref = prog.getAddressFactory().getAddress(ram.getSpaceID(), val);<NEW_LINE>val = ptrval(prog, toDeref);<NEW_LINE>}<NEW_LINE>return val;<NEW_LINE>}
Address addr = context.getAddress();
868,911
private <T> T withFollowingRedirect(WebTarget initialWebTarget, RequestWithFollowingRedirect<T> request) {<NEW_LINE>WebApplicationException firstRedirectException = null;<NEW_LINE>WebTarget webTarget = initialWebTarget;<NEW_LINE>Optional<Response<MASK><NEW_LINE>for (int i = 0; i < MAX_REDIRECT; i++) {<NEW_LINE>try {<NEW_LINE>return request.invoke(webTarget, lastResponse);<NEW_LINE>} catch (WebApplicationException e) {<NEW_LINE>if (firstRedirectException == null) {<NEW_LINE>firstRedirectException = e;<NEW_LINE>}<NEW_LINE>Response response = checkNotNull(e.getResponse());<NEW_LINE>int status = response.getStatus();<NEW_LINE>if (status % 100 == 3 && response.getLocation() != null) {<NEW_LINE>lastResponse = Optional.of(response);<NEW_LINE>webTarget = client.target(UriBuilder.fromUri(response.getLocation()));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw firstRedirectException;<NEW_LINE>}
> lastResponse = Optional.absent();
365,874
public Set<Flow> bddLoopDetection(NetworkSnapshot snapshot) {<NEW_LINE>BDDPacket pkt = new BDDPacket();<NEW_LINE>// TODO add ignoreFilters parameter<NEW_LINE>boolean ignoreFilters = false;<NEW_LINE>BDDReachabilityAnalysisFactory bddReachabilityAnalysisFactory = getBddReachabilityAnalysisFactory(snapshot, pkt, ignoreFilters);<NEW_LINE>BDDLoopDetectionAnalysis analysis = bddReachabilityAnalysisFactory.bddLoopDetectionAnalysis(getAllSourcesInferFromLocationIpSpaceAssignment(snapshot));<NEW_LINE>Map<IngressLocation, BDD> loopBDDs = analysis.detectLoops();<NEW_LINE>return loopBDDs.entrySet().stream().map(entry -> pkt.getFlow(entry.getValue()).map(fb -> {<NEW_LINE>IngressLocation loc = entry.getKey();<NEW_LINE>fb.<MASK><NEW_LINE>switch(loc.getType()) {<NEW_LINE>case INTERFACE_LINK:<NEW_LINE>fb.setIngressInterface(loc.getInterface());<NEW_LINE>break;<NEW_LINE>case VRF:<NEW_LINE>fb.setIngressVrf(loc.getVrf());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new BatfishException("Unknown Location Type: " + loc.getType());<NEW_LINE>}<NEW_LINE>return fb.build();<NEW_LINE>})).flatMap(optional -> optional.map(Stream::of).orElse(Stream.empty())).collect(ImmutableSet.toImmutableSet());<NEW_LINE>}
setIngressNode(loc.getNode());
751,453
private void rehash() {<NEW_LINE><MASK><NEW_LINE>int oldSize = size();<NEW_LINE>int newCapacity = capacity * 2;<NEW_LINE>free = capacity = newCapacity;<NEW_LINE>int len = Numbers.ceilPow2((int) (newCapacity / loadFactor));<NEW_LINE>this.keys = alloc(len);<NEW_LINE>this.mask = len - 1;<NEW_LINE>Arrays.fill(keys, noEntryKey);<NEW_LINE>free -= oldSize;<NEW_LINE>for (int i = 0, n = old.length / 4; i < n; i++) {<NEW_LINE>if (old[i * 4] == noEntryKey && old[i * 4 + 1] == noEntryKey && old[i * 4 + 2] == noEntryKey && old[i * 4 + 3] == noEntryKey) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int index = keyIndex(old[i * 4], old[i * 4 + 1], old[i * 4 + 2], old[i * 4 + 3]);<NEW_LINE>setAt(index, old[i * 4], old[i * 4 + 1], old[i * 4 + 2], old[i * 4 + 3]);<NEW_LINE>}<NEW_LINE>}
long[] old = this.keys;
944,943
public void run(RegressionEnvironment env) {<NEW_LINE>sendCurrentTime(env, "2002-02-01T09:00:00.000");<NEW_LINE>String epl = "@name('s0') select rstream * from SupportBean#time(1 month)";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>sendCurrentTime(env, "2002-02-15T09:00:00.000");<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>sendCurrentTimeWithMinus(env, "2002-03-01T09:00:00.000", 1);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendCurrentTime(env, "2002-03-01T09:00:00.000");<NEW_LINE>env.assertPropsNew("s0", "theString".split(","), new Object[] { "E1" });<NEW_LINE>sendCurrentTimeWithMinus(env, "2002-03-15T09:00:00.000", 1);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendCurrentTime(env, "2002-03-15T09:00:00.000");<NEW_LINE>env.assertPropsNew("s0", "theString".split(","), new Object[] { "E2" });<NEW_LINE>env.undeployAll();<NEW_LINE>}
new SupportBean("E2", 2));
1,318,994
final ListBotsResult executeListBots(ListBotsRequest listBotsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listBotsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListBotsRequest> request = null;<NEW_LINE>Response<ListBotsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListBotsRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Lex Models V2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBots");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListBotsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListBotsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(listBotsRequest));
13,177
void updateNetworkSelections() {<NEW_LINE>boolean networkSelected = String.valueOf(CommService.MEDIUM.NETWORK.ordinal()).equals(prefs.getString(KEY_COMM_MEDIUM, ""));<NEW_LINE>boolean bluetoothSelected = String.valueOf(CommService.MEDIUM.BLUETOOTH.ordinal()).equals(prefs<MASK><NEW_LINE>boolean usbSelected = String.valueOf(CommService.MEDIUM.USB.ordinal()).equals(prefs.getString(KEY_COMM_MEDIUM, ""));<NEW_LINE>// enable/disable network specific entries<NEW_LINE>for (String key : networkKeys) {<NEW_LINE>Preference pref = findPreference(key);<NEW_LINE>pref.setEnabled(networkSelected);<NEW_LINE>}<NEW_LINE>// enable/disable bluetooth specific entries<NEW_LINE>for (String key : bluetoothKeys) {<NEW_LINE>Preference pref = findPreference(key);<NEW_LINE>pref.setEnabled(bluetoothSelected);<NEW_LINE>}<NEW_LINE>// enable/disable usb specific entries<NEW_LINE>for (String key : usbKeys) {<NEW_LINE>Preference pref = findPreference(key);<NEW_LINE>pref.setEnabled(usbSelected);<NEW_LINE>}<NEW_LINE>}
.getString(KEY_COMM_MEDIUM, ""));
1,033,294
public void outputOvertimeData() {<NEW_LINE>LOG.info("start to outputOvertimeData profileCacheSize:{},dispatchQueueSize:{}", profileCache.size(), dispatchQueue.size());<NEW_LINE>long currentTime = System.currentTimeMillis();<NEW_LINE>long createThreshold = currentTime - dispatchTimeout;<NEW_LINE>List<String> removeKeys = new ArrayList<>();<NEW_LINE>long eventCount = 0;<NEW_LINE>for (Entry<String, DispatchProfile> entry : this.profileCache.entrySet()) {<NEW_LINE><MASK><NEW_LINE>eventCount += dispatchProfile.getCount();<NEW_LINE>if (!dispatchProfile.isTimeout(createThreshold)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>removeKeys.add(entry.getKey());<NEW_LINE>}<NEW_LINE>// output<NEW_LINE>removeKeys.forEach((key) -> {<NEW_LINE>dispatchQueue.offer(this.profileCache.remove(key));<NEW_LINE>});<NEW_LINE>LOG.info("end to outputOvertimeData profileCacheSize:{},dispatchQueueSize:{},eventCount:{}", profileCache.size(), dispatchQueue.size(), eventCount);<NEW_LINE>}
DispatchProfile dispatchProfile = entry.getValue();
1,478,736
public void configurationChanged(ConfigurationEvent event) {<NEW_LINE>if (event.isBeforeUpdate() || (event.getType() != AbstractConfiguration.EVENT_ADD_PROPERTY && event.getType() != AbstractConfiguration.EVENT_SET_PROPERTY)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String name = event.getPropertyName();<NEW_LINE>String value = event.getPropertyValue() == null ? null : String.valueOf(event.getPropertyValue());<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (name.equals(DEPLOYMENT_ENVIRONMENT_PROPERTY)) {<NEW_LINE>ConfigurationBasedDeploymentContext.super.setDeploymentRegion(value);<NEW_LINE>setValueInConfig(ContextKey.environment.getKey(), value);<NEW_LINE>} else if (name.equals(DEPLOYMENT_DATACENTER_PROPERTY)) {<NEW_LINE>ConfigurationBasedDeploymentContext.super.setDeploymentDatacenter(value);<NEW_LINE>setValueInConfig(ContextKey.datacenter.getKey(), value);<NEW_LINE>} else if (name.equals(DEPLOYMENT_STACK_PROPERTY)) {<NEW_LINE>ConfigurationBasedDeploymentContext.super.setDeploymentStack(value);<NEW_LINE>setValueInConfig(ContextKey.<MASK><NEW_LINE>} else if (name.equals(DEPLOYMENT_APPLICATION_ID_PROPERTY)) {<NEW_LINE>ConfigurationBasedDeploymentContext.super.setApplicationId(value);<NEW_LINE>setValueInConfig(ContextKey.appId.getKey(), value);<NEW_LINE>} else if (name.equals(DEPLOYMENT_REGION_PROPERTY)) {<NEW_LINE>ConfigurationBasedDeploymentContext.super.setDeploymentRegion(value);<NEW_LINE>setValueInConfig(ContextKey.region.getKey(), value);<NEW_LINE>} else if (name.equals(DEPLOYMENT_SERVER_ID_PROPERTY)) {<NEW_LINE>ConfigurationBasedDeploymentContext.super.setDeploymentServerId(value);<NEW_LINE>setValueInConfig(ContextKey.serverId.getKey(), value);<NEW_LINE>}<NEW_LINE>}
stack.getKey(), value);
913,362
void startServer(SensorContext context, List<Path> deployedBundles) throws IOException {<NEW_LINE>PROFILER.startDebug("Starting server");<NEW_LINE>port = findOpenPort();<NEW_LINE>File scriptFile = new File(bundle.startServerScript());<NEW_LINE>if (!scriptFile.exists()) {<NEW_LINE>throw new NodeCommandException(<MASK><NEW_LINE>}<NEW_LINE>String bundles = deployedBundles.stream().map(Path::toString).collect(Collectors.joining(File.pathSeparator));<NEW_LINE>initNodeCommand(context, scriptFile, context.fileSystem().workDir(), bundles);<NEW_LINE>LOG.debug("Starting Node.js process to start eslint-bridge server at port " + port);<NEW_LINE>nodeCommand.start();<NEW_LINE>if (!waitServerToStart(timeoutSeconds * 1000)) {<NEW_LINE>status = Status.FAILED;<NEW_LINE>throw new NodeCommandException("Failed to start server (" + timeoutSeconds + "s timeout)");<NEW_LINE>} else {<NEW_LINE>status = Status.STARTED;<NEW_LINE>}<NEW_LINE>PROFILER.stopDebug();<NEW_LINE>deprecationWarning.logNodeDeprecation(nodeCommand.getActualNodeVersion());<NEW_LINE>}
"Node.js script to start eslint-bridge server doesn't exist: " + scriptFile.getAbsolutePath());
1,738,469
final DescribeDBSubnetGroupsResult executeDescribeDBSubnetGroups(DescribeDBSubnetGroupsRequest describeDBSubnetGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDBSubnetGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeDBSubnetGroupsRequest> request = null;<NEW_LINE>Response<DescribeDBSubnetGroupsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeDBSubnetGroupsRequestMarshaller().marshall(super.beforeMarshalling(describeDBSubnetGroupsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DocDB");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeDBSubnetGroups");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeDBSubnetGroupsResult> responseHandler = new StaxResponseHandler<DescribeDBSubnetGroupsResult>(new DescribeDBSubnetGroupsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
802,309
private void startMppServer(SystemConfig system) {<NEW_LINE>if (TddlNode.getNodeId() == 0 && System.getProperty("nodeId") != null) {<NEW_LINE>TddlNode.setNodeId(Integer.parseInt(System.getProperty("nodeId")));<NEW_LINE>logger.warn("mpp set nodeId=" + TddlNode.getNodeId());<NEW_LINE>}<NEW_LINE>TaskResource.setDrdsContextHandler(new DrdsContextHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ExecutionContext makeExecutionContext(String schemaName, Map<String, Object> hintCmds, int txIsolation) {<NEW_LINE>ExecutionContext ec = new ExecutionContext();<NEW_LINE>ec.setSchemaName(schemaName);<NEW_LINE>SchemaConfig schema = config.getSchemas().get(ec.getSchemaName());<NEW_LINE>TDataSource dataSource = schema.getDataSource();<NEW_LINE>if (!dataSource.isInited()) {<NEW_LINE>dataSource.init();<NEW_LINE>}<NEW_LINE>ec.getExtraCmds().putAll(dataSource.getConnectionProperties());<NEW_LINE>ec.setStats(dataSource.getStatistics());<NEW_LINE>ec.setPhysicalRecorder(dataSource.getPhysicalRecorder());<NEW_LINE>ec.setRecorder(dataSource.getRecorder());<NEW_LINE>ec.<MASK><NEW_LINE>ec.setInternalSystemSql(false);<NEW_LINE>ec.setUsingPhySqlCache(true);<NEW_LINE>ec.setExecuteMode(ExecutorMode.MPP);<NEW_LINE>ec.setPrivilegeContext(new MppPrivilegeContext());<NEW_LINE>ec.setTxIsolation(txIsolation);<NEW_LINE>ec.putAllHintCmds(hintCmds);<NEW_LINE>return ec;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Server mppServer = new MppServer(TddlNode.getNodeId(), system.isMppServer(), system.isMppWorker(), this.serverHost, system.getRpcPort());<NEW_LINE>ServiceProvider.getInstance().setServer(mppServer);<NEW_LINE>mppServer.run();<NEW_LINE>logger.info("MppServer is started on " + system.getRpcPort());<NEW_LINE>}
setExecutorService(dataSource.borrowExecutorService());
373,587
protected void genTokenDefinitions(TokenManager tm) throws IOException {<NEW_LINE>// Generate a definition for each token type<NEW_LINE>Vector v = tm.getVocabulary();<NEW_LINE>// Do special tokens manually<NEW_LINE>println("public static final EOF = " + Token.EOF_TYPE);<NEW_LINE>println("public static final NULL_TREE_LOOKAHEAD = " + Token.NULL_TREE_LOOKAHEAD);<NEW_LINE>for (int i = Token.MIN_USER_TYPE; i < v.size(); i++) {<NEW_LINE>String s = (String) v.elementAt(i);<NEW_LINE>if (s != null) {<NEW_LINE>if (s.startsWith("\"")) {<NEW_LINE>// a string literal<NEW_LINE>StringLiteralSymbol sl = (<MASK><NEW_LINE>if (sl == null) {<NEW_LINE>antlrTool.panic("String literal " + s + " not in symbol table");<NEW_LINE>} else if (sl.label != null) {<NEW_LINE>println("public static final " + sl.label + " = " + i);<NEW_LINE>} else {<NEW_LINE>String mangledName = mangleLiteral(s);<NEW_LINE>if (mangledName != null) {<NEW_LINE>// We were able to create a meaningful mangled token<NEW_LINE>// name<NEW_LINE>println("public static final " + mangledName + " = " + i);<NEW_LINE>// if no label specified, make the label equal to<NEW_LINE>// the mangled name<NEW_LINE>sl.label = mangledName;<NEW_LINE>} else {<NEW_LINE>println("// " + s + " = " + i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (!s.startsWith("<")) {<NEW_LINE>println("public static final " + s + " = " + i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>println("");<NEW_LINE>}
StringLiteralSymbol) tm.getTokenSymbol(s);
1,472,076
public void authenticate(RoutingContext context, Handler<AsyncResult<User>> handler) {<NEW_LINE>switch(source) {<NEW_LINE>case HEADER:<NEW_LINE>MultiMap headers = context.request().headers();<NEW_LINE>if (headers != null && headers.contains(value)) {<NEW_LINE>authProvider.authenticate(new TokenCredentials(headers.get(value)), authn -> {<NEW_LINE>if (authn.failed()) {<NEW_LINE>handler.handle(Future.failedFuture(new HttpException(401, authn.cause())));<NEW_LINE>} else {<NEW_LINE>handler.handle(authn);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case PARAMETER:<NEW_LINE>MultiMap params = context<MASK><NEW_LINE>if (params != null && params.contains(value)) {<NEW_LINE>authProvider.authenticate(new TokenCredentials(params.get(value)), authn -> {<NEW_LINE>if (authn.failed()) {<NEW_LINE>handler.handle(Future.failedFuture(new HttpException(401, authn.cause())));<NEW_LINE>} else {<NEW_LINE>handler.handle(authn);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case COOKIE:<NEW_LINE>Cookie cookie = context.request().getCookie(value);<NEW_LINE>if (cookie != null) {<NEW_LINE>authProvider.authenticate(new TokenCredentials(cookie.getValue()), authn -> {<NEW_LINE>if (authn.failed()) {<NEW_LINE>handler.handle(Future.failedFuture(new HttpException(401, authn.cause())));<NEW_LINE>} else {<NEW_LINE>handler.handle(authn);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// fallback if no api key was found<NEW_LINE>handler.handle(Future.failedFuture(UNAUTHORIZED));<NEW_LINE>}
.request().params();
1,255,639
protected List<float[]> convertColumn(float[] cLine) {<NEW_LINE>if (cLine.length < 4)<NEW_LINE>throw new RuntimeException(MessageLocalization.getComposedMessage("no.valid.column.line.found"));<NEW_LINE>List<float[]> cc = new ArrayList<>();<NEW_LINE>for (int k = 0; k < cLine.length - 2; k += 2) {<NEW_LINE>if (cLine.length == k + 3) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>float x1 = cLine[k];<NEW_LINE>float y1 = cLine[k + 1];<NEW_LINE>float x2 = cLine[k + 2];<NEW_LINE>float y2 = cLine[k + 3];<NEW_LINE>if (y1 == y2)<NEW_LINE>continue;<NEW_LINE>// x = ay + b<NEW_LINE>float a = (x1 - x2) / (y1 - y2);<NEW_LINE>float b = x1 - a * y1;<NEW_LINE>float[] r = new float[4];<NEW_LINE>r[0] = Math.min(y1, y2);<NEW_LINE>r[1] = Math.max(y1, y2);<NEW_LINE>r[2] = a;<NEW_LINE>r[3] = b;<NEW_LINE>cc.add(r);<NEW_LINE>maxY = Math.max<MASK><NEW_LINE>minY = Math.min(minY, r[0]);<NEW_LINE>}<NEW_LINE>if (cc.isEmpty())<NEW_LINE>throw new RuntimeException(MessageLocalization.getComposedMessage("no.valid.column.line.found"));<NEW_LINE>return cc;<NEW_LINE>}
(maxY, r[1]);
365,045
/*<NEW_LINE>* Helper to read a fingerprint file (.fp) front to end and check for inconsistencies.<NEW_LINE>*/<NEW_LINE>@SuppressWarnings("resource")<NEW_LINE>public static void main(String[] args) throws IOException {<NEW_LINE>if (args.length == 1 && !args[0].equals("")) {<NEW_LINE>final BufferedRandomAccessFile braf = new BufferedRandomAccessFile(new File(args[0]), "r");<NEW_LINE>final long elements = braf.length() / FPSet.LongSize;<NEW_LINE>final DecimalFormat df = new DecimalFormat("###,###.###");<NEW_LINE>System.out.println(String.format("About to scan %s elements.", df.format(elements)));<NEW_LINE>long elem = 0L;<NEW_LINE>for (long i = 0; i < elements; i++) {<NEW_LINE>final long l = braf.readLong();<NEW_LINE>if (l < elem) {<NEW_LINE>System.err.println(String.format("Inconsistent elements %s at pos %s < %s at pos %s.", elem, i - 1L, l, i));<NEW_LINE>}<NEW_LINE>elem = l;<NEW_LINE>if (i > 0 && i % 100000000L == 0L) {<NEW_LINE>System.out.println(String.format("Scanned %s elements.", df.format(i)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (args.length == 2 && !args[0].equals("") && !args[1].equals("")) {<NEW_LINE>final BufferedRandomAccessFile superset = new BufferedRandomAccessFile(new File(args[0]), "r");<NEW_LINE>final BufferedRandomAccessFile subset = new BufferedRandomAccessFile(new File(args[1]), "r");<NEW_LINE>final long elements = subset.length() / FPSet.LongSize;<NEW_LINE>final long fileLen = superset.length();<NEW_LINE>OUTER: for (long i = 0; i < elements; i++) {<NEW_LINE>final long l = subset.readLong();<NEW_LINE>while (superset.getFilePointer() < fileLen) {<NEW_LINE>final long m = superset.readLong();<NEW_LINE>if (l == m) {<NEW_LINE>continue OUTER;<NEW_LINE>} else if (m > l) {<NEW_LINE>System.err.println(String.format("Inconsistent element in superset %s not in superset at pos %s.", m<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.err.println(String.format("Element in subset %s not in superset at pos %s.", l, subset.getFilePointer()));<NEW_LINE>}<NEW_LINE>System.out.println("Finished scanning files.");<NEW_LINE>} else {<NEW_LINE>System.err.println("Usage: DiskFPSet file.fp OR superset.fp subset.fp");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>}
, superset.getFilePointer()));
329,300
public static void createRealms(String defaultRealm, List<AuthRealm> realms, String configName) {<NEW_LINE>// need at least one good realm<NEW_LINE>String goodRealm = null;<NEW_LINE>for (AuthRealm realm : realms) {<NEW_LINE>String realmName = realm.getName();<NEW_LINE>String realmClass = realm.getClassname();<NEW_LINE>try {<NEW_LINE>List<Property> realmProperties = realm.getProperty();<NEW_LINE>Properties properties = new Properties();<NEW_LINE>for (Property realmProperty : realmProperties) {<NEW_LINE>properties.setProperty(realmProperty.getName(), realmProperty.getValue());<NEW_LINE>}<NEW_LINE>Realm.instantiate(realmName, realmClass, properties, configName);<NEW_LINE>if (LOGGER.isLoggable(FINE)) {<NEW_LINE>LOGGER.log(FINE, "Configured realm: {0}", realmName);<NEW_LINE>}<NEW_LINE>if (goodRealm == null) {<NEW_LINE>goodRealm = realmName;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOGGER.log(WARNING, realmConfigDisabledError, realmName);<NEW_LINE>LOGGER.log(WARNING, securityExceptionError, e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Done loading all realms, check that there is at least one<NEW_LINE>// in place and that default is installed, or change default<NEW_LINE>// to the first one loaded (arbitrarily).<NEW_LINE>if (goodRealm == null) {<NEW_LINE>LOGGER.severe(noRealmsError);<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>Realm.getInstance(defaultRealm);<NEW_LINE>} catch (Exception e) {<NEW_LINE>defaultRealm = goodRealm;<NEW_LINE>}<NEW_LINE>Realm.setDefaultRealm(defaultRealm);<NEW_LINE>if (LOGGER.isLoggable(FINE)) {<NEW_LINE>LOGGER.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
log(FINE, "Default realm is set to: {0}", defaultRealm);
1,630,364
private void filterWhenSecurityEnabled(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain, UsernamePassword usernamePassword) throws IOException, ServletException {<NEW_LINE>if (usernamePassword == null) {<NEW_LINE>LOGGER.debug("Basic auth credentials are not provided in request.");<NEW_LINE>filterChain.doFilter(request, response);<NEW_LINE>} else {<NEW_LINE>LOGGER.debug("authenticating user {} using basic auth credentials", usernamePassword.getUsername());<NEW_LINE>try {<NEW_LINE>final AuthenticationToken<UsernamePassword> authenticationToken = authenticationProvider.authenticate(usernamePassword, null);<NEW_LINE>if (authenticationToken == null) {<NEW_LINE>onAuthenticationFailure(request, response, BAD_CREDENTIALS_MSG);<NEW_LINE>} else {<NEW_LINE>SessionUtils.setAuthenticationTokenAfterRecreatingSession(authenticationToken, request);<NEW_LINE>filterChain.doFilter(request, response);<NEW_LINE>}<NEW_LINE>} catch (AuthenticationException e) {<NEW_LINE><MASK><NEW_LINE>onAuthenticationFailure(request, response, e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
LOGGER.debug("Failed to authenticate user.", e);
705,501
protected void parseFormProperties(BpmnParse bpmnParse, ExpressionManager expressionManager, Element extensionElement) {<NEW_LINE>FormTypes formTypes = getFormTypes();<NEW_LINE>List<Element> formPropertyElements = extensionElement.elementsNS(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, FORM_PROPERTY_ELEMENT);<NEW_LINE>for (Element formPropertyElement : formPropertyElements) {<NEW_LINE>FormPropertyHandler formPropertyHandler = new FormPropertyHandler();<NEW_LINE>String id = formPropertyElement.attribute("id");<NEW_LINE>if (id == null) {<NEW_LINE>bpmnParse.addError("attribute 'id' is required", formPropertyElement);<NEW_LINE>}<NEW_LINE>formPropertyHandler.setId(id);<NEW_LINE>String name = formPropertyElement.attribute("name");<NEW_LINE>formPropertyHandler.setName(name);<NEW_LINE>AbstractFormFieldType type = formTypes.parseFormPropertyType(formPropertyElement, bpmnParse);<NEW_LINE>formPropertyHandler.setType(type);<NEW_LINE>String requiredText = formPropertyElement.attribute("required", "false");<NEW_LINE>Boolean required = bpmnParse.parseBooleanAttribute(requiredText);<NEW_LINE>if (required != null) {<NEW_LINE>formPropertyHandler.setRequired(required);<NEW_LINE>} else {<NEW_LINE>bpmnParse.addError("attribute 'required' must be one of {on|yes|true|enabled|active|off|no|false|disabled|inactive}", formPropertyElement);<NEW_LINE>}<NEW_LINE>String readableText = <MASK><NEW_LINE>Boolean readable = bpmnParse.parseBooleanAttribute(readableText);<NEW_LINE>if (readable != null) {<NEW_LINE>formPropertyHandler.setReadable(readable);<NEW_LINE>} else {<NEW_LINE>bpmnParse.addError("attribute 'readable' must be one of {on|yes|true|enabled|active|off|no|false|disabled|inactive}", formPropertyElement);<NEW_LINE>}<NEW_LINE>String writableText = formPropertyElement.attribute("writable", "true");<NEW_LINE>Boolean writable = bpmnParse.parseBooleanAttribute(writableText);<NEW_LINE>if (writable != null) {<NEW_LINE>formPropertyHandler.setWritable(writable);<NEW_LINE>} else {<NEW_LINE>bpmnParse.addError("attribute 'writable' must be one of {on|yes|true|enabled|active|off|no|false|disabled|inactive}", formPropertyElement);<NEW_LINE>}<NEW_LINE>String variableName = formPropertyElement.attribute("variable");<NEW_LINE>formPropertyHandler.setVariableName(variableName);<NEW_LINE>String expressionText = formPropertyElement.attribute("expression");<NEW_LINE>if (expressionText != null) {<NEW_LINE>Expression expression = expressionManager.createExpression(expressionText);<NEW_LINE>formPropertyHandler.setVariableExpression(expression);<NEW_LINE>}<NEW_LINE>String defaultExpressionText = formPropertyElement.attribute("default");<NEW_LINE>if (defaultExpressionText != null) {<NEW_LINE>Expression defaultExpression = expressionManager.createExpression(defaultExpressionText);<NEW_LINE>formPropertyHandler.setDefaultExpression(defaultExpression);<NEW_LINE>}<NEW_LINE>formPropertyHandlers.add(formPropertyHandler);<NEW_LINE>}<NEW_LINE>}
formPropertyElement.attribute("readable", "true");
491,685
public void writePraatDurationTier(String fileName) throws IOException {<NEW_LINE>// initialize times and values with a size corresponding to two elements (start and end) per unit:<NEW_LINE>ArrayList<Double> times = new ArrayList<Double>(units.size() * 2);<NEW_LINE>ArrayList<Double> values = new ArrayList<Double>(units.size() * 2);<NEW_LINE>final double MIN_SKIP = 1e-15;<NEW_LINE>// cumulative time pointer:<NEW_LINE>double time = 0;<NEW_LINE>// iterate over phones, skipping the initial silence:<NEW_LINE>// TODO is this really robust?<NEW_LINE>ListIterator<Phone> phoneIterator = phones.listIterator(1);<NEW_LINE>while (phoneIterator.hasNext()) {<NEW_LINE>Phone phone = phoneIterator.next();<NEW_LINE>// process left halfphone unit:<NEW_LINE>if (phone.getLeftUnitDuration() > 0) {<NEW_LINE>// add point at unit start:<NEW_LINE>times.add(time);<NEW_LINE>values.add(phone.getLeftDurationFactor());<NEW_LINE>// increment time pointer by unit duration:<NEW_LINE>time += phone.getLeftUnitDuration();<NEW_LINE>// add point at unit end:<NEW_LINE>times.add(time - MIN_SKIP);<NEW_LINE>values.<MASK><NEW_LINE>}<NEW_LINE>// process right halfphone unit:<NEW_LINE>if (phone.getRightUnitDuration() > 0) {<NEW_LINE>// add point at unit start:<NEW_LINE>times.add(time);<NEW_LINE>values.add(phone.getRightDurationFactor());<NEW_LINE>// increment time pointer by unit duration:<NEW_LINE>time += phone.getRightUnitDuration();<NEW_LINE>// add point at unit end:<NEW_LINE>times.add(time - MIN_SKIP);<NEW_LINE>values.add(phone.getRightDurationFactor());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// open file for writing:<NEW_LINE>File durationTierFile = new File(fileName);<NEW_LINE>PrintWriter out = new PrintWriter(durationTierFile);<NEW_LINE>// print header:<NEW_LINE>out.println("\"ooTextFile\"");<NEW_LINE>out.println("\"DurationTier\"");<NEW_LINE>out.println(String.format("0 %f %d", time, times.size()));<NEW_LINE>// print points (times and values):<NEW_LINE>for (int i = 0; i < times.size(); i++) {<NEW_LINE>// Note: time precision should be greater than MIN_SKIP:<NEW_LINE>out.println(String.format("%.16f %f", times.get(i), values.get(i)));<NEW_LINE>}<NEW_LINE>// flush and close:<NEW_LINE>out.close();<NEW_LINE>}
add(phone.getLeftDurationFactor());
770,672
private Map<String, List<String>> processAllowedCodes(RuntimeResourceDefinition theResDef, List<AllowedCodeInValueSet> theAllowedCodeInValueSet) {<NEW_LINE>Map<String, List<String>> retVal = null;<NEW_LINE>for (AllowedCodeInValueSet next : theAllowedCodeInValueSet) {<NEW_LINE>String resourceName = next.getResourceName();<NEW_LINE>String valueSetUrl = next.getValueSetUrl();<NEW_LINE>ValidateUtil.isNotBlankOrThrowIllegalArgument(resourceName, "Resource name supplied by SearchNarrowingInterceptor must not be null");<NEW_LINE>ValidateUtil.isNotBlankOrThrowIllegalArgument(valueSetUrl, "ValueSet URL supplied by SearchNarrowingInterceptor must not be null");<NEW_LINE>if (!resourceName.equals(theResDef.getName())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (shouldHandleThroughConsentService(valueSetUrl)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String paramName;<NEW_LINE>if (next.isNegate()) {<NEW_LINE>paramName = next.getSearchParameterName() + Constants.PARAMQUALIFIER_TOKEN_NOT_IN;<NEW_LINE>} else {<NEW_LINE>paramName = next.getSearchParameterName() + Constants.PARAMQUALIFIER_TOKEN_IN;<NEW_LINE>}<NEW_LINE>if (retVal == null) {<NEW_LINE>retVal = new HashMap<>();<NEW_LINE>}<NEW_LINE>retVal.computeIfAbsent(paramName, k -> new ArrayList<><MASK><NEW_LINE>}<NEW_LINE>return retVal;<NEW_LINE>}
()).add(valueSetUrl);
1,632,032
public static HSBType fromXY(float x, float y) {<NEW_LINE>float tmpY = 1.0f;<NEW_LINE>float tmpX = (tmpY / y) * x;<NEW_LINE>float tmpZ = (tmpY / y) * (1.0f - x - y);<NEW_LINE>float r = tmpX * XY2RGB[0][0] + tmpY * XY2RGB[0][1] + tmpZ <MASK><NEW_LINE>float g = tmpX * XY2RGB[1][0] + tmpY * XY2RGB[1][1] + tmpZ * XY2RGB[1][2];<NEW_LINE>float b = tmpX * XY2RGB[2][0] + tmpY * XY2RGB[2][1] + tmpZ * XY2RGB[2][2];<NEW_LINE>float max = r > g ? r : g;<NEW_LINE>if (b > max) {<NEW_LINE>max = b;<NEW_LINE>}<NEW_LINE>r = gammaCompress(r / max);<NEW_LINE>g = gammaCompress(g / max);<NEW_LINE>b = gammaCompress(b / max);<NEW_LINE>return HSBType.fromRGB((int) (r * 255.0f + 0.5f), (int) (g * 255.0f + 0.5f), (int) (b * 255.0f + 0.5f));<NEW_LINE>}
* XY2RGB[0][2];
738,103
private static void readFiles(final Collection<File> counterSetFiles, final CounterSet counterSet, final int nsamples, final PeriodEnum period, final Pattern regex) throws IOException, SAXException, ParserConfigurationException, InterruptedException, ExecutionException {<NEW_LINE>// flatten directories in the list of files.<NEW_LINE>final Collection<File> flatFileList = QueryUtil.collectFiles(counterSetFiles, new FileFilter() {<NEW_LINE><NEW_LINE>public boolean accept(File pathname) {<NEW_LINE>return !pathname.isHidden() && pathname.getName().endsWith(".xml");<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (log.isInfoEnabled())<NEW_LINE>log.info("Reading performance counters from " + flatFileList.size() + " sources.");<NEW_LINE>// read the files<NEW_LINE>if (false) /* sequential */<NEW_LINE>{<NEW_LINE>// process the files one at a time.<NEW_LINE>readFilesSequential(flatFileList, <MASK><NEW_LINE>} else {<NEW_LINE>// process the files in parallel.<NEW_LINE>readFilesParallel(flatFileList, counterSet, nsamples, period, regex);<NEW_LINE>}<NEW_LINE>}
counterSet, nsamples, period, regex);
314,122
/* Build call for throttlingPoliciesCustomRuleIdDelete */<NEW_LINE>private com.squareup.okhttp.Call throttlingPoliciesCustomRuleIdDeleteCall(String ruleId, String ifMatch, String ifUnmodifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/throttling/policies/custom/{ruleId}".replaceAll("\\{format\\}", "json").replaceAll("\\{" + "ruleId" + "\\}", apiClient.escapeString(ruleId.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>if (ifMatch != null)<NEW_LINE>localVarHeaderParams.put("If-Match", apiClient.parameterToString(ifMatch));<NEW_LINE>if (ifUnmodifiedSince != null)<NEW_LINE>localVarHeaderParams.put("If-Unmodified-Since", apiClient.parameterToString(ifUnmodifiedSince));<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null)<NEW_LINE><MASK><NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>if (progressListener != null) {<NEW_LINE>apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {<NEW_LINE>com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());<NEW_LINE>return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);<NEW_LINE>}
localVarHeaderParams.put("Accept", localVarAccept);
799,539
public void actionPerformed(ActionEvent event) {<NEW_LINE>// TODO: refactor to put tab index from Tab enum<NEW_LINE>if (panelClass.equals("GlobalPanel")) {<NEW_LINE>new MacroButtonProperties(panelClass, MacroButtonPrefs.getNextIndex(), button.<MASK><NEW_LINE>} else if (panelClass.equals("CampaignPanel")) {<NEW_LINE>new MacroButtonProperties(panelClass, MapTool.getCampaign().getMacroButtonNextIndex(), button.getProperties().getGroup());<NEW_LINE>} else if (panelClass.equals("GmPanel")) {<NEW_LINE>new MacroButtonProperties(panelClass, MapTool.getCampaign().getGmMacroButtonNextIndex(), button.getProperties().getGroup());<NEW_LINE>} else if (panelClass.equals("SelectionPanel")) {<NEW_LINE>if (MapTool.getFrame().getSelectionPanel().getCommonMacros().contains(button.getProperties())) {<NEW_LINE>for (Token nextToken : MapTool.getFrame().getCurrentZoneRenderer().getSelectedTokensList()) {<NEW_LINE>new MacroButtonProperties(nextToken, nextToken.getMacroNextIndex(), button.getProperties().getGroup());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>new MacroButtonProperties(button.getToken(), button.getToken().getMacroNextIndex(), button.getProperties().getGroup());<NEW_LINE>}<NEW_LINE>} else if (button.getToken() != null) {<NEW_LINE>new MacroButtonProperties(button.getToken(), button.getToken().getMacroNextIndex(), button.getProperties().getGroup());<NEW_LINE>}<NEW_LINE>}
getProperties().getGroup());
772,280
private void makeDelegate() throws IOException {<NEW_LINE>// noinspection VariableNotUsedInsideIf<NEW_LINE>if (delegate != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CompressionFactory.LongEncodingWriter writer;<NEW_LINE>long delta;<NEW_LINE>try {<NEW_LINE>delta = LongMath.checkedSubtract(maxVal, minVal);<NEW_LINE>} catch (ArithmeticException e) {<NEW_LINE>delta = -1;<NEW_LINE>}<NEW_LINE>if (uniqueValues.size() <= CompressionFactory.MAX_TABLE_SIZE) {<NEW_LINE>writer <MASK><NEW_LINE>} else if (delta != -1 && delta != Long.MAX_VALUE) {<NEW_LINE>writer = new DeltaLongEncodingWriter(minVal, delta);<NEW_LINE>} else {<NEW_LINE>writer = new LongsLongEncodingWriter(order);<NEW_LINE>}<NEW_LINE>if (compression == CompressionStrategy.NONE) {<NEW_LINE>delegate = new EntireLayoutColumnarLongsSerializer(columnName, segmentWriteOutMedium, writer);<NEW_LINE>} else {<NEW_LINE>delegate = new BlockLayoutColumnarLongsSerializer(columnName, segmentWriteOutMedium, filenameBase, order, writer, compression);<NEW_LINE>}<NEW_LINE>delegate.open();<NEW_LINE>for (int i = 0; i < tempOut.size(); i++) {<NEW_LINE>delegate.add(tempOut.getLong(i));<NEW_LINE>}<NEW_LINE>}
= new TableLongEncodingWriter(uniqueValues, valuesAddedInOrder);
69,866
private static void printSection(PrintStream out, String sectionID) {<NEW_LINE>List<BaseConfigSection> configSections = ConsoleConfigSections.getInstance().getAllConfigSections(false);<NEW_LINE>BaseConfigSection section = null;<NEW_LINE>for (BaseConfigSection configSection : configSections) {<NEW_LINE>if (configSection != null && PrintUtils.getFriendlyConfigSectionID(configSection).equalsIgnoreCase(sectionID)) {<NEW_LINE>section = configSection;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (section == null) {<NEW_LINE>out.println("No section " + sectionID);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean needsBuild = !section.isBuilt();<NEW_LINE>if (needsBuild) {<NEW_LINE>section.build();<NEW_LINE>section.postBuild();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Parameter[] paramArray = section.getParamArray();<NEW_LINE>List<Parameter> params = new ArrayList<>();<NEW_LINE>for (Parameter param : paramArray) {<NEW_LINE>if (param instanceof ParameterGroupImpl) {<NEW_LINE>params.add(params.size() - ((ParameterGroupImpl) param).size(true), param);<NEW_LINE>} else {<NEW_LINE>params.add(param);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PrintUtils.showBox(out, PrintUtils.getFriendlyConfigSectionID(section), MessageText.getString<MASK><NEW_LINE>StringBuffer groupIndent = new StringBuffer();<NEW_LINE>boolean isFirst = true;<NEW_LINE>Stack<ParamGroupInfo> pgInfoStack = new Stack<>();<NEW_LINE>ParamGroupInfo pgInfo = new ParamGroupInfo(1, true, null);<NEW_LINE>for (Parameter param : params) {<NEW_LINE>isFirst = PrintUtils.printParam(out, section, param, groupIndent, isFirst, pgInfo, pgInfoStack);<NEW_LINE>}<NEW_LINE>while (groupIndent.length() > 0) {<NEW_LINE>groupIndent.replace(0, 2, "");<NEW_LINE>PrintUtils.endGroup(out, groupIndent, null);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (needsBuild) {<NEW_LINE>section.deleteConfigSection();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(section.getSectionNameKey()));