idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
834,075
protected Void scan(AnnotatedTypeMirror type, Void p) {<NEW_LINE>// If the type's fully-qualified name is in the appropriate map, annotate the type. Do this<NEW_LINE>// before looking at kind or class, as this information is more specific.<NEW_LINE>String qname;<NEW_LINE>if (type.getKind() == TypeKind.DECLARED) {<NEW_LINE>qname = TypesUtils.getQualifiedName((DeclaredType) type.getUnderlyingType());<NEW_LINE>} else if (type.getKind().isPrimitive()) {<NEW_LINE>qname = type.getUnderlyingType().toString();<NEW_LINE>} else {<NEW_LINE>qname = null;<NEW_LINE>}<NEW_LINE>if (qname != null) {<NEW_LINE>Set<AnnotationMirror> fromQname = types.get(qname);<NEW_LINE>if (fromQname != null) {<NEW_LINE>type.addMissingAnnotations(fromQname);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If the type's kind or class is in the appropriate map, annotate the type.<NEW_LINE>Set<AnnotationMirror> fromKind = typeKinds.get(type.getKind());<NEW_LINE>if (fromKind != null) {<NEW_LINE>type.addMissingAnnotations(fromKind);<NEW_LINE>} else if (!atmClasses.isEmpty()) {<NEW_LINE>Class<? extends AnnotatedTypeMirror<MASK><NEW_LINE>Set<AnnotationMirror> fromClass = atmClasses.get(t);<NEW_LINE>if (fromClass != null) {<NEW_LINE>type.addMissingAnnotations(fromClass);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return super.scan(type, p);<NEW_LINE>}
> t = type.getClass();
994,673
public static List<Range> findLatexChunks(DocDisplay docDisplay) {<NEW_LINE>docDisplay.tokenizeDocument();<NEW_LINE>List<Range> ranges = new ArrayList<>();<NEW_LINE>Position startPos = null;<NEW_LINE>for (int i = 0, n = docDisplay.getRowCount(); i < n; i++) {<NEW_LINE>Position pos = Position.create(i, 0);<NEW_LINE>Token token = docDisplay.getTokenAt(Position.create(i, 0));<NEW_LINE>if (token == null)<NEW_LINE>continue;<NEW_LINE>if (token.hasAllTypes("latex", "begin") && token.getValue().equals("$$")) {<NEW_LINE>startPos = pos;<NEW_LINE>// get the length of this line to see if it could be an inline<NEW_LINE>// LaTeX chunk (e.g. $$ x = y $$)<NEW_LINE>int length = docDisplay.getLength(i);<NEW_LINE>if (length < 5)<NEW_LINE>continue;<NEW_LINE>// get the last token on the row; if it's a LaTeX end token then<NEW_LINE>// consider the row to be an inline LaTeX chunk<NEW_LINE>Token endLineToken = docDisplay.getTokenAt(Position.create(i, docDisplay.getLength(i)));<NEW_LINE>if (endLineToken != null && endLineToken.hasAllTypes("latex", "end")) {<NEW_LINE>ranges.add(Range.fromPoints(startPos, Position.create(i, length)));<NEW_LINE>}<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (token.hasAllTypes("latex", "end") && token.getValue().equals("$$")) {<NEW_LINE>ranges.add(Range.fromPoints(startPos, Position.<MASK><NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ranges;<NEW_LINE>}
create(i, 2)));
1,028,820
public static PsiElementVisitor createVisitorAndAcceptElements(@Nonnull LocalInspectionTool tool, @Nonnull ProblemsHolder holder, boolean isOnTheFly, @Nonnull LocalInspectionToolSession session, @Nonnull List<PsiElement> elements, @Nonnull Set<String> elementDialectIds, @Nullable Set<String> dialectIdsSpecifiedForTool) {<NEW_LINE>PsiElementVisitor visitor = tool.buildVisitor(holder, isOnTheFly, session);<NEW_LINE>// noinspection ConstantConditions<NEW_LINE>if (visitor == null) {<NEW_LINE>LOG.error("Tool " + tool + " (" + <MASK><NEW_LINE>} else if (visitor instanceof PsiRecursiveVisitor && RECURSIVE_VISITOR_TOOL_CLASSES.add(tool.getClass())) {<NEW_LINE>LOG.error("The visitor returned from LocalInspectionTool.buildVisitor() must not be recursive: " + tool);<NEW_LINE>}<NEW_LINE>tool.inspectionStarted(session, isOnTheFly);<NEW_LINE>acceptElements(elements, visitor, elementDialectIds, dialectIdsSpecifiedForTool);<NEW_LINE>return visitor;<NEW_LINE>}
tool.getClass() + ") must not return null from the buildVisitor() method");
1,586,652
private static final void _copy(byte[] src, byte[] dest, int offX, int offY, int stepX, int stepY, int strideSrc, int strideDest, int heightSrc, int heightDst) {<NEW_LINE>int offD = offX + offY * strideDest, srcOff = 0;<NEW_LINE>for (int i = 0; i < heightSrc; i++) {<NEW_LINE>for (int j = 0; j < strideSrc; j++) {<NEW_LINE>dest[offD] = src[srcOff++];<NEW_LINE>offD += stepX;<NEW_LINE>}<NEW_LINE>int lastOff = offD - stepX;<NEW_LINE>for (int j = strideSrc * stepX; j < strideDest; j += stepX) {<NEW_LINE>dest[offD] = dest[lastOff];<NEW_LINE>offD += stepX;<NEW_LINE>}<NEW_LINE>offD += (stepY - 1) * strideDest;<NEW_LINE>}<NEW_LINE>int lastLine = offD - stepY * strideDest;<NEW_LINE>for (int i = heightSrc * stepY; i < heightDst; i += stepY) {<NEW_LINE>for (int j = 0; j < strideDest; j += stepX) {<NEW_LINE>dest[offD<MASK><NEW_LINE>offD += stepX;<NEW_LINE>}<NEW_LINE>offD += (stepY - 1) * strideDest;<NEW_LINE>}<NEW_LINE>}
] = dest[lastLine + j];
352,109
public String reverseWords(String s) {<NEW_LINE>s = s.trim();<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>for (int i = 0; i < s.length(); i++) {<NEW_LINE>if (s.charAt(i) == ' ' && sb.length() > 0 && sb.charAt(sb.length() - 1) == ' ') {<NEW_LINE>continue;<NEW_LINE>} else {<NEW_LINE>sb.append<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>int left = 0;<NEW_LINE>int right = sb.length() - 1;<NEW_LINE>while (left < right) {<NEW_LINE>char tmp = sb.charAt(left);<NEW_LINE>sb.setCharAt(left, sb.charAt(right));<NEW_LINE>sb.setCharAt(right, tmp);<NEW_LINE>left++;<NEW_LINE>right--;<NEW_LINE>}<NEW_LINE>int boundary = 0;<NEW_LINE>while (boundary < sb.length()) {<NEW_LINE>left = boundary;<NEW_LINE>while (boundary < sb.length() && sb.charAt(boundary) != ' ') {<NEW_LINE>boundary++;<NEW_LINE>}<NEW_LINE>right = boundary - 1;<NEW_LINE>while (left < right) {<NEW_LINE>char tmp = sb.charAt(left);<NEW_LINE>sb.setCharAt(left, sb.charAt(right));<NEW_LINE>sb.setCharAt(right, tmp);<NEW_LINE>left++;<NEW_LINE>right--;<NEW_LINE>}<NEW_LINE>boundary++;<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
(s.charAt(i));
1,829,724
public AwsS3BucketBucketLifecycleConfigurationDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsS3BucketBucketLifecycleConfigurationDetails awsS3BucketBucketLifecycleConfigurationDetails = new AwsS3BucketBucketLifecycleConfigurationDetails();<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("Rules", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>awsS3BucketBucketLifecycleConfigurationDetails.setRules(new ListUnmarshaller<AwsS3BucketBucketLifecycleConfigurationRulesDetails>(AwsS3BucketBucketLifecycleConfigurationRulesDetailsJsonUnmarshaller.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 awsS3BucketBucketLifecycleConfigurationDetails;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
596,085
final UpdateFirewallPolicyResult executeUpdateFirewallPolicy(UpdateFirewallPolicyRequest updateFirewallPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateFirewallPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateFirewallPolicyRequest> request = null;<NEW_LINE>Response<UpdateFirewallPolicyResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateFirewallPolicyRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateFirewallPolicyRequest));<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, "Network Firewall");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateFirewallPolicy");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateFirewallPolicyResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new UpdateFirewallPolicyResultJsonUnmarshaller());<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);
236,056
public List<JvmGcBo> decodeValues(Buffer valueBuffer, AgentStatDecodingContext decodingContext) {<NEW_LINE>final String agentId = decodingContext.getAgentId();<NEW_LINE>final long baseTimestamp = decodingContext.getBaseTimestamp();<NEW_LINE>final long timestampDelta = decodingContext.getTimestampDelta();<NEW_LINE>final long initialTimestamp = baseTimestamp + timestampDelta;<NEW_LINE>final JvmGcType gcType = JvmGcType.getTypeByCode(valueBuffer.readVInt());<NEW_LINE>int numValues = valueBuffer.readVInt();<NEW_LINE>List<Long> startTimestamps = this.codec.decodeValues(valueBuffer, UnsignedLongEncodingStrategy.REPEAT_COUNT, numValues);<NEW_LINE>List<Long> timestamps = this.codec.decodeTimestamps(initialTimestamp, valueBuffer, numValues);<NEW_LINE>// decode headers<NEW_LINE>final byte[] header = valueBuffer.readPrefixedBytes();<NEW_LINE>AgentStatHeaderDecoder headerDecoder = new BitCountingHeaderDecoder(header);<NEW_LINE>JvmGcCodecDecoder decoder = new JvmGcCodecDecoder(codec);<NEW_LINE>decoder.decode(valueBuffer, headerDecoder, numValues);<NEW_LINE>List<JvmGcBo> jvmGcBos = new ArrayList<>(numValues);<NEW_LINE>for (int i = 0; i < numValues; i++) {<NEW_LINE>JvmGcBo jvmGcBo = decoder.getValue(i);<NEW_LINE>jvmGcBo.setAgentId(agentId);<NEW_LINE>jvmGcBo.setStartTimestamp<MASK><NEW_LINE>jvmGcBo.setTimestamp(timestamps.get(i));<NEW_LINE>jvmGcBo.setGcType(gcType);<NEW_LINE>jvmGcBos.add(jvmGcBo);<NEW_LINE>}<NEW_LINE>return jvmGcBos;<NEW_LINE>}
(startTimestamps.get(i));
1,449,759
public boolean evaluate(HttpServletRequest request, HttpServletResponse response, Instance instance) {<NEW_LINE>Enumeration<Locale> locales = request.getLocales();<NEW_LINE>boolean evalSuccess = false;<NEW_LINE>// Check if the selected language exist in the list of languages provided by the Accept-Language header<NEW_LINE>while (locales.hasMoreElements()) {<NEW_LINE><MASK><NEW_LINE>String language = locale.getLanguage();<NEW_LINE>// Evaluate<NEW_LINE>evalSuccess = IS.perform(language.toLowerCase(), instance.isoCode.toLowerCase());<NEW_LINE>if (evalSuccess) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (instance.comparison == IS) {<NEW_LINE>// Nothing to do we already handle the IS case<NEW_LINE>} else if (instance.comparison == IS_NOT) {<NEW_LINE>// Now, for the IS_NOT case we just need to negate what the IS found<NEW_LINE>evalSuccess = !evalSuccess;<NEW_LINE>} else {<NEW_LINE>throw new ComparisonNotSupportedException("Not supported comparison [" + instance.comparison.toString() + "]");<NEW_LINE>}<NEW_LINE>return evalSuccess;<NEW_LINE>}
Locale locale = locales.nextElement();
254,510
public ResourceEndpointListItem unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ResourceEndpointListItem resourceEndpointListItem = new ResourceEndpointListItem();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><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("Protocol", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>resourceEndpointListItem.setProtocol(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("ResourceEndpoint", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>resourceEndpointListItem.setResourceEndpoint(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 resourceEndpointListItem;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,488,413
final CreatePushTemplateResult executeCreatePushTemplate(CreatePushTemplateRequest createPushTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPushTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<CreatePushTemplateRequest> request = null;<NEW_LINE>Response<CreatePushTemplateResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreatePushTemplateRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createPushTemplateRequest));<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, "Pinpoint");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreatePushTemplate");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreatePushTemplateResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreatePushTemplateResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
62,327
public boolean correlates(final String pathSubjectId, final String pathObjectId, final String message) {<NEW_LINE>if (correlations.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>LinkedList<LogEvent> correlationEntries;<NEW_LINE>if (correlationOp != null && correlationPattern != null) {<NEW_LINE>final Matcher <MASK><NEW_LINE>if (matcher.matches()) {<NEW_LINE>final String value = matcher.group(1);<NEW_LINE>switch(correlationOp) {<NEW_LINE>case "and":<NEW_LINE>return correlations.containsKey(value);<NEW_LINE>case "andSubject":<NEW_LINE>correlationEntries = correlations.get(value);<NEW_LINE>if (correlationEntries != null) {<NEW_LINE>for (LogEvent correlationEntry : correlationEntries) {<NEW_LINE>if (correlationEntry.getSubjectId().equals(pathSubjectId)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>case "andObject":<NEW_LINE>correlationEntries = correlations.get(value);<NEW_LINE>if (correlationEntries != null) {<NEW_LINE>for (LogEvent correlationEntry : correlationEntries) {<NEW_LINE>if (correlationEntry.getObjectId().equals(pathObjectId)) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>case "not":<NEW_LINE>return !correlations.containsKey(value);<NEW_LINE>default:<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return "not".equals(correlationOp);<NEW_LINE>} else {<NEW_LINE>// fallback<NEW_LINE>return correlations.containsKey(key(pathSubjectId, pathObjectId));<NEW_LINE>}<NEW_LINE>}
matcher = correlationPattern.matcher(message);
1,300,030
public void renameDatabase(AlterDatabaseRename stmt) throws DdlException {<NEW_LINE>String fullDbName = stmt.getDbName();<NEW_LINE>String newFullDbName = stmt.getNewDbName();<NEW_LINE>String clusterName = stmt.getClusterName();<NEW_LINE>if (fullDbName.equals(newFullDbName)) {<NEW_LINE>throw new DdlException("Same database name");<NEW_LINE>}<NEW_LINE>Database db = null;<NEW_LINE>Cluster cluster = null;<NEW_LINE>if (!tryLock(false)) {<NEW_LINE>throw new DdlException("Failed to acquire catalog lock. Try again");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>cluster = nameToCluster.get(clusterName);<NEW_LINE>if (cluster == null) {<NEW_LINE>ErrorReport.reportDdlException(ErrorCode.ERR_CLUSTER_NO_EXISTS, clusterName);<NEW_LINE>}<NEW_LINE>// check if db exists<NEW_LINE>db = fullNameToDb.get(fullDbName);<NEW_LINE>if (db == null) {<NEW_LINE>ErrorReport.reportDdlException(ErrorCode.ERR_BAD_DB_ERROR, fullDbName);<NEW_LINE>}<NEW_LINE>if (db.getDbState() == DbState.LINK || db.getDbState() == DbState.MOVE) {<NEW_LINE>ErrorReport.reportDdlException(ErrorCode.ERR_CLUSTER_RENAME_DB_ERR, fullDbName);<NEW_LINE>}<NEW_LINE>// check if name is already used<NEW_LINE>if (fullNameToDb.get(newFullDbName) != null) {<NEW_LINE>throw new DdlException("Database name[" + newFullDbName + "] is already used");<NEW_LINE>}<NEW_LINE>cluster.removeDb(db.getFullName(<MASK><NEW_LINE>cluster.addDb(newFullDbName, db.getId());<NEW_LINE>// 1. rename db<NEW_LINE>db.setNameWithLock(newFullDbName);<NEW_LINE>// 2. add to meta. check again<NEW_LINE>fullNameToDb.remove(fullDbName);<NEW_LINE>fullNameToDb.put(newFullDbName, db);<NEW_LINE>DatabaseInfo dbInfo = new DatabaseInfo(fullDbName, newFullDbName, -1L, QuotaType.NONE);<NEW_LINE>editLog.logDatabaseRename(dbInfo);<NEW_LINE>} finally {<NEW_LINE>unlock();<NEW_LINE>}<NEW_LINE>LOG.info("rename database[{}] to [{}], id: {}", fullDbName, newFullDbName, db.getId());<NEW_LINE>}
), db.getId());
54,739
public DataContext createDataContext(final JavaTypeFactory typeFactory, List<TypedValue> parameters) {<NEW_LINE>class DruidDataContext implements DataContext {<NEW_LINE><NEW_LINE>private final Map<String, Object> base_context = ImmutableMap.of(DataContext.Variable.UTC_TIMESTAMP.camelName, localNow.getMillis(), DataContext.Variable.CURRENT_TIMESTAMP.camelName, localNow.getMillis(), DataContext.Variable.LOCAL_TIMESTAMP.camelName, new Interval(new DateTime("1970-01-01T00:00:00.000", localNow.getZone()), localNow).toDurationMillis(), DataContext.Variable.TIME_ZONE.camelName, localNow.getZone().toTimeZone().clone());<NEW_LINE><NEW_LINE>private final Map<String, Object> context;<NEW_LINE><NEW_LINE>DruidDataContext() {<NEW_LINE>ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder();<NEW_LINE>builder.putAll(base_context);<NEW_LINE>int i = 0;<NEW_LINE>for (TypedValue parameter : parameters) {<NEW_LINE>builder.put("?" + i, parameter.value);<NEW_LINE>i++;<NEW_LINE>}<NEW_LINE>if (authenticationResult != null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>context = builder.build();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public SchemaPlus getRootSchema() {<NEW_LINE>throw new UnsupportedOperationException();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public JavaTypeFactory getTypeFactory() {<NEW_LINE>return typeFactory;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public QueryProvider getQueryProvider() {<NEW_LINE>throw new UnsupportedOperationException();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object get(final String name) {<NEW_LINE>return context.get(name);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new DruidDataContext();<NEW_LINE>}
builder.put(DATA_CTX_AUTHENTICATION_RESULT, authenticationResult);
337,178
public void onMsg(TbContext ctx, TbMsg msg) {<NEW_LINE>log.trace("onMsg, config {}, msg {}", config, msg);<NEW_LINE>if (initialized.get() && msg.getType().equals(TB_MSG_GENERATOR_NODE_MSG) && msg.getId().equals(nextTickId)) {<NEW_LINE>TbStopWatch sw = TbStopWatch.startNew();<NEW_LINE>withCallback(generate(ctx, msg), m -> {<NEW_LINE>log.trace("onMsg onSuccess callback, took {}ms, config {}, msg {}", sw.stopAndGetTotalTimeMillis(), config, msg);<NEW_LINE>if (initialized.get() && (config.getMsgCount() == TbMsgGeneratorNodeConfiguration.UNLIMITED_MSG_COUNT || currentMsgCount < config.getMsgCount())) {<NEW_LINE><MASK><NEW_LINE>scheduleTickMsg(ctx);<NEW_LINE>currentMsgCount++;<NEW_LINE>}<NEW_LINE>}, t -> {<NEW_LINE>log.warn("onMsg onFailure callback, took {}ms, config {}, msg {}, exception {}", sw.stopAndGetTotalTimeMillis(), config, msg, t);<NEW_LINE>if (initialized.get() && (config.getMsgCount() == TbMsgGeneratorNodeConfiguration.UNLIMITED_MSG_COUNT || currentMsgCount < config.getMsgCount())) {<NEW_LINE>ctx.tellFailure(msg, t);<NEW_LINE>scheduleTickMsg(ctx);<NEW_LINE>currentMsgCount++;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
ctx.enqueueForTellNext(m, SUCCESS);
363,559
public void read(org.apache.thrift.protocol.TProtocol iprot, closeUpdate_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>switch(schemeField.id) {<NEW_LINE>case // SUCCESS<NEW_LINE>0:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {<NEW_LINE>struct.success = new org.apache.accumulo.core<MASK><NEW_LINE>struct.success.read(iprot);<NEW_LINE>struct.setSuccessIsSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case // NSSI<NEW_LINE>1:<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {<NEW_LINE>struct.nssi = new NoSuchScanIDException();<NEW_LINE>struct.nssi.read(iprot);<NEW_LINE>struct.setNssiIsSet(true);<NEW_LINE>} else {<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);<NEW_LINE>}<NEW_LINE>iprot.readFieldEnd();<NEW_LINE>}<NEW_LINE>iprot.readStructEnd();<NEW_LINE>// check for required fields of primitive type, which can't be checked in the validate method<NEW_LINE>struct.validate();<NEW_LINE>}
.dataImpl.thrift.UpdateErrors();
373,560
// This tries to build a private channel instance through an arbitrary message object<NEW_LINE>private PrivateChannel createPrivateChannelByMessage(DataObject message) {<NEW_LINE>final long channelId = message.getLong("channel_id");<NEW_LINE>final DataObject author = message.getObject("author");<NEW_LINE>final long authorId = author.getLong("id");<NEW_LINE>PrivateChannelImpl channel = (PrivateChannelImpl) getJDA().getPrivateChannelById(channelId);<NEW_LINE>boolean isAuthorSelfUser = authorId == getJDA()<MASK><NEW_LINE>if (channel == null) {<NEW_LINE>DataObject channelData = DataObject.empty().put("id", channelId);<NEW_LINE>// if we see an author that isn't us, we can assume that is the other side of this private channel<NEW_LINE>// if the author is us, we learn no information about the user at the other end<NEW_LINE>if (!isAuthorSelfUser)<NEW_LINE>channelData.put("recipient", author);<NEW_LINE>// even without knowing the user at the other end, we can still construct a minimal channel<NEW_LINE>channel = (PrivateChannelImpl) createPrivateChannel(channelData);<NEW_LINE>} else if (channel.getUser() == null && !isAuthorSelfUser) {<NEW_LINE>// In this situation, we already know the channel<NEW_LINE>// but the message provided us with the recipient<NEW_LINE>// which we can now add to the channel<NEW_LINE>UserImpl user = createUser(author);<NEW_LINE>channel.setUser(user);<NEW_LINE>user.setPrivateChannel(channel);<NEW_LINE>}<NEW_LINE>return channel;<NEW_LINE>}
.getSelfUser().getIdLong();
529,027
public static void vp8_alloc_compressor_data(Compressor cpi) {<NEW_LINE>CommonData cm = cpi.common;<NEW_LINE>int width = cm.Width;<NEW_LINE>int height = cm.Height;<NEW_LINE>cm.vp8_alloc_frame_buffers(width, height);<NEW_LINE>if ((width & 0xf) != 0)<NEW_LINE>width += 16 - (width & 0xf);<NEW_LINE>if ((height & 0xf) != 0)<NEW_LINE>height += 16 - (height & 0xf);<NEW_LINE>cpi.pick_lf_lvl_frame = new YV12buffer(width, height);<NEW_LINE>cpi.scaled_source <MASK><NEW_LINE>{<NEW_LINE>int tokens = cm.mb_rows * cm.mb_cols * 24 * 16;<NEW_LINE>cpi.tok = new FullAccessGenArrPointer<TokenExtra>(tokens);<NEW_LINE>for (int i = 0; i < tokens; i++) {<NEW_LINE>cpi.tok.setRel(i, null);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>cpi.gf_active_flags = new FullAccessIntArrPointer(cm.mb_rows * cm.mb_cols);<NEW_LINE>cpi.gf_active_count = cm.mb_rows * cm.mb_cols;<NEW_LINE>cpi.mb_activity_map = new FullAccessIntArrPointer(cpi.gf_active_count);<NEW_LINE>cpi.segmentation_map = new int[cpi.gf_active_count];<NEW_LINE>cpi.cyclic_refresh_mode_index = 0;<NEW_LINE>cpi.active_map = new FullAccessIntArrPointer(cpi.gf_active_count);<NEW_LINE>cpi.active_map.memset(0, (short) 1, cpi.gf_active_count);<NEW_LINE>cpi.tplist = new TokenList[cm.mb_rows];<NEW_LINE>for (int i = 0; i < cm.mb_rows; i++) {<NEW_LINE>cpi.tplist[i] = new TokenList();<NEW_LINE>}<NEW_LINE>}
= new YV12buffer(width, height);
570,723
private void writeBinder(IndentedWriter w, FieldWriter rootField) throws UnableToCompleteException {<NEW_LINE>writePackage(w);<NEW_LINE>writeImports(w);<NEW_LINE>w.newline();<NEW_LINE>writeClassOpen(w);<NEW_LINE>writeStatics(w);<NEW_LINE>w.newline();<NEW_LINE>// Create SafeHtml Template<NEW_LINE>writeTemplatesInterface(w);<NEW_LINE>w.newline();<NEW_LINE>// createAndBindUi method<NEW_LINE>w.write("public %s createAndBindUi(final %s owner) {", uiRootType.getParameterizedQualifiedSourceName(<MASK><NEW_LINE>w.indent();<NEW_LINE>w.newline();<NEW_LINE>writeGwtFields(w);<NEW_LINE>w.newline();<NEW_LINE>designTime.writeAttributes(this);<NEW_LINE>writeAddedStatements(w);<NEW_LINE>w.newline();<NEW_LINE>writeInitStatements(w);<NEW_LINE>w.newline();<NEW_LINE>writeHandlers(w);<NEW_LINE>w.newline();<NEW_LINE>writeOwnerFieldSetters(w);<NEW_LINE>writeCssInjectors(w);<NEW_LINE>w.write("return %s;", rootField.getNextReference());<NEW_LINE>w.outdent();<NEW_LINE>w.write("}");<NEW_LINE>// Close class<NEW_LINE>w.outdent();<NEW_LINE>w.write("}");<NEW_LINE>}
), uiOwnerType.getParameterizedQualifiedSourceName());
999,477
protected void run(StructuredGraph graph, CoreProviders context) {<NEW_LINE>DebugContext debug = graph.getDebug();<NEW_LINE>if (graph.hasLoops()) {<NEW_LINE>boolean unswitched;<NEW_LINE>do {<NEW_LINE>unswitched = false;<NEW_LINE>final LoopsData dataUnswitch = context.getLoopsDataProvider().getLoopsData(graph);<NEW_LINE>for (LoopEx loop : dataUnswitch.outerFirst()) {<NEW_LINE>if (getPolicies().shouldTryUnswitch(loop)) {<NEW_LINE>List<ControlSplitNode> controlSplits = LoopTransformations.findUnswitchable(loop);<NEW_LINE>if (controlSplits != null) {<NEW_LINE>UNSWITCH_CANDIDATES.increment(debug);<NEW_LINE>UnswitchingDecision decision = getPolicies().shouldUnswitch(loop, controlSplits);<NEW_LINE>if (decision.shouldUnswitch()) {<NEW_LINE>if (debug.isLogEnabled()) {<NEW_LINE>logUnswitch(loop, controlSplits);<NEW_LINE>}<NEW_LINE>LoopTransformations.unswitch(loop, controlSplits, decision.isTrivial());<NEW_LINE>debug.dump(DebugContext.<MASK><NEW_LINE>UNSWITCHED.increment(debug);<NEW_LINE>unswitched = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>UNSWITCH_EARLY_REJECTS.increment(debug);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} while (unswitched);<NEW_LINE>}<NEW_LINE>}
DETAILED_LEVEL, graph, "After unswitch %s", controlSplits);
223,881
public io.kubernetes.client.proto.V2beta2Autoscaling.HPAScalingRules buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V2beta2Autoscaling.HPAScalingRules result = new io.kubernetes.client.proto.V2beta2Autoscaling.HPAScalingRules(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>result.stabilizationWindowSeconds_ = stabilizationWindowSeconds_;<NEW_LINE>if (((from_bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>to_bitField0_ |= 0x00000002;<NEW_LINE>}<NEW_LINE>result.selectPolicy_ = selectPolicy_;<NEW_LINE>if (policiesBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000004) == 0x00000004)) {<NEW_LINE>policies_ = java.<MASK><NEW_LINE>bitField0_ = (bitField0_ & ~0x00000004);<NEW_LINE>}<NEW_LINE>result.policies_ = policies_;<NEW_LINE>} else {<NEW_LINE>result.policies_ = policiesBuilder_.build();<NEW_LINE>}<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
util.Collections.unmodifiableList(policies_);
229,620
/*<NEW_LINE>* private static String[] shift(String args[]) { if ((args == null) ||<NEW_LINE>* (args.length == 0)) return args; else { String[] newArgs = new<NEW_LINE>* String[args.length-1]; System.arraycopy(args, 1, newArgs, 0,<NEW_LINE>* args.length-1); return newArgs; } } public boolean JAR() { //Sun<NEW_LINE>* proprietary API may be removed in a future Java release<NEW_LINE>* sun.tools.jar.Main.main(shift(cmd)); return true; }<NEW_LINE>*/<NEW_LINE>public boolean JJENCODE() {<NEW_LINE>if (this.cmd.length != 2) {<NEW_LINE>log.warn("Syntax: JJENCODE <path>");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>final String path = this.cmd[1];<NEW_LINE>final <MASK><NEW_LINE>final File newPath = dir.isAbsolute() ? dir : new File(this.currentLocalPath, path);<NEW_LINE>if (newPath.exists()) {<NEW_LINE>if (newPath.isDirectory()) {<NEW_LINE>// exec("cd \"" + remote + "\";lmkdir \"" + remote + "\";lcd \""<NEW_LINE>// + remote + "\"",true);<NEW_LINE>String s = "";<NEW_LINE>final String[] l = newPath.list();<NEW_LINE>for (final String element : l) {<NEW_LINE>s = s + " \"" + element + "\"";<NEW_LINE>}<NEW_LINE>exec("cd \"" + path + "\";jar -cfM0 ../\"" + path + ".jar\"" + s, true);<NEW_LINE>exec("cd ..;jar -cfM \"" + path + ".jj\" \"" + path + ".jar\"", true);<NEW_LINE>exec("rm \"" + path + ".jar\"", true);<NEW_LINE>} else {<NEW_LINE>log.warn("Error: local path " + newPath.toString() + " denotes not to a directory.");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>log.warn("Error: local path " + newPath.toString() + " does not exist.");<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
File dir = new File(path);
1,306,798
public static Collection<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> executions = new ArrayList<>();<NEW_LINE>executions.add(new ExecCoreNewInstanceKeyword(true));<NEW_LINE>executions.add(new ExecCoreNewInstanceKeyword(false));<NEW_LINE>executions.add(new ExecCoreNewInstanceStreamAlias());<NEW_LINE>executions.add(new ExecCoreNewInstanceGeneric(false));<NEW_LINE>executions.add(new ExecCoreNewInstanceGeneric(true));<NEW_LINE>executions.add(new ExecCoreNewInstanceInvalid());<NEW_LINE>executions.add(new ExecCoreNewInstanceArraySized(false));<NEW_LINE>executions.<MASK><NEW_LINE>executions.add(new ExecCoreNewInstanceArrayInitOneDim(false));<NEW_LINE>executions.add(new ExecCoreNewInstanceArrayInitOneDim(true));<NEW_LINE>executions.add(new ExecCoreNewInstanceArrayInitTwoDim(false));<NEW_LINE>executions.add(new ExecCoreNewInstanceArrayInitTwoDim(true));<NEW_LINE>executions.add(new ExecCoreNewInstanceArrayInvalid());<NEW_LINE>return executions;<NEW_LINE>}
add(new ExecCoreNewInstanceArraySized(true));
1,761,868
public static List<FridaProcess> enumerateProcesses(FridaTarget t) {<NEW_LINE>Pointer device = t.getPointer();<NEW_LINE>FridaError err = new FridaError();<NEW_LINE>Pointer list = FridaNative.INSTANCE.GH_frida_device_enumerate_processes_sync(device, null, null, err.error);<NEW_LINE>if (list == null) {<NEW_LINE>Msg.error(t, err);<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Integer numProcesses = FridaNative.INSTANCE.GH_frida_process_list_size(list);<NEW_LINE>List<FridaProcess> processList = new ArrayList<>(numProcesses);<NEW_LINE>for (int i = 0; i != numProcesses; i++) {<NEW_LINE>Pointer process = FridaNative.INSTANCE.GH_frida_process_list_get(list, i);<NEW_LINE>NativeLong pid = FridaNative.INSTANCE.GH_frida_process_get_pid(process);<NEW_LINE>String name = <MASK><NEW_LINE>FridaProcess p = new FridaProcess(process, pid);<NEW_LINE>p.setName(name);<NEW_LINE>processList.add(p);<NEW_LINE>}<NEW_LINE>return processList;<NEW_LINE>}
FridaNative.INSTANCE.GH_frida_process_get_name(process);
1,050,347
protected void run() throws GitException {<NEW_LINE>Repository repository = getRepository();<NEW_LINE>String workTreePath = repository.getWorkTree().getAbsolutePath();<NEW_LINE>try (DiffFormatter formatter = new DiffFormatter(out);<NEW_LINE>ObjectReader or = repository.newObjectReader()) {<NEW_LINE>formatter.setRepository(repository);<NEW_LINE>Collection<PathFilter> pathFilters = Utils.getPathFilters(repository.getWorkTree(), roots);<NEW_LINE>if (!pathFilters.isEmpty()) {<NEW_LINE>formatter.setPathFilter(PathFilterGroup.create(pathFilters));<NEW_LINE>}<NEW_LINE>if (repository.getConfig().get(WorkingTreeOptions.KEY).getAutoCRLF() != CoreConfig.AutoCRLF.FALSE) {<NEW_LINE>// work-around for autocrlf<NEW_LINE>formatter.setDiffComparator(new AutoCRLFComparator());<NEW_LINE>}<NEW_LINE>AbstractTreeIterator <MASK><NEW_LINE>AbstractTreeIterator secondTree = getIterator(secondCommit, or);<NEW_LINE>List<DiffEntry> diffEntries;<NEW_LINE>if (secondTree instanceof WorkingTreeIterator) {<NEW_LINE>// remote when fixed in JGit, see ExportDiffTest.testDiffRenameDetectionProblem<NEW_LINE>formatter.setDetectRenames(false);<NEW_LINE>diffEntries = formatter.scan(firstTree, secondTree);<NEW_LINE>formatter.setDetectRenames(true);<NEW_LINE>RenameDetector detector = formatter.getRenameDetector();<NEW_LINE>detector.reset();<NEW_LINE>detector.addAll(diffEntries);<NEW_LINE>diffEntries = detector.compute(new ContentSource.Pair(ContentSource.create(or), ContentSource.create((WorkingTreeIterator) secondTree)), NullProgressMonitor.INSTANCE);<NEW_LINE>} else {<NEW_LINE>formatter.setDetectRenames(true);<NEW_LINE>diffEntries = formatter.scan(firstTree, secondTree);<NEW_LINE>}<NEW_LINE>for (DiffEntry ent : diffEntries) {<NEW_LINE>if (monitor.isCanceled()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>listener.notifyFile(new File(workTreePath + File.separator + ent.getNewPath()), ent.getNewPath());<NEW_LINE>formatter.format(ent);<NEW_LINE>}<NEW_LINE>formatter.flush();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>throw new GitException(ex);<NEW_LINE>}<NEW_LINE>}
firstTree = getIterator(firstCommit, or);
1,424,621
public double compare(Record r1, Record r2) {<NEW_LINE>comparisons++;<NEW_LINE>double prob = 0.5;<NEW_LINE>for (String propname : r1.getProperties()) {<NEW_LINE>Property prop = config.getPropertyByName(propname);<NEW_LINE>if (prop == null)<NEW_LINE>// means the property is unknown<NEW_LINE>continue;<NEW_LINE>if (prop.isIdProperty() || prop.isIgnoreProperty())<NEW_LINE>continue;<NEW_LINE>Collection<String> <MASK><NEW_LINE>Collection<String> vs2 = r2.getValues(propname);<NEW_LINE>if (vs1 == null || vs1.isEmpty() || vs2 == null || vs2.isEmpty())<NEW_LINE>// no values to compare, so skip<NEW_LINE>continue;<NEW_LINE>double high = 0.0;<NEW_LINE>for (String v1 : vs1) {<NEW_LINE>if (// FIXME: these values shouldn't be here at all<NEW_LINE>v1.equals(""))<NEW_LINE>continue;<NEW_LINE>for (String v2 : vs2) {<NEW_LINE>if (// FIXME: these values shouldn't be here at all<NEW_LINE>v2.equals(""))<NEW_LINE>continue;<NEW_LINE>try {<NEW_LINE>double p = prop.compare(v1, v2);<NEW_LINE>high = Math.max(high, p);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new DukeException("Comparison of values '" + v1 + "' and " + "'" + v2 + "' with " + prop.getComparator() + " failed", e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>prob = Utils.computeBayes(prob, high);<NEW_LINE>}<NEW_LINE>return prob;<NEW_LINE>}
vs1 = r1.getValues(propname);
1,709,021
private UserDetails fetchUserDetails(User user, String emailId) throws PacManException {<NEW_LINE>UserDetails userDetails = new UserDetails();<NEW_LINE>try {<NEW_LINE>if (user == null) {<NEW_LINE>List<String> roles = Lists.newArrayList();<NEW_LINE>roles.add("ROLE_USER");<NEW_LINE>userDetails.setUserRoles(roles);<NEW_LINE>userDetails.setUserName(StringUtils.EMPTY);<NEW_LINE>userDetails.setUserId(StringUtils.EMPTY);<NEW_LINE>if (emailId != null) {<NEW_LINE>userDetails.setEmail(emailId);<NEW_LINE>} else {<NEW_LINE>userDetails.setEmail(StringUtils.EMPTY);<NEW_LINE>}<NEW_LINE>userDetails.setLastName(StringUtils.EMPTY);<NEW_LINE>userDetails.setFirstName(StringUtils.EMPTY);<NEW_LINE>userDetails.setDefaultAssetGroup("");<NEW_LINE>} else {<NEW_LINE>List<String[]> userRoles = userRolesMappingRepository.findAllUserRoleDetailsByUserIdIgnoreCase(user.getUserId());<NEW_LINE>UserPreferences userPreferences = userPreferencesService.getUserPreferencesByNtId(user.getUserId());<NEW_LINE>userDetails.setUserRoles(userRoles);<NEW_LINE>userDetails.setUserName(user.getUserName());<NEW_LINE>userDetails.setUserId(user.getUserId());<NEW_LINE>userDetails.<MASK><NEW_LINE>userDetails.setFirstName(user.getFirstName());<NEW_LINE>userDetails.setEmail(user.getEmail());<NEW_LINE>userDetails.setDefaultAssetGroup(userPreferences.getDefaultAssetGroup());<NEW_LINE>}<NEW_LINE>} catch (Exception eception) {<NEW_LINE>throw new PacManException(UNEXPECTED_ERROR_OCCURRED);<NEW_LINE>}<NEW_LINE>return userDetails;<NEW_LINE>}
setLastName(user.getLastName());
1,413,055
public Dialog onCreateDialog(Bundle savedInstanceState) {<NEW_LINE>Calendar calendar;<NEW_LINE>try {<NEW_LINE>Date value = DateFormat.getDateInstance().parse(m_editText.getText().toString());<NEW_LINE>calendar = new GregorianCalendar();<NEW_LINE>calendar.setTime(value);<NEW_LINE>} catch (Exception excep) {<NEW_LINE>// Use current date as default date<NEW_LINE>calendar = Calendar.getInstance();<NEW_LINE>}<NEW_LINE>DatePickerDialog datePickerDialog = new DatePickerDialog(m_context, this, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH));<NEW_LINE>if (!m_dateInput.GetMin().isEmpty()) {<NEW_LINE>datePickerDialog.getDatePicker().setMinDate(RendererUtil.getDate(m_dateInput.GetMin()).<MASK><NEW_LINE>}<NEW_LINE>if (!m_dateInput.GetMax().isEmpty()) {<NEW_LINE>datePickerDialog.getDatePicker().setMaxDate(RendererUtil.getDate(m_dateInput.GetMax()).getTime().getTime());<NEW_LINE>}<NEW_LINE>return datePickerDialog;<NEW_LINE>}
getTime().getTime());
273,257
private void runAssertion(RegressionEnvironment env, AtomicInteger milestone, boolean advanced, String filter) {<NEW_LINE>String epl = HOOK + "@name('s0') select * from pattern[every s0=SupportBean_S0 -> " + "SupportBean_S1(" + filter + ")]";<NEW_LINE>SupportFilterPlanHook.reset();<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>SupportFilterPlanPath pathOne = makePathFromSingle("p10", EQUAL, "a");<NEW_LINE>SupportFilterPlanPath pathTwo = makePathFromSingle("p11", EQUAL, "b");<NEW_LINE>if (advanced) {<NEW_LINE>assertPlanSingleByType("SupportBean_S1", new SupportFilterPlan("s0.p00=\"x\"", null, pathOne, pathTwo));<NEW_LINE>}<NEW_LINE>env.sendEventBean(new SupportBean_S0(1, "x"));<NEW_LINE>if (advanced) {<NEW_LINE>assertFilterSvcEmpty(env, "s0", "SupportBean_S1");<NEW_LINE>}<NEW_LINE>sendS1Assert(env, 10, "-", "-", true);<NEW_LINE>env.sendEventBean(new SupportBean_S0(2, "y"));<NEW_LINE>env.milestoneInc(milestone);<NEW_LINE>if (advanced) {<NEW_LINE>assertFilterSvcByTypeMulti(env, "s0", "SupportBean_S1", new FilterItem[][] { new FilterItem[] { new FilterItem("p10", EQUAL) }, new FilterItem[] { new FilterItem("p11", EQUAL) } });<NEW_LINE>}<NEW_LINE>sendS1Assert(env, 20, "-", "-", false);<NEW_LINE>sendS1Assert(env, 21, "a", "-", true);<NEW_LINE>env.sendEventBean(<MASK><NEW_LINE>sendS1Assert(env, 30, "-", "-", false);<NEW_LINE>sendS1Assert(env, 31, "-", "b", true);<NEW_LINE>env.undeployAll();<NEW_LINE>}
new SupportBean_S0(3, "y"));
1,156,324
public void finalizeImplForNereids() throws AnalysisException {<NEW_LINE>try {<NEW_LINE>analyze();<NEW_LINE>} catch (AnalysisException ex) {<NEW_LINE>LOG.warn("Implicit casts fail", ex);<NEW_LINE>Preconditions.checkState(false, "Implicit casts should never throw analysis exception.");<NEW_LINE>}<NEW_LINE>FunctionName fnName = new FunctionName(getFnName(type));<NEW_LINE>Function searchDesc = new Function(fnName, Arrays.asList(collectChildReturnTypes()), Type.INVALID, false);<NEW_LINE>if (type.isScalarType()) {<NEW_LINE>if (isImplicit) {<NEW_LINE>fn = Env.getCurrentEnv().getFunction(searchDesc, Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF);<NEW_LINE>} else {<NEW_LINE>fn = Env.getCurrentEnv().getFunction(<MASK><NEW_LINE>}<NEW_LINE>} else if (type.isArrayType()) {<NEW_LINE>fn = ScalarFunction.createBuiltin(getFnName(Type.ARRAY), type, Function.NullableMode.ALWAYS_NULLABLE, Lists.newArrayList(Type.VARCHAR), false, "doris::CastFunctions::cast_to_array_val", null, null, true);<NEW_LINE>}<NEW_LINE>}
searchDesc, Function.CompareMode.IS_IDENTICAL);
1,553,046
public static DescribeBindersResponse unmarshall(DescribeBindersResponse describeBindersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBindersResponse.setRequestId(_ctx.stringValue("DescribeBindersResponse.RequestId"));<NEW_LINE>describeBindersResponse.setErrorMessage(_ctx.stringValue("DescribeBindersResponse.ErrorMessage"));<NEW_LINE>describeBindersResponse.setErrorCode(_ctx.stringValue("DescribeBindersResponse.ErrorCode"));<NEW_LINE>describeBindersResponse.setTotalCount<MASK><NEW_LINE>describeBindersResponse.setMessage(_ctx.stringValue("DescribeBindersResponse.Message"));<NEW_LINE>describeBindersResponse.setPageSize(_ctx.integerValue("DescribeBindersResponse.PageSize"));<NEW_LINE>describeBindersResponse.setDynamicCode(_ctx.stringValue("DescribeBindersResponse.DynamicCode"));<NEW_LINE>describeBindersResponse.setCode(_ctx.stringValue("DescribeBindersResponse.Code"));<NEW_LINE>describeBindersResponse.setDynamicMessage(_ctx.stringValue("DescribeBindersResponse.DynamicMessage"));<NEW_LINE>describeBindersResponse.setPageNumber(_ctx.integerValue("DescribeBindersResponse.PageNumber"));<NEW_LINE>describeBindersResponse.setSuccess(_ctx.booleanValue("DescribeBindersResponse.Success"));<NEW_LINE>List<EslItemBindInfo> eslItemBindInfos = new ArrayList<EslItemBindInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeBindersResponse.EslItemBindInfos.Length"); i++) {<NEW_LINE>EslItemBindInfo eslItemBindInfo = new EslItemBindInfo();<NEW_LINE>eslItemBindInfo.setPromotionText(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PromotionText"));<NEW_LINE>eslItemBindInfo.setBindId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].BindId"));<NEW_LINE>eslItemBindInfo.setStoreId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].StoreId"));<NEW_LINE>eslItemBindInfo.setTemplateId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].TemplateId"));<NEW_LINE>eslItemBindInfo.setEslPic(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslPic"));<NEW_LINE>eslItemBindInfo.setEslStatus(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslStatus"));<NEW_LINE>eslItemBindInfo.setItemTitle(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemTitle"));<NEW_LINE>eslItemBindInfo.setOriginalPrice(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].OriginalPrice"));<NEW_LINE>eslItemBindInfo.setTemplateSceneId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].TemplateSceneId"));<NEW_LINE>eslItemBindInfo.setGmtModified(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].GmtModified"));<NEW_LINE>eslItemBindInfo.setActionPrice(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ActionPrice"));<NEW_LINE>eslItemBindInfo.setPriceUnit(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PriceUnit"));<NEW_LINE>eslItemBindInfo.setEslConnectAp(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslConnectAp"));<NEW_LINE>eslItemBindInfo.setSkuId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].SkuId"));<NEW_LINE>eslItemBindInfo.setEslBarCode(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslBarCode"));<NEW_LINE>eslItemBindInfo.setItemShortTitle(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemShortTitle"));<NEW_LINE>eslItemBindInfo.setBePromotion(_ctx.booleanValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].BePromotion"));<NEW_LINE>eslItemBindInfo.setEslModel(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].EslModel"));<NEW_LINE>eslItemBindInfo.setItemBarCode(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemBarCode"));<NEW_LINE>eslItemBindInfo.setItemId(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].ItemId"));<NEW_LINE>eslItemBindInfo.setPromotionStart(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PromotionStart"));<NEW_LINE>eslItemBindInfo.setPromotionEnd(_ctx.stringValue("DescribeBindersResponse.EslItemBindInfos[" + i + "].PromotionEnd"));<NEW_LINE>eslItemBindInfos.add(eslItemBindInfo);<NEW_LINE>}<NEW_LINE>describeBindersResponse.setEslItemBindInfos(eslItemBindInfos);<NEW_LINE>return describeBindersResponse;<NEW_LINE>}
(_ctx.integerValue("DescribeBindersResponse.TotalCount"));
770,660
public I_PP_Order_Qty save(@NonNull final CreateIssueCandidateRequest request) {<NEW_LINE>final I_PP_Order_Qty record = newInstance(I_PP_Order_Qty.class);<NEW_LINE>record.setPP_Order_ID(request.getOrderId().getRepoId());<NEW_LINE>record.setPP_Order_BOMLine_ID(PPOrderBOMLineId.toRepoId<MASK><NEW_LINE>record.setM_Locator_ID(LocatorId.toRepoId(request.getLocatorId()));<NEW_LINE>record.setM_HU_ID(request.getIssueFromHUId().getRepoId());<NEW_LINE>record.setM_Product_ID(request.getProductId().getRepoId());<NEW_LINE>final Quantity qtyToIssue = request.getQtyToIssue();<NEW_LINE>record.setQty(qtyToIssue.toBigDecimal());<NEW_LINE>record.setC_UOM_ID(qtyToIssue.getUomId().getRepoId());<NEW_LINE>record.setMovementDate(TimeUtil.asTimestamp(request.getDate()));<NEW_LINE>record.setProcessed(false);<NEW_LINE>final IssueCandidateGeneratedBy generatedBy = request.getGeneratedBy();<NEW_LINE>if (generatedBy != null) {<NEW_LINE>record.setM_Picking_Candidate_ID(PickingCandidateId.toRepoId(generatedBy.getPickingCandidateId()));<NEW_LINE>record.setPP_Order_IssueSchedule_ID(PPOrderIssueScheduleId.toRepoId(generatedBy.getIssueScheduleId()));<NEW_LINE>}<NEW_LINE>save(record);<NEW_LINE>return record;<NEW_LINE>}
(request.getOrderBOMLineId()));
16,176
public void monitor() {<NEW_LINE>final Device d = UPNPControl.getDevice(uuid);<NEW_LINE>monitor = new Thread(() -> {<NEW_LINE>String id = data.get(INSTANCE_ID);<NEW_LINE>String <MASK><NEW_LINE>while (active && (PLAYING.equals(transportState) || RECORDING.equals(transportState) || TRANSITIONING.equals(transportState))) {<NEW_LINE>UMSUtils.sleep(1000);<NEW_LINE>// if (DEBUG) LOGGER.debug("InstanceID: " + id);<NEW_LINE>// Send the GetPositionRequest only when renderer supports it<NEW_LINE>if (isGetPositionInfoImplemented) {<NEW_LINE>for (ActionArgumentValue o : UPNPControl.getPositionInfo(d, id, this)) {<NEW_LINE>data.put(o.getArgument().getName(), o.toString());<NEW_LINE>// if (DEBUG) LOGGER.debug(o.getArgument().getName() +<NEW_LINE>// ": " + o.toString());<NEW_LINE>}<NEW_LINE>alert();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!active) {<NEW_LINE>data.put(TRANSPORT_STATE, STOPPED);<NEW_LINE>alert();<NEW_LINE>}<NEW_LINE>}, "UPNP-" + d.getDetails().getFriendlyName());<NEW_LINE>monitor.start();<NEW_LINE>}
transportState = data.get(TRANSPORT_STATE);
1,569,014
private void drawNumbering(GraphicsWrap g, RectangleWrap field, double x, int index) {<NEW_LINE>double position = x;<NEW_LINE>if (this.tic < 1 && Math.abs(ticStart - position) < this.tic * this.tic) {<NEW_LINE>position = ticStart;<NEW_LINE>}<NEW_LINE>FontMetricsWrap fm = g.getFontMetrics();<NEW_LINE>float fontHeight = fm.getHeight();<NEW_LINE>float[] coordStart = plotSheet.toGraphicPoint(position, yOffset, field);<NEW_LINE>if (Math.abs(position) - Math.abs(0) < 0.001 && !this.isOnFrame) {<NEW_LINE>coordStart[0] += 10;<NEW_LINE>coordStart[1] -= 10;<NEW_LINE>}<NEW_LINE>String text = (mTickNameList == null) ? df.format(position) : mTickNameList[index];<NEW_LINE>float width = fm.stringWidth(text);<NEW_LINE>if (this.isScientific || (width > this.pixelDistance)) {<NEW_LINE>text = (mTickNameList == null) ? dfScience.format(position) : mTickNameList[index];<NEW_LINE><MASK><NEW_LINE>g.drawString(text, coordStart[0] - width / 2, Math.round(coordStart[1] + ((this.isOnFrame) ? Math.round(fontHeight * 1.5) : 20)));<NEW_LINE>} else if (isIntegerNumbering) {<NEW_LINE>text = (mTickNameList == null) ? dfInteger.format(position) : mTickNameList[index];<NEW_LINE>width = fm.stringWidth(text);<NEW_LINE>g.drawString(text, coordStart[0] - width / 2, Math.round(coordStart[1] + ((this.isOnFrame) ? Math.round(fontHeight * 1.5) : 20)));<NEW_LINE>} else {<NEW_LINE>width = fm.stringWidth(text);<NEW_LINE>g.drawString(text, coordStart[0] - width / 2, Math.round(coordStart[1] + ((this.isOnFrame) ? Math.round(fontHeight * 1.5) : 20)));<NEW_LINE>}<NEW_LINE>}
width = fm.stringWidth(text);
512,286
public void executeUpgrade() throws DotDataException, DotRuntimeException {<NEW_LINE>final DotConnect dotConnect = new DotConnect().setSQL(SELECT_FORM_WIDGET_FIELD_INODE);<NEW_LINE>final String fieldId = dotConnect.getString("fieldId");<NEW_LINE>final String contentTypeId = dotConnect.getString("contentTypeId");<NEW_LINE>if (contentTypeId == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// delete old field from "forms"<NEW_LINE>dotConnect.setSQL(DELETE_FIELD);<NEW_LINE>dotConnect.addParam(fieldId);<NEW_LINE>dotConnect.loadResult();<NEW_LINE>// delete old field from "inode"<NEW_LINE>dotConnect.setSQL(DELETE_INODE);<NEW_LINE>dotConnect.addParam(fieldId);<NEW_LINE>dotConnect.loadResult();<NEW_LINE>// delete new field from "forms" if it exists (idempotent)<NEW_LINE>dotConnect.setSQL(DELETE_FIELD);<NEW_LINE>dotConnect.addParam(NEW_FIELD_ID);<NEW_LINE>dotConnect.loadResult();<NEW_LINE>// delete new field from "forms" if it exists (idempotent)<NEW_LINE>dotConnect.setSQL(DELETE_INODE);<NEW_LINE>dotConnect.addParam(NEW_FIELD_ID);<NEW_LINE>dotConnect.loadResult();<NEW_LINE>// insert new field into forms<NEW_LINE>Field newField = ImmutableConstantField.builder().id(NEW_FIELD_ID).name(WidgetContentType.WIDGET_CODE_FIELD_NAME).variable(WidgetContentType.WIDGET_CODE_FIELD_VAR).sortOrder(3).dataType(DataTypes.SYSTEM).dbColumn(DataTypes.SYSTEM.value).fixed(true).readOnly(false).searchable(false).contentTypeId(contentTypeId).values(REPLACEMENT_VELOCITY_CODE).build();<NEW_LINE>// insert the new field<NEW_LINE>insertInodeInDb(newField);<NEW_LINE>insertFieldInDb(newField);<NEW_LINE>CacheLocator<MASK><NEW_LINE>CacheLocator.getContentTypeCache2().clearCache();<NEW_LINE>}
.getContentTypeCache().clearCache();
883,088
public Graphics create() {<NEW_LINE>PdfGraphics2D g2 = new PdfGraphics2D();<NEW_LINE>g2.rhints.putAll(this.rhints);<NEW_LINE>g2.onlyShapes = this.onlyShapes;<NEW_LINE>g2.transform = new AffineTransform(this.transform);<NEW_LINE>g2.baseFonts = this.baseFonts;<NEW_LINE>g2.fontMapper = this.fontMapper;<NEW_LINE>g2.paint = this.paint;<NEW_LINE>g2.fillGState = this.fillGState;<NEW_LINE>g2.currentFillGState = this.currentFillGState;<NEW_LINE>g2.currentStrokeGState = this.currentStrokeGState;<NEW_LINE>g2.strokeGState = this.strokeGState;<NEW_LINE>g2.background = this.background;<NEW_LINE>g2.mediaTracker = this.mediaTracker;<NEW_LINE>g2.convertImagesToJPEG = this.convertImagesToJPEG;<NEW_LINE>g2.jpegQuality = this.jpegQuality;<NEW_LINE>g2.setFont(this.font);<NEW_LINE>g2.cb = this.cb.getDuplicate();<NEW_LINE>g2.cb.saveState();<NEW_LINE>g2.width = this.width;<NEW_LINE>g2.height = this.height;<NEW_LINE>g2.followPath(new Area(new Rectangle2D.Float(0, 0, width, height)), CLIP);<NEW_LINE>if (this.clip != null)<NEW_LINE>g2.clip = new Area(this.clip);<NEW_LINE>g2.composite = composite;<NEW_LINE>g2.stroke = stroke;<NEW_LINE>g2.originalStroke = originalStroke;<NEW_LINE>g2.strokeOne = (BasicStroke) <MASK><NEW_LINE>g2.oldStroke = g2.strokeOne;<NEW_LINE>g2.setStrokeDiff(g2.oldStroke, null);<NEW_LINE>g2.cb.saveState();<NEW_LINE>if (g2.clip != null)<NEW_LINE>g2.followPath(g2.clip, CLIP);<NEW_LINE>g2.kid = true;<NEW_LINE>if (this.kids == null)<NEW_LINE>this.kids = new ArrayList<>();<NEW_LINE>this.kids.add(cb.getInternalBuffer().size());<NEW_LINE>this.kids.add(g2);<NEW_LINE>return g2;<NEW_LINE>}
g2.transformStroke(g2.strokeOne);
1,249,610
public static int calculateBlockSize(String path) {<NEW_LINE>if (Platform.getPlatform().getOS() != Platform.OS.LINUX) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>final int linuxVersion = 0;<NEW_LINE>final int majorRev = 1;<NEW_LINE>final int minorRev = 2;<NEW_LINE>List<Integer> versionNumbers = new ArrayList<>();<NEW_LINE>for (String v : System.getProperty("os.version").split("[.\\-]")) {<NEW_LINE>if (v.matches("\\d")) {<NEW_LINE>versionNumbers.add(Integer.parseInt(v));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (versionNumbers.get(linuxVersion) < 2) {<NEW_LINE>return -1;<NEW_LINE>} else if (versionNumbers.get(linuxVersion) == 2) {<NEW_LINE>if (versionNumbers.get(majorRev) < 4) {<NEW_LINE>return -1;<NEW_LINE>} else if (versionNumbers.get(majorRev) == 4 && versionNumbers.get(minorRev) < 10) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final int _PC_REC_XFER_ALIGN = 0x11;<NEW_LINE>int fsBlockSize = ONative.instance().pathconf(path, _PC_REC_XFER_ALIGN);<NEW_LINE>int pageSize = ONative.instance().getpagesize();<NEW_LINE>fsBlockSize = lcm(fsBlockSize, pageSize);<NEW_LINE>// just being completely paranoid:<NEW_LINE>// (512 is the rule for 2.6+ kernels)<NEW_LINE><MASK><NEW_LINE>if (fsBlockSize <= 0 || ((fsBlockSize & (fsBlockSize - 1)) != 0)) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>return fsBlockSize;<NEW_LINE>}
fsBlockSize = lcm(fsBlockSize, 512);
585,792
@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>public JSONArray initNetwork(@FormDataParam(CoordConsts.SVC_KEY_API_KEY) String apiKey, @FormDataParam(CoordConsts.SVC_KEY_VERSION) String clientVersion, @FormDataParam(CoordConsts.SVC_KEY_NETWORK_NAME) String networkName, @FormDataParam(CoordConsts.SVC_KEY_NETWORK_PREFIX) String networkPrefix) {<NEW_LINE>try {<NEW_LINE>_logger.infof("WMS:initNetwork %s\n", networkPrefix);<NEW_LINE>checkStringParam(apiKey, "API key");<NEW_LINE>checkStringParam(clientVersion, "Client version");<NEW_LINE>if (networkName == null || networkName.equals("")) {<NEW_LINE>checkStringParam(networkPrefix, "Network prefix");<NEW_LINE>}<NEW_LINE>checkApiKeyValidity(apiKey);<NEW_LINE>String outputNetworkName = Main.getWorkMgr().initNetwork(networkName, networkPrefix);<NEW_LINE>_logger.infof("Initialized network:%s using api-key:%s\n", outputNetworkName, apiKey);<NEW_LINE>Main.getAuthorizer().authorizeContainer(apiKey, outputNetworkName);<NEW_LINE>return successResponse(new JSONObject().put(CoordConsts.SVC_KEY_NETWORK_NAME, outputNetworkName).put(CoordConsts.SVC_KEY_CONTAINER_NAME, outputNetworkName));<NEW_LINE>} catch (IllegalArgumentException | AccessControlException e) {<NEW_LINE>_logger.errorf("WMS:initNetwork exception: %s\n", e.getMessage());<NEW_LINE>return failureResponse(e.getMessage());<NEW_LINE>} catch (Exception e) {<NEW_LINE>String <MASK><NEW_LINE>_logger.errorf("WMS:initNetwork exception for apikey:%s in network:%s; exception:%s", apiKey, networkName, stackTrace);<NEW_LINE>return failureResponse(e.getMessage());<NEW_LINE>}<NEW_LINE>}
stackTrace = Throwables.getStackTraceAsString(e);
1,217,354
public static String sendHttpDelete(String url, String user) throws Exception {<NEW_LINE>String resultString = "{}";<NEW_LINE>HttpDelete httpdelete = new HttpDelete(url);<NEW_LINE>logger.info("sendDeleteReq url is: " + url);<NEW_LINE>httpdelete.<MASK><NEW_LINE>httpdelete.addHeader("Token-User", user);<NEW_LINE>httpdelete.addHeader("Token-Code", "WS-AUTH");<NEW_LINE>CookieStore cookieStore = new BasicCookieStore();<NEW_LINE>CloseableHttpClient httpClient = null;<NEW_LINE>CloseableHttpResponse response = null;<NEW_LINE>try {<NEW_LINE>httpClient = HttpClients.custom().setDefaultCookieStore(cookieStore).build();<NEW_LINE>response = httpClient.execute(httpdelete);<NEW_LINE>HttpEntity ent = response.getEntity();<NEW_LINE>resultString = IOUtils.toString(ent.getContent(), "utf-8");<NEW_LINE>logger.info("Send Http Delete Request Success", resultString);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Send Http Delete Request Failed", e);<NEW_LINE>throw e;<NEW_LINE>} finally {<NEW_LINE>IOUtils.closeQuietly(response);<NEW_LINE>IOUtils.closeQuietly(httpClient);<NEW_LINE>}<NEW_LINE>return resultString;<NEW_LINE>}
addHeader(HTTP.CONTENT_ENCODING, "UTF-8");
288,526
protected PeopleCounterAsset createDemoPeopleCounterAsset(String name, Asset<?> area, GeoJSONPoint location, Supplier<AgentLink<?>> agentLinker) {<NEW_LINE>PeopleCounterAsset peopleCounterAsset = new PeopleCounterAsset(name);<NEW_LINE>peopleCounterAsset.setParent(area);<NEW_LINE>peopleCounterAsset.getAttributes().addOrReplace(new Attribute<>(Asset.LOCATION, location));<NEW_LINE>peopleCounterAsset.getAttribute("peopleCountIn").ifPresent(assetAttribute -> {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(RULE_STATE), new MetaItem<>(STORE_DATA_POINTS));<NEW_LINE>if (agentLinker != null) {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(AGENT_LINK, agentLinker.get()));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>peopleCounterAsset.getAttribute("peopleCountOut").ifPresent(assetAttribute -> {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(RULE_STATE), new MetaItem<>(STORE_DATA_POINTS));<NEW_LINE>if (agentLinker != null) {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(AGENT_LINK, agentLinker.get()));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>peopleCounterAsset.getAttribute("peopleCountInMinute").ifPresent(assetAttribute -> {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(RULE_STATE), new MetaItem<>(STORE_DATA_POINTS));<NEW_LINE>if (agentLinker != null) {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(AGENT_LINK, agentLinker.get()));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>peopleCounterAsset.getAttribute("peopleCountOutMinute").ifPresent(assetAttribute -> {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(RULE_STATE), new MetaItem<>(STORE_DATA_POINTS));<NEW_LINE>if (agentLinker != null) {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(AGENT_LINK<MASK><NEW_LINE>}<NEW_LINE>});<NEW_LINE>peopleCounterAsset.getAttribute("peopleCountTotal").ifPresent(assetAttribute -> {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(RULE_STATE), new MetaItem<>(STORE_DATA_POINTS));<NEW_LINE>if (agentLinker != null) {<NEW_LINE>assetAttribute.addMeta(new MetaItem<>(AGENT_LINK, agentLinker.get()));<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return peopleCounterAsset;<NEW_LINE>}
, agentLinker.get()));
1,631,746
private CodegenMethod evaluateGetROCollectionEventsCodegenRewritten(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope) {<NEW_LINE>CodegenExpressionField nodeObject = getNodeObject(codegenClassScope);<NEW_LINE>ExprForgeCodegenSymbol scope = new ExprForgeCodegenSymbol(true, null);<NEW_LINE>CodegenMethod methodNode = codegenMethodScope.makeChildWithScope(EPTypePremade.COLLECTION.getEPType(), ExprDeclaredForgeBase.class, scope, codegenClassScope).addParam(ExprForgeCodegenNames.PARAMS);<NEW_LINE>CodegenExpression refEPS = scope.getAddEPS(methodNode);<NEW_LINE>CodegenExpression refExprEvalCtx = scope.getAddExprEvalCtx(methodNode);<NEW_LINE>// generate code for the inner value so we know its symbols and derived symbols<NEW_LINE>CodegenExpression innerValue = ((ExprEnumerationForge) innerForge).evaluateGetROCollectionEventsCodegen(methodNode, scope, codegenClassScope);<NEW_LINE>CodegenBlock block = methodNode.getBlock();<NEW_LINE>scope.derivedSymbolsCodegen(methodNode, block, codegenClassScope);<NEW_LINE>if (isCache) {<NEW_LINE>block.declareVar(ExpressionResultCacheForDeclaredExprLastColl.EPTYPE, "cache", exprDotMethodChain(refExprEvalCtx).add("getExpressionResultCacheService").add("getAllocateDeclaredExprLastColl")).declareVar(ExpressionResultCacheEntryEventBeanArrayAndCollBean.EPTYPE, "entry", exprDotMethod(ref("cache"), "getDeclaredExpressionLastColl", nodeObject, refEPS)).ifCondition(notEqualsNull(ref("entry"))).blockReturn(exprDotMethod(ref("entry"), "getResult")).declareVar(EPTypePremade.COLLECTION.getEPType(), "result", innerValue).expression(exprDotMethod(ref("cache"), "saveDeclaredExpressionLastColl", nodeObject, <MASK><NEW_LINE>} else {<NEW_LINE>block.declareVar(EPTypePremade.COLLECTION.getEPType(), "result", innerValue);<NEW_LINE>}<NEW_LINE>block.methodReturn(ref("result"));<NEW_LINE>return methodNode;<NEW_LINE>}
refEPS, ref("result")));
334,005
public void completeQueryWithObject(SearchResult sr) {<NEW_LINE>if (sr.object instanceof AbstractPoiType) {<NEW_LINE>SearchHistoryHelper.getInstance(app).addNewItemToHistory((AbstractPoiType) sr.object);<NEW_LINE>reloadHistory();<NEW_LINE>} else if (sr.object instanceof PoiUIFilter) {<NEW_LINE>SearchHistoryHelper.getInstance(app).addNewItemToHistory((PoiUIFilter) sr.object);<NEW_LINE>reloadHistory();<NEW_LINE>}<NEW_LINE>if (sr.object instanceof PoiType && ((PoiType) sr.object).isAdditional()) {<NEW_LINE>PoiType additional = (PoiType) sr.object;<NEW_LINE>AbstractPoiType parent = additional.getParentType();<NEW_LINE>if (parent != null) {<NEW_LINE>PoiUIFilter custom = app.getPoiFilters().getFilterById(PoiUIFilter.STD_PREFIX + parent.getKeyName());<NEW_LINE>if (custom != null) {<NEW_LINE>custom.clearFilter();<NEW_LINE>custom.updateTypesToAccept(parent);<NEW_LINE>custom.setFilterByName(additional.getKeyName().replace('_', ':').toLowerCase());<NEW_LINE>SearchPhrase phrase = searchUICore.getPhrase();<NEW_LINE>sr = new SearchResult(phrase);<NEW_LINE>sr.localeName = custom.getName();<NEW_LINE>sr.object = custom;<NEW_LINE>sr.priority = SEARCH_AMENITY_TYPE_PRIORITY;<NEW_LINE>sr.priorityDistance = 0;<NEW_LINE>sr.objectType = ObjectType.POI_TYPE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>searchUICore.selectSearchResult(sr);<NEW_LINE>if (addressSearch) {<NEW_LINE>startAddressSearch();<NEW_LINE>if (sr.objectType == ObjectType.CITY) {<NEW_LINE>if (sr.relatedObject instanceof BinaryMapIndexReader) {<NEW_LINE>File f = ((BinaryMapIndexReader) sr.relatedObject).getFile();<NEW_LINE>if (f != null) {<NEW_LINE>RegionAddressRepository region = app.getResourceManager().getRegionRepository(f.getName());<NEW_LINE>if (region != null) {<NEW_LINE>City city = (City) sr.object;<NEW_LINE>String lastSearchedRegion = app.getSettings().getLastSearchedRegion();<NEW_LINE>long lastCityId = app.getSettings().getLastSearchedCity();<NEW_LINE>if (!lastSearchedRegion.equals(region.getFileName()) || city.getId() != lastCityId) {<NEW_LINE>app.getSettings().setLastSearchedRegion(region.getFileName(), region.getEstimatedRegionCenter());<NEW_LINE>app.getSettings().setLastSearchedCity(city.getId(), sr.<MASK><NEW_LINE>updateCitiesItems();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String txt = searchUICore.getPhrase().getText(true);<NEW_LINE>replaceQueryWithText(txt);<NEW_LINE>if (sr.objectType == ObjectType.CITY) {<NEW_LINE>openKeyboard();<NEW_LINE>}<NEW_LINE>}
localeName, city.getLocation());
490,226
public void sendKeys(CharSequence... keysToSend) {<NEW_LINE>if (keysToSend == null || keysToSend.length == 0) {<NEW_LINE>throw new IllegalArgumentException("Keys to send should be a not null CharSequence");<NEW_LINE>}<NEW_LINE>for (CharSequence cs : keysToSend) {<NEW_LINE>if (cs == null) {<NEW_LINE>throw new IllegalArgumentException("Keys to send should be a not null CharSequence");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String allKeysToSend = <MASK><NEW_LINE>List<File> files = Arrays.stream(allKeysToSend.split("\n")).map(fileDetector::getLocalFile).collect(Collectors.toList());<NEW_LINE>if (!files.isEmpty() && !files.contains(null)) {<NEW_LINE>allKeysToSend = files.stream().map(this::upload).collect(Collectors.joining("\n"));<NEW_LINE>}<NEW_LINE>execute(DriverCommand.SEND_KEYS_TO_ELEMENT(id, new CharSequence[] { allKeysToSend }));<NEW_LINE>}
String.join("", keysToSend);
1,770,669
public boolean isNotNumberOrChar(AnnotatedTypeMirror type) {<NEW_LINE>TypeMirror serializableTM = elements.getTypeElement(Serializable.class.getCanonicalName()).asType();<NEW_LINE>TypeMirror comparableTM = elements.getTypeElement(Comparable.class.getCanonicalName()).asType();<NEW_LINE>TypeMirror numberTM = elements.getTypeElement(Number.class.<MASK><NEW_LINE>if (type.getKind().isPrimitive()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (type.getKind() == TypeKind.DECLARED || type.getKind() == TypeKind.TYPEVAR || type.getKind() == TypeKind.WILDCARD) {<NEW_LINE>TypeMirror erasedType = types.erasure(type.getUnderlyingType());<NEW_LINE>return !(TypesUtils.isBoxedPrimitive(erasedType) || TypesUtils.isObject(erasedType) || TypesUtils.isErasedSubtype(numberTM, erasedType, types) || TypesUtils.isErasedSubtype(serializableTM, erasedType, types) || TypesUtils.isErasedSubtype(comparableTM, erasedType, types));<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
getCanonicalName()).asType();
709,979
public com.squareup.okhttp.Call cancelTaskCall(String id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v1/tasks/{id}:cancel".replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));<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>if (localVarAccept != null)<NEW_LINE>localVarHeaderParams.put("Accept", localVarAccept);<NEW_LINE>final String[] localVarContentTypes = { "application/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>localVarHeaderParams.put("Content-Type", localVarContentType);<NEW_LINE>if (progressListener != null) {<NEW_LINE>apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {<NEW_LINE>com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());<NEW_LINE>return originalResponse.newBuilder().body(new ProgressResponseBody(originalResponse.body(), progressListener)).build();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);<NEW_LINE>}
String[] localVarAccepts = { "application/json" };
995,692
private boolean executableMatches(Executable executable, ImmutableSet<ExecutableElement> methodsInAutoBuilderType) {<NEW_LINE>// Start with the complete set of parameter names and remove them one by one as we find<NEW_LINE>// corresponding methods. We ignore case, under the assumption that it is unlikely that a case<NEW_LINE>// difference is going to allow a candidate to match when another one is better.<NEW_LINE>// A parameter named foo could be matched by methods like this:<NEW_LINE>// X foo(Y)<NEW_LINE>// X setFoo(Y)<NEW_LINE>// X fooBuilder()<NEW_LINE>// X fooBuilder(Y)<NEW_LINE>// There are further constraints, including on the types X and Y, that will later be imposed by<NEW_LINE>// BuilderMethodClassifier, but here we just require that there be at least one method with<NEW_LINE>// one of these shapes for foo.<NEW_LINE>NavigableSet<String> parameterNames = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);<NEW_LINE>parameterNames.<MASK><NEW_LINE>for (ExecutableElement method : methodsInAutoBuilderType) {<NEW_LINE>String name = method.getSimpleName().toString();<NEW_LINE>if (name.endsWith("Builder")) {<NEW_LINE>String property = name.substring(0, name.length() - "Builder".length());<NEW_LINE>parameterNames.remove(property);<NEW_LINE>}<NEW_LINE>if (method.getParameters().size() == 1) {<NEW_LINE>parameterNames.remove(name);<NEW_LINE>if (name.startsWith("set")) {<NEW_LINE>parameterNames.remove(name.substring(3));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (parameterNames.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
addAll(executable.parameterNames());
441,883
// GEN-LAST:event_tablesDropdownListActionPerformed<NEW_LINE>@NbBundle.Messages({ "SQLiteViewer.csvExport.fileName.empty=Please input a file name for exporting.", "SQLiteViewer.csvExport.title=Export to csv file", "SQLiteViewer.csvExport.confirm.msg=Do you want to overwrite the existing file?" })<NEW_LINE>private void exportCsvButtonActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_exportCsvButtonActionPerformed<NEW_LINE>Case openCase = Case.getCurrentCase();<NEW_LINE>File caseDirectory = new File(openCase.getExportDirectory());<NEW_LINE>JFileChooser fileChooser = chooserHelper.getChooser();<NEW_LINE>fileChooser.setDragEnabled(false);<NEW_LINE>fileChooser.setCurrentDirectory(caseDirectory);<NEW_LINE>// Set a filter to let the filechooser only work for csv files<NEW_LINE>FileNameExtensionFilter csvFilter <MASK><NEW_LINE>fileChooser.addChoosableFileFilter(csvFilter);<NEW_LINE>fileChooser.setAcceptAllFileFilterUsed(true);<NEW_LINE>fileChooser.setFileFilter(csvFilter);<NEW_LINE>fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);<NEW_LINE>String defaultFileName = (String) this.tablesDropdownList.getSelectedItem();<NEW_LINE>fileChooser.setSelectedFile(new File(defaultFileName));<NEW_LINE>// TODO<NEW_LINE>int choice = fileChooser.showSaveDialog((Component) evt.getSource());<NEW_LINE>if (JFileChooser.APPROVE_OPTION == choice) {<NEW_LINE>File file = fileChooser.getSelectedFile();<NEW_LINE>if (file.exists() && FilenameUtils.getExtension(file.getName()).equalsIgnoreCase("csv")) {<NEW_LINE>if (JOptionPane.YES_OPTION == JOptionPane.showConfirmDialog(this, Bundle.SQLiteViewer_csvExport_confirm_msg(), Bundle.SQLiteViewer_csvExport_title(), JOptionPane.YES_NO_OPTION)) {<NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>exportTableToCsv(file);<NEW_LINE>}<NEW_LINE>}
= new FileNameExtensionFilter("*.csv", "csv");
558,971
private void run(final String uri) {<NEW_LINE>JFrame frame = new JFrame("Show Sample XML with Embedded SVG");<NEW_LINE>frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);<NEW_LINE>// RootPanel holds the ReplacedElementFactories. Currently, this factory<NEW_LINE>// is created on each call to layout, so we override the RootPanel method<NEW_LINE>// and return our own--the chained factory delegates first for Swing<NEW_LINE>// replaced element, then for SVG elements.<NEW_LINE>ChainedReplacedElementFactory cef = new ChainedReplacedElementFactory();<NEW_LINE>cef<MASK><NEW_LINE>cef.addFactory(new SVGSalamanderReplacedElementFactory());<NEW_LINE>final XHTMLPanel panel = new XHTMLPanel();<NEW_LINE>panel.getSharedContext().setReplacedElementFactory(cef);<NEW_LINE>FSScrollPane fsp = new FSScrollPane(panel);<NEW_LINE>frame.getContentPane().add(fsp, BorderLayout.CENTER);<NEW_LINE>frame.setSize(1024, 768);<NEW_LINE>frame.setVisible(true);<NEW_LINE>SwingUtilities.invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>XRLog.general("URI is: " + uri);<NEW_LINE>URL url = ShowSVGPage.class.getResource(uri);<NEW_LINE>String urls = url.toExternalForm();<NEW_LINE>XRLog.general("Loading URI: " + urls);<NEW_LINE>panel.setDocument(urls);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
.addFactory(new SwingReplacedElementFactory());
1,215,663
public List<Pair<String, String>> export(Node node, ProgressReporter progressReporter) {<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>final String labelName = (String) node.getProperty(SystemPropertyKeys.label.name());<NEW_LINE>final String property = (String) node.getProperty(SystemPropertyKeys.propertyName.name());<NEW_LINE>map.put("addToSetLabels", node.getProperty(SystemPropertyKeys.addToSetLabel.name(), null));<NEW_LINE>map.put("uuidProperty", property);<NEW_LINE><MASK><NEW_LINE>// add constraint - TODO: might be worth add config to export or not this file<NEW_LINE>String schemaStatement = String.format("CREATE CONSTRAINT IF NOT EXISTS ON (n:%s) ASSERT n.%s IS UNIQUE;\n", labelName, property);<NEW_LINE>final String statement = String.format("CALL apoc.uuid.install('%s', %s);", labelName, uuidConfig);<NEW_LINE>progressReporter.nextRow();<NEW_LINE>return List.of(Pair.of(getFileName(node, Type.Uuid.name() + ".schema"), schemaStatement), Pair.of(getFileName(node, Type.Uuid.name()), statement));<NEW_LINE>}
final String uuidConfig = toCypherMap(map);
942,373
public void testBodyWithQueryParams(String query, User body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'query' is set<NEW_LINE>if (query == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/fake/body-with-query-params";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPair("query", query));<NEW_LINE>final String[] localVarAccepts = {};<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final <MASK><NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);<NEW_LINE>}
String[] localVarContentTypes = { "application/json" };
1,478,670
protected List<BoundQuery> buildQueries(DataFetchingEnvironment environment, StargateGraphqlContext context) throws UnauthorizedException {<NEW_LINE>boolean ifNotExists = environment.containsArgument("ifNotExists") && environment.getArgument("ifNotExists") != null && (Boolean) environment.getArgument("ifNotExists");<NEW_LINE>List<Map<String, Object>> valuesToInsert = environment.getArgument("values");<NEW_LINE>List<BoundQuery> boundQueries = new ArrayList<<MASK><NEW_LINE>for (Map<String, Object> value : valuesToInsert) {<NEW_LINE>BoundQuery query = context.getDataStore().queryBuilder().insertInto(table.keyspace(), table.name()).value(buildInsertValues(value)).ifNotExists(ifNotExists).ttl(getTTL(environment)).build().bind();<NEW_LINE>context.getAuthorizationService().authorizeDataWrite(context.getSubject(), table.keyspace(), table.name(), TypedKeyValue.forDML((BoundDMLQuery) query), Scope.MODIFY, SourceAPI.GRAPHQL);<NEW_LINE>boundQueries.add(query);<NEW_LINE>}<NEW_LINE>return boundQueries;<NEW_LINE>}
>(valuesToInsert.size());
1,161,950
DataFileValue minorCompact(InMemoryMap memTable, TabletFile tmpDatafile, TabletFile newDatafile, long queued, CommitSession commitSession, long flushId, MinorCompactionReason mincReason) {<NEW_LINE>boolean failed = false;<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>timer.incrementStatusMinor();<NEW_LINE>long count = 0;<NEW_LINE>String oldName = Thread.currentThread().getName();<NEW_LINE>try {<NEW_LINE>Thread.currentThread().setName("Minor compacting " + this.extent);<NEW_LINE>CompactionStats stats;<NEW_LINE>Span span = TraceUtil.startSpan(this.getClass(), "minorCompact::write");<NEW_LINE>try (Scope scope = span.makeCurrent()) {<NEW_LINE>count = memTable.getNumEntries();<NEW_LINE>MinorCompactor compactor = new MinorCompactor(tabletServer, this, memTable, tmpDatafile, mincReason, tableConfiguration);<NEW_LINE>stats = compactor.call();<NEW_LINE>} catch (Exception e) {<NEW_LINE>TraceUtil.setException(span, e, true);<NEW_LINE>throw e;<NEW_LINE>} finally {<NEW_LINE>span.end();<NEW_LINE>}<NEW_LINE>Span span2 = TraceUtil.startSpan(this.getClass(), "minorCompact::bringOnline");<NEW_LINE>try (Scope scope = span2.makeCurrent()) {<NEW_LINE>var storedFile = getDatafileManager().bringMinorCompactionOnline(tmpDatafile, newDatafile, new DataFileValue(stats.getFileSize(), stats.getEntriesWritten()), commitSession, flushId);<NEW_LINE>storedFile.ifPresent(stf -> compactable.filesAdded(true, List.of(stf)));<NEW_LINE>} catch (Exception e) {<NEW_LINE>TraceUtil.setException(span2, e, true);<NEW_LINE>throw e;<NEW_LINE>} finally {<NEW_LINE>span2.end();<NEW_LINE>}<NEW_LINE>return new DataFileValue(stats.getFileSize(), stats.getEntriesWritten());<NEW_LINE>} catch (Exception | Error e) {<NEW_LINE>failed = true;<NEW_LINE>throw new RuntimeException("Exception occurred during minor compaction on " + extent, e);<NEW_LINE>} finally {<NEW_LINE>Thread.<MASK><NEW_LINE>try {<NEW_LINE>getTabletMemory().finalizeMinC();<NEW_LINE>} catch (Exception t) {<NEW_LINE>log.error("Failed to free tablet memory on {}", extent, t);<NEW_LINE>}<NEW_LINE>if (!failed) {<NEW_LINE>lastMinorCompactionFinishTime = System.currentTimeMillis();<NEW_LINE>}<NEW_LINE>TabletServerMinCMetrics minCMetrics = getTabletServer().getMinCMetrics();<NEW_LINE>minCMetrics.addActive(lastMinorCompactionFinishTime - start);<NEW_LINE>timer.updateTime(Operation.MINOR, queued, start, count, failed);<NEW_LINE>minCMetrics.addQueued(start - queued);<NEW_LINE>}<NEW_LINE>}
currentThread().setName(oldName);
1,524,430
private AggregationInfo buildAggregationInfo(Function function) {<NEW_LINE>List<Expression> operands = function.getOperands();<NEW_LINE>if (operands == null || operands.isEmpty()) {<NEW_LINE>throw new Pql2CompilationException("Aggregation function expects non null argument");<NEW_LINE>}<NEW_LINE>List<String> args = new ArrayList<<MASK><NEW_LINE>String functionName = function.getOperator();<NEW_LINE>if (functionName.equalsIgnoreCase(AggregationFunctionType.COUNT.getName())) {<NEW_LINE>args = new ArrayList<>(Collections.singletonList("*"));<NEW_LINE>} else {<NEW_LINE>// Need to de-dup columns for distinct.<NEW_LINE>if (functionName.equalsIgnoreCase(AggregationFunctionType.DISTINCT.getName())) {<NEW_LINE>Set<String> expressionSet = new TreeSet<>();<NEW_LINE>for (Expression operand : operands) {<NEW_LINE>String expression = getColumnExpression(operand);<NEW_LINE>if (expressionSet.add(expression)) {<NEW_LINE>args.add(expression);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (Expression operand : operands) {<NEW_LINE>args.add(getColumnExpression(operand));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>AggregationInfo aggregationInfo = new AggregationInfo();<NEW_LINE>aggregationInfo.setAggregationType(functionName);<NEW_LINE>aggregationInfo.setExpressions(args);<NEW_LINE>aggregationInfo.setIsInSelectList(true);<NEW_LINE>// For backward compatibility (new broker - old server), also set the old way.<NEW_LINE>// TODO: remove with a major version change.<NEW_LINE>aggregationInfo.putToAggregationParams(CompilerConstants.COLUMN_KEY_IN_AGGREGATION_INFO, String.join(CompilerConstants.AGGREGATION_FUNCTION_ARG_SEPARATOR, args));<NEW_LINE>return aggregationInfo;<NEW_LINE>}
>(operands.size());
179,013
public void OpenShift_StubbedTests_emptyUserApiToken() throws Exception {<NEW_LINE>// send a flag to the stubbed an OpenShift tokenReviews response<NEW_LINE>String access_token = "badServiceAccountToken";<NEW_LINE>WebClient webClient = getAndSaveWebClient();<NEW_LINE>SocialTestSettings updatedSocialTestSettings = socialSettings.copyTestSettings();<NEW_LINE>updatedSocialTestSettings.setProtectedResource(genericTestServer.getServerHttpsString() + "/helloworld/rest/helloworld_empty_userApiToken");<NEW_LINE>updatedSocialTestSettings.setHeaderName(SocialConstants.BEARER_HEADER);<NEW_LINE>updatedSocialTestSettings.setHeaderValue(cttools.buildBearerTokenCred(access_token));<NEW_LINE>List<validationData> expectations = setErrorPageExpectations(action, SocialConstants.UNAUTHORIZED_STATUS);<NEW_LINE>expectations = vData.addExpectation(expectations, action, SocialConstants.RESPONSE_TITLE, SocialConstants.STRING_CONTAINS, "HTML error page did not contain the expected title. We likely reached a page that we shouldn't have gotten to.", null, SocialConstants.HTTP_ERROR_MESSAGE);<NEW_LINE>expectations = vData.addExpectation(expectations, action, SocialConstants.RESPONSE_FULL, SocialConstants.STRING_CONTAINS, "Response did not contain message indicating that we can't process the response", null, SocialMessageConstants.CWWKS5489E_SOCIAL_LOGIN_FAILED);<NEW_LINE>expectations = validationTools.addMessageExpectation(genericTestServer, expectations, action, SocialConstants.MESSAGES_LOG, SocialConstants.<MASK><NEW_LINE>expectations = validationTools.addMessageExpectation(genericTestServer, expectations, action, SocialConstants.MESSAGES_LOG, SocialConstants.STRING_CONTAINS, "Message log did not contain message indicating that we could not authenticate the user", SocialMessageConstants.CWWKS5452E_NOTAUTH_DUE_TO_MISSING_CLAIMS);<NEW_LINE>expectations = validationTools.addMessageExpectation(genericTestServer, expectations, action, SocialConstants.MESSAGES_LOG, SocialConstants.STRING_CONTAINS, "Should have received an error processing the response", SocialMessageConstants.CWWKS5371E_OPENSHIFT_USER_API_RESPONSE_BAD);<NEW_LINE>expectations = validationTools.addMessageExpectation(genericTestServer, expectations, action, SocialConstants.MESSAGES_LOG, SocialConstants.STRING_MATCHES, "Should have received an error processing the response", SocialMessageConstants.CWWKS5373E_OPENSHIFT_UNEXPECTED_RESPONSE_CODE + ".*403");<NEW_LINE>genericSocial(_testName, webClient, SocialConstants.INVOKE_SOCIAL_RESOURCE_ONLY, updatedSocialTestSettings, expectations);<NEW_LINE>}
STRING_CONTAINS, "Message log did not contain message indicating that we could not get user info", SocialMessageConstants.CWWKS5461E_ERROR_GETTING_USERINFO);
1,050,948
JSONObject dumpJSON(boolean verbose) throws JSONException {<NEW_LINE>synchronized (mLock) {<NEW_LINE>JSONArray nonPrimaryList = new JSONArray();<NEW_LINE>JSONArray acquiredList = new JSONArray();<NEW_LINE>JSONArray waiters = new JSONArray();<NEW_LINE>JSONObject o = new JSONObject().put("path", mConfiguration.path).put("open", mIsOpen).put("maxConn", mMaxConnectionPoolSize).put("availablePrimary", mAvailablePrimaryConnection == null ? null : null).put("availableNonPrimary", nonPrimaryList).put("acquired", acquiredList<MASK><NEW_LINE>for (SQLiteConnection conn : mAvailableNonPrimaryConnections) {<NEW_LINE>nonPrimaryList.put(conn.dumpJSON(verbose));<NEW_LINE>}<NEW_LINE>for (Map.Entry<SQLiteConnection, AcquiredConnectionStatus> entry : mAcquiredConnections.entrySet()) {<NEW_LINE>acquiredList.put(entry.getKey().dumpJSON(verbose).put("status", entry.getValue().toString()));<NEW_LINE>}<NEW_LINE>for (ConnectionWaiter w = mConnectionWaiterQueue; w != null; w = w.mNext) {<NEW_LINE>final long now = SystemClock.uptimeMillis();<NEW_LINE>waiters.put(new JSONObject().put("duration", now - w.mStartTime).put("thread", w.mThread.toString()).put("priority", w.mPriority).put("sql", w.mSql));<NEW_LINE>}<NEW_LINE>return o;<NEW_LINE>}<NEW_LINE>}
).put("waiters", waiters);
1,020,619
public final void onApplicationEvent(RepositoryEvent event) {<NEW_LINE>Class<?> srcType = event.getSource().getClass();<NEW_LINE>if (null != INTERESTED_TYPE && !INTERESTED_TYPE.isAssignableFrom(srcType)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (event instanceof BeforeSaveEvent) {<NEW_LINE>onBeforeSave((T) event.getSource());<NEW_LINE>} else if (event instanceof BeforeCreateEvent) {<NEW_LINE>onBeforeCreate((T) event.getSource());<NEW_LINE>} else if (event instanceof AfterCreateEvent) {<NEW_LINE>onAfterCreate((<MASK><NEW_LINE>} else if (event instanceof AfterSaveEvent) {<NEW_LINE>onAfterSave((T) event.getSource());<NEW_LINE>} else if (event instanceof BeforeLinkSaveEvent) {<NEW_LINE>onBeforeLinkSave((T) event.getSource(), ((BeforeLinkSaveEvent) event).getLinked());<NEW_LINE>} else if (event instanceof AfterLinkSaveEvent) {<NEW_LINE>onAfterLinkSave((T) event.getSource(), ((AfterLinkSaveEvent) event).getLinked());<NEW_LINE>} else if (event instanceof BeforeLinkDeleteEvent) {<NEW_LINE>onBeforeLinkDelete((T) event.getSource(), ((BeforeLinkDeleteEvent) event).getLinked());<NEW_LINE>} else if (event instanceof AfterLinkDeleteEvent) {<NEW_LINE>onAfterLinkDelete((T) event.getSource(), ((AfterLinkDeleteEvent) event).getLinked());<NEW_LINE>} else if (event instanceof BeforeDeleteEvent) {<NEW_LINE>onBeforeDelete((T) event.getSource());<NEW_LINE>} else if (event instanceof AfterDeleteEvent) {<NEW_LINE>onAfterDelete((T) event.getSource());<NEW_LINE>}<NEW_LINE>}
T) event.getSource());
1,294,742
/*<NEW_LINE>* Collects configuration properties for Kubernetes. Reads all properties and<NEW_LINE>* matches properties that match known Dekorate generators. These properties may<NEW_LINE>* or may not be prefixed with `quarkus.` though the prefixed ones take<NEW_LINE>* precedence.<NEW_LINE>*<NEW_LINE>* @return A map containing the properties.<NEW_LINE>*/<NEW_LINE>public static Map<String, Object> toMap(PlatformConfiguration... platformConfigurations) {<NEW_LINE>Config config = ConfigProvider.getConfig();<NEW_LINE>Map<String, Object> result = new HashMap<>();<NEW_LINE>// Most of quarkus prefixed properties are handled directly by the config items (KubernetesConfig, OpenshiftConfig, KnativeConfig)<NEW_LINE>// We just need group, name & version parsed here, as we don't have decorators for these (low level properties).<NEW_LINE>Map<String, Object> quarkusPrefixed = new HashMap<>();<NEW_LINE>Arrays.stream(platformConfigurations).forEach(p -> {<NEW_LINE>p.getPartOf().ifPresent(g -> quarkusPrefixed.put(DEKORATE_PREFIX + p.getConfigName<MASK><NEW_LINE>p.getName().ifPresent(n -> quarkusPrefixed.put(DEKORATE_PREFIX + p.getConfigName() + ".name", n));<NEW_LINE>p.getVersion().ifPresent(v -> quarkusPrefixed.put(DEKORATE_PREFIX + p.getConfigName() + ".version", v));<NEW_LINE>});<NEW_LINE>Map<String, Object> unPrefixed = StreamSupport.stream(config.getPropertyNames().spliterator(), false).filter(k -> ALLOWED_GENERATORS.contains(generatorName(k))).filter(k -> config.getOptionalValue(k, String.class).isPresent()).collect(Collectors.toMap(k -> DEKORATE_PREFIX + k, k -> config.getValue(k, String.class)));<NEW_LINE>for (String generator : ALLOWED_GENERATORS) {<NEW_LINE>String oldKey = DEKORATE_PREFIX + generator + ".group";<NEW_LINE>String newKey = DEKORATE_PREFIX + generator + ".part-of";<NEW_LINE>if (unPrefixed.containsKey(oldKey)) {<NEW_LINE>unPrefixed.put(newKey, unPrefixed.get(oldKey));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>handleExpose(config, unPrefixed, platformConfigurations);<NEW_LINE>result.putAll(unPrefixed);<NEW_LINE>result.putAll(quarkusPrefixed);<NEW_LINE>result.putAll(toS2iProperties(quarkusPrefixed));<NEW_LINE>return result;<NEW_LINE>}
() + ".part-of", g));
504,695
private Executable storeValue() {<NEW_LINE>return connection -> {<NEW_LINE>int maxColumnSize = table.getMaxColumnSize();<NEW_LINE>if (maxColumnSize == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Integer tableID = query(tableID());<NEW_LINE>List<Object[]<MASK><NEW_LINE>Integer oldRowCount = query(currentRowCount(tableID));<NEW_LINE>int newRowCount = rows.size();<NEW_LINE>if (oldRowCount < newRowCount) {<NEW_LINE>updateRows(tableID, oldRowCount, rows);<NEW_LINE>insertNewRows(tableID, oldRowCount, rows);<NEW_LINE>} else if (oldRowCount == newRowCount) {<NEW_LINE>// No need to delete or insert rows<NEW_LINE>updateRows(tableID, oldRowCount, rows);<NEW_LINE>} else {<NEW_LINE>// oldRowCount > newRowCount<NEW_LINE>updateRows(tableID, newRowCount, rows);<NEW_LINE>deleteOldRows(tableID, newRowCount);<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>};<NEW_LINE>}
> rows = table.getRows();
534,633
public void search(final String text, final boolean isCaseSensitive, final boolean isRegularExpression) {<NEW_LINE>if (selectedProject == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (fFilenameSearchMode) {<NEW_LINE>clearFilter();<NEW_LINE>try {<NEW_LINE>final Pattern pattern = search.createSearchPattern();<NEW_LINE>search.getTextControl().setForeground(search.getDisplay().getSystemColor(SWT.COLOR_BLACK));<NEW_LINE>filenameFilter = new PathFilter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected boolean match(String string) {<NEW_LINE>if (pattern == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return pattern.<MASK><NEW_LINE>}<NEW_LINE><NEW_LINE>public String getPattern() {<NEW_LINE>// This is what we display in the "filtering for ..." label<NEW_LINE>return text;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>// We need some way to tell the job that uses the filter that this is the one to apply versus creating<NEW_LINE>// one for the hover<NEW_LINE>filterViaSearch = true;<NEW_LINE>setFilter(selectedProject);<NEW_LINE>} catch (PatternSyntaxException e) {<NEW_LINE>// TODO Show some UI popup or something to say regexp is bad?<NEW_LINE>search.getTextControl().setForeground(search.getDisplay().getSystemColor(SWT.COLOR_RED));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>super.search(text, isCaseSensitive, isRegularExpression);<NEW_LINE>}<NEW_LINE>}
matcher(string).find();
1,532,765
private static boolean isUnionCompatible(final DruidRel<?> first, final DruidRel<?> second, @Nullable PlannerContext plannerContext) {<NEW_LINE>final Optional<List<String>> <MASK><NEW_LINE>final Optional<List<String>> secondColumnNames = getColumnNamesIfTableOrUnion(second, plannerContext);<NEW_LINE>if (!firstColumnNames.isPresent() || !secondColumnNames.isPresent()) {<NEW_LINE>// No need to set the planning error here<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!firstColumnNames.equals(secondColumnNames)) {<NEW_LINE>if (null != plannerContext) {<NEW_LINE>plannerContext.setPlanningError("SQL requires union between two tables and column names queried for " + "each table are different Left: %s, Right: %s.", firstColumnNames.orElse(Collections.emptyList()), secondColumnNames.orElse(Collections.emptyList()));<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
firstColumnNames = getColumnNamesIfTableOrUnion(first, plannerContext);
459,505
protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>SubMonitor sub = SubMonitor.convert(monitor, 1000);<NEW_LINE>if (sub.isCanceled()) {<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>GitRepository currentRepo = commit.repository();<NEW_LINE>currentRepo.enterWriteProcess();<NEW_LINE>try {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>ILaunch launch = Launcher.launch(currentRepo, sub.newChild(100), "cherry-pick", commit.sha());<NEW_LINE>if (launch.getProcesses() == null || launch.getProcesses().length < 1) {<NEW_LINE>// If something went wrong and there's no process (like unsaved files and user cancelled<NEW_LINE>// dialog)<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}<NEW_LINE>IProcess process = launch.getProcesses()[0];<NEW_LINE>while (!launch.isTerminated()) {<NEW_LINE>Thread.sleep(1);<NEW_LINE>if (sub.isCanceled()) {<NEW_LINE>launch.terminate();<NEW_LINE>return Status.CANCEL_STATUS;<NEW_LINE>}<NEW_LINE>sub.worked(1);<NEW_LINE>}<NEW_LINE>int exitValue = process.getExitValue();<NEW_LINE>if (exitValue != 0) {<NEW_LINE>String msg = // $NON-NLS-1$<NEW_LINE>MessageFormat.// $NON-NLS-1$<NEW_LINE>format(// $NON-NLS-1$<NEW_LINE>"cherry-pick {0} returned non-zero exit value. wd: {1}", // $NON-NLS-1$<NEW_LINE>commit.sha(<MASK><NEW_LINE>IdeLog.logWarning(GitUIPlugin.getDefault(), msg);<NEW_LINE>}<NEW_LINE>commit.refreshAffectedFiles();<NEW_LINE>} catch (CoreException e) {<NEW_LINE>return e.getStatus();<NEW_LINE>} catch (Throwable e) {<NEW_LINE>return new Status(IStatus.ERROR, GitUIPlugin.getPluginId(), e.getMessage(), e);<NEW_LINE>} finally {<NEW_LINE>currentRepo.exitWriteProcess();<NEW_LINE>}<NEW_LINE>sub.done();<NEW_LINE>return Status.OK_STATUS;<NEW_LINE>}
), currentRepo.workingDirectory());
927,923
public BufferedImage readFrame(int frameIndex) throws IOException {<NEW_LINE>if (iis == null)<NEW_LINE>iis = new FileImageInputStream(file);<NEW_LINE>if (decompressor != null)<NEW_LINE>return decompressFrame(iis, frameIndex);<NEW_LINE>iis.setByteOrder(pixeldata.bigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN);<NEW_LINE>iis.seek(pixeldata.offset() + frameLength * frameIndex);<NEW_LINE>DataBuffer db = bi<MASK><NEW_LINE>switch(db.getDataType()) {<NEW_LINE>case DataBuffer.TYPE_BYTE:<NEW_LINE>byte[][] data = ((DataBufferByte) db).getBankData();<NEW_LINE>for (byte[] bs : data) iis.readFully(bs);<NEW_LINE>if (pixeldata.bigEndian() && pixeldataVR.vr == VR.OW)<NEW_LINE>ByteUtils.swapShorts(data);<NEW_LINE>break;<NEW_LINE>case DataBuffer.TYPE_USHORT:<NEW_LINE>readFully(((DataBufferUShort) db).getData());<NEW_LINE>break;<NEW_LINE>case DataBuffer.TYPE_SHORT:<NEW_LINE>readFully(((DataBufferShort) db).getData());<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>throw new UnsupportedOperationException("Unsupported Datatype: " + db.getDataType());<NEW_LINE>}<NEW_LINE>return bi;<NEW_LINE>}
.getRaster().getDataBuffer();
496,826
public static DescribeDcdnDomainOriginTrafficDataResponse unmarshall(DescribeDcdnDomainOriginTrafficDataResponse describeDcdnDomainOriginTrafficDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnDomainOriginTrafficDataResponse.setRequestId(_ctx.stringValue("DescribeDcdnDomainOriginTrafficDataResponse.RequestId"));<NEW_LINE>describeDcdnDomainOriginTrafficDataResponse.setDomainName(_ctx.stringValue("DescribeDcdnDomainOriginTrafficDataResponse.DomainName"));<NEW_LINE>describeDcdnDomainOriginTrafficDataResponse.setStartTime(_ctx.stringValue("DescribeDcdnDomainOriginTrafficDataResponse.StartTime"));<NEW_LINE>describeDcdnDomainOriginTrafficDataResponse.setEndTime(_ctx.stringValue("DescribeDcdnDomainOriginTrafficDataResponse.EndTime"));<NEW_LINE>describeDcdnDomainOriginTrafficDataResponse.setDataInterval(_ctx.stringValue("DescribeDcdnDomainOriginTrafficDataResponse.DataInterval"));<NEW_LINE>List<DataModule> originTrafficDataPerInterval = new ArrayList<DataModule>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeDcdnDomainOriginTrafficDataResponse.OriginTrafficDataPerInterval.Length"); i++) {<NEW_LINE>DataModule dataModule = new DataModule();<NEW_LINE>dataModule.setTimeStamp(_ctx.stringValue("DescribeDcdnDomainOriginTrafficDataResponse.OriginTrafficDataPerInterval[" + i + "].TimeStamp"));<NEW_LINE>dataModule.setOriginTraffic(_ctx.floatValue<MASK><NEW_LINE>dataModule.setDynamicHttpOriginTraffic(_ctx.floatValue("DescribeDcdnDomainOriginTrafficDataResponse.OriginTrafficDataPerInterval[" + i + "].DynamicHttpOriginTraffic"));<NEW_LINE>dataModule.setDynamicHttpsOriginTraffic(_ctx.floatValue("DescribeDcdnDomainOriginTrafficDataResponse.OriginTrafficDataPerInterval[" + i + "].DynamicHttpsOriginTraffic"));<NEW_LINE>dataModule.setStaticHttpOriginTraffic(_ctx.floatValue("DescribeDcdnDomainOriginTrafficDataResponse.OriginTrafficDataPerInterval[" + i + "].StaticHttpOriginTraffic"));<NEW_LINE>dataModule.setStaticHttpsOriginTraffic(_ctx.floatValue("DescribeDcdnDomainOriginTrafficDataResponse.OriginTrafficDataPerInterval[" + i + "].StaticHttpsOriginTraffic"));<NEW_LINE>originTrafficDataPerInterval.add(dataModule);<NEW_LINE>}<NEW_LINE>describeDcdnDomainOriginTrafficDataResponse.setOriginTrafficDataPerInterval(originTrafficDataPerInterval);<NEW_LINE>return describeDcdnDomainOriginTrafficDataResponse;<NEW_LINE>}
("DescribeDcdnDomainOriginTrafficDataResponse.OriginTrafficDataPerInterval[" + i + "].OriginTraffic"));
799,230
private final void showResult(ActionEvent event, String result) {<NEW_LINE>EscapeDialog messageDialog = new // $NON-NLS-1$<NEW_LINE>EscapeDialog(// $NON-NLS-1$<NEW_LINE>getParentFrame(event), // $NON-NLS-1$<NEW_LINE>JMeterUtils.getResString("export_transactions_title"), false);<NEW_LINE>Container contentPane = messageDialog.getContentPane();<NEW_LINE>contentPane<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>contentPane.// $NON-NLS-1$<NEW_LINE>add(// $NON-NLS-1$<NEW_LINE>new JLabel(JMeterUtils.getResString("export_transactions_exported_property"), SwingConstants.CENTER), BorderLayout.NORTH);<NEW_LINE>JSyntaxTextArea syntaxTextArea = JSyntaxTextArea.getInstance(10, 80, true);<NEW_LINE>syntaxTextArea.setText(result);<NEW_LINE>syntaxTextArea.setCaretPosition(0);<NEW_LINE>contentPane.add(JTextScrollPane.getInstance(syntaxTextArea), BorderLayout.CENTER);<NEW_LINE>messageDialog.pack();<NEW_LINE>ComponentUtil.centerComponentInComponent(GuiPackage.getInstance().getMainFrame(), messageDialog);<NEW_LINE>SwingUtilities.invokeLater(() -> messageDialog.setVisible(true));<NEW_LINE>}
.setLayout(new BorderLayout());
968,201
public void onInboundNext(ChannelHandlerContext ctx, Object frame) {<NEW_LINE>if (frame instanceof CloseWebSocketFrame && ((CloseWebSocketFrame) frame).isFinalFragment()) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug(format<MASK><NEW_LINE>}<NEW_LINE>CloseWebSocketFrame closeFrame = new CloseWebSocketFrame(true, ((CloseWebSocketFrame) frame).rsv(), ((CloseWebSocketFrame) frame).content());<NEW_LINE>if (closeFrame.statusCode() != -1) {<NEW_LINE>// terminate() will invoke onInboundComplete()<NEW_LINE>sendCloseNow(closeFrame, f -> terminate());<NEW_LINE>} else {<NEW_LINE>// terminate() will invoke onInboundComplete()<NEW_LINE>sendCloseNow(closeFrame, WebSocketCloseStatus.EMPTY, f -> terminate());<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!this.proxyPing && frame instanceof PingWebSocketFrame) {<NEW_LINE>// "FutureReturnValueIgnored" this is deliberate<NEW_LINE>ctx.writeAndFlush(new PongWebSocketFrame(((PingWebSocketFrame) frame).content()));<NEW_LINE>ctx.read();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (frame != LastHttpContent.EMPTY_LAST_CONTENT) {<NEW_LINE>super.onInboundNext(ctx, frame);<NEW_LINE>}<NEW_LINE>}
(channel(), "CloseWebSocketFrame detected. Closing Websocket"));
1,242,841
private void checkInfo(Info info, Entry entry, Collection<? extends Entry> entries, java.util.Map<Entry, Info> map) {<NEW_LINE>if (info == null) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("Error in ").append(getClass().getName()).append(" with entry ").append(entry).append(" from among entries:");<NEW_LINE>for (Entry e : entries) {<NEW_LINE>sb.append("\n ").append(e).append(" contained: ").append(map.containsKey(e));<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>sb.append("\nprobably caused by faulty key implementation. The key hashCode() and equals() methods must behave as for an IMMUTABLE object" + " and the hashCode() must return the same value for equals() keys.");<NEW_LINE>sb.append("\nmapping:");<NEW_LINE>for (Map.Entry<Entry, Info> ei : map.entrySet()) {<NEW_LINE>sb.append("\n ").append(ei.getKey()).append(" => ").<MASK><NEW_LINE>}<NEW_LINE>throw new IllegalStateException(sb.toString());<NEW_LINE>}<NEW_LINE>}
append(ei.getValue());
1,823,384
protected Item parseItem(final Element rssRoot, final Element eItem, final Locale locale) {<NEW_LINE>final Item item = super.parseItem(rssRoot, eItem, locale);<NEW_LINE>final Element description = eItem.<MASK><NEW_LINE>if (description != null) {<NEW_LINE>item.setDescription(parseItemDescription(rssRoot, description));<NEW_LINE>}<NEW_LINE>final Element pubDate = eItem.getChild("pubDate", getRSSNamespace());<NEW_LINE>if (pubDate != null) {<NEW_LINE>item.setPubDate(DateParser.parseDate(pubDate.getText(), locale));<NEW_LINE>}<NEW_LINE>final Element encoded = eItem.getChild("encoded", getContentNamespace());<NEW_LINE>if (encoded != null) {<NEW_LINE>final Content content = new Content();<NEW_LINE>content.setType(Content.HTML);<NEW_LINE>content.setValue(encoded.getText());<NEW_LINE>item.setContent(content);<NEW_LINE>}<NEW_LINE>return item;<NEW_LINE>}
getChild("description", getRSSNamespace());
332,330
public void installFixes(Collection<String> fixes, String userId, String password) throws InstallException {<NEW_LINE>fireProgressEvent(InstallProgressEvent.CHECK, 1, Messages.INSTALL_KERNEL_MESSAGES.getLogMessage("STATE_CHECKING"));<NEW_LINE>List<String> fixesToInstall = new ArrayList<String>(fixes.size());<NEW_LINE>for (String fix : fixes) {<NEW_LINE>fixesToInstall.add(fix);<NEW_LINE>}<NEW_LINE>RepositoryConnectionList loginInfo = getResolveDirector().getRepositoryConnectionList(null, userId, password, this.getClass().getCanonicalName() + ".installFixes");<NEW_LINE>Resolver resolver = new Resolver(loginInfo);<NEW_LINE>List<IfixResource> ifixResources = resolver.resolveFixResources(fixesToInstall);<NEW_LINE>if (ifixResources.isEmpty())<NEW_LINE>throw ExceptionUtils.createByKey("ERROR_FAILED_TO_RESOLVE_IFIX", InstallUtils.getFeatureListOutput(fixes));<NEW_LINE>ArrayList<InstallAsset> installAssets = new ArrayList<InstallAsset>();<NEW_LINE>int progress = 10;<NEW_LINE>int interval = 40 / ifixResources.size();<NEW_LINE>for (IfixResource fix : ifixResources) {<NEW_LINE>fireProgressEvent(InstallProgressEvent.DOWNLOAD, progress, "STATE_DOWNLOADING", fix);<NEW_LINE>progress += interval;<NEW_LINE>File d;<NEW_LINE>try {<NEW_LINE>d = InstallUtils.download(this.product.getInstallTempDir(), fix);<NEW_LINE>} catch (InstallException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw ExceptionUtils.createByKey(e, "ERROR_FAILED_TO_DOWNLOAD_IFIX", fix.getName(), this.product.getInstallTempDir().getAbsolutePath());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>installAssets.add(new FixAsset(fix.getName<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw ExceptionUtils.createByKey(e, "ERROR_INVALID_IFIX", fix.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.installAssets = new ArrayList<List<InstallAsset>>(1);<NEW_LINE>this.installAssets.add(installAssets);<NEW_LINE>}
(), d, true));
1,835,664
protected MessageExtBrokerInner buildInnerMsg(final ChannelHandlerContext ctx, final SendMessageRequestHeader requestHeader, final byte[] body, TopicConfig topicConfig) {<NEW_LINE>int queueIdInt = requestHeader.getQueueId();<NEW_LINE>if (queueIdInt < 0) {<NEW_LINE>queueIdInt = ThreadLocalRandom.current().nextInt(99999999) % topicConfig.getWriteQueueNums();<NEW_LINE>}<NEW_LINE>int sysFlag = requestHeader.getSysFlag();<NEW_LINE>if (TopicFilterType.MULTI_TAG == topicConfig.getTopicFilterType()) {<NEW_LINE>sysFlag |= MessageSysFlag.MULTI_TAGS_FLAG;<NEW_LINE>}<NEW_LINE>MessageExtBrokerInner msgInner = new MessageExtBrokerInner();<NEW_LINE>msgInner.setTopic(requestHeader.getTopic());<NEW_LINE>msgInner.setBody(body);<NEW_LINE>msgInner.setFlag(requestHeader.getFlag());<NEW_LINE>MessageAccessor.setProperties(msgInner, MessageDecoder.string2messageProperties(requestHeader.getProperties()));<NEW_LINE>msgInner.setPropertiesString(requestHeader.getProperties());<NEW_LINE>msgInner.setTagsCode(MessageExtBrokerInner.tagsString2tagsCode(topicConfig.getTopicFilterType(), msgInner.getTags()));<NEW_LINE>msgInner.setQueueId(queueIdInt);<NEW_LINE>msgInner.setSysFlag(sysFlag);<NEW_LINE>msgInner.setBornTimestamp(requestHeader.getBornTimestamp());<NEW_LINE>msgInner.setBornHost(ctx.<MASK><NEW_LINE>msgInner.setStoreHost(this.getStoreHost());<NEW_LINE>msgInner.setReconsumeTimes(requestHeader.getReconsumeTimes() == null ? 0 : requestHeader.getReconsumeTimes());<NEW_LINE>return msgInner;<NEW_LINE>}
channel().remoteAddress());
1,735,826
public boolean hasObjectsForRegion(Class<? extends PathObject> cls, ImageRegion region, boolean includeSubclasses) {<NEW_LINE>ensureCacheConstructed();<NEW_LINE>var envelope = region == null ? MAX_ENVELOPE : getEnvelope(region);<NEW_LINE>int z = region == null ? <MASK><NEW_LINE>int t = region == null ? -1 : region.getT();<NEW_LINE>r.lock();<NEW_LINE>try {<NEW_LINE>// Iterate through all the classes, getting objects of the specified class or subclasses thereof<NEW_LINE>for (Entry<Class<? extends PathObject>, SpatialIndex> entry : map.entrySet()) {<NEW_LINE>if (cls == null || cls.isInstance(entry.getKey()) || (includeSubclasses && cls.isAssignableFrom(entry.getKey()))) {<NEW_LINE>if (entry.getValue() != null) {<NEW_LINE>var list = (List<PathObject>) entry.getValue().query(envelope);<NEW_LINE>for (var pathObject : list) {<NEW_LINE>var roi = pathObject.getROI();<NEW_LINE>if (roi == null)<NEW_LINE>continue;<NEW_LINE>if (region == null)<NEW_LINE>return true;<NEW_LINE>if (roi.getZ() != z || roi.getT() != t)<NEW_LINE>continue;<NEW_LINE>if (region.intersects(roi.getBoundsX(), roi.getBoundsY(), roi.getBoundsWidth(), roi.getBoundsHeight())) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// if (list.stream().anyMatch(p -> p.hasROI() &&<NEW_LINE>// (region == null || (p.getROI().getZ() == z && p.getROI().getT() == t))))<NEW_LINE>// return true;<NEW_LINE>// if (entry.getValue().hasObjectsForRegion(region))<NEW_LINE>// return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>} finally {<NEW_LINE>r.unlock();<NEW_LINE>}<NEW_LINE>}
-1 : region.getZ();
342,031
public boolean remove(Object key, Object value) {<NEW_LINE>checkTransactionState();<NEW_LINE>checkNotNull(key, "key can't be null");<NEW_LINE>checkNotNull(value, "value can't be null");<NEW_LINE>Data keyData = mapServiceContext.toData(key, partitionStrategy);<NEW_LINE>TxnValueWrapper <MASK><NEW_LINE>// wrapper is null which means this entry is not touched by transaction<NEW_LINE>if (wrapper == null) {<NEW_LINE>NearCachingHook invalidationHook = newNearCachingHook();<NEW_LINE>invalidationHook.beforeRemoteCall(key, keyData, null, null);<NEW_LINE>boolean removed = removeIfSameInternal(keyData, value, invalidationHook);<NEW_LINE>if (removed) {<NEW_LINE>txMap.put(keyData, new TxnValueWrapper(value, Type.REMOVED));<NEW_LINE>}<NEW_LINE>return removed;<NEW_LINE>}<NEW_LINE>// wrapper type is REMOVED which means entry is already removed inside the transaction<NEW_LINE>if (wrapper.type == Type.REMOVED) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// wrapper value is not equal to passed value<NEW_LINE>if (!isEquals(wrapper.value, value)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>NearCachingHook invalidationHook = newNearCachingHook();<NEW_LINE>invalidationHook.beforeRemoteCall(key, keyData, null, null);<NEW_LINE>// wrapper value is equal to passed value, we call removeInternal just to add delete log<NEW_LINE>removeInternal(keyData, invalidationHook);<NEW_LINE>txMap.put(keyData, new TxnValueWrapper(value, Type.REMOVED));<NEW_LINE>return true;<NEW_LINE>}
wrapper = txMap.get(keyData);
551,156
public CreateEmailIdentityResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateEmailIdentityResult createEmailIdentityResult = new CreateEmailIdentityResult();<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 createEmailIdentityResult;<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("IdentityType", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createEmailIdentityResult.setIdentityType(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("VerifiedForSendingStatus", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createEmailIdentityResult.setVerifiedForSendingStatus(context.getUnmarshaller(Boolean.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("DkimAttributes", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>createEmailIdentityResult.setDkimAttributes(DkimAttributesJsonUnmarshaller.getInstance<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return createEmailIdentityResult;<NEW_LINE>}
().unmarshall(context));
363,941
public static ParamListResponse unmarshall(ParamListResponse paramListResponse, UnmarshallerContext _ctx) {<NEW_LINE>paramListResponse.setRequestId(_ctx.stringValue("ParamListResponse.RequestId"));<NEW_LINE>paramListResponse.setErrorCode(_ctx.stringValue("ParamListResponse.ErrorCode"));<NEW_LINE>paramListResponse.setErrorDesc(_ctx.stringValue("ParamListResponse.ErrorDesc"));<NEW_LINE>paramListResponse.setSuccess(_ctx.booleanValue("ParamListResponse.Success"));<NEW_LINE>paramListResponse.setTraceId(_ctx.stringValue("ParamListResponse.TraceId"));<NEW_LINE>paramListResponse.setExStack(_ctx.stringValue("ParamListResponse.ExStack"));<NEW_LINE>List<DataItem> data <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ParamListResponse.Data.Length"); i++) {<NEW_LINE>DataItem dataItem = new DataItem();<NEW_LINE>dataItem.setPlatformType(_ctx.longValue("ParamListResponse.Data[" + i + "].PlatformType"));<NEW_LINE>dataItem.setPlatformId(_ctx.stringValue("ParamListResponse.Data[" + i + "].PlatformId"));<NEW_LINE>dataItem.setPlatformName(_ctx.stringValue("ParamListResponse.Data[" + i + "].PlatformName"));<NEW_LINE>data.add(dataItem);<NEW_LINE>}<NEW_LINE>paramListResponse.setData(data);<NEW_LINE>return paramListResponse;<NEW_LINE>}
= new ArrayList<DataItem>();
526,784
private Map<String, Object> initAttributes(KeycloakSession session, RealmModel realm, Theme theme, Locale locale, int statusCode) throws IOException {<NEW_LINE>Map<String, Object> attributes = new HashMap<>();<NEW_LINE>Properties messagesBundle = theme.getMessages(locale);<NEW_LINE>attributes.put("statusCode", statusCode);<NEW_LINE>attributes.put("realm", realm);<NEW_LINE>attributes.put("url", new UrlBean(realm, theme, session.getContext().getUri().getBaseUri(), null));<NEW_LINE>attributes.put("locale", new LocaleBean(realm, locale, session.getContext().getUri().getBaseUriBuilder(), messagesBundle));<NEW_LINE>String errorKey = statusCode == 404 ? Messages.PAGE_NOT_FOUND : Messages.INTERNAL_SERVER_ERROR;<NEW_LINE>String errorMessage = messagesBundle.getProperty(errorKey);<NEW_LINE>attributes.put("message", new MessageBean(errorMessage, MessageType.ERROR));<NEW_LINE>try {<NEW_LINE>attributes.put("msg", new MessageFormatterMethod(locale, theme.getMessages(locale)));<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>attributes.put(<MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>return attributes;<NEW_LINE>}
"properties", theme.getProperties());
1,344,059
public void reportMismatches(List<Class<?>> classes) {<NEW_LINE>if (Boolean.getBoolean("enginehub.disable.class.source.validation")) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<Class<?>, CodeSource> mismatches = findMismatches(classes);<NEW_LINE>if (mismatches.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>StringBuilder builder = new StringBuilder("\n");<NEW_LINE>builder.append(SEPARATOR_LINE).append("\n");<NEW_LINE>builder.append("** /!\\ SEVERE WARNING /!\\\n");<NEW_LINE>builder.append("** \n");<NEW_LINE>builder.append("** A plugin developer has included a portion of \n");<NEW_LINE>builder.append("** ").append(plugin.getName()).append(" into their own plugin, so rather than using\n");<NEW_LINE>builder.append("** the version of ").append(plugin.getName()).append(" that you downloaded, you\n");<NEW_LINE>builder.append("** will be using a broken mix of old ").append(plugin.getName()).append(" (that came\n");<NEW_LINE>builder.append("** with the plugin) and your downloaded version. THIS MAY\n");<NEW_LINE>builder.append("** SEVERELY BREAK ").append(plugin.getName().toUpperCase(Locale.<MASK><NEW_LINE>builder.append("**\n");<NEW_LINE>builder.append("** This may have happened because the developer is using\n");<NEW_LINE>builder.append("** the ").append(plugin.getName()).append(" API and thinks that including\n");<NEW_LINE>builder.append("** ").append(plugin.getName()).append(" is necessary. However, it is not!\n");<NEW_LINE>builder.append("**\n");<NEW_LINE>builder.append("** Here are some files that have been overridden:\n");<NEW_LINE>builder.append("** \n");<NEW_LINE>for (Map.Entry<Class<?>, CodeSource> entry : mismatches.entrySet()) {<NEW_LINE>CodeSource codeSource = entry.getValue();<NEW_LINE>String url = codeSource != null ? codeSource.getLocation().toExternalForm() : "(unknown)";<NEW_LINE>builder.append("** '").append(entry.getKey().getSimpleName()).append("' came from '").append(url).append("'\n");<NEW_LINE>}<NEW_LINE>builder.append("**\n");<NEW_LINE>builder.append("** Please report this to the plugins' developers.\n");<NEW_LINE>builder.append(SEPARATOR_LINE).append("\n");<NEW_LINE>LOGGER.error(builder.toString());<NEW_LINE>}
ROOT)).append(" AND ALL OF ITS FEATURES.\n");
541,466
private void maybeReportBepTransports(PositionAwareAnsiTerminalWriter terminalWriter) throws IOException {<NEW_LINE>if (!buildComplete || bepOpenTransports.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Duration waitTime = Duration.between(buildCompleteAt, Instant.ofEpochMilli(clock.currentTimeMillis()));<NEW_LINE>if (waitTime.getSeconds() == 0) {<NEW_LINE>// Special case for when bazel was interrupted, in which case we don't want to have<NEW_LINE>// a BEP upload message.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int count = bepOpenTransports.size();<NEW_LINE>// Can just use targetWidth, because we always write to a new line<NEW_LINE>int maxWidth = targetWidth;<NEW_LINE>String waitMessage = "Waiting for build events upload: ";<NEW_LINE>String name = bepOpenTransports.iterator().next().name();<NEW_LINE>String line = waitMessage + name + " " <MASK><NEW_LINE>if (count == 1 && line.length() <= maxWidth) {<NEW_LINE>terminalWriter.newline().append(line);<NEW_LINE>} else if (count == 1) {<NEW_LINE>waitMessage = "Waiting for: ";<NEW_LINE>String waitSecs = " " + waitTime.getSeconds() + "s";<NEW_LINE>int maxNameWidth = maxWidth - waitMessage.length() - waitSecs.length();<NEW_LINE>terminalWriter.newline().append(waitMessage + shortenedString(name, maxNameWidth) + waitSecs);<NEW_LINE>} else {<NEW_LINE>terminalWriter.newline().append(waitMessage + waitTime.getSeconds() + "s");<NEW_LINE>for (BuildEventTransport transport : bepOpenTransports) {<NEW_LINE>name = " " + transport.name();<NEW_LINE>terminalWriter.newline().append(shortenedString(name, maxWidth));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
+ waitTime.getSeconds() + "s";
1,201,399
protected void process(Env env, Map<Option, String[]> maps) throws CommandException {<NEW_LINE>String[] <MASK><NEW_LINE>if (pids != null && pids.length == 1) {<NEW_LINE>try {<NEW_LINE>int pid = Integer.valueOf(pids[0]);<NEW_LINE>new ApplicationFinder(pid) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void found(Application application) {<NEW_LINE>ThreadDumpSupport.getInstance().takeThreadDump(application, true);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void notFound(int pid, String id) {<NEW_LINE>NotifyDescriptor desc = new NotifyDescriptor.Message(NbBundle.getMessage(ThreadDumpArgument.class, "MSG_NO_APP_PID", new Object[] { Integer.toString(pid) }), NotifyDescriptor.WARNING_MESSAGE);<NEW_LINE>DialogDisplayer.getDefault().notifyLater(desc);<NEW_LINE>}<NEW_LINE>}.find();<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>// NOI18N<NEW_LINE>throw new CommandException(0, "Incorrect pid format for --" + LONG_NAME + ": " + e.getMessage());<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// NOI18N<NEW_LINE>throw new CommandException(0, "--" + LONG_NAME + " requires exactly one value");<NEW_LINE>}<NEW_LINE>}
pids = maps.get(ARGUMENT);
1,824,428
private void processLeaveType(MHRLeaveType leaveType) {<NEW_LINE>String durationType = TNAUtil.getDurationUnitFromFrequencyType(leaveType.getFrequencyType());<NEW_LINE>// Create<NEW_LINE>if (Util.isEmpty(durationType)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (durationType.equals(TimeUtil.DURATIONUNIT_Hour)) {<NEW_LINE>durationType = TimeUtil.DURATIONUNIT_Day;<NEW_LINE>}<NEW_LINE>BigDecimal leaveDuration = leaveType.getLeaveDurationTime();<NEW_LINE>if (leaveDuration == null || leaveDuration.compareTo(Env.ZERO) <= 0) {<NEW_LINE>leaveDuration = Env.ONE;<NEW_LINE>}<NEW_LINE>List<MHRLeaveAssign> leaveAssigList = new Query(getCtx(), I_HR_LeaveAssign.Table_Name, "HR_LeaveType_ID = ? " + "AND ValidFrom <= ? " + "AND (ValidTo >= ? OR ValidTo IS NULL) " + "AND (DateLastRun < ? OR DateLastRun IS NULL)", get_TrxName()).setParameters(leaveType.getHR_LeaveType_ID(), getDateDoc(), getDateDoc(), getDateDoc()).setClient_ID().setOnlyActiveRecords(true).<MHRLeaveAssign>list();<NEW_LINE>for (MHRLeaveAssign assignedLeave : leaveAssigList) {<NEW_LINE><MASK><NEW_LINE>if (dateLastRun == null) {<NEW_LINE>dateLastRun = assignedLeave.getValidFrom();<NEW_LINE>}<NEW_LINE>dateLastRun = TimeUtil.getDay(dateLastRun);<NEW_LINE>// Validate<NEW_LINE>Timestamp validationDate = TimeUtil.addDuration(dateLastRun, durationType, leaveDuration);<NEW_LINE>if (!TimeUtil.isSameDay(validationDate, getDateDoc())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Increase valid from<NEW_LINE>MHRLeave leave = new MHRLeave(getCtx(), 0, get_TrxName());<NEW_LINE>leave.setHR_LeaveType_ID(leaveType.getHR_LeaveType_ID());<NEW_LINE>leave.setHR_LeaveAssign_ID(assignedLeave.getHR_LeaveAssign_ID());<NEW_LINE>leave.setHR_LeaveReason_ID(getLeaveReasonId());<NEW_LINE>leave.setDateDoc(getDateDoc());<NEW_LINE>leave.setC_BPartner_ID(assignedLeave.getC_BPartner_ID());<NEW_LINE>// Save<NEW_LINE>leave.saveEx();<NEW_LINE>// Process<NEW_LINE>if (!leave.processIt(MHRLeave.DOCACTION_Prepare)) {<NEW_LINE>throw new AdempiereException(leave.getProcessMsg());<NEW_LINE>}<NEW_LINE>leave.saveEx();<NEW_LINE>addLog("@HR_Leave_ID@ " + leave.getDocumentNo() + " @DateDoc@: " + DisplayType.getDateFormat(DisplayType.Date).format(leave.getDateDoc()));<NEW_LINE>assignedLeave.setDateLastRun(leave.getEndDate());<NEW_LINE>assignedLeave.saveEx();<NEW_LINE>created++;<NEW_LINE>}<NEW_LINE>}
Timestamp dateLastRun = assignedLeave.getDateLastRun();
1,303,603
/*<NEW_LINE>* @see com.ibm.ws.channel.ssl.internal.SSLHandshakeCompletedCallback#complete(javax.net.ssl.SSLEngineResult)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void complete(SSLEngineResult sslResult) {<NEW_LINE>// Release buffers used in the handshake.<NEW_LINE>netBuffer.release();<NEW_LINE>netBuffer = null;<NEW_LINE>decryptedNetBuffer.release();<NEW_LINE>decryptedNetBuffer = null;<NEW_LINE>if (sslResult.getHandshakeStatus() != HandshakeStatus.FINISHED) {<NEW_LINE>// Invalid return code from SSL handshake<NEW_LINE>IOException e = new IOException("Unable to complete SSLhandshake");<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.<MASK><NEW_LINE>}<NEW_LINE>FFDCFilter.processException(e, getClass().getName(), "245", this);<NEW_LINE>callback.error(getConnLink().getVirtualConnection(), writeContext, e);<NEW_LINE>} else {<NEW_LINE>VirtualConnection vc = encryptAndWriteAsync(numBytes, false, timeout);<NEW_LINE>if (vc != null) {<NEW_LINE>callback.complete(vc, writeContext);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
debug(tc, "Unable to complete SSLhandshake, " + e);
1,322,459
public static boolean addMenu(final SearchSubsResultBase result, Menu menu) {<NEW_LINE>final byte[] hash = result.getHash();<NEW_LINE>if (hash != null) {<NEW_LINE>MenuItem item = new MenuItem(menu, SWT.PUSH);<NEW_LINE>item.setText(MessageText.getString("searchsubs.menu.google.hash"));<NEW_LINE>item.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>String s = ByteFormatter.encodeString(hash);<NEW_LINE>String URL = "https://google.com/search?q=" + UrlUtils.encode(s);<NEW_LINE>launchURL(URL);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>MenuItem item = new MenuItem(menu, SWT.PUSH);<NEW_LINE>item.setText(MessageText.getString("searchsubs.menu.gis"));<NEW_LINE>item.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>String s = result.getName();<NEW_LINE>s = s.replaceAll("[-_]", " ");<NEW_LINE>String URL = "http://images.google.com/images?q=" + UrlUtils.encode(s);<NEW_LINE>launchURL(URL);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>item = new MenuItem(menu, SWT.PUSH);<NEW_LINE>item.setText(MessageText.getString("searchsubs.menu.google"));<NEW_LINE>item.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>String s = result.getName();<NEW_LINE>s = s.replaceAll("[-_]", " ");<NEW_LINE>String URL = "https://google.com/search?q=" + UrlUtils.encode(s);<NEW_LINE>launchURL(URL);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>item = new <MASK><NEW_LINE>item.setText(MessageText.getString("searchsubs.menu.bis"));<NEW_LINE>item.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(SelectionEvent e) {<NEW_LINE>String s = result.getName();<NEW_LINE>s = s.replaceAll("[-_]", " ");<NEW_LINE>String URL = "http://www.bing.com/images/search?q=" + UrlUtils.encode(s);<NEW_LINE>launchURL(URL);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return (true);<NEW_LINE>}
MenuItem(menu, SWT.PUSH);
67,161
public void initialize(T image, int x0, int y0, int x1, int y1) {<NEW_LINE>if (imagePyramid == null || imagePyramid.getInputWidth() != image.width || imagePyramid.getInputHeight() != image.height) {<NEW_LINE>int minSize = (config.trackerFeatureRadius * 2 + 1) * 5;<NEW_LINE>ConfigDiscreteLevels configLevels = ConfigDiscreteLevels.minSize(minSize);<NEW_LINE>imagePyramid = FactoryPyramid.discreteGaussian(configLevels, -1, 1, true, image.getImageType());<NEW_LINE>}<NEW_LINE>imagePyramid.process(image);<NEW_LINE>reacquiring = false;<NEW_LINE>targetRegion.setTo(x0, y0, x1, y1);<NEW_LINE>createCascadeRegion(image.width, image.height);<NEW_LINE>template.reset();<NEW_LINE>fern.reset();<NEW_LINE>tracking.initialize(imagePyramid);<NEW_LINE>variance.setImage(image);<NEW_LINE>template.setImage(image);<NEW_LINE>fern.setImage(image);<NEW_LINE>adjustRegion.init(<MASK><NEW_LINE>learning.initialLearning(targetRegion, cascadeRegions);<NEW_LINE>strongMatch = true;<NEW_LINE>previousTrackArea = targetRegion.area();<NEW_LINE>}
image.width, image.height);
1,162,355
public double[] kg(T x, T y) {<NEW_LINE>double[] kg1 = k1.kg(x, y);<NEW_LINE>double[] kg2 = <MASK><NEW_LINE>double[] kg = new double[kg1.length + kg2.length - 1];<NEW_LINE>double k1 = kg1[0];<NEW_LINE>double k2 = kg2[0];<NEW_LINE>kg[0] = k1 + k2;<NEW_LINE>int n1 = kg1.length;<NEW_LINE>for (int i = 1; i < n1; i++) {<NEW_LINE>kg[i] = kg1[i] * k2;<NEW_LINE>}<NEW_LINE>int n2 = kg2.length;<NEW_LINE>for (int i = 1; i < n2; i++) {<NEW_LINE>kg[n1 + i - 1] = kg2[i] * k1;<NEW_LINE>}<NEW_LINE>return kg;<NEW_LINE>}
k2.kg(x, y);
1,519,772
static AssertionError makeComparisonFailure(ImmutableList<String> messages, ImmutableList<Fact> facts, String expected, String actual, @Nullable Throwable cause) {<NEW_LINE>Class<?> comparisonFailureClass;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (LinkageError | ClassNotFoundException probablyJunitNotOnClasspath) {<NEW_LINE>return new AssertionErrorWithFacts(messages, facts, cause);<NEW_LINE>}<NEW_LINE>Class<? extends AssertionError> asAssertionErrorSubclass = comparisonFailureClass.asSubclass(AssertionError.class);<NEW_LINE>Constructor<? extends AssertionError> constructor;<NEW_LINE>try {<NEW_LINE>constructor = asAssertionErrorSubclass.getDeclaredConstructor(ImmutableList.class, ImmutableList.class, String.class, String.class, Throwable.class);<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>// That constructor exists.<NEW_LINE>throw newLinkageError(e);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return constructor.newInstance(messages, facts, expected, actual, cause);<NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>throwIfUnchecked(e.getCause());<NEW_LINE>// That constructor has no `throws` clause.<NEW_LINE>throw newLinkageError(e);<NEW_LINE>} catch (InstantiationException e) {<NEW_LINE>// The class is a concrete class.<NEW_LINE>throw newLinkageError(e);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>// We're accessing a class from within its package.<NEW_LINE>throw newLinkageError(e);<NEW_LINE>}<NEW_LINE>}
comparisonFailureClass = Class.forName("com.google.common.truth.ComparisonFailureWithFacts");
1,123,426
public long spill(long numBytes) throws IOException {<NEW_LINE>synchronized (this) {<NEW_LINE>if (!destructive || dataPages.size() == 1) {<NEW_LINE>return 0L;<NEW_LINE>}<NEW_LINE>long released = 0L;<NEW_LINE>while (dataPages.size() > 0) {<NEW_LINE>MemoryBlock block = dataPages.getLast();<NEW_LINE>// The currentPage is used, cannot be released<NEW_LINE>if (block == currentPage) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>Object base = block.getBaseObject();<NEW_LINE><MASK><NEW_LINE>int numRecords = Platform.getInt(base, offset);<NEW_LINE>offset += 4;<NEW_LINE>final UnsafeSorterSpillWriter writer = new UnsafeSorterSpillWriter(blockManager, 32 * 1024, numRecords);<NEW_LINE>while (numRecords > 0) {<NEW_LINE>int length = Platform.getInt(base, offset);<NEW_LINE>writer.write(base, offset + 4, length, 0);<NEW_LINE>offset += 4 + length + 8;<NEW_LINE>numRecords--;<NEW_LINE>}<NEW_LINE>writer.close();<NEW_LINE>spillWriters.add(writer);<NEW_LINE>dataPages.removeLast();<NEW_LINE>released += block.size();<NEW_LINE>freePage(block);<NEW_LINE>if (released >= numBytes) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return released;<NEW_LINE>}<NEW_LINE>}
long offset = block.getBaseOffset();
1,424,242
private Mono<PagedResponse<ClusterInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)).<PagedResponse<ClusterInner>>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext(<MASK><NEW_LINE>}
)).readOnly()));
654,623
final DeleteConditionalForwarderResult executeDeleteConditionalForwarder(DeleteConditionalForwarderRequest deleteConditionalForwarderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteConditionalForwarderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteConditionalForwarderRequest> request = null;<NEW_LINE>Response<DeleteConditionalForwarderResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteConditionalForwarderRequestProtocolMarshaller(protocolFactory).marshall<MASK><NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Directory Service");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteConditionalForwarder");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteConditionalForwarderResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteConditionalForwarderResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
(super.beforeMarshalling(deleteConditionalForwarderRequest));
613,988
public void actionPerformed(ActionEvent evt, JTextComponent target) {<NEW_LINE>try {<NEW_LINE>boolean toggled = false;<NEW_LINE>BaseDocument doc = <MASK><NEW_LINE>// inside scriptlet<NEW_LINE>int startPos = org.netbeans.editor.Utilities.getRowStart(doc, target.getSelectionStart());<NEW_LINE>TokenHierarchy th = TokenHierarchy.create(target.getText(), JspTokenId.language());<NEW_LINE>List<TokenSequence> ets = th.embeddedTokenSequences(startPos, false);<NEW_LINE>if (!ets.isEmpty() && ets.get(ets.size() - 1).languagePath().mimePath().endsWith("text/x-java")) {<NEW_LINE>// NOI18N<NEW_LINE>super.actionPerformed(evt, target);<NEW_LINE>toggled = true;<NEW_LINE>}<NEW_LINE>// inside one line scriptlet<NEW_LINE>if (!toggled) {<NEW_LINE>List<TokenSequence> ets2 = th.embeddedTokenSequences(target.getCaretPosition(), false);<NEW_LINE>if (// NOI18N<NEW_LINE>!ets.isEmpty() && ets.get(ets.size() - 1).languagePath().mimePath().endsWith("text/html") && !ets2.isEmpty() && ets2.get(ets2.size() - 1).languagePath().mimePath().endsWith("text/x-java")) {<NEW_LINE>// NOI18N<NEW_LINE>commentUncomment(th, evt, target);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// try common comment<NEW_LINE>if (!toggled) {<NEW_LINE>(new ToggleBlockCommentAction()).actionPerformed(evt, target);<NEW_LINE>}<NEW_LINE>} catch (BadLocationException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}
(BaseDocument) target.getDocument();
239,574
private void createImplicitTestFixturesDependencies(Project project, JavaPluginExtension extension) {<NEW_LINE>DependencyHandler dependencies = project.getDependencies();<NEW_LINE>dependencies.add(TEST_FIXTURES_API, dependencies.create(project));<NEW_LINE>SourceSet testSourceSet = findTestSourceSet(extension);<NEW_LINE>ProjectDependency testDependency = (ProjectDependency) dependencies.add(testSourceSet.getImplementationConfigurationName(), dependencies.create(project));<NEW_LINE>testDependency.capabilities(new ProjectTestFixtures(project));<NEW_LINE>// Overwrite what the Java plugin defines for test, in order to avoid duplicate classes<NEW_LINE>// see gradle/gradle#10872<NEW_LINE><MASK><NEW_LINE>testSourceSet.setCompileClasspath(project.getObjects().fileCollection().from(configurations.getByName(TEST_COMPILE_CLASSPATH_CONFIGURATION_NAME)));<NEW_LINE>testSourceSet.setRuntimeClasspath(project.getObjects().fileCollection().from(testSourceSet.getOutput(), configurations.getByName(TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME)));<NEW_LINE>}
ConfigurationContainer configurations = project.getConfigurations();
1,004,803
public void afterPropertiesSet() {<NEW_LINE>Map<String, GlobalOpenApiCustomizer> globalOpenApiCustomizerMap = applicationContext.getBeansOfType(GlobalOpenApiCustomizer.class);<NEW_LINE>Map<String, GlobalOperationCustomizer> globalOperationCustomizerMap = applicationContext.getBeansOfType(GlobalOperationCustomizer.class);<NEW_LINE>Map<String, GlobalOpenApiMethodFilter> globalOpenApiMethodFilterMap = <MASK><NEW_LINE>this.groupedOpenApis.forEach(groupedOpenApi -> groupedOpenApi.addAllOpenApiCustomizer(globalOpenApiCustomizerMap.values()).addAllOperationCustomizer(globalOperationCustomizerMap.values()).addAllOpenApiMethodFilter(globalOpenApiMethodFilterMap.values()));<NEW_LINE>this.groupedOpenApiResources = groupedOpenApis.stream().collect(Collectors.toMap(GroupedOpenApi::getGroup, item -> {<NEW_LINE>GroupConfig groupConfig = new GroupConfig(item.getGroup(), item.getPathsToMatch(), item.getPackagesToScan(), item.getPackagesToExclude(), item.getPathsToExclude(), item.getProducesToMatch(), item.getConsumesToMatch(), item.getHeadersToMatch(), item.getDisplayName());<NEW_LINE>springDocConfigProperties.addGroupConfig(groupConfig);<NEW_LINE>return buildWebFluxOpenApiResource(item);<NEW_LINE>}));<NEW_LINE>}
applicationContext.getBeansOfType(GlobalOpenApiMethodFilter.class);
414,957
public static PdfFunction type0(PdfWriter writer, float[] domain, float[] range, int[] size, int bitsPerSample, int order, float[] encode, float[] decode, byte[] stream) {<NEW_LINE>PdfFunction func = new PdfFunction(writer);<NEW_LINE>func.dictionary = new PdfStream(stream);<NEW_LINE>((PdfStream) func.dictionary).<MASK><NEW_LINE>func.dictionary.put(PdfName.FUNCTIONTYPE, new PdfNumber(0));<NEW_LINE>func.dictionary.put(PdfName.DOMAIN, new PdfArray(domain));<NEW_LINE>func.dictionary.put(PdfName.RANGE, new PdfArray(range));<NEW_LINE>func.dictionary.put(PdfName.SIZE, new PdfArray(size));<NEW_LINE>func.dictionary.put(PdfName.BITSPERSAMPLE, new PdfNumber(bitsPerSample));<NEW_LINE>if (order != 1)<NEW_LINE>func.dictionary.put(PdfName.ORDER, new PdfNumber(order));<NEW_LINE>if (encode != null)<NEW_LINE>func.dictionary.put(PdfName.ENCODE, new PdfArray(encode));<NEW_LINE>if (decode != null)<NEW_LINE>func.dictionary.put(PdfName.DECODE, new PdfArray(decode));<NEW_LINE>return func;<NEW_LINE>}
flateCompress(writer.getCompressionLevel());
369,245
public Builder mergeFrom(io.kubernetes.client.proto.V1beta1Extensions.DaemonSetList other) {<NEW_LINE>if (other == io.kubernetes.client.proto.V1beta1Extensions.DaemonSetList.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasMetadata()) {<NEW_LINE>mergeMetadata(other.getMetadata());<NEW_LINE>}<NEW_LINE>if (itemsBuilder_ == null) {<NEW_LINE>if (!other.items_.isEmpty()) {<NEW_LINE>if (items_.isEmpty()) {<NEW_LINE>items_ = other.items_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>} else {<NEW_LINE>ensureItemsIsMutable();<NEW_LINE>items_.addAll(other.items_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.items_.isEmpty()) {<NEW_LINE>if (itemsBuilder_.isEmpty()) {<NEW_LINE>itemsBuilder_.dispose();<NEW_LINE>itemsBuilder_ = null;<NEW_LINE>items_ = other.items_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>itemsBuilder_ = com.google.protobuf.GeneratedMessageV3<MASK><NEW_LINE>} else {<NEW_LINE>itemsBuilder_.addAllMessages(other.items_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
.alwaysUseFieldBuilders ? getItemsFieldBuilder() : null;
1,517,872
private void processNodeActionsIfReady(@Nonnull final DefaultMutableTreeNode node) {<NEW_LINE>assertIsDispatchThread();<NEW_LINE>if (isNodeBeingBuilt(node))<NEW_LINE>return;<NEW_LINE>NodeDescriptor descriptor = getDescriptorFrom(node);<NEW_LINE>if (descriptor == null)<NEW_LINE>return;<NEW_LINE>if (isYeildingNow()) {<NEW_LINE>myPendingNodeActions.add(node);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Object element = getElementFromDescriptor(descriptor);<NEW_LINE>boolean childrenReady = !isLoadedInBackground(element) && !isUpdatingChildrenNow(node);<NEW_LINE>processActions(node, element, <MASK><NEW_LINE>if (childrenReady) {<NEW_LINE>processActions(node, element, myNodeChildrenActions, null);<NEW_LINE>}<NEW_LINE>warnMap("myNodeActions: processNodeActionsIfReady: ", myNodeActions);<NEW_LINE>warnMap("myNodeChildrenActions: processNodeActionsIfReady: ", myNodeChildrenActions);<NEW_LINE>if (!isUpdatingParent(node) && !isWorkerBusy()) {<NEW_LINE>final UpdaterTreeState state = myUpdaterState;<NEW_LINE>if (myNodeActions.isEmpty() && state != null && !state.isProcessingNow()) {<NEW_LINE>if (canInitiateNewActivity()) {<NEW_LINE>if (!state.restore(childrenReady ? node : null)) {<NEW_LINE>setUpdaterState(state);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>maybeReady();<NEW_LINE>}
myNodeActions, childrenReady ? myNodeChildrenActions : null);
800,034
private List<Map<String, Integer>> crossedToken(final Zone zone, final Token tokenInContext, final Token target, final String pathString) {<NEW_LINE>JsonElement json = null;<NEW_LINE>json = JSONMacroFunctions.getInstance().asJsonElement(pathString);<NEW_LINE>ArrayList<Map<String, Integer>> pathPoints = new ArrayList<Map<String, Integer>>();<NEW_LINE>if (json != null && json.isJsonArray()) {<NEW_LINE>for (JsonElement ele : json.getAsJsonArray()) {<NEW_LINE>JsonObject jobj = ele.getAsJsonObject();<NEW_LINE>Map<String, Integer> point = new HashMap<String, Integer>();<NEW_LINE>point.put("x", jobj.get("x").getAsInt());<NEW_LINE>point.put("y", jobj.get<MASK><NEW_LINE>pathPoints.add(point);<NEW_LINE>}<NEW_LINE>return getInstance().crossedToken(zone, tokenInContext, target, pathPoints);<NEW_LINE>}<NEW_LINE>return pathPoints;<NEW_LINE>}
("y").getAsInt());
782,573
final ListSpeakersResult executeListSpeakers(ListSpeakersRequest listSpeakersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSpeakersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListSpeakersRequest> request = null;<NEW_LINE>Response<ListSpeakersResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListSpeakersRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listSpeakersRequest));<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, "Voice ID");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListSpeakers");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListSpeakersResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListSpeakersResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
435,304
public void findDatafeedsByJobIds(Collection<String> jobIds, ActionListener<Map<String, DatafeedConfig.Builder>> listener) {<NEW_LINE>SearchRequest searchRequest = client.prepareSearch(MlConfigIndex.indexName()).setIndicesOptions(IndicesOptions.lenientExpandOpen()).setSource(new SearchSourceBuilder().query(buildDatafeedJobIdsQuery(jobIds)).size(jobIds.size())).request();<NEW_LINE>executeAsyncWithOrigin(client.threadPool().getThreadContext(), ML_ORIGIN, searchRequest, ActionListener.<SearchResponse>wrap(response -> {<NEW_LINE>Map<String, DatafeedConfig.Builder> datafeedsByJobId = new HashMap<>();<NEW_LINE>// There cannot be more than one datafeed per job<NEW_LINE>assert response.getHits().getTotalHits().value <= jobIds.size();<NEW_LINE>SearchHit[] hits = response.getHits().getHits();<NEW_LINE>for (SearchHit hit : hits) {<NEW_LINE>DatafeedConfig.Builder builder = <MASK><NEW_LINE>datafeedsByJobId.put(builder.getJobId(), builder);<NEW_LINE>}<NEW_LINE>listener.onResponse(datafeedsByJobId);<NEW_LINE>}, listener::onFailure), client::search);<NEW_LINE>}
parseLenientlyFromSource(hit.getSourceRef());
1,385,921
public void testAsyncInvoker_postReceiveTimeout(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>ClientBuilder cb = ClientBuilder.newBuilder();<NEW_LINE>cb.property("com.ibm.ws.jaxrs.client.receive.timeout", TIMEOUT);<NEW_LINE>Client c = cb.build();<NEW_LINE>WebTarget t = c.target("http://" + serverIP + ":" + serverPort + "/bookstore/bookstore2/post/" + SLEEP);<NEW_LINE>Builder builder = t.request();<NEW_LINE><MASK><NEW_LINE>Future<Response> future = asyncInvoker.post(Entity.xml(Long.toString(SLEEP)));<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE>Response response = future.get();<NEW_LINE>// Did not time out as expected<NEW_LINE>ret.append(response.readEntity(String.class));<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>ret.append("InterruptedException");<NEW_LINE>e.printStackTrace();<NEW_LINE>} catch (ExecutionException e) {<NEW_LINE>if (e.getCause().toString().contains("ProcessingException")) {<NEW_LINE>ret.append("Timeout as expected");<NEW_LINE>} else {<NEW_LINE>ret.append("ExecutionException");<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long elapsed = System.currentTimeMillis() - startTime;<NEW_LINE>System.out.println("testAsyncInvoker_postReceiveTimeout with TIMEOUT " + TIMEOUT + " future.get elapsed time " + elapsed);<NEW_LINE>c.close();<NEW_LINE>}
AsyncInvoker asyncInvoker = builder.async();
1,401,288
private boolean decommission(ServerConfiguration conf, DecommissionFlags flags) throws BKException, InterruptedException, IOException {<NEW_LINE>ClientConfiguration adminConf = new ClientConfiguration(conf);<NEW_LINE>BookKeeperAdmin admin = new BookKeeperAdmin(adminConf);<NEW_LINE>try {<NEW_LINE>final String remoteBookieidToDecommission = flags.remoteBookieIdToDecommission;<NEW_LINE>final BookieId bookieAddressToDecommission = (StringUtils.isBlank(remoteBookieidToDecommission) ? BookieImpl.getBookieId(conf) : BookieId.parse(remoteBookieidToDecommission));<NEW_LINE>admin.decommissionBookie(bookieAddressToDecommission);<NEW_LINE>LOG.info("The ledgers stored in the given decommissioning bookie: {} are properly replicated", bookieAddressToDecommission);<NEW_LINE>runFunctionWithRegistrationManager(conf, rm -> {<NEW_LINE>try {<NEW_LINE>Versioned<Cookie> cookie = Cookie.readFromRegistrationManager(rm, bookieAddressToDecommission);<NEW_LINE>cookie.getValue().deleteFromRegistrationManager(rm, bookieAddressToDecommission, cookie.getVersion());<NEW_LINE>} catch (BookieException.CookieNotFoundException nne) {<NEW_LINE>LOG.<MASK><NEW_LINE>} catch (BookieException be) {<NEW_LINE>throw new UncheckedExecutionException(be.getMessage(), be);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>LOG.info("Cookie of the decommissioned bookie: {} is deleted successfully", bookieAddressToDecommission);<NEW_LINE>return true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Received exception in DecommissionBookieCmd ", e);<NEW_LINE>return false;<NEW_LINE>} finally {<NEW_LINE>if (admin != null) {<NEW_LINE>admin.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
warn("No cookie to remove for the decommissioning bookie: {}, it could be deleted already", bookieAddressToDecommission, nne);
673,403
public void createCertificateIssuerCodeSnippets() {<NEW_LINE>CertificateClient certificateClient = getCertificateClient();<NEW_LINE>// BEGIN: com.azure.security.keyvault.certificates.CertificateClient.createIssuer#CertificateIssuer<NEW_LINE>CertificateIssuer issuerToCreate = new CertificateIssuer("myissuer", "myProvider").setAccountId("testAccount").setAdministratorContacts(Collections.singletonList(new AdministratorContact().setFirstName("test").setLastName("name").setEmail("test@example.com")));<NEW_LINE>CertificateIssuer <MASK><NEW_LINE>System.out.printf("Created Issuer with name %s provider %s%n", returnedIssuer.getName(), returnedIssuer.getProvider());<NEW_LINE>// END: com.azure.security.keyvault.certificates.CertificateClient.createIssuer#CertificateIssuer<NEW_LINE>// BEGIN: com.azure.security.keyvault.certificates.CertificateClient.createIssuerWithResponse#CertificateIssuer-Context<NEW_LINE>CertificateIssuer issuer = new CertificateIssuer("issuerName", "myProvider").setAccountId("testAccount").setAdministratorContacts(Collections.singletonList(new AdministratorContact().setFirstName("test").setLastName("name").setEmail("test@example.com")));<NEW_LINE>Response<CertificateIssuer> issuerResponse = certificateClient.createIssuerWithResponse(issuer, new Context(key1, value1));<NEW_LINE>System.out.printf("Created Issuer with name %s provider %s%n", issuerResponse.getValue().getName(), issuerResponse.getValue().getProvider());<NEW_LINE>// END: com.azure.security.keyvault.certificates.CertificateClient.createIssuerWithResponse#CertificateIssuer-Context<NEW_LINE>}
returnedIssuer = certificateClient.createIssuer(issuerToCreate);
1,795,836
private void addKeyboardListener(final WXEditText host) {<NEW_LINE>if (host == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Context context = host.getContext();<NEW_LINE>if (context != null && context instanceof Activity) {<NEW_LINE>SoftKeyboardDetector.registerKeyboardEventListener((Activity) context, new SoftKeyboardDetector.OnKeyboardEventListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onKeyboardEvent(boolean isShown) {<NEW_LINE>if (mListeningKeyboard) {<NEW_LINE>Map<String, Object> event = new HashMap<>(1);<NEW_LINE>event.put("isShow", isShown);<NEW_LINE>if (isShown) {<NEW_LINE>Rect r = new Rect();<NEW_LINE>((Activity) context).getWindow().getDecorView().getWindowVisibleDisplayFrame(r);<NEW_LINE>float keyboardSize = WXViewUtils.getWebPxByWidth(WXViewUtils.getScreenHeight(context) - (r.bottom - r.top), <MASK><NEW_LINE>event.put("keyboardSize", keyboardSize);<NEW_LINE>}<NEW_LINE>fireEvent(Constants.Event.KEYBOARD, event);<NEW_LINE>}<NEW_LINE>if (!isShown) {<NEW_LINE>blur();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
getInstance().getInstanceViewPortWidth());
21,303
public void run(RegressionEnvironment env) {<NEW_LINE>final long startTime = 1000;<NEW_LINE>sendTimer(env, startTime);<NEW_LINE>SupportMarketDataBean[] events = get100Events();<NEW_LINE>String epl = "@name('s0') select irstream sum(price) as sumPrice from SupportMarketDataBean#time_accum(10 sec)";<NEW_LINE>env.compileDeployAddListenerMileZero(epl, "s0");<NEW_LINE>// 1st event<NEW_LINE>sendTimer(env, startTime + 20000);<NEW_LINE>env.sendEventBean(events[5]);<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>assertData(listener.getLastNewData()[0], 5d);<NEW_LINE>assertData(listener.getLastOldData()[0], null);<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>// 2nd event<NEW_LINE><MASK><NEW_LINE>env.sendEventBean(events[6]);<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>assertData(listener.getLastNewData()[0], 11d);<NEW_LINE>assertData(listener.getLastOldData()[0], 5d);<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>sendTimer(env, startTime + 34999);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendTimer(env, startTime + 35000);<NEW_LINE>env.assertListener("s0", listener -> {<NEW_LINE>assertData(listener.getLastNewData()[0], null);<NEW_LINE>assertData(listener.getLastOldData()[0], 11d);<NEW_LINE>listener.reset();<NEW_LINE>});<NEW_LINE>env.undeployAll();<NEW_LINE>}
sendTimer(env, startTime + 25000);