idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,777,723
private static void tryAssertion12(RegressionEnvironment env, String stmtText, String outputLimit, AtomicInteger milestone) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>env.compileDeploy(stmtText).addListener("s0");<NEW_LINE>String[] fields = new String[] { "symbol", "sum(price)" };<NEW_LINE>ResultAssertTestResult expected = new ResultAssertTestResult(CATEGORY, outputLimit, fields);<NEW_LINE>expected.addResultInsRem(200, 1, new Object[][] { { "IBM", 25d } }, new Object[][] { { "IBM", null } });<NEW_LINE>expected.addResultInsRem(800, 1, new Object[][] { { "MSFT", 9d } }, new Object[][] { { "MSFT", null } });<NEW_LINE>expected.addResultInsRem(1500, 1, new Object[][] { { "IBM", 49d } }, new Object[][] { { "IBM", 25d } });<NEW_LINE>expected.addResultInsRem(1500, 2, new Object[][] { { "YAH", 1d } }, new Object[][] { { "YAH", null } });<NEW_LINE>expected.addResultInsRem(2100, 1, new Object[][] { { "IBM", 75d } }, new Object[][] <MASK><NEW_LINE>expected.addResultInsRem(3500, 1, new Object[][] { { "YAH", 3d } }, new Object[][] { { "YAH", 1d } });<NEW_LINE>expected.addResultInsRem(4300, 1, new Object[][] { { "IBM", 97d } }, new Object[][] { { "IBM", 75d } });<NEW_LINE>expected.addResultInsRem(4900, 1, new Object[][] { { "YAH", 6d } }, new Object[][] { { "YAH", 3d } });<NEW_LINE>expected.addResultInsRem(5700, 0, new Object[][] { { "IBM", 72d } }, new Object[][] { { "IBM", 97d } });<NEW_LINE>expected.addResultInsRem(5900, 1, new Object[][] { { "YAH", 7d } }, new Object[][] { { "YAH", 6d } });<NEW_LINE>expected.addResultInsRem(6300, 0, new Object[][] { { "MSFT", null } }, new Object[][] { { "MSFT", 9d } });<NEW_LINE>expected.addResultInsRem(7000, 0, new Object[][] { { "IBM", 48d }, { "YAH", 6d } }, new Object[][] { { "IBM", 72d }, { "YAH", 7d } });<NEW_LINE>ResultAssertExecution execution = new ResultAssertExecution(stmtText, env, expected);<NEW_LINE>execution.execute(false, milestone);<NEW_LINE>}
{ { "IBM", 49d } });
1,474,973
private static void appendResponseHeader(StringBuilder buf, DnsResponse msg) {<NEW_LINE>buf.append(StringUtil.simpleClassName(msg)).append('(');<NEW_LINE>appendAddresses(buf, msg).append(msg.id()).append(", ").append(msg.opCode()).append(", ").append(msg.code()).append(',');<NEW_LINE>boolean hasComma = true;<NEW_LINE>if (msg.isRecursionDesired()) {<NEW_LINE>hasComma = false;<NEW_LINE>buf.append(" RD");<NEW_LINE>}<NEW_LINE>if (msg.isAuthoritativeAnswer()) {<NEW_LINE>hasComma = false;<NEW_LINE>buf.append(" AA");<NEW_LINE>}<NEW_LINE>if (msg.isTruncated()) {<NEW_LINE>hasComma = false;<NEW_LINE>buf.append(" TC");<NEW_LINE>}<NEW_LINE>if (msg.isRecursionAvailable()) {<NEW_LINE>hasComma = false;<NEW_LINE>buf.append(" RA");<NEW_LINE>}<NEW_LINE>if (msg.z() != 0) {<NEW_LINE>if (!hasComma) {<NEW_LINE>buf.append(',');<NEW_LINE>}<NEW_LINE>buf.append(" Z: ").append(msg.z());<NEW_LINE>}<NEW_LINE>if (hasComma) {<NEW_LINE>buf.setCharAt(buf.<MASK><NEW_LINE>} else {<NEW_LINE>buf.append(')');<NEW_LINE>}<NEW_LINE>}
length() - 1, ')');
1,447,881
protected void createRemotePack(final AttachSettings settings) {<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE>// NOI18N<NEW_LINE>File tmpDir = new File<MASK><NEW_LINE>chooser.setDialogTitle(Bundle.AttachDialog_RemotePackDialogCaption());<NEW_LINE>chooser.setAcceptAllFileFilterUsed(false);<NEW_LINE>chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);<NEW_LINE>chooser.setSelectedFile(tmpDir);<NEW_LINE>chooser.setCurrentDirectory(tmpDir);<NEW_LINE>chooser.setMultiSelectionEnabled(false);<NEW_LINE>if ((JFileChooser.CANCEL_OPTION & chooser.showSaveDialog(chooser)) == 0) {<NEW_LINE>final String path = chooser.getSelectedFile().getAbsolutePath();<NEW_LINE>final String jdkF = currentJDK;<NEW_LINE>RequestProcessor.getDefault().post(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>String packPath = exportRemotePack(path, settings, jdkF);<NEW_LINE>ProfilerDialogs.displayInfo(Bundle.AttachDialog_RemotePackSaved(packPath));<NEW_LINE>} catch (IOException ex) {<NEW_LINE>// NOI18N<NEW_LINE>System.err.println("Exception creating remote pack: " + ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(System.getProperty("java.io.tmpdir"));
424,562
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {<NEW_LINE>@Var<NEW_LINE>int size1;<NEW_LINE>@Var<NEW_LINE>int size2;<NEW_LINE>int version = in.readInt();<NEW_LINE>size1 = in.readInt();<NEW_LINE>// Deserialization doesn't call the unnamed class initializer, so do it here<NEW_LINE>if (startfs[0] == null)<NEW_LINE>initStartEndFs();<NEW_LINE>if (size1 == NULL_INTEGER) {<NEW_LINE>conjunctions = null;<NEW_LINE>} else {<NEW_LINE>conjunctions = new int[size1][];<NEW_LINE>for (int i = 0; i < size1; i++) {<NEW_LINE>size2 = in.readInt();<NEW_LINE>if (size2 == NULL_INTEGER) {<NEW_LINE>conjunctions[i] = null;<NEW_LINE>} else {<NEW_LINE>conjunctions[i] = new int[size2];<NEW_LINE>for (int j = 0; j < size2; j++) {<NEW_LINE>conjunctions[i][<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>includeOriginalSingletons = in.readBoolean();<NEW_LINE>// add by fuchun<NEW_LINE>featureRegex = (Pattern) in.readObject();<NEW_LINE>}
j] = in.readInt();
265,180
protected void checkInvokeExpr(Body b, InvokeExpr ie, Stmt s) {<NEW_LINE>final SootMethodRef methodRef = ie.getMethodRef();<NEW_LINE>if ("clone".equals(methodRef.name()) && methodRef.parameterTypes().isEmpty() && ie instanceof InstanceInvokeExpr && ((InstanceInvokeExpr) ie).getBase().getType() instanceof ArrayType) {<NEW_LINE>// the call is to the clone() method of an array type, which<NEW_LINE>// is defined not to throw any exceptions; if we left this to<NEW_LINE>// normal resolution we'd get the method in Object which does<NEW_LINE>// throw CloneNotSupportedException<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// For an invokeinterface, there is no unique resolution for the<NEW_LINE>// method reference that will get the "correct" exception spec. We<NEW_LINE>// actually need to look at the intersection of all declarations of<NEW_LINE>// the method in supertypes.<NEW_LINE>// Otherwise, we just do normal resolution.<NEW_LINE>List<SootClass> exceptions = (ie instanceof InterfaceInvokeExpr) ? getExceptionSpec(methodRef.declaringClass(), methodRef.getSubSignature()) : ie.getMethod().getExceptionsUnsafe();<NEW_LINE>if (exceptions != null) {<NEW_LINE>for (SootClass sc : exceptions) {<NEW_LINE>if (isThrowDeclared(b, sc) || isExceptionCaught(b, s, sc.getType())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (reporter != null) {<NEW_LINE>if (s instanceof InvokeStmt) {<NEW_LINE>reporter.reportError(new ExceptionCheckerError(b.getMethod(), sc, s, (SourceLnPosTag) s.<MASK><NEW_LINE>} else if (s instanceof AssignStmt) {<NEW_LINE>reporter.reportError(new ExceptionCheckerError(b.getMethod(), sc, s, (SourceLnPosTag) ((AssignStmt) s).getRightOpBox().getTag(SourceLnPosTag.NAME)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getTag(SourceLnPosTag.NAME)));
220,231
private void initSwitchLineAction() {<NEW_LINE>final KeyStroke keyLinesDown = KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK);<NEW_LINE>final KeyStroke keyLinesUp = KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK);<NEW_LINE>aSwitchLinesDownAction = new SwitchAction("switchLinesDown", keyLinesDown, this);<NEW_LINE>aSwitchLinesUpAction = new SwitchAction("switchLinesUp", keyLinesUp, this);<NEW_LINE>final JTable table = m_curGC.getTable();<NEW_LINE>table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(keyLinesDown, "none");<NEW_LINE>table.getInputMap(CPanel.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(keyLinesUp, "none");<NEW_LINE>table.getInputMap(CPanel.WHEN_FOCUSED<MASK><NEW_LINE>table.getInputMap(CPanel.WHEN_FOCUSED).put(keyLinesUp, "none");<NEW_LINE>getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put(keyLinesDown, aSwitchLinesDownAction.getName());<NEW_LINE>getActionMap().put(aSwitchLinesDownAction.getName(), aSwitchLinesDownAction);<NEW_LINE>getInputMap(CPanel.WHEN_IN_FOCUSED_WINDOW).put(keyLinesUp, aSwitchLinesUpAction.getName());<NEW_LINE>getActionMap().put(aSwitchLinesUpAction.getName(), aSwitchLinesUpAction);<NEW_LINE>}
).put(keyLinesDown, "none");
365,097
private void updateBars() {<NEW_LINE>GraphicMinMax gr = getCircuitSize();<NEW_LINE>if (gr.getMin() == null || gr.getMax() == null || !circuitComponent.isManualScale()) {<NEW_LINE>horizontal.setVisible(false);<NEW_LINE>vertical.setVisible(false);<NEW_LINE>} else {<NEW_LINE>Point2D min = new Point2D.Float();<NEW_LINE>Point2D max = new Point2D.Float();<NEW_LINE>try {<NEW_LINE>transform.inverseTransform(new Point2D.Float(0, 0), min);<NEW_LINE>transform.inverseTransform(new Point2D.Float(getWidth(), getHeight()), max);<NEW_LINE>setValues(horizontal, min.getX(), max.getX(), gr.getMin().x, <MASK><NEW_LINE>setValues(vertical, min.getY(), max.getY(), gr.getMin().y, gr.getMax().y);<NEW_LINE>} catch (NoninvertibleTransformException e) {<NEW_LINE>// can not happen! Scaling is never zero!<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
gr.getMax().x);
1,058,886
public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>final Path tempDir = Files.createTempDirectory(TEMP_DIR_PREFIX);<NEW_LINE>final REPL repl = new REPL(tempDir);<NEW_LINE>// TODO: Allow external spec file to be loaded into REPL context.<NEW_LINE>if (args.length == 1) {<NEW_LINE>String res = repl.processInput(args[0]);<NEW_LINE>if (!res.equals("")) {<NEW_LINE>System.out.println(res);<NEW_LINE>}<NEW_LINE>// TODO Return actual exit value if parsing/evaluation fails.<NEW_LINE>System.exit(0);<NEW_LINE>}<NEW_LINE>// For TLA+ we don't want to treat backslashes as escape chars e.g. for LaTeX like operators.<NEW_LINE>final DefaultParser parser = new DefaultParser();<NEW_LINE>parser.setEscapeChars(null);<NEW_LINE>final Terminal terminal = TerminalBuilder.builder().build();<NEW_LINE>final LineReader reader = LineReaderBuilder.builder().parser(parser).terminal(terminal).history(new DefaultHistory()).build();<NEW_LINE>reader.setVariable(LineReader.HISTORY_FILE, HISTORY_PATH);<NEW_LINE><MASK><NEW_LINE>MP.printMessage(EC.TLC_VERSION, TLCGlobals.versionOfTLC);<NEW_LINE>System.out.println("Enter a constant-level TLA+ expression.");<NEW_LINE>repl.runREPL(reader);<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}
System.out.println("Welcome to the TLA+ REPL!");
734,596
synchronized private Wo executeCommand(String ctl, String nodeName, int nodePort) throws Exception {<NEW_LINE>Wo wo = new Wo();<NEW_LINE>// wo.setNode(nodeName);<NEW_LINE>wo.setStatus("success");<NEW_LINE>try (Socket socket = new Socket(nodeName, nodePort)) {<NEW_LINE>socket.setKeepAlive(true);<NEW_LINE>socket.setSoTimeout(5000);<NEW_LINE>try (DataOutputStream dos = new DataOutputStream(socket.getOutputStream());<NEW_LINE>DataInputStream dis = new DataInputStream(socket.getInputStream())) {<NEW_LINE>Map<String, Object> commandObject = new HashMap<>();<NEW_LINE>commandObject.put("command", "command:" + ctl);<NEW_LINE>commandObject.put("credential", Crypto.rsaEncrypt("o2@", Config.publicKey()));<NEW_LINE>dos.writeUTF<MASK><NEW_LINE>dos.flush();<NEW_LINE>if (ctl.indexOf("create encrypt") > -1) {<NEW_LINE>String createEncrypt = dis.readUTF();<NEW_LINE>logger.info(createEncrypt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>wo.setStatus("fail");<NEW_LINE>logger.warn("socket dispatch executeCommand to {}:{} error={}", nodeName, nodePort, ex.getMessage());<NEW_LINE>}<NEW_LINE>SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");<NEW_LINE>wo.setTime(df.format(new Date()));<NEW_LINE>return wo;<NEW_LINE>}
(XGsonBuilder.toJson(commandObject));
484,930
public int execute(Meterpreter meterpreter, TLVPacket request, TLVPacket response) throws Exception {<NEW_LINE>Transport t = meterpreter<MASK><NEW_LINE>// check if this is the last transport<NEW_LINE>if (t == t.getNext()) {<NEW_LINE>// cant' delete the last transport<NEW_LINE>return ERROR_FAILURE;<NEW_LINE>}<NEW_LINE>String transportUrl = request.getStringValue(TLVType.TLV_TYPE_TRANS_URL);<NEW_LINE>Transport found = null;<NEW_LINE>do {<NEW_LINE>if (t.getUrl().equals(transportUrl)) {<NEW_LINE>found = t;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>t = t.getNext();<NEW_LINE>} while (t != meterpreter.getTransports().current());<NEW_LINE>if (found == null || found == meterpreter.getTransports().current()) {<NEW_LINE>// invalid transport specified (missing or current)<NEW_LINE>return ERROR_FAILURE;<NEW_LINE>}<NEW_LINE>meterpreter.getTransports().remove(found);<NEW_LINE>return ERROR_SUCCESS;<NEW_LINE>}
.getTransports().current();
1,748,528
public void testWriteContents_ALL_SESSION_ATTRIBUTES(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>HttpSession session = request.getSession(true);<NEW_LINE>try {<NEW_LINE>LinkedList<Long> list = new LinkedList<>();<NEW_LINE>list.addAll(Arrays.asList(150l, 151l, 152l));<NEW_LINE>session.setAttribute("asaset", false);<NEW_LINE>session.setAttribute("asaget", new BitSet(8));<NEW_LINE>session.setAttribute("asamod", list);<NEW_LINE>// Write all attributes to the cache<NEW_LINE>((<MASK><NEW_LINE>// set<NEW_LINE>session.setAttribute("asaset", true);<NEW_LINE>// get and mutate<NEW_LINE>((BitSet) session.getAttribute("asaget")).flip(0, 3);<NEW_LINE>// mutate without get<NEW_LINE>list.add(153l);<NEW_LINE>// Write to cache per the writeContents<NEW_LINE>((IBMSession) session).sync();<NEW_LINE>// Check the cache for values expected per writeContents=ALL_SESSION_ATTRIBUTES<NEW_LINE>BitSet expectedBits = new BitSet(8);<NEW_LINE>expectedBits.flip(0, 3);<NEW_LINE>String sessionId = session.getId();<NEW_LINE>testCacheContains(sessionId + ".asaset", true);<NEW_LINE>testCacheContains(sessionId + ".asaget", expectedBits);<NEW_LINE>testCacheContains(sessionId + ".asamod", list);<NEW_LINE>} finally {<NEW_LINE>session.invalidate();<NEW_LINE>}<NEW_LINE>}
IBMSession) session).sync();
1,461,872
public Map<DateTime, Map<String, Long>> fieldHistogram(String fieldName, Set<String> indices, Optional<Set<String>> includedStreams, long interval) {<NEW_LINE>final BoolQueryBuilder queryBuilder = buildStreamIdFilter(includedStreams);<NEW_LINE>final FilterAggregationBuilder the_filter = AggregationBuilders.filter(AGG_FILTER, queryBuilder).subAggregation(// We use "min_doc_count" here to avoid empty buckets in the histogram result.<NEW_LINE>AggregationBuilders.dateHistogram(AGG_DATE_HISTOGRAM).field("timestamp").subAggregation(AggregationBuilders.terms(AGG_MESSAGE_FIELD).field(fieldName)).interval(interval).// This is needed to avoid out-of-memory errors when creating a histogram for a really large<NEW_LINE>// date range. See: https://github.com/Graylog2/graylog-plugin-archive/issues/59<NEW_LINE>minDocCount(1L));<NEW_LINE>final SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder().query(QueryBuilders.matchAllQuery()).aggregation(the_filter);<NEW_LINE>final Search.Builder searchBuilder = new Search.Builder(searchSourceBuilder.toString()).addIndex(indices<MASK><NEW_LINE>final SearchResult searchResult = JestUtils.execute(this.jestClient, searchBuilder.build(), () -> "Unable to retrieve field histogram.");<NEW_LINE>final FilterAggregation filterAggregation = searchResult.getAggregations().getFilterAggregation(AGG_FILTER);<NEW_LINE>final DateHistogramAggregation dateHistogram = filterAggregation.getDateHistogramAggregation(AGG_DATE_HISTOGRAM);<NEW_LINE>final List<DateHistogramAggregation.DateHistogram> histogramBuckets = dateHistogram.getBuckets();<NEW_LINE>final Map<DateTime, Map<String, Long>> result = Maps.newHashMapWithExpectedSize(histogramBuckets.size());<NEW_LINE>for (HistogramAggregation.Histogram bucket : histogramBuckets) {<NEW_LINE>final DateTime date = new DateTime(bucket.getKey()).toDateTime(DateTimeZone.UTC);<NEW_LINE>final TermsAggregation sourceFieldAgg = bucket.getTermsAggregation(AGG_MESSAGE_FIELD);<NEW_LINE>final List<TermsAggregation.Entry> termBuckets = sourceFieldAgg.getBuckets();<NEW_LINE>final HashMap<String, Long> termCounts = Maps.newHashMapWithExpectedSize(termBuckets.size());<NEW_LINE>for (TermsAggregation.Entry termBucket : termBuckets) {<NEW_LINE>termCounts.put(termBucket.getKeyAsString(), termBucket.getCount());<NEW_LINE>}<NEW_LINE>result.put(date, termCounts);<NEW_LINE>}<NEW_LINE>return ImmutableMap.copyOf(result);<NEW_LINE>}
).addType(IndexMapping.TYPE_MESSAGE);
1,692,188
private void startBridge() throws IOException {<NEW_LINE>@Nullable<NEW_LINE>final HomekitServer homekitServer = this.homekitServer;<NEW_LINE>if (homekitServer != null && bridge == null) {<NEW_LINE>final HomekitRoot bridge = homekitServer.createBridge(authInfo, settings.name, HomekitAccessoryCategories.BRIDGES, HomekitSettings.MANUFACTURER, HomekitSettings.MODEL, HomekitSettings.SERIAL_NUMBER, FrameworkUtil.getBundle(getClass()).getVersion().toString(), HomekitSettings.HARDWARE_REVISION);<NEW_LINE>changeListener.setBridge(bridge);<NEW_LINE>this.bridge = bridge;<NEW_LINE>bridge.<MASK><NEW_LINE>bridge.refreshAuthInfo();<NEW_LINE>final int lastAccessoryCount = changeListener.getLastAccessoryCount();<NEW_LINE>int currentAccessoryCount = changeListener.getAccessories().size();<NEW_LINE>if (currentAccessoryCount < lastAccessoryCount) {<NEW_LINE>logger.debug("it looks like not all items were initialized yet. Old configuration had {} accessories, the current one has only {} accessories. Delay HomeKit bridge start for {} seconds.", lastAccessoryCount, currentAccessoryCount, settings.startDelay);<NEW_LINE>scheduler.schedule(() -> {<NEW_LINE>if (currentAccessoryCount < lastAccessoryCount) {<NEW_LINE>// the number of items is still different, maybe it is desired.<NEW_LINE>// make new configuration revision.<NEW_LINE>changeListener.makeNewConfigurationRevision();<NEW_LINE>}<NEW_LINE>bridge.start();<NEW_LINE>}, settings.startDelay, TimeUnit.SECONDS);<NEW_LINE>} else {<NEW_LINE>// start bridge immediately.<NEW_LINE>bridge.start();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.warn("trying to start bridge but HomeKit server is not initialized or bridge is already initialized");<NEW_LINE>}<NEW_LINE>}
setConfigurationIndex(changeListener.getConfigurationRevision());
1,618,406
public void runScript(Script script, StreamConsumer buildOutputConsumer, EnvironmentVariableContext environmentVariableContext, ProcessTag processTag) throws CheckedCommandLineException {<NEW_LINE>LOG.info("Running command: {}", toStringForDisplay());<NEW_LINE>CompositeConsumer errorStreamConsumer = new CompositeConsumer(CompositeConsumer.ERR, StreamLogger.getWarnLogger(LOG), buildOutputConsumer);<NEW_LINE>CompositeConsumer outputStreamConsumer = new CompositeConsumer(CompositeConsumer.OUT, StreamLogger.getInfoLogger(LOG), buildOutputConsumer);<NEW_LINE>// TODO: The build output buffer doesn't take into account Cruise running in multi-threaded mode.<NEW_LINE>ProcessWrapper process;<NEW_LINE>int exitCode = -1;<NEW_LINE>SafeOutputStreamConsumer streamConsumer = null;<NEW_LINE>try {<NEW_LINE>streamConsumer = new SafeOutputStreamConsumer(new ProcessOutputStreamConsumer(outputStreamConsumer, errorStreamConsumer));<NEW_LINE><MASK><NEW_LINE>streamConsumer.addSecrets(environmentVariableContext.secrets());<NEW_LINE>process = startProcess(environmentVariableContext, streamConsumer, processTag);<NEW_LINE>} catch (CommandLineException e) {<NEW_LINE>String message = String.format("Error happened while attempting to execute '%s'. \nPlease make sure [%s] can be executed on this agent.\n", toStringForDisplay(), getExecutable());<NEW_LINE>String path = System.getenv("PATH");<NEW_LINE>streamConsumer.errOutput(message);<NEW_LINE>streamConsumer.errOutput(String.format("[Debug Information] Environment variable PATH: %s", path));<NEW_LINE>LOG.error("[Command Line] {}. Path: {}", message, path);<NEW_LINE>throw new CheckedCommandLineException(message, e);<NEW_LINE>} catch (IOException e) {<NEW_LINE>String msg = String.format("Encountered an IO exception while attempting to execute '%s'. Go cannot continue.\n", toStringForDisplay());<NEW_LINE>streamConsumer.errOutput(msg);<NEW_LINE>throw new CheckedCommandLineException(msg, e);<NEW_LINE>}<NEW_LINE>exitCode = process.waitForExit();<NEW_LINE>script.setExitCode(exitCode);<NEW_LINE>}
streamConsumer.addArguments(getArguments());
1,623,020
final ListOrganizationAdminAccountsResult executeListOrganizationAdminAccounts(ListOrganizationAdminAccountsRequest listOrganizationAdminAccountsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listOrganizationAdminAccountsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListOrganizationAdminAccountsRequest> request = null;<NEW_LINE>Response<ListOrganizationAdminAccountsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListOrganizationAdminAccountsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listOrganizationAdminAccountsRequest));<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, "SecurityHub");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListOrganizationAdminAccounts");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListOrganizationAdminAccountsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListOrganizationAdminAccountsResultJsonUnmarshaller());<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());
29,020
public ResponseEntity<Set<Pet>> findPetsByTagsWithHttpInfo(Set<String> tags) throws RestClientException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'tags' is set<NEW_LINE>if (tags == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'tags' when calling findPetsByTags");<NEW_LINE>}<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 LinkedMultiValueMap<String, String>();<NEW_LINE>final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();<NEW_LINE>localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.valueOf("csv".toUpperCase(Locale.ROOT)), "tags", tags));<NEW_LINE>final String[] localVarAccepts = { "application/xml", "application/json" };<NEW_LINE>final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE><MASK><NEW_LINE>final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "petstore_auth" };<NEW_LINE>ParameterizedTypeReference<Set<Pet>> localReturnType = new ParameterizedTypeReference<Set<Pet>>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI("/pet/findByTags", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);<NEW_LINE>}
final String[] localVarContentTypes = {};
1,606,219
public Object execute(final Map<Object, Object> iArgs) {<NEW_LINE>final ODatabaseDocumentInternal database = getDatabase();<NEW_LINE>database.checkSecurity(ORule.ResourceGeneric.SERVER, "remove", ORole.PERMISSION_EXECUTE);<NEW_LINE>if (!(database instanceof ODatabaseDocumentDistributed)) {<NEW_LINE>throw new OCommandExecutionException("OrientDB is not started in distributed mode");<NEW_LINE>}<NEW_LINE>final ODistributedPlugin dManager = (ODistributedPlugin) ((ODatabaseDocumentDistributed) database).getDistributedManager();<NEW_LINE>if (dManager == null || !dManager.isEnabled())<NEW_LINE>throw new OCommandExecutionException("OrientDB is not started in distributed mode");<NEW_LINE>final String databaseName = database.getName();<NEW_LINE>// The last parameter (true) indicates to set the node's database status to OFFLINE.<NEW_LINE>// If this is changed to false, the node will be set to NOT_AVAILABLE, and then the<NEW_LINE>// auto-repairer will<NEW_LINE>// re-synchronize the database on the node, and then set it to ONLINE.<NEW_LINE>return dManager.removeNodeFromConfiguration(parsedStatement.serverName.getStringValue(<MASK><NEW_LINE>}
), databaseName, false, true);
271,647
public OAuthClientService createOAuthClientService(String handle, String tokenUrl, @Nullable String authorizationUrl, String clientId, @Nullable String clientSecret, @Nullable String scope, @Nullable Boolean supportsBasicAuth) {<NEW_LINE>PersistedParams params = oAuthStoreHandler.loadPersistedParams(handle);<NEW_LINE>PersistedParams newParams = new PersistedParams(handle, tokenUrl, authorizationUrl, clientId, clientSecret, scope, supportsBasicAuth, tokenExpiresInBuffer);<NEW_LINE>OAuthClientService clientImpl = null;<NEW_LINE>// If parameters in storage and parameters are the same as arguments passed get the client from storage<NEW_LINE>if (params != null && params.equals(newParams)) {<NEW_LINE>clientImpl = getOAuthClientService(handle);<NEW_LINE>}<NEW_LINE>// If no client with parameters or with different parameters create or update (if parameters are different)<NEW_LINE>// client in storage.<NEW_LINE>if (clientImpl == null) {<NEW_LINE>clientImpl = OAuthClientServiceImpl.createInstance(handle, oAuthStoreHandler, httpClientFactory, newParams);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return clientImpl;<NEW_LINE>}
oauthClientServiceCache.put(handle, clientImpl);
757,791
public okhttp3.Call readNamespacedJobStatusCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/batch/v1/namespaces/{namespace}/jobs/{name}/status".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.toString())).replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()));<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>if (pretty != null) {<NEW_LINE>localVarQueryParams.addAll(localVarApiClient.parameterToPair("pretty", pretty));<NEW_LINE>}<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };<NEW_LINE>final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null) {<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>}<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>String[] localVarAuthNames <MASK><NEW_LINE>return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
= new String[] { "BearerToken" };
1,146,451
// <Play Services Functions><NEW_LINE>private boolean checkPlayServices() {<NEW_LINE>// Check that Google Play services is available<NEW_LINE>int <MASK><NEW_LINE>// If Google Play services is available<NEW_LINE>if (ConnectionResult.SUCCESS == resultCode) {<NEW_LINE>// In debug mode, log the status<NEW_LINE>Log.d("Location Updates", "Google Play services is available.");<NEW_LINE>// Continue<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>// Google Play services was not available for some reason<NEW_LINE>// GooglePlayServicesUtil.getErrorDialog(resultCode, this,<NEW_LINE>// 0).show();<NEW_LINE>if (GooglePlayServicesUtil.isUserRecoverableError(resultCode)) {<NEW_LINE>GooglePlayServicesUtil.getErrorDialog(resultCode, this, PLAY_SERVICES_RESOLUTION_REQUEST).show();<NEW_LINE>} else {<NEW_LINE>Log.i("AnyplaceNavigator", "This device is not supported.");<NEW_LINE>finish();<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
797,422
public static void main(String[] args) throws IOException {<NEW_LINE>Cmd cmd = MainUtils.parseArguments(args, FLAGS);<NEW_LINE>if (cmd.argsLength() < 1) {<NEW_LINE>MainUtils.printHelpArgs(FLAGS, new String[] { "output file" });<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int speed = 4;<NEW_LINE>final int ballSize = 40;<NEW_LINE>AWTSequenceEncoder enc = AWTSequenceEncoder.create25Fps(new File(cmd.getArg(0)));<NEW_LINE>int framesToEncode = cmd.getIntegerFlagD(FLAG_FRAMES, 100);<NEW_LINE>long totalNano = 0;<NEW_LINE>BufferedImage image = new BufferedImage(640, 480, BufferedImage.TYPE_3BYTE_BGR);<NEW_LINE>for (int i = 0, x = 0, y = 0, incX = speed, incY = speed; i < framesToEncode; i++, x += incX, y += incY) {<NEW_LINE>Graphics g = image.getGraphics();<NEW_LINE><MASK><NEW_LINE>g.fillRect(0, 0, image.getWidth(), image.getHeight());<NEW_LINE>g.setColor(Color.YELLOW);<NEW_LINE>if (x >= image.getWidth() - ballSize)<NEW_LINE>incX = -speed;<NEW_LINE>if (y >= image.getHeight() - ballSize)<NEW_LINE>incY = -speed;<NEW_LINE>if (x <= 0)<NEW_LINE>incX = speed;<NEW_LINE>if (y <= 0)<NEW_LINE>incY = speed;<NEW_LINE>g.fillOval(x, y, ballSize, ballSize);<NEW_LINE>long start = System.nanoTime();<NEW_LINE>enc.encodeImage(image);<NEW_LINE>totalNano += System.nanoTime() - start;<NEW_LINE>}<NEW_LINE>enc.finish();<NEW_LINE>System.out.println("FPS: " + ((1000000000L * framesToEncode) / totalNano));<NEW_LINE>}
g.setColor(Color.BLACK);
1,095,501
final DeletePipelineResult executeDeletePipeline(DeletePipelineRequest deletePipelineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePipelineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeletePipelineRequest> request = null;<NEW_LINE>Response<DeletePipelineResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeletePipelineRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePipelineRequest));<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, "SageMaker");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePipeline");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeletePipelineResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePipelineResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
441,219
private void approveFetchingOfBigFile(final MatchingObject mo, final int partIndex) {<NEW_LINE>FileObject fo = mo.getFileObject();<NEW_LINE>long fileSize = fo.getSize() / 1024;<NEW_LINE>JButton showButton = new JButton(Bundle.LBL_ContextView_Show());<NEW_LINE>JButton skipButton = new JButton(Bundle.LBL_ContextView_Skip());<NEW_LINE>JCheckBox all = new JCheckBox(Bundle.LBL_ContextView_ApplyAll());<NEW_LINE>all.setSelected(approveApplyToAllSelected);<NEW_LINE>JPanel allPanel = new JPanel();<NEW_LINE>// Add to panel not to be handled as standard button.<NEW_LINE>allPanel.add(all);<NEW_LINE>NotifyDescriptor nd = new NotifyDescriptor(Bundle.MSG_ContextView_showBigFile(fo.getNameExt(), fileSize), Bundle.TTL_ContextView_showBigFile(), NotifyDescriptor.YES_NO_OPTION, NotifyDescriptor.WARNING_MESSAGE, new Object[] { skipButton, showButton }, lastApproveOption ? showButton : skipButton);<NEW_LINE>nd.setAdditionalOptions(new Object[] { allPanel });<NEW_LINE>DialogDisplayer.getDefault().notify(nd);<NEW_LINE>boolean app = nd.getValue() == showButton;<NEW_LINE><MASK><NEW_LINE>if (all.isSelected()) {<NEW_LINE>allApproved = app;<NEW_LINE>}<NEW_LINE>approveApplyToAllSelected = all.isSelected();<NEW_LINE>lastApproveOption = app;<NEW_LINE>displayFile(mo, partIndex);<NEW_LINE>}
APPROVED_FILES.put(fo, app);
1,649,675
void maybeSendCapture() {<NEW_LINE>if (!shouldSendCapture()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Payload payload = new Payload();<NEW_LINE>for (Capturable capturable : capturables) {<NEW_LINE>StringWriter content = new StringWriter();<NEW_LINE>PrintWriter writer = new PrintWriter(content);<NEW_LINE>capturable.captureData(writer);<NEW_LINE>writer.flush();<NEW_LINE>payload.pages.add(new Page(capturable.pageName(), content.toString()));<NEW_LINE>}<NEW_LINE>SendDebugCaptureRequest request = new SendDebugCaptureRequest().setComponentId(COMPONENT).setWorkerId(host).setData(JSON_FACTORY.toString(payload));<NEW_LINE>this.client.projects().locations().jobs().debug().sendCapture(project, region, job, request).execute();<NEW_LINE>synchronized (lock) {<NEW_LINE>lastCaptureUsec = DateTime.now<MASK><NEW_LINE>}<NEW_LINE>LOG.debug("Sent Debug Capture payload");<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.info("Does not send debug capture data", e);<NEW_LINE>}<NEW_LINE>}
().getMillis() * 1000;
1,317,397
protected void unsetRequestInterceptor(ServiceReference<RequestInterceptor> reference) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>Tr.debug(tc, "RegisterRequestInterceptor.unsetRequestInterceptor(), reference:" + reference + ", InterceptPoints: " + (String) reference<MASK><NEW_LINE>String IPKey = (String) reference.getProperty(RequestInterceptor.INTERCEPT_POINTS_PROPERTY);<NEW_LINE>if (IPKey != null) {<NEW_LINE>List<String> IPs = Arrays.asList(IPKey.split("\\s*, \\s*"));<NEW_LINE>for (String IP : IPs) {<NEW_LINE>if (IP.equals(RequestInterceptor.INTERCEPT_POINT_AFTER_FILTERS)) {<NEW_LINE>_AfterFilterInterceptors.removeReference(reference);<NEW_LINE>} else if (IP.equals(RequestInterceptor.INTERCEPT_POINT_FNF)) {<NEW_LINE>_FileNotFoundInterceptors.removeReference(reference);<NEW_LINE>} else if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "RegisterRequestInterceptor.unsetRequestInterceptor(), InterceptPoint not recognized : " + IP);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "RegisterRequestInterceptor.unsetRequestInterceptor(), reference ignored because no InterecptPoints defined");<NEW_LINE>}<NEW_LINE>}
.getProperty(RequestInterceptor.INTERCEPT_POINTS_PROPERTY));
1,740,892
public void componentRegistered(Element element, AndroidManifest androidManifest, boolean printWarning, ElementValidation valid) {<NEW_LINE>TypeElement typeElement = (TypeElement) element;<NEW_LINE>if (typeElement.getModifiers().contains(Modifier.ABSTRACT)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (androidManifest.isLibraryProject()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String componentQualifiedName = typeElement.getQualifiedName().toString();<NEW_LINE><MASK><NEW_LINE>List<String> componentQualifiedNames = androidManifest.getComponentQualifiedNames();<NEW_LINE>if (!componentQualifiedNames.contains(generatedComponentQualifiedName)) {<NEW_LINE>String simpleName = typeElement.getSimpleName().toString();<NEW_LINE>String generatedSimpleName = simpleName + classSuffix();<NEW_LINE>if (componentQualifiedNames.contains(componentQualifiedName)) {<NEW_LINE>valid.addError("The AndroidManifest.xml file contains the original component, and not the AndroidAnnotations generated component. Please register " + generatedSimpleName + " instead of " + simpleName);<NEW_LINE>} else {<NEW_LINE>if (printWarning) {<NEW_LINE>valid.addWarning("The component " + generatedSimpleName + " is not registered in the AndroidManifest.xml file.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String generatedComponentQualifiedName = componentQualifiedName + classSuffix();
53,097
protected static Object doAttributeOperation(MBeanServerConnection mbsc, ObjectInstance instance, String command, MBeanAttributeInfo[] infos) throws Exception {<NEW_LINE>// Usually we get attributes. If an argument, then we're being asked<NEW_LINE>// to set attribute.<NEW_LINE>CommandParse parse = new CommandParse(command);<NEW_LINE>if (parse.getArgs() == null || parse.getArgs().length == 0) {<NEW_LINE>// Special-casing. If the subCommand is 'Attributes', then return<NEW_LINE>// list of all attributes.<NEW_LINE>if (command.equals("Attributes")) {<NEW_LINE>String[] names = new String[infos.length];<NEW_LINE>for (int i = 0; i < infos.length; i++) {<NEW_LINE>names[i] = infos[i].getName();<NEW_LINE>}<NEW_LINE>return mbsc.getAttributes(<MASK><NEW_LINE>}<NEW_LINE>return mbsc.getAttribute(instance.getObjectName(), parse.getCmd());<NEW_LINE>}<NEW_LINE>if (parse.getArgs().length != 1) {<NEW_LINE>throw new IllegalArgumentException("One only argument setting " + "attribute values: " + parse.getArgs());<NEW_LINE>}<NEW_LINE>// Get first attribute of name 'cmd'. Assumption is no method<NEW_LINE>// overrides. Then, look at the attribute and use its type.<NEW_LINE>MBeanAttributeInfo info = (MBeanAttributeInfo) getFeatureInfo(infos, parse.getCmd());<NEW_LINE>java.lang.reflect.Constructor c = Class.forName(info.getType()).getConstructor(new Class[] { String.class });<NEW_LINE>Attribute a = new Attribute(parse.getCmd(), c.newInstance(new Object[] { parse.getArgs()[0] }));<NEW_LINE>mbsc.setAttribute(instance.getObjectName(), a);<NEW_LINE>return null;<NEW_LINE>}
instance.getObjectName(), names);
151,267
public void onStatistics(MonitoringStatistics statistics) {<NEW_LINE>if (domain == null) {<NEW_LINE>final String globalSubType = ",subType=" + PROPERTY_SUBTYPE_GLOBAL;<NEW_LINE>final ApplicationInfo appStats = applicationInfoProvider.get();<NEW_LINE>String appName = appStats.getResourceConfig().getApplicationName();<NEW_LINE>if (appName == null) {<NEW_LINE>appName = "App_" + Integer.toHexString(appStats.getResourceConfig().hashCode());<NEW_LINE>}<NEW_LINE>domain = "org.glassfish.jersey:type=" + appName;<NEW_LINE>unregisterJerseyMBeans(false);<NEW_LINE>uriStatsGroup = new ResourcesMBeanGroup(statistics.getUriStatistics(), true, this, ",subType=Uris");<NEW_LINE>Map<String, ResourceStatistics> newMap = transformToStringKeys(statistics.getResourceClassStatistics());<NEW_LINE>resourceClassStatsGroup = new ResourcesMBeanGroup(newMap, false, this, ",subType=Resources");<NEW_LINE>responseMXBean = new ResponseMXBeanImpl();<NEW_LINE>registerMBean(responseMXBean, globalSubType + ",global=Responses");<NEW_LINE>requestMBean = new ExecutionStatisticsDynamicBean(statistics.getRequestStatistics(), this, globalSubType, "AllRequestTimes");<NEW_LINE>exceptionMapperMXBean = new ExceptionMapperMXBeanImpl(statistics.<MASK><NEW_LINE>new ApplicationMXBeanImpl(appStats, this, globalSubType);<NEW_LINE>}<NEW_LINE>requestMBean.updateExecutionStatistics(statistics.getRequestStatistics());<NEW_LINE>uriStatsGroup.updateResourcesStatistics(statistics.getUriStatistics());<NEW_LINE>responseMXBean.updateResponseStatistics(statistics.getResponseStatistics());<NEW_LINE>exceptionMapperMXBean.updateExceptionMapperStatistics(statistics.getExceptionMapperStatistics());<NEW_LINE>this.resourceClassStatsGroup.updateResourcesStatistics(transformToStringKeys(statistics.getResourceClassStatistics()));<NEW_LINE>}
getExceptionMapperStatistics(), this, globalSubType);
1,016,940
protected void prepareFileTypeAnalyzer(Engine engine) throws InitializationException {<NEW_LINE>super.prepareFileTypeAnalyzer(engine);<NEW_LINE>if (!isEnabled()) {<NEW_LINE>LOGGER.debug("{} Analyzer is disabled skipping yarn executable check", getName());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final List<String> args = new ArrayList<>();<NEW_LINE>args.add(getYarn());<NEW_LINE>args.add("--help");<NEW_LINE>final ProcessBuilder builder = new ProcessBuilder(args);<NEW_LINE>LOGGER.debug("Launching: {}", args);<NEW_LINE>try {<NEW_LINE>final Process process = builder.start();<NEW_LINE>try (ProcessReader processReader = new ProcessReader(process)) {<NEW_LINE>processReader.readAll();<NEW_LINE>final int exitValue = process.waitFor();<NEW_LINE>final int expectedExitValue = 0;<NEW_LINE>final int yarnExecutableNotFoundExitValue = 127;<NEW_LINE>switch(exitValue) {<NEW_LINE>case expectedExitValue:<NEW_LINE>LOGGER.debug("{} is enabled.", getName());<NEW_LINE>break;<NEW_LINE>case yarnExecutableNotFoundExitValue:<NEW_LINE>this.setEnabled(false);<NEW_LINE>LOGGER.warn("The {} has been disabled. Yarn executable was not found.", getName());<NEW_LINE>default:<NEW_LINE>this.setEnabled(false);<NEW_LINE>LOGGER.warn("The {} has been disabled. Yarn executable was not found.", getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>this.setEnabled(false);<NEW_LINE><MASK><NEW_LINE>LOGGER.warn("The {} has been disabled. Yarn executable was not found.", getName());<NEW_LINE>throw new InitializationException("Unable to read yarn audit output.", ex);<NEW_LINE>}<NEW_LINE>}
LOGGER.debug("The {} has been disabled. Yarn executable was not found.", ex);
1,428,151
public Option<Histogram>[] buildHistograms(int[] sampleFeats, int featLo, Option<FeatureRow>[] featureRows, FeatureInfo featureInfo, DataInfo dataInfo, int nid, GradPair sumGradPair) throws Exception {<NEW_LINE>Option<Histogram>[] histograms = new Option[sampleFeats.length];<NEW_LINE>if (param.numThread > 1) {<NEW_LINE>ExecutorService threadPool = Executors.newFixedThreadPool(param.numThread);<NEW_LINE>Future[] futures = new Future[param.numThread];<NEW_LINE>for (int threadId = 0; threadId < param.numThread; threadId++) {<NEW_LINE>futures[threadId] = threadPool.submit(new BuilderThread(threadId, sampleFeats, featLo, featureRows, featureInfo, dataInfo<MASK><NEW_LINE>}<NEW_LINE>threadPool.shutdown();<NEW_LINE>for (Future future : futures) {<NEW_LINE>future.get();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>new BuilderThread(0, sampleFeats, featLo, featureRows, featureInfo, dataInfo, nid, sumGradPair, histograms).call();<NEW_LINE>}<NEW_LINE>return histograms;<NEW_LINE>}
, nid, sumGradPair, histograms));
1,134,875
private void findUiChildren(JClassType ownerType) throws UnableToCompleteException {<NEW_LINE>while (ownerType != null) {<NEW_LINE>JMethod[] methods = ownerType.getMethods();<NEW_LINE>for (JMethod method : methods) {<NEW_LINE>UiChild annotation = method.getAnnotation(UiChild.class);<NEW_LINE>if (annotation != null) {<NEW_LINE>String tag = annotation.tagname();<NEW_LINE>int limit = annotation.limit();<NEW_LINE>if (tag.equals("")) {<NEW_LINE>String name = method.getName();<NEW_LINE>if (name.startsWith("add")) {<NEW_LINE>tag = name.substring(3).toLowerCase(Locale.ROOT);<NEW_LINE>} else {<NEW_LINE>logger.die(method.getName() + " must either specify a UiChild tagname or begin " + "with \"add\".");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>JParameter[] parameters = method.getParameters();<NEW_LINE>if (parameters.length == 0) {<NEW_LINE>logger.die("%s must take at least one Object argument", method.getName());<NEW_LINE>}<NEW_LINE>JType type = parameters[0].getType();<NEW_LINE>if (type.isClassOrInterface() == null) {<NEW_LINE>logger.die("%s first parameter must be an object type, found %s", method.getName(), type.getQualifiedSourceName());<NEW_LINE>}<NEW_LINE>uiChildren.put(tag, Pair<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>ownerType = ownerType.getSuperclass();<NEW_LINE>}<NEW_LINE>}
.create(method, limit));
1,241,731
final ListSecurityConfigurationsResult executeListSecurityConfigurations(ListSecurityConfigurationsRequest listSecurityConfigurationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSecurityConfigurationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListSecurityConfigurationsRequest> request = null;<NEW_LINE>Response<ListSecurityConfigurationsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListSecurityConfigurationsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSecurityConfigurationsRequest));<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, "EMR");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSecurityConfigurations");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListSecurityConfigurationsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSecurityConfigurationsResultJsonUnmarshaller());<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());
215,851
public static CommentHeader readVorbisCommentHeader(ParsableByteArray headerData, boolean hasMetadataHeader, boolean hasFramingBit) throws ParserException {<NEW_LINE>if (hasMetadataHeader) {<NEW_LINE>verifyVorbisHeaderCapturePattern(/* headerType= */<NEW_LINE>0x03, headerData, /* quiet= */<NEW_LINE>false);<NEW_LINE>}<NEW_LINE>int length = 7;<NEW_LINE>int len = (int) headerData.readLittleEndianUnsignedInt();<NEW_LINE>length += 4;<NEW_LINE>String vendor = headerData.readString(len);<NEW_LINE>length += vendor.length();<NEW_LINE>long commentListLen = headerData.readLittleEndianUnsignedInt();<NEW_LINE>String[] comments = new String[(int) commentListLen];<NEW_LINE>length += 4;<NEW_LINE>for (int i = 0; i < commentListLen; i++) {<NEW_LINE>len = (int) headerData.readLittleEndianUnsignedInt();<NEW_LINE>length += 4;<NEW_LINE>comments[i] = headerData.readString(len);<NEW_LINE>length += <MASK><NEW_LINE>}<NEW_LINE>if (hasFramingBit && (headerData.readUnsignedByte() & 0x01) == 0) {<NEW_LINE>throw ParserException.createForMalformedContainer("framing bit expected to be set", /* cause= */<NEW_LINE>null);<NEW_LINE>}<NEW_LINE>length += 1;<NEW_LINE>return new CommentHeader(vendor, comments, length);<NEW_LINE>}
comments[i].length();
303,034
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>cbSkip = new javax.swing.JCheckBox();<NEW_LINE>lblMessage = new javax.swing.JLabel();<NEW_LINE>setMinimumSize(new java.awt.Dimension(450, 112));<NEW_LINE>setPreferredSize(new java.awt.Dimension(450, 112));<NEW_LINE>setLayout(new java.awt.BorderLayout());<NEW_LINE>// NOI18N<NEW_LINE>cbSkip.setText(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.cbSkip.text"));<NEW_LINE>cbSkip.setMaximumSize(new java.awt.Dimension(900, 56));<NEW_LINE>cbSkip.setMinimumSize(new java.awt.Dimension(450, 56));<NEW_LINE>cbSkip.setPreferredSize(new java.awt.Dimension(450, 56));<NEW_LINE>add(cbSkip, java.awt.BorderLayout.SOUTH);<NEW_LINE>// NOI18N<NEW_LINE>cbSkip.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.cbSkip.AN"));<NEW_LINE>// NOI18N<NEW_LINE>cbSkip.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.cbSkip.AD"));<NEW_LINE>// NOI18N<NEW_LINE>lblMessage.setText(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.lblMessage.text"));<NEW_LINE>lblMessage.setMaximumSize(new java.awt.Dimension(900, 56));<NEW_LINE>lblMessage.setMinimumSize(new java.awt.Dimension(450, 56));<NEW_LINE>lblMessage.setPreferredSize(new java.awt.Dimension(450, 56));<NEW_LINE>add(lblMessage, <MASK><NEW_LINE>// NOI18N<NEW_LINE>lblMessage.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.lblMessage.text"));<NEW_LINE>// NOI18N<NEW_LINE>lblMessage.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.lblMessage.AD"));<NEW_LINE>// NOI18N<NEW_LINE>getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.AN"));<NEW_LINE>// NOI18N<NEW_LINE>getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ExportConfirmationPanel.class, "ExportConfirmationPanel.AD"));<NEW_LINE>}
java.awt.BorderLayout.NORTH);
1,000,329
void showCameraWindowForImage(String destinationFile) {<NEW_LINE>MediaEventGenerator eventGenerator = new ImagePickerEventGenerator();<NEW_LINE>String outputFile = destinationFile;<NEW_LINE>if (outputFile == null) {<NEW_LINE>java.io.File saveDirectory = this.getApplicationContext().getCacheDir();<NEW_LINE>saveDirectory.mkdirs();<NEW_LINE>// Create a unique file name for the media in this directory.<NEW_LINE>com.ansca.corona.storage.UniqueFileNameBuilder builder;<NEW_LINE>builder = new com.ansca.corona.storage.UniqueFileNameBuilder();<NEW_LINE>builder.setDirectory(saveDirectory);<NEW_LINE>builder.setFileNameFormat("Picture");<NEW_LINE>builder.setFileExtension(".jpg");<NEW_LINE>java.io.File imageFile = builder.build();<NEW_LINE>if (imageFile == null) {<NEW_LINE>Log.v("Corona", "Failed to generate a unique file name for the camera shot.");<NEW_LINE>if (fCoronaRuntime != null && fCoronaRuntime.isRunning()) {<NEW_LINE>fCoronaRuntime.getTaskDispatcher().send(eventGenerator.generateEvent(""));<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>outputFile = imageFile.getAbsolutePath();<NEW_LINE>}<NEW_LINE>Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");<NEW_LINE><MASK><NEW_LINE>intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);<NEW_LINE>imageUri = com.ansca.corona.camera.FileProvider.createContentUriForFile(this.getApplicationContext(), outputFile);<NEW_LINE>intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, imageUri);<NEW_LINE>showCameraWindowUsing(destinationFile, intent, eventGenerator, imageUri);<NEW_LINE>}
android.net.Uri imageUri = null;
538,622
protected boolean isProtocolInfoMatch(List<ProtocolInfo> supportedProtocols, Res resource) {<NEW_LINE>ProtocolInfo resourceProtocolInfo = resource.getProtocolInfo();<NEW_LINE>if (!resourceProtocolInfo.getProtocol().equals(Protocol.HTTP_GET))<NEW_LINE>return false;<NEW_LINE>MimeType resourceMimeType;<NEW_LINE>try {<NEW_LINE>resourceMimeType = resourceProtocolInfo.getContentFormatMimeType();<NEW_LINE>} catch (IllegalArgumentException ex) {<NEW_LINE>ContentDirectoryControlPoint.LOGGER.warning(<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>for (ProtocolInfo supportedProtocol : supportedProtocols) {<NEW_LINE>// We currently only support HTTP-GET<NEW_LINE>if (!Protocol.HTTP_GET.equals(supportedProtocol.getProtocol()))<NEW_LINE>continue;<NEW_LINE>try {<NEW_LINE>if (supportedProtocol.getContentFormatMimeType().equals(resourceMimeType)) {<NEW_LINE>return true;<NEW_LINE>} else if (supportedProtocol.getContentFormatMimeType().isCompatible(resourceMimeType)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>} catch (IllegalArgumentException ex) {<NEW_LINE>ContentDirectoryControlPoint.LOGGER.warning("Illegal MediaRenderer supported mime type: " + supportedProtocol.getContentFormat());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
"Illegal resource mime type: " + resourceProtocolInfo.getContentFormat());
485,328
public RFuture<Map<K, V>> readAllMapAsync() {<NEW_LINE>Map<K, V> result = new HashMap<K, V>();<NEW_LINE>List<Object> mapKeys = new ArrayList<Object>();<NEW_LINE>for (CacheValue value : cache.values()) {<NEW_LINE>if (value == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>mapKeys.add(encodeMapKey(value.getKey()));<NEW_LINE>result.put((K) value.getKey(), (V) value.getValue());<NEW_LINE>}<NEW_LINE>if (storeMode == LocalCachedMapOptions.StoreMode.LOCALCACHE) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>RFuture<Map<K, V>> future = readAll(ALL_MAP, mapKeys, result);<NEW_LINE>CompletionStage<Map<K, V>> f = future.thenApply(res -> {<NEW_LINE>for (Entry<K, V> entry : res.entrySet()) {<NEW_LINE>CacheKey cacheKey = localCacheView.toCacheKey(entry.getKey());<NEW_LINE>cachePut(cacheKey, entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>result.putAll(res);<NEW_LINE>return result;<NEW_LINE>});<NEW_LINE>return new CompletableFutureWrapper<>(f);<NEW_LINE>}
return new CompletableFutureWrapper<>(result);
228,254
private static InetSocketAddress createInetSocketAddress(String address) throws UnknownHostException {<NEW_LINE>final char firstChar = address.charAt(0);<NEW_LINE>if (firstChar == '_' || (firstChar == 'u' && "unknown".equals(address))) {<NEW_LINE>// To early return when the address is not an IP address.<NEW_LINE>// - an obfuscated identifier which must start with '_'<NEW_LINE>// - https://datatracker.ietf.org/doc/html/rfc7239#section-6.3<NEW_LINE>// - the "unknown" identifier<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// Remote quotes. e.g. "[2001:db8:cafe::17]:4711" => [2001:db8:cafe::17]:4711<NEW_LINE>final String addr = firstChar == '"' ? QUOTED_STRING_TRIMMER.trimFrom(address) : address;<NEW_LINE>try {<NEW_LINE>final HostAndPort <MASK><NEW_LINE>final byte[] addressBytes = NetUtil.createByteArrayFromIpAddressString(hostAndPort.getHost());<NEW_LINE>if (addressBytes == null) {<NEW_LINE>logger.debug("Failed to parse an address: {}", address);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new InetSocketAddress(InetAddress.getByAddress(addressBytes), hostAndPort.getPortOrDefault(0));<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>logger.debug("Failed to parse an address: {}", address, e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
hostAndPort = HostAndPort.fromString(addr);
398,465
public Result process(CvPipeline pipeline) throws Exception {<NEW_LINE>if (contoursStageName == null || contoursStageName.trim().isEmpty()) {<NEW_LINE>throw new Exception("contoursStageName is required.");<NEW_LINE>}<NEW_LINE>Result result = pipeline.getExpectedResult(contoursStageName);<NEW_LINE>if (result.model == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<MatOfPoint> contours = result.<MASK><NEW_LINE>Mat mat = pipeline.getWorkingImage();<NEW_LINE>if (index < 0) {<NEW_LINE>for (int i = 0; i < contours.size(); i++) {<NEW_LINE>Imgproc.drawContours(mat, contours, i, FluentCv.colorToScalar(color == null ? FluentCv.indexedColor(i) : color), thickness);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Imgproc.drawContours(mat, contours, index, FluentCv.colorToScalar(color == null ? FluentCv.indexedColor(index) : color), thickness);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
getExpectedListModel(MatOfPoint.class, null);
229,640
private void processLevel(final int currentLevel) {<NEW_LINE>final int fromLayerIndex = this.layerIndex[currentLevel + 1];<NEW_LINE>final int toLayerIndex = this.layerIndex[currentLevel];<NEW_LINE>final int fromLayerSize = this.layerCounts[currentLevel + 1];<NEW_LINE>final int <MASK><NEW_LINE>double dropoutRate = 0;<NEW_LINE>if (this.layerDropoutRates.length > currentLevel && this.layerDropoutRates[currentLevel] != 0) {<NEW_LINE>dropoutRate = this.layerDropoutRates[currentLevel];<NEW_LINE>}<NEW_LINE>final int index = this.weightIndex[currentLevel];<NEW_LINE>final ActivationFunction activation = this.network.getActivationFunctions()[currentLevel + 1];<NEW_LINE>final double currentFlatSpot = this.flatSpot[currentLevel + 1];<NEW_LINE>// handle weights<NEW_LINE>// array references are made method local to avoid one indirection<NEW_LINE>final double[] layerDelta = this.layerDelta;<NEW_LINE>final double[] weights = this.weights;<NEW_LINE>final double[] gradients = this.gradients;<NEW_LINE>final double[] layerOutput = this.layerOutput;<NEW_LINE>final double[] layerSums = this.layerSums;<NEW_LINE>int yi = fromLayerIndex;<NEW_LINE>for (int y = 0; y < fromLayerSize; y++) {<NEW_LINE>final double output = layerOutput[yi];<NEW_LINE>double sum = 0;<NEW_LINE>int wi = index + y;<NEW_LINE>final int loopEnd = toLayerIndex + toLayerSize;<NEW_LINE>if (dropoutRate == 0 || dropoutRandomSource.nextDouble() > dropoutRate) {<NEW_LINE>for (int xi = toLayerIndex; xi < loopEnd; xi++, wi += fromLayerSize) {<NEW_LINE>gradients[wi] += output * layerDelta[xi];<NEW_LINE>sum += weights[wi] * layerDelta[xi];<NEW_LINE>}<NEW_LINE>layerDelta[yi] = sum * (activation.derivativeFunction(layerSums[yi], layerOutput[yi]) + currentFlatSpot);<NEW_LINE>} else {<NEW_LINE>layerDelta[yi] = 0;<NEW_LINE>}<NEW_LINE>yi++;<NEW_LINE>}<NEW_LINE>}
toLayerSize = this.layerFeedCounts[currentLevel];
823,024
protected void updateToolbar(int verticalOffset) {<NEW_LINE>float absOffset = Math.abs(verticalOffset);<NEW_LINE>float totalScrollRange = appBar.getTotalScrollRange();<NEW_LINE>boolean collapsed = totalScrollRange > 0 && Math.abs(verticalOffset) == totalScrollRange;<NEW_LINE>float alpha = ColorUtilities.getProportionalAlpha(0, totalScrollRange * 0.75f, absOffset);<NEW_LINE>float inverseAlpha = 1.0f - ColorUtilities.getProportionalAlpha(0, totalScrollRange, absOffset);<NEW_LINE>int defaultLinksColor = ContextCompat.getColor(app, getToolbarLinksColor());<NEW_LINE>int activeLinksColor = ColorUtilities.getActiveButtonsAndLinksTextColor(app, nightMode);<NEW_LINE>int headerBgColor = ContextCompat.getColor(app, getHeaderBgColorId());<NEW_LINE>int activeColor = ColorUtilities.getActiveColor(app, nightMode);<NEW_LINE>View header = mainView.findViewById(R.id.header);<NEW_LINE>header.setAlpha(alpha);<NEW_LINE>ImageView icBack = mainView.findViewById(R.id.button_back);<NEW_LINE>ImageView icInfo = mainView.findViewById(R.id.button_help);<NEW_LINE>int iconsColor = ColorUtilities.getProportionalColorMix(defaultLinksColor, activeLinksColor, 0, totalScrollRange, Math.abs(verticalOffset));<NEW_LINE>icBack.setColorFilter(iconsColor);<NEW_LINE>icInfo.setColorFilter(iconsColor);<NEW_LINE>TextView tvTitle = mainView.findViewById(R.id.toolbar_title);<NEW_LINE>tvTitle.setTextColor(activeLinksColor);<NEW_LINE>tvTitle.setText(getHeader());<NEW_LINE>tvTitle.setAlpha(inverseAlpha);<NEW_LINE>int toolbarColor = ColorUtilities.getProportionalColorMix(headerBgColor, activeColor, 0, totalScrollRange<MASK><NEW_LINE>appBar.setBackgroundColor(toolbarColor);<NEW_LINE>Dialog dialog = getDialog();<NEW_LINE>if (Build.VERSION.SDK_INT >= 21 && dialog != null && dialog.getWindow() != null) {<NEW_LINE>Window window = dialog.getWindow();<NEW_LINE>window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);<NEW_LINE>window.setStatusBarColor(toolbarColor);<NEW_LINE>if (Build.VERSION.SDK_INT >= 23 && !nightMode) {<NEW_LINE>window.getDecorView().setSystemUiVisibility(collapsed ? mainView.getSystemUiVisibility() & ~View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR : mainView.getSystemUiVisibility() | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>View shadow = mainView.findViewById(R.id.shadowView);<NEW_LINE>shadow.setAlpha(inverseAlpha);<NEW_LINE>}
, Math.abs(verticalOffset));
806,158
// snippet-start:[kendra.java2.index.main]<NEW_LINE>public static String createIndex(KendraClient kendra, String indexDescription, String indexName, String indexRoleArn) {<NEW_LINE>try {<NEW_LINE>System.out.println("Creating an index named " + indexName);<NEW_LINE>CreateIndexRequest createIndexRequest = CreateIndexRequest.builder().description(indexDescription).name(indexName).roleArn(indexRoleArn).build();<NEW_LINE>CreateIndexResponse <MASK><NEW_LINE>System.out.println("Index response " + createIndexResponse);<NEW_LINE>String indexId = createIndexResponse.id();<NEW_LINE>System.out.println("Waiting until the index with index ID " + indexId + " is created.");<NEW_LINE>while (true) {<NEW_LINE>DescribeIndexRequest describeIndexRequest = DescribeIndexRequest.builder().id(indexId).build();<NEW_LINE>DescribeIndexResponse describeIndexResponse = kendra.describeIndex(describeIndexRequest);<NEW_LINE>IndexStatus status = describeIndexResponse.status();<NEW_LINE>System.out.println("Status is " + status);<NEW_LINE>if (status != IndexStatus.CREATING) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>TimeUnit.SECONDS.sleep(60);<NEW_LINE>}<NEW_LINE>return indexId;<NEW_LINE>} catch (KendraException | InterruptedException e) {<NEW_LINE>System.err.println(e.getMessage());<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>}
createIndexResponse = kendra.createIndex(createIndexRequest);
1,047,501
private Mono<PagedResponse<DatadogMonitorResourceInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context).map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue()<MASK><NEW_LINE>}
.nextLink(), null));
387,596
private static EntityData.RunLengthEncoding8 runLengthEncode8(TeraArray array) {<NEW_LINE>EntityData.RunLengthEncoding8.Builder builder = EntityData.RunLengthEncoding8.newBuilder();<NEW_LINE>TByteList values = new TByteArrayList(16384);<NEW_LINE>byte lastItem = (byte) array.get(0, 0, 0);<NEW_LINE>int counter = 0;<NEW_LINE>for (int y = 0; y < array.getSizeY(); ++y) {<NEW_LINE>for (int z = 0; z < array.getSizeZ(); ++z) {<NEW_LINE>for (int x = 0; x < array.getSizeX(); ++x) {<NEW_LINE>byte item = (byte) array.get(x, y, z);<NEW_LINE>if (lastItem != item) {<NEW_LINE>builder.addRunLengths(counter);<NEW_LINE>values.add(lastItem);<NEW_LINE>lastItem = item;<NEW_LINE>counter = 1;<NEW_LINE>} else {<NEW_LINE>counter++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (lastItem != 0) {<NEW_LINE>builder.addRunLengths(counter);<NEW_LINE>values.add(lastItem);<NEW_LINE>}<NEW_LINE>builder.setValues(ByteString.copyFrom<MASK><NEW_LINE>return builder.build();<NEW_LINE>}
(values.toArray()));
1,170,617
public Network implement(final Network network, final NetworkOffering offering, final DeployDestination dest, final ReservationContext context) throws InsufficientVirtualNetworkCapacityException {<NEW_LINE>assert network.getState() == State.Implementing : "Why are we implementing " + network;<NEW_LINE>final long dcId = dest.getDataCenter().getId();<NEW_LINE>// get physical network id<NEW_LINE>Long physicalNetworkId = network.getPhysicalNetworkId();<NEW_LINE>// physical network id can be null in Guest Network in Basic zone, so locate the physical network<NEW_LINE>if (physicalNetworkId == null) {<NEW_LINE>physicalNetworkId = _networkModel.findPhysicalNetworkId(dcId, offering.getTags(), offering.getTrafficType());<NEW_LINE>}<NEW_LINE>final NetworkVO implemented = new NetworkVO(network.getTrafficType(), network.getMode(), network.getBroadcastDomainType(), network.getNetworkOfferingId(), State.Allocated, network.getDataCenterId(), <MASK><NEW_LINE>allocateVnet(network, implemented, dcId, physicalNetworkId, context.getReservationId());<NEW_LINE>if (network.getGateway() != null) {<NEW_LINE>implemented.setGateway(network.getGateway());<NEW_LINE>}<NEW_LINE>if (network.getCidr() != null) {<NEW_LINE>implemented.setCidr(network.getCidr());<NEW_LINE>}<NEW_LINE>return implemented;<NEW_LINE>}
physicalNetworkId, offering.isRedundantRouter());
483,660
public ReadableState<Iterator<Map.Entry<KeyT, ValueT>>> readIterator() {<NEW_LINE>final ByteArray maxKey = createMaxKey();<NEW_LINE>final KeyValueIterator<ByteArray, StateValue<ValueT>> kvIter = store.<MASK><NEW_LINE>openIterators.add(kvIter);<NEW_LINE>return new ReadableState<Iterator<Map.Entry<KeyT, ValueT>>>() {<NEW_LINE><NEW_LINE>@Nullable<NEW_LINE>@Override<NEW_LINE>public Iterator<Map.Entry<KeyT, ValueT>> read() {<NEW_LINE>return new Iterator<Map.Entry<KeyT, ValueT>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>boolean hasNext = kvIter.hasNext();<NEW_LINE>if (!hasNext) {<NEW_LINE>kvIter.close();<NEW_LINE>openIterators.remove(kvIter);<NEW_LINE>}<NEW_LINE>return hasNext;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Map.Entry<KeyT, ValueT> next() {<NEW_LINE>Entry<ByteArray, StateValue<ValueT>> entry = kvIter.next();<NEW_LINE>return new AbstractMap.SimpleEntry<>(decodeKey(entry.getKey()), decodeValue(entry.getValue()));<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ReadableState<Iterator<Map.Entry<KeyT, ValueT>>> readLater() {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
range(getEncodedStoreKey(), maxKey);
800,085
// private Ehcache cache = ApplicationCache.instance().getCache(File.class);<NEW_LINE>ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, String applicationFlag) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = null;<NEW_LINE>CacheCategory cacheCategory = new CacheCategory(File.class);<NEW_LINE>CacheKey cacheKey = new CacheKey(this.<MASK><NEW_LINE>Optional<?> optional = CacheManager.get(cacheCategory, cacheKey);<NEW_LINE>if (optional.isPresent()) {<NEW_LINE>wo = (Wo) optional.get();<NEW_LINE>} else {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Application application = business.application().pick(applicationFlag);<NEW_LINE>if (null == application) {<NEW_LINE>throw new ExceptionEntityNotExist(applicationFlag, Application.class);<NEW_LINE>}<NEW_LINE>String id = this.get(business, application, flag);<NEW_LINE>if (StringUtils.isEmpty(id)) {<NEW_LINE>throw new ExceptionEntityNotExist(flag, File.class);<NEW_LINE>}<NEW_LINE>File file = business.file().pick(id);<NEW_LINE>byte[] bs = new byte[] {};<NEW_LINE>if (StringUtils.isNotEmpty(file.getData())) {<NEW_LINE>bs = Base64.decodeBase64(file.getData());<NEW_LINE>}<NEW_LINE>wo = new Wo(bs, this.contentType(true, file.getFileName()), this.contentDisposition(true, file.getFileName()));<NEW_LINE>CacheManager.put(cacheCategory, cacheKey, wo);<NEW_LINE>}<NEW_LINE>result.setData(wo);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
getClass(), flag, applicationFlag);
393,072
private static Object[] format(String me, TraceComponent tc, String msgKey, Object objs) {<NEW_LINE>String resourceBundle = tc.getResourceBundleName();<NEW_LINE>TraceNLS nls = TraceNLS.getTraceNLS(resourceBundle);<NEW_LINE>Object[] objs1 = new Object[] { null };<NEW_LINE>if (objs != null) {<NEW_LINE>if (objs.getClass().isArray())<NEW_LINE>objs1 = (Object[]) objs;<NEW_LINE>else<NEW_LINE>objs1 = new Object[] { objs };<NEW_LINE>}<NEW_LINE>// Get the formatted version of the original message from WAS TraceNLS.<NEW_LINE>String formattedMsg = nls.getFormattedMessage(msgKey, objs1, null);<NEW_LINE>if (formattedMsg.equalsIgnoreCase(msgKey)) {<NEW_LINE>// Some problem. Most probably TraceNLS could not load Resource bundle.<NEW_LINE>// Try to load the resource bundle using SibStackFinder.<NEW_LINE>return getFormattedMessage(me, resourceBundle, msgKey, objs1, tc);<NEW_LINE>}<NEW_LINE>return new <MASK><NEW_LINE>}
Object[] { me, formattedMsg };
1,214,615
private Identity createIdentity(Business business, PullResult result, Person person, Unit unit, User user, Long order) throws Exception {<NEW_LINE>EntityManagerContainer emc = business.entityManagerContainer();<NEW_LINE>emc.beginTransaction(Identity.class);<NEW_LINE>Identity identity = new Identity();<NEW_LINE>identity.setUnique(unit.getUnique() + "_" + person.getUnique());<NEW_LINE>identity.setName(person.getName());<NEW_LINE>identity.setPerson(person.getId());<NEW_LINE>identity.setUnit(unit.getId());<NEW_LINE>identity.<MASK><NEW_LINE>identity.setUnitLevelName(unit.getLevelName());<NEW_LINE>identity.setUnitName(unit.getName());<NEW_LINE>if (order != null) {<NEW_LINE>identity.setOrderNumber(order.intValue());<NEW_LINE>}<NEW_LINE>identity.setMajor(true);<NEW_LINE>emc.persist(identity, CheckPersistType.all);<NEW_LINE>emc.commit();<NEW_LINE>result.getCreateIdentityList().add(identity.getDistinguishedName());<NEW_LINE>return identity;<NEW_LINE>}
setUnitLevel(unit.getLevel());
1,407,406
private static void updateNaturalId(EntityManagerFactory emf, Map<String, Counts> counts) {<NEW_LINE>Statistics stats = getStatistics(emf);<NEW_LINE>EntityManager em = emf.createEntityManager();<NEW_LINE><MASK><NEW_LINE>transaction.begin();<NEW_LINE>final Session session = em.unwrap(Session.class);<NEW_LINE>final NaturalIdLoadAccess<Citizen> loader = session.byNaturalId(Citizen.class);<NEW_LINE>loader.using("ssn", "45989213T");<NEW_LINE>Citizen citizen = loader.load();<NEW_LINE>String expected = "Stark";<NEW_LINE>if (!citizen.getLastname().equals(expected))<NEW_LINE>throw new RuntimeException("Incorrect citizen: " + citizen.getLastname() + ", expected: " + expected);<NEW_LINE>citizen.setSsn("78902007R");<NEW_LINE>transaction.commit();<NEW_LINE>em.close();<NEW_LINE>assertRegionStats(counts, stats);<NEW_LINE>}
EntityTransaction transaction = em.getTransaction();
1,306,060
protected void readData(int piece_number, int piece_offset, int length, ExternalSeedHTTPDownloaderListener listener) throws ExternalSeedException {<NEW_LINE>long piece_end = piece_offset + length - 1;<NEW_LINE>String str = url_prefix + "&piece=" + piece_number + "&ranges=" + piece_offset + "-" + piece_end;<NEW_LINE>setReconnectDelay(RECONNECT_DEFAULT, false);<NEW_LINE>ExternalSeedHTTPDownloader http_downloader = null;<NEW_LINE>try {<NEW_LINE>http_downloader = new ExternalSeedHTTPDownloaderRange(new URL(str), getUserAgent());<NEW_LINE>// unfortunately using HttpURLConnection it isn't possible to read the 503 response as per<NEW_LINE>// protocol - however, for az http web seeds we don't uses 503 anyway so we cna use URLCon. The<NEW_LINE>// main benefit here is we also get http proxying which we don't get with our direct socket<NEW_LINE>// support...<NEW_LINE>if (supports_503) {<NEW_LINE>http_downloader.downloadSocket(length, listener, isTransient());<NEW_LINE>} else {<NEW_LINE>http_downloader.download(length, listener, isTransient());<NEW_LINE>}<NEW_LINE>} catch (ExternalSeedException ese) {<NEW_LINE>if (http_downloader.getLastResponse() == 503 && http_downloader.getLast503RetrySecs() >= 0) {<NEW_LINE>int retry_secs = http_downloader.getLast503RetrySecs();<NEW_LINE>setReconnectDelay(retry_secs * 1000, true);<NEW_LINE>throw (new ExternalSeedException("Server temporarily unavailable, retrying in " + retry_secs + " seconds"));<NEW_LINE>} else {<NEW_LINE>throw (ese);<NEW_LINE>}<NEW_LINE>} catch (MalformedURLException e) {<NEW_LINE>throw (<MASK><NEW_LINE>}<NEW_LINE>}
new ExternalSeedException("URL encode fails", e));
985,151
protected void rebalanceForBroker(Broker broker, ClusterModel clusterModel, Set<Goal> optimizedGoals, OptimizationOptions optimizationOptions) {<NEW_LINE>double balanceThreshold = balanceThreshold(clusterModel, broker.id());<NEW_LINE>if (broker.leadershipLoadForNwResources().expectedUtilizationFor(Resource.NW_IN) < balanceThreshold) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean overThreshold = true;<NEW_LINE>Iterator<Replica> leaderReplicaIt = broker.trackedSortedReplicas(replicaSortName(this, true, true)).sortedReplicas(true).iterator();<NEW_LINE>while (overThreshold && leaderReplicaIt.hasNext()) {<NEW_LINE><MASK><NEW_LINE>List<Replica> onlineFollowers = clusterModel.partition(leaderReplica.topicPartition()).onlineFollowers();<NEW_LINE>List<Broker> eligibleBrokers = onlineFollowers.stream().map(Replica::broker).sorted(Comparator.comparingDouble(a -> a.leadershipLoadForNwResources().expectedUtilizationFor(Resource.NW_IN))).collect(Collectors.toList());<NEW_LINE>maybeApplyBalancingAction(clusterModel, leaderReplica, eligibleBrokers, ActionType.LEADERSHIP_MOVEMENT, optimizedGoals, optimizationOptions);<NEW_LINE>overThreshold = broker.leadershipLoadForNwResources().expectedUtilizationFor(Resource.NW_IN) > balanceThreshold;<NEW_LINE>}<NEW_LINE>if (overThreshold) {<NEW_LINE>_overLimitBrokerIds.add(broker.id());<NEW_LINE>}<NEW_LINE>}
Replica leaderReplica = leaderReplicaIt.next();
311,893
private List<ConfigAttribute> processAnnotations(Annotation[] annotations) {<NEW_LINE>if (annotations == null || annotations.length == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>List<ConfigAttribute> attributes = new ArrayList<ConfigAttribute>();<NEW_LINE>// Process DenyAll, Permit all, then Roles, then Keys<NEW_LINE>for (Annotation a : annotations) {<NEW_LINE>if (a instanceof DenyAllConsumers) {<NEW_LINE><MASK><NEW_LINE>return attributes;<NEW_LINE>}<NEW_LINE>if (a instanceof PermitAllConsumers) {<NEW_LINE>attributes.add(ConsumerSecurityConfig.PERMIT_ALL_ATTRIBUTE);<NEW_LINE>return attributes;<NEW_LINE>}<NEW_LINE>if (a instanceof ConsumerRolesAllowed) {<NEW_LINE>ConsumerRolesAllowed ra = (ConsumerRolesAllowed) a;<NEW_LINE>for (String role : ra.value()) {<NEW_LINE>attributes.add(new ConsumerSecurityConfig(role, ConsumerSecurityConfig.ConsumerSecurityType.CONSUMER_ROLE));<NEW_LINE>}<NEW_LINE>return attributes;<NEW_LINE>}<NEW_LINE>if (a instanceof ConsumerKeysAllowed) {<NEW_LINE>ConsumerKeysAllowed ka = (ConsumerKeysAllowed) a;<NEW_LINE>for (String key : ka.value()) {<NEW_LINE>attributes.add(new ConsumerSecurityConfig(key, ConsumerSecurityConfig.ConsumerSecurityType.CONSUMER_KEY));<NEW_LINE>}<NEW_LINE>return attributes;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
attributes.add(ConsumerSecurityConfig.DENY_ALL_ATTRIBUTE);
1,452,314
private static final void exportSequence0(Configuration configuration, InformationSchema result, Sequence<?> q) {<NEW_LINE>org.jooq.util.xml.jaxb.Sequence iq = new org.jooq.util.xml.jaxb.Sequence();<NEW_LINE>String catalogName = catalogName(q);<NEW_LINE>String schemaName = schemaName(q);<NEW_LINE>if (!isBlank(catalogName))<NEW_LINE>iq.setSequenceCatalog(catalogName);<NEW_LINE>if (!isBlank(schemaName))<NEW_LINE>iq.setSequenceSchema(schemaName);<NEW_LINE>iq.setSequenceName(q.getName());<NEW_LINE>iq.setDataType(q.getDataType().getTypeName(configuration));<NEW_LINE>if (q.getDataType().lengthDefined())<NEW_LINE>iq.setCharacterMaximumLength(q.getDataType().length());<NEW_LINE>if (q.getDataType().precisionDefined())<NEW_LINE>iq.setNumericPrecision(q.getDataType().precision());<NEW_LINE>if (q.getDataType().scaleDefined())<NEW_LINE>iq.setNumericScale(q.<MASK><NEW_LINE>if (q.getStartWith() != null)<NEW_LINE>iq.setStartValue(Convert.convert(q.getStartWith() instanceof Param ? ((Param<?>) q.getStartWith()).getValue() : q.getStartWith().toString(), BigInteger.class));<NEW_LINE>if (q.getIncrementBy() != null)<NEW_LINE>iq.setIncrement(Convert.convert(q.getIncrementBy() instanceof Param ? ((Param<?>) q.getIncrementBy()).getValue() : q.getIncrementBy().toString(), BigInteger.class));<NEW_LINE>if (q.getMinvalue() != null)<NEW_LINE>iq.setMinimumValue(Convert.convert(q.getMinvalue() instanceof Param ? ((Param<?>) q.getMinvalue()).getValue() : q.getMinvalue().toString(), BigInteger.class));<NEW_LINE>if (q.getMaxvalue() != null)<NEW_LINE>iq.setMaximumValue(Convert.convert(q.getMaxvalue() instanceof Param ? ((Param<?>) q.getMaxvalue()).getValue() : q.getMaxvalue().toString(), BigInteger.class));<NEW_LINE>iq.setCycleOption(q.getCycle());<NEW_LINE>if (q.getCache() != null)<NEW_LINE>iq.setCache(Convert.convert(q.getCache() instanceof Param ? ((Param<?>) q.getCache()).getValue() : q.getCache().toString(), BigInteger.class));<NEW_LINE>result.getSequences().add(iq);<NEW_LINE>}
getDataType().scale());
1,831,630
private static void maybeAddVarargsPreamble(Variable varargsParameter, Block body) {<NEW_LINE>ArrayTypeDescriptor varargsParameterTypeDescriptor = (ArrayTypeDescriptor) varargsParameter.getTypeDescriptor();<NEW_LINE>if (varargsParameterTypeDescriptor.isUntypedArray()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO(b/36180242): avoid stamping if not needed.<NEW_LINE>// stamp the rest (varargs) parameter.<NEW_LINE>// Arrays.stampType(varargsParameter, new arrayType[]...[]);<NEW_LINE>// Use the raw type as the stamped leaf type. So that we use the upper bound of a generic type<NEW_LINE>// parameter type instead of the type parameter itself.<NEW_LINE>MethodCall arrayStampTypeMethodCall = RuntimeMethods.createArraysMethodCall("$stampType", varargsParameter.createReference(), varargsParameterTypeDescriptor.getLeafTypeDescriptor().getMetadataConstructorReference(), NumberLiteral.fromInt(varargsParameterTypeDescriptor.getDimensions()));<NEW_LINE>List<Statement> statements = body.getStatements();<NEW_LINE>statements.add(0, arrayStampTypeMethodCall.makeStatement<MASK><NEW_LINE>}
(body.getSourcePosition()));
619,824
private void extractAndPutDataTo(ExtensionTabData.Builder extensionTab, ExtensionDescription description, ResultSet set) throws SQLException {<NEW_LINE>String groupValue = set.getString("group_value");<NEW_LINE>if (groupValue != null) {<NEW_LINE>extensionTab.putGroupData(ExtensionStringData.regularString(description, groupValue));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean booleanValue = set.getBoolean(ExtensionServerValueTable.BOOLEAN_VALUE);<NEW_LINE>if (!set.wasNull()) {<NEW_LINE>extensionTab.putBooleanData(new ExtensionBooleanData(description, booleanValue));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>double doubleValue = <MASK><NEW_LINE>if (!set.wasNull()) {<NEW_LINE>extensionTab.putDoubleData(new ExtensionDoubleData(description, doubleValue));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>double percentageValue = set.getDouble(ExtensionServerValueTable.PERCENTAGE_VALUE);<NEW_LINE>if (!set.wasNull()) {<NEW_LINE>extensionTab.putPercentageData(new ExtensionDoubleData(description, percentageValue));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long numberValue = set.getLong(ExtensionPlayerValueTable.LONG_VALUE);<NEW_LINE>if (!set.wasNull()) {<NEW_LINE>FormatType formatType = FormatType.getByName(set.getString(ExtensionProviderTable.FORMAT_TYPE)).orElse(FormatType.NONE);<NEW_LINE>extensionTab.putNumberData(new ExtensionNumberData(description, formatType, numberValue));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String stringValue = set.getString(ExtensionPlayerValueTable.STRING_VALUE);<NEW_LINE>if (stringValue != null) {<NEW_LINE>extensionTab.putStringData(ExtensionStringData.regularString(description, stringValue));<NEW_LINE>}<NEW_LINE>}
set.getDouble(ExtensionPlayerValueTable.DOUBLE_VALUE);
1,782,495
/*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.iiordanov.bVNC.input.InputHandlerDirectSwipePan#onScroll(android.view.MotionEvent, android.view.MotionEvent, float, float)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {<NEW_LINE>// If we are not in a single-handed gesture, simply pass events onto parent.<NEW_LINE>if (!singleHandedGesture)<NEW_LINE>return super.onScroll(e1, e2, distanceX, distanceY);<NEW_LINE>// Otherwise, handle scrolling and zooming here.<NEW_LINE>if (inSwiping) {<NEW_LINE>// android.util.Log.d(TAG, "inSwiping");<NEW_LINE>scrollUp = false;<NEW_LINE>scrollDown = false;<NEW_LINE>scrollLeft = false;<NEW_LINE>scrollRight = false;<NEW_LINE>// Set needed parameters for scroll event to happen in super.super.onTouchEvent.<NEW_LINE>int absX = (int) Math.abs(distanceX);<NEW_LINE>int absY = (int) Math.abs(distanceY);<NEW_LINE>if (absY > absX) {<NEW_LINE>// Scrolling up/down.<NEW_LINE>if (distanceY > 0)<NEW_LINE>scrollDown = true;<NEW_LINE>else<NEW_LINE>scrollUp = true;<NEW_LINE>swipeSpeed = (absY + accumulatedScroll) / 15;<NEW_LINE>accumulatedScroll += absY;<NEW_LINE>} else {<NEW_LINE>// Scrolling side to side.<NEW_LINE>if (distanceX > 0)<NEW_LINE>scrollRight = true;<NEW_LINE>else<NEW_LINE>scrollLeft = true;<NEW_LINE>swipeSpeed = (absX + accumulatedScroll) / 15;<NEW_LINE>accumulatedScroll += absY;<NEW_LINE>}<NEW_LINE>if (swipeSpeed < 1) {<NEW_LINE>swipeSpeed = 0;<NEW_LINE>} else<NEW_LINE>accumulatedScroll = 0;<NEW_LINE>} else if (inScaling) {<NEW_LINE>// android.util.Log.d(TAG, "inScaling");<NEW_LINE>float scaleFactor = 1.0f + distanceY * 0.01f;<NEW_LINE>if (canvas != null && canvas.canvasZoomer != null) {<NEW_LINE>float zoomFactor <MASK><NEW_LINE>if (needInitPan) {<NEW_LINE>needInitPan = false;<NEW_LINE>canvas.absolutePan((int) (canvas.getAbsX() + (xInitialFocus - canvas.getWidth() / 2.f) / zoomFactor), (int) (canvas.getAbsY() + (yInitialFocus - canvas.getHeight() / 2.f) / zoomFactor));<NEW_LINE>}<NEW_LINE>canvas.canvasZoomer.changeZoom(activity, scaleFactor, xInitialFocus, yInitialFocus);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
= canvas.canvasZoomer.getZoomFactor();
1,100,392
private void Bind() {<NEW_LINE>SettingValues.expandedSettings = true;<NEW_LINE>setSettingItems();<NEW_LINE>final ScrollView mScrollView = ((ScrollView) findViewById(R.id.base));<NEW_LINE>prefsListener = new SharedPreferences.OnSharedPreferenceChangeListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {<NEW_LINE>SettingsActivity.changed = true;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>SettingValues.prefs.registerOnSharedPreferenceChangeListener(prefsListener);<NEW_LINE>mScrollView.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE><MASK><NEW_LINE>if (getIntent().hasExtra("position")) {<NEW_LINE>mScrollView.scrollTo(0, getIntent().getIntExtra("position", 0));<NEW_LINE>}<NEW_LINE>if (getIntent().hasExtra("prev_text")) {<NEW_LINE>prev_text = getIntent().getStringExtra("prev_text");<NEW_LINE>}<NEW_LINE>observer.addOnScrollChangedListener(new ViewTreeObserver.OnScrollChangedListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onScrollChanged() {<NEW_LINE>scrollY = mScrollView.getScrollY();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
ViewTreeObserver observer = mScrollView.getViewTreeObserver();
1,024,372
static String doString(String self, int tabsize) {<NEW_LINE>StringBuilder sb = PythonUtils.newStringBuilder(self.length());<NEW_LINE>int linePos = 0;<NEW_LINE>// It's ok to iterate with charAt, we just pass surrogates through<NEW_LINE>for (int i = 0; i < self.length(); i++) {<NEW_LINE>char ch = PString.charAt(self, i);<NEW_LINE>if (ch == '\t') {<NEW_LINE>int incr <MASK><NEW_LINE>for (int j = 0; j < incr; j++) {<NEW_LINE>PythonUtils.append(sb, ' ');<NEW_LINE>}<NEW_LINE>linePos += incr;<NEW_LINE>} else {<NEW_LINE>if (ch == '\n' || ch == '\r') {<NEW_LINE>linePos = 0;<NEW_LINE>} else {<NEW_LINE>linePos++;<NEW_LINE>}<NEW_LINE>PythonUtils.append(sb, ch);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return PythonUtils.sbToString(sb);<NEW_LINE>}
= tabsize - (linePos % tabsize);
1,306,400
protected List<String> enumConstantsOf(Dbms dbms, Table table, String columnName) throws SQLException {<NEW_LINE>final DbmsType dbmsType = dbmsTypeOf(dbmsHandlerComponent, dbms);<NEW_LINE>final DatabaseNamingConvention naming = dbmsType.getDatabaseNamingConvention();<NEW_LINE>final String sql = String.format("show columns from %s where field=%s;", naming.fullNameOf(table), naming.quoteField(columnName));<NEW_LINE>try (final Connection conn = getConnection(dbms);<NEW_LINE>final PreparedStatement <MASK><NEW_LINE>final ResultSet rs = ps.executeQuery()) {<NEW_LINE>if (rs.next()) {<NEW_LINE>final String fullResult = rs.getString(2);<NEW_LINE>if (fullResult.startsWith("enum('") && fullResult.endsWith("')")) {<NEW_LINE>final String middle = fullResult.substring(5, fullResult.length() - 1);<NEW_LINE>return Stream.of(middle.split(",")).map(s -> s.substring(1, s.length() - 1)).filter(s -> !s.isEmpty()).collect(toList());<NEW_LINE>} else {<NEW_LINE>throw new SpeedmentException("Unexpected response (" + fullResult + ").");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new SpeedmentException("Expected an result.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ps = conn.prepareStatement(sql);
839,267
protected PreloaderCallback createPreloaderPanel(String logoUrl) {<NEW_LINE>final Panel preloaderPanel = new VerticalPanel();<NEW_LINE>preloaderPanel.setStyleName("gdx-preloader");<NEW_LINE>final Image logo = new Image(logoUrl);<NEW_LINE>logo.setStyleName("logo");<NEW_LINE>preloaderPanel.add(logo);<NEW_LINE>final Panel meterPanel = new SimplePanel();<NEW_LINE>final InlineHTML meter = new InlineHTML();<NEW_LINE>final Style meterStyle = meter.getElement().getStyle();<NEW_LINE>meterStyle.<MASK><NEW_LINE>adjustMeterPanel(meterPanel, meterStyle);<NEW_LINE>meterPanel.add(meter);<NEW_LINE>preloaderPanel.add(meterPanel);<NEW_LINE>getRootPanel().add(preloaderPanel);<NEW_LINE>return new PreloaderCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void error(String file) {<NEW_LINE>System.out.println("error: " + file);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void update(PreloaderState state) {<NEW_LINE>meterStyle.setWidth(100f * state.getProgress(), Unit.PCT);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
setWidth(0, Unit.PCT);
393,277
public static void createPdfCanvasDataUrl(Diagram diagram, DownloadPopupPanel receiver, DownloadType type) {<NEW_LINE>ThemeFactory.THEMES currentTheme = ThemeFactory.getActiveThemeEnum();<NEW_LINE>ThemeFactory.changeTheme(ThemeFactory.THEMES.LIGHT, null, false);<NEW_LINE>// Calculate and set canvas width<NEW_LINE>Rectangle geRect = GridElementUtils.getGridElementsRectangle(diagram.getGridElements(), 1d);<NEW_LINE>geRect.addBorder(EXPORT_BORDER);<NEW_LINE>DrawCanvasPdf pdfCanvas = new DrawCanvasPdf(geRect.getWidth(), geRect.getHeight());<NEW_LINE>// Fill Canvas white<NEW_LINE>pdfCanvas.getContext2d().setFillStyle(Converter.convert(ThemeFactory.getCurrentTheme().getColor(Theme.PredefinedColors.WHITE)));<NEW_LINE>// Draw Elements on Canvas and translate their position<NEW_LINE>pdfCanvas.getContext2d().translate(-geRect.getX(), -geRect.getY());<NEW_LINE>pdfCanvas.drawPdf(diagram.getGridElementsByLayerLowestToHighest(), receiver, type);<NEW_LINE>ThemeFactory.<MASK><NEW_LINE>}
changeTheme(currentTheme, null, true);
1,320,944
private static ImmutableList<RecordRefWithLogEntry> deriveLocationLogEntries(@NonNull final TableRecordReference recordRef, @NonNull final ImmutableList<I_C_Location> unOrderedLocationRecords) {<NEW_LINE>final POInfo poInfo = POInfo.getPOInfo(I_C_Location.Table_Name);<NEW_LINE>final ImmutableList.Builder<RecordRefWithLogEntry> result = ImmutableList.builder();<NEW_LINE>final ArrayList<I_C_Location> orderedLocationRecords = new ArrayList<>(unOrderedLocationRecords);<NEW_LINE>Collections.sort(orderedLocationRecords, Comparator.comparing(I_C_Location::getCreated));<NEW_LINE>for (int recordIdx = 1; recordIdx < orderedLocationRecords.size(); recordIdx++) {<NEW_LINE>final I_C_Location oldRecord = orderedLocationRecords.get(recordIdx - 1);<NEW_LINE>final I_C_Location <MASK><NEW_LINE>for (int columnIdx = 0; columnIdx < poInfo.getColumnCount(); columnIdx++) {<NEW_LINE>final String columnName = poInfo.getColumnName(columnIdx);<NEW_LINE>if (isSkipLocationColumnName(columnName)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final Object oldValue = getValueOrNull(oldRecord, columnName);<NEW_LINE>final Object newValue = getValueOrNull(newRecord, columnName);<NEW_LINE>if (Objects.equals(oldValue, newValue)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final POInfoColumn columnInfo = poInfo.getColumn(columnIdx);<NEW_LINE>final ITranslatableString columnTrl = retrieveColumnTrl(columnInfo);<NEW_LINE>final RecordChangeLogEntry logEntry = RecordChangeLogEntry.builder().changedByUserId(UserId.ofRepoIdOrNull(newRecord.getCreatedBy())).changedTimestamp(TimeUtil.asInstant(newRecord.getCreated())).columnDisplayName(columnTrl).columnName(columnInfo.getColumnName()).displayType(columnInfo.getDisplayType()).valueNew(newValue).valueOld(oldValue).build();<NEW_LINE>result.add(new RecordRefWithLogEntry(recordRef, logEntry));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result.build();<NEW_LINE>}
newRecord = orderedLocationRecords.get(recordIdx);
91,118
private // by SmallRye GraphQL<NEW_LINE>GraphQLClientConfiguration toSmallRyeNativeConfiguration(GraphQLClientConfig quarkusConfig) {<NEW_LINE>GraphQLClientConfiguration transformed = new GraphQLClientConfiguration();<NEW_LINE>transformed.setHeaders(quarkusConfig.headers);<NEW_LINE>quarkusConfig.url.ifPresent(transformed::setUrl);<NEW_LINE>transformed.setWebsocketSubprotocols(quarkusConfig.subprotocols.orElse(new ArrayList<>()));<NEW_LINE>quarkusConfig.keyStore.ifPresent(transformed::setKeyStore);<NEW_LINE>quarkusConfig.keyStoreType.ifPresent(transformed::setKeyStoreType);<NEW_LINE>quarkusConfig.keyStorePassword.ifPresent(transformed::setKeyStorePassword);<NEW_LINE>quarkusConfig.trustStore.ifPresent(transformed::setTrustStore);<NEW_LINE>quarkusConfig.trustStoreType.ifPresent(transformed::setTrustStoreType);<NEW_LINE>quarkusConfig.trustStorePassword.ifPresent(transformed::setTrustStorePassword);<NEW_LINE>quarkusConfig.proxyHost.ifPresent(transformed::setProxyHost);<NEW_LINE>quarkusConfig.proxyPort.ifPresent(transformed::setProxyPort);<NEW_LINE>quarkusConfig.proxyUsername.ifPresent(transformed::setProxyUsername);<NEW_LINE>quarkusConfig.proxyPassword.ifPresent(transformed::setProxyPassword);<NEW_LINE>quarkusConfig.maxRedirects.ifPresent(transformed::setMaxRedirects);<NEW_LINE>quarkusConfig.<MASK><NEW_LINE>quarkusConfig.websocketInitializationTimeout.ifPresent(transformed::setWebsocketInitializationTimeout);<NEW_LINE>return transformed;<NEW_LINE>}
executeSingleResultOperationsOverWebsocket.ifPresent(transformed::setExecuteSingleOperationsOverWebsocket);
1,397,985
@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Generates an API key and returns its value", response = ApiKey.class, code = 201)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 404, message = "The team could not be found") })<NEW_LINE>@PermissionRequired(Permissions.Constants.ACCESS_MANAGEMENT)<NEW_LINE>public Response generateApiKey(@ApiParam(value = "The UUID of the team to generate a key for", required = true) @PathParam("uuid") String uuid) {<NEW_LINE>try (QueryManager qm = new QueryManager()) {<NEW_LINE>final Team team = qm.getObjectByUuid(Team.class, uuid);<NEW_LINE>if (team != null) {<NEW_LINE>final ApiKey <MASK><NEW_LINE>return Response.status(Response.Status.CREATED).entity(apiKey).build();<NEW_LINE>} else {<NEW_LINE>return Response.status(Response.Status.NOT_FOUND).entity("The team could not be found.").build();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
apiKey = qm.createApiKey(team);
1,289,848
private Collection<? extends GradleActionsProvider> providers() {<NEW_LINE>if (providers != null) {<NEW_LINE>return providers.allInstances();<NEW_LINE>}<NEW_LINE>LOG.log(Level.FINER, "Initializing providers lookup for: {0}", project);<NEW_LINE>Lookup combined = new ProxyLookup(Lookup.getDefault(), project.getLookup());<NEW_LINE>Lookup.Result<GradleActionsProvider> result = <MASK><NEW_LINE>Collection<? extends GradleActionsProvider> lst;<NEW_LINE>synchronized (this) {<NEW_LINE>if (providers != null) {<NEW_LINE>return providers.allInstances();<NEW_LINE>} else {<NEW_LINE>LOG.log(Level.FINER, "Attaching provider listener");<NEW_LINE>result.addLookupListener(new LookupListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void resultChanged(LookupEvent ev) {<NEW_LINE>synchronized (ConfigurableActionsProviderImpl.this) {<NEW_LINE>if (providers != result) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOG.log(Level.FINER, "Action providers change for {0}, refreshing", project);<NEW_LINE>refresh();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>lst = result.allInstances();<NEW_LINE>providers = result;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return lst;<NEW_LINE>}
combined.lookupResult(GradleActionsProvider.class);
718,472
public static void commentMonitors(List<Op03SimpleStatement> statements) {<NEW_LINE>List<Op03SimpleStatement> monitors = Functional.filter(statements, new TypeFilter<MonitorStatement>(MonitorStatement.class));<NEW_LINE>if (monitors.isEmpty())<NEW_LINE>return;<NEW_LINE>for (Op03SimpleStatement monitor : monitors) {<NEW_LINE>monitor.replaceStatement(new CommentStatement(monitor.getStatement()));<NEW_LINE>}<NEW_LINE>for (Op03SimpleStatement monitor : monitors) {<NEW_LINE>Op03SimpleStatement target = monitor.getTargets().get(0);<NEW_LINE>Set<BlockIdentifier> monitorLast = SetFactory.newSet(monitor.getBlockIdentifiers());<NEW_LINE>monitorLast.removeAll(target.getBlockIdentifiers());<NEW_LINE>if (monitorLast.isEmpty())<NEW_LINE>continue;<NEW_LINE>for (Op03SimpleStatement source : ListFactory.newList(monitor.getSources())) {<NEW_LINE>Set<BlockIdentifier<MASK><NEW_LINE>if (!sourceBlocks.containsAll(monitorLast)) {<NEW_LINE>source.replaceTarget(monitor, target);<NEW_LINE>monitor.removeSource(source);<NEW_LINE>target.addSource(source);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> sourceBlocks = source.getBlockIdentifiers();
627,715
private void _deleteDefinitionMetadata(@Nullable final List<QualifiedName> names) {<NEW_LINE>if (names != null && !names.isEmpty()) {<NEW_LINE>final SqlParameterValue[] aNames = names.stream().filter(name -> !name.isPartitionDefinition()).map(n -> new SqlParameterValue(Types.VARCHAR, n)).toArray(SqlParameterValue[]::new);<NEW_LINE>final SqlParameterValue[] aPartitionNames = names.stream().filter(QualifiedName::isPartitionDefinition).map(n -> new SqlParameterValue(Types.VARCHAR, n)).toArray(SqlParameterValue[]::new);<NEW_LINE>if (aNames.length > 0) {<NEW_LINE>final List<String> paramVariables = Arrays.stream(aNames).map(s -> "?").<MASK><NEW_LINE>jdbcTemplate.update(String.format(SQL.DELETE_DEFINITION_METADATA, Joiner.on(",").skipNulls().join(paramVariables)), (Object[]) aNames);<NEW_LINE>}<NEW_LINE>if (aPartitionNames.length > 0) {<NEW_LINE>final List<String> paramVariables = Arrays.stream(aPartitionNames).map(s -> "?").collect(Collectors.toList());<NEW_LINE>jdbcTemplate.update(String.format(SQL.DELETE_PARTITION_DEFINITION_METADATA, Joiner.on(",").skipNulls().join(paramVariables)), (Object[]) aPartitionNames);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
collect(Collectors.toList());
971,602
protected Map<String, Object> handleCommonTaskFields(TaskEntity task) {<NEW_LINE>Map<String, Object> data = new HashMap<>();<NEW_LINE>putInMapIfNotNull(data, Fields.ID, task.getId());<NEW_LINE>putInMapIfNotNull(data, Fields.NAME, task.getName());<NEW_LINE>putInMapIfNotNull(data, Fields.TASK_DEFINITION_KEY, task.getTaskDefinitionKey());<NEW_LINE>putInMapIfNotNull(data, Fields.DESCRIPTION, task.getDescription());<NEW_LINE>putInMapIfNotNull(data, Fields.ASSIGNEE, task.getAssignee());<NEW_LINE>putInMapIfNotNull(data, Fields.OWNER, task.getOwner());<NEW_LINE>putInMapIfNotNull(data, Fields.CATEGORY, task.getCategory());<NEW_LINE>putInMapIfNotNull(data, Fields.CREATE_TIME, task.getCreateTime());<NEW_LINE>putInMapIfNotNull(data, Fields.DUE_DATE, task.getDueDate());<NEW_LINE>putInMapIfNotNull(data, Fields.FORM_KEY, task.getFormKey());<NEW_LINE>putInMapIfNotNull(data, Fields.PRIORITY, task.getPriority());<NEW_LINE>putInMapIfNotNull(data, Fields.PROCESS_DEFINITION_ID, task.getProcessDefinitionId());<NEW_LINE>putInMapIfNotNull(data, Fields.PROCESS_INSTANCE_ID, task.getProcessInstanceId());<NEW_LINE>putInMapIfNotNull(data, Fields.EXECUTION_ID, task.getExecutionId());<NEW_LINE>if (task.getTenantId() != null && !ProcessEngineConfigurationImpl.NO_TENANT_ID.equals(task.getTenantId())) {<NEW_LINE>// Important for standalone tasks<NEW_LINE>putInMapIfNotNull(data, Fields.<MASK><NEW_LINE>}<NEW_LINE>return data;<NEW_LINE>}
TENANT_ID, task.getTenantId());
624,871
public static void deleteLifecycle(HandlerContext handlerCtx) {<NEW_LINE>List<Map<String, Object>> selectedList = (List<Map<String, Object>>) handlerCtx.getInputValue("selectedList");<NEW_LINE>String endpoint = <MASK><NEW_LINE>Map<String, Object> attrs = new HashMap<>();<NEW_LINE>try {<NEW_LINE>for (Map<String, Object> oneRow : selectedList) {<NEW_LINE>String name = (String) oneRow.get("name");<NEW_LINE>String encodedName = URLEncoder.encode(name, "UTF-8");<NEW_LINE>attrs.put("id", encodedName);<NEW_LINE>// delete all application-ref first<NEW_LINE>List<Map<String, Object>> appRefs = DeployUtil.getRefEndpoints(name, "application-ref");<NEW_LINE>for (Map<String, Object> oneRef : appRefs) {<NEW_LINE>attrs.put("target", oneRef.get("targetName"));<NEW_LINE>RestUtil.restRequest((String) oneRef.get("endpoint"), attrs, "DELETE", null, false);<NEW_LINE>}<NEW_LINE>attrs.put("target", "domain");<NEW_LINE>RestUtil.restRequest(endpoint, attrs, "POST", handlerCtx, false);<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>GuiUtil.prepareException(handlerCtx, ex);<NEW_LINE>}<NEW_LINE>}
GuiUtil.getSessionValue(REST_URL) + "/applications/application/delete-lifecycle-module";
115,829
final DeleteAccountCustomizationResult executeDeleteAccountCustomization(DeleteAccountCustomizationRequest deleteAccountCustomizationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAccountCustomizationRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteAccountCustomizationRequest> request = null;<NEW_LINE>Response<DeleteAccountCustomizationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteAccountCustomizationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAccountCustomizationRequest));<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, "QuickSight");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteAccountCustomization");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteAccountCustomizationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAccountCustomizationResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();
503,458
private Cell parseCellInfo(CellInfo info) {<NEW_LINE>try {<NEW_LINE>if (info instanceof CellInfoGsm) {<NEW_LINE>CellIdentityGsm identity = ((CellInfoGsm) info).getCellIdentity();<NEW_LINE>if (identity.getMcc() == Integer.MAX_VALUE)<NEW_LINE>return null;<NEW_LINE>CellSignalStrengthGsm strength = ((<MASK><NEW_LINE>return new Cell(Cell.CellType.GSM, identity.getMcc(), identity.getMnc(), identity.getLac(), identity.getCid(), -1, strength.getDbm());<NEW_LINE>} else if (info instanceof CellInfoCdma) {<NEW_LINE>CellIdentityCdma identity = ((CellInfoCdma) info).getCellIdentity();<NEW_LINE>CellSignalStrengthCdma strength = ((CellInfoCdma) info).getCellSignalStrength();<NEW_LINE>return new Cell(Cell.CellType.CDMA, getMcc(), identity.getSystemId(), identity.getNetworkId(), identity.getBasestationId(), -1, strength.getDbm());<NEW_LINE>} else {<NEW_LINE>return parceCellInfo18(info);<NEW_LINE>}<NEW_LINE>} catch (Exception ignored) {<NEW_LINE>Log.d(TAG, "Failed to parse cell info " + info, ignored);<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
CellInfoGsm) info).getCellSignalStrength();
636,234
public // todo: add IP?<NEW_LINE>void // todo: add IP?<NEW_LINE>updateProjectPermission(// todo: add IP?<NEW_LINE>final Project project, // todo: add IP?<NEW_LINE>final String name, // todo: add IP?<NEW_LINE>final Permission perm, // todo: add IP?<NEW_LINE>final boolean group, final User modifier) throws ProjectManagerException {<NEW_LINE>logger.info("User {} updating permissions for project {} for {} {}", modifier.getUserId(), project.getName(), name, perm.toString());<NEW_LINE>final Map<String, Object> eventData = new HashMap<>();<NEW_LINE>addEventDataFromProject(project, eventData);<NEW_LINE>eventData.put("modifiedBy", modifier.getUserId());<NEW_LINE>eventData.put("permission", perm.toString());<NEW_LINE>azkaban.spi.EventType eventType = azkaban.spi.EventType.USER_PERMISSION_CHANGED;<NEW_LINE>if (group) {<NEW_LINE><MASK><NEW_LINE>eventData.put("updatedGroup", name);<NEW_LINE>eventType = azkaban.spi.EventType.GROUP_PERMISSION_CHANGED;<NEW_LINE>} else {<NEW_LINE>eventData.put("updatedUser", name);<NEW_LINE>eventData.put("updatedGroup", "null");<NEW_LINE>}<NEW_LINE>// Getting updated user and Group permissions as String<NEW_LINE>final Map<String, String> updatedUserPermissionMap = new HashMap<>(project.getUserPermissions().size());<NEW_LINE>final Map<String, String> updatedGroupPermissionMap = new HashMap<>(project.getGroupPermissions().size());<NEW_LINE>project.getUserPermissions().forEach(el -> updatedUserPermissionMap.put(el.getFirst(), el.getSecond().toString()));<NEW_LINE>project.getGroupPermissions().forEach(el -> updatedGroupPermissionMap.put(el.getFirst(), el.getSecond().toString()));<NEW_LINE>String userPermissionMapAsString = Joiner.on(":").withKeyValueSeparator("=").join(updatedUserPermissionMap);<NEW_LINE>String groupPermissionMapAsString = Joiner.on(":").withKeyValueSeparator("=").join(updatedGroupPermissionMap);<NEW_LINE>eventData.put("updatedUserPermissions", userPermissionMapAsString);<NEW_LINE>eventData.put("updatedGroupPermissions", groupPermissionMapAsString);<NEW_LINE>String errorMessage = null;<NEW_LINE>try {<NEW_LINE>this.projectLoader.updatePermission(project, name, perm, group);<NEW_LINE>if (group) {<NEW_LINE>this.projectLoader.postEvent(project, EventType.GROUP_PERMISSION, modifier.getUserId(), "Permission for group " + name + " set to " + perm.toString());<NEW_LINE>} else {<NEW_LINE>this.projectLoader.postEvent(project, EventType.USER_PERMISSION, modifier.getUserId(), "Permission for user " + name + " set to " + perm.toString());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>errorMessage = e.toString();<NEW_LINE>throw e;<NEW_LINE>} finally {<NEW_LINE>setProjectEventStatus(errorMessage, eventData);<NEW_LINE>// Fire Azkaban event listener<NEW_LINE>project.fireEventListeners(ProjectEvent.create(project, eventType, eventData));<NEW_LINE>}<NEW_LINE>}
eventData.put("updatedUser", "null");
1,271,036
public Integer call() throws Exception {<NEW_LINE>try {<NEW_LINE>output.debug("Creating a new project with initial parameters: %s", this);<NEW_LINE>output.throwIfUnmatchedArguments(spec.commandLine());<NEW_LINE>setSingleProjectGAV(gav);<NEW_LINE>setTestOutputDirectory(output.getTestDirectory());<NEW_LINE>if (checkProjectRootAlreadyExists(runMode.isDryRun())) {<NEW_LINE>return CommandLine.ExitCode.USAGE;<NEW_LINE>}<NEW_LINE>BuildTool buildTool = targetBuildTool.getBuildTool(BuildTool.MAVEN);<NEW_LINE>SourceType sourceType = targetLanguage.getSourceType(spec, buildTool, extensions, output);<NEW_LINE>setJavaVersion(targetLanguage.getJavaVersion());<NEW_LINE>setSourceTypeExtensions(extensions, sourceType);<NEW_LINE>setCodegenOptions(codeGeneration);<NEW_LINE>QuarkusCommandInvocation invocation = build(buildTool, targetQuarkusVersion, propertiesOptions.properties, extensions);<NEW_LINE>boolean success = true;<NEW_LINE>if (runMode.isDryRun()) {<NEW_LINE>dryRun(buildTool, invocation, output);<NEW_LINE>} else if (buildTool == BuildTool.JBANG) {<NEW_LINE>success = new CreateJBangProjectCommandHandler().<MASK><NEW_LINE>} else {<NEW_LINE>// maven or gradle<NEW_LINE>success = new CreateProjectCommandHandler().execute(invocation).isSuccess();<NEW_LINE>}<NEW_LINE>if (success) {<NEW_LINE>if (!runMode.isDryRun()) {<NEW_LINE>output.info("Navigate into this directory and get started: " + spec.root().qualifiedName() + " dev");<NEW_LINE>}<NEW_LINE>return CommandLine.ExitCode.OK;<NEW_LINE>}<NEW_LINE>return CommandLine.ExitCode.SOFTWARE;<NEW_LINE>} catch (Exception e) {<NEW_LINE>return output.handleCommandException(e, "Unable to create project: " + e.getMessage());<NEW_LINE>}<NEW_LINE>}
execute(invocation).isSuccess();
483,712
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>Dialog res = super.onCreateDialog(savedInstanceState);<NEW_LINE>res.requestWindowFeature(Window.FEATURE_NO_TITLE);<NEW_LINE>View content = View.inflate(getActivity(), R.layout.fragment_storage_permissions, null);<NEW_LINE>res.setContentView(content);<NEW_LINE>TextView acceptBtn = content.findViewById(R.id.accept_btn);<NEW_LINE>acceptBtn.setOnClickListener(this);<NEW_LINE>acceptBtn.setText(R.string.settings);<NEW_LINE>TextView declineBtn = content.findViewById(R.id.decline_btn);<NEW_LINE>declineBtn.setOnClickListener(this);<NEW_LINE>declineBtn.setText(R.string.back);<NEW_LINE>ImageView image = (ImageView) content.findViewById(R.id.iv__image);<NEW_LINE>image.setImageResource(R.drawable.img_no_storage_permission);<NEW_LINE>TextView title = (TextView) content.<MASK><NEW_LINE>title.setText(R.string.onboarding_storage_permissions_title);<NEW_LINE>TextView subtitle = (TextView) content.findViewById(R.id.tv__subtitle1);<NEW_LINE>subtitle.setText(R.string.onboarding_storage_permissions_message);<NEW_LINE>return res;<NEW_LINE>}
findViewById(R.id.tv__title);
224,020
public static void registerClassDesiredAssertionStatusPlugin(InvocationPlugins plugins, SnippetReflectionProvider snippetReflection) {<NEW_LINE>Registration r = new Registration(plugins, Class.class);<NEW_LINE>r.register(new RequiredInvocationPlugin("desiredAssertionStatus", Receiver.class) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean apply(GraphBuilderContext b, ResolvedJavaMethod targetMethod, Receiver receiver) {<NEW_LINE>JavaConstant constantReceiver = receiver.get().asJavaConstant();<NEW_LINE>if (constantReceiver != null && constantReceiver.isNonNull()) {<NEW_LINE>Object clazzOrHub = snippetReflection.asObject(Object.class, constantReceiver);<NEW_LINE>boolean desiredAssertionStatus;<NEW_LINE>if (clazzOrHub instanceof Class) {<NEW_LINE>desiredAssertionStatus = RuntimeAssertionsSupport.singleton().desiredAssertionStatus((Class<?>) clazzOrHub);<NEW_LINE>} else if (clazzOrHub instanceof DynamicHub) {<NEW_LINE>desiredAssertionStatus = ((DynamicHub) clazzOrHub).desiredAssertionStatus();<NEW_LINE>} else {<NEW_LINE>throw VMError.shouldNotReachHere("Unexpected class object: " + clazzOrHub);<NEW_LINE>}<NEW_LINE>b.addPush(JavaKind.Boolean<MASK><NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
, ConstantNode.forBoolean(desiredAssertionStatus));
1,707,554
Optional<Long> readFileAttributeAsLong(Path file, String attribute, UserDefinedFileAttributeView view, List<String> knownAttributes) {<NEW_LINE>if (knownAttributes.contains(attribute)) {<NEW_LINE>try {<NEW_LINE>LOG.trace("Attempting to read attribute {}, from file {}", attribute, file);<NEW_LINE>ByteBuffer buf = ByteBuffer.allocate(view.size(attribute));<NEW_LINE>view.read(attribute, buf);<NEW_LINE>buf.flip();<NEW_LINE>String value = Charset.defaultCharset().decode(buf).toString();<NEW_LINE>if (Strings.isNullOrEmpty(value)) {<NEW_LINE>LOG.<MASK><NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>return Optional.of(Long.parseLong(value));<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Error getting extra file metadata for {}", file, e);<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>}
debug("No attrbiute {} found for file {}", attribute, file);
1,842,490
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller != null) {<NEW_LINE>Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, 5));<NEW_LINE>if (!cards.isEmpty()) {<NEW_LINE>FilterCard filterPutInHand = new FilterCard("creature or enchantment card to put in hand");<NEW_LINE>filterPutInHand.add(Predicates.or(CardType.CREATURE.getPredicate(), CardType.ENCHANTMENT.getPredicate()));<NEW_LINE>controller.revealCards(source, cards, game);<NEW_LINE>if (cards.count(filterPutInHand, source.getControllerId(), source, game) > 0) {<NEW_LINE>TargetCard target = new TargetCard(0, 1, Zone.LIBRARY, filterPutInHand);<NEW_LINE>if (controller.choose(Outcome.DrawCard, cards, target, game)) {<NEW_LINE>Card card = game.getCard(target.getFirstTarget());<NEW_LINE>if (card != null) {<NEW_LINE>cards.remove(card);<NEW_LINE>controller.moveCards(card, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>controller.moveCards(cards, Zone.GRAVEYARD, source, game);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
Zone.HAND, source, game);
953,831
private RefactoringStatus initialize(JavaRefactoringArguments arguments) {<NEW_LINE>final String selection = arguments.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_SELECTION);<NEW_LINE>if (selection != null) {<NEW_LINE>int offset = -1;<NEW_LINE>int length = -1;<NEW_LINE>final StringTokenizer tokenizer = new StringTokenizer(selection);<NEW_LINE>if (tokenizer.hasMoreTokens()) {<NEW_LINE>offset = Integer.valueOf(tokenizer.nextToken()).intValue();<NEW_LINE>}<NEW_LINE>if (tokenizer.hasMoreTokens()) {<NEW_LINE>length = Integer.valueOf(tokenizer.nextToken()).intValue();<NEW_LINE>}<NEW_LINE>if (offset >= 0 && length >= 0) {<NEW_LINE>fSelectionStart = offset;<NEW_LINE>fSelectionLength = length;<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_illegal_argument, new Object[] { selection, JavaRefactoringDescriptorUtil.ATTRIBUTE_SELECTION }));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_SELECTION));<NEW_LINE>}<NEW_LINE>final String handle = arguments.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT);<NEW_LINE>if (handle != null) {<NEW_LINE>final IJavaElement element = JavaRefactoringDescriptorUtil.handleToElement(arguments.getProject(), handle, false);<NEW_LINE>if (element == null || !element.exists() || element.getElementType() != IJavaElement.COMPILATION_UNIT) {<NEW_LINE>return JavaRefactoringDescriptorUtil.createInputFatalStatus(element, getName(), IJavaRefactorings.EXTRACT_CONSTANT);<NEW_LINE>} else {<NEW_LINE>fCu = (ICompilationUnit) element;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_INPUT));<NEW_LINE>}<NEW_LINE>final String visibility = arguments.getAttribute(ATTRIBUTE_VISIBILITY);<NEW_LINE>if (visibility != null && !"".equals(visibility)) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>int flag = 0;<NEW_LINE>try {<NEW_LINE>flag = Integer.parseInt(visibility);<NEW_LINE>} catch (NumberFormatException exception) {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_VISIBILITY));<NEW_LINE>}<NEW_LINE>fVisibility = JdtFlags.getVisibilityString(flag);<NEW_LINE>}<NEW_LINE>final String name = arguments.getAttribute(JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME);<NEW_LINE>if (name != null && !"".equals(name)) {<NEW_LINE>fConstantName = name;<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, JavaRefactoringDescriptorUtil.ATTRIBUTE_NAME));<NEW_LINE>}<NEW_LINE>final String replace = arguments.getAttribute(ATTRIBUTE_REPLACE);<NEW_LINE>if (replace != null) {<NEW_LINE>fReplaceAllOccurrences = Boolean.valueOf(replace).booleanValue();<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_REPLACE));<NEW_LINE>}<NEW_LINE>final String declareFinal = arguments.getAttribute(ATTRIBUTE_QUALIFY);<NEW_LINE>if (declareFinal != null) {<NEW_LINE>fQualifyReferencesWithDeclaringClassName = Boolean.valueOf(declareFinal).booleanValue();<NEW_LINE>} else {<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(Messages.format<MASK><NEW_LINE>}<NEW_LINE>return new RefactoringStatus();<NEW_LINE>}
(RefactoringCoreMessages.InitializableRefactoring_argument_not_exist, ATTRIBUTE_QUALIFY));
1,761,228
private void writeParent(Parent parent, String tagName, XmlSerializer serializer) throws java.io.IOException {<NEW_LINE>serializer.startTag(NAMESPACE, tagName);<NEW_LINE>flush(serializer);<NEW_LINE>StringBuffer b = b(serializer);<NEW_LINE>int start = b.length();<NEW_LINE>if (parent.getGroupId() != null) {<NEW_LINE>writeValue(serializer, "groupId", parent.getGroupId(), parent);<NEW_LINE>}<NEW_LINE>if (parent.getArtifactId() != null) {<NEW_LINE>writeValue(serializer, "artifactId", parent.getArtifactId(), parent);<NEW_LINE>}<NEW_LINE>if (parent.getVersion() != null) {<NEW_LINE>writeValue(serializer, "version", <MASK><NEW_LINE>}<NEW_LINE>if ((parent.getRelativePath() != null) && !parent.getRelativePath().equals("../pom.xml")) {<NEW_LINE>writeValue(serializer, "relativePath", parent.getRelativePath(), parent);<NEW_LINE>}<NEW_LINE>serializer.endTag(NAMESPACE, tagName).flush();<NEW_LINE>logLocation(parent, "", start, b.length());<NEW_LINE>}
parent.getVersion(), parent);
510,166
public void decryptAndDecompressRecord(AbstractRecord record) {<NEW_LINE>if (record instanceof Record) {<NEW_LINE>if (!tlsContext.getChooser().getSelectedProtocolVersion().isTLS13() || (tlsContext.getChooser().getSelectedProtocolVersion().isTLS13() && record.getContentMessageType() == ProtocolMessageType.APPLICATION_DATA)) {<NEW_LINE>decryptor.decrypt(record);<NEW_LINE>decompressor.decompress(record);<NEW_LINE>((Record) record).getComputations().<MASK><NEW_LINE>} else {<NEW_LINE>// Do not decrypt the record<NEW_LINE>record.prepareComputations();<NEW_LINE>((Record) record).setSequenceNumber(BigInteger.valueOf(tlsContext.getReadSequenceNumber()));<NEW_LINE>byte[] protocolMessageBytes = record.getProtocolMessageBytes().getValue();<NEW_LINE>record.setCleanProtocolMessageBytes(protocolMessageBytes);<NEW_LINE>// tlsContext.increaseReadSequenceNumber();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>LOGGER.warn("Decrypting received non Record:" + record.toString());<NEW_LINE>decryptor.decrypt(record);<NEW_LINE>decompressor.decompress(record);<NEW_LINE>}<NEW_LINE>}
setUsedTls13KeySetType(tlsContext.getActiveKeySetTypeRead());
813,318
private void onTableChange(@Nonnull TableModelEvent e) {<NEW_LINE>final int signum;<NEW_LINE>switch(e.getType()) {<NEW_LINE>case TableModelEvent.INSERT:<NEW_LINE>signum = 1;<NEW_LINE>break;<NEW_LINE>case TableModelEvent.DELETE:<NEW_LINE>signum = -1;<NEW_LINE>for (int i = e.getLastRow(); i >= e.getFirstRow(); i--) {<NEW_LINE>myComponents.remove(i);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int shift = Math.abs(e.getFirstRow() - e.<MASK><NEW_LINE>myComponents.shiftKeys(e.getFirstRow(), shift);<NEW_LINE>if (myRowUnderMouse >= e.getFirstRow()) {<NEW_LINE>myRowUnderMouse = -1;<NEW_LINE>}<NEW_LINE>if (getModel().getSize() > 0) {<NEW_LINE>repaintRows(0, getModel().getSize() - 1, false);<NEW_LINE>}<NEW_LINE>}
getLastRow() + 1) * signum;
792,730
public static void interleavedToBuffered(InterleavedU8 src, DataBufferInt buffer, WritableRaster dst) {<NEW_LINE>if (src.getNumBands() != dst.getNumBands())<NEW_LINE>throw new IllegalArgumentException("Unequal number of bands src = " + src.getNumBands() + " dst = " + dst.getNumBands());<NEW_LINE>final int[] dstData = buffer.getData();<NEW_LINE>final int numBands = dst.getNumBands();<NEW_LINE>int dstStride = stride(dst);<NEW_LINE>int dstOffset = getOffset(dst);<NEW_LINE>if (numBands == 3) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, src.height, y -> {<NEW_LINE>for (int y = 0; y < src.height; y++) {<NEW_LINE>int indexSrc = src.startIndex + y * src.stride;<NEW_LINE>int indexDst = dstOffset + y * dstStride;<NEW_LINE>for (int x = 0; x < src.width; x++) {<NEW_LINE>int c1 = src.data[indexSrc++] & 0xFF;<NEW_LINE>int c2 = src.data[indexSrc++] & 0xFF;<NEW_LINE>int c3 = src<MASK><NEW_LINE>dstData[indexDst++] = c1 << 16 | c2 << 8 | c3;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>} else if (numBands == 4) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, src.height, y -> {<NEW_LINE>for (int y = 0; y < src.height; y++) {<NEW_LINE>int indexSrc = src.startIndex + y * src.stride;<NEW_LINE>int indexDst = dstOffset + y * dstStride;<NEW_LINE>for (int x = 0; x < src.width; x++) {<NEW_LINE>int c1 = src.data[indexSrc++] & 0xFF;<NEW_LINE>int c2 = src.data[indexSrc++] & 0xFF;<NEW_LINE>int c3 = src.data[indexSrc++] & 0xFF;<NEW_LINE>int c4 = src.data[indexSrc++] & 0xFF;<NEW_LINE>dstData[indexDst++] = c1 << 24 | c2 << 16 | c3 << 8 | c4;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>} else {<NEW_LINE>throw new RuntimeException("Code more here");<NEW_LINE>}<NEW_LINE>}
.data[indexSrc++] & 0xFF;
577,095
public void add(String groupKey, Object result) {<NEW_LINE>Comparable newKey = _aggregationFunction.extractFinalResult(result);<NEW_LINE>ImmutablePair<String, Object> groupKeyResultPair = new ImmutablePair<>(groupKey, result);<NEW_LINE>List<ImmutablePair<String, Object>> groupKeyResultPairs = _treeMap.get(newKey);<NEW_LINE>if (_numValuesAdded >= _trimSize) {<NEW_LINE>// Check whether the pair should be added<NEW_LINE>Map.Entry<Comparable, List<ImmutablePair<String, Object>><MASK><NEW_LINE>Comparable maxKey = maxEntry.getKey();<NEW_LINE>if (_comparator.compare(newKey, maxKey) < 0) {<NEW_LINE>// Add the pair into list of pairs<NEW_LINE>if (groupKeyResultPairs == null) {<NEW_LINE>groupKeyResultPairs = new ArrayList<>();<NEW_LINE>_treeMap.put(newKey, groupKeyResultPairs);<NEW_LINE>}<NEW_LINE>groupKeyResultPairs.add(groupKeyResultPair);<NEW_LINE>_numValuesAdded++;<NEW_LINE>// Check if the max key can be removed<NEW_LINE>if (maxEntry.getValue().size() + _trimSize == _numValuesAdded) {<NEW_LINE>_treeMap.remove(maxKey);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Pair should be added<NEW_LINE>if (groupKeyResultPairs == null) {<NEW_LINE>groupKeyResultPairs = new ArrayList<>();<NEW_LINE>_treeMap.put(newKey, groupKeyResultPairs);<NEW_LINE>}<NEW_LINE>groupKeyResultPairs.add(groupKeyResultPair);<NEW_LINE>_numValuesAdded++;<NEW_LINE>}<NEW_LINE>}
> maxEntry = _treeMap.lastEntry();
958,851
public void addHistoricTaskLogEntry(TaskInfo task, String logEntryType, String data) {<NEW_LINE>if (this.configuration.isEnableHistoricTaskLogging()) {<NEW_LINE>HistoricTaskLogEntryEntity taskLogEntry = getHistoricTaskLogEntryEntityManager().create();<NEW_LINE>taskLogEntry.setTaskId(task.getId());<NEW_LINE>taskLogEntry.setExecutionId(task.getExecutionId());<NEW_LINE>taskLogEntry.<MASK><NEW_LINE>taskLogEntry.setProcessDefinitionId(task.getProcessDefinitionId());<NEW_LINE>taskLogEntry.setScopeId(task.getScopeId());<NEW_LINE>taskLogEntry.setScopeDefinitionId(task.getScopeDefinitionId());<NEW_LINE>taskLogEntry.setScopeType(task.getScopeType());<NEW_LINE>taskLogEntry.setSubScopeId(task.getSubScopeId());<NEW_LINE>taskLogEntry.setTimeStamp(this.configuration.getClock().getCurrentTime());<NEW_LINE>taskLogEntry.setType(logEntryType);<NEW_LINE>taskLogEntry.setData(data);<NEW_LINE>taskLogEntry.setUserId(Authentication.getAuthenticatedUserId());<NEW_LINE>getHistoricTaskLogEntryEntityManager().insert(taskLogEntry);<NEW_LINE>}<NEW_LINE>}
setProcessInstanceId(task.getProcessInstanceId());
1,840,699
public Attributes createFileMetaInformation(String iuid, String cuid, String tsuid) {<NEW_LINE><MASK><NEW_LINE>fmi.setBytes(Tag.FileMetaInformationVersion, VR.OB, new byte[] { 0, 1 });<NEW_LINE>fmi.setString(Tag.MediaStorageSOPClassUID, VR.UI, cuid);<NEW_LINE>fmi.setString(Tag.MediaStorageSOPInstanceUID, VR.UI, iuid);<NEW_LINE>fmi.setString(Tag.TransferSyntaxUID, VR.UI, tsuid);<NEW_LINE>fmi.setString(Tag.ImplementationClassUID, VR.UI, getRemoteImplClassUID());<NEW_LINE>String versionName = getRemoteImplVersionName();<NEW_LINE>if (versionName != null)<NEW_LINE>fmi.setString(Tag.ImplementationVersionName, VR.SH, versionName);<NEW_LINE>fmi.setString(Tag.SourceApplicationEntityTitle, VR.AE, getRemoteAET());<NEW_LINE>return fmi;<NEW_LINE>}
Attributes fmi = new Attributes(7);
449,829
public final Iterator<V> valuesIterator() {<NEW_LINE>return new Iterator<V>() {<NEW_LINE><NEW_LINE>private final Iterator<CacheEntry<K, V>> iterator = cache<MASK><NEW_LINE><NEW_LINE>private volatile boolean hasNextCalled;<NEW_LINE><NEW_LINE>private volatile CacheEntry<K, V> nextEntry;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>if (!hasNextCalled) {<NEW_LINE>nextEntry = null;<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>CacheEntry<K, V> entry = iterator.next();<NEW_LINE>nextEntry = entry;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>hasNextCalled = true;<NEW_LINE>}<NEW_LINE>return nextEntry != null;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public V next() {<NEW_LINE>hasNext();<NEW_LINE>hasNextCalled = false;<NEW_LINE>if (nextEntry == null) {<NEW_LINE>throw new NoSuchElementException();<NEW_LINE>}<NEW_LINE>return nextEntry.value;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void remove() {<NEW_LINE>if (nextEntry == null || hasNextCalled) {<NEW_LINE>throw new IllegalStateException("next() must be called before remove()!");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>lock.writeLock().lock();<NEW_LINE>iterator.remove();<NEW_LINE>nextEntry.remove();<NEW_LINE>} finally {<NEW_LINE>lock.writeLock().unlock();<NEW_LINE>}<NEW_LINE>nextEntry = null;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
.values().iterator();
773,915
private static int readHeaderBuffer(BytesReference headerBuffer) throws IOException {<NEW_LINE>if (headerBuffer.get(0) != 'E' || headerBuffer.get(1) != 'S') {<NEW_LINE>if (appearsToBeHTTPRequest(headerBuffer)) {<NEW_LINE>throw new HttpRequestOnTransportException("This is not a HTTP port");<NEW_LINE>}<NEW_LINE>if (appearsToBeHTTPResponse(headerBuffer)) {<NEW_LINE>throw new StreamCorruptedException("received HTTP response on transport port, ensure that transport port (not " + "HTTP port) of a remote node is specified in the configuration");<NEW_LINE>}<NEW_LINE>String firstBytes = "(" + Integer.toHexString(headerBuffer.get(0) & 0xFF) + "," + Integer.toHexString(headerBuffer.get(1) & 0xFF) + "," + Integer.toHexString(headerBuffer.get(2) & 0xFF) + "," + Integer.toHexString(headerBuffer.get(3) & 0xFF) + ")";<NEW_LINE>if (appearsToBeTLS(headerBuffer)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>throw new StreamCorruptedException("invalid internal transport message format, got " + firstBytes);<NEW_LINE>}<NEW_LINE>final int messageLength = headerBuffer.getInt(TcpHeader.MARKER_BYTES_SIZE);<NEW_LINE>if (messageLength == TransportKeepAlive.PING_DATA_SIZE) {<NEW_LINE>// This is a ping<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>if (messageLength <= 0) {<NEW_LINE>throw new StreamCorruptedException("invalid data length: " + messageLength);<NEW_LINE>}<NEW_LINE>if (messageLength > THIRTY_PER_HEAP_SIZE) {<NEW_LINE>throw new IllegalArgumentException("transport content length received [" + new ByteSizeValue(messageLength) + "] exceeded [" + new ByteSizeValue(THIRTY_PER_HEAP_SIZE) + "]");<NEW_LINE>}<NEW_LINE>return messageLength;<NEW_LINE>}
throw new StreamCorruptedException("SSL/TLS request received but SSL/TLS is not enabled on this node, got " + firstBytes);
1,288,583
public static void main(String[] args) {<NEW_LINE>CharsetDecoder dec = Charset.forName("UTF-8").newDecoder();<NEW_LINE>dec.onMalformedInput(CodingErrorAction.REPORT);<NEW_LINE>dec.onUnmappableCharacter(CodingErrorAction.REPORT);<NEW_LINE>byte[] bytes = { (byte) 0xF0, (byte) 0x9D, (byte) 0x80, (byte) 0x80 };<NEW_LINE>byte[] bytes2 = { (byte) 0xB8, (byte) 0x80, 0x63, 0x64, 0x65 };<NEW_LINE>ByteBuffer byteBuf = ByteBuffer.wrap(bytes);<NEW_LINE>ByteBuffer byteBuf2 = ByteBuffer.wrap(bytes2);<NEW_LINE>char[] chars = new char[1];<NEW_LINE>CharBuffer charBuf = CharBuffer.wrap(chars);<NEW_LINE>CoderResult cr = dec.decode(byteBuf, charBuf, false);<NEW_LINE>System.out.println(cr);<NEW_LINE><MASK><NEW_LINE>// byteBuf.get();<NEW_LINE>cr = dec.decode(byteBuf2, charBuf, false);<NEW_LINE>System.out.println(cr);<NEW_LINE>System.out.println(byteBuf2);<NEW_LINE>}
System.out.println(byteBuf);
1,311,582
@Path("{name}")<NEW_LINE>@POST<NEW_LINE>@Consumes(APPLICATION_JSON)<NEW_LINE>public Response createOrUpdateSecret(@Auth AutomationClient automationClient, @PathParam("name") String name, @Valid CreateOrUpdateSecretRequestV2 request) {<NEW_LINE>SecretBuilder builder = secretController.builder(name, request.content(), automationClient.getName(), request.expiry()).withDescription(request.description()).withMetadata(request.metadata()).withType(request.type());<NEW_LINE>builder.createOrUpdate();<NEW_LINE>Map<String, String> extraInfo = new HashMap<>();<NEW_LINE>if (request.description() != null) {<NEW_LINE>extraInfo.put("description", request.description());<NEW_LINE>}<NEW_LINE>if (request.metadata() != null) {<NEW_LINE>extraInfo.put("metadata", request.metadata().toString());<NEW_LINE>}<NEW_LINE>extraInfo.put("expiry", Long.toString(request.expiry()));<NEW_LINE>auditLog.recordEvent(new Event(Instant.now(), EventTag.SECRET_CREATEORUPDATE, automationClient.getName(), name, extraInfo));<NEW_LINE>UriBuilder uriBuilder = UriBuilder.fromResource(SecretResource<MASK><NEW_LINE>return Response.created(uriBuilder.build()).build();<NEW_LINE>}
.class).path(name);
47,320
private void rescanIconPacks() {<NEW_LINE>_iconPacks.clear();<NEW_LINE>File[] dirs = _iconsBaseDir.listFiles();<NEW_LINE>if (dirs == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (File dir : dirs) {<NEW_LINE>if (!dir.isDirectory()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>UUID uuid;<NEW_LINE>try {<NEW_LINE>uuid = UUID.fromString(dir.getName());<NEW_LINE>} catch (IllegalArgumentException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>File versionDir = getLatestVersionDir(dir);<NEW_LINE>if (versionDir != null) {<NEW_LINE>IconPack pack;<NEW_LINE>try (FileInputStream inStream = new FileInputStream(new File(versionDir, _packDefFilename))) {<NEW_LINE>byte[] <MASK><NEW_LINE>pack = IconPack.fromBytes(bytes);<NEW_LINE>pack.setDirectory(versionDir);<NEW_LINE>} catch (JSONException | IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (IconPack.Icon icon : pack.getIcons()) {<NEW_LINE>icon.setFile(new File(versionDir, icon.getRelativeFilename()));<NEW_LINE>}<NEW_LINE>// do a sanity check on the UUID and version<NEW_LINE>if (pack.getUUID().equals(uuid) && pack.getVersion() == Integer.parseInt(versionDir.getName())) {<NEW_LINE>_iconPacks.add(pack);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
bytes = IOUtils.readAll(inStream);
398,657
public Builder mergeFrom(org.mlflow.api.proto.MlflowArtifacts.ListArtifacts.Response other) {<NEW_LINE>if (other == org.mlflow.api.proto.MlflowArtifacts.ListArtifacts.Response.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (filesBuilder_ == null) {<NEW_LINE>if (!other.files_.isEmpty()) {<NEW_LINE>if (files_.isEmpty()) {<NEW_LINE>files_ = other.files_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>} else {<NEW_LINE>ensureFilesIsMutable();<NEW_LINE>files_.addAll(other.files_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.files_.isEmpty()) {<NEW_LINE>if (filesBuilder_.isEmpty()) {<NEW_LINE>filesBuilder_.dispose();<NEW_LINE>filesBuilder_ = null;<NEW_LINE>files_ = other.files_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>filesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFilesFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
filesBuilder_.addAllMessages(other.files_);
1,329,083
private void performRequest(AsyncCallback<Boolean> callback) {<NEW_LINE>xhr.setOnReadyStateChange(() -> {<NEW_LINE>if (xhr.getReadyState() != XMLHttpRequest.DONE) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>responseCode = xhr.getStatus();<NEW_LINE>responseMessage = xhr.getStatusText();<NEW_LINE>if (responseCode == 0) {<NEW_LINE>responseCode = -1;<NEW_LINE>}<NEW_LINE>Int8Array array = Int8Array.create((ArrayBuffer) xhr.getResponse());<NEW_LINE>byte[] bytes = new byte[array.getLength()];<NEW_LINE>for (int i = 0; i < bytes.length; ++i) {<NEW_LINE>bytes[i] = array.get(i);<NEW_LINE>}<NEW_LINE>ByteArrayInputStream stream = new ByteArrayInputStream(bytes);<NEW_LINE>parseHeaders(xhr.getAllResponseHeaders());<NEW_LINE>int responseGroup = responseCode / 100;<NEW_LINE>if (responseGroup == 4 || responseGroup == 5) {<NEW_LINE>errorStream = stream;<NEW_LINE>inputStream = null;<NEW_LINE>} else {<NEW_LINE>inputStream = stream;<NEW_LINE>errorStream = null;<NEW_LINE>}<NEW_LINE>callback.complete(Boolean.TRUE);<NEW_LINE>});<NEW_LINE>if (outputStream != null) {<NEW_LINE>byte[] bytes = outputStream.toByteArray();<NEW_LINE>Int8Array array = Int8Array.create(bytes.length);<NEW_LINE>for (int i = 0; i < bytes.length; ++i) {<NEW_LINE>array.set(i, bytes[i]);<NEW_LINE>}<NEW_LINE>xhr.<MASK><NEW_LINE>} else {<NEW_LINE>xhr.send();<NEW_LINE>}<NEW_LINE>}
send(array.getBuffer());
308,266
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {<NEW_LINE>// Using SQLiteQueryBuilder instead of query() method<NEW_LINE>SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder();<NEW_LINE>// Check if the caller has requested a column which does not exists<NEW_LINE>checkColumns(projection);<NEW_LINE>// Set the table<NEW_LINE>queryBuilder.setTables(CustomArtworkTable.TABLE_ARTIST_ART);<NEW_LINE>int uriType = sURIMatcher.match(uri);<NEW_LINE>switch(uriType) {<NEW_LINE>case CUSTOM_ARTWORK:<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>SQLiteDatabase db = database.getWritableDatabase();<NEW_LINE>Cursor cursor = queryBuilder.query(db, projection, selection, selectionArgs, null, null, sortOrder);<NEW_LINE>// Make sure that potential listeners are getting notified<NEW_LINE>cursor.setNotificationUri(getContext().getContentResolver(), uri);<NEW_LINE>return cursor;<NEW_LINE>}
throw new IllegalArgumentException("Unknown URI: " + uri);
307,747
private Mono<Response<Flux<ByteBuffer>>> createWithResponseAsync(String resourceGroupName, String monitorName, LogzMonitorResourceInner body, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (monitorName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter monitorName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (body != null) {<NEW_LINE>body.validate();<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = <MASK><NEW_LINE>return service.create(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, monitorName, this.client.getApiVersion(), body, accept, context);<NEW_LINE>}
this.client.mergeContext(context);
875,066
final DescribeHostsResult executeDescribeHosts(DescribeHostsRequest describeHostsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeHostsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeHostsRequest> request = null;<NEW_LINE>Response<DescribeHostsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeHostsRequestMarshaller().marshall(super.beforeMarshalling(describeHostsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeHosts");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeHostsResult> responseHandler = new StaxResponseHandler<DescribeHostsResult>(new DescribeHostsResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,082,586
public void secureResponse(Object serverAuthConfig, StreamingHandler implementor, SOAPMessageContext msgContext) {<NEW_LINE>if (serverAuthConfig != null) {<NEW_LINE>ServerAuthConfig config = (ServerAuthConfig) serverAuthConfig;<NEW_LINE>SOAPMessage reqmsg = (req.get() != null) ? req.get().get() : msgContext.getMessage();<NEW_LINE>try {<NEW_LINE>ServerAuthContext serverAuthContext = config.getAuthContext(implementor, reqmsg);<NEW_LINE>if (serverAuthContext != null) {<NEW_LINE>try {<NEW_LINE>WebServiceSecurity.secureResponse(msgContext, serverAuthContext);<NEW_LINE>} catch (AuthException ex) {<NEW_LINE>_logger.log(SEVERE, EXCEPTION_THROWN, ex);<NEW_LINE>throw new RuntimeException(ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (req.get() != null) {<NEW_LINE>req<MASK><NEW_LINE>req.set(null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.get().clear();
507,760
public ResultSetLoader makeTableLoader(CustomErrorContext errorContext, TupleMetadata readerSchema, long localLimit) {<NEW_LINE>ResultSetOptionBuilder options = new ResultSetOptionBuilder();<NEW_LINE>options.rowCountLimit(Math.min(readerBatchSize<MASK><NEW_LINE>options.vectorCache(scanOrchestrator.vectorCache);<NEW_LINE>options.batchSizeLimit(scanOrchestrator.options.scanBatchByteLimit);<NEW_LINE>options.errorContext(errorContext);<NEW_LINE>// Set up a selection list if available and is a subset of<NEW_LINE>// table columns. (Only needed for non-wildcard queries.)<NEW_LINE>// The projection list includes all candidate table columns<NEW_LINE>// whether or not they exist in the up-front schema. Handles<NEW_LINE>// the odd case where the reader claims a fixed schema, but<NEW_LINE>// adds a column later.<NEW_LINE>options.projectionFilter(scanOrchestrator.scanProj.readerProjection);<NEW_LINE>options.readerSchema(readerSchema);<NEW_LINE>if (limit < 0) {<NEW_LINE>limit = localLimit;<NEW_LINE>} else if (localLimit >= 0) {<NEW_LINE>limit = Math.min(localLimit, limit);<NEW_LINE>}<NEW_LINE>options.limit(limit);<NEW_LINE>// Create the table loader<NEW_LINE>tableLoader = new ResultSetLoaderImpl(scanOrchestrator.allocator, options.build());<NEW_LINE>return tableLoader;<NEW_LINE>}
, scanOrchestrator.options.scanBatchRecordLimit));
1,553,731
private void createOrSelectContentIfNeeded() {<NEW_LINE>ToolWindow toolWindow = getToolWindow(myVcs.getProject());<NEW_LINE>if (myRefresherI.isFirstTime()) {<NEW_LINE>ContentManager manager = toolWindow.getContentManager();<NEW_LINE>boolean selectedExistingContent = ContentUtilEx.selectContent(manager, myFileHistoryPanel, true);<NEW_LINE>if (!selectedExistingContent) {<NEW_LINE>String tabName = myPath.getName();<NEW_LINE>if (myStartingRevisionNumber != null) {<NEW_LINE>tabName += " (";<NEW_LINE>if (myStartingRevisionNumber instanceof ShortVcsRevisionNumber) {<NEW_LINE>tabName += ((<MASK><NEW_LINE>} else {<NEW_LINE>tabName += myStartingRevisionNumber.asString();<NEW_LINE>}<NEW_LINE>tabName += ")";<NEW_LINE>}<NEW_LINE>ContentUtilEx.addTabbedContent(manager, myFileHistoryPanel, "History", tabName, true);<NEW_LINE>}<NEW_LINE>toolWindow.activate(null);<NEW_LINE>}<NEW_LINE>}
ShortVcsRevisionNumber) myStartingRevisionNumber).toShortString();
506,868
public void findAndDisplayAppliedDataTypeAddresses(DataType dataType, FieldMatcher fieldMatcher) {<NEW_LINE>ProgramManager programManagerService = tool.getService(ProgramManager.class);<NEW_LINE>GoToService goToService = tool.getService(GoToService.class);<NEW_LINE>Program program = programManagerService.getCurrentProgram();<NEW_LINE>if (program == null) {<NEW_LINE>Msg.showInfo(this, null, "Find References To...", "You must have a program open in order to use the 'Find References To...' action");<NEW_LINE>// cannot find references to a data type if there is no open program<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ProgramLocation genericLocation;<NEW_LINE>if (fieldMatcher != null) {<NEW_LINE>genericLocation = new GenericCompositeDataTypeProgramLocation(program, dataType, fieldMatcher);<NEW_LINE>} else {<NEW_LINE>genericLocation = new GenericDataTypeProgramLocation(program, dataType);<NEW_LINE>}<NEW_LINE>LocationDescriptor locationDescriptor = getLocationDescriptor(genericLocation);<NEW_LINE>Navigatable navigatable = goToService.getDefaultNavigatable();<NEW_LINE>LocationReferencesProvider <MASK><NEW_LINE>showProvider(program, provider, locationDescriptor, navigatable);<NEW_LINE>}
provider = findProvider(locationDescriptor, navigatable);