idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
331,500
public void execute(String commandName, BufferedReader reader, BufferedWriter writer) throws Py4JException, IOException {<NEW_LINE>char subCommand = safeReadLine<MASK><NEW_LINE>String returnCommand = null;<NEW_LINE>if (subCommand == ARRAY_GET_SUB_COMMAND_NAME) {<NEW_LINE>returnCommand = getArray(reader);<NEW_LINE>} else if (subCommand == ARRAY_SET_SUB_COMMAND_NAME) {<NEW_LINE>returnCommand = setArray(reader);<NEW_LINE>} else if (subCommand == ARRAY_SLICE_SUB_COMMAND_NAME) {<NEW_LINE>returnCommand = sliceArray(reader);<NEW_LINE>} else if (subCommand == ARRAY_LEN_SUB_COMMAND_NAME) {<NEW_LINE>returnCommand = lenArray(reader);<NEW_LINE>} else if (subCommand == ARRAY_CREATE_SUB_COMMAND_NAME) {<NEW_LINE>returnCommand = createArray(reader);<NEW_LINE>} else {<NEW_LINE>returnCommand = Protocol.getOutputErrorCommand("Unknown Array SubCommand Name: " + subCommand);<NEW_LINE>}<NEW_LINE>logger.finest("Returning command: " + returnCommand);<NEW_LINE>writer.write(returnCommand);<NEW_LINE>writer.flush();<NEW_LINE>}
(reader).charAt(0);
1,399,039
static void createDefaultValues(PolyglotImpl polyglot, PolyglotLanguageInstance languageInstance, Map<Class<?>, PolyglotValueDispatch> valueCache) {<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, false);<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, "");<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, TruffleString.fromJavaStringUncached("", TruffleString.Encoding.UTF_16));<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, 'a');<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, (byte) 0);<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, (short) 0);<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, 0);<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, 0L);<NEW_LINE>addDefaultValue(polyglot, languageInstance, valueCache, 0F);<NEW_LINE>addDefaultValue(<MASK><NEW_LINE>}
polyglot, languageInstance, valueCache, 0D);
563,820
public void marshall(PutSessionRequest putSessionRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (putSessionRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getBotName(), BOTNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getBotAlias(), BOTALIAS_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getUserId(), USERID_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getSessionAttributes(), SESSIONATTRIBUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getDialogAction(), DIALOGACTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getRecentIntentSummaryView(), RECENTINTENTSUMMARYVIEW_BINDING);<NEW_LINE>protocolMarshaller.marshall(putSessionRequest.getAccept(), ACCEPT_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
putSessionRequest.getActiveContexts(), ACTIVECONTEXTS_BINDING);
1,781,009
public RuleResult execute(Map<String, String> ruleParam, Map<String, String> resourceAttributes) {<NEW_LINE>logger.debug("========CloudfrontAuthorizedHTMLContentDistributionRule started=========");<NEW_LINE>String cloudFrontResourceID = resourceAttributes.get(PacmanSdkConstants.RESOURCE_ID);<NEW_LINE>MDC.put("executionId", ruleParam.get("executionId"));<NEW_LINE>MDC.put("ruleId", ruleParam.get(PacmanSdkConstants.RULE_ID));<NEW_LINE>boolean isWebsiteHosted = false;<NEW_LINE>String domainName = resourceAttributes.get("domainName");<NEW_LINE>String rootObject = resourceAttributes.get("deafultRootObject");<NEW_LINE>String enabled = resourceAttributes.get("enabled");<NEW_LINE>if (enabled != null && enabled.equalsIgnoreCase("true")) {<NEW_LINE>List<String> urlListToCheck = new ArrayList<>();<NEW_LINE>if (rootObject != null && rootObject.contains("htm")) {<NEW_LINE>urlListToCheck.add(HTTP_PROTOCOL_PREFIX + domainName + SLASH + rootObject);<NEW_LINE>}<NEW_LINE>urlListToCheck.add(HTTP_PROTOCOL_PREFIX + domainName);<NEW_LINE>urlListToCheck.add(HTTP_PROTOCOL_PREFIX + domainName + SLASH + INDEX_HTML);<NEW_LINE>urlListToCheck.add(HTTP_PROTOCOL_PREFIX + domainName + SLASH + INDEX_HTM);<NEW_LINE>for (String url : urlListToCheck) {<NEW_LINE>try {<NEW_LINE>isWebsiteHosted = isWebSiteHosted(url);<NEW_LINE>if (isWebsiteHosted) {<NEW_LINE>String description <MASK><NEW_LINE>logger.debug(description);<NEW_LINE>return new RuleResult(PacmanSdkConstants.STATUS_FAILURE, PacmanRuleConstants.FAILURE_MESSAGE, PacmanUtils.createAnnotation("", ruleParam, description, PacmanSdkConstants.SEV_HIGH, PacmanSdkConstants.SECURITY));<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Exception getting from url :[{}],[{}] ", url, e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new RuleResult(PacmanSdkConstants.STATUS_SUCCESS, PacmanRuleConstants.SUCCESS_MESSAGE);<NEW_LINE>}
= "CloudFront instance: " + cloudFrontResourceID + " is unauthorized for html content distribution. Content hosted on url : " + url;
88,100
public final MergeImpl values(Field<T1> value1, Field<T2> value2, Field<T3> value3, Field<T4> value4, Field<T5> value5, Field<T6> value6, Field<T7> value7, Field<T8> value8, Field<T9> value9, Field<T10> value10, Field<T11> value11, Field<T12> value12, Field<T13> value13, Field<T14> value14, Field<T15> value15, Field<T16> value16, Field<T17> value17, Field<T18> value18, Field<T19> value19, Field<T20> value20, Field<T21> value21, Field<T22> value22) {<NEW_LINE>return values(new Field[] { value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19<MASK><NEW_LINE>}
, value20, value21, value22 });
466,618
public void draw(Batch batch, float x, float y, float width, float height) {<NEW_LINE>float oldColor = batch.getPackedColor();<NEW_LINE>batch.setColor(batch.getColor().mul(color));<NEW_LINE>TextureRegion region = getRegion();<NEW_LINE>float regionWidth = region.getRegionWidth() * scale, regionHeight = region.getRegionHeight() * scale;<NEW_LINE>int fullX = (int) (width / regionWidth), fullY = (int) (height / regionHeight);<NEW_LINE>float remainingX = width - regionWidth * fullX, remainingY = height - regionHeight * fullY;<NEW_LINE>float startX = x, startY = y;<NEW_LINE>float endX = x + width - remainingX, endY = y + height - remainingY;<NEW_LINE>for (int i = 0; i < fullX; i++) {<NEW_LINE>y = startY;<NEW_LINE>for (int ii = 0; ii < fullY; ii++) {<NEW_LINE>batch.draw(region, x, y, regionWidth, regionHeight);<NEW_LINE>y += regionHeight;<NEW_LINE>}<NEW_LINE>x += regionWidth;<NEW_LINE>}<NEW_LINE>Texture texture = region.getTexture();<NEW_LINE>float u = region.getU();<NEW_LINE>float v2 = region.getV2();<NEW_LINE>if (remainingX > 0) {<NEW_LINE>// Right edge.<NEW_LINE>float u2 = u + remainingX / (texture.getWidth() * scale);<NEW_LINE><MASK><NEW_LINE>y = startY;<NEW_LINE>for (int ii = 0; ii < fullY; ii++) {<NEW_LINE>batch.draw(texture, x, y, remainingX, regionHeight, u, v2, u2, v);<NEW_LINE>y += regionHeight;<NEW_LINE>}<NEW_LINE>// Upper right corner.<NEW_LINE>if (remainingY > 0) {<NEW_LINE>v = v2 - remainingY / (texture.getHeight() * scale);<NEW_LINE>batch.draw(texture, x, y, remainingX, remainingY, u, v2, u2, v);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (remainingY > 0) {<NEW_LINE>// Top edge.<NEW_LINE>float u2 = region.getU2();<NEW_LINE>float v = v2 - remainingY / (texture.getHeight() * scale);<NEW_LINE>x = startX;<NEW_LINE>for (int i = 0; i < fullX; i++) {<NEW_LINE>batch.draw(texture, x, y, regionWidth, remainingY, u, v2, u2, v);<NEW_LINE>x += regionWidth;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>batch.setPackedColor(oldColor);<NEW_LINE>}
float v = region.getV();
706,861
public void run(RegressionEnvironment env) {<NEW_LINE><MASK><NEW_LINE>assertTypesC0C1C2(env, "s0", Integer.class, Double.class, Long.class);<NEW_LINE>env.compileDeploy("@name('s1') select intPrimitive as c0, doublePrimitive as c1, longPrimitive as c2, sum(shortPrimitive) " + "from SupportBean group by grouping sets ((intPrimitive, doublePrimitive, longPrimitive))");<NEW_LINE>assertTypesC0C1C2(env, "s1", Integer.class, Double.class, Long.class);<NEW_LINE>env.compileDeploy("@name('s2') select intPrimitive as c0, doublePrimitive as c1, longPrimitive as c2, sum(shortPrimitive) " + "from SupportBean group by grouping sets ((intPrimitive, doublePrimitive, longPrimitive), (intPrimitive, doublePrimitive))");<NEW_LINE>assertTypesC0C1C2(env, "s2", Integer.class, Double.class, Long.class);<NEW_LINE>env.compileDeploy("@name('s3') select intPrimitive as c0, doublePrimitive as c1, longPrimitive as c2, sum(shortPrimitive) " + "from SupportBean group by grouping sets ((doublePrimitive, intPrimitive), (longPrimitive, intPrimitive))");<NEW_LINE>assertTypesC0C1C2(env, "s3", Integer.class, Double.class, Long.class);<NEW_LINE>env.undeployAll();<NEW_LINE>}
env.compileDeploy("@name('s0') select intPrimitive as c0, doublePrimitive as c1, longPrimitive as c2, sum(shortPrimitive) " + "from SupportBean group by intPrimitive, rollup(doublePrimitive, longPrimitive)");
753,402
protected List<SmallFile> smallFilesProfile(String partitionPath) {<NEW_LINE>// smallFiles only for partitionPath<NEW_LINE>List<SmallFile> smallFileLocations = new ArrayList<>();<NEW_LINE>HoodieTimeline commitTimeline = metaClient.getCommitsTimeline().filterCompletedInstants();<NEW_LINE>if (!commitTimeline.empty()) {<NEW_LINE>// if we have some commits<NEW_LINE>HoodieInstant latestCommitTime = commitTimeline<MASK><NEW_LINE>List<HoodieBaseFile> allFiles = fsView.getLatestBaseFilesBeforeOrOn(partitionPath, latestCommitTime.getTimestamp()).collect(Collectors.toList());<NEW_LINE>for (HoodieBaseFile file : allFiles) {<NEW_LINE>// filter out the corrupted files.<NEW_LINE>if (file.getFileSize() < config.getParquetSmallFileLimit() && file.getFileSize() > 0) {<NEW_LINE>String filename = file.getFileName();<NEW_LINE>SmallFile sf = new SmallFile();<NEW_LINE>sf.location = new HoodieRecordLocation(FSUtils.getCommitTime(filename), FSUtils.getFileId(filename));<NEW_LINE>sf.sizeBytes = file.getFileSize();<NEW_LINE>smallFileLocations.add(sf);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return smallFileLocations;<NEW_LINE>}
.lastInstant().get();
360,947
public static void install(@NonNull final EmojiProvider provider) {<NEW_LINE>synchronized (EmojiManager.class) {<NEW_LINE>INSTANCE.categories = checkNotNull(<MASK><NEW_LINE>INSTANCE.emojiMap.clear();<NEW_LINE>INSTANCE.emojiReplacer = provider instanceof EmojiReplacer ? (EmojiReplacer) provider : DEFAULT_EMOJI_REPLACER;<NEW_LINE>final List<String> unicodesForPattern = new ArrayList<>(GUESSED_UNICODE_AMOUNT);<NEW_LINE>final int categoriesSize = INSTANCE.categories.length;<NEW_LINE>// noinspection ForLoopReplaceableByForEach<NEW_LINE>for (int i = 0; i < categoriesSize; i++) {<NEW_LINE>final Emoji[] emojis = checkNotNull(INSTANCE.categories[i].getEmojis(), "emojies == null");<NEW_LINE>final int emojisSize = emojis.length;<NEW_LINE>// noinspection ForLoopReplaceableByForEach<NEW_LINE>for (int j = 0; j < emojisSize; j++) {<NEW_LINE>final Emoji emoji = emojis[j];<NEW_LINE>final String unicode = emoji.getUnicode();<NEW_LINE>final List<Emoji> variants = emoji.getVariants();<NEW_LINE>INSTANCE.emojiMap.put(unicode, emoji);<NEW_LINE>unicodesForPattern.add(unicode);<NEW_LINE>// noinspection ForLoopReplaceableByForEach<NEW_LINE>for (int k = 0; k < variants.size(); k++) {<NEW_LINE>final Emoji variant = variants.get(k);<NEW_LINE>final String variantUnicode = variant.getUnicode();<NEW_LINE>INSTANCE.emojiMap.put(variantUnicode, variant);<NEW_LINE>unicodesForPattern.add(variantUnicode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (unicodesForPattern.isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("Your EmojiProvider must at least have one category with at least one emoji.");<NEW_LINE>}<NEW_LINE>// We need to sort the unicodes by length so the longest one gets matched first.<NEW_LINE>Collections.sort(unicodesForPattern, STRING_LENGTH_COMPARATOR);<NEW_LINE>final StringBuilder patternBuilder = new StringBuilder(GUESSED_TOTAL_PATTERN_LENGTH);<NEW_LINE>final int unicodesForPatternSize = unicodesForPattern.size();<NEW_LINE>for (int i = 0; i < unicodesForPatternSize; i++) {<NEW_LINE>patternBuilder.append(Pattern.quote(unicodesForPattern.get(i))).append('|');<NEW_LINE>}<NEW_LINE>final String regex = patternBuilder.deleteCharAt(patternBuilder.length() - 1).toString();<NEW_LINE>INSTANCE.emojiPattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);<NEW_LINE>INSTANCE.emojiRepetitivePattern = Pattern.compile('(' + regex + ")+", Pattern.CASE_INSENSITIVE);<NEW_LINE>}<NEW_LINE>}
provider.getCategories(), "categories == null");
103,156
public static DescribeClusterDetailResponse unmarshall(DescribeClusterDetailResponse describeClusterDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeClusterDetailResponse.setResource_group_id(_ctx.stringValue("DescribeClusterDetailResponse.resource_group_id"));<NEW_LINE>describeClusterDetailResponse.setVpc_id(_ctx.stringValue("DescribeClusterDetailResponse.vpc_id"));<NEW_LINE>describeClusterDetailResponse.setDeletion_protection(_ctx.booleanValue("DescribeClusterDetailResponse.deletion_protection"));<NEW_LINE>describeClusterDetailResponse.setCreated(_ctx.stringValue("DescribeClusterDetailResponse.created"));<NEW_LINE>describeClusterDetailResponse.setNetwork_mode(_ctx.stringValue("DescribeClusterDetailResponse.network_mode"));<NEW_LINE>describeClusterDetailResponse.setRegion_id(_ctx.stringValue("DescribeClusterDetailResponse.region_id"));<NEW_LINE>describeClusterDetailResponse.setSecurity_group_id<MASK><NEW_LINE>describeClusterDetailResponse.setCurrent_version(_ctx.stringValue("DescribeClusterDetailResponse.current_version"));<NEW_LINE>describeClusterDetailResponse.setCluster_type(_ctx.stringValue("DescribeClusterDetailResponse.cluster_type"));<NEW_LINE>describeClusterDetailResponse.setDocker_version(_ctx.stringValue("DescribeClusterDetailResponse.docker_version"));<NEW_LINE>describeClusterDetailResponse.setVswitch_cidr(_ctx.stringValue("DescribeClusterDetailResponse.vswitch_cidr"));<NEW_LINE>describeClusterDetailResponse.setZone_id(_ctx.stringValue("DescribeClusterDetailResponse.zone_id"));<NEW_LINE>describeClusterDetailResponse.setCluster_id(_ctx.stringValue("DescribeClusterDetailResponse.cluster_id"));<NEW_LINE>describeClusterDetailResponse.setSize(_ctx.integerValue("DescribeClusterDetailResponse.size"));<NEW_LINE>describeClusterDetailResponse.setExternal_loadbalancer_id(_ctx.stringValue("DescribeClusterDetailResponse.external_loadbalancer_id"));<NEW_LINE>describeClusterDetailResponse.setVswitch_id(_ctx.stringValue("DescribeClusterDetailResponse.vswitch_id"));<NEW_LINE>describeClusterDetailResponse.setName(_ctx.stringValue("DescribeClusterDetailResponse.name"));<NEW_LINE>describeClusterDetailResponse.setMeta_data(_ctx.stringValue("DescribeClusterDetailResponse.meta_data"));<NEW_LINE>describeClusterDetailResponse.setState(_ctx.stringValue("DescribeClusterDetailResponse.state"));<NEW_LINE>describeClusterDetailResponse.setUpdated(_ctx.stringValue("DescribeClusterDetailResponse.updated"));<NEW_LINE>describeClusterDetailResponse.setInstance_type(_ctx.stringValue("DescribeClusterDetailResponse.instance_type"));<NEW_LINE>List<TagsItem> tags = new ArrayList<TagsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeClusterDetailResponse.tags.Length"); i++) {<NEW_LINE>TagsItem tagsItem = new TagsItem();<NEW_LINE>tagsItem.setValue(_ctx.stringValue("DescribeClusterDetailResponse.tags[" + i + "].value"));<NEW_LINE>tagsItem.setKey(_ctx.stringValue("DescribeClusterDetailResponse.tags[" + i + "].key"));<NEW_LINE>tags.add(tagsItem);<NEW_LINE>}<NEW_LINE>describeClusterDetailResponse.setTags(tags);<NEW_LINE>return describeClusterDetailResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeClusterDetailResponse.security_group_id"));
627,265
public void emit(Event event) {<NEW_LINE>if (!started.get()) {<NEW_LINE>throw new ISE("Emit called unexpectedly before service start");<NEW_LINE>}<NEW_LINE>if (event instanceof ServiceMetricEvent) {<NEW_LINE>final TimelineMetric timelineEvent = timelineMetricConverter.druidEventToTimelineMetric((ServiceMetricEvent) event);<NEW_LINE>if (timelineEvent == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final boolean isSuccessful = eventsQueue.offer(timelineEvent, config.getEmitWaitTime(), TimeUnit.MILLISECONDS);<NEW_LINE>if (!isSuccessful) {<NEW_LINE>if (countLostEvents.getAndIncrement() % 1000 == 0) {<NEW_LINE>log.error("Lost total of [%s] events because of emitter queue is full. Please increase the capacity or/and the consumer frequency", countLostEvents.get());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>log.error(e, <MASK><NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>}<NEW_LINE>} else if (event instanceof AlertEvent) {<NEW_LINE>for (Emitter emitter : emitterList) {<NEW_LINE>emitter.emit(event);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new ISE("unknown event type [%s]", event.getClass());<NEW_LINE>}<NEW_LINE>}
"got interrupted with message [%s]", e.getMessage());
455,534
private static Collection<Object> queryNode(MXCIFQuadTreeNode<Object> node, double x, double y, double width, double height, Collection<Object> result) {<NEW_LINE>if (node instanceof MXCIFQuadTreeNodeLeaf) {<NEW_LINE>MXCIFQuadTreeNodeLeaf<Object> leaf = (MXCIFQuadTreeNodeLeaf<Object>) node;<NEW_LINE>return visit(leaf, x, y, width, height, result);<NEW_LINE>}<NEW_LINE>MXCIFQuadTreeNodeBranch<Object> branch = (MXCIFQuadTreeNodeBranch<Object>) node;<NEW_LINE>result = visit(branch, x, y, width, height, result);<NEW_LINE>result = queryNode(branch.getNw(), x, y, width, height, result);<NEW_LINE>result = queryNode(branch.getNe(), x, y, width, height, result);<NEW_LINE>result = queryNode(branch.getSw(), x, y, width, height, result);<NEW_LINE>result = queryNode(branch.getSe(), x, <MASK><NEW_LINE>return result;<NEW_LINE>}
y, width, height, result);
270,901
public void select(GameView gameView, Map<String, Serializable> options, String message, int messageId) {<NEW_LINE>updateGame(gameView, true, options, null);<NEW_LINE>hideAll();<NEW_LINE>DialogManager.getManager(gameId).fadeOut();<NEW_LINE>this.abilityPicker.setVisible(false);<NEW_LINE>holdingPriority = false;<NEW_LINE>txtHoldPriority.setVisible(false);<NEW_LINE>setMenuStates(PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT, "true").equals("true"), PreferencesDialog.getCachedValue(KEY_GAME_MANA_AUTOPAYMENT_ONLY_ONE, "true").equals("true"), PreferencesDialog.getCachedValue(KEY_USE_FIRST_MANA_ABILITY, "false").equals("true"), false);<NEW_LINE>boolean controllingPlayer = false;<NEW_LINE>for (PlayerView playerView : gameView.getPlayers()) {<NEW_LINE>if (playerView.getPlayerId().equals(playerId)) {<NEW_LINE>// magenoxx: because of uncaught bug with saving state, rolling back and stack<NEW_LINE>// undo is allowed only for empty stack<NEW_LINE>controllingPlayer = !gameView.getPriorityPlayerName().equals(playerView.getName());<NEW_LINE>if (playerView.getStatesSavedSize() > 0 && gameView.getStack().isEmpty()) {<NEW_LINE>feedbackPanel.allowUndo(playerView.getStatesSavedSize());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Map<String, Serializable> panelOptions = new HashMap<>();<NEW_LINE>if (lastGameData.options != null) {<NEW_LINE>panelOptions.putAll(lastGameData.options);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>String activePlayerText;<NEW_LINE>if (gameView.getActivePlayerId().equals(playerId)) {<NEW_LINE>activePlayerText = "Your turn";<NEW_LINE>} else {<NEW_LINE>activePlayerText = gameView.getActivePlayerName() + "'s turn";<NEW_LINE>}<NEW_LINE>String priorityPlayerText = "";<NEW_LINE>if (controllingPlayer) {<NEW_LINE>priorityPlayerText = " / priority " + gameView.getPriorityPlayerName();<NEW_LINE>}<NEW_LINE>String messageToDisplay = message + FeedbackPanel.getSmallText(activePlayerText + " / " + gameView.getStep().toString() + priorityPlayerText);<NEW_LINE>this.feedbackPanel.prepareFeedback(FeedbackMode.SELECT, messageToDisplay, gameView.getSpecial(), panelOptions, messageId, true, gameView.getPhase());<NEW_LINE>}
panelOptions.put("your_turn", true);
786,533
private void addConflictedJars(JarLibrary jarLibrary, HashMap<String, JarLibrary> copiedEntries, String entryName) {<NEW_LINE>if (entryName.endsWith(".class") && !entryName.endsWith("module-info.class")) {<NEW_LINE>JarLibrary conflictingJar = copiedEntries.get(entryName);<NEW_LINE>// Ignore if conflicting jars has same name<NEW_LINE>Path jarFileName = jarLibrary.path().getFileName();<NEW_LINE>Path conflictingJarFileName = conflictingJar<MASK><NEW_LINE>if (jarFileName != null && conflictingJarFileName != null && !jarFileName.toString().equals(conflictingJarFileName.toString())) {<NEW_LINE>JarConflict jarConflict = getJarConflict(conflictingJar);<NEW_LINE>// If jar conflict already exists<NEW_LINE>if (jarConflict != null) {<NEW_LINE>jarConflict.addClasses(entryName);<NEW_LINE>} else {<NEW_LINE>// New jar conflict<NEW_LINE>this.conflictedJars.add(new JarConflict(conflictingJar, jarLibrary, new ArrayList<>(Collections.singletonList(entryName))));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.path().getFileName();
175,339
protected void updateGoalState(ClusterModel clusterModel, OptimizationOptions optimizationOptions) {<NEW_LINE>List<String> disksAboveBalanceUpperLimit = new ArrayList<>();<NEW_LINE>List<String> disksBelowBalanceLowerLimit = new ArrayList<>();<NEW_LINE>for (Broker broker : brokersToBalance(clusterModel)) {<NEW_LINE>double <MASK><NEW_LINE>double lowerLimit = _balanceLowerThresholdByBroker.get(broker);<NEW_LINE>for (Disk disk : broker.disks()) {<NEW_LINE>if (disk.isAlive()) {<NEW_LINE>if (diskUtilizationPercentage(disk) > upperLimit) {<NEW_LINE>disksAboveBalanceUpperLimit.add(broker.id() + ":" + disk.logDir());<NEW_LINE>}<NEW_LINE>if (diskUtilizationPercentage(disk) < lowerLimit) {<NEW_LINE>disksBelowBalanceLowerLimit.add(broker.id() + ":" + disk.logDir());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!disksAboveBalanceUpperLimit.isEmpty()) {<NEW_LINE>LOG.warn("Disks {} are above balance upper limit after optimization.", disksAboveBalanceUpperLimit);<NEW_LINE>_succeeded = false;<NEW_LINE>}<NEW_LINE>if (!disksBelowBalanceLowerLimit.isEmpty()) {<NEW_LINE>LOG.warn("Disks {} are below balance lower limit after optimization.", disksBelowBalanceLowerLimit);<NEW_LINE>_succeeded = false;<NEW_LINE>}<NEW_LINE>finish();<NEW_LINE>}
upperLimit = _balanceUpperThresholdByBroker.get(broker);
1,500,468
private static void failIfCorrupted(Directory directory) throws IOException {<NEW_LINE>final String[] files = directory.listAll();<NEW_LINE>List<CorruptIndexException> ex = new ArrayList<>();<NEW_LINE>for (String file : files) {<NEW_LINE>if (file.startsWith(CORRUPTED_MARKER_NAME_PREFIX)) {<NEW_LINE>try (ChecksumIndexInput input = directory.openChecksumInput(file, IOContext.READONCE)) {<NEW_LINE>CodecUtil.checkHeader(input, CODEC, CORRUPTED_MARKER_CODEC_VERSION, CORRUPTED_MARKER_CODEC_VERSION);<NEW_LINE>final int size = input.readVInt();<NEW_LINE>final byte[<MASK><NEW_LINE>input.readBytes(buffer, 0, buffer.length);<NEW_LINE>StreamInput in = StreamInput.wrap(buffer);<NEW_LINE>Exception t = in.readException();<NEW_LINE>if (t instanceof CorruptIndexException) {<NEW_LINE>ex.add((CorruptIndexException) t);<NEW_LINE>} else {<NEW_LINE>ex.add(new CorruptIndexException(t.getMessage(), "preexisting_corruption", t));<NEW_LINE>}<NEW_LINE>CodecUtil.checkFooter(input);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (ex.isEmpty() == false) {<NEW_LINE>ExceptionsHelper.rethrowAndSuppress(ex);<NEW_LINE>}<NEW_LINE>}
] buffer = new byte[size];
1,630,406
public void showHomeWatchingArticles(final RequestContext context) {<NEW_LINE>final Request request = context.getRequest();<NEW_LINE>final JSONObject user = (JSONObject) context.attr(User.USER);<NEW_LINE>final AbstractFreeMarkerRenderer renderer = new SkinRenderer(context, "home/watching-articles.ftl");<NEW_LINE>final Map<String, Object> dataModel = renderer.getDataModel();<NEW_LINE>dataModelService.fillHeaderAndFooter(context, dataModel);<NEW_LINE>final int pageNum = Paginator.getPage(request);<NEW_LINE>final int pageSize = Symphonys.USER_HOME_LIST_CNT;<NEW_LINE>final int windowSize = Symphonys.USER_HOME_LIST_WIN_SIZE;<NEW_LINE>fillHomeUser(dataModel, user, roleQueryService);<NEW_LINE>final String followingId = user.optString(Keys.OBJECT_ID);<NEW_LINE>dataModel.put(Follow.FOLLOWING_ID, followingId);<NEW_LINE>avatarQueryService.fillUserAvatarURL(user);<NEW_LINE>final JSONObject followingArticlesResult = followQueryService.getWatchingArticles(followingId, pageNum, pageSize);<NEW_LINE>final List<JSONObject> followingArticles = (List<JSONObject>) followingArticlesResult.opt(Keys.RESULTS);<NEW_LINE>dataModel.put(Common.USER_HOME_FOLLOWING_ARTICLES, followingArticles);<NEW_LINE>final boolean isLoggedIn = (Boolean) dataModel.get(Common.IS_LOGGED_IN);<NEW_LINE>if (isLoggedIn) {<NEW_LINE>final JSONObject currentUser = Sessions.getUser();<NEW_LINE>final String followerId = currentUser.optString(Keys.OBJECT_ID);<NEW_LINE>final boolean isFollowing = followQueryService.isFollowing(followerId, followingId, Follow.FOLLOWING_TYPE_C_USER);<NEW_LINE>dataModel.put(Common.IS_FOLLOWING, isFollowing);<NEW_LINE>for (final JSONObject followingArticle : followingArticles) {<NEW_LINE>final String homeUserFollowingArticleId = followingArticle.optString(Keys.OBJECT_ID);<NEW_LINE>followingArticle.put(Common.IS_FOLLOWING, followQueryService.isFollowing(followerId, homeUserFollowingArticleId, Follow.FOLLOWING_TYPE_C_ARTICLE_WATCH));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final int followingArticleCnt = followingArticlesResult.optInt(Pagination.PAGINATION_RECORD_COUNT);<NEW_LINE>final int pageCount = (int) Math.ceil<MASK><NEW_LINE>final List<Integer> pageNums = Paginator.paginate(pageNum, pageSize, pageCount, windowSize);<NEW_LINE>if (!pageNums.isEmpty()) {<NEW_LINE>dataModel.put(Pagination.PAGINATION_FIRST_PAGE_NUM, pageNums.get(0));<NEW_LINE>dataModel.put(Pagination.PAGINATION_LAST_PAGE_NUM, pageNums.get(pageNums.size() - 1));<NEW_LINE>}<NEW_LINE>dataModel.put(Pagination.PAGINATION_CURRENT_PAGE_NUM, pageNum);<NEW_LINE>dataModel.put(Pagination.PAGINATION_PAGE_COUNT, pageCount);<NEW_LINE>dataModel.put(Pagination.PAGINATION_PAGE_NUMS, pageNums);<NEW_LINE>dataModel.put(Pagination.PAGINATION_RECORD_COUNT, followingArticleCnt);<NEW_LINE>dataModel.put(Common.TYPE, "watchingArticles");<NEW_LINE>}
(followingArticleCnt / (double) pageSize);
1,031,423
private AuthRealm createLDAPRealm(SecurityService ss) throws TransactionFailure, PropertyVetoException {<NEW_LINE>AuthRealm ar = ss.createChild(AuthRealm.class);<NEW_LINE>ar.setClassname(LDAPRealm.class.getName());<NEW_LINE>ar.setName(FIXED_ADMIN_REALM_NAME);<NEW_LINE>List<Property> props = ar.getProperty();<NEW_LINE>Property p = ar.createChild(Property.class);<NEW_LINE>p.setName(DIR_P);<NEW_LINE>p.setValue(url);<NEW_LINE>props.add(p);<NEW_LINE>p = ar.createChild(Property.class);<NEW_LINE>p.setName(BASEDN_P);<NEW_LINE>p.setValue(basedn);<NEW_LINE>props.add(p);<NEW_LINE>p = ar.createChild(Property.class);<NEW_LINE>p.setName(JAAS_P);<NEW_LINE>p.setValue(JAAS_V);<NEW_LINE>props.add(p);<NEW_LINE>if (ldapGroupName != null) {<NEW_LINE>p = ar.createChild(Property.class);<NEW_LINE><MASK><NEW_LINE>// appears as gfdomain1->asadmin in domain.xml<NEW_LINE>p.setValue(ldapGroupName + "->asadmin");<NEW_LINE>props.add(p);<NEW_LINE>}<NEW_LINE>return ar;<NEW_LINE>}
p.setName(AbstractStatefulRealm.PARAM_GROUP_MAPPING);
978,428
public static void writeMBID(final String mBID, InputStream cover) {<NEW_LINE>boolean trace = LOGGER.isTraceEnabled();<NEW_LINE>try (Connection connection = MediaDatabase.get().getConnectionIfAvailable()) {<NEW_LINE>String query = "SELECT * FROM " + TABLE_NAME + contructMBIDWhere(mBID) + " LIMIT 1";<NEW_LINE>if (trace) {<NEW_LINE>LOGGER.trace("Searching for Cover Art Archive cover with \"{}\" before update", query);<NEW_LINE>}<NEW_LINE>try (Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);<NEW_LINE>ResultSet result = statement.executeQuery(query)) {<NEW_LINE>if (result.next()) {<NEW_LINE>if (cover != null || result.getBlob("COVER") == null) {<NEW_LINE>if (trace) {<NEW_LINE>LOGGER.trace("Updating cover for MBID \"{}\"", mBID);<NEW_LINE>}<NEW_LINE>result.updateTimestamp("MODIFIED", new Timestamp(System.currentTimeMillis()));<NEW_LINE>if (cover != null) {<NEW_LINE>result.updateBinaryStream("COVER", cover);<NEW_LINE>} else {<NEW_LINE>result.updateNull("COVER");<NEW_LINE>}<NEW_LINE>result.updateRow();<NEW_LINE>} else if (trace) {<NEW_LINE>LOGGER.trace("Leaving row {} alone since previous information seems better", result.getInt("ID"));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (trace) {<NEW_LINE>LOGGER.trace("Inserting new cover for MBID \"{}\"", mBID);<NEW_LINE>}<NEW_LINE>result.moveToInsertRow();<NEW_LINE>result.updateTimestamp("MODIFIED", new Timestamp(System.currentTimeMillis()));<NEW_LINE>result.updateString("MBID", mBID);<NEW_LINE>if (cover != null) {<NEW_LINE>result.updateBinaryStream("COVER", cover);<NEW_LINE>}<NEW_LINE>result.insertRow();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>LOGGER.error(LOG_ERROR_WHILE_VAR_IN, DATABASE_NAME, "writing Cover Art Archive cover for MBID", mBID, <MASK><NEW_LINE>LOGGER.trace("", e);<NEW_LINE>}<NEW_LINE>}
TABLE_NAME, e.getMessage());
292,164
public Collection<Vector2i> listChunks(long modifiedSince) {<NEW_LINE>if (!regionFile.exists() || regionFile.length() == 0)<NEW_LINE>return Collections.emptyList();<NEW_LINE>// 1024 = 32 x 32 chunks per region-file<NEW_LINE>List<Vector2i> chunks = new ArrayList<>(1024);<NEW_LINE>try (RandomAccessFile raf = new RandomAccessFile(regionFile, "r")) {<NEW_LINE>for (int x = 0; x < 32; x++) {<NEW_LINE>for (int z = 0; z < 32; z++) {<NEW_LINE>Vector2i chunk = new Vector2i(regionPos.getX() * 32 + x, regionPos.getY() * 32 + z);<NEW_LINE>int xzChunk = z * 32 + x;<NEW_LINE>raf.seek(xzChunk * 4 + 3);<NEW_LINE>int size = raf.readByte() * 4096;<NEW_LINE>if (size == 0)<NEW_LINE>continue;<NEW_LINE>raf.seek(xzChunk * 4 + 4096);<NEW_LINE>int timestamp <MASK><NEW_LINE>timestamp |= (raf.read() & 0xFF) << 16;<NEW_LINE>timestamp |= (raf.read() & 0xFF) << 8;<NEW_LINE>timestamp |= raf.read() & 0xFF;<NEW_LINE>if (timestamp >= (modifiedSince / 1000)) {<NEW_LINE>chunks.add(chunk);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (RuntimeException | IOException ex) {<NEW_LINE>Logger.global.logWarning("Failed to read .mca file: " + regionFile.getAbsolutePath() + " (" + ex.toString() + ")");<NEW_LINE>}<NEW_LINE>return chunks;<NEW_LINE>}
= raf.read() << 24;
1,251,015
public static DBTTaskRunStatus makeStatisticsStatus(DBCStatistics statistics) {<NEW_LINE>DBTTaskRunStatus taskResultStatus = new DBTTaskRunStatus();<NEW_LINE>if (statistics.getRowsFetched() > 0 || statistics.getRowsUpdated() > 0 || statistics.getStatementsCount() > 0) {<NEW_LINE>StringJoiner joiner = new StringJoiner(", ");<NEW_LINE>if (statistics.getRowsFetched() > 0) {<NEW_LINE>joiner.add(NLS.bind(ModelMessages.task_rows_fetched_message_part, statistics.getRowsFetched()));<NEW_LINE>}<NEW_LINE>if (statistics.getRowsUpdated() > 0) {<NEW_LINE>joiner.add(NLS.bind(ModelMessages.task_rows_modified_message_part, statistics.getRowsUpdated()));<NEW_LINE>}<NEW_LINE>if (statistics.getStatementsCount() > 0) {<NEW_LINE>joiner.add(NLS.bind(ModelMessages.task_statements_executed_message_part, statistics.getStatementsCount()));<NEW_LINE>}<NEW_LINE>taskResultStatus.<MASK><NEW_LINE>}<NEW_LINE>return taskResultStatus;<NEW_LINE>}
setResultMessage(joiner.toString());
807,041
private static <T> Pair<T, T> toRange(String s, T defaultValue, Function<String, T> valueParser) {<NEW_LINE>try {<NEW_LINE>if (s == null)<NEW_LINE>return new Pair<>(defaultValue, defaultValue);<NEW_LINE>s = s.trim();<NEW_LINE>if (s.startsWith("[") && s.endsWith("]")) {<NEW_LINE>String[] numbers = s.substring(1, s.length() <MASK><NEW_LINE>if (numbers.length != 2)<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>return new Pair<>(valueParser.apply(numbers[0].trim()), valueParser.apply(numbers[1].trim()));<NEW_LINE>} else {<NEW_LINE>return new Pair<>(valueParser.apply(s), valueParser.apply(s));<NEW_LINE>}<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new IllegalArgumentException("Expected a number or range on the form [min, max], but got '" + s + "'", e);<NEW_LINE>}<NEW_LINE>}
- 1).split(",");
235,907
private void addInnerObjectType(ObjectTypeDefinition type, SrcLinkedClass enclosingType) {<NEW_LINE>String identifier = makeIdentifier(type.getName(), false);<NEW_LINE>String fqn = getFqn() + '.' + identifier;<NEW_LINE>SrcLinkedClass srcClass = new SrcLinkedClass(fqn, enclosingType, Interface).addInterface(GqlType.class.getSimpleName()).addAnnotation(new SrcAnnotationExpression(Structural.class.getSimpleName())).modifiers(Modifier.PUBLIC);<NEW_LINE>addUnionInterfaces(type, srcClass);<NEW_LINE>addActualNameAnnotation(srcClass, type.getName(), false);<NEW_LINE>addSourcePositionAnnotation(srcClass, type, srcClass);<NEW_LINE>List<Type<MASK><NEW_LINE>addInterfaces(srcClass, interfaces);<NEW_LINE>addBuilder(srcClass, type);<NEW_LINE>addCreateMethod(srcClass, type);<NEW_LINE>addBuilderMethod(srcClass, type);<NEW_LINE>addLoadMethod(srcClass);<NEW_LINE>addCopierMethod(srcClass);<NEW_LINE>addCopyMethod(srcClass);<NEW_LINE>List<FieldDefinition> fieldDefinitions = type.getFieldDefinitions();<NEW_LINE>for (FieldDefinition member : fieldDefinitions) {<NEW_LINE>addMember(srcClass, member, name -> fieldDefinitions.stream().anyMatch(f -> f.getName().equals(name)));<NEW_LINE>}<NEW_LINE>addObjectExtensions(type, srcClass);<NEW_LINE>enclosingType.addInnerClass(srcClass);<NEW_LINE>}
> interfaces = type.getImplements();
1,724,816
public void validate(final Processor<FullData, FullData> processor, final ProcessingReport report, final MessageBundle bundle, final FullData data) throws ProcessingException {<NEW_LINE>final JsonNode instance = data.getInstance().getNode();<NEW_LINE>final NodeType type = NodeType.getNodeType(instance);<NEW_LINE>if (types.contains(type)) {<NEW_LINE>report.error(newMsg(data, bundle, "err.draftv3.disallow.type").putArgument("found", type).putArgument(<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final SchemaTree tree = data.getSchema();<NEW_LINE>final JsonPointer schemaPointer = tree.getPointer();<NEW_LINE>final ObjectNode fullReport = FACTORY.objectNode();<NEW_LINE>JsonPointer ptr;<NEW_LINE>ListProcessingReport subReport;<NEW_LINE>FullData newData;<NEW_LINE>int nrSuccess = 0;<NEW_LINE>for (final int index : schemas) {<NEW_LINE>subReport = new ListProcessingReport(report.getLogLevel(), LogLevel.FATAL);<NEW_LINE>ptr = schemaPointer.append(JsonPointer.of(keyword, index));<NEW_LINE>newData = data.withSchema(tree.setPointer(ptr));<NEW_LINE>processor.process(subReport, newData);<NEW_LINE>fullReport.set(ptr.toString(), subReport.asJson());<NEW_LINE>if (subReport.isSuccess())<NEW_LINE>nrSuccess++;<NEW_LINE>}<NEW_LINE>if (nrSuccess != 0)<NEW_LINE>report.error(newMsg(data, bundle, "err.draftv3.disallow.schema").putArgument("matched", nrSuccess).putArgument("nrSchemas", schemas.size()).put("reports", fullReport));<NEW_LINE>}
"disallowed", toArrayNode(types)));
842,337
public int lengthLongestPathIterative(String input) {<NEW_LINE>if (input.length() == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>String[] tokens = input.split("\n");<NEW_LINE>Stack<String> stack = new Stack<>();<NEW_LINE>Stack<Integer> stack1 = new Stack<>();<NEW_LINE>int len = 0;<NEW_LINE>int max = 0;<NEW_LINE>for (String token : tokens) {<NEW_LINE>int level = 0;<NEW_LINE>int i;<NEW_LINE>for (i = 0; i < token.length(); i++) {<NEW_LINE>if (token.charAt(i) == '\t') {<NEW_LINE>level++;<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = token.substring(i);<NEW_LINE>while (!stack1.isEmpty() && level <= stack1.peek()) {<NEW_LINE>stack1.pop();<NEW_LINE>String data = stack.pop();<NEW_LINE>// +1 to account for '\' between folders files<NEW_LINE>len <MASK><NEW_LINE>}<NEW_LINE>if (token.contains(".")) {<NEW_LINE>max = Math.max(max, len + token.length());<NEW_LINE>} else {<NEW_LINE>stack1.push(level);<NEW_LINE>stack.push(token);<NEW_LINE>// +1 to accoutn for '\' between folders files<NEW_LINE>len += token.length() + 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return max;<NEW_LINE>}
-= data.length() + 1;
651,912
public void dispatchLoop() {<NEW_LINE>// System.out.println( "ListenerManager::dispatch thread '" + Thread.currentThread() + "' starts");<NEW_LINE>while (true) {<NEW_LINE>dispatch_sem.reserve();<NEW_LINE>Object[] data = null;<NEW_LINE>synchronized (this) {<NEW_LINE>if (async_thread == null || !async_thread.isCurrentThread()) {<NEW_LINE>// we've been asked to close. this sem reservation must be<NEW_LINE>// "returned" to the pool in case it represents a valid entry<NEW_LINE>// to be picked up by another thread<NEW_LINE>dispatch_sem.release();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (dispatch_queue.size() > 0) {<NEW_LINE>data = (Object[<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (data != null) {<NEW_LINE>try {<NEW_LINE>if (data.length == 4) {<NEW_LINE>dispatchInternal((List<T>) data[0], ((Integer) data[1]).intValue(), data[2]);<NEW_LINE>} else {<NEW_LINE>dispatchInternal((T) data[0], ((Integer) data[1]).intValue(), data[2]);<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>Debug.printStackTrace(e);<NEW_LINE>} finally {<NEW_LINE>if (data[3] != null) {<NEW_LINE>((AESemaphore) data[3]).release();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// System.out.println( "ListenerManager::dispatch thread '" + Thread.currentThread() + "' ends");<NEW_LINE>}
]) dispatch_queue.remove(0);
1,642,708
public Void visitFunctionCall(FunctionCall call, Void v) throws RuntimeException {<NEW_LINE>final String functionName = call.getName();<NEW_LINE>final String fieldName = FieldPathHelper.schemaPath2FieldPath(getSchemaPathArg(call.arg(0))).asPathString();<NEW_LINE>switch(functionName) {<NEW_LINE>case "ojai_sizeof":<NEW_LINE>{<NEW_LINE>// ojai_sizeof(field, "<rel-op>", <int-value>)<NEW_LINE>final String relOp = getStringArg(call.arg(1));<NEW_LINE>final long size = getLongArg(call.arg(2));<NEW_LINE>queryCond = MapRDBImpl.newCondition().sizeOf(fieldName, STRING_TO_RELOP.get(relOp), size).build();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case "ojai_typeof":<NEW_LINE>case "ojai_nottypeof":<NEW_LINE>{<NEW_LINE>// ojai_[not]typeof(field, <type-code>);<NEW_LINE>final int typeCode = getIntArg(call.arg(1));<NEW_LINE>final Value.Type typeValue = Value.Type.valueOf(typeCode);<NEW_LINE>queryCond = MapRDBImpl.newCondition();<NEW_LINE>if (functionName.equals("ojai_typeof")) {<NEW_LINE>queryCond.typeOf(fieldName, typeValue);<NEW_LINE>} else {<NEW_LINE>queryCond.notTypeOf(fieldName, typeValue);<NEW_LINE>}<NEW_LINE>queryCond.build();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case "ojai_matches":<NEW_LINE>case "ojai_notmatches":<NEW_LINE>{<NEW_LINE>// ojai_[not]matches(field, <regex>);<NEW_LINE>final String regex = getStringArg(call.arg(1));<NEW_LINE>if (functionName.equals("ojai_matches")) {<NEW_LINE>queryCond = MapRDBImpl.newCondition().matches(fieldName, regex);<NEW_LINE>} else {<NEW_LINE>queryCond = MapRDBImpl.newCondition().notMatches(fieldName, regex);<NEW_LINE>}<NEW_LINE>queryCond.build();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case "ojai_condition":<NEW_LINE>{<NEW_LINE>// ojai_condition(field, <serialized-condition>);<NEW_LINE>final String condString = getStringArg(call.arg(1));<NEW_LINE>final byte[] condBytes = Base64.decodeBase64(condString);<NEW_LINE>final ByteBuffer condBuffer = ByteBuffer.wrap(condBytes);<NEW_LINE>queryCond = ConditionImpl.parseFrom(condBuffer);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// switch(functionName)<NEW_LINE>return null;<NEW_LINE>}
throw new IllegalArgumentException("unrecognized functionName " + functionName);
1,658,236
final RebootNodeResult executeRebootNode(RebootNodeRequest rebootNodeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(rebootNodeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<RebootNodeRequest> request = null;<NEW_LINE>Response<RebootNodeResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new RebootNodeRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(rebootNodeRequest));<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(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "DAX");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "RebootNode");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<RebootNodeResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new RebootNodeResultJsonUnmarshaller());<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>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
1,824,093
final GetClientCertificateResult executeGetClientCertificate(GetClientCertificateRequest getClientCertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getClientCertificateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetClientCertificateRequest> request = null;<NEW_LINE>Response<GetClientCertificateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetClientCertificateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getClientCertificateRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "API Gateway");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetClientCertificate");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetClientCertificateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetClientCertificateResultJsonUnmarshaller());<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>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,586,532
final DescribeWorkspacesConnectionStatusResult executeDescribeWorkspacesConnectionStatus(DescribeWorkspacesConnectionStatusRequest describeWorkspacesConnectionStatusRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeWorkspacesConnectionStatusRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeWorkspacesConnectionStatusRequest> request = null;<NEW_LINE>Response<DescribeWorkspacesConnectionStatusResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeWorkspacesConnectionStatusRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeWorkspacesConnectionStatusRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkSpaces");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeWorkspacesConnectionStatus");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeWorkspacesConnectionStatusResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeWorkspacesConnectionStatusResultJsonUnmarshaller());<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>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
723,864
protected /* main loop */<NEW_LINE>void go(String[] args) {<NEW_LINE>JenaSystem.init();<NEW_LINE>if (!suppressDeprecationBanner) {<NEW_LINE><MASK><NEW_LINE>System.err.println(" DEPRECATED: Please use 'riot' instead.");<NEW_LINE>System.err.println(" http://jena.apache.org/documentation/io/#command-line-tools");<NEW_LINE>System.err.println("------------------------------------------------------------------");<NEW_LINE>System.err.println();<NEW_LINE>}<NEW_LINE>m_cmdLine.process(args);<NEW_LINE>// process any stored items<NEW_LINE>for (int i = 0; i < m_cmdLine.numItems(); i++) {<NEW_LINE>m_actionQ.add(new ReadAction(m_cmdLine.getItem(i), getExpectedInput()));<NEW_LINE>}<NEW_LINE>for (RCAction aM_actionQ : m_actionQ) {<NEW_LINE>aM_actionQ.run(this);<NEW_LINE>}<NEW_LINE>// generate the output<NEW_LINE>m_model.write(getOutputStream(), m_outputFormat);<NEW_LINE>}
System.err.println("------------------------------------------------------------------");
1,422,402
private void schemeSpecificPart(final UriParser parser) {<NEW_LINE>if (parser.isOpaque()) {<NEW_LINE>if (parser.getSsp() != null) {<NEW_LINE>this.authority = this.host = this.port = null;<NEW_LINE>this.path.setLength(0);<NEW_LINE>this.query.setLength(0);<NEW_LINE>// TODO encode or validate scheme specific part<NEW_LINE>this.ssp = parser.getSsp();<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.ssp = null;<NEW_LINE>if (parser.getAuthority() != null) {<NEW_LINE>if (parser.getUserInfo() == null && parser.getHost() == null && parser.getPort() == null) {<NEW_LINE>this.authority = encode(parser.getAuthority(<MASK><NEW_LINE>this.userInfo = null;<NEW_LINE>this.host = null;<NEW_LINE>this.port = null;<NEW_LINE>} else {<NEW_LINE>this.authority = null;<NEW_LINE>if (parser.getUserInfo() != null) {<NEW_LINE>userInfo(parser.getUserInfo());<NEW_LINE>}<NEW_LINE>if (parser.getHost() != null) {<NEW_LINE>host(parser.getHost());<NEW_LINE>}<NEW_LINE>if (parser.getPort() != null) {<NEW_LINE>this.port = parser.getPort();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (parser.getPath() != null) {<NEW_LINE>this.path.setLength(0);<NEW_LINE>path(parser.getPath());<NEW_LINE>}<NEW_LINE>if (parser.getQuery() != null) {<NEW_LINE>this.query.setLength(0);<NEW_LINE>this.query.append(parser.getQuery());<NEW_LINE>}<NEW_LINE>}
), UriComponent.Type.AUTHORITY);
139,132
protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>ByteBuf buf = (ByteBuf) msg;<NEW_LINE>// header<NEW_LINE>buf.skipBytes(2);<NEW_LINE>// length<NEW_LINE>buf.readUnsignedByte();<NEW_LINE>int type = buf.readUnsignedByte();<NEW_LINE>if (type == MSG_LOGIN) {<NEW_LINE>getDeviceSession(channel, remoteAddress, ByteBufUtil.hexDump(buf.readSlice(8)).substring(1));<NEW_LINE>sendResponse(<MASK><NEW_LINE>} else if (type == MSG_GPS_OFFLINE || type == MSG_GPS_REALTIME) {<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress);<NEW_LINE>if (deviceSession == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Position position = new Position(getProtocolName());<NEW_LINE>position.setDeviceId(deviceSession.getDeviceId());<NEW_LINE>sendResponse(channel, remoteAddress, type, buf.retainedSlice(buf.readerIndex(), 6));<NEW_LINE>DateBuilder dateBuilder = new DateBuilder().setDate(buf.readUnsignedByte(), buf.readUnsignedByte(), buf.readUnsignedByte()).setTime(buf.readUnsignedByte(), buf.readUnsignedByte(), buf.readUnsignedByte());<NEW_LINE>position.setTime(dateBuilder.getDate());<NEW_LINE>double latitude = buf.readUnsignedInt() / 60.0 / 30000.0;<NEW_LINE>double longitude = buf.readUnsignedInt() / 60.0 / 30000.0;<NEW_LINE>int flags = buf.readUnsignedShort();<NEW_LINE>position.setCourse(BitUtil.to(flags, 10));<NEW_LINE>position.setValid(BitUtil.check(flags, 12));<NEW_LINE>if (!BitUtil.check(flags, 10)) {<NEW_LINE>latitude = -latitude;<NEW_LINE>}<NEW_LINE>if (BitUtil.check(flags, 11)) {<NEW_LINE>longitude = -longitude;<NEW_LINE>}<NEW_LINE>position.setLatitude(latitude);<NEW_LINE>position.setLongitude(longitude);<NEW_LINE>return position;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
channel, remoteAddress, type, null);
1,215,314
public boolean apply(Game game, Ability source) {<NEW_LINE>Permanent permanent = game.getPermanent(source.getSourceId());<NEW_LINE>int zcc = game.getState().getZoneChangeCounter(source.getSourceId());<NEW_LINE>if (permanent == null) {<NEW_LINE>permanent = game.getPermanentEntering(source.getSourceId());<NEW_LINE>zcc++;<NEW_LINE>}<NEW_LINE>if (permanent == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), zcc);<NEW_LINE>if (exileId != null) {<NEW_LINE>ExileZone exileZone = game.getExile().getExileZone(exileId);<NEW_LINE>if (exileZone == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Card exiledCard = null;<NEW_LINE>for (Card card : exileZone.getCards(game)) {<NEW_LINE>exiledCard = card;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (exiledCard != null) {<NEW_LINE>int value = exiledCard.getManaValue();<NEW_LINE>permanent.getPower().setValue(value);<NEW_LINE>permanent.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getToughness().setValue(value);
1,716,714
private static void validateSleighFile(ResourceFile relaxSchemaFile, ResourceFile fileToValidate, String type) throws SleighException {<NEW_LINE>FileResolutionResult result = FileUtilities.existsAndIsCaseDependent(fileToValidate);<NEW_LINE>if (!result.isOk()) {<NEW_LINE>throw new SleighException(fileToValidate + " is not properly case dependent: " + result.getMessage());<NEW_LINE>}<NEW_LINE>Verifier verifier = null;<NEW_LINE>try {<NEW_LINE>verifier = getVerifier(relaxSchemaFile);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SleighException("Error creating verifier", e);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>InputStream in = fileToValidate.getInputStream();<NEW_LINE>verifier.setErrorHandler(new VerifierErrorHandler(fileToValidate));<NEW_LINE>verifier.verify(new InputSource(in));<NEW_LINE>in.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SleighException("Invalid " + type + " file: " + <MASK><NEW_LINE>}<NEW_LINE>}
fileToValidate.getAbsolutePath(), e);
461,746
private Optional<ImportIssueInfo> buildImportIssueInfo(@NonNull final Issue issue, @NonNull final ImportIssuesRequest importIssuesRequest, @NonNull final HashMap<GithubIdSearchKey, String> seenExternalIdsByKey) {<NEW_LINE>final GithubIdSearchKey githubIdSearchKey = GithubIdSearchKey.builder().repository(importIssuesRequest.getRepoId()).repositoryOwner(importIssuesRequest.getRepoOwner()).issueNo(String.valueOf(issue.getNumber())).build();<NEW_LINE>if (seenExternalIdsByKey.put(githubIdSearchKey, issue.getId()) != null) {<NEW_LINE>// means it was already imported once in this process run so it will be skipped<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>final ImportIssueInfo.ImportIssueInfoBuilder importInfoBuilder = ImportIssueInfo.builder().externalProjectReferenceId(importIssuesRequest.getExternalProjectReferenceId()).externalProjectType(importIssuesRequest.getExternalProjectType()).externalIssueId(ExternalId.of(ExternalSystem.GITHUB, issue.getId())).externalIssueURL(issue.getHtmlUrl()).externalIssueNo(issue.getNumber()).name(issue.getTitle()).description(issue.getBody()).orgId(importIssuesRequest.getOrgId()).projectId(importIssuesRequest.getProjectId()).effortUomId(HOUR_UOM_ID);<NEW_LINE>if (issue.getGithubMilestone() != null) {<NEW_LINE>importInfoBuilder.milestone(buildMilestone(issue.getGithubMilestone(), importIssuesRequest.getOrgId()));<NEW_LINE>}<NEW_LINE>if (issue.getAssignee() != null) {<NEW_LINE>importInfoBuilder.assigneeId(getUserIdByExternalId(importIssuesRequest.getOrgId(), issue.getAssignee<MASK><NEW_LINE>}<NEW_LINE>processLabels(issue.getLabelList(), importInfoBuilder, importIssuesRequest.getOrgId());<NEW_LINE>if (ResourceState.CLOSED.getValue().equals(issue.getState())) {<NEW_LINE>importInfoBuilder.status(Status.CLOSED);<NEW_LINE>}<NEW_LINE>lookForParentIssue(importIssuesRequest, importInfoBuilder, seenExternalIdsByKey, issue.getBody());<NEW_LINE>return Optional.of(importInfoBuilder.build());<NEW_LINE>}
().getId()));
1,352,633
private long readStreamChunk(ByteBufferStream buffer, long size, MessageDigest md5, MessageDigest sha256) throws IOException {<NEW_LINE>long totalBytesRead = 0;<NEW_LINE>if (this.oneByte != null) {<NEW_LINE>buffer.write(this.oneByte);<NEW_LINE>md5.update(this.oneByte);<NEW_LINE>if (sha256 != null)<NEW_LINE>sha256.update(this.oneByte);<NEW_LINE>totalBytesRead++;<NEW_LINE>this.oneByte = null;<NEW_LINE>}<NEW_LINE>while (totalBytesRead < size) {<NEW_LINE>long bytesToRead = size - totalBytesRead;<NEW_LINE>if (bytesToRead > this.buf16k.length)<NEW_LINE>bytesToRead = this.buf16k.length;<NEW_LINE>int bytesRead = this.stream.read(this.buf16k, 0, (int) bytesToRead);<NEW_LINE>this.eof = (bytesRead < 0);<NEW_LINE>if (this.eof) {<NEW_LINE>if (this.objectSize < 0)<NEW_LINE>break;<NEW_LINE>throw new IOException("unexpected EOF");<NEW_LINE>}<NEW_LINE>buffer.write(this.buf16k, 0, bytesRead);<NEW_LINE>md5.update(this.buf16k, 0, bytesRead);<NEW_LINE>if (sha256 != null)<NEW_LINE>sha256.update(<MASK><NEW_LINE>totalBytesRead += bytesRead;<NEW_LINE>}<NEW_LINE>return totalBytesRead;<NEW_LINE>}
this.buf16k, 0, bytesRead);
1,549,224
public RestartRequirement onApply(UserPrefs rPrefs) {<NEW_LINE>RestartRequirement <MASK><NEW_LINE>if (relaunchRequired_)<NEW_LINE>restartRequirement.setUiReloadRequired(true);<NEW_LINE>String themeName = flatTheme_.getValue();<NEW_LINE>if (!StringUtil.equals(themeName, userPrefs_.globalTheme().getGlobalValue())) {<NEW_LINE>userPrefs_.globalTheme().setGlobalValue(themeName, false);<NEW_LINE>}<NEW_LINE>double fontSize = Double.parseDouble(fontSize_.getValue());<NEW_LINE>userPrefs_.fontSizePoints().setGlobalValue(fontSize);<NEW_LINE>if (!StringUtil.equals(theme_.getValue(), userPrefs_.editorTheme().getGlobalValue())) {<NEW_LINE>userState_.theme().setGlobalValue(themeList_.get(theme_.getValue()));<NEW_LINE>userPrefs_.editorTheme().setGlobalValue(theme_.getValue(), false);<NEW_LINE>}<NEW_LINE>if (!StringUtil.equals(initialFontFace_, fontFace_.getValue())) {<NEW_LINE>String fontFace = fontFace_.getValue();<NEW_LINE>initialFontFace_ = fontFace;<NEW_LINE>if (Desktop.hasDesktopFrame()) {<NEW_LINE>// In desktop mode the font is stored in a per-machine file since<NEW_LINE>// the font list varies between machines.<NEW_LINE>Desktop.getFrame().setFixedWidthFont(fontFace);<NEW_LINE>} else {<NEW_LINE>if (StringUtil.equals(fontFace, DEFAULT_FONT_VALUE)) {<NEW_LINE>// User has chosen the default font face<NEW_LINE>userPrefs_.serverEditorFontEnabled().setGlobalValue(false);<NEW_LINE>} else {<NEW_LINE>// User has chosen a specific font<NEW_LINE>userPrefs_.serverEditorFontEnabled().setGlobalValue(true);<NEW_LINE>userPrefs_.serverEditorFont().setGlobalValue(fontFace);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>restartRequirement.setUiReloadRequired(true);<NEW_LINE>}<NEW_LINE>if (Desktop.hasDesktopFrame()) {<NEW_LINE>if (!StringUtil.equals(initialZoomLevel_, zoomLevel_.getValue())) {<NEW_LINE>double zoomLevel = Double.parseDouble(zoomLevel_.getValue());<NEW_LINE>initialZoomLevel_ = zoomLevel_.getValue();<NEW_LINE>Desktop.getFrame().setZoomLevel(zoomLevel);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return restartRequirement;<NEW_LINE>}
restartRequirement = super.onApply(rPrefs);
242,989
public CreateAssessmentTemplateResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateAssessmentTemplateResult createAssessmentTemplateResult = new CreateAssessmentTemplateResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return createAssessmentTemplateResult;<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("assessmentTemplateArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createAssessmentTemplateResult.setAssessmentTemplateArn(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 createAssessmentTemplateResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,853,013
private void initialize(final String text) {<NEW_LINE>splittedStringList = new ArrayList<IndexPair>();<NEW_LINE>stringWithoutTags = null;<NEW_LINE>{<NEW_LINE>final StringBuffer sb = new StringBuffer();<NEW_LINE>final Matcher matcher = FIND_TAGS_PATTERN.matcher(text);<NEW_LINE>int lastMatchEnd = 0;<NEW_LINE>while (matcher.find()) {<NEW_LINE>final String textWithoutTag = matcher.group(1);<NEW_LINE>int replStart = sb.length();<NEW_LINE>matcher.appendReplacement(sb, "$1");<NEW_LINE>IndexPair indexPair;<NEW_LINE>if (textWithoutTag.length() > 0) {<NEW_LINE>indexPair = new IndexPair(lastMatchEnd, matcher.end(1), replStart, sb.length(), false);<NEW_LINE>lastMatchEnd = matcher.end(1);<NEW_LINE>splittedStringList.add(indexPair);<NEW_LINE>}<NEW_LINE>replStart = sb.length();<NEW_LINE>indexPair = new IndexPair(lastMatchEnd, matcher.end(2), sb.length(), sb.length(), true);<NEW_LINE>lastMatchEnd = matcher.end(2);<NEW_LINE>splittedStringList.add(indexPair);<NEW_LINE>}<NEW_LINE>final int replStart = sb.length();<NEW_LINE>matcher.appendTail(sb);<NEW_LINE>if (sb.length() != replStart) {<NEW_LINE>final IndexPair indexPair = new IndexPair(lastMatchEnd, text.length(), replStart, <MASK><NEW_LINE>splittedStringList.add(indexPair);<NEW_LINE>}<NEW_LINE>stringWithoutTags = sb.toString();<NEW_LINE>}<NEW_LINE>}
sb.length(), false);
276,026
SyntheticBeanBuildItem enableHttpBinders(MicrometerRecorder recorder, MicrometerConfig buildTimeConfig, HttpServerConfig serverConfig, HttpClientConfig clientConfig, VertxConfig vertxConfig, BuildProducer<AdditionalBeanBuildItem> additionalBeans) {<NEW_LINE>boolean clientEnabled = buildTimeConfig.<MASK><NEW_LINE>boolean serverEnabled = buildTimeConfig.checkBinderEnabledWithDefault(buildTimeConfig.binder.httpServer);<NEW_LINE>if (clientEnabled || serverEnabled) {<NEW_LINE>// Protect from uri tag flood<NEW_LINE>createAdditionalBean(additionalBeans, HTTP_METER_FILTER_CONFIGURATION);<NEW_LINE>}<NEW_LINE>// Other things use this bean to test whether or not http server/client metrics are enabled<NEW_LINE>return SyntheticBeanBuildItem.configure(HttpBinderConfiguration.class).scope(Singleton.class).setRuntimeInit().unremovable().runtimeValue(recorder.configureHttpMetrics(serverEnabled, clientEnabled, serverConfig, clientConfig, vertxConfig)).done();<NEW_LINE>}
checkBinderEnabledWithDefault(buildTimeConfig.binder.httpClient);
1,283,202
public LedgerHandle createLedgerAdv(final long ledgerId, int ensSize, int writeQuorumSize, int ackQuorumSize, DigestType digestType, byte[] passwd, final Map<String, byte[]> customMetadata) throws InterruptedException, BKException {<NEW_LINE>CompletableFuture<LedgerHandleAdv> future = new CompletableFuture<>();<NEW_LINE>SyncCreateAdvCallback result = new SyncCreateAdvCallback(future);<NEW_LINE>asyncCreateLedgerAdv(ledgerId, ensSize, writeQuorumSize, ackQuorumSize, digestType, passwd, result, null, customMetadata);<NEW_LINE>LedgerHandle lh = SyncCallbackUtils.waitForResult(future);<NEW_LINE>if (lh == null) {<NEW_LINE>LOG.error("Unexpected condition : no ledger handle returned for a success ledger creation");<NEW_LINE>throw BKException.create(BKException.Code.UnexpectedConditionException);<NEW_LINE>} else if (ledgerId != lh.getId()) {<NEW_LINE>LOG.error("Unexpected condition : Expected ledgerId: {} but got: {}", ledgerId, lh.getId());<NEW_LINE>throw BKException.create(BKException.Code.UnexpectedConditionException);<NEW_LINE>}<NEW_LINE>LOG.info("Ensemble: {} for ledger: {}", lh.getLedgerMetadata().getEnsembleAt(0L<MASK><NEW_LINE>return lh;<NEW_LINE>}
), lh.getId());
1,537,370
private ASTNode createExpressionSegment(final ASTNode astNode, final ParserRuleContext context) {<NEW_LINE>if (astNode instanceof StringLiteralValue) {<NEW_LINE>return new LiteralExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(), ((StringLiteralValue) astNode).getValue());<NEW_LINE>}<NEW_LINE>if (astNode instanceof NumberLiteralValue) {<NEW_LINE>return new LiteralExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(), ((NumberLiteralValue) astNode).getValue());<NEW_LINE>}<NEW_LINE>if (astNode instanceof BooleanLiteralValue) {<NEW_LINE>return new LiteralExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(), ((BooleanLiteralValue<MASK><NEW_LINE>}<NEW_LINE>if (astNode instanceof ParameterMarkerValue) {<NEW_LINE>ParameterMarkerValue parameterMarker = (ParameterMarkerValue) astNode;<NEW_LINE>ParameterMarkerExpressionSegment segment = new ParameterMarkerExpressionSegment(context.start.getStartIndex(), context.stop.getStopIndex(), parameterMarker.getValue(), parameterMarker.getType());<NEW_LINE>parameterMarkerSegments.add(segment);<NEW_LINE>return segment;<NEW_LINE>}<NEW_LINE>if (astNode instanceof SubquerySegment) {<NEW_LINE>return new SubqueryExpressionSegment((SubquerySegment) astNode);<NEW_LINE>}<NEW_LINE>if (astNode instanceof OtherLiteralValue) {<NEW_LINE>return new CommonExpressionSegment(context.getStart().getStartIndex(), context.getStop().getStopIndex(), context.getText());<NEW_LINE>}<NEW_LINE>return astNode;<NEW_LINE>}
) astNode).getValue());
1,628,621
private Collection<PrivilegeType> loadDatabaseGlobalPrivileges(final ResultSet resultSet) throws SQLException {<NEW_LINE>Collection<PrivilegeType> result = new LinkedList<>();<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Select_priv"), PrivilegeType.SELECT, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Insert_priv"), PrivilegeType.INSERT, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Update_priv"), PrivilegeType.UPDATE, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Delete_priv"), PrivilegeType.DELETE, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Create_priv"), PrivilegeType.CREATE, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Alter_priv"), PrivilegeType.ALTER, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Drop_priv"), PrivilegeType.DROP, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Grant_priv"), PrivilegeType.GRANT, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Index_priv"), PrivilegeType.INDEX, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("References_priv"), PrivilegeType.REFERENCES, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Create_tmp_table_priv"), PrivilegeType.CREATE_TMP, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Lock_tables_priv"), PrivilegeType.LOCK_TABLES, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Execute_priv"), PrivilegeType.EXECUTE, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Create_view_priv"), PrivilegeType.CREATE_VIEW, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Show_view_priv"), PrivilegeType.SHOW_VIEW, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Create_routine_priv"), PrivilegeType.CREATE_PROC, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Alter_routine_priv"), PrivilegeType.ALTER_PROC, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Event_priv"), PrivilegeType.EVENT, result);<NEW_LINE>addToPrivilegeTypesIfPresent(resultSet.getObject("Trigger_priv"<MASK><NEW_LINE>return result;<NEW_LINE>}
), PrivilegeType.TRIGGER, result);
559,942
public boolean tryWaitfor(HostPort hostPort, MasterInfo masterInfo, ExecutionLog executionLog) {<NEW_LINE>if (hostPort == null) {<NEW_LINE>executionLog.info("target instance null");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (masterInfo == null) {<NEW_LINE>executionLog.info("master info null, no wait");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String masterReplId = masterInfo.getReplId();<NEW_LINE><MASK><NEW_LINE>if (masterOffset == null || masterOffset <= 0) {<NEW_LINE>executionLog.info("master offset wrong, no wait" + masterOffset);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>executionLog.info(String.format("wait for %s %s", hostPort, masterInfo));<NEW_LINE>try {<NEW_LINE>return doWait(masterReplId, masterOffset, hostPort, executionLog);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("[tryWaitfor]" + hostPort + "," + masterInfo, e);<NEW_LINE>executionLog.error(e.getMessage());<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
Long masterOffset = masterInfo.getMasterReplOffset();
453,365
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject("indexing_pressure");<NEW_LINE>builder.startObject("memory");<NEW_LINE>builder.startObject("current");<NEW_LINE>builder.humanReadableField(COMBINED_IN_BYTES, COMBINED, new ByteSizeValue(currentCombinedCoordinatingAndPrimaryBytes));<NEW_LINE>builder.humanReadableField(COORDINATING_IN_BYTES, COORDINATING, new ByteSizeValue(currentCoordinatingBytes));<NEW_LINE>builder.humanReadableField(PRIMARY_IN_BYTES, PRIMARY, new ByteSizeValue(currentPrimaryBytes));<NEW_LINE>builder.humanReadableField(REPLICA_IN_BYTES, REPLICA, new ByteSizeValue(currentReplicaBytes));<NEW_LINE>builder.humanReadableField(ALL_IN_BYTES, ALL, new ByteSizeValue(currentReplicaBytes + currentCombinedCoordinatingAndPrimaryBytes));<NEW_LINE>builder.endObject();<NEW_LINE>builder.startObject("total");<NEW_LINE>builder.humanReadableField(COMBINED_IN_BYTES, COMBINED, new ByteSizeValue(totalCombinedCoordinatingAndPrimaryBytes));<NEW_LINE>builder.humanReadableField(COORDINATING_IN_BYTES, COORDINATING, new ByteSizeValue(totalCoordinatingBytes));<NEW_LINE>builder.humanReadableField(PRIMARY_IN_BYTES, <MASK><NEW_LINE>builder.humanReadableField(REPLICA_IN_BYTES, REPLICA, new ByteSizeValue(totalReplicaBytes));<NEW_LINE>builder.humanReadableField(ALL_IN_BYTES, ALL, new ByteSizeValue(totalReplicaBytes + totalCombinedCoordinatingAndPrimaryBytes));<NEW_LINE>builder.field(COORDINATING_REJECTIONS, coordinatingRejections);<NEW_LINE>builder.field(PRIMARY_REJECTIONS, primaryRejections);<NEW_LINE>builder.field(REPLICA_REJECTIONS, replicaRejections);<NEW_LINE>builder.endObject();<NEW_LINE>builder.humanReadableField(LIMIT_IN_BYTES, LIMIT, new ByteSizeValue(memoryLimit));<NEW_LINE>builder.endObject();<NEW_LINE>return builder.endObject();<NEW_LINE>}
PRIMARY, new ByteSizeValue(totalPrimaryBytes));
1,763,409
public static DescribeEndpointsResponse unmarshall(DescribeEndpointsResponse describeEndpointsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeEndpointsResponse.setRequestId(_ctx.stringValue("DescribeEndpointsResponse.RequestId"));<NEW_LINE>describeEndpointsResponse.setNetType(_ctx.stringValue("DescribeEndpointsResponse.NetType"));<NEW_LINE>describeEndpointsResponse.setVpcId(_ctx.stringValue("DescribeEndpointsResponse.VpcId"));<NEW_LINE>describeEndpointsResponse.setVSwitchId(_ctx.stringValue("DescribeEndpointsResponse.VSwitchId"));<NEW_LINE>describeEndpointsResponse.setEngine<MASK><NEW_LINE>List<ConnAddrInfo> connAddrs = new ArrayList<ConnAddrInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeEndpointsResponse.ConnAddrs.Length"); i++) {<NEW_LINE>ConnAddrInfo connAddrInfo = new ConnAddrInfo();<NEW_LINE>connAddrInfo.setConnType(_ctx.stringValue("DescribeEndpointsResponse.ConnAddrs[" + i + "].ConnType"));<NEW_LINE>connAddrInfo.setConnAddr(_ctx.stringValue("DescribeEndpointsResponse.ConnAddrs[" + i + "].ConnAddr"));<NEW_LINE>connAddrInfo.setConnAddrPort(_ctx.stringValue("DescribeEndpointsResponse.ConnAddrs[" + i + "].ConnAddrPort"));<NEW_LINE>connAddrInfo.setNetType(_ctx.stringValue("DescribeEndpointsResponse.ConnAddrs[" + i + "].NetType"));<NEW_LINE>connAddrs.add(connAddrInfo);<NEW_LINE>}<NEW_LINE>describeEndpointsResponse.setConnAddrs(connAddrs);<NEW_LINE>return describeEndpointsResponse;<NEW_LINE>}
(_ctx.stringValue("DescribeEndpointsResponse.Engine"));
162,735
public static ListEventAlgorithmResultsResponse unmarshall(ListEventAlgorithmResultsResponse listEventAlgorithmResultsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listEventAlgorithmResultsResponse.setRequestId(_ctx.stringValue("ListEventAlgorithmResultsResponse.RequestId"));<NEW_LINE>listEventAlgorithmResultsResponse.setExtendValue(_ctx.stringValue("ListEventAlgorithmResultsResponse.ExtendValue"));<NEW_LINE>listEventAlgorithmResultsResponse.setMessage(_ctx.stringValue("ListEventAlgorithmResultsResponse.Message"));<NEW_LINE>listEventAlgorithmResultsResponse.setCode(_ctx.stringValue("ListEventAlgorithmResultsResponse.Code"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setTotalPage(_ctx.integerValue("ListEventAlgorithmResultsResponse.Data.TotalPage"));<NEW_LINE>data.setPageNumber(_ctx.integerValue("ListEventAlgorithmResultsResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.integerValue("ListEventAlgorithmResultsResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.integerValue("ListEventAlgorithmResultsResponse.Data.TotalCount"));<NEW_LINE>List<RecordsItem> records = new ArrayList<RecordsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListEventAlgorithmResultsResponse.Data.Records.Length"); i++) {<NEW_LINE>RecordsItem recordsItem = new RecordsItem();<NEW_LINE>recordsItem.setExtendValueTwo(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].ExtendValueTwo"));<NEW_LINE>recordsItem.setRecordId(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].RecordId"));<NEW_LINE>recordsItem.setPicUrlPath(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].PicUrlPath"));<NEW_LINE>recordsItem.setDataSourceId(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].DataSourceId"));<NEW_LINE>recordsItem.setExtendValue(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].ExtendValue"));<NEW_LINE>recordsItem.setExtendValueThree(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].ExtendValueThree"));<NEW_LINE>recordsItem.setFaceCount(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].FaceCount"));<NEW_LINE>recordsItem.setTargetPicUrlPath(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].TargetPicUrlPath"));<NEW_LINE>recordsItem.setEventType(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].EventType"));<NEW_LINE>recordsItem.setCorpId(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].CorpId"));<NEW_LINE>recordsItem.setShotTime(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].ShotTime"));<NEW_LINE>recordsItem.setCapStyle(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].CapStyle"));<NEW_LINE>recordsItem.setTagCode(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].TagCode"));<NEW_LINE>recordsItem.setTagCodeReliability(_ctx.stringValue("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].TagCodeReliability"));<NEW_LINE>recordsItem.setUuidCode(_ctx.stringValue<MASK><NEW_LINE>records.add(recordsItem);<NEW_LINE>}<NEW_LINE>data.setRecords(records);<NEW_LINE>listEventAlgorithmResultsResponse.setData(data);<NEW_LINE>return listEventAlgorithmResultsResponse;<NEW_LINE>}
("ListEventAlgorithmResultsResponse.Data.Records[" + i + "].UuidCode"));
1,766,901
public List<Template> findAllVersions(final Identifier identifier, final User user, final boolean respectFrontendRoles, final boolean bringOldVersions) throws DotDataException, DotSecurityException {<NEW_LINE>Logger.debug(this, () -> "Calling findAllVersions, identifier: " + identifier + ", user: " + user.<MASK><NEW_LINE>if (Template.SYSTEM_TEMPLATE.equals(identifier.getId())) {<NEW_LINE>return includeSystemTemplate(Collections.emptyList());<NEW_LINE>}<NEW_LINE>final List<Template> templateAllVersions = templateFactory.findAllVersions(identifier, bringOldVersions);<NEW_LINE>if (!templateAllVersions.isEmpty() && !permissionAPI.doesUserHavePermission(templateAllVersions.get(0), PermissionAPI.PERMISSION_READ, user, respectFrontendRoles)) {<NEW_LINE>Logger.error(this, "User does not have READ permissions over the Template, so unable to view Versions");<NEW_LINE>throw new DotSecurityException("User does not have READ permissions over the Template, so unable to view Versions");<NEW_LINE>}<NEW_LINE>return templateAllVersions;<NEW_LINE>}
getUserId() + ", bringOldVersions: " + bringOldVersions);
322,989
public Answer createVolume(CreateObjectCommand cmd) {<NEW_LINE>LOGGER.debug("execute createVolume: " + cmd.getClass());<NEW_LINE>DataTO data = cmd.getData();<NEW_LINE>VolumeObjectTO volume = (VolumeObjectTO) data;<NEW_LINE>try {<NEW_LINE>String poolUuid = data.getDataStore().getUuid();<NEW_LINE>String storeUrl = data.getDataStore().getUrl();<NEW_LINE><MASK><NEW_LINE>String host = uri.getHost();<NEW_LINE>String file = getVirtualDiskPath(volume.getUuid(), poolUuid);<NEW_LINE>Long size = volume.getSize();<NEW_LINE>StoragePlugin sp = new StoragePlugin(c);<NEW_LINE>FileProperties fp = sp.storagePluginCreate(poolUuid, host, file, size, false);<NEW_LINE>if (!fp.getName().equals(file)) {<NEW_LINE>return new CreateObjectAnswer("Filename mismatch: " + fp.getName() + " != " + file);<NEW_LINE>}<NEW_LINE>VolumeObjectTO newVol = new VolumeObjectTO();<NEW_LINE>newVol.setName(volume.getName());<NEW_LINE>newVol.setSize(fp.getSize());<NEW_LINE>newVol.setPath(volume.getUuid());<NEW_LINE>return new CreateObjectAnswer(newVol);<NEW_LINE>} catch (Ovm3ResourceException | URISyntaxException e) {<NEW_LINE>LOGGER.info("Volume creation failed: " + e.toString(), e);<NEW_LINE>return new CreateObjectAnswer(e.toString());<NEW_LINE>}<NEW_LINE>}
URI uri = new URI(storeUrl);
319,105
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "p0,p1".split(",");<NEW_LINE>env.<MASK><NEW_LINE>DefaultSupportCaptureOp<Object> captureOp = new DefaultSupportCaptureOp<Object>();<NEW_LINE>EPDataFlowInstantiationOptions options = new EPDataFlowInstantiationOptions();<NEW_LINE>options.operatorProvider(new DefaultSupportGraphOpProvider(captureOp));<NEW_LINE>EPDataFlowInstance instance = env.runtime().getDataFlowService().instantiate(env.deploymentId("flow"), "MyDataFlow", options);<NEW_LINE>EPDataFlowInstanceCaptive captiveStart = instance.startCaptive();<NEW_LINE>assertEquals(0, captiveStart.getRunnables().size());<NEW_LINE>assertEquals(1, captiveStart.getEmitters().size());<NEW_LINE>EPDataFlowEmitterOperator emitter = captiveStart.getEmitters().get("src1");<NEW_LINE>assertEquals(EPDataFlowState.RUNNING, instance.getState());<NEW_LINE>emitter.submit(new Object[] { "E1", 10 });<NEW_LINE>EPAssertionUtil.assertPropsPerRow(captureOp.getCurrent(), fields, new Object[][] { { "E1", 10 } });<NEW_LINE>emitter.submit(new Object[] { "E2", 20 });<NEW_LINE>EPAssertionUtil.assertPropsPerRow(captureOp.getCurrent(), fields, new Object[][] { { "E1", 10 }, { "E2", 20 } });<NEW_LINE>emitter.submitSignal(new EPDataFlowSignalFinalMarker() {<NEW_LINE>});<NEW_LINE>EPAssertionUtil.assertPropsPerRow(captureOp.getCurrent(), fields, new Object[0][]);<NEW_LINE>EPAssertionUtil.assertPropsPerRow(captureOp.getAndReset().get(0).toArray(), fields, new Object[][] { { "E1", 10 }, { "E2", 20 } });<NEW_LINE>emitter.submit(new Object[] { "E3", 30 });<NEW_LINE>EPAssertionUtil.assertPropsPerRow(captureOp.getCurrent(), fields, new Object[][] { { "E3", 30 } });<NEW_LINE>// stays running until cancelled (no transition to complete)<NEW_LINE>assertEquals(EPDataFlowState.RUNNING, instance.getState());<NEW_LINE>instance.cancel();<NEW_LINE>assertEquals(EPDataFlowState.CANCELLED, instance.getState());<NEW_LINE>env.undeployAll();<NEW_LINE>// test doc sample<NEW_LINE>String epl = "@name('flow') create dataflow HelloWorldDataFlow\n" + " create schema SampleSchema(text string),\t// sample type\t\t\n" + "\t\n" + " Emitter -> helloworld.stream<SampleSchema> { name: 'myemitter' }\n" + " LogSink(helloworld.stream) {}";<NEW_LINE>env.compileDeploy(epl);<NEW_LINE>env.runtime().getDataFlowService().instantiate(env.deploymentId("flow"), "HelloWorldDataFlow");<NEW_LINE>env.undeployAll();<NEW_LINE>}
compileDeploy("@name('flow') create dataflow MyDataFlow " + "Emitter -> outstream<MyOAEventType> {name:'src1'}" + "DefaultSupportCaptureOp(outstream) {}");
1,173,928
private static void expandDataFileRules(Path file) throws IOException {<NEW_LINE>boolean modified = false;<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>try (InputStream stream = Files.newInputStream(file);<NEW_LINE>InputStreamReader reader = new InputStreamReader(stream, StandardCharsets.UTF_8);<NEW_LINE>BufferedReader bufferedReader = new BufferedReader(reader)) {<NEW_LINE>String line;<NEW_LINE>boolean verbatim = false;<NEW_LINE>int lineNum = 0;<NEW_LINE>while (null != (line = bufferedReader.readLine())) {<NEW_LINE>++lineNum;<NEW_LINE>if (VERBATIM_RULE_LINE_PATTERN.matcher(line).matches()) {<NEW_LINE>verbatim = true;<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>} else {<NEW_LINE>Matcher ruleMatcher = RULE_LINE_PATTERN.matcher(line);<NEW_LINE>if (ruleMatcher.matches()) {<NEW_LINE>verbatim = false;<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>try {<NEW_LINE>String leftHandSide = ruleMatcher.group(1).trim();<NEW_LINE>String rightHandSide = ruleMatcher.group(2).trim();<NEW_LINE>expandSingleRule(builder, leftHandSide, rightHandSide);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>System.err.println("ERROR in " + file.getFileName() + " line #" + lineNum + ":");<NEW_LINE><MASK><NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>modified = true;<NEW_LINE>} else {<NEW_LINE>if (BLANK_OR_COMMENT_LINE_PATTERN.matcher(line).matches()) {<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>} else {<NEW_LINE>if (verbatim) {<NEW_LINE>builder.append(line).append("\n");<NEW_LINE>} else {<NEW_LINE>modified = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (modified) {<NEW_LINE>System.err.println("Expanding rules in and overwriting " + file.getFileName());<NEW_LINE>Files.writeString(file, builder.toString(), StandardCharsets.UTF_8);<NEW_LINE>}<NEW_LINE>}
e.printStackTrace(System.err);
1,680,489
public void handleMessage(Message message) {<NEW_LINE>if (message.type == Type.CALLBACK) {<NEW_LINE>CallbackMessage cm = (CallbackMessage) message;<NEW_LINE>deliverMessage(cm);<NEW_LINE>lastDelivery = timer.nanoTime();<NEW_LINE>} else if (message.type == Type.CANCEL_RESULT_CALLBACK) {<NEW_LINE>deliverCancelResult((CancelResultMessage) message);<NEW_LINE>lastDelivery = timer.nanoTime();<NEW_LINE>} else if (message.type == Type.COMMAND) {<NEW_LINE>CommandMessage command = (CommandMessage) message;<NEW_LINE>final int what = command.getWhat();<NEW_LINE>if (what == CommandMessage.QUIT) {<NEW_LINE>messageQueue.stop();<NEW_LINE>started.set(false);<NEW_LINE>} else if (what == CommandMessage.RUNNABLE) {<NEW_LINE>command<MASK><NEW_LINE>}<NEW_LINE>} else if (message.type == Type.PUBLIC_QUERY) {<NEW_LINE>((PublicQueryMessage) message).getCallback().onResult(0);<NEW_LINE>}<NEW_LINE>}
.getRunnable().run();
151,946
public final void beforeDownBranch(boolean left) {<NEW_LINE>if (left) {<NEW_LINE>DecisionPath dp = mSolver.getDecisionPath();<NEW_LINE>int last = dp.size() - 1;<NEW_LINE>if (last > 0) {<NEW_LINE>String pdec;<NEW_LINE>pdec = pretty(dp.getDecision(last - 1));<NEW_LINE>Decision dec = dp.getLastDecision();<NEW_LINE>int ari = dec.getArity();<NEW_LINE>sendNode(nc, pid_stack.peek(), alt_stack.pop(), ari, rid, pdec, sendDomain ? domainMessage.print() : "");<NEW_LINE>for (int i = 0; i < ari; i++) {<NEW_LINE>// each child will have the same pid<NEW_LINE>pid_stack.push(nc);<NEW_LINE>}<NEW_LINE>nc++;<NEW_LINE>alt_stack.push(0);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>nc++;<NEW_LINE>alt_stack.push(1);<NEW_LINE>last_stack.push(last);<NEW_LINE>}<NEW_LINE>}
last_stack.push(nc - 1);
1,722,059
public void removeTasksAffectedByPriorityFreeze(List<SingularityTaskRequest> taskRequests) {<NEW_LINE>final Optional<SingularityPriorityFreezeParent<MASK><NEW_LINE>if (maybePriorityFreeze.isPresent()) {<NEW_LINE>final ListIterator<SingularityTaskRequest> iterator = taskRequests.listIterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>final SingularityTaskRequest taskRequest = iterator.next();<NEW_LINE>final double taskPriorityLevel = priorityManager.getTaskPriorityLevelForRequest(taskRequest.getRequest());<NEW_LINE>if (taskPriorityLevel < maybePriorityFreeze.get().getPriorityFreeze().getMinimumPriorityLevel()) {<NEW_LINE>LOG.trace("Skipping scheduled task {} because taskPriorityLevel ({}) is less than active priority freeze ({})", taskRequest.getPendingTask().getPendingTaskId(), taskPriorityLevel, maybePriorityFreeze.get().getPriorityFreeze().getMinimumPriorityLevel());<NEW_LINE>iterator.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> maybePriorityFreeze = priorityManager.getActivePriorityFreeze();
203,802
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.jface.text.rules.RuleBasedScanner#nextToken()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public IToken nextToken() {<NEW_LINE>IToken token = super.nextToken();<NEW_LINE>Object data = token.getData();<NEW_LINE>if (data instanceof CSSTokenType) {<NEW_LINE>switch((CSSTokenType) data) {<NEW_LINE>case MEDIA_KEYWORD:<NEW_LINE>this._inMediaRule = true;<NEW_LINE>break;<NEW_LINE>case LCURLY:<NEW_LINE>this._curlyBraceCount++;<NEW_LINE>break;<NEW_LINE>case RCURLY:<NEW_LINE>this._curlyBraceCount--;<NEW_LINE>if (this._curlyBraceCount == 0 && this._inMediaRule) {<NEW_LINE>this._inMediaRule = false;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case RGB:<NEW_LINE>// fixup colors in selectors<NEW_LINE>if (isOutsideRule()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case CLASS:<NEW_LINE>// potentially fixup a class inside of a ruleset to be a number<NEW_LINE>if (!isOutsideRule()) {<NEW_LINE>try {<NEW_LINE>String text = fDocument.get(getTokenOffset(), getTokenLength());<NEW_LINE>if (CLASS_IS_NUMBER_PATTERN.matcher(text).matches()) {<NEW_LINE>token = createToken(CSSTokenType.NUMBER);<NEW_LINE>}<NEW_LINE>} catch (BadLocationException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return token;<NEW_LINE>}
token = createToken(CSSTokenType.ID);
1,146,619
public static DescribeExposedInstanceListResponse unmarshall(DescribeExposedInstanceListResponse describeExposedInstanceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeExposedInstanceListResponse.setRequestId(_ctx.stringValue("DescribeExposedInstanceListResponse.RequestId"));<NEW_LINE>PageInfo pageInfo = new PageInfo();<NEW_LINE>pageInfo.setCount(_ctx.integerValue("DescribeExposedInstanceListResponse.PageInfo.Count"));<NEW_LINE>pageInfo.setPageSize(_ctx.integerValue("DescribeExposedInstanceListResponse.PageInfo.PageSize"));<NEW_LINE>pageInfo.setTotalCount(_ctx.integerValue("DescribeExposedInstanceListResponse.PageInfo.TotalCount"));<NEW_LINE>pageInfo.setCurrentPage(_ctx.integerValue("DescribeExposedInstanceListResponse.PageInfo.CurrentPage"));<NEW_LINE>describeExposedInstanceListResponse.setPageInfo(pageInfo);<NEW_LINE>List<ExposedInstance> exposedInstances = new ArrayList<ExposedInstance>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeExposedInstanceListResponse.ExposedInstances.Length"); i++) {<NEW_LINE>ExposedInstance exposedInstance = new ExposedInstance();<NEW_LINE>exposedInstance.setUuid(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].Uuid"));<NEW_LINE>exposedInstance.setIntranetIp(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].IntranetIp"));<NEW_LINE>exposedInstance.setInternetIp(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].InternetIp"));<NEW_LINE>exposedInstance.setAsapVulCount(_ctx.integerValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].AsapVulCount"));<NEW_LINE>exposedInstance.setLaterVulCount(_ctx.integerValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].LaterVulCount"));<NEW_LINE>exposedInstance.setNntfVulCount(_ctx.integerValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].NntfVulCount"));<NEW_LINE>exposedInstance.setTotalVulCount(_ctx.integerValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].TotalVulCount"));<NEW_LINE>exposedInstance.setExploitHealthCount(_ctx.integerValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].ExploitHealthCount"));<NEW_LINE>exposedInstance.setExposureComponent(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].ExposureComponent"));<NEW_LINE>exposedInstance.setExposureType(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].ExposureType"));<NEW_LINE>exposedInstance.setExposureTypeId(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].ExposureTypeId"));<NEW_LINE>exposedInstance.setExposurePort(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].ExposurePort"));<NEW_LINE>exposedInstance.setExposureIp(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].ExposureIp"));<NEW_LINE>exposedInstance.setInstanceId(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].InstanceId"));<NEW_LINE>exposedInstance.setInstanceName(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].InstanceName"));<NEW_LINE>exposedInstance.setRegionId(_ctx.stringValue<MASK><NEW_LINE>exposedInstance.setGroupId(_ctx.longValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].GroupId"));<NEW_LINE>exposedInstance.setGroupName(_ctx.stringValue("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].GroupName"));<NEW_LINE>exposedInstances.add(exposedInstance);<NEW_LINE>}<NEW_LINE>describeExposedInstanceListResponse.setExposedInstances(exposedInstances);<NEW_LINE>return describeExposedInstanceListResponse;<NEW_LINE>}
("DescribeExposedInstanceListResponse.ExposedInstances[" + i + "].RegionId"));
609,432
protected void addReceiveEventExtensionElements(JsonNode elementNode, FlowElement flowElement) {<NEW_LINE>String eventKey = getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_EVENT_KEY, elementNode);<NEW_LINE>if (StringUtils.isNotEmpty(eventKey)) {<NEW_LINE><MASK><NEW_LINE>addFlowableExtensionElementWithValue("eventName", getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_EVENT_NAME, elementNode), flowElement);<NEW_LINE>convertJsonToEventOutParameters(elementNode, flowElement);<NEW_LINE>convertJsonToEventCorrelationParameters(elementNode, "eventCorrelationParameter", flowElement);<NEW_LINE>addFlowableExtensionElementWithValue("channelKey", getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_CHANNEL_KEY, elementNode), flowElement);<NEW_LINE>addFlowableExtensionElementWithValue("channelName", getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_CHANNEL_NAME, elementNode), flowElement);<NEW_LINE>addFlowableExtensionElementWithValue("channelType", getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_CHANNEL_TYPE, elementNode), flowElement);<NEW_LINE>addFlowableExtensionElementWithValue("channelDestination", getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_CHANNEL_DESTINATION, elementNode), flowElement);<NEW_LINE>String fixedValue = getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_KEY_DETECTION_FIXED_VALUE, elementNode);<NEW_LINE>String jsonField = getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_KEY_DETECTION_JSON_FIELD, elementNode);<NEW_LINE>String jsonPointer = getPropertyValueAsString(PROPERTY_EVENT_REGISTRY_KEY_DETECTION_JSON_POINTER, elementNode);<NEW_LINE>if (StringUtils.isNotEmpty(fixedValue)) {<NEW_LINE>addFlowableExtensionElementWithValue("keyDetectionType", "fixedValue", flowElement);<NEW_LINE>addFlowableExtensionElementWithValue("keyDetectionValue", fixedValue, flowElement);<NEW_LINE>} else if (StringUtils.isNotEmpty(jsonField)) {<NEW_LINE>addFlowableExtensionElementWithValue("keyDetectionType", "jsonField", flowElement);<NEW_LINE>addFlowableExtensionElementWithValue("keyDetectionValue", jsonField, flowElement);<NEW_LINE>} else if (StringUtils.isNotEmpty(jsonPointer)) {<NEW_LINE>addFlowableExtensionElementWithValue("keyDetectionType", "jsonPointer", flowElement);<NEW_LINE>addFlowableExtensionElementWithValue("keyDetectionValue", jsonPointer, flowElement);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addFlowableExtensionElementWithValue("eventType", eventKey, flowElement);
579,890
static void saveProcessorProperties(@NotNull Map<DataTransferProcessorDescriptor, Map<String, Object>> properties) throws IOException {<NEW_LINE>ByteArrayOutputStream os = new ByteArrayOutputStream();<NEW_LINE>try (Writer writer = new OutputStreamWriter(os, StandardCharsets.UTF_8)) {<NEW_LINE>try (JsonWriter jsonWriter = GSON.newJsonWriter(writer)) {<NEW_LINE>jsonWriter.setIndent(" ");<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>jsonWriter.name(COPY_AS_CFG);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>for (Map.Entry<DataTransferProcessorDescriptor, Map<String, Object>> entries : properties.entrySet()) {<NEW_LINE>JSONUtils.serializeProperties(jsonWriter, entries.getKey().getFullId(), entries.getValue());<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.flush();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String json = new String(os.<MASK><NEW_LINE>getPreferenceStore().setValue(COPY_AS_CFG, json);<NEW_LINE>}
toByteArray(), StandardCharsets.UTF_8);
1,722,246
public boolean intersect(BinaryMapDataObject bo, int lx, int ty, int rx, int by) {<NEW_LINE>// 1. polygon in object<NEW_LINE>if (contain(bo, lx, ty)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// 2. object in polygon<NEW_LINE>if (bo.getPointsLength() == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (bo.getPoint31XTile(0) >= lx && bo.getPoint31XTile(0) <= rx && bo.getPoint31YTile(0) >= ty && bo.getPoint31YTile(0) <= by) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// 3. find intersection<NEW_LINE>for (int i = 1; i < bo.getPointsLength(); i++) {<NEW_LINE>int px = <MASK><NEW_LINE>int x = bo.getPoint31XTile(i);<NEW_LINE>int py = bo.getPoint31YTile(i - 1);<NEW_LINE>int y = bo.getPoint31YTile(i);<NEW_LINE>if (x < lx && px < lx) {<NEW_LINE>continue;<NEW_LINE>} else if (x > rx && px > rx) {<NEW_LINE>continue;<NEW_LINE>} else if (y > by && py > by) {<NEW_LINE>continue;<NEW_LINE>} else if (y < ty && py < ty) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>long in = MapAlgorithms.calculateIntersection(px, py, x, y, lx, rx, by, ty);<NEW_LINE>if (in != -1) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
bo.getPoint31XTile(i - 1);
686,513
private boolean startDownloadRpc(FileReferenceDownload fileReferenceDownload, int retryCount, Connection connection) {<NEW_LINE>Request request = createRequest(fileReferenceDownload);<NEW_LINE>Duration rpcTimeout = rpcTimeout(retryCount);<NEW_LINE>connection.invokeSync(request, rpcTimeout.getSeconds());<NEW_LINE>Level logLevel = (retryCount > 3 ? Level.INFO : Level.FINE);<NEW_LINE>FileReference fileReference = fileReferenceDownload.fileReference();<NEW_LINE>if (validateResponse(request)) {<NEW_LINE>log.log(Level.FINE, () -> "Request callback, OK. Req: " + request + "\nSpec: " + connection);<NEW_LINE>if (request.returnValues().get(0).asInt32() == 0) {<NEW_LINE>log.log(Level.FINE, () -> "Found " + fileReference + <MASK><NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>log.log(logLevel, fileReference + " not found at " + connection.getAddress());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>log.log(logLevel, "Downloading " + fileReference + " from " + connection.getAddress() + " failed:" + " error code " + request.errorCode() + " (" + request.errorMessage() + ")." + " (retry " + retryCount + ", rpc timeout " + rpcTimeout + ")");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
" available at " + connection.getAddress());
754,143
public Object read(final InputStream is) {<NEW_LINE>final EncogReadHelper in = new EncogReadHelper(is);<NEW_LINE>EncogFileSection section;<NEW_LINE>final BasicMLDataSet samples = new BasicMLDataSet();<NEW_LINE>Map<String, String> networkParams = null;<NEW_LINE>PNNKernelType kernel = null;<NEW_LINE>PNNOutputMode outmodel = null;<NEW_LINE>int inputCount = 0;<NEW_LINE>int outputCount = 0;<NEW_LINE>double error = 0;<NEW_LINE>double[] sigma = null;<NEW_LINE>while ((section = in.readNextSection()) != null) {<NEW_LINE>if (section.getSectionName().equals("PNN") && section.getSubSectionName().equals("PARAMS")) {<NEW_LINE>networkParams = section.parseParams();<NEW_LINE>}<NEW_LINE>if (section.getSectionName().equals("PNN") && section.getSubSectionName().equals("NETWORK")) {<NEW_LINE>final Map<String, String> params = section.parseParams();<NEW_LINE>inputCount = EncogFileSection.parseInt(params, PersistConst.INPUT_COUNT);<NEW_LINE>outputCount = EncogFileSection.parseInt(params, PersistConst.OUTPUT_COUNT);<NEW_LINE>kernel = PersistBasicPNN.stringToKernel(params.get(PersistConst.KERNEL));<NEW_LINE>outmodel = PersistBasicPNN.stringToOutputMode(params.get(PersistBasicPNN.PROPERTY_outputMode));<NEW_LINE>error = EncogFileSection.parseDouble(params, PersistConst.ERROR);<NEW_LINE>sigma = section.parseDoubleArray(params, PersistConst.SIGMA);<NEW_LINE>}<NEW_LINE>if (section.getSectionName().equals("PNN") && section.getSubSectionName().equals("SAMPLES")) {<NEW_LINE>for (final String line : section.getLines()) {<NEW_LINE>final List<String> cols = EncogFileSection.splitColumns(line);<NEW_LINE>int index = 0;<NEW_LINE>final MLData inputData = new BasicMLData(inputCount);<NEW_LINE>for (int i = 0; i < inputCount; i++) {<NEW_LINE>inputData.setData(i, CSVFormat.EG_FORMAT.parse(cols.get(index++)));<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>idealData.setData(0, CSVFormat.EG_FORMAT.parse(cols.get(index++)));<NEW_LINE>final MLDataPair pair = new BasicMLDataPair(inputData, idealData);<NEW_LINE>samples.add(pair);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final BasicPNN result = new BasicPNN(kernel, outmodel, inputCount, outputCount);<NEW_LINE>if (networkParams != null) {<NEW_LINE>result.getProperties().putAll(networkParams);<NEW_LINE>}<NEW_LINE>result.setSamples(samples);<NEW_LINE>result.setError(error);<NEW_LINE>if (sigma != null) {<NEW_LINE>EngineArray.arrayCopy(sigma, result.getSigma());<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
MLData idealData = new BasicMLData(outputCount);
924,796
private boolean checkLine(Polygon2D_F64 square, float grayThreshold, int side) {<NEW_LINE>// find the mid point between two parallel sides<NEW_LINE>int c0 = side;<NEW_LINE>int c1 = (side + 1) % 4;<NEW_LINE>int c2 = (side + 2) % 4;<NEW_LINE>int c3 = (side + 3) % 4;<NEW_LINE>UtilPoint2D_F64.mean(square.get(c0), square.get(c1), segment.a);<NEW_LINE>UtilPoint2D_F64.mean(square.get(c2), square.get(c3), segment.b);<NEW_LINE>UtilLine2D_F64.convert(segment, parametric);<NEW_LINE>// Scan along the line plus some extra<NEW_LINE>int period = samples.length / 9;<NEW_LINE>double N = samples.length - 2 * period - 1;<NEW_LINE>for (int i = 0; i < samples.length; i++) {<NEW_LINE>double location = (i - period) / N;<NEW_LINE>float x = (float) (parametric.p.x + location * parametric.slope.x);<NEW_LINE>float y = (float) (parametric.p.y + location * parametric.slope.y);<NEW_LINE>samples[i] = <MASK><NEW_LINE>}<NEW_LINE>// threshold and compute run length encoding<NEW_LINE>int size = 0;<NEW_LINE>boolean black = samples[0] < grayThreshold;<NEW_LINE>type[0] = black ? 0 : 1;<NEW_LINE>for (int i = 0; i < samples.length; i++) {<NEW_LINE>boolean b = samples[i] < grayThreshold;<NEW_LINE>if (black == b) {<NEW_LINE>length[size]++;<NEW_LINE>} else {<NEW_LINE>black = b;<NEW_LINE>if (size < type.length - 1) {<NEW_LINE>size += 1;<NEW_LINE>type[size] = black ? 0 : 1;<NEW_LINE>length[size] = 1;<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>size++;<NEW_LINE>// if too simple or too complex reject<NEW_LINE>if (size < 5 || size > 9)<NEW_LINE>return false;<NEW_LINE>// detect finder pattern inside RLE<NEW_LINE>for (int i = 0; i + 5 <= size; i++) {<NEW_LINE>if (type[i] != 0)<NEW_LINE>continue;<NEW_LINE>int black0 = length[i];<NEW_LINE>int black1 = length[i + 2];<NEW_LINE>int black2 = length[i + 4];<NEW_LINE>int white0 = length[i + 1];<NEW_LINE>int white1 = length[i + 3];<NEW_LINE>// the center black area can get exagerated easily<NEW_LINE>if (black0 < 0.4 * white0 || black0 > 3 * white0)<NEW_LINE>continue;<NEW_LINE>if (black2 < 0.4 * white1 || black2 > 3 * white1)<NEW_LINE>continue;<NEW_LINE>int black02 = black0 + black2;<NEW_LINE>if (black1 >= black02 && black1 <= 2 * black02)<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
interpolate.get(x, y);
745,099
public EAtom read_atom() throws IOException {<NEW_LINE>int tag;<NEW_LINE>int len;<NEW_LINE>byte[] strbuf;<NEW_LINE>String atom;<NEW_LINE>tag = read1skip_version();<NEW_LINE>if (tag == EExternal.atomCacheRef) {<NEW_LINE>int index = read1() & 0xff;<NEW_LINE>EAtom res = atom_cache_refs[index];<NEW_LINE>if (res == null) {<NEW_LINE>throw new IOException("no cached atom at " + index);<NEW_LINE>}<NEW_LINE>return res;<NEW_LINE>}<NEW_LINE>if (tag == EExternal.smallAtomTag) {<NEW_LINE>len = read1();<NEW_LINE>} else {<NEW_LINE>if (tag != EExternal.atomTag) {<NEW_LINE>throw new IOException("wrong tag encountered, expected " + EExternal.atomTag + ", got " + tag);<NEW_LINE>}<NEW_LINE>len = read2BE();<NEW_LINE>}<NEW_LINE>strbuf = new byte[len];<NEW_LINE>this.readN(strbuf);<NEW_LINE>char[<MASK><NEW_LINE>for (int i = 0; i < len; i++) {<NEW_LINE>in[i] = (char) (strbuf[i] & 0xff);<NEW_LINE>}<NEW_LINE>atom = new String(in);<NEW_LINE>if (atom.length() > EExternal.maxAtomLength) {<NEW_LINE>atom = atom.substring(0, EExternal.maxAtomLength);<NEW_LINE>}<NEW_LINE>if (safeMode) {<NEW_LINE>return EAtom.existing_atom(atom);<NEW_LINE>} else {<NEW_LINE>return EAtom.intern(atom);<NEW_LINE>}<NEW_LINE>}
] in = new char[len];
256,892
public void checkMailAccountConfiguration(EmailAccount mailAccount) throws AxelorException, MessagingException {<NEW_LINE>com.axelor.mail.MailAccount account = getMailAccount(mailAccount);<NEW_LINE>Session session = account.getSession();<NEW_LINE>try {<NEW_LINE>if (mailAccount.getServerTypeSelect().equals(EmailAccountRepository.SERVER_TYPE_SMTP)) {<NEW_LINE>Transport transport = session.getTransport(getProtocol(mailAccount));<NEW_LINE>transport.connect(mailAccount.getHost(), mailAccount.getPort(), mailAccount.getLogin(), mailAccount.getPassword());<NEW_LINE>transport.close();<NEW_LINE>} else {<NEW_LINE>session<MASK><NEW_LINE>}<NEW_LINE>} catch (AuthenticationFailedException e) {<NEW_LINE>throw new AxelorException(e, mailAccount, TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.MAIL_ACCOUNT_1));<NEW_LINE>} catch (NoSuchProviderException e) {<NEW_LINE>throw new AxelorException(e, mailAccount, TraceBackRepository.CATEGORY_CONFIGURATION_ERROR, I18n.get(IExceptionMessage.MAIL_ACCOUNT_2));<NEW_LINE>}<NEW_LINE>}
.getStore().connect();
312,284
public io.kubernetes.client.proto.V1Rbac.Role buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1Rbac.Role result = new io.kubernetes.client.proto.V1Rbac.Role(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>if (metadataBuilder_ == null) {<NEW_LINE>result.metadata_ = metadata_;<NEW_LINE>} else {<NEW_LINE>result.metadata_ = metadataBuilder_.build();<NEW_LINE>}<NEW_LINE>if (rulesBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>rules_ = java.<MASK><NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>}<NEW_LINE>result.rules_ = rules_;<NEW_LINE>} else {<NEW_LINE>result.rules_ = rulesBuilder_.build();<NEW_LINE>}<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
util.Collections.unmodifiableList(rules_);
117,582
void editLatexInEditor(final NodeModel node) {<NEW_LINE>LatexExtension latexExtension = <MASK><NEW_LINE>final String equation;<NEW_LINE>// if no LaTeX is attached, create one<NEW_LINE>if (latexExtension == null) {<NEW_LINE>equation = LegacyLatexEditor.editLatex("", node);<NEW_LINE>} else // if LaTeX is present edit it<NEW_LINE>{<NEW_LINE>equation = LegacyLatexEditor.editLatex(latexExtension.getEquation(), node);<NEW_LINE>}<NEW_LINE>// return on cancel<NEW_LINE>if (equation == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!"".equals(equation.trim())) {<NEW_LINE>if (latexExtension == null) {<NEW_LINE>latexExtension = new LatexExtension();<NEW_LINE>undoableActivateHook(node, latexExtension);<NEW_LINE>}<NEW_LINE>setEquationUndoable(latexExtension, equation);<NEW_LINE>} else if (latexExtension != null) {<NEW_LINE>undoableDeactivateHook(node);<NEW_LINE>}<NEW_LINE>}
node.getExtension(LatexExtension.class);
426,636
public static void cleanupMongoDBEntries(String httpString, Integer defaultPort) throws Exception {<NEW_LINE>HttpURLConnection con = null;<NEW_LINE>try {<NEW_LINE>msgUtils.printMethodName("cleanupMongoDBEntries");<NEW_LINE>Log.info(thisClass, "cleanupMongoDBEntries", "Drop DataBases through the server");<NEW_LINE>URL setupURL = AutomationTools.getNewUrl(httpString + "/oAuth20MongoSetup?port=" + defaultPort + "&dropDB=true" + dbInfo);<NEW_LINE>Log.info(thisClass, "cleanupMongoDBEntries", "cleanupURL: " + setupURL);<NEW_LINE>con = (HttpURLConnection) setupURL.openConnection();<NEW_LINE>con.setDoInput(true);<NEW_LINE>con.setDoOutput(true);<NEW_LINE>con.setUseCaches(false);<NEW_LINE>con.setRequestMethod("GET");<NEW_LINE>InputStream is = con.getInputStream();<NEW_LINE>InputStreamReader isr = new InputStreamReader(is);<NEW_LINE>BufferedReader br = new BufferedReader(isr);<NEW_LINE>String <MASK><NEW_LINE>StringBuilder lines = new StringBuilder();<NEW_LINE>// Send output from servlet to console output<NEW_LINE>for (String line = br.readLine(); line != null; line = br.readLine()) {<NEW_LINE>lines.append(line).append(sep);<NEW_LINE>Log.info(thisClass, "cleanupMongoDBEntries", line);<NEW_LINE>}<NEW_LINE>con.disconnect();<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.info(thisClass, "cleanupMongoDBEntries", "Exception occurred: " + e.toString());<NEW_LINE>Log.error(thisClass, "cleanupMongoDBEntries", e, "Exception occurred");<NEW_LINE>System.err.println("Exception: " + e);<NEW_LINE>if (con != null) {<NEW_LINE>con.disconnect();<NEW_LINE>}<NEW_LINE>// throw e;<NEW_LINE>}<NEW_LINE>}
sep = System.getProperty("line.separator");
1,128,912
protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, String name, String date) throws Exception {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>List<Wo> wraps = null;<NEW_LINE>Business business = null;<NEW_LINE>List<String> ids = null;<NEW_LINE>List<StatisticUnitForDay> statisticUnitForDay_list = null;<NEW_LINE>List<String> unitNames = new ArrayList<String>();<NEW_LINE>if ("(0)".equals(name)) {<NEW_LINE>name = null;<NEW_LINE>}<NEW_LINE>if ("(0)".equals(date)) {<NEW_LINE>date = null;<NEW_LINE>}<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>business = new Business(emc);<NEW_LINE>if (StringUtils.isNotEmpty(name)) {<NEW_LINE>getTopUnitNameList(name, unitNames, effectivePerson.getDebugger());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>ids = business.getStatisticUnitForDayFactory().listByUnitDayDate(unitNames, date);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e, effectivePerson, request, null);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (ids != null && !ids.isEmpty()) {<NEW_LINE>statisticUnitForDay_list = business.<MASK><NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e, effectivePerson, request, null);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (statisticUnitForDay_list != null && !statisticUnitForDay_list.isEmpty()) {<NEW_LINE>wraps = Wo.copier.copy(statisticUnitForDay_list);<NEW_LINE>result.setData(wraps);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e, effectivePerson, request, null);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>result.error(e);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
getStatisticUnitForDayFactory().list(ids);
1,141,264
public DescribeBillingGroupResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeBillingGroupResult describeBillingGroupResult = new DescribeBillingGroupResult();<NEW_LINE><MASK><NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("billingGroupName")) {<NEW_LINE>describeBillingGroupResult.setBillingGroupName(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("billingGroupId")) {<NEW_LINE>describeBillingGroupResult.setBillingGroupId(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("billingGroupArn")) {<NEW_LINE>describeBillingGroupResult.setBillingGroupArn(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("version")) {<NEW_LINE>describeBillingGroupResult.setVersion(LongJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("billingGroupProperties")) {<NEW_LINE>describeBillingGroupResult.setBillingGroupProperties(BillingGroupPropertiesJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("billingGroupMetadata")) {<NEW_LINE>describeBillingGroupResult.setBillingGroupMetadata(BillingGroupMetadataJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return describeBillingGroupResult;<NEW_LINE>}
AwsJsonReader reader = context.getReader();
887,272
static PolystarShape newInstance(JSONObject json, LottieComposition composition) {<NEW_LINE>Type type = Type.forValue(json.optInt("sy"));<NEW_LINE>AnimatableFloatValue points = AnimatableFloatValue.Factory.newInstance(json.optJSONObject("pt"), composition, false);<NEW_LINE>AnimatableValue<PointF> position = AnimatablePathValue.createAnimatablePathOrSplitDimensionPath(json.optJSONObject("p"), composition);<NEW_LINE>AnimatableFloatValue rotation = AnimatableFloatValue.Factory.newInstance(json.optJSONObject("r"), composition, false);<NEW_LINE>AnimatableFloatValue outerRadius = AnimatableFloatValue.Factory.newInstance(json.optJSONObject("or"), composition);<NEW_LINE>AnimatableFloatValue outerRoundedness = AnimatableFloatValue.Factory.newInstance(json.optJSONObject("os"), composition, false);<NEW_LINE>AnimatableFloatValue innerRadius;<NEW_LINE>AnimatableFloatValue innerRoundedness;<NEW_LINE>if (type == Type.Star) {<NEW_LINE>innerRadius = AnimatableFloatValue.Factory.newInstance(json<MASK><NEW_LINE>innerRoundedness = AnimatableFloatValue.Factory.newInstance(json.optJSONObject("is"), composition, false);<NEW_LINE>} else {<NEW_LINE>innerRadius = null;<NEW_LINE>innerRoundedness = null;<NEW_LINE>}<NEW_LINE>return new PolystarShape(type, points, position, rotation, innerRadius, outerRadius, innerRoundedness, outerRoundedness);<NEW_LINE>}
.optJSONObject("ir"), composition);
1,573,361
public void createVideoCallView(Message message, ImageView attachmentIcon, TextView messageTextView) {<NEW_LINE>if (message.getMetadata() == null || message.getMetadata().isEmpty()) {<NEW_LINE>if (attachmentIcon != null) {<NEW_LINE>attachmentIcon.setImageResource(R.drawable.ic_videocam_white_24px);<NEW_LINE>attachmentIcon.setColorFilter(R.color.applozic_green_color);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (messageTextView != null) {<NEW_LINE>messageTextView.setText(VideoCallNotificationHelper.getStatus<MASK><NEW_LINE>}<NEW_LINE>if (attachmentIcon != null) {<NEW_LINE>attachmentIcon.setVisibility(View.VISIBLE);<NEW_LINE>if (VideoCallNotificationHelper.isMissedCall(message)) {<NEW_LINE>attachmentIcon.setImageResource(R.drawable.ic_communication_call_missed);<NEW_LINE>} else if (VideoCallNotificationHelper.isAudioCall(message)) {<NEW_LINE>attachmentIcon.setImageResource(R.drawable.applozic_ic_action_call_holo_light);<NEW_LINE>} else {<NEW_LINE>attachmentIcon.setImageResource(R.drawable.ic_videocam_white_24px);<NEW_LINE>attachmentIcon.setColorFilter(R.color.applozic_green_color);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(message.getMetadata()));
1,298,329
private void resolveTime(long hod, long moh, long som, long nos) {<NEW_LINE>if (resolverStyle == ResolverStyle.LENIENT) {<NEW_LINE>long totalNanos = Math.multiplyExact(hod, 3600_000_000_000L);<NEW_LINE>totalNanos = Math.addExact(totalNanos, Math.multiplyExact(moh, 60_000_000_000L));<NEW_LINE>totalNanos = Math.addExact(totalNanos, Math.multiplyExact(som, 1_000_000_000L));<NEW_LINE>totalNanos = Math.addExact(totalNanos, nos);<NEW_LINE>// safe int cast<NEW_LINE>int excessDays = (int) Math.floorDiv(totalNanos, 86400_000_000_000L);<NEW_LINE>long nod = Math.floorMod(totalNanos, 86400_000_000_000L);<NEW_LINE>updateCheckConflict(LocalTime.ofNanoOfDay(nod), Period.ofDays(excessDays));<NEW_LINE>} else {<NEW_LINE>// STRICT or SMART<NEW_LINE>int mohVal = MINUTE_OF_HOUR.checkValidIntValue(moh);<NEW_LINE>int nosVal = NANO_OF_SECOND.checkValidIntValue(nos);<NEW_LINE>// handle 24:00 end of day<NEW_LINE>if (resolverStyle == ResolverStyle.SMART && hod == 24 && mohVal == 0 && som == 0 && nosVal == 0) {<NEW_LINE>updateCheckConflict(LocalTime.MIDNIGHT, Period.ofDays(1));<NEW_LINE>} else {<NEW_LINE>int <MASK><NEW_LINE>int somVal = SECOND_OF_MINUTE.checkValidIntValue(som);<NEW_LINE>updateCheckConflict(LocalTime.of(hodVal, mohVal, somVal, nosVal), Period.ZERO);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
hodVal = HOUR_OF_DAY.checkValidIntValue(hod);
482,263
private String drawClassInfo() {<NEW_LINE>final CodeSource cs = clazz.getProtectionDomain().getCodeSource();<NEW_LINE>final TTable tTable = new TTable(new TTable.ColumnDefine[] { new TTable.ColumnDefine(50, TTable.Align.RIGHT), new TTable.ColumnDefine(80, TTable.Align.LEFT) }).addRow("class-info", tranClassName(clazz)).addRow("code-source", getCodeSource(cs)).addRow("name", tranClassName(clazz)).addRow("isInterface", clazz.isInterface()).addRow("isAnnotation", clazz.isAnnotation()).addRow("isEnum", clazz.isEnum()).addRow("isAnonymousClass", clazz.isAnonymousClass()).addRow("isArray", clazz.isArray()).addRow("isLocalClass", clazz.isLocalClass()).addRow("isMemberClass", clazz.isMemberClass()).addRow("isPrimitive", clazz.isPrimitive()).addRow("isSynthetic", clazz.isSynthetic()).addRow("simple-name", clazz.getSimpleName()).addRow("modifier", tranModifier(clazz.getModifiers())).addRow("annotation", drawAnnotation()).addRow("interfaces", drawInterface()).addRow("super-class", drawSuperClass()).addRow("class-loader", drawClassLoader());<NEW_LINE>if (isPrintField) {<NEW_LINE>tTable.<MASK><NEW_LINE>}<NEW_LINE>return tTable.padding(1).rendering();<NEW_LINE>}
addRow("fields", drawField());
1,666,028
private boolean addOrderedElement(Ordered adding) {<NEW_LINE>boolean added = false;<NEW_LINE>E[] tempUnorderedElements = (E[]) this.elements.toArray();<NEW_LINE>if (this.elements.contains(adding)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>this.elements.clear();<NEW_LINE>if (tempUnorderedElements.length == 0) {<NEW_LINE>added = this.elements.add((E) adding);<NEW_LINE>} else {<NEW_LINE>Set tempSet = new LinkedHashSet();<NEW_LINE>for (E current : tempUnorderedElements) {<NEW_LINE>if (current instanceof Ordered) {<NEW_LINE>if (this.comparator.compare(adding, current) < 0) {<NEW_LINE>added = this.elements.add((E) adding);<NEW_LINE>this.elements.add(current);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>tempSet.add(current);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!added) {<NEW_LINE>added = this.elements.add((E) adding);<NEW_LINE>}<NEW_LINE>for (Object object : tempSet) {<NEW_LINE>this.elements.add((E) object);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return added;<NEW_LINE>}
this.elements.add(current);
195,207
private Response doHttpGet(String url, boolean addIfModifiedSinceHeader) throws IOException {<NEW_LINE>final Request.Builder requestBuilder = new Request.Builder().get().url(url).header("User-Agent", "Graylog (server)");<NEW_LINE>if (addIfModifiedSinceHeader) {<NEW_LINE>final String lastModified = this.lastLastModified.get().get(url);<NEW_LINE>if (lastModified != null) {<NEW_LINE>requestBuilder.header("If-Modified-Since", lastModified);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Call request = client.newCall(requestBuilder.build());<NEW_LINE>final Response response = request.execute();<NEW_LINE>if (response.isSuccessful()) {<NEW_LINE>final String lastModifiedHeader = response.header("Last-Modified", DateTime.now(DateTimeZone<MASK><NEW_LINE>final Map<String, String> newLastModified = new HashMap<>(this.lastLastModified.get());<NEW_LINE>newLastModified.put(url, lastModifiedHeader);<NEW_LINE>this.lastLastModified.set(ImmutableMap.copyOf(newLastModified));<NEW_LINE>return response;<NEW_LINE>} else {<NEW_LINE>response.close();<NEW_LINE>if (response.code() != 304) {<NEW_LINE>throw new IOException("Request failed: " + response.message());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
.UTC).toString());
449,045
public static void average(InterleavedS64 from, GrayS64 to) {<NEW_LINE>final int numBands = from.getNumBands();<NEW_LINE>if (numBands == 1) {<NEW_LINE>for (int y = 0; y < from.height; y++) {<NEW_LINE>int indexFrom = from.getIndex(0, y);<NEW_LINE>int indexTo = to.getIndex(0, y);<NEW_LINE>System.arraycopy(from.data, indexFrom, to.data, indexTo, from.width);<NEW_LINE>}<NEW_LINE>} else if (numBands == 2) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, from.height, y -> {<NEW_LINE>for (int y = 0; y < from.height; y++) {<NEW_LINE>int indexFrom = from.getIndex(0, y);<NEW_LINE>int indexTo = to.getIndex(0, y);<NEW_LINE>int indexEndTo = indexTo + from.width;<NEW_LINE>while (indexTo < indexEndTo) {<NEW_LINE>// for (int x = 0; x < from.width; x++ ) {<NEW_LINE>long sum = from.data[indexFrom++];<NEW_LINE>sum += from.data[indexFrom++];<NEW_LINE>to.data[indexTo++] = (sum / 2);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>} else if (numBands == 3) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, from.height, y -> {<NEW_LINE>for (int y = 0; y < from.height; y++) {<NEW_LINE>int indexFrom = from.getIndex(0, y);<NEW_LINE>int indexTo = <MASK><NEW_LINE>int indexEndTo = indexTo + from.width;<NEW_LINE>while (indexTo < indexEndTo) {<NEW_LINE>// for (int x = 0; x < from.width; x++ ) {<NEW_LINE>long sum = from.data[indexFrom++];<NEW_LINE>sum += from.data[indexFrom++];<NEW_LINE>sum += from.data[indexFrom++];<NEW_LINE>to.data[indexTo++] = (sum / 3);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>} else {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, from.height, y -> {<NEW_LINE>for (int y = 0; y < from.height; y++) {<NEW_LINE>int indexFrom = from.getIndex(0, y);<NEW_LINE>int indexTo = to.getIndex(0, y);<NEW_LINE>for (int x = 0; x < from.width; x++) {<NEW_LINE>long sum = 0;<NEW_LINE>int indexFromEnd = indexFrom + numBands;<NEW_LINE>while (indexFrom < indexFromEnd) {<NEW_LINE>sum += from.data[indexFrom++];<NEW_LINE>}<NEW_LINE>to.data[indexTo++] = (sum / numBands);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}<NEW_LINE>}
to.getIndex(0, y);
618,415
/* package */<NEW_LINE>void updateQM_QtyDeliveredAvg(final IQualityInspectionOrder qiOrder, final IQualityInspectionOrder qiOrderPrevious) {<NEW_LINE>//<NEW_LINE>// Case of First Quality Inspection Order<NEW_LINE>// => we just need to copy QtyDelivered to QM_QtyDeliveredAvg<NEW_LINE>if (qiOrderPrevious == null) {<NEW_LINE>Check.assume(qiOrder.getInspectionNumber() == 1, "qiOrder shall have inspection number 1");<NEW_LINE>for (final IProductionMaterial productionMaterial : qiOrder.getProductionMaterials()) {<NEW_LINE>productionMaterial.setQM_QtyDeliveredAvg(productionMaterial.getQty());<NEW_LINE>save(productionMaterial);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Get and check Inspection Numbers<NEW_LINE>Check.assumeNotNull(qiOrder, "qiOrder not null");<NEW_LINE>final int inspectionNumber = qiOrder.getInspectionNumber();<NEW_LINE>Check.assume(inspectionNumber >= 1, "inspectionNumber >= 1");<NEW_LINE>final int previousInspectionNumber = inspectionNumber - 1;<NEW_LINE>Check.assume(previousInspectionNumber == <MASK><NEW_LINE>//<NEW_LINE>// Update production materials<NEW_LINE>for (final IProductionMaterial productionMaterial : qiOrder.getProductionMaterials()) {<NEW_LINE>final Quantity qtyDelivered = getQtyDelivered(productionMaterial);<NEW_LINE>final IProductionMaterial previousProductionMaterial = qiOrderPrevious.getProductionMaterial(productionMaterial.getM_Product());<NEW_LINE>final Quantity previousQtyDeliveredAvg;<NEW_LINE>if (previousProductionMaterial == null) {<NEW_LINE>logger.info("The previous PP_Order {} has no material that matches the material {} of the current PP_Order {}; was the BOM changed?", new Object[] { qiOrderPrevious, productionMaterial, qiOrder });<NEW_LINE>previousQtyDeliveredAvg = qtyDelivered;<NEW_LINE>} else {<NEW_LINE>previousQtyDeliveredAvg = getQtyDeliveredAvg(previousProductionMaterial, qtyDelivered.getUOM());<NEW_LINE>}<NEW_LINE>final Quantity qtyDeliveredAvg = qtyDelivered.weightedAverage(previousQtyDeliveredAvg.toBigDecimal(), previousInspectionNumber);<NEW_LINE>productionMaterial.setQM_QtyDeliveredAvg(qtyDeliveredAvg.toBigDecimal());<NEW_LINE>save(productionMaterial);<NEW_LINE>}<NEW_LINE>}
qiOrderPrevious.getInspectionNumber(), "Previous QI order has invalid inspection number");
1,459,826
private void importMissingProjectLibraries(@Nonnull Module module, @Nonnull Collection<DataNode<LibraryDependencyData>> nodesToImport, boolean synchronous) {<NEW_LINE>LibraryTable libraryTable = ProjectLibraryTable.getInstance(module.getProject());<NEW_LINE>List<DataNode<LibraryData><MASK><NEW_LINE>for (DataNode<LibraryDependencyData> dataNode : nodesToImport) {<NEW_LINE>final LibraryDependencyData dependencyData = dataNode.getData();<NEW_LINE>if (dependencyData.getLevel() != LibraryLevel.PROJECT) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final Library library = libraryTable.getLibraryByName(dependencyData.getInternalName());<NEW_LINE>if (library == null) {<NEW_LINE>DataNode<ProjectData> projectNode = dataNode.getDataNode(ProjectKeys.PROJECT);<NEW_LINE>if (projectNode != null) {<NEW_LINE>DataNode<LibraryData> libraryNode = ExternalSystemApiUtil.find(projectNode, ProjectKeys.LIBRARY, new BooleanFunction<DataNode<LibraryData>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean fun(DataNode<LibraryData> node) {<NEW_LINE>return node.getData().equals(dependencyData.getTarget());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (libraryNode != null) {<NEW_LINE>librariesToImport.add(libraryNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!librariesToImport.isEmpty()) {<NEW_LINE>LibraryDataService.getInstance().importData(librariesToImport, module.getProject(), synchronous);<NEW_LINE>}<NEW_LINE>}
> librariesToImport = ContainerUtilRt.newArrayList();
270,745
public void relocate(MachoRelocation relocation) throws MemoryAccessException, NotFoundException {<NEW_LINE>if (!relocation.requiresRelocation()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>RelocationInfo relocationInfo = relocation.getRelocationInfo();<NEW_LINE>Address targetAddr = relocation.getTargetAddress();<NEW_LINE>long orig = read(relocation);<NEW_LINE>switch(relocationInfo.getType()) {<NEW_LINE>case ARM_RELOC_VANILLA:<NEW_LINE>if (!relocationInfo.isPcRelocated()) {<NEW_LINE>write(relocation, targetAddr.getOffset());<NEW_LINE>} else {<NEW_LINE>throw new NotFoundException("Unimplemented relocation");<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ARM_THUMB_RELOC_BR22:<NEW_LINE>{<NEW_LINE>// BL and BLX<NEW_LINE>boolean blx = (orig & 0xd000f800) == 0xc000f000;<NEW_LINE>long s = (orig >> 10) & 0x1;<NEW_LINE>long j1 = <MASK><NEW_LINE>long j2 = (orig >> 27) & 0x1;<NEW_LINE>long i1 = ~(j1 ^ s) & 0x1;<NEW_LINE>long i2 = ~(j2 ^ s) & 0x1;<NEW_LINE>long imm10 = orig & 0x3ff;<NEW_LINE>long imm11 = (orig >> 16) & 0x7ff;<NEW_LINE>long addend = (s << 24) | (i1 << 23) | (i2 << 22) | (imm10 << 12) | (imm11 << 1);<NEW_LINE>// sign extend<NEW_LINE>addend |= s == 1 ? 0xfe000000 : 0;<NEW_LINE>// 4-byte align BLX<NEW_LINE>addend &= blx ? ~0x3 : ~0;<NEW_LINE>long value = targetAddr.getOffset() + addend;<NEW_LINE>s = (value >> 24) & 0x1;<NEW_LINE>i1 = (value >> 23) & 0x1;<NEW_LINE>i2 = (value >> 22) & 0x1;<NEW_LINE>j1 = ~(i1 ^ s) & 0x1;<NEW_LINE>j2 = ~(i2 ^ s) & 0x1;<NEW_LINE>imm10 = (value >> 12) & 0x3ff;<NEW_LINE>imm11 = (value >> 1) & 0x7ff;<NEW_LINE>long instr = orig & (blx ? 0xc000f800 : 0xd000f800);<NEW_LINE>instr |= (j1 << 29) | (j2 << 27) | (imm11 << 16) | (s << 10) | imm10;<NEW_LINE>write(relocation, instr);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// should never see on its own here<NEW_LINE>case ARM_RELOC_PAIR:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_SECTDIFF:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_LOCAL_SECTDIFF:<NEW_LINE>// not seen yet<NEW_LINE>case ARM_RELOC_PB_LA_PTR:<NEW_LINE>// not seen yet<NEW_LINE>case ARM_RELOC_BR24:<NEW_LINE>// not seen yet<NEW_LINE>case ARM_THUMB_32BIT_BRANCH:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_HALF:<NEW_LINE>// relocation not required (scattered)<NEW_LINE>case ARM_RELOC_HALF_SECTDIFF:<NEW_LINE>default:<NEW_LINE>throw new NotFoundException("Unimplemented relocation");<NEW_LINE>}<NEW_LINE>}
(orig >> 29) & 0x1;
1,035,362
public Request<UpdateCloudFrontOriginAccessIdentityRequest> marshall(UpdateCloudFrontOriginAccessIdentityRequest updateCloudFrontOriginAccessIdentityRequest) {<NEW_LINE>if (updateCloudFrontOriginAccessIdentityRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<UpdateCloudFrontOriginAccessIdentityRequest> request = new DefaultRequest<UpdateCloudFrontOriginAccessIdentityRequest>(updateCloudFrontOriginAccessIdentityRequest, "AmazonCloudFront");<NEW_LINE>request.setHttpMethod(HttpMethodName.PUT);<NEW_LINE>if (updateCloudFrontOriginAccessIdentityRequest.getIfMatch() != null) {<NEW_LINE>request.addHeader("If-Match", StringUtils.fromString<MASK><NEW_LINE>}<NEW_LINE>String uriResourcePath = "/2020-05-31/origin-access-identity/cloudfront/{Id}/config";<NEW_LINE>uriResourcePath = com.amazonaws.transform.PathMarshallers.NON_GREEDY.marshall(uriResourcePath, "Id", updateCloudFrontOriginAccessIdentityRequest.getId());<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>XMLWriter xmlWriter = new XMLWriter(stringWriter, "http://cloudfront.amazonaws.com/doc/2020-05-31/");<NEW_LINE>CloudFrontOriginAccessIdentityConfig cloudFrontOriginAccessIdentityConfig = updateCloudFrontOriginAccessIdentityRequest.getCloudFrontOriginAccessIdentityConfig();<NEW_LINE>if (cloudFrontOriginAccessIdentityConfig != null) {<NEW_LINE>xmlWriter.startElement("CloudFrontOriginAccessIdentityConfig");<NEW_LINE>if (cloudFrontOriginAccessIdentityConfig.getCallerReference() != null) {<NEW_LINE>xmlWriter.startElement("CallerReference").value(cloudFrontOriginAccessIdentityConfig.getCallerReference()).endElement();<NEW_LINE>}<NEW_LINE>if (cloudFrontOriginAccessIdentityConfig.getComment() != null) {<NEW_LINE>xmlWriter.startElement("Comment").value(cloudFrontOriginAccessIdentityConfig.getComment()).endElement();<NEW_LINE>}<NEW_LINE>xmlWriter.endElement();<NEW_LINE>}<NEW_LINE>request.setContent(new StringInputStream(stringWriter.getBuffer().toString()));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(stringWriter.getBuffer().toString().getBytes(UTF8).length));<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/xml");<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to XML: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
(updateCloudFrontOriginAccessIdentityRequest.getIfMatch()));
1,581,463
private void dfs(String nums, int pos, int target, long runningTotal, long multiplicationVal, List<String> result, StringBuffer buff) {<NEW_LINE>if (pos == nums.length()) {<NEW_LINE>if (runningTotal == target) {<NEW_LINE>result.add(buff.toString());<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (int i = pos; i < nums.length(); i++) {<NEW_LINE>if (i != pos && nums.charAt(pos) == '0') {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>String subStr = nums.substring(pos, i + 1);<NEW_LINE>long num = Long.parseLong(subStr);<NEW_LINE>if (pos == 0) {<NEW_LINE>dfs(nums, i + 1, target, num, num, result, buff.append(num));<NEW_LINE>buff.delete(buff.length() - subStr.length(), buff.length());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>dfs(nums, i + 1, target, runningTotal + num, num, result, buff.append("+").append(subStr));<NEW_LINE>buff.delete(buff.length() - subStr.length() - 1, buff.length());<NEW_LINE>dfs(nums, i + 1, target, runningTotal - num, -num, result, buff.append("-").append(subStr));<NEW_LINE>buff.delete(buff.length() - subStr.length() - 1, buff.length());<NEW_LINE>dfs(nums, i + 1, target, runningTotal + num * multiplicationVal - multiplicationVal, num * multiplicationVal, result, buff.append("*").append(subStr));<NEW_LINE>buff.delete(buff.length() - subStr.length() - <MASK><NEW_LINE>}<NEW_LINE>}
1, buff.length());
130,282
public String generateItemsAndGroups() throws IOException, OmniNotConnectedException, OmniInvalidResponseException, OmniUnknownMessageTypeException {<NEW_LINE>groups = new StringBuilder();<NEW_LINE>items = new StringBuilder();<NEW_LINE>rooms = new LinkedHashMap<String, LinkedList<SiteItem>>();<NEW_LINE>lights = new LinkedList<SiteItem>();<NEW_LINE>thermos <MASK><NEW_LINE>audioZones = new LinkedList<SiteItem>();<NEW_LINE>audioSources = new LinkedList<SiteItem>();<NEW_LINE>areas = new LinkedList<SiteItem>();<NEW_LINE>zones = new LinkedList<SiteItem>();<NEW_LINE>buttons = new LinkedList<SiteItem>();<NEW_LINE>existingGroups = new ArrayList<String>();<NEW_LINE>groups.append("Group All\n");<NEW_LINE>generateUnits();<NEW_LINE>items.append("\n");<NEW_LINE>generateThermos();<NEW_LINE>items.append("\n");<NEW_LINE>generateAudioZones();<NEW_LINE>items.append("\n");<NEW_LINE>generateAudioSource();<NEW_LINE>items.append("\n");<NEW_LINE>generateAreas();<NEW_LINE>items.append("\n");<NEW_LINE>generateZones();<NEW_LINE>items.append("\n");<NEW_LINE>generateButtons();<NEW_LINE>items.append("\n");<NEW_LINE>generateSiteMap();<NEW_LINE>return groups.append("\n\n").append(items).toString();<NEW_LINE>}
= new LinkedList<SiteItem>();
1,052,836
public void updatePopup(Object lookupIteObject) {<NEW_LINE>if (lookupIteObject == null) {<NEW_LINE>doShowJavaDocInfo(finalElement, false, this, originalElement, closeCallback, CodeInsightBundle<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (lookupIteObject instanceof PsiElement) {<NEW_LINE>doShowJavaDocInfo((PsiElement) lookupIteObject, false, this, originalElement, closeCallback, null, true);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DocumentationProvider documentationProvider = getProviderFromElement(file);<NEW_LINE>PsiElement element = documentationProvider.getDocumentationElementForLookupItem(PsiManager.getInstance(myProject), lookupIteObject, originalElement);<NEW_LINE>if (element == null) {<NEW_LINE>doShowJavaDocInfo(finalElement, false, this, originalElement, closeCallback, CodeInsightBundle.message("no.documentation.found"), true);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (myEditor != null) {<NEW_LINE>PsiFile file = element.getContainingFile();<NEW_LINE>if (file != null) {<NEW_LINE>Editor editor = myEditor;<NEW_LINE>showJavaDocInfo(myEditor, file, false);<NEW_LINE>myEditor = editor;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>doShowJavaDocInfo(element, false, this, originalElement, closeCallback, null, true);<NEW_LINE>}<NEW_LINE>}
.message("no.documentation.found"), true);
1,358,742
public byte[] decodeMessage() {<NEW_LINE>byte[] data = new byte[29];<NEW_LINE>data[0] = (byte) (data.length - 1);<NEW_LINE>data[1] = RFXComBaseMessage.PacketType.SECURITY2.toByte();<NEW_LINE>data[2] = subType.toByte();<NEW_LINE>data[3] = seqNbr;<NEW_LINE>data[4] = 0;<NEW_LINE>data[5] = 0;<NEW_LINE>data[6] = 0;<NEW_LINE>data[7] = 0;<NEW_LINE>data[8] = <MASK><NEW_LINE>data[9] = (byte) ((sensorId >> 8) & 0xff);<NEW_LINE>data[10] = (byte) ((sensorId >> 16) & 0xff);<NEW_LINE>data[11] = (byte) ((buttonStatus & 0x0f) << 4 | ((sensorId >> 24) & 0x0f));<NEW_LINE>data[12] = 0;<NEW_LINE>data[13] = 0;<NEW_LINE>data[14] = 0;<NEW_LINE>data[15] = 0;<NEW_LINE>data[16] = 0;<NEW_LINE>data[17] = 0;<NEW_LINE>data[18] = 0;<NEW_LINE>data[19] = 0;<NEW_LINE>data[20] = 0;<NEW_LINE>data[21] = 0;<NEW_LINE>data[22] = 0;<NEW_LINE>data[23] = 0;<NEW_LINE>data[24] = 0;<NEW_LINE>data[25] = 0;<NEW_LINE>data[26] = 0;<NEW_LINE>data[27] = 0;<NEW_LINE>data[28] = (byte) (((batteryLevel & 0x0F) << 4) | (signalLevel & 0x0F));<NEW_LINE>return data;<NEW_LINE>}
(byte) (sensorId & 0xff);
739,813
private IBundleProvider doEverythingOperation(TokenOrListParam theIds, IPrimitiveType<Integer> theCount, IPrimitiveType<Integer> theOffset, DateRangeParam theLastUpdated, SortSpec theSort, StringAndListParam theContent, StringAndListParam theNarrative, StringAndListParam theFilter, RequestDetails theRequest) {<NEW_LINE>SearchParameterMap paramMap = new SearchParameterMap();<NEW_LINE>if (theCount != null) {<NEW_LINE>paramMap.setCount(theCount.getValue());<NEW_LINE>}<NEW_LINE>if (theOffset != null) {<NEW_LINE>throw new IllegalArgumentException(Msg.code(1106) + "Everything operation does not support offset searching");<NEW_LINE>}<NEW_LINE>if (theContent != null) {<NEW_LINE>paramMap.add(Constants.PARAM_CONTENT, theContent);<NEW_LINE>}<NEW_LINE>if (theNarrative != null) {<NEW_LINE>paramMap.add(Constants.PARAM_TEXT, theNarrative);<NEW_LINE>}<NEW_LINE>paramMap.setIncludes(Collections.singleton(IResource.INCLUDE_ALL.asRecursive()));<NEW_LINE>paramMap.setEverythingMode(theIds != null && theIds.getValuesAsQueryTokens().size() == 1 ? EverythingModeEnum.PATIENT_INSTANCE : EverythingModeEnum.PATIENT_TYPE);<NEW_LINE>paramMap.setSort(theSort);<NEW_LINE>paramMap.setLastUpdated(theLastUpdated);<NEW_LINE>if (theIds != null) {<NEW_LINE>if (theRequest.getParameters().containsKey("_mdm")) {<NEW_LINE>String[] paramVal = theRequest.getParameters().get("_mdm");<NEW_LINE>if (Arrays.asList(paramVal).contains("true")) {<NEW_LINE>theIds.getValuesAsQueryTokens().stream().forEach(param -> param.setMdmExpand(true));<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (!isPagingProviderDatabaseBacked(theRequest)) {<NEW_LINE>paramMap.setLoadSynchronous(true);<NEW_LINE>}<NEW_LINE>RequestPartitionId requestPartitionId = myPartitionHelperSvc.determineReadPartitionForRequestForSearchType(theRequest, getResourceName(), paramMap, null);<NEW_LINE>return mySearchCoordinatorSvc.registerSearch(this, paramMap, getResourceName(), new CacheControlDirective().parse(theRequest.getHeaders(Constants.HEADER_CACHE_CONTROL)), theRequest, requestPartitionId);<NEW_LINE>}
paramMap.add("_id", theIds);
1,809,336
public void export(OutputStream os, boolean signed, String rootName, List<Score> scores) throws Exception {<NEW_LINE>if (os == null) {<NEW_LINE>throw new IllegalArgumentException("Trying to export a book to a null output stream");<NEW_LINE>}<NEW_LINE>// Storing<NEW_LINE>Mxl.Output mof = new Mxl.Output(os);<NEW_LINE>OutputStream zos = mof.getOutputStream();<NEW_LINE>// Allocate the opus<NEW_LINE>ObjectFactory opusFactory = new ObjectFactory();<NEW_LINE>Opus opus = opusFactory.createOpus();<NEW_LINE>opus.setTitle("Opus for " + book);<NEW_LINE>opus.setVersion("3.0");<NEW_LINE>if (rootName == null) {<NEW_LINE>// Fall-back value<NEW_LINE>rootName = "opus";<NEW_LINE>}<NEW_LINE>// Is this a multi-movement book?<NEW_LINE>final boolean multi = scores.size() > 1;<NEW_LINE>for (Score score : scores) {<NEW_LINE>// Reference each score/movement in opus<NEW_LINE>String entryName = rootName + (multi ? (".mvt" + score.getId()) : "") + OMR.SCORE_EXTENSION;<NEW_LINE>org.audiveris.proxymusic.opus.Score oScore = opusFactory.createScore();<NEW_LINE>oScore.setHref(entryName);<NEW_LINE>oScore.setNewPage(YesNo.YES);<NEW_LINE>opus.getOpusOrOpusLinkOrScore().add(oScore);<NEW_LINE>// Marshal the score partwise<NEW_LINE>ScorePartwise <MASK><NEW_LINE>mof.addEntry(new RootFile(entryName, RootFile.MUSICXML_MEDIA_TYPE));<NEW_LINE>Marshalling.marshal(scorePartwise, zos, signed, 2);<NEW_LINE>}<NEW_LINE>// Store opus as root<NEW_LINE>Marshalling.getContext(Opus.class);<NEW_LINE>mof.addFirstEntry(new RootFile(rootName + ".opus.xml", RootFile.MUSICXML_MEDIA_TYPE));<NEW_LINE>Marshalling.marshal(opus, zos);<NEW_LINE>// The end<NEW_LINE>mof.close();<NEW_LINE>}
scorePartwise = PartwiseBuilder.build(score);
1,296,172
public void onCreate(Bundle paramBundle) {<NEW_LINE>super.onCreate(paramBundle);<NEW_LINE>mediaQuality = (ListPreference) this.findPreference("pref_compression");<NEW_LINE>mediaQuality.setOnPreferenceChangeListener((preference, newValue) -> {<NEW_LINE>updateListSummary(preference, newValue);<NEW_LINE>dcContext.setConfigInt(DcHelper.CONFIG_MEDIA_QUALITY, Util.objectToInt(newValue));<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>autoDownload = findPreference("auto_download");<NEW_LINE>autoDownload.setOnPreferenceChangeListener((preference, newValue) -> {<NEW_LINE>updateListSummary(preference, newValue);<NEW_LINE>dcContext.setConfigInt("download_limit", Util.objectToInt(newValue));<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>nicerAutoDownloadNames();<NEW_LINE>showEmails = (ListPreference) this.findPreference("pref_show_emails");<NEW_LINE>showEmails.setOnPreferenceChangeListener((preference, newValue) -> {<NEW_LINE>updateListSummary(preference, newValue);<NEW_LINE>dcContext.setConfigInt(CONFIG_SHOW_EMAILS, Util.objectToInt(newValue));<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>readReceiptsCheckbox = (CheckBoxPreference) this.findPreference("pref_read_receipts");<NEW_LINE>readReceiptsCheckbox.setOnPreferenceChangeListener(new ReadReceiptToggleListener());<NEW_LINE>this.findPreference("preference_category_blocked").setOnPreferenceClickListener(new BlockedContactsClickListener());<NEW_LINE>Preference backup = this.findPreference("pref_backup");<NEW_LINE>backup.setOnPreferenceClickListener(new BackupListener());<NEW_LINE>autoDelDevice = findPreference("autodel_device");<NEW_LINE>autoDelDevice.<MASK><NEW_LINE>autoDelServer = findPreference("autodel_server");<NEW_LINE>autoDelServer.setOnPreferenceChangeListener(new AutodelChangeListener("delete_server_after"));<NEW_LINE>}
setOnPreferenceChangeListener(new AutodelChangeListener("delete_device_after"));
1,487,160
public synchronized void printInfo() {<NEW_LINE>System.out.println("#########################################");<NEW_LINE>System.out.println("Peer " + serverSocket.getLocalAddress() + ":" + localPort);<NEW_LINE>System.out.println("UUID: " + getUuid());<NEW_LINE>System.<MASK><NEW_LINE>System.out.println(received + " messages received, " + sent + " messages sent");<NEW_LINE>System.out.println(peers.size() + " peers");<NEW_LINE>for (final PeerInfo info : peers.values()) {<NEW_LINE>System.out.println(" " + info);<NEW_LINE>}<NEW_LINE>for (final RepositoryObject obj : repository.getObjects()) {<NEW_LINE>System.out.println(" ##### " + obj.getUuid());<NEW_LINE>System.out.println(" " + obj.getType() + "(" + obj.getUserId() + "): " + obj.getProperties(pte.next()));<NEW_LINE>((DefaultRepositoryObject) obj).printHistory();<NEW_LINE>}<NEW_LINE>System.out.println(outputQueue);<NEW_LINE>System.out.flush();<NEW_LINE>}
out.println("Time offset: " + timeOffset);
1,587,205
private TransactionComponents createTransactionComponents(@Output List<AutoCloseable> closeables, MetricsManager metricsManager, LockAndTimestampServices lockAndTimestampServices, KeyValueService keyValueService, Supplier<AtlasDbRuntimeConfig> runtimeConfigSupplier) {<NEW_LINE>CoordinationService<InternalSchemaMetadata> coordinationService = getSchemaMetadataCoordinationService(metricsManager, lockAndTimestampServices, keyValueService);<NEW_LINE><MASK><NEW_LINE>TransactionService transactionService = initializeCloseable(() -> AtlasDbMetrics.instrumentTimed(metricsManager.getRegistry(), TransactionService.class, TransactionServices.createTransactionService(keyValueService, transactionSchemaManager, metricsManager.getTaggedRegistry())), closeables);<NEW_LINE>Optional<TransactionSchemaInstaller> schemaInstaller = getTransactionSchemaInstallerIfSupported(closeables, keyValueService, runtimeConfigSupplier, transactionSchemaManager);<NEW_LINE>return ImmutableTransactionComponents.builder().transactionService(transactionService).schemaInstaller(schemaInstaller).build();<NEW_LINE>}
TransactionSchemaManager transactionSchemaManager = new TransactionSchemaManager(coordinationService);
25,847
private void renderStatus(MolecularAssemblerBlockEntity molecularAssembler, PoseStack ms, MultiBufferSource bufferIn, int combinedLightIn, AssemblerAnimationStatus status) {<NEW_LINE>double centerX = molecularAssembler.getBlockPos().getX() + 0.5f;<NEW_LINE>double centerY = molecularAssembler.getBlockPos().getY() + 0.5f;<NEW_LINE>double centerZ = molecularAssembler.getBlockPos().getZ() + 0.5f;<NEW_LINE>// Spawn crafting FX that fly towards the block's center<NEW_LINE>Minecraft minecraft = Minecraft.getInstance();<NEW_LINE>if (status.getTicksUntilParticles() <= 0) {<NEW_LINE>status.setTicksUntilParticles(4);<NEW_LINE>if (AppEngClient.instance().shouldAddParticles(particleRandom)) {<NEW_LINE>for (int x = 0; x < (int) Math.ceil(status.getSpeed() / 5.0); x++) {<NEW_LINE>minecraft.particleEngine.createParticle(ParticleTypes.CRAFTING, centerX, centerY, centerZ, 0, 0, 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>ItemRenderer itemRenderer = minecraft.getItemRenderer();<NEW_LINE>ms.pushPose();<NEW_LINE>// Translate to center of block<NEW_LINE>ms.translate(0.5, 0.5, 0.5);<NEW_LINE>if (!(is.getItem() instanceof BlockItem)) {<NEW_LINE>ms.translate(0, -0.3f, 0);<NEW_LINE>} else {<NEW_LINE>ms.translate(0, -0.2f, 0);<NEW_LINE>}<NEW_LINE>itemRenderer.renderStatic(is, TransformType.GROUND, combinedLightIn, OverlayTexture.NO_OVERLAY, ms, bufferIn, 0);<NEW_LINE>ms.popPose();<NEW_LINE>}
ItemStack is = status.getIs();
313,749
private String addFieldsBinding(String target, List<ActionBuilderLine> lines, int level) {<NEW_LINE>StringBuilder stb = new StringBuilder();<NEW_LINE>lines.sort((l1, l2) -> {<NEW_LINE>if (l1.getDummy() && !l2.getDummy()) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (!l1.getDummy() && l2.getDummy()) {<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>});<NEW_LINE>for (ActionBuilderLine line : lines) {<NEW_LINE>String name = line.getName();<NEW_LINE>String value = line.getValue();<NEW_LINE>if (value != null && value.contains(".sum(")) {<NEW_LINE>value = getSum(value, line.getFilter());<NEW_LINE>}<NEW_LINE>if (line.getDummy()) {<NEW_LINE>stb.append(format("_$." + name + " = " <MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>MetaJsonField jsonField = line.getMetaJsonField();<NEW_LINE>MetaField metaField = line.getMetaField();<NEW_LINE>if (jsonField != null && (jsonField.getTargetJsonModel() != null || jsonField.getTargetModel() != null)) {<NEW_LINE>value = addRelationalBinding(line, target, true);<NEW_LINE>} else if (metaField != null && metaField.getRelationship() != null) {<NEW_LINE>value = addRelationalBinding(line, target, false);<NEW_LINE>}<NEW_LINE>// else {<NEW_LINE>// MetaJsonField valueJson = line.getValueJson();<NEW_LINE>// if (valueJson != null && valueJson.getType().contentEquals("many-to-one")) {<NEW_LINE>// value = value.replace("$." + valueJson.getName(),"$json.create($json.find($."<NEW_LINE>// +<NEW_LINE>// valueJson.getName() + ".id))");<NEW_LINE>// }<NEW_LINE>// }<NEW_LINE>if (value != null && metaField != null && metaField.getTypeName().equals(BigDecimal.class.getSimpleName())) {<NEW_LINE>value = "new BigDecimal(" + value + ")";<NEW_LINE>}<NEW_LINE>String condition = line.getConditionText();<NEW_LINE>if (condition != null) {<NEW_LINE>stb.append(format("if(" + condition + "){" + target + "." + name + " = " + value + ";}", level));<NEW_LINE>} else {<NEW_LINE>stb.append(format(target + "." + name + " = " + value + ";", level));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return stb.toString();<NEW_LINE>}
+ value + ";", level));
488,174
public CreateAuditSuppressionResult createAuditSuppression(CreateAuditSuppressionRequest createAuditSuppressionRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAuditSuppressionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateAuditSuppressionRequest> request = null;<NEW_LINE>Response<CreateAuditSuppressionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateAuditSuppressionRequestMarshaller().marshall(createAuditSuppressionRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<CreateAuditSuppressionResult, JsonUnmarshallerContext> unmarshaller = new CreateAuditSuppressionResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<CreateAuditSuppressionResult> responseHandler = <MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
new JsonResponseHandler<CreateAuditSuppressionResult>(unmarshaller);
164,847
int copyFileV2(String destinationDir, String fileName, byte[] filePartData, long startTime, boolean done) {<NEW_LINE>if (Algorithms.isEmpty(fileName) || filePartData == null) {<NEW_LINE>return COPY_FILE_PARAMS_ERROR;<NEW_LINE>}<NEW_LINE>if (filePartData.length > COPY_FILE_PART_SIZE_LIMIT) {<NEW_LINE>return COPY_FILE_PART_SIZE_LIMIT_ERROR;<NEW_LINE>}<NEW_LINE>int result = copyFileImpl(fileName, <MASK><NEW_LINE>if (done) {<NEW_LINE>if (fileName.endsWith(IndexConstants.BINARY_MAP_INDEX_EXT) && IndexConstants.MAPS_PATH.equals(destinationDir)) {<NEW_LINE>app.getResourceManager().reloadIndexes(IProgress.EMPTY_PROGRESS, new ArrayList<>());<NEW_LINE>app.getDownloadThread().updateLoadedFiles();<NEW_LINE>} else if (fileName.endsWith(IndexConstants.GPX_FILE_EXT)) {<NEW_LINE>if (destinationDir.startsWith(IndexConstants.GPX_INDEX_DIR) && !FILE_TO_SAVE.equals(fileName)) {<NEW_LINE>destinationDir = destinationDir.replaceFirst(IndexConstants.GPX_INDEX_DIR, "");<NEW_LINE>showGpx(new File(destinationDir, fileName).getPath());<NEW_LINE>} else if (destinationDir.isEmpty() && FILE_TO_SAVE.equals(fileName)) {<NEW_LINE>app.getFavoritesHelper().loadFavorites();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
filePartData, startTime, done, destinationDir);
547,138
public void onException(Throwable e) {<NEW_LINE>if (callback == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ClassLoader cl = Thread<MASK><NEW_LINE>try {<NEW_LINE>Thread.currentThread().setContextClassLoader(this.classLoader);<NEW_LINE>RpcInternalContext.setContext(context);<NEW_LINE>if (EventBus.isEnable(ClientAsyncReceiveEvent.class)) {<NEW_LINE>EventBus.post(new ClientAsyncReceiveEvent(consumerConfig, providerInfo, request, null, e));<NEW_LINE>}<NEW_LINE>// do async filter after respond server<NEW_LINE>FilterChain chain = consumerConfig.getConsumerBootstrap().getCluster().getFilterChain();<NEW_LINE>if (chain != null) {<NEW_LINE>chain.onAsyncResponse(consumerConfig, request, null, e);<NEW_LINE>}<NEW_LINE>recordClientElapseTime();<NEW_LINE>if (EventBus.isEnable(ClientEndInvokeEvent.class)) {<NEW_LINE>EventBus.post(new ClientEndInvokeEvent(request, null, e));<NEW_LINE>}<NEW_LINE>// judge is timeout or others<NEW_LINE>SofaRpcException sofaRpcException = null;<NEW_LINE>if (e instanceof InvokeTimeoutException) {<NEW_LINE>sofaRpcException = new SofaTimeOutException(e);<NEW_LINE>} else {<NEW_LINE>sofaRpcException = new SofaRpcException(RpcErrorType.SERVER_UNDECLARED_ERROR, e.getMessage(), e);<NEW_LINE>}<NEW_LINE>callback.onSofaException(sofaRpcException, request.getMethodName(), request);<NEW_LINE>} finally {<NEW_LINE>Thread.currentThread().setContextClassLoader(cl);<NEW_LINE>RpcInvokeContext.removeContext();<NEW_LINE>RpcInternalContext.removeAllContext();<NEW_LINE>}<NEW_LINE>}
.currentThread().getContextClassLoader();
687,081
private void updateContributionsList() {<NEW_LINE>LayoutInflater inflater = UiUtilities.getInflater(app, nightMode);<NEW_LINE>LinearLayout list = mainView.findViewById(R.id.contributions_list);<NEW_LINE>list.removeAllViews();<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>for (int i = 0; i < VISIBLE_MONTHS_COUNT; i++) {<NEW_LINE>long time = calendar.getTimeInMillis();<NEW_LINE>calendar.add(Calendar.MONTH, -1);<NEW_LINE>Contribution contribution = changesInfo.get(DATE_FORMAT.format(time));<NEW_LINE>int changesSize = contribution != null ? contribution.count : 0;<NEW_LINE>View view = inflater.inflate(R.layout.osm_contribution_item, list, false);<NEW_LINE>TextView tvTitle = view.findViewById(R.id.title);<NEW_LINE>TextView tvCount = view.findViewById(R.id.count);<NEW_LINE>tvTitle.setText(CONTRIBUTION_FORMAT.format(time));<NEW_LINE>tvCount.setText<MASK><NEW_LINE>list.addView(view);<NEW_LINE>}<NEW_LINE>}
(String.valueOf(changesSize));
378,115
void updateOwner(Permissionable asset, String ownerId) throws DotDataException {<NEW_LINE><MASK><NEW_LINE>DotConnect dc = new DotConnect();<NEW_LINE>if (ownerId != null && ownerId.startsWith("user-")) {<NEW_LINE>ownerId = ownerId.substring(5, ownerId.length());<NEW_LINE>}<NEW_LINE>String updateIdentifierSql = "update inode set owner = ? " + "where inode = ? ";<NEW_LINE>dc.setSQL(updateIdentifierSql);<NEW_LINE>dc.addParam(ownerId);<NEW_LINE>dc.addParam(permissionId);<NEW_LINE>dc.loadResult();<NEW_LINE>asset.setOwner(ownerId);<NEW_LINE>List<HashMap<String, String>> inodes = new ArrayList<HashMap<String, String>>();<NEW_LINE>String assetType = "";<NEW_LINE>dc.setSQL("Select asset_type from identifier where id =?");<NEW_LINE>dc.addParam(permissionId);<NEW_LINE>ArrayList assetResult = dc.loadResults();<NEW_LINE>if (assetResult.size() > 0) {<NEW_LINE>assetType = (String) ((Map) assetResult.get(0)).get("asset_type");<NEW_LINE>}<NEW_LINE>if (UtilMethods.isSet(assetType)) {<NEW_LINE>dc.setSQL("select i.inode, type from inode i," + assetType + " a where i.inode = a.inode and a.identifier = ?");<NEW_LINE>dc.addParam(permissionId);<NEW_LINE>inodes = dc.loadResults();<NEW_LINE>}<NEW_LINE>StringBuilder inodeCondition = new StringBuilder(128);<NEW_LINE>inodeCondition.ensureCapacity(32);<NEW_LINE>inodeCondition.append("");<NEW_LINE>for (HashMap<String, String> inode : inodes) {<NEW_LINE>if (0 < inodeCondition.length())<NEW_LINE>inodeCondition.append(", " + inode.get("inode"));<NEW_LINE>else<NEW_LINE>inodeCondition.append(inode.get("inode"));<NEW_LINE>}<NEW_LINE>String updateVersionsSql = "update inode set owner = ? where inode in ('" + inodeCondition + "')";<NEW_LINE>dc.setSQL(updateVersionsSql);<NEW_LINE>dc.addParam(ownerId);<NEW_LINE>dc.loadResult();<NEW_LINE>if (InodeUtils.isSet(permissionId) && asset instanceof Versionable) {<NEW_LINE>CacheLocator.getIdentifierCache().removeFromCacheByVersionable((Versionable) asset);<NEW_LINE>}<NEW_LINE>if (asset instanceof Contentlet) {<NEW_LINE>ContentletAPI contAPI = APILocator.getContentletAPI();<NEW_LINE>contAPI.refresh((Contentlet) asset);<NEW_LINE>}<NEW_LINE>}
String permissionId = asset.getPermissionId();
1,602,229
// The tested deployment exceptions cause FFDC so we have to allow for this.<NEW_LINE>@AllowedFFDC()<NEW_LINE>public void launchHealth31Tck() throws Exception {<NEW_LINE>String protocol = "http";<NEW_LINE>String host = server.getHostname();<NEW_LINE>String port = Integer.toString(server.getPort(PortType.WC_defaulthost));<NEW_LINE>Map<String, String> <MASK><NEW_LINE>additionalProps.put("test.url", protocol + "://" + host + ":" + port);<NEW_LINE>MvnUtils.runTCKMvnCmd(server, "io.openliberty.microprofile.health.3.1.internal_fat_tck", this.getClass() + ":launchHealth31Tck", additionalProps);<NEW_LINE>Map<String, String> resultInfo = MvnUtils.getResultInfo(server);<NEW_LINE>resultInfo.put("results_type", "MicroProfile");<NEW_LINE>resultInfo.put("feature_name", "Health");<NEW_LINE>resultInfo.put("feature_version", "3.1");<NEW_LINE>MvnUtils.preparePublicationFile(resultInfo);<NEW_LINE>}
additionalProps = new HashMap<>();
568,853
private void handleIssues(final Activity activity, SpannableStringBuilder text, String[] issues) {<NEW_LINE>final String issueBaseUrl = "https://github.com/Tencent/QMUI_Android/issues/";<NEW_LINE>int start, end;<NEW_LINE>for (int i = 0; i < issues.length; i++) {<NEW_LINE>if (i == issues.length - 1) {<NEW_LINE>text.append("and ");<NEW_LINE>}<NEW_LINE>final String issue = issues[i];<NEW_LINE>start = text.length();<NEW_LINE>text.append("#");<NEW_LINE>text.append(issue);<NEW_LINE>end = text.length();<NEW_LINE>int normalColor = ContextCompat.getColor(activity, R.color.app_color_blue);<NEW_LINE>int pressedColor = ContextCompat.getColor(activity, R.color.app_color_blue_pressed);<NEW_LINE>text.setSpan(new QMUITouchableSpan(normalColor, pressedColor, 0, 0) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSpanClick(View widget) {<NEW_LINE>Intent intent = QDMainActivity.createWebExplorerIntent(activity, issueBaseUrl + issue, null);<NEW_LINE>activity.startActivity(intent);<NEW_LINE>}<NEW_LINE>}, <MASK><NEW_LINE>if (i < issues.length - 1) {<NEW_LINE>text.append(", ");<NEW_LINE>} else {<NEW_LINE>text.append(".");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
1,708,152
private ByteBuffer inet_peer(ByteBuffer buf) {<NEW_LINE>if ((state & INET_F_ACTIVE) == 0) {<NEW_LINE>log.fine("peer -> not connected");<NEW_LINE>return ctl_error(Posix.ENOTCONN);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>InetAddress a = addr.getAddress();<NEW_LINE>if (log.isLoggable(Level.FINE))<NEW_LINE>log.fine("peer -> " + addr);<NEW_LINE>byte[] bytes = a.getAddress();<NEW_LINE>int port = addr.getPort();<NEW_LINE>byte[] data = new byte[1 + 2 + bytes.length];<NEW_LINE>data[0] = (byte) sfamily.code;<NEW_LINE>data[1] = (byte) ((port >> 8) & 0xff);<NEW_LINE>data[2] = (byte) (port & 0xff);<NEW_LINE>System.arraycopy(bytes, 0, data, 3, bytes.length);<NEW_LINE>return ctl_reply(INET_REP_OK, data);<NEW_LINE>}
InetSocketAddress addr = fd.getRemoteAddress();
README.md exists but content is empty. Use the Edit dataset card button to edit it.
Downloads last month
80
Edit dataset card