idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
714,668
private static MethodSpec varArgBuilder(SpecModel specModel, PropModel prop, int requiredIndex, AnnotationSpec... extraAnnotations) {<NEW_LINE>ParameterizedTypeName parameterizedTypeName = (ParameterizedTypeName) prop.getTypeName();<NEW_LINE>TypeName singleParameterType = parameterizedTypeName.typeArguments.get(0);<NEW_LINE>if (KotlinSpecHelper.isKotlinSpec(specModel)) {<NEW_LINE>singleParameterType = KotlinSpecHelper.getBaseTypeIfWildcard(singleParameterType);<NEW_LINE>}<NEW_LINE>String varArgName = prop.getVarArgsSingleName();<NEW_LINE>CodeBlock.Builder codeBlockBuilder = CodeBlock.builder().beginControlFlow("if ($L == null)", varArgName).addStatement("return this").endControlFlow();<NEW_LINE>createListIfDefault(codeBlockBuilder, specModel, prop, singleParameterType);<NEW_LINE>CodeBlock codeBlock = codeBlockBuilder.addStatement("this.$L.$L.add($L)", getComponentMemberInstanceName(specModel), prop.getName(<MASK><NEW_LINE>return getMethodSpecBuilder(specModel, prop, requiredIndex, varArgName, Arrays.asList(parameter(prop, singleParameterType, varArgName, extraAnnotations)), codeBlock).build();<NEW_LINE>}
), varArgName).build();
233,402
public void showProgress(VirtualFileSyncPair item) {<NEW_LINE>final ISyncResource resource = fRoot.find(item);<NEW_LINE>if (resource == null || resource.getSyncState() == SyncState.ClientItemDeleted || resource.getSyncState() == SyncState.ServerItemDeleted) {<NEW_LINE>// resource no longer exists<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final TreeItem treeItem = (TreeItem) fViewer.testFindItem(resource);<NEW_LINE>if (treeItem == null) {<NEW_LINE>// the item is not shown in the viewer<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// adds the listener to draw the progress circle<NEW_LINE>getTree().addListener(SWT.EraseItem, new Listener() {<NEW_LINE><NEW_LINE>public void handleEvent(Event event) {<NEW_LINE>if (event.item == treeItem && event.index == 0) {<NEW_LINE>int state = resource.getTransferState();<NEW_LINE>if (state != ISyncResource.SYNCING) {<NEW_LINE>// only draws the progress when the item is being<NEW_LINE>// synced<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Rectangle bounds = treeItem.getImageBounds(0);<NEW_LINE>int width = Math.min(bounds.width, bounds.height);<NEW_LINE>int height = width;<NEW_LINE>GC gc = event.gc;<NEW_LINE>// clears the image area<NEW_LINE>gc.setBackground(treeItem.getDisplay().getSystemColor(SWT.COLOR_WHITE));<NEW_LINE>gc.fillRectangle(bounds.x, bounds.y, bounds.width, bounds.height);<NEW_LINE>// draws the outer circle<NEW_LINE>gc.setBackground(fInitBackground);<NEW_LINE>gc.drawOval(bounds.x + 1, bounds.y + 1, width - 4, height - 4);<NEW_LINE>// calculates the percentage of bytes transferred<NEW_LINE>double ratio = Math.min(1.0, ((double) resource.getTransferredBytes()) / getTransferSize(resource));<NEW_LINE>// draws the progress<NEW_LINE>gc.setBackground(fProgressBackground);<NEW_LINE>gc.fillArc(bounds.x + 1, bounds.y + 1, width - 3, height - 3, 90, (int) (-ratio * 360));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>if (getTree().isDisposed()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Rectangle <MASK><NEW_LINE>getTree().redraw(bounds.x, bounds.y, bounds.width, bounds.height, true);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
bounds = treeItem.getBounds(0);
1,290,181
MessagePostProcessor[] appendTracingMessagePostProcessor(Object obj, Field field) {<NEW_LINE>// Skip out if we can't read the field for the existing post processors<NEW_LINE>if (field == null)<NEW_LINE>return null;<NEW_LINE>MessagePostProcessor[] processors;<NEW_LINE>try {<NEW_LINE>// don't use "field.get(obj) instanceof X" as the field could be null<NEW_LINE>if (Collection.class.isAssignableFrom(field.getType())) {<NEW_LINE>Collection<MessagePostProcessor> collection = (Collection<MessagePostProcessor<MASK><NEW_LINE>processors = collection != null ? collection.toArray(new MessagePostProcessor[0]) : null;<NEW_LINE>} else if (MessagePostProcessor[].class.isAssignableFrom(field.getType())) {<NEW_LINE>processors = (MessagePostProcessor[]) field.get(obj);<NEW_LINE>} else {<NEW_LINE>// unusable field value<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// reflection error or collection element mismatch<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>TracingMessagePostProcessor tracingMessagePostProcessor = new TracingMessagePostProcessor(this);<NEW_LINE>// If there are no existing post processors, return only the tracing one<NEW_LINE>if (processors == null) {<NEW_LINE>return new MessagePostProcessor[] { tracingMessagePostProcessor };<NEW_LINE>}<NEW_LINE>// If there is an existing tracing post processor return<NEW_LINE>for (MessagePostProcessor processor : processors) {<NEW_LINE>if (processor instanceof TracingMessagePostProcessor) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Otherwise, append ours and return<NEW_LINE>MessagePostProcessor[] result = new MessagePostProcessor[processors.length + 1];<NEW_LINE>System.arraycopy(processors, 0, result, 0, processors.length);<NEW_LINE>result[processors.length] = tracingMessagePostProcessor;<NEW_LINE>return result;<NEW_LINE>}
>) field.get(obj);
1,811,670
public static void checkTagSharing(boolean start_of_day) {<NEW_LINE>UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();<NEW_LINE>if (uiFunctions != null) {<NEW_LINE>TagManager tm = TagManagerFactory.getTagManager();<NEW_LINE>if (start_of_day) {<NEW_LINE>if (COConfigurationManager.getBooleanParameter("tag.sharing.default.checked", false)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>COConfigurationManager.setParameter("tag.sharing.default.checked", true);<NEW_LINE>List<TagType> tag_types = tm.getTagTypes();<NEW_LINE>boolean prompt_required = false;<NEW_LINE>for (TagType tag_type : tag_types) {<NEW_LINE>List<Tag> tags = tag_type.getTags();<NEW_LINE>for (Tag tag : tags) {<NEW_LINE>if (tag.isPublic()) {<NEW_LINE>prompt_required = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!prompt_required) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String title = MessageText.getString("tag.sharing.enable.title");<NEW_LINE>String text = MessageText.getString("tag.sharing.enable.text");<NEW_LINE>UIFunctionsUserPrompter prompter = uiFunctions.getUserPrompter(title, text, new String[] { MessageText.getString("Button.yes"), MessageText.getString("Button.no") }, 0);<NEW_LINE>prompter.setRemember("tag.share.default", true, MessageText.getString("MessageBoxWindow.nomoreprompting"));<NEW_LINE>prompter.setAutoCloseInMS(0);<NEW_LINE>prompter.open(null);<NEW_LINE>boolean share <MASK><NEW_LINE>tm.setTagPublicDefault(share);<NEW_LINE>}<NEW_LINE>}
= prompter.waitUntilClosed() == 0;
1,658,014
public void write(org.apache.thrift.protocol.TProtocol prot, getTabletStats_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet optionals = new java.util.BitSet();<NEW_LINE>if (struct.isSetSuccess()) {<NEW_LINE>optionals.set(0);<NEW_LINE>}<NEW_LINE>if (struct.isSetSec()) {<NEW_LINE>optionals.set(1);<NEW_LINE>}<NEW_LINE>oprot.writeBitSet(optionals, 2);<NEW_LINE>if (struct.isSetSuccess()) {<NEW_LINE>{<NEW_LINE>oprot.writeI32(struct.success.size());<NEW_LINE>for (TabletStats _iter362 : struct.success) {<NEW_LINE>_iter362.write(oprot);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (struct.isSetSec()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
struct.sec.write(oprot);
1,103,914
public static void main(String[] args) throws IOException {<NEW_LINE>checkArgument(args.length == 2, "Expected arguments: <input_dir> <output_dir>");<NEW_LINE>Path inputPath = Paths.get(args[0]);<NEW_LINE>Path outputPath = Paths.get(args[1]);<NEW_LINE>// Bazel: resolve relative to current working directory. No-op if paths are already absolute.<NEW_LINE>String wd = System.getenv("BUILD_WORKING_DIRECTORY");<NEW_LINE>if (wd != null) {<NEW_LINE>inputPath = Paths.get(wd).resolve(inputPath);<NEW_LINE>outputPath = Paths.get(wd).resolve(outputPath);<NEW_LINE>}<NEW_LINE>Settings settings = new Settings(new String[] { "-storagebase", "/" });<NEW_LINE>BatfishLogger logger = new BatfishLogger(BatfishLogger.LEVELSTR_WARN, false, System.out);<NEW_LINE>settings.setLogger(logger);<NEW_LINE><MASK><NEW_LINE>}
preprocess(inputPath, outputPath, settings);
995,759
Pair<ListMastersResponse, Object> deserialize(CallResponse callResponse, String masterUUID) throws Exception {<NEW_LINE>final MasterClusterOuterClass.ListMastersResponsePB.Builder respBuilder = MasterClusterOuterClass.ListMastersResponsePB.newBuilder();<NEW_LINE>readProtobuf(callResponse.getPBMessage(), respBuilder);<NEW_LINE>List<ServerInfo> masters = new ArrayList<ServerInfo>();<NEW_LINE><MASK><NEW_LINE>if (!hasErr) {<NEW_LINE>ServerInfo master = null;<NEW_LINE>HostPortPB rpc_addr = null;<NEW_LINE>for (WireProtocol.ServerEntryPB entry : respBuilder.getMastersList()) {<NEW_LINE>if (entry.hasRegistration()) {<NEW_LINE>if (entry.getRegistration().getBroadcastAddressesList().isEmpty()) {<NEW_LINE>rpc_addr = entry.getRegistration().getPrivateRpcAddresses(0);<NEW_LINE>} else {<NEW_LINE>rpc_addr = entry.getRegistration().getBroadcastAddresses(0);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>rpc_addr = null;<NEW_LINE>}<NEW_LINE>master = new ServerInfo(entry.getInstanceId().getPermanentUuid().toStringUtf8(), rpc_addr != null ? rpc_addr.getHost() : "UNKNOWN", rpc_addr != null ? rpc_addr.getPort() : 0, entry.getRole() == PeerRole.LEADER, entry.hasError() ? entry.getError().getCode().name() : "ALIVE");<NEW_LINE>masters.add(master);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ListMastersResponse response = new ListMastersResponse(deadlineTracker.getElapsedMillis(), masterUUID, hasErr, masters);<NEW_LINE>return new Pair<ListMastersResponse, Object>(response, hasErr ? respBuilder.getError() : null);<NEW_LINE>}
boolean hasErr = respBuilder.hasError();
414,587
final DBCluster executeFailoverDBCluster(FailoverDBClusterRequest failoverDBClusterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(failoverDBClusterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<FailoverDBClusterRequest> request = null;<NEW_LINE>Response<DBCluster> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new FailoverDBClusterRequestMarshaller().marshall(super.beforeMarshalling(failoverDBClusterRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "RDS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "FailoverDBCluster");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DBCluster> responseHandler = new StaxResponseHandler<DBCluster>(new DBClusterStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
1,238,274
private AsmMetric findMetric(String streamId, String name, MetricType metricType, boolean mergeTopology) {<NEW_LINE>// String key = new StringBuilder(30).append(taskId).append(streamId).append(name).toString();<NEW_LINE>String key = streamId + name;<NEW_LINE>AsmMetric existingMetric = metricCache.get(key);<NEW_LINE>if (existingMetric == null) {<NEW_LINE>String fullName = MetricUtils.streamMetricName(topologyId, componentId, taskId, streamId, name, metricType);<NEW_LINE><MASK><NEW_LINE>if (existingMetric == null) {<NEW_LINE>existingMetric = AsmMetric.Builder.build(metricType);<NEW_LINE>JStormMetrics.registerStreamMetric(fullName, existingMetric, mergeTopology);<NEW_LINE>}<NEW_LINE>AsmMetric oldMetric = metricCache.putIfAbsent(key, existingMetric);<NEW_LINE>if (oldMetric != null) {<NEW_LINE>existingMetric = oldMetric;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return existingMetric;<NEW_LINE>}
existingMetric = JStormMetrics.getStreamMetric(fullName);
1,608,876
public static ListFlowJobResponse unmarshall(ListFlowJobResponse listFlowJobResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFlowJobResponse.setRequestId(_ctx.stringValue("ListFlowJobResponse.RequestId"));<NEW_LINE>listFlowJobResponse.setPageNumber(_ctx.integerValue("ListFlowJobResponse.PageNumber"));<NEW_LINE>listFlowJobResponse.setPageSize(_ctx.integerValue("ListFlowJobResponse.PageSize"));<NEW_LINE>listFlowJobResponse.setTotal(_ctx.integerValue("ListFlowJobResponse.Total"));<NEW_LINE>List<Job> jobList = new ArrayList<Job>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListFlowJobResponse.JobList.Length"); i++) {<NEW_LINE>Job job = new Job();<NEW_LINE>job.setId(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].Id"));<NEW_LINE>job.setGmtCreate(_ctx.longValue("ListFlowJobResponse.JobList[" + i + "].GmtCreate"));<NEW_LINE>job.setGmtModified(_ctx.longValue("ListFlowJobResponse.JobList[" + i + "].GmtModified"));<NEW_LINE>job.setName(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].Name"));<NEW_LINE>job.setType(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].Type"));<NEW_LINE>job.setDescription(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].Description"));<NEW_LINE>job.setFailAct(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].FailAct"));<NEW_LINE>job.setMaxRetry(_ctx.integerValue("ListFlowJobResponse.JobList[" + i + "].MaxRetry"));<NEW_LINE>job.setRetryInterval(_ctx.longValue("ListFlowJobResponse.JobList[" + i + "].RetryInterval"));<NEW_LINE>job.setParams(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].Params"));<NEW_LINE>job.setParamConf(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].ParamConf"));<NEW_LINE>job.setCustomVariables(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].CustomVariables"));<NEW_LINE>job.setEnvConf(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].EnvConf"));<NEW_LINE>job.setRunConf(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].RunConf"));<NEW_LINE>job.setMonitorConf(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].MonitorConf"));<NEW_LINE>job.setCategoryId(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].CategoryId"));<NEW_LINE>job.setMode(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].mode"));<NEW_LINE>job.setAdhoc(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].Adhoc"));<NEW_LINE>job.setAlertConf(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].AlertConf"));<NEW_LINE>job.setLastInstanceDetail(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].LastInstanceDetail"));<NEW_LINE>List<Resource> resourceList <MASK><NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListFlowJobResponse.JobList[" + i + "].ResourceList.Length"); j++) {<NEW_LINE>Resource resource = new Resource();<NEW_LINE>resource.setPath(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].ResourceList[" + j + "].Path"));<NEW_LINE>resource.setAlias(_ctx.stringValue("ListFlowJobResponse.JobList[" + i + "].ResourceList[" + j + "].Alias"));<NEW_LINE>resourceList.add(resource);<NEW_LINE>}<NEW_LINE>job.setResourceList(resourceList);<NEW_LINE>jobList.add(job);<NEW_LINE>}<NEW_LINE>listFlowJobResponse.setJobList(jobList);<NEW_LINE>return listFlowJobResponse;<NEW_LINE>}
= new ArrayList<Resource>();
179,322
public UpdateAppInstanceResult updateAppInstance(UpdateAppInstanceRequest updateAppInstanceRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAppInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateAppInstanceRequest> request = null;<NEW_LINE>Response<UpdateAppInstanceResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new UpdateAppInstanceRequestMarshaller().marshall(updateAppInstanceRequest);<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<UpdateAppInstanceResult, JsonUnmarshallerContext> unmarshaller = new UpdateAppInstanceResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<UpdateAppInstanceResult> responseHandler = new JsonResponseHandler<UpdateAppInstanceResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
1,738,458
public void marshall(UpdateClusterRequest updateClusterRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateClusterRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getClusterName(), CLUSTERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getSecurityGroupIds(), SECURITYGROUPIDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getMaintenanceWindow(), MAINTENANCEWINDOW_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getSnsTopicArn(), SNSTOPICARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getSnsTopicStatus(), SNSTOPICSTATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getSnapshotWindow(), SNAPSHOTWINDOW_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getSnapshotRetentionLimit(), SNAPSHOTRETENTIONLIMIT_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getNodeType(), NODETYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getEngineVersion(), ENGINEVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getReplicaConfiguration(), REPLICACONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getShardConfiguration(), SHARDCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(updateClusterRequest.getACLName(), ACLNAME_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
updateClusterRequest.getParameterGroupName(), PARAMETERGROUPNAME_BINDING);
1,161,155
public Observable<VectorSchemaRoot> execute(RootContext rootContext) {<NEW_LINE>OutputLinq4jPhysicalPlan leftObjectPlan = OutputLinq4jPhysicalPlan.create(left);<NEW_LINE>Observable<Object[]> leftObservable = leftObjectPlan.executeToObject(rootContext);<NEW_LINE>@NonNull<NEW_LINE>Iterable<Record> leftObjects = MycatRxJavaUtl.blockingIterable(leftObservable.map(i -> RecordImpl.create(i)));<NEW_LINE>@NonNull<NEW_LINE>Iterable<Record> rightObjects = MycatRxJavaUtl.blockingIterable(leftObservable.map(i -> RecordImpl.create(i)));<NEW_LINE>int leftColumnCount = left.schema().getFields().size();<NEW_LINE>final Enumerable<Record> outer = Linq4j.asEnumerable(leftObjects);<NEW_LINE>final Enumerable<Record> <MASK><NEW_LINE>final Function1<Record, Record> outerKeySelector = a0 -> a0;<NEW_LINE>final Function1<Record, Record> innerKeySelector = a0 -> a0;<NEW_LINE>final Predicate2<Record, Record> extraPredicate = (v0, v1) -> predicate.getBooleanType(JoinRecord.create(v0, v1, leftColumnCount));<NEW_LINE>Function2<Record, Record, Record> resultSelector = (v0, v1) -> JoinRecord.create(v0, v1, leftColumnCount);<NEW_LINE>final JoinType joinType = this.joinType;<NEW_LINE>final Comparator<Record> comparator = PhysicalSortProperty.getRecordComparator(joinKeys);<NEW_LINE>Enumerable<Record> records = EnumerableDefaults.mergeJoin(outer, inner, outerKeySelector, innerKeySelector, extraPredicate, resultSelector, joinType, comparator);<NEW_LINE>return InputRecordPhysicalPlan.create(schema(), Observable.fromIterable(records)).execute(rootContext);<NEW_LINE>}
inner = Linq4j.asEnumerable(rightObjects);
1,071,768
public List<ExternalDataObject> searchExternalDataObjects(String query, int start, int limit) {<NEW_LINE>if (limit > 100) {<NEW_LINE>throw new IllegalArgumentException("The maximum number of results to retrieve cannot exceed 100.");<NEW_LINE>}<NEW_LINE>if (start > MAX_INDEX) {<NEW_LINE>throw new IllegalArgumentException("The starting number of results to retrieve cannot exceed 10000.");<NEW_LINE>}<NEW_LINE>String searchPath = "search?q=" + URLEncoder.encode(query, StandardCharsets.UTF_8) <MASK><NEW_LINE>log.debug("queryBio searchPath=" + searchPath + " accessToken=" + accessToken);<NEW_LINE>InputStream bioDocument = orcidRestConnector.get(searchPath, accessToken);<NEW_LINE>List<Result> results = converter.convert(bioDocument);<NEW_LINE>List<Person> bios = new LinkedList<>();<NEW_LINE>for (Result result : results) {<NEW_LINE>OrcidIdentifier orcidIdentifier = result.getOrcidIdentifier();<NEW_LINE>if (orcidIdentifier != null) {<NEW_LINE>log.debug("Found OrcidId=" + orcidIdentifier.toString());<NEW_LINE>String orcid = orcidIdentifier.getPath();<NEW_LINE>Person bio = getBio(orcid);<NEW_LINE>if (bio != null) {<NEW_LINE>bios.add(bio);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>bioDocument.close();<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>if (Objects.isNull(bios)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>return bios.stream().map(bio -> convertToExternalDataObject(bio)).collect(Collectors.toList());<NEW_LINE>}
+ "&start=" + start + "&rows=" + limit;
907,280
public static void main(String[] args) throws ParseException {<NEW_LINE>String date;<NEW_LINE>long time;<NEW_LINE>SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd HH:mm:ss.S");<NEW_LINE>long cpu = SysJMX.getCurrentThreadCPUnano();<NEW_LINE>for (int i = 0; i < 10000; i++) {<NEW_LINE>date = sdf.format(new Date(System.currentTimeMillis() + i));<NEW_LINE>}<NEW_LINE>cpu = SysJMX.getCurrentThreadCPUnano() - cpu;<NEW_LINE>System.out.println("SimpleDateFormat.format " + cpu / 1000000L + " ms");<NEW_LINE>cpu = SysJMX.getCurrentThreadCPUnano();<NEW_LINE>for (int i = 0; i < 10000; i++) {<NEW_LINE>date = DateUtil.timestamp(<MASK><NEW_LINE>}<NEW_LINE>cpu = SysJMX.getCurrentThreadCPUnano() - cpu;<NEW_LINE>System.out.println("DateUtil.format " + cpu / 1000000L + " ms");<NEW_LINE>sdf = new SimpleDateFormat("yyyyMMdd");<NEW_LINE>cpu = SysJMX.getCurrentThreadCPUnano();<NEW_LINE>for (int i = 0; i < 10000; i++) {<NEW_LINE>time = sdf.parse("20101123").getTime();<NEW_LINE>}<NEW_LINE>cpu = SysJMX.getCurrentThreadCPUnano() - cpu;<NEW_LINE>System.out.println("SimpleDateFormat.parse " + cpu / 1000000L + " ms");<NEW_LINE>cpu = SysJMX.getCurrentThreadCPUnano();<NEW_LINE>for (int i = 0; i < 10000; i++) {<NEW_LINE>time = DateUtil.yyyymmdd("20101123");<NEW_LINE>}<NEW_LINE>cpu = SysJMX.getCurrentThreadCPUnano() - cpu;<NEW_LINE>System.out.println("DateUtil.parse " + cpu / 1000000L + " ms");<NEW_LINE>}
System.currentTimeMillis() + i);
1,305,656
public static boolean performLikeActionLocal(final ReaderPost post, final boolean isAskingToLike, final long wpComUserId) {<NEW_LINE>// do nothing if post's like state is same as passed<NEW_LINE>boolean isCurrentlyLiked = ReaderPostTable.isPostLikedByCurrentUser(post);<NEW_LINE>if (isCurrentlyLiked == isAskingToLike) {<NEW_LINE>AppLog.<MASK><NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// update like status and like count in local db<NEW_LINE>int numCurrentLikes = ReaderPostTable.getNumLikesForPost(post.blogId, post.postId);<NEW_LINE>int newNumLikes = (isAskingToLike ? numCurrentLikes + 1 : numCurrentLikes - 1);<NEW_LINE>if (newNumLikes < 0) {<NEW_LINE>newNumLikes = 0;<NEW_LINE>}<NEW_LINE>ReaderPostTable.setLikesForPost(post, newNumLikes, isAskingToLike);<NEW_LINE>ReaderLikeTable.setCurrentUserLikesPost(post, isAskingToLike, wpComUserId);<NEW_LINE>return true;<NEW_LINE>}
w(T.READER, "post like unchanged");
260,790
// enable timeout<NEW_LINE>@SuppressWarnings("java:S2274")<NEW_LINE>private ByteBuffer fetchResultAsync(long[] timestamps, int length) throws IOException {<NEW_LINE>// convert long[] to List<Long>, which is used for thrift<NEW_LINE>List<Long> timestampList = new ArrayList<>(length);<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>timestampList.add(timestamps[i]);<NEW_LINE>}<NEW_LINE>synchronized (fetchResult) {<NEW_LINE>fetchResult.set(null);<NEW_LINE>try {<NEW_LINE>sourceInfo.getCurAsyncClient(ClusterConstant.getReadOperationTimeoutMS()).fetchSingleSeriesByTimestamps(sourceInfo.getHeader(), sourceInfo.getReaderId(), timestampList, handler);<NEW_LINE>fetchResult.wait(ClusterConstant.getReadOperationTimeoutMS());<NEW_LINE>} catch (TException e) {<NEW_LINE>// try other node<NEW_LINE>if (!sourceInfo.switchNode(true, timestamps[0])) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return fetchResultAsync(timestamps, length);<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>Thread<MASK><NEW_LINE>logger.warn("Query {} interrupted", sourceInfo);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return fetchResult.get();<NEW_LINE>}
.currentThread().interrupt();
575,472
private static ObjectNode fromConfig(ConfigObject config) {<NEW_LINE>ObjectNode.Builder builder = ObjectNode.builder();<NEW_LINE>config.forEach((unescapedKey, value) -> {<NEW_LINE>String key = io.helidon.config.Config.Key.escapeName(unescapedKey);<NEW_LINE>if (value instanceof ConfigList) {<NEW_LINE>builder.addList(key, fromList((ConfigList) value));<NEW_LINE>} else if (value instanceof ConfigObject) {<NEW_LINE>builder.addObject(key, fromConfig((ConfigObject) value));<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>Object unwrapped = value.unwrapped();<NEW_LINE>if (unwrapped == null) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>builder.addValue(key, String.valueOf(unwrapped));<NEW_LINE>}<NEW_LINE>} catch (com.typesafe.config.ConfigException.NotResolved e) {<NEW_LINE>// An unresolved ConfigReference resolved later in config module since<NEW_LINE>// Helidon and Hocon use the same reference syntax and resolving here<NEW_LINE>// would be too early for resolution across sources<NEW_LINE>builder.addValue(key, value.render());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return builder.build();<NEW_LINE>}
builder.addValue(key, "");
839,109
private List<NameValueCountPair> listCompletedPair(Business business, Predicate p) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(ReadCompleted.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Boolean> cq = cb.createQuery(Boolean.class);<NEW_LINE>Root<ReadCompleted> root = cq.from(ReadCompleted.class);<NEW_LINE>cq.select(root.get(ReadCompleted_.completed)).where(p);<NEW_LINE>List<Boolean> os = em.createQuery(cq).getResultList().stream().distinct().collect(Collectors.toList());<NEW_LINE>List<NameValueCountPair> wos = new ArrayList<>();<NEW_LINE>for (Boolean value : os) {<NEW_LINE>NameValueCountPair o = new NameValueCountPair();<NEW_LINE>if (BooleanUtils.isTrue(value)) {<NEW_LINE>o.setValue(Boolean.TRUE);<NEW_LINE>o.setName("completed");<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>o.setName("not completed");<NEW_LINE>}<NEW_LINE>wos.add(o);<NEW_LINE>}<NEW_LINE>return wos;<NEW_LINE>}
o.setValue(Boolean.FALSE);
618,490
public void initScene() {<NEW_LINE>DirectionalLight light = new DirectionalLight();<NEW_LINE>light.setLookAt(0, 0, -1);<NEW_LINE>light.enableLookAt();<NEW_LINE>getCurrentScene().addLight(light);<NEW_LINE>//<NEW_LINE>// -- Create a material for all cubes<NEW_LINE>//<NEW_LINE>Material material = new Material();<NEW_LINE>material.enableLighting(true);<NEW_LINE>material.setDiffuseMethod(new DiffuseMethod.Lambert());<NEW_LINE>getCurrentCamera().setZ(10);<NEW_LINE>Random random = new Random();<NEW_LINE>//<NEW_LINE>// -- Generate cubes with random x, y, z<NEW_LINE>//<NEW_LINE>for (int i = 0; i < 10; i++) {<NEW_LINE>Cube cube = new Cube(1);<NEW_LINE>cube.setPosition(-5 + random.nextFloat() * 10, -5 + random.nextFloat() * 10, random.nextFloat() * -10);<NEW_LINE>cube.setMaterial(material);<NEW_LINE>cube.setColor(0x666666 + random.nextInt(0x999999));<NEW_LINE>getCurrentScene().addChild(cube);<NEW_LINE>Vector3 randomAxis = new Vector3(random.nextFloat(), random.nextFloat(), random.nextFloat());<NEW_LINE>randomAxis.normalize();<NEW_LINE>RotateOnAxisAnimation anim = new RotateOnAxisAnimation(randomAxis, 360);<NEW_LINE>anim.setTransformable3D(cube);<NEW_LINE>anim.setDurationMilliseconds(3000 + (int) (random.nextDouble() * 5000));<NEW_LINE>anim.setRepeatMode(Animation.RepeatMode.INFINITE);<NEW_LINE><MASK><NEW_LINE>anim.play();<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// -- Create a post processing manager. We can add multiple passes to this.<NEW_LINE>//<NEW_LINE>mEffects = new PostProcessingManager(this);<NEW_LINE>//<NEW_LINE>// -- A render pass renders the current scene to a texture. This texture will<NEW_LINE>// be used for post processing<NEW_LINE>//<NEW_LINE>RenderPass renderPass = new RenderPass(getCurrentScene(), getCurrentCamera(), 0);<NEW_LINE>mEffects.addPass(renderPass);<NEW_LINE>//<NEW_LINE>// -- Add a Sepia effect<NEW_LINE>//<NEW_LINE>EffectPass sepiaPass = new SepiaPass();<NEW_LINE>mEffects.addPass(sepiaPass);<NEW_LINE>//<NEW_LINE>// -- Add a Gaussian blur effect. This requires a horizontal and a vertical pass.<NEW_LINE>//<NEW_LINE>EffectPass horizontalPass = new BlurPass(BlurPass.Direction.HORIZONTAL, 6, getViewportWidth(), getViewportHeight());<NEW_LINE>mEffects.addPass(horizontalPass);<NEW_LINE>EffectPass verticalPass = new BlurPass(BlurPass.Direction.VERTICAL, 6, getViewportWidth(), getViewportHeight());<NEW_LINE>//<NEW_LINE>// -- Important. The last pass should render to screen or nothing will happen.<NEW_LINE>//<NEW_LINE>verticalPass.setRenderToScreen(true);<NEW_LINE>mEffects.addPass(verticalPass);<NEW_LINE>}
getCurrentScene().registerAnimation(anim);
997,579
public long payTax(long duration, long limit) {<NEW_LINE>long storageTax = calculateTax(duration, limit);<NEW_LINE>long tax = exchange(storageTax, false);<NEW_LINE>logger.info("tax: " + tax);<NEW_LINE>long newTotalTax = dynamicPropertiesStore.getTotalStorageTax() + tax;<NEW_LINE>long newTotalPool = dynamicPropertiesStore.getTotalStoragePool() - tax;<NEW_LINE>long newTotalReserved = dynamicPropertiesStore.getTotalStorageReserved() + storageTax;<NEW_LINE>logger.info(<MASK><NEW_LINE>boolean eq = dynamicPropertiesStore.getTotalStorageReserved() == 128L * 1024 * 1024 * 1024;<NEW_LINE>logger.info("reserved == 128GB: " + eq);<NEW_LINE>logger.info("newTotalTax: " + newTotalTax + " newTotalPool: " + newTotalPool + NEW_TOTAL_RESERVED + newTotalReserved);<NEW_LINE>dynamicPropertiesStore.saveTotalStorageTax(newTotalTax);<NEW_LINE>dynamicPropertiesStore.saveTotalStoragePool(newTotalPool);<NEW_LINE>dynamicPropertiesStore.saveTotalStorageReserved(newTotalReserved);<NEW_LINE>return storageTax;<NEW_LINE>}
"reserved: " + dynamicPropertiesStore.getTotalStorageReserved());
1,403,940
public static Map<String, Port> combinePorts(List<KubernetesPortBuildItem> ports, PlatformConfiguration config) {<NEW_LINE>Map<String, Port> allPorts = new HashMap<>();<NEW_LINE>allPorts.putAll(verifyPorts(ports).entrySet().stream().map(e -> new PortBuilder().withName(e.getKey()).withContainerPort(e.getValue()).build()).collect(Collectors.toMap(Port::getName, p -> p)));<NEW_LINE>config.getPorts().entrySet().forEach(e -> {<NEW_LINE>String name = e.getKey();<NEW_LINE>Port configuredPort = PortConverter.convert(e);<NEW_LINE>Port buildItemPort = allPorts.get(name);<NEW_LINE>Port combinedPort = buildItemPort == null ? configuredPort : new PortBuilder().withName(name).withHostPort(configuredPort.getHostPort() != null && configuredPort.getHostPort() != 0 ? configuredPort.getHostPort() : buildItemPort.getHostPort()).withContainerPort(configuredPort.getContainerPort() != null && configuredPort.getContainerPort() != 0 ? configuredPort.getContainerPort() : buildItemPort.getContainerPort()).withPath(Strings.isNotNullOrEmpty(configuredPort.getPath()) ? configuredPort.getPath() : buildItemPort.<MASK><NEW_LINE>allPorts.put(name, combinedPort);<NEW_LINE>});<NEW_LINE>return allPorts;<NEW_LINE>}
getPath()).build();
1,316,257
private Object variables(TokenStream ts, boolean inForInit) throws IOException, JavaScriptException {<NEW_LINE>Object pn = nf.createVariables(ts.getLineno());<NEW_LINE>boolean first = true;<NEW_LINE>sourceAdd((char) ts.VAR);<NEW_LINE>for (; ; ) {<NEW_LINE>Object name;<NEW_LINE>Object init;<NEW_LINE>mustMatchToken(ts, ts.NAME, "msg.bad.var");<NEW_LINE>String s = ts.getString();<NEW_LINE>if (!first)<NEW_LINE>sourceAdd((char) ts.COMMA);<NEW_LINE>first = false;<NEW_LINE><MASK><NEW_LINE>name = nf.createName(s);<NEW_LINE>// omitted check for argument hiding<NEW_LINE>if (ts.matchToken(ts.ASSIGN)) {<NEW_LINE>if (ts.getOp() != ts.NOP)<NEW_LINE>reportError(ts, "msg.bad.var.init");<NEW_LINE>sourceAdd((char) ts.ASSIGN);<NEW_LINE>sourceAdd((char) ts.NOP);<NEW_LINE>init = assignExpr(ts, inForInit);<NEW_LINE>nf.addChildToBack(name, init);<NEW_LINE>}<NEW_LINE>nf.addChildToBack(pn, name);<NEW_LINE>if (!ts.matchToken(ts.COMMA))<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>return pn;<NEW_LINE>}
sourceAddString(ts.NAME, s);
97,732
public void run() {<NEW_LINE>JThemePreferenceStore store = getStore();<NEW_LINE>IJTPresetManager presetManager = JThemesCore.getDefault().getPresetManager();<NEW_LINE>Properties properties = PropertiesUtil.merge(presetManager.getDefaultPreset().getProperties(), preset.getProperties());<NEW_LINE>for (Object keyObj : properties.keySet()) {<NEW_LINE>String key = (String) keyObj;<NEW_LINE>String value = properties.getProperty(key);<NEW_LINE>if (key.equals(JTPConstants.Layout.TAB_HEIGHT)) {<NEW_LINE>int intValue = Integer.parseInt(value);<NEW_LINE>store.setValue(key, Math.max(intValue, SWTExtensions.INSTANCE.getMinimumToolBarHeight()));<NEW_LINE>} else {<NEW_LINE>store.setValue(key, value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>new RewriteCustomTheme(true).rewrite();<NEW_LINE>IThemeEngine engine = getThemeEngine();<NEW_LINE>if (engine.getActiveTheme() == null || !engine.getActiveTheme().getId().equals(JThemesCore.CUSTOM_THEME_ID)) {<NEW_LINE>engine.setTheme(JThemesCore.CUSTOM_THEME_ID, true);<NEW_LINE>}<NEW_LINE>store.setValue(JTPConstants.Memento.<MASK><NEW_LINE>}
LAST_CHOOSED_PRESET, preset.getId());
1,535,307
protected static String calculateCodeCommitPassword(URIish uri, String awsSecretKey) {<NEW_LINE>String[] split = uri.getHost().split("\\.");<NEW_LINE>if (split.length < 4) {<NEW_LINE>throw new CredentialException("Cannot detect AWS region from URI", null);<NEW_LINE>}<NEW_LINE>String region = split[1];<NEW_LINE>Date now = new Date();<NEW_LINE>SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd'T'HHmmss");<NEW_LINE>dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));<NEW_LINE>String dateStamp = dateFormat.format(now);<NEW_LINE>String shortDateStamp = dateStamp.substring(0, 8);<NEW_LINE>String codeCommitPassword;<NEW_LINE>try {<NEW_LINE>StringBuilder stringToSign = new StringBuilder();<NEW_LINE>stringToSign.append("AWS4-HMAC-SHA256\n").append(dateStamp).append("\n").append(shortDateStamp).append("/").append(region).append("/codecommit/aws4_request\n").append(bytesToHexString(canonicalRequestDigest(uri)));<NEW_LINE>byte[] signedRequest = sign(awsSecretKey, shortDateStamp, <MASK><NEW_LINE>codeCommitPassword = dateStamp + "Z" + bytesToHexString(signedRequest);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new CredentialException("Error calculating AWS CodeCommit password", e);<NEW_LINE>}<NEW_LINE>return codeCommitPassword;<NEW_LINE>}
region, stringToSign.toString());
711,591
public boolean apply(Game game, Ability source) {<NEW_LINE>Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller != null && opponent != null) {<NEW_LINE>for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, opponent.getId(), game)) {<NEW_LINE>String name = permanent.getName();<NEW_LINE>FilterCard filterCard = new <MASK><NEW_LINE>filterCard.add(new NamePredicate(name));<NEW_LINE>TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filterCard);<NEW_LINE>if (controller.searchLibrary(target, source, game, opponent.getId())) {<NEW_LINE>controller.moveCards(opponent.getLibrary().getCard(target.getFirstTarget(), game), Zone.BATTLEFIELD, source, game);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>opponent.shuffleLibrary(source, game);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
FilterCard("card named \"" + name + '"');
522,392
public boolean accept(WorkflowContext context) {<NEW_LINE>ProcessForm processForm = context.getProcessForm();<NEW_LINE><MASK><NEW_LINE>if (processForm instanceof GroupResourceProcessForm) {<NEW_LINE>GroupResourceProcessForm groupResourceForm = (GroupResourceProcessForm) processForm;<NEW_LINE>InlongGroupInfo groupInfo = groupResourceForm.getGroupInfo();<NEW_LINE>boolean enable = InlongConstants.DISABLE_ZK.equals(groupInfo.getEnableZookeeper()) && !MQType.NONE.equals(groupInfo.getMqType());<NEW_LINE>LOGGER.info("zookeeper disabled was [{}] for groupId [{}]", enable, groupId);<NEW_LINE>return enable;<NEW_LINE>} else if (processForm instanceof StreamResourceProcessForm) {<NEW_LINE>StreamResourceProcessForm streamResourceForm = (StreamResourceProcessForm) processForm;<NEW_LINE>InlongGroupInfo groupInfo = streamResourceForm.getGroupInfo();<NEW_LINE>InlongStreamInfo streamInfo = streamResourceForm.getStreamInfo();<NEW_LINE>boolean enable = InlongConstants.DISABLE_ZK.equals(groupInfo.getEnableZookeeper()) && !MQType.NONE.equals(groupInfo.getMqType());<NEW_LINE>LOGGER.info("zookeeper disabled was [{}] for groupId [{}] and streamId [{}] ", enable, groupId, streamInfo.getInlongStreamId());<NEW_LINE>return enable;<NEW_LINE>} else {<NEW_LINE>LOGGER.info("zk disabled for groupId [{}]", groupId);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
String groupId = processForm.getInlongGroupId();
636,410
private void registerHotkeys() {<NEW_LINE>final ActionMap actionMap = ((JTextField) getEditor().getEditorComponent()).getActionMap();<NEW_LINE>final InputMap imap = ((JTextField) getEditor().getEditorComponent()).getInputMap();<NEW_LINE>setActionMap(actionMap);<NEW_LINE>setInputMap(JComponent.WHEN_FOCUSED, imap);<NEW_LINE>imap.put(HotKeys.GRAPH_SEARCH_NEXT_KEY.getKeyStroke(), "NEXT");<NEW_LINE>imap.put(HotKeys.GRAPH_SEARCH_NEXT_ZOOM_KEY.getKeyStroke(), "NEXT_ZOOM");<NEW_LINE>imap.put(HotKeys.<MASK><NEW_LINE>imap.put(HotKeys.GRAPH_SEARCH_PREVIOUS_ZOOM_KEY.getKeyStroke(), "PREVIOUS_ZOOM");<NEW_LINE>actionMap.put("NEXT", CActionProxy.proxy(new CActionHotKey("NEXT")));<NEW_LINE>actionMap.put("NEXT_ZOOM", CActionProxy.proxy(new CActionHotKey("NEXT_ZOOM")));<NEW_LINE>actionMap.put("PREVIOUS", CActionProxy.proxy(new CActionHotKey("PREVIOUS")));<NEW_LINE>actionMap.put("PREVIOUS_ZOOM", CActionProxy.proxy(new CActionHotKey("PREVIOUS_ZOOM")));<NEW_LINE>}
GRAPH_SEARCH_PREVIOUS_KEY.getKeyStroke(), "PREVIOUS");
1,823,167
protected void doExecute(Task task, Request request, ActionListener<Response> listener) {<NEW_LINE>if (MachineLearningField.ML_API_FEATURE.check(licenseState) == false) {<NEW_LINE>listener.onFailure(LicenseUtils.newComplianceException(XPackField.MACHINE_LEARNING));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (XPackSettings.SECURITY_ENABLED.get(settings)) {<NEW_LINE>useSecondaryAuthIfAvailable(this.securityContext, () -> {<NEW_LINE>// Set the auth headers (preferring the secondary headers) to the caller's.<NEW_LINE>// Regardless if the config was previously stored or not.<NEW_LINE>DataFrameAnalyticsConfig config = new DataFrameAnalyticsConfig.Builder(request.getConfig()).setHeaders(ClientHelper.getPersistableSafeSecurityHeaders(threadPool.getThreadContext(), clusterService.state())).build();<NEW_LINE>preview(task, config, listener);<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>preview(task, <MASK><NEW_LINE>}<NEW_LINE>}
request.getConfig(), listener);
872,808
public RefactoringStatus checkInitialConditions(IProgressMonitor monitor) throws CoreException {<NEW_LINE>try {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>monitor.beginTask("", 5);<NEW_LINE>RefactoringStatus result = Checks.checkIfCuBroken(fMethod);<NEW_LINE>if (result.hasFatalError()) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>if (fMethod == null || !fMethod.exists()) {<NEW_LINE>String message = Messages.format(RefactoringCoreMessages.ChangeSignatureRefactoring_method_deleted, BasicElementLabels.getFileName(getCu()));<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(message);<NEW_LINE>}<NEW_LINE>if (fMethod.getDeclaringType().isInterface()) {<NEW_LINE>fTopMethod = MethodChecks.overridesAnotherMethod(fMethod, fMethod.getDeclaringType().newSupertypeHierarchy(new SubProgressMonitor(monitor, 1)));<NEW_LINE>monitor.worked(1);<NEW_LINE>} else if (MethodChecks.isVirtual(fMethod)) {<NEW_LINE>ITypeHierarchy hierarchy = getCachedTypeHierarchy(new SubProgressMonitor(monitor, 1));<NEW_LINE>fTopMethod = MethodChecks.isDeclaredInInterface(fMethod, hierarchy, new SubProgressMonitor(monitor, 1));<NEW_LINE>if (fTopMethod == null) {<NEW_LINE>fTopMethod = MethodChecks.overridesAnotherMethod(fMethod, hierarchy);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (fTopMethod == null) {<NEW_LINE>fTopMethod = fMethod;<NEW_LINE>}<NEW_LINE>if (!fTopMethod.equals(fMethod)) {<NEW_LINE>if (fTopMethod.getDeclaringType().isInterface()) {<NEW_LINE>RefactoringStatusContext context = JavaStatusContext.create(fTopMethod);<NEW_LINE>String message = Messages.format(RefactoringCoreMessages.MethodChecks_implements, new String[] { JavaElementUtil.createMethodSignature(fTopMethod), BasicElementLabels.getJavaElementName(fTopMethod.getDeclaringType().getFullyQualifiedName('.')) });<NEW_LINE>return RefactoringStatus.createStatus(RefactoringStatus.FATAL, message, context, CorextCore.getPluginId(), RefactoringStatusCodes.METHOD_DECLARED_IN_INTERFACE, fTopMethod);<NEW_LINE>} else {<NEW_LINE>RefactoringStatusContext context = JavaStatusContext.create(fTopMethod);<NEW_LINE>String message = Messages.format(RefactoringCoreMessages.MethodChecks_overrides, new String[] { JavaElementUtil.createMethodSignature(fTopMethod), BasicElementLabels.getJavaElementName(fTopMethod.getDeclaringType().getFullyQualifiedName('.')) });<NEW_LINE>return RefactoringStatus.createStatus(RefactoringStatus.FATAL, message, context, CorextCore.getPluginId(), RefactoringStatusCodes.OVERRIDES_ANOTHER_METHOD, fTopMethod);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (monitor.isCanceled()) {<NEW_LINE>throw new OperationCanceledException();<NEW_LINE>}<NEW_LINE>if (fBaseCuRewrite == null || !fBaseCuRewrite.getCu().equals(getCu())) {<NEW_LINE>fBaseCuRewrite = new CompilationUnitRewrite(getCu());<NEW_LINE>fBaseCuRewrite.getASTRewrite().setTargetSourceRangeComputer(new TightSourceRangeComputer());<NEW_LINE>}<NEW_LINE>for (RefactoringStatus status : TypeContextChecker.checkMethodTypesSyntax(fMethod, getParameterInfos(), fReturnTypeInfo)) {<NEW_LINE>result.merge(status);<NEW_LINE>}<NEW_LINE>monitor.worked(1);<NEW_LINE><MASK><NEW_LINE>monitor.worked(1);<NEW_LINE>return result;<NEW_LINE>} finally {<NEW_LINE>monitor.done();<NEW_LINE>}<NEW_LINE>}
result.merge(createExceptionInfoList());
582,224
public void createMenuItems(final Bundle savedInstanceState) {<NEW_LINE>Bundle args = getArguments();<NEW_LINE>if (args != null) {<NEW_LINE>pointType = PointType.valueOf(args.getString(POINT_TYPE_KEY));<NEW_LINE>}<NEW_LINE>if (savedInstanceState != null && savedInstanceState.getBoolean(IS_SORTED)) {<NEW_LINE>sortByDist = savedInstanceState.getInt(SORTED_BY_TYPE);<NEW_LINE>}<NEW_LINE>adapter = new FavouritesAdapter(getMyApplication(), favouritePoints);<NEW_LINE>FavouritesHelper helper = getMyApplication().getFavoritesHelper();<NEW_LINE>if (helper.isFavoritesLoaded()) {<NEW_LINE>loadFavorites();<NEW_LINE>} else {<NEW_LINE>helper.addListener(favoritesListener = new FavoritesListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFavoritesLoaded() {<NEW_LINE>loadFavorites();<NEW_LINE>adapter.notifyDataSetChanged();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFavoriteDataUpdated(@NonNull FavouritePoint favouritePoint) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>recyclerView = new RecyclerView(getContext());<NEW_LINE>final int themeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;<NEW_LINE>recyclerView = (RecyclerView) View.inflate(new ContextThemeWrapper(getContext(), themeRes), R.layout.recyclerview, null);<NEW_LINE>recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));<NEW_LINE>sortFavourites();<NEW_LINE>final BottomSheetItemTitleWithDescrAndButton[<MASK><NEW_LINE>title[0] = (BottomSheetItemTitleWithDescrAndButton) new BottomSheetItemTitleWithDescrAndButton.Builder().setButtonIcons(null, getIconForButton(getNextType(sortByDist))).setButtonTitle(getTextForButton(getNextType(sortByDist))).setOnButtonClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>sortByDist = getNextType(sortByDist);<NEW_LINE>sortFavourites();<NEW_LINE>int next = getNextType(sortByDist);<NEW_LINE>title[0].setButtonIcons(null, getIconForButton(next));<NEW_LINE>title[0].setButtonText(getTextForButton(next));<NEW_LINE>title[0].setDescription(getTextForButton(sortByDist));<NEW_LINE>}<NEW_LINE>}).setDescription(getTextForButton(sortByDist)).setTitle(getString(R.string.favourites)).setLayoutId(R.layout.bottom_sheet_item_title_with_descr_and_button).create();<NEW_LINE>items.add(title[0]);<NEW_LINE>adapter.setItemClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>int position = recyclerView.getChildAdapterPosition(v);<NEW_LINE>if (position == RecyclerView.NO_POSITION) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>selectFavorite(favouritePoints.get(position));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>recyclerView.setAdapter(adapter);<NEW_LINE>recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onScrollStateChanged(RecyclerView recyclerView, int newState) {<NEW_LINE>super.onScrollStateChanged(recyclerView, newState);<NEW_LINE>compassUpdateAllowed = newState == RecyclerView.SCROLL_STATE_IDLE;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>items.add(new BaseBottomSheetItem.Builder().setCustomView(recyclerView).create());<NEW_LINE>}
] title = new BottomSheetItemTitleWithDescrAndButton[1];
1,563,997
final UpdateTestGridProjectResult executeUpdateTestGridProject(UpdateTestGridProjectRequest updateTestGridProjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateTestGridProjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateTestGridProjectRequest> request = null;<NEW_LINE>Response<UpdateTestGridProjectResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateTestGridProjectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateTestGridProjectRequest));<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, "Device Farm");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateTestGridProject");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateTestGridProjectResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateTestGridProjectResultJsonUnmarshaller());<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);
540,390
// SIB0137.comms.3 start<NEW_LINE>private void processDestinationListenerCallback(CommsByteBuffer buffer, Conversation conversation) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "processDestinationListenerCallback", new Object[] { buffer, conversation });<NEW_LINE>final ClientConversationState convState = (ClientConversationState) conversation.getAttachment();<NEW_LINE>final SICoreConnection connection = convState.getSICoreConnection();<NEW_LINE>final short connectionObjectId = buffer.getShort();<NEW_LINE>final <MASK><NEW_LINE>final SIDestinationAddress destinationAddress = buffer.getSIDestinationAddress(conversation.getHandshakeProperties().getFapLevel());<NEW_LINE>final short destinationAvailabilityShort = buffer.getShort();<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "connectionObjectId=" + connectionObjectId);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "destinationListenerId=" + destinationListenerId);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "destinationAddress=" + destinationAddress);<NEW_LINE>DestinationAvailability destinationAvailability = null;<NEW_LINE>if (destinationAvailabilityShort != CommsConstants.NO_DEST_AVAIL) {<NEW_LINE>destinationAvailability = DestinationAvailability.getDestinationAvailability(destinationAvailabilityShort);<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "destinationAvailability=" + destinationAvailability);<NEW_LINE>// Look up the real DestinationListener in the local DestinationListenerCache<NEW_LINE>final DestinationListenerCache destinationListenerCache = convState.getDestinationListenerCache();<NEW_LINE>final DestinationListener destinationListener = destinationListenerCache.get(destinationListenerId);<NEW_LINE>if (destinationListener != null) {<NEW_LINE>// Call the listener on a seperate thread.<NEW_LINE>ClientAsynchEventThreadPool.getInstance().dispatchDestinationListenerEvent(connection, destinationAddress, destinationAvailability, destinationListener);<NEW_LINE>} else {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "DestinationListener id=" + destinationListenerId + " not found in DestinationListenerCache");<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, destinationListenerCache.toString());<NEW_LINE>SIErrorException e = new SIErrorException(nls.getFormattedMessage("UNABLE_TO_FIND_DESTINATION_LISTENER_SICO8019", new Object[] { Short.valueOf(destinationListenerId) }, null));<NEW_LINE>FFDCFilter.processException(e, CLASS_NAME + ".processDestinationListenerCallback", CommsConstants.PROXYRECEIVELISTENER_DESTLIST_CALLBACK_02, this);<NEW_LINE>SibTr.error(tc, "UNABLE_TO_FIND_DESTINATION_LISTENER_SICO8019", e);<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.exit(this, tc, "processDestinationListenerCallback");<NEW_LINE>}
short destinationListenerId = buffer.getShort();
1,058,927
public static Collection<WasmCase> collectFileCases(String type, String resource) throws IOException {<NEW_LINE>Collection<WasmCase> collectedCases = new ArrayList<>();<NEW_LINE>if (resource == null) {<NEW_LINE>return collectedCases;<NEW_LINE>}<NEW_LINE>// Open the wasm_test_index file of the bundle. The wasm_test_index file contains the<NEW_LINE>// available cases for that bundle.<NEW_LINE>InputStream index = WasmCase.class.getResourceAsStream(String.format("/%s/%s/wasm_test_index", type, resource));<NEW_LINE>BufferedReader indexReader = new <MASK><NEW_LINE>// Iterate through the available test of the bundle.<NEW_LINE>while (indexReader.ready()) {<NEW_LINE>String caseSpec = indexReader.readLine().trim();<NEW_LINE>if (caseSpec.equals("") || caseSpec.startsWith("#")) {<NEW_LINE>// Skip empty lines or lines starting with a hash (treat as a comment).<NEW_LINE>continue;<NEW_LINE>} else {<NEW_LINE>collectedCases.add(collectFileCase(type, resource, caseSpec));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return collectedCases;<NEW_LINE>}
BufferedReader(new InputStreamReader(index));
1,377,709
public <R1, R2, R3, R4> Kleisli<W, T, R4> forEach4(Function<? super R, Function<? super T, ? extends Higher<W, ? extends R1>>> value2, BiFunction<? super R, ? super R1, Function<? super T, ? extends Higher<W, ? extends R2>>> value3, Function3<? super R, ? super R1, ? super R2, Function<? super T, ? extends Higher<W, ? extends R3>>> value4, Function4<? super R, ? super R1, ? super R2, ? super R3, ? extends R4> yieldingFunction) {<NEW_LINE>return this.flatMapK(in -> {<NEW_LINE>Kleisli<W, T, R1> a = kleisliK(monad, value2.apply(in));<NEW_LINE>return a.flatMapK(ina -> {<NEW_LINE>Kleisli<W, T, R2> b = kleisliK(monad, value3<MASK><NEW_LINE>return b.flatMapK(inb -> {<NEW_LINE>Kleisli<W, T, R3> c = kleisliK(monad, value4.apply(in, ina, inb));<NEW_LINE>return c.map(inc -> yieldingFunction.apply(in, ina, inb, inc));<NEW_LINE>});<NEW_LINE>});<NEW_LINE>});<NEW_LINE>}
.apply(in, ina));
195,605
public static void outputDetailMetricsFile(final VariantContext.Type variantType, final MetricsFile<GenotypeConcordanceDetailMetrics, ?> genotypeConcordanceDetailMetricsFile, final GenotypeConcordanceCounts counter, final String truthSampleName, final String callSampleName, final boolean missingSitesHomRef, final boolean outputAllRows) {<NEW_LINE><MASK><NEW_LINE>final GenotypeConcordanceScheme scheme = schemeFactory.getScheme(missingSitesHomRef);<NEW_LINE>scheme.validateScheme();<NEW_LINE>for (final TruthState truthState : TruthState.values()) {<NEW_LINE>for (final CallState callState : CallState.values()) {<NEW_LINE>final long count = counter.getCount(truthState, callState);<NEW_LINE>final String contingencyValues = scheme.getContingencyStateString(truthState, callState);<NEW_LINE>if (count > 0 || outputAllRows) {<NEW_LINE>final GenotypeConcordanceDetailMetrics detailMetrics = new GenotypeConcordanceDetailMetrics();<NEW_LINE>detailMetrics.VARIANT_TYPE = variantType;<NEW_LINE>detailMetrics.TRUTH_SAMPLE = truthSampleName;<NEW_LINE>detailMetrics.CALL_SAMPLE = callSampleName;<NEW_LINE>detailMetrics.TRUTH_STATE = truthState;<NEW_LINE>detailMetrics.CALL_STATE = callState;<NEW_LINE>detailMetrics.COUNT = count;<NEW_LINE>detailMetrics.CONTINGENCY_VALUES = contingencyValues;<NEW_LINE>genotypeConcordanceDetailMetricsFile.addMetric(detailMetrics);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
final GenotypeConcordanceSchemeFactory schemeFactory = new GenotypeConcordanceSchemeFactory();
1,702,440
public Void process(ContainerRequestContext requestContext, ContainerResponseContext responseContext) {<NEW_LINE>int responseCode = responseContext.getStatus();<NEW_LINE>String method = requestContext.getMethod();<NEW_LINE>if (responseContext.getEntity() != null) {<NEW_LINE>String path = requestContext.getUriInfo().getPath();<NEW_LINE>String username = requestContext.getSecurityContext().getUserPrincipal().getName();<NEW_LINE>try {<NEW_LINE>EntityReference entityReference = Entity.getEntityReference(responseContext.getEntity());<NEW_LINE>AuditLog auditLog = new AuditLog().withPath(path).withTimestamp(System.currentTimeMillis()).withEntityId(entityReference.getId()).withEntityType(entityReference.getType()).withMethod(AuditLog.Method.fromValue(method)).withUserName(username).withResponseCode(responseCode);<NEW_LINE>LOG.info("Added audit log entry: {}", auditLog);<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Failed to capture audit log for {} and method {} due to {}", path, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
method, e.getMessage());
625,590
protected boolean validateRecaptcha(ValidationContext context, boolean success, String captcha, String secret) {<NEW_LINE>CloseableHttpClient httpClient = context.getSession().getProvider(HttpClientProvider.class).getHttpClient();<NEW_LINE>HttpPost post = new HttpPost("https://www." + getRecaptchaDomain(context.getAuthenticatorConfig()) + "/recaptcha/api/siteverify");<NEW_LINE>List<NameValuePair> formparams = new LinkedList<>();<NEW_LINE>formparams.add(new BasicNameValuePair("secret", secret));<NEW_LINE>formparams.add(new BasicNameValuePair("response", captcha));<NEW_LINE>formparams.add(new BasicNameValuePair("remoteip", context.getConnection().getRemoteAddr()));<NEW_LINE>try {<NEW_LINE>UrlEncodedFormEntity form = new UrlEncodedFormEntity(formparams, "UTF-8");<NEW_LINE>post.setEntity(form);<NEW_LINE>try (CloseableHttpResponse response = httpClient.execute(post)) {<NEW_LINE>InputStream content = response.getEntity().getContent();<NEW_LINE>try {<NEW_LINE>Map json = JsonSerialization.readValue(content, Map.class);<NEW_LINE>Object <MASK><NEW_LINE>success = Boolean.TRUE.equals(val);<NEW_LINE>} finally {<NEW_LINE>EntityUtils.consumeQuietly(response.getEntity());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>ServicesLogger.LOGGER.recaptchaFailed(e);<NEW_LINE>}<NEW_LINE>return success;<NEW_LINE>}
val = json.get("success");
1,616,949
public CopyCommand unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CopyCommand copyCommand = new CopyCommand();<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("DataTableName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>copyCommand.setDataTableName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("DataTableColumns", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>copyCommand.setDataTableColumns(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("CopyOptions", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>copyCommand.setCopyOptions(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return copyCommand;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
752,389
public static EnableOrderResponse unmarshall(EnableOrderResponse enableOrderResponse, UnmarshallerContext _ctx) {<NEW_LINE>enableOrderResponse.setRequestId(_ctx.stringValue("EnableOrderResponse.RequestId"));<NEW_LINE>enableOrderResponse.setCode(_ctx.stringValue("EnableOrderResponse.Code"));<NEW_LINE>enableOrderResponse.setMessage<MASK><NEW_LINE>enableOrderResponse.setSubCode(_ctx.stringValue("EnableOrderResponse.SubCode"));<NEW_LINE>enableOrderResponse.setSubMessage(_ctx.stringValue("EnableOrderResponse.SubMessage"));<NEW_LINE>enableOrderResponse.setLogsId(_ctx.stringValue("EnableOrderResponse.LogsId"));<NEW_LINE>enableOrderResponse.setSuccess(_ctx.booleanValue("EnableOrderResponse.Success"));<NEW_LINE>enableOrderResponse.setTotalCount(_ctx.longValue("EnableOrderResponse.TotalCount"));<NEW_LINE>Model model = new Model();<NEW_LINE>model.setRedirectUrl(_ctx.stringValue("EnableOrderResponse.Model.RedirectUrl"));<NEW_LINE>List<String> orderIds = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("EnableOrderResponse.Model.OrderIds.Length"); i++) {<NEW_LINE>orderIds.add(_ctx.stringValue("EnableOrderResponse.Model.OrderIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>model.setOrderIds(orderIds);<NEW_LINE>List<String> payTradeIds = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("EnableOrderResponse.Model.PayTradeIds.Length"); i++) {<NEW_LINE>payTradeIds.add(_ctx.stringValue("EnableOrderResponse.Model.PayTradeIds[" + i + "]"));<NEW_LINE>}<NEW_LINE>model.setPayTradeIds(payTradeIds);<NEW_LINE>List<LmOrderListItem> lmOrderList = new ArrayList<LmOrderListItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("EnableOrderResponse.Model.LmOrderList.Length"); i++) {<NEW_LINE>LmOrderListItem lmOrderListItem = new LmOrderListItem();<NEW_LINE>lmOrderListItem.setLmOrderId(_ctx.stringValue("EnableOrderResponse.Model.LmOrderList[" + i + "].LmOrderId"));<NEW_LINE>lmOrderList.add(lmOrderListItem);<NEW_LINE>}<NEW_LINE>model.setLmOrderList(lmOrderList);<NEW_LINE>enableOrderResponse.setModel(model);<NEW_LINE>return enableOrderResponse;<NEW_LINE>}
(_ctx.stringValue("EnableOrderResponse.Message"));
599,616
private void createNFAInitialStates() {<NEW_LINE>if (nfaAnchoredInitialStates != null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>hardPrefixNodes = StateSet.create(this);<NEW_LINE><MASK><NEW_LINE>int nextID = 1;<NEW_LINE>MatchFound mf = new MatchFound();<NEW_LINE>initNodeId(mf, nextID++);<NEW_LINE>mf.setNext(getEntryAfterPrefix());<NEW_LINE>PositionAssertion pos = new PositionAssertion(PositionAssertion.Type.CARET);<NEW_LINE>initNodeId(pos, nextID++);<NEW_LINE>nfaAnchoredInitialStates.add(pos);<NEW_LINE>pos.setNext(getEntryAfterPrefix());<NEW_LINE>for (int i = getWrappedPrefixLength() - 1; i >= 0; i--) {<NEW_LINE>RegexASTNode prefixNode = getWrappedRoot().getFirstAlternative().getTerms().get(i);<NEW_LINE>hardPrefixNodes.add(prefixNode);<NEW_LINE>mf = new MatchFound();<NEW_LINE>initNodeId(mf, nextID++);<NEW_LINE>mf.setNext(prefixNode);<NEW_LINE>pos = new PositionAssertion(PositionAssertion.Type.CARET);<NEW_LINE>initNodeId(pos, nextID++);<NEW_LINE>nfaAnchoredInitialStates.add(pos);<NEW_LINE>pos.setNext(prefixNode);<NEW_LINE>}<NEW_LINE>}
nfaAnchoredInitialStates = StateSet.create(this);
1,567,524
public void vcvtpd2udq(AsmRegisterXMM dst, AsmMemoryOperand src) {<NEW_LINE>int code;<NEW_LINE>if (src.isBroadcast()) {<NEW_LINE>code = Code.EVEX_VCVTPD2UDQ_XMM_K1Z_YMMM256B64;<NEW_LINE>} else if (src.size == MemoryOperandSize.YWORD) {<NEW_LINE>code = Code.EVEX_VCVTPD2UDQ_XMM_K1Z_YMMM256B64;<NEW_LINE>} else if (src.size == MemoryOperandSize.XWORD) {<NEW_LINE>code = Code.EVEX_VCVTPD2UDQ_XMM_K1Z_XMMM128B64;<NEW_LINE>} else {<NEW_LINE>throw noOpCodeFoundFor(Mnemonic.VCVTPD2UDQ, dst, src);<NEW_LINE>}<NEW_LINE>addInstruction(Instruction.create(code, dst.get(), src.toMemoryOperand(getBitness())), <MASK><NEW_LINE>}
dst.flags | src.flags);
1,043,925
public static Map createMap(CairoConfiguration configuration, @Transient @NotNull ColumnTypes keyTypes, @Transient @NotNull ColumnTypes valueTypes) {<NEW_LINE><MASK><NEW_LINE>if (Chars.equalsLowerCaseAscii(mapType, "fast")) {<NEW_LINE>return new FastMap(configuration.getSqlMapPageSize(), keyTypes, valueTypes, configuration.getSqlMapKeyCapacity(), configuration.getSqlFastMapLoadFactor(), configuration.getSqlMapMaxResizes());<NEW_LINE>}<NEW_LINE>if (Chars.equalsLowerCaseAscii(mapType, "compact")) {<NEW_LINE>return new CompactMap(configuration.getSqlMapPageSize(), keyTypes, valueTypes, configuration.getSqlMapKeyCapacity(), configuration.getSqlCompactMapLoadFactor(), configuration.getSqlMapMaxResizes(), configuration.getSqlMapMaxPages());<NEW_LINE>}<NEW_LINE>throw CairoException.instance(0).put("unknown map type: ").put(mapType);<NEW_LINE>}
CharSequence mapType = configuration.getDefaultMapType();
1,071,461
public app.freerouting.geometry.planar.Shape transform_to_board(CoordinateTransform p_coordinate_transform) {<NEW_LINE>FloatPoint[] corner_arr = new FloatPoint[this.coordinate_arr.length / 2];<NEW_LINE>double[] curr_point = new double[2];<NEW_LINE>for (int i = 0; i < corner_arr.length; ++i) {<NEW_LINE>curr_point[0] = this.coordinate_arr[2 * i];<NEW_LINE>curr_point[1] = this.coordinate_arr[2 * i + 1];<NEW_LINE>corner_arr[i] = p_coordinate_transform.dsn_to_board(curr_point);<NEW_LINE>}<NEW_LINE>double offset = p_coordinate_transform.dsn_to_board(this.width) / 2;<NEW_LINE>if (corner_arr.length <= 2) {<NEW_LINE>IntOctagon bounding_oct = FloatPoint.bounding_octagon(corner_arr);<NEW_LINE>return bounding_oct.enlarge(offset);<NEW_LINE>}<NEW_LINE>IntPoint[] rounded_corner_arr = new IntPoint[corner_arr.length];<NEW_LINE>for (int i = 0; i < corner_arr.length; ++i) {<NEW_LINE>rounded_corner_arr[i] = <MASK><NEW_LINE>}<NEW_LINE>app.freerouting.geometry.planar.Shape result = new app.freerouting.geometry.planar.PolygonShape(rounded_corner_arr);<NEW_LINE>if (offset > 0) {<NEW_LINE>result = result.bounding_tile().enlarge(offset);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
corner_arr[i].round();
1,353,677
protected Set<String> hydrate(Map<String, Object> attributesMap, boolean fireAfterLoad) {<NEW_LINE>Set<String> <MASK><NEW_LINE>Set<String> attributeNames = metaModelLocal.getAttributeNames();<NEW_LINE>for (Map.Entry<String, Object> entry : attributesMap.entrySet()) {<NEW_LINE>if (attributeNames.contains(entry.getKey())) {<NEW_LINE>if (entry.getValue() instanceof Clob && metaModelLocal.cached()) {<NEW_LINE>String convertedString = Convert.toString(entry.getValue());<NEW_LINE>if (willAttributeModifyModel(entry.getKey(), convertedString)) {<NEW_LINE>this.attributes.put(entry.getKey(), convertedString);<NEW_LINE>changedAttributeNames.add(entry.getKey());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>Object convertedObject = metaModelLocal.getDialect().overrideDriverTypeConversion(metaModelLocal, entry.getKey(), entry.getValue());<NEW_LINE>if (willAttributeModifyModel(entry.getKey(), convertedObject)) {<NEW_LINE>this.attributes.put(entry.getKey(), convertedObject);<NEW_LINE>changedAttributeNames.add(entry.getKey());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (getCompositeKeys() != null) {<NEW_LINE>compositeKeyPersisted = true;<NEW_LINE>}<NEW_LINE>if (fireAfterLoad) {<NEW_LINE>fireAfterLoad();<NEW_LINE>}<NEW_LINE>return changedAttributeNames;<NEW_LINE>}
changedAttributeNames = new HashSet<>();
966,631
public void marshall(CreateEndpointGroupRequest createEndpointGroupRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createEndpointGroupRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getListenerArn(), LISTENERARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getEndpointGroupRegion(), ENDPOINTGROUPREGION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getEndpointConfigurations(), ENDPOINTCONFIGURATIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getTrafficDialPercentage(), TRAFFICDIALPERCENTAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getHealthCheckPort(), HEALTHCHECKPORT_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getHealthCheckProtocol(), HEALTHCHECKPROTOCOL_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getHealthCheckPath(), HEALTHCHECKPATH_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getHealthCheckIntervalSeconds(), HEALTHCHECKINTERVALSECONDS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getThresholdCount(), THRESHOLDCOUNT_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getIdempotencyToken(), IDEMPOTENCYTOKEN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createEndpointGroupRequest.getPortOverrides(), PORTOVERRIDES_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
252,631
public void registerMap() {<NEW_LINE>// Entity ID<NEW_LINE>map(Type.INT);<NEW_LINE>// Gamemode<NEW_LINE>map(Type.UNSIGNED_BYTE);<NEW_LINE>handler(wrapper -> {<NEW_LINE>// Previous gamemode, set to none<NEW_LINE>wrapper.write(Type.<MASK><NEW_LINE>// World list - only used for command completion<NEW_LINE>wrapper.write(Type.STRING_ARRAY, Arrays.copyOf(WORLD_NAMES, WORLD_NAMES.length));<NEW_LINE>// Dimension registry<NEW_LINE>wrapper.write(Type.NBT, DIMENSIONS_TAG.clone());<NEW_LINE>});<NEW_LINE>// Dimension<NEW_LINE>handler(DIMENSION_HANDLER);<NEW_LINE>// Seed<NEW_LINE>map(Type.LONG);<NEW_LINE>// Max players<NEW_LINE>map(Type.UNSIGNED_BYTE);<NEW_LINE>handler(wrapper -> {<NEW_LINE>wrapper.user().getEntityTracker(Protocol1_16To1_15_2.class).addEntity(wrapper.get(Type.INT, 0), Entity1_16Types.PLAYER);<NEW_LINE>// level type<NEW_LINE>final String type = wrapper.read(Type.STRING);<NEW_LINE>// View distance<NEW_LINE>wrapper.passthrough(Type.VAR_INT);<NEW_LINE>// Reduced debug info<NEW_LINE>wrapper.passthrough(Type.BOOLEAN);<NEW_LINE>// Show death screen<NEW_LINE>wrapper.passthrough(Type.BOOLEAN);<NEW_LINE>// Debug<NEW_LINE>wrapper.write(Type.BOOLEAN, false);<NEW_LINE>wrapper.write(Type.BOOLEAN, type.equals("flat"));<NEW_LINE>});<NEW_LINE>}
BYTE, (byte) -1);
1,725,739
public LockEntity postLocksPath(String path, LocksPathBody body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'path' is set<NEW_LINE>if (path == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'path' when calling postLocksPath");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/locks/{path}".replaceAll("\\{" + "path" + "\\}", apiClient.escapeString(path.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final <MASK><NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>GenericType<LockEntity> localVarReturnType = new GenericType<LockEntity>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
String[] localVarAccepts = { "application/json" };
362,601
public static void vertical7(Kernel1D_S32 kernel, GrayU8 src, GrayI16 dst) {<NEW_LINE>final byte[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[3];<NEW_LINE>final int k5 = kernel.data[4];<NEW_LINE>final int k6 = kernel.data[5];<NEW_LINE>final int k7 = kernel.data[6];<NEW_LINE>final int radius = kernel.getRadius();<NEW_LINE>final int imgWidth = dst.getWidth();<NEW_LINE>final int imgHeight = dst.getHeight();<NEW_LINE>final int yEnd = imgHeight - radius;<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(radius, yEnd, y -> {<NEW_LINE>for (int y = radius; y < yEnd; y++) {<NEW_LINE>int indexDst = dst<MASK><NEW_LINE>int i = src.startIndex + (y - radius) * src.stride;<NEW_LINE>final int iEnd = i + imgWidth;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc[indexSrc] & 0xFF) * k1;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k2;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k3;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k4;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k5;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k6;<NEW_LINE>indexSrc += src.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k7;<NEW_LINE>dataDst[indexDst++] = (short) total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// CONCURRENT_ABOVE });<NEW_LINE>}
.startIndex + y * dst.stride;
1,581,043
public static GetWorkflowInstanceResponse unmarshall(GetWorkflowInstanceResponse getWorkflowInstanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>getWorkflowInstanceResponse.setRequestId(_ctx.stringValue("GetWorkflowInstanceResponse.RequestId"));<NEW_LINE>getWorkflowInstanceResponse.setSuccess(_ctx.stringValue("GetWorkflowInstanceResponse.Success"));<NEW_LINE>WorkflowInstanceDetail workflowInstanceDetail = new WorkflowInstanceDetail();<NEW_LINE>workflowInstanceDetail.setFlowInstanceId(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FlowInstanceId"));<NEW_LINE>workflowInstanceDetail.setFlowNodeSize(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FlowNodeSize"));<NEW_LINE>workflowInstanceDetail.setHasFailedNode(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.HasFailedNode"));<NEW_LINE>FailedNodeInstance failedNodeInstance = new FailedNodeInstance();<NEW_LINE>failedNodeInstance.setNodeInstanceId(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FailedNodeInstance.NodeInstanceId"));<NEW_LINE>failedNodeInstance.setJobName<MASK><NEW_LINE>failedNodeInstance.setJobType(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FailedNodeInstance.JobType"));<NEW_LINE>failedNodeInstance.setStatus(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FailedNodeInstance.Status"));<NEW_LINE>failedNodeInstance.setExternalId(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FailedNodeInstance.ExternalId"));<NEW_LINE>failedNodeInstance.setExternalInfo(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FailedNodeInstance.ExternalInfo"));<NEW_LINE>workflowInstanceDetail.setFailedNodeInstance(failedNodeInstance);<NEW_LINE>List<LogItem> runtimeLogs = new ArrayList<LogItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs.Length"); i++) {<NEW_LINE>LogItem logItem = new LogItem();<NEW_LINE>logItem.setInstanceId(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs[" + i + "].InstanceId"));<NEW_LINE>logItem.setBizTime(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs[" + i + "].BizTime"));<NEW_LINE>logItem.setLogType(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs[" + i + "].LogType"));<NEW_LINE>logItem.setLogId(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs[" + i + "].LogId"));<NEW_LINE>logItem.setLogSummary(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs[" + i + "].LogSummary"));<NEW_LINE>logItem.setLogContent(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs[" + i + "].LogContent"));<NEW_LINE>logItem.setTrigger(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.RuntimeLogs[" + i + "].Trigger"));<NEW_LINE>runtimeLogs.add(logItem);<NEW_LINE>}<NEW_LINE>workflowInstanceDetail.setRuntimeLogs(runtimeLogs);<NEW_LINE>getWorkflowInstanceResponse.setWorkflowInstanceDetail(workflowInstanceDetail);<NEW_LINE>return getWorkflowInstanceResponse;<NEW_LINE>}
(_ctx.stringValue("GetWorkflowInstanceResponse.WorkflowInstanceDetail.FailedNodeInstance.JobName"));
1,083,027
private void printHorizontalBorder(AutoTypeImage input, AutoTypeImage output) {<NEW_LINE>String kernelType = input.getKernelType();<NEW_LINE>String inputType = input.getSingleBandName();<NEW_LINE>String outputType = output.getSingleBandName();<NEW_LINE>String borderType = input.getBorderNameSB();<NEW_LINE><MASK><NEW_LINE>out.print("\tpublic static void horizontal(Kernel1D_" + kernelType + " kernel, " + inputType + " input, " + outputType + " output, " + borderType + " binput ) {\n" + "\n" + "\t\tbinput.setImage(input);\n" + "\t\tfinal int offset = kernel.getOffset();\n" + "\t\tfinal " + sumType + " weight = kernel.computeSum();\n" + "\n" + "\t\tfinal int width = input.getWidth();\n" + "\t\tfinal int height = input.getHeight();\n" + "\n" + "\t\tfor (int y = 0; y < height; y++) {\n" + "\t\t\tfor( int x = 0; x < width; x++ ) {\n" + "\t\t\t\t" + sumType + " total = 0;\n" + "\n" + "\t\t\t\tfor( int j = 0; j < kernel.getWidth(); j++ ) {\n" + "\t\t\t\t\tint xx = x - offset + j;\n" + "\t\t\t\t\ttotal += binput.get(xx,y)*kernel.get(j);\n" + "\t\t\t\t}\n" + "\t\t\t\toutput.set(x,y, " + divide + ");\n" + "\t\t\t}\n" + "\t\t}\n" + "\t}\n\n");<NEW_LINE>}
String sumType = input.getSumType();
998,307
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {<NEW_LINE>super.initialize(subject, callbackHandler, sharedState, options);<NEW_LINE>_hostname = (String) options.get("hostname");<NEW_LINE>_port = Integer.parseInt((String) options.get("port"));<NEW_LINE>_contextFactory = (String) options.get("contextFactory");<NEW_LINE>_bindDn = (<MASK><NEW_LINE>_bindPassword = (String) options.get("bindPassword");<NEW_LINE>_authenticationMethod = (String) options.get("authenticationMethod");<NEW_LINE>_userBaseDn = (String) options.get("userBaseDn");<NEW_LINE>_roleBaseDn = (String) options.get("roleBaseDn");<NEW_LINE>if (options.containsKey("forceBindingLogin")) {<NEW_LINE>_forceBindingLogin = Boolean.parseBoolean((String) options.get("forceBindingLogin"));<NEW_LINE>}<NEW_LINE>if (options.containsKey("useLdaps")) {<NEW_LINE>_useLdaps = Boolean.parseBoolean((String) options.get("useLdaps"));<NEW_LINE>}<NEW_LINE>_userObjectClass = getOption(options, "userObjectClass", _userObjectClass);<NEW_LINE>_userRdnAttribute = getOption(options, "userRdnAttribute", _userRdnAttribute);<NEW_LINE>_userIdAttribute = getOption(options, "userIdAttribute", _userIdAttribute);<NEW_LINE>_userPasswordAttribute = getOption(options, "userPasswordAttribute", _userPasswordAttribute);<NEW_LINE>_roleObjectClass = getOption(options, "roleObjectClass", _roleObjectClass);<NEW_LINE>_roleMemberAttribute = getOption(options, "roleMemberAttribute", _roleMemberAttribute);<NEW_LINE>_roleNameAttribute = getOption(options, "roleNameAttribute", _roleNameAttribute);<NEW_LINE>_debug = Boolean.parseBoolean(String.valueOf(getOption(options, "debug", Boolean.toString(_debug))));<NEW_LINE>try {<NEW_LINE>_rootContext = new InitialDirContext(getEnvironment());<NEW_LINE>} catch (NamingException ex) {<NEW_LINE>throw new IllegalStateException("Unable to establish root context", ex);<NEW_LINE>}<NEW_LINE>}
String) options.get("bindDn");
763,071
private void resolveHttpParams(HttpParams params) {<NEW_LINE>if (params != null) {<NEW_LINE>clientBuilder.setDefaultRequestConfig(RequestConfig.custom().setConnectTimeout(params.getConnectTimeout()).setConnectionRequestTimeout(params.getReadTimeout()).build());<NEW_LINE>if (params.getProxy() != null) {<NEW_LINE>InetSocketAddress socketAddress = (InetSocketAddress) params<MASK><NEW_LINE>HttpHost proxy = new HttpHost(socketAddress.getHostName(), socketAddress.getPort());<NEW_LINE>clientBuilder.setProxy(proxy);<NEW_LINE>}<NEW_LINE>if (params.getSSLContext() != null) {<NEW_LINE>clientBuilder.setSSLSocketFactory(new SSLConnectionSocketFactory(params.getSSLContext(), params.getHostnameVerifier() != null ? new CustomHostnameVerifier(params.getHostnameVerifier()) : SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER));<NEW_LINE>}<NEW_LINE>if (params.getHostnameVerifier() != null) {<NEW_LINE>clientBuilder.setHostnameVerifier(new CustomHostnameVerifier(params.getHostnameVerifier()));<NEW_LINE>}<NEW_LINE>clientBuilder.setMaxConnTotal(params.getMaxConnections());<NEW_LINE>clientBuilder.setMaxConnPerRoute(params.getMaxConnectionsPerHost());<NEW_LINE>}<NEW_LINE>}
.getProxy().address();
1,286,324
private Matcher meta(Matcher matcher) {<NEW_LINE>int start = current - 1;<NEW_LINE>advance(c -> META.contains((char) c));<NEW_LINE>--current;<NEW_LINE>String quantifier = tokens.subSequence(start, current).toString();<NEW_LINE>switch(quantifier) {<NEW_LINE>case "?":<NEW_LINE>// Makes repeat reluctant<NEW_LINE>if (matcher instanceof RepeatMatcher) {<NEW_LINE>return matcher;<NEW_LINE>}<NEW_LINE>case "??":<NEW_LINE>case "?+":<NEW_LINE>return OrMatcher.create(matcher, TrueMatcher.INSTANCE);<NEW_LINE>case "*":<NEW_LINE>case "*?":<NEW_LINE>return new <MASK><NEW_LINE>case "*+":<NEW_LINE>return new RepeatMatcher(matcher, 0, Integer.MAX_VALUE);<NEW_LINE>case "+":<NEW_LINE>case "+?":<NEW_LINE>return SeqMatcher.create(matcher, new ZeroOrMoreMatcher(matcher, term()));<NEW_LINE>case "++":<NEW_LINE>return SeqMatcher.create(matcher, new RepeatMatcher(matcher, 1, Integer.MAX_VALUE));<NEW_LINE>default:<NEW_LINE>throw new IllegalArgumentException("unknown quantifier: " + quantifier);<NEW_LINE>}<NEW_LINE>}
ZeroOrMoreMatcher(matcher, term());
1,306,079
public void endVisit(ExplicitConstructorCall x, BlockScope scope) {<NEW_LINE>try {<NEW_LINE>SourceInfo info = makeSourceInfo(x);<NEW_LINE>JConstructor ctor = (JConstructor) typeMap.get(x.binding);<NEW_LINE>JExpression trueQualifier = makeThisRef(info);<NEW_LINE>JMethodCall call = new JMethodCall(info, trueQualifier, ctor);<NEW_LINE>List<JExpression> callArgs = popCallArguments(info, x.arguments, x.binding);<NEW_LINE>if (curClass.classType.isEnumOrSubclass() != null) {<NEW_LINE>// Enums: wire up synthetic name/ordinal params to the super method.<NEW_LINE>JParameterRef enumNameRef = curMethod.method.getParams().get(0).makeRef(info);<NEW_LINE>call.addArg(enumNameRef);<NEW_LINE>JParameterRef enumOrdinalRef = curMethod.method.getParams().get(1).makeRef(info);<NEW_LINE>call.addArg(enumOrdinalRef);<NEW_LINE>}<NEW_LINE>if (x.isSuperAccess()) {<NEW_LINE>JExpression qualifier = pop(x.qualification);<NEW_LINE>ReferenceBinding superClass = x.binding.declaringClass;<NEW_LINE>boolean nestedSuper = JdtUtil.isInnerClass(superClass);<NEW_LINE>if (nestedSuper) {<NEW_LINE>processSuperCallThisArgs(superClass, <MASK><NEW_LINE>}<NEW_LINE>call.addArgs(callArgs);<NEW_LINE>if (nestedSuper) {<NEW_LINE>processSuperCallLocalArgs(superClass, call);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>assert (x.qualification == null);<NEW_LINE>ReferenceBinding declaringClass = x.binding.declaringClass;<NEW_LINE>boolean nested = JdtUtil.isInnerClass(declaringClass);<NEW_LINE>if (nested) {<NEW_LINE>processThisCallThisArgs(declaringClass, call);<NEW_LINE>}<NEW_LINE>call.addArgs(callArgs);<NEW_LINE>if (nested) {<NEW_LINE>processThisCallLocalArgs(declaringClass, call);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>call.setStaticDispatchOnly();<NEW_LINE>push(call.makeStatement());<NEW_LINE>} catch (Throwable e) {<NEW_LINE>throw translateException(x, e);<NEW_LINE>} finally {<NEW_LINE>scope.methodScope().isConstructorCall = false;<NEW_LINE>}<NEW_LINE>}
call, qualifier, x.qualification);
1,049,308
public List<AnalysisResult> run() throws Exception {<NEW_LINE>Stopwatch sw = Stopwatch.createStarted();<NEW_LINE>DataIngester ingester = conf.constructIngester();<NEW_LINE>List<Datum> data = ingester.getStream().drain();<NEW_LINE>if (conf.isSet(MacroBaseConf.LOW_METRIC_TRANSFORM)) {<NEW_LINE>LowMetricTransform lmt = new LowMetricTransform(conf);<NEW_LINE>lmt.consume(data);<NEW_LINE>data = lmt.getStream().drain();<NEW_LINE>}<NEW_LINE>System.gc();<NEW_LINE>final long loadMs = sw.elapsed(TimeUnit.MILLISECONDS);<NEW_LINE>FeatureTransform ft = new BatchScoreFeatureTransform(conf);<NEW_LINE>ft.consume(data);<NEW_LINE>OutlierClassifier oc = new BatchingPercentileClassifier(conf);<NEW_LINE>oc.consume(ft.getStream().drain());<NEW_LINE>Summarizer bs = new BatchSummarizer(conf);<NEW_LINE>bs.consume(oc.getStream().drain());<NEW_LINE>Summary result = bs.summarize().getStream().drain().get(0);<NEW_LINE>final long totalMs = sw.elapsed(TimeUnit.MILLISECONDS) - loadMs;<NEW_LINE>final <MASK><NEW_LINE>final long executeMs = totalMs - result.getCreationTimeMs();<NEW_LINE>log.info("took {}ms ({} tuples/sec)", totalMs, (result.getNumInliers() + result.getNumOutliers()) / (double) totalMs * 1000);<NEW_LINE>return Arrays.asList(new AnalysisResult(result.getNumOutliers(), result.getNumInliers(), loadMs, executeMs, summarizeMs, result.getItemsets()));<NEW_LINE>}
long summarizeMs = result.getCreationTimeMs();
1,629,544
private void inferActiveTurnLanesFromTurn(TurnType tt, int type) {<NEW_LINE>boolean found = false;<NEW_LINE>if (tt.getValue() == type && tt.getLanes() != null) {<NEW_LINE>for (int it = 0; it < tt.getLanes().length; it++) {<NEW_LINE>int turn = tt.getLanes()[it];<NEW_LINE>if (TurnType.getPrimaryTurn(turn) == type || TurnType.getSecondaryTurn(turn) == type || TurnType.getTertiaryTurn(turn) == type) {<NEW_LINE>found = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (found) {<NEW_LINE>for (int it = 0; it < tt.getLanes().length; it++) {<NEW_LINE>int turn = <MASK><NEW_LINE>if (TurnType.getPrimaryTurn(turn) != type) {<NEW_LINE>if (TurnType.getSecondaryTurn(turn) == type) {<NEW_LINE>int st = TurnType.getSecondaryTurn(turn);<NEW_LINE>TurnType.setSecondaryTurn(tt.getLanes(), it, TurnType.getPrimaryTurn(turn));<NEW_LINE>TurnType.setPrimaryTurn(tt.getLanes(), it, st);<NEW_LINE>} else if (TurnType.getTertiaryTurn(turn) == type) {<NEW_LINE>int st = TurnType.getTertiaryTurn(turn);<NEW_LINE>TurnType.setTertiaryTurn(tt.getLanes(), it, TurnType.getPrimaryTurn(turn));<NEW_LINE>TurnType.setPrimaryTurn(tt.getLanes(), it, st);<NEW_LINE>} else {<NEW_LINE>tt.getLanes()[it] = turn & (~1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
tt.getLanes()[it];
1,804,161
protected void paintIcon(Graphics2D g2) {<NEW_LINE>final int state = 0;<NEW_LINE>final var wh = scale(12);<NEW_LINE>var x = scale(state);<NEW_LINE>var y = scale(11) + scale(state);<NEW_LINE>final int[] xpos = { x, x + wh, scale(14), scale(3) };<NEW_LINE>final int[] ypos = { y, y, scale(14), scale(14) };<NEW_LINE>g2.setColor(Color.LIGHT_GRAY);<NEW_LINE>g2.fillPolygon(xpos, ypos, 4);<NEW_LINE>g2.setColor(Color.BLACK);<NEW_LINE>g2.drawPolygon(xpos, ypos, 4);<NEW_LINE>x = wh + scale(state);<NEW_LINE>y = scale(state);<NEW_LINE>final int[] xpos1 = { x, x, scale(14), scale(14) };<NEW_LINE>final int[] ypos1 = { y, y + wh, scale(14), scale(3) };<NEW_LINE>g2.setColor(Color.LIGHT_GRAY);<NEW_LINE>g2.fillPolygon(xpos1, ypos1, 4);<NEW_LINE>g2.setColor(Color.BLACK);<NEW_LINE>g2.drawPolygon(xpos1, ypos1, 4);<NEW_LINE>g2.setColor(Color.WHITE);<NEW_LINE>g2.fillRect(scale(state), scale(state), wh, wh);<NEW_LINE>g2.setColor(Color.BLACK);<NEW_LINE>g2.drawRect(scale(state), scale(state), wh, wh);<NEW_LINE>final var s = "B";<NEW_LINE>final var f = g2.getFont().deriveFont((float) wh);<NEW_LINE>final var t = new TextLayout(s, f, g2.getFontRenderContext());<NEW_LINE>g2.setColor(Color.BLUE);<NEW_LINE>final var center = <MASK><NEW_LINE>t.draw(g2, center - (float) t.getBounds().getCenterX(), center - (float) t.getBounds().getCenterY());<NEW_LINE>}
scale(state) + wh / 2;
84,108
@MethodHook(type = HookType.AFTER, targetClassName = "java.util.regex.Pattern", targetMethod = "CIRangeU", targetMethodDescriptor = "(II)Ljava/util/regex/Pattern$CharPredicate;", additionalClassesToHook = { "java.util.regex.Pattern" })<NEW_LINE>// Java 8 uses anonymous classes extending CharProperty instead of lambdas implementing<NEW_LINE>// CharPredicate to match single characters, so also hook those.<NEW_LINE>@MethodHook(type = HookType.AFTER, targetClassName = "java.util.regex.Pattern", targetMethod = "rangeFor", targetMethodDescriptor = "(II)Ljava/util/regex/Pattern$CharProperty;", additionalClassesToHook = { "java.util.regex.Pattern" })<NEW_LINE>@MethodHook(type = HookType.AFTER, targetClassName = "java.util.regex.Pattern", targetMethod = "caseInsensitiveRangeFor", targetMethodDescriptor = "(II)Ljava/util/regex/Pattern$CharProperty;", additionalClassesToHook = { "java.util.regex.Pattern" })<NEW_LINE>public static void rangeHook(MethodHandle method, Object node, Object[] args, int hookId, Object predicate) {<NEW_LINE>if (HOOK_DISABLED || predicate == null)<NEW_LINE>return;<NEW_LINE>PREDICATE_SOLUTIONS.get().put(predicate, (char) <MASK><NEW_LINE>}
(int) args[0]);
1,324,331
public final void regex() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST regex_AST = null;<NEW_LINE>switch(LA(1)) {<NEW_LINE>case REGEX:<NEW_LINE>{<NEW_LINE>AST tmp284_AST = null;<NEW_LINE>tmp284_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp284_AST);<NEW_LINE>match(REGEX);<NEW_LINE>regex_AST = (AST) currentAST.root;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case REGEX_BEFORE_EXPRESSION_SUBSTITUTION:<NEW_LINE>{<NEW_LINE>AST tmp285_AST = null;<NEW_LINE>tmp285_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.makeASTRoot(currentAST, tmp285_AST);<NEW_LINE>match(REGEX_BEFORE_EXPRESSION_SUBSTITUTION);<NEW_LINE>expression_substituation();<NEW_LINE>astFactory.addASTChild(currentAST, returnAST);<NEW_LINE>if (inputState.guessing == 0) {<NEW_LINE>tellLexerWeHaveFinishedParsingRegexExpressionSubstituation();<NEW_LINE>}<NEW_LINE>{<NEW_LINE>_loop215: do {<NEW_LINE>if ((LA(1) == STRING_BETWEEN_EXPRESSION_SUBSTITUTION)) {<NEW_LINE>AST tmp286_AST = null;<NEW_LINE>tmp286_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp286_AST);<NEW_LINE>match(STRING_BETWEEN_EXPRESSION_SUBSTITUTION);<NEW_LINE>expression_substituation();<NEW_LINE>astFactory.addASTChild(currentAST, returnAST);<NEW_LINE>if (inputState.guessing == 0) {<NEW_LINE>tellLexerWeHaveFinishedParsingRegexExpressionSubstituation();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>break _loop215;<NEW_LINE>}<NEW_LINE>} while (true);<NEW_LINE>}<NEW_LINE>AST tmp287_AST = null;<NEW_LINE>tmp287_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp287_AST);<NEW_LINE>match(STRING_AFTER_EXPRESSION_SUBSTITUTION);<NEW_LINE><MASK><NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>returnAST = regex_AST;<NEW_LINE>}
regex_AST = (AST) currentAST.root;
1,607,265
public ConnectionHeaderParameter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ConnectionHeaderParameter connectionHeaderParameter = new ConnectionHeaderParameter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Key", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>connectionHeaderParameter.setKey(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Value", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>connectionHeaderParameter.setValue(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("IsValueSecret", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>connectionHeaderParameter.setIsValueSecret(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return connectionHeaderParameter;<NEW_LINE>}
class).unmarshall(context));
1,537,397
public static void startNewCall(Activity activity, SnackbarShower snackbarShower, MegaUser user, PasscodeManagement passcodeManagement) {<NEW_LINE>if (user == null)<NEW_LINE>return;<NEW_LINE>MegaChatApiAndroid megaChatApi = MegaApplication.getInstance().getMegaChatApi();<NEW_LINE>MegaChatRoom chat = megaChatApi.getChatRoomByUser(user.getHandle());<NEW_LINE>MegaChatPeerList peers = MegaChatPeerList.createInstance();<NEW_LINE>if (chat == null) {<NEW_LINE>logDebug("Chat doesn't exist");<NEW_LINE>ArrayList<MegaChatRoom> <MASK><NEW_LINE>ArrayList<MegaUser> usersNoChat = new ArrayList<>();<NEW_LINE>usersNoChat.add(user);<NEW_LINE>CreateChatListener listener = new CreateChatListener(CreateChatListener.START_AUDIO_CALL, chats, usersNoChat, activity, snackbarShower);<NEW_LINE>if (peers != null) {<NEW_LINE>peers.addPeer(user.getHandle(), MegaChatPeerList.PRIV_STANDARD);<NEW_LINE>megaChatApi.createChat(false, peers, listener);<NEW_LINE>}<NEW_LINE>} else if (megaChatApi.getChatCall(chat.getChatId()) != null) {<NEW_LINE>logDebug("There is a call, open it");<NEW_LINE>openMeetingInProgress(activity, chat.getChatId(), true, passcodeManagement);<NEW_LINE>} else if (isStatusConnected(activity, chat.getChatId())) {<NEW_LINE>logDebug("There is no call, start it");<NEW_LINE>MegaApplication.setUserWaitingForCall(user.getHandle());<NEW_LINE>startCallWithChatOnline(activity, chat);<NEW_LINE>}<NEW_LINE>}
chats = new ArrayList<>();
1,155,740
private static void plainValidationInternal(ValidationContext vCxt, Graph data, Node node, Shape shape) {<NEW_LINE>Collection<Node> focusNodes;<NEW_LINE>if (node != null) {<NEW_LINE>if (!VLib.isFocusNode(shape, node, data))<NEW_LINE>return;<NEW_LINE>focusNodes = Collections.singleton(node);<NEW_LINE>} else {<NEW_LINE>focusNodes = VLib.focusNodes(data, shape);<NEW_LINE>}<NEW_LINE>if (vCxt.isVerbose()) {<NEW_LINE>out.println(shape.toString());<NEW_LINE>out.printf("N: FocusNodes(%d): %s\n", focusNodes.size(), focusNodes);<NEW_LINE>out.incIndent();<NEW_LINE>}<NEW_LINE>for (Node focusNode : focusNodes) {<NEW_LINE>if (vCxt.isVerbose())<NEW_LINE><MASK><NEW_LINE>VLib.validateShape(vCxt, data, shape, focusNode);<NEW_LINE>}<NEW_LINE>if (vCxt.isVerbose()) {<NEW_LINE>out.decIndent();<NEW_LINE>}<NEW_LINE>}
out.println("F: " + focusNode);
639,789
public ApiResponse handleApiAction(String name, JSONObject params) throws ApiException {<NEW_LINE>RuleConfig rc;<NEW_LINE>switch(name) {<NEW_LINE>case ACTION_SET_RULE_CONFIG_VALUE:<NEW_LINE>rc = extension.getRuleConfig(params.getString(PARAM_KEY));<NEW_LINE>if (rc != null) {<NEW_LINE>if (params.containsKey(PARAM_VALUE)) {<NEW_LINE>extension.setRuleConfigValue(rc.getKey(), params.getString(PARAM_VALUE));<NEW_LINE>} else {<NEW_LINE>extension.setRuleConfigValue(rc.getKey(), "");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new ApiException(<MASK><NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ACTION_RESET_RULE_CONFIG_VALUE:<NEW_LINE>rc = extension.getRuleConfig(params.getString(PARAM_KEY));<NEW_LINE>if (rc != null) {<NEW_LINE>extension.resetRuleConfigValue(rc.getKey());<NEW_LINE>} else {<NEW_LINE>throw new ApiException(ApiException.Type.DOES_NOT_EXIST, PARAM_KEY);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case ACTION_RESET_ALL_RULE_CONFIG_VALUES:<NEW_LINE>extension.resetAllRuleConfigValues();<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new ApiException(ApiException.Type.BAD_ACTION);<NEW_LINE>}<NEW_LINE>return ApiResponseElement.OK;<NEW_LINE>}
ApiException.Type.DOES_NOT_EXIST, PARAM_KEY);
369,333
public void init(IActionBars actionBars) {<NEW_LINE>super.init(actionBars);<NEW_LINE>customedit = menuFactory.createEditSelected();<NEW_LINE>customedit.setEnabled(false);<NEW_LINE>undoActionGlobal = menuFactory.createUndo();<NEW_LINE>redoActionGlobal = menuFactory.createRedo();<NEW_LINE>printActionGlobal = menuFactory.createPrint();<NEW_LINE>cutActionDiagram = menuFactory.createCut();<NEW_LINE>cutActionDiagram.setEnabled(false);<NEW_LINE>pasteActionDiagram = menuFactory.createPaste();<NEW_LINE>pasteActionDiagram.setEnabled(false);<NEW_LINE>deleteActionDiagram = menuFactory.createDelete();<NEW_LINE>deleteActionDiagram.setEnabled(false);<NEW_LINE>searchActionDiagram = menuFactory.createSearch();<NEW_LINE>copyActionDiagram = menuFactory.createCopy();<NEW_LINE>selectallActionDiagram = menuFactory.createSelectAll();<NEW_LINE>copyActionCustomPanel = createPanelAction(Pane.CUSTOMCODE, ActionName.COPY);<NEW_LINE>cutActionCustomPanel = createPanelAction(Pane.CUSTOMCODE, ActionName.CUT);<NEW_LINE>pasteActionCustomPanel = createPanelAction(Pane.CUSTOMCODE, ActionName.PASTE);<NEW_LINE>selectAllActionCustomPanel = createPanelAction(Pane.CUSTOMCODE, ActionName.SELECTALL);<NEW_LINE>copyActionPropPanel = createPanelAction(Pane.PROPERTY, ActionName.COPY);<NEW_LINE>cutActionPropPanel = createPanelAction(<MASK><NEW_LINE>pasteActionPropPanel = createPanelAction(Pane.PROPERTY, ActionName.PASTE);<NEW_LINE>selectAllActionPropPanel = createPanelAction(Pane.PROPERTY, ActionName.SELECTALL);<NEW_LINE>setGlobalActionHandlers(Pane.DIAGRAM);<NEW_LINE>}
Pane.PROPERTY, ActionName.CUT);
997,283
public int compare(T o1, T o2) {<NEW_LINE>Matcher m1 = parts.matcher(converter.apply(o1));<NEW_LINE>Matcher m2 = parts.matcher(converter.apply(o2));<NEW_LINE>while (m1.find() && m2.find()) {<NEW_LINE>int compareCharGroup = m1.group(ALPHA_PART).compareTo(m2.group(ALPHA_PART));<NEW_LINE>if (compareCharGroup != 0) {<NEW_LINE>return compareCharGroup;<NEW_LINE>}<NEW_LINE>String numberPart1 = m1.group(NUM_PART);<NEW_LINE>String <MASK><NEW_LINE>if (numberPart1.isEmpty() || numberPart2.isEmpty()) {<NEW_LINE>return compareOneEmptyPart(numberPart1, numberPart2);<NEW_LINE>}<NEW_LINE>String nonZeroNumberPart1 = trimLeadingZeroes(numberPart1);<NEW_LINE>String nonZeroNumberPart2 = trimLeadingZeroes(numberPart2);<NEW_LINE>int lengthNumber1 = nonZeroNumberPart1.length();<NEW_LINE>int lengthNumber2 = nonZeroNumberPart2.length();<NEW_LINE>if (lengthNumber1 != lengthNumber2) {<NEW_LINE>if (lengthNumber1 < lengthNumber2) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>int compareNumber = nonZeroNumberPart1.compareTo(nonZeroNumberPart2);<NEW_LINE>if (compareNumber != 0) {<NEW_LINE>return compareNumber;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (m1.hitEnd() && m2.hitEnd()) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>if (m1.hitEnd()) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>return 1;<NEW_LINE>}
numberPart2 = m2.group(NUM_PART);
359,009
public AuditLogPart combine(AuditLogPart other) {<NEW_LINE>if (other.guildId != this.guildId) {<NEW_LINE>throw new IllegalArgumentException("Cannot combine audit log parts from two different guilds.");<NEW_LINE>}<NEW_LINE>Set<Webhook> combinedWebhooks = new HashSet<>(this.webhooks.size() + <MASK><NEW_LINE>combinedWebhooks.addAll(this.webhooks);<NEW_LINE>combinedWebhooks.addAll(other.webhooks);<NEW_LINE>Set<User> combinedUsers = new HashSet<>(this.users.size() + other.users.size());<NEW_LINE>combinedUsers.addAll(this.users);<NEW_LINE>combinedUsers.addAll(other.users);<NEW_LINE>List<AuditLogEntry> combinedEntries = new ArrayList<>(this.entries.size() + other.entries.size());<NEW_LINE>combinedEntries.addAll(this.entries);<NEW_LINE>combinedEntries.addAll(other.entries);<NEW_LINE>return new AuditLogPart(guildId, combinedWebhooks, combinedUsers, combinedEntries);<NEW_LINE>}
other.webhooks.size());
1,767,820
private Optional<JsonResponseUpsert> persistForBPartnerWithinTrx(@Nullable final String orgCode, @NonNull final ExternalIdentifier bpartnerIdentifier, @NonNull final JsonRequestLocationUpsert jsonRequestLocationUpsert, @NonNull final SyncAdvise parentSyncAdvise) {<NEW_LINE>final OrgId orgId = retrieveOrgIdOrDefault(orgCode);<NEW_LINE>final Optional<BPartnerComposite> optBPartnerComposite = jsonRetrieverService.getBPartnerComposite(orgId, bpartnerIdentifier);<NEW_LINE>if (!optBPartnerComposite.isPresent()) {<NEW_LINE>// 404<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>final BPartnerComposite bpartnerComposite = optBPartnerComposite.get();<NEW_LINE>final ShortTermLocationIndex shortTermIndex = new ShortTermLocationIndex(bpartnerComposite);<NEW_LINE>final SyncAdvise effectiveSyncAdvise = coalesceNotNull(jsonRequestLocationUpsert.getSyncAdvise(), parentSyncAdvise);<NEW_LINE>final List<JsonRequestLocationUpsertItem> requestItems = jsonRequestLocationUpsert.getRequestItems();<NEW_LINE>final Map<String, JsonResponseUpsertItemBuilder> identifierToBuilder = new HashMap<>();<NEW_LINE>for (final JsonRequestLocationUpsertItem requestItem : requestItems) {<NEW_LINE>final JsonResponseUpsertItemBuilder responseItemBuilder = syncJsonLocation(bpartnerComposite.getOrgId(), requestItem, effectiveSyncAdvise, shortTermIndex);<NEW_LINE>// we don't know the metasfreshId yet, so for now just store what we know into the map<NEW_LINE>identifierToBuilder.put(requestItem.getLocationIdentifier(), responseItemBuilder);<NEW_LINE>}<NEW_LINE>bpartnerCompositeRepository.save(bpartnerComposite, true);<NEW_LINE>// now collect the metasfreshIds that we got after having invoked save<NEW_LINE>final JsonResponseUpsertBuilder response = JsonResponseUpsert.builder();<NEW_LINE>for (final JsonRequestLocationUpsertItem requestItem : requestItems) {<NEW_LINE>final Optional<BPartnerLocation> bpartnerLocation = bpartnerComposite.<MASK><NEW_LINE>if (bpartnerLocation.isPresent()) {<NEW_LINE>final JsonMetasfreshId metasfreshId = JsonMetasfreshId.of(BPartnerLocationId.toRepoId(bpartnerLocation.get().getId()));<NEW_LINE>final ExternalIdentifier externalIdentifier = ExternalIdentifier.of(requestItem.getLocationIdentifier());<NEW_LINE>handleExternalReference(externalIdentifier, metasfreshId, BPLocationExternalReferenceType.BPARTNER_LOCATION);<NEW_LINE>final JsonResponseUpsertItem responseItem = identifierToBuilder.get(requestItem.getLocationIdentifier()).metasfreshId(metasfreshId).build();<NEW_LINE>response.responseItem(responseItem);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return Optional.of(response.build());<NEW_LINE>}
extractLocationByHandle(requestItem.getLocationIdentifier());
1,395,357
public void run() {<NEW_LINE>try {<NEW_LINE>log.info("Running {}", getName());<NEW_LINE>// Create the update lambda.<NEW_LINE>UniverseUpdater updater = new UniverseUpdater() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(Universe universe) {<NEW_LINE>// If this universe is not being edited, fail the request.<NEW_LINE><MASK><NEW_LINE>if (!universeDetails.updateInProgress && !universeDetails.backupInProgress) {<NEW_LINE>log.error("Universe " + taskParams().universeUUID + " is not being edited.");<NEW_LINE>throw new RuntimeException("Universe " + taskParams().universeUUID + " is not being edited");<NEW_LINE>}<NEW_LINE>// Set the operation success flag.<NEW_LINE>universeDetails.updateSucceeded = true;<NEW_LINE>universe.setUniverseDetails(universeDetails);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>// Perform the update. If unsuccessful, this will throw a runtime exception which we do not<NEW_LINE>// catch as we want to fail.<NEW_LINE>saveUniverseDetails(updater);<NEW_LINE>} catch (Exception e) {<NEW_LINE>String msg = getName() + " failed with exception " + e.getMessage();<NEW_LINE>log.warn(msg, e.getMessage());<NEW_LINE>throw new RuntimeException(msg, e);<NEW_LINE>}<NEW_LINE>}
UniverseDefinitionTaskParams universeDetails = universe.getUniverseDetails();
1,294,772
public void addContainerScaleJob(String namespace, String taskId, String jobDesc, int instances, String timeZone, String cron) throws SaturnJobConsoleException {<NEW_LINE>CuratorRepository.CuratorFrameworkOp curatorFrameworkOp = registryCenterService.getCuratorFrameworkOp(namespace);<NEW_LINE>String jobName = SaturnConstants.SYSTEM_SCALE_JOB_PREFEX + System.currentTimeMillis();<NEW_LINE>ContainerToken containerToken = getContainerToken(namespace);<NEW_LINE>JobConfig jobConfig = new JobConfig();<NEW_LINE>jobConfig.setJobName(jobName);<NEW_LINE>jobConfig.setDescription(jobDesc);<NEW_LINE>jobConfig.setTimeZone(timeZone);<NEW_LINE>jobConfig.setCron(cron);<NEW_LINE>jobConfig.setJobMode(JobMode.system_scale);<NEW_LINE>jobConfig.setJobType(JobType.SHELL_JOB.name());<NEW_LINE>jobConfig.setPreferList("@" + taskId);<NEW_LINE>jobConfig.setShardingTotalCount(1);<NEW_LINE>jobConfig.setShardingItemParameters(getContainerScaleJobShardingItemParameters<MASK><NEW_LINE>jobConfig.setUseDispreferList(false);<NEW_LINE>jobConfig.setTimeout4AlarmSeconds(30);<NEW_LINE>jobConfig.setTimeoutSeconds(30);<NEW_LINE>jobConfig.setJobParameter("");<NEW_LINE>jobConfig.setQueueName("");<NEW_LINE>jobConfig.setChannelName("");<NEW_LINE>jobConfig.setPausePeriodDate("");<NEW_LINE>jobConfig.setPausePeriodTime("");<NEW_LINE>jobService.addJob(namespace, jobConfig, "");<NEW_LINE>ContainerScaleJobConfig containerScaleJobConfig = new ContainerScaleJobConfig();<NEW_LINE>containerScaleJobConfig.setJobName(jobName);<NEW_LINE>containerScaleJobConfig.setJobDesc(jobDesc);<NEW_LINE>containerScaleJobConfig.setInstances(instances);<NEW_LINE>containerScaleJobConfig.setTimeZone(timeZone);<NEW_LINE>containerScaleJobConfig.setCron(cron);<NEW_LINE>try {<NEW_LINE>String containerScaleJobStr = JSON.toJSONString(containerScaleJobConfig);<NEW_LINE>String dcosTaskScaleJobNodePath = ContainerNodePath.getDcosTaskScaleJobNodePath(taskId, jobName);<NEW_LINE>curatorFrameworkOp.fillJobNodeIfNotExist(dcosTaskScaleJobNodePath, containerScaleJobStr);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>throw new SaturnJobConsoleException(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
(containerToken, taskId, instances));
1,573,880
private boolean didReadTradeCurrenciesField(JsonReader in, PaymentAccount account, String fieldName) {<NEW_LINE>if (!fieldName.equals("tradeCurrencies"))<NEW_LINE>return false;<NEW_LINE>// The PaymentAccount.tradeCurrencies field is a special case because it has<NEW_LINE>// no setter, so we add currencies to the List here if the payment account<NEW_LINE>// supports multiple trade currencies.<NEW_LINE>String fieldValue = nextStringOrNull(in);<NEW_LINE>List<String> <MASK><NEW_LINE>Optional<List<TradeCurrency>> tradeCurrencies = getReconciledTradeCurrencies(currencyCodes, account);<NEW_LINE>if (tradeCurrencies.isPresent()) {<NEW_LINE>for (TradeCurrency tradeCurrency : tradeCurrencies.get()) {<NEW_LINE>account.addCurrency(tradeCurrency);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Log a warning. We should not throw an exception here because the<NEW_LINE>// gson library will not pass it up to the calling Bisq object exactly as<NEW_LINE>// it would be defined here (causing confusion). Do a check in a calling<NEW_LINE>// class to make sure the tradeCurrencies field is populated in the<NEW_LINE>// PaymentAccount object, if it is required for the payment account method.<NEW_LINE>log.warn("No trade currencies were found in the {} account form.", account.getPaymentMethod().getDisplayString());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
currencyCodes = commaDelimitedCodesToList.apply(fieldValue);
13,803
public boolean configured(AttachSettings settings) {<NEW_LINE>// no settings provided<NEW_LINE>if (settings == null)<NEW_LINE>return false;<NEW_LINE>if (settings.isRemote()) {<NEW_LINE>String host = settings.getHost();<NEW_LINE>// remote settings valid if host provided<NEW_LINE>return host != null && !host.trim().isEmpty();<NEW_LINE>} else {<NEW_LINE>// local direct settings always valid<NEW_LINE>if (settings.isDirect())<NEW_LINE>return true;<NEW_LINE><MASK><NEW_LINE>String name = settings.getProcessName();<NEW_LINE>// no preselected process for dynamic attach<NEW_LINE>if (pid == -1 || name == null)<NEW_LINE>return false;<NEW_LINE>assert !SwingUtilities.isEventDispatchThread();<NEW_LINE>RunningVM[] vms = JpsProxy.getRunningVMs();<NEW_LINE>// no locally running processes for dynamic attach<NEW_LINE>if (vms == null || vms.length == 0)<NEW_LINE>return false;<NEW_LINE>List<RunningVM> targets = new ArrayList();<NEW_LINE>for (RunningVM vm : vms) if (getProcessName(vm.getMainClass()).equals(name))<NEW_LINE>// all processes with the preferred process name ready for profiling<NEW_LINE>targets.add(vm);<NEW_LINE>// no locally running process with the preselected process name<NEW_LINE>if (targets.isEmpty())<NEW_LINE>return false;<NEW_LINE>if (settings.isAutoSelectProcess() && targets.size() == 1) {<NEW_LINE>settings.setPid(targets.get(0).getPid());<NEW_LINE>// exactly one preferred process found for dynamic attach<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>// preselected process found<NEW_LINE>for (RunningVM vm : targets) if (vm.getPid() == pid)<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
int pid = settings.getPid();
1,480,924
public void run(final FlowTrigger trigger, final Map data) {<NEW_LINE>taskProgress("create cdRoms");<NEW_LINE>final VmInstanceSpec spec = (VmInstanceSpec) data.get(VmInstanceConstant.Params.VmInstanceSpec.toString());<NEW_LINE>List<CdRomSpec> cdRomSpecs = spec.getCdRomSpecs();<NEW_LINE>if (cdRomSpecs.isEmpty()) {<NEW_LINE>trigger.next();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Integer> deviceIds = cdRomSpecs.stream().map(CdRomSpec::getDeviceId).distinct().<MASK><NEW_LINE>if (deviceIds.size() < cdRomSpecs.size()) {<NEW_LINE>trigger.fail(operr("vm[uuid:%s] cdRom deviceId repetition", spec.getVmInventory().getUuid()));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<VmCdRomVO> cdRomVOS = new ArrayList<>();<NEW_LINE>for (CdRomSpec cdRomSpec : cdRomSpecs) {<NEW_LINE>VmCdRomVO vmCdRomVO = new VmCdRomVO();<NEW_LINE>String cdRomUuid = cdRomSpec.getUuid() != null ? cdRomSpec.getUuid() : Platform.getUuid();<NEW_LINE>cdRomSpec.setUuid(cdRomUuid);<NEW_LINE>String acntUuid = Account.getAccountUuidOfResource(spec.getVmInventory().getUuid());<NEW_LINE>vmCdRomVO.setVmInstanceUuid(spec.getVmInventory().getUuid());<NEW_LINE>vmCdRomVO.setUuid(cdRomUuid);<NEW_LINE>vmCdRomVO.setDeviceId(cdRomSpec.getDeviceId());<NEW_LINE>vmCdRomVO.setName(String.format("vm-%s-cdRom", spec.getVmInventory().getUuid()));<NEW_LINE>vmCdRomVO.setAccountUuid(acntUuid);<NEW_LINE>vmCdRomVO.setIsoUuid(cdRomSpec.getImageUuid());<NEW_LINE>cdRomVOS.add(vmCdRomVO);<NEW_LINE>}<NEW_LINE>persistCdRomVOS(cdRomVOS);<NEW_LINE>new IsoOperator().syncVmIsoSystemTag(spec.getVmInventory().getUuid());<NEW_LINE>trigger.next();<NEW_LINE>}
collect(Collectors.toList());
30,240
protected void triggerNow(GCCompletion completion) {<NEW_LINE>if (!dbf.isExist(primaryStorageUuid, PrimaryStorageVO.class)) {<NEW_LINE>completion.cancel();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!dbf.isExist(hostUuid, HostVO.class)) {<NEW_LINE>completion.cancel();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LocalStorageKvmBackend.DeleteBitsCmd cmd = new LocalStorageKvmBackend.DeleteBitsCmd();<NEW_LINE>cmd.setPath(installPath);<NEW_LINE>cmd.setHostUuid(hostUuid);<NEW_LINE>cmd.storagePath = Q.New(PrimaryStorageVO.class).eq(PrimaryStorageVO_.uuid, primaryStorageUuid).select(PrimaryStorageVO_.url).findValue();<NEW_LINE>String path = isDir ? LocalStorageKvmBackend.DELETE_DIR_PATH : LocalStorageKvmBackend.DELETE_BITS_PATH;<NEW_LINE>new KvmCommandSender(hostUuid).send(cmd, path, new KvmCommandFailureChecker() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ErrorCode getError(KvmResponseWrapper wrapper) {<NEW_LINE>LocalStorageKvmBackend.DeleteBitsRsp rsp = wrapper.getResponse(LocalStorageKvmBackend.DeleteBitsRsp.class);<NEW_LINE>return rsp.isSuccess() ? null : operr(<MASK><NEW_LINE>}<NEW_LINE>}, new ReturnValueCompletion<KvmResponseWrapper>(completion) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void success(KvmResponseWrapper ret) {<NEW_LINE>completion.success();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void fail(ErrorCode errorCode) {<NEW_LINE>completion.fail(errorCode);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
"operation error, because:%s", rsp.getError());
74,697
public SecurityProfileTargetMapping unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SecurityProfileTargetMapping securityProfileTargetMapping = new SecurityProfileTargetMapping();<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>if (context.testExpression("securityProfileIdentifier", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>securityProfileTargetMapping.setSecurityProfileIdentifier(SecurityProfileIdentifierJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("target", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>securityProfileTargetMapping.setTarget(SecurityProfileTargetJsonUnmarshaller.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 securityProfileTargetMapping;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,050,018
public void checkDB() {<NEW_LINE>Log.info("Checking DB");<NEW_LINE>File rootDir = repoStore.getRootDirectory();<NEW_LINE>for (File f : rootDir.listFiles()) {<NEW_LINE>if (f.getName().equals(".wlgb")) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>try (LockGuard __ = lock.lockGuard(projName)) {<NEW_LINE>File dotGit = new File(f, ".git");<NEW_LINE>if (!dotGit.exists()) {<NEW_LINE>Log.warn("Project: {} has no .git", projName);<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>ProjectState state = dbStore.getProjectState(projName);<NEW_LINE>if (state != ProjectState.NOT_PRESENT) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Log.warn("Project: {} not in swap_store, adding", projName);<NEW_LINE>dbStore.setLastAccessedTime(projName, new Timestamp(dotGit.lastModified()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
String projName = f.getName();
1,037,706
public void benchmarkJavassist(Blackhole blackHole) {<NEW_LINE>blackHole.consume(javassistInstance.method(booleanValue));<NEW_LINE>blackHole.consume(javassistInstance.method(byteValue));<NEW_LINE>blackHole.consume(javassistInstance.method(shortValue));<NEW_LINE>blackHole.consume(javassistInstance.method(intValue));<NEW_LINE>blackHole.consume(javassistInstance.method(charValue));<NEW_LINE>blackHole.consume(javassistInstance.method(intValue));<NEW_LINE>blackHole.consume(javassistInstance.method(longValue));<NEW_LINE>blackHole.consume(javassistInstance.method(floatValue));<NEW_LINE>blackHole.consume<MASK><NEW_LINE>blackHole.consume(javassistInstance.method(stringValue));<NEW_LINE>blackHole.consume(javassistInstance.method(booleanValue, booleanValue, booleanValue));<NEW_LINE>blackHole.consume(javassistInstance.method(byteValue, byteValue, byteValue));<NEW_LINE>blackHole.consume(javassistInstance.method(shortValue, shortValue, shortValue));<NEW_LINE>blackHole.consume(javassistInstance.method(intValue, intValue, intValue));<NEW_LINE>blackHole.consume(javassistInstance.method(charValue, charValue, charValue));<NEW_LINE>blackHole.consume(javassistInstance.method(intValue, intValue, intValue));<NEW_LINE>blackHole.consume(javassistInstance.method(longValue, longValue, longValue));<NEW_LINE>blackHole.consume(javassistInstance.method(floatValue, floatValue, floatValue));<NEW_LINE>blackHole.consume(javassistInstance.method(doubleValue, doubleValue, doubleValue));<NEW_LINE>blackHole.consume(javassistInstance.method(stringValue, stringValue, stringValue));<NEW_LINE>}
(javassistInstance.method(doubleValue));
1,001,663
public ManifestIdentifier identify(Config config) {<NEW_LINE>final String manifestPath = config.manifest();<NEW_LINE>if (manifestPath.equals(Config.NONE)) {<NEW_LINE>return new ManifestIdentifier((String) null, null, null, null, null);<NEW_LINE>}<NEW_LINE>// Try to locate the manifest file as a classpath resource; fallback to using the base dir.<NEW_LINE>final Path manifestFile;<NEW_LINE>final String resourceName = manifestPath.startsWith("/") ? manifestPath : ("/" + manifestPath);<NEW_LINE>final URL resourceUrl = getClass().getResource(resourceName);<NEW_LINE>if (resourceUrl != null && "file".equals(resourceUrl.getProtocol())) {<NEW_LINE>// Construct a path to the manifest file relative to the current working directory.<NEW_LINE>final Path workingDirectory = Paths.get(System.getProperty("user.dir"));<NEW_LINE>final Path absolutePath = Fs.fromUrl(resourceUrl);<NEW_LINE>manifestFile = workingDirectory.relativize(absolutePath);<NEW_LINE>} else {<NEW_LINE>manifestFile = getBaseDir().resolve(manifestPath);<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>final Path resDir = baseDir.resolve(config.resourceDir());<NEW_LINE>final Path assetDir = baseDir.resolve(config.assetDir());<NEW_LINE>List<ManifestIdentifier> libraries;<NEW_LINE>if (config.libraries().length == 0) {<NEW_LINE>// If there is no library override, look through subdirectories.<NEW_LINE>try {<NEW_LINE>libraries = findLibraries(resDir);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>libraries = new ArrayList<>();<NEW_LINE>for (String libraryDirName : config.libraries()) {<NEW_LINE>Path libDir = baseDir.resolve(libraryDirName);<NEW_LINE>libraries.add(new ManifestIdentifier(null, libDir.resolve(Config.DEFAULT_MANIFEST_NAME), libDir.resolve(Config.DEFAULT_RES_FOLDER), libDir.resolve(Config.DEFAULT_ASSET_FOLDER), null));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new ManifestIdentifier(config.packageName(), manifestFile, resDir, assetDir, libraries);<NEW_LINE>}
Path baseDir = manifestFile.getParent();
333,007
public void actionPerformed(ActionEvent e) {<NEW_LINE>deletePattern.setEnabled(true);<NEW_LINE>GuiUtils.stopTableEditing(stringTable);<NEW_LINE>int rowCount = stringTable.getRowCount();<NEW_LINE>try {<NEW_LINE>String clipboardContent = GuiUtils.getPastedText();<NEW_LINE>if (clipboardContent == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] clipboardLines = clipboardContent.split("\n");<NEW_LINE>for (String clipboardLine : clipboardLines) {<NEW_LINE>tableModel.addRow(new Object[] <MASK><NEW_LINE>}<NEW_LINE>if (stringTable.getRowCount() > rowCount) {<NEW_LINE>checkButtonsStatus();<NEW_LINE>// Highlight (select) and scroll to the appropriate rows.<NEW_LINE>int rowToSelect = tableModel.getRowCount() - 1;<NEW_LINE>stringTable.setRowSelectionInterval(rowCount, rowToSelect);<NEW_LINE>stringTable.scrollRectToVisible(stringTable.getCellRect(rowCount, 0, true));<NEW_LINE>}<NEW_LINE>} catch (IOException ioe) {<NEW_LINE>JOptionPane.showMessageDialog(GuiPackage.getInstance().getMainFrame(), "Could not add data from clipboard:\n" + ioe.getLocalizedMessage(), "Error", JOptionPane.ERROR_MESSAGE);<NEW_LINE>} catch (UnsupportedFlavorException ufe) {<NEW_LINE>JOptionPane.showMessageDialog(GuiPackage.getInstance().getMainFrame(), "Could not add retrieve " + DataFlavor.stringFlavor.getHumanPresentableName() + " from clipboard" + ufe.getLocalizedMessage(), "Error", JOptionPane.ERROR_MESSAGE);<NEW_LINE>}<NEW_LINE>tableModel.fireTableDataChanged();<NEW_LINE>}
{ clipboardLine.trim() });
121,722
public void run() {<NEW_LINE>WsdlRunTestCaseTestStep testStep = getModelItem();<NEW_LINE>InternalTestRunListener testRunListener = new InternalTestRunListener();<NEW_LINE>testStep.addTestRunListener(testRunListener);<NEW_LINE>try {<NEW_LINE>testRunLog.clear();<NEW_LINE>MockTestRunner mockTestRunner = new MockTestRunner(testStep.getTestCase(<MASK><NEW_LINE>WsdlTestStepResult result = (WsdlTestStepResult) testStep.run(mockTestRunner, new MockTestRunContext(mockTestRunner, testStep));<NEW_LINE>Throwable er = result.getError();<NEW_LINE>if (er != null) {<NEW_LINE>UISupport.showErrorMessage(er.toString());<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>UISupport.showErrorMessage(t);<NEW_LINE>} finally {<NEW_LINE>testStep.removeTestRunListener(testRunListener);<NEW_LINE>runAction.setEnabled(true);<NEW_LINE>cancelAction.setEnabled(false);<NEW_LINE>}<NEW_LINE>}
), SoapUI.ensureGroovyLog());
778,936
protected static void recursivelyConvertMapToGraphObjectMap(final GraphObjectMap destination, final Map<String, Object> source, final int depth) {<NEW_LINE>if (depth > 20) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (final Map.Entry entry : source.entrySet()) {<NEW_LINE>final ConfigurationProvider provider = StructrApp.getConfiguration();<NEW_LINE>final String key = entry.getKey().toString();<NEW_LINE>final Object value = entry.getValue();<NEW_LINE>if (value instanceof Map) {<NEW_LINE>final Map<String, Object> map = (Map<String, Object>) value;<NEW_LINE><MASK><NEW_LINE>destination.put(provider.getPropertyKeyForJSONName(obj.getClass(), key), obj);<NEW_LINE>recursivelyConvertMapToGraphObjectMap(obj, map, depth + 1);<NEW_LINE>} else if (value instanceof Iterable) {<NEW_LINE>final List list = new LinkedList();<NEW_LINE>final Iterable collection = (Iterable) value;<NEW_LINE>for (final Object obj : collection) {<NEW_LINE>if (obj instanceof Map) {<NEW_LINE>final GraphObjectMap container = new GraphObjectMap();<NEW_LINE>list.add(container);<NEW_LINE>recursivelyConvertMapToGraphObjectMap(container, (Map<String, Object>) obj, depth + 1);<NEW_LINE>} else {<NEW_LINE>list.add(obj);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>destination.put(provider.getPropertyKeyForJSONName(list.getClass(), key), list);<NEW_LINE>} else {<NEW_LINE>destination.put(value != null ? provider.getPropertyKeyForJSONName(value.getClass(), key) : new StringProperty(key), value);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
final GraphObjectMap obj = new GraphObjectMap();
373,274
protected void updatePolyBuffers(boolean lit, boolean tex, boolean needNormals, boolean needTexCoords) {<NEW_LINE>createPolyBuffers(PGL.bufferUsageImmediate);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyVertex.glId);<NEW_LINE>tessGeo.copyPolyVertices(PGL.bufferUsageImmediate);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyColor.glId);<NEW_LINE>tessGeo.copyPolyColors(PGL.bufferUsageImmediate);<NEW_LINE>if (lit) {<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyAmbient.glId);<NEW_LINE>tessGeo.copyPolyAmbient(PGL.bufferUsageImmediate);<NEW_LINE>pgl.bindBuffer(<MASK><NEW_LINE>tessGeo.copyPolySpecular(PGL.bufferUsageImmediate);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyEmissive.glId);<NEW_LINE>tessGeo.copyPolyEmissive(PGL.bufferUsageImmediate);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyShininess.glId);<NEW_LINE>tessGeo.copyPolyShininess(PGL.bufferUsageImmediate);<NEW_LINE>}<NEW_LINE>if (lit || needNormals) {<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyNormal.glId);<NEW_LINE>tessGeo.copyPolyNormals(PGL.bufferUsageImmediate);<NEW_LINE>}<NEW_LINE>if (tex || needTexCoords) {<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, bufPolyTexcoord.glId);<NEW_LINE>tessGeo.copyPolyTexCoords(PGL.bufferUsageImmediate);<NEW_LINE>}<NEW_LINE>for (String name : polyAttribs.keySet()) {<NEW_LINE>VertexAttribute attrib = polyAttribs.get(name);<NEW_LINE>pgl.bindBuffer(PGL.ARRAY_BUFFER, attrib.buf.glId);<NEW_LINE>tessGeo.copyPolyAttribs(attrib, PGL.bufferUsageImmediate);<NEW_LINE>}<NEW_LINE>pgl.bindBuffer(PGL.ELEMENT_ARRAY_BUFFER, bufPolyIndex.glId);<NEW_LINE>tessGeo.copyPolyIndices(PGL.bufferUsageImmediate);<NEW_LINE>}
PGL.ARRAY_BUFFER, bufPolySpecular.glId);
669,429
public static BRefType<?> execListGetOperation(BNewArray array, long index) {<NEW_LINE>if (array.getType().getTag() != TypeTags.ARRAY_TAG) {<NEW_LINE>BValueArray bRefValueArray = (BValueArray) array;<NEW_LINE>return bRefValueArray.getRefValue(index);<NEW_LINE>}<NEW_LINE>switch(((BArrayType) array.getType()).getElementType().getTag()) {<NEW_LINE>case TypeTags.BOOLEAN_TAG:<NEW_LINE>BValueArray bBooleanArray = (BValueArray) array;<NEW_LINE>int i = bBooleanArray.getBoolean(index);<NEW_LINE>return i == 0 ? new BBoolean(false) : new BBoolean(true);<NEW_LINE>case TypeTags.BYTE_TAG:<NEW_LINE>BValueArray bByteArray = (BValueArray) array;<NEW_LINE>return new BByte(bByteArray.getByte(index));<NEW_LINE>case TypeTags.FLOAT_TAG:<NEW_LINE>BValueArray bFloatArray = (BValueArray) array;<NEW_LINE>return new BFloat(bFloatArray.getFloat(index));<NEW_LINE>case TypeTags.DECIMAL_TAG:<NEW_LINE>BValueArray bDecimalArray = (BValueArray) array;<NEW_LINE>return new BDecimal(new BigDecimal(bDecimalArray.getRefValue(<MASK><NEW_LINE>case TypeTags.INT_TAG:<NEW_LINE>BValueArray bIntArray = (BValueArray) array;<NEW_LINE>return new BInteger(bIntArray.getInt(index));<NEW_LINE>case TypeTags.STRING_TAG:<NEW_LINE>BValueArray bStringArray = (BValueArray) array;<NEW_LINE>return new BString(bStringArray.getString(index));<NEW_LINE>default:<NEW_LINE>BValueArray bRefValueArray = (BValueArray) array;<NEW_LINE>return bRefValueArray.getRefValue(index);<NEW_LINE>}<NEW_LINE>}
index).stringValue()));
1,120,208
public void resizeImagesTmpDirToResolution(String packName, File sourceFolder, ResolutionEntryVO resolution, File targetFolder) {<NEW_LINE>ProjectManager projectManager = facade.retrieveProxy(ProjectManager.NAME);<NEW_LINE>float ratio = ResolutionManager.getResolutionRatio(resolution, projectManager.getCurrentProjectInfoVO().originalResolution);<NEW_LINE>if (targetFolder.exists()) {<NEW_LINE>try {<NEW_LINE>FileUtils.cleanDirectory(targetFolder);<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// now pack<NEW_LINE>TexturePacker.Settings settings = new TexturePacker.Settings();<NEW_LINE>settings.flattenPaths = true;<NEW_LINE>settings.maxHeight = getMinSquareNum(resolution.height);<NEW_LINE>settings.<MASK><NEW_LINE>settings.filterMag = Texture.TextureFilter.Linear;<NEW_LINE>settings.filterMin = Texture.TextureFilter.Linear;<NEW_LINE>TexturePacker tp = new TexturePacker(settings);<NEW_LINE>for (final File fileEntry : sourceFolder.listFiles()) {<NEW_LINE>if (!fileEntry.isDirectory()) {<NEW_LINE>BufferedImage bufferedImage = ResolutionManager.imageResize(fileEntry, ratio);<NEW_LINE>tp.addImage(bufferedImage, FilenameUtils.removeExtension(fileEntry.getName()));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>tp.pack(targetFolder, packName);<NEW_LINE>}
maxWidth = getMinSquareNum(resolution.height);
1,440,995
public Void visitLong(Property<Long> property, UpgradeVisitorContainer<?> data) {<NEW_LINE>long value = data.cursor.getLong(data.columnIndex);<NEW_LINE>// special handling for due date<NEW_LINE>if (property == Task.DUE_DATE) {<NEW_LINE>long preferredDueDate = data.cursor.getLong(data.cursor.getColumnIndex(LegacyTaskModel.PREFERRED_DUE_DATE));<NEW_LINE>if (value == 0)<NEW_LINE>value = preferredDueDate;<NEW_LINE>else if (preferredDueDate != 0) {<NEW_LINE>// had both absolute and preferred due dates. write<NEW_LINE>// preferred due date into notes field<NEW_LINE>if (data.upgradeNotes == null)<NEW_LINE>data.upgradeNotes = new StringBuilder();<NEW_LINE>data.upgradeNotes.append("Goal Deadline: " + DateUtilities.getDateString(ContextManager.getContext()<MASK><NEW_LINE>}<NEW_LINE>} else if (property == Task.REMINDER_PERIOD) {<NEW_LINE>// old period was stored in seconds<NEW_LINE>value *= 1000L;<NEW_LINE>} else if (property == Task.COMPLETION_DATE) {<NEW_LINE>// check if the task was actually completed<NEW_LINE>int progress = data.cursor.getInt(data.cursor.getColumnIndex(LegacyTaskModel.PROGRESS_PERCENTAGE));<NEW_LINE>if (progress < 100)<NEW_LINE>value = 0;<NEW_LINE>}<NEW_LINE>data.model.setValue(property, value);<NEW_LINE>Log.d("upgrade", "wrote " + value + " to -> " + property + " of model id " + data.cursor.getLong(1));<NEW_LINE>return null;<NEW_LINE>}
, new Date(preferredDueDate)));
1,090,519
public AndroidElement findElement(By by) {<NEW_LINE>if (by instanceof ById) {<NEW_LINE>return <MASK><NEW_LINE>} else if (by instanceof ByTagName) {<NEW_LINE>return findElementByTagName(by.getElementLocator());<NEW_LINE>} else if (by instanceof ByLinkText) {<NEW_LINE>return findElementByText(by.getElementLocator());<NEW_LINE>} else if (by instanceof By.ByPartialLinkText) {<NEW_LINE>return findElementByPartialText(by.getElementLocator());<NEW_LINE>} else if (by instanceof ByClass) {<NEW_LINE>return findElementByClass(by.getElementLocator());<NEW_LINE>} else if (by instanceof ByName) {<NEW_LINE>return findElementByName(by.getElementLocator());<NEW_LINE>} else if (by instanceof ByXPath) {<NEW_LINE>return findElementByXPath(by.getElementLocator());<NEW_LINE>}<NEW_LINE>throw new UnsupportedOperationException(String.format("By locator %s is curently not supported!", by.getClass().getSimpleName()));<NEW_LINE>}
findElementById(by.getElementLocator());
1,434,303
Saml2ResponseValidatorResult redirect(HttpServletRequest request, String objectParameterName) {<NEW_LINE>RedirectSignature signature = new RedirectSignature(request, objectParameterName);<NEW_LINE>if (signature.getAlgorithm() == null) {<NEW_LINE>return Saml2ResponseValidatorResult.failure(new Saml2Error(Saml2ErrorCodes.INVALID_SIGNATURE, "Missing signature algorithm for object [" + this.id + "]"));<NEW_LINE>}<NEW_LINE>if (!signature.hasSignature()) {<NEW_LINE>return Saml2ResponseValidatorResult.failure(new Saml2Error(Saml2ErrorCodes.INVALID_SIGNATURE, "Missing signature for object [" + this.id + "]"));<NEW_LINE>}<NEW_LINE>Collection<Saml2Error> errors = new ArrayList<>();<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>if (!this.trustEngine.validate(signature.getSignature(), signature.getContent(), algorithmUri, this.criteria, null)) {<NEW_LINE>errors.add(new Saml2Error(Saml2ErrorCodes.INVALID_SIGNATURE, "Invalid signature for object [" + this.id + "]"));<NEW_LINE>}<NEW_LINE>} catch (Exception ex) {<NEW_LINE>errors.add(new Saml2Error(Saml2ErrorCodes.INVALID_SIGNATURE, "Invalid signature for object [" + this.id + "]: "));<NEW_LINE>}<NEW_LINE>return Saml2ResponseValidatorResult.failure(errors);<NEW_LINE>}
String algorithmUri = signature.getAlgorithm();
819,923
public void visitToken(DetailAST ast) {<NEW_LINE>final DetailAST typeAST = ast.getParent();<NEW_LINE>final DetailAST identAst = typeAST.getNextSibling();<NEW_LINE>// If identAst is null, we have a 'LITERAL_NEW' expression, i.e. 'new int[2][2]'<NEW_LINE>if (identAst != null) {<NEW_LINE>final boolean isMethod = typeAST.getParent().getType() == TokenTypes.METHOD_DEF;<NEW_LINE>final boolean isJavaStyle = identAst.getLineNo() > ast.getLineNo() || identAst.getColumnNo() - ast.getColumnNo() > -1;<NEW_LINE>// force all methods to be Java style (see note in top Javadoc)<NEW_LINE><MASK><NEW_LINE>final boolean isVariableViolation = !isMethod && isJavaStyle != javaStyle;<NEW_LINE>if (isMethodViolation || isVariableViolation) {<NEW_LINE>log(ast, MSG_KEY);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
final boolean isMethodViolation = isMethod && !isJavaStyle;
991,223
final CreateDataRepositoryTaskResult executeCreateDataRepositoryTask(CreateDataRepositoryTaskRequest createDataRepositoryTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDataRepositoryTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateDataRepositoryTaskRequest> request = null;<NEW_LINE>Response<CreateDataRepositoryTaskResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateDataRepositoryTaskRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createDataRepositoryTaskRequest));<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, "FSx");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateDataRepositoryTask");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateDataRepositoryTaskResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateDataRepositoryTaskResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}
endClientExecution(awsRequestMetrics, request, response);
155,266
final DeleteVpcLinkResult executeDeleteVpcLink(DeleteVpcLinkRequest deleteVpcLinkRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVpcLinkRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteVpcLinkRequest> request = null;<NEW_LINE>Response<DeleteVpcLinkResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteVpcLinkRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteVpcLinkRequest));<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, "ApiGatewayV2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteVpcLink");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteVpcLinkResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteVpcLinkResultJsonUnmarshaller());<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);
201,145
public com.google.protobuf.ExtensionRegistry assignDescriptors(com.google.protobuf.Descriptors.FileDescriptor root) {<NEW_LINE>descriptor = root;<NEW_LINE>internal_static_io_netty_example_worldclock_Location_descriptor = getDescriptor().getMessageTypes().get(0);<NEW_LINE>internal_static_io_netty_example_worldclock_Location_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_io_netty_example_worldclock_Location_descriptor, new java.lang.String[] { "Continent", "City" });<NEW_LINE>internal_static_io_netty_example_worldclock_Locations_descriptor = getDescriptor().getMessageTypes().get(1);<NEW_LINE>internal_static_io_netty_example_worldclock_Locations_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_io_netty_example_worldclock_Locations_descriptor, new java.lang.String[] { "Location" });<NEW_LINE>internal_static_io_netty_example_worldclock_LocalTime_descriptor = getDescriptor().getMessageTypes().get(2);<NEW_LINE>internal_static_io_netty_example_worldclock_LocalTime_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_io_netty_example_worldclock_LocalTime_descriptor, new java.lang.String[] { "Year", "Month", "DayOfMonth", "DayOfWeek", "Hour", "Minute", "Second" });<NEW_LINE>internal_static_io_netty_example_worldclock_LocalTimes_descriptor = getDescriptor().<MASK><NEW_LINE>internal_static_io_netty_example_worldclock_LocalTimes_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(internal_static_io_netty_example_worldclock_LocalTimes_descriptor, new java.lang.String[] { "LocalTime" });<NEW_LINE>return null;<NEW_LINE>}
getMessageTypes().get(3);
1,152,290
public String statsAsString() {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>String f = SparkTrainingStats.DEFAULT_PRINT_FORMAT;<NEW_LINE>sb.append(String.format(f, WORKER_FLAT_MAP_TOTAL_TIME_MS));<NEW_LINE>if (workerFlatMapTotalTimeMs == null)<NEW_LINE>sb.append("-\n");<NEW_LINE>else<NEW_LINE>sb.append(StatsUtils.getDurationAsString(workerFlatMapTotalTimeMs, ",")).append("\n");<NEW_LINE>sb.append(String.format(f, WORKER_FLAT_MAP_GET_INITIAL_MODEL_TIME_MS));<NEW_LINE>if (workerFlatMapGetInitialModelTimeMs == null)<NEW_LINE>sb.append("-\n");<NEW_LINE>else<NEW_LINE>sb.append(StatsUtils.getDurationAsString(workerFlatMapGetInitialModelTimeMs, ",")).append("\n");<NEW_LINE>sb.append(String.format(f, WORKER_FLAT_MAP_DATA_SET_GET_TIMES_MS));<NEW_LINE>if (workerFlatMapDataSetGetTimesMs == null)<NEW_LINE>sb.append("-\n");<NEW_LINE>else<NEW_LINE>sb.append(StatsUtils.getDurationAsString(workerFlatMapDataSetGetTimesMs, ",")).append("\n");<NEW_LINE>sb.append(String.format(f, WORKER_FLAT_MAP_PROCESS_MINI_BATCH_TIMES_MS));<NEW_LINE>if (workerFlatMapProcessMiniBatchTimesMs == null)<NEW_LINE>sb.append("-\n");<NEW_LINE>else<NEW_LINE>sb.append(StatsUtils.getDurationAsString(workerFlatMapProcessMiniBatchTimesMs, ",")).append("\n");<NEW_LINE>if (trainingWorkerSpecificStats != null)<NEW_LINE>sb.append(trainingWorkerSpecificStats.statsAsString<MASK><NEW_LINE>return sb.toString();<NEW_LINE>}
()).append("\n");
455,547
public static void main(String[] args) throws Exception {<NEW_LINE>try (ZContext ctx = new ZContext()) {<NEW_LINE>Socket worker = ctx.createSocket(SocketType.REQ);<NEW_LINE>// Set random identity to make tracing easier<NEW_LINE>Random rand = new Random(System.nanoTime());<NEW_LINE>String identity = String.format("%04X-%04X", rand.nextInt(0x10000), rand.nextInt(0x10000));<NEW_LINE>worker.setIdentity(identity.getBytes(ZMQ.CHARSET));<NEW_LINE>worker.connect("tcp://localhost:5556");<NEW_LINE>// Tell broker we're ready for work<NEW_LINE>System.out.printf("I: (%s) worker ready\n", identity);<NEW_LINE>ZFrame frame = new ZFrame(WORKER_READY);<NEW_LINE>frame.send(worker, 0);<NEW_LINE>int cycles = 0;<NEW_LINE>while (true) {<NEW_LINE>ZMsg msg = ZMsg.recvMsg(worker);<NEW_LINE>if (msg == null)<NEW_LINE>// Interrupted<NEW_LINE>break;<NEW_LINE>// Simulate various problems, after a few cycles<NEW_LINE>cycles++;<NEW_LINE>if (cycles > 3 && rand.nextInt(5) == 0) {<NEW_LINE>System.<MASK><NEW_LINE>msg.destroy();<NEW_LINE>break;<NEW_LINE>} else if (cycles > 3 && rand.nextInt(5) == 0) {<NEW_LINE>System.out.printf("I: (%s) simulating CPU overload\n", identity);<NEW_LINE>Thread.sleep(3000);<NEW_LINE>}<NEW_LINE>System.out.printf("I: (%s) normal reply\n", identity);<NEW_LINE>// Do some heavy work<NEW_LINE>Thread.sleep(1000);<NEW_LINE>msg.send(worker);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
out.printf("I: (%s) simulating a crash\n", identity);
1,707,021
public Request<StopUserImportJobRequest> marshall(StopUserImportJobRequest stopUserImportJobRequest) {<NEW_LINE>if (stopUserImportJobRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(StopUserImportJobRequest)");<NEW_LINE>}<NEW_LINE>Request<StopUserImportJobRequest> request = new DefaultRequest<StopUserImportJobRequest>(stopUserImportJobRequest, "AmazonCognitoIdentityProvider");<NEW_LINE>String target = "AWSCognitoIdentityProviderService.StopUserImportJob";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (stopUserImportJobRequest.getUserPoolId() != null) {<NEW_LINE>String userPoolId = stopUserImportJobRequest.getUserPoolId();<NEW_LINE>jsonWriter.name("UserPoolId");<NEW_LINE>jsonWriter.value(userPoolId);<NEW_LINE>}<NEW_LINE>if (stopUserImportJobRequest.getJobId() != null) {<NEW_LINE>String jobId = stopUserImportJobRequest.getJobId();<NEW_LINE>jsonWriter.name("JobId");<NEW_LINE>jsonWriter.value(jobId);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE><MASK><NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + t.getMessage(), t);<NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
String snippet = stringWriter.toString();
1,594,189
final ListPipelinesResult executeListPipelines(ListPipelinesRequest listPipelinesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPipelinesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListPipelinesRequest> request = null;<NEW_LINE>Response<ListPipelinesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListPipelinesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listPipelinesRequest));<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, "IoTAnalytics");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListPipelinesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListPipelinesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListPipelines");
1,503,871
ActionResult<List<NameValueCountPair>> execute(EffectivePerson effectivePerson) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<NameValueCountPair>> result = new ActionResult<>();<NEW_LINE>List<NameValueCountPair> wraps = new ArrayList<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>List<String> ids = business.templateFormFactory().list();<NEW_LINE>List<TemplateForm> os = emc.fetch(ids, TemplateForm.class, ListTools.toList(TemplateForm.category_FIELDNAME));<NEW_LINE>List<String> names = ListTools.extractProperty(os, "category", String.class, false, false);<NEW_LINE>Map<String, Long> group = names.stream().collect(Collectors.groupingBy(e -> Objects.toString(e, ""), Collectors.counting()));<NEW_LINE>LinkedHashMap<String, Long> sort = group.entrySet().stream().sorted(Map.Entry.<String, Long>comparingByKey()).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));<NEW_LINE>for (Entry<String, Long> en : sort.entrySet()) {<NEW_LINE>NameValueCountPair o = new NameValueCountPair();<NEW_LINE>o.<MASK><NEW_LINE>o.setCount(en.getValue());<NEW_LINE>wraps.add(o);<NEW_LINE>}<NEW_LINE>result.setData(wraps);<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>}
setName(en.getKey());
1,844,816
public void run(FlowTrigger trigger, Map data) {<NEW_LINE>vo.setUuid(Platform.getUuid());<NEW_LINE>vo.setName(vol.getName());<NEW_LINE>vo.setDescription(vol.getDescription());<NEW_LINE>vo.setVolumeUuid(vol.getUuid());<NEW_LINE>vo.setFormat(vol.getFormat());<NEW_LINE>vo.setVolumeType(vol.getType());<NEW_LINE>if (vo.getType() == null) {<NEW_LINE>vo.setType(VolumeSnapshotConstant.HYPERVISOR_SNAPSHOT_TYPE.toString());<NEW_LINE>}<NEW_LINE>vo.setPrimaryStorageUuid(vol.getPrimaryStorageUuid());<NEW_LINE>vo.setSize(vol.getSize());<NEW_LINE>vo.setState(VolumeSnapshotState.Enabled);<NEW_LINE>vo.setStatus(VolumeSnapshotStatus.Creating);<NEW_LINE>vo.setAccountUuid(msg.getAccountUuid());<NEW_LINE>if (VolumeSnapshotArrangementType.CHAIN == capability.getArrangementType()) {<NEW_LINE>saveChainTypeSnapshot(vo);<NEW_LINE>} else if (VolumeSnapshotArrangementType.INDIVIDUAL == capability.getArrangementType()) {<NEW_LINE>saveIndividualTypeSnapshot(vo);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>trigger.next();<NEW_LINE>}
DebugUtils.Assert(false, "should not be here");
346,879
/*<NEW_LINE>* Recurses though each level of a directory structure<NEW_LINE>* in a depth-first manner<NEW_LINE>* and creates each directory also marking them in the binary<NEW_LINE>*/<NEW_LINE>private void createDirectories(BinaryReader reader, Program program, List<ISO9660Directory> directoryList, long blockSize) throws DuplicateNameException, Exception {<NEW_LINE>Address volumeAddress;<NEW_LINE>// If the directory size is over two then there are actual<NEW_LINE>// new directories in that level. The first two are always<NEW_LINE>// the 'self' directory and the parent directory<NEW_LINE>if (directoryList.size() > 2) {<NEW_LINE>ISO9660Directory selfDir = null;<NEW_LINE>ISO9660Directory parentDir = null;<NEW_LINE>// The 'self' describing directory entry<NEW_LINE>selfDir = directoryList.remove(0);<NEW_LINE>volumeAddress = toAddress(program, selfDir.getVolumeIndex());<NEW_LINE>createDataAndPlateComment(program, selfDir, volumeAddress);<NEW_LINE>// The parent directory<NEW_LINE>parentDir = directoryList.remove(0);<NEW_LINE>volumeAddress = toAddress(program, parentDir.getVolumeIndex());<NEW_LINE>createDataAndPlateComment(program, parentDir, volumeAddress);<NEW_LINE>// For everything else not a self or parent directory<NEW_LINE>for (ISO9660Directory dir : directoryList) {<NEW_LINE>// If this directory is not pointing to a file<NEW_LINE>// Create the directory data<NEW_LINE>if (selfDir.isDirectoryFlagSet()) {<NEW_LINE>volumeAddress = toAddress(<MASK><NEW_LINE>setPlateComment(program, volumeAddress, dir.toString());<NEW_LINE>DataType volumeDataType = dir.toDataType();<NEW_LINE>createData(program, volumeAddress, volumeDataType);<NEW_LINE>// If the directory is a new level of directories<NEW_LINE>// recurse down into the next level<NEW_LINE>if (dir.isDirectoryFlagSet()) {<NEW_LINE>List<ISO9660Directory> dirs;<NEW_LINE>dirs = createDirectoryList(reader, dir, blockSize);<NEW_LINE>createDirectories(reader, program, dirs, blockSize);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}
program, dir.getVolumeIndex());
434,700
public void removeLines(ActionRequest request, ActionResponse response) {<NEW_LINE>User user = AuthUtils.getUser();<NEW_LINE>try {<NEW_LINE>if (user == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Expense expense = Beans.get(ExpenseRepository.class).all().filter("self.statusSelect = ?1 AND self.user.id = ?2", ExpenseRepository.STATUS_DRAFT, user.getId()).order("-id").fetchOne();<NEW_LINE>if (expense == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<ExpenseLine> expenseLineList = Beans.get(ExpenseService.class).getExpenseLineList(expense);<NEW_LINE>if (expenseLineList != null && !expenseLineList.isEmpty()) {<NEW_LINE>Iterator<ExpenseLine> expenseLineIter = expenseLineList.iterator();<NEW_LINE>while (expenseLineIter.hasNext()) {<NEW_LINE>ExpenseLine generalExpenseLine = expenseLineIter.next();<NEW_LINE>if (generalExpenseLine.getKilometricExpense() != null && (expense.getKilometricExpenseLineList() != null && !expense.getKilometricExpenseLineList().contains(generalExpenseLine) || expense.getKilometricExpenseLineList() == null)) {<NEW_LINE>expenseLineIter.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>TraceBackService.trace(response, e);<NEW_LINE>}<NEW_LINE>}
response.setValue("expenseLineList", expenseLineList);
847,240
public Object handleException(RequestDetails theRequestDetails, BaseServerResponseException theException) throws ServletException, IOException {<NEW_LINE>IRestfulResponse response = theRequestDetails.getResponse();<NEW_LINE>FhirContext ctx = theRequestDetails.getServer().getFhirContext();<NEW_LINE><MASK><NEW_LINE>if (oo == null) {<NEW_LINE>oo = createOperationOutcome(theException, ctx);<NEW_LINE>}<NEW_LINE>int statusCode = theException.getStatusCode();<NEW_LINE>// Add headers associated with the specific error code<NEW_LINE>if (theException.hasResponseHeaders()) {<NEW_LINE>Map<String, List<String>> additional = theException.getResponseHeaders();<NEW_LINE>for (Entry<String, List<String>> next : additional.entrySet()) {<NEW_LINE>if (isNotBlank(next.getKey()) && next.getValue() != null) {<NEW_LINE>String nextKey = next.getKey();<NEW_LINE>for (String nextValue : next.getValue()) {<NEW_LINE>response.addHeader(nextKey, nextValue);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String statusMessage = null;<NEW_LINE>if (theException instanceof UnclassifiedServerFailureException) {<NEW_LINE>String sm = theException.getMessage();<NEW_LINE>if (isNotBlank(sm) && sm.indexOf('\n') == -1) {<NEW_LINE>statusMessage = sm;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>BaseResourceReturningMethodBinding.callOutgoingFailureOperationOutcomeHook(theRequestDetails, oo);<NEW_LINE>return response.streamResponseAsResource(oo, true, Collections.singleton(SummaryEnum.FALSE), statusCode, statusMessage, false, false);<NEW_LINE>}
IBaseOperationOutcome oo = theException.getOperationOutcome();