idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
739,628
final ListDomainNamesResult executeListDomainNames(ListDomainNamesRequest listDomainNamesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDomainNamesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListDomainNamesRequest> request = null;<NEW_LINE>Response<ListDomainNamesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListDomainNamesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDomainNamesRequest));<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, "AppSync");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDomainNames");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListDomainNamesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new ListDomainNamesResultJsonUnmarshaller());
950,111
private Item buildUserInput(OperatorNode<ExpressionOperator> ast) {<NEW_LINE>// TODO add support for default arguments if property results in nothing<NEW_LINE>List<OperatorNode<ExpressionOperator>> args = ast.getArgument(1);<NEW_LINE>String wordData = getStringContents(args.get(0));<NEW_LINE>Boolean allowEmpty = getAnnotation(ast, USER_INPUT_ALLOW_EMPTY, Boolean.class, Boolean.FALSE, "flag for allowing NullItem to be returned");<NEW_LINE>if (allowEmpty && (wordData == null || wordData.isEmpty()))<NEW_LINE>return new NullItem();<NEW_LINE>String grammar = getAnnotation(ast, USER_INPUT_GRAMMAR, String.class, Query.Type.<MASK><NEW_LINE>String defaultIndex = getAnnotation(ast, USER_INPUT_DEFAULT_INDEX, String.class, "default", "default index for user input terms");<NEW_LINE>Language language = decideParsingLanguage(ast, wordData);<NEW_LINE>Item item;<NEW_LINE>if (USER_INPUT_RAW.equals(grammar)) {<NEW_LINE>item = instantiateWordItem(defaultIndex, wordData, ast, null, SegmentWhen.NEVER, true, language);<NEW_LINE>} else if (USER_INPUT_SEGMENT.equals(grammar)) {<NEW_LINE>item = instantiateWordItem(defaultIndex, wordData, ast, null, SegmentWhen.ALWAYS, false, language);<NEW_LINE>} else {<NEW_LINE>item = parseUserInput(grammar, defaultIndex, wordData, language, allowEmpty);<NEW_LINE>propagateUserInputAnnotations(ast, item);<NEW_LINE>}<NEW_LINE>return item;<NEW_LINE>}
ALL.toString(), "grammar for handling user input");
292,357
private void createPolygonTables(FeatureCollection featureCollection) {<NEW_LINE>// defines the schema for the geometry's attribute<NEW_LINE>List<Field> polygonFields = new ArrayList<>();<NEW_LINE>polygonFields.add(Field.createString<MASK><NEW_LINE>// a feature collection table that creates polygon geometry<NEW_LINE>FeatureCollectionTable polygonTable = new FeatureCollectionTable(polygonFields, GeometryType.POLYGON, SpatialReferences.getWgs84());<NEW_LINE>// set a default symbol for features in the collection table<NEW_LINE>SimpleLineSymbol lineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID, 0xFF0000FF, 2);<NEW_LINE>SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.DIAGONAL_CROSS, 0xFF00FFFF, lineSymbol);<NEW_LINE>SimpleRenderer renderer = new SimpleRenderer(fillSymbol);<NEW_LINE>polygonTable.setRenderer(renderer);<NEW_LINE>// add feature collection table to feature collection<NEW_LINE>featureCollection.getTables().add(polygonTable);<NEW_LINE>// create feature using the collection table by passing an attribute and geometry<NEW_LINE>Map<String, Object> attributes = new HashMap<>();<NEW_LINE>attributes.put(polygonFields.get(0).getName(), "Restricted area");<NEW_LINE>PolygonBuilder builder = new PolygonBuilder(SpatialReferences.getWgs84());<NEW_LINE>builder.addPoint(new Point(-79.497238, 8.849289));<NEW_LINE>builder.addPoint(new Point(-79.337936, 8.638903));<NEW_LINE>builder.addPoint(new Point(-79.11409, 8.895422));<NEW_LINE>Feature addedFeature = polygonTable.createFeature(attributes, builder.toGeometry());<NEW_LINE>// add feature to collection table<NEW_LINE>polygonTable.addFeatureAsync(addedFeature);<NEW_LINE>}
("Area", "Area Name", 50));
140,538
public void paint(Graphics g) {<NEW_LINE>Graphics2D gr = (Graphics2D) g;<NEW_LINE>super.paint(g);<NEW_LINE>Rectangle bounds = scene.getBounds();<NEW_LINE>Dimension size = getSize();<NEW_LINE>double sx = bounds.width > 0 ? (double) size.width / bounds.width : 0.0;<NEW_LINE>double sy = bounds.width > 0 ? (double) size.height / bounds.height : 0.0;<NEW_LINE>double scale = Math.min(sx, sy);<NEW_LINE>int vw = (int) (scale * bounds.width);<NEW_LINE>int vh = (int) (scale * bounds.height);<NEW_LINE>int vx = (size.width - vw) / 2;<NEW_LINE>int vy = (size.height - vh) / 2;<NEW_LINE>if (image == null || vw != imageWidth || vh != imageHeight) {<NEW_LINE>imageWidth = vw;<NEW_LINE>imageHeight = vh;<NEW_LINE>image = this.createImage(imageWidth, imageHeight);<NEW_LINE>Graphics2D ig = (Graphics2D) image.getGraphics();<NEW_LINE>ig.scale(scale, scale);<NEW_LINE>scene.paint(ig);<NEW_LINE>}<NEW_LINE>gr.drawImage(image, vx, vy, this);<NEW_LINE>JComponent component = scene.getView();<NEW_LINE>double zoomFactor = scene.getZoomFactor();<NEW_LINE>Rectangle viewRectangle = component != null ? component.getVisibleRect() : null;<NEW_LINE>if (viewRectangle != null) {<NEW_LINE>Rectangle window = new Rectangle((int) ((double) viewRectangle.x * scale / zoomFactor), (int) ((double) viewRectangle.y * scale / zoomFactor), (int) ((double) viewRectangle.width * scale / zoomFactor), (int) ((double) viewRectangle.height * scale / zoomFactor));<NEW_LINE>window.translate(vx, vy);<NEW_LINE>gr.setColor(new Color(200<MASK><NEW_LINE>gr.fill(window);<NEW_LINE>gr.setColor(Color.BLACK);<NEW_LINE>gr.drawRect(window.x, window.y, window.width - 1, window.height - 1);<NEW_LINE>}<NEW_LINE>}
, 200, 200, 128));
797,841
private void createPromptNode() {<NEW_LINE>if (promptText != null || !linesWrapper.usePromptText.get()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>promptText = new Text();<NEW_LINE>promptText.setManaged(false);<NEW_LINE>promptText.getStyleClass().add("text");<NEW_LINE>promptText.visibleProperty().bind(linesWrapper.usePromptText);<NEW_LINE>promptText.fontProperty().bind(<MASK><NEW_LINE>promptText.textProperty().bind(getSkinnable().promptTextProperty());<NEW_LINE>promptText.fillProperty().bind(linesWrapper.animatedPromptTextFill);<NEW_LINE>promptText.setLayoutX(1);<NEW_LINE>promptText.getTransforms().add(linesWrapper.promptTextScale);<NEW_LINE>linesWrapper.promptContainer.getChildren().add(promptText);<NEW_LINE>if (getSkinnable().isFocused() && ((IFXLabelFloatControl) getSkinnable()).isLabelFloat()) {<NEW_LINE>promptText.setTranslateY(-Math.floor(textPane.getHeight()));<NEW_LINE>linesWrapper.promptTextScale.setX(0.85);<NEW_LINE>linesWrapper.promptTextScale.setY(0.85);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>reflectionFieldConsumer("promptNode", field -> {<NEW_LINE>Object oldValue = field.get(this);<NEW_LINE>if (oldValue != null) {<NEW_LINE>textPane.getChildren().remove(oldValue);<NEW_LINE>}<NEW_LINE>field.set(this, promptText);<NEW_LINE>});<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
getSkinnable().fontProperty());
930,201
private Library showNoDownloadDialog(String name) throws Exception {<NEW_LINE>DialogDescriptor networkProblem = new // NOI18N<NEW_LINE>DialogDescriptor(// NOI18N<NEW_LINE>problemPanel(FormUtils.getBundleString("swingapp.nodownload_header"), FormUtils.getBundleString("swingapp.nodownload_message")), // modal<NEW_LINE>FormUtils.getBundleString<MASK><NEW_LINE>initButtons();<NEW_LINE>networkProblem.setOptions(new Object[] { tryAgain, NotifyDescriptor.CANCEL_OPTION });<NEW_LINE>networkProblem.setAdditionalOptions(new Object[] { libraryManager });<NEW_LINE>networkProblem.setClosingOptions(new Object[] { libraryManager, tryAgain, NotifyDescriptor.CANCEL_OPTION });<NEW_LINE>networkProblem.setMessageType(NotifyDescriptor.WARNING_MESSAGE);<NEW_LINE>Dialog networkProblemDialog = DialogDisplayer.getDefault().createDialog(networkProblem);<NEW_LINE>networkProblemDialog.setVisible(true);<NEW_LINE>Object answer = networkProblem.getValue();<NEW_LINE>if (NotifyDescriptor.CANCEL_OPTION.equals(answer) || answer.equals(-1)) /* escape */<NEW_LINE>{<NEW_LINE>// NOI18N<NEW_LINE>LOG.fine("cancel no download dialog");<NEW_LINE>return null;<NEW_LINE>} else if (tryAgain.equals(answer)) {<NEW_LINE>// NOI18N<NEW_LINE>LOG.fine("try again download()");<NEW_LINE>return download(name);<NEW_LINE>} else if (libraryManager.equals(answer)) {<NEW_LINE>LOG.fine("open library manager");<NEW_LINE>throw new Exception("swingapplib failed/canceled to install properly, open library manager instaed");<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>assert false : "Unknown " + answer;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
("swingapp.resolve_title"), true, null);
176,939
private byte[] buildCommitToParentsVector(List<BlockHeader> mainchainBlocks) {<NEW_LINE>long bestBlockHeight = mainchainBlocks.get(0).getNumber();<NEW_LINE>long cpvStartHeight = (bestBlockHeight / CPV_JUMP_FACTOR) * CPV_JUMP_FACTOR;<NEW_LINE>byte[] commitToParentsVector = new byte[CPV_SIZE];<NEW_LINE>for (int i = 0; i < CPV_SIZE; i++) {<NEW_LINE>long currentCpvElement = bestBlockHeight - cpvStartHeight + i * CPV_JUMP_FACTOR;<NEW_LINE>BlockHeader blockHeader = mainchainBlocks.get((int) currentCpvElement);<NEW_LINE>byte[<MASK><NEW_LINE>byte[] bitcoinBlockHash = params.getDefaultSerializer().makeBlock(bitcoinBlock).getHash().getBytes();<NEW_LINE>byte leastSignificantByte = bitcoinBlockHash[bitcoinBlockHash.length - 1];<NEW_LINE>commitToParentsVector[i] = leastSignificantByte;<NEW_LINE>}<NEW_LINE>return commitToParentsVector;<NEW_LINE>}
] bitcoinBlock = blockHeader.getBitcoinMergedMiningHeader();
418,076
public void handleEvent(Event event) {<NEW_LINE>String name = nameTxt.getText();<NEW_LINE>if (StringUtil.isEmpty(name)) {<NEW_LINE>MessageDialog.openWarning(dialog, "Required Name", "Name is required.");<NEW_LINE>nameTxt.setFocus();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (groupList.contains(name)) {<NEW_LINE>MessageDialog.openWarning(dialog, "Duplicated Name", "Name is duplicated.");<NEW_LINE>nameTxt.setFocus();<NEW_LINE>nameTxt.selectAll();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>MapValue mv = new MapValue();<NEW_LINE>param.put("name", name);<NEW_LINE>param.put("policy", mv);<NEW_LINE>TableItem[<MASK><NEW_LINE>for (TableItem item : items) {<NEW_LINE>String policy = item.getText();<NEW_LINE>BooleanValue bv = new BooleanValue(item.getChecked());<NEW_LINE>mv.put(policy, bv);<NEW_LINE>}<NEW_LINE>new AddAccountGroupJob(param).schedule();<NEW_LINE>dialog.close();<NEW_LINE>}
] items = table.getItems();
1,037,319
// //////////////////////////////////////////////////////////////////////////<NEW_LINE>// Methods //<NEW_LINE>// //////////////////////////////////////////////////////////////////////////<NEW_LINE>Runner newRunner(final GlassFishServer srv, final Command cmd, final Class runnerClass) throws CommandException {<NEW_LINE>final String METHOD = "newRunner";<NEW_LINE>Constructor<Runner> con = null;<NEW_LINE>Runner runner = null;<NEW_LINE>try {<NEW_LINE>con = runnerClass.getConstructor(GlassFishServer.class, Command.class);<NEW_LINE>} catch (NoSuchMethodException | SecurityException nsme) {<NEW_LINE>throw new CommandException(CommandException.RUNNER_INIT, nsme);<NEW_LINE>}<NEW_LINE>if (con == null) {<NEW_LINE>return runner;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>runner = con.newInstance(srv, cmd);<NEW_LINE>} catch (InstantiationException | IllegalAccessException ie) {<NEW_LINE>throw new <MASK><NEW_LINE>} catch (InvocationTargetException ite) {<NEW_LINE>LOGGER.log(Level.WARNING, "exceptionMsg", ite.getMessage());<NEW_LINE>Throwable t = ite.getCause();<NEW_LINE>if (t != null) {<NEW_LINE>LOGGER.log(Level.WARNING, "cause", t.getMessage());<NEW_LINE>}<NEW_LINE>throw new CommandException(CommandException.RUNNER_INIT, ite);<NEW_LINE>}<NEW_LINE>return runner;<NEW_LINE>}
CommandException(CommandException.RUNNER_INIT, ie);
1,078,189
final ModifyUserResult executeModifyUser(ModifyUserRequest modifyUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ModifyUserRequest> request = null;<NEW_LINE>Response<ModifyUserResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ModifyUserRequestMarshaller().marshall(super.beforeMarshalling(modifyUserRequest));<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, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ModifyUser");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<ModifyUserResult> responseHandler = new StaxResponseHandler<ModifyUserResult>(new ModifyUserResultStaxUnmarshaller());<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
1,108,568
final GetLaunchProfileInitializationResult executeGetLaunchProfileInitialization(GetLaunchProfileInitializationRequest getLaunchProfileInitializationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLaunchProfileInitializationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetLaunchProfileInitializationRequest> request = null;<NEW_LINE>Response<GetLaunchProfileInitializationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetLaunchProfileInitializationRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "nimble");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetLaunchProfileInitialization");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetLaunchProfileInitializationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetLaunchProfileInitializationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(getLaunchProfileInitializationRequest));
267,626
private void visitLabel(NodeTraversal t, Node node) {<NEW_LINE>Node nameNode = node.getFirstChild();<NEW_LINE>checkState(nameNode != null);<NEW_LINE>String name = nameNode.getString();<NEW_LINE>LabelInfo li = getLabelInfo(name);<NEW_LINE>// This is a label...<NEW_LINE>if (li.referenced || !removeUnused) {<NEW_LINE>String newName = getNameForId(li.id);<NEW_LINE>if (!name.equals(newName)) {<NEW_LINE>// ... and it is used, give it the short name.<NEW_LINE>nameNode.setString(newName);<NEW_LINE>if (markChanges) {<NEW_LINE>t.reportCodeChange();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// ... and it is not referenced, just remove it.<NEW_LINE>Node newChild = node.getLastChild();<NEW_LINE>newChild.detach();<NEW_LINE>node.replaceWith(newChild);<NEW_LINE>if (newChild.isBlock()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (markChanges) {<NEW_LINE>t.reportCodeChange();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Remove the label from the current stack of labels.<NEW_LINE>namespaceStack.peek().renameMap.remove(name);<NEW_LINE>}
NodeUtil.tryMergeBlock(newChild, false);
1,444,549
private void embed(AeiObjects aeiObjects, Embed embed) throws Exception {<NEW_LINE>ActionAssignCreateWi assignData = new ActionAssignCreateWi();<NEW_LINE>String targetApplication = embed.getTargetApplication();<NEW_LINE><MASK><NEW_LINE>if (StringUtils.isEmpty(targetApplication)) {<NEW_LINE>throw new ExceptionEmptyTargetApplication(embed.getName());<NEW_LINE>}<NEW_LINE>if (StringUtils.isEmpty(targetProcess)) {<NEW_LINE>throw new ExceptionEmptyTargetProcess(embed.getName());<NEW_LINE>}<NEW_LINE>assignData.setApplication(targetApplication);<NEW_LINE>assignData.setProcess(embed.getTargetProcessName());<NEW_LINE>if (BooleanUtils.isTrue(embed.getInheritData())) {<NEW_LINE>assignData.setData(aeiObjects.getData());<NEW_LINE>}<NEW_LINE>if (BooleanUtils.isTrue(embed.getInheritAttachment())) {<NEW_LINE>List<Attachment> os = this.business().entityManagerContainer().list(Attachment.class, this.business().attachment().listWithJob(aeiObjects.getWork().getJob()));<NEW_LINE>for (Attachment attachment : os) {<NEW_LINE>WiAttachment wiAttachment = new WiAttachment();<NEW_LINE>attachment.copyTo(wiAttachment, true);<NEW_LINE>assignData.getAttachmentList().add(wiAttachment);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String targetIdentity = this.targetIdentity(aeiObjects, embed);<NEW_LINE>targetIdentity = this.business().organization().identity().get(targetIdentity);<NEW_LINE>if (StringUtils.isEmpty(targetIdentity)) {<NEW_LINE>throw new ExceptionEmptyTargetIdentity(embed.getName());<NEW_LINE>}<NEW_LINE>assignData.setIdentity(targetIdentity);<NEW_LINE>assignData.setTitle(this.targetTitle(aeiObjects, embed));<NEW_LINE>assignData.setProcessing(true);<NEW_LINE>assignData.setParentWork(aeiObjects.getWork().getId());<NEW_LINE>assignData.setParentJob(aeiObjects.getWork().getJob());<NEW_LINE>if (this.hasAssignDataScript(embed)) {<NEW_LINE>WrapScriptObject wrap = new WrapScriptObject();<NEW_LINE>wrap.set(gson.toJson(assignData));<NEW_LINE>ScriptContext scriptContext = aeiObjects.scriptContext();<NEW_LINE>scriptContext.getBindings(ScriptContext.ENGINE_SCOPE).put(ScriptingFactory.BINDING_NAME_ASSIGNDATA, wrap);<NEW_LINE>CompiledScript cs = aeiObjects.business().element().getCompiledScript(aeiObjects.getWork().getApplication(), embed, Business.EVENT_EMBEDTARGETASSIGNDATA);<NEW_LINE>ActionAssignCreateWi returnData = JsonScriptingExecutor.eval(cs, scriptContext, ActionAssignCreateWi.class);<NEW_LINE>if (null != returnData) {<NEW_LINE>assignData = returnData;<NEW_LINE>} else {<NEW_LINE>assignData = gson.fromJson(wrap.get(), ActionAssignCreateWi.class);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.debug("embed:{}, process:{} try to embed application:{}, process:{}, assignData:{}.", embed::getName, embed::getProcess, embed::getTargetApplication, embed::getTargetProcess, assignData::toString);<NEW_LINE>EmbedExecutor executor = new EmbedExecutor();<NEW_LINE>ActionAssignCreateWo wo = executor.execute(assignData);<NEW_LINE>aeiObjects.getWork().setEmbedTargetWork(wo.getId());<NEW_LINE>aeiObjects.getWork().setEmbedTargetJob(wo.getJob());<NEW_LINE>}
String targetProcess = embed.getTargetProcess();
1,411,058
private static String readCode(String location) {<NEW_LINE>String javaFile = location;<NEW_LINE>BufferedReader reader = null;<NEW_LINE>try {<NEW_LINE>javaFile = javaFile.split("\\$")[0];<NEW_LINE>javaFile = javaFile.split("#")[0];<NEW_LINE>javaFile = javaFile.replaceAll("\\.", "/");<NEW_LINE>javaFile = "src/test/java/" + javaFile + ".java";<NEW_LINE>int lineNr = Integer.parseInt(location.split(":")[1]);<NEW_LINE>reader = new <MASK><NEW_LINE>String line = null;<NEW_LINE>for (int lineCnt = 0; lineCnt < lineNr; lineCnt++) {<NEW_LINE>line = reader.readLine();<NEW_LINE>}<NEW_LINE>return line;<NEW_LINE>} catch (Exception exc) {<NEW_LINE>logger.error("Encountered exception opening file '{}':", javaFile, exc);<NEW_LINE>throw new RuntimeException(exc);<NEW_LINE>} finally {<NEW_LINE>if (reader != null) {<NEW_LINE>try {<NEW_LINE>reader.close();<NEW_LINE>} catch (IOException exc) {<NEW_LINE>// muted<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
BufferedReader(new FileReader(javaFile));
511,097
protected void check() {<NEW_LINE>if (display.isDisposed())<NEW_LINE>return;<NEW_LINE>shell = ShellFactory.createMainShell(SWT.DIALOG_TRIM);<NEW_LINE>Utils.setShellIcon(shell);<NEW_LINE>shell.setText(MessageText.getString("dialog.associations.title"));<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = 3;<NEW_LINE>shell.setLayout(layout);<NEW_LINE>GridData gridData;<NEW_LINE>// text<NEW_LINE>Label user_label = new Label(shell, SWT.NULL);<NEW_LINE>Messages.setLanguageText(user_label, "dialog.associations.prompt");<NEW_LINE>gridData = new GridData(GridData.FILL_BOTH);<NEW_LINE>gridData.horizontalSpan = 3;<NEW_LINE>user_label.setLayoutData(gridData);<NEW_LINE>final Button checkBox = new Button(shell, SWT.CHECK);<NEW_LINE>checkBox.setSelection(true);<NEW_LINE>gridData = new GridData(GridData.FILL_BOTH);<NEW_LINE>gridData.horizontalSpan = 3;<NEW_LINE>checkBox.setLayoutData(gridData);<NEW_LINE>Messages.setLanguageText(checkBox, "dialog.associations.askagain");<NEW_LINE>// line<NEW_LINE>Label labelSeparator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);<NEW_LINE>gridData = new GridData(GridData.FILL_HORIZONTAL);<NEW_LINE>gridData.horizontalSpan = 3;<NEW_LINE>labelSeparator.setLayoutData(gridData);<NEW_LINE>// buttons<NEW_LINE>new <MASK><NEW_LINE>Button bYes = new Button(shell, SWT.PUSH);<NEW_LINE>bYes.setText(MessageText.getString("Button.yes"));<NEW_LINE>gridData = new GridData(GridData.FILL_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END | GridData.HORIZONTAL_ALIGN_FILL);<NEW_LINE>gridData.grabExcessHorizontalSpace = true;<NEW_LINE>gridData.widthHint = 70;<NEW_LINE>bYes.setLayoutData(gridData);<NEW_LINE>bYes.addListener(SWT.Selection, new Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event e) {<NEW_LINE>close(true, checkBox.getSelection());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Button bNo = new Button(shell, SWT.PUSH);<NEW_LINE>bNo.setText(MessageText.getString("Button.no"));<NEW_LINE>gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);<NEW_LINE>gridData.grabExcessHorizontalSpace = false;<NEW_LINE>gridData.widthHint = 70;<NEW_LINE>bNo.setLayoutData(gridData);<NEW_LINE>bNo.addListener(SWT.Selection, new Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event e) {<NEW_LINE>close(false, checkBox.getSelection());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>bYes.setFocus();<NEW_LINE>shell.setDefaultButton(bYes);<NEW_LINE>shell.addListener(SWT.Traverse, new Listener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleEvent(Event e) {<NEW_LINE>if (e.character == SWT.ESC) {<NEW_LINE>close(false, true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>shell.pack();<NEW_LINE>Utils.centreWindow(shell);<NEW_LINE>shell.open();<NEW_LINE>}
Label(shell, SWT.NULL);
1,084,572
protected Dependency createDependency(Dependency dependency, String name, String version, String scope) {<NEW_LINE>final Dependency nodeModule = new Dependency(new File(dependency.getActualFile() <MASK><NEW_LINE>nodeModule.setEcosystem(NPM_DEPENDENCY_ECOSYSTEM);<NEW_LINE>// this is virtual - the sha1 is purely for the hyperlink in the final html report<NEW_LINE>nodeModule.setSha1sum(Checksum.getSHA1Checksum(String.format("%s:%s", name, version)));<NEW_LINE>nodeModule.setSha256sum(Checksum.getSHA256Checksum(String.format("%s:%s", name, version)));<NEW_LINE>nodeModule.setMd5sum(Checksum.getMD5Checksum(String.format("%s:%s", name, version)));<NEW_LINE>nodeModule.addEvidence(EvidenceType.PRODUCT, "package.json", "name", name, Confidence.HIGHEST);<NEW_LINE>nodeModule.addEvidence(EvidenceType.VENDOR, "package.json", "name", name, Confidence.HIGH);<NEW_LINE>if (!StringUtils.isBlank(version)) {<NEW_LINE>nodeModule.addEvidence(EvidenceType.VERSION, "package.json", "version", version, Confidence.HIGHEST);<NEW_LINE>nodeModule.setVersion(version);<NEW_LINE>}<NEW_LINE>if (dependency.getName() != null) {<NEW_LINE>nodeModule.addProjectReference(dependency.getName() + ": " + scope);<NEW_LINE>} else {<NEW_LINE>nodeModule.addProjectReference(dependency.getDisplayFileName() + ": " + scope);<NEW_LINE>}<NEW_LINE>nodeModule.setName(name);<NEW_LINE>// TODO - we can likely create a valid CPE as a low confidence guess using cpe:2.3:a:[name]_project:[name]:[version]<NEW_LINE>// (and add a targetSw of npm/node)<NEW_LINE>Identifier id;<NEW_LINE>try {<NEW_LINE>final PackageURL purl = PackageURLBuilder.aPackageURL().withType(StandardTypes.NPM).withName(name).withVersion(version).build();<NEW_LINE>id = new PurlIdentifier(purl, Confidence.HIGHEST);<NEW_LINE>} catch (MalformedPackageURLException ex) {<NEW_LINE>LOGGER.debug("Unable to generate Purl - using a generic identifier instead " + ex.getMessage());<NEW_LINE>id = new GenericIdentifier(String.format("npm:%s@%s", dependency.getName(), version), Confidence.HIGHEST);<NEW_LINE>}<NEW_LINE>nodeModule.addSoftwareIdentifier(id);<NEW_LINE>return nodeModule;<NEW_LINE>}
+ "?" + name), true);
109,355
protected void showControl() {<NEW_LINE>Animation upAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f);<NEW_LINE>upAction.setDuration(300);<NEW_LINE>Animation downAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -1.0f, Animation.RELATIVE_TO_SELF, 0.0f);<NEW_LINE>downAction.setDuration(300);<NEW_LINE>if (mSeekBar.getMax() != max) {<NEW_LINE>mSeekBar.setMax(max);<NEW_LINE>mSeekBar.setProgress(max);<NEW_LINE>}<NEW_LINE>mSeekBar.setProgress(progress);<NEW_LINE>mProgressLayout.startAnimation(upAction);<NEW_LINE>mProgressLayout.setVisibility(View.VISIBLE);<NEW_LINE>mBackLayout.startAnimation(downAction);<NEW_LINE>mBackLayout.setVisibility(View.VISIBLE);<NEW_LINE>if (mHideInfo) {<NEW_LINE>mInfoLayout.startAnimation(downAction);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
mInfoLayout.setVisibility(View.VISIBLE);
342,015
public ResponseEntity<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws RestClientException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'petId' when calling updatePetWithForm");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>final Map<String, Object> uriVariables = new HashMap<String, Object>();<NEW_LINE>uriVariables.put("petId", petId);<NEW_LINE>final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();<NEW_LINE>final HttpHeaders localVarHeaderParams = new HttpHeaders();<NEW_LINE>final MultiValueMap<String, String> localVarCookieParams = new <MASK><NEW_LINE>final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();<NEW_LINE>if (name != null)<NEW_LINE>localVarFormParams.add("name", name);<NEW_LINE>if (status != null)<NEW_LINE>localVarFormParams.add("status", status);<NEW_LINE>final String[] localVarAccepts = {};<NEW_LINE>final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/x-www-form-urlencoded" };<NEW_LINE>final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "petstore_auth" };<NEW_LINE>ParameterizedTypeReference<Void> localReturnType = new ParameterizedTypeReference<Void>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI("/pet/{petId}", HttpMethod.POST, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);<NEW_LINE>}
LinkedMultiValueMap<String, String>();
1,521,287
public long readRawLittleEndian64() {<NEW_LINE>final <MASK><NEW_LINE>int offset = this.offset;<NEW_LINE>final byte b1 = buffer[offset++];<NEW_LINE>final byte b2 = buffer[offset++];<NEW_LINE>final byte b3 = buffer[offset++];<NEW_LINE>final byte b4 = buffer[offset++];<NEW_LINE>final byte b5 = buffer[offset++];<NEW_LINE>final byte b6 = buffer[offset++];<NEW_LINE>final byte b7 = buffer[offset++];<NEW_LINE>final byte b8 = buffer[offset++];<NEW_LINE>this.offset = offset;<NEW_LINE>return (((long) b1 & 0xff)) | (((long) b2 & 0xff) << 8) | (((long) b3 & 0xff) << 16) | (((long) b4 & 0xff) << 24) | (((long) b5 & 0xff) << 32) | (((long) b6 & 0xff) << 40) | (((long) b7 & 0xff) << 48) | (((long) b8 & 0xff) << 56);<NEW_LINE>}
byte[] buffer = this.buffer;
1,052,242
private void calcPositionAndShow(Project project, JBPopup balloon) {<NEW_LINE>Point savedLocation = WindowStateService.getInstance<MASK><NEW_LINE>// for first show and short mode popup should be shifted to the top screen half<NEW_LINE>if (savedLocation == null && mySearchEverywhereUI.getViewType() == SearchEverywhereUI.ViewType.SHORT) {<NEW_LINE>Window window = project != null ? TargetAWT.to(WindowManager.getInstance().suggestParentWindow(project)) : KeyboardFocusManager.getCurrentKeyboardFocusManager().getFocusedWindow();<NEW_LINE>Component parent = UIUtil.findUltimateParent(window);<NEW_LINE>if (parent != null) {<NEW_LINE>JComponent content = balloon.getContent();<NEW_LINE>Dimension balloonSize = content.getPreferredSize();<NEW_LINE>Point screenPoint = new Point((parent.getSize().width - balloonSize.width) / 2, parent.getHeight() / 4 - balloonSize.height / 2);<NEW_LINE>SwingUtilities.convertPointToScreen(screenPoint, parent);<NEW_LINE>Rectangle screenRectangle = ScreenUtil.getScreenRectangle(screenPoint);<NEW_LINE>Insets insets = content.getInsets();<NEW_LINE>int bottomEdge = screenPoint.y + mySearchEverywhereUI.getExpandedSize().height + insets.bottom + insets.top;<NEW_LINE>int shift = bottomEdge - (int) screenRectangle.getMaxY();<NEW_LINE>if (shift > 0) {<NEW_LINE>screenPoint.y = Integer.max(screenPoint.y - shift, screenRectangle.y);<NEW_LINE>}<NEW_LINE>RelativePoint showPoint = new RelativePoint(screenPoint);<NEW_LINE>balloon.show(showPoint);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (project != null) {<NEW_LINE>balloon.showCenteredInCurrentWindow(project);<NEW_LINE>} else {<NEW_LINE>balloon.showInFocusCenter();<NEW_LINE>}<NEW_LINE>}
(myProject).getLocation(LOCATION_SETTINGS_KEY);
1,003,184
final GetSessionTokenResult executeGetSessionToken(GetSessionTokenRequest getSessionTokenRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSessionTokenRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetSessionTokenRequest> request = null;<NEW_LINE>Response<GetSessionTokenResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetSessionTokenRequestMarshaller().marshall(super.beforeMarshalling(getSessionTokenRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "STS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetSessionToken");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetSessionTokenResult> responseHandler = new StaxResponseHandler<GetSessionTokenResult>(new GetSessionTokenResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.SIGNING_REGION, getSigningRegion());
1,078,011
public Save promptToSave(MPart dirtyPart) {<NEW_LINE>Object clientInput = dirtyPart.getTransientData().get(ModelConstants.EDITOR_INPUT);<NEW_LINE>if (clientInput == null)<NEW_LINE>throw new IllegalArgumentException();<NEW_LINE>EModelService modelService = dirtyPart.getContext(<MASK><NEW_LINE>MApplication app = dirtyPart.getContext().get(MApplication.class);<NEW_LINE>int count = modelService.findElements(app, MPart.class, EModelService.IN_ACTIVE_PERSPECTIVE, element -> {<NEW_LINE>if (!ModelConstants.PORTFOLIO_PART.equals(element.getElementId()))<NEW_LINE>return false;<NEW_LINE>return clientInput.equals(element.getTransientData().get(ModelConstants.EDITOR_INPUT));<NEW_LINE>}).size();<NEW_LINE>// there are other dirty windows with the same file open. Do not ask the<NEW_LINE>// user to save just because one of many views is closed.<NEW_LINE>if (count > 1)<NEW_LINE>return Save.NO;<NEW_LINE>return promptToSaveSingle(dirtyPart);<NEW_LINE>}
).get(EModelService.class);
768,174
// Add a new version to the existing secret.<NEW_LINE>public static void addSecretVersion(String projectId, String secretId) throws IOException {<NEW_LINE>// Initialize client that will be used to send requests. This client only needs to be created<NEW_LINE>// once, and can be reused for multiple requests. After completing all of your requests, call<NEW_LINE>// the "close" method on the client to safely clean up any remaining background resources.<NEW_LINE>try (SecretManagerServiceClient client = SecretManagerServiceClient.create()) {<NEW_LINE>SecretName secretName = SecretName.of(projectId, secretId);<NEW_LINE>byte[<MASK><NEW_LINE>// Calculate data checksum. The library is available in Java 9+.<NEW_LINE>// If using Java 8, the following library may be used:<NEW_LINE>// https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/files/Crc32c<NEW_LINE>Checksum checksum = new CRC32C();<NEW_LINE>checksum.update(data, 0, data.length);<NEW_LINE>// Create the secret payload.<NEW_LINE>SecretPayload payload = // Providing data checksum is optional.<NEW_LINE>SecretPayload.newBuilder().setData(ByteString.copyFrom(data)).setDataCrc32C(checksum.getValue()).build();<NEW_LINE>// Add the secret version.<NEW_LINE>SecretVersion version = client.addSecretVersion(secretName, payload);<NEW_LINE>System.out.printf("Added secret version %s\n", version.getName());<NEW_LINE>}<NEW_LINE>}
] data = "my super secret data".getBytes();
1,783,085
private Map<StreamId, List<RowGroupIndex>> readColumnIndexes(Map<StreamId, Stream> streams, Map<StreamId, OrcInputStream> streamsData, StripeId stripeId) throws IOException {<NEW_LINE>// read the bloom filter for each column<NEW_LINE>Map<Integer, List<HiveBloomFilter>> bloomFilterIndexes = readBloomFilterIndexes(streams, streamsData);<NEW_LINE>ImmutableMap.Builder<StreamId, List<RowGroupIndex>> columnIndexes = ImmutableMap.builder();<NEW_LINE>for (Entry<StreamId, Stream> entry : streams.entrySet()) {<NEW_LINE><MASK><NEW_LINE>Stream stream = entry.getValue();<NEW_LINE>if (stream.getStreamKind() == ROW_INDEX) {<NEW_LINE>OrcInputStream inputStream = streamsData.get(streamId);<NEW_LINE>List<HiveBloomFilter> bloomFilters = bloomFilterIndexes.get(streamId.getColumn());<NEW_LINE>List<RowGroupIndex> rowGroupIndexes = stripeMetadataSource.getRowIndexes(metadataReader, hiveWriterVersion, stripeId, streamId, inputStream, bloomFilters, runtimeStats);<NEW_LINE>columnIndexes.put(entry.getKey(), rowGroupIndexes);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return columnIndexes.build();<NEW_LINE>}
StreamId streamId = entry.getKey();
739,069
public Object execute(final Map<Object, Object> iArgs) {<NEW_LINE>final ODatabaseDocument database = getDatabase();<NEW_LINE>if (attribute == null)<NEW_LINE>throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");<NEW_LINE>final OClassImpl cls = (OClassImpl) database.getMetadata().getSchema().getClass(className);<NEW_LINE>if (cls == null)<NEW_LINE>throw new OCommandExecutionException("Cannot alter class '" + className + "' because not found");<NEW_LINE>if (!unsafe && attribute == ATTRIBUTES.NAME && cls.isSubClassOf("E"))<NEW_LINE>throw new OCommandExecutionException("Cannot alter class '" + className + "' because is an Edge class and could break vertices. Use UNSAFE if you want to force it");<NEW_LINE>if (value != null && attribute == ATTRIBUTES.SUPERCLASS) {<NEW_LINE>checkClassExists(database, className, decodeClassName(value));<NEW_LINE>}<NEW_LINE>if (value != null && attribute == ATTRIBUTES.SUPERCLASSES) {<NEW_LINE>List<String> classes = Arrays.asList(value.split(",\\s*"));<NEW_LINE>for (String cName : classes) {<NEW_LINE>checkClassExists(database, className, decodeClassName(cName));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!unsafe && value != null && attribute == ATTRIBUTES.NAME) {<NEW_LINE>if (!cls.getIndexes().isEmpty()) {<NEW_LINE>throw new OCommandExecutionException("Cannot rename class '" + className + "' because it has indexes defined on it. Drop indexes before or use UNSAFE (at your won risk)");<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>return Boolean.TRUE;<NEW_LINE>}
cls.set(attribute, value);
657,232
// GEN-LAST:event_removePlatform<NEW_LINE>@Messages("CTL_AddNetbeansPlatformTitle=Add NetBeans Platform")<NEW_LINE>private void addPlatform(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_addPlatform<NEW_LINE>PlatformChooserWizardPanel chooser = new PlatformChooserWizardPanel(null);<NEW_LINE>PlatformInfoWizardPanel info = new PlatformInfoWizardPanel(null);<NEW_LINE>WizardDescriptor wd = new WizardDescriptor(new BasicWizardPanel[] { chooser, info });<NEW_LINE>initPanel(chooser, wd, 0);<NEW_LINE>initPanel(info, wd, 1);<NEW_LINE>// NOI18N<NEW_LINE>wd.setTitleFormat(new MessageFormat("{0}"));<NEW_LINE>Dialog dialog = DialogDisplayer.getDefault().createDialog(wd);<NEW_LINE>dialog.setTitle(CTL_AddNetbeansPlatformTitle());<NEW_LINE>dialog.setVisible(true);<NEW_LINE>dialog.toFront();<NEW_LINE>if (wd.getValue() == WizardDescriptor.FINISH_OPTION) {<NEW_LINE>String plafDir = (<MASK><NEW_LINE>String plafLabel = (String) wd.getProperty(PLAF_LABEL_PROPERTY);<NEW_LINE>String id = plafLabel.replace(' ', '_');<NEW_LINE>NbPlatform plaf = getPlafListModel().addPlatform(id, plafDir, plafLabel);<NEW_LINE>if (plaf != null) {<NEW_LINE>platformsList.setSelectedValue(plaf, true);<NEW_LINE>refreshPlatform();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String) wd.getProperty(PLAF_DIR_PROPERTY);
527,576
public static void main(String[] args) {<NEW_LINE>// TODO Auto-generated method stub<NEW_LINE>char[][] board = { { '5', '3', '.', '.', '7', '.', '.', '.', '.' }, { '6', '.', '.', '1', '9', '5', '.', '.', '.' }, { '.', '9', '8', '.', '.', '.', '.', '6', '.' }, { '8', '.', '.', '.', '6', '.', '.', '.', '3' }, { '4', '.', '.', '8', '.', '3', '.', '.', '1' }, { '7', '.', '.', '.', '2', '.', '.', '.', '6' }, { '.', '6', '.', '.', '.', '.', '2', '8', '.' }, { '.', '.', '.', '4', '1', '9', '.', '.', '5' }, { '.', '.', '.', '.', '8', '.', '.', '7', '9' } };<NEW_LINE>r = board.length;<NEW_LINE>c = board[0].length;<NEW_LINE>System.out.println("--Suduko board---");<NEW_LINE>for (char[] b : board) {<NEW_LINE>System.out.println<MASK><NEW_LINE>}<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("---solving suduko---");<NEW_LINE>if (validSudoku(board, 0, 0) != true) {<NEW_LINE>System.out.println("Solving Sudoku not possible");<NEW_LINE>} else {<NEW_LINE>for (char[] b : board) {<NEW_LINE>System.out.println(Arrays.toString(b));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
(Arrays.toString(b));
770,290
// GEN-LAST:event_configComboActionPerformed<NEW_LINE>private void newButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_newButtonActionPerformed<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>FileObject tempFO = FileUtil.getConfigFile(DECLARATIVE_HINT_TEMPLATE_LOCATION);<NEW_LINE>FileObject folderFO = FileUtil.getConfigFile("rules");<NEW_LINE>if (folderFO == null) {<NEW_LINE>folderFO = FileUtil.<MASK><NEW_LINE>}<NEW_LINE>DataFolder folder = (DataFolder) DataObject.find(folderFO);<NEW_LINE>DataObject template = DataObject.find(tempFO);<NEW_LINE>DataObject newIfcDO = template.createFromTemplate(folder, null);<NEW_LINE>RulesManager.getInstance().reload();<NEW_LINE>cpBased.reset();<NEW_LINE>errorTreeModel = constructTM(Utilities.getBatchSupportedHints(cpBased).keySet(), false);<NEW_LINE>setModel(errorTreeModel);<NEW_LINE>logic.errorTreeModel = errorTreeModel;<NEW_LINE>HintMetadata newHint = getHintByName(newIfcDO.getPrimaryFile().getNameExt());<NEW_LINE>logic.writableSettings.setEnabled(newHint, true);<NEW_LINE>select(newHint);<NEW_LINE>hasNewHints = true;<NEW_LINE>} catch (IOException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}
getConfigRoot().createFolder("rules");
457,502
public static HTMLDocument createHtmlDocumentObject(Map<String, Object> style, double scale) {<NEW_LINE>// Applies the font settings<NEW_LINE>HTMLDocument document = new HTMLDocument();<NEW_LINE>StringBuffer rule = new StringBuffer("body {");<NEW_LINE>rule.append(" font-family: " + getString(style, mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILIES) + " ; ");<NEW_LINE>rule.append(" font-size: " + (int) (getInt(style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE) * scale) + " pt ;");<NEW_LINE>String color = mxUtils.getString(style, mxConstants.STYLE_FONTCOLOR);<NEW_LINE>if (color != null) {<NEW_LINE>rule.append("color: " + color + " ; ");<NEW_LINE>}<NEW_LINE>int fontStyle = mxUtils.getInt(style, mxConstants.STYLE_FONTSTYLE);<NEW_LINE>if ((fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD) {<NEW_LINE>rule.append(" font-weight: bold ; ");<NEW_LINE>}<NEW_LINE>if ((fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC) {<NEW_LINE>rule.append(" font-style: italic ; ");<NEW_LINE>}<NEW_LINE>if ((fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE) {<NEW_LINE>rule.append(" text-decoration: underline ; ");<NEW_LINE>}<NEW_LINE>String align = getString(style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT);<NEW_LINE>if (align.equals(mxConstants.ALIGN_CENTER)) {<NEW_LINE>rule.append(" text-align: center ; ");<NEW_LINE>} else if (align.equals(mxConstants.ALIGN_RIGHT)) {<NEW_LINE>rule.append(" text-align: right ; ");<NEW_LINE>}<NEW_LINE>rule.append(" } ");<NEW_LINE>document.getStyleSheet().<MASK><NEW_LINE>return document;<NEW_LINE>}
addRule(rule.toString());
1,496,825
public Result doResetPassword() {<NEW_LINE>com.feth.play.module.pa.controllers.Authenticate.noCache(response());<NEW_LINE>final Form<PasswordReset> filledForm = PASSWORD_RESET_FORM.bindFromRequest();<NEW_LINE>if (filledForm.hasErrors()) {<NEW_LINE>return badRequest(password_reset.render(this.userProvider, filledForm));<NEW_LINE>} else {<NEW_LINE>final String token = filledForm.get().token;<NEW_LINE>final String newPassword = filledForm.get().password;<NEW_LINE>final TokenAction ta = tokenIsValid(token, Type.PASSWORD_RESET);<NEW_LINE>if (ta == null) {<NEW_LINE>return badRequest(no_token_or_invalid<MASK><NEW_LINE>}<NEW_LINE>final User u = ta.targetUser;<NEW_LINE>try {<NEW_LINE>// Pass true for the second parameter if you want to<NEW_LINE>// automatically create a password and the exception never to<NEW_LINE>// happen<NEW_LINE>u.resetPassword(new MyUsernamePasswordAuthUser(newPassword), false);<NEW_LINE>} catch (final RuntimeException re) {<NEW_LINE>flash(Application.FLASH_MESSAGE_KEY, this.msg.preferred(request()).at("playauthenticate.reset_password.message.no_password_account"));<NEW_LINE>}<NEW_LINE>final boolean login = this.userPaswAuthProvider.isLoginAfterPasswordReset();<NEW_LINE>if (login) {<NEW_LINE>// automatically log in<NEW_LINE>flash(Application.FLASH_MESSAGE_KEY, this.msg.preferred(request()).at("playauthenticate.reset_password.message.success.auto_login"));<NEW_LINE>return this.auth.loginAndRedirect(ctx(), new MyLoginUsernamePasswordAuthUser(u.email));<NEW_LINE>} else {<NEW_LINE>// send the user to the login page<NEW_LINE>flash(Application.FLASH_MESSAGE_KEY, this.msg.preferred(request()).at("playauthenticate.reset_password.message.success.manual_login"));<NEW_LINE>}<NEW_LINE>return redirect(routes.Application.login());<NEW_LINE>}<NEW_LINE>}
.render(this.userProvider));
75,732
private final boolean doNextCheckInvariants(final TLCState curState, final TLCState succState) throws IOException, WorkerException, Exception {<NEW_LINE>int k = 0;<NEW_LINE>try {<NEW_LINE>for (k = 0; k < this.tool.getInvariants().length; k++) {<NEW_LINE>if (!tool.isValid(this.tool.getInvariants()[k], succState)) {<NEW_LINE>// We get here because of invariant violation:<NEW_LINE>if (TLCGlobals.continuation) {<NEW_LINE>synchronized (this.tlc) {<NEW_LINE>MP.printError(EC.TLC_INVARIANT_VIOLATED_BEHAVIOR, this.tool<MASK><NEW_LINE>this.tlc.trace.printTrace(curState, succState);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return this.doNextSetErr(curState, succState, false, EC.TLC_INVARIANT_VIOLATED_BEHAVIOR, this.tool.getInvNames()[k]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>this.tlc.doNextEvalFailed(curState, succState, EC.TLC_INVARIANT_EVALUATION_FAILED, this.tool.getInvNames()[k], e);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
.getInvNames()[k]);
1,168,372
public boolean apply(Game game, Ability source) {<NEW_LINE>Watcher watcher = game.getState(<MASK><NEW_LINE>if (watcher instanceof AttackedThisTurnWatcher) {<NEW_LINE>Set<MageObjectReference> attackedThisTurn = ((AttackedThisTurnWatcher) watcher).getAttackedThisTurnCreatures();<NEW_LINE>List<Permanent> available = new ArrayList<>();<NEW_LINE>for (MageObjectReference mor : attackedThisTurn) {<NEW_LINE>Permanent permanent = mor.getPermanent(game);<NEW_LINE>if (permanent != null && permanent.isCreature(game)) {<NEW_LINE>available.add(permanent);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!available.isEmpty()) {<NEW_LINE>Permanent permanent = available.get(RandomUtil.nextInt(available.size()));<NEW_LINE>if (permanent != null) {<NEW_LINE>permanent.destroy(source, game, false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
).getWatcher(AttackedThisTurnWatcher.class);
1,630,203
private CtBehavior compileMethod(Parser p, MethodDecl md) throws CompileError {<NEW_LINE>int mod = MemberResolver.getModifiers(md.getModifiers());<NEW_LINE>CtClass[] plist = gen.makeParamList(md);<NEW_LINE>CtClass[] tlist = gen.makeThrowsList(md);<NEW_LINE>recordParams(plist, Modifier.isStatic(mod));<NEW_LINE>md = p.parseMethod2(stable, md);<NEW_LINE>try {<NEW_LINE>if (md.isConstructor()) {<NEW_LINE>CtConstructor cons = new CtConstructor(plist, gen.getThisClass());<NEW_LINE>cons.setModifiers(mod);<NEW_LINE>md.accept(gen);<NEW_LINE>cons.getMethodInfo().setCodeAttribute(bytecode.toCodeAttribute());<NEW_LINE>cons.setExceptionTypes(tlist);<NEW_LINE>return cons;<NEW_LINE>}<NEW_LINE>Declarator r = md.getReturn();<NEW_LINE>CtClass rtype = gen.resolver.lookupClass(r);<NEW_LINE>recordReturnType(rtype, false);<NEW_LINE>CtMethod method = new CtMethod(rtype, r.getVariable().get(), plist, gen.getThisClass());<NEW_LINE>method.setModifiers(mod);<NEW_LINE>gen.setThisMethod(method);<NEW_LINE>md.accept(gen);<NEW_LINE>if (md.getBody() != null)<NEW_LINE>method.getMethodInfo().setCodeAttribute(bytecode.toCodeAttribute());<NEW_LINE>else<NEW_LINE>method.setModifiers(mod | Modifier.ABSTRACT);<NEW_LINE>method.setExceptionTypes(tlist);<NEW_LINE>return method;<NEW_LINE>} catch (NotFoundException e) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>}
CompileError(e.toString());
1,427,712
protected String doIt() throws Exception {<NEW_LINE>// TODO Auto-generated method stub<NEW_LINE>log.info("Applying migrations scripts");<NEW_LINE>String sql = "select ad_migrationscript_id, script, name from ad_migrationscript where isApply = 'Y' and status = 'IP' order by name, created";<NEW_LINE>PreparedStatement pstmt = DB.prepareStatement(sql, this.get_TrxName());<NEW_LINE>ResultSet rs = pstmt.executeQuery();<NEW_LINE>while (rs.next()) {<NEW_LINE>byte[] scriptArray = rs.getBytes(2);<NEW_LINE>int seqID = rs.getInt(1);<NEW_LINE>boolean execOk = true;<NEW_LINE>try {<NEW_LINE>StringBuffer tmpSql = new StringBuffer();<NEW_LINE>tmpSql = new StringBuffer(new String(scriptArray));<NEW_LINE>if (tmpSql.length() > 0) {<NEW_LINE>log.info("Executing script " + rs.getString(3));<NEW_LINE>execOk = executeScript(tmpSql.toString(), rs.getString(3));<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>execOk = false;<NEW_LINE>e.printStackTrace();<NEW_LINE>log.saveError("Error", "Script: " + rs.getString(3) + " - " + e.getMessage());<NEW_LINE>log.severe(e.getMessage());<NEW_LINE>} finally {<NEW_LINE>sql = "UPDATE ad_migrationscript SET status = ? , isApply = 'N' WHERE ad_migrationscript_id = ? ";<NEW_LINE>pstmt = DB.prepareStatement(sql, this.get_TrxName());<NEW_LINE>if (execOk) {<NEW_LINE><MASK><NEW_LINE>pstmt.setInt(2, seqID);<NEW_LINE>} else {<NEW_LINE>pstmt.setString(1, "ER");<NEW_LINE>pstmt.setInt(2, seqID);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>pstmt.executeUpdate();<NEW_LINE>if (!execOk) {<NEW_LINE>pstmt.close();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} catch (SQLException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>log.saveError("Error", "Script: " + rs.getString(3) + " - " + e.getMessage());<NEW_LINE>log.severe(e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>rs.close();<NEW_LINE>pstmt.close();<NEW_LINE>return null;<NEW_LINE>}
pstmt.setString(1, "CO");
512,835
public static void convert(GrayU16 input, GrayF64 output) {<NEW_LINE>if (input.isSubimage() || output.isSubimage()) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW_LINE>int indexSrc = input.getIndex(0, y);<NEW_LINE>int indexDst = output.getIndex(0, y);<NEW_LINE>for (int x = 0; x < input.width; x++) {<NEW_LINE>output.data[indexDst++] = (double) (input.data[indexSrc++] & 0xFFFF);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>} else {<NEW_LINE>final int N = input.width * input.height;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopBlocks(0,N,(i0,i1)->{<NEW_LINE>int i0 = 0, i1 = N;<NEW_LINE>for (int i = i0; i < i1; i++) {<NEW_LINE>output.data[i] = (double) (input<MASK><NEW_LINE>}<NEW_LINE>// CONCURRENT_INLINE });<NEW_LINE>}<NEW_LINE>}
.data[i] & 0xFFFF);
187,158
private void downloadSaneBody(SyncConfig syncConfig, WebDavFolder remoteFolder, BackendFolder backendFolder, WebDavMessage message) throws MessagingException {<NEW_LINE>FetchProfile fp = new FetchProfile();<NEW_LINE>fp.add(FetchProfile.Item.BODY_SANE);<NEW_LINE>int maxDownloadSize = syncConfig.getMaximumAutoDownloadMessageSize();<NEW_LINE>remoteFolder.fetch(Collections.singletonList(message), fp, null, maxDownloadSize);<NEW_LINE>boolean completeMessage = false;<NEW_LINE>// Certain (POP3) servers give you the whole message even when you ask for only the first x Kb<NEW_LINE>if (!message.isSet(Flag.X_DOWNLOADED_FULL)) {<NEW_LINE>if (syncConfig.getMaximumAutoDownloadMessageSize() == 0 || message.getSize() < syncConfig.getMaximumAutoDownloadMessageSize()) {<NEW_LINE>completeMessage = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Store the updated message locally<NEW_LINE>if (completeMessage) {<NEW_LINE>backendFolder.saveMessage(message, MessageDownloadState.FULL);<NEW_LINE>} else {<NEW_LINE>backendFolder.<MASK><NEW_LINE>}<NEW_LINE>}
saveMessage(message, MessageDownloadState.PARTIAL);
745,089
private void loadNode1142() {<NEW_LINE>SessionDiagnosticsArrayTypeNode node = new SessionDiagnosticsArrayTypeNode(this.context, Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray, new QualifiedName(0, "SessionDiagnosticsArray"), new LocalizedText("en", "SessionDiagnosticsArray"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NULL_VALUE), Identifiers.SessionDiagnosticsDataType, 1, new UInteger[] { org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger.valueOf(0) }, UByte.valueOf(1), UByte.valueOf(1), 0.0, false);<NEW_LINE>node.addReference(new Reference(Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray, Identifiers.HasTypeDefinition, Identifiers.SessionDiagnosticsArrayType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary_SessionDiagnosticsArray, Identifiers.HasComponent, Identifiers.Server_ServerDiagnostics_SessionsDiagnosticsSummary<MASK><NEW_LINE>this.nodeManager.addNode(node);<NEW_LINE>}
.expanded(), false));
628,507
public static List<List<SpanData>> waitForTraces(Supplier<List<SpanData>> supplier, int number, long timeout, TimeUnit unit) throws InterruptedException, TimeoutException {<NEW_LINE>long startTime = System.nanoTime();<NEW_LINE>List<List<SpanData>> allTraces = <MASK><NEW_LINE>List<List<SpanData>> completeTraces = allTraces.stream().filter(TelemetryDataUtil::isCompleted).collect(toList());<NEW_LINE>while (completeTraces.size() < number && elapsedSeconds(startTime) < unit.toSeconds(timeout)) {<NEW_LINE>allTraces = groupTraces(supplier.get());<NEW_LINE>completeTraces = allTraces.stream().filter(TelemetryDataUtil::isCompleted).collect(toList());<NEW_LINE>Thread.sleep(10);<NEW_LINE>}<NEW_LINE>if (completeTraces.size() < number) {<NEW_LINE>throw new TimeoutException("Timeout waiting for " + number + " completed trace(s), found " + completeTraces.size() + " completed trace(s) and " + allTraces.size() + " total trace(s): " + allTraces);<NEW_LINE>}<NEW_LINE>return completeTraces;<NEW_LINE>}
groupTraces(supplier.get());
501,067
public static DescribeSystemEventAttributeResponse unmarshall(DescribeSystemEventAttributeResponse describeSystemEventAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSystemEventAttributeResponse.setRequestId(_ctx.stringValue("DescribeSystemEventAttributeResponse.RequestId"));<NEW_LINE>describeSystemEventAttributeResponse.setCode(_ctx.stringValue("DescribeSystemEventAttributeResponse.Code"));<NEW_LINE>describeSystemEventAttributeResponse.setMessage(_ctx.stringValue("DescribeSystemEventAttributeResponse.Message"));<NEW_LINE>describeSystemEventAttributeResponse.setSuccess(_ctx.stringValue("DescribeSystemEventAttributeResponse.Success"));<NEW_LINE>List<SystemEvent> systemEvents = new ArrayList<SystemEvent>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSystemEventAttributeResponse.SystemEvents.Length"); i++) {<NEW_LINE>SystemEvent systemEvent = new SystemEvent();<NEW_LINE>systemEvent.setStatus(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].Status"));<NEW_LINE>systemEvent.setTime(_ctx.longValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].Time"));<NEW_LINE>systemEvent.setGroupId(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].GroupId"));<NEW_LINE>systemEvent.setProduct(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].Product"));<NEW_LINE>systemEvent.setInstanceName(_ctx.stringValue<MASK><NEW_LINE>systemEvent.setResourceId(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].ResourceId"));<NEW_LINE>systemEvent.setName(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].Name"));<NEW_LINE>systemEvent.setContent(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].Content"));<NEW_LINE>systemEvent.setLevel(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].Level"));<NEW_LINE>systemEvent.setRegionId(_ctx.stringValue("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].RegionId"));<NEW_LINE>systemEvents.add(systemEvent);<NEW_LINE>}<NEW_LINE>describeSystemEventAttributeResponse.setSystemEvents(systemEvents);<NEW_LINE>return describeSystemEventAttributeResponse;<NEW_LINE>}
("DescribeSystemEventAttributeResponse.SystemEvents[" + i + "].InstanceName"));
764,785
void writeBlob(String blobName, BytesReference bytes, boolean failIfAlreadyExists) throws IOException {<NEW_LINE>if (bytes.length() > getLargeBlobThresholdInBytes()) {<NEW_LINE>// Compute md5 here so #writeBlobResumable forces the integrity check on the resumable upload.<NEW_LINE>// This is needed since we rely on atomic write behavior when writing BytesReferences in BlobStoreRepository which is not<NEW_LINE>// guaranteed for resumable uploads.<NEW_LINE>final String md5 = Base64.getEncoder().encodeToString(MessageDigests.digest(bytes<MASK><NEW_LINE>writeBlobResumable(BlobInfo.newBuilder(bucketName, blobName).setMd5(md5).build(), bytes.streamInput(), bytes.length(), failIfAlreadyExists);<NEW_LINE>} else {<NEW_LINE>final BlobInfo blobInfo = BlobInfo.newBuilder(bucketName, blobName).build();<NEW_LINE>if (bytes.hasArray()) {<NEW_LINE>writeBlobMultipart(blobInfo, bytes.array(), bytes.arrayOffset(), bytes.length(), failIfAlreadyExists);<NEW_LINE>} else {<NEW_LINE>writeBlob(bytes.streamInput(), bytes.length(), failIfAlreadyExists, blobInfo);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, MessageDigests.md5()));
1,211,226
private static SnapshotShardFailure constructSnapshotShardFailure(Object[] args) {<NEW_LINE>String index = (String) args[0];<NEW_LINE>String indexUuid = (String) args[1];<NEW_LINE>final String nodeId = (String) args[2];<NEW_LINE>String reason = (String) args[3];<NEW_LINE>Integer intShardId = (Integer) args[4];<NEW_LINE>final String status = (String) args[5];<NEW_LINE>if (index == null) {<NEW_LINE>throw new ElasticsearchParseException("index name was not set");<NEW_LINE>}<NEW_LINE>if (intShardId == null) {<NEW_LINE>throw new ElasticsearchParseException("index shard was not set");<NEW_LINE>}<NEW_LINE>ShardId shardId = new ShardId(index, indexUuid != null ? <MASK><NEW_LINE>// Workaround for https://github.com/elastic/elasticsearch/issues/25878<NEW_LINE>// Some old snapshot might still have null in shard failure reasons<NEW_LINE>String nonNullReason;<NEW_LINE>if (reason != null) {<NEW_LINE>nonNullReason = reason;<NEW_LINE>} else {<NEW_LINE>nonNullReason = "";<NEW_LINE>}<NEW_LINE>RestStatus restStatus;<NEW_LINE>if (status != null) {<NEW_LINE>restStatus = RestStatus.valueOf(status);<NEW_LINE>} else {<NEW_LINE>restStatus = RestStatus.INTERNAL_SERVER_ERROR;<NEW_LINE>}<NEW_LINE>return new SnapshotShardFailure(nodeId, shardId, nonNullReason, restStatus);<NEW_LINE>}
indexUuid : IndexMetadata.INDEX_UUID_NA_VALUE, intShardId);
1,410,311
public boolean run() {<NEW_LINE>// get current progress<NEW_LINE>Tuple res = SQL.New("SELECT content, timeToDelete FROM TaskProgressVO" + " WHERE apiId = :apiId" + " AND type = :type" + " ORDER BY CAST(content AS int) DESC", Tuple.class).param("apiId", apiId).param("type", TaskType.Progress).limit(1).find();<NEW_LINE>if (res != null && res.get(1) != null) {<NEW_LINE>// FIXME: race condition here.<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>int currentPercent = res == null ? 0 : new Double(res.get(0, String.class)).intValue();<NEW_LINE>Runnable cleanup = ThreadContextUtils.saveThreadContext();<NEW_LINE>Defer.defer(cleanup);<NEW_LINE>ThreadContext.put(THREAD_CONTEXT_API, apiId);<NEW_LINE><MASK><NEW_LINE>if (endPercent <= currentPercent) {<NEW_LINE>reportProgress(String.valueOf(currentPercent));<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>reportProgress(String.valueOf(currentPercent + 1));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
ThreadContext.put(THREAD_CONTEXT_TASK_NAME, taskName);
1,081,063
public void gaussianDerivToDirectDeriv() {<NEW_LINE>T blur = GeneralizedImageOps.createSingleBand(imageType, width, height);<NEW_LINE>T blurDeriv = GeneralizedImageOps.createSingleBand(imageType, width, height);<NEW_LINE>T gaussDeriv = GeneralizedImageOps.createSingleBand(imageType, width, height);<NEW_LINE>BlurStorageFilter<T> funcBlur = FactoryBlurFilter.gaussian(ImageType.single(imageType), sigma, radius);<NEW_LINE>ImageGradient<T, T> funcDeriv = FactoryDerivative.three(imageType, imageType);<NEW_LINE>ImageGradient<T, T> funcGaussDeriv = FactoryDerivative.gaussian(<MASK><NEW_LINE>funcBlur.process(input, blur);<NEW_LINE>funcDeriv.process(blur, blurDeriv, derivY);<NEW_LINE>funcGaussDeriv.process(input, gaussDeriv, derivY);<NEW_LINE>printIntensity("Blur->Deriv", blurDeriv);<NEW_LINE>printIntensity("Gauss Deriv", gaussDeriv);<NEW_LINE>}
sigma, radius, imageType, imageType);
1,855,285
public DescribeActionTargetsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeActionTargetsResult describeActionTargetsResult = new DescribeActionTargetsResult();<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 describeActionTargetsResult;<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("ActionTargets", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeActionTargetsResult.setActionTargets(new ListUnmarshaller<ActionTarget>(ActionTargetJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("NextToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>describeActionTargetsResult.setNextToken(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return describeActionTargetsResult;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
331,563
public void marshall(UpdatePipelineRequest updatePipelineRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updatePipelineRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getId(), ID_BINDING);<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getInputBucket(), INPUTBUCKET_BINDING);<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getRole(), ROLE_BINDING);<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getAwsKmsKeyArn(), AWSKMSKEYARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getNotifications(), NOTIFICATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getContentConfig(), CONTENTCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(updatePipelineRequest.getThumbnailConfig(), THUMBNAILCONFIG_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
1,577,250
private List<String> tokenize(NavigableMap<String, Integer> vocab, String toTokenize) {<NEW_LINE>final List<String> <MASK><NEW_LINE>String fullString = toTokenize;<NEW_LINE>if (preTokenizePreProcessor != null) {<NEW_LINE>fullString = preTokenizePreProcessor.preProcess(toTokenize);<NEW_LINE>}<NEW_LINE>for (String basicToken : splitPattern.split(fullString)) {<NEW_LINE>String candidate = basicToken;<NEW_LINE>int count = 0;<NEW_LINE>while (candidate.length() > 0 && !"##".equals(candidate)) {<NEW_LINE>String longestSubstring = findLongestSubstring(vocab, candidate);<NEW_LINE>output.add(longestSubstring);<NEW_LINE>candidate = "##" + candidate.substring(longestSubstring.length());<NEW_LINE>if (count++ > basicToken.length()) {<NEW_LINE>// Can't take more steps to tokenize than the length of the token<NEW_LINE>throw new IllegalStateException("Invalid token encountered: \"" + basicToken + "\" likely contains characters that are not " + "present in the vocabulary. Invalid tokens may be cleaned in a preprocessing step using a TokenPreProcessor." + " preTokenizePreProcessor=" + preTokenizePreProcessor + ", tokenPreProcess=" + tokenPreProcess);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return output;<NEW_LINE>}
output = new ArrayList<>();
74,321
public static void main(final String[] args) throws IOException {<NEW_LINE>String executionPath = ReactAndroidCodeTransformer.class.getProtectionDomain().getCodeSource().getLocation().getPath();<NEW_LINE>String projectRoot = new File(executionPath + "../../../../../../").getCanonicalPath() + '/';<NEW_LINE>String sdkVersion;<NEW_LINE>try {<NEW_LINE>sdkVersion = args[0];<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new IllegalArgumentException("Invalid args passed in, expected one argument -- SDK version.");<NEW_LINE>}<NEW_LINE>// Don't want to mess up our original copy of ReactCommon and ReactAndroid if something goes wrong.<NEW_LINE>File reactCommonDestRoot = new File(projectRoot + REACT_COMMON_DEST_ROOT);<NEW_LINE>File reactAndroidDestRoot = new File(projectRoot + REACT_ANDROID_DEST_ROOT);<NEW_LINE>// Always remove<NEW_LINE>FileUtils.deleteDirectory(reactCommonDestRoot);<NEW_LINE>reactCommonDestRoot = new File(projectRoot + REACT_COMMON_DEST_ROOT);<NEW_LINE>FileUtils.deleteDirectory(reactAndroidDestRoot);<NEW_LINE>reactAndroidDestRoot = new File(projectRoot + REACT_ANDROID_DEST_ROOT);<NEW_LINE>FileUtils.copyDirectory(new File(projectRoot + REACT_COMMON_SOURCE_ROOT), reactCommonDestRoot);<NEW_LINE>FileUtils.copyDirectory(new File(projectRoot + REACT_ANDROID_SOURCE_ROOT), reactAndroidDestRoot);<NEW_LINE>// Update maven publish information<NEW_LINE>replaceInFile(new File(projectRoot + REACT_ANDROID_DEST_ROOT + "/build.gradle"), "def AAR_OUTPUT_URL = \"file://${projectDir}/../android\"", "def AAR_OUTPUT_URL = \"file:${System.env.HOME}/.m2/repository\"");<NEW_LINE>replaceInFile(new File(projectRoot + REACT_ANDROID_DEST_ROOT + "/build.gradle"), "group = GROUP", "group = 'com.facebook.react'");<NEW_LINE>// This version also gets updated in android-tasks.js<NEW_LINE>replaceInFile(new File(projectRoot + REACT_ANDROID_DEST_ROOT + "/build.gradle"), "version = VERSION_NAME", "version = '" + sdkVersion + "'");<NEW_LINE>// RN uses a weird directory structure for soloader to build with Buck. Change this so that Android Studio doesn't complain.<NEW_LINE>replaceInFile(new File(projectRoot + REACT_ANDROID_DEST_ROOT + "/build.gradle"), "'src/main/libraries/soloader'", "'src/main/libraries/soloader/java'");<NEW_LINE>// Actually modify the files<NEW_LINE>String path = projectRoot + REACT_ANDROID_DEST_ROOT + '/' + SOURCE_PATH;<NEW_LINE>for (String fileName : FILES_TO_MODIFY.keySet()) {<NEW_LINE>try {<NEW_LINE>updateFile(path + fileName<MASK><NEW_LINE>} catch (ParseException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
, FILES_TO_MODIFY.get(fileName));
575,872
private static void dumpMap(Map<?, ?> c, StringBuilder sb, int indent) {<NEW_LINE>if (indent > 0) {<NEW_LINE>for (int in = 0; in < indent - 1; in++) {<NEW_LINE>sb.append('\t');<NEW_LINE>}<NEW_LINE>sb.append("{\n");<NEW_LINE>}<NEW_LINE>for (Map.Entry<?, ?> me : c.entrySet()) {<NEW_LINE>Object o = me.getValue();<NEW_LINE>for (int in = 0; in < indent; in++) {<NEW_LINE>sb.append('\t');<NEW_LINE>}<NEW_LINE>sb.append(me.getKey());<NEW_LINE>sb.append('=');<NEW_LINE>if (o instanceof Map<?, ?>) {<NEW_LINE>sb.append("\n");<NEW_LINE>dumpMap((Map<?, ?>) <MASK><NEW_LINE>} else if (o instanceof Object[]) {<NEW_LINE>sb.append("\n");<NEW_LINE>dumpCollection((Object[]) o, sb, indent + 1);<NEW_LINE>} else {<NEW_LINE>sb.append(o);<NEW_LINE>sb.append('\n');<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (indent > 0) {<NEW_LINE>for (int in = 0; in < indent - 1; in++) {<NEW_LINE>sb.append('\t');<NEW_LINE>}<NEW_LINE>sb.append("}\n");<NEW_LINE>}<NEW_LINE>}
o, sb, indent + 1);
1,714,405
private static String findAndConfigureLogging() throws IOException {<NEW_LINE>String source = "defaults";<NEW_LINE>// Let's try to find a logging.properties<NEW_LINE>// first as a file in the current working directory<NEW_LINE>InputStream logConfigStream;<NEW_LINE>Path path = Paths.get("").resolve(LOGGING_FILE);<NEW_LINE>if (Files.exists(path)) {<NEW_LINE>logConfigStream = new BufferedInputStream(Files.newInputStream(path));<NEW_LINE>source = "file: " + path.toAbsolutePath();<NEW_LINE>} else {<NEW_LINE>ClassLoader cl = Thread.currentThread().getContextClassLoader();<NEW_LINE>// check if there is a logging-test.properties first (we are running within a unit test)<NEW_LINE>InputStream resourceStream = classPath(TEST_LOGGING_FILE);<NEW_LINE>String cpSource = "classpath: /" + TEST_LOGGING_FILE;<NEW_LINE>if (resourceStream == null) {<NEW_LINE>resourceStream = contextClassPath(TEST_LOGGING_FILE, cl);<NEW_LINE>cpSource = "context classpath: /" + TEST_LOGGING_FILE;<NEW_LINE>}<NEW_LINE>if (resourceStream == null) {<NEW_LINE>resourceStream = classPath(LOGGING_FILE);<NEW_LINE>cpSource = "classpath: /" + LOGGING_FILE;<NEW_LINE>}<NEW_LINE>if (resourceStream == null) {<NEW_LINE>resourceStream = contextClassPath(LOGGING_FILE, cl);<NEW_LINE>cpSource = "context classpath: /" + LOGGING_FILE;<NEW_LINE>}<NEW_LINE>if (resourceStream == null) {<NEW_LINE>// defaults<NEW_LINE>return source;<NEW_LINE>}<NEW_LINE>logConfigStream = new BufferedInputStream(resourceStream);<NEW_LINE>source = cpSource;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>LogManager.<MASK><NEW_LINE>} finally {<NEW_LINE>logConfigStream.close();<NEW_LINE>}<NEW_LINE>return source;<NEW_LINE>}
getLogManager().readConfiguration(logConfigStream);
1,138,845
// SSS FIXME: Needs an update to reflect instr. change<NEW_LINE>@Override<NEW_LINE>public void DefineInstanceMethodInstr(DefineInstanceMethodInstr defineinstancemethodinstr) {<NEW_LINE>IRMethod method = defineinstancemethodinstr.getMethod();<NEW_LINE>JVMVisitorMethodContext context = new JVMVisitorMethodContext();<NEW_LINE>IRBytecodeAdapter m = jvmMethod();<NEW_LINE>SkinnyMethodAdapter a = m.adapter;<NEW_LINE>m.loadContext();<NEW_LINE>emitMethod(method, context);<NEW_LINE>// always a variable arity handle<NEW_LINE>MethodType variable = context.getNativeSignature(-1);<NEW_LINE>assert (variable != null);<NEW_LINE>String defSignature = pushHandlesForDef(context.getVariableName(), context.getSpecificName(), context.getNativeSignaturesExceptVariable(), variable, sig(void.class, ThreadContext.class, java.lang.invoke.MethodHandle.class, String.class, int.class, StaticScope.class, String.class, DynamicScope.class, IRubyObject.class, boolean.class, boolean.class, boolean.class), sig(void.class, ThreadContext.class, java.lang.invoke.MethodHandle.class, java.lang.invoke.MethodHandle.class, int.class, String.class, int.class, StaticScope.class, String.class, DynamicScope.class, IRubyObject.class, boolean.class, boolean.class, boolean.class));<NEW_LINE>a.ldc(method.getId());<NEW_LINE>a.ldc(method.getLine());<NEW_LINE>jvmMethod().getStaticScope(<MASK><NEW_LINE>jvmAdapter().ldc(ArgumentDescriptor.encode(method.getArgumentDescriptors()));<NEW_LINE>jvmLoadLocal(DYNAMIC_SCOPE);<NEW_LINE>jvmMethod().loadSelf();<NEW_LINE>jvmAdapter().ldc(method.maybeUsingRefinements());<NEW_LINE>jvmAdapter().ldc(method.receivesKeywordArgs());<NEW_LINE>jvmAdapter().ldc(method.getFullInterpreterContext().getFlags().contains(IRFlags.REQUIRES_CLASS));<NEW_LINE>// add method<NEW_LINE>a.invokestatic(p(IRRuntimeHelpers.class), "defCompiledInstanceMethod", defSignature);<NEW_LINE>}
context.getBaseName() + "_StaticScope");
1,641,234
private void buildWalkableAreas(boolean skipVisibility, boolean platformEntriesLinking) {<NEW_LINE>if (skipVisibility) {<NEW_LINE>LOG.info("Skipping visibility graph construction for walkable areas and using just area rings for edges.");<NEW_LINE>} else {<NEW_LINE>LOG.info("Building visibility graphs for walkable areas.");<NEW_LINE>}<NEW_LINE>List<AreaGroup> areaGroups = groupAreas(osmdb.getWalkableAreas());<NEW_LINE>WalkableAreaBuilder walkableAreaBuilder = new WalkableAreaBuilder(graph, osmdb, wayPropertySet, this, issueStore, maxAreaNodes, platformEntriesLinking);<NEW_LINE>if (skipVisibility) {<NEW_LINE>for (AreaGroup group : areaGroups) {<NEW_LINE>walkableAreaBuilder.buildWithoutVisibility(group);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ProgressTracker progress = ProgressTracker.track("Build visibility graph for areas", 50, areaGroups.size());<NEW_LINE>for (AreaGroup group : areaGroups) {<NEW_LINE>walkableAreaBuilder.buildWithVisibility(group);<NEW_LINE>// Keep lambda! A method-ref would log incorrect class and line number<NEW_LINE>// noinspection Convert2MethodRef<NEW_LINE>progress.step(m <MASK><NEW_LINE>}<NEW_LINE>LOG.info(progress.completeMessage());<NEW_LINE>}<NEW_LINE>// running a request caches the timezone; we need to clear it now so that when agencies are loaded<NEW_LINE>// the graph time zone is set to the agency time zone.<NEW_LINE>graph.clearTimeZone();<NEW_LINE>if (skipVisibility) {<NEW_LINE>LOG.info("Done building rings for walkable areas.");<NEW_LINE>} else {<NEW_LINE>LOG.info("Done building visibility graphs for walkable areas.");<NEW_LINE>}<NEW_LINE>}
-> LOG.info(m));
1,170,708
public boolean selectSecondary(BlockVector3 position, SelectorLimits limits) {<NEW_LINE>if (position1 == null || position2 == null) {<NEW_LINE>return selectPrimary(position, limits);<NEW_LINE>}<NEW_LINE>if (region.contains(position)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>double x1 = Math.min(position.getX(), position1.getX());<NEW_LINE>double y1 = Math.min(position.getY(), position1.getY());<NEW_LINE>double z1 = Math.min(position.getZ(), position1.getZ());<NEW_LINE>double x2 = Math.max(position.getX(), position2.getX());<NEW_LINE>double y2 = Math.max(position.getY(), position2.getY());<NEW_LINE>double z2 = Math.max(position.getZ(), position2.getZ());<NEW_LINE>final BlockVector3 o1 = position1;<NEW_LINE>final BlockVector3 o2 = position2;<NEW_LINE>position1 = BlockVector3.<MASK><NEW_LINE>position2 = BlockVector3.at(x2, y2, z2);<NEW_LINE>region.setPos1(position1);<NEW_LINE>region.setPos2(position2);<NEW_LINE>assert region.contains(o1);<NEW_LINE>assert region.contains(o2);<NEW_LINE>assert region.contains(position);<NEW_LINE>return true;<NEW_LINE>}
at(x1, y1, z1);
1,459,003
public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create context MyContext initiated by SupportBean_S0 as s0 terminated by SupportBean_S1(id=s0.id);\n" + "context MyContext select count(*) from SupportBean;\n";<NEW_LINE>env.compileDeploy(epl, path);<NEW_LINE>env.sendEventBean(new SupportBean_S0(10, "A", "x"));<NEW_LINE>env.sendEventBean(new SupportBean_S0(20, "B", "x"));<NEW_LINE>String eplFAF = "context MyContext select context.s0.p00 as id";<NEW_LINE>EPCompiled compiled = env.compileFAF(eplFAF, path);<NEW_LINE>assertPropsPerRow(env.runtime().getFireAndForgetService().executeQuery(compiled).getArray(), "id".split(","), new Object[][] { { "A" }, { "B" } });<NEW_LINE>// context partition selector<NEW_LINE>ContextPartitionSelector selector = new SupportSelectorById(1);<NEW_LINE>assertPropsPerRow(env.runtime().getFireAndForgetService().executeQuery(compiled, new ContextPartitionSelector[] { selector }).getArray(), "id".split(","), new Object[][] { { "B" } });<NEW_LINE>// SODA<NEW_LINE>EPStatementObjectModel model = env.eplToModel(eplFAF);<NEW_LINE>assertEquals(eplFAF, model.toEPL());<NEW_LINE>compiled = env.compileFAF(model, path);<NEW_LINE>assertPropsPerRow(env.runtime().getFireAndForgetService().executeQuery(compiled).getArray(), "id".split(","), new Object[][] { { <MASK><NEW_LINE>// distinct<NEW_LINE>String eplFAFDistint = "context MyContext select distinct context.s0.p01 as p01";<NEW_LINE>EPFireAndForgetQueryResult result = env.compileExecuteFAF(eplFAFDistint, path);<NEW_LINE>assertPropsPerRow(result.getArray(), "p01".split(","), new Object[][] { { "x" } });<NEW_LINE>// where-clause and having-clause<NEW_LINE>runSelectFAF(env, path, null, "context MyContext select 1 as value where 'a'='b'");<NEW_LINE>runSelectFAF(env, path, "A", "context MyContext select context.s0.p00 as value where context.s0.id=10");<NEW_LINE>runSelectFAF(env, path, "A", "context MyContext select context.s0.p00 as value having context.s0.id=10");<NEW_LINE>env.undeployAll();<NEW_LINE>}
"A" }, { "B" } });
1,265,525
public ICapabilityProvider initCapabilities(ItemStack stack, CompoundTag nbt) {<NEW_LINE>if (!stack.isEmpty())<NEW_LINE>return new IEItemStackHandler(stack) {<NEW_LINE><NEW_LINE>final LazyOptional<EnergyHelper.ItemEnergyStorage> energyStorage = CapabilityUtils.constantOptional(new EnergyHelper.ItemEnergyStorage(stack));<NEW_LINE><NEW_LINE>final LazyOptional<ShaderWrapper_Item> shaders = CapabilityUtils.constantOptional(new ShaderWrapper_Item(new ResourceLocation(ImmersiveEngineering.<MASK><NEW_LINE><NEW_LINE>@Nonnull<NEW_LINE>@Override<NEW_LINE>public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> capability, Direction facing) {<NEW_LINE>if (capability == CapabilityEnergy.ENERGY)<NEW_LINE>return energyStorage.cast();<NEW_LINE>if (capability == CapabilityShader.SHADER_CAPABILITY)<NEW_LINE>return shaders.cast();<NEW_LINE>return super.getCapability(capability, facing);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>return null;<NEW_LINE>}
MODID, "railgun"), stack));
138,233
public // }<NEW_LINE>void exportXMLData(ExportDataDumper eDD, String indent) {<NEW_LINE>// NOI18N<NEW_LINE>String newline = System.getProperty("line.separator");<NEW_LINE>// NOI18N<NEW_LINE>StringBuffer result = new StringBuffer(indent + "<Node>" + newline);<NEW_LINE>// NOI18N<NEW_LINE>result.append(indent).append(" <Name>").append(replaceHTMLCharacters(getNodeName())).append("<Name>").append(newline);<NEW_LINE>// NOI18N<NEW_LINE>result.append(indent).append(" <Parent>").append(replaceHTMLCharacters((getParent() == null) ? ("none") : (((PresoObjAllocCCTNode) getParent()).getNodeName()))).append("<Parent>").append(newline);<NEW_LINE>// NOI18N<NEW_LINE>result.append(indent).append(" <Bytes_Allocated>").append(totalObjSize).append("</Bytes_Allocated>").append(newline);<NEW_LINE>// NOI18N<NEW_LINE>result.append(indent).append(" <Objects_Allocated>").append(nCalls).append("</Objects_Allocated>").append(newline);<NEW_LINE>// dumps the current row<NEW_LINE>eDD.dumpData(result);<NEW_LINE>// children nodes<NEW_LINE>if (children != null) {<NEW_LINE>for (int i = 0; i < getNChildren(); i++) {<NEW_LINE>// NOI18N<NEW_LINE>children[i].<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>result = new StringBuffer(indent + "</Node>");<NEW_LINE>eDD.dumpData(result);<NEW_LINE>}
exportXMLData(eDD, indent + " ");
1,557,860
private List<RecordQueryResult.Record> findRetryRecords(String subject, BackupMessageMeta meta, byte type) {<NEW_LINE>final List<RecordQueryResult.Record> records = Lists.newArrayList();<NEW_LINE>try {<NEW_LINE>final long sequence = meta.getSequence();<NEW_LINE>final String sequenceId = generateDecimalFormatKey19(sequence);<NEW_LINE>final String brokerGroup = meta.getBrokerGroup();<NEW_LINE>final String consumerGroupId = meta.getConsumerGroupId();<NEW_LINE>final String subjectId = dicService.name2Id(subject);<NEW_LINE>final String brokerGroupId = dicService.name2Id(brokerGroup);<NEW_LINE>final String pullAction = Byte.toString(ActionEnum.PULL.getCode());<NEW_LINE>final String ackAction = Byte.toString(ActionEnum.ACK.getCode());<NEW_LINE>final byte[] subjectBytes = toUtf8(subjectId);<NEW_LINE>final byte[] sequenceBytes = toUtf8(sequenceId);<NEW_LINE>final byte[] brokerGroupBytes = toUtf8(brokerGroupId);<NEW_LINE>final byte[] consumerGroupBytes = toUtf8(consumerGroupId);<NEW_LINE>final byte[] pullKey = keyGenerator.generateRecordKey(subjectBytes, sequenceBytes, brokerGroupBytes, consumerGroupBytes, toUtf8(pullAction));<NEW_LINE>final byte[] ackKey = keyGenerator.generateRecordKey(subjectBytes, sequenceBytes, brokerGroupBytes, consumerGroupBytes, toUtf8(ackAction));<NEW_LINE>final RecordQueryResult.Record pullRecord = get(table, pullKey, R_FAMILY, B_RECORD_QUALIFIERS, kvs <MASK><NEW_LINE>if (pullRecord != null)<NEW_LINE>records.add(pullRecord);<NEW_LINE>final RecordQueryResult.Record ackRecord = get(table, ackKey, R_FAMILY, B_RECORD_QUALIFIERS, kvs -> getRecord(kvs, type));<NEW_LINE>if (ackRecord != null)<NEW_LINE>records.add(ackRecord);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("find retry records with meta: {} failed.", meta, e);<NEW_LINE>}<NEW_LINE>return records;<NEW_LINE>}
-> getRecord(kvs, type));
116,541
public String verifyE2BindingNameOverLookup() {<NEW_LINE>String retVal = "nothing done";<NEW_LINE>// use implicit EJB reference annotated with @EJB to call a method on the bean:<NEW_LINE>retVal = callPong(ivEjb2, 65);<NEW_LINE>if (retVal.equals("PASS")) {<NEW_LINE>// do an explicit JNDI lookup using the @EJB name= value:<NEW_LINE>try {<NEW_LINE>SimpleLookupTarget ejb = (<MASK><NEW_LINE>// verify that the looked-up bean "equals" the injected bean:<NEW_LINE>if (!ejb.equals(ivEjb2)) {<NEW_LINE>retVal = "looked-up bean by name " + NAME_VALUE2 + " not equal to injected bean";<NEW_LINE>}<NEW_LINE>// for good measure, call a method to verify the right implementation gets executed:<NEW_LINE>retVal = callPong(ejb, 65);<NEW_LINE>} catch (Exception e) {<NEW_LINE>retVal = "Failure in explicit lookup using name value: " + NAME_VALUE2;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return retVal;<NEW_LINE>}
SimpleLookupTarget) ivContext.lookup(NAME_VALUE2);
1,077,165
void quickTest(final int lgK, final long cA, final long cB) {<NEW_LINE>final CpcSketch skA = new CpcSketch(lgK);<NEW_LINE>final CpcSketch skB = new CpcSketch(lgK);<NEW_LINE>// direct sketch<NEW_LINE>final CpcSketch skD = new CpcSketch(lgK);<NEW_LINE>final long t0, t1, t2, t3, t4, t5;<NEW_LINE>t0 = System.nanoTime();<NEW_LINE>while (skA.numCoupons < cA) {<NEW_LINE>final long in = vIn += iGoldenU64;<NEW_LINE>skA.update(in);<NEW_LINE>skD.update(in);<NEW_LINE>}<NEW_LINE>t1 = System.nanoTime();<NEW_LINE>while (skB.numCoupons < cB) {<NEW_LINE>final long in = vIn += iGoldenU64;<NEW_LINE>skB.update(in);<NEW_LINE>skD.update(in);<NEW_LINE>}<NEW_LINE>t2 = System.nanoTime();<NEW_LINE>final CpcUnion ugM = new CpcUnion(lgK);<NEW_LINE>ugM.update(skA);<NEW_LINE>t3 = System.nanoTime();<NEW_LINE>ugM.update(skB);<NEW_LINE>t4 = System.nanoTime();<NEW_LINE>final CpcSketch skR = ugM.getResult();<NEW_LINE>t5 = System.nanoTime();<NEW_LINE>rtAssert(TestUtil.specialEquals(skD, skR, false, true));<NEW_LINE>final Flavor fA = skA.getFlavor();<NEW_LINE>final Flavor fB = skB.getFlavor();<NEW_LINE>final Flavor fR = skR.getFlavor();<NEW_LINE>final String aOff = <MASK><NEW_LINE>final String bOff = Integer.toString(skB.windowOffset);<NEW_LINE>final String rOff = Integer.toString(skR.windowOffset);<NEW_LINE>final String fAoff = fA + String.format("%2s", aOff);<NEW_LINE>final String fBoff = fB + String.format("%2s", bOff);<NEW_LINE>final String fRoff = fR + String.format("%2s", rOff);<NEW_LINE>// update A,D to cA<NEW_LINE>final double updA_mS = (t1 - t0) / 2E6;<NEW_LINE>// update B,D to cB<NEW_LINE>final double updB_mS = (t2 - t1) / 2E6;<NEW_LINE>// merge A<NEW_LINE>final double mrgA_mS = (t3 - t2) / 1E6;<NEW_LINE>// merge B<NEW_LINE>final double mrgB_mS = (t4 - t3) / 1E6;<NEW_LINE>// get Result<NEW_LINE>final double rslt_mS = (t5 - t4) / 1E6;<NEW_LINE>printf(dfmt, lgK, cA, cB, fAoff, fBoff, fRoff, updA_mS, updB_mS, mrgA_mS, mrgB_mS, rslt_mS);<NEW_LINE>}
Integer.toString(skA.windowOffset);
720,236
public BufferedImage filter(BufferedImage src, BufferedImage dst) {<NEW_LINE>final int width = src.getWidth();<NEW_LINE>final <MASK><NEW_LINE>final BufferedImage image;<NEW_LINE>if (dst == null) {<NEW_LINE>image = createCompatibleDestImage(src, null);<NEW_LINE>} else {<NEW_LINE>image = dst;<NEW_LINE>}<NEW_LINE>final int[] srcPixels = new int[width * height];<NEW_LINE>final int[] dstPixels = new int[width * height];<NEW_LINE>getPixels(src, 0, 0, width, height, srcPixels);<NEW_LINE>// horizontal pass<NEW_LINE>blur(srcPixels, dstPixels, width, height, radius);<NEW_LINE>// vertical pass<NEW_LINE>blur(dstPixels, srcPixels, height, width, radius);<NEW_LINE>// the result is now stored in srcPixels due to the 2nd pass<NEW_LINE>setPixels(image, 0, 0, width, height, srcPixels);<NEW_LINE>return image;<NEW_LINE>}
int height = src.getHeight();
46,075
private void writeBom(Collection<BomDependency> bomDependencies) {<NEW_LINE>Model model = readModel();<NEW_LINE>DependencyManagement management = model.getDependencyManagement();<NEW_LINE>List<Dependency> externalBomDependencies = management.getDependencies().stream().filter(dependency -> dependency.getType().equals(POM_TYPE)).collect(Collectors.toList());<NEW_LINE>List<Dependency> dependencies = bomDependencies.stream().map(bomDependency -> {<NEW_LINE>Dependency dependency = new Dependency();<NEW_LINE>dependency.setGroupId(bomDependency.getGroupId());<NEW_LINE>dependency.setArtifactId(bomDependency.getArtifactId());<NEW_LINE>dependency.setVersion(bomDependency.getVersion());<NEW_LINE>return dependency;<NEW_LINE>}).collect(Collectors.toList());<NEW_LINE>dependencies.addAll(externalBomDependencies);<NEW_LINE>dependencies.sort(new DependencyComparator());<NEW_LINE>// Remove external dependencies from the BOM.<NEW_LINE>dependencies = dependencies.stream().filter(dependency -> BASE_AZURE_GROUPID.equals(dependency.getGroupId())).<MASK><NEW_LINE>management.setDependencies(dependencies);<NEW_LINE>writeModel(this.pomFileName, this.outputFileName, model);<NEW_LINE>}
collect(Collectors.toList());
903,171
// Required for JDev implementation<NEW_LINE>public void updateLocation(CodeProfilingPoint cpp, int oldLine, int newLine) {<NEW_LINE>if (cpp instanceof CodeProfilingPoint.Single) {<NEW_LINE>CodeProfilingPoint.Single cpps = (CodeProfilingPoint.Single) cpp;<NEW_LINE>CodeProfilingPoint.<MASK><NEW_LINE>if (loc.getLine() == oldLine)<NEW_LINE>updateLocation(cpps, newLine, cpps.getAnnotation());<NEW_LINE>} else if (cpp instanceof CodeProfilingPoint.Paired) {<NEW_LINE>CodeProfilingPoint.Paired cppp = (CodeProfilingPoint.Paired) cpp;<NEW_LINE>CodeProfilingPoint.Annotation ann = null;<NEW_LINE>CodeProfilingPoint.Location loc = cppp.getStartLocation();<NEW_LINE>if (loc.getLine() == oldLine) {<NEW_LINE>ann = cppp.getStartAnnotation();<NEW_LINE>} else {<NEW_LINE>loc = cppp.getEndLocation();<NEW_LINE>if (loc.getLine() == oldLine)<NEW_LINE>ann = cppp.getEndAnnotation();<NEW_LINE>}<NEW_LINE>if (ann != null)<NEW_LINE>updateLocation(cppp, newLine, ann);<NEW_LINE>}<NEW_LINE>}
Location loc = cpps.getLocation();
289,433
private void initialize(Context context) {<NEW_LINE>headers: if (this.headers == null) {<NEW_LINE>String[] allHeaders = context.headers();<NEW_LINE>if (allHeaders == null) {<NEW_LINE>headers = ArgumentUtils.EMPTY_STRING_ARRAY;<NEW_LINE>break headers;<NEW_LINE>}<NEW_LINE>if (!context.columnsReordered()) {<NEW_LINE>this.headers = allHeaders;<NEW_LINE>break headers;<NEW_LINE>}<NEW_LINE>int[] selectedIndexes = context.extractedFieldIndexes();<NEW_LINE>final int last = Math.min(allHeaders.length, selectedIndexes.length);<NEW_LINE>this.headers <MASK><NEW_LINE>for (int i = 0; i < last; i++) {<NEW_LINE>int idx = selectedIndexes[i];<NEW_LINE>if (idx < allHeaders.length) {<NEW_LINE>headers[i] = allHeaders[selectedIndexes[i]];<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>columnValues = new ArrayList<List<T>>(headers.length > 0 ? headers.length : 10);<NEW_LINE>}
= new String[selectedIndexes.length];
1,684,909
public String createDocument(final String repositoryId, final Properties properties, final String folderId, final ContentStream contentStream, final VersioningState versioningState, final List<String> policies, final Acl addAces, final Acl removeAces, final ExtensionsData extension) {<NEW_LINE>final App app = StructrApp.getInstance(securityContext);<NEW_LINE>File newFile = null;<NEW_LINE>String uuid = null;<NEW_LINE>try (final Tx tx = app.tx()) {<NEW_LINE>final String objectTypeId = getStringValue(properties, PropertyIds.OBJECT_TYPE_ID);<NEW_LINE>final String fileName = getStringValue(properties, PropertyIds.NAME);<NEW_LINE>final Class type = typeFromObjectTypeId(objectTypeId, BaseTypeId.CMIS_DOCUMENT, File.class);<NEW_LINE>// check if type exists<NEW_LINE>if (type != null) {<NEW_LINE>// check that base type is cmis:folder<NEW_LINE>final BaseTypeId baseTypeId = getBaseTypeId(type);<NEW_LINE>if (baseTypeId != null && BaseTypeId.CMIS_DOCUMENT.equals(baseTypeId)) {<NEW_LINE>final String mimeType = contentStream != null ? contentStream.getMimeType() : null;<NEW_LINE>// create file<NEW_LINE>newFile = FileHelper.createFile(securityContext, new byte[0], mimeType, type, fileName, false);<NEW_LINE>if (newFile != null) {<NEW_LINE>// find and set parent if it exists<NEW_LINE>if (!CMISInfo.ROOT_FOLDER_ID.equals(folderId)) {<NEW_LINE>final Folder parent = app.<MASK><NEW_LINE>if (parent != null) {<NEW_LINE>newFile.setParent(parent);<NEW_LINE>} else {<NEW_LINE>throw new CmisObjectNotFoundException("Folder with ID " + folderId + " does not exist");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>uuid = newFile.getUuid();<NEW_LINE>if (contentStream != null) {<NEW_LINE>final InputStream inputStream = contentStream.getStream();<NEW_LINE>if (inputStream != null) {<NEW_LINE>// copy file and update metadata<NEW_LINE>try (final OutputStream outputStream = newFile.getOutputStream(false, false)) {<NEW_LINE>IOUtils.copy(inputStream, outputStream);<NEW_LINE>}<NEW_LINE>inputStream.close();<NEW_LINE>FileHelper.updateMetadata(newFile);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new CmisConstraintException("Cannot create cmis:document of type " + objectTypeId);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new CmisObjectNotFoundException("Type with ID " + objectTypeId + " does not exist");<NEW_LINE>}<NEW_LINE>tx.success();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new CmisRuntimeException("New document could not be created: " + t.getMessage());<NEW_LINE>}<NEW_LINE>// start indexing after transaction is finished<NEW_LINE>if (newFile != null) {<NEW_LINE>newFile.notifyUploadCompletion();<NEW_LINE>}<NEW_LINE>return uuid;<NEW_LINE>}
get(Folder.class, folderId);
830,938
final ListDomainsForPackageResult executeListDomainsForPackage(ListDomainsForPackageRequest listDomainsForPackageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDomainsForPackageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListDomainsForPackageRequest> request = null;<NEW_LINE>Response<ListDomainsForPackageResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListDomainsForPackageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listDomainsForPackageRequest));<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, "OpenSearch");<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<ListDomainsForPackageResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDomainsForPackageResultJsonUnmarshaller());<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, "ListDomainsForPackage");
1,544,200
public static <T> void bind(T activity) {<NEW_LINE>if (Remixer.getRegisteredDataTypes().isEmpty()) {<NEW_LINE>throw new IllegalStateException("There are no registered data types for remixer. This indicates that you have not " + " initialized Remixer at all and it will fail in runtime. Please run " + "RemixerInitialization.initRemixer in your application class. See the Remixer README " + "for detailed instructions. ");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Class<?> bindingClass = Class.forName(activity.getClass().getCanonicalName() + "_RemixerBinder");<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>Binder<T> binder = (Binder<T>) bindingClass.newInstance();<NEW_LINE>binder.bindInstance(activity);<NEW_LINE>} catch (ClassNotFoundException ex) {<NEW_LINE>throw new RemixerBindingException("Remixer binder class can not be found or initialized for " + activity.getClass().toString(), ex);<NEW_LINE>} catch (InstantiationException ex) {<NEW_LINE>throw new RemixerBindingException("Remixer binder class can not instantiated for " + activity.getClass().toString(), ex);<NEW_LINE>} catch (IllegalAccessException ex) {<NEW_LINE>throw new RemixerBindingException("Remixer binder class can not be instantiated for " + activity.getClass(<MASK><NEW_LINE>}<NEW_LINE>}
).toString(), ex);
815,098
public void testPTPTemporaryQueue_TCP(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>boolean testFailed = false;<NEW_LINE><MASK><NEW_LINE>TemporaryQueue tempQ = jmsContextQCFTCP.createTemporaryQueue();<NEW_LINE>JMSProducer jmsProducerQCFTCP = jmsContextQCFTCP.createProducer();<NEW_LINE>JMSConsumer jmsConsumerQCFTCP = jmsContextQCFTCP.createConsumer(tempQ);<NEW_LINE>jmsProducerQCFTCP.send(tempQ, "hello world");<NEW_LINE>TextMessage recMessage = (TextMessage) jmsConsumerQCFTCP.receive(30000);<NEW_LINE>if ((recMessage == null) || (recMessage.getText() == null) || !recMessage.getText().equalsIgnoreCase("hello world")) {<NEW_LINE>testFailed = true;<NEW_LINE>}<NEW_LINE>jmsConsumerQCFTCP.close();<NEW_LINE>jmsContextQCFTCP.close();<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testPTPTemporaryQueue_TCP failed");<NEW_LINE>}<NEW_LINE>}
JMSContext jmsContextQCFTCP = qcfTCP.createContext();
1,318,769
public com.amazonaws.services.amplifybackend.model.NotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.amplifybackend.model.NotFoundException notFoundException = new com.amazonaws.services.amplifybackend.model.NotFoundException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("resourceType", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>notFoundException.setResourceType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return notFoundException;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,129,368
public void marshall(Certificate certificate, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (certificate == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(certificate.getCertificateId(), CERTIFICATEID_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getState(), STATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getStateReason(), STATEREASON_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getCommonName(), COMMONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getRegisteredDateTime(), REGISTEREDDATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getExpiryDateTime(), EXPIRYDATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getType(), TYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(certificate.getClientCertAuthSettings(), CLIENTCERTAUTHSETTINGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
1,826,290
protected String compileUnits(JRCompilationUnit[] units, String classpath, File tempDirFile) throws JRException {<NEW_LINE>Context context = ContextFactory.getGlobal().enterContext();<NEW_LINE>try {<NEW_LINE>JRPropertiesUtil properties = JRPropertiesUtil.getInstance(jasperReportsContext);<NEW_LINE>int expressionsPerScript = properties.getIntegerProperty(PROPERTY_EXPRESSIONS_PER_SCRIPT);<NEW_LINE>int scriptMaxLength = properties.getIntegerProperty(PROPERTY_SCRIPT_MAX_SIZE);<NEW_LINE>int optimizationLevel = properties.getIntegerProperty(PROPERTY_OPTIMIZATION_LEVEL);<NEW_LINE>context.setOptimizationLevel(optimizationLevel);<NEW_LINE>context.getWrapFactory().setJavaPrimitiveWrap(false);<NEW_LINE>Errors errors = new Errors();<NEW_LINE>CompilerEnvirons compilerEnv = new CompilerEnvirons();<NEW_LINE>compilerEnv.initFromContext(context);<NEW_LINE>// we're using the context to compile the expressions in interpreted mode to catch syntax errors<NEW_LINE>context.setOptimizationLevel(-1);<NEW_LINE>for (int i = 0; i < units.length; i++) {<NEW_LINE>JRCompilationUnit unit = units[i];<NEW_LINE>CompileSources compileSources = new CompileSources(expressionsPerScript, scriptMaxLength);<NEW_LINE>JavaScriptCompiledData compiledData = new JavaScriptCompiledData();<NEW_LINE>JRSourceCompileTask compileTask = unit.getCompileTask();<NEW_LINE>for (Iterator<JRExpression> it = compileTask.getExpressions().iterator(); it.hasNext(); ) {<NEW_LINE>JRExpression expr = it.next();<NEW_LINE>int id = compileTask.getExpressionId(expr);<NEW_LINE>ScriptExpressionVisitor defaultVisitor = defaultExpressionCreator();<NEW_LINE>JRExpressionUtil.visitChunks(expr, defaultVisitor);<NEW_LINE>String defaultExpression = defaultVisitor.getScript();<NEW_LINE>// compile the default expression to catch syntax errors<NEW_LINE>try {<NEW_LINE>context.compileString(defaultExpression, "expression", 0, null);<NEW_LINE>} catch (EvaluatorException e) {<NEW_LINE>errors.addError(e);<NEW_LINE>}<NEW_LINE>if (!errors.hasErrors()) {<NEW_LINE>ScriptExpressionVisitor oldVisitor = oldExpressionCreator();<NEW_LINE>ScriptExpressionVisitor estimatedVisitor = estimatedExpressionCreator();<NEW_LINE>JRExpressionUtil.visitChunks(expr, new CompositeExpressionChunkVisitor(oldVisitor, estimatedVisitor));<NEW_LINE>int defaultExpressionIdx = compileSources.addExpression(defaultExpression);<NEW_LINE>int oldExpressionIdx = compileSources.<MASK><NEW_LINE>int estimatedExpressionIdx = compileSources.addExpression(estimatedVisitor.getScript());<NEW_LINE>compiledData.addExpression(id, defaultExpressionIdx, oldExpressionIdx, estimatedExpressionIdx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!errors.hasErrors()) {<NEW_LINE>compileScripts(unit, compilerEnv, compileSources, compiledData);<NEW_LINE>unit.setCompileData(compiledData);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return errors.errorMessage();<NEW_LINE>} finally {<NEW_LINE>Context.exit();<NEW_LINE>}<NEW_LINE>}
addExpression(oldVisitor.getScript());
154,598
public Object apply(final ActionContext ctx, final Object caller, final Object[] sources) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>assertArrayHasLengthAndAllElementsNotNull(sources, 1);<NEW_LINE>final String utmString = (String) sources[0];<NEW_LINE>if (utmString != null) {<NEW_LINE>final String[] parts = utmString.split("[\\s]+");<NEW_LINE>if (parts.length < 3) {<NEW_LINE>logger.warn("Unsupported UTM string: this implementation only supports the full UTM format with spaces, e.g. 32U 439596 5967780 or 32 N 439596 5967780.");<NEW_LINE>} else if (parts.length == 3) {<NEW_LINE>// full UTM string<NEW_LINE>// 32U 439596 5967780<NEW_LINE><MASK><NEW_LINE>final String east = parts[1];<NEW_LINE>final String north = parts[2];<NEW_LINE>return utmToLatLon(zone, getHemisphereFromZone(zone), east, north);<NEW_LINE>} else if (parts.length == 4) {<NEW_LINE>// full UTM string with hemisphere indication<NEW_LINE>// 32 N 439596 5967780<NEW_LINE>final String zone = parts[0];<NEW_LINE>final String hemisphere = parts[1];<NEW_LINE>final String east = parts[2];<NEW_LINE>final String north = parts[3];<NEW_LINE>return utmToLatLon(zone, hemisphere, east, north);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("Invalid argument(s), cannot convert to double: {}, {}", new Object[] { sources[0], sources[1] });<NEW_LINE>}<NEW_LINE>} catch (ArgumentNullException ae) {<NEW_LINE>boolean isJs = ctx != null ? ctx.isJavaScriptContext() : false;<NEW_LINE>logParameterError(caller, sources, ae.getMessage(), isJs);<NEW_LINE>return "Unsupported UTM string";<NEW_LINE>} catch (ArgumentCountException ae) {<NEW_LINE>boolean isJs = ctx != null ? ctx.isJavaScriptContext() : false;<NEW_LINE>logParameterError(caller, sources, ae.getMessage(), isJs);<NEW_LINE>return usage(isJs);<NEW_LINE>}<NEW_LINE>return "Unsupported UTM string";<NEW_LINE>}
final String zone = parts[0];
1,333,999
public <Req, Resp> BlockingStreamingClientCall<Req, Resp> newBlockingStreamingCall(final MethodDescriptor<Req, Resp> methodDescriptor, final BufferDecoderGroup decompressors) {<NEW_LINE>GrpcStreamingSerializer<<MASK><NEW_LINE>GrpcStreamingDeserializer<Resp> deserializerIdentity = streamingDeserializer(methodDescriptor);<NEW_LINE>List<GrpcStreamingDeserializer<Resp>> deserializers = streamingDeserializers(methodDescriptor, decompressors.decoders());<NEW_LINE>CharSequence acceptedEncoding = decompressors.advertisedMessageEncoding();<NEW_LINE>CharSequence requestContentType = grpcContentType(methodDescriptor.requestDescriptor().serializerDescriptor().contentType());<NEW_LINE>CharSequence responseContentType = grpcContentType(methodDescriptor.responseDescriptor().serializerDescriptor().contentType());<NEW_LINE>final BlockingStreamingHttpClient client = streamingHttpClient.asBlockingStreamingClient();<NEW_LINE>return (metadata, request) -> {<NEW_LINE>Duration timeout = timeoutForRequest(metadata.timeout());<NEW_LINE>GrpcStreamingSerializer<Req> serializer = streamingSerializer(methodDescriptor, serializerIdentity, metadata.requestCompressor());<NEW_LINE>String mdPath = methodDescriptor.httpPath();<NEW_LINE>BlockingStreamingHttpRequest httpRequest = client.post(UNKNOWN_PATH.equals(mdPath) ? metadata.path() : mdPath);<NEW_LINE>initRequest(httpRequest, requestContentType, serializer.messageEncoding(), acceptedEncoding, timeout);<NEW_LINE>httpRequest.payloadBody(serializer.serialize(request, streamingHttpClient.executionContext().bufferAllocator()));<NEW_LINE>try {<NEW_LINE>assignStrategy(httpRequest, metadata);<NEW_LINE>final BlockingStreamingHttpResponse response = client.request(httpRequest);<NEW_LINE>return validateResponseAndGetPayload(response.toStreamingResponse(), responseContentType, client.executionContext().bufferAllocator(), readGrpcMessageEncodingRaw(response.headers(), deserializerIdentity, deserializers, GrpcStreamingDeserializer::messageEncoding)).toIterable();<NEW_LINE>} catch (Throwable cause) {<NEW_LINE>throw toGrpcException(cause);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
Req> serializerIdentity = streamingSerializer(methodDescriptor);
225,488
final DeleteDBProxyResult executeDeleteDBProxy(DeleteDBProxyRequest deleteDBProxyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDBProxyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteDBProxyRequest> request = null;<NEW_LINE>Response<DeleteDBProxyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteDBProxyRequestMarshaller().marshall(super.beforeMarshalling(deleteDBProxyRequest));<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, "RDS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteDBProxy");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DeleteDBProxyResult> responseHandler = new StaxResponseHandler<DeleteDBProxyResult>(new DeleteDBProxyResultStaxUnmarshaller());<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,041,829
private void insertCatchBlocks(NodeScope ns, IO io, Enumeration thrown_names, String indent) {<NEW_LINE>String thrown;<NEW_LINE>if (thrown_names.hasMoreElements()) {<NEW_LINE>io.println(indent + "} catch (Throwable " + ns.exceptionVar + ") {");<NEW_LINE>if (ns.usesCloseNodeVar()) {<NEW_LINE>io.println(indent + " if (" + ns.closedVar + ") {");<NEW_LINE>io.println(indent + " jjtree.clearNodeScope(" + ns.nodeVar + ");");<NEW_LINE>io.println(indent + " " + ns.closedVar + " = false;");<NEW_LINE>io.println(indent + " } else {");<NEW_LINE>io.println(indent + " jjtree.popNode();");<NEW_LINE>io.println(indent + " }");<NEW_LINE>}<NEW_LINE>while (thrown_names.hasMoreElements()) {<NEW_LINE>thrown = (String) thrown_names.nextElement();<NEW_LINE>io.println(indent + " if (" + ns.exceptionVar + " instanceof " + thrown + ") {");<NEW_LINE>io.println(indent + " throw (" + thrown + ")" + ns.exceptionVar + ";");<NEW_LINE>io.println(indent + " }");<NEW_LINE>}<NEW_LINE>io.println(indent + <MASK><NEW_LINE>}<NEW_LINE>}
" throw (Error)" + ns.exceptionVar + ";");
1,103,967
public static DescribeSharesBucketInfoForExpressSyncResponse unmarshall(DescribeSharesBucketInfoForExpressSyncResponse describeSharesBucketInfoForExpressSyncResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSharesBucketInfoForExpressSyncResponse.setRequestId(_ctx.stringValue("DescribeSharesBucketInfoForExpressSyncResponse.RequestId"));<NEW_LINE>describeSharesBucketInfoForExpressSyncResponse.setMessage(_ctx.stringValue("DescribeSharesBucketInfoForExpressSyncResponse.Message"));<NEW_LINE>describeSharesBucketInfoForExpressSyncResponse.setCode(_ctx.stringValue("DescribeSharesBucketInfoForExpressSyncResponse.Code"));<NEW_LINE>describeSharesBucketInfoForExpressSyncResponse.setSuccess(_ctx.booleanValue("DescribeSharesBucketInfoForExpressSyncResponse.Success"));<NEW_LINE>List<BucketInfo> bucketInfos <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeSharesBucketInfoForExpressSyncResponse.BucketInfos.Length"); i++) {<NEW_LINE>BucketInfo bucketInfo = new BucketInfo();<NEW_LINE>bucketInfo.setBucketName(_ctx.stringValue("DescribeSharesBucketInfoForExpressSyncResponse.BucketInfos[" + i + "].BucketName"));<NEW_LINE>bucketInfo.setBucketPrefix(_ctx.stringValue("DescribeSharesBucketInfoForExpressSyncResponse.BucketInfos[" + i + "].BucketPrefix"));<NEW_LINE>bucketInfo.setBucketRegion(_ctx.stringValue("DescribeSharesBucketInfoForExpressSyncResponse.BucketInfos[" + i + "].BucketRegion"));<NEW_LINE>bucketInfos.add(bucketInfo);<NEW_LINE>}<NEW_LINE>describeSharesBucketInfoForExpressSyncResponse.setBucketInfos(bucketInfos);<NEW_LINE>return describeSharesBucketInfoForExpressSyncResponse;<NEW_LINE>}
= new ArrayList<BucketInfo>();
1,658,900
public FieldMetadata addField(String fieldName, Boolean listType, String imageName, String syntaxKind, Boolean syntaxWithDirective) {<NEW_LINE>if (fieldName == null) {<NEW_LINE>throw new IllegalArgumentException("Argument 'fieldName' can not be null");<NEW_LINE>}<NEW_LINE>// Test if it exists fields with the given name<NEW_LINE>FieldMetadata exsitingField = getFieldAsImage(fieldName);<NEW_LINE>if (exsitingField == null) {<NEW_LINE>exsitingField = fieldsAsList.get(fieldName);<NEW_LINE>}<NEW_LINE>if (exsitingField == null) {<NEW_LINE>exsitingField = fieldsAsTextStyling.get(fieldName);<NEW_LINE>}<NEW_LINE>if (exsitingField == null) {<NEW_LINE>FieldMetadata fieldMetadata = new FieldMetadata(this, fieldName, listType == null ? false : listType, imageName, syntaxKind, <MASK><NEW_LINE>return fieldMetadata;<NEW_LINE>} else {<NEW_LINE>if (listType != null) {<NEW_LINE>exsitingField.setListType(listType);<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(imageName)) {<NEW_LINE>exsitingField.setImageName(imageName);<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(syntaxKind)) {<NEW_LINE>exsitingField.setSyntaxKind(syntaxKind);<NEW_LINE>}<NEW_LINE>if (syntaxWithDirective != null) {<NEW_LINE>exsitingField.setSyntaxWithDirective(syntaxWithDirective);<NEW_LINE>}<NEW_LINE>return exsitingField;<NEW_LINE>}<NEW_LINE>}
syntaxWithDirective == null ? false : syntaxWithDirective);
1,195,244
public void pretrainLayer(int layerIdx, DataSetIterator iter, int numEpochs) {<NEW_LINE>Preconditions.checkState(numEpochs > 0, "Number of epochs (%s) must be a positive number", numEpochs);<NEW_LINE>if (flattenedGradients == null) {<NEW_LINE>initGradientsView();<NEW_LINE>}<NEW_LINE>if (layerIdx >= layers.length) {<NEW_LINE>throw new IllegalArgumentException("Cannot pretrain layer: layerIdx (" + layerIdx + ") >= numLayers (" + layers.length + ")");<NEW_LINE>}<NEW_LINE>Layer layer = layers[layerIdx];<NEW_LINE>if (!layer.isPretrainLayer())<NEW_LINE>return;<NEW_LINE>if (numEpochs > 1 && !iter.resetSupported())<NEW_LINE>throw new IllegalStateException("Cannot fit multiple epochs (" + numEpochs + ") on an iterator that doesn't support resetting");<NEW_LINE>if (!iter.hasNext() && iter.resetSupported()) {<NEW_LINE>iter.reset();<NEW_LINE>}<NEW_LINE>log.info("Starting unsupervised training on layer " + <MASK><NEW_LINE>for (int i = 0; i < numEpochs; i++) {<NEW_LINE>if (i > 0)<NEW_LINE>iter.reset();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>DataSet next = iter.next();<NEW_LINE>input = next.getFeatures();<NEW_LINE>pretrainLayer(layerIdx, input);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int ec = getLayer(layerIdx).conf().getEpochCount() + 1;<NEW_LINE>getLayer(layerIdx).conf().setEpochCount(ec);<NEW_LINE>}
layerIdx + " for " + numEpochs + " epochs");
500,043
public boolean createEdgeFirewall(String tenantName, String publicIp, String insideIp, String publicSubnet, String insideSubnet) throws ExecutionException {<NEW_LINE>String xml = VnmcXml.CREATE_EDGE_FIREWALL.getXml();<NEW_LINE>String service = VnmcXml.CREATE_EDGE_FIREWALL.getService();<NEW_LINE>xml = replaceXmlValue(xml, "cookie", _cookie);<NEW_LINE>xml = replaceXmlValue(xml, "edgefwdescr", "Edge Firewall for Tenant VDC " + tenantName);<NEW_LINE>xml = replaceXmlValue(xml, "edgefwname", getNameForEdgeFirewall(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "edgefwdn", getDnForEdgeFirewall(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "insideintfname", getNameForEdgeInsideIntf(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "outsideintfname", getNameForEdgeOutsideIntf(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "insideintfdn", getDnForInsideIntf(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "outsideintfdn", getDnForOutsideIntf(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "deviceserviceprofiledn", getDnForEdgeFirewall(tenantName) + "/device-service-profile");<NEW_LINE>xml = replaceXmlValue(xml, "outsideintfsp", getDnForOutsideIntf(tenantName) + "/interface-service-profile");<NEW_LINE>xml = replaceXmlValue(xml, "secprofileref", getNameForEdgeDeviceSecurityProfile(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "deviceserviceprofile", getNameForEdgeDeviceServiceProfile(tenantName));<NEW_LINE>xml = replaceXmlValue(xml, "insideip", insideIp);<NEW_LINE>xml = replaceXmlValue(xml, "publicip", publicIp);<NEW_LINE>xml = replaceXmlValue(xml, "insidesubnet", insideSubnet);<NEW_LINE>xml = <MASK><NEW_LINE>String response = sendRequest(service, xml);<NEW_LINE>return verifySuccess(response);<NEW_LINE>}
replaceXmlValue(xml, "outsidesubnet", publicSubnet);
1,678,643
private String generateClientPhaseTimeCostSpan(RpcInvokeContext context) {<NEW_LINE>TreeMap<String, String> resultMap = new TreeMap<>();<NEW_LINE>Long routerTime = (Long) context.get(RpcConstants.INTERNAL_KEY_CLIENT_ROUTER_TIME_NANO);<NEW_LINE>Long connTime = (Long) context.get(RpcConstants.INTERNAL_KEY_CONN_CREATE_TIME_NANO);<NEW_LINE>Long filterTime = (Long) <MASK><NEW_LINE>Long balancerTime = (Long) context.get(RpcConstants.INTERNAL_KEY_CLIENT_BALANCER_TIME_NANO);<NEW_LINE>Long reqSerializeTime = (Long) context.get(RpcConstants.INTERNAL_KEY_REQ_SERIALIZE_TIME_NANO);<NEW_LINE>Long respDeSerializeTime = (Long) context.get(RpcConstants.INTERNAL_KEY_RESP_DESERIALIZE_TIME_NANO);<NEW_LINE>resultMap.put(TracerRecord.R1.toString(), calculateNanoTime(routerTime).toString());<NEW_LINE>resultMap.put(TracerRecord.R2.toString(), calculateNanoTime(connTime).toString());<NEW_LINE>resultMap.put(TracerRecord.R3.toString(), calculateNanoTime(filterTime).toString());<NEW_LINE>resultMap.put(TracerRecord.R4.toString(), calculateNanoTime(balancerTime).toString());<NEW_LINE>resultMap.put(TracerRecord.R5.toString(), appendResult(calculateNanoTime(reqSerializeTime).toString(), calculateNanoTime(respDeSerializeTime).toString()));<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (Map.Entry<String, String> entry : resultMap.entrySet()) {<NEW_LINE>sb.append(entry.getKey());<NEW_LINE>sb.append("=");<NEW_LINE>sb.append(entry.getValue());<NEW_LINE>sb.append("&");<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
context.get(RpcConstants.INTERNAL_KEY_CLIENT_FILTER_TIME_NANO);
514,062
public void onSelectElementInteract(String optionString) {<NEW_LINE>if (optionString == null || optionString.length() == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.d(TAG, "onSelectElementInteract() - " + optionString);<NEW_LINE>final ArrayList<String> optionList = new ArrayList<String>();<NEW_LINE>int selectedIndex = 0;<NEW_LINE>try {<NEW_LINE>JSONArray optionArray = new JSONArray(optionString);<NEW_LINE>if (optionArray != null) {<NEW_LINE>int len = optionArray.length();<NEW_LINE>for (int i = 1; i < len; i += 2) {<NEW_LINE>optionList.add(optionArray.get(i).toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>selectedIndex = Integer.parseInt(optionArray.get(0).toString());<NEW_LINE>} catch (JSONException e) {<NEW_LINE>Log.d(TAG, "error parsing json");<NEW_LINE>}<NEW_LINE>AlertDialog dialog;<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(mContext);<NEW_LINE>builder.setSingleChoiceItems(optionList.toArray(new String[optionList.size()]), selectedIndex, new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, final int position) {<NEW_LINE>Log.<MASK><NEW_LINE>dialog.dismiss();<NEW_LINE>mHandler.postDelayed(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>mWebView.loadUrl("javascript:LinkBubble.selectOption(" + position + ")");<NEW_LINE>}<NEW_LINE>}, 1);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>dialog = builder.create();<NEW_LINE>dialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);<NEW_LINE>dialog.show();<NEW_LINE>}
d(TAG, "click position is - " + position);
1,636,362
private ParsedFrame autoFragment(ByteBuffer buffer, int fragmentSize) {<NEW_LINE>payloadLength -= fragmentSize;<NEW_LINE>byte[] nextMask = null;<NEW_LINE>if (mask != null) {<NEW_LINE>int shift = fragmentSize % 4;<NEW_LINE>nextMask = new byte[4];<NEW_LINE>nextMask[0] = mask[(0 + shift) % 4];<NEW_LINE>nextMask[1] = mask[(1 + shift) % 4];<NEW_LINE>nextMask[2] = mask[(2 + shift) % 4];<NEW_LINE>nextMask[3] = mask[<MASK><NEW_LINE>}<NEW_LINE>ByteBuffer content = buffer.slice();<NEW_LINE>content.limit(fragmentSize);<NEW_LINE>buffer.position(buffer.position() + fragmentSize);<NEW_LINE>final ParsedFrame frame = newFrame((byte) (firstByte & 0x7F), mask, content, false);<NEW_LINE>mask = nextMask;<NEW_LINE>firstByte = (byte) ((firstByte & 0x80) | OpCode.CONTINUATION);<NEW_LINE>state = State.FRAGMENT;<NEW_LINE>return frame;<NEW_LINE>}
(3 + shift) % 4];
268,156
void load(RProjectOptions options) {<NEW_LINE><MASK><NEW_LINE>pathSelector_.setText(config.getWebsitePath());<NEW_LINE>RProjectBuildOptions buildOptions = options.getBuildOptions();<NEW_LINE>chkPreviewAfterBuilding_.setValue(buildOptions.getPreviewWebsite());<NEW_LINE>chkLivePreviewSite_.setValue(buildOptions.getLivePreviewWebsite());<NEW_LINE>RProjectBuildContext buildContext = options.getBuildContext();<NEW_LINE>if (buildContext.isBookdownSite()) {<NEW_LINE>// change caption<NEW_LINE>chkPreviewAfterBuilding_.setText(constants_.chkPreviewAfterBuilding());<NEW_LINE>// get all available output formats<NEW_LINE>JsArrayString formatsJson = buildContext.getWebsiteOutputFormats();<NEW_LINE>ArrayList<String> formatNames = new ArrayList<>();<NEW_LINE>ArrayList<String> formats = new ArrayList<>();<NEW_LINE>// always include "All Formats"<NEW_LINE>formatNames.add(constants_.allFormatsLabel());<NEW_LINE>formats.add(constants_.allLabel());<NEW_LINE>for (int i = 0; i < formatsJson.length(); i++) {<NEW_LINE>formatNames.add(formatsJson.get(i));<NEW_LINE>formats.add(formatsJson.get(i));<NEW_LINE>}<NEW_LINE>websiteOutputFormat_.setChoices(formatNames.toArray(new String[] {}), formats.toArray(new String[] {}));<NEW_LINE>websiteOutputFormat_.setValue(buildOptions.getWebsiteOutputFormat());<NEW_LINE>websiteOutputFormat_.setVisible(true);<NEW_LINE>}<NEW_LINE>}
RProjectConfig config = options.getConfig();
956,358
public void updateViewMenu(MenuManager manager) {<NEW_LINE>manager.removeAll();<NEW_LINE>Action darkMode = MainWindow.MenuItems.ViewDarkMode.createCheckbox((dark) -> {<NEW_LINE>models.settings.writeUi().getPerfettoBuilder().setDarkMode(dark);<NEW_LINE>StyleConstants.setDark(dark);<NEW_LINE>Rectangle size = getClientArea();<NEW_LINE>redraw(size.x, size.y, size.width, size.height, true);<NEW_LINE>});<NEW_LINE>boolean dark = models.settings.ui().getPerfettoOrBuilder().getDarkMode();<NEW_LINE>darkMode.setChecked(dark);<NEW_LINE>StyleConstants.setDark(dark);<NEW_LINE>Action queryView = MainWindow.MenuItems.ViewQueryShell.create(() -> {<NEW_LINE>Window window = new Window(new SameShellProvider(this)) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void configureShell(Shell shell) {<NEW_LINE>shell.setText(Messages.QUERY_VIEW_WINDOW_TITLE);<NEW_LINE>shell.setImages(<MASK><NEW_LINE>super.configureShell(shell);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Control createContents(Composite parent) {<NEW_LINE>return new QueryViewer(parent, models);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Layout getLayout() {<NEW_LINE>return new FillLayout();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected Point getInitialSize() {<NEW_LINE>return new Point(800, 600);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>window.open();<NEW_LINE>});<NEW_LINE>manager.add(darkMode);<NEW_LINE>manager.add(queryView);<NEW_LINE>}
widgets.theme.windowLogo());
879,011
public Map<String, Object> createDefaultFindProperties() {<NEW_LINE>HashMap<String, Object> props = new HashMap<>();<NEW_LINE>props.put(FIND_WHAT, null);<NEW_LINE>props.put(FIND_REPLACE_WITH, null);<NEW_LINE>props.put(FIND_HIGHLIGHT_SEARCH, Boolean.TRUE);<NEW_LINE>props.put(FIND_INC_SEARCH, Boolean.TRUE);<NEW_LINE>props.put(FIND_BACKWARD_SEARCH, Boolean.FALSE);<NEW_LINE>props.put(FIND_WRAP_SEARCH, Boolean.TRUE);<NEW_LINE>props.put(FIND_MATCH_CASE, Boolean.FALSE);<NEW_LINE>props.put(FIND_SMART_CASE, Boolean.FALSE);<NEW_LINE>props.put(FIND_WHOLE_WORDS, Boolean.FALSE);<NEW_LINE>props.put(FIND_REG_EXP, Boolean.FALSE);<NEW_LINE>props.put(FIND_HISTORY<MASK><NEW_LINE>props.put(FIND_PRESERVE_CASE, Boolean.FALSE);<NEW_LINE>props.put(ADD_MULTICARET, Boolean.FALSE);<NEW_LINE>return props;<NEW_LINE>}
, Integer.valueOf(30));
49,325
private void generate_polygon_cuts_() {<NEW_LINE>AttributeStreamOfInt32 cutHandles = new AttributeStreamOfInt32(0);<NEW_LINE>EditShape shape = new EditShape();<NEW_LINE>int sideIndex = shape.createGeometryUserIndex();<NEW_LINE>int cutteeHandle = shape.addGeometry(m_cuttee);<NEW_LINE>int <MASK><NEW_LINE>TopologicalOperations topoOp = new TopologicalOperations();<NEW_LINE>try {<NEW_LINE>topoOp.setEditShapeCrackAndCluster(shape, m_tolerance, m_progressTracker);<NEW_LINE>topoOp.cut(sideIndex, cutteeHandle, cutterHandle, cutHandles);<NEW_LINE>Polygon cutteeRemainder = (Polygon) shape.getGeometry(cutteeHandle);<NEW_LINE>MultiPath left = new Polygon();<NEW_LINE>MultiPath right = new Polygon();<NEW_LINE>m_cuts.clear();<NEW_LINE>m_cuts.add(left);<NEW_LINE>m_cuts.add(right);<NEW_LINE>for (int icutIndex = 0; icutIndex < cutHandles.size(); icutIndex++) {<NEW_LINE>Geometry cutGeometry;<NEW_LINE>{<NEW_LINE>// intersection<NEW_LINE>EditShape shapeIntersect = new EditShape();<NEW_LINE>int geometryA = shapeIntersect.addGeometry(cutteeRemainder);<NEW_LINE>int geometryB = shapeIntersect.addGeometry(shape.getGeometry(cutHandles.get(icutIndex)));<NEW_LINE>topoOp.setEditShape(shapeIntersect, m_progressTracker);<NEW_LINE>int intersectHandle = topoOp.intersection(geometryA, geometryB);<NEW_LINE>cutGeometry = shapeIntersect.getGeometry(intersectHandle);<NEW_LINE>if (cutGeometry.isEmpty())<NEW_LINE>continue;<NEW_LINE>int side = shape.getGeometryUserIndex(cutHandles.get(icutIndex), sideIndex);<NEW_LINE>if (side == 2)<NEW_LINE>left.add((MultiPath) cutGeometry, false);<NEW_LINE>else if (side == 1)<NEW_LINE>right.add((MultiPath) cutGeometry, false);<NEW_LINE>else<NEW_LINE>// Undefined<NEW_LINE>m_cuts.add((MultiPath) cutGeometry);<NEW_LINE>}<NEW_LINE>{<NEW_LINE>// difference<NEW_LINE>EditShape shapeDifference = new EditShape();<NEW_LINE>int geometryA = shapeDifference.addGeometry(cutteeRemainder);<NEW_LINE>int geometryB = shapeDifference.addGeometry(shape.getGeometry(cutHandles.get(icutIndex)));<NEW_LINE>topoOp.setEditShape(shapeDifference, m_progressTracker);<NEW_LINE>cutteeRemainder = (Polygon) shapeDifference.getGeometry(topoOp.difference(geometryA, geometryB));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!cutteeRemainder.isEmpty() && cutHandles.size() > 0)<NEW_LINE>m_cuts.add((MultiPath) cutteeRemainder);<NEW_LINE>if (left.isEmpty() && right.isEmpty())<NEW_LINE>// no cuts<NEW_LINE>m_cuts.clear();<NEW_LINE>} finally {<NEW_LINE>topoOp.removeShape();<NEW_LINE>}<NEW_LINE>}
cutterHandle = shape.addGeometry(m_cutter);
64,013
private void updateNotification(String content) {<NEW_LINE>String ticker = String.format(getString(R.string.media_notif_ticker), getString(R.string.app_name));<NEW_LINE>// TODO check if updating the Intent is really necessary<NEW_LINE>Intent showDetailsIntent = new Intent(this, FileDisplayActivity.class);<NEW_LINE>showDetailsIntent.putExtra(FileActivity.EXTRA_FILE, mFile);<NEW_LINE>showDetailsIntent.putExtra(FileActivity.EXTRA_ACCOUNT, mAccount);<NEW_LINE>showDetailsIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);<NEW_LINE>mNotificationBuilder.setContentIntent(PendingIntent.getActivity(getApplicationContext(), (int) System.currentTimeMillis(), showDetailsIntent, PendingIntent.FLAG_UPDATE_CURRENT));<NEW_LINE>mNotificationBuilder.setWhen(System.currentTimeMillis());<NEW_LINE>mNotificationBuilder.setTicker(ticker);<NEW_LINE>mNotificationBuilder.setContentTitle(ticker);<NEW_LINE>mNotificationBuilder.setContentText(content);<NEW_LINE>mNotificationBuilder.setChannelId(MEDIA_SERVICE_NOTIFICATION_CHANNEL_ID);<NEW_LINE>mNotificationManager.notify(R.string.<MASK><NEW_LINE>}
media_notif_ticker, mNotificationBuilder.build());
759,122
public String toXmlPartial(Object domainObject) {<NEW_LINE>bombIf(!isAnnotationPresent(domainObject.getClass(), ConfigTag.class), "Object " + domainObject + " does not have a ConfigTag");<NEW_LINE>Element element = elementFor(domainObject.getClass(), configCache);<NEW_LINE>write(domainObject, element, configCache, registry);<NEW_LINE>if (isAnnotationPresent(domainObject.getClass(), ConfigCollection.class) && domainObject instanceof Collection) {<NEW_LINE>for (Object item : (Collection) domainObject) {<NEW_LINE>if (isAnnotationPresent(item.getClass(), ConfigCollection.class) && item instanceof Collection) {<NEW_LINE>new ExplicitCollectionXmlFieldWithValue(domainObject.getClass(), null, (Collection) item, configCache<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Element childElement = elementFor(item.getClass(), configCache);<NEW_LINE>element.addContent(childElement);<NEW_LINE>write(item, childElement, configCache, registry);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try (ByteArrayOutputStream output = new ByteArrayOutputStream(32 * 1024)) {<NEW_LINE>XmlUtils.writeXml(element, output);<NEW_LINE>return output.toString();<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw bomb("Unable to write xml to String");<NEW_LINE>}<NEW_LINE>}
, registry).populate(element);
252,448
public DeleteSessionResult deleteSession(DeleteSessionRequest deleteSessionRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteSessionRequest> request = null;<NEW_LINE>Response<DeleteSessionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteSessionRequestMarshaller().marshall(deleteSessionRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Unmarshaller<DeleteSessionResult, JsonUnmarshallerContext> unmarshaller = new DeleteSessionResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<DeleteSessionResult> responseHandler = new JsonResponseHandler<DeleteSessionResult>(unmarshaller);<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>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
497,378
public OMixedIndexRIDContainer deserializeNativeObject(byte[] stream, int startPosition) {<NEW_LINE>startPosition += OIntegerSerializer.INT_SIZE;<NEW_LINE>final long fileId = OLongSerializer.INSTANCE.deserializeNative(stream, startPosition);<NEW_LINE>startPosition += OLongSerializer.LONG_SIZE;<NEW_LINE>final int embeddedSize = OIntegerSerializer.INSTANCE.deserializeNative(stream, startPosition);<NEW_LINE>startPosition += OIntegerSerializer.INT_SIZE;<NEW_LINE>final Set<ORID> hashSet = new HashSet<>();<NEW_LINE>for (int i = 0; i < embeddedSize; i++) {<NEW_LINE>final ORID orid = OCompactedLinkSerializer.INSTANCE.deserializeNativeObject(stream, startPosition).getIdentity();<NEW_LINE>startPosition += OCompactedLinkSerializer.INSTANCE.getObjectSizeNative(stream, startPosition);<NEW_LINE>hashSet.add(orid);<NEW_LINE>}<NEW_LINE>final long pageIndex = OLongSerializer.INSTANCE.deserializeNative(stream, startPosition);<NEW_LINE>startPosition += OLongSerializer.LONG_SIZE;<NEW_LINE>final int offset = OIntegerSerializer.INSTANCE.deserializeNative(stream, startPosition);<NEW_LINE>final OIndexRIDContainerSBTree tree;<NEW_LINE>if (pageIndex == -1) {<NEW_LINE>tree = null;<NEW_LINE>} else {<NEW_LINE>final ODatabaseDocumentInternal db = ODatabaseRecordThreadLocal.instance().get();<NEW_LINE>tree = new OIndexRIDContainerSBTree(fileId, new OBonsaiBucketPointer(pageIndex, offset), (<MASK><NEW_LINE>}<NEW_LINE>return new OMixedIndexRIDContainer(fileId, hashSet, tree);<NEW_LINE>}
OAbstractPaginatedStorage) db.getStorage());
1,489,081
public void observe(Node n, MetaConfig config) {<NEW_LINE>OrderedLabels labels = new OrderedLabels(n.getLabels());<NEW_LINE>PropertyContainerProfile localNodeProfile = getNodeProfile(labels);<NEW_LINE>// Only descend and look at properties if it's in our match list.<NEW_LINE>if (config.matches(n.getLabels())) {<NEW_LINE>sawNode(labels);<NEW_LINE>localNodeProfile.observe(n, true);<NEW_LINE>}<NEW_LINE>// Even if the node isn't in our match list, do rel processing. This<NEW_LINE>// is because our profiling is "node-first" to get to the relationships,<NEW_LINE>// and if we don't do it this way, it's possible to blacklist nodes and<NEW_LINE>// thereby miss relationships that were of interest.<NEW_LINE>for (RelationshipType type : n.getRelationshipTypes()) {<NEW_LINE>String typeName = type.name();<NEW_LINE>if (!config.matches(type)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int out = n.getDegree(type, Direction.OUTGOING);<NEW_LINE>if (out == 0)<NEW_LINE>continue;<NEW_LINE>for (Relationship r : n.getRelationships(Direction.OUTGOING, type)) {<NEW_LINE>Iterable relStartNode = r.getStartNode().getLabels();<NEW_LINE>Iterable relEndNode = r.getEndNode().getLabels();<NEW_LINE>String relIdentifier = labelJoin(relStartNode) + "###" + <MASK><NEW_LINE>PropertyContainerProfile localRelProfile = getRelProfile(relIdentifier);<NEW_LINE>long seenSoFar = sawRel(relIdentifier);<NEW_LINE>boolean isNode = false;<NEW_LINE>if (seenSoFar > config.getMaxRels()) {<NEW_LINE>// We've seen more than the maximum sample size for this rel, so<NEW_LINE>// we don't need to keep looking.<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>localRelProfile.observe(r, isNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
labelJoin(relEndNode) + "###" + typeName;
730,315
private Condition createPredicateSource(@Nullable DbColumn theSourceJoinColumn, List<? extends IQueryParameterType> theList) {<NEW_LINE>if (myDaoConfig.getStoreMetaSourceInformation() == DaoConfig.StoreMetaSourceInformationEnum.NONE) {<NEW_LINE>String msg = myFhirContext.getLocalizer().getMessage(LegacySearchBuilder.class, "sourceParamDisabled");<NEW_LINE>throw new InvalidRequestException(Msg.code(1216) + msg);<NEW_LINE>}<NEW_LINE>SourcePredicateBuilder join = createOrReusePredicateBuilder(PredicateBuilderTypeEnum.SOURCE, theSourceJoinColumn, Constants.PARAM_SOURCE, () -> mySqlBuilder.addSourcePredicateBuilder(theSourceJoinColumn)).getResult();<NEW_LINE>List<Condition> orPredicates = new ArrayList<>();<NEW_LINE>for (IQueryParameterType nextParameter : theList) {<NEW_LINE>SourceParam sourceParameter = new SourceParam(nextParameter.getValueAsQueryToken(myFhirContext));<NEW_LINE>String sourceUri = sourceParameter.getSourceUri();<NEW_LINE>String requestId = sourceParameter.getRequestId();<NEW_LINE>if (isNotBlank(sourceUri) && isNotBlank(requestId)) {<NEW_LINE>orPredicates.add(toAndPredicate(join.createPredicateSourceUri(sourceUri), <MASK><NEW_LINE>} else if (isNotBlank(sourceUri)) {<NEW_LINE>orPredicates.add(join.createPredicateSourceUri(sourceUri));<NEW_LINE>} else if (isNotBlank(requestId)) {<NEW_LINE>orPredicates.add(join.createPredicateRequestId(requestId));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return toOrPredicate(orPredicates);<NEW_LINE>}
join.createPredicateRequestId(requestId)));
31,852
final StartPiiEntitiesDetectionJobResult executeStartPiiEntitiesDetectionJob(StartPiiEntitiesDetectionJobRequest startPiiEntitiesDetectionJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startPiiEntitiesDetectionJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<StartPiiEntitiesDetectionJobRequest> request = null;<NEW_LINE>Response<StartPiiEntitiesDetectionJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new StartPiiEntitiesDetectionJobRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Comprehend");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "StartPiiEntitiesDetectionJob");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<StartPiiEntitiesDetectionJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new StartPiiEntitiesDetectionJobResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(startPiiEntitiesDetectionJobRequest));
878,968
protected void initChannel(NioSocketChannel channel) {<NEW_LINE>if (_ssl) {<NEW_LINE>channel.pipeline().addLast(SessionResumptionSslHandler.PIPELINE_SESSION_RESUMPTION_HANDLER, new SessionResumptionSslHandler(_sslContext, _sslParameters, _enableSSLSessionResumption, _sslHandShakeTimeout));<NEW_LINE>}<NEW_LINE>channel.pipeline().addLast("codec", new HttpClientCodec<MASK><NEW_LINE>channel.pipeline().addLast("outboundRestRequestEncoder", HttpMessageEncoders.newRestRequestEncoder());<NEW_LINE>channel.pipeline().addLast("outboundStreamDataEncoder", HttpMessageEncoders.newDataEncoder());<NEW_LINE>channel.pipeline().addLast("outboundStreamRequestEncoder", HttpMessageEncoders.newStreamRequestEncoder());<NEW_LINE>channel.pipeline().addLast("inboundDataDecoder", HttpMessageDecoders.newDataDecoder());<NEW_LINE>channel.pipeline().addLast("inboundRequestDecoder", HttpMessageDecoders.newResponseDecoder());<NEW_LINE>channel.pipeline().addLast("schemeHandler", new SchemeHandler(_ssl ? HttpScheme.HTTPS.toString() : HttpScheme.HTTP.toString()));<NEW_LINE>channel.pipeline().addLast("streamDuplexHandler", new ClientEntityStreamHandler(_maxContentLength));<NEW_LINE>channel.pipeline().addLast("timeoutHandler", new CancelTimeoutHandler());<NEW_LINE>channel.pipeline().addLast("channelPoolHandler", new ChannelLifecycleHandler(RECYCLE_CHANNEL));<NEW_LINE>}
(_maxInitialLineLength, _maxHeaderSize, _maxChunkSize));
1,704,892
public void onApplicationEvent(@NotNull ApplicationReadyEvent applicationReadyEvent) {<NEW_LINE>UpstreamCluster brokerCluster = upstreamManager.findBroker();<NEW_LINE>if (brokerCluster == null)<NEW_LINE>return;<NEW_LINE>// rsocket broker cluster logic<NEW_LINE>CloudEventImpl<AppStatusEvent> appStatusEventCloudEvent = RSocketCloudEventBuilder.builder(new AppStatusEvent(RSocketAppContext.ID, AppStatusEvent.STATUS_SERVING)).build();<NEW_LINE>LoadBalancedRSocket loadBalancedRSocket = brokerCluster.getLoadBalancedRSocket();<NEW_LINE>// ports update<NEW_LINE>ConfigurableEnvironment env = applicationReadyEvent.getApplicationContext().getEnvironment();<NEW_LINE>int serverPort = Integer.parseInt(env.getProperty("server.port", "0"));<NEW_LINE>if (serverPort == 0) {<NEW_LINE>if (RSocketAppContext.webPort > 0 || RSocketAppContext.managementPort > 0 || RSocketAppContext.rsocketPorts != null) {<NEW_LINE>PortsUpdateEvent portsUpdateEvent = new PortsUpdateEvent();<NEW_LINE>portsUpdateEvent.setAppId(RSocketAppContext.ID);<NEW_LINE>portsUpdateEvent.setWebPort(RSocketAppContext.webPort);<NEW_LINE><MASK><NEW_LINE>portsUpdateEvent.setRsocketPorts(RSocketAppContext.rsocketPorts);<NEW_LINE>CloudEventImpl<PortsUpdateEvent> portsUpdateCloudEvent = RSocketCloudEventBuilder.builder(portsUpdateEvent).build();<NEW_LINE>loadBalancedRSocket.fireCloudEventToUpstreamAll(portsUpdateCloudEvent).doOnSuccess(aVoid -> log.info(RsocketErrorCode.message("RST-301200", loadBalancedRSocket.getActiveUris()))).subscribe();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// app status<NEW_LINE>loadBalancedRSocket.fireCloudEventToUpstreamAll(appStatusEventCloudEvent).doOnSuccess(aVoid -> log.info(RsocketErrorCode.message("RST-301200", loadBalancedRSocket.getActiveUris()))).subscribe();<NEW_LINE>// service exposed<NEW_LINE>CloudEventImpl<ServicesExposedEvent> servicesExposedEventCloudEvent = rsocketRequesterSupport.servicesExposedEvent().get();<NEW_LINE>if (servicesExposedEventCloudEvent != null) {<NEW_LINE>loadBalancedRSocket.fireCloudEventToUpstreamAll(servicesExposedEventCloudEvent).doOnSuccess(aVoid -> {<NEW_LINE>String exposedServices = rsocketRequesterSupport.exposedServices().get().stream().map(ServiceLocator::getGsv).collect(Collectors.joining(","));<NEW_LINE>log.info(RsocketErrorCode.message("RST-301201", exposedServices, loadBalancedRSocket.getActiveUris()));<NEW_LINE>}).subscribe();<NEW_LINE>}<NEW_LINE>}
portsUpdateEvent.setManagementPort(RSocketAppContext.managementPort);
780,736
static private void registerEndpointInfo(LinkedHashMap<String, EndpointInfo> endpointInfoMap, String servletName, String servletClassName, String servletMappingUrl, String appClassName, String appPath, Set<String> providerAndPathClassNames, String ejbModuleName) throws Exception {<NEW_LINE>String key = servletMappingUrl;<NEW_LINE>appPath = UriEncoder.decodeString(appPath);<NEW_LINE>if (key == null) {<NEW_LINE>key = appPath;<NEW_LINE>}<NEW_LINE>if (key == null) {<NEW_LINE>// Both servlet mapping url and application path are null<NEW_LINE>throw new Exception("Both servlet mapping url and application path are null.");<NEW_LINE>}<NEW_LINE>if (endpointInfoMap.containsKey(key)) {<NEW_LINE>// Found duplicated servlet mapping url, throw exception to fail application starting.<NEW_LINE>throw new Exception("Found duplicated servlet mapping url, throw exception to fail application starting.");<NEW_LINE>}<NEW_LINE>if ((servletName == null) || (appClassName == null) || (providerAndPathClassNames == null)) {<NEW_LINE>// These values should not be null.<NEW_LINE>throw new Exception("invalid values for servletName or appClassName or providerAndPathClassNames");<NEW_LINE>}<NEW_LINE>EJBInJarEndpointInfo endpointInfo = new EJBInJarEndpointInfo(servletName, servletClassName, servletMappingUrl, appClassName, appPath, providerAndPathClassNames);<NEW_LINE>endpointInfo.setEJBModuleName(ejbModuleName);<NEW_LINE><MASK><NEW_LINE>// If the application path has encoded characters, we must also create an EndpointInfo for<NEW_LINE>// the decoded URI that should correspond to the encoded URI. A URL pattern will then be added<NEW_LINE>// to the servlet mapping; otherwise, web container won't know what to do with the request<NEW_LINE>// and will send back a 404<NEW_LINE>// if (appPath != null && appPath.indexOf('%') > -1) {<NEW_LINE>// String decodedURI = UriEncoder.decodeString(appPath);<NEW_LINE>// EJBInJarEndpointInfo endpointInfo2 = new EJBInJarEndpointInfo(servletName, servletClassName, servletMappingUrl, appClassName, decodedURI, providerAndPathClassNames);<NEW_LINE>// endpointInfoMap.put(decodedURI, endpointInfo2);<NEW_LINE>// }<NEW_LINE>}
endpointInfoMap.put(key, endpointInfo);
1,154,856
public static SubscriptionInfo fromSubscription(Subscription subscription) {<NEW_LINE>SubscriptionInfo subscriptionInfo = new SubscriptionInfo();<NEW_LINE>subscriptionInfo.setInterfaceType(subscription.getInterfaceType());<NEW_LINE>subscriptionInfo.setNotifiedEventCount(subscription.<MASK><NEW_LINE>subscriptionInfo.setNotifyingEventCount(subscription.getNotifyingEventCount().toString());<NEW_LINE>subscriptionInfo.setNotifyTimeStamp(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(subscription.getNotifyTimeStamp()));<NEW_LINE>subscriptionInfo.setRemoteIp(subscription.getRemoteIp());<NEW_LINE>subscriptionInfo.setCreateTimeStamp(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(subscription.getCreateTimeStamp()));<NEW_LINE>subscriptionInfo.setGroupId(subscription.getGroupId());<NEW_LINE>// Arrays.toString will append plus "[]"<NEW_LINE>if (subscription.getTopics().length == 1) {<NEW_LINE>subscriptionInfo.setTopicName(subscription.getTopics()[0]);<NEW_LINE>} else {<NEW_LINE>subscriptionInfo.setTopicName(Arrays.toString(subscription.getTopics()));<NEW_LINE>}<NEW_LINE>subscriptionInfo.setSubscribeId(subscription.getUuid());<NEW_LINE>return subscriptionInfo;<NEW_LINE>}
getNotifiedEventCount().toString());
413,080
protected void createPartitionSublists() {<NEW_LINE>final Pair<Collection<Path>, Boolean> fileLocationsAndStatus = getFileLocationsAndStatus();<NEW_LINE>List<PartitionLocation> locations = new LinkedList<>();<NEW_LINE>boolean hasDirsOnly = fileLocationsAndStatus.getRight();<NEW_LINE>final Path selectionRoot = getBaseTableLocation();<NEW_LINE>// map used to map the partition keys (dir0, dir1, ..), to the list of partitions<NEW_LINE>// that share the same partition keys.<NEW_LINE>// For example,<NEW_LINE>// 1990/Q1/1.parquet, 2.parquet<NEW_LINE>// would have <1990, Q1> as key, and value as list of partition location for 1.parquet and 2.parquet.<NEW_LINE>HashMap<List<String>, List<PartitionLocation>> dirToFileMap = new HashMap<>();<NEW_LINE>// Figure out the list of leaf subdirectories. For each leaf subdirectory, find<NEW_LINE>// the list of files (DFSFilePartitionLocation) it contains.<NEW_LINE>for (Path file : fileLocationsAndStatus.getLeft()) {<NEW_LINE>DFSFilePartitionLocation dfsFilePartitionLocation = new DFSFilePartitionLocation(<MASK><NEW_LINE>List<String> dirList = Arrays.asList(dfsFilePartitionLocation.getDirs());<NEW_LINE>dirToFileMap.putIfAbsent(dirList, new ArrayList<>());<NEW_LINE>dirToFileMap.get(dirList).add(dfsFilePartitionLocation);<NEW_LINE>}<NEW_LINE>// build a list of DFSDirPartitionLocation.<NEW_LINE>dirToFileMap.keySet().stream().map(dirs -> new DFSDirPartitionLocation(dirs.toArray(new String[dirs.size()]), dirToFileMap.get(dirs))).forEach(locations::add);<NEW_LINE>locationSuperList = Lists.partition(locations, PartitionDescriptor.PARTITION_BATCH_SIZE);<NEW_LINE>sublistsCreated = true;<NEW_LINE>}
MAX_NESTED_SUBDIRS, selectionRoot, file, hasDirsOnly);
897,898
private void showDialogInternal(String title, String message, String button1Text, String button2Text, final Callback successCallback, Activity currentActivity) {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(currentActivity);<NEW_LINE>builder.setCancelable(false);<NEW_LINE>DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(DialogInterface dialog, int which) {<NEW_LINE>try {<NEW_LINE>dialog.cancel();<NEW_LINE>switch(which) {<NEW_LINE>case DialogInterface.BUTTON_POSITIVE:<NEW_LINE>successCallback.invoke(0);<NEW_LINE>break;<NEW_LINE>case DialogInterface.BUTTON_NEGATIVE:<NEW_LINE>successCallback.invoke(1);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new CodePushUnknownException("Unknown button ID pressed.");<NEW_LINE>}<NEW_LINE>} catch (Throwable e) {<NEW_LINE>CodePushUtils.log(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>if (title != null) {<NEW_LINE>builder.setTitle(title);<NEW_LINE>}<NEW_LINE>if (message != null) {<NEW_LINE>builder.setMessage(message);<NEW_LINE>}<NEW_LINE>if (button1Text != null) {<NEW_LINE>builder.setPositiveButton(button1Text, clickListener);<NEW_LINE>}<NEW_LINE>if (button2Text != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>AlertDialog dialog = builder.create();<NEW_LINE>dialog.show();<NEW_LINE>}
builder.setNegativeButton(button2Text, clickListener);
521,071
public void buildCtrLexMatrix(String id, XVariables.XVarInteger[][] matrix, Types.TypeOperatorRel operator) {<NEW_LINE>switch(operator) {<NEW_LINE>case LT:<NEW_LINE>{<NEW_LINE>model.lexChainLess(vars(matrix)).post();<NEW_LINE>XVariables.XVarInteger[][] tmatrix = ArrayUtils.transpose(matrix);<NEW_LINE>model.lexChainLess(vars(tmatrix)).post();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case LE:<NEW_LINE>{<NEW_LINE>model.lexChainLessEq(vars(matrix)).post();<NEW_LINE>XVariables.XVarInteger[][] tmatrix = ArrayUtils.transpose(matrix);<NEW_LINE>model.lexChainLessEq(vars(tmatrix)).post();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case GT:<NEW_LINE>{<NEW_LINE>XVariables.XVarInteger[][] rmatrix = matrix.clone();<NEW_LINE>ArrayUtils.reverse(rmatrix);<NEW_LINE>model.lexChainLess(vars(rmatrix)).post();<NEW_LINE>model.lexChainLess(vars(ArrayUtils.transpose(rmatrix))).post();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case GE:<NEW_LINE>{<NEW_LINE>XVariables.XVarInteger[][<MASK><NEW_LINE>ArrayUtils.reverse(rmatrix);<NEW_LINE>model.lexChainLessEq(vars(rmatrix)).post();<NEW_LINE>model.lexChainLessEq(vars(ArrayUtils.transpose(rmatrix))).post();<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
] rmatrix = matrix.clone();
1,744,365
public void updateICIOLAssociationFromIOL(@NonNull final I_C_InvoiceCandidate_InOutLine iciol, @NonNull final org.compiere.model.I_M_InOutLine inOutLine) {<NEW_LINE>iciol.<MASK><NEW_LINE>iciol.setM_InOutLine(inOutLine);<NEW_LINE>// iciol.setQtyInvoiced(QtyInvoiced); // will be set during invoicing to keep track of which movementQty is already invoiced in case of partial invoicing<NEW_LINE>iciol.setQtyDelivered(inOutLine.getMovementQty());<NEW_LINE>final InvoicableQtyBasedOn invoicableQtyBasedOn = InvoicableQtyBasedOn.fromRecordString(iciol.getC_Invoice_Candidate().getInvoicableQtyBasedOn());<NEW_LINE>if (inOutLine.getCatch_UOM_ID() > 0 && invoicableQtyBasedOn.isCatchWeight()) {<NEW_LINE>// only if the ic is about catch-weight, then we attempt to record it in the iciol.<NEW_LINE>// the inoutline may have a catch-weight, because the respective goods may have a weight.<NEW_LINE>iciol.setC_UOM_ID(inOutLine.getCatch_UOM_ID());<NEW_LINE>// if inOutLine.QtyDeliveredCatch is null, then iciol.QtyDeliveredInUOM_Catch must also be null and not zero.<NEW_LINE>final BigDecimal catchQtyOrNull = getValueOrNull(inOutLine, I_M_InOutLine.COLUMNNAME_QtyDeliveredCatch);<NEW_LINE>iciol.setQtyDeliveredInUOM_Catch(catchQtyOrNull);<NEW_LINE>// make sure that both quantities have the same UOM<NEW_LINE>final IUOMConversionBL uomConversionBL = Services.get(IUOMConversionBL.class);<NEW_LINE>final BigDecimal nominalQty = uomConversionBL.convertQty(UOMConversionContext.of(ProductId.ofRepoId(inOutLine.getM_Product_ID())), inOutLine.getQtyEntered(), UomId.ofRepoId(inOutLine.getC_UOM_ID()), /* uomFrom */<NEW_LINE>UomId.ofRepoId(inOutLine.getCatch_UOM_ID()));<NEW_LINE>iciol.setQtyDeliveredInUOM_Nominal(nominalQty);<NEW_LINE>} else {<NEW_LINE>iciol.setC_UOM_ID(assumeGreaterThanZero(inOutLine.getC_UOM_ID(), "inOutLine.getC_UOM_ID()"));<NEW_LINE>iciol.setQtyDeliveredInUOM_Nominal(inOutLine.getQtyEntered());<NEW_LINE>}<NEW_LINE>saveRecord(iciol);<NEW_LINE>}
setAD_Org_ID(inOutLine.getAD_Org_ID());
1,212,726
final AssociateDomainResult executeAssociateDomain(AssociateDomainRequest associateDomainRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateDomainRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AssociateDomainRequest> request = null;<NEW_LINE>Response<AssociateDomainResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AssociateDomainRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(associateDomainRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "WorkLink");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssociateDomain");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AssociateDomainResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AssociateDomainResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());