idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,020,961
protected void start(HttpServletRequest request, HttpServletResponse response, Subject subject) throws Exception {<NEW_LINE><MASK><NEW_LINE>final String jobXMLName = request.getParameter("jobXMLName");<NEW_LINE>final Properties jobParams = new Properties();<NEW_LINE>String forceFailure = request.getParameter("force.failure");<NEW_LINE>if (forceFailure != null) {<NEW_LINE>jobParams.setProperty("force.failure", forceFailure);<NEW_LINE>}<NEW_LINE>JobInstance jobInstance = (JobInstance) WSSubject.doAs(subject, new PrivilegedExceptionAction<JobInstance>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public JobInstance run() throws Exception {<NEW_LINE>long execId = BatchRuntime.getJobOperator().start(jobXMLName, jobParams);<NEW_LINE>return BatchRuntime.getJobOperator().getJobInstance(execId);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>log("start", "jobInstance: " + jobInstance);<NEW_LINE>sendJsonResponse(response, toJsonObject(jobInstance));<NEW_LINE>}
JobOperator jobOperator = BatchRuntime.getJobOperator();
870,907
public void testRxFlowableInvoker_postReceiveTimeout(Map<String, String> param, StringBuilder ret) {<NEW_LINE>long timeout = messageTimeout;<NEW_LINE>if (isZOS()) {<NEW_LINE>timeout = zTimeout;<NEW_LINE>}<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>ClientBuilder cb = ClientBuilder.newBuilder();<NEW_LINE>// cb.property("com.ibm.ws.jaxrs.client.receive.timeout", TIMEOUT);<NEW_LINE>cb.readTimeout(TIMEOUT, TimeUnit.MILLISECONDS);<NEW_LINE>Client c = cb.build();<NEW_LINE>c.register(RxFlowableInvokerProvider.class);<NEW_LINE>WebTarget t = c.target("http://" + serverIP + ":" + serverPort + "/jaxrs21bookstore/JAXRS21bookstore2/post/" + SLEEP);<NEW_LINE>Builder builder = t.request();<NEW_LINE>Flowable<Response> flowable = builder.rx(RxFlowableInvoker.class).post(Entity.xml(Long.toString(SLEEP)));<NEW_LINE><MASK><NEW_LINE>final Holder<Response> holder = new Holder<Response>();<NEW_LINE>final CountDownLatch countDownLatch = new CountDownLatch(1);<NEW_LINE>flowable.subscribe(v -> {<NEW_LINE>// OnNext<NEW_LINE>holder.value = v;<NEW_LINE>}, throwable -> {<NEW_LINE>if (throwable.getMessage().contains("SocketTimeoutException")) {<NEW_LINE>// OnError<NEW_LINE>ret.append("Timeout as expected");<NEW_LINE>} else {<NEW_LINE>ret.append("throwable");<NEW_LINE>throwable.printStackTrace();<NEW_LINE>}<NEW_LINE>countDownLatch.countDown();<NEW_LINE>}, // OnCompleted<NEW_LINE>() -> ret.append("OnCompleted"));<NEW_LINE>try {<NEW_LINE>if (!(countDownLatch.await(timeout, TimeUnit.SECONDS))) {<NEW_LINE>throw new RuntimeException("testRxFlowableInvoker_postReceiveTimeout: Response took too long. Waited " + timeout);<NEW_LINE>}<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>long elapsed = System.currentTimeMillis() - startTime;<NEW_LINE>System.out.println("testRxFlowableInvoker_postReceiveTimeout with TIMEOUT " + TIMEOUT + " OnError elapsed time " + elapsed);<NEW_LINE>c.close();<NEW_LINE>}
long startTime = System.currentTimeMillis();
1,582,290
public static <T extends FATServlet> AssertionError simplify(Class<T> fatClass, String fatMethodName, AssertionError e) {<NEW_LINE>AssertionError assertionError = new AssertionError(fatClass.getSimpleName() + "." + fatMethodName + ": " + e.getMessage());<NEW_LINE>StackTraceElement[] originalStack = e.getStackTrace();<NEW_LINE>ArrayList<StackTraceElement> shortenedStack = new ArrayList<>();<NEW_LINE>for (StackTraceElement element : originalStack) {<NEW_LINE>String declaringClass = element.getClassName();<NEW_LINE>String methodName = element.getMethodName();<NEW_LINE>String fileName = element.getFileName();<NEW_LINE>int lineNumber = element.getLineNumber();<NEW_LINE>StackTraceElement newElement = new StackTraceElement(<MASK><NEW_LINE>shortenedStack.add(newElement);<NEW_LINE>// the stack beyond doGet is always the same so don't output any more<NEW_LINE>if ((FATServlet.class.getSimpleName() + ".java").equals(fileName) && DO_GET.equals(methodName)) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>assertionError.setStackTrace(shortenedStack.toArray(new StackTraceElement[shortenedStack.size()]));<NEW_LINE>return assertionError;<NEW_LINE>}
declaringClass, methodName, fileName, lineNumber);
922,625
final UpdateLoggerDefinitionResult executeUpdateLoggerDefinition(UpdateLoggerDefinitionRequest updateLoggerDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateLoggerDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<UpdateLoggerDefinitionRequest> request = null;<NEW_LINE>Response<UpdateLoggerDefinitionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateLoggerDefinitionRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateLoggerDefinitionRequest));<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, "Greengrass");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLoggerDefinition");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateLoggerDefinitionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateLoggerDefinitionResultJsonUnmarshaller());<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);
1,638,765
protected List<ValidationTaskResult> validateUfs() throws InterruptedException {<NEW_LINE>Map<String, String> validateOpts = ImmutableMap.of();<NEW_LINE>Map<String, String> desc = new ValidateEnv(mUfsPath, mUfsConf).getDescription();<NEW_LINE>List<ValidationTaskResult> results = new LinkedList<>();<NEW_LINE>for (Map.Entry<String, ValidationTask> entry : getTasks().entrySet()) {<NEW_LINE><MASK><NEW_LINE>String taskName = entry.getKey();<NEW_LINE>ValidationTaskResult result;<NEW_LINE>try {<NEW_LINE>result = task.validate(validateOpts);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>result = new ValidationTaskResult(ValidationUtils.State.FAILED, task.getName(), "Task interrupted while running", "");<NEW_LINE>}<NEW_LINE>if (desc.containsKey(taskName)) {<NEW_LINE>result.setDesc(desc.get(taskName));<NEW_LINE>}<NEW_LINE>results.add(result);<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
ValidationTask task = entry.getValue();
900,833
public static OCLCompilationResult compileCodeForDevice(ResolvedJavaMethod resolvedMethod, Object[] args, TaskMetaData meta, OCLProviders providers, OCLBackend backend, long batchThreads) {<NEW_LINE>Tornado.info("Compiling %s on %s", resolvedMethod.getName(), backend.getDeviceContext().getDevice().getDeviceName());<NEW_LINE>final TornadoCompilerIdentifier id = new TornadoCompilerIdentifier("compile-kernel" + resolvedMethod.getName(), compilationId.getAndIncrement());<NEW_LINE>Builder builder = new Builder(TornadoCoreRuntime.getOptions(), getDebugContext(), AllowAssumptions.YES);<NEW_LINE>builder.method(resolvedMethod);<NEW_LINE>builder.compilationId(id);<NEW_LINE>builder.name("compile-kernel" + resolvedMethod.getName());<NEW_LINE>final StructuredGraph kernelGraph = builder.build();<NEW_LINE>OptimisticOptimizations optimisticOpts = OptimisticOptimizations.ALL;<NEW_LINE>ProfilingInfo profilingInfo = resolvedMethod.getProfilingInfo();<NEW_LINE>OCLCompilationResult kernelCompResult = new OCLCompilationResult("internal", resolvedMethod.getName(), meta, backend);<NEW_LINE>CompilationResultBuilderFactory factory = CompilationResultBuilderFactory.Default;<NEW_LINE>final OCLSuitesProvider suitesProvider = providers.getSuitesProvider();<NEW_LINE>Request<OCLCompilationResult> kernelCompilationRequest = new Request<>(kernelGraph, resolvedMethod, args, meta, providers, backend, suitesProvider.getGraphBuilderSuite(), optimisticOpts, profilingInfo, suitesProvider.getSuites(), suitesProvider.getLIRSuites(), kernelCompResult, factory, true, true, batchThreads);<NEW_LINE>kernelCompilationRequest.execute();<NEW_LINE>final Deque<ResolvedJavaMethod> workList = new ArrayDeque<>(kernelCompResult.getNonInlinedMethods());<NEW_LINE>while (!workList.isEmpty()) {<NEW_LINE>Builder builder1 = new Builder(TornadoCoreRuntime.getOptions(), getDebugContext(), AllowAssumptions.YES);<NEW_LINE>builder1.method(resolvedMethod);<NEW_LINE>builder1.compilationId(id);<NEW_LINE>final ResolvedJavaMethod currentMethod = workList.pop();<NEW_LINE>builder1.name("internal" + currentMethod.getName());<NEW_LINE>final StructuredGraph graph = builder.build();<NEW_LINE>final OCLCompilationResult compResult = new OCLCompilationResult("internal", currentMethod.<MASK><NEW_LINE>Request<OCLCompilationResult> methodCompilationRequest = new Request<>(graph, currentMethod, null, null, providers, backend, suitesProvider.getGraphBuilderSuite(), optimisticOpts, profilingInfo, suitesProvider.getSuites(), suitesProvider.getLIRSuites(), compResult, factory, false, true, 0);<NEW_LINE>methodCompilationRequest.execute();<NEW_LINE>workList.addAll(compResult.getNonInlinedMethods());<NEW_LINE>kernelCompResult.addCompiledMethodCode(compResult.getTargetCode());<NEW_LINE>}<NEW_LINE>return kernelCompResult;<NEW_LINE>}
getName(), meta, backend);
1,430,413
protected UpdateResult doUpdate(String collectionName, Query query, UpdateDefinition update, @Nullable Class<?> entityClass, boolean upsert, boolean multi) {<NEW_LINE>Assert.notNull(collectionName, "CollectionName must not be null!");<NEW_LINE>Assert.notNull(query, "Query must not be null!");<NEW_LINE>Assert.notNull(update, "Update must not be null!");<NEW_LINE>if (query.isSorted() && LOGGER.isWarnEnabled()) {<NEW_LINE>LOGGER.warn(String.format("%s does not support sort ('%s'). Please use findAndModify() instead.", upsert ? "Upsert" : "UpdateFirst", serializeToJsonSafely(query.getSortObject())));<NEW_LINE>}<NEW_LINE>MongoPersistentEntity<?> entity = entityClass == null ? null : getPersistentEntity(entityClass);<NEW_LINE>UpdateContext updateContext = multi ? queryOperations.updateContext(update, query, upsert) : queryOperations.updateSingleContext(update, query, upsert);<NEW_LINE>updateContext.increaseVersionForUpdateIfNecessary(entity);<NEW_LINE>Document queryObj = updateContext.getMappedQuery(entity);<NEW_LINE>UpdateOptions opts = updateContext.getUpdateOptions(entityClass);<NEW_LINE>if (updateContext.isAggregationUpdate()) {<NEW_LINE>List<Document> pipeline = updateContext.getUpdatePipeline(entityClass);<NEW_LINE>MongoAction mongoAction = new MongoAction(writeConcern, MongoActionOperation.UPDATE, collectionName, entityClass, update.getUpdateObject(), queryObj);<NEW_LINE>WriteConcern writeConcernToUse = prepareWriteConcern(mongoAction);<NEW_LINE>return execute(collectionName, collection -> {<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug(String.format("Calling update using query: %s and update: %s in collection: %s", serializeToJsonSafely(queryObj), serializeToJsonSafely(pipeline), collectionName));<NEW_LINE>}<NEW_LINE>collection = writeConcernToUse != null ? collection.withWriteConcern(writeConcernToUse) : collection;<NEW_LINE>return multi ? collection.updateMany(queryObj, pipeline, opts) : collection.updateOne(queryObj, pipeline, opts);<NEW_LINE>});<NEW_LINE>}<NEW_LINE>Document updateObj = updateContext.getMappedUpdate(entity);<NEW_LINE>MongoAction mongoAction = new MongoAction(writeConcern, MongoActionOperation.UPDATE, <MASK><NEW_LINE>WriteConcern writeConcernToUse = prepareWriteConcern(mongoAction);<NEW_LINE>return execute(collectionName, collection -> {<NEW_LINE>if (LOGGER.isDebugEnabled()) {<NEW_LINE>LOGGER.debug(String.format("Calling update using query: %s and update: %s in collection: %s", serializeToJsonSafely(queryObj), serializeToJsonSafely(updateObj), collectionName));<NEW_LINE>}<NEW_LINE>collection = writeConcernToUse != null ? collection.withWriteConcern(writeConcernToUse) : collection;<NEW_LINE>if (!UpdateMapper.isUpdateObject(updateObj)) {<NEW_LINE>Document filter = new Document(queryObj);<NEW_LINE>if (updateContext.requiresShardKey(filter, entity)) {<NEW_LINE>if (entity.getShardKey().isImmutable()) {<NEW_LINE>filter = updateContext.applyShardKey(entity, filter, null);<NEW_LINE>} else {<NEW_LINE>filter = updateContext.applyShardKey(entity, filter, collection.find(filter, Document.class).projection(updateContext.getMappedShardKey(entity)).first());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ReplaceOptions replaceOptions = updateContext.getReplaceOptions(entityClass);<NEW_LINE>return collection.replaceOne(filter, updateObj, replaceOptions);<NEW_LINE>} else {<NEW_LINE>return multi ? collection.updateMany(queryObj, updateObj, opts) : collection.updateOne(queryObj, updateObj, opts);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
collectionName, entityClass, updateObj, queryObj);
131,028
public boolean visit(JClassType x, Context ctx) {<NEW_LINE>// have I already been visited as a super type?<NEW_LINE>JsScope myScope = classScopes.get(x);<NEW_LINE>if (myScope != null) {<NEW_LINE>scopeStack.push(myScope);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// My seed function name<NEW_LINE>JsName jsName = topScope.declareName(JjsUtils.mangledNameString(x), x.getShortName());<NEW_LINE>names.put(x, jsName);<NEW_LINE>recordSymbol(x, jsName);<NEW_LINE>// My class scope<NEW_LINE>if (x.getSuperClass() == null) {<NEW_LINE>myScope = objectScope;<NEW_LINE>} else {<NEW_LINE>JsScope parentScope = classScopes.<MASK><NEW_LINE>// Run my superclass first!<NEW_LINE>if (parentScope == null) {<NEW_LINE>accept(x.getSuperClass());<NEW_LINE>}<NEW_LINE>parentScope = classScopes.get(x.getSuperClass());<NEW_LINE>assert (parentScope != null);<NEW_LINE>if (parentScope == objectScope) {<NEW_LINE>parentScope = interfaceScope;<NEW_LINE>}<NEW_LINE>myScope = new JsNormalScope(parentScope, "class " + x.getShortName());<NEW_LINE>}<NEW_LINE>classScopes.put(x, myScope);<NEW_LINE>scopeStack.push(myScope);<NEW_LINE>return true;<NEW_LINE>}
get(x.getSuperClass());
1,692,879
public void initialize(boolean parsingCompilationUnit) {<NEW_LINE>// positioning the parser for a new compilation unit<NEW_LINE>// avoiding stack reallocation and all that....<NEW_LINE>this.javadoc = null;<NEW_LINE>this.astPtr = -1;<NEW_LINE>this.astLengthPtr = -1;<NEW_LINE>this.expressionPtr = -1;<NEW_LINE>this.expressionLengthPtr = -1;<NEW_LINE>this.typeAnnotationLengthPtr = -1;<NEW_LINE>this.typeAnnotationPtr = -1;<NEW_LINE>this.identifierPtr = -1;<NEW_LINE>this.identifierLengthPtr = -1;<NEW_LINE>this.intPtr = -1;<NEW_LINE>// need to reset for further reuse<NEW_LINE>this.nestedMethod[this.nestedType = 0] = 0;<NEW_LINE>this.variablesCounter[this.nestedType] = 0;<NEW_LINE>this.dimensions = 0;<NEW_LINE>this.realBlockPtr = -1;<NEW_LINE>this.compilationUnit = null;<NEW_LINE>this.referenceContext = null;<NEW_LINE>this.endStatementPosition = 0;<NEW_LINE>this.valueLambdaNestDepth = -1;<NEW_LINE>// remove objects from stack too, while the same parser/compiler couple is<NEW_LINE>// re-used between two compilations ....<NEW_LINE>int astLength = this.astStack.length;<NEW_LINE>if (this.noAstNodes.length < astLength) {<NEW_LINE>this.noAstNodes = new ASTNode[astLength];<NEW_LINE>// System.out.println("Resized AST stacks : "+ astLength);<NEW_LINE>}<NEW_LINE>System.arraycopy(this.noAstNodes, 0, this.astStack, 0, astLength);<NEW_LINE>int expressionLength = this.expressionStack.length;<NEW_LINE>if (this.noExpressions.length < expressionLength) {<NEW_LINE>this.noExpressions = new Expression[expressionLength];<NEW_LINE>// System.out.println("Resized EXPR stacks : "+ expressionLength);<NEW_LINE>}<NEW_LINE>System.arraycopy(this.noExpressions, 0, this.expressionStack, 0, expressionLength);<NEW_LINE>// reset this.scanner state<NEW_LINE>this.scanner.commentPtr = -1;<NEW_LINE>this.scanner.foundTaskCount = 0;<NEW_LINE>this<MASK><NEW_LINE>this.recordStringLiterals = true;<NEW_LINE>final boolean checkNLS = this.options.getSeverity(CompilerOptions.NonExternalizedString) != ProblemSeverities.Ignore;<NEW_LINE>this.checkExternalizeStrings = checkNLS;<NEW_LINE>this.scanner.checkNonExternalizedStringLiterals = parsingCompilationUnit && checkNLS;<NEW_LINE>this.scanner.checkUninternedIdentityComparison = parsingCompilationUnit && this.options.complainOnUninternedIdentityComparison;<NEW_LINE>this.scanner.lastPosition = -1;<NEW_LINE>resetModifiers();<NEW_LINE>// recovery<NEW_LINE>this.lastCheckPoint = -1;<NEW_LINE>this.currentElement = null;<NEW_LINE>this.restartRecovery = false;<NEW_LINE>this.hasReportedError = false;<NEW_LINE>this.recoveredStaticInitializerStart = 0;<NEW_LINE>this.lastIgnoredToken = -1;<NEW_LINE>this.lastErrorEndPosition = -1;<NEW_LINE>this.lastErrorEndPositionBeforeRecovery = -1;<NEW_LINE>this.lastJavadocEnd = -1;<NEW_LINE>this.listLength = 0;<NEW_LINE>this.listTypeParameterLength = 0;<NEW_LINE>this.lastPosistion = -1;<NEW_LINE>this.rBraceStart = 0;<NEW_LINE>this.rBraceEnd = 0;<NEW_LINE>this.rBraceSuccessorStart = 0;<NEW_LINE>this.rBracketPosition = 0;<NEW_LINE>this.genericsIdentifiersLengthPtr = -1;<NEW_LINE>this.genericsLengthPtr = -1;<NEW_LINE>this.genericsPtr = -1;<NEW_LINE>}
.scanner.eofPosition = Integer.MAX_VALUE;
1,452,872
private void initHandler() {<NEW_LINE>String[] handlerClassesStr = (String[]) this.context.get(MessagingContext.ConsumerHandlerClasses);<NEW_LINE>ClassLoader[] clsLoaders = (ClassLoader[]) this.context.get(MessagingContext.ConsumerHandlerClassLoaders);<NEW_LINE>ClassLoader cl = this.getClass().getClassLoader();<NEW_LINE>for (String handlerClassStr : handlerClassesStr) {<NEW_LINE>Class<?> c = null;<NEW_LINE>try {<NEW_LINE>c = cl.loadClass(handlerClassStr);<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>if (c == null && clsLoaders != null) {<NEW_LINE>for (ClassLoader tcl : clsLoaders) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>// ignore<NEW_LINE>}<NEW_LINE>if (c != null) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>MessageHandler instance = (MessageHandler) c.newInstance();<NEW_LINE>handlerMap.put(instance.getMsgTypeName(), instance);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.err(this, "ConsumerHandler Class[" + handlerClassStr + "] load FAILs", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// ext MessageHandler instances<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<MessageHandler> handlers = (List<MessageHandler>) context.get(MessagingContext.CONSUMER_HANDLER_INSTANCES);<NEW_LINE>if (handlers != null) {<NEW_LINE>for (MessageHandler handler : handlers) {<NEW_LINE>handlerMap.put(handler.getMsgTypeName(), handler);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
c = tcl.loadClass(handlerClassStr);
577,602
private BindPortFutures runCoordinator() {<NEW_LINE>String coordinatorArgs = String.format("%s -%s %s", _settings.getCoordinatorArgs(), org.batfish.coordinator.config.Settings.ARG_TRACING_ENABLE, _settings.getTracingEnable());<NEW_LINE>// If we are using a command file, just pick ephemeral ports to listen on<NEW_LINE>if (_settings.getCommandFile() != null) {<NEW_LINE>coordinatorArgs += String.format(" -%s %s -%s %s -%s %s", org.batfish.coordinator.config.Settings.ARG_SERVICE_POOL_PORT, 0, org.batfish.coordinator.config.Settings.ARG_SERVICE_WORK_PORT, 0, org.batfish.coordinator.<MASK><NEW_LINE>}<NEW_LINE>String[] initialArgArray = getArgArrayFromString(coordinatorArgs);<NEW_LINE>List<String> args = new ArrayList<>(Arrays.asList(initialArgArray));<NEW_LINE>final String[] argArray = args.toArray(new String[] {});<NEW_LINE>_logger.debugf("Starting coordinator with args: %s\n", Arrays.toString(argArray));<NEW_LINE>BindPortFutures bindPortFutures = new BindPortFutures();<NEW_LINE>Thread thread = new Thread("coordinatorThread") {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>org.batfish.coordinator.Main.main(argArray, _logger, bindPortFutures);<NEW_LINE>} catch (Exception e) {<NEW_LINE>_logger.errorf("Initialization of coordinator failed with args: %s\nExceptionMessage: %s\n", Arrays.toString(argArray), e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>};<NEW_LINE>thread.start();<NEW_LINE>return bindPortFutures;<NEW_LINE>}
config.Settings.ARG_SERVICE_WORK_V2_PORT, 0);
1,389,997
public void apply(Project project) {<NEW_LINE>if (SpotlessPluginRedirect.gradleIsTooOld(project)) {<NEW_LINE>throw new GradleException("Spotless requires Gradle " + MINIMUM_GRADLE + " or newer, this was " + project.getGradle().getGradleVersion());<NEW_LINE>}<NEW_LINE>// if -PspotlessModern=true, then use the modern stuff instead of the legacy stuff<NEW_LINE>if (project.hasProperty(SPOTLESS_MODERN)) {<NEW_LINE>project.getLogger().warn("'spotlessModern' has no effect as of Spotless 5.0, recommend removing it.");<NEW_LINE>}<NEW_LINE>// setup the extension<NEW_LINE>project.getExtensions().create(SpotlessExtension.class, SpotlessExtension.EXTENSION, SpotlessExtensionImpl.class, project);<NEW_LINE>// clear spotless' cache when the user does a clean<NEW_LINE>// resolution for: https://github.com/diffplug/spotless/issues/243#issuecomment-564323856<NEW_LINE>// project.getRootProject() is consistent across every project, so only of one the clears will<NEW_LINE>// actually happen (as desired)<NEW_LINE>//<NEW_LINE>// we use System.identityHashCode() to avoid a memory leak by hanging on to the reference directly<NEW_LINE>int cacheKey = System.<MASK><NEW_LINE>configureCleanTask(project, clean -> clean.doLast(unused -> SpotlessCache.clearOnce(cacheKey)));<NEW_LINE>}
identityHashCode(project.getRootProject());
1,797,146
protected DiffRequest loadCurrentContents(@Nonnull UserDataHolder context, @Nonnull ProgressIndicator indicator) throws DiffRequestProducerException {<NEW_LINE>DiffRequestProducerException wrapperException = null;<NEW_LINE>DiffRequestProducerException requestException = null;<NEW_LINE>DiffViewerWrapper wrapper = null;<NEW_LINE>try {<NEW_LINE>for (ChangeDiffViewerWrapperProvider provider : ChangeDiffViewerWrapperProvider.EP_NAME.getExtensionList()) {<NEW_LINE>if (provider.canCreate(myProject, myChange)) {<NEW_LINE>wrapper = provider.process(this, context, indicator);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (DiffRequestProducerException e) {<NEW_LINE>wrapperException = e;<NEW_LINE>}<NEW_LINE>DiffRequest request = null;<NEW_LINE>try {<NEW_LINE>for (ChangeDiffRequestProvider provider : ChangeDiffRequestProvider.EP_NAME.getExtensionList()) {<NEW_LINE>if (provider.canCreate(myProject, myChange)) {<NEW_LINE>request = provider.<MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (request == null)<NEW_LINE>request = createRequest(myProject, myChange, context, indicator);<NEW_LINE>} catch (DiffRequestProducerException e) {<NEW_LINE>requestException = e;<NEW_LINE>}<NEW_LINE>if (requestException != null && wrapperException != null) {<NEW_LINE>String message = requestException.getMessage() + "\n\n" + wrapperException.getMessage();<NEW_LINE>throw new DiffRequestProducerException(message);<NEW_LINE>}<NEW_LINE>if (requestException != null) {<NEW_LINE>request = new ErrorDiffRequest(getRequestTitle(myChange), requestException);<NEW_LINE>LOG.info("Request: " + requestException.getMessage());<NEW_LINE>}<NEW_LINE>if (wrapperException != null) {<NEW_LINE>LOG.info("Wrapper: " + wrapperException.getMessage());<NEW_LINE>}<NEW_LINE>request.putUserData(CHANGE_KEY, myChange);<NEW_LINE>request.putUserData(DiffViewerWrapper.KEY, wrapper);<NEW_LINE>for (Map.Entry<Key, Object> entry : myChangeContext.entrySet()) {<NEW_LINE>request.putUserData(entry.getKey(), entry.getValue());<NEW_LINE>}<NEW_LINE>DiffUtil.putDataKey(request, VcsDataKeys.CURRENT_CHANGE, myChange);<NEW_LINE>return request;<NEW_LINE>}
process(this, context, indicator);
1,011,042
private void readExtProgOptions() throws LoginException {<NEW_LINE>String externalProgram = (String) options.get(PROGRAM_OPTION_NAME);<NEW_LINE>if (externalProgram == null || externalProgram.isBlank()) {<NEW_LINE>throw new LoginException("Missing " + PROGRAM_OPTION_NAME + "=path_to_external_program in options");<NEW_LINE>}<NEW_LINE>File extProFile = new File(externalProgram).getAbsoluteFile();<NEW_LINE>if (!extProFile.exists()) {<NEW_LINE>throw new LoginException("Bad " + PROGRAM_OPTION_NAME + "=path_to_external_program in options");<NEW_LINE>}<NEW_LINE>extProgramName = extProFile.getName();<NEW_LINE>List<String> argKeys = options.keySet().stream().filter(key -> key.startsWith(ARG_OPTION_NAME)).sorted().collect(Collectors.toList());<NEW_LINE>List<String> cmdArrayValues = new ArrayList<>();<NEW_LINE>cmdArrayValues.<MASK><NEW_LINE>for (String argKey : argKeys) {<NEW_LINE>String val = options.get(argKey).toString();<NEW_LINE>cmdArrayValues.add(val);<NEW_LINE>}<NEW_LINE>cmdArray = cmdArrayValues.toArray(new String[cmdArrayValues.size()]);<NEW_LINE>}
add(externalProgram.toString());
1,610,420
void autoFitColumns() {<NEW_LINE>int visibleWidth = 0;<NEW_LINE>int headerHeight = 0;<NEW_LINE>for (ColumnImpl column : getTableHeaderUiFacade().getColumns()) {<NEW_LINE>if (column.isVisible()) {<NEW_LINE>Dimension columnDimension = autoFitColumnWidth(column);<NEW_LINE>visibleWidth += columnDimension.width;<NEW_LINE>headerHeight = Math.max(headerHeight, column.getHeaderFitDimension().height);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// {<NEW_LINE>// Rectangle bounds = getBounds();<NEW_LINE>// setBounds(bounds.x, bounds.y, visibleWidth, bounds.height);<NEW_LINE>// }<NEW_LINE>if (headerHeight > 0) {<NEW_LINE>Rectangle bounds = getTable().getTableHeader().getBounds();<NEW_LINE>getTable().getTableHeader().setBounds(bounds.x, bounds.y, visibleWidth, headerHeight);<NEW_LINE>}<NEW_LINE>{<NEW_LINE>Rectangle bounds = getTable().getBounds();<NEW_LINE>MutableTreeTableNode rootNode = (MutableTreeTableNode) getTreeTable()<MASK><NEW_LINE>var rowCount = TreeUtil.collectSubtree(rootNode).size() - 1;<NEW_LINE>getTable().setBounds(bounds.x, bounds.y, visibleWidth, rowCount * getTree().getRowHeight());<NEW_LINE>}<NEW_LINE>}
.getTreeTableModel().getRoot();
1,662,675
public static Reader<byte[]> acquirePulsarConsumerForConfig(PulsarConfig pulsarStreamLevelStreamConfig) {<NEW_LINE>final ImmutableTriple<String, String, String> configKey = new ImmutableTriple<>(pulsarStreamLevelStreamConfig.getPulsarTopicName(), pulsarStreamLevelStreamConfig.getSubscriberId(), pulsarStreamLevelStreamConfig.getBootstrapServers());<NEW_LINE>synchronized (PulsarStreamLevelConsumerManager.class) {<NEW_LINE>// If we have the consumer and it's not already acquired, return it, otherwise error out if it's already acquired<NEW_LINE>if (CONSUMER_FOR_CONFIG_KEY.containsKey(configKey)) {<NEW_LINE>Reader<byte[]> pulsarConsumer = CONSUMER_FOR_CONFIG_KEY.get(configKey);<NEW_LINE>if (CONSUMER_RELEASE_TIME.get(pulsarConsumer).equals(IN_USE)) {<NEW_LINE>throw new RuntimeException("Consumer " + pulsarConsumer + " already in use!");<NEW_LINE>} else {<NEW_LINE>LOGGER.info("Reusing pulsar consumer with id {}", pulsarConsumer);<NEW_LINE>CONSUMER_RELEASE_TIME.put(pulsarConsumer, IN_USE);<NEW_LINE>return pulsarConsumer;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.info("Creating new pulsar consumer and iterator for topic {}", pulsarStreamLevelStreamConfig.getPulsarTopicName());<NEW_LINE>// Create the consumer<NEW_LINE>try {<NEW_LINE>_pulsarClient = PulsarClient.builder().serviceUrl(pulsarStreamLevelStreamConfig.getBootstrapServers()).build();<NEW_LINE>_reader = _pulsarClient.newReader().topic(pulsarStreamLevelStreamConfig.getPulsarTopicName()).startMessageId(pulsarStreamLevelStreamConfig.<MASK><NEW_LINE>// Mark both the consumer and iterator as acquired<NEW_LINE>CONSUMER_FOR_CONFIG_KEY.put(configKey, _reader);<NEW_LINE>CONSUMER_RELEASE_TIME.put(_reader, IN_USE);<NEW_LINE>LOGGER.info("Created consumer with id {} for topic {}", _reader, pulsarStreamLevelStreamConfig.getPulsarTopicName());<NEW_LINE>return _reader;<NEW_LINE>} catch (PulsarClientException e) {<NEW_LINE>LOGGER.error("Could not create pulsar consumer", e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getInitialMessageId()).create();
462,902
public void marshall(DvbSubDestinationSettings dvbSubDestinationSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (dvbSubDestinationSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getAlignment(), ALIGNMENT_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getBackgroundColor(), BACKGROUNDCOLOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getBackgroundOpacity(), BACKGROUNDOPACITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getFont(), FONT_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getFontColor(), FONTCOLOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getFontOpacity(), FONTOPACITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getFontResolution(), FONTRESOLUTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getFontSize(), FONTSIZE_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getOutlineColor(), OUTLINECOLOR_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getOutlineSize(), OUTLINESIZE_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getShadowOpacity(), SHADOWOPACITY_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getShadowXOffset(), SHADOWXOFFSET_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getShadowYOffset(), SHADOWYOFFSET_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getTeletextGridControl(), TELETEXTGRIDCONTROL_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getXPosition(), XPOSITION_BINDING);<NEW_LINE>protocolMarshaller.marshall(dvbSubDestinationSettings.getYPosition(), YPOSITION_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
dvbSubDestinationSettings.getShadowColor(), SHADOWCOLOR_BINDING);
1,347,919
protected void drawVertical(Canvas canvas, RecyclerView parent) {<NEW_LINE>canvas.save();<NEW_LINE>final int left;<NEW_LINE>final int right;<NEW_LINE>if (parent.getClipToPadding()) {<NEW_LINE>left = parent.getPaddingLeft();<NEW_LINE>right = parent.getWidth() - parent.getPaddingRight();<NEW_LINE>canvas.clipRect(left, parent.getPaddingTop(), right, parent.getHeight() - parent.getPaddingBottom());<NEW_LINE>} else {<NEW_LINE>left = 0;<NEW_LINE>right = parent.getWidth();<NEW_LINE>}<NEW_LINE>final int itemCount = parent.getChildCount();<NEW_LINE>for (int i = 0; i < itemCount - mDividerOnLastItem; i++) {<NEW_LINE>final View child = parent.getChildAt(i);<NEW_LINE>RecyclerView.ViewHolder viewHolder = parent.getChildViewHolder(child);<NEW_LINE>if (shouldDrawDivider(viewHolder)) {<NEW_LINE><MASK><NEW_LINE>final int bottom = mBounds.bottom + Math.round(child.getTranslationY());<NEW_LINE>final int top = bottom - mDivider.getIntrinsicHeight();<NEW_LINE>mDivider.setBounds(left, top, right, bottom);<NEW_LINE>mDivider.draw(canvas);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>canvas.restore();<NEW_LINE>}
parent.getDecoratedBoundsWithMargins(child, mBounds);
456,113
// ----- private methods -----<NEW_LINE>private void applyAce(final AccessControllable node, final Ace toAdd, final boolean revoke) throws FrameworkException {<NEW_LINE>final String principalId = toAdd.getPrincipalId();<NEW_LINE>final List<String<MASK><NEW_LINE>final Principal principal = CMISObjectWrapper.translateUsernameToPrincipal(principalId);<NEW_LINE>if (principal != null) {<NEW_LINE>for (final String permissionString : permissions) {<NEW_LINE>final Permission permission = Permissions.valueOf(permissionString);<NEW_LINE>if (permission != null) {<NEW_LINE>if (revoke) {<NEW_LINE>node.revoke(permission, principal);<NEW_LINE>} else {<NEW_LINE>node.grant(permission, principal);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new CmisInvalidArgumentException("Permission with ID " + permissionString + " does not exist");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new CmisObjectNotFoundException("Principal with ID " + principalId + " does not exist");<NEW_LINE>}<NEW_LINE>}
> permissions = toAdd.getPermissions();
1,834,488
public okhttp3.Call readAPIServiceStatusCall(String name, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/apiregistration.k8s.io/v1/apiservices/{name}/status".replaceAll("\\{" + "name" + "\\}", localVarApiClient.escapeString(name.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 <MASK><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 = new String[] { "BearerToken" };<NEW_LINE>return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);<NEW_LINE>}
= { "application/json", "application/yaml", "application/vnd.kubernetes.protobuf" };
1,392,698
protected List<Long> wakeupScan() {<NEW_LINE>final <MASK><NEW_LINE>SearchCriteria<Long> sc = JoinJobTimeSearch.create();<NEW_LINE>sc.setParameters("beginTime", cutDate);<NEW_LINE>sc.setParameters("endTime", cutDate);<NEW_LINE>final List<Long> result = _joinMapDao.customSearch(sc, null);<NEW_LINE>return Transaction.execute(new TransactionCallback<List<Long>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public List<Long> doInTransaction(TransactionStatus status) {<NEW_LINE>if (result.size() > 0) {<NEW_LINE>Collections.sort(result);<NEW_LINE>Long[] ids = result.toArray(new Long[result.size()]);<NEW_LINE>AsyncJobVO job = _jobDao.createForUpdate();<NEW_LINE>job.setPendingSignals(AsyncJob.Constants.SIGNAL_MASK_WAKEUP);<NEW_LINE>SearchCriteria<AsyncJobVO> sc2 = JobIdsSearch.create("ids", ids);<NEW_LINE>SearchCriteria<SyncQueueItemVO> queueItemsSC = QueueJobIdsSearch.create("contentIds", ids);<NEW_LINE>_jobDao.update(job, sc2);<NEW_LINE>SyncQueueItemVO item = _queueItemDao.createForUpdate();<NEW_LINE>item.setLastProcessNumber(null);<NEW_LINE>item.setLastProcessMsid(null);<NEW_LINE>_queueItemDao.update(item, queueItemsSC);<NEW_LINE>}<NEW_LINE>return _joinMapDao.findJobsToWakeBetween(cutDate);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
Date cutDate = DateUtil.currentGMTTime();
222,900
public static void downloadDistributeStormCode(Map conf, String topologyId, String masterCodeDir) throws IOException, TException {<NEW_LINE>String tmpToot = null;<NEW_LINE>try {<NEW_LINE>// STORM_LOCAL_DIR/supervisor/tmp/(UUID)<NEW_LINE>tmpToot = StormConfig.supervisorTmpDir(conf) + File.separator + UUID.randomUUID().toString();<NEW_LINE>// STORM_LOCAL_DIR/supervisor/stormdist/topologyId<NEW_LINE>String stormRoot = StormConfig.supervisor_stormdist_root(conf, topologyId);<NEW_LINE>// JStormServerUtils.downloadCodeFromMaster(conf, tmproot, masterCodeDir, topologyId, true);<NEW_LINE>JStormServerUtils.downloadCodeFromBlobStore(conf, tmpToot, topologyId);<NEW_LINE>// tmproot/stormjar.jar<NEW_LINE>String <MASK><NEW_LINE>// extract dir from jar<NEW_LINE>JStormUtils.extractDirFromJar(localFileJarTmp, StormConfig.RESOURCES_SUBDIR, tmpToot);<NEW_LINE>File srcDir = new File(tmpToot);<NEW_LINE>File destDir = new File(stormRoot);<NEW_LINE>try {<NEW_LINE>FileUtils.moveDirectory(srcDir, destDir);<NEW_LINE>} catch (FileExistsException e) {<NEW_LINE>FileUtils.copyDirectory(srcDir, destDir);<NEW_LINE>FileUtils.deleteQuietly(srcDir);<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (tmpToot != null) {<NEW_LINE>File srcDir = new File(tmpToot);<NEW_LINE>FileUtils.deleteQuietly(srcDir);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
localFileJarTmp = StormConfig.stormjar_path(tmpToot);
1,107,811
public long topicCapacity(String clusterAlias, String topic) throws Exception {<NEW_LINE>String jmx = "";<NEW_LINE>JMXConnector connector = null;<NEW_LINE>List<MetadataInfo> leaders = kafkaService.findKafkaLeader(clusterAlias, topic);<NEW_LINE>long tpSize = 0L;<NEW_LINE>for (MetadataInfo leader : leaders) {<NEW_LINE>String jni = kafkaService.getBrokerJMXFromIds(clusterAlias, leader.getLeader());<NEW_LINE>jmx = String.format(SystemConfigUtils.getProperty(clusterAlias + ".efak.jmx.uri"), jni);<NEW_LINE>try {<NEW_LINE>JMXServiceURL jmxSeriverUrl = new JMXServiceURL(jmx);<NEW_LINE>connector = JMXFactoryUtils.connectWithTimeout(clusterAlias, jmxSeriverUrl, 30, TimeUnit.SECONDS);<NEW_LINE>MBeanServerConnection mbeanConnection = connector.getMBeanServerConnection();<NEW_LINE>String objectName = String.format(KafkaLog.SIZE.getValue(), topic, leader.getPartitionId());<NEW_LINE>Object size = mbeanConnection.getAttribute(new ObjectName(objectName), KafkaLog.VALUE.getValue());<NEW_LINE>tpSize += Long.parseLong(size.toString());<NEW_LINE>} catch (Exception ex) {<NEW_LINE>LOG.error(<MASK><NEW_LINE>ex.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>if (connector != null) {<NEW_LINE>try {<NEW_LINE>connector.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOG.error("Close jmx connector has error, msg is " + e.getMessage());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return tpSize;<NEW_LINE>}
"Get topic size from jmx has error, msg is " + ex.getMessage());
418,495
public void writeDelta(OutputStream os, ProducerOptionalBlobPartConfig.OptionalBlobPartOutputStreams partStreams) throws IOException {<NEW_LINE>Map<String, DataOutputStream> partStreamsByType = Collections.emptyMap();<NEW_LINE>if (partStreams != null)<NEW_LINE>partStreamsByType = partStreams.getStreamsByType();<NEW_LINE>stateEngine.prepareForWrite();<NEW_LINE>if (stateEngine.isRestored())<NEW_LINE>stateEngine.ensureAllNecessaryStatesRestored();<NEW_LINE>List<HollowSchema> changedTypes = changedTypes();<NEW_LINE>DataOutputStream dos = new DataOutputStream(os);<NEW_LINE>HollowBlobHeaderWrapper hollowBlobHeaderWrapper = buildHeader(partStreams, changedTypes, false);<NEW_LINE>writeHeaders(dos, partStreams, false, hollowBlobHeaderWrapper);<NEW_LINE>SimultaneousExecutor executor = new SimultaneousExecutor(getClass(), "write-delta");<NEW_LINE>for (final HollowTypeWriteState typeState : stateEngine.getOrderedTypeStates()) {<NEW_LINE>executor.execute(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>if (typeState.hasChangedSinceLastCycle())<NEW_LINE>typeState.calculateDelta();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>executor.awaitSuccessfulCompletion();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>for (HollowTypeWriteState typeState : stateEngine.getOrderedTypeStates()) {<NEW_LINE>if (typeState.hasChangedSinceLastCycle()) {<NEW_LINE>DataOutputStream partStream = partStreamsByType.get(typeState.getSchema().getName());<NEW_LINE>if (partStream == null)<NEW_LINE>partStream = dos;<NEW_LINE><MASK><NEW_LINE>schema.writeTo(partStream);<NEW_LINE>writeNumShards(partStream, typeState.getNumShards());<NEW_LINE>typeState.writeDelta(partStream);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>os.flush();<NEW_LINE>if (partStreams != null)<NEW_LINE>partStreams.flush();<NEW_LINE>}
HollowSchema schema = typeState.getSchema();
487,283
public void marshall(ApiDestination apiDestination, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (apiDestination == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(apiDestination.getApiDestinationArn(), APIDESTINATIONARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(apiDestination.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(apiDestination.getApiDestinationState(), APIDESTINATIONSTATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(apiDestination.getConnectionArn(), CONNECTIONARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(apiDestination.getInvocationEndpoint(), INVOCATIONENDPOINT_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(apiDestination.getInvocationRateLimitPerSecond(), INVOCATIONRATELIMITPERSECOND_BINDING);<NEW_LINE>protocolMarshaller.marshall(apiDestination.getCreationTime(), CREATIONTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(apiDestination.getLastModifiedTime(), LASTMODIFIEDTIME_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
apiDestination.getHttpMethod(), HTTPMETHOD_BINDING);
1,754,163
private static OspfInternalSummaryRoute jsonCreator(@Nullable @JsonProperty(PROP_NETWORK) Prefix network, @Nullable @JsonProperty(PROP_ADMINISTRATIVE_COST) Integer admin, @Nullable @JsonProperty(PROP_METRIC) Long metric, @Nullable @JsonProperty(PROP_NEXT_HOP_IP) Ip nextHopIp, @Nullable @JsonProperty(PROP_NEXT_HOP_INTERFACE) String nextHopInterface, @Nullable @JsonProperty(PROP_AREA) Long area, @JsonProperty(PROP_TAG) long tag) {<NEW_LINE>assert NextHop.legacyConverter(nextHopInterface, nextHopIp).equals(NextHopDiscard.instance());<NEW_LINE>checkArgument(network != null, "%s must be specified", PROP_NETWORK);<NEW_LINE>checkArgument(admin != null, "%s must be specified", PROP_ADMINISTRATIVE_COST);<NEW_LINE>checkArgument(<MASK><NEW_LINE>checkArgument(area != null, "%s must be specified", PROP_AREA);<NEW_LINE>return new OspfInternalSummaryRoute(network, admin, metric, area, tag);<NEW_LINE>}
metric != null, "%s must be specified", PROP_METRIC);
938,922
public RFuture<Map<KOut, VOut>> executeAsync() {<NEW_LINE>AtomicReference<RFuture<BatchResult<?>>> batchRef = new AtomicReference<>();<NEW_LINE>RFuture<Void> mapperFuture = executeMapperAsync(resultMapName, null);<NEW_LINE>CompletableFuture<Map<KOut, VOut>> f = mapperFuture.thenCompose(res -> {<NEW_LINE>RBatch batch = redisson.createBatch();<NEW_LINE>RMapAsync<KOut, VOut> resultMap = batch.getMap(resultMapName, objectCodec);<NEW_LINE>RFuture<Map<KOut, VOut>> future = resultMap.readAllMapAsync();<NEW_LINE>resultMap.deleteAsync();<NEW_LINE>RFuture<BatchResult<?>> batchFuture = batch.executeAsync();<NEW_LINE>batchRef.set(batchFuture);<NEW_LINE>return future;<NEW_LINE>}).toCompletableFuture();<NEW_LINE>f.whenComplete((r, e) -> {<NEW_LINE>if (f.isCancelled()) {<NEW_LINE>if (batchRef.get() != null) {<NEW_LINE>batchRef.get().cancel(true);<NEW_LINE>}<NEW_LINE>mapperFuture.cancel(true);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>if (timeout > 0) {<NEW_LINE>commandExecutor.getConnectionManager().newTimeout(task -> {<NEW_LINE>f.completeExceptionally(new MapReduceTimeoutException());<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return new CompletableFutureWrapper<>(f);<NEW_LINE>}
}, timeout, TimeUnit.MILLISECONDS);
240,153
private void validateAndSetParameters(Program programParam, DataTypeManager dataTypeManagerParam, Address imageBaseParam, PdbApplicatorOptions applicatorOptionsParam, TaskMonitor monitorParam, MessageLog logParam) throws PdbException {<NEW_LINE>applicatorOptions = (applicatorOptionsParam != null) ? applicatorOptionsParam : new PdbApplicatorOptions();<NEW_LINE>if (programParam == null) {<NEW_LINE>if (dataTypeManagerParam == null) {<NEW_LINE>throw new PdbException("PDB: programParam and dataTypeManagerParam may not both be null.");<NEW_LINE>}<NEW_LINE>if (imageBaseParam == null) {<NEW_LINE>throw new PdbException("PDB: programParam and imageBaseParam may not both be null.");<NEW_LINE>}<NEW_LINE>if (applicatorOptions.getProcessingControl() != PdbApplicatorControl.DATA_TYPES_ONLY) {<NEW_LINE>throw new PdbException("PDB: programParam may not be null for the chosen Applicator Control: " + applicatorOptions.getProcessingControl());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>monitor = (monitorParam != <MASK><NEW_LINE>log = (logParam != null) ? logParam : new MessageLog();<NEW_LINE>program = programParam;<NEW_LINE>dataTypeManager = (dataTypeManagerParam != null) ? dataTypeManagerParam : program.getDataTypeManager();<NEW_LINE>imageBase = (imageBaseParam != null) ? imageBaseParam : program.getImageBase();<NEW_LINE>}
null) ? monitorParam : TaskMonitor.DUMMY;
1,769,802
protected synchronized void parse(IParseState parseState, WorkingParseResult working) throws java.lang.Exception {<NEW_LINE>fMonitor = parseState.getProgressMonitor();<NEW_LINE>fScanner = new HTMLParserScanner();<NEW_LINE>fElementStack <MASK><NEW_LINE>fCommentNodes = new ArrayList<IParseNode>();<NEW_LINE>fWorkingParseResult = working;<NEW_LINE>String source = parseState.getSource();<NEW_LINE>if (parseState instanceof HTMLParseState) {<NEW_LINE>fParseState = (HTMLParseState) parseState;<NEW_LINE>} else {<NEW_LINE>fParseState = new HTMLParseState(source, parseState.getStartingOffset(), parseState.getSkippedRanges());<NEW_LINE>fParseState.setProgressMonitor(parseState.getProgressMonitor());<NEW_LINE>}<NEW_LINE>fScanner.setSource(source);<NEW_LINE>int startingOffset = fParseState.getStartingOffset();<NEW_LINE>ParseRootNode root = new HTMLParseRootNode(startingOffset, startingOffset + source.length() - 1);<NEW_LINE>try {<NEW_LINE>fCurrentElement = root;<NEW_LINE>parseAll(source);<NEW_LINE>root.setCommentNodes(fCommentNodes.toArray(new IParseNode[fCommentNodes.size()]));<NEW_LINE>} finally {<NEW_LINE>// clear for garbage collection<NEW_LINE>fWorkingParseResult = null;<NEW_LINE>fMonitor = null;<NEW_LINE>fScanner = null;<NEW_LINE>fElementStack = null;<NEW_LINE>fCurrentElement = null;<NEW_LINE>fCurrentSymbol = null;<NEW_LINE>fParseState = null;<NEW_LINE>fCommentNodes = null;<NEW_LINE>}<NEW_LINE>// trim the tree and set the result only after clearing for garbage collection.<NEW_LINE>ParseUtil.trimToSize(root);<NEW_LINE>working.setParseResult(root);<NEW_LINE>}
= new Stack<IParseNode>();
996,430
public void run() {<NEW_LINE>try {<NEW_LINE>File selectedFile = getFile();<NEW_LINE>BufferProject bufferProject = new BufferProject(getProject(), getUiFacade());<NEW_LINE>ProjectFileImporter importer = new ProjectFileImporter(bufferProject, getUiFacade().getTaskColumnList(), selectedFile);<NEW_LINE>importer.run();<NEW_LINE>List<Pair<Level, String>> errors = importer.getErrors();<NEW_LINE>getTaskManager().getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm().setEnabled(false);<NEW_LINE>getTaskManager().getAlgorithmCollection().getRecalculateTaskCompletionPercentageAlgorithm().setEnabled(false);<NEW_LINE>getTaskManager().getAlgorithmCollection().<MASK><NEW_LINE>Map<Task, Task> buffer2realTask = importBufferProject(getProject(), bufferProject, BufferProjectImportKt.asImportBufferProjectApi(getUiFacade()), myMergeResourcesOption, myImportCalendarOption);<NEW_LINE>Map<GanttTask, Date> originalDates = importer.getOriginalStartDates();<NEW_LINE>findChangedDates(originalDates, buffer2realTask, errors);<NEW_LINE>reportErrors(errors, "Import.MSProject");<NEW_LINE>} catch (Exception e) {<NEW_LINE>getUiFacade().showErrorDialog(e);<NEW_LINE>} finally {<NEW_LINE>getTaskManager().getAlgorithmCollection().getRecalculateTaskCompletionPercentageAlgorithm().setEnabled(true);<NEW_LINE>getTaskManager().getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm().setEnabled(true);<NEW_LINE>getTaskManager().getAlgorithmCollection().getScheduler().setEnabled(true);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>getTaskManager().getAlgorithmCollection().getRecalculateTaskCompletionPercentageAlgorithm().run();<NEW_LINE>getTaskManager().getAlgorithmCollection().getRecalculateTaskScheduleAlgorithm().run();<NEW_LINE>} catch (TaskDependencyException e) {<NEW_LINE>getUiFacade().showErrorDialog(e);<NEW_LINE>}<NEW_LINE>}
getScheduler().setEnabled(false);
49,841
public static LedgerMetadataBuilder from(LedgerMetadata other) {<NEW_LINE>LedgerMetadataBuilder builder = new LedgerMetadataBuilder();<NEW_LINE>builder.ledgerId = other.getLedgerId();<NEW_LINE>builder.metadataFormatVersion = other.getMetadataFormatVersion();<NEW_LINE>builder.ensembleSize = other.getEnsembleSize();<NEW_LINE>builder.writeQuorumSize = other.getWriteQuorumSize();<NEW_LINE>builder.ackQuorumSize = other.getAckQuorumSize();<NEW_LINE>builder.state = other.getState();<NEW_LINE>if (builder.state == State.CLOSED) {<NEW_LINE>builder.lastEntryId = Optional.of(other.getLastEntryId());<NEW_LINE>builder.length = Optional.of(other.getLength());<NEW_LINE>}<NEW_LINE>builder.ensembles.putAll(other.getAllEnsembles());<NEW_LINE>if (other.hasPassword()) {<NEW_LINE>builder.password = Optional.of(other.getPassword());<NEW_LINE>builder.digestType = Optional.<MASK><NEW_LINE>}<NEW_LINE>builder.ctime = other.getCtime();<NEW_LINE>builder.storeCtime = LedgerMetadataUtils.shouldStoreCtime(other);<NEW_LINE>builder.customMetadata = ImmutableMap.copyOf(other.getCustomMetadata());<NEW_LINE>return builder;<NEW_LINE>}
of(other.getDigestType());
1,608,052
public JsonNode normalizeData(final EventNode event, final long timestamp, final long slot, final List<String> fillIds) {<NEW_LINE>final String side = event.eventFlags.bid ? "buy" : "sell";<NEW_LINE>if (event.eventFlags.fill) {<NEW_LINE>final ObjectNode fill = JsonNodeFactory.instance.objectNode();<NEW_LINE>fill.put("type", "fill");<NEW_LINE>fill.put("symbol", symbol);<NEW_LINE>fill.put("market", this.market.decoded.getOwnAddress().getKeyString());<NEW_LINE><MASK><NEW_LINE>fill.put("slot", slot);<NEW_LINE>fill.put("orderId", event.orderId);<NEW_LINE>fill.put("clientId", event.clientOrderId);<NEW_LINE>fill.put("side", side);<NEW_LINE>fill.put("price", getFillPrice(event, priceDecimalPlaces).toPlainString());<NEW_LINE>fill.put("size", getFillSize(event, sizeDecimalPlaces).toPlainString());<NEW_LINE>fill.put("maker", event.eventFlags.maker);<NEW_LINE>fill.put("feeCost", this.market.quoteSplTokenMultiplier().toPlainString());<NEW_LINE>fill.put("openOrders", event.openOrders.getKeyString());<NEW_LINE>fill.put("openOrdersSlot", event.openOrdersSlot);<NEW_LINE>fill.put("feeTier", event.feeTier);<NEW_LINE>return fill;<NEW_LINE>} else if (Double.compare(event.nativeQuantityPaid, 0.0) == 0) {<NEW_LINE>// we can use nativeQuantityStillLocked == 0 to detect if order is 'done'<NEW_LINE>// this is what the dex uses at event processing time to decide if it can<NEW_LINE>// release the slot in an OpenOrders account.<NEW_LINE>//<NEW_LINE>// done means that there won't be any more messages for the order<NEW_LINE>// (is no longer in the order book or never was - cancelled, ioc)<NEW_LINE>final ObjectNode done = JsonNodeFactory.instance.objectNode();<NEW_LINE>done.put("type", "done");<NEW_LINE>done.put("symbol", symbol);<NEW_LINE>done.put("market", this.market.decoded.getOwnAddress().getKeyString());<NEW_LINE>done.put("timestamp", timestamp);<NEW_LINE>done.put("slot", slot);<NEW_LINE>done.put("orderId", event.orderId);<NEW_LINE>done.put("clientId", event.clientOrderId);<NEW_LINE>done.put("side", side);<NEW_LINE>done.put("reason", fillIds.contains(event.orderId) ? "filled" : "cancelled");<NEW_LINE>done.put("maker", event.eventFlags.maker);<NEW_LINE>done.put("openOrders", event.openOrders.getKeyString());<NEW_LINE>done.put("openOrdersSlot", event.openOrdersSlot);<NEW_LINE>done.put("feeTier", event.feeTier);<NEW_LINE>return done;<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
fill.put("timestamp", timestamp);
787,686
/* (non-Javadoc)<NEW_LINE>* @see com.kkalice.adempiere.migrate.DBEngineInterface#sqlAdmin_optimizeDatabase(com.kkalice.adempiere.migrate.Parameters, com.kkalice.adempiere.migrate.Logger, com.kkalice.adempiere.migrate.DBEngine, int, java.lang.String, java.lang.String)<NEW_LINE>*/<NEW_LINE>public String sqlAdmin_optimizeDatabase(int step, String catalogName, String schemaName) {<NEW_LINE>StringBuffer sql = new StringBuffer();<NEW_LINE>switch(step) {<NEW_LINE>case 0:<NEW_LINE>// recompile invalid objects<NEW_LINE>sql.append("BEGIN DBMS_UTILITY.compile_schema(schema => '").append(schemaName.toUpperCase()).append("'); END; ");<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>// correct data file sizing (from AfterImport.sql script)<NEW_LINE>sql.append("DECLARE " + "CURSOR Cur_TS IS " + "SELECT FILE_NAME, Tablespace_Name, Bytes/1024/1024 as MB " + "FROM DBA_DATA_FILES " + "WHERE (TABLESPACE_NAME='USERS' AND BYTES < 100*1024*1024) " + "OR (TABLESPACE_NAME='INDX' AND BYTES < 100*1024*1024) " + "OR (TABLESPACE_NAME='TEMP' AND BYTES < 100*1024*1024); " + "v_CMD VARCHAR2(300); " + "BEGIN " + "FOR ts IN Cur_TS LOOP " + "v_CMD := 'ALTER DATABASE DATAFILE ''' || ts.FILE_NAME || ''' RESIZE 100M'; " + "EXECUTE IMMEDIATE v_CMD; " + <MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (sql.length() > 0)<NEW_LINE>return sql.toString();<NEW_LINE>else<NEW_LINE>return null;<NEW_LINE>}
"v_CMD := 'ALTER DATABASE DATAFILE ''' || ts.FILE_NAME || ''' AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED'; " + "EXECUTE IMMEDIATE v_CMD; " + "END LOOP; " + "END; ");
375,347
public int doEndTag() throws JspException {<NEW_LINE>Hashtable connectionLookup = (Hashtable) pageContext.<MASK><NEW_LINE>if (connectionLookup == null) {<NEW_LINE>throw new JspException("No dbconnect tag found in jsp : ");<NEW_LINE>}<NEW_LINE>DefinedIndexManager indexMgr = (DefinedIndexManager) pageContext.getAttribute("TSXDefinedIndexManager", PageContext.PAGE_SCOPE);<NEW_LINE>if (indexMgr == null) {<NEW_LINE>throw new JspException("No dbconnect tag found in jsp : ");<NEW_LINE>}<NEW_LINE>if (id == null || id.equals("")) {<NEW_LINE>id = indexMgr.getNextIndex();<NEW_LINE>} else {<NEW_LINE>if (indexMgr.exists(id) == true) {<NEW_LINE>throw new JspException("Index specified in <tsx:dbconnect> tag has already been defined.");<NEW_LINE>} else {<NEW_LINE>indexMgr.addIndex(id);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>StringBuffer outputString = new StringBuffer();<NEW_LINE>ConnectionProperties conn = (ConnectionProperties) connectionLookup.get(connection);<NEW_LINE>QueryResults qr = new QueryResults();<NEW_LINE>try {<NEW_LINE>Query query = new Query(conn, getBodyContent().getString());<NEW_LINE>if (limit != 0) {<NEW_LINE>query.setMaxRows(limit);<NEW_LINE>}<NEW_LINE>qr = query.execute();<NEW_LINE>pageContext.setAttribute(id, qr, PageContext.PAGE_SCOPE);<NEW_LINE>} catch (SQLException e) {<NEW_LINE>// com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.webcontainer.jsp.tsx.tag.DBQueryTag.doEndTag", "83", this);<NEW_LINE>throw new JspException("SQLException: " + e.toString());<NEW_LINE>} catch (JspCoreException e) {<NEW_LINE>// com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.webcontainer.jsp.tsx.tag.DBQueryTag.doEndTag", "87", this);<NEW_LINE>throw new JspException("JasperException: " + e.toString());<NEW_LINE>}<NEW_LINE>return (EVAL_PAGE);<NEW_LINE>}
getAttribute("TSXConnectionLookup", PageContext.PAGE_SCOPE);
792,253
public HlsIngest unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>HlsIngest hlsIngest = new HlsIngest();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("ingestEndpoints", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>hlsIngest.setIngestEndpoints(new ListUnmarshaller<IngestEndpoint>(IngestEndpointJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return hlsIngest;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,631,135
public com.amazonaws.services.eventbridge.model.InvalidStateException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.eventbridge.model.InvalidStateException invalidStateException = new com.amazonaws.services.eventbridge.model.InvalidStateException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return invalidStateException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
136,324
public void selectionChanged(@Nonnull final FileEditorManagerEvent event) {<NEW_LINE>final VirtualFile oldFile = event.getOldFile();<NEW_LINE>final VirtualFile newFile = event.getNewFile();<NEW_LINE>if (Comparing.equal(oldFile, newFile) && Comparing.equal(getFile(), newFile)) {<NEW_LINE>Runnable runnable = () -> {<NEW_LINE>final FileEditor oldEditor = event.getOldEditor();<NEW_LINE>if (oldEditor != null)<NEW_LINE>oldEditor.deselectNotify();<NEW_LINE>final FileEditor newEditor = event.getNewEditor();<NEW_LINE>if (newEditor != null)<NEW_LINE>newEditor.selectNotify();<NEW_LINE>((FileEditorProviderManagerImpl) FileEditorProviderManager.getInstance()<MASK><NEW_LINE>((IdeDocumentHistoryImpl) IdeDocumentHistory.getInstance(myFileEditorManager.getProject())).onSelectionChanged();<NEW_LINE>};<NEW_LINE>if (ApplicationManager.getApplication().isDispatchThread()) {<NEW_LINE>CommandProcessor.getInstance().executeCommand(myFileEditorManager.getProject(), runnable, "Switch Active Editor", null);<NEW_LINE>} else {<NEW_LINE>// not invoked by user<NEW_LINE>runnable.run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).providerSelected(DesktopEditorComposite.this);
1,662,400
private static Set<Kmer> determineNonUniques(final int kmerSize, Collection<SequenceForKmers> withNonUniques) {<NEW_LINE>final Set<Kmer> nonUniqueKmers = new HashSet<>();<NEW_LINE>// loop over all sequences that have non-unique kmers in them from the previous iterator<NEW_LINE>final Iterator<SequenceForKmers> it = withNonUniques.iterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>final <MASK><NEW_LINE>// determine the non-unique kmers for this sequence<NEW_LINE>final Collection<Kmer> nonUniquesFromSeq = determineNonUniqueKmers(sequenceForKmers, kmerSize);<NEW_LINE>if (nonUniquesFromSeq.isEmpty()) {<NEW_LINE>// remove this sequence from future consideration<NEW_LINE>it.remove();<NEW_LINE>} else {<NEW_LINE>// keep track of the non-uniques for this kmerSize, and keep it in the list of sequences that have non-uniques<NEW_LINE>nonUniqueKmers.addAll(nonUniquesFromSeq);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return nonUniqueKmers;<NEW_LINE>}
SequenceForKmers sequenceForKmers = it.next();
1,116,919
private static ImmutableList<ConfiguredTargetKey> configureRegisteredExecutionPlatforms(Environment env, BuildConfigurationValue configuration, List<Label> labels) throws InterruptedException, RegisteredExecutionPlatformsFunctionException {<NEW_LINE>ImmutableList<ConfiguredTargetKey> keys = labels.stream().map(label -> ConfiguredTargetKey.builder().setLabel(label).setConfiguration(configuration).build()).collect(toImmutableList());<NEW_LINE>SkyframeIterableResult values = env.getOrderedValuesAndExceptions(keys);<NEW_LINE>ImmutableList.Builder<ConfiguredTargetKey> validPlatformKeys = new ImmutableList.Builder<>();<NEW_LINE>boolean valuesMissing = false;<NEW_LINE>for (ConfiguredTargetKey platformKey : keys) {<NEW_LINE>Label platformLabel = platformKey.getLabel();<NEW_LINE>try {<NEW_LINE>SkyValue value = <MASK><NEW_LINE>if (value == null) {<NEW_LINE>valuesMissing = true;<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ConfiguredTarget target = ((ConfiguredTargetValue) value).getConfiguredTarget();<NEW_LINE>PlatformInfo platformInfo = PlatformProviderUtils.platform(target);<NEW_LINE>if (platformInfo == null) {<NEW_LINE>throw new RegisteredExecutionPlatformsFunctionException(new InvalidPlatformException(platformLabel), Transience.PERSISTENT);<NEW_LINE>}<NEW_LINE>validPlatformKeys.add(platformKey);<NEW_LINE>} catch (ConfiguredValueCreationException e) {<NEW_LINE>throw new RegisteredExecutionPlatformsFunctionException(new InvalidPlatformException(platformLabel, e), Transience.PERSISTENT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (valuesMissing) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return validPlatformKeys.build();<NEW_LINE>}
values.nextOrThrow(ConfiguredValueCreationException.class);
1,513,573
public Map<TypeDescription, Class<?>> load(@MaybeNull ClassLoader classLoader, Map<TypeDescription, byte[]> types) {<NEW_LINE>DexProcessor.Conversion conversion = dexProcessor.create();<NEW_LINE>for (Map.Entry<TypeDescription, byte[]> entry : types.entrySet()) {<NEW_LINE>conversion.register(entry.getKey().getName(), entry.getValue());<NEW_LINE>}<NEW_LINE>File jar = new File(privateDirectory, randomString.nextString() + JAR_FILE_EXTENSION);<NEW_LINE>try {<NEW_LINE>if (!jar.createNewFile()) {<NEW_LINE>throw new IllegalStateException("Cannot create " + jar);<NEW_LINE>}<NEW_LINE>JarOutputStream zipOutputStream = new JarOutputStream(new FileOutputStream(jar));<NEW_LINE>try {<NEW_LINE>zipOutputStream.<MASK><NEW_LINE>conversion.drainTo(zipOutputStream);<NEW_LINE>zipOutputStream.closeEntry();<NEW_LINE>} finally {<NEW_LINE>zipOutputStream.close();<NEW_LINE>}<NEW_LINE>return doLoad(classLoader, types.keySet(), jar);<NEW_LINE>} catch (IOException exception) {<NEW_LINE>throw new IllegalStateException("Cannot write to zip file " + jar, exception);<NEW_LINE>} finally {<NEW_LINE>if (!jar.delete()) {<NEW_LINE>Logger.getLogger("net.bytebuddy").warning("Could not delete " + jar);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
putNextEntry(new JarEntry(DEX_CLASS_FILE));
520,254
final BatchGetFreeTrialInfoResult executeBatchGetFreeTrialInfo(BatchGetFreeTrialInfoRequest batchGetFreeTrialInfoRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetFreeTrialInfoRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchGetFreeTrialInfoRequest> request = null;<NEW_LINE>Response<BatchGetFreeTrialInfoResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchGetFreeTrialInfoRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(batchGetFreeTrialInfoRequest));<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, "Inspector2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "BatchGetFreeTrialInfo");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<BatchGetFreeTrialInfoResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new BatchGetFreeTrialInfoResultJsonUnmarshaller());<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);
527,831
private void initDeviceView() {<NEW_LINE>main = new Composite(parent, SWT.NONE);<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = 1;<NEW_LINE>layout.marginTop = 4;<NEW_LINE>layout.marginBottom = 4;<NEW_LINE>layout.marginHeight = 4;<NEW_LINE>layout.marginWidth = 4;<NEW_LINE>main.setLayout(layout);<NEW_LINE>GridData grid_data;<NEW_LINE>main.setLayoutData(Utils.getFilledFormData());<NEW_LINE>// control<NEW_LINE>Composite control = new Composite(main, SWT.NONE);<NEW_LINE>layout = new GridLayout();<NEW_LINE>layout.numColumns = 3;<NEW_LINE>layout.marginLeft = 0;<NEW_LINE>control.setLayout(layout);<NEW_LINE>// browse to local dir<NEW_LINE>grid_data = new GridData(GridData.FILL_HORIZONTAL);<NEW_LINE>grid_data.horizontalSpan = 1;<NEW_LINE>control.setLayoutData(grid_data);<NEW_LINE>Label dir_lab = new Label(control, SWT.NONE);<NEW_LINE>dir_lab.setText("Local directory: " + device.getWorkingDirectory().getAbsolutePath());<NEW_LINE>Button show_folder_button = new Button(control, SWT.PUSH);<NEW_LINE>Messages.setLanguageText(show_folder_button, "MyTorrentsView.menu.explore");<NEW_LINE>show_folder_button.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>ManagerUtils.open(device.getWorkingDirectory());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>new Label(control, SWT.NONE);<NEW_LINE>if (device.canFilterFilesView()) {<NEW_LINE>final Button show_xcode_button = new Button(control, SWT.CHECK);<NEW_LINE>Messages.setLanguageText(show_xcode_button, "devices.xcode.only.show");<NEW_LINE>show_xcode_button.setSelection(device.getFilterFilesView());<NEW_LINE>show_xcode_button.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>device.setFilterFilesView(show_xcode_button.getSelection());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>final Button btnReset = new Button(main, SWT.PUSH);<NEW_LINE>btnReset.setText("Forget Default Profile Choice");<NEW_LINE>btnReset.addSelectionListener(new SelectionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>device.setDefaultTranscodeProfile(null);<NEW_LINE>btnReset.setEnabled(false);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetDefaultSelected(SelectionEvent e) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>try {<NEW_LINE>btnReset.setEnabled(device.getDefaultTranscodeProfile() != null);<NEW_LINE>} catch (TranscodeException e1) {<NEW_LINE>btnReset.setEnabled(false);<NEW_LINE>}<NEW_LINE>btnReset.setLayoutData(new GridData());<NEW_LINE>parent<MASK><NEW_LINE>}
.getParent().layout();
1,428,451
public void annotate(@Nonnull final VirtualFile contentRoot, @Nonnull final CoverageSuitesBundle suite, @Nonnull final CoverageDataManager dataManager, @Nonnull final ProjectData data, final Project project, final Annotator annotator) {<NEW_LINE>if (!contentRoot.isValid()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO: check name filter!!!!!<NEW_LINE>final ProjectFileIndex index = ProjectRootManager.getInstance(project).getFileIndex();<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final Set<String> files = data<MASK><NEW_LINE>final Map<String, String> normalizedFiles2Files = ContainerUtil.newHashMap();<NEW_LINE>for (final String file : files) {<NEW_LINE>normalizedFiles2Files.put(normalizeFilePath(file), file);<NEW_LINE>}<NEW_LINE>collectFolderCoverage(contentRoot, dataManager, annotator, data, suite.isTrackTestFolders(), index, suite.getCoverageEngine(), ContainerUtil.<VirtualFile>newHashSet(), Collections.unmodifiableMap(normalizedFiles2Files));<NEW_LINE>}
.getClasses().keySet();
970,828
public void mouseDown(MouseEvent e) {<NEW_LINE>double xValue = xyGraph.primaryXAxis.getPositionValue(e.x, false);<NEW_LINE>double yValue = xyGraph.primaryYAxis.getPositionValue(e.y, false);<NEW_LINE>if (xyGraph.primaryXAxis.getRange().getLower() > xValue || xyGraph.primaryXAxis.getRange().getUpper() < xValue)<NEW_LINE>return;<NEW_LINE>if (xyGraph.primaryYAxis.getRange().getLower() > yValue || xyGraph.primaryYAxis.getRange().getUpper() < yValue)<NEW_LINE>return;<NEW_LINE>List<Trace> sortedTraces = traces.values().stream().sorted(comparingDouble(nearestPointYValueFunc(xValue)).reversed()).collect(toList());<NEW_LINE>ISample topSample = ScouterUtil.getNearestPoint(sortedTraces.get(0).getDataProvider(), xValue);<NEW_LINE>double valueTime = topSample.getXValue();<NEW_LINE>double total = topSample.getYValue();<NEW_LINE>if (yValue > total)<NEW_LINE>return;<NEW_LINE>int i = 0;<NEW_LINE>Trace selectedTrace = null;<NEW_LINE>for (; i < sortedTraces.size(); i++) {<NEW_LINE>Trace <MASK><NEW_LINE>double stackValue = ScouterUtil.getNearestValue(t.getDataProvider(), valueTime);<NEW_LINE>if (stackValue < yValue) {<NEW_LINE>i = i - 1;<NEW_LINE>selectedTrace = sortedTraces.get(i);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (selectedTrace == null) {<NEW_LINE>selectedTrace = sortedTraces.get(i - 1);<NEW_LINE>}<NEW_LINE>selectedName = selectedTrace.getName();<NEW_LINE>double value = ScouterUtil.getNearestValue(selectedTrace.getDataProvider(), valueTime);<NEW_LINE>if (i < sortedTraces.size() - 1) {<NEW_LINE>int j = i + 1;<NEW_LINE>double nextStackValue = value;<NEW_LINE>while (nextStackValue == value && j < sortedTraces.size()) {<NEW_LINE>nextStackValue = ScouterUtil.getNearestValue(sortedTraces.get(j).getDataProvider(), valueTime);<NEW_LINE>j++;<NEW_LINE>}<NEW_LINE>if (nextStackValue < value) {<NEW_LINE>value = value - nextStackValue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double percent = value * 100 / total;<NEW_LINE>selectedTrace.setTraceColor(ColorUtil.getInstance().getColor("dark magenta"));<NEW_LINE>toolTip.setText(DateUtil.format(CastUtil.clong(valueTime), "HH:mm:ss") + "\n" + selectedName + "\n" + FormatUtil.print(value, "#,###0.#") + "(" + FormatUtil.print(percent, "##0.0") + " %)");<NEW_LINE>toolTip.show(new Point(e.x, e.y));<NEW_LINE>}
t = sortedTraces.get(i);
1,396,584
protected IProject createNewProject(IProgressMonitor monitor) throws InvocationTargetException {<NEW_LINE>SubMonitor sub = SubMonitor.convert(monitor, 100);<NEW_LINE>// Project description creation<NEW_LINE>IProjectDescription description = ResourceUtil.getProjectDescription(destPath, getProjectNatures(), getProjectBuilders());<NEW_LINE>description.setName(newProject.getName());<NEW_LINE>description.setLocationURI(location);<NEW_LINE>// Update the referenced project in case it was initialized.<NEW_LINE>if (refProjects != null && refProjects.length > 0) {<NEW_LINE>description.setReferencedProjects(refProjects);<NEW_LINE>}<NEW_LINE>sub.worked(10);<NEW_LINE>if (!applySourcedProjectFilesAfterProjectCreated() && isCloneFromGit()) {<NEW_LINE>cloneFromGit(newProject, description, sub.newChild(90));<NEW_LINE>} else {<NEW_LINE>doBasicCreateProject(newProject, description, sub.newChild(75));<NEW_LINE>if (!applySourcedProjectFilesAfterProjectCreated() && selectedTemplate != null && !isCloneFromGit()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return newProject;<NEW_LINE>}
selectedTemplate.apply(newProject, true);
965,084
final EnableDomainAutoRenewResult executeEnableDomainAutoRenew(EnableDomainAutoRenewRequest enableDomainAutoRenewRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(enableDomainAutoRenewRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<EnableDomainAutoRenewRequest> request = null;<NEW_LINE>Response<EnableDomainAutoRenewResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new EnableDomainAutoRenewRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(enableDomainAutoRenewRequest));<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, "Route 53 Domains");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "EnableDomainAutoRenew");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<EnableDomainAutoRenewResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new EnableDomainAutoRenewResultJsonUnmarshaller());<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());
525,047
public AppMeta extract(ApkSourceFile apkSourceFile, ApkSourceFile.Entry baseApkEntry) {<NEW_LINE>try {<NEW_LINE>boolean seenMetaFile = false;<NEW_LINE>AppMeta appMeta = new AppMeta();<NEW_LINE>for (ApkSourceFile.Entry entry : apkSourceFile.listEntries()) {<NEW_LINE>if (entry.getLocalPath().equals(META_FILE)) {<NEW_LINE>JSONObject metaJson = new JSONObject(IOUtils.readStream(apkSourceFile.openEntryInputStream(entry), StandardCharsets.UTF_8));<NEW_LINE>appMeta.<MASK><NEW_LINE>appMeta.appName = metaJson.optString("name");<NEW_LINE>appMeta.versionName = metaJson.optString("version_name");<NEW_LINE>appMeta.versionCode = metaJson.optLong("version_code");<NEW_LINE>seenMetaFile = true;<NEW_LINE>} else if (entry.getLocalPath().equals(ICON_FILE)) {<NEW_LINE>File iconFile = Utils.createTempFileInCache(mContext, "XapkZipAppMetaExtractor", "png");<NEW_LINE>if (iconFile == null)<NEW_LINE>continue;<NEW_LINE>try (InputStream in = apkSourceFile.openEntryInputStream(entry);<NEW_LINE>OutputStream out = new FileOutputStream(iconFile)) {<NEW_LINE>IOUtils.copyStream(in, out);<NEW_LINE>appMeta.iconUri = Uri.fromFile(iconFile);<NEW_LINE>} catch (IOException e) {<NEW_LINE>Log.w(TAG, "Unable to extract icon", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (seenMetaFile)<NEW_LINE>return appMeta;<NEW_LINE>return null;<NEW_LINE>} catch (Exception e) {<NEW_LINE>Log.w(TAG, "Error while extracting meta", e);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
packageName = metaJson.optString("package_name");
892,370
protected void select_instances() {<NEW_LINE>List<Object> selected_packages = list.getSelectedValuesList();<NEW_LINE>if (selected_packages.size() <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>app.freerouting.board.RoutingBoard routing_board = board_frame.board_panel.board_handling.get_routing_board();<NEW_LINE>java.util.Set<app.freerouting.board.Item> board_instances = new java.util.TreeSet<app.freerouting.board.Item>();<NEW_LINE>java.util.Collection<app.freerouting.board.Item<MASK><NEW_LINE>for (app.freerouting.board.Item curr_item : board_items) {<NEW_LINE>if (curr_item.get_component_no() > 0) {<NEW_LINE>app.freerouting.board.Component curr_component = routing_board.components.get(curr_item.get_component_no());<NEW_LINE>Package curr_package = curr_component.get_package();<NEW_LINE>boolean package_matches = false;<NEW_LINE>for (int i = 0; i < selected_packages.size(); ++i) {<NEW_LINE>if (curr_package == selected_packages.get(i)) {<NEW_LINE>package_matches = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (package_matches) {<NEW_LINE>board_instances.add(curr_item);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>board_frame.board_panel.board_handling.select_items(board_instances);<NEW_LINE>board_frame.board_panel.board_handling.zoom_selection();<NEW_LINE>}
> board_items = routing_board.get_items();
153,854
private void saveAsRequest(RequestContainer request) {<NEW_LINE>SaveRequestDialog dialog = new SaveRequestDialog(request, activeWorkspace.getCollections());<NEW_LINE>dialog.showAndWait();<NEW_LINE>if (dialog.isCancelled())<NEW_LINE>return;<NEW_LINE>request.setId(UUID.randomUUID().toString());<NEW_LINE>request.setName(dialog.getRequestName());<NEW_LINE>request.setDirty(false);<NEW_LINE>request.setInStorage(true);<NEW_LINE>var collectionName = dialog.getCollectionName();<NEW_LINE>Optional<Collection> foundCollection = activeWorkspace.getCollections().stream().filter(c -> c.getName().equals(collectionName)).findAny();<NEW_LINE>Collection collection = foundCollection.orElseGet(() -> createNewCollection(collectionName));<NEW_LINE>collection.getRequests().add<MASK><NEW_LINE>var folderPath = dialog.getFolderPath();<NEW_LINE>mkFolders(folderPath, collection).ifPresent(f -> f.getRequests().add(request.getId()));<NEW_LINE>loadCollections(activeWorkspace);<NEW_LINE>displayRequest(request);<NEW_LINE>Platform.runLater(() -> selectRequestInCollections(request));<NEW_LINE>}
(ObjectUtils.deepClone(request));
1,166,714
private ImportsDelta computeDelta(Collection<ImportName> implicitImports, Collection<OnDemandReduction> onDemandReductions) {<NEW_LINE>Collection<ImportName> additions = new ArrayList<ImportName>(this.originalImportsList.size());<NEW_LINE>additions.addAll(this.importsToAdd);<NEW_LINE>Collection<ImportName> removals = new ArrayList<ImportName>(<MASK><NEW_LINE>removals.addAll(this.importsToRemove);<NEW_LINE>removals.addAll(implicitImports);<NEW_LINE>additions.removeAll(removals);<NEW_LINE>for (OnDemandReduction onDemandReduction : onDemandReductions) {<NEW_LINE>additions.removeAll(onDemandReduction.reducibleImports);<NEW_LINE>removals.addAll(onDemandReduction.reducibleImports);<NEW_LINE>additions.add(onDemandReduction.containerOnDemand);<NEW_LINE>removals.remove(onDemandReduction.containerOnDemand);<NEW_LINE>}<NEW_LINE>return new ImportsDelta(additions, removals);<NEW_LINE>}
this.originalImportsList.size());
1,203,909
private void loadNode30() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.ConditionType_AddComment, new QualifiedName(0, "AddComment"), new LocalizedText("en", "AddComment"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), true, true);<NEW_LINE>node.addReference(new Reference(Identifiers.ConditionType_AddComment, Identifiers.HasProperty, Identifiers.ConditionType_AddComment_InputArguments.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ConditionType_AddComment, Identifiers.AlwaysGeneratesEvent, Identifiers.AuditConditionCommentEventType.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ConditionType_AddComment, Identifiers.HasModellingRule, Identifiers.ModellingRule_Mandatory.expanded(), true));<NEW_LINE>node.addReference(new Reference(Identifiers.ConditionType_AddComment, Identifiers.HasComponent, Identifiers.ConditionType.expanded(), false));<NEW_LINE><MASK><NEW_LINE>}
this.nodeManager.addNode(node);
1,410,180
public EdgeLabel readEdgeLabel(HugeGraph graph, BackendEntry backendEntry) {<NEW_LINE>if (backendEntry == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>TableBackendEntry entry = this.convertEntry(backendEntry);<NEW_LINE>Number id = schemaColumn(entry, HugeKeys.ID);<NEW_LINE>String name = schemaColumn(entry, HugeKeys.NAME);<NEW_LINE>Frequency frequency = schemaEnum(entry, HugeKeys.FREQUENCY, Frequency.class);<NEW_LINE>Number sourceLabel = schemaColumn(entry, HugeKeys.SOURCE_LABEL);<NEW_LINE>Number targetLabel = schemaColumn(entry, HugeKeys.TARGET_LABEL);<NEW_LINE>Object sortKeys = schemaColumn(entry, HugeKeys.SORT_KEYS);<NEW_LINE>Object nullableKeys = schemaColumn(entry, HugeKeys.NULLABLE_KEYS);<NEW_LINE>Object properties = schemaColumn(entry, HugeKeys.PROPERTIES);<NEW_LINE>Object indexLabels = schemaColumn(entry, HugeKeys.INDEX_LABELS);<NEW_LINE>SchemaStatus status = schemaEnum(entry, HugeKeys.STATUS, SchemaStatus.class);<NEW_LINE>Number ttl = schemaColumn(entry, HugeKeys.TTL);<NEW_LINE>Number ttlStartTime = schemaColumn(entry, HugeKeys.TTL_START_TIME);<NEW_LINE>EdgeLabel edgeLabel = new EdgeLabel(graph, this.toId(id), name);<NEW_LINE>edgeLabel.frequency(frequency);<NEW_LINE>edgeLabel.sourceLabel(this.toId(sourceLabel));<NEW_LINE>edgeLabel.targetLabel(this.toId(targetLabel));<NEW_LINE>edgeLabel.properties(this.toIdArray(properties));<NEW_LINE>edgeLabel.sortKeys(this.toIdArray(sortKeys));<NEW_LINE>edgeLabel.nullableKeys<MASK><NEW_LINE>edgeLabel.addIndexLabels(this.toIdArray(indexLabels));<NEW_LINE>edgeLabel.status(status);<NEW_LINE>edgeLabel.ttl(ttl.longValue());<NEW_LINE>edgeLabel.ttlStartTime(this.toId(ttlStartTime));<NEW_LINE>this.readEnableLabelIndex(edgeLabel, entry);<NEW_LINE>this.readUserdata(edgeLabel, entry);<NEW_LINE>return edgeLabel;<NEW_LINE>}
(this.toIdArray(nullableKeys));
274,391
private static FileObject resolveFile(final FileObject root, String classBinaryName) {<NEW_LINE>assert classBinaryName != null;<NEW_LINE>// NOI18N<NEW_LINE>classBinaryName = classBinaryName.replace('.', '/');<NEW_LINE>// NOI18N<NEW_LINE>int index = classBinaryName.lastIndexOf('/');<NEW_LINE>FileObject folder;<NEW_LINE>String name;<NEW_LINE>if (index < 0) {<NEW_LINE>folder = root;<NEW_LINE>name = classBinaryName;<NEW_LINE>} else {<NEW_LINE>assert index > 0 : classBinaryName;<NEW_LINE>assert index < classBinaryName.length() - 1 : classBinaryName;<NEW_LINE>folder = root.getFileObject(classBinaryName.substring(0, index));<NEW_LINE>name = classBinaryName.substring(index + 1);<NEW_LINE>}<NEW_LINE>if (folder == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE><MASK><NEW_LINE>if (index > 0) {<NEW_LINE>name = name.substring(0, index);<NEW_LINE>}<NEW_LINE>for (FileObject child : folder.getChildren()) {<NEW_LINE>if ("java".equalsIgnoreCase(child.getExt()) && name.equals(child.getName())) {<NEW_LINE>// NOI18N<NEW_LINE>return child;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
index = name.indexOf('$');
848,076
/* Build call for subscriptionsUnblockSubscriptionPost */<NEW_LINE>private com.squareup.okhttp.Call subscriptionsUnblockSubscriptionPostCall(String subscriptionId, String ifMatch, String ifUnmodifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/subscriptions/unblock-subscription".replaceAll("\\{format\\}", "json");<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>if (subscriptionId != null)<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "subscriptionId", subscriptionId));<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>if (ifMatch != null)<NEW_LINE>localVarHeaderParams.put("If-Match", apiClient.parameterToString(ifMatch));<NEW_LINE>if (ifUnmodifiedSince != null)<NEW_LINE>localVarHeaderParams.put("If-Unmodified-Since", apiClient.parameterToString(ifUnmodifiedSince));<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>if (localVarAccept != null)<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>final <MASK><NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>if (progressListener != null) {<NEW_LINE>apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {<NEW_LINE>com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());<NEW_LINE>return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);<NEW_LINE>}
String[] localVarContentTypes = { "application/json" };
822,107
public void draw(PolygonRegion region, float x, float y) {<NEW_LINE>if (!drawing)<NEW_LINE>throw new IllegalStateException("PolygonSpriteBatch.begin must be called before draw.");<NEW_LINE>final short[] triangles = this.triangles;<NEW_LINE>final short[] regionTriangles = region.triangles;<NEW_LINE>final int regionTrianglesLength = regionTriangles.length;<NEW_LINE>final float[] regionVertices = region.vertices;<NEW_LINE>final int regionVerticesLength = regionVertices.length;<NEW_LINE>final <MASK><NEW_LINE>if (texture != lastTexture)<NEW_LINE>switchTexture(texture);<NEW_LINE>else if (triangleIndex + regionTrianglesLength > triangles.length || vertexIndex + regionVerticesLength * VERTEX_SIZE / 2 > vertices.length)<NEW_LINE>flush();<NEW_LINE>int triangleIndex = this.triangleIndex;<NEW_LINE>int vertexIndex = this.vertexIndex;<NEW_LINE>final int startVertex = vertexIndex / VERTEX_SIZE;<NEW_LINE>for (int i = 0; i < regionTrianglesLength; i++) triangles[triangleIndex++] = (short) (regionTriangles[i] + startVertex);<NEW_LINE>this.triangleIndex = triangleIndex;<NEW_LINE>final float[] vertices = this.vertices;<NEW_LINE>final float color = this.colorPacked;<NEW_LINE>final float[] textureCoords = region.textureCoords;<NEW_LINE>for (int i = 0; i < regionVerticesLength; i += 2) {<NEW_LINE>vertices[vertexIndex++] = regionVertices[i] + x;<NEW_LINE>vertices[vertexIndex++] = regionVertices[i + 1] + y;<NEW_LINE>vertices[vertexIndex++] = color;<NEW_LINE>vertices[vertexIndex++] = textureCoords[i];<NEW_LINE>vertices[vertexIndex++] = textureCoords[i + 1];<NEW_LINE>}<NEW_LINE>this.vertexIndex = vertexIndex;<NEW_LINE>}
Texture texture = region.region.texture;
443,311
final ListNotebookInstanceLifecycleConfigsResult executeListNotebookInstanceLifecycleConfigs(ListNotebookInstanceLifecycleConfigsRequest listNotebookInstanceLifecycleConfigsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listNotebookInstanceLifecycleConfigsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListNotebookInstanceLifecycleConfigsRequest> request = null;<NEW_LINE>Response<ListNotebookInstanceLifecycleConfigsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListNotebookInstanceLifecycleConfigsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listNotebookInstanceLifecycleConfigsRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListNotebookInstanceLifecycleConfigs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListNotebookInstanceLifecycleConfigsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListNotebookInstanceLifecycleConfigsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.SERVICE_ID, "SageMaker");
650,507
// ///////////// Emit Terminator instructions ////////////////////<NEW_LINE>static String emitTerminator(BIRTerminator term, int tabs) {<NEW_LINE>switch(term.kind) {<NEW_LINE>case WAIT:<NEW_LINE>return emitWait((BIRTerminator.Wait) term, tabs);<NEW_LINE>case FLUSH:<NEW_LINE>return emitFlush((BIRTerminator.Flush) term, tabs);<NEW_LINE>case WK_RECEIVE:<NEW_LINE>return emitWorkerReceive((BIRTerminator.WorkerReceive) term, tabs);<NEW_LINE>case WK_SEND:<NEW_LINE>return emitWorkerSend((<MASK><NEW_LINE>case CALL:<NEW_LINE>return emitCall((BIRTerminator.Call) term, tabs);<NEW_LINE>case ASYNC_CALL:<NEW_LINE>return emitAsyncCall((BIRTerminator.AsyncCall) term, tabs);<NEW_LINE>case BRANCH:<NEW_LINE>return emitBranch((BIRTerminator.Branch) term, tabs);<NEW_LINE>case GOTO:<NEW_LINE>return emitGOTO((BIRTerminator.GOTO) term, tabs);<NEW_LINE>case LOCK:<NEW_LINE>return emitLock((BIRTerminator.Lock) term, tabs);<NEW_LINE>case FIELD_LOCK:<NEW_LINE>return emitFieldLock((BIRTerminator.FieldLock) term, tabs);<NEW_LINE>case UNLOCK:<NEW_LINE>return emitUnlock((BIRTerminator.Unlock) term, tabs);<NEW_LINE>case RETURN:<NEW_LINE>return emitReturn((BIRTerminator.Return) term, tabs);<NEW_LINE>case PANIC:<NEW_LINE>return emitPanic((BIRTerminator.Panic) term, tabs);<NEW_LINE>case FP_CALL:<NEW_LINE>return emitFPCall((BIRTerminator.FPCall) term, tabs);<NEW_LINE>case WAIT_ALL:<NEW_LINE>return emitWaitAll((BIRTerminator.WaitAll) term, tabs);<NEW_LINE>default:<NEW_LINE>throw new IllegalStateException("Not a terminator instruction");<NEW_LINE>}<NEW_LINE>}
BIRTerminator.WorkerSend) term, tabs);
1,322,641
// --------------------------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public void open(FileInputSplit fileSplit) throws IOException {<NEW_LINE>this.currentSplit = fileSplit;<NEW_LINE>this<MASK><NEW_LINE>this.splitLength = fileSplit.getLength();<NEW_LINE>if (LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("Opening input split " + fileSplit.getPath() + " [" + this.splitStart + "," + this.splitLength + "]");<NEW_LINE>}<NEW_LINE>// open the split in an asynchronous thread<NEW_LINE>final InputSplitOpenThread isot = new InputSplitOpenThread(fileSplit, this.openTimeout, this.fs);<NEW_LINE>isot.start();<NEW_LINE>try {<NEW_LINE>this.stream = isot.waitForCompletion();<NEW_LINE>this.stream = decorateInputStream(this.stream, fileSplit);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new IOException("Error opening the Input Split " + fileSplit.getPath() + " [" + splitStart + "," + splitLength + "]: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>// get FSDataInputStream<NEW_LINE>if (this.splitStart != 0) {<NEW_LINE>this.stream.seek(this.splitStart);<NEW_LINE>}<NEW_LINE>}
.splitStart = fileSplit.getStart();
1,844,585
public DescribeScheduledAuditResult describeScheduledAudit(DescribeScheduledAuditRequest describeScheduledAuditRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScheduledAuditRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeScheduledAuditRequest> request = null;<NEW_LINE>Response<DescribeScheduledAuditResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeScheduledAuditRequestMarshaller().marshall(describeScheduledAuditRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<DescribeScheduledAuditResult, JsonUnmarshallerContext> unmarshaller = new DescribeScheduledAuditResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<DescribeScheduledAuditResult> responseHandler = new JsonResponseHandler<DescribeScheduledAuditResult>(unmarshaller);<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
463,714
public CompletableFuture<List<TransactionInfo>> listCompletedTransactions(final Stream stream) {<NEW_LINE>Exceptions.checkNotClosed(closed.get(), this);<NEW_LINE>Preconditions.checkNotNull(stream, "stream");<NEW_LINE>final long requestId = requestIdGenerator.get();<NEW_LINE>long traceId = LoggerHelpers.traceEnter(log, LIST_COMPLETED_TRANSACTIONS, stream, requestId);<NEW_LINE>try {<NEW_LINE>final CompletableFuture<ListCompletedTxnResponse> listCompletedTxnResponse = this.retryConfig.runAsync(() -> {<NEW_LINE>RPCAsyncCallback<ListCompletedTxnResponse> callback = new RPCAsyncCallback<>(traceId, LIST_COMPLETED_TRANSACTIONS, stream);<NEW_LINE>new ControllerClientTagger(client, timeoutMillis).withTag(requestId, LIST_COMPLETED_TRANSACTIONS, stream.getScope(), stream.getStreamName()).listCompletedTransactions(ListCompletedTxnRequest.newBuilder().setStreamInfo(ModelHelper.createStreamInfo(stream.getScope(), stream.getStreamName())).build(), callback);<NEW_LINE>return callback.getFuture();<NEW_LINE>}, this.executor);<NEW_LINE>return listCompletedTxnResponse.thenApplyAsync(txnResponse -> txnResponse.getResponseList().stream().map(transactionResponse -> new TransactionInfoImpl(stream, encode(transactionResponse.getTxnId()), Transaction.Status.valueOf(transactionResponse.getStatus().name()))).collect<MASK><NEW_LINE>} finally {<NEW_LINE>LoggerHelpers.traceLeave(log, LIST_COMPLETED_TRANSACTIONS, traceId);<NEW_LINE>}<NEW_LINE>}
(Collectors.toList()));
1,325,511
public JsonNode traceBlock(String blockHash, Map<String, String> traceOptions) {<NEW_LINE>logger.trace("debug_traceBlockByHash({}, {})", blockHash, traceOptions);<NEW_LINE>TraceOptions options = new TraceOptions(traceOptions);<NEW_LINE>if (!options.getUnsupportedOptions().isEmpty()) {<NEW_LINE>// TODO: implement the logic that takes into account the remaining trace options.<NEW_LINE>logger.warn(<MASK><NEW_LINE>}<NEW_LINE>byte[] bHash = stringHexToByteArray(blockHash);<NEW_LINE>Block block = blockStore.getBlockByHash(bHash);<NEW_LINE>if (block == null) {<NEW_LINE>logger.trace("No block is found for {}", bHash);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Block parent = blockStore.getBlockByHash(block.getParentHash().getBytes());<NEW_LINE>ProgramTraceProcessor programTraceProcessor = new ProgramTraceProcessor(options);<NEW_LINE>blockExecutor.traceBlock(programTraceProcessor, 0, block, parent.getHeader(), false, false);<NEW_LINE>List<Keccak256> txHashes = block.getTransactionsList().stream().map(Transaction::getHash).collect(Collectors.toList());<NEW_LINE>return programTraceProcessor.getProgramTracesAsJsonNode(txHashes);<NEW_LINE>}
"Received {} unsupported trace options.", options.getUnsupportedOptions());
1,807,243
private void jbInit() throws Exception {<NEW_LINE>this.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);<NEW_LINE>fResource.addActionListener(this);<NEW_LINE>delete.addActionListener(this);<NEW_LINE>confirmPanel.addButton(delete);<NEW_LINE>confirmPanel.addActionListener(this);<NEW_LINE>//<NEW_LINE>mainPanel.setLayout(mainLayout);<NEW_LINE>mainPanel.add(lResource, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(8, 8, 4, 4), 0, 0));<NEW_LINE>mainPanel.add(fResource, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(8, 0, 4, 4), 0, 0));<NEW_LINE>mainPanel.add(lDate, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 8, 4, 4), 0, 0));<NEW_LINE>mainPanel.add(fDateFrom, new GridBagConstraints(1, 1, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 4, <MASK><NEW_LINE>mainPanel.add(lQty, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 8, 4, 4), 0, 0));<NEW_LINE>mainPanel.add(fQty, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 4, 4), 0, 0));<NEW_LINE>mainPanel.add(lUOM, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 4, 4, 8), 0, 0));<NEW_LINE>mainPanel.add(lName, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 8, 4, 4), 0, 0));<NEW_LINE>mainPanel.add(lDescription, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(2, 8, 8, 4), 0, 0));<NEW_LINE>mainPanel.add(fName, new GridBagConstraints(1, 3, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 4, 8), 0, 0));<NEW_LINE>mainPanel.add(fDescription, new GridBagConstraints(1, 4, 2, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(2, 0, 8, 8), 0, 0));<NEW_LINE>//<NEW_LINE>this.getContentPane().add(mainPanel, BorderLayout.CENTER);<NEW_LINE>this.getContentPane().add(confirmPanel, BorderLayout.SOUTH);<NEW_LINE>}
8), 100, 0));
1,014,199
final DescribeCacheSecurityGroupsResult executeDescribeCacheSecurityGroups(DescribeCacheSecurityGroupsRequest describeCacheSecurityGroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCacheSecurityGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeCacheSecurityGroupsRequest> request = null;<NEW_LINE>Response<DescribeCacheSecurityGroupsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeCacheSecurityGroupsRequestMarshaller().marshall(super.beforeMarshalling(describeCacheSecurityGroupsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "ElastiCache");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCacheSecurityGroups");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeCacheSecurityGroupsResult> responseHandler = new StaxResponseHandler<DescribeCacheSecurityGroupsResult>(new DescribeCacheSecurityGroupsResultStaxUnmarshaller());<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,502,317
public FunDef resolve(Exp[] args, Validator validator, List<Conversion> conversions) {<NEW_LINE>if (args.length < 3) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>int valueType = args[0].getCategory();<NEW_LINE>int returnType = <MASK><NEW_LINE>int j = 0;<NEW_LINE>int clauseCount = (args.length - 1) / 2;<NEW_LINE>int mismatchingArgs = 0;<NEW_LINE>if (!validator.canConvert(j, args[j++], valueType, conversions)) {<NEW_LINE>mismatchingArgs++;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < clauseCount; i++) {<NEW_LINE>if (!validator.canConvert(j, args[j++], valueType, conversions)) {<NEW_LINE>mismatchingArgs++;<NEW_LINE>}<NEW_LINE>if (!validator.canConvert(j, args[j++], returnType, conversions)) {<NEW_LINE>mismatchingArgs++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (j < args.length) {<NEW_LINE>if (!validator.canConvert(j, args[j++], returnType, conversions)) {<NEW_LINE>mismatchingArgs++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Util.assertTrue(j == args.length);<NEW_LINE>if (mismatchingArgs != 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FunDef dummy = createDummyFunDef(this, returnType, args);<NEW_LINE>return new CaseMatchFunDef(dummy);<NEW_LINE>}
args[2].getCategory();
1,341,005
public void init() {<NEW_LINE>if (init)<NEW_LINE>return;<NEW_LINE>INSTANCE = this;<NEW_LINE>context = getReactApplicationContext();<NEW_LINE>emitter = new MusicControlEventEmitter(context, notificationId);<NEW_LINE>session = new MediaSessionCompat(context, "MusicControl");<NEW_LINE>session.setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS | MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);<NEW_LINE>session.setCallback(new MediaSessionCallback(emitter));<NEW_LINE>volume = new MusicControlVolumeListener(context, <MASK><NEW_LINE>if (remoteVolume) {<NEW_LINE>session.setPlaybackToRemote(volume);<NEW_LINE>} else {<NEW_LINE>session.setPlaybackToLocal(AudioManager.STREAM_MUSIC);<NEW_LINE>}<NEW_LINE>md = new MediaMetadataCompat.Builder();<NEW_LINE>pb = new PlaybackStateCompat.Builder();<NEW_LINE>pb.setActions(controls);<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>createChannel(context);<NEW_LINE>}<NEW_LINE>nb = new NotificationCompat.Builder(context, channelId);<NEW_LINE>nb.setVisibility(NotificationCompat.VISIBILITY_PUBLIC);<NEW_LINE>nb.setPriority(NotificationCompat.PRIORITY_HIGH);<NEW_LINE>updateNotificationMediaStyle();<NEW_LINE>state = pb.build();<NEW_LINE>notification = new MusicControlNotification(this, context);<NEW_LINE>notification.updateActions(controls, skipOptions);<NEW_LINE>IntentFilter filter = new IntentFilter();<NEW_LINE>filter.addAction(MusicControlNotification.REMOVE_NOTIFICATION);<NEW_LINE>filter.addAction(MusicControlNotification.MEDIA_BUTTON);<NEW_LINE>filter.addAction(Intent.ACTION_MEDIA_BUTTON);<NEW_LINE>filter.addAction(AudioManager.ACTION_AUDIO_BECOMING_NOISY);<NEW_LINE>receiver = new MusicControlReceiver(this, context);<NEW_LINE>context.registerReceiver(receiver, filter);<NEW_LINE>Intent myIntent = new Intent(context, MusicControlNotification.NotificationService.class);<NEW_LINE>afListener = new MusicControlAudioFocusListener(context, emitter, volume);<NEW_LINE>if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {<NEW_LINE>// Try to bind the service<NEW_LINE>try {<NEW_LINE>context.bindService(myIntent, connection, Context.BIND_AUTO_CREATE);<NEW_LINE>} catch (Exception ignored) {<NEW_LINE>ContextCompat.startForegroundService(context, myIntent);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>context.startService(myIntent);<NEW_LINE>}<NEW_LINE>context.registerComponentCallbacks(this);<NEW_LINE>isPlaying = false;<NEW_LINE>init = true;<NEW_LINE>}
emitter, true, 100, 100);
683,836
public void propertyChange(@NonNull final PropertyChangeEvent evt) {<NEW_LINE>if (ProjectProperties.PROP_PROJECT_CONFIGURATION_CONFIG.equals(evt.getPropertyName())) {<NEW_LINE>LOGGER.log(Level.FINER, "Refiring " + ProjectProperties.PROP_PROJECT_CONFIGURATION_CONFIG + " -> " + ProjectConfigurationProvider.PROP_CONFIGURATION_ACTIVE);<NEW_LINE>Set<String> oldConfigs = configs != null ? configs.keySet() : <MASK><NEW_LINE>calculateConfigs();<NEW_LINE>Set<String> newConfigs = configs.keySet();<NEW_LINE>if (!oldConfigs.equals(newConfigs)) {<NEW_LINE>LOGGER.log(Level.FINER, "Firing " + ProjectConfigurationProvider.PROP_CONFIGURATIONS + ": {0} -> {1}", new Object[] { oldConfigs, newConfigs });<NEW_LINE>pcs.firePropertyChange(ProjectConfigurationProvider.PROP_CONFIGURATIONS, null, null);<NEW_LINE>}<NEW_LINE>pcs.firePropertyChange(ProjectConfigurationProvider.PROP_CONFIGURATION_ACTIVE, null, null);<NEW_LINE>}<NEW_LINE>}
Collections.<String>emptySet();
1,648,809
public void onCreate(Bundle savedInstanceState) {<NEW_LINE><MASK><NEW_LINE>this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.lt_create_trade_1_activity);<NEW_LINE>_mbwManager = MbwManager.getInstance(getApplication());<NEW_LINE>// Get intent parameters<NEW_LINE>_adSearchItem = (AdSearchItem) getIntent().getSerializableExtra("adSearchItem");<NEW_LINE>// Get intent parameters<NEW_LINE>Integer amount = null;<NEW_LINE>// Load saved state<NEW_LINE>if (savedInstanceState != null) {<NEW_LINE>amount = (Integer) savedInstanceState.getSerializable("amount");<NEW_LINE>}<NEW_LINE>String numberString;<NEW_LINE>if (amount != null) {<NEW_LINE>numberString = amount.toString();<NEW_LINE>((TextView) findViewById(R.id.tvAmount)).setText(numberString);<NEW_LINE>} else {<NEW_LINE>numberString = "";<NEW_LINE>}<NEW_LINE>_numberEntry = new NumberEntry(0, this, this, numberString);<NEW_LINE>_tvAmount = (TextView) findViewById(R.id.tvAmount);<NEW_LINE>String hint = String.format(new Locale(_mbwManager.getLanguage()), "%d-%d", _adSearchItem.minimumFiat, _adSearchItem.maximumFiat);<NEW_LINE>_tvAmount.setHint(hint);<NEW_LINE>_btStartTrading = (Button) findViewById(R.id.btStartTrading);<NEW_LINE>_btStartTrading.setOnClickListener(startTradingClickListener);<NEW_LINE>((TextView) findViewById(R.id.tvCurrency)).setText(_adSearchItem.currency);<NEW_LINE>}
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
1,093,841
public ResponseType execute() {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (Throwable e) {<NEW_LINE>if (e instanceof HystrixRuntimeException) {<NEW_LINE>throw (HystrixRuntimeException) e;<NEW_LINE>}<NEW_LINE>// if we have an exception we know about we'll throw it directly without the threading wrapper exception<NEW_LINE>if (e.getCause() instanceof HystrixRuntimeException) {<NEW_LINE>throw (HystrixRuntimeException) e.getCause();<NEW_LINE>}<NEW_LINE>// we don't know what kind of exception this is so create a generic message and throw a new HystrixRuntimeException<NEW_LINE>String message = getClass().getSimpleName() + " HystrixCollapser failed while executing.";<NEW_LINE>// debug only since we're throwing the exception and someone higher will do something with it<NEW_LINE>logger.debug(message, e);<NEW_LINE>// TODO should this be made a HystrixRuntimeException?<NEW_LINE>throw new RuntimeException(message, e);<NEW_LINE>}<NEW_LINE>}
return queue().get();
89,383
private List<Wo> list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>if (StringUtils.isEmpty(wi.getKey())) {<NEW_LINE>return wos;<NEW_LINE>}<NEW_LINE>String str = StringUtils.lowerCase(StringTools.escapeSqlLikeKey(wi.getKey()));<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Identity.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Identity> cq = cb.createQuery(Identity.class);<NEW_LINE>Root<Identity> root = cq.from(Identity.class);<NEW_LINE>Predicate p = cb.like(root.get(Identity_.pinyinInitial), str + "%", StringTools.SQL_ESCAPE_CHAR);<NEW_LINE>ListOrderedSet<String> set = new ListOrderedSet<>();<NEW_LINE>if (ListTools.isNotEmpty(wi.getUnitDutyList())) {<NEW_LINE>List<UnitDuty> unitDuties = business.unitDuty().pick(wi.getUnitDutyList());<NEW_LINE>List<String> unitDutyIdentities = new ArrayList<>();<NEW_LINE>for (UnitDuty o : unitDuties) {<NEW_LINE>unitDutyIdentities.addAll(o.getIdentityList());<NEW_LINE>}<NEW_LINE>unitDutyIdentities = ListTools.trim(unitDutyIdentities, true, true);<NEW_LINE>set.addAll(unitDutyIdentities);<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(wi.getUnitList())) {<NEW_LINE>List<String> identityIds = business.expendUnitToIdentity(wi.getUnitList());<NEW_LINE>set.addAll(identityIds);<NEW_LINE>}<NEW_LINE>if (ListTools.isNotEmpty(wi.getGroupList())) {<NEW_LINE>List<String> identityIds = business.expendGroupToIdentity(wi.getGroupList());<NEW_LINE>set.addAll(identityIds);<NEW_LINE>}<NEW_LINE>if (!set.isEmpty()) {<NEW_LINE>p = cb.and(p, root.get(Identity_.id).in(set.asList()));<NEW_LINE>}<NEW_LINE>List<Identity> os = em.createQuery(cq.select(root).where(p)).getResultList();<NEW_LINE>wos = <MASK><NEW_LINE>wos = business.identity().sort(wos);<NEW_LINE>return wos;<NEW_LINE>}
Wo.copier.copy(os);
246,914
// The purpose of this method is to verify that we were actually able to obtain a valid no-interface style BeanReference using the EJBLink flow, and that we can<NEW_LINE>// do this when we have a 'beanInterface' and a generic variable type.<NEW_LINE>@Asynchronous<NEW_LINE>public Future<Integer> invokeMethodOnReferenceObtainedViaEJBLinkWithValidBeanInterfaceAndGenericVariableType_ReturnFutureResults() {<NEW_LINE>final String methodName = "invokeMethodOnReferenceObtainedViaEJBLinkWithValidBeanInterfaceAndGenericVariableType_ReturnFutureResults";<NEW_LINE>svLogger.info("Executing NoInterfaceBean2." + methodName + " with NO input parm **");<NEW_LINE>// Save threadId value to static variable for verification method executed on different thread<NEW_LINE>NoInterfaceBean2.beanThreadId = Thread.currentThread().getId();<NEW_LINE>svLogger.<MASK><NEW_LINE>// Cast our instance variable into NoInterfaceBean BeanReference<NEW_LINE>NoInterfaceBean beanReference = (NoInterfaceBean) ivReferenceFromEJBLinkWithValidBeanInterfaceAndGenericVariableType;<NEW_LINE>// Invoke the method on the NoInterfaceBean BeanReference.<NEW_LINE>// We pass in a value, and if we are actually able to talk to the underlying bean-instance, then the returned value should be incremented by 1...<NEW_LINE>// and this will prove that we did obtain a valid BeanReference using EJBLink, with a beanInterface and a precise variable type.<NEW_LINE>int newValue = beanReference.methodNOTonAnyInterface(1);<NEW_LINE>;<NEW_LINE>// set static variable for work completed to true<NEW_LINE>NoInterfaceBean2.asyncWorkDone = true;<NEW_LINE>// Return the new value<NEW_LINE>return new AsyncResult<Integer>(new Integer(newValue));<NEW_LINE>}
info("threadId: " + NoInterfaceBean2.beanThreadId);
1,100,144
public OResultSet executeSimple(OServerCommandContext ctx) {<NEW_LINE>OSystemDatabase systemDb = ctx.getServer().getSystemDatabase();<NEW_LINE>OResultInternal result = new OResultInternal();<NEW_LINE>result.setProperty("operation", "exists system user");<NEW_LINE>if (name != null) {<NEW_LINE>result.setProperty("name", name.getStringValue());<NEW_LINE>} else {<NEW_LINE>result.setProperty("name", nameParam.getValue(ctx.getInputParameters()));<NEW_LINE>}<NEW_LINE>systemDb.executeWithDB((db) -> {<NEW_LINE>List<Object> params = new ArrayList<>();<NEW_LINE>if (name != null) {<NEW_LINE>params.add(name.getStringValue());<NEW_LINE>} else {<NEW_LINE>params.add(nameParam.getValue<MASK><NEW_LINE>}<NEW_LINE>// INSERT INTO OUser SET<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("SELECT FROM OUser WHERE name = ?");<NEW_LINE>try (OResultSet rs = db.command(sb.toString(), params.toArray())) {<NEW_LINE>if (rs.hasNext()) {<NEW_LINE>result.setProperty("exists", true);<NEW_LINE>} else {<NEW_LINE>result.setProperty("exists", false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>OInternalResultSet rs = new OInternalResultSet();<NEW_LINE>rs.add(result);<NEW_LINE>return rs;<NEW_LINE>}
(ctx.getInputParameters()));
1,744,368
public void actionPerformed(ActionEvent e) {<NEW_LINE>final <MASK><NEW_LINE>final IMapSelection selection = Controller.getCurrentController().getSelection();<NEW_LINE>if (centeredNodeId == null) {<NEW_LINE>final NodeModel selected = selection.getSelected();<NEW_LINE>if (selected != null) {<NEW_LINE>UndoableSlide.of(slide).setPlacedNodeId(selected.getID());<NEW_LINE>setNodePlacementControlsEnabled(true, slide.getPlacedNodePosition());<NEW_LINE>} else {<NEW_LINE>UndoableSlide.of(slide).setPlacedNodeId(null);<NEW_LINE>setNodePlacementControlsEnabled(false, slide.getPlacedNodePosition());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>UndoableSlide.of(slide).setPlacedNodeId(null);<NEW_LINE>setNodePlacementControlsEnabled(false, slide.getPlacedNodePosition());<NEW_LINE>final MapModel map = Controller.getCurrentController().getMap();<NEW_LINE>final NodeModel node = map.getNodeForID(centeredNodeId);<NEW_LINE>if (node != null)<NEW_LINE>selection.selectAsTheOnlyOneSelected(node);<NEW_LINE>}<NEW_LINE>checkBoxOnlySpecificNodes.setSelected(slide.getPlacedNodeId() != null);<NEW_LINE>}
String centeredNodeId = slide.getPlacedNodeId();
87,279
final ListScramSecretsResult executeListScramSecrets(ListScramSecretsRequest listScramSecretsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listScramSecretsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListScramSecretsRequest> request = null;<NEW_LINE>Response<ListScramSecretsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListScramSecretsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listScramSecretsRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Kafka");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListScramSecrets");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListScramSecretsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListScramSecretsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);
1,376,019
public void paintComponent(Graphics g) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>AffineTransform original = g2.getTransform();<NEW_LINE>configureDrawImageGraphics(g2);<NEW_LINE>// draw the image<NEW_LINE>BufferedImage img = this.img;<NEW_LINE>if (img != null) {<NEW_LINE>computeOffsetAndScale(img, adjustmentGUI);<NEW_LINE>scale = adjustmentGUI.scale;<NEW_LINE>offsetX = adjustmentGUI.offsetX;<NEW_LINE>offsetY = adjustmentGUI.offsetY;<NEW_LINE>if (scale == 1) {<NEW_LINE>g2.drawImage(img, (int) offsetX, (int) offsetY, this);<NEW_LINE>} else {<NEW_LINE>transform.setTransform(scale, 0, 0, scale, offsetX, offsetY);<NEW_LINE>g2.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>g2.setTransform(original);<NEW_LINE>}
drawImage(img, transform, null);
25,778
public static byte[] encodeSingleNullable(byte[] value, int prefixPadding, int suffixPadding) {<NEW_LINE>if (prefixPadding <= 0 && suffixPadding <= 0) {<NEW_LINE>if (value == null) {<NEW_LINE>return new byte[] { NULL_BYTE_LOW };<NEW_LINE>}<NEW_LINE>int length = value.length;<NEW_LINE>if (length == 0) {<NEW_LINE>return new byte[] { NOT_NULL_BYTE_HIGH };<NEW_LINE>}<NEW_LINE>byte[] dst = new byte[1 + length];<NEW_LINE>dst[0] = NOT_NULL_BYTE_HIGH;<NEW_LINE>System.arraycopy(value, <MASK><NEW_LINE>return dst;<NEW_LINE>}<NEW_LINE>if (value == null) {<NEW_LINE>byte[] dst = new byte[prefixPadding + 1 + suffixPadding];<NEW_LINE>dst[prefixPadding] = NULL_BYTE_LOW;<NEW_LINE>return dst;<NEW_LINE>}<NEW_LINE>int length = value.length;<NEW_LINE>byte[] dst = new byte[prefixPadding + 1 + length + suffixPadding];<NEW_LINE>dst[prefixPadding] = NOT_NULL_BYTE_HIGH;<NEW_LINE>System.arraycopy(value, 0, dst, prefixPadding + 1, length);<NEW_LINE>return dst;<NEW_LINE>}
0, dst, 1, length);
98,251
/*<NEW_LINE>* Attempt to parse the text the user has already typed in. This either succeeds, in<NEW_LINE>* which case we may propose to expand what she has typed, or it fails (most likely<NEW_LINE>* because this is not well formed), in which case we try to recover from the parsing<NEW_LINE>* failure and still add proposals.<NEW_LINE>*/<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>public List<CompletionProposal> complete(String dslStart, int detailLevel) {<NEW_LINE>List<CompletionProposal> <MASK><NEW_LINE>StreamDefinition streamDefinition = null;<NEW_LINE>try {<NEW_LINE>streamDefinition = new StreamDefinition("__dummy", dslStart);<NEW_LINE>this.streamDefinitionService.parse(streamDefinition);<NEW_LINE>} catch (Exception recoverable) {<NEW_LINE>for (RecoveryStrategy strategy : completionRecoveryStrategies) {<NEW_LINE>if (strategy.shouldTrigger(dslStart, recoverable)) {<NEW_LINE>strategy.addProposals(dslStart, recoverable, detailLevel, collector);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return collector;<NEW_LINE>}<NEW_LINE>for (ExpansionStrategy strategy : completionExpansionStrategies) {<NEW_LINE>strategy.addProposals(dslStart, streamDefinition, detailLevel, collector);<NEW_LINE>}<NEW_LINE>return collector;<NEW_LINE>}
collector = new ArrayList<>();
351,388
private static void createPyMethods() {<NEW_LINE>String clazz = className.substring(className.lastIndexOf(".") + 1);<NEW_LINE>String[] docItems = null;<NEW_LINE>for (List<String> functionDoc : functionDocs) {<NEW_LINE>String function = functionDoc.get(0);<NEW_LINE>String docReturn = "";<NEW_LINE>Map<String, String> docParams = new LinkedHashMap<>();<NEW_LINE>String doc = functionDoc.get(1);<NEW_LINE>docItems = doc.split("\\n @");<NEW_LINE>if (docItems.length > 1) {<NEW_LINE>String pyDoc = docItems[0].substring(4);<NEW_LINE>for (int n = 1; n < docItems.length; n++) {<NEW_LINE>String item = docItems[n];<NEW_LINE>if (item.startsWith("return ")) {<NEW_LINE><MASK><NEW_LINE>} else if (item.startsWith("param ")) {<NEW_LINE>String[] strings = item.substring(6).split("\\s");<NEW_LINE>docParams.put(strings[0], item.substring(6 + strings[0].length() + 1));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>p("");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
docReturn = item.substring(7);
1,301,266
final GetByteMatchSetResult executeGetByteMatchSet(GetByteMatchSetRequest getByteMatchSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getByteMatchSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetByteMatchSetRequest> request = null;<NEW_LINE>Response<GetByteMatchSetResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetByteMatchSetRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getByteMatchSetRequest));<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, "WAF");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetByteMatchSet");<NEW_LINE>request.<MASK><NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetByteMatchSetResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetByteMatchSetResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);
1,198,302
final GetRestApisResult executeGetRestApis(GetRestApisRequest getRestApisRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRestApisRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetRestApisRequest> request = null;<NEW_LINE>Response<GetRestApisResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetRestApisRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(getRestApisRequest));<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, "API Gateway");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetRestApis");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetRestApisResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetRestApisResultJsonUnmarshaller());<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();
631,607
private void initComponents() {<NEW_LINE>jlAlternativeName = new JLabel(res.getString("DSubjectAlternativeName.jlAlternativeName.text"));<NEW_LINE>GridBagConstraints gbc_jlAlternativeName = new GridBagConstraints();<NEW_LINE>gbc_jlAlternativeName.gridx = 0;<NEW_LINE>gbc_jlAlternativeName.gridy = 1;<NEW_LINE>gbc_jlAlternativeName.gridwidth = 1;<NEW_LINE>gbc_jlAlternativeName.gridheight = 1;<NEW_LINE>gbc_jlAlternativeName.insets = new Insets(5, 5, 5, 5);<NEW_LINE>gbc_jlAlternativeName.anchor = GridBagConstraints.NORTHEAST;<NEW_LINE>jgnAlternativeName = new JGeneralNames(res.getString("DSubjectAlternativeName.AlternativeName.Title"));<NEW_LINE>jgnAlternativeName.setPreferredSize(new Dimension(400, 150));<NEW_LINE>GridBagConstraints gbc_jgnAlternativeName = new GridBagConstraints();<NEW_LINE>gbc_jgnAlternativeName.gridx = 1;<NEW_LINE>gbc_jgnAlternativeName.gridy = 1;<NEW_LINE>gbc_jgnAlternativeName.gridwidth = 1;<NEW_LINE>gbc_jgnAlternativeName.gridheight = 1;<NEW_LINE>gbc_jgnAlternativeName.insets = new Insets(5, 5, 5, 5);<NEW_LINE>gbc_jgnAlternativeName.anchor = GridBagConstraints.WEST;<NEW_LINE>jpSubjectAlternativeName = new JPanel(new GridBagLayout());<NEW_LINE>jpSubjectAlternativeName.setBorder(new CompoundBorder(new EmptyBorder(5, 5, 5, 5), new EtchedBorder()));<NEW_LINE>jpSubjectAlternativeName.add(jlAlternativeName, gbc_jlAlternativeName);<NEW_LINE>jpSubjectAlternativeName.add(jgnAlternativeName, gbc_jgnAlternativeName);<NEW_LINE>jbOK = new JButton<MASK><NEW_LINE>jbOK.addActionListener(evt -> okPressed());<NEW_LINE>jbCancel = new JButton(res.getString("DSubjectAlternativeName.jbCancel.text"));<NEW_LINE>jbCancel.addActionListener(evt -> cancelPressed());<NEW_LINE>jbCancel.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), CANCEL_KEY);<NEW_LINE>jbCancel.getActionMap().put(CANCEL_KEY, new AbstractAction() {<NEW_LINE><NEW_LINE>private static final long serialVersionUID = 1L;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent evt) {<NEW_LINE>cancelPressed();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>jpButtons = PlatformUtil.createDialogButtonPanel(jbOK, jbCancel);<NEW_LINE>getContentPane().setLayout(new BorderLayout());<NEW_LINE>getContentPane().add(jpSubjectAlternativeName, BorderLayout.CENTER);<NEW_LINE>getContentPane().add(jpButtons, BorderLayout.SOUTH);<NEW_LINE>addWindowListener(new WindowAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void windowClosing(WindowEvent evt) {<NEW_LINE>closeDialog();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>setResizable(false);<NEW_LINE>getRootPane().setDefaultButton(jbOK);<NEW_LINE>pack();<NEW_LINE>}
(res.getString("DSubjectAlternativeName.jbOK.text"));
933,135
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_mget" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>if (size < 4) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_mget" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>FtpClientImpl client = null;<NEW_LINE>SFtpClientImpl sclient = null;<NEW_LINE>String localFolder = null;<NEW_LINE>String remoteFolder = null;<NEW_LINE>ArrayList<String> remoteFiles = new ArrayList<String>();<NEW_LINE>boolean overwrite = option != null && option.indexOf("f") >= 0;<NEW_LINE>boolean ignore = option != null && option.indexOf("t") >= 0;<NEW_LINE>if (ignore)<NEW_LINE>overwrite = false;<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>if (i == 0) {<NEW_LINE>if (param.getSub(i) == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_mget" <MASK><NEW_LINE>}<NEW_LINE>Object o = param.getSub(i).getLeafExpression().calculate(ctx);<NEW_LINE>if (o instanceof FtpClientImpl)<NEW_LINE>client = (FtpClientImpl) o;<NEW_LINE>else if (o instanceof SFtpClientImpl)<NEW_LINE>sclient = (SFtpClientImpl) o;<NEW_LINE>else<NEW_LINE>throw new RQException("first parameter is not ftp_client");<NEW_LINE>} else if (i == 1) {<NEW_LINE>if (param.getSub(i) == null) {<NEW_LINE>remoteFolder = null;<NEW_LINE>} else<NEW_LINE>remoteFolder = (String) param.getSub(i).getLeafExpression().calculate(ctx);<NEW_LINE>} else if (i == 2) {<NEW_LINE>if (param.getSub(i) == null) {<NEW_LINE>localFolder = null;<NEW_LINE>} else<NEW_LINE>localFolder = (String) param.getSub(i).getLeafExpression().calculate(ctx);<NEW_LINE>} else {<NEW_LINE>remoteFiles.add((String) param.getSub(i).getLeafExpression().calculate(ctx));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Sequence r = null;<NEW_LINE>try {<NEW_LINE>if (client != null)<NEW_LINE>r = client.mget(localFolder, remoteFolder, remoteFiles, overwrite, ignore);<NEW_LINE>else<NEW_LINE>// r = sclient.mget(remote,localFile.getLocalFile().file().getAbsolutePath());<NEW_LINE>throw new RQException("ftp_mget for sftp is not implementing.");<NEW_LINE>} catch (Exception e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>throw new RQException("ftp_mget : " + e.getMessage());<NEW_LINE>}<NEW_LINE>return r;<NEW_LINE>}
+ mm.getMessage("function.invalidParam"));
1,727,583
public void onMatch(RelOptRuleCall call) {<NEW_LINE>final Aggregate aggregate = call.rel(0);<NEW_LINE>final Project project = call.rel(1);<NEW_LINE>final RexBuilder rexBuilder = aggregate.getCluster().getRexBuilder();<NEW_LINE>final List<AggregateCall> newCalls = new ArrayList<>(aggregate.getAggCallList().size());<NEW_LINE>final List<RexNode> newProjects = new ArrayList<>(project.getProjects());<NEW_LINE>final List<RexNode> <MASK><NEW_LINE>for (int fieldNumber : aggregate.getGroupSet()) {<NEW_LINE>newCasts.add(rexBuilder.makeInputRef(project.getProjects().get(fieldNumber).getType(), fieldNumber));<NEW_LINE>}<NEW_LINE>for (AggregateCall aggregateCall : aggregate.getAggCallList()) {<NEW_LINE>AggregateCall newCall = transform(aggregateCall, project, newProjects);<NEW_LINE>// Possibly CAST the new aggregator to an appropriate type.<NEW_LINE>final int i = newCasts.size();<NEW_LINE>final RelDataType oldType = aggregate.getRowType().getFieldList().get(i).getType();<NEW_LINE>if (newCall == null) {<NEW_LINE>newCalls.add(aggregateCall);<NEW_LINE>newCasts.add(rexBuilder.makeInputRef(oldType, i));<NEW_LINE>} else {<NEW_LINE>newCalls.add(newCall);<NEW_LINE>newCasts.add(rexBuilder.makeCast(oldType, rexBuilder.makeInputRef(newCall.getType(), i)));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (newCalls.equals(aggregate.getAggCallList())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final RelBuilder relBuilder = call.builder().push(project.getInput()).project(newProjects);<NEW_LINE>final RelBuilder.GroupKey groupKey = relBuilder.groupKey(aggregate.getGroupSet(), aggregate.getGroupSets());<NEW_LINE>relBuilder.aggregate(groupKey, newCalls).convert(aggregate.getRowType(), false);<NEW_LINE>call.transformTo(relBuilder.build());<NEW_LINE>call.getPlanner().setImportance(aggregate, 0.0);<NEW_LINE>}
newCasts = new ArrayList<>();
1,283,905
public void launch(GhidraApplicationLayout layout, String[] args) throws IOException {<NEW_LINE>Application.initializeApplication(layout, new HeadlessGhidraApplicationConfiguration());<NEW_LINE>if (args.length == 0) {<NEW_LINE>usage(args);<NEW_LINE>}<NEW_LINE>File outputFile = null;<NEW_LINE>File srczip = null;<NEW_LINE>File extraBinDir = null;<NEW_LINE>String mainClassArg = null;<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>String arg = args[i];<NEW_LINE>if (arg.equals("-output")) {<NEW_LINE>if (i == args.length - 1) {<NEW_LINE>usage(args);<NEW_LINE>}<NEW_LINE>outputFile = new File(args[++i]);<NEW_LINE>} else if (arg.equals("-srczip")) {<NEW_LINE>if (i == args.length - 1) {<NEW_LINE>usage(args);<NEW_LINE>}<NEW_LINE>srczip = new File(args[++i]);<NEW_LINE>} else if (arg.equals("-bin")) {<NEW_LINE>if (i == args.length - 1) {<NEW_LINE>usage(args);<NEW_LINE>}<NEW_LINE>extraBinDir = new File(args[++i]);<NEW_LINE>} else if (arg.equals("-main")) {<NEW_LINE>if (i == args.length - 1) {<NEW_LINE>usage(args);<NEW_LINE>}<NEW_LINE>mainClassArg = args[++i];<NEW_LINE>} else {<NEW_LINE>usage(args);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (outputFile == null) {<NEW_LINE>outputFile = new File("ghidra.jar");<NEW_LINE>}<NEW_LINE>System.out.println("Output file = " + outputFile);<NEW_LINE>if (srczip != null) {<NEW_LINE>System.out.println("Source Zip File = " + srczip);<NEW_LINE>}<NEW_LINE>if (extraBinDir != null) {<NEW_LINE>System.<MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>GhidraJarBuilder builder = new GhidraJarBuilder(layout);<NEW_LINE>if (mainClassArg != null) {<NEW_LINE>builder.setMainClass(mainClassArg);<NEW_LINE>}<NEW_LINE>builder.addExcludedFileExtension(".pdf");<NEW_LINE>// builder.addExcludedFileExtension(".htm");<NEW_LINE>// builder.addExcludedFileExtension(".html");<NEW_LINE>// builder.addAllModules();<NEW_LINE>List<ApplicationModule> moduleList = builder.getIncludedModules();<NEW_LINE>for (ApplicationModule module : moduleList) {<NEW_LINE>System.out.println("Include " + module.getName());<NEW_LINE>}<NEW_LINE>moduleList = builder.getExcludedModules();<NEW_LINE>for (ApplicationModule module : moduleList) {<NEW_LINE>System.out.println("Exclude " + module.getName());<NEW_LINE>}<NEW_LINE>builder.buildJar(outputFile, extraBinDir, TaskMonitor.DUMMY);<NEW_LINE>if (srczip != null) {<NEW_LINE>builder.buildSrcZip(srczip, TaskMonitor.DUMMY);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>System.err.println("Exception build ghidra jar");<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>System.out.println("Done");<NEW_LINE>}
out.println("Extra Bin Dir = " + extraBinDir);
899,836
public CodegenExpression make(CodegenMethodScope parent, CodegenClassScope classScope) {<NEW_LINE>CodegenMethod method = parent.makeChild(ScheduleSpec.EPTYPE, this.getClass(), classScope);<NEW_LINE>CodegenExpressionRef spec = ref("spec");<NEW_LINE>method.getBlock().declareVarNewInstance(ScheduleSpec.EPTYPE, spec.getRef());<NEW_LINE>if (optionalTimeZone != null) {<NEW_LINE>method.getBlock().exprDotMethod(spec, "setOptionalTimeZone", constant(optionalTimeZone));<NEW_LINE>}<NEW_LINE>for (ScheduleUnit unit : unitValues.keySet()) {<NEW_LINE>SortedSet<Integer> values = unitValues.get(unit);<NEW_LINE>CodegenExpression valuesExpr = constantNull();<NEW_LINE>if (values != null) {<NEW_LINE>valuesExpr = newInstance(EPTypePremade.TREESET.getEPType(), staticMethod(Arrays.class, "asList", constant(IntArrayUtil.toBoxedArray(values))));<NEW_LINE>}<NEW_LINE>method.getBlock().expression(exprDotMethodChain(spec).add("getUnitValues").add("put", constant(unit), valuesExpr));<NEW_LINE>}<NEW_LINE>if (optionalDayOfWeekOperator != null) {<NEW_LINE>method.getBlock().exprDotMethod(spec, "setOptionalDayOfWeekOperator", optionalDayOfWeekOperator.make());<NEW_LINE>}<NEW_LINE>if (optionalDayOfMonthOperator != null) {<NEW_LINE>method.getBlock().exprDotMethod(spec, <MASK><NEW_LINE>}<NEW_LINE>method.getBlock().methodReturn(spec);<NEW_LINE>return localMethod(method);<NEW_LINE>}
"setOptionalDayOfMonthOperator", optionalDayOfMonthOperator.make());
665,422
public MultipleObjectsBundle filter(MultipleObjectsBundle objects) {<NEW_LINE>final int size = objects.dataLength();<NEW_LINE>if (size == 0) {<NEW_LINE>return objects;<NEW_LINE>}<NEW_LINE>MultipleObjectsBundle bundle = new MultipleObjectsBundle();<NEW_LINE>for (int r = 0; r < objects.metaLength(); r++) {<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>SimpleTypeInformation<Object> type = (SimpleTypeInformation<Object>) objects.meta(r);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final List<Object> column = (List<Object>) objects.getColumn(r);<NEW_LINE>if (!dist.getInputTypeRestriction().isAssignableFromType(type)) {<NEW_LINE><MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Get the replacement type information<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>final List<I> castColumn = (List<I>) column;<NEW_LINE>bundle.appendColumn(new VectorFieldTypeInformation<>(factory, tdim), castColumn);<NEW_LINE>StepProgress prog = LOG.isVerbose() ? new StepProgress("Classic MDS", 2) : null;<NEW_LINE>// Compute distance matrix.<NEW_LINE>LOG.beginStep(prog, 1, "Computing distance matrix");<NEW_LINE>double[][] mat = computeSquaredDistanceMatrix(castColumn, dist);<NEW_LINE>doubleCenterSymmetric(mat);<NEW_LINE>// Find eigenvectors.<NEW_LINE>{<NEW_LINE>LOG.beginStep(prog, 2, "Computing singular value decomposition");<NEW_LINE>SingularValueDecomposition svd = new SingularValueDecomposition(mat);<NEW_LINE>double[][] u = svd.getU();<NEW_LINE>double[] lambda = svd.getSingularValues();<NEW_LINE>// Undo squared, unless we were given a squared distance function:<NEW_LINE>if (!dist.isSquared()) {<NEW_LINE>for (int i = 0; i < tdim; i++) {<NEW_LINE>lambda[i] = Math.sqrt(Math.abs(lambda[i]));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double[] buf = new double[tdim];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>double[] row = u[i];<NEW_LINE>for (int x = 0; x < buf.length; x++) {<NEW_LINE>buf[x] = lambda[x] * row[x];<NEW_LINE>}<NEW_LINE>column.set(i, factory.newNumberVector(buf));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOG.setCompleted(prog);<NEW_LINE>}<NEW_LINE>return bundle;<NEW_LINE>}
bundle.appendColumn(type, column);
227,049
public void refresh() {<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>Pack p = null;<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>ListValue objHashLv = AgentModelThread.getInstance().getLiveObjHashLV(serverId, CounterConstants.MARIA_PLUGIN);<NEW_LINE>if (objHashLv.size() > 0) {<NEW_LINE>param.put("objHash", objHashLv);<NEW_LINE>p = tcp.getSingle(RequestCmd.DB_REALTIME_HIT_RATIO, param);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>ConsoleProxy.errorSafe(e.toString());<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>if (p == null) {<NEW_LINE>ExUtil.exec(canvas, new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>setTitleImage(Images.inactive);<NEW_LINE>long <MASK><NEW_LINE>long stime = now - TIME_RANGE;<NEW_LINE>xyGraph.primaryXAxis.setRange(stime, now + 1);<NEW_LINE>xyGraph.primaryYAxis.setRange(0, 100);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>final MapPack m = (MapPack) p;<NEW_LINE>ExUtil.exec(canvas, new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>long now = TimeUtil.getCurrentTime(serverId);<NEW_LINE>long stime = now - TIME_RANGE;<NEW_LINE>xyGraph.primaryXAxis.setRange(stime, now + 1);<NEW_LINE>xyGraph.primaryYAxis.setRange(0, 100);<NEW_LINE>if (m.size() == 0) {<NEW_LINE>setTitleImage(Images.inactive);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>setTitleImage(Images.active);<NEW_LINE>float innodb_buf = m.getFloat("innodb_buffer");<NEW_LINE>float key_cache = m.getFloat("key_cache");<NEW_LINE>float query_cache = m.getFloat("query_cache");<NEW_LINE>float thread_cache = m.getFloat("thread_cache");<NEW_LINE>((CircularBufferDataProvider) innoBufTrace.getDataProvider()).addSample(new Sample(now, innodb_buf));<NEW_LINE>((CircularBufferDataProvider) keyCacheTrace.getDataProvider()).addSample(new Sample(now, key_cache));<NEW_LINE>((CircularBufferDataProvider) queryCacheTrace.getDataProvider()).addSample(new Sample(now, query_cache));<NEW_LINE>((CircularBufferDataProvider) threadCacheTrace.getDataProvider()).addSample(new Sample(now, thread_cache));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
now = TimeUtil.getCurrentTime(serverId);
1,626,454
protected boolean beforeDelete() {<NEW_LINE>// Clean own index<NEW_LINE>MIndex.cleanUp(get_TrxName(), getAD_Client_ID(), get_Table_ID(), get_ID());<NEW_LINE>// Clean ElementIndex<NEW_LINE>MContainerElement[] theseElements = getAllElements();<NEW_LINE>if (theseElements != null) {<NEW_LINE>for (int i = 0; i < theseElements.length; i++) {<NEW_LINE>theseElements[i].delete(false);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>StringBuffer sb = new StringBuffer("DELETE FROM AD_TreeNodeCMC ").append(" WHERE Node_ID=").append(get_ID()).append(" AND AD_Tree_ID=").append(getAD_Tree_ID());<NEW_LINE>int no = DB.executeUpdate(sb.toString(), get_TrxName());<NEW_LINE>if (no > 0)<NEW_LINE>log.<MASK><NEW_LINE>else<NEW_LINE>log.warn("#" + no + " - TreeType=CMC");<NEW_LINE>return no > 0;<NEW_LINE>}
debug("#" + no + " - TreeType=CMC");
1,744,740
private void init(Context context, AttributeSet attributeSet) {<NEW_LINE>final TypedArray attributes = context.obtainStyledAttributes(attributeSet, R.styleable.ContributorsView, 0, 0);<NEW_LINE>if (attributes != null) {<NEW_LINE>final View layout = LayoutInflater.from(context).inflate(<MASK><NEW_LINE>NetworkImageView networkImageView = layout.findViewById(R.id.image);<NEW_LINE>String url = attributes.getString(R.styleable.ContributorsView_profile_url);<NEW_LINE>networkImageView.setImageUrl(url);<NEW_LINE>String name = attributes.getString(R.styleable.ContributorsView_profile_name);<NEW_LINE>TextView title = layout.findViewById(R.id.title);<NEW_LINE>title.setText(name);<NEW_LINE>String summary = attributes.getString(R.styleable.ContributorsView_profile_summary);<NEW_LINE>TextView text = layout.findViewById(R.id.text);<NEW_LINE>text.setText(summary);<NEW_LINE>String link = attributes.getString(R.styleable.ContributorsView_profile_link);<NEW_LINE>layout.setOnClickListener(v -> {<NEW_LINE>if (link == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>openUrl((Activity) getContext(), link);<NEW_LINE>});<NEW_LINE>attributes.recycle();<NEW_LINE>}<NEW_LINE>}
R.layout.item_contributor, this);
1,204,577
protected ObjectNode.Builder createNodeBuilder() {<NEW_LINE>ObjectNode.Builder builder = Node.objectNodeBuilder();<NEW_LINE>if (!schemas.isEmpty()) {<NEW_LINE>builder.withMember("schemas", schemas.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, <MASK><NEW_LINE>}<NEW_LINE>if (!responses.isEmpty()) {<NEW_LINE>builder.withMember("responses", responses.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, Map.Entry::getValue)));<NEW_LINE>}<NEW_LINE>if (!parameters.isEmpty()) {<NEW_LINE>builder.withMember("parameters", parameters.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, Map.Entry::getValue)));<NEW_LINE>}<NEW_LINE>if (!requestBodies.isEmpty()) {<NEW_LINE>builder.withMember("requestBodies", requestBodies.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, Map.Entry::getValue)));<NEW_LINE>}<NEW_LINE>if (!headers.isEmpty()) {<NEW_LINE>builder.withMember("headers", headers.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, Map.Entry::getValue)));<NEW_LINE>}<NEW_LINE>if (!securitySchemes.isEmpty()) {<NEW_LINE>builder.withMember("securitySchemes", securitySchemes.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, Map.Entry::getValue)));<NEW_LINE>}<NEW_LINE>if (!links.isEmpty()) {<NEW_LINE>builder.withMember("links", links.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, Map.Entry::getValue)));<NEW_LINE>}<NEW_LINE>if (!callbacks.isEmpty()) {<NEW_LINE>builder.withMember("callbacks", callbacks.entrySet().stream().collect(ObjectNode.collectStringKeys(Map.Entry::getKey, Map.Entry::getValue)));<NEW_LINE>}<NEW_LINE>return builder;<NEW_LINE>}
Map.Entry::getValue)));
1,187,541
/*<NEW_LINE>* testCMTRequiredRollback()<NEW_LINE>*<NEW_LINE>* MTX19 - CMT's onMsg() with 'Required', the Tx is not committed (DB update is not commited)<NEW_LINE>*/<NEW_LINE>public void testXMLCMTRequiredRollback() throws Exception {<NEW_LINE><MASK><NEW_LINE>FATMDBHelper.putQueueMessage("CMT ROLLBACK", qcfName, cmtRequiredRequestQueueName);<NEW_LINE>String results = (String) FATMDBHelper.getQueueMessage(qcfName, testResultQueueName);<NEW_LINE>if (results == null) {<NEW_LINE>fail("Reply is an empty vector. No test results are collected.");<NEW_LINE>}<NEW_LINE>if (results.equals("")) {<NEW_LINE>fail("No worthwhile results were returned.");<NEW_LINE>}<NEW_LINE>if (results.contains("FAIL")) {<NEW_LINE>svLogger.info(results);<NEW_LINE>fail("Reply contained FAIL keyword. Look at client log for full result text.");<NEW_LINE>}<NEW_LINE>FATMDBHelper.emptyQueue(qcfName, cmtRequiredRequestQueueName);<NEW_LINE>svLogger.info("checking data for CMTTxRollback ...");<NEW_LINE>svLogger.info("Test Point: CMTTxRollback getIntValue: " + CMTBeanRequired.rollbackBean.getIntValue());<NEW_LINE>assertTrue("CMTTxRollback", (CMTBeanRequired.rollbackBean.getIntValue() == 0));<NEW_LINE>}
FATMDBHelper.emptyQueue(qcfName, testResultQueueName);
499,985
void calc(FastDistanceVectorData left, FastDistanceSparseData right, double[] res) {<NEW_LINE>Arrays.fill(res, 0.0);<NEW_LINE>int[][] rightIndices = right.getIndices();<NEW_LINE>double[][] rightValues = right.getValues();<NEW_LINE>if (left.getVector() instanceof DenseVector) {<NEW_LINE>double[] leftData = ((DenseVector) left.getVector()).getData();<NEW_LINE>for (int i = 0; i < leftData.length; i++) {<NEW_LINE>if (null != rightIndices[i]) {<NEW_LINE>for (int j = 0; j < rightIndices[i].length; j++) {<NEW_LINE>res[rightIndices[i][j]] = res[rightIndices[i][j]] - Math.abs(rightValues[i][j]) - Math.abs(leftData[i]) + Math.abs(rightValues[i][j] - leftData[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>SparseVector vector = (SparseVector) left.getVector();<NEW_LINE>int[] indices = vector.getIndices();<NEW_LINE>double[] values = vector.getValues();<NEW_LINE>for (int i = 0; i < indices.length; i++) {<NEW_LINE>if (null != rightIndices[indices[i]]) {<NEW_LINE>for (int j = 0; j < rightIndices[indices[i]].length; j++) {<NEW_LINE>res[rightIndices[indices[i]][j]] = res[rightIndices[indices[i]][j]] - Math.abs(rightValues[indices[i]][j]) - Math.abs(values[i]) + Math.abs(rightValues[indices[i]][j] - values[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>double[] rightLabel = right<MASK><NEW_LINE>double leftLabel = left.label.get(0);<NEW_LINE>for (int i = 0; i < res.length; i++) {<NEW_LINE>res[i] += rightLabel[i] + leftLabel;<NEW_LINE>}<NEW_LINE>}
.getLabel().getData();
1,458,839
public final void expand() {<NEW_LINE>if (popup != null || !source.isEnabled())<NEW_LINE>return;<NEW_LINE>Content content = prepare(source, onShow);<NEW_LINE>JComponent component = content.getContentComponent();<NEW_LINE><MASK><NEW_LINE>if (size.width - 50 < source.getWidth())<NEW_LINE>size.width = source.getWidth();<NEW_LINE>if (size.height < 2 * source.getHeight())<NEW_LINE>size.height = 2 * source.getHeight();<NEW_LINE>Point location = new Point(0, 0);<NEW_LINE>SwingUtilities.convertPointToScreen(location, source);<NEW_LINE>Rectangle screen = ScreenUtil.getScreenRectangle(source);<NEW_LINE>int bottom = screen.y - location.y + screen.height;<NEW_LINE>if (bottom < size.height) {<NEW_LINE>int top = location.y - screen.y + source.getHeight();<NEW_LINE>if (top < bottom) {<NEW_LINE>size.height = bottom;<NEW_LINE>} else {<NEW_LINE>if (size.height > top)<NEW_LINE>size.height = top;<NEW_LINE>location.y -= size.height - source.getHeight();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>component.setPreferredSize(size);<NEW_LINE>// this creates a popup as a dialog with alwaysOnTop=false<NEW_LINE>popup = JBPopupFactory.getInstance().createComponentPopupBuilder(component, content.getFocusableComponent()).setMayBeParent(true).setFocusable(true).setRequestFocus(true).setTitle(title).setAdText(comment).setLocateByContent(true).setCancelOnWindowDeactivation(false).setKeyboardActions(singletonList(Pair.create(event -> {<NEW_LINE>collapse();<NEW_LINE>Window window = UIUtil.getWindow(source);<NEW_LINE>if (window != null) {<NEW_LINE>window.dispatchEvent(new KeyEvent(source, KeyEvent.KEY_PRESSED, System.currentTimeMillis(), CTRL_MASK, KeyEvent.VK_ENTER, '\r'));<NEW_LINE>}<NEW_LINE>}, getKeyStroke(KeyEvent.VK_ENTER, CTRL_MASK)))).setCancelCallback(() -> {<NEW_LINE>try {<NEW_LINE>content.cancel(onHide);<NEW_LINE>popup = null;<NEW_LINE>return true;<NEW_LINE>} catch (Exception ignore) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}).createPopup();<NEW_LINE>popup.show(new RelativePoint(location));<NEW_LINE>}
Dimension size = component.getPreferredSize();
1,730,077
protected void configure(FilterRegistration.Dynamic registration) {<NEW_LINE>super.configure(registration);<NEW_LINE>EnumSet<MASK><NEW_LINE>if (dispatcherTypes == null) {<NEW_LINE>T filter = getFilter();<NEW_LINE>if (ClassUtils.isPresent("org.springframework.web.filter.OncePerRequestFilter", filter.getClass().getClassLoader()) && filter instanceof OncePerRequestFilter) {<NEW_LINE>dispatcherTypes = EnumSet.allOf(DispatcherType.class);<NEW_LINE>} else {<NEW_LINE>dispatcherTypes = EnumSet.of(DispatcherType.REQUEST);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<String> servletNames = new LinkedHashSet<>();<NEW_LINE>for (ServletRegistrationBean<?> servletRegistrationBean : this.servletRegistrationBeans) {<NEW_LINE>servletNames.add(servletRegistrationBean.getServletName());<NEW_LINE>}<NEW_LINE>servletNames.addAll(this.servletNames);<NEW_LINE>if (servletNames.isEmpty() && this.urlPatterns.isEmpty()) {<NEW_LINE>registration.addMappingForUrlPatterns(dispatcherTypes, this.matchAfter, DEFAULT_URL_MAPPINGS);<NEW_LINE>} else {<NEW_LINE>if (!servletNames.isEmpty()) {<NEW_LINE>registration.addMappingForServletNames(dispatcherTypes, this.matchAfter, StringUtils.toStringArray(servletNames));<NEW_LINE>}<NEW_LINE>if (!this.urlPatterns.isEmpty()) {<NEW_LINE>registration.addMappingForUrlPatterns(dispatcherTypes, this.matchAfter, StringUtils.toStringArray(this.urlPatterns));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
<DispatcherType> dispatcherTypes = this.dispatcherTypes;
1,602,840
public void saveData(LdapDirectorySettings settings) {<NEW_LINE>settings.setName(this.nameField.getText());<NEW_LINE>settings.setHostname(hostnameField.getText());<NEW_LINE>if (encryptionBox.isSelected()) {<NEW_LINE>settings.setEncryption(Encryption.SSL);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// auth simple/none<NEW_LINE>switch(authList.getSelectedIndex()) {<NEW_LINE>case 0:<NEW_LINE>settings.setAuth(Auth.NONE);<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>settings.setAuth(Auth.SIMPLE);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>settings.setPort(((Integer) this.portSpinner.getValue()).intValue());<NEW_LINE>settings.setBindDN(this.bindDNField.getText());<NEW_LINE>settings.setPassword(new String(this.passwordField.getPassword()));<NEW_LINE>settings.setBaseDN(this.baseDNField.getText());<NEW_LINE>switch(scopeList.getSelectedIndex()) {<NEW_LINE>case 0:<NEW_LINE>settings.setScope(Scope.SUB);<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>settings.setScope(Scope.ONE);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>settings.setMailSearchFields(mergeString(mailField.getText()));<NEW_LINE>settings.setMailSuffix(mailSuffixField.getText());<NEW_LINE>settings.setWorkPhoneSearchFields(mergeString(workPhoneField.getText()));<NEW_LINE>settings.setMobilePhoneSearchFields(mergeString(mobilePhoneField.getText()));<NEW_LINE>settings.setHomePhoneSearchFields(mergeString(homePhoneField.getText()));<NEW_LINE>settings.setGlobalPhonePrefix(prefixField.getText());<NEW_LINE>settings.setQueryMode(rdoCustomQuery.isSelected() ? "custom" : null);<NEW_LINE>settings.setCustomQuery(txtCustomQuery.getText());<NEW_LINE>settings.setMangleQuery(chkMangleQuery.isSelected());<NEW_LINE>settings.setPhotoInline(chkPhotoInline.isSelected());<NEW_LINE>}
settings.setEncryption(Encryption.CLEAR);
734,127
public void process() throws BimserverDatabaseException, UserException, ServerException {<NEW_LINE>DatabaseSession session = getBimServer().getDatabase(<MASK><NEW_LINE>try {<NEW_LINE>Project project = session.get(StorePackage.eINSTANCE.getProject(), poid, OldQuery.getDefault());<NEW_LINE>for (Service service : project.getServices()) {<NEW_LINE>if (soid == -1 || service.getOid() == soid) {<NEW_LINE>triggerNewExtendedData(session, getBimServer().getNotificationsManager(), getBimServer(), getBimServer().getNotificationsManager().getSiteAddress(), project, roid, Trigger.NEW_EXTENDED_DATA, service);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (soid == -1) {<NEW_LINE>// Only execute if we are not triggering a specific service with this notification<NEW_LINE>NewExtendedDataOnRevisionTopic topic = getBimServer().getNotificationsManager().getNewExtendedDataOnRevisionTopic(new NewExtendedDataOnRevisionTopicKey(roid));<NEW_LINE>if (topic != null) {<NEW_LINE>topic.process(this);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>session.close();<NEW_LINE>}<NEW_LINE>}
).createSession(OperationType.READ_ONLY);
682,585
private Property createProperty(final ConfigObject conf) {<NEW_LINE>Property property = new Property();<NEW_LINE>// Database name must be set<NEW_LINE>if (!conf.containsKey(NAME_CONFIG_KEY)) {<NEW_LINE>throw new IllegalArgumentException("[storage.properties] database name must be set.");<NEW_LINE>}<NEW_LINE>property.setName(conf.get(NAME_CONFIG_KEY).unwrapped().toString());<NEW_LINE>// Check writable permission of path<NEW_LINE>if (conf.containsKey(PATH_CONFIG_KEY)) {<NEW_LINE>String path = conf.get(PATH_CONFIG_KEY).unwrapped().toString();<NEW_LINE>File file = new File(path);<NEW_LINE>if (!file.exists() && !file.mkdirs()) {<NEW_LINE>throw new IllegalArgumentException("[storage.properties] can not create storage path: " + path);<NEW_LINE>}<NEW_LINE>if (!file.canWrite()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>property.setPath(path);<NEW_LINE>}<NEW_LINE>// Check, get and set fields of Options<NEW_LINE>Options dbOptions = newDefaultDbOptions(property.getName());<NEW_LINE>setIfNeeded(conf, dbOptions);<NEW_LINE>property.setDbOptions(dbOptions);<NEW_LINE>return property;<NEW_LINE>}
throw new IllegalArgumentException("[storage.properties] permission denied to write to: " + path);
86,430
public Text createText(Expression expression, FormatToExpression format) {<NEW_LINE>if (expression instanceof Variable) {<NEW_LINE>String ident = ((Variable) expression).getIdentifier();<NEW_LINE>return formatIdent(ident);<NEW_LINE>} else if (expression instanceof Constant) {<NEW_LINE>String value = format.constant(((Constant) expression).getValue());<NEW_LINE>return new Simple(value);<NEW_LINE>} else if (expression instanceof Operation.And) {<NEW_LINE>return createOperationText((Operation) expression, format.getAndString(), format);<NEW_LINE>} else if (expression instanceof Operation.Or) {<NEW_LINE>return createOperationText((Operation) expression, format.getOrString(), format);<NEW_LINE>} else if (expression instanceof Operation.XOr) {<NEW_LINE>return createOperationText((Operation) expression, format.getXorString(), format);<NEW_LINE>} else if (expression instanceof Not) {<NEW_LINE>return new Decorate(createText(((Not) expression).getExpression(), format), Decorate.Style.OVERLINE);<NEW_LINE>} else if (expression instanceof NamedExpression) {<NEW_LINE>NamedExpression ne = (NamedExpression) expression;<NEW_LINE>Sentence s = new Sentence();<NEW_LINE>s.add(formatIdent(ne.getName()));<NEW_LINE>s.add(Blank.BLANK);<NEW_LINE>s.add(new Simple(format.getEqual()));<NEW_LINE>s.add(Blank.BLANK);<NEW_LINE>s.add(createText(ne<MASK><NEW_LINE>return s;<NEW_LINE>} else<NEW_LINE>return new Simple(expression.toString());<NEW_LINE>}
.getExpression(), format));
791,282
public void execute() {<NEW_LINE>final DialogBox db = new DialogBox(false, true);<NEW_LINE>db.setText("About MIT App Inventor");<NEW_LINE>db.setStyleName("ode-DialogBox");<NEW_LINE>db.setHeight("200px");<NEW_LINE>db.setWidth("400px");<NEW_LINE>db.setGlassEnabled(true);<NEW_LINE>db.setAnimationEnabled(true);<NEW_LINE>db.center();<NEW_LINE>VerticalPanel DialogBoxContents = new VerticalPanel();<NEW_LINE>String html = MESSAGES.gitBuildId(GitBuildId.getDate(), GitBuildId.getVersion()) + "<BR/>" + MESSAGES.useCompanion(YaVersion.PREFERRED_COMPANION, YaVersion.PREFERRED_COMPANION + "u") + "<BR/>" + MESSAGES.targetSdkVersion(YaVersion.TARGET_SDK_VERSION, YaVersion.TARGET_ANDROID_VERSION);<NEW_LINE>Config config = Ode<MASK><NEW_LINE>String releaseNotesUrl = config.getReleaseNotesUrl();<NEW_LINE>if (!Strings.isNullOrEmpty(releaseNotesUrl)) {<NEW_LINE>html += "<BR/><BR/>Please see <a href=\"" + releaseNotesUrl + "\" target=\"_blank\">release notes</a>";<NEW_LINE>}<NEW_LINE>String tosUrl = config.getTosUrl();<NEW_LINE>if (!Strings.isNullOrEmpty(tosUrl)) {<NEW_LINE>html += "<BR/><BR/><a href=\"" + tosUrl + "\" target=\"_blank\">" + MESSAGES.privacyTermsLink() + "</a>";<NEW_LINE>}<NEW_LINE>HTML message = new HTML(html);<NEW_LINE>SimplePanel holder = new SimplePanel();<NEW_LINE>Button ok = new Button("Close");<NEW_LINE>ok.addClickListener(new ClickListener() {<NEW_LINE><NEW_LINE>public void onClick(Widget sender) {<NEW_LINE>db.hide();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>holder.add(ok);<NEW_LINE>DialogBoxContents.add(message);<NEW_LINE>DialogBoxContents.add(holder);<NEW_LINE>db.setWidget(DialogBoxContents);<NEW_LINE>db.show();<NEW_LINE>}
.getInstance().getSystemConfig();
1,429,567
protected int registerEvent(long oclEventId, EventDescriptor descriptorId, OCLCommandQueue queue) {<NEW_LINE>if (retain.get(eventIndex)) {<NEW_LINE>findNextEventSlot();<NEW_LINE>}<NEW_LINE>final int currentEvent = eventIndex;<NEW_LINE>guarantee(!retain<MASK><NEW_LINE>if (oclEventId == -1) {<NEW_LINE>fatal("invalid event: event=0x%x, description=%s, tag=0x%x\n", oclEventId, descriptorId.getNameDescription());<NEW_LINE>fatal("terminating application as system integrity has been compromised.");<NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>if (events[currentEvent] > 0 && !retain.get(currentEvent)) {<NEW_LINE>internalEvent.setEventId(currentEvent, events[currentEvent]);<NEW_LINE>releaseEvent(currentEvent);<NEW_LINE>internalEvent.release();<NEW_LINE>}<NEW_LINE>events[currentEvent] = oclEventId;<NEW_LINE>descriptors[currentEvent] = descriptorId;<NEW_LINE>eventQueues[currentEvent] = queue;<NEW_LINE>findNextEventSlot();<NEW_LINE>return currentEvent;<NEW_LINE>}
.get(currentEvent), "overwriting retained event");
101,012
public void testisUserInRoleLDAPISWar1() throws Exception {<NEW_LINE>Log.info(logClass, getCurrentTestName(), "-----Entering " + getCurrentTestName());<NEW_LINE>String queryString = EJB_WAR_PATH + SIMPLE_SERVLET + "?testInstance=ejb03&testMethod=manager";<NEW_LINE>Log.info(logClass, getCurrentTestName(), "-------------Executing BasicAuthCreds");<NEW_LINE>String response = executeGetRequestBasicAuthCreds(httpclient, urlBase + queryString, LocalLdapServer.USER1, LocalLdapServer.PASSWORD, HttpServletResponse.SC_OK);<NEW_LINE>Log.info(logClass, getCurrentTestName(), "-------------End of Response");<NEW_LINE>Log.info(logClass, getCurrentTestName(), "-------------Verifying Response");<NEW_LINE>verifyEjbUserResponse(response, Constants.getEJBBeanResponse + Constants.ejb03Bean, Constants.getEjbBeanMethodName + Constants.ejbBeanMethodManager, Constants.getEjbCallerPrincipal + LocalLdapServer.USER1);<NEW_LINE>Log.info(logClass, getCurrentTestName(), "-------------End of Verification of Response");<NEW_LINE>Log.info(logClass, getCurrentTestName(<MASK><NEW_LINE>}
), "-----Exiting " + getCurrentTestName());