idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
453,964
public void updateOptionsList() {<NEW_LINE>myIsInSchemeChange = true;<NEW_LINE>myLineSpacingField.setText(Float.toString(getLineSpacing()));<NEW_LINE>FontPreferences fontPreferences = getFontPreferences();<NEW_LINE>List<String> fontFamilies = fontPreferences.getEffectiveFontFamilies();<NEW_LINE>myPrimaryCombo.setFontName(fontPreferences.getFontFamily());<NEW_LINE>boolean isThereSecondaryFont = fontFamilies.size() > 1;<NEW_LINE>myUseSecondaryFontCheckbox.setSelected(isThereSecondaryFont);<NEW_LINE>mySecondaryCombo.setFontName(isThereSecondaryFont ? fontFamilies<MASK><NEW_LINE>myEditorFontSizeField.setText(String.valueOf(fontPreferences.getSize(fontPreferences.getFontFamily())));<NEW_LINE>boolean readOnly = ColorAndFontOptions.isReadOnly(myOptions.getSelectedScheme());<NEW_LINE>myPrimaryCombo.setEnabled(!readOnly);<NEW_LINE>mySecondaryCombo.setEnabled(isThereSecondaryFont && !readOnly);<NEW_LINE>myOnlyMonospacedCheckBox.setEnabled(!readOnly);<NEW_LINE>myLineSpacingField.setEnabled(!readOnly);<NEW_LINE>myEditorFontSizeField.setEnabled(!readOnly);<NEW_LINE>myUseSecondaryFontCheckbox.setEnabled(!readOnly);<NEW_LINE>myEnableLigaturesCheckbox.setEnabled(!readOnly);<NEW_LINE>myLigaturesInfoLinkLabel.setEnabled(!readOnly);<NEW_LINE>myEnableLigaturesCheckbox.setSelected(fontPreferences.useLigatures());<NEW_LINE>myIsInSchemeChange = false;<NEW_LINE>}
.get(1) : null);
481,496
public void fillTargetField(ActionRequest request, ActionResponse response) {<NEW_LINE>Context context = request.getContext();<NEW_LINE>MetaField metaField = (MetaField) context.get("metaField");<NEW_LINE>if (metaField != null) {<NEW_LINE>String targetField = "";<NEW_LINE>if (context.get("targetField") == null) {<NEW_LINE>targetField = metaField.getName();<NEW_LINE>} else {<NEW_LINE>targetField = context.get("targetField").toString();<NEW_LINE>targetField += "." + metaField.getName();<NEW_LINE>}<NEW_LINE>response.setValue("targetField", targetField);<NEW_LINE>if (metaField.getRelationship() != null) {<NEW_LINE>response.setValue("currentDomain", metaField.getTypeName());<NEW_LINE>response.setValue("metaField", null);<NEW_LINE>} else {<NEW_LINE>response.<MASK><NEW_LINE>response.setAttr("validateFieldSelectionBtn", "readonly", true);<NEW_LINE>response.setAttr("$viewerMessage", "hidden", false);<NEW_LINE>response.setAttr("$isValidate", "value", true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setAttr("metaField", "readonly", true);
1,740,447
protected static ApplicationContext applicationContext(Class<?> mainClass, String[] args) {<NEW_LINE>KestraApplicationContextBuilder builder = new KestraApplicationContextBuilder().mainClass(mainClass).environments(Environment.CLI).classLoader(KestraClassLoader.instance());<NEW_LINE>CommandLine cmd = new CommandLine(mainClass, CommandLine.defaultFactory());<NEW_LINE>CommandLine.ParseResult parseResult = cmd.parseArgs(args);<NEW_LINE>List<CommandLine> parsedCommands = parseResult.asCommandLineList();<NEW_LINE>CommandLine commandLine = parsedCommands.get(<MASK><NEW_LINE>Class<?> cls = commandLine.getCommandSpec().userObject().getClass();<NEW_LINE>if (AbstractCommand.class.isAssignableFrom(cls)) {<NEW_LINE>// if class have propertiesFromConfig, add configuration files<NEW_LINE>builder.properties(getPropertiesFromMethod(cls, "propertiesFromConfig", commandLine.getCommandSpec().userObject()));<NEW_LINE>// if class have propertiesOverrides, add force properties for this class<NEW_LINE>builder.properties(getPropertiesFromMethod(cls, "propertiesOverrides", null));<NEW_LINE>// add plugins registry if plugin path defined<NEW_LINE>builder.pluginRegistry(getPropertiesFromMethod(cls, "initPluginRegistry", commandLine.getCommandSpec().userObject()));<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
parsedCommands.size() - 1);
1,698,266
private static void parseCommentRecursion(JSONArray comments, ArrayList<Comment> newCommentData, ArrayList<String> moreChildrenFullnames, int depth) throws JSONException {<NEW_LINE>int actualCommentLength;<NEW_LINE>if (comments.length() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>JSONObject more = comments.getJSONObject(comments.length() - 1).getJSONObject(JSONUtils.DATA_KEY);<NEW_LINE>// Maybe moreChildrenFullnames contain only commentsJSONArray and no more info<NEW_LINE>if (more.has(JSONUtils.COUNT_KEY)) {<NEW_LINE>JSONArray childrenArray = <MASK><NEW_LINE>for (int i = 0; i < childrenArray.length(); i++) {<NEW_LINE>moreChildrenFullnames.add("t1_" + childrenArray.getString(i));<NEW_LINE>}<NEW_LINE>actualCommentLength = comments.length() - 1;<NEW_LINE>if (moreChildrenFullnames.isEmpty() && comments.getJSONObject(comments.length() - 1).getString(JSONUtils.KIND_KEY).equals(JSONUtils.KIND_VALUE_MORE)) {<NEW_LINE>newCommentData.add(new Comment(more.getString(JSONUtils.PARENT_ID_KEY), more.getInt(JSONUtils.DEPTH_KEY), Comment.PLACEHOLDER_CONTINUE_THREAD));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>actualCommentLength = comments.length();<NEW_LINE>}<NEW_LINE>for (int i = 0; i < actualCommentLength; i++) {<NEW_LINE>JSONObject data = comments.getJSONObject(i).getJSONObject(JSONUtils.DATA_KEY);<NEW_LINE>Comment singleComment = parseSingleComment(data, depth);<NEW_LINE>if (data.get(JSONUtils.REPLIES_KEY) instanceof JSONObject) {<NEW_LINE>JSONArray childrenArray = data.getJSONObject(JSONUtils.REPLIES_KEY).getJSONObject(JSONUtils.DATA_KEY).getJSONArray(JSONUtils.CHILDREN_KEY);<NEW_LINE>ArrayList<Comment> children = new ArrayList<>();<NEW_LINE>ArrayList<String> nextMoreChildrenFullnames = new ArrayList<>();<NEW_LINE>parseCommentRecursion(childrenArray, children, nextMoreChildrenFullnames, singleComment.getDepth());<NEW_LINE>singleComment.addChildren(children);<NEW_LINE>singleComment.setMoreChildrenFullnames(nextMoreChildrenFullnames);<NEW_LINE>singleComment.setChildCount(getChildCount(singleComment));<NEW_LINE>}<NEW_LINE>newCommentData.add(singleComment);<NEW_LINE>}<NEW_LINE>}
more.getJSONArray(JSONUtils.CHILDREN_KEY);
1,525,074
public void whenEventTypeRepartitionedSubscriptionStartsStreamNewPartitions() throws Exception {<NEW_LINE>final EventType eventType = NakadiTestUtils.createBusinessEventTypeWithPartitions(1);<NEW_LINE>final Subscription subscription = NakadiTestUtils.createSubscription(RandomSubscriptionBuilder.builder().withEventType(eventType.getName()).withStartFrom(SubscriptionBase.InitialPosition.BEGIN).buildSubscriptionBase());<NEW_LINE>NakadiTestUtils.publishBusinessEventWithUserDefinedPartition(eventType.getName(), 1, x -> "{\"foo\":\"bar\"}", p -> "0");<NEW_LINE>// create session, read from subscription and wait for events to be sent<NEW_LINE>final TestStreamingClient client = TestStreamingClient.create(URL, subscription.getId(), "").startWithAutocommit(streamBatches -> LOG.info("{}", streamBatches));<NEW_LINE>TestUtils.waitFor(() -> MatcherAssert.assertThat(client.getBatches(), Matchers.hasSize(1)));<NEW_LINE>Assert.assertEquals("0", client.getBatches().get(0).getCursor().getPartition());<NEW_LINE>NakadiTestUtils.repartitionEventType(eventType, 2);<NEW_LINE>TestUtils.waitFor(() -> MatcherAssert.assertThat(client.isRunning(), <MASK><NEW_LINE>final TestStreamingClient clientAfterRepartitioning = TestStreamingClient.create(URL, subscription.getId(), "").startWithAutocommit(streamBatches -> LOG.info("{}", streamBatches));<NEW_LINE>NakadiTestUtils.publishBusinessEventWithUserDefinedPartition(eventType.getName(), 1, x -> "{\"foo\":\"bar" + x + "\"}", p -> "1");<NEW_LINE>TestUtils.waitFor(() -> MatcherAssert.assertThat(clientAfterRepartitioning.getBatches(), Matchers.hasSize(1)));<NEW_LINE>Assert.assertEquals("1", clientAfterRepartitioning.getBatches().get(0).getCursor().getPartition());<NEW_LINE>}
Matchers.is(false)));
686,211
private void createPointerPicture() {<NEW_LINE>final Paint arrowPaint = new Paint();<NEW_LINE><MASK><NEW_LINE>arrowPaint.setAntiAlias(true);<NEW_LINE>arrowPaint.setStyle(Style.FILL);<NEW_LINE>arrowPaint.setAlpha(220);<NEW_LINE>// Create a little white dot in the middle of the compass rose<NEW_LINE>final Paint centerPaint = new Paint();<NEW_LINE>centerPaint.setColor(Color.WHITE);<NEW_LINE>centerPaint.setAntiAlias(true);<NEW_LINE>centerPaint.setStyle(Style.FILL);<NEW_LINE>centerPaint.setAlpha(220);<NEW_LINE>final int picBorderWidthAndHeight = (int) ((mCompassRadius + 5) * 2 * mScale);<NEW_LINE>final int center = picBorderWidthAndHeight / 2;<NEW_LINE>if (mCompassRoseBitmap != null)<NEW_LINE>mCompassRoseBitmap.recycle();<NEW_LINE>mCompassRoseBitmap = Bitmap.createBitmap(picBorderWidthAndHeight, picBorderWidthAndHeight, Config.ARGB_8888);<NEW_LINE>final Canvas canvas = new Canvas(mCompassRoseBitmap);<NEW_LINE>// Arrow comprised of 2 triangles<NEW_LINE>final Path pathArrow = new Path();<NEW_LINE>pathArrow.moveTo(center, center - (mCompassRadius - 3) * mScale);<NEW_LINE>pathArrow.lineTo(center + 4 * mScale, center + (mCompassRadius - 3) * mScale);<NEW_LINE>pathArrow.lineTo(center, center + 0.5f * (mCompassRadius - 3) * mScale);<NEW_LINE>pathArrow.lineTo(center - 4 * mScale, center + (mCompassRadius - 3) * mScale);<NEW_LINE>pathArrow.lineTo(center, center - (mCompassRadius - 3) * mScale);<NEW_LINE>pathArrow.close();<NEW_LINE>canvas.drawPath(pathArrow, arrowPaint);<NEW_LINE>// Draw a little white dot in the middle<NEW_LINE>canvas.drawCircle(center, center, 2, centerPaint);<NEW_LINE>}
arrowPaint.setColor(Color.BLACK);
293,548
private int showDialog(IJSLineBreakpoint breakpoint) {<NEW_LINE>int currentHitCount = 0;<NEW_LINE>try {<NEW_LINE>currentHitCount = breakpoint.getHitCount();<NEW_LINE>} catch (CoreException e) {<NEW_LINE>IdeLog.logError(<MASK><NEW_LINE>}<NEW_LINE>// $NON-NLS-1$;<NEW_LINE>String initialValue = (currentHitCount > 0) ? Integer.toString(currentHitCount) : "1";<NEW_LINE>HitCountDialog dlg = new HitCountDialog(UIUtils.getActiveShell(), Messages.BreakpointHitCountAction_SetBreakpointHitCount, Messages.BreakpointHitCountAction_EnterNewHitCountForBreakpoint, initialValue, inputValidator);<NEW_LINE>if (dlg.open() != Window.OK) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>if (dlg.isHitCountEnabled()) {<NEW_LINE>return Integer.parseInt(dlg.getValue().trim());<NEW_LINE>}<NEW_LINE>return 0;<NEW_LINE>}
JSDebugUIPlugin.getDefault(), e);
444,304
public static DescribeAffectedMaliciousFileImagesResponse unmarshall(DescribeAffectedMaliciousFileImagesResponse describeAffectedMaliciousFileImagesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAffectedMaliciousFileImagesResponse.setRequestId(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.RequestId"));<NEW_LINE>PageInfo pageInfo = new PageInfo();<NEW_LINE>pageInfo.setCount(_ctx.integerValue("DescribeAffectedMaliciousFileImagesResponse.PageInfo.Count"));<NEW_LINE>pageInfo.setPageSize(_ctx.integerValue("DescribeAffectedMaliciousFileImagesResponse.PageInfo.PageSize"));<NEW_LINE>pageInfo.setTotalCount<MASK><NEW_LINE>pageInfo.setCurrentPage(_ctx.integerValue("DescribeAffectedMaliciousFileImagesResponse.PageInfo.CurrentPage"));<NEW_LINE>describeAffectedMaliciousFileImagesResponse.setPageInfo(pageInfo);<NEW_LINE>List<AffectedMaliciousFileImage> affectedMaliciousFileImagesResponse = new ArrayList<AffectedMaliciousFileImage>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse.Length"); i++) {<NEW_LINE>AffectedMaliciousFileImage affectedMaliciousFileImage = new AffectedMaliciousFileImage();<NEW_LINE>affectedMaliciousFileImage.setLayer(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].Layer"));<NEW_LINE>affectedMaliciousFileImage.setFirstScanTimestamp(_ctx.longValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].FirstScanTimestamp"));<NEW_LINE>affectedMaliciousFileImage.setLatestScanTimestamp(_ctx.longValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].LatestScanTimestamp"));<NEW_LINE>affectedMaliciousFileImage.setLatestVerifyTimestamp(_ctx.longValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].LatestVerifyTimestamp"));<NEW_LINE>affectedMaliciousFileImage.setMaliciousMd5(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].MaliciousMd5"));<NEW_LINE>affectedMaliciousFileImage.setStatus(_ctx.integerValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].Status"));<NEW_LINE>affectedMaliciousFileImage.setLevel(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].Level"));<NEW_LINE>affectedMaliciousFileImage.setImageUuid(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].ImageUuid"));<NEW_LINE>affectedMaliciousFileImage.setFilePath(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].FilePath"));<NEW_LINE>affectedMaliciousFileImage.setDigest(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].Digest"));<NEW_LINE>affectedMaliciousFileImage.setRepoRegionId(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].RepoRegionId"));<NEW_LINE>affectedMaliciousFileImage.setRepoInstanceId(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].RepoInstanceId"));<NEW_LINE>affectedMaliciousFileImage.setRepoId(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].RepoId"));<NEW_LINE>affectedMaliciousFileImage.setRepoName(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].RepoName"));<NEW_LINE>affectedMaliciousFileImage.setNamespace(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].Namespace"));<NEW_LINE>affectedMaliciousFileImage.setTag(_ctx.stringValue("DescribeAffectedMaliciousFileImagesResponse.AffectedMaliciousFileImagesResponse[" + i + "].Tag"));<NEW_LINE>affectedMaliciousFileImagesResponse.add(affectedMaliciousFileImage);<NEW_LINE>}<NEW_LINE>describeAffectedMaliciousFileImagesResponse.setAffectedMaliciousFileImagesResponse(affectedMaliciousFileImagesResponse);<NEW_LINE>return describeAffectedMaliciousFileImagesResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeAffectedMaliciousFileImagesResponse.PageInfo.TotalCount"));
402,839
public static Object parseAsJSON(HttpServletRequest request, HttpServletResponse response, final String fieldValue, final Contentlet contentlet, final String fieldVar) {<NEW_LINE>if (!UtilMethods.isSet(fieldValue))<NEW_LINE>return null;<NEW_LINE>request = request == null ? HttpServletRequestThreadLocal.INSTANCE.getRequest() : request;<NEW_LINE>response = response == null ? HttpServletResponseThreadLocal.INSTANCE.getResponse() : response;<NEW_LINE>if (request == null || response == null)<NEW_LINE>return null;<NEW_LINE>final org.apache.velocity.context.Context context = (request != null && response != null) ? VelocityUtil.getInstance().getContext(request, <MASK><NEW_LINE>final Language lang = WebAPILocator.getLanguageWebAPI().getLanguage(request);<NEW_LINE>final PageMode pageMode = PageMode.get(request);<NEW_LINE>context.put("content", contentlet);<NEW_LINE>context.put("contentlet", contentlet);<NEW_LINE>context.put("dotJSON", new DotJSON());<NEW_LINE>final VelocityResourceKey key = new VelocityResourceKey(contentlet, pageMode, lang.getId());<NEW_LINE>try {<NEW_LINE>VelocityUtil.mergeTemplate(key.path, context);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.warn(ContainerRenderedBuilder.class, e.getMessage());<NEW_LINE>}<NEW_LINE>final String code = (String) context.get(fieldVar);<NEW_LINE>final DotJSON dotJSON = (DotJSON) context.get("dotJSON");<NEW_LINE>return UtilMethods.isSet(code) ? dotJSON.size() > 0 ? dotJSON.getMap() : Collections.emptyMap() : Collections.emptyMap();<NEW_LINE>}
response) : VelocityUtil.getBasicContext();
549,645
public static ApiVehicleRentalStation mapToApi(VehicleRentalPlace domain, Locale locale) {<NEW_LINE>if (domain == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ApiVehicleRentalStation api = new ApiVehicleRentalStation();<NEW_LINE>api.id = domain.getStationId();<NEW_LINE>api.name = domain.getName().toString(locale);<NEW_LINE>api<MASK><NEW_LINE>api.y = domain.getLatitude();<NEW_LINE>api.bikesAvailable = domain.getVehiclesAvailable();<NEW_LINE>api.spacesAvailable = domain.getSpacesAvailable();<NEW_LINE>api.allowDropoff = domain.isAllowDropoff();<NEW_LINE>api.isFloatingBike = domain.isFloatingVehicle();<NEW_LINE>api.isCarStation = domain.isCarStation();<NEW_LINE>api.networks = List.of(domain.getNetwork());<NEW_LINE>api.realTimeData = domain.isRealTimeData();<NEW_LINE>api.rentalUris = domain.getRentalUris();<NEW_LINE>return api;<NEW_LINE>}
.x = domain.getLongitude();
1,378,126
public void eliminateSharedStreams() {<NEW_LINE>if (!sharedStreams)<NEW_LINE>return;<NEW_LINE>sharedStreams = false;<NEW_LINE>if (pageRefs.size() == 1)<NEW_LINE>return;<NEW_LINE>List<PdfObject> newRefs = new ArrayList<>();<NEW_LINE>List<PdfObject> <MASK><NEW_LINE>IntHashtable visited = new IntHashtable();<NEW_LINE>for (int k = 1; k <= pageRefs.size(); ++k) {<NEW_LINE>PdfDictionary page = pageRefs.getPageN(k);<NEW_LINE>if (page == null)<NEW_LINE>continue;<NEW_LINE>PdfObject contents = getPdfObject(page.get(PdfName.CONTENTS));<NEW_LINE>if (contents == null)<NEW_LINE>continue;<NEW_LINE>if (contents.isStream()) {<NEW_LINE>PRIndirectReference ref = (PRIndirectReference) page.get(PdfName.CONTENTS);<NEW_LINE>if (visited.containsKey(ref.getNumber())) {<NEW_LINE>// need to duplicate<NEW_LINE>newRefs.add(ref);<NEW_LINE>newStreams.add(new PRStream((PRStream) contents, null));<NEW_LINE>} else<NEW_LINE>visited.put(ref.getNumber(), 1);<NEW_LINE>} else if (contents.isArray()) {<NEW_LINE>PdfArray array = (PdfArray) contents;<NEW_LINE>for (int j = 0; j < array.size(); ++j) {<NEW_LINE>PRIndirectReference ref = (PRIndirectReference) array.getPdfObject(j);<NEW_LINE>if (visited.containsKey(ref.getNumber())) {<NEW_LINE>// need to duplicate<NEW_LINE>newRefs.add(ref);<NEW_LINE>newStreams.add(new PRStream((PRStream) getPdfObject(ref), null));<NEW_LINE>} else<NEW_LINE>visited.put(ref.getNumber(), 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (newStreams.isEmpty())<NEW_LINE>return;<NEW_LINE>for (int k = 0; k < newStreams.size(); ++k) {<NEW_LINE>xrefObj.add(newStreams.get(k));<NEW_LINE>PRIndirectReference ref = (PRIndirectReference) newRefs.get(k);<NEW_LINE>ref.setNumber(xrefObj.size() - 1, 0);<NEW_LINE>}<NEW_LINE>}
newStreams = new ArrayList<>();
1,363,809
final ListHostedConfigurationVersionsResult executeListHostedConfigurationVersions(ListHostedConfigurationVersionsRequest listHostedConfigurationVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listHostedConfigurationVersionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListHostedConfigurationVersionsRequest> request = null;<NEW_LINE>Response<ListHostedConfigurationVersionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListHostedConfigurationVersionsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listHostedConfigurationVersionsRequest));<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, "AppConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListHostedConfigurationVersions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListHostedConfigurationVersionsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListHostedConfigurationVersionsResultJsonUnmarshaller());<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);
574,946
public void scrollAnimators(@NonNull List<Animator> animators, int position, boolean isForward) {<NEW_LINE>switch(DatabaseConfiguration.scrollAnimatorType) {<NEW_LINE>case Scale:<NEW_LINE>AnimatorHelper.scaleAnimator(animators, itemView, 0f);<NEW_LINE>break;<NEW_LINE>case SlideInTopBottom:<NEW_LINE>if (isForward) {<NEW_LINE>AnimatorHelper.slideInFromBottomAnimator(animators, itemView, mAdapter.getRecyclerView());<NEW_LINE>} else {<NEW_LINE>AnimatorHelper.slideInFromTopAnimator(animators, itemView, mAdapter.getRecyclerView());<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case SlideInFromTop:<NEW_LINE>AnimatorHelper.slideInFromTopAnimator(animators, itemView, mAdapter.getRecyclerView());<NEW_LINE>break;<NEW_LINE>case SlideInFromBottom:<NEW_LINE>AnimatorHelper.slideInFromBottomAnimator(animators, itemView, mAdapter.getRecyclerView());<NEW_LINE>break;<NEW_LINE>case SlideInFromLeft:<NEW_LINE>AnimatorHelper.slideInFromLeftAnimator(animators, itemView, mAdapter.getRecyclerView(), 0.5f);<NEW_LINE>break;<NEW_LINE>case SlideInFromRight:<NEW_LINE>AnimatorHelper.slideInFromRightAnimator(animators, itemView, mAdapter.getRecyclerView(), 0.5f);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>AnimatorHelper.<MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
alphaAnimator(animators, itemView, 0f);
476,354
public String top10FailureJobByAllZkCluster() throws SaturnJobConsoleException {<NEW_LINE>List<JobStatistics> <MASK><NEW_LINE>Collection<ZkCluster> zkClusterList = registryCenterService.getOnlineZkClusterList();<NEW_LINE>for (ZkCluster zkCluster : zkClusterList) {<NEW_LINE>SaturnStatistics saturnStatistics = top10FailureJob(zkCluster.getZkAddr());<NEW_LINE>if (saturnStatistics != null) {<NEW_LINE>String result = saturnStatistics.getResult();<NEW_LINE>List<JobStatistics> tempList = JSON.parseArray(result, JobStatistics.class);<NEW_LINE>if (tempList != null) {<NEW_LINE>jobStatisticsList.addAll(tempList);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>jobStatisticsList = DashboardServiceHelper.sortJobByAllTimeFailureRate(jobStatisticsList);<NEW_LINE>List<JobStatistics> top10FailJob = jobStatisticsList.subList(0, jobStatisticsList.size() > 9 ? 10 : jobStatisticsList.size());<NEW_LINE>return JSON.toJSONString(top10FailJob);<NEW_LINE>}
jobStatisticsList = new ArrayList<>();
1,409,108
public Object apply(ActionContext ctx, Object caller, Object[] sources) throws FrameworkException {<NEW_LINE>assertArrayHasMinLengthAndAllElementsNotNull(sources, 1);<NEW_LINE>String baseUrl = null;<NEW_LINE>String userParameter = null;<NEW_LINE>Boolean runWithXserver = false;<NEW_LINE>String xServerSettings = null;<NEW_LINE>final String page = sources[0].toString();<NEW_LINE>if (sources.length >= 2) {<NEW_LINE>userParameter = sources[1].toString();<NEW_LINE>}<NEW_LINE>if (sources.length >= 3) {<NEW_LINE>baseUrl = sources[2].toString();<NEW_LINE>}<NEW_LINE>if (sources.length >= 4) {<NEW_LINE>runWithXserver = (Boolean) sources[3];<NEW_LINE>}<NEW_LINE>if (sources.length >= 5) {<NEW_LINE>xServerSettings = sources[4].toString();<NEW_LINE>}<NEW_LINE>if (baseUrl == null || baseUrl.length() == 0) {<NEW_LINE>baseUrl = ActionContext.getBaseUrl(ctx.getSecurityContext().getRequest()) + "/";<NEW_LINE>}<NEW_LINE>Principal currentUser = ctx.getSecurityContext().getUser(false);<NEW_LINE>List<Param> parameterList = new ArrayList<Param>();<NEW_LINE>if (currentUser instanceof SuperUser) {<NEW_LINE>parameterList.add(new Param("--custom-header X-User superadmin --custom-header X-Password " + Settings<MASK><NEW_LINE>parameterList.add(new Param("--custom-header-propagation"));<NEW_LINE>} else {<NEW_LINE>final HttpSession session = ctx.getSecurityContext().getSession();<NEW_LINE>final String sessionId = (session instanceof Session) ? ((Session) session).getExtendedId() : session.getId();<NEW_LINE>parameterList.add(new Param("--cookie JSESSIONID " + sessionId));<NEW_LINE>}<NEW_LINE>if (userParameter != null) {<NEW_LINE>parameterList.add(new Param(userParameter));<NEW_LINE>}<NEW_LINE>final ByteArrayOutputStream baos = new ByteArrayOutputStream();<NEW_LINE>try {<NEW_LINE>if (!runWithXserver) {<NEW_LINE>return convertPageToPdfWithoutXServer(baseUrl, page, parameterList, baos);<NEW_LINE>} else {<NEW_LINE>return convertPageToPdfWithXServer(baseUrl, page, parameterList, baos, xServerSettings);<NEW_LINE>}<NEW_LINE>} catch (final Throwable t) {<NEW_LINE>logger.warn("Could not convert page {}{} to pdf... retrying with xvfb...", baseUrl, page);<NEW_LINE>return convertPageToPdfWithXServer(baseUrl, page, parameterList, baos, xServerSettings);<NEW_LINE>}<NEW_LINE>}
.SuperUserPassword.getValue()));
1,412,192
protected Folder _editWebAsset(ActionRequest req, ActionResponse res, PortletConfig config, ActionForm form, User user, String webKey) throws Exception {<NEW_LINE>// wraps request to get session object<NEW_LINE>ActionRequestImpl reqImpl = (ActionRequestImpl) req;<NEW_LINE>HttpServletRequest httpReq = reqImpl.getHttpServletRequest();<NEW_LINE>WebAsset webAsset = (WebAsset) req.getAttribute(webKey);<NEW_LINE>// Checking permissions<NEW_LINE>_checkUserPermissions(webAsset, user, PERMISSION_READ);<NEW_LINE>if (InodeUtils.isSet(webAsset.getInode())) {<NEW_LINE>// calls the asset factory edit<NEW_LINE>boolean editAsset = WebAssetFactory.editAsset(webAsset, user.getUserId());<NEW_LINE>if (!editAsset) {<NEW_LINE>User userMod = null;<NEW_LINE>try {<NEW_LINE>userMod = APILocator.getUserAPI().loadUserById(webAsset.getModUser(), APILocator.getUserAPI().getSystemUser(), false);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>if (ex instanceof NoSuchUserException) {<NEW_LINE>try {<NEW_LINE>userMod = APILocator<MASK><NEW_LINE>} catch (DotDataException e) {<NEW_LINE>Logger.error(this, e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (userMod != null) {<NEW_LINE>webAsset.setModUser(userMod.getUserId());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Company comp = PublicCompanyFactory.getDefaultCompany();<NEW_LINE>String message = LanguageUtil.get(comp.getCompanyId(), user.getLocale(), "message." + webAsset.getType() + ".edit.locked");<NEW_LINE>message += " (" + userMod.getEmailAddress() + ")";<NEW_LINE>SessionMessages.add(httpReq, "custommessage", message);<NEW_LINE>} catch (Exception e) {<NEW_LINE>SessionMessages.add(httpReq, "message", "message." + webAsset.getType() + ".edit.locked");<NEW_LINE>}<NEW_LINE>throw (new ActionException(WebKeys.EDIT_ASSET_EXCEPTION));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Folder parentFolder = new Folder();<NEW_LINE>String parent = req.getParameter("parent");<NEW_LINE>if (!(WebAssetFactory.isAbstractAsset(webAsset))) {<NEW_LINE>if (InodeUtils.isSet(webAsset.getInode())) {<NEW_LINE>parentFolder = APILocator.getFolderAPI().findParentFolder(webAsset, user, false);<NEW_LINE>} else if (UtilMethods.isSet(parent)) {<NEW_LINE>parentFolder = APILocator.getFolderAPI().find(parent, user, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>req.setAttribute(webKey, webAsset);<NEW_LINE>BeanUtils.copyProperties(form, req.getAttribute(webKey));<NEW_LINE>return parentFolder;<NEW_LINE>}
.getUserAPI().getSystemUser();
34,032
public static WorkflowTrace generateWorkflow(Config tlsConfig, BleichenbacherWorkflowType type, byte[] encryptedPMS) {<NEW_LINE>WorkflowTrace trace = new WorkflowConfigurationFactory(tlsConfig).createWorkflowTrace(WorkflowTraceType.HELLO, RunningModeType.CLIENT);<NEW_LINE><MASK><NEW_LINE>ModifiableByteArray epms = new ModifiableByteArray();<NEW_LINE>epms.setModification(ByteArrayModificationFactory.explicitValue(encryptedPMS));<NEW_LINE>cke.setPublicKey(epms);<NEW_LINE>if (null != type) {<NEW_LINE>switch(type) {<NEW_LINE>case CKE:<NEW_LINE>trace.addTlsAction(new SendAction(cke));<NEW_LINE>break;<NEW_LINE>case CKE_CCS:<NEW_LINE>trace.addTlsAction(new SendAction(cke, new ChangeCipherSpecMessage(tlsConfig)));<NEW_LINE>break;<NEW_LINE>case CKE_CCS_FIN:<NEW_LINE>trace.addTlsAction(new SendAction(cke, new ChangeCipherSpecMessage(tlsConfig), new FinishedMessage(tlsConfig)));<NEW_LINE>break;<NEW_LINE>case CKE_FIN:<NEW_LINE>trace.addTlsAction(new SendAction(cke, new FinishedMessage(tlsConfig)));<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>trace.addTlsAction(new GenericReceiveAction());<NEW_LINE>return trace;<NEW_LINE>}
RSAClientKeyExchangeMessage cke = new RSAClientKeyExchangeMessage(tlsConfig);
230,404
public void execute() throws Exception {<NEW_LINE>File quickstartTmpDir = new File(_dataDir, String.valueOf(System.currentTimeMillis()));<NEW_LINE>File baseDir = new File(quickstartTmpDir, "meetupRsvp");<NEW_LINE>File dataDir = new File(baseDir, "data");<NEW_LINE>Preconditions.checkState(dataDir.mkdirs());<NEW_LINE>File schemaFile = new File(baseDir, "meetupRsvp_schema.json");<NEW_LINE>File tableConfigFile = new File(baseDir, "meetupRsvp_realtime_table_config.json");<NEW_LINE>ClassLoader classLoader = Quickstart.class.getClassLoader();<NEW_LINE>URL resource = classLoader.getResource("examples/stream/meetupRsvp/json_meetupRsvp_schema.json");<NEW_LINE>Preconditions.checkNotNull(resource);<NEW_LINE><MASK><NEW_LINE>resource = classLoader.getResource("examples/stream/meetupRsvp/json_meetupRsvp_realtime_table_config.json");<NEW_LINE>Preconditions.checkNotNull(resource);<NEW_LINE>FileUtils.copyURLToFile(resource, tableConfigFile);<NEW_LINE>QuickstartTableRequest request = new QuickstartTableRequest(baseDir.getAbsolutePath());<NEW_LINE>QuickstartRunner runner = new QuickstartRunner(Lists.newArrayList(request), 1, 1, 1, 0, dataDir, getConfigOverrides());<NEW_LINE>printStatus(Color.CYAN, "***** Starting Kafka *****");<NEW_LINE>ZkStarter.ZookeeperInstance zookeeperInstance = ZkStarter.startLocalZkServer();<NEW_LINE>try {<NEW_LINE>_kafkaStarter = StreamDataProvider.getServerDataStartable(KafkaStarterUtils.KAFKA_SERVER_STARTABLE_CLASS_NAME, KafkaStarterUtils.getDefaultKafkaConfiguration(zookeeperInstance));<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException("Failed to start " + KafkaStarterUtils.KAFKA_SERVER_STARTABLE_CLASS_NAME, e);<NEW_LINE>}<NEW_LINE>_kafkaStarter.start();<NEW_LINE>_kafkaStarter.createTopic("meetupRSVPEvents", KafkaStarterUtils.getTopicCreationProps(2));<NEW_LINE>printStatus(Color.CYAN, "***** Starting meetup data stream and publishing to Kafka *****");<NEW_LINE>MeetupRsvpJsonStream meetupRSVPProvider = new MeetupRsvpJsonStream();<NEW_LINE>meetupRSVPProvider.run();<NEW_LINE>printStatus(Color.CYAN, "***** Starting Zookeeper, controller, server and broker *****");<NEW_LINE>runner.startAll();<NEW_LINE>Runtime.getRuntime().addShutdownHook(new Thread(() -> {<NEW_LINE>try {<NEW_LINE>printStatus(Color.GREEN, "***** Shutting down realtime quick start *****");<NEW_LINE>runner.stop();<NEW_LINE>meetupRSVPProvider.stopPublishing();<NEW_LINE>_kafkaStarter.stop();<NEW_LINE>ZkStarter.stopLocalZkServer(zookeeperInstance);<NEW_LINE>FileUtils.deleteDirectory(quickstartTmpDir);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}));<NEW_LINE>printStatus(Color.CYAN, "***** Bootstrap meetupRSVP table *****");<NEW_LINE>runner.bootstrapTable();<NEW_LINE>printStatus(Color.CYAN, "***** Waiting for 20 seconds for a few events to get populated *****");<NEW_LINE>Thread.sleep(20000);<NEW_LINE>printStatus(Color.YELLOW, "***** Realtime json-index quickstart setup complete *****");<NEW_LINE>String q1 = "select json_extract_scalar(event_json, '$.event_name', 'STRING') from meetupRsvp where json_match" + "(group_json, '\"$.group_topics[*].topic_name\"=''Fitness''') limit 10";<NEW_LINE>printStatus(Color.YELLOW, "Events related to fitness");<NEW_LINE>printStatus(Color.CYAN, "Query : " + q1);<NEW_LINE>printStatus(Color.YELLOW, prettyPrintResponse(runner.runQuery(q1)));<NEW_LINE>printStatus(Color.GREEN, "***************************************************");<NEW_LINE>printStatus(Color.GREEN, "You can always go to http://localhost:9000 to play around in the query console");<NEW_LINE>}
FileUtils.copyURLToFile(resource, schemaFile);
1,140,464
public Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String publicIpPrefixName) {<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.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (publicIpPrefixName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-11-01";<NEW_LINE>return FluxUtil.withContext(context -> service.delete(this.client.getEndpoint(), resourceGroupName, publicIpPrefixName, apiVersion, this.client.getSubscriptionId(), context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter publicIpPrefixName is required and cannot be null."));
262,916
private Quantity convertToTargetUOM(@NonNull final Quantity sourceQuantity, @NonNull final org.compiere.model.I_C_OrderLine orderLine, @Nullable final UomId targetUomId) {<NEW_LINE>if (targetUomId == null || targetUomId.equals(sourceQuantity.getUomId())) {<NEW_LINE>return sourceQuantity;<NEW_LINE>}<NEW_LINE>final boolean targetIsTUUom = uomDAO.isUOMForTUs(targetUomId);<NEW_LINE>final boolean sourceIsTUUom = uomDAO.isUOMForTUs(sourceQuantity.getUomId());<NEW_LINE>final UOMConversionContext conversionCtx = UOMConversionContext.of(orderLine.getM_Product_ID());<NEW_LINE>if (sourceIsTUUom && targetIsTUUom) {<NEW_LINE>return sourceQuantity;<NEW_LINE>} else if (!sourceIsTUUom && !targetIsTUUom) {<NEW_LINE>return uomConversionBL.convertQuantityTo(sourceQuantity, conversionCtx, targetUomId);<NEW_LINE>}<NEW_LINE>final ProductId productId = ProductId.ofRepoId(orderLine.getM_Product_ID());<NEW_LINE><MASK><NEW_LINE>if (sourceIsTUUom) {<NEW_LINE>// we can't use any conversion rate, but need to rely on qtyItemCapacity which is originally coming from order line's CU-TU (M_HU_PI_Item_Product)<NEW_LINE>// therefore we take the detour via qtyOrdered<NEW_LINE>// IMPORTANT: we don't use the current orderLine's getQtyOrdered from DB, because e.g. it might be 0 if the shipment-schedule was closed, but still we might have a QtyEntered>0,<NEW_LINE>// and we don't want this to be our concern here<NEW_LINE>final Quantity targetQtyInQtockUOM = Quantitys.create(sourceQuantity.toBigDecimal().multiply(itemCapacityInStockUOM), productId);<NEW_LINE>assume(!uomDAO.isUOMForTUs(targetQtyInQtockUOM.getUomId()), "Our stock-Keeping is never done in a TUs-UOM; qtyInQtockUOM={}; C_OrderLine={}", targetQtyInQtockUOM, orderLine);<NEW_LINE>return uomConversionBL.convertQuantityTo(targetQtyInQtockUOM, conversionCtx, targetUomId);<NEW_LINE>}<NEW_LINE>// sourceIsTUUom is false and targetIsTUUom is true at this point<NEW_LINE>// like in above we need to take the detour via qtyOrdered; see comment there<NEW_LINE>final Quantity sourceQtyInQtockUOM = uomConversionBL.convertToProductUOM(sourceQuantity, productId);<NEW_LINE>assume(!uomDAO.isUOMForTUs(sourceQtyInQtockUOM.getUomId()), "Our stock-Keeping is never done in a TUs-UOM; qtyInQtockUOM={}; C_OrderLine={}", sourceQtyInQtockUOM, orderLine);<NEW_LINE>return sourceQtyInQtockUOM.divide(itemCapacityInStockUOM);<NEW_LINE>}
final BigDecimal itemCapacityInStockUOM = extractQtyItemCapacity(orderLine);
1,669,822
public Trampoline<LazyEither5<ST, M, M2, M3, PT>> toTrampoline() {<NEW_LINE>Trampoline<LazyEither5<ST, M, M2, M3, PT><MASK><NEW_LINE>return new Trampoline<LazyEither5<ST, M, M2, M3, PT>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public LazyEither5<ST, M, M2, M3, PT> get() {<NEW_LINE>LazyEither5<ST, M, M2, M3, PT> either = lazy.get();<NEW_LINE>while (either instanceof LazyEither5.Lazy) {<NEW_LINE>either = ((LazyEither5.Lazy<ST, M, M2, M3, PT>) either).lazy.get();<NEW_LINE>}<NEW_LINE>return either;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean complete() {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Trampoline<LazyEither5<ST, M, M2, M3, PT>> bounce() {<NEW_LINE>LazyEither5<ST, M, M2, M3, PT> either = lazy.get();<NEW_LINE>if (either instanceof LazyEither5.Lazy) {<NEW_LINE>return either.toTrampoline();<NEW_LINE>}<NEW_LINE>return Trampoline.done(either);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
> trampoline = lazy.toTrampoline();
1,273,746
public void visit(String name, Object value) {<NEW_LINE>super.visit(name, value);<NEW_LINE>final ValueInstanceType <MASK><NEW_LINE>ValueInstanceType arrVit = aet.getValue();<NEW_LINE>if (arrVit == null) {<NEW_LINE>arrVit = new ValueInstanceType();<NEW_LINE>arrVit.setType(ValueType.ARRAY);<NEW_LINE>aet.setValue(arrVit);<NEW_LINE>}<NEW_LINE>ArrayInstanceType arit = arrVit.getArray();<NEW_LINE>if (arit == null) {<NEW_LINE>arit = new ArrayInstanceType();<NEW_LINE>arrVit.setArray(arit);<NEW_LINE>arit.setLength(0);<NEW_LINE>arit.setType(vit.getType());<NEW_LINE>} else {<NEW_LINE>if (arit.getEntry().size() > 0 && !vit.getType().equals(arit.getType())) {<NEW_LINE>arit.setType(ValueType.UNKNOWN);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final List<ArrayEntryType> aetList = arit.getEntry();<NEW_LINE>final int index = aetList.size();<NEW_LINE>final ArrayEntryType aret = new ArrayEntryType();<NEW_LINE>aret.setIndex(index);<NEW_LINE>aret.setValue(vit);<NEW_LINE>arit.getEntry().add(aret);<NEW_LINE>arit.setLength(arit.getEntry().size());<NEW_LINE>}
vit = AsmObjectValueAnalyzer.processValue(value);
212,103
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListTagsForResourceRequest> request = null;<NEW_LINE>Response<ListTagsForResourceResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));<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, "Kinesis Analytics V2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListTagsForResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><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>}
false), new ListTagsForResourceResultJsonUnmarshaller());
943,435
private void loadTableType(MethodVisitor mv, BTableType bType) {<NEW_LINE>// Create an new table type<NEW_LINE>mv.visitTypeInsn(NEW, TABLE_TYPE_IMPL);<NEW_LINE>mv.visitInsn(DUP);<NEW_LINE>loadType(mv, bType.constraint);<NEW_LINE>if (!bType.fieldNameList.isEmpty()) {<NEW_LINE>// Create the field names array<NEW_LINE>List<String> fieldNames = bType.fieldNameList;<NEW_LINE>mv.visitLdcInsn((<MASK><NEW_LINE>mv.visitInsn(L2I);<NEW_LINE>mv.visitTypeInsn(ANEWARRAY, STRING_VALUE);<NEW_LINE>int i = 0;<NEW_LINE>for (String fieldName : fieldNames) {<NEW_LINE>mv.visitInsn(DUP);<NEW_LINE>mv.visitLdcInsn((long) i);<NEW_LINE>mv.visitInsn(L2I);<NEW_LINE>mv.visitLdcInsn(StringEscapeUtils.unescapeJava(fieldName));<NEW_LINE>mv.visitInsn(AASTORE);<NEW_LINE>i += 1;<NEW_LINE>}<NEW_LINE>loadReadonlyFlag(mv, bType);<NEW_LINE>mv.visitMethodInsn(INVOKESPECIAL, TABLE_TYPE_IMPL, JVM_INIT_METHOD, INIT_TABLE_TYPE_WITH_FIELD_NAME_LIST, false);<NEW_LINE>} else if (bType.keyTypeConstraint != null) {<NEW_LINE>loadType(mv, bType.keyTypeConstraint);<NEW_LINE>loadReadonlyFlag(mv, bType);<NEW_LINE>mv.visitMethodInsn(INVOKESPECIAL, TABLE_TYPE_IMPL, JVM_INIT_METHOD, INIT_TABLE_TYPE_IMPL, false);<NEW_LINE>} else {<NEW_LINE>loadReadonlyFlag(mv, bType);<NEW_LINE>mv.visitMethodInsn(INVOKESPECIAL, TABLE_TYPE_IMPL, JVM_INIT_METHOD, INIT_WITH_BOOLEAN, false);<NEW_LINE>}<NEW_LINE>}
long) fieldNames.size());
192,732
private Object lookup00(Object x, String type, Entry<String, ?> attrContext, Object context) {<NEW_LINE>if (x instanceof String) {<NEW_LINE>String desc = (String) x;<NEW_LINE>final boolean isDependency = isDependency(desc);<NEW_LINE>if (!isDependency) {<NEW_LINE>if (!desc.contains(".") && !type.isEmpty())<NEW_LINE>desc += "." + type;<NEW_LINE>desc = toNativePath(desc);<NEW_LINE>}<NEW_LINE>if (isDependency)<NEW_LINE>x = dependencyToLocalJar(getJarFile(), desc, type.isEmpty() ? "jar" : type, attrContext);<NEW_LINE>else if (isGlob(desc))<NEW_LINE>x = listJar(getJarFile(), desc, false);<NEW_LINE>else<NEW_LINE>x = path(desc);<NEW_LINE>}<NEW_LINE>if (x == null)<NEW_LINE>return null;<NEW_LINE>if (ATTR_NATIVE_DEPENDENCIES.equals(attrContext)) {<NEW_LINE>if (type != null && !"jar".equals(type)) {<NEW_LINE>if (x instanceof Entry)<NEW_LINE>x = ((Entry<?, ?>) x).getValue();<NEW_LINE>x = new Object[] { x, context };<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (asList(ATTR_APP_ARTIFACT, ATTR_SCRIPT, ATTR_NATIVE_DEPENDENCIES).contains(attrContext)) {<NEW_LINE>if (!(x instanceof Entry))<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return x;<NEW_LINE>}
x = mutableEntry(attrContext, x);
161,517
public static Plugin of(RegisteredPlugin registeredPlugin) {<NEW_LINE>Plugin plugin = new Plugin();<NEW_LINE>plugin.manifest = registeredPlugin.getManifest().getMainAttributes().entrySet().stream().map(e -> new AbstractMap.SimpleEntry<>(e.getKey().toString(), e.getValue().toString())).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));<NEW_LINE>plugin.tasks = className(filter(registeredPlugin.getTasks()).toArray<MASK><NEW_LINE>plugin.triggers = className(filter(registeredPlugin.getTriggers()).toArray(Class[]::new));<NEW_LINE>plugin.conditions = className(filter(registeredPlugin.getConditions()).toArray(Class[]::new));<NEW_LINE>plugin.controllers = className(filter(registeredPlugin.getControllers()).toArray(Class[]::new));<NEW_LINE>plugin.storages = className(filter(registeredPlugin.getStorages()).toArray(Class[]::new));<NEW_LINE>return plugin;<NEW_LINE>}
(Class[]::new));
1,203,576
final ListInputSecurityGroupsResult executeListInputSecurityGroups(ListInputSecurityGroupsRequest listInputSecurityGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listInputSecurityGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListInputSecurityGroupsRequest> request = null;<NEW_LINE>Response<ListInputSecurityGroupsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListInputSecurityGroupsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listInputSecurityGroupsRequest));<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, "MediaLive");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListInputSecurityGroups");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListInputSecurityGroupsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListInputSecurityGroupsResultJsonUnmarshaller());<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,248,918
private static void addAvailableThemes(@NonNull final Folder dir, final List<ThemeData> themes, final String prefix, final int level) {<NEW_LINE>for (FileInformation candidate : Objects.requireNonNull(ContentStorage.get().list(dir))) {<NEW_LINE>if (candidate.isDirectory && (AVAILABLE_THEMES_SCAN_MAXDEPTH < 0 || level < AVAILABLE_THEMES_SCAN_MAXDEPTH)) {<NEW_LINE>addAvailableThemes(candidate.dirLocation, themes, prefix + candidate.name + "/", level + 1);<NEW_LINE>} else if (candidate.name.endsWith(".xml")) {<NEW_LINE>final String themeId = prefix + candidate.name;<NEW_LINE>themes.add(new ThemeData(themeId, toUserDisplayableName(candidate, <MASK><NEW_LINE>} else if (candidate.name.endsWith(".zip") && candidate.size <= ZIP_FILE_SIZE_LIMIT) {<NEW_LINE>try (InputStream is = ContentStorage.get().openForRead(candidate.uri)) {<NEW_LINE>for (String zipXmlTheme : ZipXmlThemeResourceProvider.scanXmlThemes(new ZipInputStream(is))) {<NEW_LINE>final String themeId = prefix + candidate.name + ZIP_THEME_SEPARATOR + zipXmlTheme;<NEW_LINE>themes.add(new ThemeData(themeId, toUserDisplayableName(candidate, zipXmlTheme), candidate, dir));<NEW_LINE>}<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>Log.w("Map Theme ZIP '" + candidate + "' could not be read", ioe);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.w("Problem opening map Theme ZIP '" + candidate + "'", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
null), candidate, dir));
89,585
private static boolean postAggregatorDirectColumnIsOk(final RowSignature aggregateRowSignature, final DruidExpression expression, final RexNode rexNode) {<NEW_LINE>if (!expression.isDirectColumnAccess()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// We don't really have a way to cast complex type. So might as well not do anything and return.<NEW_LINE>final ColumnType columnValueType = aggregateRowSignature.getColumnType(expression.getDirectColumn()).orElseThrow(() -> new ISE("Encountered null type for column[%s]", expression.getDirectColumn()));<NEW_LINE>if (columnValueType.is(ValueType.COMPLEX)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// Check if a cast is necessary.<NEW_LINE>final ExpressionType toExprType = ExpressionType.fromColumnTypeStrict(columnValueType);<NEW_LINE>final ExpressionType fromExprType = ExpressionType.fromColumnTypeStrict(Calcites.getColumnTypeForRelDataType<MASK><NEW_LINE>return toExprType.equals(fromExprType);<NEW_LINE>}
(rexNode.getType()));
507,539
private void advance() throws IOException {<NEW_LINE>assert !endOfInput;<NEW_LINE>assert !bbuf.hasRemaining() : "advance() should be called when output byte buffer is empty. bbuf: " + bbuf + ", as string: " + bbuf.asCharBuffer().toString();<NEW_LINE>assert cbuf.remaining() < 2;<NEW_LINE>// given that bbuf.capacity = 3 x cbuf.capacity, the only time that we should have a<NEW_LINE>// remaining char is if the last char read was the 1st half of a surrogate pair<NEW_LINE>if (cbuf.remaining() == 0) {<NEW_LINE>cbuf.clear();<NEW_LINE>} else {<NEW_LINE>cbuf.compact();<NEW_LINE>}<NEW_LINE>// read #1<NEW_LINE>int n = reader.read(cbuf);<NEW_LINE>cbuf.flip();<NEW_LINE>CoderResult result;<NEW_LINE>endOfInput = n == -1;<NEW_LINE>bbuf.clear();<NEW_LINE>result = encoder.encode(cbuf, bbuf, endOfInput);<NEW_LINE>checkEncodeResult(result);<NEW_LINE>if (endOfInput) {<NEW_LINE><MASK><NEW_LINE>checkEncodeResult(result);<NEW_LINE>}<NEW_LINE>bbuf.flip();<NEW_LINE>}
result = encoder.flush(bbuf);
1,368,920
JWT createJwt(String tokenString, OAuth20Provider oauth20provider, OidcServerConfig oidcServerConfig) throws OidcServerException {<NEW_LINE>String aud = null;<NEW_LINE>String issuer = null;<NEW_LINE>JWTPayload <MASK><NEW_LINE>if (payload != null) {<NEW_LINE>aud = JsonTokenUtil.getAud(payload);<NEW_LINE>issuer = JsonTokenUtil.getIss(payload);<NEW_LINE>}<NEW_LINE>// TODO support RS256 by resolving key issue.<NEW_LINE>Object key = ((aud == null) ? null : getSharedKey(oauth20provider, aud));<NEW_LINE>// signatureAlgorithm<NEW_LINE>String signatureAlgorithm = oidcServerConfig.getSignatureAlgorithm();<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "clientId : " + aud + " key : " + ((key == null) ? "null" : "<removed>") + " issuer : " + issuer + " signatureAlgorithm : " + signatureAlgorithm);<NEW_LINE>}<NEW_LINE>return new JWT(tokenString, key, aud, issuer, signatureAlgorithm);<NEW_LINE>}
payload = JsonTokenUtil.getPayload(tokenString);
1,503,047
protected void configure() {<NEW_LINE>final CacheConfig cacheConfig = new ConfigurationObjectFactory(skifeConfigSource).build(CacheConfig.class);<NEW_LINE>bind(CacheConfig.class).toInstance(cacheConfig);<NEW_LINE>final EhCacheConfig ehCacheConfig = new ConfigurationObjectFactory(skifeConfigSource).build(EhCacheConfig.class);<NEW_LINE>bind(EhCacheConfig.class).toInstance(ehCacheConfig);<NEW_LINE>final RedisCacheConfig redisCacheConfig = new ConfigurationObjectFactory(skifeConfigSource).build(RedisCacheConfig.class);<NEW_LINE>bind(RedisCacheConfig.class).toInstance(redisCacheConfig);<NEW_LINE>if (redisCacheConfig.isRedisCachingEnabled()) {<NEW_LINE>bind(RedissonClient.class).annotatedWith(Names.named(REDIS_CACHE_CLIENT)).toProvider(RedissonCacheClientProvider.class).asEagerSingleton();<NEW_LINE>bind(CacheManager.class).toProvider(<MASK><NEW_LINE>} else {<NEW_LINE>bind(RedissonClient.class).annotatedWith(Names.named(REDIS_CACHE_CLIENT)).toProvider(Providers.<RedissonClient>of(null));<NEW_LINE>bind(CacheManager.class).toProvider(Eh107CacheManagerProvider.class).asEagerSingleton();<NEW_LINE>}<NEW_LINE>// Kill Bill generic cache dispatcher<NEW_LINE>bind(CacheControllerDispatcher.class).toProvider(CacheControllerDispatcherProvider.class).asEagerSingleton();<NEW_LINE>final Multibinder<BaseCacheLoader> resultSetMapperSetBinder = Multibinder.newSetBinder(binder(), BaseCacheLoader.class);<NEW_LINE>resultSetMapperSetBinder.addBinding().to(ImmutableAccountCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(AccountBCDCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(RecordIdCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(AccountRecordIdCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(TenantRecordIdCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(ObjectIdCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(TenantCatalogCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(TenantConfigCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(TenantOverdueConfigCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(TenantKVCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(TenantCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(OverriddenPlanCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(TenantStateMachineConfigCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(AccountIdFromBundleIdCacheLoader.class).asEagerSingleton();<NEW_LINE>resultSetMapperSetBinder.addBinding().to(BundleIdFromSubscriptionIdCacheLoader.class).asEagerSingleton();<NEW_LINE>}
Redis107CacheManagerProvider.class).asEagerSingleton();
1,586,405
private JSONObject callInternal(String sessionId, String method, JSONObject params) {<NEW_LINE>long id = nextMessageId.getAndIncrement();<NEW_LINE>JSONObject message = new JSONObject();<NEW_LINE>message.put("id", id);<NEW_LINE>if (sessionId != null) {<NEW_LINE>message.put("sessionId", sessionId);<NEW_LINE>}<NEW_LINE>message.put("method", method);<NEW_LINE>message.put("params", params);<NEW_LINE>CompletableFuture<JSONObject> future = new CompletableFuture<>();<NEW_LINE>responseFutures.put(id, future);<NEW_LINE>devtoolsSocket.send(message.toString());<NEW_LINE>try {<NEW_LINE>return future.get(RPC_TIMEOUT_SECONDS, TimeUnit.SECONDS);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>throw new ChromeException("Call interrupted", e);<NEW_LINE>} catch (TimeoutException e) {<NEW_LINE>throw new <MASK><NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>throw new ChromeException("Call failed: " + message + ": " + e.getMessage(), e.getCause());<NEW_LINE>}<NEW_LINE>}
ChromeException("Call timed out: " + message, e);
603,278
public void initTab(int index) {<NEW_LINE>GridTab <MASK><NEW_LINE>if (initTabs.contains(mTab))<NEW_LINE>return;<NEW_LINE>mTab.initTab(false);<NEW_LINE>// Set Link Column<NEW_LINE>if (mTab.getLinkColumnName().length() == 0) {<NEW_LINE>ArrayList<String> parents = mTab.getParentColumnNames();<NEW_LINE>// No Parent - no link<NEW_LINE>if (parents.size() == 0)<NEW_LINE>;<NEW_LINE>else // Standard case<NEW_LINE>if (parents.size() == 1)<NEW_LINE>mTab.setLinkColumnName((String) parents.get(0));<NEW_LINE>else {<NEW_LINE>// More than one parent.<NEW_LINE>// Search prior tabs for the "right parent"<NEW_LINE>// for all previous tabs<NEW_LINE>for (int i = 0; i < index; i++) {<NEW_LINE>// we have a tab<NEW_LINE>GridTab tab = (GridTab) m_tabs.get(i);<NEW_LINE>// may be ""<NEW_LINE>String tabKey = tab.getKeyColumnName();<NEW_LINE>// look, if one of our parents is the key of that tab<NEW_LINE>for (int j = 0; j < parents.size(); j++) {<NEW_LINE>String parent = (String) parents.get(j);<NEW_LINE>if (parent.equals(tabKey)) {<NEW_LINE>mTab.setLinkColumnName(parent);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// The tab could have more than one key, look into their parents<NEW_LINE>if (tabKey.equals(""))<NEW_LINE>for (int k = 0; k < tab.getParentColumnNames().size(); k++) if (parent.equals(tab.getParentColumnNames().get(k))) {<NEW_LINE>mTab.setLinkColumnName(parent);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// for all parents<NEW_LINE>}<NEW_LINE>// for all previous tabs<NEW_LINE>}<NEW_LINE>// parents.size > 1<NEW_LINE>}<NEW_LINE>// set Link column<NEW_LINE>// overwrites, if AD_Column_ID exists<NEW_LINE>mTab.setLinkColumnName(null);<NEW_LINE>//<NEW_LINE>initTabs.add(mTab);<NEW_LINE>}
mTab = m_tabs.get(index);
20,681
public void marshall(CreateSMBFileShareRequest createSMBFileShareRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createSMBFileShareRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getClientToken(), CLIENTTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getGatewayARN(), GATEWAYARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getKMSEncrypted(), KMSENCRYPTED_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getKMSKey(), KMSKEY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getRole(), ROLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getLocationARN(), LOCATIONARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getDefaultStorageClass(), DEFAULTSTORAGECLASS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getObjectACL(), OBJECTACL_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getReadOnly(), READONLY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getGuessMIMETypeEnabled(), GUESSMIMETYPEENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getRequesterPays(), REQUESTERPAYS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getSMBACLEnabled(), SMBACLENABLED_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getAccessBasedEnumeration(), ACCESSBASEDENUMERATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getAdminUserList(), ADMINUSERLIST_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getValidUserList(), VALIDUSERLIST_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getInvalidUserList(), INVALIDUSERLIST_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getAuditDestinationARN(), AUDITDESTINATIONARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getCaseSensitivity(), CASESENSITIVITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getTags(), TAGS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getFileShareName(), FILESHARENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getCacheAttributes(), CACHEATTRIBUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getNotificationPolicy(), NOTIFICATIONPOLICY_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getVPCEndpointDNSName(), VPCENDPOINTDNSNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getBucketRegion(), BUCKETREGION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createSMBFileShareRequest.getOplocksEnabled(), OPLOCKSENABLED_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
createSMBFileShareRequest.getAuthentication(), AUTHENTICATION_BINDING);
1,305,748
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>runAsLabel = new javax.swing.JLabel();<NEW_LINE>runAsCB = <MASK><NEW_LINE>setOpaque(false);<NEW_LINE>runAsLabel.setLabelFor(runAsCB);<NEW_LINE>// NOI18N<NEW_LINE>java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/netbeans/modules/j2ee/ddloaders/web/multiview/Bundle");<NEW_LINE>// NOI18N<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(runAsLabel, bundle.getString("LBL_RunAs"));<NEW_LINE>javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);<NEW_LINE>this.setLayout(layout);<NEW_LINE>layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(runAsLabel).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(runAsCB, 0, 358, Short.MAX_VALUE)));<NEW_LINE>layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(runAsLabel).addComponent(runAsCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));<NEW_LINE>}
new javax.swing.JComboBox();
654,413
public int putIfAbsent(float key, int value) {<NEW_LINE>if (key == 0.0f) {<NEW_LINE>for (int i = 0, max = this.elementSize; i < max; i++) {<NEW_LINE>if (this.keyTable[i] == 0.0f) {<NEW_LINE>int value1 = Float.floatToIntBits(key);<NEW_LINE>int value2 = Float.floatToIntBits(this.keyTable[i]);<NEW_LINE>if (value1 == -2147483648 && value2 == -2147483648)<NEW_LINE>return this.valueTable[i];<NEW_LINE>if (value1 == 0 && value2 == 0)<NEW_LINE>return this.valueTable[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0, max = this.elementSize; i < max; i++) {<NEW_LINE>if (this.keyTable[i] == key) {<NEW_LINE>return this.valueTable[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (this.elementSize == this.keyTable.length) {<NEW_LINE>// resize<NEW_LINE>System.arraycopy(this.keyTable, 0, (this.keyTable = new float[this.elementSize * 2]), 0, this.elementSize);<NEW_LINE>System.arraycopy(this.valueTable, 0, (this.valueTable = new int[this.elementSize * 2]), 0, this.elementSize);<NEW_LINE>}<NEW_LINE>this.<MASK><NEW_LINE>this.valueTable[this.elementSize] = value;<NEW_LINE>this.elementSize++;<NEW_LINE>// negative when added, assumes value is > 0<NEW_LINE>return -value;<NEW_LINE>}
keyTable[this.elementSize] = key;
1,023,104
protected void run() {<NEW_LINE>try {<NEW_LINE>runInterceptHook();<NEW_LINE>protocolModel.getP2PService().findPeersCapabilities(trade.getTradingPeerNodeAddress()).filter(capabilities -> capabilities.containsAll(Capability.TRADE_STATISTICS_3)).ifPresentOrElse(capabilities -> {<NEW_LINE>TradeStatistics3 <MASK><NEW_LINE>if (tradeStatistics.isValid()) {<NEW_LINE>log.info("Publishing trade statistics");<NEW_LINE>protocolModel.getP2PService().addPersistableNetworkPayload(tradeStatistics, true);<NEW_LINE>} else {<NEW_LINE>log.warn("Trade statistics are invalid. We do not publish. {}", tradeStatistics);<NEW_LINE>}<NEW_LINE>complete();<NEW_LINE>}, () -> {<NEW_LINE>log.info("Our peer does not has updated yet, so they will publish the trade statistics. " + "To avoid duplicates we do not publish from our side.");<NEW_LINE>complete();<NEW_LINE>});<NEW_LINE>} catch (Throwable t) {<NEW_LINE>failed(t);<NEW_LINE>}<NEW_LINE>}
tradeStatistics = TradeStatistics3.from(trade);
909,790
protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {<NEW_LINE>List<String> messages = new ArrayList<>();<NEW_LINE>ExcavationManager excavationManager = UserManager.getPlayer(player).getExcavationManager();<NEW_LINE>if (canGigaDrill) {<NEW_LINE>messages.add(getStatMessage(SubSkillType.EXCAVATION_GIGA_DRILL_BREAKER, gigaDrillBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", gigaDrillBreakerLengthEndurance) : ""));<NEW_LINE>// messages.add(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.ActivationTime.Bonus", gigaDrillBreakerLengthEndurance) : ""));<NEW_LINE>}<NEW_LINE>if (canUseSubskill(player, SubSkillType.EXCAVATION_ARCHAEOLOGY)) {<NEW_LINE>messages.add(getStatMessage(false, false, SubSkillType.EXCAVATION_ARCHAEOLOGY, percent.format(excavationManager.<MASK><NEW_LINE>messages.add(getStatMessage(true, false, SubSkillType.EXCAVATION_ARCHAEOLOGY, String.valueOf(excavationManager.getExperienceOrbsReward())));<NEW_LINE>}<NEW_LINE>return messages;<NEW_LINE>}
getArchaelogyExperienceOrbChance() / 100.0D)));
1,547,874
private I_PP_Cost_Collector processReceiptCandidate(final I_PP_Order_Qty candidate) {<NEW_LINE>// NOTE: we assume the candidate was not processed yet<NEW_LINE>//<NEW_LINE>// Validate the HU<NEW_LINE>final I_M_HU hu = candidate.getM_HU();<NEW_LINE>Check.assumeNotNull(hu, "Parameter hu is not null");<NEW_LINE>if (!X_M_HU.HUSTATUS_Planning.equals(hu.getHUStatus())) {<NEW_LINE>throw new HUException("Only planning HUs can be received").setParameter("HU", hu).setParameter("HUStatus", hu.getHUStatus()<MASK><NEW_LINE>}<NEW_LINE>final LocatorId locatorId = warehousesRepo.getLocatorIdByRepoIdOrNull(candidate.getM_Locator_ID());<NEW_LINE>//<NEW_LINE>// Create material receipt and activate the HU<NEW_LINE>final I_C_UOM uom = IHUPPOrderQtyBL.extractUOM(candidate);<NEW_LINE>final ReceiptCostCollectorCandidate costCollectorCandidate = ReceiptCostCollectorCandidate.builder().order(candidate.getPP_Order()).orderBOMLine(candidate.getPP_Order_BOMLine()).movementDate(TimeUtil.asZonedDateTime(candidate.getMovementDate())).qtyToReceive(Quantity.of(candidate.getQty(), uom)).productId(ProductId.ofRepoId(candidate.getM_Product_ID())).locatorId(locatorId).pickingCandidateId(candidate.getM_Picking_Candidate_ID()).build();<NEW_LINE>final I_PP_Cost_Collector cc = huPPCostCollectorBL.createReceipt(costCollectorCandidate, hu);<NEW_LINE>markProcessedAndSave(candidate, cc);<NEW_LINE>return cc;<NEW_LINE>}
).setParameter("candidate", candidate);
1,392,393
public static ActivationFunction parseActivationFunction(String value) {<NEW_LINE>ActivationFunction af = null;<NEW_LINE>final String[] cols = value.split("\\|");<NEW_LINE>final String afName = "org.encog.engine.network.activation." + cols[0];<NEW_LINE>try {<NEW_LINE>final Class<?> clazz = Class.forName(afName);<NEW_LINE>af = (ActivationFunction) clazz.newInstance();<NEW_LINE>} catch (final ClassNotFoundException e) {<NEW_LINE>throw new PersistError(e);<NEW_LINE>} catch (final InstantiationException e) {<NEW_LINE>throw new PersistError(e);<NEW_LINE>} catch (final IllegalAccessException e) {<NEW_LINE>throw new PersistError(e);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < af.getParamNames().length; i++) {<NEW_LINE>af.setParam(i, CSVFormat.EG_FORMAT.parse(<MASK><NEW_LINE>}<NEW_LINE>return af;<NEW_LINE>}
cols[i + 1]));
52,179
public void start() {<NEW_LINE>UlimitCheck.printUlimits();<NEW_LINE>videobridgeExpireThread.start();<NEW_LINE>// <conference><NEW_LINE>ProviderManager.addIQProvider(ColibriConferenceIQ.ELEMENT, ColibriConferenceIQ.NAMESPACE, new ColibriConferenceIqProvider());<NEW_LINE>// <force-shutdown><NEW_LINE>ForcefulShutdownIqProvider.registerIQProvider();<NEW_LINE>// <graceful-shutdown><NEW_LINE>GracefulShutdownIqProvider.registerIQProvider();<NEW_LINE>// <stats><NEW_LINE>// registers itself with Smack<NEW_LINE>new ColibriStatsIqProvider();<NEW_LINE>// ICE-UDP <transport><NEW_LINE>ProviderManager.addExtensionProvider(IceUdpTransportPacketExtension.ELEMENT, IceUdpTransportPacketExtension.NAMESPACE, new DefaultPacketExtensionProvider<>(IceUdpTransportPacketExtension.class));<NEW_LINE>// RAW-UDP <candidate xmlns=urn:xmpp:jingle:transports:raw-udp:1><NEW_LINE>DefaultPacketExtensionProvider<UdpCandidatePacketExtension> udpCandidatePacketExtensionProvider = new DefaultPacketExtensionProvider<>(UdpCandidatePacketExtension.class);<NEW_LINE>ProviderManager.addExtensionProvider(UdpCandidatePacketExtension.ELEMENT, UdpCandidatePacketExtension.NAMESPACE, udpCandidatePacketExtensionProvider);<NEW_LINE>// ICE-UDP <candidate xmlns=urn:xmpp:jingle:transports:ice-udp:1"><NEW_LINE>DefaultPacketExtensionProvider<IceCandidatePacketExtension> iceCandidatePacketExtensionProvider = new DefaultPacketExtensionProvider<>(IceCandidatePacketExtension.class);<NEW_LINE>ProviderManager.addExtensionProvider(IceCandidatePacketExtension.<MASK><NEW_LINE>// ICE <rtcp-mux/><NEW_LINE>ProviderManager.addExtensionProvider(IceRtcpmuxPacketExtension.ELEMENT, IceRtcpmuxPacketExtension.NAMESPACE, new DefaultPacketExtensionProvider<>(IceRtcpmuxPacketExtension.class));<NEW_LINE>// DTLS-SRTP <fingerprint><NEW_LINE>ProviderManager.addExtensionProvider(DtlsFingerprintPacketExtension.ELEMENT, DtlsFingerprintPacketExtension.NAMESPACE, new DefaultPacketExtensionProvider<>(DtlsFingerprintPacketExtension.class));<NEW_LINE>// Health-check<NEW_LINE>HealthCheckIQProvider.registerIQProvider();<NEW_LINE>// Colibri2<NEW_LINE>IqProviderUtils.registerProviders();<NEW_LINE>}
ELEMENT, IceCandidatePacketExtension.NAMESPACE, iceCandidatePacketExtensionProvider);
575,897
public final FileSizeLiteralContext fileSizeLiteral() throws RecognitionException {<NEW_LINE>FileSizeLiteralContext _localctx = new FileSizeLiteralContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 530, RULE_fileSizeLiteral);<NEW_LINE>try {<NEW_LINE>setState(5476);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>switch(_input.LA(1)) {<NEW_LINE>case FILESIZE_LITERAL:<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(5474);<NEW_LINE>match(FILESIZE_LITERAL);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ZERO_DECIMAL:<NEW_LINE>case ONE_DECIMAL:<NEW_LINE>case TWO_DECIMAL:<NEW_LINE>case DECIMAL_LITERAL:<NEW_LINE>enterOuterAlt(_localctx, 2);<NEW_LINE>{<NEW_LINE>setState(5475);<NEW_LINE>decimalLiteral();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new NoViableAltException(this);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE><MASK><NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
_errHandler.reportError(this, re);
1,465,006
public static HistoricVariableInstanceDto fromHistoricVariableInstance(HistoricVariableInstance historicVariableInstance) {<NEW_LINE>HistoricVariableInstanceDto dto = new HistoricVariableInstanceDto();<NEW_LINE>dto.id = historicVariableInstance.getId();<NEW_LINE>dto.name = historicVariableInstance.getName();<NEW_LINE>dto.processDefinitionKey = historicVariableInstance.getProcessDefinitionKey();<NEW_LINE>dto.processDefinitionId = historicVariableInstance.getProcessDefinitionId();<NEW_LINE>dto.processInstanceId = historicVariableInstance.getProcessInstanceId();<NEW_LINE>dto.executionId = historicVariableInstance.getExecutionId();<NEW_LINE>dto.activityInstanceId = historicVariableInstance.getActivityInstanceId();<NEW_LINE>dto.caseDefinitionKey = historicVariableInstance.getCaseDefinitionKey();<NEW_LINE>dto.caseDefinitionId = historicVariableInstance.getCaseDefinitionId();<NEW_LINE>dto.caseInstanceId = historicVariableInstance.getCaseInstanceId();<NEW_LINE>dto.caseExecutionId = historicVariableInstance.getCaseExecutionId();<NEW_LINE>dto.taskId = historicVariableInstance.getTaskId();<NEW_LINE>dto<MASK><NEW_LINE>dto.state = historicVariableInstance.getState();<NEW_LINE>dto.createTime = historicVariableInstance.getCreateTime();<NEW_LINE>dto.removalTime = historicVariableInstance.getRemovalTime();<NEW_LINE>dto.rootProcessInstanceId = historicVariableInstance.getRootProcessInstanceId();<NEW_LINE>if (historicVariableInstance.getErrorMessage() == null) {<NEW_LINE>VariableValueDto.fromTypedValue(dto, historicVariableInstance.getTypedValue());<NEW_LINE>} else {<NEW_LINE>dto.errorMessage = historicVariableInstance.getErrorMessage();<NEW_LINE>dto.type = VariableValueDto.toRestApiTypeName(historicVariableInstance.getTypeName());<NEW_LINE>}<NEW_LINE>return dto;<NEW_LINE>}
.tenantId = historicVariableInstance.getTenantId();
814,098
public Object read80BitFloat(long bitOffset) {<NEW_LINE>if (!canRead(bitOffset, LLVMDebugTypeConstants.LLVM80BIT_SIZE_ACTUAL)) {<NEW_LINE>return unavailable(bitOffset, LLVMDebugTypeConstants.LLVM80BIT_SIZE_ACTUAL);<NEW_LINE>}<NEW_LINE>if (isByteAligned(bitOffset)) {<NEW_LINE>final Object value = loadValue(PrimitiveType.X86_FP80, (int) (bitOffset / Byte.SIZE));<NEW_LINE>if (value instanceof LLVM80BitFloat) {<NEW_LINE>return value;<NEW_LINE>} else {<NEW_LINE>return unavailable(bitOffset, LLVMDebugTypeConstants.LLVM80BIT_SIZE_ACTUAL);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Object asBits = readBigInteger(<MASK><NEW_LINE>if (asBits instanceof BigInteger) {<NEW_LINE>final BigInteger bits = (BigInteger) asBits;<NEW_LINE>return LLVM80BitFloat.fromBytesBigEndian(bits.toByteArray());<NEW_LINE>}<NEW_LINE>return unavailable(bitOffset, LLVMDebugTypeConstants.LLVM80BIT_SIZE_ACTUAL);<NEW_LINE>}
bitOffset, LLVMDebugTypeConstants.LLVM80BIT_SIZE_ACTUAL, false);
1,824,591
protected Map<Class<? extends Throwable>, ResponseStatus> generateExceptionMapping(Set<Class<?>> classes) {<NEW_LINE>Map<Class<? extends Throwable>, ResponseStatus> result = new HashMap<Class<? extends Throwable>, ResponseStatus>();<NEW_LINE>log.debug(String.format("Looking for classes with @ControllerAdvice annotation"));<NEW_LINE>for (Class clazz : classes) {<NEW_LINE>ControllerAdvice advice = findAnnotation(clazz, ControllerAdvice.class);<NEW_LINE>if (advice == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>log.debug(String.format("%s is annotated as @ControllerAdvice", clazz.getName()));<NEW_LINE>for (Method method : clazz.getMethods()) {<NEW_LINE>ExceptionHandler handler = findAnnotation(method, ExceptionHandler.class);<NEW_LINE>if (handler == null) {<NEW_LINE>log.debug(String.format("@ExceptionHandler is missing on %s method, skipping", method));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ResponseStatus responseStatus = findAnnotation(method, ResponseStatus.class);<NEW_LINE>if (responseStatus == null) {<NEW_LINE>log.debug(String.format("@ResponseStatus is missing on %s method, skipping", method));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Class[<MASK><NEW_LINE>for (Class exceptionClass : exceptionClasses) {<NEW_LINE>log.debug(String.format("%s will be mapped to %s", exceptionClass, responseStatus));<NEW_LINE>result.put(exceptionClass, responseStatus);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
] exceptionClasses = handler.value();
489,640
public static String createReadableCombinedString(String[] strings, boolean quote, String separator, String lastSeparator) {<NEW_LINE>if (strings == null || strings.length == 0) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>if (separator == null) {<NEW_LINE>separator = ", ";<NEW_LINE>} else {<NEW_LINE>separator += " ";<NEW_LINE>}<NEW_LINE>if (isBlank(lastSeparator)) {<NEW_LINE>lastSeparator = " and ";<NEW_LINE>} else {<NEW_LINE>if (!lastSeparator.substring(0, 1).equals(" ")) {<NEW_LINE>lastSeparator = " " + lastSeparator;<NEW_LINE>}<NEW_LINE>if (!lastSeparator.substring(lastSeparator.length() - 1).equals(" ")) {<NEW_LINE>lastSeparator += " ";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (int i = 0; i < strings.length; i++) {<NEW_LINE>if (i > 0) {<NEW_LINE>if (i == strings.length - 1) {<NEW_LINE>sb.append(lastSeparator);<NEW_LINE>} else {<NEW_LINE>sb.append(separator);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (quote) {<NEW_LINE>sb.append("\"").append(strings[<MASK><NEW_LINE>} else {<NEW_LINE>sb.append(strings[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
i]).append("\"");
545,089
public void broadcastMessageToChannel(String channel, Component message) {<NEW_LINE>ChattyApi api = getApi();<NEW_LINE>if (api == null)<NEW_LINE>return;<NEW_LINE>Optional<Chat> optChat = api.getChat(channel);<NEW_LINE>if (!optChat.isPresent()) {<NEW_LINE>DiscordSRV.debug(Debug.DISCORD_TO_MINECRAFT, "Attempted to broadcast message to channel \"" + channel + "\" but the channel doesn't exist (returned null); aborting message send");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Chat chat = optChat.get();<NEW_LINE>String legacy = MessageUtil.toLegacy(message);<NEW_LINE>String plainMessage = LangUtil.Message.CHAT_CHANNEL_MESSAGE.toString().replace("%channelcolor%", "").replace("%channelname%", chat.getName()).replace("%channelnickname%", chat.getName()).replace("%message%", legacy);<NEW_LINE>Collection<? extends Player> <MASK><NEW_LINE>DiscordSRV.debug(Debug.DISCORD_TO_MINECRAFT, "Sending a message to Chatty chat (" + chat.getName() + "), recipients: " + recipients);<NEW_LINE>String translatedMessage = MessageUtil.translateLegacy(plainMessage);<NEW_LINE>chat.sendMessage(translatedMessage);<NEW_LINE>PlayerUtil.notifyPlayersOfMentions(recipients::contains, legacy);<NEW_LINE>}
recipients = chat.getRecipients(null);
1,674,012
public static void generateFileChanges(DataModel model) {<NEW_LINE>CreatedModifiedFiles fileChanges = new CreatedModifiedFiles(model.getProject());<NEW_LINE>NbModuleProvider moduleInfo = model.getModuleInfo();<NEW_LINE>final String category = model.getCategory();<NEW_LINE>final String name = model.getName();<NEW_LINE>final <MASK><NEW_LINE>HashMap<String, String> replaceTokens = new HashMap<String, String>();<NEW_LINE>// NOI18N<NEW_LINE>replaceTokens.put("DISPLAYNAME", category);<NEW_LINE>// NOI18N<NEW_LINE>replaceTokens.put("TEMPLATENAME", name);<NEW_LINE>// NOI18N<NEW_LINE>replaceTokens.put("PACKAGENAME", packageName);<NEW_LINE>// Update project dependencies<NEW_LINE>for (int i = 0; i < MODULES.length; i++) {<NEW_LINE>fileChanges.add(fileChanges.addModuleDependency(MODULES[i]));<NEW_LINE>}<NEW_LINE>// // Generate Support class:<NEW_LINE>// String iteratorName = getRelativePath(moduleInfo.getSourceDirectoryPath(), packageName,<NEW_LINE>// name, "ViewSupport.java"); //NOI18N<NEW_LINE>//<NEW_LINE>// FileObject template = CreatedModifiedFiles.getTemplate("templateViewSupport.java");//NOI18N<NEW_LINE>//<NEW_LINE>// fileChanges.add(fileChanges.createFileWithSubstitutions(iteratorName, template, replaceTokens));<NEW_LINE>//<NEW_LINE>// Generate view provider class:<NEW_LINE>String iteratorName = // NOI18N<NEW_LINE>getRelativePath(// NOI18N<NEW_LINE>moduleInfo.getSourceDirectoryPath(), // NOI18N<NEW_LINE>packageName, // NOI18N<NEW_LINE>name, "ViewProvider.java");<NEW_LINE>// NOI18N<NEW_LINE>FileObject template = CreatedModifiedFiles.getTemplate("templateViewProvider.java");<NEW_LINE>fileChanges.add(fileChanges.createFileWithSubstitutions(iteratorName, template, replaceTokens));<NEW_LINE>// Generate view class:<NEW_LINE>iteratorName = // NOI18N<NEW_LINE>getRelativePath(// NOI18N<NEW_LINE>moduleInfo.getSourceDirectoryPath(), // NOI18N<NEW_LINE>packageName, // NOI18N<NEW_LINE>name, "View.java");<NEW_LINE>// NOI18N<NEW_LINE>template = CreatedModifiedFiles.getTemplate("templateView.java");<NEW_LINE>fileChanges.add(fileChanges.createFileWithSubstitutions(iteratorName, template, replaceTokens));<NEW_LINE>model.setCreatedModifiedFiles(fileChanges);<NEW_LINE>}
String packageName = model.getPackageName();
308,494
protected void saveFile(boolean sendToPrinter) {<NEW_LINE>if (controls.patterns.size == 0)<NEW_LINE>return;<NEW_LINE>CreateFiducialSquareBinary c = new CreateFiducialSquareBinary();<NEW_LINE>c.sendToPrinter = sendToPrinter;<NEW_LINE>c.unit = controls.documentUnits;<NEW_LINE>c.paperSize = controls.paperSize;<NEW_LINE>if (controls.format.equalsIgnoreCase("pdf")) {<NEW_LINE>c.markerWidth = (float) controls.markerWidthUnits;<NEW_LINE>} else {<NEW_LINE>c.markerWidth = controls.markerWidthPixels;<NEW_LINE>}<NEW_LINE>c.<MASK><NEW_LINE>c.spaceBetween = c.markerWidth / 4;<NEW_LINE>c.gridWidth = controls.gridWidth;<NEW_LINE>c.gridFill = controls.fillGrid;<NEW_LINE>c.drawGrid = controls.drawGrid;<NEW_LINE>c.hideInfo = controls.hideInfo;<NEW_LINE>c.numbers = new Long[controls.patterns.size];<NEW_LINE>for (int i = 0; i < controls.patterns.size; i++) {<NEW_LINE>c.numbers[i] = controls.patterns.get(i);<NEW_LINE>}<NEW_LINE>saveFile(sendToPrinter, c);<NEW_LINE>}
blackBorderFractionalWidth = (float) controls.borderFraction;
373,066
public Mono<List<ActionCollection>> archiveActionCollectionByApplicationId(String applicationId, AclPermission permission) {<NEW_LINE>return repository.findByApplicationId(applicationId, permission, null).flatMap(actionCollection -> {<NEW_LINE>Set<String> actionIds = new HashSet<>();<NEW_LINE>actionIds.addAll(actionCollection.getUnpublishedCollection().getDefaultToBranchedActionIdsMap().values());<NEW_LINE>if (actionCollection.getPublishedCollection() != null && !CollectionUtils.isEmpty(actionCollection.getPublishedCollection().getDefaultToBranchedActionIdsMap())) {<NEW_LINE>actionIds.addAll(actionCollection.getPublishedCollection().getDefaultToBranchedActionIdsMap().values());<NEW_LINE>}<NEW_LINE>return Flux.fromIterable(actionIds).flatMap(newActionService::archiveById).onErrorResume(throwable -> {<NEW_LINE>log.error(throwable.getMessage());<NEW_LINE>return Mono.empty();<NEW_LINE>}).then<MASK><NEW_LINE>}).collectList();<NEW_LINE>}
(repository.archive(actionCollection));
817,847
public AccessGroupDefinition composeGroupDefinitionFromDb(UUID groupId) {<NEW_LINE>return persistence.callInTransaction(em -> {<NEW_LINE>AccessGroupDefinitionBuilder groupDefinitionBuilder = AccessGroupDefinitionBuilder.create();<NEW_LINE>Group group = em.find(Group.class, groupId);<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>List<Constraint> constraints = new ArrayList<>(group.getConstraints());<NEW_LINE>List<Constraint> parentConstraints = em.createQuery("select c from sec$GroupHierarchy h join h.parent.constraints c " + "where h.group.id = ?1", Constraint.class).setParameter(1, groupId).getResultList();<NEW_LINE>constraints.addAll(parentConstraints);<NEW_LINE>for (Constraint constraint : constraints) {<NEW_LINE>processConstraints(constraint, groupDefinitionBuilder);<NEW_LINE>}<NEW_LINE>List<SessionAttribute> attributes = new ArrayList<>(group.getSessionAttributes());<NEW_LINE>List<SessionAttribute> parentAttributes = em.createQuery("select a from sec$GroupHierarchy h join h.parent.sessionAttributes a " + "where h.group.id = ?1 order by h.level desc", SessionAttribute.class).setParameter(1, groupId).getResultList();<NEW_LINE>attributes.addAll(parentAttributes);<NEW_LINE>Set<String> <MASK><NEW_LINE>for (SessionAttribute attribute : attributes) {<NEW_LINE>Datatype datatype = datatypes.get(attribute.getDatatype());<NEW_LINE>try {<NEW_LINE>if (attributeKeys.contains(attribute.getName())) {<NEW_LINE>log.warn("Duplicate definition of '{}' session attribute in the group hierarchy", attribute.getName());<NEW_LINE>}<NEW_LINE>groupDefinitionBuilder.withSessionAttribute(attribute.getName(), (Serializable) datatype.parse(attribute.getStringValue()));<NEW_LINE>attributeKeys.add(attribute.getName());<NEW_LINE>} catch (ParseException e) {<NEW_LINE>throw new RuntimeException(String.format("Unable to load session attribute %s", attribute.getName()), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return groupDefinitionBuilder.build();<NEW_LINE>});<NEW_LINE>}
attributeKeys = new HashSet<>();
1,683,571
public void marshall(GetComplianceSummaryRequest getComplianceSummaryRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (getComplianceSummaryRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(getComplianceSummaryRequest.getTargetIdFilters(), TARGETIDFILTERS_BINDING);<NEW_LINE>protocolMarshaller.marshall(getComplianceSummaryRequest.getRegionFilters(), REGIONFILTERS_BINDING);<NEW_LINE>protocolMarshaller.marshall(getComplianceSummaryRequest.getResourceTypeFilters(), RESOURCETYPEFILTERS_BINDING);<NEW_LINE>protocolMarshaller.marshall(getComplianceSummaryRequest.getTagKeyFilters(), TAGKEYFILTERS_BINDING);<NEW_LINE>protocolMarshaller.marshall(getComplianceSummaryRequest.getGroupBy(), GROUPBY_BINDING);<NEW_LINE>protocolMarshaller.marshall(getComplianceSummaryRequest.getMaxResults(), MAXRESULTS_BINDING);<NEW_LINE>protocolMarshaller.marshall(getComplianceSummaryRequest.getPaginationToken(), PAGINATIONTOKEN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
376,842
void moveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor) throws AddressOverflowException, CancelledException {<NEW_LINE>lock.acquire();<NEW_LINE>try {<NEW_LINE>Address rangeEnd = fromAddr.addNoWrap(length - 1);<NEW_LINE>AddressSet addrSet = new AddressSet(fromAddr, rangeEnd);<NEW_LINE>ArrayList<FragmentHolder> list = new ArrayList<>();<NEW_LINE>AddressRangeIterator rangeIter = fragMap.getAddressRanges(fromAddr, rangeEnd);<NEW_LINE>while (rangeIter.hasNext() && !addrSet.isEmpty()) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>AddressRange range = rangeIter.next();<NEW_LINE>Field field = fragMap.getValue(range.getMinAddress());<NEW_LINE>try {<NEW_LINE>FragmentDB frag = getFragmentDB(field.getLongValue());<NEW_LINE>AddressSet intersection = addrSet.intersect(frag);<NEW_LINE>AddressRangeIterator fragRangeIter = intersection.getAddressRanges();<NEW_LINE>while (fragRangeIter.hasNext() && !monitor.isCancelled()) {<NEW_LINE>AddressRange fragRange = fragRangeIter.next();<NEW_LINE>Address startAddr = fragRange.getMinAddress();<NEW_LINE>Address endAddr = fragRange.getMaxAddress();<NEW_LINE>long offset = startAddr.subtract(fromAddr);<NEW_LINE>startAddr = toAddr.add(offset);<NEW_LINE>offset = endAddr.subtract(fromAddr);<NEW_LINE>endAddr = toAddr.add(offset);<NEW_LINE>AddressRange newRange <MASK><NEW_LINE>frag.removeRange(fragRange);<NEW_LINE>list.add(new FragmentHolder(frag, newRange));<NEW_LINE>}<NEW_LINE>addrSet = addrSet.subtract(intersection);<NEW_LINE>} catch (IOException e) {<NEW_LINE>errHandler.dbError(e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>monitor.checkCanceled();<NEW_LINE>fragMap.clearRange(fromAddr, rangeEnd);<NEW_LINE>for (int i = 0; i < list.size(); i++) {<NEW_LINE>monitor.checkCanceled();<NEW_LINE>FragmentHolder fh = list.get(i);<NEW_LINE>fragMap.paintRange(fh.range.getMinAddress(), fh.range.getMaxAddress(), new LongField(fh.frag.getKey()));<NEW_LINE>fh.frag.addRange(fh.range);<NEW_LINE>}<NEW_LINE>treeMgr.updateTreeRecord(record);<NEW_LINE>// generate an event...<NEW_LINE>getProgram().programTreeChanged(treeID, ChangeManager.DOCR_FRAGMENT_MOVED, null, new AddressRangeImpl(fromAddr, rangeEnd), new AddressRangeImpl(toAddr, toAddr.addNoWrap(length - 1)));<NEW_LINE>} finally {<NEW_LINE>lock.release();<NEW_LINE>}<NEW_LINE>}
= new AddressRangeImpl(startAddr, endAddr);
150,938
private String _buildPramatiXMLWebModule(String path) throws DocumentException, IOException {<NEW_LINE>String contextRoot = path.substring(2, path.length() - 4);<NEW_LINE>String filePath = path + "/docroot/WEB-INF/web.xml";<NEW_LINE>if (path.endsWith("-complete")) {<NEW_LINE>contextRoot = "/";<NEW_LINE>filePath = path.substring(0, path.<MASK><NEW_LINE>}<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>sb.append("\t<web-module>\n");<NEW_LINE>sb.append("\t\t<name>").append(contextRoot).append("</name>\n");<NEW_LINE>sb.append("\t\t<module-name>").append(path.substring(3, path.length())).append(".war</module-name>\n");<NEW_LINE>SAXReader reader = new SAXReader();<NEW_LINE>reader.setEntityResolver(new EntityResolver());<NEW_LINE>Document doc = reader.read(new File(filePath));<NEW_LINE>Iterator itr = doc.getRootElement().elements("ejb-local-ref").iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>Element ejbLocalRef = (Element) itr.next();<NEW_LINE>sb.append("\t\t<ejb-local-ref>\n");<NEW_LINE>sb.append("\t\t\t<ejb-ref-name>").append(ejbLocalRef.elementText("ejb-ref-name")).append("</ejb-ref-name>\n");<NEW_LINE>sb.append("\t\t\t<ejb-link>").append(ejbLocalRef.elementText("ejb-link")).append("</ejb-link>\n");<NEW_LINE>sb.append("\t\t</ejb-local-ref>\n");<NEW_LINE>}<NEW_LINE>itr = doc.getRootElement().elements("resource-ref").iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>Element resourceRef = (Element) itr.next();<NEW_LINE>sb.append("\t\t<resource-mapping>\n");<NEW_LINE>sb.append("\t\t\t<resource-name>").append(resourceRef.elementText("res-ref-name")).append("</resource-name>\n");<NEW_LINE>sb.append("\t\t\t<resource-type>").append(resourceRef.elementText("res-type")).append("</resource-type>\n");<NEW_LINE>sb.append("\t\t\t<resource-link>").append(resourceRef.elementText("res-ref-name")).append("</resource-link>\n");<NEW_LINE>sb.append("\t\t</resource-mapping>\n");<NEW_LINE>}<NEW_LINE>sb.append("\t</web-module>\n");<NEW_LINE>return sb.toString();<NEW_LINE>}
length() - 9) + "/docroot/WEB-INF/web.xml";
1,321,140
private void addMappingForContentTypeIfNeeded(final ContentType contentType, final Set<String> mappedFields, final String... indexes) {<NEW_LINE>final Map<String, JSONObject> contentTypeMapping = new HashMap();<NEW_LINE>try {<NEW_LINE>contentType.fields().forEach(field -> {<NEW_LINE>try {<NEW_LINE>addMappingForFieldIfNeeded(contentType, field, mappedFields, contentTypeMapping);<NEW_LINE>} catch (JSONException e) {<NEW_LINE>throw new DotRuntimeException(e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>putContentTypeMapping(contentType, contentTypeMapping, indexes);<NEW_LINE>} catch (Exception e) {<NEW_LINE>handleInvalidCustomMappingError("notification.reindexing.content.type.mapping.error", <MASK><NEW_LINE>final String message = "Error updating index mapping for content type " + contentType.name() + ". This custom mapping will be ignored for index(es) " + Arrays.stream(indexes).collect(Collectors.joining(","));<NEW_LINE>Logger.warn(ESMappingUtilHelper.class, message, e);<NEW_LINE>}<NEW_LINE>}
contentType.name(), indexes);
119,599
private void _onActivityResultLocationPage(Bundle bundle) {<NEW_LINE>String callbackId = bundle.getString("callbackId");<NEW_LINE>CallbackContext callbackContext = new CallbackContext(callbackId, this.webView);<NEW_LINE>LocationManager locationManager = (LocationManager) this.activity.getSystemService(Context.LOCATION_SERVICE);<NEW_LINE>List<String> providers = locationManager.getAllProviders();<NEW_LINE>int availableProviders = 0;<NEW_LINE>// if (mPluginLayout != null && mPluginLayout.isDebug) {<NEW_LINE><MASK><NEW_LINE>// }<NEW_LINE>Iterator<String> iterator = providers.iterator();<NEW_LINE>String provider;<NEW_LINE>boolean isAvailable;<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>provider = iterator.next();<NEW_LINE>if ("passive".equals(provider)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>isAvailable = locationManager.isProviderEnabled(provider);<NEW_LINE>if (isAvailable) {<NEW_LINE>availableProviders++;<NEW_LINE>}<NEW_LINE>// if (mPluginLayout != null && mPluginLayout.isDebug) {<NEW_LINE>Log.d(TAG, " " + provider + " = " + (isAvailable ? "" : "not ") + "available");<NEW_LINE>// }<NEW_LINE>}<NEW_LINE>if (availableProviders == 0) {<NEW_LINE>JSONObject result = new JSONObject();<NEW_LINE>try {<NEW_LINE>result.put("status", false);<NEW_LINE>result.put("error_code", "not_available");<NEW_LINE>result.put("error_message", PluginUtil.getPgmStrings(activity, "pgm_no_location_providers"));<NEW_LINE>} catch (JSONException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>callbackContext.error(result);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>_inviteLocationUpdateAfterActivityResult(bundle);<NEW_LINE>}
Log.d(TAG, "---debug at getMyLocation(available providers)--");
1,752,751
// GEN-LAST:event_enableCheckBoxActionPerformed<NEW_LINE>private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_browseButtonActionPerformed<NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE>FileUtil.preventFileChooserSymlinkTraversal(chooser, null);<NEW_LINE>chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);<NEW_LINE>chooser.setMultiSelectionEnabled(false);<NEW_LINE>chooser.setFileFilter(new IconFileFilter());<NEW_LINE>if (lastImageFolder != null) {<NEW_LINE>chooser.setSelectedFile(lastImageFolder);<NEW_LINE>} else {<NEW_LINE>// ???<NEW_LINE>// workDir = FileUtil.toFile(project.getProjectDirectory()).getAbsolutePath();<NEW_LINE>// chooser.setSelectedFile(new File(workDir));<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>chooser.setDialogTitle(NbBundle.getMessage<MASK><NEW_LINE>if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(this)) {<NEW_LINE>File file = FileUtil.normalizeFile(chooser.getSelectedFile());<NEW_LINE>iconTextField.setText(file.getAbsolutePath());<NEW_LINE>lastImageFolder = file.getParentFile();<NEW_LINE>}<NEW_LINE>}
(JWSCustomizerPanel.class, "LBL_Select_Icon_Image"));
1,294,062
public int estimateUnassembledSize(Object val) {<NEW_LINE>if (val == null) {<NEW_LINE>return 0;<NEW_LINE>} else {<NEW_LINE>int listSize = ((List) val).size();<NEW_LINE>if (listSize > 0) {<NEW_LINE>int entrySize = 0;<NEW_LINE>if (((List) val).get(0) instanceof String) {<NEW_LINE>// Guess that Strings average 20 characters<NEW_LINE>entrySize = JSCoder<MASK><NEW_LINE>} else {<NEW_LINE>// Guess that non-Strings average 8 bytes of data<NEW_LINE>entrySize = JSCoder.OBJECT_OVERHEAD + 8;<NEW_LINE>}<NEW_LINE>// The overhead of the List + a guess for each entry<NEW_LINE>return JSCoder.OBJECT_OVERHEAD + 20 + listSize * entrySize;<NEW_LINE>} else {<NEW_LINE>// We'll assume that an empty list is actually the MFP singleton EMPTY_LIST<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.OBJECT_OVERHEAD * 2 + 20 * 2;
867,713
public static GetLogoFontListResponse unmarshall(GetLogoFontListResponse getLogoFontListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getLogoFontListResponse.setRequestId(_ctx.stringValue("GetLogoFontListResponse.RequestId"));<NEW_LINE>getLogoFontListResponse.setSuccess(_ctx.booleanValue("GetLogoFontListResponse.Success"));<NEW_LINE>List<FontsItem> fonts = new ArrayList<FontsItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetLogoFontListResponse.Fonts.Length"); i++) {<NEW_LINE>FontsItem fontsItem = new FontsItem();<NEW_LINE>fontsItem.setFontId(_ctx.stringValue("GetLogoFontListResponse.Fonts[" + i + "].FontId"));<NEW_LINE>fontsItem.setName(_ctx.stringValue("GetLogoFontListResponse.Fonts[" + i + "].Name"));<NEW_LINE>fontsItem.setImage(_ctx.stringValue<MASK><NEW_LINE>fonts.add(fontsItem);<NEW_LINE>}<NEW_LINE>getLogoFontListResponse.setFonts(fonts);<NEW_LINE>return getLogoFontListResponse;<NEW_LINE>}
("GetLogoFontListResponse.Fonts[" + i + "].Image"));
1,505,690
public void onNewChunk(OnChunkLoaded chunkAvailable, EntityRef worldEntity) {<NEW_LINE>Vector3ic chunkPos = chunkAvailable.getChunkPos();<NEW_LINE>Chunk chunk = chunkProvider.getChunk(chunkPos);<NEW_LINE>ByteBuffer buffer = ByteBuffer.allocateDirect(2 * (Chunks.SIZE_X * Chunks.SIZE_Y * Chunks.SIZE_Z));<NEW_LINE>buffer.<MASK><NEW_LINE>for (int z = 0; z < Chunks.SIZE_Z; z++) {<NEW_LINE>for (int x = 0; x < Chunks.SIZE_X; x++) {<NEW_LINE>for (int y = 0; y < Chunks.SIZE_Y; y++) {<NEW_LINE>Block block = chunk.getBlock(x, y, z);<NEW_LINE>colliders.forEach(k -> k.registerBlock(block));<NEW_LINE>buffer.putShort(block.getId());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>buffer.rewind();<NEW_LINE>colliders.forEach(k -> k.loadChunk(chunk, buffer.duplicate().asShortBuffer()));<NEW_LINE>}
order(ByteOrder.nativeOrder());
1,694,954
public void run(RegressionEnvironment env) {<NEW_LINE>String eplFragment = "@name('s0') select items.where(i => i.location.x = 0 and i.location.y = 0) as zeroloc from LocationReport";<NEW_LINE>env.compileDeploy(eplFragment).addListener("s0");<NEW_LINE>env.sendEventBean(LocationReportFactory.makeSmall());<NEW_LINE>env.assertEventNew("s0", event -> {<NEW_LINE>Item[] items = toArrayItems((Collection<Item>) event.get("zeroloc"));<NEW_LINE>assertEquals(1, items.length);<NEW_LINE>assertEquals("P00020", items[0].getAssetId());<NEW_LINE>});<NEW_LINE>env.undeployAll();<NEW_LINE>eplFragment = "@name('s0') select items.where(i => i.location.x = 0).where(i => i.location.y = 0) as zeroloc from LocationReport";<NEW_LINE>env.compileDeploy<MASK><NEW_LINE>env.sendEventBean(LocationReportFactory.makeSmall());<NEW_LINE>env.assertEventNew("s0", event -> {<NEW_LINE>Item[] items = toArrayItems((Collection<Item>) event.get("zeroloc"));<NEW_LINE>assertEquals(1, items.length);<NEW_LINE>assertEquals("P00020", items[0].getAssetId());<NEW_LINE>});<NEW_LINE>env.undeployAll();<NEW_LINE>}
(eplFragment).addListener("s0");
1,034,741
private void copy(OAtomicOperation atomicOperation, final OStorageConfiguration storageConfiguration) {<NEW_LINE>setCharset(atomicOperation, storageConfiguration.getCharset());<NEW_LINE>setSchemaRecordId(atomicOperation, storageConfiguration.getSchemaRecordId());<NEW_LINE>setIndexMgrRecordId(atomicOperation, storageConfiguration.getIndexMgrRecordId());<NEW_LINE>final TimeZone timeZone = storageConfiguration.getTimeZone();<NEW_LINE>assert timeZone != null;<NEW_LINE>setTimeZone(atomicOperation, timeZone);<NEW_LINE>setDateFormat(atomicOperation, storageConfiguration.getDateFormat());<NEW_LINE>setDateTimeFormat(atomicOperation, storageConfiguration.getDateTimeFormat());<NEW_LINE>this<MASK><NEW_LINE>setMinimumClusters(storageConfiguration.getMinimumClusters());<NEW_LINE>setLocaleCountry(atomicOperation, storageConfiguration.getLocaleCountry());<NEW_LINE>setLocaleLanguage(atomicOperation, storageConfiguration.getLocaleLanguage());<NEW_LINE>final List<OStorageEntryConfiguration> properties = storageConfiguration.getProperties();<NEW_LINE>for (final OStorageEntryConfiguration property : properties) {<NEW_LINE>setProperty(atomicOperation, property.name, property.value);<NEW_LINE>}<NEW_LINE>setClusterSelection(atomicOperation, storageConfiguration.getClusterSelection());<NEW_LINE>setConflictStrategy(atomicOperation, storageConfiguration.getConflictStrategy());<NEW_LINE>setValidation(atomicOperation, storageConfiguration.isValidationEnabled());<NEW_LINE>int counter = 0;<NEW_LINE>final Set<String> indexEngines = storageConfiguration.indexEngines();<NEW_LINE>for (final String engine : indexEngines) {<NEW_LINE>addIndexEngine(atomicOperation, engine, storageConfiguration.getIndexEngine(engine, counter));<NEW_LINE>counter++;<NEW_LINE>}<NEW_LINE>setRecordSerializer(atomicOperation, storageConfiguration.getRecordSerializer());<NEW_LINE>setRecordSerializerVersion(atomicOperation, storageConfiguration.getRecordSerializerVersion());<NEW_LINE>final List<OStorageClusterConfiguration> clusters = storageConfiguration.getClusters();<NEW_LINE>for (final OStorageClusterConfiguration cluster : clusters) {<NEW_LINE>if (cluster != null) {<NEW_LINE>updateCluster(atomicOperation, cluster);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setCreationVersion(atomicOperation, storageConfiguration.getCreatedAtVersion());<NEW_LINE>setPageSize(atomicOperation, storageConfiguration.getPageSize());<NEW_LINE>setFreeListBoundary(atomicOperation, storageConfiguration.getFreeListBoundary());<NEW_LINE>setMaxKeySize(atomicOperation, storageConfiguration.getMaxKeySize());<NEW_LINE>}
.configuration = storageConfiguration.getContextConfiguration();
1,291,547
static public double HYCON(int p_A_ASSET_ID, String p_POSTINGTYPE, int p_A_ASSET_ACCT_ID, int p_Flag, double p_Period) {<NEW_LINE>int v_adj = 0;<NEW_LINE>StringBuffer sqlB = new StringBuffer("SELECT A_ASSET.ASSETSERVICEDATE, A_DEPRECIATION_WORKFILE.A_PERIOD_POSTED," + " A_DEPRECIATION_WORKFILE.A_ASSET_LIFE_YEARS, A_DEPRECIATION_WORKFILE.A_LIFE_PERIOD," + " A_DEPRECIATION_WORKFILE.DATEACCT" + " FROM A_DEPRECIATION_WORKFILE, A_ASSET" + " WHERE A_ASSET.A_ASSET_ID = " + p_A_ASSET_ID + " AND A_DEPRECIATION_WORKFILE.A_ASSET_ID = " + p_A_ASSET_ID + " AND A_DEPRECIATION_WORKFILE.POSTINGTYPE = '" + p_POSTINGTYPE + "'");<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>pstmt = DB.prepareStatement(sqlB.toString(), null);<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>Calendar calendar = new GregorianCalendar();<NEW_LINE>calendar.setTime<MASK><NEW_LINE>int AssetServiceDateYear = calendar.get(Calendar.YEAR);<NEW_LINE>int AssetServiceDateMonth = calendar.get(Calendar.MONTH);<NEW_LINE>calendar.setTime(rs.getDate("DATEACCT"));<NEW_LINE>int DateAcctYear = calendar.get(Calendar.YEAR);<NEW_LINE>int v_Months_of_Half_Year = (12 - (AssetServiceDateMonth) + 1);<NEW_LINE>// ADJUST PERIOD FOR MID-MONTH CONVENTION<NEW_LINE>if (DateAcctYear == AssetServiceDateYear)<NEW_LINE>v_adj = 6 / v_Months_of_Half_Year;<NEW_LINE>else<NEW_LINE>v_adj = 1;<NEW_LINE>if (p_Flag == 2) {<NEW_LINE>// ADJUST COST CORRECTIONS FOR HALF-YEAR CONVENTION<NEW_LINE>if (p_Period == AssetServiceDateYear)<NEW_LINE>v_adj = 6 / v_Months_of_Half_Year;<NEW_LINE>else<NEW_LINE>v_adj = 1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.out.println("HYCON" + e);<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>return v_adj;<NEW_LINE>}
(rs.getDate("ASSETSERVICEDATE"));
1,165,063
private int writePermission(MetaModel object, MetaField userField, String[] row, int colIndex, String permName) {<NEW_LINE>Permission perm = permissionRepository.findByName(permName);<NEW_LINE>if (perm != null && perm.getObject().equals(object.getFullName())) {<NEW_LINE>row[colIndex++] = !perm.getCanRead() ? "" : "x";<NEW_LINE>row[colIndex++] = !perm.getCanWrite() ? "" : "x";<NEW_LINE>row[colIndex++] = !perm.getCanCreate() ? "" : "x";<NEW_LINE>row[colIndex++] = !perm.getCanRemove() ? "" : "x";<NEW_LINE>row[colIndex++] = !perm.getCanExport() ? "" : "x";<NEW_LINE>row[colIndex++] = Strings.isNullOrEmpty(perm.getCondition()) ? "" : perm.getCondition();<NEW_LINE>row[colIndex++] = Strings.isNullOrEmpty(perm.getConditionParams()) ? "" : perm.getConditionParams();<NEW_LINE>// readonly if<NEW_LINE>row[colIndex++] = "";<NEW_LINE>// hide if<NEW_LINE>row[colIndex++] = "";<NEW_LINE>} else if (userField != null) {<NEW_LINE>MetaField objectField = fieldRepository.all().filter("self.typeName = ?1 and self.metaModel = ?2 and self.relationship = 'ManyToOne'", userField.getTypeName(<MASK><NEW_LINE>if (objectField != null) {<NEW_LINE>String condition = "";<NEW_LINE>String conditionParams = "__user__." + userField.getName();<NEW_LINE>if (userField.getRelationship().contentEquals("ManyToOne")) {<NEW_LINE>condition = "self." + objectField.getName() + " = ?";<NEW_LINE>} else {<NEW_LINE>condition = "self." + objectField.getName() + " in (?)";<NEW_LINE>}<NEW_LINE>row[colIndex++] = "x";<NEW_LINE>row[colIndex++] = "x";<NEW_LINE>row[colIndex++] = "x";<NEW_LINE>row[colIndex++] = "x";<NEW_LINE>row[colIndex++] = "x";<NEW_LINE>row[colIndex++] = condition;<NEW_LINE>row[colIndex++] = conditionParams;<NEW_LINE>// readonly if<NEW_LINE>row[colIndex++] = "";<NEW_LINE>// hide if<NEW_LINE>row[colIndex++] = "";<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return colIndex;<NEW_LINE>}
), object).fetchOne();
911,708
private String SubstGraphs(String query, String gInsert, String gDelete) {<NEW_LINE>ArrayList<String> lst = new ArrayList<String>(16);<NEW_LINE>StringBuilder buf = new StringBuilder();<NEW_LINE>String delim = "{} \t\n\r\f";<NEW_LINE>int i = 0;<NEW_LINE>char ch;<NEW_LINE>int qlen = query.length();<NEW_LINE>while (i < qlen) {<NEW_LINE>ch <MASK><NEW_LINE>if (delim.indexOf(ch) >= 0) {<NEW_LINE>if (buf.length() > 0) {<NEW_LINE>lst.add(buf.toString());<NEW_LINE>buf.setLength(0);<NEW_LINE>}<NEW_LINE>lst.add("" + ch);<NEW_LINE>} else if (ch == '\\') {<NEW_LINE>buf.append(ch);<NEW_LINE>if (i < qlen)<NEW_LINE>buf.append(query.charAt(i++));<NEW_LINE>} else if (ch == '"' || ch == '\'') {<NEW_LINE>char end = ch;<NEW_LINE>buf.append(ch);<NEW_LINE>while (i < qlen) {<NEW_LINE>ch = query.charAt(i++);<NEW_LINE>buf.append(ch);<NEW_LINE>if (ch == end)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>buf.append(ch);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (buf.length() > 0)<NEW_LINE>lst.add(buf.toString());<NEW_LINE>if (gInsert != null)<NEW_LINE>fixTermOp(lst, "INSERT", "INTO", gInsert);<NEW_LINE>if (gDelete != null)<NEW_LINE>fixTermOp(lst, "DELETE", "FROM", gDelete);<NEW_LINE>buf.setLength(0);<NEW_LINE>for (i = 0; i < lst.size(); i++) buf.append(lst.get(i));<NEW_LINE>return buf.toString();<NEW_LINE>}
= query.charAt(i++);
1,683,772
public static VipInventory valueOf(VipVO vo) {<NEW_LINE>VipInventory inv = new VipInventory();<NEW_LINE>inv.setName(vo.getName());<NEW_LINE>inv.setDescription(vo.getDescription());<NEW_LINE>inv.setCreateDate(vo.getCreateDate());<NEW_LINE>inv.setGateway(vo.getGateway());<NEW_LINE>inv.setIp(vo.getIp());<NEW_LINE>inv.setIpRangeUuid(vo.getIpRangeUuid());<NEW_LINE>inv.setServiceProvider(vo.getServiceProvider());<NEW_LINE>inv.setL3NetworkUuid(vo.getL3NetworkUuid());<NEW_LINE>inv.setLastOpDate(vo.getLastOpDate());<NEW_LINE>inv.setNetmask(vo.getNetmask());<NEW_LINE>inv.setPrefixLen(vo.getPrefixLen());<NEW_LINE>inv.setUuid(vo.getUuid());<NEW_LINE>inv.setState(vo.getState().toString());<NEW_LINE>inv.setUsedIpUuid(vo.getUsedIpUuid());<NEW_LINE>if (vo.getPeerL3NetworkRefs() != null && !vo.getPeerL3NetworkRefs().isEmpty()) {<NEW_LINE>inv.setPeerL3NetworkUuids(vo.getPeerL3NetworkRefs().stream().map(ref -> ref.getL3NetworkUuid()).collect(Collectors.toList()));<NEW_LINE>}<NEW_LINE>inv.setServicesRefs(VipNetworkServicesRefInventory.valueOf(vo.getServicesRefs()));<NEW_LINE>inv.setUseFor(vo.getUseFor());<NEW_LINE>inv.<MASK><NEW_LINE>return inv;<NEW_LINE>}
setSystem(vo.isSystem());
208,218
public void visit(BLangErrorMatchPattern errorMatchPattern, AnalyzerData data) {<NEW_LINE>if (errorMatchPattern.errorTypeReference != null) {<NEW_LINE>errorMatchPattern.setBType(symResolver.resolveTypeNode(errorMatchPattern.errorTypeReference, data.env));<NEW_LINE>} else {<NEW_LINE>errorMatchPattern.setBType(symTable.errorType);<NEW_LINE>}<NEW_LINE>errorMatchPattern.setBType(types.resolvePatternTypeFromMatchExpr(errorMatchPattern, errorMatchPattern.matchExpr));<NEW_LINE>if (errorMatchPattern.errorMessageMatchPattern != null) {<NEW_LINE>analyzeNode(errorMatchPattern.errorMessageMatchPattern, data);<NEW_LINE>errorMatchPattern.declaredVars.putAll(errorMatchPattern.errorMessageMatchPattern.declaredVars);<NEW_LINE>}<NEW_LINE>if (errorMatchPattern.errorCauseMatchPattern != null) {<NEW_LINE>analyzeNode(errorMatchPattern.errorCauseMatchPattern, data);<NEW_LINE>errorMatchPattern.declaredVars.<MASK><NEW_LINE>}<NEW_LINE>if (errorMatchPattern.errorFieldMatchPatterns != null) {<NEW_LINE>analyzeNode(errorMatchPattern.errorFieldMatchPatterns, data);<NEW_LINE>errorMatchPattern.declaredVars.putAll(errorMatchPattern.errorFieldMatchPatterns.declaredVars);<NEW_LINE>}<NEW_LINE>}
putAll(errorMatchPattern.errorCauseMatchPattern.declaredVars);
1,682,435
public boolean releaseLock(List<RowLock> rowLocks) {<NEW_LINE>if (CollectionUtils.isEmpty(rowLocks)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String currentXid = rowLocks.get(0).getXid();<NEW_LINE>Long branchId = rowLocks.get(0).getBranchId();<NEW_LINE>List<LockDO> needReleaseLocks = convertToLockDO(rowLocks);<NEW_LINE>String[] needReleaseKeys = new String[needReleaseLocks.size()];<NEW_LINE>for (int i = 0; i < needReleaseLocks.size(); i++) {<NEW_LINE>needReleaseKeys[i] = buildLockKey(needReleaseLocks.get(i).getRowKey());<NEW_LINE>}<NEW_LINE>try (<MASK><NEW_LINE>Pipeline pipelined = jedis.pipelined()) {<NEW_LINE>pipelined.del(needReleaseKeys);<NEW_LINE>pipelined.hdel(buildXidLockKey(currentXid), branchId.toString());<NEW_LINE>pipelined.sync();<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}
Jedis jedis = JedisPooledFactory.getJedisInstance();
1,797,771
public IotEventsAction unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>IotEventsAction iotEventsAction = new IotEventsAction();<NEW_LINE>reader.beginObject();<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>String name = reader.nextName();<NEW_LINE>if (name.equals("inputName")) {<NEW_LINE>iotEventsAction.setInputName(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("messageId")) {<NEW_LINE>iotEventsAction.setMessageId(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else if (name.equals("batchMode")) {<NEW_LINE>iotEventsAction.setBatchMode(BooleanJsonUnmarshaller.getInstance<MASK><NEW_LINE>} else if (name.equals("roleArn")) {<NEW_LINE>iotEventsAction.setRoleArn(StringJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>} else {<NEW_LINE>reader.skipValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>reader.endObject();<NEW_LINE>return iotEventsAction;<NEW_LINE>}
().unmarshall(context));
1,643,563
public static void main(String[] args) {<NEW_LINE>final String USAGE = "Usage:\n" + " CreateDatasetGroup <name, datasetGroupArn>\n\n" + "Where:\n" + " datasetGroupArn - The Amazon Resource Name (ARN) of the dataset group that receives the event data\n" + " name - The name for the event tracker.\n\n";<NEW_LINE>if (args.length != 2) {<NEW_LINE>System.out.println(USAGE);<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>String datasetGroupArn = args[0];<NEW_LINE>String eventTrackerName = args[1];<NEW_LINE>Region region = Region.US_WEST_2;<NEW_LINE>PersonalizeClient personalizeClient = PersonalizeClient.builder().<MASK><NEW_LINE>String trackerId = createEventTracker(personalizeClient, eventTrackerName, datasetGroupArn);<NEW_LINE>System.out.println(trackerId);<NEW_LINE>personalizeClient.close();<NEW_LINE>}
region(region).build();
406,488
private static Map<TypeAlias, jnr.ffi.NativeType> buildTypeMap() {<NEW_LINE>Map<TypeAlias, jnr.ffi.NativeType> m = new EnumMap<TypeAlias, jnr.ffi.NativeType>(TypeAlias.class);<NEW_LINE>m.put(TypeAlias.int8_t, NativeType.SCHAR);<NEW_LINE>m.put(TypeAlias.u_int8_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.int16_t, NativeType.SSHORT);<NEW_LINE>m.put(TypeAlias.u_int16_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.int32_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.u_int32_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.int64_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.u_int64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.intptr_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.uintptr_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.caddr_t, NativeType.ADDRESS);<NEW_LINE>m.put(TypeAlias.dev_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.blkcnt_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.blksize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.gid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_addr_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.in_port_t, NativeType.USHORT);<NEW_LINE>m.put(TypeAlias.ino_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.ino64_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.key_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.mode_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.nlink_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.id_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.pid_t, NativeType.SINT);<NEW_LINE>m.put(TypeAlias.off_t, NativeType.SLONGLONG);<NEW_LINE>m.put(TypeAlias.swblk_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.uid_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.clock_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.size_t, NativeType.ULONG);<NEW_LINE>m.put(TypeAlias.ssize_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.time_t, NativeType.SLONG);<NEW_LINE>m.put(TypeAlias.fsblkcnt_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.fsfilcnt_t, NativeType.ULONGLONG);<NEW_LINE>m.put(<MASK><NEW_LINE>m.put(TypeAlias.socklen_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.rlim_t, NativeType.ULONGLONG);<NEW_LINE>m.put(TypeAlias.cc_t, NativeType.UCHAR);<NEW_LINE>m.put(TypeAlias.speed_t, NativeType.UINT);<NEW_LINE>m.put(TypeAlias.tcflag_t, NativeType.UINT);<NEW_LINE>return m;<NEW_LINE>}
TypeAlias.sa_family_t, NativeType.USHORT);
550,404
public Object createResource(ResourceInfo info) throws Exception {<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.entry(this, tc, "createResource", info);<NEW_LINE>Object resource;<NEW_LINE>try {<NEW_LINE>ResourceFactory factory = tracker.waitForService(5000);<NEW_LINE>if (factory == null)<NEW_LINE>throw new Exception(ConnectorService.getMessage("MISSING_RESOURCE_J2CA8030", info == null ? "" : info.getType(), id, "application", appName));<NEW_LINE>resource = factory.createResource(info);<NEW_LINE>} catch (Exception x) {<NEW_LINE>FFDCFilter.processException(x, getClass().getName(), "129", this);<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(this, tc, "createResource", x);<NEW_LINE>throw x;<NEW_LINE>} catch (Error x) {<NEW_LINE>FFDCFilter.processException(x, getClass().<MASK><NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(this, tc, "createResource", x);<NEW_LINE>throw x;<NEW_LINE>}<NEW_LINE>if (trace && tc.isEntryEnabled())<NEW_LINE>Tr.exit(this, tc, "createResource", resource);<NEW_LINE>return resource;<NEW_LINE>}
getName(), "134", this);
1,225,529
public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c1".split(",");<NEW_LINE>String epl = "create context MyContext as " + "initiated by SupportBean_S0 " + "terminated by SupportBean_S1;\n" + "@name('s0') context MyContext select sum(intPrimitive) as c1 from SupportBean;\n";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.sendEventBean(new SupportBean("E1", 1));<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.milestone(0);<NEW_LINE>// initiate one<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>env.milestone(1);<NEW_LINE>env.sendEventBean(new SupportBean("E2", 2));<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 2 });<NEW_LINE>// initiate another<NEW_LINE>env.sendEventBean(new SupportBean_S0(11, "S0_2"));<NEW_LINE>env.milestone(2);<NEW_LINE>env.sendEventBean(new SupportBean("E3", 3));<NEW_LINE>env.assertPropsPerRowLastNew("s0", fields, new Object[][] { { 5 }, { 3 } });<NEW_LINE>env.milestone(3);<NEW_LINE>env.sendEventBean(new SupportBean("E4", 4));<NEW_LINE>env.assertPropsPerRowLastNew("s0", fields, new Object[][] { { 9 }, { 7 } });<NEW_LINE>// terminate all<NEW_LINE>env.sendEventBean(new SupportBean_S1(1, "S1_1"));<NEW_LINE>env.milestone(4);<NEW_LINE>env.sendEventBean(new SupportBean("E4", 4));<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>env.undeployAll();<NEW_LINE>}
new SupportBean_S0(10, "S0_1"));
58,874
/*<NEW_LINE>* Cost of an add() operation is O(log k) if the candidate has to be inserted in<NEW_LINE>* the current top-k elements, O(1) otherwise.<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public synchronized void add(Integer key, long count) {<NEW_LINE>Preconditions.checkNotNull(key, "key can't be null");<NEW_LINE>Preconditions.checkElementIndex(key, counts.length, "key");<NEW_LINE>Preconditions.checkArgument(count >= 0, "count to add must be non-negative, got %s", count);<NEW_LINE>if (count == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long currentCount = counts[key];<NEW_LINE>counts[key] += count;<NEW_LINE>if (isInTop[key]) {<NEW_LINE>topPairs.remove(new ComparablePair<>(currentCount, key));<NEW_LINE>topPairs.add(new ComparablePair<>(counts[key], key));<NEW_LINE>} else if (topPairs.size() < k) {<NEW_LINE>topPairs.add(new ComparablePair<>(counts[key], key));<NEW_LINE>isInTop[key] = true;<NEW_LINE>smallestTopCount = Math.min(smallestTopCount, counts[key]);<NEW_LINE>} else if (counts[key] > smallestTopCount) {<NEW_LINE>ComparablePair<Long, Integer<MASK><NEW_LINE>isInTop[smallestTopPair.getSecond()] = false;<NEW_LINE>topPairs.add(new ComparablePair<>(counts[key], key));<NEW_LINE>isInTop[key] = true;<NEW_LINE>smallestTopCount = topPairs.first().getFirst();<NEW_LINE>}<NEW_LINE>}
> smallestTopPair = topPairs.pollFirst();
1,287,197
protected Tuple3<Boolean, Double, Map<String, String>> detect(SlicedSelectedSample selection) throws Exception {<NEW_LINE>double[] data = new double[this.model.nx];<NEW_LINE>if (isVector) {<NEW_LINE>Vector vector = VectorUtil.getVector(selection.<MASK><NEW_LINE>if (vector instanceof SparseVector) {<NEW_LINE>SparseVector feature = (SparseVector) vector;<NEW_LINE>for (int i = 0; i < feature.getIndices().length; i++) {<NEW_LINE>data[feature.getIndices()[i]] = feature.getValues()[i];<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Vector feature = (DenseVector) vector;<NEW_LINE>for (int i = 0; i < feature.size(); i++) {<NEW_LINE>data[i] = feature.get(i);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < this.featureIdxs.length; ++i) {<NEW_LINE>data[i] = ((Number) selection.get(this.featureIdxs[i])).doubleValue();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double[] dataNe;<NEW_LINE>if (model.idxNonEqual.length != data.length) {<NEW_LINE>Integer[] indices = model.idxNonEqual;<NEW_LINE>dataNe = new double[indices.length];<NEW_LINE>for (int i = 0; i < indices.length; i++) {<NEW_LINE>if (Math.abs(model.stddevs[i]) > 1e-12) {<NEW_LINE>int idx = indices[i];<NEW_LINE>dataNe[i] = (data[idx] - model.means[i]) / model.stddevs[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i < data.length; i++) {<NEW_LINE>if (Math.abs(model.stddevs[i]) > 1e-12) {<NEW_LINE>data[i] = (data[i] - model.means[i]) / model.stddevs[i];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>dataNe = data;<NEW_LINE>}<NEW_LINE>// predict the score.<NEW_LINE>double score = 0.;<NEW_LINE>for (int k = 0; k < model.p; ++k) {<NEW_LINE>double localScore = 0.;<NEW_LINE>for (int i = 0; i < dataNe.length; ++i) {<NEW_LINE>localScore += dataNe[i] * model.coef[k][i];<NEW_LINE>}<NEW_LINE>double temp = Math.pow(localScore, 2);<NEW_LINE>score += temp / model.lambda[k];<NEW_LINE>}<NEW_LINE>// result.set(0, new DenseVector(new double[] {score}));<NEW_LINE>double prob = 0;<NEW_LINE>return Tuple3.of(prob > threshold, prob, null);<NEW_LINE>}
get(featureIdxs[0]));
1,085,174
public void process(MarvinImage a_imageIn, MarvinImage a_imageOut, MarvinAttributes a_attributesOut, MarvinImageMask a_mask, boolean a_previewMode) {<NEW_LINE>width = a_imageIn.getWidth();<NEW_LINE>height = a_imageIn.getHeight();<NEW_LINE>mat1 = new double[width][height];<NEW_LINE>mat2 = <MASK><NEW_LINE>mat4 = new double[width][height];<NEW_LINE>mata = new double[width][height];<NEW_LINE>img_x = new double[width][height];<NEW_LINE>img_y = new double[width][height];<NEW_LINE>img_xx = new double[width][height];<NEW_LINE>img_yy = new double[width][height];<NEW_LINE>img_xy = new double[width][height];<NEW_LINE>matr = new double[width][height];<NEW_LINE>matg = new double[width][height];<NEW_LINE>matb = new double[width][height];<NEW_LINE>// no of iterations<NEW_LINE>int iter = 20;<NEW_LINE>// Put the color values in double array<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>for (int y = 0; y < height; y++) {<NEW_LINE>matr[x][y] = a_imageIn.getIntComponent0(x, y);<NEW_LINE>matg[x][y] = a_imageIn.getIntComponent1(x, y);<NEW_LINE>matb[x][y] = a_imageIn.getIntComponent2(x, y);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Call denoise function<NEW_LINE>matr = denoise(matr, iter);<NEW_LINE>matg = denoise(matg, iter);<NEW_LINE>matb = denoise(matb, iter);<NEW_LINE>for (int x = 0; x < width; x++) {<NEW_LINE>for (int y = 0; y < height; y++) {<NEW_LINE>a_imageOut.setIntColor(x, y, (int) truncate(matr[x][y]), (int) truncate(matg[x][y]), (int) truncate(matb[x][y]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
new double[width][height];
303,894
public void copyFolderToTemp(Folder folder, File tempFolder, User user, String name, boolean isAutoPub, long lang) throws IOException {<NEW_LINE>String p = "";<NEW_LINE>try {<NEW_LINE>p = identifierAPI.find(folder.getIdentifier()).getPath();<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.error(DotWebdavHelper.class, e.getMessage(), e);<NEW_LINE>throw new DotRuntimeException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>if (p.endsWith("/"))<NEW_LINE>p = p + "/";<NEW_LINE>String path = p.replace("/", File.separator);<NEW_LINE>path = tempFolder.getPath() + File.separator + name;<NEW_LINE>File tf = createTempFolder(path);<NEW_LINE>List<Resource> children = getChildrenOfFolder(folder, user, isAutoPub, lang);<NEW_LINE>for (Resource resource : children) {<NEW_LINE>if (resource instanceof CollectionResource) {<NEW_LINE>FolderResourceImpl fr = (FolderResourceImpl) resource;<NEW_LINE>copyFolderToTemp(fr.getFolder(), tf, user, fr.getFolder().<MASK><NEW_LINE>} else {<NEW_LINE>FileResourceImpl fr = (FileResourceImpl) resource;<NEW_LINE>copyFileToTemp(fr.getFile(), tf);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getName(), isAutoPub, lang);
591,925
public static void registerRecipeTypes(BiConsumer<RecipeSerializer<?>, ResourceLocation> r) {<NEW_LINE>ResourceLocation id = IElvenTradeRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, ELVEN_TRADE_TYPE);<NEW_LINE>r.accept(ELVEN_TRADE_SERIALIZER, id);<NEW_LINE>r.accept(LEXICON_ELVEN_TRADE_SERIALIZER, prefix("elven_trade_lexicon"));<NEW_LINE>id = IManaInfusionRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, MANA_INFUSION_TYPE);<NEW_LINE>r.accept(MANA_INFUSION_SERIALIZER, id);<NEW_LINE>id = IPureDaisyRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, PURE_DAISY_TYPE);<NEW_LINE>r.accept(PURE_DAISY_SERIALIZER, id);<NEW_LINE>r.accept(COPYING_PURE_DAISY_SERIALIZER, prefix("state_copying_pure_daisy"));<NEW_LINE>id = IBrewRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, BREW_TYPE);<NEW_LINE>r.accept(BREW_SERIALIZER, id);<NEW_LINE>id = IPetalRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, PETAL_TYPE);<NEW_LINE>r.accept(PETAL_SERIALIZER, id);<NEW_LINE>id = IRuneAltarRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, RUNE_TYPE);<NEW_LINE>r.accept(RUNE_SERIALIZER, id);<NEW_LINE>r.accept<MASK><NEW_LINE>id = ITerraPlateRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, TERRA_PLATE_TYPE);<NEW_LINE>r.accept(TERRA_PLATE_SERIALIZER, id);<NEW_LINE>id = IOrechidRecipe.TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, ORECHID_TYPE);<NEW_LINE>r.accept(ORECHID_SERIALIZER, id);<NEW_LINE>id = IOrechidRecipe.IGNEM_TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, ORECHID_IGNEM_TYPE);<NEW_LINE>r.accept(ORECHID_IGNEM_SERIALIZER, id);<NEW_LINE>id = IOrechidRecipe.MARIMORPHOSIS_TYPE_ID;<NEW_LINE>Registry.register(Registry.RECIPE_TYPE, id, MARIMORPHOSIS_TYPE);<NEW_LINE>r.accept(MARIMORPHOSIS_SERIALIZER, id);<NEW_LINE>}
(RUNE_HEAD_SERIALIZER, prefix("runic_altar_head"));
1,259,975
public static void vertical11(Kernel1D_S32 kernel, GrayS32 src, GrayS32 dst, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>final int[] dataSrc = src.data;<NEW_LINE>final int[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int k7 = kernel.data[6];<NEW_LINE>final int k8 = kernel.data[7];<NEW_LINE>final int k9 = kernel.data[8];<NEW_LINE>final int k10 = kernel.data[9];<NEW_LINE>final int k11 = kernel.data[10];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final <MASK><NEW_LINE>final int imgHeight = dst.getHeight();<NEW_LINE>final int halfDivisor = divisor / 2;<NEW_LINE>final int yEnd = imgHeight - radius;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(radius, yEnd, y -> {<NEW_LINE>for (int y = radius; y < yEnd; y++) {<NEW_LINE>int indexDst = dst.startIndex + y * dst.stride;<NEW_LINE>int i = src.startIndex + (y - radius) * src.stride;<NEW_LINE>final int iEnd = i + imgWidth;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc[indexSrc]) * k1;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k2;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k3;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k4;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k5;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k6;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k7;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k8;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k9;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k10;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc]) * k11;<NEW_LINE>dataDst[indexDst++] = ((total + halfDivisor) / divisor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
int imgWidth = dst.getWidth();
419,771
public void reloadAllModelsOfType(final String modelType) {<NEW_LINE>synchronized (resourceSet) {<NEW_LINE>// Make a copy to avoid ConcurrentModificationException<NEW_LINE>List<Resource> resourceListCopy = new ArrayList<Resource>(resourceSet.getResources());<NEW_LINE>for (Resource resource : resourceListCopy) {<NEW_LINE>if (resource != null && resource.getURI().lastSegment().contains(".") && resource.isLoaded()) {<NEW_LINE>if (modelType.equalsIgnoreCase(resource.getURI().fileExtension())) {<NEW_LINE>XtextResource xtextResource = (XtextResource) resource;<NEW_LINE>// It's not sufficient to discard the derived state.<NEW_LINE>// The quick & dirts solution is to reparse the whole resource.<NEW_LINE>// We trigger this by dummy updating the resource.<NEW_LINE>logger.debug("Refreshing resource '{}'", resource.getURI().lastSegment());<NEW_LINE>xtextResource.update(1, 0, "");<NEW_LINE>notifyListeners(resource.getURI().<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
lastSegment(), EventType.MODIFIED);
425,793
public void visit(LambdaExpr n, Void arg) {<NEW_LINE>printOrphanCommentsBeforeThisChildNode(n);<NEW_LINE>printComment(n.getComment(), arg);<NEW_LINE>final NodeList<Parameter> parameters = n.getParameters();<NEW_LINE>final boolean printPar = n.isEnclosingParameters();<NEW_LINE>if (printPar) {<NEW_LINE>printer.print("(");<NEW_LINE>}<NEW_LINE>for (Iterator<Parameter> i = parameters.iterator(); i.hasNext(); ) {<NEW_LINE>Parameter p = i.next();<NEW_LINE>p.accept(this, arg);<NEW_LINE>if (i.hasNext()) {<NEW_LINE>printer.print(", ");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (printPar) {<NEW_LINE>printer.print(")");<NEW_LINE>}<NEW_LINE>printer.print(" -> ");<NEW_LINE>final Statement body = n.getBody();<NEW_LINE>if (body instanceof ExpressionStmt) {<NEW_LINE>// Print the expression directly<NEW_LINE>((ExpressionStmt) body).getExpression(<MASK><NEW_LINE>} else {<NEW_LINE>body.accept(this, arg);<NEW_LINE>}<NEW_LINE>}
).accept(this, arg);
249,053
private WorkflowTrace createHandshakeWorkflow(AliasedConnection connection) {<NEW_LINE>WorkflowTrace workflowTrace = this.createHelloWorkflow(connection);<NEW_LINE>List<ProtocolMessage> messages = new LinkedList<>();<NEW_LINE>if (config.getHighestProtocolVersion().isTLS13()) {<NEW_LINE>if (Objects.equals(config.getTls13BackwardsCompatibilityMode(), Boolean.TRUE) || connection.getLocalConnectionEndType() == ConnectionEndType.SERVER) {<NEW_LINE>ChangeCipherSpecMessage ccs = new ChangeCipherSpecMessage();<NEW_LINE>ccs.setRequired(false);<NEW_LINE>messages.add(ccs);<NEW_LINE>}<NEW_LINE>if (config.isClientAuthentication()) {<NEW_LINE>messages.add(new CertificateMessage(config));<NEW_LINE>messages.add(new CertificateVerifyMessage(config));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (config.isClientAuthentication()) {<NEW_LINE>messages.add(new CertificateMessage(config));<NEW_LINE>addClientKeyExchangeMessage(messages);<NEW_LINE>messages.add(new CertificateVerifyMessage(config));<NEW_LINE>} else {<NEW_LINE>addClientKeyExchangeMessage(messages);<NEW_LINE>}<NEW_LINE>messages.add(new ChangeCipherSpecMessage(config));<NEW_LINE>}<NEW_LINE>messages.add(new FinishedMessage(config));<NEW_LINE>workflowTrace.addTlsAction(MessageActionFactory.createAction(config, connection<MASK><NEW_LINE>if (!config.getHighestProtocolVersion().isTLS13()) {<NEW_LINE>workflowTrace.addTlsAction(MessageActionFactory.createAction(config, connection, ConnectionEndType.SERVER, new ChangeCipherSpecMessage(config), new FinishedMessage(config)));<NEW_LINE>}<NEW_LINE>return workflowTrace;<NEW_LINE>}
, ConnectionEndType.CLIENT, messages));
752,652
final ListProcessingJobsResult executeListProcessingJobs(ListProcessingJobsRequest listProcessingJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listProcessingJobsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListProcessingJobsRequest> request = null;<NEW_LINE>Response<ListProcessingJobsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListProcessingJobsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listProcessingJobsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListProcessingJobs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListProcessingJobsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListProcessingJobsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
956,243
final DisassociateLensesResult executeDisassociateLenses(DisassociateLensesRequest disassociateLensesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateLensesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DisassociateLensesRequest> request = null;<NEW_LINE>Response<DisassociateLensesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DisassociateLensesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(disassociateLensesRequest));<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, "WellArchitected");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DisassociateLenses");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DisassociateLensesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DisassociateLensesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,477,941
public synchronized void createTweet(Status status, long listId) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>String originalName = "";<NEW_LINE>long time = status.getCreatedAt().getTime();<NEW_LINE>long id = status.getId();<NEW_LINE>if (status.isRetweet()) {<NEW_LINE>originalName = status.getUser().getScreenName();<NEW_LINE>status = status.getRetweetedStatus();<NEW_LINE>}<NEW_LINE>String[] html = TweetLinkUtils.getLinksInStatus(status);<NEW_LINE>String text = html[0];<NEW_LINE>String media = html[1];<NEW_LINE>String url = html[2];<NEW_LINE>String hashtags = html[3];<NEW_LINE>String users = html[4];<NEW_LINE>if (media.contains("/tweet_video/")) {<NEW_LINE>media = media.replace("tweet_video", "tweet_video_thumb").replace(".mp4", ".png");<NEW_LINE>}<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_TEXT, text);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_TWEET_ID, id);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_NAME, status.getUser().getName());<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_PRO_PIC, status.getUser().getOriginalProfileImageURL());<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_SCREEN_NAME, status.<MASK><NEW_LINE>values.put(ListSQLiteHelper.COLUMN_TIME, time);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_RETWEETER, originalName);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_PIC_URL, media);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_URL, url);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_USERS, users);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_HASHTAGS, hashtags);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_LIST_ID, listId);<NEW_LINE>values.put(ListSQLiteHelper.COLUMN_ANIMATED_GIF, TweetLinkUtils.getGIFUrl(status, url));<NEW_LINE>try {<NEW_LINE>database.insert(ListSQLiteHelper.TABLE_HOME, null, values);<NEW_LINE>} catch (Exception e) {<NEW_LINE>open();<NEW_LINE>database.insert(ListSQLiteHelper.TABLE_HOME, null, values);<NEW_LINE>}<NEW_LINE>}
getUser().getScreenName());
1,478,201
// normalize<NEW_LINE>protected void predict(float[] S, int N, int direction) {<NEW_LINE>int half = N >> 1;<NEW_LINE>if (direction == forward) {<NEW_LINE>S[half] = S[half] - (sqrt3 / 4.0f) * S[0] - (((sqrt3 - 2) / 4.0f) * S[half - 1]);<NEW_LINE>} else if (direction == inverse) {<NEW_LINE>S[half] = S[half] + (sqrt3 / 4.0f) * S[0] + (((sqrt3 - 2) / 4.0f) <MASK><NEW_LINE>} else {<NEW_LINE>System.out.println("Daubechies4Wavelet::predict: bad direction value");<NEW_LINE>}<NEW_LINE>// predict, forward<NEW_LINE>for (int n = 1; n < half; n++) {<NEW_LINE>if (direction == forward) {<NEW_LINE>S[half + n] = S[half + n] - (sqrt3 / 4.0f) * S[n] - (((sqrt3 - 2) / 4.0f) * S[n - 1]);<NEW_LINE>} else if (direction == inverse) {<NEW_LINE>S[half + n] = S[half + n] + (sqrt3 / 4.0f) * S[n] + (((sqrt3 - 2) / 4.0f) * S[n - 1]);<NEW_LINE>} else {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
* S[half - 1]);
654,227
DbInfo.Builder doParse(String jdbcUrl, DbInfo.Builder builder) {<NEW_LINE>String serverName = "";<NEW_LINE>Integer port = null;<NEW_LINE>int hostIndex = jdbcUrl.indexOf("jtds:sqlserver://");<NEW_LINE>if (hostIndex < 0) {<NEW_LINE>return builder;<NEW_LINE>}<NEW_LINE>String[] split = jdbcUrl.split(";", 2);<NEW_LINE>if (split.length > 1) {<NEW_LINE>Map<String, String> props = splitQuery<MASK><NEW_LINE>populateStandardProperties(builder, props);<NEW_LINE>if (props.containsKey("instance")) {<NEW_LINE>builder.name(props.get("instance"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String urlServerName = split[0].substring(hostIndex + 17);<NEW_LINE>if (!urlServerName.isEmpty()) {<NEW_LINE>serverName = urlServerName;<NEW_LINE>}<NEW_LINE>int databaseLoc = serverName.indexOf("/");<NEW_LINE>if (databaseLoc > 1) {<NEW_LINE>builder.db(serverName.substring(databaseLoc + 1));<NEW_LINE>serverName = serverName.substring(0, databaseLoc);<NEW_LINE>}<NEW_LINE>int portLoc = serverName.indexOf(":");<NEW_LINE>if (portLoc > 1) {<NEW_LINE>builder.port(Integer.parseInt(serverName.substring(portLoc + 1)));<NEW_LINE>serverName = serverName.substring(0, portLoc);<NEW_LINE>}<NEW_LINE>if (!serverName.isEmpty()) {<NEW_LINE>builder.host(serverName);<NEW_LINE>}<NEW_LINE>return builder;<NEW_LINE>}
(split[1], ";");
1,728,708
private void concretePassword(List<PersonItem> people) throws Exception {<NEW_LINE>Pattern pattern = Pattern.compile(com.x.base.core.project.config.Person.REGULAREXPRESSION_SCRIPT);<NEW_LINE>Matcher matcher = pattern.matcher(Config.person().getPassword());<NEW_LINE>if (matcher.matches()) {<NEW_LINE>CompiledScript cs = ScriptingFactory.functionalizationCompile(StringEscapeUtils.unescapeJson(matcher.group(1)));<NEW_LINE>ScriptContext scriptContext = ScriptingFactory.scriptContextEvalInitialServiceScript();<NEW_LINE>Bindings bindings = scriptContext.getBindings(ScriptContext.ENGINE_SCOPE);<NEW_LINE>for (PersonItem o : people) {<NEW_LINE>bindings.<MASK><NEW_LINE>String pass = JsonScriptingExecutor.evalString(cs, scriptContext);<NEW_LINE>o.setPassword(pass);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (PersonItem o : people) {<NEW_LINE>o.setPassword(Config.person().getPassword());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (PersonItem o : people) {<NEW_LINE>o.setPassword(Crypto.encrypt(o.getPassword(), Config.token().getKey()));<NEW_LINE>}<NEW_LINE>}
put(ScriptingFactory.BINDING_NAME_SERVICE_PERSON, o);
370,284
private CaptureDescription cloneCurrentSettings() {<NEW_LINE>Objects.requireNonNull(this.currentSettings);<NEW_LINE>CaptureDescription clone = new CaptureDescription();<NEW_LINE>clone.withSizeLimitInBytes(this.currentSettings.sizeLimitInBytes());<NEW_LINE>clone.withSkipEmptyArchives(this.currentSettings.skipEmptyArchives());<NEW_LINE>clone.withIntervalInSeconds(this.currentSettings.intervalInSeconds());<NEW_LINE>clone.withEnabled(this.currentSettings.enabled());<NEW_LINE>clone.withEncoding(this.currentSettings.encoding());<NEW_LINE>if (this.currentSettings.destination() != null) {<NEW_LINE>clone<MASK><NEW_LINE>clone.destination().withArchiveNameFormat(this.currentSettings.destination().archiveNameFormat());<NEW_LINE>clone.destination().withBlobContainer(this.currentSettings.destination().blobContainer());<NEW_LINE>clone.destination().withName(this.currentSettings.destination().name());<NEW_LINE>clone.destination().withStorageAccountResourceId(this.currentSettings.destination().storageAccountResourceId());<NEW_LINE>} else {<NEW_LINE>clone.withDestination(new Destination());<NEW_LINE>}<NEW_LINE>return clone;<NEW_LINE>}
.withDestination(new Destination());
1,146,441
public BType visit(BStreamType originalType, BType expType) {<NEW_LINE>BStreamType matchingType = (BStreamType) getMatchingTypeForInferrableType(originalType, expType);<NEW_LINE>boolean hasMatchedStreamType = matchingType != null;<NEW_LINE>BStreamType expStreamType = hasMatchedStreamType ? matchingType : null;<NEW_LINE>BType expConstraint <MASK><NEW_LINE>BType newConstraint = originalType.constraint.accept(this, expConstraint);<NEW_LINE>BType newError = null;<NEW_LINE>if (originalType.completionType != null) {<NEW_LINE>BType expError = hasMatchedStreamType ? matchingType.completionType : null;<NEW_LINE>newError = originalType.completionType.accept(this, expError);<NEW_LINE>}<NEW_LINE>if (isSameType(newConstraint, originalType.constraint) && isSameType(newError, originalType.completionType)) {<NEW_LINE>return originalType;<NEW_LINE>}<NEW_LINE>if (isSemanticErrorInInvocation(newConstraint) || isSemanticErrorInInvocation(newError)) {<NEW_LINE>return symbolTable.semanticError;<NEW_LINE>}<NEW_LINE>BStreamType type = new BStreamType(originalType.tag, newConstraint, newError, null);<NEW_LINE>setFlags(type, originalType.flags);<NEW_LINE>return type;<NEW_LINE>}
= hasMatchedStreamType ? expStreamType.constraint : null;
1,343,956
static JSType filterNoResolvedType(JSType type) {<NEW_LINE>if (type.isNoResolvedType()) {<NEW_LINE>// inf(UnresolvedType1, UnresolvedType2) needs to resolve<NEW_LINE>// to the base unresolved type, so that the relation is symmetric.<NEW_LINE>return type.getNativeType(JSTypeNative.NO_RESOLVED_TYPE);<NEW_LINE>} else if (type.isUnionType()) {<NEW_LINE>UnionType unionType = type.toMaybeUnionType();<NEW_LINE>boolean needsFiltering = false;<NEW_LINE>ImmutableList<JSType> alternatesList = unionType.getAlternates();<NEW_LINE>for (int i = 0; i < alternatesList.size(); i++) {<NEW_LINE>JSType alt = alternatesList.get(i);<NEW_LINE>if (alt.isNoResolvedType()) {<NEW_LINE>needsFiltering = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (needsFiltering) {<NEW_LINE>UnionType.Builder builder = UnionType.builder(type.registry).addAlternate(type<MASK><NEW_LINE>for (int i = 0; i < alternatesList.size(); i++) {<NEW_LINE>JSType alt = alternatesList.get(i);<NEW_LINE>if (!alt.isNoResolvedType()) {<NEW_LINE>builder.addAlternate(alt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return type;<NEW_LINE>}
.getNativeType(JSTypeNative.NO_RESOLVED_TYPE));
191,068
public void onCreate(Bundle icicle) {<NEW_LINE>super.onCreate(icicle);<NEW_LINE><MASK><NEW_LINE>imagePreview = (ImageView) findViewById(R.id.preview);<NEW_LINE>ListView filesList = (ListView) findViewById(R.id.filesList);<NEW_LINE>files = getImages();<NEW_LINE>List<String> names = new ArrayList<String>();<NEW_LINE>Iterator<String> it = files.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>names.add(Utils.getBaseName(it.next()));<NEW_LINE>}<NEW_LINE>filesList.setAdapter(new ArrayAdapter<String>(this, R.layout.file_row, names));<NEW_LINE>Button okButton = (Button) findViewById(R.id.okButton);<NEW_LINE>Button cancelButton = (Button) findViewById(R.id.cancelButton);<NEW_LINE>TextView lookIn = (TextView) findViewById(R.id.lookIn);<NEW_LINE>lookIn.setText("Look In: Gallery");<NEW_LINE>okButton.setOnClickListener(this);<NEW_LINE>cancelButton.setOnClickListener(this);<NEW_LINE>filesList.setOnItemClickListener(new OnItemClickListener() {<NEW_LINE><NEW_LINE>public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {<NEW_LINE>try {<NEW_LINE>String file = files.get(position);<NEW_LINE>Logger.D(TAG, "Selected file: " + file);<NEW_LINE>int intDividerforwidth = getWindowManager().getDefaultDisplay().getWidth() / 3;<NEW_LINE>int intDividerforHeight = getWindowManager().getDefaultDisplay().getHeight() / 4;<NEW_LINE>if (getWindowManager().getDefaultDisplay().getHeight() <= getWindowManager().getDefaultDisplay().getWidth()) {<NEW_LINE>intDividerforHeight = getWindowManager().getDefaultDisplay().getWidth() / 4;<NEW_LINE>intDividerforwidth = getWindowManager().getDefaultDisplay().getHeight() / 3;<NEW_LINE>}<NEW_LINE>BitmapFactory.Options options = new BitmapFactory.Options();<NEW_LINE>options.inSampleSize = 10;<NEW_LINE>Bitmap bm = BitmapFactory.decodeFile(file, options);<NEW_LINE>if (bm != null)<NEW_LINE>bm = Bitmap.createScaledBitmap(bm, intDividerforHeight, intDividerforwidth, true);<NEW_LINE>if (bm != null) {<NEW_LINE>imagePreview.setImageBitmap(bm);<NEW_LINE>selectedFile = file;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.E(TAG, e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
setContentView(R.layout.directory_list);
1,592,145
public static void findClasspathOrder(final ClassLoader classLoader, final ClasspathOrder classpathOrder, final ScanSpec scanSpec, final LogNode log) {<NEW_LINE>Object smartClassPath;<NEW_LINE>final Object appLoader = ReflectionUtils.getFieldVal(false, classLoader, "appLoader");<NEW_LINE>if (appLoader != null) {<NEW_LINE>smartClassPath = ReflectionUtils.<MASK><NEW_LINE>} else {<NEW_LINE>smartClassPath = ReflectionUtils.getFieldVal(false, classLoader, "smartClassPath");<NEW_LINE>}<NEW_LINE>if (smartClassPath != null) {<NEW_LINE>// "com.ibm.ws.classloading.internal.ContainerClassLoader$SmartClassPath"<NEW_LINE>// interface specifies a "getClassPath" to return all urls that makeup its path.<NEW_LINE>final Collection<Object> paths = callGetUrls(smartClassPath, "getClassPath");<NEW_LINE>if (!paths.isEmpty()) {<NEW_LINE>for (final Object path : paths) {<NEW_LINE>classpathOrder.addClasspathEntry(path, classLoader, scanSpec, log);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// "getClassPath" didn't work... reverting to looping over "classPath" elements.<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final List<Object> classPathElements = (List<Object>) ReflectionUtils.getFieldVal(false, smartClassPath, "classPath");<NEW_LINE>if (classPathElements != null && !classPathElements.isEmpty()) {<NEW_LINE>for (final Object classPathElement : classPathElements) {<NEW_LINE>final Collection<Object> subPaths = getPaths(classPathElement);<NEW_LINE>for (final Object path : subPaths) {<NEW_LINE>classpathOrder.addClasspathEntry(path, classLoader, scanSpec, log);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getFieldVal(false, appLoader, "smartClassPath");
559,411
final GetUICustomizationResult executeGetUICustomization(GetUICustomizationRequest getUICustomizationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getUICustomizationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetUICustomizationRequest> request = null;<NEW_LINE>Response<GetUICustomizationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetUICustomizationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getUICustomizationRequest));<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, "Cognito Identity Provider");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetUICustomization");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetUICustomizationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetUICustomizationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,409,396
public FulfillmentGroup addItemToFulfillmentGroup(Order order, OrderItem item, FulfillmentGroup fulfillmentGroup, int quantity, boolean priceOrder) throws PricingException {<NEW_LINE>// 1) Find the item's existing fulfillment group, if any<NEW_LINE>for (FulfillmentGroup fg : order.getFulfillmentGroups()) {<NEW_LINE>Iterator<FulfillmentGroupItem> itr = fg.getFulfillmentGroupItems().iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>FulfillmentGroupItem fgItem = itr.next();<NEW_LINE>if (fgItem.getOrderItem().equals(item)) {<NEW_LINE>// 2) remove item from it's existing fulfillment group<NEW_LINE>itr.remove();<NEW_LINE>fulfillmentGroupItemDao.delete(fgItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (fulfillmentGroup.getId() == null) {<NEW_LINE>// API user is trying to add an item to a fulfillment group not created<NEW_LINE>fulfillmentGroup = addFulfillmentGroupToOrder(order, fulfillmentGroup, priceOrder);<NEW_LINE>}<NEW_LINE>FulfillmentGroupItem fgi = createFulfillmentGroupItemFromOrderItem(item, fulfillmentGroup, quantity);<NEW_LINE><MASK><NEW_LINE>// 3) add the item to the new fulfillment group<NEW_LINE>fulfillmentGroup.addFulfillmentGroupItem(fgi);<NEW_LINE>order = updateOrder(order, priceOrder);<NEW_LINE>return fulfillmentGroup;<NEW_LINE>}
fgi = fulfillmentGroupItemDao.save(fgi);
1,020,534
public List<RedisNode> sortRedisNodeList(List<RedisNode> redisNodeList) {<NEW_LINE>Map<String, Set<RedisNode>> masterAndReplicaMap = new LinkedHashMap<>();<NEW_LINE>redisNodeList.forEach(redisNode -> {<NEW_LINE>String nodeId = redisNode.getNodeId();<NEW_LINE><MASK><NEW_LINE>String masterId = redisNode.getMasterId();<NEW_LINE>if (Objects.equals(nodeRole, MASTER)) {<NEW_LINE>masterId = nodeId;<NEW_LINE>}<NEW_LINE>Set<RedisNode> replicaSet = masterAndReplicaMap.get(masterId);<NEW_LINE>if (replicaSet == null) {<NEW_LINE>replicaSet = new TreeSet<>((o1, o2) -> {<NEW_LINE>int compareRole = o1.getNodeRole().compareTo(o2.getNodeRole());<NEW_LINE>if (compareRole != 0) {<NEW_LINE>return compareRole;<NEW_LINE>}<NEW_LINE>int compareHost = o1.getHost().compareTo(o2.getHost());<NEW_LINE>if (compareHost != 0) {<NEW_LINE>return compareHost;<NEW_LINE>}<NEW_LINE>return o1.getPort() - o2.getPort();<NEW_LINE>});<NEW_LINE>}<NEW_LINE>replicaSet.add(redisNode);<NEW_LINE>masterAndReplicaMap.put(masterId, replicaSet);<NEW_LINE>});<NEW_LINE>List<RedisNode> redisNodeSorted = new ArrayList<>();<NEW_LINE>masterAndReplicaMap.values().forEach(redisNodeSorted::addAll);<NEW_LINE>return redisNodeSorted;<NEW_LINE>}
NodeRole nodeRole = redisNode.getNodeRole();
645,028
public void closing(CommandContext commandContext) {<NEW_LINE>// This logic needs to be done before the dbSqlSession is flushed<NEW_LINE>// which means it can't be done in the transaction pre-commit<NEW_LINE>Map<JobServiceConfiguration, AsyncHistorySessionData> sessionData = asyncHistorySession.getSessionData();<NEW_LINE>if (sessionData == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (JobServiceConfiguration jobServiceConfiguration : sessionData.keySet()) {<NEW_LINE>Map<String, List<ObjectNode>> jobData = sessionData.get(jobServiceConfiguration).getJobData();<NEW_LINE>if (!jobData.isEmpty()) {<NEW_LINE>List<ObjectNode> objectNodes = new ArrayList<>();<NEW_LINE>// First, the registered types<NEW_LINE>for (String type : asyncHistorySession.getJobDataTypes()) {<NEW_LINE>if (jobData.containsKey(type)) {<NEW_LINE>generateJson(<MASK><NEW_LINE>jobData.remove(type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Additional data for which the type is not registered<NEW_LINE>if (!jobData.isEmpty()) {<NEW_LINE>for (String type : jobData.keySet()) {<NEW_LINE>generateJson(jobServiceConfiguration, jobData, objectNodes, type);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// History job needs to be created in the context of which it originated<NEW_LINE>asyncHistoryListener.historyDataGenerated(jobServiceConfiguration, objectNodes);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
jobServiceConfiguration, jobData, objectNodes, type);
1,557,946
static boolean editModifiedCoordinates(@NonNull final Geocache cache, final Geopoint wpt) {<NEW_LINE>final String userToken = getUserToken(cache);<NEW_LINE>if (StringUtils.isEmpty(userToken)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final ObjectNode jo = new ObjectNode(JsonUtils.factory);<NEW_LINE>final ObjectNode dto = jo.putObject("dto"<MASK><NEW_LINE>if (wpt != null) {<NEW_LINE>dto.putObject("data").put("lat", wpt.getLatitudeE6() / 1E6).put("lng", wpt.getLongitudeE6() / 1E6);<NEW_LINE>}<NEW_LINE>final String uriSuffix = wpt != null ? "SetUserCoordinate" : "ResetUserCoordinate";<NEW_LINE>final String uriPrefix = "https://www.geocaching.com/seek/cache_details.aspx/";<NEW_LINE>try {<NEW_LINE>Network.completeWithSuccess(Network.postJsonRequest(uriPrefix + uriSuffix, jo));<NEW_LINE>Log.i("GCParser.editModifiedCoordinates - edited on GC.com");<NEW_LINE>return true;<NEW_LINE>} catch (final Exception ignored) {<NEW_LINE>Log.e("GCParser.deleteModifiedCoordinates - cannot delete modified coords");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
).put("ut", userToken);
1,084,243
protected String histItemFilterQueryProvider(FilterCriteria filter, int numberDecimalcount, String table, String simpleName, ZoneId timeZone) {<NEW_LINE>logger.debug("JDBC::getHistItemFilterQueryProvider filter = {}, numberDecimalcount = {}, table = {}, simpleName = {}", filter.toString(), numberDecimalcount, table, simpleName);<NEW_LINE>String filterString = "";<NEW_LINE>if (filter.getBeginDate() != null) {<NEW_LINE>filterString += filterString.isEmpty() ? " WHERE" : " AND";<NEW_LINE>filterString += " TIME>'" + JDBC_DATE_FORMAT.format(filter.getBeginDate().withZoneSameInstant(timeZone)) + "'";<NEW_LINE>}<NEW_LINE>if (filter.getEndDate() != null) {<NEW_LINE>filterString += filterString.isEmpty() ? " WHERE" : " AND";<NEW_LINE>filterString += " TIME<'" + JDBC_DATE_FORMAT.format(filter.getEndDate().withZoneSameInstant(timeZone)) + "'";<NEW_LINE>}<NEW_LINE>filterString += (filter.getOrdering() == <MASK><NEW_LINE>if (filter.getPageSize() != 0x7fffffff) {<NEW_LINE>// see:<NEW_LINE>// http://www.jooq.org/doc/3.5/manual/sql-building/sql-statements/select-statement/limit-clause/<NEW_LINE>filterString += " OFFSET " + filter.getPageNumber() * filter.getPageSize() + " LIMIT " + filter.getPageSize();<NEW_LINE>}<NEW_LINE>String queryString = "NUMBERITEM".equalsIgnoreCase(simpleName) && numberDecimalcount > -1 ? "SELECT time, ROUND(CAST (value AS numeric)," + numberDecimalcount + ") FROM " + table : "SELECT time, value FROM " + table;<NEW_LINE>if (!filterString.isEmpty()) {<NEW_LINE>queryString += filterString;<NEW_LINE>}<NEW_LINE>logger.debug("JDBC::query queryString = {}", queryString);<NEW_LINE>return queryString;<NEW_LINE>}
Ordering.ASCENDING) ? " ORDER BY time ASC" : " ORDER BY time DESC";