idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
79,957
protected void validateCidrs() {<NEW_LINE>if (getSourceCidrList() != null) {<NEW_LINE>String guestCidr = _networkService.getNetwork(getNetworkId()).getCidr();<NEW_LINE>for (String cidr : getSourceCidrList()) {<NEW_LINE><MASK><NEW_LINE>isValidIpCidr(cidr, "Source");<NEW_LINE>if (cidr.equals(NetUtils.ALL_IP4_CIDRS)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (!NetUtils.isNetworkAWithinNetworkB(cidr, guestCidr)) {<NEW_LINE>throw new ServerApiException(ApiErrorCode.PARAM_ERROR, String.format("[%s] is not within the guest CIDR [%s]. ", cidr, guestCidr));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Destination CIDR formatting check. Since it's optional param, no need to set a default as in the case of source.<NEW_LINE>if (destCidrList != null) {<NEW_LINE>for (String cidr : destCidrList) {<NEW_LINE>cidr = StringUtils.trim(cidr);<NEW_LINE>isValidIpCidr(cidr, "Destination");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
cidr = StringUtils.trim(cidr);
822,863
public Set<FileObject> extend(WebModule webModule) {<NEW_LINE>CreateSpringConfig createSpringConfig = new CreateSpringConfig(webModule);<NEW_LINE>FileObject webInf = webModule.getWebInf();<NEW_LINE>if (webInf == null) {<NEW_LINE>try {<NEW_LINE>FileObject documentBase = webModule.getDocumentBase();<NEW_LINE>if (documentBase == null) {<NEW_LINE>LOGGER.log(Level.INFO, "WebModule does not have valid documentBase");<NEW_LINE>return Collections.<FileObject>emptySet();<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>webInf = FileUtil.createFolder(documentBase, "WEB-INF");<NEW_LINE>} catch (IOException ex) {<NEW_LINE>LOGGER.log(Level.WARNING, "Exception during creating WEB-INF directory", ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (webInf != null) {<NEW_LINE>try {<NEW_LINE>FileSystem fs = webInf.getFileSystem();<NEW_LINE>fs.runAtomicAction(createSpringConfig);<NEW_LINE>} catch (IOException e) {<NEW_LINE>Logger.getLogger("global").log(Level.INFO, null, e);<NEW_LINE>return <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return createSpringConfig.getFilesToOpen();<NEW_LINE>}
Collections.<FileObject>emptySet();
1,060,416
public void init() {<NEW_LINE>root.getChildren().remove(dialog);<NEW_LINE>centerButton.setOnAction(action -> {<NEW_LINE>dialog.setTransitionType(DialogTransition.CENTER);<NEW_LINE>dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));<NEW_LINE>});<NEW_LINE>topButton.setOnAction(action -> {<NEW_LINE>dialog.setTransitionType(DialogTransition.TOP);<NEW_LINE>dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));<NEW_LINE>});<NEW_LINE>rightButton.setOnAction(action -> {<NEW_LINE>dialog.setTransitionType(DialogTransition.RIGHT);<NEW_LINE>dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));<NEW_LINE>});<NEW_LINE>bottomButton.setOnAction(action -> {<NEW_LINE>dialog.setTransitionType(DialogTransition.BOTTOM);<NEW_LINE>dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));<NEW_LINE>});<NEW_LINE>leftButton.setOnAction(action -> {<NEW_LINE>dialog.setTransitionType(DialogTransition.LEFT);<NEW_LINE>dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));<NEW_LINE>});<NEW_LINE>acceptButton.setOnAction(action -> dialog.close());<NEW_LINE>alertButton.setOnAction(action -> {<NEW_LINE>JFXAlert alert = new JFXAlert((Stage) alertButton.getScene().getWindow());<NEW_LINE>alert.initModality(Modality.APPLICATION_MODAL);<NEW_LINE>alert.setOverlayClose(false);<NEW_LINE>JFXDialogLayout layout = new JFXDialogLayout();<NEW_LINE>layout.setHeading(new Label("Modal Dialog using JFXAlert"));<NEW_LINE>layout.setBody(new Label("Lorem ipsum dolor sit amet, consectetur adipiscing elit," <MASK><NEW_LINE>JFXButton closeButton = new JFXButton("ACCEPT");<NEW_LINE>closeButton.getStyleClass().add("dialog-accept");<NEW_LINE>closeButton.setOnAction(event -> alert.hideWithAnimation());<NEW_LINE>layout.setActions(closeButton);<NEW_LINE>alert.setContent(layout);<NEW_LINE>alert.show();<NEW_LINE>});<NEW_LINE>}
+ " sed do eiusmod tempor incididunt ut labore et dolore magna" + " aliqua. Utenim ad minim veniam, quis nostrud exercitation" + " ullamco laboris nisi ut aliquip ex ea commodo consequat."));
1,790,560
protected Void doInBackground(CheckDirection... params) {<NEW_LINE>final CheckDirection direction = params[0];<NEW_LINE>try {<NEW_LINE>if (cancelled()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>clearCertificateErrorNotifications(direction);<NEW_LINE>checkServerSettings(direction);<NEW_LINE>if (cancelled()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>setResult(RESULT_OK);<NEW_LINE>finish();<NEW_LINE>} catch (AuthenticationFailedException afe) {<NEW_LINE>Timber.e(afe, "Error while testing settings");<NEW_LINE>showErrorDialog(R.string.account_setup_failed_dlg_auth_message_fmt, afe.getMessage() == null ? <MASK><NEW_LINE>} catch (CertificateValidationException cve) {<NEW_LINE>handleCertificateValidationException(cve);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Timber.e(e, "Error while testing settings");<NEW_LINE>String message = e.getMessage() == null ? "" : e.getMessage();<NEW_LINE>showErrorDialog(R.string.account_setup_failed_dlg_server_message_fmt, message);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
"" : afe.getMessage());
1,551,975
public static void vertical9(Kernel1D_S32 kernel, GrayS16 src, GrayI16 dst) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] 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 <MASK><NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<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>dataDst[indexDst++] = (short) total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
k9 = kernel.data[8];
1,834,035
public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new EPLSubselectUnfilteredExpression());<NEW_LINE>execs.add(new EPLSubselectUnfilteredUnlimitedStream());<NEW_LINE>execs.add(new EPLSubselectUnfilteredLengthWindow());<NEW_LINE>execs.add(new EPLSubselectUnfilteredAsAfterSubselect());<NEW_LINE>execs.add(new EPLSubselectUnfilteredWithAsWithinSubselect());<NEW_LINE>execs.add(new EPLSubselectUnfilteredNoAs());<NEW_LINE>execs.add(new EPLSubselectUnfilteredLastEvent());<NEW_LINE>execs.add(new EPLSubselectStartStopStatement());<NEW_LINE>execs.add(new EPLSubselectSelfSubselect());<NEW_LINE>execs.add(new EPLSubselectComputedResult());<NEW_LINE>execs.add(new EPLSubselectFilterInside());<NEW_LINE>execs.add(new EPLSubselectWhereClauseWithExpression());<NEW_LINE>execs<MASK><NEW_LINE>execs.add(new EPLSubselectUnfilteredStreamPriorOM());<NEW_LINE>execs.add(new EPLSubselectUnfilteredStreamPriorCompile());<NEW_LINE>execs.add(new EPLSubselectTwoSubqSelect());<NEW_LINE>execs.add(new EPLSubselectWhereClauseReturningTrue());<NEW_LINE>execs.add(new EPLSubselectJoinUnfiltered());<NEW_LINE>execs.add(new EPLSubselectInvalidSubselect());<NEW_LINE>return execs;<NEW_LINE>}
.add(new EPLSubselectCustomFunction());
335,734
private static File createKeystore(byte[] ca, byte[] cert, byte[] key, String password) throws IOException, InterruptedException {<NEW_LINE>File caFile = File.createTempFile(AbstractKafkaClientProperties.class.getName(), ".crt");<NEW_LINE>caFile.deleteOnExit();<NEW_LINE>Files.write(caFile.toPath(), ca);<NEW_LINE>File certFile = File.createTempFile(AbstractKafkaClientProperties.class.getName(), ".crt");<NEW_LINE>certFile.deleteOnExit();<NEW_LINE>Files.write(<MASK><NEW_LINE>File keyFile = File.createTempFile(AbstractKafkaClientProperties.class.getName(), ".key");<NEW_LINE>keyFile.deleteOnExit();<NEW_LINE>Files.write(keyFile.toPath(), key);<NEW_LINE>File keystore = File.createTempFile(AbstractKafkaClientProperties.class.getName(), ".keystore");<NEW_LINE>// Note horrible race condition, but this is only for testing<NEW_LINE>keystore.delete();<NEW_LINE>// RANDFILE=/tmp/.rnd openssl pkcs12 -export -in $3 -inkey $4 -name $HOSTNAME -password pass:$2 -out $1<NEW_LINE>// The following code is needed to avoid race-condition which we see from time to time<NEW_LINE>TestUtils.waitFor("client-keystore readiness", Constants.GLOBAL_POLL_INTERVAL, Constants.CO_OPERATION_TIMEOUT_MEDIUM, () -> Exec.exec("openssl", "pkcs12", "-export", "-in", certFile.getAbsolutePath(), "-inkey", keyFile.getAbsolutePath(), "-chain", "-CAfile", caFile.getAbsolutePath(), "-name", "dfbdbd", "-password", "pass:" + password, "-out", keystore.getAbsolutePath()).exitStatus());<NEW_LINE>keystore.deleteOnExit();<NEW_LINE>return keystore;<NEW_LINE>}
certFile.toPath(), cert);
1,305,676
private void rescue(JMethod method) {<NEW_LINE>if (method == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (liveFieldsAndMethods.add(method)) {<NEW_LINE>membersToRescueIfTypeIsInstantiated.remove(method);<NEW_LINE>if (dependencyRecorder != null) {<NEW_LINE>curMethodStack.add(method);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>accept(method);<NEW_LINE>if (dependencyRecorder != null) {<NEW_LINE>curMethodStack.remove(curMethodStack.size() - 1);<NEW_LINE>}<NEW_LINE>if (method.isJsniMethod() || method.canBeImplementedExternally()) {<NEW_LINE>// Returning from this method passes a value from JavaScript into Java.<NEW_LINE>maybeRescueJavaScriptObjectPassingIntoJava(method.getType());<NEW_LINE>}<NEW_LINE>if (method.canBeReferencedExternally() || method.canBeImplementedExternally()) {<NEW_LINE>for (JParameter param : method.getParams()) {<NEW_LINE>// Parameters in JsExport, JsType, JsFunction methods should not be pruned in order to<NEW_LINE>// keep the API intact.<NEW_LINE>if (method.canBeReferencedExternally()) {<NEW_LINE>maybeRescueJavaScriptObjectPassingIntoJava(param.getType());<NEW_LINE>}<NEW_LINE>rescue(param);<NEW_LINE>if (param.isVarargs()) {<NEW_LINE>assert method.isJsMethodVarargs();<NEW_LINE>// Rescue the (array) type of varargs parameters as the array creation is implicit.<NEW_LINE>JArrayType paramType = (JArrayType) param.getType().getUnderlyingType();<NEW_LINE>rescue(paramType, true);<NEW_LINE>// Rescue the class literal for the array type as it will be needed when<NEW_LINE>// ImplementJsVarargs inserts the method prelude to support the JS vararg calling<NEW_LINE>// convention.<NEW_LINE>rescue(program.getClassLiteralField(paramType.getLeafType()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>rescueOverridingMethods(method);<NEW_LINE>if (method == getClassMethod) {<NEW_LINE>rescueClassLiteralsIfGetClassIsLive();<NEW_LINE>}<NEW_LINE>if (method.getSpecialization() != null) {<NEW_LINE>rescue(method.getSpecialization().getTargetMethod());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
dependencyRecorder.methodIsLiveBecause(method, curMethodStack);
1,719,982
public int[] constructArray(int n, int k) {<NEW_LINE>List<Integer> <MASK><NEW_LINE>int maxSoFar = 1;<NEW_LINE>list.add(1);<NEW_LINE>boolean plus = true;<NEW_LINE>while (k > 0) {<NEW_LINE>if (plus) {<NEW_LINE>plus = false;<NEW_LINE>int num = list.get(list.size() - 1) + k;<NEW_LINE>maxSoFar = Math.max(maxSoFar, num);<NEW_LINE>list.add(num);<NEW_LINE>} else {<NEW_LINE>plus = true;<NEW_LINE>list.add(list.get(list.size() - 1) - k);<NEW_LINE>}<NEW_LINE>k--;<NEW_LINE>}<NEW_LINE>for (int start = maxSoFar + 1; start <= n; start++) {<NEW_LINE>list.add(start);<NEW_LINE>}<NEW_LINE>int[] result = new int[n];<NEW_LINE>for (int i = 0; i < list.size(); i++) {<NEW_LINE>result[i] = list.get(i);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
list = new ArrayList<>();
1,665,909
private void confirmRemove(@NonNull final DownloadItem downloadItem, @NonNull final List<File> downloadedFiles) {<NEW_LINE>OsmandApplication app = context.getMyApplication();<NEW_LINE>AlertDialog.Builder confirm = new AlertDialog.Builder(context);<NEW_LINE>String message;<NEW_LINE>if (downloadedFiles.size() > 1) {<NEW_LINE>message = context.getString(R.string.delete_number_files_question, downloadedFiles.size());<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>String visibleName = downloadItem.getVisibleName(context, regions);<NEW_LINE>String fileName = FileNameTranslationHelper.getFileName(context, regions, visibleName);<NEW_LINE>message = context.getString(R.string.delete_confirmation_msg, fileName);<NEW_LINE>}<NEW_LINE>confirm.setMessage(message);<NEW_LINE>confirm.setPositiveButton(R.string.shared_string_yes, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>LocalIndexType type = getLocalIndexType(downloadItem);<NEW_LINE>remove(type, downloadedFiles);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>confirm.setNegativeButton(R.string.shared_string_no, null);<NEW_LINE>confirm.show();<NEW_LINE>}
OsmandRegions regions = app.getRegions();
918,894
public ResponseEntity<Object> login(@RequestBody Map<String, String> requestBody) {<NEW_LINE>if (requestBody == null || !requestBody.containsKey(APP_ID) || !requestBody.containsKey("password")) {<NEW_LINE>return ResponseEntity.badRequest().build();<NEW_LINE>}<NEW_LINE>String <MASK><NEW_LINE>String password = requestBody.get("password");<NEW_LINE>SurenessAccount account = accountProvider.loadAccount(appId);<NEW_LINE>if (account == null || account.isDisabledAccount() || account.isExcessiveAttempts()) {<NEW_LINE>return ResponseEntity.status(HttpStatus.FORBIDDEN).build();<NEW_LINE>}<NEW_LINE>if (account.getPassword() != null) {<NEW_LINE>if (account.getSalt() != null) {<NEW_LINE>password = Md5Util.md5(password + account.getSalt());<NEW_LINE>}<NEW_LINE>if (!account.getPassword().equals(password)) {<NEW_LINE>return ResponseEntity.status(HttpStatus.FORBIDDEN).build();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Get the roles the user has - rbac<NEW_LINE>List<String> roles = account.getOwnRoles();<NEW_LINE>long refreshPeriodTime = 36000L;<NEW_LINE>// issue jwt<NEW_LINE>String jwt = JsonWebTokenUtil.issueJwt(UUID.randomUUID().toString(), appId, "token-server", refreshPeriodTime >> 1, roles, null, Boolean.FALSE);<NEW_LINE>Map<String, String> body = Collections.singletonMap("token", jwt);<NEW_LINE>return ResponseEntity.ok().body(body);<NEW_LINE>}
appId = requestBody.get("appId");
937,168
private // object.<NEW_LINE>void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {<NEW_LINE>in.defaultReadObject();<NEW_LINE>byte[] ec = new byte[Constants.EYE_CATCHER_LENGTH];<NEW_LINE>// d164415 start<NEW_LINE>int bytesRead = 0;<NEW_LINE>for (int offset = 0; offset < Constants.EYE_CATCHER_LENGTH; offset += bytesRead) {<NEW_LINE>bytesRead = in.read(ec, offset, Constants.EYE_CATCHER_LENGTH - offset);<NEW_LINE>if (bytesRead == -1) {<NEW_LINE>throw new IOException("end of input stream while reading eye catcher");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// d164415 end<NEW_LINE>// validate that the eyecatcher matches<NEW_LINE>for (int i = 0; i < eyecatcher.length; i++) {<NEW_LINE>if (eyecatcher[i] != ec[i]) {<NEW_LINE>throw new IOException();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// eyecatcher was ok, so read in remainder of the<NEW_LINE>// header<NEW_LINE>// platform<NEW_LINE>in.readShort();<NEW_LINE>// version<NEW_LINE>in.readShort();<NEW_LINE>// read in the data section:<NEW_LINE>// read in the finderEnumerator obj<NEW_LINE>finderEnumerator = <MASK><NEW_LINE>// read in the greedy flag<NEW_LINE>greedy = in.readBoolean();<NEW_LINE>// read in the elements obj<NEW_LINE>elements = (EJBObject[]) in.readObject();<NEW_LINE>// read in the exhausted flag<NEW_LINE>exhausted = in.readBoolean();<NEW_LINE>// read in the remoteEnumerator obj<NEW_LINE>vEnum = (RemoteEnumerator) in.readObject();<NEW_LINE>}
(PortableFinderEnumerator) in.readObject();
293,472
public Object visit(Object context1, NewOperatorExpression expr, boolean strict) {<NEW_LINE>ExecutionContext context = (ExecutionContext) context1;<NEW_LINE>Object ref = expr.getExpr().<MASK><NEW_LINE>Object memberExpr = getValue(context, ref);<NEW_LINE>Object[] args = new Object[expr.getArgumentExpressions().size()];<NEW_LINE>int i = 0;<NEW_LINE>for (Expression each : expr.getArgumentExpressions()) {<NEW_LINE>args[i] = getValue(context, each.accept(context, this, strict));<NEW_LINE>++i;<NEW_LINE>}<NEW_LINE>Object ctor = memberExpr;<NEW_LINE>if (ref instanceof Reference && ctor instanceof JSFunction) {<NEW_LINE>ctor = new DereferencedReference((Reference) ref, ctor);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return (DynJSBootstrapper.getInvokeHandler().construct(ctor, context, args));<NEW_LINE>} catch (NoSuchMethodError e) {<NEW_LINE>throw new ThrowException(context, context.createTypeError("cannot construct with: " + ref));<NEW_LINE>} catch (ThrowException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw new ThrowException(context, e);<NEW_LINE>}<NEW_LINE>}
accept(context, this, strict);
1,530,083
public OverrideAction unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>OverrideAction overrideAction = new OverrideAction();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Count", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>overrideAction.setCount(CountActionJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("None", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>overrideAction.setNone(NoneActionJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return overrideAction;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,435,413
public void selectionChanged(@NotNull FileEditorManagerEvent event) {<NEW_LINE>Project project = event.getManager().getProject();<NEW_LINE>if (!BuckProjectSettingsProvider.getInstance(project).isAutoFormatOnBlur()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileEditor newFileEditor = event.getNewEditor();<NEW_LINE>FileEditor oldFileEditor = event.getOldEditor();<NEW_LINE>if (oldFileEditor == null || oldFileEditor.equals(newFileEditor)) {<NEW_LINE>// still editing same file<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>VirtualFile virtualFile = oldFileEditor.getFile();<NEW_LINE>Document document = FileDocumentManager.getInstance().getDocument(virtualFile);<NEW_LINE>if (document == null) {<NEW_LINE>// couldn't find document<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PsiFile psiFile = PsiDocumentManager.getInstance<MASK><NEW_LINE>if (!BuckFileType.INSTANCE.equals(psiFile.getFileType())) {<NEW_LINE>// file type isn't a Buck file<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Runnable runnable = () -> BuildifierUtil.doReformat(project, virtualFile);<NEW_LINE>LOGGER.info("Autoformatting " + virtualFile.getPath());<NEW_LINE>CommandProcessor.getInstance().executeCommand(project, runnable, null, null, UndoConfirmationPolicy.DO_NOT_REQUEST_CONFIRMATION, document);<NEW_LINE>}
(project).getPsiFile(document);
1,602,151
public Builder mergeCollapsedCCProcessedDependencies(edu.stanford.nlp.pipeline.CoreNLPProtos.DependencyGraph value) {<NEW_LINE>if (collapsedCCProcessedDependenciesBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00002000) != 0) && collapsedCCProcessedDependencies_ != null && collapsedCCProcessedDependencies_ != edu.stanford.nlp.pipeline.CoreNLPProtos.DependencyGraph.getDefaultInstance()) {<NEW_LINE>collapsedCCProcessedDependencies_ = edu.stanford.nlp.pipeline.CoreNLPProtos.DependencyGraph.newBuilder(collapsedCCProcessedDependencies_).<MASK><NEW_LINE>} else {<NEW_LINE>collapsedCCProcessedDependencies_ = value;<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>} else {<NEW_LINE>collapsedCCProcessedDependenciesBuilder_.mergeFrom(value);<NEW_LINE>}<NEW_LINE>bitField0_ |= 0x00002000;<NEW_LINE>return this;<NEW_LINE>}
mergeFrom(value).buildPartial();
1,756,292
public static void drawAttributeAllocateButton(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {<NEW_LINE>// General Declarations<NEW_LINE>Paint paint = CacheForAttributeAllocateButton.paint;<NEW_LINE>// Local Colors<NEW_LINE>int fillColor75 = Color.argb(255, 135, 129, 144);<NEW_LINE>// Resize to Target Frame<NEW_LINE>canvas.save();<NEW_LINE>RectF resizedFrame = CacheForAttributeAllocateButton.resizedFrame;<NEW_LINE>HabiticaIcons.resizingBehaviorApply(resizing, CacheForAttributeAllocateButton.originalFrame, targetFrame, resizedFrame);<NEW_LINE>canvas.translate(resizedFrame.left, resizedFrame.top);<NEW_LINE>canvas.scale(resizedFrame.width() / 24f, resizedFrame.height() / 15f);<NEW_LINE>// Bezier<NEW_LINE>RectF bezierRect = CacheForAttributeAllocateButton.bezierRect;<NEW_LINE>bezierRect.set(0f, 0f, 24f, 15f);<NEW_LINE>Path bezierPath = CacheForAttributeAllocateButton.bezierPath;<NEW_LINE>bezierPath.reset();<NEW_LINE>bezierPath.moveTo(0f, 15f);<NEW_LINE>bezierPath.lineTo(12f, 0f);<NEW_LINE>bezierPath.lineTo(24f, 15f);<NEW_LINE><MASK><NEW_LINE>bezierPath.close();<NEW_LINE>paint.reset();<NEW_LINE>paint.setFlags(Paint.ANTI_ALIAS_FLAG);<NEW_LINE>bezierPath.setFillType(Path.FillType.EVEN_ODD);<NEW_LINE>paint.setStyle(Paint.Style.FILL);<NEW_LINE>paint.setColor(fillColor75);<NEW_LINE>canvas.drawPath(bezierPath, paint);<NEW_LINE>canvas.restore();<NEW_LINE>}
bezierPath.lineTo(0f, 15f);
754,235
public void read(org.apache.thrift.protocol.TProtocol iprot, updateBlobReplication_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.<MASK><NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(schemeField.id) {<NEW_LINE>case // SUCCESS<NEW_LINE>0:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.I32) {<NEW_LINE>struct.success = iprot.readI32();<NEW_LINE>struct.set_success_isSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case // KNF<NEW_LINE>1:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {<NEW_LINE>struct.knf = new KeyNotFoundException();<NEW_LINE>struct.knf.read(iprot);<NEW_LINE>struct.set_knf_isSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>iprot.readFieldEnd();<NEW_LINE>}<NEW_LINE>iprot.readStructEnd();<NEW_LINE>struct.validate();<NEW_LINE>}
apache.thrift.protocol.TField schemeField;
713,619
public void addEvent(ProfileEvent event) {<NEW_LINE>// parse<NEW_LINE>String eventUid = event.getUid();<NEW_LINE>long dispatchTime = event.getRawLogTime() - event.getRawLogTime() % MINUTE_MS;<NEW_LINE>String dispatchKey = eventUid + "." + dispatchTime;<NEW_LINE>//<NEW_LINE>DispatchProfile dispatchProfile = this.profileCache.get(dispatchKey);<NEW_LINE>if (dispatchProfile == null) {<NEW_LINE>dispatchProfile = new DispatchProfile(eventUid, event.getInlongGroupId(), event.getInlongStreamId(), dispatchTime);<NEW_LINE>this.profileCache.put(dispatchKey, dispatchProfile);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>boolean addResult = dispatchProfile.addEvent(event, maxPackCount, maxPackSize);<NEW_LINE>if (!addResult) {<NEW_LINE>DispatchProfile newDispatchProfile = new DispatchProfile(eventUid, event.getInlongGroupId(), event.getInlongStreamId(), dispatchTime);<NEW_LINE>DispatchProfile oldDispatchProfile = this.<MASK><NEW_LINE>this.dispatchQueue.offer(oldDispatchProfile);<NEW_LINE>outCounter.addAndGet(dispatchProfile.getCount());<NEW_LINE>newDispatchProfile.addEvent(event, maxPackCount, maxPackSize);<NEW_LINE>}<NEW_LINE>inCounter.incrementAndGet();<NEW_LINE>}
profileCache.put(dispatchKey, newDispatchProfile);
773,210
final ListFunctionsResult executeListFunctions(ListFunctionsRequest listFunctionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listFunctionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListFunctionsRequest> request = null;<NEW_LINE>Response<ListFunctionsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListFunctionsRequestMarshaller().marshall(super.beforeMarshalling(listFunctionsRequest));<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, "CloudFront");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListFunctions");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ListFunctionsResult> responseHandler = new StaxResponseHandler<ListFunctionsResult>(new ListFunctionsResultStaxUnmarshaller());<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);
710,766
public T linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>checkOpSize(2, inputs);<NEW_LINE>try {<NEW_LINE>BroadcastVariableModelSource modelSource = new BroadcastVariableModelSource(BROADCAST_MODEL_TABLE_NAME);<NEW_LINE>RecommMapper mapper = new RecommMapper(this.recommKernelBuilder, this.recommType, inputs[0].getSchema(), inputs[1].getSchema(), this.getParams());<NEW_LINE>DataSet<Row> modelRows = inputs[0]<MASK><NEW_LINE>DataSet<Row> resultRows;<NEW_LINE>if (getParams().get(ModelMapperParams.NUM_THREADS) <= 1) {<NEW_LINE>resultRows = inputs[1].getDataSet().map(new RecommAdapter(mapper, modelSource)).withBroadcastSet(modelRows, BROADCAST_MODEL_TABLE_NAME);<NEW_LINE>} else {<NEW_LINE>resultRows = inputs[1].getDataSet().flatMap(new RecommAdapterMT(mapper, modelSource, getParams().get(ModelMapperParams.NUM_THREADS))).withBroadcastSet(modelRows, BROADCAST_MODEL_TABLE_NAME);<NEW_LINE>}<NEW_LINE>TableSchema outputSchema = mapper.getOutputSchema();<NEW_LINE>this.setOutput(resultRows, outputSchema);<NEW_LINE>return (T) this;<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new RuntimeException(ex);<NEW_LINE>}<NEW_LINE>}
.getDataSet().rebalance();
973,321
private Set<Local> searchForArrayObject(IrMethod method) {<NEW_LINE>final Set<Local> arrays = new HashSet<>();<NEW_LINE>for (Stmt stmt : method.stmts) {<NEW_LINE>if (stmt.st == Stmt.ST.ASSIGN) {<NEW_LINE>// create an array<NEW_LINE>if (stmt.getOp1().vt == Value.VT.LOCAL) {<NEW_LINE>Local local = (Local) stmt.getOp1();<NEW_LINE>if (stmt.getOp2().vt == Value.VT.NEW_ARRAY || stmt.getOp2().vt == Value.VT.FILLED_ARRAY) {<NEW_LINE>arrays.add(local);<NEW_LINE>}<NEW_LINE>// assign index1<NEW_LINE>} else if (stmt.getOp1().vt == Value.VT.ARRAY) {<NEW_LINE>ArrayExpr ae = (ArrayExpr) stmt.getOp1();<NEW_LINE>if (ae.getOp1().vt == Value.VT.LOCAL) {<NEW_LINE>Local local = (Local) ae.getOp1();<NEW_LINE>arrays.add(local);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// assign index2<NEW_LINE>} else if (stmt.st == Stmt.ST.FILL_ARRAY_DATA) {<NEW_LINE>if (stmt.getOp1().vt == Value.VT.LOCAL) {<NEW_LINE>Local local = <MASK><NEW_LINE>arrays.add(local);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return arrays;<NEW_LINE>}
(Local) stmt.getOp1();
121,449
public static void sendCooldown(GeyserSession session) {<NEW_LINE>if (DEFAULT_SHOW_COOLDOWN == CooldownType.DISABLED)<NEW_LINE>return;<NEW_LINE>CooldownType sessionPreference = session.getPreferencesCache().getCooldownPreference();<NEW_LINE>if (sessionPreference == CooldownType.DISABLED)<NEW_LINE>return;<NEW_LINE>// 0.0 usually happens on login and causes issues with visuals; anything above 20 means a plugin like OldCombatMechanics is being used<NEW_LINE>if (session.getAttackSpeed() == 0.0 || session.getAttackSpeed() > 20)<NEW_LINE>return;<NEW_LINE>// Set the times to stay a bit with no fade in nor out<NEW_LINE>SetTitlePacket titlePacket = new SetTitlePacket();<NEW_LINE>titlePacket.setType(SetTitlePacket.Type.TIMES);<NEW_LINE>titlePacket.setStayTime(1000);<NEW_LINE>titlePacket.setText("");<NEW_LINE>titlePacket.setXuid("");<NEW_LINE>titlePacket.setPlatformOnlineId("");<NEW_LINE>session.sendUpstreamPacket(titlePacket);<NEW_LINE>session<MASK><NEW_LINE>// Needs to be sent or no subtitle packet is recognized by the client<NEW_LINE>titlePacket = new SetTitlePacket();<NEW_LINE>titlePacket.setType(SetTitlePacket.Type.TITLE);<NEW_LINE>titlePacket.setText(" ");<NEW_LINE>titlePacket.setXuid("");<NEW_LINE>titlePacket.setPlatformOnlineId("");<NEW_LINE>session.sendUpstreamPacket(titlePacket);<NEW_LINE>session.setLastHitTime(System.currentTimeMillis());<NEW_LINE>// Used later to prevent multiple scheduled cooldown threads<NEW_LINE>long lastHitTime = session.getLastHitTime();<NEW_LINE>computeCooldown(session, sessionPreference, lastHitTime);<NEW_LINE>}
.getWorldCache().markTitleTimesAsIncorrect();
471,867
public void calc(ComContext context) {<NEW_LINE>Iterable<Tuple3<Double, Double, Vector>> labledVectors = context.getObj(OptimVariable.trainData);<NEW_LINE>// get iterative coefficient from static memory.<NEW_LINE>Tuple2<DenseVector, Double> state = context.getObj(OptimVariable.currentCoef);<NEW_LINE>int size = state.f0.size();<NEW_LINE>DenseVector coef = state.f0;<NEW_LINE>if (objFunc == null) {<NEW_LINE>objFunc = ((List<OptimObjFunc>) context.getObj(OptimVariable.objFunc)).get(0);<NEW_LINE>}<NEW_LINE>Tuple2<DenseVector, double[]> grad = context.getObj(OptimVariable.dir);<NEW_LINE>// calculate local gradient<NEW_LINE>Double weightSum = objFunc.calcGradient(labledVectors, coef, grad.f0);<NEW_LINE>// prepare buffer vec for allReduce. the last element of vec is the weight Sum.<NEW_LINE>double[] buffer = context.getObj(OptimVariable.gradAllReduce);<NEW_LINE>if (buffer == null) {<NEW_LINE>buffer <MASK><NEW_LINE>context.putObj(OptimVariable.gradAllReduce, buffer);<NEW_LINE>}<NEW_LINE>for (int i = 0; i < size; ++i) {<NEW_LINE>buffer[i] = grad.f0.get(i) * weightSum;<NEW_LINE>}
= new double[size + 1];
291,859
public void actionPerformed(ActionEvent e) {<NEW_LINE>if (e.getSource() == expandButton) {<NEW_LINE>DefaultMutableTreeNode currentSelectedNodeInMC = (DefaultMutableTreeNode) this.moduleToRunTreeNodes.getLastSelectedPathComponent();<NEW_LINE>JMeterTreeNode nodeToExpandInTestPlanTree = null;<NEW_LINE>if (currentSelectedNodeInMC != null && currentSelectedNodeInMC.getUserObject() instanceof JMeterTreeNode) {<NEW_LINE>nodeToExpandInTestPlanTree = (JMeterTreeNode) currentSelectedNodeInMC.getUserObject();<NEW_LINE>}<NEW_LINE>if (nodeToExpandInTestPlanTree != null) {<NEW_LINE>TreePath treePath = new TreePath(nodeToExpandInTestPlanTree.getPath());<NEW_LINE>// changing selection in a test plan tree<NEW_LINE>GuiPackage.getInstance().getTreeListener().<MASK><NEW_LINE>// expanding tree to make referenced element visible in test plan tree<NEW_LINE>GuiPackage.getInstance().getTreeListener().getJTree().scrollPathToVisible(treePath);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getJTree().setSelectionPath(treePath);
1,226,301
protected void updateJobInfo(Set<Table> usedTables, List<Column> columns, QueryStats queryStats, JobState state, QueryError error, List<List<Object>> outputPreview, boolean postUpdate) {<NEW_LINE>if ((usedTables != null) && (usedTables.size() > 0)) {<NEW_LINE>job.getTablesUsed().addAll(usedTables);<NEW_LINE>}<NEW_LINE>if ((columns != null) && (columns.size() > 0)) {<NEW_LINE>job.setColumns(columns);<NEW_LINE>}<NEW_LINE>if (queryStats != null) {<NEW_LINE>job.setQueryStats(queryStats);<NEW_LINE>}<NEW_LINE>if ((state != null) && (job.getState() != JobState.FINISHED) && (job.getState() != JobState.FAILED)) {<NEW_LINE>job.setState(state);<NEW_LINE>}<NEW_LINE>if (error != null) {<NEW_LINE>FailureInfo failureInfo = new FailureInfo(error.getFailureInfo().getType(), error.getFailureInfo().getMessage(), null, Collections.<FailureInfo>emptyList(), Collections.<String>emptyList(), error.getFailureInfo().getErrorLocation());<NEW_LINE>QueryError queryError = new QueryError(error.getMessage(), error.getSqlState(), error.getErrorCode(), error.getErrorName(), error.getErrorType(), <MASK><NEW_LINE>job.setError(queryError);<NEW_LINE>}<NEW_LINE>if (postUpdate) {<NEW_LINE>eventBus.post(new JobUpdateEvent(job, outputPreview));<NEW_LINE>}<NEW_LINE>}
error.getErrorLocation(), failureInfo);
1,427,348
public Boolean delete(Integer id, String operator) {<NEW_LINE>LOGGER.info("begin to delete sink by id={}", id);<NEW_LINE>Preconditions.checkNotNull(id, ErrorCodeEnum.ID_IS_EMPTY.getMessage());<NEW_LINE>StreamSinkEntity entity = sinkMapper.selectByPrimaryKey(id);<NEW_LINE>Preconditions.checkNotNull(entity, ErrorCodeEnum.SINK_INFO_NOT_FOUND.getMessage());<NEW_LINE>groupCheckService.checkGroupStatus(entity.getInlongGroupId(), operator);<NEW_LINE>entity.setPreviousStatus(entity.getStatus());<NEW_LINE>entity.setStatus(InlongConstants.DELETED_STATUS);<NEW_LINE>entity.setIsDeleted(id);<NEW_LINE>entity.setModifier(operator);<NEW_LINE>entity.setModifyTime(new Date());<NEW_LINE>int <MASK><NEW_LINE>if (rowCount != InlongConstants.AFFECTED_ONE_ROW) {<NEW_LINE>LOGGER.error("sink has already updated with groupId={}, streamId={}, name={}, curVersion={}", entity.getInlongGroupId(), entity.getInlongStreamId(), entity.getSinkName(), entity.getVersion());<NEW_LINE>throw new BusinessException(ErrorCodeEnum.CONFIG_EXPIRED);<NEW_LINE>}<NEW_LINE>sinkFieldMapper.logicDeleteAll(id);<NEW_LINE>LOGGER.info("success to delete sink info: {}", entity);<NEW_LINE>return true;<NEW_LINE>}
rowCount = sinkMapper.updateByPrimaryKeySelective(entity);
1,844,657
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create context ContextOne start SupportBean_S0 end SupportBean_S1", path);<NEW_LINE>String eplCreate = namedWindow ? "@public context ContextOne create window MyInfra#keepall as (pkey0 string, pkey1 int, c0 long)" : "@public context ContextOne create table MyInfra as (pkey0 string primary key, pkey1 int primary key, c0 long)";<NEW_LINE>env.compileDeploy(eplCreate, path);<NEW_LINE>env.compileDeploy("context ContextOne insert into MyInfra select theString as pkey0, intPrimitive as pkey1, longPrimitive as c0 from SupportBean", path);<NEW_LINE>// start<NEW_LINE>env.sendEventBean(new SupportBean_S0(0));<NEW_LINE>makeSendSupportBean(env, "E1", 10, 100);<NEW_LINE>makeSendSupportBean(env, "E2", 20, 200);<NEW_LINE>register(env, path, 1, "context ContextOne select * from MyInfra output snapshot when terminated");<NEW_LINE>register(env, path, 2, "context ContextOne select count(*) as thecnt from MyInfra output snapshot when terminated");<NEW_LINE>register(<MASK><NEW_LINE>register(env, path, 4, "context ContextOne select pkey0, count(*) as thecnt from MyInfra group by pkey0 output snapshot when terminated");<NEW_LINE>register(env, path, 5, "context ContextOne select pkey0, pkey1, count(*) as thecnt from MyInfra group by pkey0 output snapshot when terminated");<NEW_LINE>register(env, path, 6, "context ContextOne select pkey0, pkey1, count(*) as thecnt from MyInfra group by rollup (pkey0, pkey1) output snapshot when terminated");<NEW_LINE>env.milestone(0);<NEW_LINE>// end<NEW_LINE>env.sendEventBean(new SupportBean_S1(0));<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s1", "pkey0,pkey1,c0".split(","), new Object[][] { { "E1", 10, 100L }, { "E2", 20, 200L } });<NEW_LINE>env.assertPropsNew("s2", "thecnt".split(","), new Object[] { 2L });<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s3", "pkey0,thecnt".split(","), new Object[][] { { "E1", 2L }, { "E2", 2L } });<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s4", "pkey0,thecnt".split(","), new Object[][] { { "E1", 1L }, { "E2", 1L } });<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s5", "pkey0,pkey1,thecnt".split(","), new Object[][] { { "E1", 10, 1L }, { "E2", 20, 1L } });<NEW_LINE>env.assertPropsPerRowLastNewAnyOrder("s6", "pkey0,pkey1,thecnt".split(","), new Object[][] { { "E1", 10, 1L }, { "E2", 20, 1L }, { "E1", null, 1L }, { "E2", null, 1L }, { null, null, 2L } });<NEW_LINE>env.undeployAll();<NEW_LINE>}
env, path, 3, "context ContextOne select pkey0, count(*) as thecnt from MyInfra output snapshot when terminated");
341,764
public void write(org.apache.thrift.protocol.TProtocol prot, TExternalCompaction struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetQueueName()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetCompactor()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>if (struct.isSetUpdates()) {<NEW_LINE>optionals.set(2);<NEW_LINE>}<NEW_LINE>if (struct.isSetJob()) {<NEW_LINE>optionals.set(3);<NEW_LINE>}<NEW_LINE>oprot.writeBitSet(optionals, 4);<NEW_LINE>if (struct.isSetQueueName()) {<NEW_LINE>oprot.writeString(struct.queueName);<NEW_LINE>}<NEW_LINE>if (struct.isSetCompactor()) {<NEW_LINE>oprot.writeString(struct.compactor);<NEW_LINE>}<NEW_LINE>if (struct.isSetUpdates()) {<NEW_LINE>{<NEW_LINE>oprot.writeI32(<MASK><NEW_LINE>for (java.util.Map.Entry<java.lang.Long, TCompactionStatusUpdate> _iter5 : struct.updates.entrySet()) {<NEW_LINE>oprot.writeI64(_iter5.getKey());<NEW_LINE>_iter5.getValue().write(oprot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (struct.isSetJob()) {<NEW_LINE>struct.job.write(oprot);<NEW_LINE>}<NEW_LINE>}
struct.updates.size());
1,116,811
private void startEnterRoom() {<NEW_LINE>if (TextUtils.isEmpty(mEditInputUserId.getText().toString().trim()) || TextUtils.isEmpty(mEditInputRoomId.getText().toString().trim())) {<NEW_LINE>Toast.makeText(VoiceChatRoomEnterActivity.this, getString(R.string.voicechatroom_room_input_error_tip), Toast.LENGTH_LONG).show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mRoleSelectFlag == TRTCCloudDef.TRTCRoleAnchor) {<NEW_LINE>Intent intent = new Intent(<MASK><NEW_LINE>intent.putExtra(Constant.ROOM_ID, mEditInputRoomId.getText().toString().trim());<NEW_LINE>intent.putExtra(Constant.USER_ID, mEditInputUserId.getText().toString().trim());<NEW_LINE>startActivity(intent);<NEW_LINE>} else if (mRoleSelectFlag == TRTCCloudDef.TRTCRoleAudience) {<NEW_LINE>Intent intent = new Intent(VoiceChatRoomEnterActivity.this, VoiceChatRoomAudienceActivity.class);<NEW_LINE>intent.putExtra(Constant.ROOM_ID, mEditInputRoomId.getText().toString().trim());<NEW_LINE>intent.putExtra(Constant.USER_ID, mEditInputUserId.getText().toString().trim());<NEW_LINE>startActivity(intent);<NEW_LINE>} else {<NEW_LINE>Toast.makeText(VoiceChatRoomEnterActivity.this, getString(R.string.voicechatroom_please_select_role), Toast.LENGTH_SHORT).show();<NEW_LINE>}<NEW_LINE>}
VoiceChatRoomEnterActivity.this, VoiceChatRoomAnchorActivity.class);
279,503
public void trigger(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {<NEW_LINE>RepetitionRule repetitionRule = ExpressionUtil.getRepetitionRule(planItemInstanceEntity);<NEW_LINE>if (repetitionRule != null && ExpressionUtil.evaluateRepetitionRule(commandContext, planItemInstanceEntity, planItemInstanceEntity.getStagePlanItemInstanceEntity())) {<NEW_LINE>PlanItemInstanceEntity eventPlanItemInstanceEntity = PlanItemInstanceUtil.copyAndInsertPlanItemInstance(commandContext, planItemInstanceEntity, false, false);<NEW_LINE>eventPlanItemInstanceEntity.setState(PlanItemInstanceState.AVAILABLE);<NEW_LINE>CmmnEngineAgenda agenda = CommandContextUtil.getAgenda(commandContext);<NEW_LINE>agenda.planCreatePlanItemInstanceWithoutEvaluationOperation(eventPlanItemInstanceEntity);<NEW_LINE>agenda.planOccurPlanItemInstanceOperation(eventPlanItemInstanceEntity);<NEW_LINE>CommandContextUtil.getCmmnEngineConfiguration(commandContext).getListenerNotificationHelper().executeLifecycleListeners(commandContext, planItemInstanceEntity, null, PlanItemInstanceState.AVAILABLE);<NEW_LINE>} else {<NEW_LINE>CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);<NEW_LINE>EventSubscriptionService eventSubscriptionService = cmmnEngineConfiguration.getEventSubscriptionServiceConfiguration().getEventSubscriptionService();<NEW_LINE>String signalName = null;<NEW_LINE>if (StringUtils.isNotEmpty(signalRef)) {<NEW_LINE>Expression signalExpression = CommandContextUtil.getCmmnEngineConfiguration(commandContext).<MASK><NEW_LINE>signalName = signalExpression.getValue(planItemInstanceEntity).toString();<NEW_LINE>}<NEW_LINE>List<EventSubscriptionEntity> eventSubscriptions = eventSubscriptionService.findEventSubscriptionsBySubScopeId(planItemInstanceEntity.getId());<NEW_LINE>for (EventSubscriptionEntity eventSubscription : eventSubscriptions) {<NEW_LINE>if (eventSubscription instanceof SignalEventSubscriptionEntity && eventSubscription.getEventName().equals(signalName)) {<NEW_LINE>eventSubscriptionService.deleteEventSubscription(eventSubscription);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>CommandContextUtil.getAgenda(commandContext).planOccurPlanItemInstanceOperation(planItemInstanceEntity);<NEW_LINE>}<NEW_LINE>}
getExpressionManager().createExpression(signalRef);
1,297,945
public boolean supportsLanguage(Language language) {<NEW_LINE>try {<NEW_LINE>List<Class<? extends Rule>> <MASK><NEW_LINE>UserConfig config = new UserConfig();<NEW_LINE>List<Rule> relevantRules = new ArrayList<>(// empty UserConfig has to be added to prevent null pointer exception<NEW_LINE>language.// empty UserConfig has to be added to prevent null pointer exception<NEW_LINE>getRelevantRules(// empty UserConfig has to be added to prevent null pointer exception<NEW_LINE>JLanguageTool.getMessageBundle(), // empty UserConfig has to be added to prevent null pointer exception<NEW_LINE>config, // empty UserConfig has to be added to prevent null pointer exception<NEW_LINE>null, Collections.emptyList()));<NEW_LINE>relevantRules.addAll(language.getRelevantLanguageModelCapableRules(JLanguageTool.getMessageBundle(), null, null, config, null, Collections.emptyList()));<NEW_LINE>for (Rule relevantRule : relevantRules) {<NEW_LINE>relevantRuleClasses.add(relevantRule.getClass());<NEW_LINE>}<NEW_LINE>return relevantRuleClasses.contains(this.getClass());<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}
relevantRuleClasses = new ArrayList<>();
1,301,682
public void drawBackground(@Nonnull PoseStack matrix, int mouseX, int mouseY, float partialTicks) {<NEW_LINE>super.drawBackground(<MASK><NEW_LINE>matrix.pushPose();<NEW_LINE>// TODO: Figure out why we need a translation of 1 to fix the text intersecting for the dictionary but it works just fine<NEW_LINE>// for the QIO item viewer<NEW_LINE>matrix.translate(0, 0, 1);<NEW_LINE>renderBackgroundTexture(matrix, getResource(), GuiInnerScreen.SCREEN_SIZE, GuiInnerScreen.SCREEN_SIZE);<NEW_LINE>int index = getHoveredIndex(mouseX, mouseY);<NEW_LINE>if (index != -1) {<NEW_LINE>GuiUtils.drawOutline(matrix, x + 1, y + 12 + index * 10, width - 2, 10, screenTextColor());<NEW_LINE>}<NEW_LINE>TYPE current = curType.get();<NEW_LINE>if (current.getIcon() != null) {<NEW_LINE>RenderSystem.setShaderTexture(0, current.getIcon());<NEW_LINE>blit(matrix, x + width - 9, y + 3, 0, 0, 6, 6, 6, 6);<NEW_LINE>}<NEW_LINE>if (isOpen) {<NEW_LINE>for (int i = 0; i < options.length; i++) {<NEW_LINE>ResourceLocation icon = options[i].getIcon();<NEW_LINE>if (icon != null) {<NEW_LINE>RenderSystem.setShaderTexture(0, icon);<NEW_LINE>blit(matrix, x + width - 9, y + 12 + 2 + 10 * i, 0, 0, 6, 6, 6, 6);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>matrix.popPose();<NEW_LINE>}
matrix, mouseX, mouseY, partialTicks);
175,049
public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE><MASK><NEW_LINE>if (o != null && o instanceof Range) {<NEW_LINE>double x1 = ((Range) o).getLower();<NEW_LINE>double x2 = ((Range) o).getUpper();<NEW_LINE>if (Math.abs(x1 - x2) < DateUtil.MILLIS_PER_FIVE_MINUTE) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (x1 < x2) {<NEW_LINE>rangeX1 = x1;<NEW_LINE>rangeX2 = x2;<NEW_LINE>} else {<NEW_LINE>rangeX1 = x2;<NEW_LINE>rangeX2 = x1;<NEW_LINE>}<NEW_LINE>cntGraph.primaryXAxis.setRange(rangeX1, rangeX2);<NEW_LINE>zoomMode = true;<NEW_LINE>cntCanvas.notifyListeners(SWT.Resize, new Event());<NEW_LINE>adjustYAxisRange(cntGraph, cntTraceMap.values());<NEW_LINE>updateTextDate();<NEW_LINE>}<NEW_LINE>}
Object o = evt.getNewValue();
1,135,222
private static void tryAssertionOutputRateEventsAll(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "cnt" };<NEW_LINE>// varargs: sends 2 events<NEW_LINE>sendSupportBeans(env, "E1", "E2");<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendSupportBeans(env, "E3");<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 3L });<NEW_LINE>// set output limit to 5<NEW_LINE>String stmtTextSet = "on SupportMarketDataBean set var_output_limit = volume";<NEW_LINE>env.compileDeploy(stmtTextSet);<NEW_LINE>sendSetterBean(env, 5L);<NEW_LINE>// send 4 events<NEW_LINE>sendSupportBeans(env, "E4", "E5", "E6", "E7");<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendSupportBeans(env, "E8");<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 8L });<NEW_LINE>// set output limit to 2<NEW_LINE>sendSetterBean(env, 2L);<NEW_LINE>// send 1 events<NEW_LINE>sendSupportBeans(env, "E9");<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendSupportBeans(env, "E10");<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 10L });<NEW_LINE>// set output limit to 1<NEW_LINE>sendSetterBean(env, 1L);<NEW_LINE>sendSupportBeans(env, "E11");<NEW_LINE>env.assertPropsNew("s0", fields, <MASK><NEW_LINE>sendSupportBeans(env, "E12");<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 12L });<NEW_LINE>// set output limit to null -- this continues at the current rate<NEW_LINE>sendSetterBean(env, null);<NEW_LINE>sendSupportBeans(env, "E13");<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { 13L });<NEW_LINE>}
new Object[] { 11L });
504,101
private ServiceVirtualMachine createServiceVM(DataCenter zone, Account owner, VirtualMachineTemplate template, ServiceOffering serviceOffering, String name, ServiceInstance siObj, Network left, Network right) {<NEW_LINE>long id = _vmDao.getNextInSequence(Long.class, "id");<NEW_LINE>DataCenterDeployment plan = new DataCenterDeployment(zone.getId());<NEW_LINE>LinkedHashMap<NetworkVO, List<? extends NicProfile>> networks = new LinkedHashMap<NetworkVO, List<? extends NicProfile>>();<NEW_LINE>NetworkVO linklocal = (NetworkVO) _networkModel.getSystemNetworkByZoneAndTrafficType(zone.getId(), TrafficType.Management);<NEW_LINE>networks.put(linklocal, new ArrayList<NicProfile>());<NEW_LINE>networks.put((NetworkVO) left, new ArrayList<NicProfile>());<NEW_LINE>networks.put((NetworkVO) right, new ArrayList<NicProfile>());<NEW_LINE>String instanceName = VirtualMachineName.getVmName(id, <MASK><NEW_LINE>long userId = CallContext.current().getCallingUserId();<NEW_LINE>if (CallContext.current().getCallingAccount().getId() != owner.getId()) {<NEW_LINE>List<UserVO> userVOs = _userDao.listByAccount(owner.getAccountId());<NEW_LINE>if (!userVOs.isEmpty()) {<NEW_LINE>userId = userVOs.get(0).getId();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ServiceVirtualMachine svm = new ServiceVirtualMachine(id, instanceName, name, template.getId(), serviceOffering.getId(), template.getHypervisorType(), template.getGuestOSId(), zone.getId(), owner.getDomainId(), owner.getAccountId(), userId, false);<NEW_LINE>// database synchronization code must be able to distinguish service instance VMs.<NEW_LINE>Map<String, String> kvmap = new HashMap<String, String>();<NEW_LINE>kvmap.put("service-instance", siObj.getUuid());<NEW_LINE>Gson json = new Gson();<NEW_LINE>String userData = json.toJson(kvmap);<NEW_LINE>svm.setUserData(userData);<NEW_LINE>try {<NEW_LINE>_vmManager.allocate(instanceName, template, serviceOffering, networks, plan, template.getHypervisorType());<NEW_LINE>} catch (InsufficientCapacityException ex) {<NEW_LINE>throw new CloudRuntimeException("Insufficient capacity", ex);<NEW_LINE>}<NEW_LINE>CallContext.current().setEventDetails("Vm Id: " + svm.getId());<NEW_LINE>return svm;<NEW_LINE>}
owner.getId(), "SRV");
1,626,580
final DeleteVpnConnectionRouteResult executeDeleteVpnConnectionRoute(DeleteVpnConnectionRouteRequest deleteVpnConnectionRouteRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVpnConnectionRouteRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteVpnConnectionRouteRequest> request = null;<NEW_LINE>Response<DeleteVpnConnectionRouteResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteVpnConnectionRouteRequestMarshaller().marshall(super.beforeMarshalling(deleteVpnConnectionRouteRequest));<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, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteVpnConnectionRoute");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteVpnConnectionRouteResult> responseHandler = new StaxResponseHandler<DeleteVpnConnectionRouteResult>(new DeleteVpnConnectionRouteResultStaxUnmarshaller());<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.ADVANCED_CONFIG, advancedConfig);
1,030,016
public Object run() {<NEW_LINE>final RequestContext ctx = RequestContext.getCurrentContext();<NEW_LINE>logger.info("in zuul filter " + ctx.getRequest().getRequestURI());<NEW_LINE>byte[] encoded;<NEW_LINE>try {<NEW_LINE>encoded = Base64.getEncoder().encode("fooClientIdPassword:secret".getBytes("UTF-8"));<NEW_LINE>ctx.addZuulRequestHeader("Authorization", <MASK><NEW_LINE>logger.info("pre filter");<NEW_LINE>logger.info(ctx.getRequest().getHeader("Authorization"));<NEW_LINE>final HttpServletRequest req = ctx.getRequest();<NEW_LINE>final String refreshToken = extractRefreshToken(req);<NEW_LINE>if (refreshToken != null) {<NEW_LINE>final Map<String, String[]> param = new HashMap<String, String[]>();<NEW_LINE>param.put("refresh_token", new String[] { refreshToken });<NEW_LINE>param.put("grant_type", new String[] { "refresh_token" });<NEW_LINE>ctx.setRequest(new CustomHttpServletRequest(req, param));<NEW_LINE>}<NEW_LINE>} catch (final UnsupportedEncodingException e) {<NEW_LINE>logger.error("Error occured in pre filter", e);<NEW_LINE>}<NEW_LINE>//<NEW_LINE>return null;<NEW_LINE>}
"Basic " + new String(encoded));
1,583,476
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see<NEW_LINE>* com.fasterxml.jackson.databind.JsonDeserializer#deserialize(com.fasterxml<NEW_LINE>* .jackson. core.JsonParser,<NEW_LINE>* com.fasterxml.jackson.databind.DeserializationContext)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>@SuppressWarnings("deprecation")<NEW_LINE>public DecodedDeviceRequest<?> deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException {<NEW_LINE>JsonNode node = parser.getCodec().readTree(parser);<NEW_LINE>// Get type and validate its in the enum.<NEW_LINE>JsonNode typeNode = node.get("type");<NEW_LINE>if (typeNode == null) {<NEW_LINE>throw new JsonMappingException("Event type is required.");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Type type = Type.valueOf(typeNode.asText());<NEW_LINE>JsonNode request = node.get("request");<NEW_LINE>if (request == null) {<NEW_LINE>throw new IOException("Request is missing.");<NEW_LINE>}<NEW_LINE>JsonNode <MASK><NEW_LINE>if (deviceToken == null) {<NEW_LINE>throw new IOException("Device token is missing.");<NEW_LINE>}<NEW_LINE>JsonNode originator = node.get("originator");<NEW_LINE>return unmarshal(deviceToken.textValue(), (originator == null) ? null : originator.textValue(), type, request);<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>throw new JsonMappingException("Event type is not valid.");<NEW_LINE>}<NEW_LINE>}
deviceToken = node.get("deviceToken");
81,955
private Vector[] merge(int matrixId, int[] rowIds, Collection<Response> responses) {<NEW_LINE>Map<Integer, List<ServerRow>> rowIdToserverRows = new HashMap<>(rowIds.length);<NEW_LINE>int valueNum = responses.size();<NEW_LINE>for (Response response : responses) {<NEW_LINE>ServerRow[] serverRows = ((GetRowsSplitResponse) (response.getData())).getRowsSplit();<NEW_LINE>for (int j = 0; j < serverRows.length; j++) {<NEW_LINE>int rowId = serverRows[j].getRowId();<NEW_LINE>List<ServerRow> rowSplits = rowIdToserverRows.get(rowId);<NEW_LINE>if (rowSplits == null) {<NEW_LINE>rowSplits = new ArrayList<>(valueNum);<NEW_LINE>rowIdToserverRows.put(rowId, rowSplits);<NEW_LINE>}<NEW_LINE>rowSplits.add(serverRows[j]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Vector[] vectors = new Vector[rowIds.length];<NEW_LINE>for (int i = 0; i < rowIds.length; i++) {<NEW_LINE>vectors[i] = MergeUtils.combineServerRowSplits(rowIdToserverRows.get(rowIds[i]), matrixId, rowIds[i]);<NEW_LINE>vectors[i].setMatrixId(matrixId);<NEW_LINE>vectors[i]<MASK><NEW_LINE>}<NEW_LINE>return vectors;<NEW_LINE>}
.setRowId(rowIds[i]);
123,535
private void mergeRegularEarlyExit(FixedNode next, AbstractBeginNode exitBranchBegin, LoopExitNode oldExit, LoopBeginNode mainLoopBegin, StructuredGraph graph, EconomicMap<Node, Node> new2OldPhis, LoopEx loop) {<NEW_LINE>AbstractMergeNode merge = ((EndNode) next).merge();<NEW_LINE>assert merge instanceof MergeNode : "Can only merge loop exits on regular merges";<NEW_LINE><MASK><NEW_LINE>LoopExitNode lex = graph.add(new LoopExitNode(mainLoopBegin));<NEW_LINE>createExitStateForNewSegmentEarlyExit(graph, oldExit, lex, new2OldPhis);<NEW_LINE>EndNode end = graph.add(new EndNode());<NEW_LINE>exitBranchBegin.setNext(lex);<NEW_LINE>lex.setNext(end);<NEW_LINE>merge.addForwardEnd(end);<NEW_LINE>for (PhiNode phi : merge.phis()) {<NEW_LINE>ValueNode input = phi.valueAt((EndNode) next);<NEW_LINE>ValueNode replacement;<NEW_LINE>if (!loop.whole().contains(input)) {<NEW_LINE>// node is produced above the loop<NEW_LINE>replacement = input;<NEW_LINE>} else {<NEW_LINE>// if the node is inside this loop the input must be a proxy<NEW_LINE>replacement = patchProxyAtPhi(phi, lex, getNodeInExitPathFromUnrolledSegment((ProxyNode) input, new2OldPhis));<NEW_LINE>}<NEW_LINE>phi.addInput(replacement);<NEW_LINE>}<NEW_LINE>}
assert exitBranchBegin.next() == null;
846,823
private <T> Optional<T> internalGet(byte[] key, Function<byte[], T> trieRetriever, Function<byte[], T> cacheTransformer) {<NEW_LINE>ByteArrayWrapper wrapper = new ByteArrayWrapper(key);<NEW_LINE>ByteArrayWrapper accountWrapper = getAccountWrapper(wrapper);<NEW_LINE>Map<ByteArrayWrapper, byte[]> accountItems = cache.get(accountWrapper);<NEW_LINE>boolean isDeletedAccount = deleteRecursiveLog.contains(accountWrapper);<NEW_LINE>if (accountItems == null || !accountItems.containsKey(wrapper)) {<NEW_LINE>if (isDeletedAccount) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>// uncached account<NEW_LINE>return Optional.ofNullable(trieRetriever.apply(key));<NEW_LINE>}<NEW_LINE>byte[] cacheItem = accountItems.get(wrapper);<NEW_LINE>if (cacheItem == null) {<NEW_LINE>// deleted account key<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>// cached account key<NEW_LINE>return Optional.ofNullable<MASK><NEW_LINE>}
(cacheTransformer.apply(cacheItem));
209,272
private void createKeyValuePairLayout(String key, LinearLayout topLayout) {<NEW_LINE>LinearLayout linearLayout = new LinearLayout(getActivity());<NEW_LINE>linearLayout.setOrientation(LinearLayout.HORIZONTAL);<NEW_LINE>TextView keyTextView = new TextView(getActivity());<NEW_LINE>keyTextView.setTag("key" + key);<NEW_LINE>keyTextView.setText(key);<NEW_LINE>LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.<MASK><NEW_LINE>// llp.setMargins(left, top, right, bottom);<NEW_LINE>llp.setMargins(50, 40, 50, 10);<NEW_LINE>keyTextView.setLayoutParams(llp);<NEW_LINE>LinearLayout.LayoutParams llp1 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);<NEW_LINE>EditText valueEditText = new EditText(getActivity());<NEW_LINE>valueEditText.setTag("value" + key);<NEW_LINE>valueEditText.setLayoutParams(llp1);<NEW_LINE>linearLayout.addView(keyTextView);<NEW_LINE>linearLayout.addView(valueEditText);<NEW_LINE>topLayout.addView(linearLayout);<NEW_LINE>}
WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
56,158
private void loadNode996() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri, new QualifiedName(0, "SecurityPolicyUri"), new LocalizedText("en", "SecurityPolicyUri"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.String, -1, new UInteger[] {}, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri, Identifiers.HasTypeDefinition, Identifiers.BaseDataVariableType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics_SecurityPolicyUri, Identifiers.HasComponent, Identifiers.SessionDiagnosticsObjectType_SessionSecurityDiagnostics<MASK><NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), false));
353,445
private void readSchemesFromProviders(@Nonnull Map<String, E> result) {<NEW_LINE>assert myProvider != null;<NEW_LINE>for (String subPath : myProvider.listSubFiles(myFileSpec, myRoamingType)) {<NEW_LINE>try {<NEW_LINE>Element element = loadElementOrNull(myProvider.loadContent(getFileFullPath(subPath), myRoamingType));<NEW_LINE>if (element == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>E scheme = readScheme(element, true);<NEW_LINE>boolean fileRenamed = false;<NEW_LINE>assert scheme != null;<NEW_LINE>T existing = findSchemeByName(scheme.getName());<NEW_LINE>if (existing instanceof ExternalizableScheme) {<NEW_LINE>String currentFileName = ((ExternalizableScheme) existing).getExternalInfo().getCurrentFileName();<NEW_LINE>if (currentFileName != null && !currentFileName.equals(subPath)) {<NEW_LINE>deleteServerFile(subPath);<NEW_LINE>subPath = currentFileName;<NEW_LINE>fileRenamed = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String fileName = checkFileNameIsFree(<MASK><NEW_LINE>if (!fileRenamed && !fileName.equals(subPath)) {<NEW_LINE>deleteServerFile(subPath);<NEW_LINE>}<NEW_LINE>loadScheme(scheme, false, fileName);<NEW_LINE>scheme.getExternalInfo().markRemote();<NEW_LINE>result.put(scheme.getName(), scheme);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.info("Cannot load data from stream provider: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
subPath, scheme.getName());
1,417,760
protected void encodePanel(FacesContext context, AutoComplete ac) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>String styleClass = ac.getPanelStyleClass();<NEW_LINE>styleClass = styleClass == null ? AutoComplete.PANEL_CLASS : AutoComplete.PANEL_CLASS + " " + styleClass;<NEW_LINE>writer.startElement("span", null);<NEW_LINE>writer.writeAttribute("id", ac.getClientId(context) + "_panel", null);<NEW_LINE>writer.writeAttribute("class", styleClass, null);<NEW_LINE>writer.writeAttribute("role", "listbox", null);<NEW_LINE>writer.<MASK><NEW_LINE>if (ac.getPanelStyle() != null) {<NEW_LINE>writer.writeAttribute("style", ac.getPanelStyle(), null);<NEW_LINE>}<NEW_LINE>if (ac.isDynamic() && ac.isDynamicLoadRequest(context)) {<NEW_LINE>encodeResults(context, ac);<NEW_LINE>}<NEW_LINE>writer.endElement("span");<NEW_LINE>}
writeAttribute("tabindex", "-1", null);
1,001,181
public static <II extends ImageGray<II>> void harder(GrayF32 image) {<NEW_LINE>// SURF works off of integral images<NEW_LINE>Class<II> integralType = GIntegralImageOps.getIntegralType(GrayF32.class);<NEW_LINE>// define the feature detection algorithm<NEW_LINE>ConfigFastHessian config = new ConfigFastHessian();<NEW_LINE>config.extract = new ConfigExtract(2, 0, 5, true);<NEW_LINE>config.maxFeaturesPerScale = 200;<NEW_LINE>config.initialSampleStep = 2;<NEW_LINE>FastHessianFeatureDetector<II> detector = FactoryInterestPointAlgs.fastHessian(config);<NEW_LINE>// estimate orientation<NEW_LINE>OrientationIntegral<II> orientation = FactoryOrientationAlgs.sliding_ii(null, integralType);<NEW_LINE>DescribePointSurf<II> descriptor = FactoryDescribeAlgs.surfStability(null, integralType);<NEW_LINE>// compute the integral image of 'image'<NEW_LINE>II integral = GeneralizedImageOps.createSingleBand(integralType, image.width, image.height);<NEW_LINE>GIntegralImageOps.transform(image, integral);<NEW_LINE>// detect fast hessian features<NEW_LINE>detector.detect(integral);<NEW_LINE>// tell algorithms which image to process<NEW_LINE>orientation.setImage(integral);<NEW_LINE>descriptor.setImage(integral);<NEW_LINE>List<ScalePoint> points = detector.getFoundFeatures();<NEW_LINE>List<TupleDesc_F64> descriptions = new ArrayList<>();<NEW_LINE>for (ScalePoint p : points) {<NEW_LINE>// estimate orientation<NEW_LINE>orientation.setObjectRadius(<MASK><NEW_LINE>double angle = orientation.compute(p.pixel.x, p.pixel.y);<NEW_LINE>// extract the SURF description for this region<NEW_LINE>TupleDesc_F64 desc = descriptor.createDescription();<NEW_LINE>descriptor.describe(p.pixel.x, p.pixel.y, angle, p.scale, true, desc);<NEW_LINE>// save everything for processing later on<NEW_LINE>descriptions.add(desc);<NEW_LINE>}<NEW_LINE>System.out.println("Found Features: " + points.size());<NEW_LINE>System.out.println("First descriptor's first value: " + descriptions.get(0).data[0]);<NEW_LINE>}
p.scale * BoofDefaults.SURF_SCALE_TO_RADIUS);
1,386,326
private void configureLogging(Level logLevel, File logFile) throws IOException {<NEW_LINE>configuredLogLevel = logLevel;<NEW_LINE>System.setProperty("java.util.logging.SimpleFormatter.format", "[%1$tF %1$tT] %4$s [%2$s] %5$s%6$s%n");<NEW_LINE>java.util.logging.Logger liquibaseLogger = java.util.logging.Logger.getLogger("liquibase");<NEW_LINE>final JavaLogService logService = (JavaLogService) Scope.getCurrentScope().get(Scope.Attr.logService, LogService.class);<NEW_LINE>logService.setParent(liquibaseLogger);<NEW_LINE>java.util.logging.Logger rootLogger = java.util.<MASK><NEW_LINE>Level cliLogLevel = logLevel;<NEW_LINE>if (logFile != null) {<NEW_LINE>if (fileHandler == null) {<NEW_LINE>fileHandler = new FileHandler(logFile.getAbsolutePath(), true);<NEW_LINE>fileHandler.setFormatter(new SimpleFormatter());<NEW_LINE>rootLogger.addHandler(fileHandler);<NEW_LINE>}<NEW_LINE>fileHandler.setLevel(logLevel);<NEW_LINE>if (logLevel == Level.OFF) {<NEW_LINE>fileHandler.setLevel(Level.FINE);<NEW_LINE>}<NEW_LINE>cliLogLevel = Level.OFF;<NEW_LINE>}<NEW_LINE>rootLogger.setLevel(logLevel);<NEW_LINE>liquibaseLogger.setLevel(logLevel);<NEW_LINE>for (Handler handler : rootLogger.getHandlers()) {<NEW_LINE>if (handler instanceof ConsoleHandler) {<NEW_LINE>handler.setLevel(cliLogLevel);<NEW_LINE>}<NEW_LINE>handler.setFilter(new SecureLogFilter(logService.getFilter()));<NEW_LINE>}<NEW_LINE>}
logging.Logger.getLogger("");
1,688,912
private void handleNewJobLogPart() {<NEW_LINE>// Ensure a publisher has been injected, otherwise do not send job log event to be published<NEW_LINE>if (getBatchEventsPublisher() != null) {<NEW_LINE>String logContent = null;<NEW_LINE>try {<NEW_LINE>// get the content of the job log part<NEW_LINE>logContent = new String(Files.readAllBytes(previousLogPath), StandardCharsets.UTF_8);<NEW_LINE>} catch (IOException e) {<NEW_LINE>logger.log(Level.WARNING, "job.logging.read.log", new Object[] { ((e.getCause() != null) ? e.getCause() : e) });<NEW_LINE>} catch (OutOfMemoryError e) {<NEW_LINE>logger.log(Level.WARNING, "job.logging.read.log", new Object[] { ((e.getCause() != null) ? e.getCause() : e) });<NEW_LINE>} catch (SecurityException e) {<NEW_LINE>logger.log(Level.WARNING, "job.logging.read.log", new Object[] { ((e.getCause() != null) ? e.<MASK><NEW_LINE>}<NEW_LINE>// If an exception was caught reading the log file then continue on without sending an event<NEW_LINE>if (logContent != null) {<NEW_LINE>// send the previous part number along with the content in the log<NEW_LINE>sendJobLogEvent(filePart - 1, logContent, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If purgeOnPublish is enabled then uncomment this to allow for the job log to be purged<NEW_LINE>// if (purgeOnPublish) {<NEW_LINE>// deleteFileOrDirectory(new File(previousLogPath.toString()));<NEW_LINE>// }<NEW_LINE>}
getCause() : e) });
1,096,106
void findLdapDnMemberOfList(LdapTemplate ldapTemplate, String ldapDn, List<String> resultDnList, List<String> dnIgnoreList) {<NEW_LINE>if (dnIgnoreList.contains(ldapDn)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AndFilter filter = new AndFilter();<NEW_LINE>filter.and(new EqualsFilter<MASK><NEW_LINE>List<Object> groupList = ldapTemplate.search("", filter.toString(), new AbstractContextMapper<Object>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Object doMapFromContext(DirContextOperations ctx) {<NEW_LINE>return ctx.getNameInNamespace();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (groupList.isEmpty()) {<NEW_LINE>dnIgnoreList.add(ldapDn);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (Object groupObj : groupList) {<NEW_LINE>if (groupObj == null || !(groupObj instanceof String)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String groupDn = (String) groupObj;<NEW_LINE>if (resultDnList.contains(groupDn)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>resultDnList.add(groupDn);<NEW_LINE>findLdapDnMemberOfList(ldapTemplate, groupDn, resultDnList, dnIgnoreList);<NEW_LINE>}<NEW_LINE>}
(getMemberKey(), ldapDn));
680,954
public void showEmblemsDialog(CardsView cards, BigCard bigCard, UUID gameId) {<NEW_LINE>int w = 720;<NEW_LINE>int h = 550;<NEW_LINE>int height = getHeight();<NEW_LINE>int width = getWidth();<NEW_LINE>int x = ((width - w) / 2);<NEW_LINE>int y = ((height - h) / 2);<NEW_LINE>DlgParams params = new DlgParams();<NEW_LINE>params.rect = new Rectangle(x, y, w, h);<NEW_LINE>params.bigCard = bigCard;<NEW_LINE>params.gameId = gameId;<NEW_LINE>// params.feedbackPanel = feedbackPanel;<NEW_LINE>params.setCards(cards);<NEW_LINE>dialogContainer = new <MASK><NEW_LINE>dialogContainer.setVisible(true);<NEW_LINE>add(dialogContainer);<NEW_LINE>this.currentDialog = MTGDialogs.DialogContainer;<NEW_LINE>setDlgBounds(new Rectangle(x, y, w, h));<NEW_LINE>dialogContainer.showDialog(true);<NEW_LINE>setVisible(true);<NEW_LINE>}
DialogContainer(MTGDialogs.EMBLEMS, params);
1,723,387
public void buildStages(Stage primaryStage, ResourceBundle resourceBundle) throws Exception {<NEW_LINE>int width = 800, height = 459;<NEW_LINE>window = primaryStage;<NEW_LINE>Parent root = FXMLLoader.load(getClass().getResource("/main.fxml"), resourceBundle);<NEW_LINE>window.setTitle("LibRec V2.0");<NEW_LINE>mainScene = new Scene(root, width, height);<NEW_LINE>window.setScene(mainScene);<NEW_LINE>window.show();<NEW_LINE>root = FXMLLoader.load(getClass().getResource("/dataModel.fxml"), resourceBundle);<NEW_LINE>dataModelScene = new Scene(root, width, height);<NEW_LINE>root = FXMLLoader.load(getClass()<MASK><NEW_LINE>evaluatorScene = new Scene(root, width, height);<NEW_LINE>root = FXMLLoader.load(getClass().getResource("/filter.fxml"), resourceBundle);<NEW_LINE>filterScene = new Scene(root, width, height);<NEW_LINE>root = FXMLLoader.load(getClass().getResource("/output_1.fxml"), resourceBundle);<NEW_LINE>outputScene = new Scene(root, width, height);<NEW_LINE>root = FXMLLoader.load(getClass().getResource("/recommender.fxml"), resourceBundle);<NEW_LINE>recommenderScene = new Scene(root, width, height);<NEW_LINE>root = FXMLLoader.load(getClass().getResource("/similarity.fxml"), resourceBundle);<NEW_LINE>similarityScene = new Scene(root, width, height);<NEW_LINE>conf = new Configuration();<NEW_LINE>}
.getResource("/evaluator.fxml"), resourceBundle);
796,260
void performRequestAsyncNoCatch(Request request, ResponseListener listener) throws IOException {<NEW_LINE>Map<String, String> requestParams = new HashMap<>(request.getParameters());<NEW_LINE>// ignore is a special parameter supported by the clients, shouldn't be sent to es<NEW_LINE>String ignoreString = requestParams.remove("ignore");<NEW_LINE>Set<Integer> ignoreErrorCodes;<NEW_LINE>if (ignoreString == null) {<NEW_LINE>if (HttpHead.METHOD_NAME.equals(request.getMethod())) {<NEW_LINE>// 404 never causes error if returned for a HEAD request<NEW_LINE>ignoreErrorCodes = Collections.singleton(404);<NEW_LINE>} else {<NEW_LINE>ignoreErrorCodes = Collections.emptySet();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>String[] ignoresArray = ignoreString.split(",");<NEW_LINE>ignoreErrorCodes = new HashSet<>();<NEW_LINE>if (HttpHead.METHOD_NAME.equals(request.getMethod())) {<NEW_LINE>// 404 never causes error if returned for a HEAD request<NEW_LINE>ignoreErrorCodes.add(404);<NEW_LINE>}<NEW_LINE>for (String ignoreCode : ignoresArray) {<NEW_LINE>try {<NEW_LINE>ignoreErrorCodes.add<MASK><NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>throw new IllegalArgumentException("ignore value should be a number, found [" + ignoreString + "] instead", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>URI uri = buildUri(pathPrefix, request.getEndpoint(), requestParams);<NEW_LINE>HttpRequestBase httpRequest = createHttpRequest(request.getMethod(), uri, request.getEntity());<NEW_LINE>setHeaders(httpRequest, request.getOptions().getHeaders());<NEW_LINE>FailureTrackingResponseListener failureTrackingResponseListener = new FailureTrackingResponseListener(listener);<NEW_LINE>long startTime = System.nanoTime();<NEW_LINE>performRequestAsync(startTime, nextNode(), httpRequest, ignoreErrorCodes, request.getOptions().getWarningsHandler() == null ? warningsHandler : request.getOptions().getWarningsHandler(), request.getOptions().getHttpAsyncResponseConsumerFactory(), failureTrackingResponseListener);<NEW_LINE>}
(Integer.valueOf(ignoreCode));
775,985
private static void sortNodes(DBNNode[] children) {<NEW_LINE>final DBPPreferenceStore prefStore = DBWorkbench<MASK><NEW_LINE>// Sort children is we have this feature on in preferences<NEW_LINE>// and if children are not folders<NEW_LINE>if (children.length > 0) {<NEW_LINE>DBNNode firstChild = children[0];<NEW_LINE>boolean isResources = firstChild instanceof DBNResource || firstChild instanceof DBNPath;<NEW_LINE>{<NEW_LINE>if (isResources) {<NEW_LINE>Arrays.sort(children, NodeFolderComparator.INSTANCE);<NEW_LINE>} else if (prefStore.getBoolean(ModelPreferences.NAVIGATOR_SORT_ALPHABETICALLY) || isMergedEntity(firstChild)) {<NEW_LINE>if (!(firstChild instanceof DBNContainer)) {<NEW_LINE>Arrays.sort(children, NodeNameComparator.INSTANCE);<NEW_LINE>}<NEW_LINE>} else if (prefStore.getBoolean(ModelPreferences.NAVIGATOR_SORT_FOLDERS_FIRST)) {<NEW_LINE>Arrays.sort(children, NodeFolderComparator.INSTANCE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getPlatform().getPreferenceStore();
806,763
private void addToDisplay(final POI pPOI) {<NEW_LINE>final Marker marker = new Marker(mMapView);<NEW_LINE>marker.setTitle(pPOI.mTitle);<NEW_LINE>marker.setPosition(pPOI.mGeoPoint);<NEW_LINE>marker.setIcon(mBitmapDrawable);<NEW_LINE>mMapView.getOverlays().add(marker);<NEW_LINE>if (pPOI.mSpeechBalloon) {<NEW_LINE><MASK><NEW_LINE>speechBalloonOverlay.setTitle(pPOI.mTitle);<NEW_LINE>speechBalloonOverlay.setMargin(10);<NEW_LINE>speechBalloonOverlay.setRadius(15);<NEW_LINE>speechBalloonOverlay.setGeoPoint(new GeoPoint(pPOI.mGeoPoint));<NEW_LINE>speechBalloonOverlay.setOffset(pPOI.mOffsetX, pPOI.mOffsetY);<NEW_LINE>speechBalloonOverlay.setForeground(mForeground);<NEW_LINE>speechBalloonOverlay.setBackground(mBackground);<NEW_LINE>speechBalloonOverlay.setDragForeground(mDragForeground);<NEW_LINE>speechBalloonOverlay.setDragBackground(mDragBackground);<NEW_LINE>mMapView.getOverlays().add(speechBalloonOverlay);<NEW_LINE>}<NEW_LINE>}
final SpeechBalloonOverlay speechBalloonOverlay = new SpeechBalloonOverlay();
350,284
public IndexStatistics unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>IndexStatistics indexStatistics = new IndexStatistics();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("FaqStatistics", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>indexStatistics.setFaqStatistics(FaqStatisticsJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("TextDocumentStatistics", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>indexStatistics.setTextDocumentStatistics(TextDocumentStatisticsJsonUnmarshaller.getInstance<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return indexStatistics;<NEW_LINE>}
().unmarshall(context));
1,558,487
protected void onLayout(boolean changed, int l, int t, int r, int b) {<NEW_LINE>final int paddingLeft = getPaddingLeft();<NEW_LINE>final int paddingTop = getPaddingTop();<NEW_LINE>final int slidingTop = getSlidingTop();<NEW_LINE>final int childCount = getChildCount();<NEW_LINE>if (mFirstLayout) {<NEW_LINE>switch(mSlideState) {<NEW_LINE>case EXPANDED:<NEW_LINE>mSlideOffset = mCanSlide ? 0.f : 1.f;<NEW_LINE>break;<NEW_LINE>case ANCHORED:<NEW_LINE>mSlideOffset = mCanSlide ? mAnchorPoint : 1.f;<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>mSlideOffset = 1.f;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int i = 0; i < childCount; i++) {<NEW_LINE>final View child = getChildAt(i);<NEW_LINE>if (child.getVisibility() == GONE) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final LayoutParams lp = (LayoutParams) child.getLayoutParams();<NEW_LINE>final int childHeight = child.getMeasuredHeight();<NEW_LINE>if (lp.slideable) {<NEW_LINE>mSlideRange = childHeight - mPanelHeight;<NEW_LINE>}<NEW_LINE>int childTop;<NEW_LINE>if (mIsSlidingUp) {<NEW_LINE>childTop = lp.slideable ? slidingTop + (int<MASK><NEW_LINE>} else {<NEW_LINE>childTop = lp.slideable ? slidingTop - (int) (mSlideRange * mSlideOffset) : paddingTop;<NEW_LINE>if (!lp.slideable && !mOverlayContent) {<NEW_LINE>childTop += mPanelHeight;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final int childBottom = childTop + childHeight;<NEW_LINE>final int childLeft = paddingLeft;<NEW_LINE>final int childRight = childLeft + child.getMeasuredWidth();<NEW_LINE>child.layout(childLeft, childTop, childRight, childBottom);<NEW_LINE>}<NEW_LINE>if (mFirstLayout) {<NEW_LINE>updateObscuredViewVisibility();<NEW_LINE>}<NEW_LINE>mFirstLayout = false;<NEW_LINE>}
) (mSlideRange * mSlideOffset) : paddingTop;
160,473
protected void installDefaults(AbstractButton b) {<NEW_LINE>super.installDefaults(b);<NEW_LINE>if (!defaults_initialized) {<NEW_LINE>String prefix = getPropertyPrefix();<NEW_LINE>minimumWidth = UIManager.getInt(prefix + "minimumWidth");<NEW_LINE>iconTextGap = FlatUIUtils.getUIInt(prefix + "iconTextGap", 4);<NEW_LINE>background = UIManager.getColor(prefix + "background");<NEW_LINE>foreground = UIManager.getColor(prefix + "foreground");<NEW_LINE>startBackground = UIManager.getColor(prefix + "startBackground");<NEW_LINE>endBackground = UIManager.getColor(prefix + "endBackground");<NEW_LINE>focusedBackground = UIManager.getColor(prefix + "focusedBackground");<NEW_LINE>hoverBackground = UIManager.getColor(prefix + "hoverBackground");<NEW_LINE>pressedBackground = UIManager.getColor(prefix + "pressedBackground");<NEW_LINE>selectedBackground = UIManager.getColor(prefix + "selectedBackground");<NEW_LINE>selectedForeground = UIManager.getColor(prefix + "selectedForeground");<NEW_LINE>disabledBackground = UIManager.getColor(prefix + "disabledBackground");<NEW_LINE>disabledText = UIManager.getColor(prefix + "disabledText");<NEW_LINE>disabledSelectedBackground = UIManager.getColor(prefix + "disabledSelectedBackground");<NEW_LINE>defaultBackground = FlatUIUtils.getUIColor("Button.default.startBackground", "Button.default.background");<NEW_LINE>defaultEndBackground = UIManager.getColor("Button.default.endBackground");<NEW_LINE>defaultForeground = UIManager.getColor("Button.default.foreground");<NEW_LINE>defaultFocusedBackground = UIManager.getColor("Button.default.focusedBackground");<NEW_LINE>defaultHoverBackground = UIManager.getColor("Button.default.hoverBackground");<NEW_LINE>defaultPressedBackground = UIManager.getColor("Button.default.pressedBackground");<NEW_LINE>defaultBoldText = UIManager.getBoolean("Button.default.boldText");<NEW_LINE>paintShadow = UIManager.getBoolean("Button.paintShadow");<NEW_LINE>shadowWidth = FlatUIUtils.getUIInt("Button.shadowWidth", 2);<NEW_LINE><MASK><NEW_LINE>defaultShadowColor = UIManager.getColor("Button.default.shadowColor");<NEW_LINE>toolbarHoverBackground = UIManager.getColor(prefix + "toolbar.hoverBackground");<NEW_LINE>toolbarPressedBackground = UIManager.getColor(prefix + "toolbar.pressedBackground");<NEW_LINE>toolbarSelectedBackground = UIManager.getColor(prefix + "toolbar.selectedBackground");<NEW_LINE>helpButtonIcon = UIManager.getIcon("HelpButton.icon");<NEW_LINE>defaultMargin = UIManager.getInsets(prefix + "margin");<NEW_LINE>helpButtonIconShared = true;<NEW_LINE>defaults_initialized = true;<NEW_LINE>}<NEW_LINE>if (startBackground != null) {<NEW_LINE>Color bg = b.getBackground();<NEW_LINE>if (bg == null || bg instanceof UIResource)<NEW_LINE>b.setBackground(startBackground);<NEW_LINE>}<NEW_LINE>LookAndFeel.installProperty(b, "opaque", false);<NEW_LINE>LookAndFeel.installProperty(b, "iconTextGap", scale(iconTextGap));<NEW_LINE>MigLayoutVisualPadding.install(b);<NEW_LINE>}
shadowColor = UIManager.getColor("Button.shadowColor");
18,701
// this method is not meant to be in the public API<NEW_LINE>protected CompilationUnitDeclaration[] buildUnits(CompilationUnit[] sourceUnits) {<NEW_LINE>// //////////////////////////////////////////////////////////////////////////<NEW_LINE>// This code is largely inspired from JDT's<NEW_LINE>// CompilationUnitResolver.resolve<NEW_LINE>this.reportProgress(Messages.compilation_beginningToCompile);<NEW_LINE>this.sortModuleDeclarationsFirst(sourceUnits);<NEW_LINE>CompilationUnit[] filteredSourceUnits = null;<NEW_LINE>if (ignoreSyntaxErrors || level.toInt() > Level.ERROR.toInt()) {<NEW_LINE>// syntax is optionally checked here to prevent crashes inside JDT<NEW_LINE>filteredSourceUnits = ignoreSyntaxErrors(sourceUnits);<NEW_LINE>}<NEW_LINE>// build and record parsed units<NEW_LINE>if (ignoreSyntaxErrors) {<NEW_LINE>beginToCompile(filteredSourceUnits);<NEW_LINE>} else {<NEW_LINE>beginToCompile(sourceUnits);<NEW_LINE>}<NEW_LINE>CompilationUnitDeclaration unit;<NEW_LINE>int i = 0;<NEW_LINE>// process all units (some more could be injected in the loop by the lookup environment)<NEW_LINE>for (; i < this.totalUnits; i++) {<NEW_LINE>unit = unitsToProcess[i];<NEW_LINE>this.reportProgress(Messages.bind(Messages.compilation_processing, new String(unit.getFileName())));<NEW_LINE><MASK><NEW_LINE>// fault in fields & methods<NEW_LINE>if (unit.scope != null) {<NEW_LINE>unit.scope.faultInTypes();<NEW_LINE>}<NEW_LINE>// verify inherited methods<NEW_LINE>if (unit.scope != null) {<NEW_LINE>unit.scope.verifyMethods(lookupEnvironment.methodVerifier());<NEW_LINE>}<NEW_LINE>// type checking<NEW_LINE>unit.resolve();<NEW_LINE>// flow analysis<NEW_LINE>unit.analyseCode();<NEW_LINE>unit.ignoreFurtherInvestigation = false;<NEW_LINE>requestor.acceptResult(unit.compilationResult);<NEW_LINE>this.reportWorked(1, i);<NEW_LINE>}<NEW_LINE>ArrayList<CompilationUnitDeclaration> unitsToReturn = new ArrayList<>();<NEW_LINE>for (CompilationUnitDeclaration cud : this.unitsToProcess) {<NEW_LINE>if (cud != null) {<NEW_LINE>unitsToReturn.add(cud);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return unitsToReturn.toArray(new CompilationUnitDeclaration[0]);<NEW_LINE>}
this.parser.getMethodBodies(unit);
1,125,324
// </editor-fold>//GEN-END:initComponents<NEW_LINE>@Messages({ "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.message=Tag name must be unique. A tag with this name already exists.", "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.title=Duplicate Tag Name" })<NEW_LINE>private void newTagNameButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_newTagNameButtonActionPerformed<NEW_LINE>TagNameDialog dialog = new TagNameDialog();<NEW_LINE>TagNameDialog.BUTTON_PRESSED result = dialog.getResult();<NEW_LINE>if (result == TagNameDialog.BUTTON_PRESSED.OK) {<NEW_LINE>TskData.FileKnown status = dialog.isTagNotable() ? TskData.FileKnown.BAD : TskData.FileKnown.UNKNOWN;<NEW_LINE>TagNameDefinition newTagType = new TagNameDefinition(dialog.getTagName(), dialog.getTagDesciption(), DEFAULT_COLOR, status);<NEW_LINE>if (!tagTypes.contains(newTagType)) {<NEW_LINE>tagTypes.add(newTagType);<NEW_LINE>updateTagNamesListModel();<NEW_LINE>tagNamesList.setSelectedValue(newTagType, true);<NEW_LINE>updatePanel();<NEW_LINE>firePropertyChange(<MASK><NEW_LINE>} else {<NEW_LINE>JOptionPane.showMessageDialog(this, NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.message"), NbBundle.getMessage(TagOptionsPanel.class, "TagOptionsPanel.TagNameDialog.tagNameAlreadyExists.title"), JOptionPane.INFORMATION_MESSAGE);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
OptionsPanelController.PROP_CHANGED, null, null);
1,794,892
private static void doConversion(final StoredConfiguration existingConfig, final StoredConfigKey key, final StoredConfigurationModifier modifier) {<NEW_LINE>final StoredValue storedValue = existingConfig.readStoredValue(key).orElseThrow();<NEW_LINE>final boolean ad2003Enabled = ValueTypeConverter.valueToBoolean(storedValue);<NEW_LINE>final StoredValue value;<NEW_LINE>if (ad2003Enabled) {<NEW_LINE>value = new StringValue(ADPolicyComplexity.AD2003.toString());<NEW_LINE>} else {<NEW_LINE>value = new StringValue(ADPolicyComplexity.NONE.toString());<NEW_LINE>}<NEW_LINE>final String profileID = key.getProfileID();<NEW_LINE>LOGGER.info(() -> "converting deprecated non-default setting " + PwmSetting.PASSWORD_POLICY_AD_COMPLEXITY.getKey() + "/" + profileID + " to replacement setting " + PwmSetting.PASSWORD_POLICY_AD_COMPLEXITY_LEVEL + ", value=" + ValueTypeConverter.valueToString(value));<NEW_LINE>final Optional<ValueMetaData> <MASK><NEW_LINE>final UserIdentity userIdentity = valueMetaData.map(ValueMetaData::getUserIdentity).orElse(null);<NEW_LINE>try {<NEW_LINE>final StoredConfigKey writeKey = StoredConfigKey.forSetting(PwmSetting.PASSWORD_POLICY_AD_COMPLEXITY_LEVEL, profileID, key.getDomainID());<NEW_LINE>modifier.writeSetting(writeKey, value, userIdentity);<NEW_LINE>} catch (final PwmUnrecoverableException e) {<NEW_LINE>LOGGER.error(() -> "error converting deprecated AD password policy setting: " + key + ", error: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
valueMetaData = existingConfig.readMetaData(key);
1,496,882
protected void doAction() {<NEW_LINE>try {<NEW_LINE>KeyStoreHistory history = kseFrame.getActiveKeyStoreHistory();<NEW_LINE>KeyStoreState currentState = history.getCurrentState();<NEW_LINE>String alias = kseFrame.getSelectedEntryAlias();<NEW_LINE>Password password = getEntryPassword(alias, currentState);<NEW_LINE>if (password == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>KeyStore keyStore = currentState.getKeyStore();<NEW_LINE>Provider provider = history.getExplicitProvider();<NEW_LINE>PrivateKey privateKey = (PrivateKey) keyStore.getKey(alias, password.toCharArray());<NEW_LINE>KeyPairType keyPairType = KeyPairUtil.getKeyPairType(privateKey);<NEW_LINE>DSignJwt dSignJwt = new <MASK><NEW_LINE>dSignJwt.setLocationRelativeTo(frame);<NEW_LINE>dSignJwt.setVisible(true);<NEW_LINE>if (dSignJwt.isOk()) {<NEW_LINE>String encodedJWT = signJwt(dSignJwt, privateKey, provider);<NEW_LINE>DViewJwt dialog = new DViewJwt(frame, encodedJWT);<NEW_LINE>dialog.setLocationRelativeTo(frame);<NEW_LINE>dialog.setVisible(true);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>DError.displayError(frame, ex);<NEW_LINE>}<NEW_LINE>}
DSignJwt(frame, keyPairType, privateKey);
820,886
private StringBuilder addFileOption(StringBuilder uriString, String optionName, String filename) throws IOException, CommandException {<NEW_LINE>File f = SmartFile.sanitize(new File(filename));<NEW_LINE>logger.log(Level.FINER, "FILE PARAM: {0} = {1}", new Object[] { optionName, f });<NEW_LINE>final boolean uploadThisFile = doUpload && !f.isDirectory();<NEW_LINE>// attach the file to the payload - include the option name in the<NEW_LINE>// relative URI to avoid possible conflicts with same-named files<NEW_LINE>// in different directories<NEW_LINE>if (uploadThisFile) {<NEW_LINE>logger.finer("Uploading file");<NEW_LINE>try {<NEW_LINE>outboundPayload.attachFile(FILE_PAYLOAD_MIME_TYPE, URI.create(optionName + "/" + f.getName() + (f.isDirectory() ? "/" : "")), optionName, null, f, true);<NEW_LINE>} catch (FileNotFoundException fnfe) {<NEW_LINE>throw new CommandException(STRINGS.get("UploadedFileNotFound", f.getAbsolutePath()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (f != null) {<NEW_LINE>// if we are about to upload it -- give just the name<NEW_LINE>// o/w give the full path<NEW_LINE>String pathToPass = (uploadThisFile ? f.getName() : f.getPath());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return uriString;<NEW_LINE>}
addStringOption(uriString, optionName, pathToPass);
1,771,760
final CreateActionTargetResult executeCreateActionTarget(CreateActionTargetRequest createActionTargetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createActionTargetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateActionTargetRequest> request = null;<NEW_LINE>Response<CreateActionTargetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateActionTargetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createActionTargetRequest));<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, "SecurityHub");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateActionTargetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateActionTargetResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateActionTarget");
640,731
public void create(Properties ctx, TransformerHandler document) throws SAXException {<NEW_LINE>int reportViewId = Env.getContextAsInt(ctx, "AD_ReportView_ID");<NEW_LINE>PackOut packOut = (PackOut) ctx.get("PackOutProcess");<NEW_LINE>if (packOut == null) {<NEW_LINE>packOut = new PackOut();<NEW_LINE>packOut.setLocalContext(ctx);<NEW_LINE>}<NEW_LINE>// Table<NEW_LINE>MReportView reportView = <MASK><NEW_LINE>packOut.createTable(reportView.getAD_Table_ID(), document);<NEW_LINE>//<NEW_LINE>packOut.createGenericPO(document, reportView, true, null);<NEW_LINE>// Get all columns<NEW_LINE>List<MPrintFormat> printFormatList = new Query(ctx, I_AD_PrintFormat.Table_Name, I_AD_PrintFormat.COLUMNNAME_AD_ReportView_ID + " = ?", null).setParameters(reportViewId).setClient_ID().<MPrintFormat>list();<NEW_LINE>// All<NEW_LINE>for (MPrintFormat printFormat : printFormatList) {<NEW_LINE>packOut.createPrintFormat(printFormat.getAD_PrintFormat_ID(), document);<NEW_LINE>}<NEW_LINE>// Get all columns<NEW_LINE>List<X_AD_ReportView_Col> reportViewColumnList = new Query(ctx, I_AD_ReportView_Col.Table_Name, I_AD_ReportView_Col.COLUMNNAME_AD_ReportView_ID + " = ?", null).setParameters(reportViewId).setClient_ID().<X_AD_ReportView_Col>list();<NEW_LINE>for (X_AD_ReportView_Col reportViewColumn : reportViewColumnList) {<NEW_LINE>packOut.createGenericPO(document, I_AD_ReportView_Col.Table_ID, reportViewColumn.getAD_ReportView_Col_ID(), true, null);<NEW_LINE>}<NEW_LINE>}
MReportView.get(ctx, reportViewId);
1,319,423
public static GalenActionDumpArguments parse(String[] args) {<NEW_LINE>args = ArgumentsUtils.processSystemProperties(args);<NEW_LINE>Options options = new Options();<NEW_LINE>options.addOption("u", "url", true, "Initial test url");<NEW_LINE>options.addOption("s", "size", true, "Browser window size");<NEW_LINE>options.addOption("W", "max-width", true, "Maximum width of element area image");<NEW_LINE>options.addOption("H", "max-height", true, "Maximum height of element area image");<NEW_LINE>options.addOption("E", "export", true, "Export path for page dump");<NEW_LINE>options.addOption("c", "config", true, "Path to config");<NEW_LINE>CommandLineParser parser = new PosixParser();<NEW_LINE>CommandLine cmd;<NEW_LINE>try {<NEW_LINE>cmd = parser.parse(options, args);<NEW_LINE>} catch (MissingArgumentException e) {<NEW_LINE>throw new IllegalArgumentException("Missing value for " + e.getOption().getLongOpt(), e);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new RuntimeException(ex);<NEW_LINE>}<NEW_LINE>GalenActionDumpArguments arguments = new GalenActionDumpArguments();<NEW_LINE>arguments.setUrl<MASK><NEW_LINE>arguments.setScreenSize(convertScreenSize(cmd.getOptionValue("s")));<NEW_LINE>arguments.setMaxWidth(parseOptionalInt(cmd.getOptionValue("W")));<NEW_LINE>arguments.setMaxHeight(parseOptionalInt(cmd.getOptionValue("H")));<NEW_LINE>arguments.setExport(cmd.getOptionValue("E"));<NEW_LINE>arguments.setPaths(asList(cmd.getArgs()));<NEW_LINE>arguments.setConfig(cmd.getOptionValue("c"));<NEW_LINE>return arguments;<NEW_LINE>}
(cmd.getOptionValue("u"));
1,226,579
private void validateJvmOptions(String jvmOptions) {<NEW_LINE>if (jvmOptions == null || jvmOptions.isEmpty())<NEW_LINE>return;<NEW_LINE>String[] <MASK><NEW_LINE>List<String> invalidOptions = Arrays.stream(optionList).filter(option -> !option.isEmpty()).filter(option -> !Pattern.matches(validPattern.pattern(), option)).sorted().collect(Collectors.toList());<NEW_LINE>if (isHosted)<NEW_LINE>invalidOptions.addAll(Arrays.stream(optionList).filter(option -> !option.isEmpty()).filter(option -> Pattern.matches(invalidInHostedatttern.pattern(), option)).sorted().collect(Collectors.toList()));<NEW_LINE>if (invalidOptions.isEmpty())<NEW_LINE>return;<NEW_LINE>String message = "Invalid or misplaced JVM options in services.xml: " + String.join(",", invalidOptions) + "." + " See https://docs.vespa.ai/en/reference/services-container.html#jvm";<NEW_LINE>if (failDeploymentWithInvalidJvmOptions)<NEW_LINE>throw new IllegalArgumentException(message);<NEW_LINE>else<NEW_LINE>logger.logApplicationPackage(WARNING, message);<NEW_LINE>}
optionList = jvmOptions.split(" ");
791,630
final GetShardIteratorResult executeGetShardIterator(GetShardIteratorRequest getShardIteratorRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getShardIteratorRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetShardIteratorRequest> request = null;<NEW_LINE>Response<GetShardIteratorResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetShardIteratorRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getShardIteratorRequest));<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, "Kinesis");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetShardIterator");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetShardIteratorResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetShardIteratorResultJsonUnmarshaller());<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);
408,867
public <T extends IBaseResource> T parseResource(Class<T> theResourceType, Reader theReader) throws DataFormatException {<NEW_LINE>if (theResourceType != null) {<NEW_LINE>myContext.getResourceDefinition(theResourceType);<NEW_LINE>}<NEW_LINE>// Actually do the parse<NEW_LINE>T retVal = doParseResource(theResourceType, theReader);<NEW_LINE>RuntimeResourceDefinition def = myContext.getResourceDefinition(retVal);<NEW_LINE>if ("Bundle".equals(def.getName())) {<NEW_LINE>if (isOverrideResourceIdWithBundleEntryFullUrl()) {<NEW_LINE>BundleUtil.processEntries(myContext, (IBaseBundle) retVal, t -> {<NEW_LINE>String fullUrl = t.getFullUrl();<NEW_LINE>if (fullUrl != null) {<NEW_LINE>IBaseResource resource = t.getResource();<NEW_LINE>if (resource != null) {<NEW_LINE><MASK><NEW_LINE>if (isBlank(resourceId.getValue())) {<NEW_LINE>resourceId.setValue(fullUrl);<NEW_LINE>} else {<NEW_LINE>if (fullUrl.startsWith("urn:") && fullUrl.length() > resourceId.getIdPart().length() && fullUrl.charAt(fullUrl.length() - resourceId.getIdPart().length() - 1) == ':' && fullUrl.endsWith(resourceId.getIdPart())) {<NEW_LINE>resourceId.setValue(fullUrl);<NEW_LINE>} else {<NEW_LINE>IIdType fullUrlId = myContext.getVersion().newIdType();<NEW_LINE>fullUrlId.setValue(fullUrl);<NEW_LINE>if (myContext.getVersion().getVersion().isOlderThan(FhirVersionEnum.DSTU3)) {<NEW_LINE>IIdType newId = fullUrlId;<NEW_LINE>if (!newId.hasVersionIdPart() && resourceId.hasVersionIdPart()) {<NEW_LINE>newId = newId.withVersion(resourceId.getVersionIdPart());<NEW_LINE>}<NEW_LINE>resourceId.setValue(newId.getValue());<NEW_LINE>} else if (StringUtils.equals(fullUrlId.getIdPart(), resourceId.getIdPart())) {<NEW_LINE>if (fullUrlId.hasBaseUrl()) {<NEW_LINE>IIdType newResourceId = resourceId.withServerBase(fullUrlId.getBaseUrl(), resourceId.getResourceType());<NEW_LINE>resourceId.setValue(newResourceId.getValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return retVal;<NEW_LINE>}
IIdType resourceId = resource.getIdElement();
661,582
final GetConfigResult executeGetConfig(GetConfigRequest getConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetConfigRequest> request = null;<NEW_LINE>Response<GetConfigResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new GetConfigRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getConfigRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "GroundStation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetConfig");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetConfigResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetConfigResultJsonUnmarshaller());<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.RequestMarshallTime);
816,060
/* Update BigQuery Table Object Supplied */<NEW_LINE>private void updateBigQueryTable(TableId tableId, TableRow row, Set<String> ignoreFields) {<NEW_LINE>TableId tableLock = getTableLock(tableId);<NEW_LINE>synchronized (tableLock) {<NEW_LINE>Table table = this.tableCache.get(tableId);<NEW_LINE>Map<String, StandardSQLTypeName> inputSchema = getObjectSchema(tableId, row);<NEW_LINE>List<Field> newFieldList = getNewTableFields(<MASK><NEW_LINE>if (newFieldList.size() > 0) {<NEW_LINE>// Add all current columns to the list<NEW_LINE>List<Field> fieldList = new ArrayList<Field>();<NEW_LINE>for (Field field : table.getDefinition().getSchema().getFields()) {<NEW_LINE>fieldList.add(field);<NEW_LINE>}<NEW_LINE>// Add all new columns to the list<NEW_LINE>LOG.info("Mapping New Columns for: {} -> {}", tableId.toString(), newFieldList.toString());<NEW_LINE>for (Field field : newFieldList) {<NEW_LINE>fieldList.add(field);<NEW_LINE>}<NEW_LINE>Schema newSchema = Schema.of(fieldList);<NEW_LINE>Table updatedTable = table.toBuilder().setDefinition(StandardTableDefinition.of(newSchema)).build().update();<NEW_LINE>LOG.info("Updated Table: {}", tableId.toString());<NEW_LINE>this.tableCache.reset(tableId, table);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
row, table, inputSchema, ignoreFields);
1,130,897
@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Operation(description = "Review group membership and take action to either extend and/or delete existing members.")<NEW_LINE>public void putGroupReview(@Parameter(description = "name of the domain", required = true) @PathParam("domainName") String domainName, @Parameter(description = "name of the group", required = true) @PathParam("groupName") String groupName, @Parameter(description = "Audit param required(not empty) if domain auditEnabled is true.", required = true) @HeaderParam("Y-Audit-Ref") String auditRef, @Parameter(description = "Group object with updated and/or deleted members", required = true) Group group) {<NEW_LINE>int code = ResourceException.OK;<NEW_LINE>ResourceContext context = null;<NEW_LINE>try {<NEW_LINE>context = this.delegate.newResourceContext(this.request, this.response, "putGroupReview");<NEW_LINE>context.authorize("update", "" + domainName + ":group." + groupName + "", null);<NEW_LINE>this.delegate.putGroupReview(context, <MASK><NEW_LINE>} catch (ResourceException e) {<NEW_LINE>code = e.getCode();<NEW_LINE>switch(code) {<NEW_LINE>case ResourceException.BAD_REQUEST:<NEW_LINE>throw typedException(code, e, ResourceError.class);<NEW_LINE>case ResourceException.CONFLICT:<NEW_LINE>throw typedException(code, e, ResourceError.class);<NEW_LINE>case ResourceException.FORBIDDEN:<NEW_LINE>throw typedException(code, e, ResourceError.class);<NEW_LINE>case ResourceException.NOT_FOUND:<NEW_LINE>throw typedException(code, e, ResourceError.class);<NEW_LINE>case ResourceException.TOO_MANY_REQUESTS:<NEW_LINE>throw typedException(code, e, ResourceError.class);<NEW_LINE>case ResourceException.UNAUTHORIZED:<NEW_LINE>throw typedException(code, e, ResourceError.class);<NEW_LINE>default:<NEW_LINE>System.err.println("*** Warning: undeclared exception (" + code + ") for resource putGroupReview");<NEW_LINE>throw typedException(code, e, ResourceError.class);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>this.delegate.publishChangeMessage(context, code);<NEW_LINE>this.delegate.recordMetrics(context, code);<NEW_LINE>}<NEW_LINE>}
domainName, groupName, auditRef, group);
1,541,490
private boolean init(String funcString) {<NEW_LINE>int leftBracket = funcString.indexOf("(");<NEW_LINE>int rightBracket = funcString.lastIndexOf(")");<NEW_LINE>// see if there even is a comma<NEW_LINE>int comma = funcString.indexOf(",");<NEW_LINE>if (leftBracket > 1 && rightBracket > leftBracket + 1 && comma > leftBracket && comma < rightBracket) {<NEW_LINE>// test all commas<NEW_LINE>for (int i = leftBracket + 1; i < rightBracket; i++) {<NEW_LINE>if (funcString.charAt(i) == ',') {<NEW_LINE>comma = i;<NEW_LINE>}<NEW_LINE>String funcName = funcString.substring(0, leftBracket);<NEW_LINE>Pattern p = Pattern.compile("[^a-zA-Z0-9]");<NEW_LINE>boolean hasSpecialChar = p.matcher(funcName).find();<NEW_LINE>if (!hasSpecialChar && (funcName.length() > 0)) {<NEW_LINE>String leftExpressionString = funcString.substring(leftBracket + 1, comma);<NEW_LINE>String rightExpressionString = funcString.substring(comma + 1, rightBracket);<NEW_LINE>Expression leftExpressionInBrackets = new Expression(leftExpressionString, parser);<NEW_LINE>Expression rightExpressionInBrackets <MASK><NEW_LINE>boolean isValidLeftExpression = leftExpressionInBrackets.getExpressionType() != Expression.ExpressionType.INVALID;<NEW_LINE>boolean isValidRightExpression = rightExpressionInBrackets.getExpressionType() != Expression.ExpressionType.INVALID;<NEW_LINE>if (isValidLeftExpression && isValidRightExpression) {<NEW_LINE>this.atomType = Atom.AtomType.FUNCTION_X;<NEW_LINE>this.funcName = funcName;<NEW_LINE>this.expressionLeft = leftExpressionInBrackets;<NEW_LINE>this.expressionRight = rightExpressionInBrackets;<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>this.atomType = Atom.AtomType.INVALID;<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
= new Expression(rightExpressionString, parser);
358,800
public VerifySoftwareTokenResult verifySoftwareToken(VerifySoftwareTokenRequest verifySoftwareTokenRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(verifySoftwareTokenRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<VerifySoftwareTokenRequest> request = null;<NEW_LINE>Response<VerifySoftwareTokenResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new VerifySoftwareTokenRequestMarshaller().marshall(verifySoftwareTokenRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<VerifySoftwareTokenResult, JsonUnmarshallerContext> unmarshaller = new VerifySoftwareTokenResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<VerifySoftwareTokenResult> responseHandler = <MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
new JsonResponseHandler<VerifySoftwareTokenResult>(unmarshaller);
1,339,562
public char[][] listPackages(char[] moduleName) {<NEW_LINE>switch(LookupStrategy.get(moduleName)) {<NEW_LINE>case Named:<NEW_LINE>IPackageFragmentRoot[] packageRoots = findModuleContext(moduleName);<NEW_LINE>Set<String> packages = new HashSet<>();<NEW_LINE>if (packageRoots != null) {<NEW_LINE>for (IPackageFragmentRoot packageRoot : packageRoots) {<NEW_LINE>try {<NEW_LINE>for (IJavaElement javaElement : packageRoot.getChildren()) {<NEW_LINE>if (javaElement instanceof IPackageFragment && !((IPackageFragment) javaElement).isDefaultPackage())<NEW_LINE>packages.add(javaElement.getElementName());<NEW_LINE>}<NEW_LINE>} catch (JavaModelException e) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Util.log(e, "Failed to retrieve packages from " + packageRoot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return packages.stream().map(String::toCharArray).toArray(<MASK><NEW_LINE>default:<NEW_LINE>// $NON-NLS-1$<NEW_LINE>throw new UnsupportedOperationException("can list packages only of a named module");<NEW_LINE>}<NEW_LINE>}
char[][]::new);
1,707,658
protected Object handleBlockException(Invocation inv, SentinelResource annotation, BlockException ex) throws Throwable {<NEW_LINE>// Execute block handler if configured.<NEW_LINE>Method blockHandlerMethod = extractBlockHandlerMethod(inv, annotation.blockHandler(), annotation.blockHandlerClass());<NEW_LINE>if (blockHandlerMethod != null) {<NEW_LINE>Object[<MASK><NEW_LINE>// Construct args.<NEW_LINE>Object[] args = Arrays.copyOf(originArgs, originArgs.length + 1);<NEW_LINE>args[args.length - 1] = ex;<NEW_LINE>try {<NEW_LINE>if (isStatic(blockHandlerMethod)) {<NEW_LINE>return blockHandlerMethod.invoke(null, args);<NEW_LINE>}<NEW_LINE>return blockHandlerMethod.invoke(inv.getTarget(), args);<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>// throw the actual exception<NEW_LINE>throw e.getTargetException();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If no block handler is present, then go to fallback.<NEW_LINE>return handleFallback(inv, annotation, ex);<NEW_LINE>}
] originArgs = inv.getArgs();
1,163,172
private static BlockEntry readEntry(SliceInput data, BlockEntry previousEntry) {<NEW_LINE>requireNonNull(data, "data is null");<NEW_LINE>// read entry header<NEW_LINE>int sharedKeyLength = VariableLengthQuantity.readVariableLengthInt(data);<NEW_LINE>int nonSharedKeyLength = VariableLengthQuantity.readVariableLengthInt(data);<NEW_LINE>int <MASK><NEW_LINE>// read key<NEW_LINE>final Slice key;<NEW_LINE>if (sharedKeyLength > 0) {<NEW_LINE>key = Slices.allocate(sharedKeyLength + nonSharedKeyLength);<NEW_LINE>SliceOutput sliceOutput = key.output();<NEW_LINE>checkState(previousEntry != null, "Entry has a shared key but no previous entry was provided");<NEW_LINE>sliceOutput.writeBytes(previousEntry.getKey(), 0, sharedKeyLength);<NEW_LINE>sliceOutput.writeBytes(data, nonSharedKeyLength);<NEW_LINE>} else {<NEW_LINE>key = data.readSlice(nonSharedKeyLength);<NEW_LINE>}<NEW_LINE>// read value<NEW_LINE>Slice value = data.readSlice(valueLength);<NEW_LINE>return new BlockEntry(key, value);<NEW_LINE>}
valueLength = VariableLengthQuantity.readVariableLengthInt(data);
1,051,887
final DescribeReservedNodeOfferingsResult executeDescribeReservedNodeOfferings(DescribeReservedNodeOfferingsRequest describeReservedNodeOfferingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReservedNodeOfferingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeReservedNodeOfferingsRequest> request = null;<NEW_LINE>Response<DescribeReservedNodeOfferingsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeReservedNodeOfferingsRequestMarshaller().marshall(super.beforeMarshalling(describeReservedNodeOfferingsRequest));<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, "Redshift");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeReservedNodeOfferingsResult> responseHandler = new StaxResponseHandler<DescribeReservedNodeOfferingsResult>(new DescribeReservedNodeOfferingsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeReservedNodeOfferings");
1,177,771
private boolean createTableData(MTable mTable) {<NEW_LINE>boolean success = true;<NEW_LINE>int count = 0;<NEW_LINE>int errors = 0;<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>// Get Table Data<NEW_LINE>String sql = "SELECT * FROM " + mTable.getTableName();<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>ResultSet rs = null;<NEW_LINE>try {<NEW_LINE>pstmt = DB.prepareStatement(sql, mTable.get_TrxName());<NEW_LINE>rs = pstmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>if (createTableDataRow(rs, mTable))<NEW_LINE>count++;<NEW_LINE>else<NEW_LINE>errors++;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.log(<MASK><NEW_LINE>success = false;<NEW_LINE>} finally {<NEW_LINE>DB.close(rs, pstmt);<NEW_LINE>rs = null;<NEW_LINE>pstmt = null;<NEW_LINE>}<NEW_LINE>long elapsed = System.currentTimeMillis() - start;<NEW_LINE>log.config("Inserted=" + count + " - Errors=" + errors + " - " + elapsed + " ms");<NEW_LINE>return success;<NEW_LINE>}
Level.SEVERE, sql, e);
1,656,470
protected void onFragmentCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>if (savedInstanceState == null) {<NEW_LINE>issueState = (IssueState) getArguments().getSerializable(BundleConstant.EXTRA);<NEW_LINE>}<NEW_LINE>getPresenter().onSetPullType(getIssuesType());<NEW_LINE>recycler.setEmptyView(stateLayout, refresh);<NEW_LINE>stateLayout.setOnReloadListener(this);<NEW_LINE>refresh.setOnRefreshListener(this);<NEW_LINE>adapter = new PullRequestAdapter(getPresenter().getPullRequests(), false, true);<NEW_LINE>adapter.setListener(getPresenter());<NEW_LINE>getLoadMore().initialize(getPresenter().getCurrentPage(), <MASK><NEW_LINE>recycler.setAdapter(adapter);<NEW_LINE>recycler.addDivider();<NEW_LINE>recycler.addOnScrollListener(getLoadMore());<NEW_LINE>if (savedInstanceState == null || (getPresenter().getPullRequests().isEmpty() && !getPresenter().isApiCalled())) {<NEW_LINE>onRefresh();<NEW_LINE>}<NEW_LINE>stateLayout.setEmptyText(getString((R.string.no_pull_requests)));<NEW_LINE>fastScroller.attachRecyclerView(recycler);<NEW_LINE>}
getPresenter().getPreviousTotal());
1,827,192
public HtmlResponse upload(final UploadForm form) {<NEW_LINE>validate(form, messages -> {<NEW_LINE>}, () -> uploadpage(form.dictId));<NEW_LINE>verifyToken(() <MASK><NEW_LINE>return stemmerOverrideService.getStemmerOverrideFile(form.dictId).map(file -> {<NEW_LINE>try (InputStream inputStream = form.stemmerOverrideFile.getInputStream()) {<NEW_LINE>file.update(inputStream);<NEW_LINE>} catch (final IOException e) {<NEW_LINE>throwValidationError(messages -> messages.addErrorsFailedToUploadStemmeroverrideFile(GLOBAL), () -> redirectWith(getClass(), moreUrl("uploadpage/" + form.dictId)));<NEW_LINE>}<NEW_LINE>saveInfo(messages -> messages.addSuccessUploadStemmeroverrideFile(GLOBAL));<NEW_LINE>return redirectWith(getClass(), moreUrl("list/1").params("dictId", form.dictId));<NEW_LINE>}).orElseGet(() -> {<NEW_LINE>throwValidationError(messages -> messages.addErrorsFailedToUploadStemmeroverrideFile(GLOBAL), () -> uploadpage(form.dictId));<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>}
-> uploadpage(form.dictId));
1,345,054
private void init(Context context, @Nullable AttributeSet attrs) {<NEW_LINE>TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.DoKitItemView);<NEW_LINE>int layout = a.getInt(R.styleable.DoKitItemView_itemLayout, R.layout.view_dokit_item_view);<NEW_LINE>int icon = a.getResourceId(R.styleable.DoKitItemView_itemIcon, R.mipmap.dk_arrow_normal);<NEW_LINE>String text = a.<MASK><NEW_LINE>int textSize = a.getDimensionPixelSize(R.styleable.DoKitItemView_itemTextSize, -1);<NEW_LINE>boolean iconShow = a.getBoolean(R.styleable.DoKitItemView_itemIconShow, true);<NEW_LINE>boolean textShow = a.getBoolean(R.styleable.DoKitItemView_itemTextShow, true);<NEW_LINE>itemLayoutId = layout;<NEW_LINE>itemIcon = icon;<NEW_LINE>itemText = text == null ? "" : text;<NEW_LINE>itemTextSize = textSize;<NEW_LINE>itemIconShow = iconShow;<NEW_LINE>itemTextShow = textShow;<NEW_LINE>a.recycle();<NEW_LINE>}
getString(R.styleable.DoKitItemView_itemText);
901,584
private void layout(Context context, AttributeSet attrs) {<NEW_LINE>inflate(context, R.layout.fastscroller, this);<NEW_LINE>setClipChildren(false);<NEW_LINE>setOrientation(HORIZONTAL);<NEW_LINE>mBubbleView = (TextView) findViewById(R.id.fastscroll_bubble);<NEW_LINE>mHandleView = (ImageView) findViewById(R.id.fastscroll_handle);<NEW_LINE>mTrackView = (ImageView) findViewById(R.id.fastscroll_track);<NEW_LINE>mScrollbar = findViewById(R.id.fastscroll_scrollbar);<NEW_LINE>@ColorInt<NEW_LINE>int bubbleColor = Color.GRAY;<NEW_LINE>@ColorInt<NEW_LINE>int handleColor = Color.DKGRAY;<NEW_LINE>@ColorInt<NEW_LINE>int trackColor = Color.LTGRAY;<NEW_LINE>@ColorInt<NEW_LINE>int textColor = Color.WHITE;<NEW_LINE>boolean hideScrollbar = true;<NEW_LINE>boolean showTrack = false;<NEW_LINE>if (attrs != null) {<NEW_LINE>TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.FastScrollRecyclerView, 0, 0);<NEW_LINE>if (typedArray != null) {<NEW_LINE>try {<NEW_LINE>bubbleColor = typedArray.getColor(R.styleable.FastScrollRecyclerView_bubbleColor, bubbleColor);<NEW_LINE>handleColor = typedArray.getColor(R.styleable.FastScrollRecyclerView_handleColor, handleColor);<NEW_LINE>trackColor = typedArray.getColor(R.styleable.FastScrollRecyclerView_trackColor, trackColor);<NEW_LINE>textColor = typedArray.getColor(<MASK><NEW_LINE>showTrack = typedArray.getBoolean(R.styleable.FastScrollRecyclerView_showTrack, false);<NEW_LINE>hideScrollbar = typedArray.getBoolean(R.styleable.FastScrollRecyclerView_hideScrollbar, true);<NEW_LINE>} finally {<NEW_LINE>typedArray.recycle();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setTrackColor(trackColor);<NEW_LINE>setHandleColor(handleColor);<NEW_LINE>setBubbleColor(bubbleColor);<NEW_LINE>setBubbleTextColor(textColor);<NEW_LINE>setHideScrollbar(hideScrollbar);<NEW_LINE>setTrackVisible(showTrack);<NEW_LINE>}
R.styleable.FastScrollRecyclerView_bubbleTextColor, textColor);
857,622
public void newEntity(String template) {<NEW_LINE>preview.closePreview();<NEW_LINE>originalElement = null;<NEW_LINE>editedEntity = CustomElementCompiler.getInstance().genEntityFromTemplate(template, errorhandler);<NEW_LINE>if (editedEntity instanceof CustomElement) {<NEW_LINE>codepane.setCode(((CustomElement) editedEntity).getCode());<NEW_LINE>} else {<NEW_LINE>codepane.setCode("");<NEW_LINE>}<NEW_LINE>editedEntity.setPanelAttributes("// Modify the text below and" + Constants.NEWLINE + "// observe the element preview." + Constants.NEWLINE + Constants.NEWLINE + "Hello, World! " + Constants.NEWLINE + "Enjoy " + Program.getInstance(<MASK><NEW_LINE>editedEntity.setRectangle(new Rectangle(20, 20, 200, 200));<NEW_LINE>updatePreview(editedEntity);<NEW_LINE>getPreviewHandler().getDrawPanel().getSelector().select(editedEntity);<NEW_LINE>setChanged(false);<NEW_LINE>start();<NEW_LINE>}
).getProgramName() + "!");
245,636
public void applyDefinitions(Configuration config) {<NEW_LINE>config.set(BENCHMARK_CLIENT_THREADS, 0);<NEW_LINE>config.set(BENCHMARK_RESPONSE_TIMEOUT, 30, TimeUnit.SECONDS);<NEW_LINE>config.set(CoapConfig.MAX_RESOURCE_BODY_SIZE, DEFAULT_MAX_RESOURCE_SIZE);<NEW_LINE>config.set(CoapConfig.MAX_MESSAGE_SIZE, DEFAULT_BLOCK_SIZE);<NEW_LINE>config.set(CoapConfig.PREFERRED_BLOCK_SIZE, DEFAULT_BLOCK_SIZE);<NEW_LINE>config.set(CoapConfig.MAX_ACTIVE_PEERS, 10);<NEW_LINE>config.set(CoapConfig.PEERS_MARK_AND_SWEEP_MESSAGES, 16);<NEW_LINE>config.set(CoapConfig.DEDUPLICATOR, CoapConfig.DEDUPLICATOR_PEERS_MARK_AND_SWEEP);<NEW_LINE>config.set(CoapConfig.MAX_PEER_INACTIVITY_PERIOD, 24, TimeUnit.HOURS);<NEW_LINE>config.set(CoapConfig.PROTOCOL_STAGE_THREAD_COUNT, 1);<NEW_LINE>// enabled by<NEW_LINE>config.set(CoapConfig.TCP_NUMBER_OF_BULK_BLOCKS, 1);<NEW_LINE>// cli<NEW_LINE>// option!<NEW_LINE>config.set(TcpConfig.TCP_CONNECTION_IDLE_TIMEOUT, 12, TimeUnit.HOURS);<NEW_LINE>config.set(TcpConfig.TCP_CONNECT_TIMEOUT, 30, TimeUnit.SECONDS);<NEW_LINE>config.set(TcpConfig.TLS_HANDSHAKE_TIMEOUT, 30, TimeUnit.SECONDS);<NEW_LINE>config.<MASK><NEW_LINE>config.set(UdpConfig.UDP_RECEIVER_THREAD_COUNT, 1);<NEW_LINE>config.set(UdpConfig.UDP_SENDER_THREAD_COUNT, 1);<NEW_LINE>config.set(UdpConfig.UDP_RECEIVE_BUFFER_SIZE, 8192);<NEW_LINE>config.set(UdpConfig.UDP_SEND_BUFFER_SIZE, 8192);<NEW_LINE>config.set(DtlsConfig.DTLS_RECEIVER_THREAD_COUNT, 1);<NEW_LINE>config.set(DtlsConfig.DTLS_MAX_CONNECTIONS, 10);<NEW_LINE>config.set(DtlsConfig.DTLS_MAX_RETRANSMISSIONS, 2);<NEW_LINE>config.set(DtlsConfig.DTLS_AUTO_HANDSHAKE_TIMEOUT, null, TimeUnit.SECONDS);<NEW_LINE>// support it,<NEW_LINE>config.set(DtlsConfig.DTLS_CONNECTION_ID_LENGTH, 0);<NEW_LINE>// but don't<NEW_LINE>// use it<NEW_LINE>config.set(DtlsConfig.DTLS_RECEIVE_BUFFER_SIZE, 8192);<NEW_LINE>config.set(DtlsConfig.DTLS_SEND_BUFFER_SIZE, 8192);<NEW_LINE>config.set(DtlsConfig.DTLS_VERIFY_SERVER_CERTIFICATES_SUBJECT, false);<NEW_LINE>// disabled<NEW_LINE>config.set(SystemConfig.HEALTH_STATUS_INTERVAL, 0, TimeUnit.SECONDS);<NEW_LINE>}
set(TcpConfig.TCP_WORKER_THREADS, 2);
1,141,050
private void addTab(String url, String content) throws Exception {<NEW_LINE>int ix = url.startsWith("file:") ? url.lastIndexOf(File.separatorChar) : url.lastIndexOf('/');<NEW_LINE>if (ix == -1) {<NEW_LINE>ix = url.lastIndexOf('/');<NEW_LINE>}<NEW_LINE>String title = url.substring(ix + 1);<NEW_LINE>metrics.getSection(DEFINITION_PARTS_SECTION).addMetric(title, MetricType.URL).set(url);<NEW_LINE>if (progressBar != null) {<NEW_LINE>progressBar.setString(title);<NEW_LINE>} else if (progressDialog != null) {<NEW_LINE>progressDialog.setProgress(1, title);<NEW_LINE>}<NEW_LINE>JPanel panel = new JPanel(new BorderLayout());<NEW_LINE>JLabel label = new JLabel(url);<NEW_LINE>label.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));<NEW_LINE>panel.add(label, BorderLayout.NORTH);<NEW_LINE>RSyntaxTextArea inputArea = SyntaxEditorUtil.createDefaultXmlSyntaxTextArea();<NEW_LINE>StringWriter writer = new StringWriter();<NEW_LINE>XmlUtils.serializePretty(XmlUtils.createXmlObject(content), writer);<NEW_LINE><MASK><NEW_LINE>XmlObject xmlObject = XmlUtils.createXmlObject(xmlString, new XmlOptions().setLoadLineNumbers());<NEW_LINE>inputArea.setText(xmlString);<NEW_LINE>inputArea.setEditable(false);<NEW_LINE>JPanel p = new JPanel(new BorderLayout());<NEW_LINE>RTextScrollPane scrollPane = new RTextScrollPane(inputArea);<NEW_LINE>p.add(scrollPane, BorderLayout.CENTER);<NEW_LINE>UISupport.addPreviewCorner(scrollPane, true);<NEW_LINE>panel.add(scrollPane, BorderLayout.CENTER);<NEW_LINE>partTabs.addTab(title, panel);<NEW_LINE>if (tree != null) {<NEW_LINE>initInspectionTree(xmlObject, inputArea);<NEW_LINE>}<NEW_LINE>}
String xmlString = writer.toString();
423,795
private void flushBatch() throws IOException, InterruptedException {<NEW_LINE>if (batch.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// Group values KV<tableName, writeRequest> by tableName<NEW_LINE>// Note: The original order of arrival is lost reading the map entries.<NEW_LINE>Map<String, List<WriteRequest>> writesPerTable = batch.values().stream().collect(groupingBy(KV::getKey, mapping(KV::getValue, toList())));<NEW_LINE>// Backoff used to resume from partial failures<NEW_LINE>BackOff resume = resumeBackoff.backoff();<NEW_LINE>do {<NEW_LINE>BatchWriteItemRequest batchRequest = BatchWriteItemRequest.builder().<MASK><NEW_LINE>// If unprocessed items remain, we have to resume the operation (with backoff)<NEW_LINE>writesPerTable = client.batchWriteItem(batchRequest).unprocessedItems();<NEW_LINE>} while (!writesPerTable.isEmpty() && BackOffUtils.next(Sleeper.DEFAULT, resume));<NEW_LINE>if (!writesPerTable.isEmpty()) {<NEW_LINE>DYNAMO_DB_WRITE_FAILURES.inc();<NEW_LINE>LOG.error(RESUME_ERROR_LOG, writesPerTable);<NEW_LINE>throw new IOException(ERROR_UNPROCESSED_ITEMS);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>batch.clear();<NEW_LINE>}<NEW_LINE>}
requestItems(writesPerTable).build();
1,368,386
public static DescribeVodDomainConfigsResponse unmarshall(DescribeVodDomainConfigsResponse describeVodDomainConfigsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVodDomainConfigsResponse.setRequestId(_ctx.stringValue("DescribeVodDomainConfigsResponse.RequestId"));<NEW_LINE>List<DomainConfig> domainConfigs = new ArrayList<DomainConfig>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeVodDomainConfigsResponse.DomainConfigs.Length"); i++) {<NEW_LINE>DomainConfig domainConfig = new DomainConfig();<NEW_LINE>domainConfig.setFunctionName(_ctx.stringValue<MASK><NEW_LINE>domainConfig.setConfigId(_ctx.stringValue("DescribeVodDomainConfigsResponse.DomainConfigs[" + i + "].ConfigId"));<NEW_LINE>domainConfig.setStatus(_ctx.stringValue("DescribeVodDomainConfigsResponse.DomainConfigs[" + i + "].Status"));<NEW_LINE>List<FunctionArg> functionArgs = new ArrayList<FunctionArg>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("DescribeVodDomainConfigsResponse.DomainConfigs[" + i + "].FunctionArgs.Length"); j++) {<NEW_LINE>FunctionArg functionArg = new FunctionArg();<NEW_LINE>functionArg.setArgName(_ctx.stringValue("DescribeVodDomainConfigsResponse.DomainConfigs[" + i + "].FunctionArgs[" + j + "].ArgName"));<NEW_LINE>functionArg.setArgValue(_ctx.stringValue("DescribeVodDomainConfigsResponse.DomainConfigs[" + i + "].FunctionArgs[" + j + "].ArgValue"));<NEW_LINE>functionArgs.add(functionArg);<NEW_LINE>}<NEW_LINE>domainConfig.setFunctionArgs(functionArgs);<NEW_LINE>domainConfigs.add(domainConfig);<NEW_LINE>}<NEW_LINE>describeVodDomainConfigsResponse.setDomainConfigs(domainConfigs);<NEW_LINE>return describeVodDomainConfigsResponse;<NEW_LINE>}
("DescribeVodDomainConfigsResponse.DomainConfigs[" + i + "].FunctionName"));
1,497,700
public void IREM(int rhsValue) {<NEW_LINE>IntegerValue right = env.topFrame().operandStack.popBv32();<NEW_LINE>IntegerValue left = env.topFrame().operandStack.popBv32();<NEW_LINE>if (zeroViolation(right, rhsValue))<NEW_LINE>return;<NEW_LINE>int left_concrete_value = left.getConcreteValue().intValue();<NEW_LINE>int right_concrete_value = right<MASK><NEW_LINE>if (!left.containsSymbolicVariable()) {<NEW_LINE>left = ExpressionFactory.buildNewIntegerConstant(left_concrete_value);<NEW_LINE>}<NEW_LINE>if (!right.containsSymbolicVariable()) {<NEW_LINE>right = ExpressionFactory.buildNewIntegerConstant(right_concrete_value);<NEW_LINE>}<NEW_LINE>int con = left_concrete_value % right_concrete_value;<NEW_LINE>IntegerValue intExpr = ExpressionFactory.rem(left, right, con);<NEW_LINE>env.topFrame().operandStack.pushBv32(intExpr);<NEW_LINE>}
.getConcreteValue().intValue();
936,454
public GenericTableColumn createTableColumnImpl(@NotNull DBRProgressMonitor monitor, JDBCResultSet dbResult, @NotNull GenericTableBase table, String columnName, String typeName, int valueType, int sourceType, int ordinalPos, long columnSize, long charLength, Integer scale, Integer precision, int radix, boolean notNull, String remarks, String defaultValue, boolean autoIncrement, boolean autoGenerated) {<NEW_LINE>// Check for type length modifier<NEW_LINE>Matcher matcher = TYPE_WITH_LENGTH_PATTERN.matcher(typeName);<NEW_LINE>if (matcher.matches()) {<NEW_LINE>typeName = matcher.group(1);<NEW_LINE>columnSize = charLength = Integer.parseInt(matcher.group(2));<NEW_LINE>} else {<NEW_LINE>columnSize = charLength = -1;<NEW_LINE>}<NEW_LINE>return new SQLiteTableColumn(table, columnName, typeName, valueType, sourceType, ordinalPos, columnSize, charLength, scale, precision, radix, notNull, <MASK><NEW_LINE>}
remarks, defaultValue, autoIncrement, autoGenerated);
518,178
private void doAction(final MyAction action) {<NEW_LINE>LOG.debug("doAction: START " + action.name());<NEW_LINE>final MyExitAction[] exitActions;<NEW_LINE>List<Runnable> toBeCalled = null;<NEW_LINE>synchronized (myLock) {<NEW_LINE>final MyState oldState = myState;<NEW_LINE>myState = myState.transition(action);<NEW_LINE>if (oldState.equals(myState))<NEW_LINE>return;<NEW_LINE>exitActions = MyTransitionAction.getExit(oldState, myState);<NEW_LINE>LOG.debug("doAction: oldState: " + oldState.name() + <MASK><NEW_LINE>if (LOG.isDebugEnabled() && exitActions != null) {<NEW_LINE>final String debugExitActions = StringUtil.join(exitActions, exitAction -> exitAction.name(), " ");<NEW_LINE>LOG.debug("exit actions: " + debugExitActions);<NEW_LINE>}<NEW_LINE>if (exitActions != null) {<NEW_LINE>for (MyExitAction exitAction : exitActions) {<NEW_LINE>if (MyExitAction.markStart.equals(exitAction)) {<NEW_LINE>myWaitingFinishListeners.addAll(myWaitingStartListeners);<NEW_LINE>myWaitingStartListeners.clear();<NEW_LINE>} else if (MyExitAction.markEnd.equals(exitAction)) {<NEW_LINE>toBeCalled = new ArrayList<>(myWaitingFinishListeners);<NEW_LINE>myWaitingFinishListeners.clear();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (exitActions != null) {<NEW_LINE>for (MyExitAction exitAction : exitActions) {<NEW_LINE>if (MyExitAction.submitRequestToExecutor.equals(exitAction)) {<NEW_LINE>myAlarm.consume(myWorker);<NEW_LINE>// myAlarm.addRequest(myWorker, ourDelay);<NEW_LINE>// ApplicationManager.getApplication().executeOnPooledThread(myWorker);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (toBeCalled != null) {<NEW_LINE>for (Runnable runnable : toBeCalled) {<NEW_LINE>runnable.run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOG.debug("doAction: END " + action.name());<NEW_LINE>}
", newState: " + myState.name());
1,183,928
private void validate(ParseState state) {<NEW_LINE><MASK><NEW_LINE>if (command == null) {<NEW_LINE>List<String> unparsedInput = state.getUnparsedInput();<NEW_LINE>if (unparsedInput.isEmpty()) {<NEW_LINE>throw new ParseCommandMissingException();<NEW_LINE>} else {<NEW_LINE>throw new ParseCommandUnrecognizedException(unparsedInput);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ArgumentsMetadata arguments = command.getArguments();<NEW_LINE>if (state.getParsedArguments().isEmpty() && arguments != null && arguments.isRequired()) {<NEW_LINE>throw new ParseArgumentsMissingException(arguments.getTitle());<NEW_LINE>}<NEW_LINE>if (!state.getUnparsedInput().isEmpty()) {<NEW_LINE>throw new ParseArgumentsUnexpectedException(state.getUnparsedInput());<NEW_LINE>}<NEW_LINE>if (state.getLocation() == Context.OPTION) {<NEW_LINE>throw new ParseOptionMissingValueException(state.getCurrentOption().getTitle());<NEW_LINE>}<NEW_LINE>for (OptionMetadata option : command.getAllOptions()) {<NEW_LINE>if (option.isRequired() && !state.getParsedOptions().containsKey(option)) {<NEW_LINE>throw new ParseOptionMissingException(option.getOptions().iterator().next());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
CommandMetadata command = state.getCommand();
883,656
public List<PartitionUpdateParam> split() {<NEW_LINE>long[] nodeIds = nodeId2Neighbors<MASK><NEW_LINE>Arrays.sort(nodeIds);<NEW_LINE>List<PartitionUpdateParam> partParams = new ArrayList<>();<NEW_LINE>List<PartitionKey> partitions = PSAgentContext.get().getMatrixMetaManager().getPartitions(matrixId);<NEW_LINE>if (!RowUpdateSplitUtils.isInRange(nodeIds, partitions)) {<NEW_LINE>throw new AngelException("node id is not in range [" + partitions.get(0).getStartCol() + ", " + partitions.get(partitions.size() - 1).getEndCol());<NEW_LINE>}<NEW_LINE>int nodeIndex = 0;<NEW_LINE>int partIndex = 0;<NEW_LINE>while (nodeIndex < nodeIds.length || partIndex < partitions.size()) {<NEW_LINE>int length = 0;<NEW_LINE>long endOffset = partitions.get(partIndex).getEndCol();<NEW_LINE>while (nodeIndex < nodeIds.length && nodeIds[nodeIndex] < endOffset) {<NEW_LINE>nodeIndex++;<NEW_LINE>length++;<NEW_LINE>}<NEW_LINE>if (length > 0) {<NEW_LINE>partParams.add(new PartInitNeighborAliasTableParam(matrixId, partitions.get(partIndex), nodeId2Neighbors, nodeIds, nodeIndex - length, nodeIndex));<NEW_LINE>}<NEW_LINE>partIndex++;<NEW_LINE>}<NEW_LINE>return partParams;<NEW_LINE>}
.keySet().toLongArray();
742,161
public void marshall(InsightSummary insightSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (insightSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(insightSummary.getInsightId(), INSIGHTID_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getGroupARN(), GROUPARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getGroupName(), GROUPNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getRootCauseServiceId(), ROOTCAUSESERVICEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getCategories(), CATEGORIES_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getState(), STATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getStartTime(), STARTTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getEndTime(), ENDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getSummary(), SUMMARY_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getClientRequestImpactStatistics(), CLIENTREQUESTIMPACTSTATISTICS_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getRootCauseServiceRequestImpactStatistics(), ROOTCAUSESERVICEREQUESTIMPACTSTATISTICS_BINDING);<NEW_LINE>protocolMarshaller.marshall(insightSummary.getTopAnomalousServices(), TOPANOMALOUSSERVICES_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
insightSummary.getLastUpdateTime(), LASTUPDATETIME_BINDING);
1,845,745
private static void readGuide(Document packageDocument, EpubReader epubReader, Book book, Resources resources) {<NEW_LINE>Element guideElement = DOMUtil.getFirstElementByTagNameNS(packageDocument.getDocumentElement(<MASK><NEW_LINE>if (guideElement == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Guide guide = book.getGuide();<NEW_LINE>NodeList guideReferences = guideElement.getElementsByTagNameNS(NAMESPACE_OPF, OPFTags.reference);<NEW_LINE>for (int i = 0; i < guideReferences.getLength(); i++) {<NEW_LINE>Element referenceElement = (Element) guideReferences.item(i);<NEW_LINE>String resourceHref = DOMUtil.getAttribute(referenceElement, NAMESPACE_OPF, OPFAttributes.href);<NEW_LINE>if (StringUtil.isBlank(resourceHref)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Resource resource = resources.getByHref(StringUtil.substringBefore(resourceHref, Constants.FRAGMENT_SEPARATOR_CHAR));<NEW_LINE>if (resource == null) {<NEW_LINE>log.error("Guide is referencing resource with href " + resourceHref + " which could not be found");<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String type = DOMUtil.getAttribute(referenceElement, NAMESPACE_OPF, OPFAttributes.type);<NEW_LINE>if (StringUtil.isBlank(type)) {<NEW_LINE>log.error("Guide is referencing resource with href " + resourceHref + " which is missing the 'type' attribute");<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String title = DOMUtil.getAttribute(referenceElement, NAMESPACE_OPF, OPFAttributes.title);<NEW_LINE>if (GuideReference.COVER.equalsIgnoreCase(type)) {<NEW_LINE>// cover is handled elsewhere<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>GuideReference reference = new GuideReference(resource, type, title, StringUtil.substringAfter(resourceHref, Constants.FRAGMENT_SEPARATOR_CHAR));<NEW_LINE>guide.addReference(reference);<NEW_LINE>}<NEW_LINE>}
), NAMESPACE_OPF, OPFTags.guide);
1,460,541
private Optional<TableToSweep> logDecision(Optional<TableToSweep> chosenTable, Map<TableReference, Double> scores, SweepPriorityOverrideConfig sweepPriorityOverrideConfig) {<NEW_LINE>if (!log.isDebugEnabled()) {<NEW_LINE>return chosenTable;<NEW_LINE>}<NEW_LINE>String safeTableNamesToScore = scores.entrySet().stream().sorted(Comparator.comparingDouble(Map.Entry::getValue)).map(entry -> LoggingArgs.safeTableOrPlaceholder(entry.getKey()) + "->" + entry.getValue()).collect(Collectors.joining(", ", "[", "]"));<NEW_LINE>String chosenTableString = chosenTable.isPresent() ? LoggingArgs.safeTableOrPlaceholder(chosenTable.get().getTableRef(<MASK><NEW_LINE>log.debug("Chose {} from scores: {}, unsafeScores: {}, overrides: {}", SafeArg.of("chosenTable", chosenTableString), SafeArg.of("scores", safeTableNamesToScore), UnsafeArg.of("unsafeScores", scores), UnsafeArg.of("overrides", sweepPriorityOverrideConfig));<NEW_LINE>return chosenTable;<NEW_LINE>}
)).toString() : "no table";
1,037,104
private CheckStatusResponse checkStatus(Node seedNode) {<NEW_LINE>if (config.isUseAsyncServer()) {<NEW_LINE>AsyncMetaClient client = (AsyncMetaClient) getAsyncClient(seedNode);<NEW_LINE>if (client == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return SyncClientAdaptor.checkStatus(client, getStartUpStatus());<NEW_LINE>} catch (TException e) {<NEW_LINE>logger.warn("Error occurs when check status on node : {}", seedNode);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread.currentThread().interrupt();<NEW_LINE>logger.warn("Current thread is interrupted.");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>SyncMetaClient client = (SyncMetaClient) getSyncClient(seedNode, false);<NEW_LINE>if (client == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return client.checkStatus(getStartUpStatus());<NEW_LINE>} catch (TException e) {<NEW_LINE>client.close();<NEW_LINE><MASK><NEW_LINE>} finally {<NEW_LINE>client.returnSelf();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
logger.warn("Error occurs when check status on node : {}", seedNode);
837,485
protected HttpResponse addConnectionHeader(final HttpRequest request, final HttpResponse response) {<NEW_LINE>ConnectionOptions connectionOptions = response.getConnectionOptions();<NEW_LINE>HttpResponse responseWithConnectionHeader = response.clone();<NEW_LINE>if (connectionOptions != null && (connectionOptions.getSuppressConnectionHeader() != null || connectionOptions.getKeepAliveOverride() != null)) {<NEW_LINE>if (!Boolean.TRUE.equals(connectionOptions.getSuppressConnectionHeader())) {<NEW_LINE>if (Boolean.TRUE.equals(connectionOptions.getKeepAliveOverride())) {<NEW_LINE>responseWithConnectionHeader.replaceHeader(header(CONNECTION.toString(), KEEP_ALIVE.toString()));<NEW_LINE>} else {<NEW_LINE>responseWithConnectionHeader.replaceHeader(header(CONNECTION.toString(), CLOSE.toString()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (Boolean.TRUE.equals(request.isKeepAlive())) {<NEW_LINE>responseWithConnectionHeader.replaceHeader(header(CONNECTION.toString()<MASK><NEW_LINE>} else {<NEW_LINE>responseWithConnectionHeader.replaceHeader(header(CONNECTION.toString(), CLOSE.toString()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return responseWithConnectionHeader;<NEW_LINE>}
, KEEP_ALIVE.toString()));
641,856
public void createParamEditLayout() {<NEW_LINE>if (paramEditComponentLayout == null) {<NEW_LINE>paramEditComponentLayout = uiComponents.create(HBoxLayout.class);<NEW_LINE>paramEditComponentLayout.setSpacing(true);<NEW_LINE>paramEditComponentLayout.setWidthFull();<NEW_LINE>}<NEW_LINE>paramEditComponent = condition.getParam().createEditComponentForFilterValue(filterDataContext);<NEW_LINE>paramEditComponent.addStyleName("param-field");<NEW_LINE>if (paramEditComponent instanceof Field) {<NEW_LINE>((Field) paramEditComponent).setRequired(condition.getRequired());<NEW_LINE>}<NEW_LINE>paramEditComponentLayout.add(paramEditComponent);<NEW_LINE>removeButton = uiComponents.create(LinkButton.class);<NEW_LINE>removeButton.setStyleName("condition-remove-btn");<NEW_LINE>removeButton.setIcon("icons/item-remove.png");<NEW_LINE>removeButton.setAlignment(Alignment.MIDDLE_LEFT);<NEW_LINE>removeButton.setVisible(removeButtonVisible);<NEW_LINE>removeButton.setAction(removeButtonAction);<NEW_LINE>paramEditComponentLayout.add(removeButton);<NEW_LINE>if (paramEditComponentExpandRequired(condition)) {<NEW_LINE>paramEditComponentLayout.expand(paramEditComponent);<NEW_LINE>} else {<NEW_LINE>HBoxLayout spring = <MASK><NEW_LINE>paramEditComponentLayout.add(spring);<NEW_LINE>paramEditComponentLayout.expand(spring);<NEW_LINE>}<NEW_LINE>}
uiComponents.create(HBoxLayout.class);
1,065,229
public TextEdit rewriteAST(IDocument document, Map options) {<NEW_LINE>TextEdit result = new MultiTextEdit();<NEW_LINE>final CompilationUnit rootNode = getRootNode();<NEW_LINE>if (rootNode != null) {<NEW_LINE>TargetSourceRangeComputer xsrComputer = new TargetSourceRangeComputer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public SourceRange computeSourceRange(ASTNode node) {<NEW_LINE>int extendedStartPosition = rootNode.getExtendedStartPosition(node);<NEW_LINE>int extendedLength = rootNode.getExtendedLength(node);<NEW_LINE>return new SourceRange(extendedStartPosition, extendedLength);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>char[] content = document.get().toCharArray();<NEW_LINE>LineInformation lineInfo = LineInformation.create(document);<NEW_LINE>String lineDelim = TextUtilities.getDefaultLineDelimiter(document);<NEW_LINE>List comments = rootNode.getCommentList();<NEW_LINE>Map currentOptions = options == null ? JavaCore.getOptions() : options;<NEW_LINE>ASTRewriteAnalyzer visitor = new ASTRewriteAnalyzer(content, lineInfo, lineDelim, result, this.eventStore, this.nodeStore, comments, currentOptions, xsrComputer, (<MASK><NEW_LINE>rootNode.accept(visitor);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
RecoveryScannerData) rootNode.getStatementsRecoveryData());