idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
117,843 | public void service(ServiceParam serviceParam) {<NEW_LINE>Implementation implementation = new DefaultImplementation();<NEW_LINE>implementation.<MASK><NEW_LINE>if (serviceParam.getInterfaceType() == null) {<NEW_LINE>throw new ServiceRuntimeException(ErrorCode.convert("01-00201"));<NEW_LINE>}<NEW_LINE>Service service = new ServiceImpl(serviceParam.getUniqueId(), serviceParam.getInterfaceType(), InterfaceMode.api, serviceParam.getInstance(), null);<NEW_LINE>for (BindingParam bindingParam : serviceParam.getBindingParams()) {<NEW_LINE>BindingConverter bindingConverter = bindingConverterFactory.getBindingConverter(bindingParam.getBindingType());<NEW_LINE>if (bindingConverter == null) {<NEW_LINE>throw new ServiceRuntimeException(ErrorCode.convert("01-00200", bindingParam.getBindingType()));<NEW_LINE>}<NEW_LINE>BindingConverterContext bindingConverterContext = new BindingConverterContext();<NEW_LINE>bindingConverterContext.setInBinding(false);<NEW_LINE>bindingConverterContext.setAppName(sofaRuntimeContext.getAppName());<NEW_LINE>bindingConverterContext.setAppClassLoader(sofaRuntimeContext.getAppClassLoader());<NEW_LINE>Binding binding = bindingConverter.convert(bindingParam, bindingConverterContext);<NEW_LINE>service.addBinding(binding);<NEW_LINE>}<NEW_LINE>boolean hasJvmBinding = false;<NEW_LINE>for (Binding binding : service.getBindings()) {<NEW_LINE>if (binding.getBindingType().equals(JvmBinding.JVM_BINDING_TYPE)) {<NEW_LINE>hasJvmBinding = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!hasJvmBinding) {<NEW_LINE>service.addBinding(new JvmBinding());<NEW_LINE>}<NEW_LINE>ComponentInfo componentInfo = new ServiceComponent(implementation, service, bindingAdapterFactory, sofaRuntimeContext);<NEW_LINE>sofaRuntimeContext.getComponentManager().register(componentInfo);<NEW_LINE>} | setTarget(serviceParam.getInstance()); |
1,640,496 | private Concrete.ReferenceExpression makeReference(DefCallExpression defCall) {<NEW_LINE>Definition def = defCall.getDefinition();<NEW_LINE>Referable ref = def.getRef();<NEW_LINE>if (!hasFlag(PrettyPrinterFlag.SHOW_LEVELS)) {<NEW_LINE>return cVar(myDefinitionRenamer.renameDefinition(ref), ref);<NEW_LINE>}<NEW_LINE>List<Level> pLevels;<NEW_LINE>List<Level> hLevels;<NEW_LINE>if (defCall instanceof LeveledDefCallExpression) {<NEW_LINE>List<? extends LevelVariable> params = def.getLevelParameters();<NEW_LINE>LevelSubstitution subst = ((LeveledDefCallExpression) defCall).getLevelSubstitution();<NEW_LINE>if (params == null) {<NEW_LINE>pLevels = Collections.singletonList((Level) subst.get(LevelVariable.PVAR));<NEW_LINE>hLevels = Collections.singletonList((Level) subst.get(LevelVariable.HVAR));<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>pLevels = new ArrayList<>(pNum);<NEW_LINE>hLevels = new ArrayList<>(params.size() - pNum);<NEW_LINE>for (int i = 0; i < pNum; i++) {<NEW_LINE>pLevels.add((Level) subst.get(params.get(i)));<NEW_LINE>}<NEW_LINE>for (int i = pNum; i < params.size(); i++) {<NEW_LINE>hLevels.add((Level) subst.get(params.get(i)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>pLevels = Collections.singletonList(null);<NEW_LINE>hLevels = Collections.singletonList(null);<NEW_LINE>}<NEW_LINE>return cDefCall(myDefinitionRenamer.renameDefinition(ref), ref, visitLevelsNull(pLevels), visitLevelsNull(hLevels));<NEW_LINE>} | int pNum = def.getNumberOfPLevelParameters(); |
1,460,371 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Set<String> toSelect = new HashSet<>();<NEW_LINE>while (toSelect.size() < 3) {<NEW_LINE>toSelect.add(RandomUtil.randomFromCollection(spellbook));<NEW_LINE>}<NEW_LINE>Choice choice = new ChoiceImpl(true, ChoiceHintType.CARD);<NEW_LINE>choice.setMessage("Choose a card to draft");<NEW_LINE>choice.setChoices(toSelect);<NEW_LINE>player.choose(outcome, choice, game);<NEW_LINE><MASK><NEW_LINE>if (cardName == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>CardInfo cardInfo = CardRepository.instance.findCards(new CardCriteria().nameExact(cardName)).stream().findFirst().orElse(null);<NEW_LINE>if (cardInfo == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Set<Card> cards = new HashSet<>();<NEW_LINE>cards.add(cardInfo.getCard());<NEW_LINE>game.loadCards(cards, player.getId());<NEW_LINE>player.moveCards(cards, Zone.HAND, source, game);<NEW_LINE>return true;<NEW_LINE>} | String cardName = choice.getChoice(); |
1,583,360 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String cloudServiceName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (cloudServiceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter cloudServiceName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2021-03-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.delete(this.client.getEndpoint(), resourceGroupName, cloudServiceName, this.client.getSubscriptionId(), apiVersion, accept, context);<NEW_LINE>} | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
1,205,485 | protected CrawlURI peekItem(final WorkQueueFrontier frontier) throws IOException {<NEW_LINE>final BdbMultipleWorkQueues queues = ((<MASK><NEW_LINE>DatabaseEntry key = new DatabaseEntry(origin);<NEW_LINE>CrawlURI curi = null;<NEW_LINE>int tries = 1;<NEW_LINE>while (true) {<NEW_LINE>try {<NEW_LINE>curi = queues.get(key);<NEW_LINE>} catch (DatabaseException e) {<NEW_LINE>LOGGER.log(Level.SEVERE, "peekItem failure; retrying", e);<NEW_LINE>}<NEW_LINE>// ensure CrawlURI, if any, came from acceptable range:<NEW_LINE>if (!ArchiveUtils.startsWith(key.getData(), origin)) {<NEW_LINE>LOGGER.severe("inconsistency: " + classKey + "(" + getPrefixClassKey(origin) + ") with " + getCount() + " items gave " + curi + "(" + getPrefixClassKey(key.getData()));<NEW_LINE>// clear curi to allow retry<NEW_LINE>curi = null;<NEW_LINE>// reset key to original origin for retry<NEW_LINE>key.setData(origin);<NEW_LINE>}<NEW_LINE>if (curi != null) {<NEW_LINE>// success<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (tries > 3) {<NEW_LINE>LOGGER.severe("no item where expected in queue " + classKey);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>tries++;<NEW_LINE>LOGGER.severe("Trying get #" + Integer.toString(tries) + " in queue " + classKey + " with " + getCount() + " items using key " + getPrefixClassKey(key.getData()));<NEW_LINE>}<NEW_LINE>return curi;<NEW_LINE>} | BdbFrontier) frontier).getWorkQueues(); |
502,160 | private void customizeComponent(String title) {<NEW_LINE>// NON-NLS<NEW_LINE>setToolTipText(NbBundle.getMessage(DataResultTopComponent.class, "HINT_NodeTableTopComponent"));<NEW_LINE>setTitle(title);<NEW_LINE>setName(title);<NEW_LINE>// NON-NLS<NEW_LINE>getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(AddBookmarkTagAction.BOOKMARK_SHORTCUT, "addBookmarkTag");<NEW_LINE>// NON-NLS<NEW_LINE>getActionMap().put("addBookmarkTag", new AddBookmarkTagAction());<NEW_LINE>// NON-NLS<NEW_LINE>getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(ExternalViewerShortcutAction.EXTERNAL_VIEWER_SHORTCUT, "useExternalViewer");<NEW_LINE>// NON-NLS<NEW_LINE>getActionMap().put("useExternalViewer", ExternalViewerShortcutAction.getInstance());<NEW_LINE>putClientProperty(TopComponent.PROP_CLOSING_DISABLED, isMain);<NEW_LINE>putClientProperty(TopComponent.PROP_MAXIMIZATION_DISABLED, true);<NEW_LINE><MASK><NEW_LINE>activeComponentIds.add(title);<NEW_LINE>} | putClientProperty(TopComponent.PROP_DRAGGING_DISABLED, true); |
1,291,651 | public void onPartitionBecomeBootstrapFromOffline(String partitionName) {<NEW_LINE>// check if partition exists<NEW_LINE>ReplicaId <MASK><NEW_LINE>if (replica == null) {<NEW_LINE>// no matter this is an existing replica or new added one, it should be present in storage manager because new<NEW_LINE>// replica is added into storage manager first.<NEW_LINE>throw new StateTransitionException("Replica " + partitionName + " is not found on current node", ReplicaNotFound);<NEW_LINE>}<NEW_LINE>if (!partitionToPartitionInfo.containsKey(replica.getPartitionId())) {<NEW_LINE>// if partition is not present in partitionToPartitionInfo map, it means this partition was just added in storage<NEW_LINE>// manager and next step is to add it into replication manager<NEW_LINE>logger.info("Didn't find replica {} in replication manager, starting to add it.", partitionName);<NEW_LINE>if (!addReplica(replica)) {<NEW_LINE>throw new StateTransitionException("Failed to add new replica " + partitionName + " into replication manager", ReplicaOperationFailure);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | replica = storeManager.getReplica(partitionName); |
8,904 | private Value emitCompareAndSwap(boolean isLogic, LIRKind accessKind, Value address, Value expectedValue, Value newValue, Value trueValue, Value falseValue) {<NEW_LINE>ValueKind<?> kind = newValue.getValueKind();<NEW_LINE>assert kind.equals(expectedValue.getValueKind());<NEW_LINE>AMD64AddressValue addressValue = asAddressValue(address);<NEW_LINE>LIRKind integerAccessKind = accessKind;<NEW_LINE>Value reinterpretedExpectedValue = expectedValue;<NEW_LINE>Value reinterpretedNewValue = newValue;<NEW_LINE>boolean isXmm = ((AMD64Kind) accessKind.getPlatformKind()).isXMM();<NEW_LINE>if (isXmm) {<NEW_LINE>if (accessKind.getPlatformKind().equals(AMD64Kind.SINGLE)) {<NEW_LINE>integerAccessKind = LIRKind.fromJavaKind(target().arch, JavaKind.Int);<NEW_LINE>} else {<NEW_LINE>integerAccessKind = LIRKind.fromJavaKind(target().arch, JavaKind.Long);<NEW_LINE>}<NEW_LINE>reinterpretedExpectedValue = arithmeticLIRGen.emitReinterpret(integerAccessKind, expectedValue);<NEW_LINE>reinterpretedNewValue = arithmeticLIRGen.emitReinterpret(integerAccessKind, newValue);<NEW_LINE>}<NEW_LINE>AMD64Kind memKind = (AMD64Kind) integerAccessKind.getPlatformKind();<NEW_LINE>RegisterValue aRes = AMD64.rax.asValue(integerAccessKind);<NEW_LINE>AllocatableValue allocatableNewValue = asAllocatable(reinterpretedNewValue, integerAccessKind);<NEW_LINE>emitMove(aRes, reinterpretedExpectedValue);<NEW_LINE>append(new CompareAndSwapOp(memKind, aRes, addressValue, aRes, allocatableNewValue));<NEW_LINE>if (isLogic) {<NEW_LINE>assert trueValue.getValueKind().equals(falseValue.getValueKind());<NEW_LINE>return emitCondMoveOp(Condition.EQ, trueValue, falseValue, false, false);<NEW_LINE>} else {<NEW_LINE>if (isXmm) {<NEW_LINE>return <MASK><NEW_LINE>} else {<NEW_LINE>Variable result = newVariable(kind);<NEW_LINE>emitMove(result, aRes);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | arithmeticLIRGen.emitReinterpret(accessKind, aRes); |
1,794,323 | public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier, final String baseServerUrl) {<NEW_LINE>if (myPreResourceState != null && getCurrentElement() instanceof ISupportsUndeclaredExtensions) {<NEW_LINE>ExtensionDt newExtension = new ExtensionDt(theIsModifier);<NEW_LINE>newExtension.setUrl(theUrlAttr);<NEW_LINE>ISupportsUndeclaredExtensions elem = (ISupportsUndeclaredExtensions) getCurrentElement();<NEW_LINE>elem.addUndeclaredExtension(newExtension);<NEW_LINE>ExtensionState newState = new ExtensionState(myPreResourceState, newExtension);<NEW_LINE>push(newState);<NEW_LINE>} else {<NEW_LINE>if (theIsModifier == false) {<NEW_LINE>if (getCurrentElement() instanceof IBaseHasExtensions) {<NEW_LINE>IBaseExtension<?, ?> ext = ((IBaseHasExtensions) getCurrentElement()).addExtension();<NEW_LINE>ext.setUrl(theUrlAttr);<NEW_LINE>ParserState<T>.ExtensionState newState = new ExtensionState(myPreResourceState, ext);<NEW_LINE>push(newState);<NEW_LINE>} else {<NEW_LINE>logAndSwallowUnexpectedElement("extension");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (getCurrentElement() instanceof IBaseHasModifierExtensions) {<NEW_LINE>IBaseExtension<?, ?> ext = ((IBaseHasModifierExtensions) getCurrentElement()).addModifierExtension();<NEW_LINE>ext.setUrl(theUrlAttr);<NEW_LINE>ParserState<T>.ExtensionState newState <MASK><NEW_LINE>push(newState);<NEW_LINE>} else {<NEW_LINE>logAndSwallowUnexpectedElement("modifierExtension");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | = new ExtensionState(myPreResourceState, ext); |
152,317 | protected void initServerBootstrap(NettyServerHandler nettyServerHandler) {<NEW_LINE>boolean keepalive = getUrl().getParameter(KEEP_ALIVE_KEY, Boolean.FALSE);<NEW_LINE>bootstrap.group(bossGroup, workerGroup).channel(NettyEventLoopFactory.serverSocketChannelClass()).option(ChannelOption.SO_REUSEADDR, Boolean.TRUE).childOption(ChannelOption.TCP_NODELAY, Boolean.TRUE).childOption(ChannelOption.SO_KEEPALIVE, keepalive).childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT).childHandler(new ChannelInitializer<SocketChannel>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void initChannel(SocketChannel ch) throws Exception {<NEW_LINE>// FIXME: should we use getTimeout()?<NEW_LINE>int idleTimeout = UrlUtils.getIdleTimeout(getUrl());<NEW_LINE>NettyCodecAdapter adapter = new NettyCodecAdapter(getCodec(), <MASK><NEW_LINE>if (getUrl().getParameter(SSL_ENABLED_KEY, false)) {<NEW_LINE>ch.pipeline().addLast("negotiation", new SslServerTlsHandler(getUrl()));<NEW_LINE>}<NEW_LINE>ch.pipeline().addLast("decoder", adapter.getDecoder()).addLast("encoder", adapter.getEncoder()).addLast("server-idle-handler", new IdleStateHandler(0, 0, idleTimeout, MILLISECONDS)).addLast("handler", nettyServerHandler);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} | getUrl(), NettyServer.this); |
643,167 | public void showForward(final RequestContext context) {<NEW_LINE>final Request request = context.getRequest();<NEW_LINE>String to = context.param(Common.GOTO);<NEW_LINE>if (StringUtils.isBlank(to)) {<NEW_LINE>to = Latkes.getServePath();<NEW_LINE>}<NEW_LINE>final String referer = Headers.getHeader(request, "referer", "");<NEW_LINE>if (!StringUtils.startsWith(referer, Latkes.getServePath())) {<NEW_LINE>context.sendRedirect(Latkes.getServePath());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String url = to;<NEW_LINE>Symphonys.EXECUTOR_SERVICE.submit(() -> linkMgmtService.addLink(url));<NEW_LINE>final <MASK><NEW_LINE>if (null != user && UserExt.USER_XXX_STATUS_C_DISABLED == user.optInt(UserExt.USER_FORWARD_PAGE_STATUS)) {<NEW_LINE>context.sendRedirect(to);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final AbstractFreeMarkerRenderer renderer = new SkinRenderer(context, "forward.ftl");<NEW_LINE>final Map<String, Object> dataModel = renderer.getDataModel();<NEW_LINE>dataModel.put("forwardURL", to);<NEW_LINE>dataModelService.fillHeaderAndFooter(context, dataModel);<NEW_LINE>} | JSONObject user = Sessions.getUser(); |
832,077 | public com.amazonaws.services.cloudcontrolapi.model.ServiceInternalErrorException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.cloudcontrolapi.model.ServiceInternalErrorException serviceInternalErrorException = new com.amazonaws.services.cloudcontrolapi.model.ServiceInternalErrorException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 serviceInternalErrorException;<NEW_LINE>} | int originalDepth = context.getCurrentDepth(); |
770,996 | final ListRootsResult executeListRoots(ListRootsRequest listRootsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRootsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListRootsRequest> request = null;<NEW_LINE>Response<ListRootsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListRootsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listRootsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Organizations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListRoots");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListRootsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListRootsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} | endClientExecution(awsRequestMetrics, request, response); |
860,148 | protected void lowerJavaWriteNode(JavaWriteNode write) {<NEW_LINE>StructuredGraph graph = write.graph();<NEW_LINE>ValueNode value = implicitStoreConvert(graph, write.getWriteKind(), write.value(), write.isCompressible());<NEW_LINE>WriteNode memoryWrite;<NEW_LINE>if (write.ordersMemoryAccesses()) {<NEW_LINE>memoryWrite = graph.add(new OrderedWriteNode(write.getAddress(), write.getKilledLocationIdentity(), value, write.getBarrierType(), write.getMemoryOrder()));<NEW_LINE>} else if (write.hasSideEffect()) {<NEW_LINE>memoryWrite = graph.add(new WriteNode(write.getAddress(), write.getKilledLocationIdentity(), value<MASK><NEW_LINE>} else {<NEW_LINE>memoryWrite = graph.add(new SideEffectFreeWrite(write.getAddress(), write.getKilledLocationIdentity(), value, write.getBarrierType()));<NEW_LINE>}<NEW_LINE>memoryWrite.setStateAfter(write.stateAfter());<NEW_LINE>graph.replaceFixedWithFixed(write, memoryWrite);<NEW_LINE>memoryWrite.setGuard(write.getGuard());<NEW_LINE>} | , write.getBarrierType())); |
109,655 | private static void clusterUtilizationToSlime(ClusterModel clusterModel, Cursor utilizationObject) {<NEW_LINE>Load idealLoad = clusterModel.idealLoad();<NEW_LINE>Load averageLoad = clusterModel.averageLoad();<NEW_LINE>Load currentLoad = clusterModel.currentLoad();<NEW_LINE>utilizationObject.setDouble("cpu", averageLoad.cpu());<NEW_LINE>utilizationObject.setDouble("idealCpu", idealLoad.cpu());<NEW_LINE>utilizationObject.setDouble("currentCpu", currentLoad.cpu());<NEW_LINE>utilizationObject.setDouble(<MASK><NEW_LINE>utilizationObject.setDouble("idealMemory", idealLoad.memory());<NEW_LINE>utilizationObject.setDouble("currentMemory", currentLoad.memory());<NEW_LINE>utilizationObject.setDouble("disk", averageLoad.disk());<NEW_LINE>utilizationObject.setDouble("idealDisk", idealLoad.disk());<NEW_LINE>utilizationObject.setDouble("currentDisk", currentLoad.disk());<NEW_LINE>} | "memory", averageLoad.memory()); |
407,332 | public static void updateCurrentTrack(View v, final Activity ctx, final OsmandApplication app) {<NEW_LINE>final OsmandMonitoringPlugin plugin = OsmandPlugin.getActivePlugin(OsmandMonitoringPlugin.class);<NEW_LINE>if (v == null || ctx == null || app == null || plugin == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final boolean isRecording = app.getSettings().SAVE_GLOBAL_TRACK_TO_GPX.get();<NEW_LINE>ImageButton stop = ((ImageButton) v.findViewById(R.id.stop));<NEW_LINE>if (isRecording) {<NEW_LINE>stop.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_rec_stop));<NEW_LINE>stop.setContentDescription(app.getString(R.string.gpx_monitoring_stop));<NEW_LINE>} else {<NEW_LINE>stop.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_rec_start));<NEW_LINE>stop.setContentDescription(app.getString(R.string.gpx_monitoring_start));<NEW_LINE>}<NEW_LINE>stop.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>if (isRecording) {<NEW_LINE>plugin.stopRecording();<NEW_LINE>} else if (app.getLocationProvider().checkGPSEnabled(ctx)) {<NEW_LINE>plugin.startGPXMonitoring(ctx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>SavingTrackHelper sth = app.getSavingTrackHelper();<NEW_LINE>ImageButton save = ((ImageButton) v.findViewById(R.id.show_on_map));<NEW_LINE>save.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>plugin.saveCurrentTrack();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (sth.getPoints() > 0 || sth.getDistance() > 0) {<NEW_LINE>save.setVisibility(View.VISIBLE);<NEW_LINE>} else {<NEW_LINE>save.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>save.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_gsave_dark));<NEW_LINE>save.setContentDescription(app.getString(R.string.save_current_track));<NEW_LINE>((TextView) v.findViewById(R.id.points_count)).setText(String.valueOf(sth.getPoints()));<NEW_LINE>((TextView) v.findViewById(R.id.distance)).setText(OsmAndFormatter.getFormattedDistance(sth.getDistance(), app));<NEW_LINE>v.findViewById(R.id.points_icon<MASK><NEW_LINE>ImageView distance = (ImageView) v.findViewById(R.id.distance_icon);<NEW_LINE>distance.setVisibility(View.VISIBLE);<NEW_LINE>distance.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_distance_16));<NEW_LINE>ImageView pointsCount = (ImageView) v.findViewById(R.id.points_icon);<NEW_LINE>pointsCount.setVisibility(View.VISIBLE);<NEW_LINE>pointsCount.setImageDrawable(app.getUIUtilities().getThemedIcon(R.drawable.ic_action_waypoint_16));<NEW_LINE>} | ).setVisibility(View.VISIBLE); |
56,244 | // Returns true if multipoint_a is disjoint from envelope_b.<NEW_LINE>private static boolean multiPointDisjointEnvelope_(MultiPoint multipoint_a, Envelope envelope_b, double tolerance, ProgressTracker progress_tracker) {<NEW_LINE>Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D();<NEW_LINE>multipoint_a.queryEnvelope2D(env_a);<NEW_LINE>envelope_b.queryEnvelope2D(env_b);<NEW_LINE>if (envelopeInfContainsEnvelope_(env_b, env_a, tolerance))<NEW_LINE>return false;<NEW_LINE>Envelope2D env_b_inflated = new Envelope2D();<NEW_LINE>env_b_inflated.setCoords(env_b);<NEW_LINE>env_b_inflated.inflate(tolerance, tolerance);<NEW_LINE>Point2D pt_a = new Point2D();<NEW_LINE>for (int i = 0; i < multipoint_a.getPointCount(); i++) {<NEW_LINE><MASK><NEW_LINE>if (!env_b_inflated.contains(pt_a))<NEW_LINE>continue;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} | multipoint_a.getXY(i, pt_a); |
662,067 | public static <T extends ImageBase<T>> void growBorder(T src, ImageBorder<T> border, int borderX0, int borderY0, int borderX1, int borderY1, T dst) {<NEW_LINE>if (src instanceof ImageGray) {<NEW_LINE>if (GrayI8.class.isAssignableFrom(src.getClass())) {<NEW_LINE>ImageMiscOps.growBorder((GrayI8) src, (ImageBorder_S32) border, borderX0, borderY0, borderX1, borderY1, (GrayI8) dst);<NEW_LINE>} else if (GrayI16.class.isAssignableFrom(src.getClass())) {<NEW_LINE>ImageMiscOps.growBorder((GrayI16) src, (ImageBorder_S32) border, borderX0, borderY0, borderX1, borderY1, (GrayI16) dst);<NEW_LINE>} else if (GrayS32.class.isAssignableFrom(src.getClass())) {<NEW_LINE>ImageMiscOps.growBorder((GrayS32) src, (ImageBorder_S32) border, borderX0, borderY0, borderX1, borderY1, (GrayS32) dst);<NEW_LINE>} else if (GrayS64.class.isAssignableFrom(src.getClass())) {<NEW_LINE>ImageMiscOps.growBorder((GrayS64) src, (ImageBorder_S64) border, borderX0, borderY0, borderX1, borderY1, (GrayS64) dst);<NEW_LINE>} else if (GrayF32.class.isAssignableFrom(src.getClass())) {<NEW_LINE>ImageMiscOps.growBorder((GrayF32) src, (ImageBorder_F32) border, borderX0, borderY0, borderX1, borderY1, (GrayF32) dst);<NEW_LINE>} else if (GrayF64.class.isAssignableFrom(src.getClass())) {<NEW_LINE>ImageMiscOps.growBorder((GrayF64) src, (ImageBorder_F64) border, borderX0, borderY0, borderX1, borderY1, (GrayF64) dst);<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unknown or incompatible image type: " + src.<MASK><NEW_LINE>}<NEW_LINE>} else if (src instanceof ImageInterleaved) {<NEW_LINE>throw new IllegalArgumentException("Interleaved images not yet support. Create a feature request");<NEW_LINE>} else if (src instanceof Planar) {<NEW_LINE>Planar a = (Planar) src;<NEW_LINE>Planar b = (Planar) dst;<NEW_LINE>b.reshape(a.width, a.height, a.getNumBands());<NEW_LINE>for (int i = 0; i < a.getNumBands(); i++) growBorder(a.getBand(i), (ImageBorder) border, borderX0, borderY0, borderX1, borderY1, b.getBand(i));<NEW_LINE>} else {<NEW_LINE>throw new IllegalArgumentException("Unknown image type: " + src.getClass().getSimpleName());<NEW_LINE>}<NEW_LINE>} | getClass().getSimpleName()); |
1,025,384 | protected void tinkerPatch() {<NEW_LINE>Logger.d("-----------------------Tinker patch begin-----------------------");<NEW_LINE>Logger.d(mConfig.toString());<NEW_LINE>try {<NEW_LINE>// gen patch<NEW_LINE>ApkDecoder decoder = new ApkDecoder(mConfig);<NEW_LINE>decoder.onAllPatchesStart();<NEW_LINE>decoder.patch(mConfig.mOldApkFile, mConfig.mNewApkFile);<NEW_LINE>decoder.onAllPatchesEnd();<NEW_LINE>// gen meta file and version file<NEW_LINE>PatchInfo info = new PatchInfo(mConfig);<NEW_LINE>info.gen();<NEW_LINE>// build patch<NEW_LINE>PatchBuilder builder = new PatchBuilder(mConfig);<NEW_LINE>builder.buildPatch();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>goToError(e, ERRNO_USAGE);<NEW_LINE>}<NEW_LINE>Logger.<MASK><NEW_LINE>Logger.d("Tinker patch done, you can go to file to find the output %s", mConfig.mOutFolder);<NEW_LINE>Logger.d("-----------------------Tinker patch end-------------------------");<NEW_LINE>} | d("Tinker patch done, total time cost: %fs", diffTimeFromBegin()); |
90,808 | private void menuItemList(SimpleTreeNode toNode) {<NEW_LINE>int[] path = treeModel.getPath(treeModel.getRoot(), toNode);<NEW_LINE>Treeitem toItem = tree.renderItemByPath(path);<NEW_LINE>tree.setSelectedItem(toItem);<NEW_LINE>Events.sendEvent(tree, new Event(Events.ON_RIGHT_CLICK, tree));<NEW_LINE>Menupopup popup = new Menupopup();<NEW_LINE>Menuitem menuItem = new Menuitem(Msg.getMsg(Env.getCtx(), "delete"), "/images/dark/Delete16.png");<NEW_LINE>menuItem.setValue(MENU_ITEM_DELETE);<NEW_LINE>menuItem.setParent(popup);<NEW_LINE>menuItem.addEventListener(Events.ON_CLICK, new DeleteListener(toNode));<NEW_LINE>MTreeNode mtn = <MASK><NEW_LINE>if (mtn.isSummary()) {<NEW_LINE>MTreeFavoriteNode favNode = new MTreeFavoriteNode(Env.getCtx(), mtn.getNode_ID(), null);<NEW_LINE>if (favNode.isCollapsible()) {<NEW_LINE>menuItem = new Menuitem(Msg.getMsg(Env.getCtx(), MENU_ITEM_EXPAND), "/images/Minus16.png");<NEW_LINE>menuItem.setValue(MENU_ITEM_EXPAND);<NEW_LINE>} else {<NEW_LINE>menuItem = new Menuitem(Msg.getMsg(Env.getCtx(), MENU_ITEM_COLLAPSE), "/images/Plus16.png");<NEW_LINE>menuItem.setValue(MENU_ITEM_COLLAPSE);<NEW_LINE>}<NEW_LINE>menuItem.setParent(popup);<NEW_LINE>menuItem.addEventListener(Events.ON_CLICK, new CollExpdListener(favNode));<NEW_LINE>menuItem = new Menuitem(Msg.getMsg(Env.getCtx(), MENU_ITEM_RENAME_FOLDER), "/images/dark/FolderPlain16.png");<NEW_LINE>menuItem.setValue(MENU_ITEM_RENAME_FOLDER);<NEW_LINE>menuItem.setParent(popup);<NEW_LINE>menuItem.addEventListener(Events.ON_CLICK, new RenameFolderListener(toNode));<NEW_LINE>}<NEW_LINE>menuItem = new Menuitem(Msg.getMsg(Env.getCtx(), MENU_ITEM_ADD_FOLDER), "/images/dark/FolderAdd16.png");<NEW_LINE>menuItem.setValue(MENU_ITEM_ADD_FOLDER);<NEW_LINE>menuItem.setParent(popup);<NEW_LINE>menuItem.addEventListener(Events.ON_CLICK, new AddFolderListener(toNode));<NEW_LINE>popup.setPage(tree.getPage());<NEW_LINE>popup.open(toItem.getTreerow(), "after_pointer");<NEW_LINE>} | (MTreeNode) toNode.getData(); |
852,125 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>String methodName = "doGet";<NEW_LINE><MASK><NEW_LINE>responseWriter.println(CLASS_NAME + "." + methodName + ": ENTER");<NEW_LINE>Enumeration<URL> resourceUrls = getClass().getClassLoader().getResources(MARKER_RESOURCE_URL);<NEW_LINE>while (resourceUrls.hasMoreElements()) {<NEW_LINE>URL resourceUrl = resourceUrls.nextElement();<NEW_LINE>// 'FATResourceProtocol.validateResourceProtocol'<NEW_LINE>// validates the response using these lines and requires that<NEW_LINE>// their format be exactly as provided below.<NEW_LINE>responseWriter.println("URL [ " + resourceUrl + " ]");<NEW_LINE>responseWriter.println("Protocol [ " + resourceUrl.getProtocol() + " ]");<NEW_LINE>responseWriter.println("Path [ " + resourceUrl.getPath() + " ]");<NEW_LINE>responseWriter.println("Content [ " + resourceUrl.getContent() + " ]");<NEW_LINE>}<NEW_LINE>responseWriter.println(CLASS_NAME + "." + methodName + ": RETURN");<NEW_LINE>} | PrintWriter responseWriter = response.getWriter(); |
1,568,668 | public State keyPressed(Widget widget, WidgetKeyEvent event) {<NEW_LINE>if (event.getKeyCode() == KeyEvent.VK_CONTEXT_MENU || ((event.getModifiers() & InputEvent.SHIFT_MASK) == InputEvent.SHIFT_MASK && event.getKeyCode() == KeyEvent.VK_F10)) {<NEW_LINE>JPopupMenu popupMenu = provider.getPopupMenu(widget, null);<NEW_LINE>if (popupMenu != null) {<NEW_LINE>JComponent view = widget.getScene().getView();<NEW_LINE>if (view != null) {<NEW_LINE>// Rectangle visibleRect = view.getVisibleRect ();<NEW_LINE>// popupMenu.show (view, visibleRect.x + 10, visibleRect.y + 10);<NEW_LINE>Rectangle bounds = widget.getBounds();<NEW_LINE>Point location = new Point(bounds.x + <MASK><NEW_LINE>location = widget.convertLocalToScene(location);<NEW_LINE>location = widget.getScene().convertSceneToView(location);<NEW_LINE>popupMenu.show(view, location.x, location.y);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return State.CONSUMED;<NEW_LINE>}<NEW_LINE>return State.REJECTED;<NEW_LINE>} | 5, bounds.y + 5); |
1,544,962 | public static void registerType(ModelBuilder modelBuilder) {<NEW_LINE>ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Stage.class, CMMN_ELEMENT_STAGE).namespaceUri(CMMN11_NS).extendsType(PlanFragment.class).instanceProvider(new ModelTypeInstanceProvider<Stage>() {<NEW_LINE><NEW_LINE>public Stage newInstance(ModelTypeInstanceContext instanceContext) {<NEW_LINE>return new StageImpl(instanceContext);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>autoCompleteAttribute = typeBuilder.booleanAttribute(CMMN_ATTRIBUTE_AUTO_COMPLETE).defaultValue(false).build();<NEW_LINE>exitCriteriaRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXIT_CRITERIA_REFS).namespace(CMMN10_NS).idAttributeReferenceCollection(Sentry.class, CmmnAttributeElementReferenceCollection.class).build();<NEW_LINE>SequenceBuilder sequenceBuilder = typeBuilder.sequence();<NEW_LINE>planningTableChild = sequenceBuilder.element(PlanningTable.class).build();<NEW_LINE>planItemDefinitionCollection = sequenceBuilder.elementCollection(PlanItemDefinition.class).build();<NEW_LINE>exitCriterionCollection = sequenceBuilder.elementCollection(<MASK><NEW_LINE>typeBuilder.build();<NEW_LINE>} | ExitCriterion.class).build(); |
485,003 | public static ProxyCoapResource createReverseProxy(String name, boolean visible, boolean accept, final boolean copyQuery, final URI destination, ClientEndpoints... endpointsList) {<NEW_LINE>String scheme = destination.getScheme();<NEW_LINE>for (ClientEndpoints endpoints : endpointsList) {<NEW_LINE>if (endpoints.getScheme().equals(scheme)) {<NEW_LINE>Coap2CoapTranslator translator = new Coap2CoapTranslator() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public URI getDestinationURI(Request incomingRequest, InetSocketAddress exposed) throws TranslationException {<NEW_LINE>if (copyQuery && incomingRequest.getOptions().getURIQueryCount() > 0) {<NEW_LINE>String query = incomingRequest<MASK><NEW_LINE>try {<NEW_LINE>return new URI(destination.getScheme(), null, destination.getHost(), destination.getPort(), destination.getPath(), query, null);<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return destination;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>return new ProxyCoapClientResource(name, visible, accept, translator, endpoints);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (scheme.equals("http") || scheme.equals("https")) {<NEW_LINE>Coap2HttpTranslator translator = new Coap2HttpTranslator() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public URI getDestinationURI(Request incomingRequest, InetSocketAddress exposed) throws TranslationException {<NEW_LINE>if (copyQuery && incomingRequest.getOptions().getURIQueryCount() > 0) {<NEW_LINE>String query = incomingRequest.getOptions().getUriQueryString();<NEW_LINE>try {<NEW_LINE>return new URI(destination.getScheme(), null, destination.getHost(), destination.getPort(), destination.getPath(), query, null);<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return destination;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>return new ProxyHttpClientResource(name, visible, accept, translator, scheme);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>} | .getOptions().getUriQueryString(); |
1,071,127 | public static void handle(String sql, ManagerService service, int offset) {<NEW_LINE>String schema = sql.substring(offset).trim();<NEW_LINE>int length = schema.length();<NEW_LINE>if (length > 0) {<NEW_LINE>if (schema.endsWith(";")) {<NEW_LINE>schema = schema.substring(0, schema.length() - 1);<NEW_LINE>}<NEW_LINE>schema = StringUtil.replaceChars(schema, "`", null);<NEW_LINE>length = schema.length();<NEW_LINE>if (schema.charAt(0) == '\'' && schema.charAt(length - 1) == '\'') {<NEW_LINE>schema = schema.substring(1, length - 1);<NEW_LINE>}<NEW_LINE>if (DbleServer.getInstance().getSystemVariables().isLowerCaseTableNames()) {<NEW_LINE>schema = schema.toLowerCase();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!ManagerSchemaInfo.SCHEMA_NAME.equals(schema)) {<NEW_LINE>service.writeErrMessage(ErrorCode.ER_BAD_DB_ERROR, "Unknown database '" + schema + "'");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>service.setSchema(schema);<NEW_LINE>OkPacket okPacket = OkPacket.getDefault();<NEW_LINE>okPacket.<MASK><NEW_LINE>} | write(service.getConnection()); |
1,415,191 | public boolean isPyFileInLanguageHome(TruffleFile path) {<NEW_LINE>assert !ImageInfo.inImageBuildtimeCode() : "language home won't be available during image build time";<NEW_LINE>String languageHome = getLanguage().getHome();<NEW_LINE>// The language home may be 'null' if an embedder uses Python. In this case, IO must just be<NEW_LINE>// allowed.<NEW_LINE>if (languageHome != null) {<NEW_LINE>// This deliberately uses 'getAbsoluteFile' and not 'getCanonicalFile' because if, e.g.,<NEW_LINE>// 'path' is a symlink outside of the language home, the user should not be able to read<NEW_LINE>// the symlink if 'allowIO' is false.<NEW_LINE>TruffleFile coreHomePath = env.getInternalTruffleFile(languageHome).getAbsoluteFile();<NEW_LINE>TruffleFile absolutePath = path.getAbsoluteFile();<NEW_LINE>return absolutePath.startsWith(coreHomePath);<NEW_LINE>}<NEW_LINE>LOGGER.log(Level.FINE, (<MASK><NEW_LINE>return false;<NEW_LINE>} | ) -> "Cannot access file " + path + " because there is no language home."); |
1,377,595 | public final BetweenAndStep16<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> between(Field<T1> t1, Field<T2> t2, Field<T3> t3, Field<T4> t4, Field<T5> t5, Field<T6> t6, Field<T7> t7, Field<T8> t8, Field<T9> t9, Field<T10> t10, Field<T11> t11, Field<T12> t12, Field<T13> t13, Field<T14> t14, Field<T15> t15, Field<T16> t16) {<NEW_LINE>return between(row(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13<MASK><NEW_LINE>} | , t14, t15, t16)); |
710,349 | protected Map<String, SourceCode> loadSources(Path path) throws IOException {<NEW_LINE>Map<String, SourceCode> map = new HashMap<>();<NEW_LINE>// Will throw IO exception if the file couldn't be opened as an archive<NEW_LINE>try (ZipFile zip = new ZipFile(path.toFile())) {<NEW_LINE>Enumeration<? extends ZipEntry> entries = zip.entries();<NEW_LINE>while (entries.hasMoreElements()) {<NEW_LINE>ZipEntry entry = entries.nextElement();<NEW_LINE><MASK><NEW_LINE>if (!name.endsWith(".java"))<NEW_LINE>continue;<NEW_LINE>String src = IOUtils.toString(zip.getInputStream(entry), StandardCharsets.UTF_8);<NEW_LINE>try {<NEW_LINE>SourceCode code = new SourceCode(this, src);<NEW_LINE>code.analyze();<NEW_LINE>map.put(code.getInternalName(), code);<NEW_LINE>} catch (SourceCodeException ex) {<NEW_LINE>error(ex, "Failed to parse source: {} in {}", name, path);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>} | String name = entry.getName(); |
1,624,151 | public static BoundingBox mapWayToBoundingBox(TDWay way) {<NEW_LINE>TDNode[] wayNodes = way.getWayNodes();<NEW_LINE>if (wayNodes.length < 3) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>double lat = LatLongUtils.microdegreesToDegrees(wayNodes[0].getLatitude());<NEW_LINE>double lon = LatLongUtils.microdegreesToDegrees(wayNodes[0].getLongitude());<NEW_LINE>BoundingBox bb = new BoundingBox(<MASK><NEW_LINE>for (int i = 1; i < wayNodes.length; i++) {<NEW_LINE>bb = bb.extendCoordinates(LatLongUtils.microdegreesToDegrees(wayNodes[i].getLatitude()), LatLongUtils.microdegreesToDegrees(wayNodes[i].getLongitude()));<NEW_LINE>}<NEW_LINE>return bb;<NEW_LINE>} catch (IllegalArgumentException ex) {<NEW_LINE>LOGGER.warning("wrong coordinates on way: " + way.toString() + "\nLat: " + LatLongUtils.microdegreesToDegrees(wayNodes[0].getLatitude()) + " Lon: " + LatLongUtils.microdegreesToDegrees(wayNodes[0].getLongitude()));<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>} | lat, lon, lat, lon); |
890,645 | public static void adjustMenuActions(@NonNull Menu menu, int maxToShow, int toolbarWidthPx) {<NEW_LINE>int menuSize = 0;<NEW_LINE>for (int i = 0; i < menu.size(); i++) {<NEW_LINE>if (menu.getItem(i).isVisible()) {<NEW_LINE>menuSize++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int widthAllowed = toolbarWidthPx - ViewUtil.dpToPx(NAVIGATION_DP + TITLE_DP);<NEW_LINE>int nItemsToShow = Math.min(maxToShow, widthAllowed / ViewUtil.dpToPx(ACTION_VIEW_WIDTH_DP));<NEW_LINE>if (nItemsToShow < menuSize) {<NEW_LINE>widthAllowed -= ViewUtil.dpToPx(OVERFLOW_VIEW_WIDTH_DP);<NEW_LINE>}<NEW_LINE>nItemsToShow = Math.min(maxToShow, widthAllowed / ViewUtil.dpToPx(ACTION_VIEW_WIDTH_DP));<NEW_LINE>menu.findItem(ID_ALWAYS_SHOW_AS_ACTION).setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);<NEW_LINE>nItemsToShow--;<NEW_LINE>for (int i = 0; i < menu.size(); i++) {<NEW_LINE>MenuItem item = menu.getItem(i);<NEW_LINE>boolean neverShowAsAction = item.getItemId() == ID_NEVER_SHOW_AS_ACTION_1 <MASK><NEW_LINE>boolean alwaysShowAsAction = item.getItemId() == ID_ALWAYS_SHOW_AS_ACTION;<NEW_LINE>if (alwaysShowAsAction)<NEW_LINE>continue;<NEW_LINE>if (item.isVisible() && nItemsToShow > 0 && !neverShowAsAction) {<NEW_LINE>item.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);<NEW_LINE>nItemsToShow--;<NEW_LINE>} else {<NEW_LINE>item.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | || item.getItemId() == ID_NEVER_SHOW_AS_ACTION_2; |
659,119 | public static boolean isSameCostDimension(MAcctSchema as, MTransaction trxFrom, MTransaction trxTo) {<NEW_LINE>if (trxFrom.getM_Product_ID() != trxTo.getM_Product_ID()) {<NEW_LINE>throw new AdempiereException("Same product is needed - " + trxFrom + ", " + trxTo);<NEW_LINE>}<NEW_LINE>MProduct product = MProduct.get(trxFrom.getCtx(), trxFrom.getM_Product_ID());<NEW_LINE>String CostingLevel = product.getCostingLevel(as, trxFrom.getAD_Org_ID());<NEW_LINE>MLocator locatorFrom = MLocator.get(trxFrom.getCtx(), trxFrom.getM_Locator_ID());<NEW_LINE>MLocator locatorTo = MLocator.get(trxTo.getCtx(), trxTo.getM_Locator_ID());<NEW_LINE>int Org_ID = locatorFrom.getAD_Org_ID();<NEW_LINE><MASK><NEW_LINE>int ASI_ID = trxFrom.getM_AttributeSetInstance_ID();<NEW_LINE>int ASI_ID_To = trxTo.getM_AttributeSetInstance_ID();<NEW_LINE>if (MAcctSchema.COSTINGLEVEL_Client.equals(CostingLevel)) {<NEW_LINE>Org_ID = 0;<NEW_LINE>Org_ID_To = 0;<NEW_LINE>ASI_ID = 0;<NEW_LINE>ASI_ID_To = 0;<NEW_LINE>} else if (MAcctSchema.COSTINGLEVEL_Organization.equals(CostingLevel)) {<NEW_LINE>ASI_ID = 0;<NEW_LINE>ASI_ID_To = 0;<NEW_LINE>} else if (MAcctSchema.COSTINGLEVEL_Warehouse.equals(CostingLevel)) {<NEW_LINE>ASI_ID = 0;<NEW_LINE>ASI_ID_To = 0;<NEW_LINE>} else if (MAcctSchema.COSTINGLEVEL_BatchLot.equals(CostingLevel)) {<NEW_LINE>Org_ID = 0;<NEW_LINE>Org_ID_To = 0;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>return Org_ID == Org_ID_To && ASI_ID == ASI_ID_To;<NEW_LINE>} | int Org_ID_To = locatorTo.getAD_Org_ID(); |
1,765,425 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (offset_ != 0) {<NEW_LINE>output.writeUInt32(1, offset_);<NEW_LINE>}<NEW_LINE>if (length_ != 0) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (!getIdBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_);<NEW_LINE>}<NEW_LINE>if (!getSubIdBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subId_);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < suggestions_.size(); i++) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 5, suggestions_.getRaw(i));<NEW_LINE>}<NEW_LINE>if (!getRuleDescriptionBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ruleDescription_);<NEW_LINE>}<NEW_LINE>if (!getMatchDescriptionBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 7, matchDescription_);<NEW_LINE>}<NEW_LINE>if (!getMatchShortDescriptionBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 8, matchShortDescription_);<NEW_LINE>}<NEW_LINE>if (!getUrlBytes().isEmpty()) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 9, url_);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < suggestedReplacements_.size(); i++) {<NEW_LINE>output.writeMessage(10, suggestedReplacements_.get(i));<NEW_LINE>}<NEW_LINE>if (autoCorrect_ != false) {<NEW_LINE>output.writeBool(11, autoCorrect_);<NEW_LINE>}<NEW_LINE>if (type_ != org.languagetool.rules.ml.MLServerProto.Match.MatchType.UnknownWord.getNumber()) {<NEW_LINE>output.writeEnum(12, type_);<NEW_LINE>}<NEW_LINE>if (contextForSureMatch_ != 0) {<NEW_LINE>output.writeSInt32(13, contextForSureMatch_);<NEW_LINE>}<NEW_LINE>if (rule_ != null) {<NEW_LINE>output.writeMessage(14, getRule());<NEW_LINE>}<NEW_LINE>unknownFields.writeTo(output);<NEW_LINE>} | output.writeUInt32(2, length_); |
542,522 | private void calcHash(PcodeOp op, int slot, int method) {<NEW_LINE>vnproc = 0;<NEW_LINE>opproc = 0;<NEW_LINE>opedgeproc = 0;<NEW_LINE><MASK><NEW_LINE>Varnode root = (slot < 0) ? op.getOutput() : op.getInput(slot);<NEW_LINE>opedge.add(new ToOpEdge(op, slot));<NEW_LINE>switch(method) {<NEW_LINE>case 4:<NEW_LINE>break;<NEW_LINE>case 5:<NEW_LINE>gatherUnmarkedOp();<NEW_LINE>for (; opproc < markop.size(); ++opproc) {<NEW_LINE>buildOpUp(markop.get(opproc));<NEW_LINE>}<NEW_LINE>gatherUnmarkedVn();<NEW_LINE>break;<NEW_LINE>case 6:<NEW_LINE>gatherUnmarkedOp();<NEW_LINE>for (; opproc < markop.size(); ++opproc) {<NEW_LINE>buildOpDown(markop.get(opproc));<NEW_LINE>}<NEW_LINE>gatherUnmarkedVn();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>pieceTogetherHash(root, method);<NEW_LINE>} | markset = new HashSet<>(); |
245,858 | public AssociateAwsAccountWithPartnerAccountResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AssociateAwsAccountWithPartnerAccountResult associateAwsAccountWithPartnerAccountResult = new AssociateAwsAccountWithPartnerAccountResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return associateAwsAccountWithPartnerAccountResult;<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("Sidewalk", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>associateAwsAccountWithPartnerAccountResult.setSidewalk(SidewalkAccountInfoJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Arn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>associateAwsAccountWithPartnerAccountResult.setArn(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 associateAwsAccountWithPartnerAccountResult;<NEW_LINE>} | int originalDepth = context.getCurrentDepth(); |
118,361 | public int fill(Supplier<E> s, int limit) {<NEW_LINE>if (null == s)<NEW_LINE>throw new IllegalArgumentException("supplier is null");<NEW_LINE>if (limit < 0)<NEW_LINE>throw new IllegalArgumentException("limit is negative:" + limit);<NEW_LINE>if (limit == 0)<NEW_LINE>return 0;<NEW_LINE>final int mask = this.mask;<NEW_LINE>final long capacity = mask + 1;<NEW_LINE>long producerLimit = lvProducerLimit();<NEW_LINE>long pIndex;<NEW_LINE>int actualLimit;<NEW_LINE>do {<NEW_LINE>pIndex = lvProducerIndex();<NEW_LINE>long available = producerLimit - pIndex;<NEW_LINE>if (available <= 0) {<NEW_LINE>final long cIndex = lvConsumerIndex();<NEW_LINE>producerLimit = cIndex + capacity;<NEW_LINE>available = producerLimit - pIndex;<NEW_LINE>if (available <= 0) {<NEW_LINE>// FULL :(<NEW_LINE>return 0;<NEW_LINE>} else {<NEW_LINE>// update producer limit to the next index that we must recheck the consumer index<NEW_LINE>soProducerLimit(producerLimit);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>actualLimit = Math.min((int) available, limit);<NEW_LINE>} while (!casProducerIndex(pIndex, pIndex + actualLimit));<NEW_LINE>// right, now we claimed a few slots and can fill them with goodness<NEW_LINE>final AtomicReferenceArray<E> buffer = this.buffer;<NEW_LINE>for (int i = 0; i < actualLimit; i++) {<NEW_LINE>// Won CAS, move on to storing<NEW_LINE>final int offset = <MASK><NEW_LINE>soRefElement(buffer, offset, s.get());<NEW_LINE>}<NEW_LINE>return actualLimit;<NEW_LINE>} | calcCircularRefElementOffset(pIndex + i, mask); |
414,815 | private void updateColumnSizes() {<NEW_LINE>for (int i = 0; i < getColumnCount(); i++) {<NEW_LINE>final WebFileTableModel model = getFileTableModel();<NEW_LINE>final TableColumn column = getColumnModel().getColumn(i);<NEW_LINE>column.setIdentifier<MASK><NEW_LINE>if (model.getColumnId(i).equals(NUMBER_COLUMN)) {<NEW_LINE>column.setPreferredWidth(30);<NEW_LINE>} else if (model.getColumnId(i).equals(NAME_COLUMN)) {<NEW_LINE>column.setPreferredWidth(340);<NEW_LINE>} else if (model.getColumnId(i).equals(SIZE_COLUMN) || model.getColumnId(i).equals(EXTENSION_COLUMN)) {<NEW_LINE>column.setPreferredWidth(90);<NEW_LINE>} else if (model.getColumnId(i).equals(CREATION_DATE_COLUMN) || model.getColumnId(i).equals(MODIFICATION_DATE_COLUMN)) {<NEW_LINE>column.setPreferredWidth(130);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | (model.getColumnId(i)); |
1,302,739 | public static ListDataSourceResponse unmarshall(ListDataSourceResponse listDataSourceResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDataSourceResponse.setCode(_ctx.stringValue("ListDataSourceResponse.code"));<NEW_LINE>listDataSourceResponse.setMessage(_ctx.stringValue("ListDataSourceResponse.message"));<NEW_LINE>listDataSourceResponse.setRequestId(_ctx.stringValue("ListDataSourceResponse.requestId"));<NEW_LINE>List<ResultItem> result = new ArrayList<ResultItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListDataSourceResponse.result.Length"); i++) {<NEW_LINE>ResultItem resultItem = new ResultItem();<NEW_LINE>resultItem.setGmtCreate(_ctx.stringValue<MASK><NEW_LINE>resultItem.setGmtModified(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].gmtModified"));<NEW_LINE>resultItem.setTableName(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].tableName"));<NEW_LINE>Meta meta = new Meta();<NEW_LINE>meta.setAccessKeyId(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].meta.accessKeyId"));<NEW_LINE>meta.setBucketName(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].meta.bucketName"));<NEW_LINE>meta.setPartition(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].meta.partition"));<NEW_LINE>meta.setPath(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].meta.path"));<NEW_LINE>meta.setProjectName(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].meta.projectName"));<NEW_LINE>meta.setTableName(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].meta.tableName"));<NEW_LINE>meta.setTimestamp(_ctx.longValue("ListDataSourceResponse.result[" + i + "].meta.timestamp"));<NEW_LINE>meta.setType(_ctx.stringValue("ListDataSourceResponse.result[" + i + "].meta.type"));<NEW_LINE>resultItem.setMeta(meta);<NEW_LINE>result.add(resultItem);<NEW_LINE>}<NEW_LINE>listDataSourceResponse.setResult(result);<NEW_LINE>return listDataSourceResponse;<NEW_LINE>} | ("ListDataSourceResponse.result[" + i + "].gmtCreate")); |
791,827 | private ArchiveResult archive0(@NonNull final ArchiveRequest request) {<NEW_LINE>// t.schoemeberg@metas.de, 03787: using the client/org of the archived PO, if possible<NEW_LINE>final Properties ctxToUse = createContext(request);<NEW_LINE>final IArchiveStorage storage = Services.get(IArchiveStorageFactory.class).getArchiveStorage(ctxToUse);<NEW_LINE>final I_AD_Archive archive = storage.newArchive(ctxToUse, request.getTrxName());<NEW_LINE>archive.setDocumentFlavor(DocumentReportFlavor.toCode(request.getFlavor()));<NEW_LINE>// FRESH-218: extract and set the language to the archive<NEW_LINE>final String language = getLanguageFromReport(ctxToUse, request);<NEW_LINE>archive.setAD_Language(language);<NEW_LINE>archive.setDocumentNo(request.getDocumentNo());<NEW_LINE>archive.setName(request.getArchiveName());<NEW_LINE>archive.setC_Async_Batch_ID(NumberUtils.asInt(request.getAsyncBatchId(), -1));<NEW_LINE>archive.setIsReport(request.isReport());<NEW_LINE>//<NEW_LINE>archive.setAD_Process_ID(AdProcessId.toRepoId(request.getProcessId()));<NEW_LINE>final TableRecordReference recordRef = request.getRecordRef();<NEW_LINE>archive.setAD_Table_ID(recordRef != null ? recordRef.getAD_Table_ID() : -1);<NEW_LINE>archive.setRecord_ID(recordRef != null ? recordRef<MASK><NEW_LINE>archive.setC_BPartner_ID(BPartnerId.toRepoId(request.getBpartnerId()));<NEW_LINE>final byte[] byteArray = extractByteArray(request);<NEW_LINE>storage.setBinaryData(archive, byteArray);<NEW_LINE>// FRESH-349: Set ad_pinstance<NEW_LINE>archive.setAD_PInstance_ID(PInstanceId.toRepoId(request.getPinstanceId()));<NEW_LINE>if (request.isSave()) {<NEW_LINE>InterfaceWrapperHelper.save(archive);<NEW_LINE>}<NEW_LINE>return ArchiveResult.builder().archiveRecord(archive).data(byteArray).build();<NEW_LINE>} | .getRecord_ID() : -1); |
1,219,074 | private void scanNonCollectableObjectsInternal(long memoryType) throws CorruptDataException {<NEW_LINE>GCHeapRegionIterator regionIterator = GCHeapRegionIterator.from();<NEW_LINE>while (regionIterator.hasNext()) {<NEW_LINE>GCHeapRegionDescriptor region = regionIterator.next();<NEW_LINE>if (new UDATA(region.getTypeFlags()).allBitsIn(memoryType)) {<NEW_LINE>GCObjectHeapIterator objectIterator = GCObjectHeapIterator.fromHeapRegionDescriptor(region, true, false);<NEW_LINE>while (objectIterator.hasNext()) {<NEW_LINE><MASK><NEW_LINE>doClassSlot(J9ObjectHelper.clazz(object));<NEW_LINE>GCObjectIterator fieldIterator = GCObjectIterator.fromJ9Object(object, true);<NEW_LINE>GCObjectIterator fieldAddressIterator = GCObjectIterator.fromJ9Object(object, true);<NEW_LINE>while (fieldIterator.hasNext()) {<NEW_LINE>doNonCollectableObjectSlot(fieldIterator.next(), fieldAddressIterator.nextAddress());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | J9ObjectPointer object = objectIterator.next(); |
850,677 | public void storeWaypointsInPersonalNote(final Geocache cache, final int maxPersonalNotesChars) {<NEW_LINE>final String note = cache.getPersonalNote() == null ? "" : cache.getPersonalNote();<NEW_LINE>// only user modified waypoints<NEW_LINE>final List<Waypoint> userModifiedWaypoints = new ArrayList<>();<NEW_LINE>for (Waypoint w : cache.getWaypoints()) {<NEW_LINE>if (w.isUserModified()) {<NEW_LINE>userModifiedWaypoints.add(w);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (userModifiedWaypoints.isEmpty()) {<NEW_LINE>showShortToast(getString(R.string.cache_personal_note_storewaypoints_nowaypoints));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// if given maxSize is obviously bogus, then make length unlimited<NEW_LINE>final int maxSize = maxPersonalNotesChars == 0 ? -1 : maxPersonalNotesChars;<NEW_LINE>final String newNote = WaypointParser.putParseableWaypointsInText(note, userModifiedWaypoints, cache.getVariables(), maxSize);<NEW_LINE>if (newNote != null) {<NEW_LINE>setNewPersonalNote(newNote);<NEW_LINE>final String newNoteNonShorted = WaypointParser.putParseableWaypointsInText(note, userModifiedWaypoints, cache<MASK><NEW_LINE>if (newNoteNonShorted.length() > newNote.length()) {<NEW_LINE>showShortToast(getString(R.string.cache_personal_note_storewaypoints_success_limited, maxSize));<NEW_LINE>} else {<NEW_LINE>showShortToast(getString(R.string.cache_personal_note_storewaypoints_success));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>showShortToast(getString(R.string.cache_personal_note_storewaypoints_failed, maxSize));<NEW_LINE>}<NEW_LINE>} | .getVariables(), -1); |
925,759 | public ContactViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {<NEW_LINE>Display display = context.getWindowManager().getDefaultDisplay();<NEW_LINE>DisplayMetrics outMetrics = new DisplayMetrics();<NEW_LINE>display.getMetrics(outMetrics);<NEW_LINE>View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_add_avatar, parent, false);<NEW_LINE>ContactViewHolder holder = new ContactViewHolder(v);<NEW_LINE>holder.clickableArea = v.findViewById(R.id.item_layout_add);<NEW_LINE>holder.itemLayout = v.findViewById(R.id.chip_layout);<NEW_LINE>holder.inviteMore = v.findViewById(R.id.invite_more);<NEW_LINE>holder.textViewName = v.findViewById(R.id.name_chip);<NEW_LINE>holder.textViewName.setMaxWidth(dp2px(60, outMetrics));<NEW_LINE>holder.avatar = v.findViewById(R.id.add_rounded_avatar);<NEW_LINE>holder.addIcon = v.findViewById(R.id.add_icon_chip);<NEW_LINE>holder.clickableArea.setOnClickListener(this);<NEW_LINE><MASK><NEW_LINE>v.setTag(holder);<NEW_LINE>return holder;<NEW_LINE>} | holder.clickableArea.setTag(holder); |
5,488 | public static void main(String[] args) throws IOException {<NEW_LINE>ClassicMp4ContainerSource classicMp4ContainerSource = null;<NEW_LINE>try {<NEW_LINE>classicMp4ContainerSource = new ClassicMp4ContainerSource(new URI("http://org.mp4parser.s3.amazonaws.com/examples/Cosmos%20Laundromat%20small%20faststart.mp4").toURL().openStream());<NEW_LINE>} catch (URISyntaxException e) {<NEW_LINE>throw new IOException(e);<NEW_LINE>}<NEW_LINE>List<StreamingTrack> streamingTracks = classicMp4ContainerSource.getTracks();<NEW_LINE><MASK><NEW_LINE>FragmentedMp4Writer writer = new FragmentedMp4Writer(streamingTracks, new FileOutputStream(f).getChannel());<NEW_LINE>System.out.println("Reading and writing started.");<NEW_LINE>classicMp4ContainerSource.call();<NEW_LINE>writer.close();<NEW_LINE>System.err.println(f.getAbsolutePath());<NEW_LINE>} | File f = new File("output.mp4"); |
1,498,562 | public Request<GetSMSAttributesRequest> marshall(GetSMSAttributesRequest getSMSAttributesRequest) {<NEW_LINE>if (getSMSAttributesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetSMSAttributesRequest)");<NEW_LINE>}<NEW_LINE>Request<GetSMSAttributesRequest> request = new DefaultRequest<GetSMSAttributesRequest>(getSMSAttributesRequest, "AmazonSNS");<NEW_LINE>request.addParameter("Action", "GetSMSAttributes");<NEW_LINE><MASK><NEW_LINE>String prefix;<NEW_LINE>if (getSMSAttributesRequest.getAttributes() != null) {<NEW_LINE>prefix = "attributes";<NEW_LINE>java.util.List<String> attributes = getSMSAttributesRequest.getAttributes();<NEW_LINE>int attributesIndex = 1;<NEW_LINE>String attributesPrefix = prefix;<NEW_LINE>for (String attributesItem : attributes) {<NEW_LINE>prefix = attributesPrefix + ".member." + attributesIndex;<NEW_LINE>if (attributesItem != null) {<NEW_LINE>request.addParameter(prefix, StringUtils.fromString(attributesItem));<NEW_LINE>}<NEW_LINE>attributesIndex++;<NEW_LINE>}<NEW_LINE>prefix = attributesPrefix;<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>} | request.addParameter("Version", "2010-03-31"); |
1,177,641 | final InitiateVaultLockResult executeInitiateVaultLock(InitiateVaultLockRequest initiateVaultLockRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(initiateVaultLockRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<InitiateVaultLockRequest> request = null;<NEW_LINE>Response<InitiateVaultLockResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new InitiateVaultLockRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(initiateVaultLockRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Glacier");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "InitiateVaultLock");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<InitiateVaultLockResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new InitiateVaultLockResultJsonUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>} | invoke(request, responseHandler, executionContext); |
1,843,680 | public void solveVelocityConstraints(final SolverData data) {<NEW_LINE>Vec2 vA = data.velocities[m_indexA].v;<NEW_LINE>float wA = data.velocities[m_indexA].w;<NEW_LINE>Vec2 vB = <MASK><NEW_LINE>float wB = data.velocities[m_indexB].w;<NEW_LINE>// Cdot = dot(u, v + cross(w, r))<NEW_LINE>Vec2 vpA = pool.popVec2();<NEW_LINE>Vec2 vpB = pool.popVec2();<NEW_LINE>Vec2 temp = pool.popVec2();<NEW_LINE>Vec2.crossToOutUnsafe(wA, m_rA, vpA);<NEW_LINE>vpA.addLocal(vA);<NEW_LINE>Vec2.crossToOutUnsafe(wB, m_rB, vpB);<NEW_LINE>vpB.addLocal(vB);<NEW_LINE>float C = m_length - m_maxLength;<NEW_LINE>float Cdot = Vec2.dot(m_u, temp.set(vpB).subLocal(vpA));<NEW_LINE>// Predictive constraint.<NEW_LINE>if (C < 0.0f) {<NEW_LINE>Cdot += data.step.inv_dt * C;<NEW_LINE>}<NEW_LINE>float impulse = -m_mass * Cdot;<NEW_LINE>float oldImpulse = m_impulse;<NEW_LINE>m_impulse = Math.min(0.0f, m_impulse + impulse);<NEW_LINE>impulse = m_impulse - oldImpulse;<NEW_LINE>float Px = impulse * m_u.x;<NEW_LINE>float Py = impulse * m_u.y;<NEW_LINE>vA.x -= m_invMassA * Px;<NEW_LINE>vA.y -= m_invMassA * Py;<NEW_LINE>wA -= m_invIA * (m_rA.x * Py - m_rA.y * Px);<NEW_LINE>vB.x += m_invMassB * Px;<NEW_LINE>vB.y += m_invMassB * Py;<NEW_LINE>wB += m_invIB * (m_rB.x * Py - m_rB.y * Px);<NEW_LINE>pool.pushVec2(3);<NEW_LINE>// data.velocities[m_indexA].v = vA;<NEW_LINE>data.velocities[m_indexA].w = wA;<NEW_LINE>// data.velocities[m_indexB].v = vB;<NEW_LINE>data.velocities[m_indexB].w = wB;<NEW_LINE>} | data.velocities[m_indexB].v; |
1,278,010 | public static SequenceHeader read(ByteBuffer bb) {<NEW_LINE>BitReader _in = BitReader.createBitReader(bb);<NEW_LINE>SequenceHeader sh = new SequenceHeader();<NEW_LINE>sh.horizontal_size = _in.readNBit(12);<NEW_LINE>sh.vertical_size = _in.readNBit(12);<NEW_LINE>sh.<MASK><NEW_LINE>sh.frame_rate_code = _in.readNBit(4);<NEW_LINE>sh.bit_rate = _in.readNBit(18);<NEW_LINE>_in.read1Bit();<NEW_LINE>sh.vbv_buffer_size_value = _in.readNBit(10);<NEW_LINE>sh.constrained_parameters_flag = _in.read1Bit();<NEW_LINE>if (_in.read1Bit() != 0) {<NEW_LINE>sh.intra_quantiser_matrix = new int[64];<NEW_LINE>for (int i = 0; i < 64; i++) {<NEW_LINE>sh.intra_quantiser_matrix[i] = _in.readNBit(8);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (_in.read1Bit() != 0) {<NEW_LINE>sh.non_intra_quantiser_matrix = new int[64];<NEW_LINE>for (int i = 0; i < 64; i++) {<NEW_LINE>sh.non_intra_quantiser_matrix[i] = _in.readNBit(8);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sh;<NEW_LINE>} | aspect_ratio_information = _in.readNBit(4); |
411,189 | public static ListVirtualPhysicalConnectionsResponse unmarshall(ListVirtualPhysicalConnectionsResponse listVirtualPhysicalConnectionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVirtualPhysicalConnectionsResponse.setRequestId(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.RequestId"));<NEW_LINE>listVirtualPhysicalConnectionsResponse.setNextToken(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.NextToken"));<NEW_LINE>listVirtualPhysicalConnectionsResponse.setTotalCount(_ctx.integerValue("ListVirtualPhysicalConnectionsResponse.TotalCount"));<NEW_LINE>listVirtualPhysicalConnectionsResponse.setCount(_ctx.integerValue("ListVirtualPhysicalConnectionsResponse.Count"));<NEW_LINE>List<VirtualPhysicalConnection> virtualPhysicalConnections = new ArrayList<VirtualPhysicalConnection>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections.Length"); i++) {<NEW_LINE>VirtualPhysicalConnection virtualPhysicalConnection = new VirtualPhysicalConnection();<NEW_LINE>virtualPhysicalConnection.setType(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].Type"));<NEW_LINE>virtualPhysicalConnection.setStatus(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].Status"));<NEW_LINE>virtualPhysicalConnection.setCreationTime(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].CreationTime"));<NEW_LINE>virtualPhysicalConnection.setAdLocation(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].AdLocation"));<NEW_LINE>virtualPhysicalConnection.setPortNumber(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].PortNumber"));<NEW_LINE>virtualPhysicalConnection.setSpec(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].Spec"));<NEW_LINE>virtualPhysicalConnection.setChargeType(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].ChargeType"));<NEW_LINE>virtualPhysicalConnection.setDescription(_ctx.stringValue<MASK><NEW_LINE>virtualPhysicalConnection.setBandwidth(_ctx.longValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].Bandwidth"));<NEW_LINE>virtualPhysicalConnection.setEnabledTime(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].EnabledTime"));<NEW_LINE>virtualPhysicalConnection.setLineOperator(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].LineOperator"));<NEW_LINE>virtualPhysicalConnection.setPeerLocation(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].PeerLocation"));<NEW_LINE>virtualPhysicalConnection.setRedundantPhysicalConnectionId(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].RedundantPhysicalConnectionId"));<NEW_LINE>virtualPhysicalConnection.setName(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].Name"));<NEW_LINE>virtualPhysicalConnection.setCircuitCode(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].CircuitCode"));<NEW_LINE>virtualPhysicalConnection.setEndTime(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].EndTime"));<NEW_LINE>virtualPhysicalConnection.setPortType(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].PortType"));<NEW_LINE>virtualPhysicalConnection.setBusinessStatus(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].BusinessStatus"));<NEW_LINE>virtualPhysicalConnection.setLoaStatus(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].LoaStatus"));<NEW_LINE>virtualPhysicalConnection.setAccessPointId(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].AccessPointId"));<NEW_LINE>virtualPhysicalConnection.setPhysicalConnectionId(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].PhysicalConnectionId"));<NEW_LINE>virtualPhysicalConnection.setProductType(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].ProductType"));<NEW_LINE>virtualPhysicalConnection.setParentPhysicalConnectionId(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].ParentPhysicalConnectionId"));<NEW_LINE>virtualPhysicalConnection.setVirtualPhysicalConnectionStatus(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].VirtualPhysicalConnectionStatus"));<NEW_LINE>virtualPhysicalConnection.setParentPhysicalConnectionAliUid(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].ParentPhysicalConnectionAliUid"));<NEW_LINE>virtualPhysicalConnection.setOrderMode(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].OrderMode"));<NEW_LINE>virtualPhysicalConnection.setAliUid(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].AliUid"));<NEW_LINE>virtualPhysicalConnection.setVlanId(_ctx.stringValue("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].VlanId"));<NEW_LINE>virtualPhysicalConnections.add(virtualPhysicalConnection);<NEW_LINE>}<NEW_LINE>listVirtualPhysicalConnectionsResponse.setVirtualPhysicalConnections(virtualPhysicalConnections);<NEW_LINE>return listVirtualPhysicalConnectionsResponse;<NEW_LINE>} | ("ListVirtualPhysicalConnectionsResponse.VirtualPhysicalConnections[" + i + "].Description")); |
517,060 | public MultiValueMap<String, Connection<?>> findConnectionsToUsers(MultiValueMap<String, String> providerUsers) {<NEW_LINE>if (providerUsers == null || providerUsers.isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("Unable to execute find: no providerUsers provided");<NEW_LINE>}<NEW_LINE>StringBuilder providerUsersCriteriaSql = new StringBuilder();<NEW_LINE>MapSqlParameterSource parameters = new MapSqlParameterSource();<NEW_LINE>parameters.addValue("userId", userId);<NEW_LINE>for (Iterator<Entry<String, List<String>>> it = providerUsers.entrySet().iterator(); it.hasNext(); ) {<NEW_LINE>Entry<String, List<String>> entry = it.next();<NEW_LINE>String providerId = entry.getKey();<NEW_LINE>providerUsersCriteriaSql.append("providerId = :providerId_").append(providerId).append(" and providerUserId in (:providerUserIds_").append(providerId).append(")");<NEW_LINE>parameters.addValue("providerId_" + providerId, providerId);<NEW_LINE>parameters.addValue("providerUserIds_" + providerId, entry.getValue());<NEW_LINE>if (it.hasNext()) {<NEW_LINE>providerUsersCriteriaSql.append(" or ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<Connection<?>> resultList = new NamedParameterJdbcTemplate(jdbcTemplate).query(selectFromUserConnection() + " where userId = :userId and " + providerUsersCriteriaSql + " order by providerId, `rank`", parameters, connectionMapper);<NEW_LINE>MultiValueMap<String, Connection<?>> connectionsForUsers = new LinkedMultiValueMap<String, Connection<?>>();<NEW_LINE>for (Connection<?> connection : resultList) {<NEW_LINE>String providerId = connection.getKey().getProviderId();<NEW_LINE>List<String> <MASK><NEW_LINE>List<Connection<?>> connections = connectionsForUsers.get(providerId);<NEW_LINE>if (connections == null) {<NEW_LINE>connections = new ArrayList<Connection<?>>(userIds.size());<NEW_LINE>for (int i = 0; i < userIds.size(); i++) {<NEW_LINE>connections.add(null);<NEW_LINE>}<NEW_LINE>connectionsForUsers.put(providerId, connections);<NEW_LINE>}<NEW_LINE>String providerUserId = connection.getKey().getProviderUserId();<NEW_LINE>int connectionIndex = userIds.indexOf(providerUserId);<NEW_LINE>connections.set(connectionIndex, connection);<NEW_LINE>}<NEW_LINE>return connectionsForUsers;<NEW_LINE>} | userIds = providerUsers.get(providerId); |
745,289 | final UpdateAliasResult executeUpdateAlias(UpdateAliasRequest updateAliasRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAliasRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateAliasRequest> request = null;<NEW_LINE>Response<UpdateAliasResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateAliasRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateAliasRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "GameLift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateAlias");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateAliasResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateAliasResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>} | endClientExecution(awsRequestMetrics, request, response); |
1,712,168 | private Map.Entry<String, String> resolveSimpleTimerClassMethodTags(ResourceInfo resourceInfo) {<NEW_LINE>Class<?> resourceClass = resourceInfo.getResourceClass();<NEW_LINE>String fullyQualifiedClassName = null;<NEW_LINE>String fullMethodSignature = null;<NEW_LINE>if (resourceClass != null) {<NEW_LINE>fullyQualifiedClassName = resourceClass.getName();<NEW_LINE>Method resourceMethod = resourceInfo.getResourceMethod();<NEW_LINE>Class<?>[] parameterClasses = resourceMethod.getParameterTypes();<NEW_LINE>String parameter;<NEW_LINE>fullMethodSignature = resourceMethod.getName();<NEW_LINE>for (Class<?> p : parameterClasses) {<NEW_LINE>parameter = p.getCanonicalName();<NEW_LINE>fullMethodSignature = fullMethodSignature + "_" + parameter;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (fullMethodSignature == null || fullyQualifiedClassName == null || fullMethodSignature.isEmpty() || fullyQualifiedClassName.isEmpty()) {<NEW_LINE>if (tc.isAnyTracingEnabled()) {<NEW_LINE>Tr.debug(tc, "Could not resolve the class name or method signature class:[" + fullMethodSignature + "] method:[" + fullMethodSignature + "]");<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new AbstractMap.SimpleEntry<String<MASK><NEW_LINE>} | , String>(fullyQualifiedClassName, fullMethodSignature); |
1,401,993 | private static JSFunctionData createPromiseRejectFunctionImpl(JSContext context) {<NEW_LINE>class PromiseRejectRootNode extends JavaScriptRootNode implements AsyncHandlerRootNode {<NEW_LINE><NEW_LINE>@Child<NEW_LINE>private JavaScriptNode reasonNode;<NEW_LINE><NEW_LINE>@Child<NEW_LINE>private PropertyGetNode getPromiseNode;<NEW_LINE><NEW_LINE>@Child<NEW_LINE>private PropertyGetNode getAlreadyResolvedNode = PropertyGetNode.createGetHidden(ALREADY_RESOLVED_KEY, context);<NEW_LINE><NEW_LINE>@Child<NEW_LINE>private RejectPromiseNode rejectPromiseNode;<NEW_LINE><NEW_LINE>private final ConditionProfile alreadyResolvedProfile = ConditionProfile.createBinaryProfile();<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object execute(VirtualFrame frame) {<NEW_LINE>init();<NEW_LINE>JSDynamicObject functionObject = JSFrameUtil.getFunctionObject(frame);<NEW_LINE>JSDynamicObject promise = (JSDynamicObject) getPromiseNode.getValue(functionObject);<NEW_LINE>Object reason = reasonNode.execute(frame);<NEW_LINE>AlreadyResolved alreadyResolved = (AlreadyResolved) getAlreadyResolvedNode.getValue(functionObject);<NEW_LINE>if (alreadyResolvedProfile.profile(alreadyResolved.value)) {<NEW_LINE>context.notifyPromiseRejectionTracker(<MASK><NEW_LINE>return Undefined.instance;<NEW_LINE>}<NEW_LINE>alreadyResolved.value = true;<NEW_LINE>return rejectPromiseNode.execute(promise, reason);<NEW_LINE>}<NEW_LINE><NEW_LINE>public void init() {<NEW_LINE>if (reasonNode == null || getPromiseNode == null || rejectPromiseNode == null) {<NEW_LINE>CompilerDirectives.transferToInterpreterAndInvalidate();<NEW_LINE>reasonNode = insert(AccessIndexedArgumentNode.create(0));<NEW_LINE>getPromiseNode = insert(PropertyGetNode.createGetHidden(PROMISE_KEY, context));<NEW_LINE>rejectPromiseNode = insert(RejectPromiseNode.create(context));<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public AsyncStackTraceInfo getAsyncStackTraceInfo(JSFunctionObject handlerFunction) {<NEW_LINE>assert JSFunction.isJSFunction(handlerFunction) && ((RootCallTarget) JSFunction.getFunctionData(handlerFunction).getCallTarget()).getRootNode() == this;<NEW_LINE>JSDynamicObject promise = (JSDynamicObject) JSObjectUtil.getHiddenProperty(handlerFunction, PROMISE_KEY);<NEW_LINE>return new AsyncStackTraceInfo(promise, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return JSFunctionData.createCallOnly(context, new PromiseRejectRootNode().getCallTarget(), 1, Strings.EMPTY_STRING);<NEW_LINE>} | promise, JSPromise.REJECTION_TRACKER_OPERATION_REJECT_AFTER_RESOLVED, reason); |
558,645 | static NettyServerHandler newHandler(ChannelPromise channelUnused, Http2FrameReader frameReader, Http2FrameWriter frameWriter, ServerTransportListener transportListener, List<? extends ServerStreamTracer.Factory> streamTracerFactories, TransportTracer transportTracer, int maxStreams, boolean autoFlowControl, int flowControlWindow, int maxHeaderListSize, int maxMessageSize, long keepAliveTimeInNanos, long keepAliveTimeoutInNanos, long maxConnectionIdleInNanos, long maxConnectionAgeInNanos, long maxConnectionAgeGraceInNanos, boolean permitKeepAliveWithoutCalls, long permitKeepAliveTimeInNanos, Attributes eagAttributes) {<NEW_LINE>Preconditions.checkArgument(maxStreams > 0, "maxStreams must be positive: %s", maxStreams);<NEW_LINE>Preconditions.checkArgument(flowControlWindow > 0, "flowControlWindow must be positive: %s", flowControlWindow);<NEW_LINE>Preconditions.checkArgument(maxHeaderListSize > 0, "maxHeaderListSize must be positive: %s", maxHeaderListSize);<NEW_LINE>Preconditions.checkArgument(maxMessageSize > 0, "maxMessageSize must be positive: %s", maxMessageSize);<NEW_LINE>final Http2Connection connection = new DefaultHttp2Connection(true);<NEW_LINE><MASK><NEW_LINE>// Make benchmarks fast again.<NEW_LINE>dist.allocationQuantum(16 * 1024);<NEW_LINE>DefaultHttp2RemoteFlowController controller = new DefaultHttp2RemoteFlowController(connection, dist);<NEW_LINE>connection.remote().flowController(controller);<NEW_LINE>final KeepAliveEnforcer keepAliveEnforcer = new KeepAliveEnforcer(permitKeepAliveWithoutCalls, permitKeepAliveTimeInNanos, TimeUnit.NANOSECONDS);<NEW_LINE>// Create the local flow controller configured to auto-refill the connection window.<NEW_LINE>connection.local().flowController(new DefaultHttp2LocalFlowController(connection, DEFAULT_WINDOW_UPDATE_RATIO, true));<NEW_LINE>frameWriter = new WriteMonitoringFrameWriter(frameWriter, keepAliveEnforcer);<NEW_LINE>Http2ConnectionEncoder encoder = new DefaultHttp2ConnectionEncoder(connection, frameWriter);<NEW_LINE>encoder = new Http2ControlFrameLimitEncoder(encoder, 10000);<NEW_LINE>Http2ConnectionDecoder decoder = new DefaultHttp2ConnectionDecoder(connection, encoder, frameReader);<NEW_LINE>Http2Settings settings = new Http2Settings();<NEW_LINE>settings.initialWindowSize(flowControlWindow);<NEW_LINE>settings.maxConcurrentStreams(maxStreams);<NEW_LINE>settings.maxHeaderListSize(maxHeaderListSize);<NEW_LINE>return new NettyServerHandler(channelUnused, connection, transportListener, streamTracerFactories, transportTracer, decoder, encoder, settings, maxMessageSize, keepAliveTimeInNanos, keepAliveTimeoutInNanos, maxConnectionIdleInNanos, maxConnectionAgeInNanos, maxConnectionAgeGraceInNanos, keepAliveEnforcer, autoFlowControl, eagAttributes);<NEW_LINE>} | WeightedFairQueueByteDistributor dist = new WeightedFairQueueByteDistributor(connection); |
626,401 | public Map<String, Object> fetchStructures(Map<String, String> query, Map<String, String> queryOptions, int start, int count, List<String> sort) throws PortalException, SystemException, DotDataException, DotSecurityException {<NEW_LINE>HttpServletRequest req = WebContextFactory.get().getHttpServletRequest();<NEW_LINE>User user = userWebAPI.getLoggedInUser(req);<NEW_LINE>if (count <= 0)<NEW_LINE>count = 10;<NEW_LINE>List<Structure> fullListStructures = new ArrayList<Structure>();<NEW_LINE>try {<NEW_LINE>String structureTypeStr = queryOptions.get("structureType");<NEW_LINE>Integer structureType = null;<NEW_LINE>if (UtilMethods.isSet(structureTypeStr)) {<NEW_LINE>structureType = Integer.parseInt(structureTypeStr);<NEW_LINE>}<NEW_LINE>String filter = query.get("name");<NEW_LINE>if (UtilMethods.isSet(filter)) {<NEW_LINE>filter = filter.replaceAll("\\*", "");<NEW_LINE>filter = <MASK><NEW_LINE>}<NEW_LINE>fullListStructures.addAll(StructureFactory.findStructuresUserCanUse(user, filter, structureType, start, start > 0 ? count : count + 1));<NEW_LINE>} catch (DotDataException e) {<NEW_LINE>Logger.error(this, e.getMessage(), e);<NEW_LINE>throw new DotDataException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>Map<String, Object> results = new HashMap<String, Object>();<NEW_LINE>List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();<NEW_LINE>for (Structure structure : fullListStructures) {<NEW_LINE>Map<String, Object> stMap = structure.getMap();<NEW_LINE>list.add(stMap);<NEW_LINE>}<NEW_LINE>results.put("totalResults", list.size());<NEW_LINE>results.put("list", list);<NEW_LINE>return results;<NEW_LINE>} | filter.replaceAll("\\?", ""); |
1,453,229 | public static <T> ConsulResponse<List<T>> consulResponseList(final Class<T> responseType, final HTTP.Response response) {<NEW_LINE>List<T> responseObject = null;<NEW_LINE>if (response.code() == 200) {<NEW_LINE>if (!Str.isEmpty(response.body())) {<NEW_LINE>responseObject = fromJsonArray(response.body(), responseType);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>die("Unable to read response", response.code(), response.body());<NEW_LINE>}<NEW_LINE>List<String> strings = response.headers().get("X-Consul-Index");<NEW_LINE>int index = Integer.valueOf(strings.get(0));<NEW_LINE>strings = response.<MASK><NEW_LINE>long lastContact = Long.valueOf(strings.get(0));<NEW_LINE>strings = response.headers().get("X-Consul-Knownleader");<NEW_LINE>boolean knownLeader = Boolean.valueOf(strings.get(0));<NEW_LINE>// noinspection UnnecessaryLocalVariable<NEW_LINE>@SuppressWarnings("UnnecessaryLocalVariable")<NEW_LINE>ConsulResponse<List<T>> consulResponse = new ConsulResponse<>(responseObject, lastContact, knownLeader, index);<NEW_LINE>return consulResponse;<NEW_LINE>} | headers().get("X-Consul-Lastcontact"); |
14,650 | public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> objs) {<NEW_LINE>objs = super.postProcessAllModels(objs);<NEW_LINE>Map<String, CodegenModel> <MASK><NEW_LINE>for (ModelsMap outer : objs.values()) {<NEW_LINE>for (ModelMap mo : outer.getModels()) {<NEW_LINE>CodegenModel cm = mo.getModel();<NEW_LINE>postProcessModelsEnum(outer);<NEW_LINE>cm.classVarName = camelize(cm.classVarName, true);<NEW_LINE>modelsByClassName.put(cm.classname, cm);<NEW_LINE>boolean hasFiles = cm.vars.stream().anyMatch(var -> var.isFile);<NEW_LINE>cm.vendorExtensions.put("x-has-files", hasFiles);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (CodegenModel model : modelsByClassName.values()) {<NEW_LINE>model.defaultValue = generateModelDefaultValue(model, modelsByClassName);<NEW_LINE>}<NEW_LINE>return objs;<NEW_LINE>} | modelsByClassName = new HashMap<>(); |
1,426,562 | public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) {<NEW_LINE>AutoAnalysisManager <MASK><NEW_LINE>DataTypeManagerService service = mgr.getDataTypeManagerService();<NEW_LINE>// pick the archives to apply<NEW_LINE>List<String> archiveList = DataTypeArchiveUtility.getArchiveList(program);<NEW_LINE>List<DataTypeManager> managerList = new ArrayList<>();<NEW_LINE>monitor.initialize(archiveList.size());<NEW_LINE>// apply the archive restricted to the address set<NEW_LINE>for (String archiveName : archiveList) {<NEW_LINE>if (monitor.isCancelled()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>DataTypeManager dtm = null;<NEW_LINE>try {<NEW_LINE>dtm = service.openDataTypeArchive(archiveName);<NEW_LINE>if (dtm == null) {<NEW_LINE>log.appendMsg("Apply Data Archives", "Failed to locate data type archive: " + archiveName);<NEW_LINE>} else {<NEW_LINE>managerList.add(dtm);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Throwable cause = e.getCause();<NEW_LINE>if (cause instanceof VersionException) {<NEW_LINE>log.appendMsg("Apply Data Archives", "Unable to open archive " + archiveName + ": " + cause.toString());<NEW_LINE>} else {<NEW_LINE>String msg = e.getMessage();<NEW_LINE>if (msg == null) {<NEW_LINE>msg = e.toString();<NEW_LINE>}<NEW_LINE>log.appendMsg("Apply Data Archives", "Unexpected Error opening archive " + archiveName + ": " + msg);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>monitor.setMessage("Applying Function Signatures...");<NEW_LINE>// TODO: SourceType of imported is not exactly right here.<NEW_LINE>// This isn't imported. Need to add some other sourceType, like SecondaryInfo<NEW_LINE>ApplyFunctionDataTypesCmd cmd = new ApplyFunctionDataTypesCmd(managerList, set, SourceType.IMPORTED, false, createBookmarksEnabled);<NEW_LINE>cmd.applyTo(program, monitor);<NEW_LINE>return true;<NEW_LINE>} | mgr = AutoAnalysisManager.getAnalysisManager(program); |
1,427,131 | public static GetMetaTableFullInfoResponse unmarshall(GetMetaTableFullInfoResponse getMetaTableFullInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMetaTableFullInfoResponse.setRequestId(_ctx.stringValue("GetMetaTableFullInfoResponse.RequestId"));<NEW_LINE>getMetaTableFullInfoResponse.setHttpStatusCode(_ctx.integerValue("GetMetaTableFullInfoResponse.HttpStatusCode"));<NEW_LINE>getMetaTableFullInfoResponse.setErrorMessage(_ctx.stringValue("GetMetaTableFullInfoResponse.ErrorMessage"));<NEW_LINE>getMetaTableFullInfoResponse.setSuccess(_ctx.booleanValue("GetMetaTableFullInfoResponse.Success"));<NEW_LINE>getMetaTableFullInfoResponse.setErrorCode(_ctx.stringValue("GetMetaTableFullInfoResponse.ErrorCode"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setTableName(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.TableName"));<NEW_LINE>data.setComment(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.Comment"));<NEW_LINE>data.setLifeCycle(_ctx.integerValue("GetMetaTableFullInfoResponse.Data.LifeCycle"));<NEW_LINE>data.setCreateTime(_ctx.longValue("GetMetaTableFullInfoResponse.Data.CreateTime"));<NEW_LINE>data.setProjectName(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.ProjectName"));<NEW_LINE>data.setProjectId(_ctx.longValue("GetMetaTableFullInfoResponse.Data.ProjectId"));<NEW_LINE>data.setOwnerId(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.OwnerId"));<NEW_LINE>data.setEnvType(_ctx.integerValue("GetMetaTableFullInfoResponse.Data.EnvType"));<NEW_LINE>data.setLastAccessTime(_ctx.longValue("GetMetaTableFullInfoResponse.Data.LastAccessTime"));<NEW_LINE>data.setDataSize(_ctx.longValue("GetMetaTableFullInfoResponse.Data.DataSize"));<NEW_LINE>data.setLastModifyTime(_ctx.longValue("GetMetaTableFullInfoResponse.Data.LastModifyTime"));<NEW_LINE>data.setDatabaseName(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.DatabaseName"));<NEW_LINE>data.setIsVisible(_ctx.integerValue("GetMetaTableFullInfoResponse.Data.IsVisible"));<NEW_LINE>data.setTotalColumnCount(_ctx.longValue("GetMetaTableFullInfoResponse.Data.TotalColumnCount"));<NEW_LINE>data.setTableGuid(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.TableGuid"));<NEW_LINE>data.setPartitionKeys(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.PartitionKeys"));<NEW_LINE>data.setLastDdlTime(_ctx.longValue("GetMetaTableFullInfoResponse.Data.LastDdlTime"));<NEW_LINE>data.setLocation(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.Location"));<NEW_LINE>data.setClusterId<MASK><NEW_LINE>data.setTenantId(_ctx.longValue("GetMetaTableFullInfoResponse.Data.TenantId"));<NEW_LINE>List<ColumnListItem> columnList = new ArrayList<ColumnListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMetaTableFullInfoResponse.Data.ColumnList.Length"); i++) {<NEW_LINE>ColumnListItem columnListItem = new ColumnListItem();<NEW_LINE>columnListItem.setColumnName(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].ColumnName"));<NEW_LINE>columnListItem.setColumnGuid(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].ColumnGuid"));<NEW_LINE>columnListItem.setIsPartitionColumn(_ctx.booleanValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].IsPartitionColumn"));<NEW_LINE>columnListItem.setComment(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].Comment"));<NEW_LINE>columnListItem.setColumnType(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].ColumnType"));<NEW_LINE>columnListItem.setIsPrimaryKey(_ctx.booleanValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].IsPrimaryKey"));<NEW_LINE>columnListItem.setPosition(_ctx.integerValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].Position"));<NEW_LINE>columnListItem.setCaption(_ctx.stringValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].Caption"));<NEW_LINE>columnListItem.setIsForeignKey(_ctx.booleanValue("GetMetaTableFullInfoResponse.Data.ColumnList[" + i + "].IsForeignKey"));<NEW_LINE>columnList.add(columnListItem);<NEW_LINE>}<NEW_LINE>data.setColumnList(columnList);<NEW_LINE>getMetaTableFullInfoResponse.setData(data);<NEW_LINE>return getMetaTableFullInfoResponse;<NEW_LINE>} | (_ctx.stringValue("GetMetaTableFullInfoResponse.Data.ClusterId")); |
693,074 | private void _load() {<NEW_LINE>World w;<NEW_LINE>try {<NEW_LINE>FileInputStream fis = new FileInputStream(currTest.getFilename());<NEW_LINE>w = currTest.<MASK><NEW_LINE>fis.close();<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>log.error("File not found error while loading", e);<NEW_LINE>if (errorHandler != null)<NEW_LINE>errorHandler.serializationError(e, "File not found exception while loading: " + currTest.getFilename());<NEW_LINE>return;<NEW_LINE>} catch (UnsupportedObjectException e) {<NEW_LINE>log.error("Error deserializing object", e);<NEW_LINE>if (errorHandler != null)<NEW_LINE>errorHandler.serializationError(e, "Error deserializing the object: " + e.toString());<NEW_LINE>return;<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.error("Exception while reading world", e);<NEW_LINE>if (errorHandler != null)<NEW_LINE>errorHandler.serializationError(e, "Error while reading world: " + e.toString());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.debug("Deserialized world from " + currTest.getFilename());<NEW_LINE>currTest.init(w, true);<NEW_LINE>} | getDeserializer().deserializeWorld(fis); |
1,026,938 | public void invoke(long windowHandle, double x, double y) {<NEW_LINE><MASK><NEW_LINE>deltaY = (int) y - logicalMouseY;<NEW_LINE>mouseX = logicalMouseX = (int) x;<NEW_LINE>mouseY = logicalMouseY = (int) y;<NEW_LINE>if (window.getConfig().hdpiMode == HdpiMode.Pixels) {<NEW_LINE>float xScale = window.getGraphics().getBackBufferWidth() / (float) window.getGraphics().getLogicalWidth();<NEW_LINE>float yScale = window.getGraphics().getBackBufferHeight() / (float) window.getGraphics().getLogicalHeight();<NEW_LINE>deltaX = (int) (deltaX * xScale);<NEW_LINE>deltaY = (int) (deltaY * yScale);<NEW_LINE>mouseX = (int) (mouseX * xScale);<NEW_LINE>mouseY = (int) (mouseY * yScale);<NEW_LINE>}<NEW_LINE>DefaultLwjgl3Input.this.window.getGraphics().requestRendering();<NEW_LINE>long time = System.nanoTime();<NEW_LINE>if (mousePressed > 0) {<NEW_LINE>eventQueue.touchDragged(mouseX, mouseY, 0, time);<NEW_LINE>} else {<NEW_LINE>eventQueue.mouseMoved(mouseX, mouseY, time);<NEW_LINE>}<NEW_LINE>} | deltaX = (int) x - logicalMouseX; |
1,099,650 | CohortConfig validateCohortIsSet(String serverName, OMAGServerConfig serverConfig, String cohortName, String methodName) throws OMAGInvalidParameterException {<NEW_LINE>RepositoryServicesConfig repositoryServicesConfig = serverConfig.getRepositoryServicesConfig();<NEW_LINE>if (repositoryServicesConfig != null) {<NEW_LINE>List<CohortConfig> cohortConfigs = repositoryServicesConfig.getCohortConfigList();<NEW_LINE>if (cohortConfigs != null) {<NEW_LINE>for (CohortConfig cohortConfig : cohortConfigs) {<NEW_LINE>if (cohortConfig != null) {<NEW_LINE>if (cohortName.equals(cohortConfig.getCohortName())) {<NEW_LINE>return cohortConfig;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw new OMAGInvalidParameterException(OMAGAdminErrorCode.COHORT_NOT_KNOWN.getMessageDefinition(serverName, cohortName), this.getClass(<MASK><NEW_LINE>} | ).getName(), methodName); |
1,263,636 | public Response createTokenResponse(UserModel user, UserSessionModel userSession, ClientSessionContext clientSessionCtx, String scopeParam, boolean code) {<NEW_LINE>AccessToken token = tokenManager.createClientAccessToken(session, realm, client, user, userSession, clientSessionCtx);<NEW_LINE>TokenManager.AccessTokenResponseBuilder responseBuilder = tokenManager.responseBuilder(realm, client, event, session, userSession<MASK><NEW_LINE>if (OIDCAdvancedConfigWrapper.fromClientModel(client).isUseRefreshToken()) {<NEW_LINE>responseBuilder.generateRefreshToken();<NEW_LINE>}<NEW_LINE>checkMtlsHoKToken(responseBuilder, OIDCAdvancedConfigWrapper.fromClientModel(client).isUseRefreshToken());<NEW_LINE>if (TokenUtil.isOIDCRequest(scopeParam)) {<NEW_LINE>responseBuilder.generateIDToken().generateAccessTokenHash();<NEW_LINE>}<NEW_LINE>AccessTokenResponse res = null;<NEW_LINE>if (code) {<NEW_LINE>try {<NEW_LINE>res = responseBuilder.build();<NEW_LINE>} catch (RuntimeException re) {<NEW_LINE>if ("can not get encryption KEK".equals(re.getMessage())) {<NEW_LINE>throw new CorsErrorResponseException(cors, OAuthErrorException.INVALID_REQUEST, "can not get encryption KEK", Response.Status.BAD_REQUEST);<NEW_LINE>} else {<NEW_LINE>throw re;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>res = responseBuilder.build();<NEW_LINE>}<NEW_LINE>event.success();<NEW_LINE>return cors.builder(Response.ok(res).type(MediaType.APPLICATION_JSON_TYPE)).build();<NEW_LINE>} | , clientSessionCtx).accessToken(token); |
1,315,722 | private static void testCrossPackageOverrides_gradualWithIntermediateDummyClass() {<NEW_LINE>// This is the pattern<NEW_LINE>//<NEW_LINE>// package a package b<NEW_LINE>// class P1 { m() {} }<NEW_LINE>// |<NEW_LINE>// V class P2 extends P1 { m() {} }<NEW_LINE>// class P3 extends P2 {public m() {} } |<NEW_LINE>// | V<NEW_LINE>// \---------------> ? class P4 extends P3 {}<NEW_LINE>// (does P3.m() override P2.m()?)<NEW_LINE>//<NEW_LINE>// Our interpretation of the Java spec is that P3.m does not accidentally override P2.m at P4.<NEW_LINE>// calls through m_a<NEW_LINE>assertEquals("a.P1.m", P1.<MASK><NEW_LINE>assertEquals("a.P1.m", P1.callM_a(new P2()));<NEW_LINE>assertEquals("a.P3.m", P1.callM_a(new P3()));<NEW_LINE>assertEquals("a.P3.m", P1.callM_a(new P4()));<NEW_LINE>// calls through m_b<NEW_LINE>assertEquals("b.P2.m", P2.callM_b(new P2()));<NEW_LINE>assertEquals("b.P2.m", P2.callM_b(new P3()));<NEW_LINE>assertEquals("b.P2.m", P2.callM_b(new P4()));<NEW_LINE>} | callM_a(new P1())); |
330,057 | void write(MethodWriter writer, Globals globals) {<NEW_LINE>writer.writeDebugInfo(location);<NEW_LINE>if (initialize) {<NEW_LINE>writer.push(arguments.size());<NEW_LINE>writer.newArray(MethodWriter.getType(actual.getComponentType()));<NEW_LINE>for (int index = 0; index < arguments.size(); ++index) {<NEW_LINE>AExpression <MASK><NEW_LINE>writer.dup();<NEW_LINE>writer.push(index);<NEW_LINE>argument.write(writer, globals);<NEW_LINE>writer.arrayStore(MethodWriter.getType(actual.getComponentType()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (AExpression argument : arguments) {<NEW_LINE>argument.write(writer, globals);<NEW_LINE>}<NEW_LINE>if (arguments.size() > 1) {<NEW_LINE>writer.visitMultiANewArrayInsn(MethodWriter.getType(actual).getDescriptor(), arguments.size());<NEW_LINE>} else {<NEW_LINE>writer.newArray(MethodWriter.getType(actual.getComponentType()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | argument = arguments.get(index); |
403,407 | final DeleteReplicationInstanceResult executeDeleteReplicationInstance(DeleteReplicationInstanceRequest deleteReplicationInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteReplicationInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteReplicationInstanceRequest> request = null;<NEW_LINE>Response<DeleteReplicationInstanceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteReplicationInstanceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteReplicationInstanceRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Database Migration Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteReplicationInstance");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteReplicationInstanceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteReplicationInstanceResultJsonUnmarshaller());<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.SIGNING_REGION, getSigningRegion()); |
1,197,386 | private void updateVisibleRange(BarLineChartBase chart, ReadableMap propMap) {<NEW_LINE>if (BridgeUtils.validate(propMap, ReadableType.Map, "x")) {<NEW_LINE>ReadableMap <MASK><NEW_LINE>if (BridgeUtils.validate(x, ReadableType.Number, "min")) {<NEW_LINE>chart.setVisibleXRangeMinimum((float) x.getDouble("min"));<NEW_LINE>}<NEW_LINE>if (BridgeUtils.validate(x, ReadableType.Number, "max")) {<NEW_LINE>chart.setVisibleXRangeMaximum((float) x.getDouble("max"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (BridgeUtils.validate(propMap, ReadableType.Map, "y")) {<NEW_LINE>ReadableMap y = propMap.getMap("y");<NEW_LINE>if (BridgeUtils.validate(y, ReadableType.Map, "left")) {<NEW_LINE>ReadableMap left = y.getMap("left");<NEW_LINE>if (BridgeUtils.validate(left, ReadableType.Number, "min")) {<NEW_LINE>chart.setVisibleYRangeMinimum((float) left.getDouble("min"), YAxis.AxisDependency.LEFT);<NEW_LINE>}<NEW_LINE>if (BridgeUtils.validate(left, ReadableType.Number, "max")) {<NEW_LINE>chart.setVisibleYRangeMaximum((float) left.getDouble("max"), YAxis.AxisDependency.LEFT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (BridgeUtils.validate(y, ReadableType.Map, "right")) {<NEW_LINE>ReadableMap right = y.getMap("right");<NEW_LINE>if (BridgeUtils.validate(right, ReadableType.Number, "min")) {<NEW_LINE>chart.setVisibleYRangeMinimum((float) right.getDouble("min"), YAxis.AxisDependency.RIGHT);<NEW_LINE>}<NEW_LINE>if (BridgeUtils.validate(right, ReadableType.Number, "max")) {<NEW_LINE>chart.setVisibleYRangeMaximum((float) right.getDouble("max"), YAxis.AxisDependency.RIGHT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | x = propMap.getMap("x"); |
519,057 | public void testContextInfoExactMatchOverrideDefault() throws Exception {<NEW_LINE>CommonTasks.writeLogMsg(Level.INFO, "**** >>>>> server configuration thresholds for - <global - slow : 5s , hung : 10s> <timing - Slow : 120s , hung : 120s>");<NEW_LINE>server.setServerConfigurationFile("contextInfoPattern/server_timing_1.xml");<NEW_LINE>server.waitForStringInLog("CWWKG0017I", 30000);<NEW_LINE>server.setMarkToEndOfLog();<NEW_LINE>// Should sleep and not hit hung request threshold since the context info specific settings<NEW_LINE>// are longer than the global defaults.<NEW_LINE>long startTime = System.nanoTime();<NEW_LINE>createRequests(12000, 1);<NEW_LINE>long elapsedSeconds = TimeUnit.SECONDS.convert(System.nanoTime() - startTime, TimeUnit.NANOSECONDS);<NEW_LINE>assertTrue("Test did not run long enough (elapsedSeconds)", elapsedSeconds >= 12);<NEW_LINE>// Make sure we didn't get any hung request messages<NEW_LINE>assertTrue("Test should not have found any slow request messages", fetchSlowRequestWarningsCount() == 0);<NEW_LINE>assertTrue("Test should not have found any hung request messages", fetchHungRequestWarningsCount() == 0);<NEW_LINE>// OK now test the opposite - that we do timeout because we matched the context info specific<NEW_LINE>// settings.<NEW_LINE>CommonTasks.writeLogMsg(Level.INFO, "**** >>>>> server configuration thresholds for - <global - slow : 120s , hung : 120s> <timing - Slow : 5s , hung : 10s>");<NEW_LINE>server.setServerConfigurationFile("contextInfoPattern/server_timing_2.xml");<NEW_LINE>server.waitForStringInLog("CWWKG0017I", 30000);<NEW_LINE>server.setMarkToEndOfLog();<NEW_LINE>// Should sleep and hit hung request threshold since the context info specific settings<NEW_LINE>// are shorter than the global thresholds.<NEW_LINE>startTime = System.nanoTime();<NEW_LINE>createRequests(12000, 1);<NEW_LINE>elapsedSeconds = TimeUnit.SECONDS.convert(System.nanoTime() - startTime, TimeUnit.NANOSECONDS);<NEW_LINE><MASK><NEW_LINE>// Make sure we had some hung request messages<NEW_LINE>assertTrue("Test should have found slow request messages", fetchSlowRequestWarningsCount() > 0);<NEW_LINE>assertTrue("Test should have found hung request messages", fetchHungRequestWarningsCount() > 0);<NEW_LINE>CommonTasks.writeLogMsg(Level.INFO, "***** Testcase testContextInfoExactMatchOverrideDefault pass *****");<NEW_LINE>} | assertTrue("Test did not run long enough (elapsedSeconds)", elapsedSeconds >= 12); |
652,395 | private List<NameValueCountPair> listActivityNamePair(Business business, EffectivePerson effectivePerson, Wi wi) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Task.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<String> cq = cb.createQuery(String.class);<NEW_LINE>Root<Task> root = cq.from(Task.class);<NEW_LINE>Predicate p = cb.equal(root.get(Task_.person), effectivePerson.getDistinguishedName());<NEW_LINE>if (ListTools.isNotEmpty(wi.getApplicationList())) {<NEW_LINE>p = cb.and(p, root.get(Task_.application).in(wi.getApplicationList()));<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(wi.getProcessList())) {<NEW_LINE>p = cb.and(p, root.get(Task_.process).in(wi.getProcessList()));<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(wi.getCreatorUnitList())) {<NEW_LINE>p = cb.and(p, root.get(Task_.creatorUnit).in<MASK><NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(wi.getStartTimeMonthList())) {<NEW_LINE>p = cb.and(p, root.get(Task_.startTimeMonth).in(wi.getStartTimeMonthList()));<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(wi.getActivityNameList())) {<NEW_LINE>p = cb.and(p, root.get(Task_.activityName).in(wi.getActivityNameList()));<NEW_LINE>}<NEW_LINE>cq.select(root.get(Task_.activityName)).where(p);<NEW_LINE>List<String> os = em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList());<NEW_LINE>List<NameValueCountPair> wos = new ArrayList<>();<NEW_LINE>for (String str : os) {<NEW_LINE>if (StringUtils.isNotEmpty(str)) {<NEW_LINE>NameValueCountPair o = new NameValueCountPair();<NEW_LINE>o.setValue(str);<NEW_LINE>o.setName(str);<NEW_LINE>wos.add(o);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>wos = wos.stream().sorted(Comparator.comparing(NameValueCountPair::getName, (s1, s2) -> {<NEW_LINE>return Objects.toString(s1, "").compareTo(Objects.toString(s2, ""));<NEW_LINE>})).collect(Collectors.toList());<NEW_LINE>return wos;<NEW_LINE>} | (wi.getCreatorUnitList())); |
1,097,424 | protected TcpConnectionSupport wrapConnection(TcpConnectionSupport connectionArg) {<NEW_LINE>TcpConnectionSupport connection = connectionArg;<NEW_LINE>try {<NEW_LINE>if (this.interceptorFactoryChain == null) {<NEW_LINE>return connection;<NEW_LINE>}<NEW_LINE>TcpConnectionInterceptorFactory[] interceptorFactories <MASK><NEW_LINE>if (interceptorFactories == null) {<NEW_LINE>return connection;<NEW_LINE>}<NEW_LINE>for (TcpConnectionInterceptorFactory factory : interceptorFactories) {<NEW_LINE>TcpConnectionInterceptorSupport wrapper = factory.getInterceptor();<NEW_LINE>wrapper.setTheConnection(connection);<NEW_LINE>// if no ultimate listener or sender, register each wrapper in turn<NEW_LINE>if (this.listener == null) {<NEW_LINE>connection.registerListener(wrapper);<NEW_LINE>}<NEW_LINE>if (this.senders.size() == 0) {<NEW_LINE>connection.registerSender(wrapper);<NEW_LINE>}<NEW_LINE>connection.setWrapped(true);<NEW_LINE>connection.setWrapper(wrapper);<NEW_LINE>connection = wrapper;<NEW_LINE>}<NEW_LINE>return connection;<NEW_LINE>} finally {<NEW_LINE>addConnection(connection);<NEW_LINE>}<NEW_LINE>} | = this.interceptorFactoryChain.getInterceptorFactories(); |
701,530 | public com.amazonaws.services.ecr.model.LayerPartTooSmallException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.ecr.model.LayerPartTooSmallException layerPartTooSmallException = new com.amazonaws.services.ecr.model.LayerPartTooSmallException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 layerPartTooSmallException;<NEW_LINE>} | String currentParentElement = context.getCurrentParentElement(); |
1,277,589 | public static void main(String[] args) throws IOException {<NEW_LINE>String version = args[2];<NEW_LINE>Path repository = new File(args[0]).toPath().resolve("org").resolve("keycloak");<NEW_LINE>Path targetRoot = new File(args[1]).toPath().resolve(version);<NEW_LINE>BufferedReader br = new BufferedReader(new InputStreamReader(CopyDependencies.class.getResourceAsStream("files")));<NEW_LINE>Path target = targetRoot;<NEW_LINE>for (String l = br.readLine(); l != null; l = br.readLine()) {<NEW_LINE>if (l.startsWith("./")) {<NEW_LINE>target = targetRoot.resolve(l.replace("./", "").replace('/', File.separatorChar));<NEW_LINE>if (!target.toFile().isDirectory()) {<NEW_LINE>target.toFile().mkdirs();<NEW_LINE>}<NEW_LINE>} else if (l.trim().length() > 0) {<NEW_LINE>String[] t = l.trim().split(":");<NEW_LINE>String artifactName = t[0];<NEW_LINE>String destName = t.length == <MASK><NEW_LINE>File artifactDir = repository.resolve(artifactName).resolve(version).toFile();<NEW_LINE>for (File f : artifactDir.listFiles((file, name) -> name.contains(".tar.gz") || name.contains(".zip"))) {<NEW_LINE>Files.copy(f.toPath(), target.resolve(f.getName().replace(artifactName, destName)), StandardCopyOption.REPLACE_EXISTING);<NEW_LINE>}<NEW_LINE>System.out.println(artifactName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>br.close();<NEW_LINE>} | 1 ? artifactName : t[1]; |
1,040,122 | public AssociateAttributeGroupResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AssociateAttributeGroupResult associateAttributeGroupResult = new AssociateAttributeGroupResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return associateAttributeGroupResult;<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("applicationArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>associateAttributeGroupResult.setApplicationArn(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("attributeGroupArn", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>associateAttributeGroupResult.setAttributeGroupArn(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 associateAttributeGroupResult;<NEW_LINE>} | class).unmarshall(context)); |
299,291 | static IntervalsSource analyzeText(CachingTokenFilter stream, int maxGaps, boolean ordered) throws IOException {<NEW_LINE>assert stream != null;<NEW_LINE>TermToBytesRefAttribute termAtt = stream.getAttribute(TermToBytesRefAttribute.class);<NEW_LINE>PositionIncrementAttribute posIncAtt = stream.addAttribute(PositionIncrementAttribute.class);<NEW_LINE>PositionLengthAttribute posLenAtt = stream.addAttribute(PositionLengthAttribute.class);<NEW_LINE>if (termAtt == null) {<NEW_LINE>return NO_INTERVALS;<NEW_LINE>}<NEW_LINE>// phase 1: read through the stream and assess the situation:<NEW_LINE>// counting the number of tokens/positions and marking if we have any synonyms.<NEW_LINE>int numTokens = 0;<NEW_LINE>boolean hasSynonyms = false;<NEW_LINE>boolean isGraph = false;<NEW_LINE>stream.reset();<NEW_LINE>while (stream.incrementToken()) {<NEW_LINE>numTokens++;<NEW_LINE>int positionIncrement = posIncAtt.getPositionIncrement();<NEW_LINE>if (positionIncrement == 0) {<NEW_LINE>hasSynonyms = true;<NEW_LINE>}<NEW_LINE>int positionLength = posLenAtt.getPositionLength();<NEW_LINE>if (positionLength > 1) {<NEW_LINE>isGraph = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// phase 2: based on token count, presence of synonyms, and options<NEW_LINE>// formulate a single term, boolean, or phrase.<NEW_LINE>if (numTokens == 0) {<NEW_LINE>return NO_INTERVALS;<NEW_LINE>} else if (numTokens == 1) {<NEW_LINE>// single term<NEW_LINE>return analyzeTerm(stream);<NEW_LINE>} else if (isGraph) {<NEW_LINE>// graph<NEW_LINE>return combineSources(analyzeGraph(stream), maxGaps, ordered);<NEW_LINE>} else {<NEW_LINE>// phrase<NEW_LINE>if (hasSynonyms) {<NEW_LINE>// phrase with single-term synonyms<NEW_LINE>return analyzeSynonyms(stream, maxGaps, ordered);<NEW_LINE>} else {<NEW_LINE>// simple phrase<NEW_LINE>return combineSources(analyzeTerms<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | (stream), maxGaps, ordered); |
453,938 | public ListSentimentDetectionJobsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListSentimentDetectionJobsResult listSentimentDetectionJobsResult = new ListSentimentDetectionJobsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listSentimentDetectionJobsResult;<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("SentimentDetectionJobPropertiesList", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listSentimentDetectionJobsResult.setSentimentDetectionJobPropertiesList(new ListUnmarshaller<SentimentDetectionJobProperties>(SentimentDetectionJobPropertiesJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listSentimentDetectionJobsResult.setNextToken(context.getUnmarshaller(String.<MASK><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 listSentimentDetectionJobsResult;<NEW_LINE>} | class).unmarshall(context)); |
1,324,469 | private static Evaluatee createEvalCtx(@NonNull final ReportContext reportContext) {<NEW_LINE>final ArrayList<Evaluatee> contexts = new ArrayList<>();<NEW_LINE>//<NEW_LINE>// 1: Add process parameters<NEW_LINE>contexts.add(Evaluatees.ofRangeAwareParams(new ProcessParams(reportContext.getProcessInfoParameters())));<NEW_LINE>//<NEW_LINE>// 2: underlying record<NEW_LINE>final String recordTableName = reportContext.getTableNameOrNull();<NEW_LINE>final int recordId = reportContext.getRecord_ID();<NEW_LINE>if (recordTableName != null && recordId > 0) {<NEW_LINE>final TableRecordReference recordRef = TableRecordReference.of(recordTableName, recordId);<NEW_LINE>final Evaluatee evalCtx = Evaluatees.ofTableRecordReference(recordRef);<NEW_LINE>if (evalCtx != null) {<NEW_LINE>contexts.add(evalCtx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// 3: global context<NEW_LINE>contexts.add(Evaluatees.ofCtx<MASK><NEW_LINE>return Evaluatees.compose(contexts);<NEW_LINE>} | (Env.getCtx())); |
285,183 | void runBeforeAsyncJsonPostExts(Map<String, String> header) {<NEW_LINE>if (commandStr == null) {<NEW_LINE>commandStr = JSONObjectUtil.toJsonString(cmd);<NEW_LINE>}<NEW_LINE>if (commandStr == null || commandStr.isEmpty()) {<NEW_LINE>logger.warn(String.format<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LinkedHashMap commandMap = JSONObjectUtil.toObject(commandStr, LinkedHashMap.class);<NEW_LINE>LinkedHashMap kvmHostAddon = new LinkedHashMap();<NEW_LINE>for (KVMBeforeAsyncJsonPostExtensionPoint extp : pluginRegistry.getExtensionList(KVMBeforeAsyncJsonPostExtensionPoint.class)) {<NEW_LINE>LinkedHashMap tmpHashMap = extp.kvmBeforeAsyncJsonPostExtensionPoint(path, commandMap, header);<NEW_LINE>if (tmpHashMap != null && !tmpHashMap.isEmpty()) {<NEW_LINE>tmpHashMap.keySet().stream().forEachOrdered((key -> {<NEW_LINE>kvmHostAddon.put(key, tmpHashMap.get(key));<NEW_LINE>}));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (commandStr.equals("{}")) {<NEW_LINE>commandStr = commandStr.replaceAll("\\}$", String.format("\"%s\":%s}", KVMConstant.KVM_HOST_ADDONS, JSONObjectUtil.toJsonString(kvmHostAddon)));<NEW_LINE>} else {<NEW_LINE>commandStr = commandStr.replaceAll("\\}$", String.format(",\"%s\":%s}", KVMConstant.KVM_HOST_ADDONS, JSONObjectUtil.toJsonString(kvmHostAddon)));<NEW_LINE>}<NEW_LINE>} | ("commandStr is empty, path: %s, header: %s", path, header)); |
1,390,276 | protected void init() {<NEW_LINE>super.init();<NEW_LINE>int bottomCenter = this.width / 2 - 50;<NEW_LINE>int topCenter = this.width / 2 - 76;<NEW_LINE>boolean inWorld = this.minecraft.level != null;<NEW_LINE>this.children.remove(this.shaderPackList);<NEW_LINE>this.children.remove(this.shaderOptionList);<NEW_LINE>this.shaderPackList = new ShaderPackSelectionList(this.minecraft, this.width, this.height, 32, this.height - 58, 0, this.width);<NEW_LINE>if (Iris.getCurrentPack().isPresent() && this.navigation != null) {<NEW_LINE>ShaderPack currentPack = Iris.getCurrentPack().get();<NEW_LINE>this.shaderOptionList = new ShaderPackOptionList(this, this.navigation, currentPack, this.minecraft, this.width, this.height, 32, this.height - 58, 0, this.width);<NEW_LINE>this.navigation.setActiveOptionList(this.shaderOptionList);<NEW_LINE>this.shaderOptionList.rebuild();<NEW_LINE>} else {<NEW_LINE>optionMenuOpen = false;<NEW_LINE>this.shaderOptionList = null;<NEW_LINE>}<NEW_LINE>if (inWorld) {<NEW_LINE>this.shaderPackList.setRenderBackground(false);<NEW_LINE>if (shaderOptionList != null) {<NEW_LINE>this.shaderOptionList.setRenderBackground(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (optionMenuOpen && shaderOptionList != null) {<NEW_LINE>this.children.add(shaderOptionList);<NEW_LINE>} else {<NEW_LINE>this.children.add(shaderPackList);<NEW_LINE>}<NEW_LINE>this.buttons.clear();<NEW_LINE>this.addButton(new Button(bottomCenter + 104, this.height - 27, 100, 20, CommonComponents.GUI_DONE, button -> onClose()));<NEW_LINE>this.addButton(new Button(bottomCenter, this.height - 27, 100, 20, new TranslatableComponent("options.iris.apply"), button -> this.applyChanges()));<NEW_LINE>this.addButton(new Button(bottomCenter - 104, this.height - 27, 100, 20, CommonComponents.GUI_CANCEL, button <MASK><NEW_LINE>this.addButton(new Button(topCenter - 78, this.height - 51, 152, 20, new TranslatableComponent("options.iris.openShaderPackFolder"), button -> openShaderPackFolder()));<NEW_LINE>this.screenSwitchButton = this.addButton(new Button(topCenter + 78, this.height - 51, 152, 20, new TranslatableComponent("options.iris.shaderPackList"), button -> {<NEW_LINE>this.optionMenuOpen = !this.optionMenuOpen;<NEW_LINE>this.init();<NEW_LINE>}));<NEW_LINE>refreshScreenSwitchButton();<NEW_LINE>} | -> this.dropChangesAndClose())); |
1,628,953 | public void validateIDTokenPayload(JSONObject tokenInfo, TestSettings settings, String testSigAlg) throws Exception {<NEW_LINE>String thisMethod = "validateIDTokenPayload";<NEW_LINE><MASK><NEW_LINE>ArrayList<String> shouldntExistKeys = new ArrayList<String>();<NEW_LINE>// make sure we have all required keys<NEW_LINE>ArrayList<String> requiredKeys = new ArrayList<String>();<NEW_LINE>requiredKeys.add(Constants.IDTOK_SUBJECT_KEY);<NEW_LINE>requiredKeys.add(Constants.IDTOK_ISSUER_KEY);<NEW_LINE>requiredKeys.add(Constants.IDTOK_AUDIENCE_KEY);<NEW_LINE>requiredKeys.add(Constants.IDTOK_EXPIRE_KEY);<NEW_LINE>requiredKeys.add(Constants.IDTOK_ISSUETIME_KEY);<NEW_LINE>if (!testSigAlg.equals(Constants.SIGALG_NONE)) {<NEW_LINE>requiredKeys.add(Constants.IDTOK_AT_HASH_KEY);<NEW_LINE>} else {<NEW_LINE>// make sure at_hash does NOT exist if the response is not signed<NEW_LINE>shouldntExistKeys.add(Constants.IDTOK_AT_HASH_KEY);<NEW_LINE>// msgUtils.assertTrueAndLog(thisMethod, "Key: " + Constants.IDTOK_AT_HASH_KEY + " should NOT exist", Boolean.valueOf(tokenInfo.get(Constants.IDTOK_AT_HASH_KEY) == null));<NEW_LINE>}<NEW_LINE>if (settings.getNonce() != null) {<NEW_LINE>requiredKeys.add(Constants.IDTOK_NONCE_KEY);<NEW_LINE>} else {<NEW_LINE>shouldntExistKeys.add(Constants.IDTOK_NONCE_KEY);<NEW_LINE>}<NEW_LINE>for (String key : requiredKeys) {<NEW_LINE>msgUtils.assertTrueAndLog(thisMethod, "Expected key: " + key + " does not exist", (tokenInfo.get(key) != null));<NEW_LINE>String tokenValue = tokenInfo.get(key).toString();<NEW_LINE>Log.info(thisClass, thisMethod, "Making sure required key: " + key + " exists");<NEW_LINE>// a null value implies the key wasn't there<NEW_LINE>msgUtils.assertTrueAndLog(thisMethod, "Expected key: " + key + " does not exist", Boolean.valueOf(tokenValue != null));<NEW_LINE>}<NEW_LINE>if (shouldntExistKeys != null) {<NEW_LINE>for (String key : shouldntExistKeys) {<NEW_LINE>Object tokenValue = tokenInfo.get(key);<NEW_LINE>Log.info(thisClass, thisMethod, "Making sure key: " + key + " does NOT exist");<NEW_LINE>// a null value implies the key wasn't there<NEW_LINE>msgUtils.assertTrueAndLog(thisMethod, "Key: " + key + " does exist and should NOT - it has a value of: " + tokenValue, Boolean.valueOf(tokenValue == null));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// now, let's validate the time (exp and ait have just been validated as not null,<NEW_LINE>// so, we should have a value now.<NEW_LINE>validateTokenTimeStamps(settings, tokenInfo);<NEW_LINE>} | msgUtils.printMethodName(thisMethod, "Start of"); |
766,951 | private static NodeInterfacePairsByVlanRange computeNodeInterfacePairsByVlan(@Nonnull Map<String, Configuration> configs, Set<String> hostnames) {<NEW_LINE>NodeInterfacePairsByVlanRange nisByVlan = NodeInterfacePairsByVlanRange.create();<NEW_LINE>for (String hostname : hostnames) {<NEW_LINE>for (Interface i : configs.get(hostname).getActiveInterfaces().values()) {<NEW_LINE>NodeInterfacePair ni = NodeInterfacePair.of(i);<NEW_LINE>if (i.getSwitchportMode() == SwitchportMode.TRUNK) {<NEW_LINE>IntegerSpace allowedVlansNoNative = i.getAllowedVlans().difference(i.getNativeVlan() != null ? IntegerSpace.of(i.getNativeVlan()) : IntegerSpace.EMPTY);<NEW_LINE>allowedVlansNoNative.getRanges().forEach(vlanRange -> nisByVlan.add(vlanRange, ni));<NEW_LINE>// special handling for native VLAN to avoid conflating edges for tagged and non-tagged<NEW_LINE>// packets<NEW_LINE>if (i.getNativeVlan() != null) {<NEW_LINE>nisByVlan.add(i.getNativeVlan(), ni);<NEW_LINE>}<NEW_LINE>} else if (i.getSwitchportMode() == SwitchportMode.ACCESS && i.getAccessVlan() != null) {<NEW_LINE>nisByVlan.add(<MASK><NEW_LINE>} else if (i.getSwitchportMode() == SwitchportMode.NONE && i.getVlan() != null) {<NEW_LINE>nisByVlan.add(i.getVlan(), ni);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return nisByVlan;<NEW_LINE>} | i.getAccessVlan(), ni); |
1,785,625 | private static String findScript(Driver driver, String locator, ElementFinder.Type type, String findTag) {<NEW_LINE>Map<String, Object> pos = driver.position(locator, true);<NEW_LINE>Number xNum = (<MASK><NEW_LINE>Number yNum = (Number) pos.get("y");<NEW_LINE>Number width = (Number) pos.get("width");<NEW_LINE>Number height = (Number) pos.get("height");<NEW_LINE>// get center point<NEW_LINE>int x = xNum.intValue() + width.intValue() / 2;<NEW_LINE>int y = yNum.intValue() + height.intValue() / 2;<NEW_LINE>// o: origin, a: angle, s: step<NEW_LINE>String fun = // + " console.log(o.x +':' + o.y + ' ' + x + ':' + y + ' ' + e.tagName + ':' + e.textContent);"<NEW_LINE>"var gen = " + DriverOptions.KARATE_REF_GENERATOR + ";" + " var o = { x: " + x + ", y: " + y + "}; var s = 10; var x = 0; var y = 0;" + " for (var i = 0; i < 200; i++) {" + forLoopChunk(type) + " var e = document.elementFromPoint(o.x + x, o.y + y);" + " if (e && " + exitCondition(findTag) + ") return gen(e); " + " } return null";<NEW_LINE>return DriverOptions.wrapInFunctionInvoke(fun);<NEW_LINE>} | Number) pos.get("x"); |
31,260 | public void iterate(final Processor<FilePath> iterator) {<NEW_LINE>if (myProject.isDisposed())<NEW_LINE>return;<NEW_LINE>for (VirtualFile root : myAffectedContentRoots) {<NEW_LINE>Set<FilePath> dirsByRoot = myDirtyDirectoriesRecursively.get(root);<NEW_LINE>if (dirsByRoot != null) {<NEW_LINE>for (FilePath dir : dirsByRoot) {<NEW_LINE>final VirtualFile vFile = dir.getVirtualFile();<NEW_LINE>if (vFile != null && vFile.isValid()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (VirtualFile root : myAffectedContentRoots) {<NEW_LINE>final Set<FilePath> files = myDirtyFiles.get(root);<NEW_LINE>if (files != null) {<NEW_LINE>for (FilePath file : files) {<NEW_LINE>iterator.process(file);<NEW_LINE>final VirtualFile vFile = file.getVirtualFile();<NEW_LINE>if (vFile != null && vFile.isValid() && vFile.isDirectory()) {<NEW_LINE>for (VirtualFile child : vFile.getChildren()) {<NEW_LINE>iterator.process(VcsUtil.getFilePath(child));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | myVcsManager.iterateVcsRoot(vFile, iterator); |
1,725,361 | private Person updatePerson(Business business, PullResult result, Person person, User user) throws Exception {<NEW_LINE><MASK><NEW_LINE>emc.beginTransaction(Person.class);<NEW_LINE>person.setWeLinkHash(DigestUtils.sha256Hex(XGsonBuilder.toJson(user)));<NEW_LINE>String employee = user.getCorpUserId();<NEW_LINE>if (StringUtils.isNotEmpty(employee)) {<NEW_LINE>if (business.person().employeeExists(employee, person.getUnique())) {<NEW_LINE>employee = "";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>person.setEmployee(employee);<NEW_LINE>person.setName(user.getUserNameCn());<NEW_LINE>person.setMobile(user.getMobileNumber());<NEW_LINE>person.setMail(user.getUserEmail());<NEW_LINE>person.setOfficePhone(user.getLandlineNumber());<NEW_LINE>emc.check(person, CheckPersistType.all);<NEW_LINE>emc.commit();<NEW_LINE>result.getUpdatePersonList().add(person.getDistinguishedName());<NEW_LINE>return person;<NEW_LINE>} | EntityManagerContainer emc = business.entityManagerContainer(); |
396,914 | private void incCounterForStatusCode(int statusCode, Map<String, String> commonTags, Map<String, String> tags) {<NEW_LINE>MetricName metricName = new MetricName("request").tagged(commonTags).tagged(tags);<NEW_LINE>registry.getOrAdd(metricName, MetricRegistry.MetricBuilder.COUNTERS).inc();<NEW_LINE>if (statusCode >= 200 && statusCode < 400) {<NEW_LINE>metricName = new MetricName("success").tagged(commonTags).tagged(tags);<NEW_LINE>registry.getOrAdd(metricName, MetricRegistry.MetricBuilder.COUNTERS).inc();<NEW_LINE>} else if (statusCode == 401 || statusCode == 403) {<NEW_LINE>metricName = new MetricName("auth_error").tagged(commonTags).tagged(tags);<NEW_LINE>registry.getOrAdd(metricName, MetricRegistry.MetricBuilder.COUNTERS).inc();<NEW_LINE>} else if (statusCode >= 400 && statusCode < 500) {<NEW_LINE>metricName = new MetricName("request_error").tagged(commonTags).tagged(tags);<NEW_LINE>registry.getOrAdd(metricName, MetricRegistry.MetricBuilder.COUNTERS).inc();<NEW_LINE>} else if (statusCode >= 500) {<NEW_LINE>metricName = new MetricName("server_error").tagged(commonTags).tagged(tags);<NEW_LINE>registry.getOrAdd(metricName, MetricRegistry.<MASK><NEW_LINE>}<NEW_LINE>} | MetricBuilder.COUNTERS).inc(); |
525,778 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>MageObject sourceObject = game.<MASK><NEW_LINE>if (sourceObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Choice typeChoice = new ChoiceCreatureType(sourceObject);<NEW_LINE>if (!controller.choose(outcome, typeChoice, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>game.informPlayers(sourceObject.getLogName() + " chosen type: " + typeChoice.getChoice());<NEW_LINE>FilterCard filterSubtype = new FilterCard();<NEW_LINE>filterSubtype.add(SubType.byDescription(typeChoice.getChoice()).getPredicate());<NEW_LINE>// Reveal the top card of your library.<NEW_LINE>if (controller.getLibrary().hasCards()) {<NEW_LINE>Card card = controller.getLibrary().getFromTop(game);<NEW_LINE>Cards cards = new CardsImpl(card);<NEW_LINE>controller.revealCards(sourceObject.getIdName(), cards, game);<NEW_LINE>if (card != null) {<NEW_LINE>// If that card is a creature card of the chosen type, put it into your hand.<NEW_LINE>if (filterSubtype.match(card, game)) {<NEW_LINE>controller.moveCards(card, Zone.HAND, source, game);<NEW_LINE>// Otherwise, put it into your graveyard.<NEW_LINE>} else {<NEW_LINE>controller.moveCards(card, Zone.GRAVEYARD, source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} | getObject(source.getSourceId()); |
694,035 | final PurchaseOfferingResult executePurchaseOffering(PurchaseOfferingRequest purchaseOfferingRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(purchaseOfferingRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<PurchaseOfferingRequest> request = null;<NEW_LINE>Response<PurchaseOfferingResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new PurchaseOfferingRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(purchaseOfferingRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Device Farm");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<PurchaseOfferingResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new PurchaseOfferingResultJsonUnmarshaller());<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.OPERATION_NAME, "PurchaseOffering"); |
1,593,132 | final CreateVariableResult executeCreateVariable(CreateVariableRequest createVariableRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createVariableRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<CreateVariableRequest> request = null;<NEW_LINE>Response<CreateVariableResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateVariableRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createVariableRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "FraudDetector");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateVariable");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateVariableResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateVariableResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>} | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
818,482 | public static CreateKeywordResponse unmarshall(CreateKeywordResponse createKeywordResponse, UnmarshallerContext _ctx) {<NEW_LINE>createKeywordResponse.setRequestId(_ctx.stringValue("CreateKeywordResponse.RequestId"));<NEW_LINE>createKeywordResponse.setSuccessCount<MASK><NEW_LINE>List<String> invalidKeywordList = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("CreateKeywordResponse.InvalidKeywordList.Length"); i++) {<NEW_LINE>invalidKeywordList.add(_ctx.stringValue("CreateKeywordResponse.InvalidKeywordList[" + i + "]"));<NEW_LINE>}<NEW_LINE>createKeywordResponse.setInvalidKeywordList(invalidKeywordList);<NEW_LINE>List<ValidKeyword> validKeywordList = new ArrayList<ValidKeyword>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("CreateKeywordResponse.validKeywordList.Length"); i++) {<NEW_LINE>ValidKeyword validKeyword = new ValidKeyword();<NEW_LINE>validKeyword.setId(_ctx.integerValue("CreateKeywordResponse.validKeywordList[" + i + "].id"));<NEW_LINE>validKeyword.setKeyword(_ctx.stringValue("CreateKeywordResponse.validKeywordList[" + i + "].keyword"));<NEW_LINE>validKeywordList.add(validKeyword);<NEW_LINE>}<NEW_LINE>createKeywordResponse.setValidKeywordList(validKeywordList);<NEW_LINE>return createKeywordResponse;<NEW_LINE>} | (_ctx.integerValue("CreateKeywordResponse.SuccessCount")); |
311,745 | public // @RequestParam(value = "name", required = false) String name,<NEW_LINE>List<Service> // @RequestParam(value = "name", required = false) String name,<NEW_LINE>searchServices(// @RequestParam(value = "labels", required = false) Map<String, String> labels<NEW_LINE>@RequestParam Map<String, String> queryMap) {<NEW_LINE>// Parse params from queryMap.<NEW_LINE>String name = null;<NEW_LINE>Map<String, String> labels = new HashMap<>();<NEW_LINE>for (String paramKey : queryMap.keySet()) {<NEW_LINE>if ("name".equals(paramKey)) {<NEW_LINE>name = queryMap.get("name");<NEW_LINE>}<NEW_LINE>if (paramKey.startsWith("labels.")) {<NEW_LINE>labels.put(paramKey.substring(paramKey.indexOf('.') + 1)<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (labels == null || labels.isEmpty()) {<NEW_LINE>log.debug("Searching services corresponding to name {}", name);<NEW_LINE>return serviceRepository.findByNameLike(name);<NEW_LINE>}<NEW_LINE>if (name == null || name.trim().length() == 0) {<NEW_LINE>log.debug("Searching services corresponding to labels {}", labels);<NEW_LINE>return serviceRepository.findByLabels(labels);<NEW_LINE>}<NEW_LINE>log.debug("Searching services corresponding to name {} and labels {}", name, labels);<NEW_LINE>return serviceRepository.findByLabelsAndNameLike(labels, name);<NEW_LINE>} | , queryMap.get(paramKey)); |
481,482 | public void emit(PTXCompilationResultBuilder crb, PTXAssembler asm, Variable dest) {<NEW_LINE>PTXKind destElementKind = ((PTXKind) dest.getPlatformKind()).getElementKind();<NEW_LINE>PTXVectorSplit vectorSplitData = new PTXVectorSplit(dest);<NEW_LINE>for (int i = 0; i < vectorSplitData.vectorNames.length; i++) {<NEW_LINE>Value[] intermValues = new Value[vectorSplitData.newKind.getVectorLength()];<NEW_LINE>if (vectorSplitData.newKind.getVectorLength() >= 0) {<NEW_LINE>System.arraycopy(values, i * vectorSplitData.newKind.getVectorLength(), intermValues, 0, vectorSplitData.newKind.getVectorLength());<NEW_LINE>}<NEW_LINE>PTXKind valueKind = (PTXKind) values[i * vectorSplitData.newKind.<MASK><NEW_LINE>asm.emitSymbol(TAB);<NEW_LINE>if (shouldEmitMove(destElementKind, valueKind)) {<NEW_LINE>asm.emit(MOVE + "." + destElementKind.toString());<NEW_LINE>} else {<NEW_LINE>asm.emit(CONVERT + ".");<NEW_LINE>if ((destElementKind.isFloating() || valueKind.isFloating()) && getFPURoundingMode(destElementKind, valueKind) != null) {<NEW_LINE>asm.emit(getFPURoundingMode(destElementKind, valueKind));<NEW_LINE>asm.emitSymbol(DOT);<NEW_LINE>}<NEW_LINE>asm.emit(destElementKind.toString());<NEW_LINE>asm.emitSymbol(DOT);<NEW_LINE>asm.emit(valueKind.toString());<NEW_LINE>}<NEW_LINE>asm.emitSymbol(TAB);<NEW_LINE>asm.emitSymbol(vectorSplitData.vectorNames[i]);<NEW_LINE>asm.emitSymbol(COMMA);<NEW_LINE>asm.emitSymbol(SPACE);<NEW_LINE>asm.emitValuesOrOp(crb, intermValues, dest);<NEW_LINE>if (i < vectorSplitData.vectorNames.length - 1) {<NEW_LINE>asm.delimiter();<NEW_LINE>asm.eol();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | getVectorLength()].getPlatformKind(); |
312,446 | public final PartitionDefinitionsContext partitionDefinitions() throws RecognitionException {<NEW_LINE>PartitionDefinitionsContext _localctx = new PartitionDefinitionsContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 96, RULE_partitionDefinitions);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(1758);<NEW_LINE>match(PARTITION);<NEW_LINE>setState(1759);<NEW_LINE>match(BY);<NEW_LINE>setState(1760);<NEW_LINE>partitionFunctionDefinition();<NEW_LINE>setState(1763);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == PARTITIONS) {<NEW_LINE>{<NEW_LINE>setState(1761);<NEW_LINE>match(PARTITIONS);<NEW_LINE>setState(1762);<NEW_LINE>((PartitionDefinitionsContext) _localctx).count = decimalLiteral();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(1772);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == SUBPARTITION) {<NEW_LINE>{<NEW_LINE>setState(1765);<NEW_LINE>match(SUBPARTITION);<NEW_LINE>setState(1766);<NEW_LINE>match(BY);<NEW_LINE>setState(1767);<NEW_LINE>subpartitionFunctionDefinition();<NEW_LINE>setState(1770);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == SUBPARTITIONS) {<NEW_LINE>{<NEW_LINE>setState(1768);<NEW_LINE>match(SUBPARTITIONS);<NEW_LINE>setState(1769);<NEW_LINE>((PartitionDefinitionsContext) <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(1785);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(getInterpreter().adaptivePredict(_input, 202, _ctx)) {<NEW_LINE>case 1:<NEW_LINE>{<NEW_LINE>setState(1774);<NEW_LINE>match(LR_BRACKET);<NEW_LINE>setState(1775);<NEW_LINE>partitionDefinition();<NEW_LINE>setState(1780);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while (_la == COMMA) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(1776);<NEW_LINE>match(COMMA);<NEW_LINE>setState(1777);<NEW_LINE>partitionDefinition();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(1782);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>setState(1783);<NEW_LINE>match(RR_BRACKET);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>} | _localctx).subCount = decimalLiteral(); |
617,689 | /* only called in getDatabase synchronize block */<NEW_LINE>private SQLiteDatabase openOrCreateDatabase() {<NEW_LINE>if (mIsInitializing) {<NEW_LINE>throw new IllegalStateException("getDatabase called recursively");<NEW_LINE>}<NEW_LINE>if (SQLiteLintUtil.isNullOrNil(sOwnDbDirectory)) {<NEW_LINE>throw new IllegalStateException("OwnDbDirectory not init");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>mIsInitializing = true;<NEW_LINE>String databasePath = String.format("%s/%s", sOwnDbDirectory, DATABASE_NAME);<NEW_LINE>SLog.i(TAG, "openOrCreateDatabase path=%s", databasePath);<NEW_LINE>SQLiteLintUtil.mkdirs(databasePath);<NEW_LINE>SQLiteDatabase db = SQLiteDatabase.openDatabase(databasePath, null, SQLiteDatabase.CREATE_IF_NECESSARY, null);<NEW_LINE>final <MASK><NEW_LINE>if (version != NEW_VERSION) {<NEW_LINE>db.beginTransaction();<NEW_LINE>try {<NEW_LINE>if (version == 0) {<NEW_LINE>onCreate(db);<NEW_LINE>} else {<NEW_LINE>if (version != NEW_VERSION) {<NEW_LINE>onUpgrade(db, version);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>db.setVersion(NEW_VERSION);<NEW_LINE>db.setTransactionSuccessful();<NEW_LINE>} finally {<NEW_LINE>db.endTransaction();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return db;<NEW_LINE>} finally {<NEW_LINE>mIsInitializing = false;<NEW_LINE>}<NEW_LINE>} | int version = db.getVersion(); |
175,319 | private void shiftUpReplicaVersions() {<NEW_LINE>int partitionId = getPartitionId();<NEW_LINE>int currentReplicaIndex = migrationInfo.getDestinationCurrentReplicaIndex();<NEW_LINE>int lostReplicaIndex = currentReplicaIndex - 1;<NEW_LINE>try {<NEW_LINE>InternalPartitionServiceImpl partitionService = getService();<NEW_LINE><MASK><NEW_LINE>for (ServiceNamespace namespace : partitionReplicaVersionManager.getNamespaces(partitionId)) {<NEW_LINE>// returns the internal array itself, not the copy<NEW_LINE>long[] versions = partitionReplicaVersionManager.getPartitionReplicaVersions(partitionId, namespace);<NEW_LINE>if (currentReplicaIndex > 1) {<NEW_LINE>long[] versionsCopy = Arrays.copyOf(versions, versions.length);<NEW_LINE>long version = versions[lostReplicaIndex];<NEW_LINE>Arrays.fill(versions, 0, lostReplicaIndex, version);<NEW_LINE>if (logger.isFinestEnabled()) {<NEW_LINE>logger.finest("Partition replica is lost! partitionId=" + partitionId + " namespace: " + namespace + " lost replicaIndex=" + lostReplicaIndex + " replica versions before shift up=" + Arrays.toString(versionsCopy) + " replica versions after shift up=" + Arrays.toString(versions));<NEW_LINE>}<NEW_LINE>} else if (logger.isFinestEnabled()) {<NEW_LINE>logger.finest("PROMOTE partitionId=" + getPartitionId() + " namespace: " + namespace + " from currentReplicaIndex=" + currentReplicaIndex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>PartitionEventManager partitionEventManager = partitionService.getPartitionEventManager();<NEW_LINE>partitionEventManager.sendPartitionLostEvent(partitionId, lostReplicaIndex);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>logger.warning("Promotion failed. partitionId=" + partitionId + " replicaIndex=" + currentReplicaIndex, e);<NEW_LINE>}<NEW_LINE>} | PartitionReplicaVersionManager partitionReplicaVersionManager = partitionService.getPartitionReplicaVersionManager(); |
1,549,681 | protected void doParse(XMLStreamReader reader, XmlContext xmlContext) throws XMLStreamException {<NEW_LINE>NodeHandler nodeHandler = this.topLevelNodeHandler;<NEW_LINE>Deque<NodeHandler> nodeHandlerStack = new ArrayDeque<>();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>int event = reader.next();<NEW_LINE>switch(event) {<NEW_LINE>case XMLStreamConstants.START_DOCUMENT:<NEW_LINE>break;<NEW_LINE>case XMLStreamConstants.START_ELEMENT:<NEW_LINE>nodeHandlerStack.push(nodeHandler);<NEW_LINE>NodeHandler elementHandler = nodeHandler.findMatchFor(reader);<NEW_LINE>nodeHandler = elementHandler == null ? NO_OP_HANDLER : elementHandler;<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>case XMLStreamConstants.CDATA:<NEW_LINE>case XMLStreamConstants.CHARACTERS:<NEW_LINE>nodeHandler.onCharacters(reader, xmlContext);<NEW_LINE>break;<NEW_LINE>case XMLStreamConstants.END_ELEMENT:<NEW_LINE>nodeHandler.onEnd(reader, xmlContext);<NEW_LINE>nodeHandler = nodeHandlerStack.pop();<NEW_LINE>break;<NEW_LINE>case XMLStreamConstants.ATTRIBUTE:<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} | nodeHandler.onStart(reader, xmlContext); |
1,592,881 | public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) {<NEW_LINE><MASK><NEW_LINE>if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_DOWN) {<NEW_LINE>int x = (int) event.getX();<NEW_LINE>int y = (int) event.getY();<NEW_LINE>x -= widget.getTotalPaddingLeft();<NEW_LINE>y -= widget.getTotalPaddingTop();<NEW_LINE>x += widget.getScrollX();<NEW_LINE>y += widget.getScrollY();<NEW_LINE>Layout layout = widget.getLayout();<NEW_LINE>int line = layout.getLineForVertical(y);<NEW_LINE>int off = layout.getOffsetForHorizontal(line, x);<NEW_LINE>ClickableSpan[] link = buffer.getSpans(off, off, ClickableSpan.class);<NEW_LINE>if (link.length != 0) {<NEW_LINE>if (action == MotionEvent.ACTION_UP) {<NEW_LINE>if (link[0] instanceof URLSpan) {<NEW_LINE>if (null != mListener) {<NEW_LINE>URLSpan span = (URLSpan) link[0];<NEW_LINE>mListener.onURLClick(Uri.parse(span.getURL()));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>link[0].onClick(widget);<NEW_LINE>}<NEW_LINE>} else if (action == MotionEvent.ACTION_DOWN) {<NEW_LINE>Selection.setSelection(buffer, buffer.getSpanStart(link[0]), buffer.getSpanEnd(link[0]));<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>Selection.removeSelection(buffer);<NEW_LINE>Touch.onTouchEvent(widget, buffer, event);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Touch.onTouchEvent(widget, buffer, event);<NEW_LINE>} | int action = event.getAction(); |
560,420 | public static String base64Encode(byte[] bytes) {<NEW_LINE>if (bytes == null) {<NEW_LINE>throw new IllegalArgumentException("Input bytes must not be null.");<NEW_LINE>}<NEW_LINE>if (bytes.length >= BASE64_UPPER_BOUND) {<NEW_LINE>throw new IllegalArgumentException("Input bytes length must not exceed " + BASE64_UPPER_BOUND);<NEW_LINE>}<NEW_LINE>// Every three bytes is encoded into four characters.<NEW_LINE>//<NEW_LINE>// Example:<NEW_LINE>// input |0 1 0 1 0 0 1 0|0 1 1 0 1 1 1 1|0 1 1 0 0 0 1 0|<NEW_LINE>// encode grouping |0 1 0 1 0 0|1 0 0 1 1 0|1 1 1 1 0 1|1 0 0 0 1 0|<NEW_LINE>// encoded ascii | U | m | 9 | i |<NEW_LINE>int triples = bytes.length / 3;<NEW_LINE>// If the number of input bytes is not a multiple of three, padding characters will be added.<NEW_LINE>if (bytes.length % 3 != 0) {<NEW_LINE>triples += 1;<NEW_LINE>}<NEW_LINE>// The encoded string will have four characters for every three bytes.<NEW_LINE>char[] encoding = new char[triples << 2];<NEW_LINE>for (int in = 0, out = 0; in < bytes.length; in += 3, out += 4) {<NEW_LINE>int triple = (bytes[in] & 0xff) << 16;<NEW_LINE>if (in + 1 < bytes.length) {<NEW_LINE>triple |= ((bytes[in + 1] & 0xff) << 8);<NEW_LINE>}<NEW_LINE>if (in + 2 < bytes.length) {<NEW_LINE>triple |= (bytes[in + 2] & 0xff);<NEW_LINE>}<NEW_LINE>encoding[out] = BASE64_CHARS.charAt((triple >> 18) & 0x3f);<NEW_LINE>encoding[out + 1] = BASE64_CHARS.charAt((triple >> 12) & 0x3f);<NEW_LINE>encoding[out + 2] = BASE64_CHARS.charAt((<MASK><NEW_LINE>encoding[out + 3] = BASE64_CHARS.charAt(triple & 0x3f);<NEW_LINE>}<NEW_LINE>// Add padding characters if needed.<NEW_LINE>for (int i = encoding.length - (triples * 3 - bytes.length); i < encoding.length; i++) {<NEW_LINE>encoding[i] = '=';<NEW_LINE>}<NEW_LINE>return String.valueOf(encoding);<NEW_LINE>} | triple >> 6) & 0x3f); |
1,388,853 | private ElementParser parserForUnknown(FieldDefn fieldDefn) {<NEW_LINE>ValueDef valueDef = fieldDefn.lookahead();<NEW_LINE>if (!valueDef.isArray()) {<NEW_LINE>// For the case null appears before other values.<NEW_LINE>return new NullFieldParser(fieldDefn.tupleParser(), fieldDefn.key());<NEW_LINE>} else if (valueDef.dimensions() > 1) {<NEW_LINE>// An unknown nested array: [[]], etc. Must guess a type.<NEW_LINE>return forceRepeatedListResolution(fieldDefn);<NEW_LINE>} else if (valueDef.type() == JsonType.NULL) {<NEW_LINE>// For the case of [null], must force resolution<NEW_LINE>return forceArrayResolution(fieldDefn);<NEW_LINE>} else {<NEW_LINE>// For the case [] appears before other values.<NEW_LINE>return new EmptyArrayFieldParser(fieldDefn.tupleParser(<MASK><NEW_LINE>}<NEW_LINE>} | ), fieldDefn.key()); |
1,841,366 | public static HTTPResponseResult postFile(String address, String fileParamName, File file, String usernamePropertyName, String passwordPropertyName) {<NEW_LINE>DefaultHttpClient httpClient = null;<NEW_LINE>try {<NEW_LINE>HttpPost postMethod = new HttpPost(address);<NEW_LINE>httpClient = getHttpClient(usernamePropertyName, passwordPropertyName, postMethod.getURI().getHost(), null);<NEW_LINE>String mimeType = URLConnection.<MASK><NEW_LINE>if (mimeType == null)<NEW_LINE>mimeType = "application/octet-stream";<NEW_LINE>FileBody bin = new FileBody(file, mimeType);<NEW_LINE>MultipartEntity reqEntity = new MultipartEntity();<NEW_LINE>reqEntity.addPart(fileParamName, bin);<NEW_LINE>postMethod.setEntity(reqEntity);<NEW_LINE>HttpEntity resEntity = executeMethod(httpClient, postMethod, null, null);<NEW_LINE>if (resEntity == null)<NEW_LINE>return null;<NEW_LINE>return new HTTPResponseResult(resEntity, httpClient);<NEW_LINE>} catch (Throwable e) {<NEW_LINE>logger.error("Cannot post file to:" + address, e);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>} | guessContentTypeFromName(file.getPath()); |
1,702,854 | protected Class<?> findClass(String name, boolean returnNull) throws ClassNotFoundException {<NEW_LINE>String resourceName = Util.convertClassNameToResourceName(name);<NEW_LINE>final ByteResourceInformation classBytesResourceInformation = shadowedLoader.findClassBytes(name, resourceName);<NEW_LINE>if (classBytesResourceInformation == null) {<NEW_LINE>if (returnNull) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>throw new ClassNotFoundException(name);<NEW_LINE>}<NEW_LINE>// Now define a package for this class if it has one<NEW_LINE>int lastDotIndex = name.lastIndexOf('.');<NEW_LINE>if (lastDotIndex != -1) {<NEW_LINE>String packageName = name.substring(0, lastDotIndex);<NEW_LINE>// Try to avoid defining a package twice<NEW_LINE>if (this.getPackage(packageName) == null) {<NEW_LINE>definePackage(classBytesResourceInformation, packageName);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>byte[<MASK><NEW_LINE>return defineClass(name, bytes, 0, bytes.length);<NEW_LINE>} | ] bytes = classBytesResourceInformation.getBytes(); |
735,013 | public Map<String, Collection<String>> readReplacedFiles() throws IOException {<NEW_LINE>Path replacedPath = registryPath.resolve<MASK><NEW_LINE>Map<String, Collection<String>> result = new HashMap<>();<NEW_LINE>Properties props = new Properties();<NEW_LINE>if (!Files.exists(replacedPath)) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>try (InputStream is = Files.newInputStream(replacedPath)) {<NEW_LINE>props.load(is);<NEW_LINE>}<NEW_LINE>for (String s : Collections.list((Enumeration<String>) props.propertyNames())) {<NEW_LINE>// NOI18N<NEW_LINE>String files = props.getProperty(s, "");<NEW_LINE>Collection<String> unsorted = new HashSet<>();<NEW_LINE>for (String x : files.split(" *, *")) {<NEW_LINE>// NOI18N<NEW_LINE>String t = x.trim();<NEW_LINE>if (!t.isEmpty()) {<NEW_LINE>SystemUtils.checkCommonRelative(null, t);<NEW_LINE>unsorted.add(t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>List<String> components = new ArrayList<>(unsorted);<NEW_LINE>Collections.sort(components);<NEW_LINE>result.put(s, components);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>} | (SystemUtils.fromCommonString(PATH_REPLACED_FILES)); |
669,126 | public Size apply(MethodVisitor methodVisitor, Context implementationContext, MethodDescription instrumentedMethod) {<NEW_LINE>if (instrumentedMethod.isStatic()) {<NEW_LINE>throw new IllegalStateException("Hash code method must not be static: " + instrumentedMethod);<NEW_LINE>} else if (!instrumentedMethod.getReturnType().represents(int.class)) {<NEW_LINE>throw new IllegalStateException("Hash code method does not return primitive integer: " + instrumentedMethod);<NEW_LINE>}<NEW_LINE>List<StackManipulation> stackManipulations = new ArrayList<StackManipulation>(2 + fieldDescriptions.size() * 8);<NEW_LINE>stackManipulations.add(initialValue);<NEW_LINE>int padding = 0;<NEW_LINE>for (FieldDescription.InDefinedShape fieldDescription : fieldDescriptions) {<NEW_LINE>stackManipulations.add(IntegerConstant.forValue(multiplier));<NEW_LINE>stackManipulations.add(Multiplication.INTEGER);<NEW_LINE>stackManipulations.<MASK><NEW_LINE>stackManipulations.add(FieldAccess.forField(fieldDescription).read());<NEW_LINE>NullValueGuard nullValueGuard = fieldDescription.getType().isPrimitive() || fieldDescription.getType().isArray() || nonNullable.matches(fieldDescription) ? NullValueGuard.NoOp.INSTANCE : new NullValueGuard.UsingJump(instrumentedMethod);<NEW_LINE>stackManipulations.add(nullValueGuard.before());<NEW_LINE>stackManipulations.add(ValueTransformer.of(fieldDescription.getType()));<NEW_LINE>stackManipulations.add(Addition.INTEGER);<NEW_LINE>stackManipulations.add(nullValueGuard.after());<NEW_LINE>padding = Math.max(padding, nullValueGuard.getRequiredVariablePadding());<NEW_LINE>}<NEW_LINE>stackManipulations.add(MethodReturn.INTEGER);<NEW_LINE>return new Size(new StackManipulation.Compound(stackManipulations).apply(methodVisitor, implementationContext).getMaximalSize(), instrumentedMethod.getStackSize() + padding);<NEW_LINE>} | add(MethodVariableAccess.loadThis()); |
541,435 | private ValidationTaskResult validatePrincipalLogin() {<NEW_LINE>String principal = <MASK><NEW_LINE>String keytab = mConf.getOrDefault(mKeytabProperty, "");<NEW_LINE>if (principal.isEmpty() || keytab.isEmpty()) {<NEW_LINE>mMsg.append(String.format("Failed to find Kerberos principal and keytab. " + "Found %s=%s and %s=%s.%n", mPrincipalProperty.toString(), principal, mKeytabProperty, keytab));<NEW_LINE>mAdvice.append(String.format("Please configure Alluxio to connect with secure HDFS " + "following %s%n", DOC_LINK));<NEW_LINE>return new ValidationTaskResult(ValidationUtils.State.FAILED, getName(), mMsg.toString(), mAdvice.toString());<NEW_LINE>}<NEW_LINE>// Check whether can login with specified principal and keytab<NEW_LINE>Matcher matchPrincipal = PRINCIPAL_PATTERN.matcher(principal);<NEW_LINE>if (!matchPrincipal.matches()) {<NEW_LINE>mMsg.append(String.format("Principal %s is not in the right format.%n", principal));<NEW_LINE>mAdvice.append(String.format("Please fix principal %s=%s.%n", mPrincipalProperty.toString(), principal));<NEW_LINE>return new ValidationTaskResult(ValidationUtils.State.FAILED, getName(), mMsg.toString(), mAdvice.toString());<NEW_LINE>}<NEW_LINE>String primary = matchPrincipal.group("primary");<NEW_LINE>String instance = matchPrincipal.group("instance");<NEW_LINE>String realm = matchPrincipal.group("realm");<NEW_LINE>// Login with principal and keytab<NEW_LINE>String[] command = new String[] { "kinit", "-kt", keytab, principal };<NEW_LINE>try {<NEW_LINE>String output = ShellUtils.execCommand(command);<NEW_LINE>mMsg.append(String.format("Command %s finished with output: %s%n", Arrays.toString(command), output));<NEW_LINE>return new ValidationTaskResult(ValidationUtils.State.OK, getName(), mMsg.toString(), mAdvice.toString());<NEW_LINE>} catch (IOException e) {<NEW_LINE>mMsg.append(String.format("Kerberos login failed for %s with keytab %s.%n", principal, keytab));<NEW_LINE>mMsg.append(ValidationUtils.getErrorInfo(e));<NEW_LINE>mMsg.append(String.format("Primary is %s, instance is %s and realm is %s.%n", primary, instance, realm));<NEW_LINE>ValidationTaskResult result = new ValidationTaskResult(ValidationUtils.State.FAILED, getName(), mMsg.toString(), mAdvice.toString());<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>} | mConf.getOrDefault(mPrincipalProperty, ""); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.