idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,361,238
static Optional<String> longestCommonPath(List<ApiDescription> apiDescriptions) {<NEW_LINE>List<String> commons = new ArrayList<>();<NEW_LINE>if (null == apiDescriptions || apiDescriptions.isEmpty()) {<NEW_LINE>return empty();<NEW_LINE>}<NEW_LINE>List<String> firstWords = urlParts<MASK><NEW_LINE>for (int position = 0; position < firstWords.size(); position++) {<NEW_LINE>String word = firstWords.get(position);<NEW_LINE>boolean allContain = true;<NEW_LINE>for (int i = 1; i < apiDescriptions.size(); i++) {<NEW_LINE>List<String> words = urlParts(apiDescriptions.get(i));<NEW_LINE>if (words.size() < position + 1 || !words.get(position).equals(word)) {<NEW_LINE>allContain = false;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (allContain) {<NEW_LINE>commons.add(word);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return of("/" + commons.stream().filter(Objects::nonNull).collect(joining("/")));<NEW_LINE>}
(apiDescriptions.get(0));
1,690,533
public void visitEnd() {<NEW_LINE>super.visitEnd();<NEW_LINE>if (visibleParamAnnotations != null) {<NEW_LINE>VisibilityParameterAnnotationTag tag = new VisibilityParameterAnnotationTag(<MASK><NEW_LINE>for (VisibilityAnnotationTag vat : visibleParamAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (invisibleParamAnnotations != null) {<NEW_LINE>VisibilityParameterAnnotationTag tag = new VisibilityParameterAnnotationTag(invisibleParamAnnotations.length, AnnotationConstants.RUNTIME_INVISIBLE);<NEW_LINE>for (VisibilityAnnotationTag vat : invisibleParamAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (visibleLocalVarAnnotations != null) {<NEW_LINE>VisibilityLocalVariableAnnotationTag tag = new VisibilityLocalVariableAnnotationTag(visibleLocalVarAnnotations.size(), AnnotationConstants.RUNTIME_VISIBLE);<NEW_LINE>for (VisibilityAnnotationTag vat : visibleLocalVarAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (invisibleLocalVarAnnotations != null) {<NEW_LINE>VisibilityLocalVariableAnnotationTag tag = new VisibilityLocalVariableAnnotationTag(invisibleLocalVarAnnotations.size(), AnnotationConstants.RUNTIME_INVISIBLE);<NEW_LINE>for (VisibilityAnnotationTag vat : invisibleLocalVarAnnotations) {<NEW_LINE>tag.addVisibilityAnnotation(vat);<NEW_LINE>}<NEW_LINE>method.addTag(tag);<NEW_LINE>}<NEW_LINE>if (!isFullyEmpty(parameterNames)) {<NEW_LINE>method.addTag(new ParamNamesTag(parameterNames));<NEW_LINE>}<NEW_LINE>if (method.isConcrete()) {<NEW_LINE>method.setSource(createAsmMethodSource(maxLocals, instructions, localVariables, tryCatchBlocks, scb.getKlass().moduleName));<NEW_LINE>}<NEW_LINE>}
visibleParamAnnotations.length, AnnotationConstants.RUNTIME_VISIBLE);
90,815
private TransactionPair<PortfolioTransaction> splitBuySell(BuySellEntry entry, Portfolio portfolio, double weight) {<NEW_LINE>PortfolioTransaction t = entry.getPortfolioTransaction();<NEW_LINE>BuySellEntry copy = new BuySellEntry();<NEW_LINE>copy.setPortfolio(entry.getPortfolio());<NEW_LINE>copy.setAccount(entry.getAccount());<NEW_LINE>copy.setDate(t.getDateTime());<NEW_LINE>copy.setCurrencyCode(t.getCurrencyCode());<NEW_LINE>copy.setSecurity(t.getSecurity());<NEW_LINE>copy.setType(t.getType());<NEW_LINE>copy.setNote(t.getNote());<NEW_LINE>copy.setShares(Math.round(t.getShares() * weight));<NEW_LINE>copy.setAmount(Math.round(t.getAmount() * weight));<NEW_LINE>t.getUnits().forEach(unit -> copy.getPortfolioTransaction().addUnit(unit.split(weight)));<NEW_LINE>return new TransactionPair<>(entry.getPortfolio(<MASK><NEW_LINE>}
), copy.getPortfolioTransaction());
1,592,589
public Request<GetMLModelRequest> marshall(GetMLModelRequest getMLModelRequest) {<NEW_LINE>if (getMLModelRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(GetMLModelRequest)");<NEW_LINE>}<NEW_LINE>Request<GetMLModelRequest> request = new DefaultRequest<GetMLModelRequest>(getMLModelRequest, "AmazonMachineLearning");<NEW_LINE>String target = "AmazonML_20141212.GetMLModel";<NEW_LINE>request.addHeader("X-Amz-Target", target);<NEW_LINE>request.setHttpMethod(HttpMethodName.POST);<NEW_LINE>String uriResourcePath = "/";<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>try {<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>AwsJsonWriter jsonWriter = JsonUtils.getJsonWriter(stringWriter);<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (getMLModelRequest.getMLModelId() != null) {<NEW_LINE>String mLModelId = getMLModelRequest.getMLModelId();<NEW_LINE>jsonWriter.name("MLModelId");<NEW_LINE>jsonWriter.value(mLModelId);<NEW_LINE>}<NEW_LINE>if (getMLModelRequest.getVerbose() != null) {<NEW_LINE>Boolean verbose = getMLModelRequest.getVerbose();<NEW_LINE>jsonWriter.name("Verbose");<NEW_LINE>jsonWriter.value(verbose);<NEW_LINE>}<NEW_LINE>jsonWriter.endObject();<NEW_LINE>jsonWriter.close();<NEW_LINE>String snippet = stringWriter.toString();<NEW_LINE>byte[] content = snippet.getBytes(UTF8);<NEW_LINE>request.setContent(new StringInputStream(snippet));<NEW_LINE>request.addHeader("Content-Length", Integer.toString(content.length));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>throw new AmazonClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE>request.addHeader("Content-Type", "application/x-amz-json-1.1");<NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
t.getMessage(), t);
1,634,750
Map<DISPID, Method> createDispIdMap(Class<?> comEventCallbackInterface) {<NEW_LINE>Map<DISPID, Method> map = new HashMap<DISPID, Method>();<NEW_LINE>for (Method meth : comEventCallbackInterface.getMethods()) {<NEW_LINE>ComEventCallback callbackAnnotation = meth.getAnnotation(ComEventCallback.class);<NEW_LINE>ComMethod methodAnnotation = meth.getAnnotation(ComMethod.class);<NEW_LINE>if (methodAnnotation != null) {<NEW_LINE>int dispId = methodAnnotation.dispId();<NEW_LINE>if (-1 == dispId) {<NEW_LINE>dispId = this.fetchDispIdFromName(callbackAnnotation);<NEW_LINE>}<NEW_LINE>if (dispId == -1) {<NEW_LINE>CallbackProxy.this.comEventCallbackListener.errorReceivingCallbackEvent("DISPID for " + meth.getName() + " not found", null);<NEW_LINE>}<NEW_LINE>map.put(new DISPID(dispId), meth);<NEW_LINE>} else if (null != callbackAnnotation) {<NEW_LINE>int dispId = callbackAnnotation.dispid();<NEW_LINE>if (-1 == dispId) {<NEW_LINE>dispId = this.fetchDispIdFromName(callbackAnnotation);<NEW_LINE>}<NEW_LINE>if (dispId == -1) {<NEW_LINE>CallbackProxy.this.comEventCallbackListener.errorReceivingCallbackEvent("DISPID for " + meth.getName() + " not found", null);<NEW_LINE>}<NEW_LINE>map.put(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return map;<NEW_LINE>}
new DISPID(dispId), meth);
939,434
static Expression createFieldAccessor(EclipseNode field, FieldAccess fieldAccess, ASTNode source, char[] receiver) {<NEW_LINE>int pS = source.sourceStart, pE = source.sourceEnd;<NEW_LINE>long p = <MASK><NEW_LINE>boolean lookForGetter = lookForGetter(field, fieldAccess);<NEW_LINE>GetterMethod getter = lookForGetter ? findGetter(field) : null;<NEW_LINE>if (getter == null) {<NEW_LINE>NameReference ref;<NEW_LINE>char[][] tokens = new char[2][];<NEW_LINE>tokens[0] = receiver;<NEW_LINE>tokens[1] = field.getName().toCharArray();<NEW_LINE>long[] poss = { p, p };<NEW_LINE>ref = new QualifiedNameReference(tokens, poss, pS, pE);<NEW_LINE>setGeneratedBy(ref, source);<NEW_LINE>return ref;<NEW_LINE>}<NEW_LINE>MessageSend call = new MessageSend();<NEW_LINE>setGeneratedBy(call, source);<NEW_LINE>call.sourceStart = pS;<NEW_LINE>call.statementEnd = call.sourceEnd = pE;<NEW_LINE>call.receiver = new SingleNameReference(receiver, p);<NEW_LINE>setGeneratedBy(call.receiver, source);<NEW_LINE>call.selector = getter.name;<NEW_LINE>return call;<NEW_LINE>}
(long) pS << 32 | pE;
1,758,524
private void manageNotPatterns(OSelectExecutionPlan result, Pattern pattern, List<OMatchExpression> notMatchExpressions, OCommandContext context, boolean enableProfiling) {<NEW_LINE>for (OMatchExpression exp : notMatchExpressions) {<NEW_LINE>if (pattern.aliasToNode.get(exp.getOrigin().getAlias()) == null) {<NEW_LINE>throw new OCommandExecutionException("This kind of NOT expression is not supported (yet). " + "The first alias in a NOT expression has to be present in the positive pattern");<NEW_LINE>}<NEW_LINE>if (exp.getOrigin().getFilter() != null) {<NEW_LINE>throw new OCommandExecutionException("This kind of NOT expression is not supported (yet): " + "WHERE condition on the initial alias");<NEW_LINE>// TODO implement his<NEW_LINE>}<NEW_LINE>OMatchFilter lastFilter = exp.getOrigin();<NEW_LINE>List<AbstractExecutionStep> steps = new ArrayList<>();<NEW_LINE>for (OMatchPathItem item : exp.getItems()) {<NEW_LINE>if (item instanceof OMultiMatchPathItem) {<NEW_LINE>throw new OCommandExecutionException("This kind of NOT expression is not supported (yet): " + item.toString());<NEW_LINE>}<NEW_LINE>PatternEdge edge = new PatternEdge();<NEW_LINE>edge.item = item;<NEW_LINE>edge.out = new PatternNode();<NEW_LINE>edge.out.alias = lastFilter.getAlias();<NEW_LINE>edge.in = new PatternNode();<NEW_LINE>edge.in.alias = item.getFilter().getAlias();<NEW_LINE>EdgeTraversal traversal = new EdgeTraversal(edge, true);<NEW_LINE>MatchStep step = new MatchStep(context, traversal, enableProfiling);<NEW_LINE>steps.add(step);<NEW_LINE>lastFilter = item.getFilter();<NEW_LINE>}<NEW_LINE>result.chain(new FilterNotMatchPatternStep<MASK><NEW_LINE>}<NEW_LINE>}
(steps, context, enableProfiling));
324,258
public ServiceInfo listInstance(String namespaceId, String serviceName, Subscriber subscriber, String cluster, boolean healthOnly) {<NEW_LINE>Service service = <MASK><NEW_LINE>// For adapt 1.X subscribe logic<NEW_LINE>if (subscriber.getPort() > 0 && pushService.canEnablePush(subscriber.getAgent())) {<NEW_LINE>String clientId = IpPortBasedClient.getClientId(subscriber.getAddrStr(), true);<NEW_LINE>createIpPortClientIfAbsent(clientId);<NEW_LINE>clientOperationService.subscribeService(service, subscriber, clientId);<NEW_LINE>}<NEW_LINE>ServiceInfo serviceInfo = serviceStorage.getData(service);<NEW_LINE>ServiceMetadata serviceMetadata = metadataManager.getServiceMetadata(service).orElse(null);<NEW_LINE>ServiceInfo result = ServiceUtil.selectInstancesWithHealthyProtection(serviceInfo, serviceMetadata, cluster, healthOnly, true, subscriber.getIp());<NEW_LINE>// adapt for v1.x sdk<NEW_LINE>result.setName(NamingUtils.getGroupedName(result.getName(), result.getGroupName()));<NEW_LINE>return result;<NEW_LINE>}
getService(namespaceId, serviceName, true);
836,914
final CreateInputResult executeCreateInput(CreateInputRequest createInputRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createInputRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateInputRequest> request = null;<NEW_LINE>Response<CreateInputResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateInputRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createInputRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "MediaLive");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateInput");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateInputResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new CreateInputResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());
533,709
public static double germlineProbability(final double normalLogOdds, final double logOddsOfGermlineHetVsSomatic, final double logOddsOfGermlineHomAltVsSomatic, final double populationAF, final double logPriorSomatic) {<NEW_LINE>final double logPriorNotSomatic = NaturalLogUtils.log1mexp(logPriorSomatic);<NEW_LINE>final double logPriorGermlineHet = Math.log(2 * populationAF * (1 - populationAF));<NEW_LINE>final double logPriorGermlineHomAlt = Math.log(MathUtils.square(populationAF));<NEW_LINE>final double logPriorNotGermline = Math.log(MathUtils.square(1 - populationAF));<NEW_LINE>// the following are unnormalized probabilities<NEW_LINE>final double logProbGermlineHet = logPriorGermlineHet + logOddsOfGermlineHetVsSomatic + normalLogOdds + logPriorNotSomatic;<NEW_LINE>final double logProbGermlineHomAlt = logPriorGermlineHomAlt + logOddsOfGermlineHomAltVsSomatic + normalLogOdds + logPriorNotSomatic;<NEW_LINE>final double logProbGermline = <MASK><NEW_LINE>final double logProbSomatic = logPriorNotGermline + logPriorSomatic;<NEW_LINE>return NaturalLogUtils.normalizeLog(new double[] { logProbGermline, logProbSomatic }, false, true)[0];<NEW_LINE>}
NaturalLogUtils.logSumExp(logProbGermlineHet, logProbGermlineHomAlt);
760,208
public DescribeNatGatewaysResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeNatGatewaysResult describeNatGatewaysResult = new DescribeNatGatewaysResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>while (true) {<NEW_LINE><MASK><NEW_LINE>if (xmlEvent.isEndDocument())<NEW_LINE>return describeNatGatewaysResult;<NEW_LINE>if (xmlEvent.isAttribute() || xmlEvent.isStartElement()) {<NEW_LINE>if (context.testExpression("natGatewaySet", targetDepth)) {<NEW_LINE>describeNatGatewaysResult.withNatGateways(new ArrayList<NatGateway>());<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("natGatewaySet/item", targetDepth)) {<NEW_LINE>describeNatGatewaysResult.withNatGateways(NatGatewayStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (context.testExpression("nextToken", targetDepth)) {<NEW_LINE>describeNatGatewaysResult.setNextToken(StringStaxUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>} else if (xmlEvent.isEndElement()) {<NEW_LINE>if (context.getCurrentDepth() < originalDepth) {<NEW_LINE>return describeNatGatewaysResult;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
XMLEvent xmlEvent = context.nextEvent();
34,235
protected TreeBuilder createTreeBuilder(Properties properties, Feature... features) {<NEW_LINE>Class<?> clazz = load(TreeBuilder.class, properties);<NEW_LINE>if (clazz == null) {<NEW_LINE>return createDefaultTreeBuilder(features);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (Builder.class.isAssignableFrom(clazz)) {<NEW_LINE>Constructor<?> constructor = clazz.getConstructor(Feature[].class);<NEW_LINE>if (constructor == null) {<NEW_LINE>if (features == null || features.length == 0) {<NEW_LINE>return TreeBuilder.class.cast(clazz.newInstance());<NEW_LINE>} else {<NEW_LINE>throw new ELException("Builder " + clazz + " is missing constructor (can't pass features)");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return TreeBuilder.class.cast(constructor.newInstance((Object) features));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>return TreeBuilder.class.cast(clazz.newInstance());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new ELException(<MASK><NEW_LINE>}<NEW_LINE>}
"TreeBuilder " + clazz + " could not be instantiated", e);
1,204,614
public void decode(ByteBuf buf, ProtocolUtils.Direction direction, ProtocolVersion version) {<NEW_LINE>this.locale = ProtocolUtils.readString(buf, 16);<NEW_LINE>this.viewDistance = buf.readByte();<NEW_LINE>this.chatVisibility = ProtocolUtils.readVarInt(buf);<NEW_LINE>this.chatColors = buf.readBoolean();<NEW_LINE>if (version.compareTo(ProtocolVersion.MINECRAFT_1_7_6) <= 0) {<NEW_LINE>this.difficulty = buf.readByte();<NEW_LINE>}<NEW_LINE>this.skinParts = buf.readUnsignedByte();<NEW_LINE>if (version.compareTo(ProtocolVersion.MINECRAFT_1_9) >= 0) {<NEW_LINE>this.<MASK><NEW_LINE>if (version.compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0) {<NEW_LINE>this.chatFilteringEnabled = buf.readBoolean();<NEW_LINE>if (version.compareTo(ProtocolVersion.MINECRAFT_1_18) >= 0) {<NEW_LINE>this.clientListingAllowed = buf.readBoolean();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
mainHand = ProtocolUtils.readVarInt(buf);
751,373
private void loadChineseGenderNumberAnimacy(String file) {<NEW_LINE>String[] split = new String[8];<NEW_LINE>for (String line : IOUtils.readLines(file)) {<NEW_LINE>// ignore first row<NEW_LINE>if (line.startsWith("#WORD"))<NEW_LINE>continue;<NEW_LINE>StringUtils.<MASK><NEW_LINE>String word = split[0];<NEW_LINE>int animate = Integer.parseInt(split[1]);<NEW_LINE>int inanimate = Integer.parseInt(split[2]);<NEW_LINE>int male = Integer.parseInt(split[3]);<NEW_LINE>int female = Integer.parseInt(split[4]);<NEW_LINE>int neutral = Integer.parseInt(split[5]);<NEW_LINE>int singular = Integer.parseInt(split[6]);<NEW_LINE>int plural = Integer.parseInt(split[7]);<NEW_LINE>if (male * 0.5 > female + neutral && male > 2) {<NEW_LINE>maleWords.add(word);<NEW_LINE>} else if (female * 0.5 > male + neutral && female > 2) {<NEW_LINE>femaleWords.add(word);<NEW_LINE>} else if (neutral * 0.5 > male + female && neutral > 2) {<NEW_LINE>neutralWords.add(word);<NEW_LINE>}<NEW_LINE>if (animate * 0.5 > inanimate && animate > 2) {<NEW_LINE>animateWords.add(word);<NEW_LINE>} else if (inanimate * 0.5 > animate && inanimate > 2) {<NEW_LINE>inanimateWords.add(word);<NEW_LINE>}<NEW_LINE>if (singular * 0.5 > plural && singular > 2) {<NEW_LINE>singularWords.add(word);<NEW_LINE>} else if (plural * 0.5 > singular && plural > 2) {<NEW_LINE>pluralWords.add(word);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
splitOnChar(split, line, '\t');
1,443,079
public void marshall(CreateFlowRequest createFlowRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createFlowRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getFlowName(), FLOWNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getKmsArn(), KMSARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getTriggerConfig(), TRIGGERCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getSourceFlowConfig(), SOURCEFLOWCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getDestinationFlowConfigList(), DESTINATIONFLOWCONFIGLIST_BINDING);<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getTasks(), TASKS_BINDING);<NEW_LINE>protocolMarshaller.marshall(createFlowRequest.getTags(), TAGS_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);
995,983
final UpdateStreamResult executeUpdateStream(UpdateStreamRequest updateStreamRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateStreamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateStreamRequest> request = null;<NEW_LINE>Response<UpdateStreamResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new UpdateStreamRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(updateStreamRequest));<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, "IoT");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateStream");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<UpdateStreamResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
false), new UpdateStreamResultJsonUnmarshaller());
415,648
protected final void addAnnotationValuesFromData(List results, Map<CharSequence, Object> values) {<NEW_LINE>if (values != null) {<NEW_LINE>Object v = values.get(AnnotationMetadata.VALUE_MEMBER);<NEW_LINE>if (v instanceof io.micronaut.core.annotation.AnnotationValue[]) {<NEW_LINE>io.micronaut.core.annotation.AnnotationValue[] avs = (io.micronaut.core.annotation.AnnotationValue[]) v;<NEW_LINE>for (io.micronaut.core.annotation.AnnotationValue av : avs) {<NEW_LINE>addValuesToResults(results, av);<NEW_LINE>}<NEW_LINE>} else if (v instanceof Collection) {<NEW_LINE>Collection c = (Collection) v;<NEW_LINE>for (Object o : c) {<NEW_LINE>if (o instanceof io.micronaut.core.annotation.AnnotationValue) {<NEW_LINE>addValuesToResults(results, ((io.micronaut.core<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.annotation.AnnotationValue) o));
303,013
public Stat concurrentSpreadRate(String key) {<NEW_LINE>return concurrent.computeIfAbsent(key, k -> {<NEW_LINE>SpreadStat stat = new SpreadStat(key);<NEW_LINE>addDynamicCounter(key + ".rate", () -> stat.getRate().getAllTime());<NEW_LINE>addDynamicCounter(key + ".rate.3600", () -> stat.getRate().getHour());<NEW_LINE>addDynamicCounter(key + ".rate.600", () -> stat.getRate().getTenMinute());<NEW_LINE>addDynamicCounter(key + ".rate.60", () -> stat.getRate().getMinute());<NEW_LINE>addDynamicCounter(key + ".sum", () -> stat.getSum().getAllTime());<NEW_LINE>addDynamicCounter(key + ".sum.3600", () -> stat.getSum().getHour());<NEW_LINE>addDynamicCounter(key + ".sum.600", () -> stat.getSum().getTenMinute());<NEW_LINE>addDynamicCounter(key + ".sum.60", () -> stat.getSum().getMinute());<NEW_LINE>addDynamicCounter(key + ".min", () -> stat.getMin().getAllTime());<NEW_LINE>addDynamicCounter(key + ".min.3600", () -> stat.getMin().getHour());<NEW_LINE>addDynamicCounter(key + ".min.600", () -> stat.getMin().getTenMinute());<NEW_LINE>addDynamicCounter(key + ".min.60", () -> stat.getMin().getMinute());<NEW_LINE>addDynamicCounter(key + ".max", () -> stat.getMax().getAllTime());<NEW_LINE>addDynamicCounter(key + ".max.3600", () -> stat.getMax().getHour());<NEW_LINE>addDynamicCounter(key + ".max.600", () -> stat.getMax().getTenMinute());<NEW_LINE>addDynamicCounter(key + ".max.60", () -> stat.getMax().getMinute());<NEW_LINE>addDynamicCounter(key + ".avg", () -> stat.getAverage().getAllTime());<NEW_LINE>addDynamicCounter(key + ".avg.3600", () -> stat.getAverage().getHour());<NEW_LINE>addDynamicCounter(key + ".avg.600", () -> stat.getAverage().getTenMinute());<NEW_LINE>addDynamicCounter(key + ".avg.60", () -> stat.<MASK><NEW_LINE>addDynamicCounter(key + ".samples", () -> stat.getSamples().getAllTime());<NEW_LINE>addDynamicCounter(key + ".samples.3600", () -> stat.getSamples().getHour());<NEW_LINE>addDynamicCounter(key + ".samples.600", () -> stat.getSamples().getTenMinute());<NEW_LINE>addDynamicCounter(key + ".samples.60", () -> stat.getSamples().getMinute());<NEW_LINE>return stat;<NEW_LINE>});<NEW_LINE>}
getAverage().getMinute());
510,585
public DatasetVersion deleteDatasetVersionTags(String datasetVersionId, List<String> datasetVersionTagList, Boolean deleteAll) {<NEW_LINE>try (var session = modelDBHibernateUtil.getSessionFactory().openSession()) {<NEW_LINE>var transaction = session.beginTransaction();<NEW_LINE>if (deleteAll) {<NEW_LINE>var query = session.createQuery(DELETE_DATASET_VERSION_QUERY_PREFIX).setLockOptions(new LockOptions().setLockMode(LockMode.PESSIMISTIC_WRITE));<NEW_LINE>query.setParameter(ModelDBConstants.DATASET_VERSION_ID_STR, datasetVersionId);<NEW_LINE>query.executeUpdate();<NEW_LINE>} else {<NEW_LINE>StringBuilder stringQueryBuilder = new StringBuilder(DELETE_DATASET_VERSION_QUERY_PREFIX).append(" AND tm." + ModelDBConstants.TAGS + " in (:tags)");<NEW_LINE>var query = session.createQuery(stringQueryBuilder.toString()).setLockOptions(new LockOptions().setLockMode(LockMode.PESSIMISTIC_WRITE));<NEW_LINE><MASK><NEW_LINE>query.setParameter(ModelDBConstants.DATASET_VERSION_ID_STR, datasetVersionId);<NEW_LINE>query.executeUpdate();<NEW_LINE>}<NEW_LINE>long currentTimestamp = Calendar.getInstance().getTimeInMillis();<NEW_LINE>DatasetVersionEntity datasetVersionObj = session.get(DatasetVersionEntity.class, datasetVersionId);<NEW_LINE>datasetVersionObj.setTime_updated(currentTimestamp);<NEW_LINE>session.update(datasetVersionObj);<NEW_LINE>transaction.commit();<NEW_LINE>LOGGER.debug("DatasetVersion tags deleted successfully");<NEW_LINE>return datasetVersionObj.getProtoObject();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>if (ModelDBUtils.needToRetry(ex)) {<NEW_LINE>return deleteDatasetVersionTags(datasetVersionId, datasetVersionTagList, deleteAll);<NEW_LINE>} else {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
query.setParameter("tags", datasetVersionTagList);
351,072
public void actionPerformed(final ActionEvent e) {<NEW_LINE>if (getResourceController().getBooleanProperty(IGNORE_UNASSIGNED_F_KEYS))<NEW_LINE>return;<NEW_LINE>AccelerateableAction.setNewAcceleratorOnNextClick(accelerator);<NEW_LINE>final JCheckBox dontShowAgainBox = new JCheckBox(TextUtils.getRawText(OptionalDontShowMeAgainDialog.DONT_SHOW_AGAIN));<NEW_LINE>final JDialog acceleratorOnNextClickActionDialog = AccelerateableAction.getAcceleratorOnNextClickActionDialog();<NEW_LINE>acceleratorOnNextClickActionDialog.getContentPane().<MASK><NEW_LINE>acceleratorOnNextClickActionDialog.pack();<NEW_LINE>dontShowAgainBox.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>getResourceController().setProperty(IGNORE_UNASSIGNED_F_KEYS, true);<NEW_LINE>acceleratorOnNextClickActionDialog.setVisible(false);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>LabelAndMnemonicSetter.setLabelAndMnemonic(dontShowAgainBox, null);<NEW_LINE>}
add(dontShowAgainBox, BorderLayout.SOUTH);
767,054
public BatchCreateChannelMembershipResult batchCreateChannelMembership(BatchCreateChannelMembershipRequest batchCreateChannelMembershipRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchCreateChannelMembershipRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchCreateChannelMembershipRequest> request = null;<NEW_LINE>Response<BatchCreateChannelMembershipResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchCreateChannelMembershipRequestMarshaller().marshall(batchCreateChannelMembershipRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>Unmarshaller<BatchCreateChannelMembershipResult, JsonUnmarshallerContext> unmarshaller = new BatchCreateChannelMembershipResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<BatchCreateChannelMembershipResult> responseHandler = new JsonResponseHandler<BatchCreateChannelMembershipResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.endEvent(Field.RequestMarshallTime);
1,270,665
public static GetMigrationProcessResponse unmarshall(GetMigrationProcessResponse getMigrationProcessResponse, UnmarshallerContext _ctx) {<NEW_LINE>getMigrationProcessResponse.setRequestId(_ctx.stringValue("GetMigrationProcessResponse.RequestId"));<NEW_LINE>getMigrationProcessResponse.setHttpStatusCode(_ctx.integerValue("GetMigrationProcessResponse.HttpStatusCode"));<NEW_LINE>getMigrationProcessResponse.setErrorMessage(_ctx.stringValue("GetMigrationProcessResponse.ErrorMessage"));<NEW_LINE>getMigrationProcessResponse.setSuccess(_ctx.booleanValue("GetMigrationProcessResponse.Success"));<NEW_LINE>getMigrationProcessResponse.setErrorCode(_ctx.stringValue("GetMigrationProcessResponse.ErrorCode"));<NEW_LINE>List<ProgressTaskItem> data <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetMigrationProcessResponse.Data.Length"); i++) {<NEW_LINE>ProgressTaskItem progressTaskItem = new ProgressTaskItem();<NEW_LINE>progressTaskItem.setTaskStatus(_ctx.stringValue("GetMigrationProcessResponse.Data[" + i + "].TaskStatus"));<NEW_LINE>progressTaskItem.setTaskName(_ctx.stringValue("GetMigrationProcessResponse.Data[" + i + "].TaskName"));<NEW_LINE>data.add(progressTaskItem);<NEW_LINE>}<NEW_LINE>getMigrationProcessResponse.setData(data);<NEW_LINE>return getMigrationProcessResponse;<NEW_LINE>}
= new ArrayList<ProgressTaskItem>();
1,041,944
public void create(Properties ctx, TransformerHandler document) throws SAXException {<NEW_LINE>int workflowId = Env.getContextAsInt(ctx, X_AD_Package_Exp_Detail.COLUMNNAME_AD_Workflow_ID);<NEW_LINE>PackOut packOut = (PackOut) ctx.get("PackOutProcess");<NEW_LINE>if (packOut == null) {<NEW_LINE>packOut = new PackOut();<NEW_LINE>packOut.setLocalContext(ctx);<NEW_LINE>}<NEW_LINE>List<String> tableList = new ArrayList<String>();<NEW_LINE>tableList.add(I_AD_WF_Node.Table_Name);<NEW_LINE>// Get<NEW_LINE>MWorkflow workflow = MWorkflow.get(ctx, workflowId);<NEW_LINE>// Workflow<NEW_LINE>packOut.createGenericPO(document, workflow, true, tableList);<NEW_LINE>//<NEW_LINE>MWFNode[] nodes = workflow.getNodes(true, Env.getAD_Client_ID(ctx));<NEW_LINE>for (MWFNode node : nodes) {<NEW_LINE>// Create Process<NEW_LINE>if (node.getAD_Process_ID() > 0) {<NEW_LINE>packOut.createProcess(node.getAD_Process_ID(), document);<NEW_LINE>}<NEW_LINE>// Create Window<NEW_LINE>if (node.getAD_Window_ID() > 0) {<NEW_LINE>packOut.createWindow(node.getAD_Window_ID(), document);<NEW_LINE>}<NEW_LINE>// Create Browser<NEW_LINE>if (node.getAD_Browse_ID() > 0) {<NEW_LINE>packOut.createBrowse(node.getAD_Browse_ID(), document);<NEW_LINE>}<NEW_LINE>// Create From<NEW_LINE>if (node.getAD_Form_ID() > 0) {<NEW_LINE>packOut.createForm(node.getAD_Form_ID(), document);<NEW_LINE>}<NEW_LINE>// Task<NEW_LINE>if (node.getAD_Task_ID() > 0) {<NEW_LINE>packOut.createTask(node.getAD_Task_ID(), document);<NEW_LINE>}<NEW_LINE>// Create View<NEW_LINE>if (node.getAD_View_ID() > 0) {<NEW_LINE>packOut.createView(node.getAD_View_ID(), document);<NEW_LINE>}<NEW_LINE>packOut.createGenericPO(document, node);<NEW_LINE>}<NEW_LINE>// Export conditions<NEW_LINE>for (MWFNode node : nodes) {<NEW_LINE>// for next nodes<NEW_LINE>List<MWFNodeNext> nextNodeList = new Query(ctx, I_AD_WF_NodeNext.Table_Name, I_AD_WF_NodeNext.COLUMNNAME_AD_WF_Node_ID + " = ?", null).setParameters(node.getAD_WF_Node_ID()).setClient_ID().<MWFNodeNext>list();<NEW_LINE>//<NEW_LINE>for (MWFNodeNext nextNode : nextNodeList) {<NEW_LINE>packOut.createGenericPO(document, nextNode);<NEW_LINE>// for conditions<NEW_LINE>List<MWFNextCondition> nextConditionList = new Query(ctx, I_AD_WF_NextCondition.Table_Name, I_AD_WF_NextCondition.COLUMNNAME_AD_WF_NodeNext_ID + " = ?", null).setParameters(nextNode.getAD_WF_NodeNext_ID()).setClient_ID(<MASK><NEW_LINE>//<NEW_LINE>for (MWFNextCondition nextCondition : nextConditionList) {<NEW_LINE>packOut.createGenericPO(document, nextCondition);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
).<MWFNextCondition>list();
1,846,324
public static CalculateSavingsPlansResponse unmarshall(CalculateSavingsPlansResponse calculateSavingsPlansResponse, UnmarshallerContext _ctx) {<NEW_LINE>calculateSavingsPlansResponse.setRequestId(_ctx.stringValue("CalculateSavingsPlansResponse.RequestId"));<NEW_LINE>calculateSavingsPlansResponse.setCode(_ctx.stringValue("CalculateSavingsPlansResponse.Code"));<NEW_LINE>calculateSavingsPlansResponse.setMessage(_ctx.stringValue("CalculateSavingsPlansResponse.Message"));<NEW_LINE>calculateSavingsPlansResponse.setSuccess(_ctx.booleanValue("CalculateSavingsPlansResponse.Success"));<NEW_LINE>List<SpnInstanceDTO> data = new ArrayList<SpnInstanceDTO>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("CalculateSavingsPlansResponse.Data.Length"); i++) {<NEW_LINE>SpnInstanceDTO spnInstanceDTO = new SpnInstanceDTO();<NEW_LINE>spnInstanceDTO.setCommodityCode(_ctx.stringValue("CalculateSavingsPlansResponse.Data[" + i + "].CommodityCode"));<NEW_LINE>spnInstanceDTO.setInstanceFamily(_ctx.stringValue("CalculateSavingsPlansResponse.Data[" + i + "].InstanceFamily"));<NEW_LINE>spnInstanceDTO.setRegion(_ctx.stringValue("CalculateSavingsPlansResponse.Data[" + i + "].Region"));<NEW_LINE>spnInstanceDTO.setCycle(_ctx.stringValue("CalculateSavingsPlansResponse.Data[" + i + "].Cycle"));<NEW_LINE>spnInstanceDTO.setUserId(_ctx.longValue<MASK><NEW_LINE>spnInstanceDTO.setSpnType(_ctx.stringValue("CalculateSavingsPlansResponse.Data[" + i + "].SpnType"));<NEW_LINE>spnInstanceDTO.setPoolValue(_ctx.floatValue("CalculateSavingsPlansResponse.Data[" + i + "].PoolValue"));<NEW_LINE>spnInstanceDTO.setCurrency(_ctx.stringValue("CalculateSavingsPlansResponse.Data[" + i + "].Currency"));<NEW_LINE>spnInstanceDTO.setPayMode(_ctx.stringValue("CalculateSavingsPlansResponse.Data[" + i + "].PayMode"));<NEW_LINE>data.add(spnInstanceDTO);<NEW_LINE>}<NEW_LINE>calculateSavingsPlansResponse.setData(data);<NEW_LINE>return calculateSavingsPlansResponse;<NEW_LINE>}
("CalculateSavingsPlansResponse.Data[" + i + "].UserId"));
175,971
public void handleOutboundPubrel(@NotNull final ChannelHandlerContext ctx, @NotNull final PUBREL pubrel, @NotNull final ChannelPromise promise) {<NEW_LINE>final Channel channel = ctx.channel();<NEW_LINE>final ClientConnection clientConnection = channel.attr(ChannelAttributes.CLIENT_CONNECTION).get();<NEW_LINE>final String clientId = clientConnection.getClientId();<NEW_LINE>if (clientId == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ClientContextImpl clientContext = clientConnection.getExtensionClientContext();<NEW_LINE>if (clientContext == null) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final List<PubrelOutboundInterceptor> interceptors = clientContext.getPubrelOutboundInterceptors();<NEW_LINE>if (interceptors.isEmpty()) {<NEW_LINE>ctx.write(pubrel, promise);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ClientInformation clientInfo = ExtensionInformationUtil.getAndSetClientInformation(channel, clientId);<NEW_LINE>final ConnectionInformation connectionInfo = ExtensionInformationUtil.getAndSetConnectionInformation(channel);<NEW_LINE>final PubrelPacketImpl packet = new PubrelPacketImpl(pubrel);<NEW_LINE>final PubrelOutboundInputImpl input = new PubrelOutboundInputImpl(clientInfo, connectionInfo, packet);<NEW_LINE>final ExtensionParameterHolder<PubrelOutboundInputImpl> inputHolder = new ExtensionParameterHolder<>(input);<NEW_LINE>final ModifiablePubrelPacketImpl modifiablePacket = new ModifiablePubrelPacketImpl(packet, configurationService);<NEW_LINE>final PubrelOutboundOutputImpl output = new PubrelOutboundOutputImpl(asyncer, modifiablePacket);<NEW_LINE>final ExtensionParameterHolder<PubrelOutboundOutputImpl> outputHolder = new ExtensionParameterHolder<>(output);<NEW_LINE>final PubrelOutboundInterceptorContext context = new PubrelOutboundInterceptorContext(clientId, interceptors.size(), ctx, promise, inputHolder, outputHolder);<NEW_LINE>for (final PubrelOutboundInterceptor interceptor : interceptors) {<NEW_LINE>final HiveMQExtension extension = hiveMQExtensions.getExtensionForClassloader(interceptor.getClass().getClassLoader());<NEW_LINE>if (extension == null) {<NEW_LINE>// disabled extension would be null<NEW_LINE>context.finishInterceptor();<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>final PubrelOutboundInterceptorTask task = new PubrelOutboundInterceptorTask(interceptor, extension.getId());<NEW_LINE>executorService.handlePluginInOutTaskExecution(context, inputHolder, outputHolder, task);<NEW_LINE>}<NEW_LINE>}
ctx.write(pubrel, promise);
1,089,967
public boolean inCategory(@Name("node") Node individual, @Name("category") Node category, @Name(value = "params", defaultValue = "{}") Map<String, Object> props) {<NEW_LINE>final GraphConfig gc = getGraphConfig();<NEW_LINE>final String inCatRelName = (props.containsKey("inCatRel") ? (String) props.get("inCatRel") : getDefaultIncatRel(gc));<NEW_LINE>final String subCatRelName = (props.containsKey("subCatRel") ? (String) props.get("subCatRel") : gc.getSubClassOfRelName());<NEW_LINE>final boolean searchTopDown = (props.containsKey("searchTopDown") ? (boolean) props.get("searchTopDown") : DEFAULT_SEARCH_TOP_DOWN);<NEW_LINE>Iterator<Relationship> relIterator = individual.getRelationships(Direction.OUTGOING, RelationshipType.withName(inCatRelName)).iterator();<NEW_LINE>if (searchTopDown) {<NEW_LINE>List<Long> catIds = getSubcatIds(category, subCatRelName, gc);<NEW_LINE>boolean is = false;<NEW_LINE>while (!is && relIterator.hasNext()) {<NEW_LINE>is |= catIds.contains(relIterator.next().getEndNode().getId());<NEW_LINE>}<NEW_LINE>return is;<NEW_LINE>} else {<NEW_LINE>boolean is = false;<NEW_LINE>while (!is && relIterator.hasNext()) {<NEW_LINE>List<Long> catIds = getSuperCatIds(relIterator.next().getEndNode().getId(), subCatRelName, gc);<NEW_LINE>is |= catIds.<MASK><NEW_LINE>}<NEW_LINE>return is;<NEW_LINE>}<NEW_LINE>}
contains(category.getId());
1,801,059
public SNOMEDCTTrait unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SNOMEDCTTrait sNOMEDCTTrait = new SNOMEDCTTrait();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>sNOMEDCTTrait.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Score", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>sNOMEDCTTrait.setScore(context.getUnmarshaller(Float.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 sNOMEDCTTrait;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
619,002
private static Map<URL, Collection<URL>> findReverseDependencies(@NonNull final Map<URL, List<URL>> deps) {<NEW_LINE>final Map<URL, Collection<URL>> inverseDeps = new HashMap<URL, Collection<URL>>();<NEW_LINE>for (Map.Entry<URL, List<URL>> entry : deps.entrySet()) {<NEW_LINE>final URL u1 = entry.getKey();<NEW_LINE>if (inverseDeps.get(u1) == null) {<NEW_LINE>inverseDeps.put(u1, new HashSet<URL>());<NEW_LINE>}<NEW_LINE>final List<URL> l1 = entry.getValue();<NEW_LINE>for (URL u2 : l1) {<NEW_LINE>Collection<URL> l2 = inverseDeps.get(u2);<NEW_LINE>if (l2 == null) {<NEW_LINE>l2 <MASK><NEW_LINE>inverseDeps.put(u2, l2);<NEW_LINE>}<NEW_LINE>l2.add(u1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return inverseDeps;<NEW_LINE>}
= new HashSet<URL>();
1,138,744
private Version createVersionComponents() {<NEW_LINE>String tagName = myName;<NEW_LINE>if (tagName.startsWith("v.")) {<NEW_LINE>tagName = tagName.substring(2);<NEW_LINE>} else if (StringUtil.startsWithChar(tagName, 'v')) {<NEW_LINE>tagName = tagName.substring(1);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>int startInd = 0;<NEW_LINE>while (true) {<NEW_LINE>int ind = tagName.indexOf('.', startInd);<NEW_LINE>if (ind == -1) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>String s = tagName.substring(startInd, ind);<NEW_LINE>try {<NEW_LINE>int x = Integer.parseInt(s);<NEW_LINE>intComponents.add(x);<NEW_LINE>startInd = ind + 1;<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int nonDigitInd = startInd;<NEW_LINE>while (nonDigitInd < tagName.length()) {<NEW_LINE>if (!Character.isDigit(tagName.charAt(nonDigitInd))) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>nonDigitInd++;<NEW_LINE>}<NEW_LINE>String digitStr = tagName.substring(startInd, nonDigitInd);<NEW_LINE>if (!digitStr.isEmpty()) {<NEW_LINE>intComponents.add(Integer.parseInt(digitStr));<NEW_LINE>}<NEW_LINE>String labelWithVersion = tagName.substring(nonDigitInd);<NEW_LINE>int lastNonDigitInd = labelWithVersion.length() - 1;<NEW_LINE>while (lastNonDigitInd >= 0) {<NEW_LINE>if (!Character.isDigit(labelWithVersion.charAt(lastNonDigitInd))) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>lastNonDigitInd--;<NEW_LINE>}<NEW_LINE>String labelVersionStr = labelWithVersion.substring(lastNonDigitInd + 1);<NEW_LINE>String label = labelWithVersion.substring(0, lastNonDigitInd + 1);<NEW_LINE>int labelVersion = Integer.MAX_VALUE;<NEW_LINE>if (!labelVersionStr.isEmpty()) {<NEW_LINE>labelVersion = Integer.parseInt(labelVersionStr);<NEW_LINE>}<NEW_LINE>return new Version(intComponents, label, labelVersion);<NEW_LINE>}
IntList intComponents = IntLists.newArrayList();
983,412
private void populateFromPubKeyInfo(SubjectPublicKeyInfo info) {<NEW_LINE>X962Parameters params = X962Parameters.getInstance(info.getAlgorithm().getParameters());<NEW_LINE>ECCurve curve = EC5Util.getCurve(configuration, params);<NEW_LINE>ecSpec = EC5Util.convertToSpec(params, curve);<NEW_LINE><MASK><NEW_LINE>byte[] data = bits.getBytes();<NEW_LINE>ASN1OctetString key = new DEROctetString(data);<NEW_LINE>//<NEW_LINE>// extra octet string - one of our old certs...<NEW_LINE>//<NEW_LINE>if (data[0] == 0x04 && data[1] == data.length - 2 && (data[2] == 0x02 || data[2] == 0x03)) {<NEW_LINE>int qLength = new X9IntegerConverter().getByteLength(curve);<NEW_LINE>if (qLength >= data.length - 3) {<NEW_LINE>try {<NEW_LINE>key = (ASN1OctetString) ASN1Primitive.fromByteArray(data);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>throw new IllegalArgumentException("error recovering public key");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>X9ECPoint derQ = new X9ECPoint(curve, key);<NEW_LINE>this.ecPublicKey = new ECPublicKeyParameters(derQ.getPoint(), ECUtil.getDomainParameters(configuration, params));<NEW_LINE>}
ASN1BitString bits = info.getPublicKeyData();
1,307,363
private JPanel createFieldPanel() {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>responseStringButton = new JRadioButton(JMeterUtils.getResString("assertion_text_resp"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>responseAsDocumentButton = new JRadioButton(JMeterUtils.getResString("assertion_text_document"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>urlButton = new JRadioButton(JMeterUtils.getResString("assertion_url_samp"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>responseCodeButton = new JRadioButton(JMeterUtils.getResString("assertion_code_resp"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>responseMessageButton = new JRadioButton(JMeterUtils.getResString("assertion_message_resp"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>responseHeadersButton = new JRadioButton(JMeterUtils.getResString("assertion_headers"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>requestHeadersButton = new JRadioButton(JMeterUtils.getResString("assertion_req_headers"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>requestDataButton = new JRadioButton(JMeterUtils.getResString("assertion_req_data"));<NEW_LINE>ButtonGroup group = new ButtonGroup();<NEW_LINE>group.add(responseStringButton);<NEW_LINE>group.add(responseAsDocumentButton);<NEW_LINE>group.add(urlButton);<NEW_LINE>group.add(responseCodeButton);<NEW_LINE>group.add(responseMessageButton);<NEW_LINE>group.add(requestHeadersButton);<NEW_LINE>group.add(responseHeadersButton);<NEW_LINE>group.add(requestDataButton);<NEW_LINE>responseStringButton.setSelected(true);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>assumeSuccess = new JCheckBox(JMeterUtils.getResString("assertion_assume_success"));<NEW_LINE>GridBagLayout gridBagLayout = new GridBagLayout();<NEW_LINE>GridBagConstraints gbc = new GridBagConstraints();<NEW_LINE>initConstraints(gbc);<NEW_LINE>JPanel panel = new JPanel(gridBagLayout);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>panel.setBorder(BorderFactory.createTitledBorder(<MASK><NEW_LINE>addField(panel, responseStringButton, gbc);<NEW_LINE>addField(panel, responseCodeButton, gbc);<NEW_LINE>addField(panel, responseMessageButton, gbc);<NEW_LINE>addField(panel, responseHeadersButton, gbc);<NEW_LINE>resetContraints(gbc);<NEW_LINE>addField(panel, requestHeadersButton, gbc);<NEW_LINE>addField(panel, urlButton, gbc);<NEW_LINE>addField(panel, responseAsDocumentButton, gbc);<NEW_LINE>addField(panel, assumeSuccess, gbc);<NEW_LINE>resetContraints(gbc);<NEW_LINE>addField(panel, requestDataButton, gbc);<NEW_LINE>return panel;<NEW_LINE>}
JMeterUtils.getResString("assertion_resp_field")));
288,471
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {<NEW_LINE>UserTask userTask = (UserTask) element;<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_ASSIGNEE, userTask.getAssignee(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_OWNER, userTask.getOwner(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_CANDIDATEUSERS, convertToDelimitedString(userTask.getCandidateUsers()), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_CANDIDATEGROUPS, convertToDelimitedString(userTask.getCandidateGroups()), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_DUEDATE, userTask.getDueDate(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_BUSINESS_CALENDAR_NAME, <MASK><NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_CATEGORY, userTask.getCategory(), xtw);<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_FORM_FORMKEY, userTask.getFormKey(), xtw);<NEW_LINE>if (userTask.getPriority() != null) {<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_PRIORITY, userTask.getPriority().toString(), xtw);<NEW_LINE>}<NEW_LINE>if (StringUtils.isNotEmpty(userTask.getExtensionId())) {<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_SERVICE_EXTENSIONID, userTask.getExtensionId(), xtw);<NEW_LINE>}<NEW_LINE>if (userTask.getSkipExpression() != null) {<NEW_LINE>writeQualifiedAttribute(ATTRIBUTE_TASK_USER_SKIP_EXPRESSION, userTask.getSkipExpression(), xtw);<NEW_LINE>}<NEW_LINE>// write custom attributes<NEW_LINE>BpmnXMLUtil.writeCustomAttributes(userTask.getAttributes().values(), xtw, defaultElementAttributes, defaultActivityAttributes, defaultUserTaskAttributes);<NEW_LINE>}
userTask.getBusinessCalendarName(), xtw);
118,274
public String register(String... senderIds) throws IOException {<NEW_LINE>if (Looper.getMainLooper() == Looper.myLooper())<NEW_LINE>throw new IOException(ERROR_MAIN_THREAD);<NEW_LINE>if (senderIds == null || senderIds.length == 0)<NEW_LINE>throw new IllegalArgumentException("No sender ids");<NEW_LINE>StringBuilder sb = new StringBuilder(senderIds[0]);<NEW_LINE>for (int i = 1; i < senderIds.length; i++) {<NEW_LINE>sb.append(',')<MASK><NEW_LINE>}<NEW_LINE>String sender = sb.toString();<NEW_LINE>if (isLegacyFallback()) {<NEW_LINE>Bundle extras = new Bundle();<NEW_LINE>extras.putString(EXTRA_SENDER_LEGACY, sender);<NEW_LINE>return InstanceID.getInstance(context).getToken(sb.toString(), INSTANCE_ID_SCOPE, extras);<NEW_LINE>} else {<NEW_LINE>Bundle extras = new Bundle();<NEW_LINE>extras.putString(EXTRA_SENDER, sender);<NEW_LINE>return rpc.handleRegisterMessageResult(rpc.sendRegisterMessageBlocking(extras));<NEW_LINE>}<NEW_LINE>}
.append(senderIds[i]);
1,667,895
protected boolean canUserEvaluate() {<NEW_LINE>if (!Config.getBooleanProperty("ENABLE_SCRIPTING", false)) {<NEW_LINE>Logger.warn(this.getClass(), "Scripting called and ENABLE_SCRIPTING set to false");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>ica = new InternalContextAdapterImpl(ctx);<NEW_LINE>String fieldResourceName = ica.getCurrentTemplateName();<NEW_LINE>String conInode = fieldResourceName.substring(fieldResourceName.indexOf("/") + 1, fieldResourceName.indexOf("_"));<NEW_LINE>Contentlet con = APILocator.getContentletAPI().find(conInode, APILocator.getUserAPI().getSystemUser(), true);<NEW_LINE>User mu = userAPI.loadUserById(con.getModUser(), APILocator.getUserAPI().getSystemUser(), true);<NEW_LINE>Role scripting = APILocator.getRoleAPI().loadRoleByKey("Scripting Developer");<NEW_LINE>return APILocator.getRoleAPI(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>Logger.warn(this.getClass(), "Scripting called with error" + e);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
).doesUserHaveRole(mu, scripting);
225,165
public BotCommandScope deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException {<NEW_LINE>JsonNode node = jsonParser.getCodec().readTree(jsonParser);<NEW_LINE>String type = node.has("Type") ? node.get(<MASK><NEW_LINE>switch(type) {<NEW_LINE>case "default":<NEW_LINE>return objectMapper.readValue(node.toString(), new TypeReference<BotCommandScopeDefault>() {<NEW_LINE>});<NEW_LINE>case "all_private_chats":<NEW_LINE>return objectMapper.readValue(node.toString(), new TypeReference<BotCommandScopeAllPrivateChats>() {<NEW_LINE>});<NEW_LINE>case "all_group_chats":<NEW_LINE>return objectMapper.readValue(node.toString(), new TypeReference<BotCommandScopeAllGroupChats>() {<NEW_LINE>});<NEW_LINE>case "all_chat_administrators":<NEW_LINE>return objectMapper.readValue(node.toString(), new TypeReference<BotCommandScopeAllChatAdministrators>() {<NEW_LINE>});<NEW_LINE>case "chat":<NEW_LINE>return objectMapper.readValue(node.toString(), new TypeReference<BotCommandScopeChat>() {<NEW_LINE>});<NEW_LINE>case "chat_administrators":<NEW_LINE>return objectMapper.readValue(node.toString(), new TypeReference<BotCommandScopeChatAdministrators>() {<NEW_LINE>});<NEW_LINE>case "chat_member":<NEW_LINE>return objectMapper.readValue(node.toString(), new TypeReference<BotCommandScopeChatMember>() {<NEW_LINE>});<NEW_LINE>default:<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
"type").asText() : "";
1,560,490
private void updatePorts(Instance instance) {<NEW_LINE>final var nrBits = instance.getAttributeValue(StdAttr.WIDTH).getWidth();<NEW_LINE>var nrOfPorts = nrBits;<NEW_LINE>final var dir = instance.getAttributeValue(PioAttributes.PIO_DIRECTION);<NEW_LINE>final var hasIrq = hasIrqPin(instance.getAttributeSet());<NEW_LINE>if (dir == PioAttributes.PORT_INOUT)<NEW_LINE>nrOfPorts *= 2;<NEW_LINE>var index = hasIrq ? 2 : 1;<NEW_LINE>nrOfPorts += index;<NEW_LINE>final var ps = new Port[nrOfPorts];<NEW_LINE>if (hasIrq) {<NEW_LINE>ps[IRQ_INDEX] = new Port(20, 0, Port.OUTPUT, 1);<NEW_LINE>ps[IRQ_INDEX].setToolTip(S.getter("SocPioIrqOutput"));<NEW_LINE>}<NEW_LINE>ps[RESET_INDEX] = new Port(0, 110, Port.INPUT, 1);<NEW_LINE>ps[RESET_INDEX].setToolTip(S.getter("SocPioResetInput"));<NEW_LINE>if (dir == PioAttributes.PORT_INPUT || dir == PioAttributes.PORT_INOUT) {<NEW_LINE>for (var b = 0; b < nrBits; b++) {<NEW_LINE>ps[index + b] = new Port(370 - b * 10, 120, Port.INPUT, 1);<NEW_LINE>ps[index + b].setToolTip(S.getter("SocPioInputPinx", Integer.toString(b)));<NEW_LINE>}<NEW_LINE>index += nrBits;<NEW_LINE>}<NEW_LINE>if (dir == PioAttributes.PORT_INOUT || dir == PioAttributes.PORT_OUTPUT || dir == PioAttributes.PORT_BIDIR) {<NEW_LINE>final var portType = (dir == PioAttributes.PORT_BIDIR) ? Port.INOUT : Port.OUTPUT;<NEW_LINE>for (var b = 0; b < nrBits; b++) {<NEW_LINE>ps[index + b] = new Port(370 - b * 10, 0, portType, 1);<NEW_LINE>ps[index + b].setToolTip((dir == PioAttributes.PORT_BIDIR) ? S.getter("SocPioBidirPinx", Integer.toString(b)) : S.getter("SocPioOutputPinx", <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>instance.setPorts(ps);<NEW_LINE>}
Integer.toString(b)));
723,326
public void onImportUserFromLDAP(LDAPObject ldapUser, UserModel user, RealmModel realm, boolean isCreate) {<NEW_LINE>LDAPGroupMapperMode mode = config.getMode();<NEW_LINE>// For now, import LDAP role mappings just during create<NEW_LINE>if (mode == LDAPGroupMapperMode.IMPORT && isCreate) {<NEW_LINE>List<LDAPObject> ldapRoles = getLDAPRoleMappings(ldapUser);<NEW_LINE>// Import role mappings from LDAP into Keycloak DB<NEW_LINE>String roleNameAttr = config.getRoleNameLdapAttribute();<NEW_LINE>for (LDAPObject ldapRole : ldapRoles) {<NEW_LINE>String roleName = ldapRole.getAttributeAsString(roleNameAttr);<NEW_LINE>RoleContainerModel roleContainer = getTargetRoleContainer(realm);<NEW_LINE>RoleModel <MASK><NEW_LINE>if (role == null) {<NEW_LINE>role = roleContainer.addRole(roleName);<NEW_LINE>}<NEW_LINE>logger.debugf("Granting role [%s] to user [%s] during import from LDAP", roleName, user.getUsername());<NEW_LINE>user.grantRole(role);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
role = roleContainer.getRole(roleName);
267,819
protected String[] process(final long offset, final String[] firstFour, final String[] secondFour) {<NEW_LINE>final String diff1 = environment.getNextVariableString();<NEW_LINE>final String diff2 = environment.getNextVariableString();<NEW_LINE>final String diff3 = environment.getNextVariableString();<NEW_LINE>final String diff4 = environment.getNextVariableString();<NEW_LINE>final String diff1Sat = environment.getNextVariableString();<NEW_LINE>final String diff2Sat = environment.getNextVariableString();<NEW_LINE>final String diff3Sat = environment.getNextVariableString();<NEW_LINE>final String diff4Sat = environment.getNextVariableString();<NEW_LINE>final <MASK><NEW_LINE>long baseOffset = offset;<NEW_LINE>// Do the Subs<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[0], dw, secondFour[0], dw, diff1));<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[1], dw, secondFour[1], dw, diff2));<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[2], dw, secondFour[2], dw, diff3));<NEW_LINE>instructions.add(ReilHelpers.createSub(baseOffset++, dw, firstFour[3], dw, secondFour[3], dw, diff4));<NEW_LINE>// Do the sat<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[0], secondFour[0], diff1, subOperation, diff1Sat, 8, usignedDoesSat);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[1], secondFour[1], diff2, subOperation, diff2Sat, 8, usignedDoesSat);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[2], secondFour[2], diff3, subOperation, diff3Sat, 8, usignedDoesSat);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>Helpers.unsignedSat(baseOffset, environment, instruction, instructions, firstFour[3], secondFour[3], diff4, subOperation, diff4Sat, 8, usignedDoesSat);<NEW_LINE>baseOffset = ReilHelpers.nextReilAddress(instruction, instructions);<NEW_LINE>return new String[] { diff1Sat, diff2Sat, diff3Sat, diff4Sat };<NEW_LINE>}
String usignedDoesSat = environment.getNextVariableString();
502,316
private void doPrintEntries(PrintStream out) throws Exception {<NEW_LINE>// Adjust displayed keystore type if needed.<NEW_LINE>String keystoreTypeToPrint = keyStore.getType();<NEW_LINE>if ("JKS".equalsIgnoreCase(keystoreTypeToPrint)) {<NEW_LINE>if (ksfile != null && ksfile.exists()) {<NEW_LINE>String realType = keyStoreType(ksfile);<NEW_LINE>// If the magic number does not conform to JKS<NEW_LINE>// then it must be PKCS12<NEW_LINE>if (!"JKS".equalsIgnoreCase(realType)) {<NEW_LINE>keystoreTypeToPrint = P12KEYSTORE;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>out.println(rb.getString("Keystore.type.") + keystoreTypeToPrint);<NEW_LINE>out.println(rb.getString("Keystore.provider.") + keyStore.<MASK><NEW_LINE>out.println();<NEW_LINE>MessageFormat form;<NEW_LINE>form = (keyStore.size() == 1) ? new MessageFormat(rb.getString("Your.keystore.contains.keyStore.size.entry")) : new MessageFormat(rb.getString("Your.keystore.contains.keyStore.size.entries"));<NEW_LINE>Object[] source = { new Integer(keyStore.size()) };<NEW_LINE>out.println(form.format(source));<NEW_LINE>out.println();<NEW_LINE>List<String> aliases = Collections.list(keyStore.aliases());<NEW_LINE>aliases.sort(String::compareTo);<NEW_LINE>for (String alias : aliases) {<NEW_LINE>doPrintEntry("<" + alias + ">", alias, out);<NEW_LINE>if (verbose || rfc) {<NEW_LINE>out.println(rb.getString("NEWLINE"));<NEW_LINE>out.println(rb.getString("STAR"));<NEW_LINE>out.println(rb.getString("STARNN"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getProvider().getName());
230,337
public Map<String, String> availableImages() throws IOException {<NEW_LINE>Path webRoot = plugin.getRenderConfig().getWebRoot().toPath().toAbsolutePath();<NEW_LINE>String separator = webRoot.getFileSystem().getSeparator();<NEW_LINE>Path imageRootPath = webRoot.resolve("data").resolve(IMAGE_ROOT_PATH).toAbsolutePath();<NEW_LINE>Map<String, String> availableImagesMap = new HashMap<>();<NEW_LINE>try (Stream<Path> fileStream = Files.walk(imageRootPath)) {<NEW_LINE>fileStream.filter(p -> !Files.isDirectory(p)).filter(p -> p.getFileName().toString().endsWith(".png")).map(Path::toAbsolutePath).forEach(p -> {<NEW_LINE>try {<NEW_LINE>String key = imageRootPath.relativize(p).toString();<NEW_LINE>key = // remove .png<NEW_LINE>key.// remove .png<NEW_LINE>substring(// remove .png<NEW_LINE>0, key.length() - 4).replace(separator, "/");<NEW_LINE>String value = webRoot.relativize(p).toString(<MASK><NEW_LINE>availableImagesMap.put(key, value);<NEW_LINE>} catch (IllegalArgumentException ignore) {<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>return availableImagesMap;<NEW_LINE>}
).replace(separator, "/");
54,959
public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = source.getSourceObject(game);<NEW_LINE>if (player == null || sourceObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 3));<NEW_LINE>if (cards.size() < 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TargetCard target = new TargetCardInLibrary(cards.size() == 3 ? 1 : <MASK><NEW_LINE>target.withChooseHint("To put into your hand");<NEW_LINE>player.choose(outcome, cards, target, game);<NEW_LINE>Card card = game.getCard(target.getFirstTarget());<NEW_LINE>if (card != null) {<NEW_LINE>player.moveCards(card, Zone.HAND, source, game);<NEW_LINE>cards.remove(card);<NEW_LINE>}<NEW_LINE>if (cards.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>target = new TargetCardInLibrary(cards.size() == 2 ? 1 : 0, 1, StaticFilters.FILTER_CARD);<NEW_LINE>target.withChooseHint("To put on the bottom of your library");<NEW_LINE>player.choose(outcome, cards, target, game);<NEW_LINE>card = game.getCard(target.getFirstTarget());<NEW_LINE>if (card != null) {<NEW_LINE>player.putCardsOnBottomOfLibrary(card, game, source, false);<NEW_LINE>cards.remove(card);<NEW_LINE>}<NEW_LINE>if (cards.isEmpty()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>target = new TargetCardInLibrary();<NEW_LINE>target.withChooseHint("To exile (you may play it this turn)");<NEW_LINE>player.choose(outcome, cards, target, game);<NEW_LINE>card = game.getCard(target.getFirstTarget());<NEW_LINE>if (card == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>player.moveCardsToExile(card, source, game, true, source.getSourceId(), sourceObject.getIdName());<NEW_LINE>game.addEffect(new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn).setTargetPointer(new FixedTarget(card, game)), source);<NEW_LINE>return true;<NEW_LINE>}
0, 1, StaticFilters.FILTER_CARD);
713,023
protected Boolean doInBackground(String... urls) {<NEW_LINE>try {<NEW_LINE>Twitter twitter = Utils.getTwitter(context, settings);<NEW_LINE>if (stream == null) {<NEW_LINE>// create a file to write bitmap data<NEW_LINE>// context being the Activity pointer<NEW_LINE><MASK><NEW_LINE>File f = File.createTempFile("compose", "picture", outputDir);<NEW_LINE>Bitmap bitmap = getBitmapToSend(image);<NEW_LINE>ByteArrayOutputStream bos = new ByteArrayOutputStream();<NEW_LINE>bitmap.compress(Bitmap.CompressFormat.JPEG, 100, bos);<NEW_LINE>byte[] bitmapdata = bos.toByteArray();<NEW_LINE>FileOutputStream fos = new FileOutputStream(f);<NEW_LINE>fos.write(bitmapdata);<NEW_LINE>fos.flush();<NEW_LINE>fos.close();<NEW_LINE>twitter.updateProfileBanner(f);<NEW_LINE>} else {<NEW_LINE>twitter.updateProfileBanner(stream);<NEW_LINE>}<NEW_LINE>String profileURL = thisUser.getProfileBannerURL();<NEW_LINE>sharedPrefs.edit().putString("twitter_background_url_" + sharedPrefs.getInt("current_account", 1), profileURL).commit();<NEW_LINE>return true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
File outputDir = context.getCacheDir();
177,829
public static void glStencilThenCoverStrokePathInstancedNV(@NativeType("GLenum") int pathNameType, @NativeType("void const *") ByteBuffer paths, @NativeType("GLuint") int pathBase, @NativeType("GLint") int reference, @NativeType("GLuint") int mask, @NativeType("GLenum") int coverMode, @NativeType("GLenum") int transformType, @NativeType("GLfloat const *") float[] transformValues) {<NEW_LINE>long __functionAddress = GL.getICD().glStencilThenCoverStrokePathInstancedNV;<NEW_LINE>int numPaths = paths.<MASK><NEW_LINE>if (CHECKS) {<NEW_LINE>check(__functionAddress);<NEW_LINE>check(transformValues, numPaths * transformTypeToElements(transformType));<NEW_LINE>}<NEW_LINE>callPPV(numPaths, pathNameType, memAddress(paths), pathBase, reference, mask, coverMode, transformType, transformValues, __functionAddress);<NEW_LINE>}
remaining() / pathNameTypeToBytes(pathNameType);
318,730
private static void fixExtents(LayoutMasterSet lms, AbstractWmlConversionContext context, boolean useXSLT) {<NEW_LINE>WordprocessingMLPackage wordMLPackage = context.getWmlPackage();<NEW_LINE>StartEvent startEvent = new StartEvent(wordMLPackage, WellKnownProcessSteps.FO_EXTENTS);<NEW_LINE>startEvent.publish();<NEW_LINE>// log.debug(wordMLPackage.getMainDocumentPart().getXML());<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("incoming LMS: " + XmlUtils.marshaltoString(lms<MASK><NEW_LINE>}<NEW_LINE>// Make a copy of it<NEW_LINE>Set<String> relationshipTypes = new TreeSet<String>();<NEW_LINE>relationshipTypes.add(Namespaces.DOCUMENT);<NEW_LINE>relationshipTypes.add(Namespaces.HEADER);<NEW_LINE>relationshipTypes.add(Namespaces.FOOTER);<NEW_LINE>// those are probably not affected but get visited by the<NEW_LINE>// default TraversalUtil.<NEW_LINE>relationshipTypes.add(Namespaces.ENDNOTES);<NEW_LINE>relationshipTypes.add(Namespaces.FOOTNOTES);<NEW_LINE>relationshipTypes.add(Namespaces.COMMENTS);<NEW_LINE>WordprocessingMLPackage hfPkg;<NEW_LINE>try {<NEW_LINE>hfPkg = (WordprocessingMLPackage) PartialDeepCopy.process(wordMLPackage, relationshipTypes);<NEW_LINE>FOPAreaTreeHelper.trimContent(hfPkg);<NEW_LINE>FOSettings foSettings = (FOSettings) context.getConversionSettings();<NEW_LINE>org.w3c.dom.Document areaTree = FOPAreaTreeHelper.getAreaTreeViaFOP(hfPkg, useXSLT, foSettings);<NEW_LINE>log.debug(XmlUtils.w3CDomNodeToString(areaTree));<NEW_LINE>Map<String, Integer> headerBpda = new HashMap<String, Integer>();<NEW_LINE>Map<String, Integer> footerBpda = new HashMap<String, Integer>();<NEW_LINE>FOPAreaTreeHelper.calculateHFExtents(areaTree, headerBpda, footerBpda);<NEW_LINE>FOPAreaTreeHelper.adjustLayoutMasterSet(lms, context.getSections(), headerBpda, footerBpda);<NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error(e.getMessage(), e);<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("resulting LMS: " + XmlUtils.marshaltoString(lms, Context.getXslFoContext()));<NEW_LINE>}<NEW_LINE>new EventFinished(startEvent).publish();<NEW_LINE>}
, Context.getXslFoContext()));
760,331
private boolean dispatchTransactionSurface(float depth) {<NEW_LINE>boolean supportsBlur = BlurUtils.supportsBlursOnWindows();<NEW_LINE>if (supportsBlur && (mSurface == null || !mSurface.isValid())) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ensureDependencies();<NEW_LINE>IBinder windowToken = mLauncher.getRootView().getWindowToken();<NEW_LINE>if (windowToken != null) {<NEW_LINE>mWallpaperManager.setWallpaperZoomOut(windowToken, depth);<NEW_LINE>}<NEW_LINE>if (supportsBlur) {<NEW_LINE>// We cannot mark the window as opaque in overview because there will be an app window<NEW_LINE>// below the launcher layer, and we need to draw it -- without blurs.<NEW_LINE>boolean isOverview = mLauncher.isInState(LauncherState.OVERVIEW);<NEW_LINE>boolean opaque = mLauncher.getScrimView().isFullyOpaque() && !isOverview;<NEW_LINE>int blur = opaque || isOverview || !mCrossWindowBlursEnabled || mBlurDisabledForAppLaunch ? 0 : (int) (depth * mMaxBlurRadius);<NEW_LINE>new SurfaceControl.Transaction().setBackgroundBlurRadius(mSurface, blur).setOpaque(<MASK><NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
mSurface, opaque).apply();
473,323
protected void submitResponse(RestRequest restRequest, RestResponseChannel restResponseChannel, ReadableStreamChannel response, Exception exception) throws RestServiceException {<NEW_LINE>long processingStartTime = System.currentTimeMillis();<NEW_LINE>if (restRequest == null || restResponseChannel == null) {<NEW_LINE>throw new IllegalArgumentException("Received one or more null arguments");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>metrics.responseArrivalRate.mark();<NEW_LINE>if (exception != null || response == null) {<NEW_LINE>onResponseComplete(restRequest, restResponseChannel, response, exception);<NEW_LINE>} else {<NEW_LINE>ResponseWriteCallback responseWriteCallback = new ResponseWriteCallback(restRequest, response, restResponseChannel);<NEW_LINE>if (responses.putIfAbsent(restRequest, responseWriteCallback) != null) {<NEW_LINE>metrics.responseAlreadyInFlightError.inc();<NEW_LINE>throw new RestServiceException("Request for which response is being scheduled has a response outstanding", RestServiceErrorCode.RequestResponseQueuingFailure);<NEW_LINE>} else {<NEW_LINE>response.readInto(restResponseChannel, responseWriteCallback);<NEW_LINE>inFlightResponsesCount.incrementAndGet();<NEW_LINE>logger.trace("Response of size {} for request {} is scheduled to be sent", response.getSize(), restRequest.getUri());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>long preProcessingTime = System.currentTimeMillis() - processingStartTime;<NEW_LINE>metrics.responsePreProcessingTimeInMs.update(preProcessingTime);<NEW_LINE>restRequest.getMetricsTracker(<MASK><NEW_LINE>}<NEW_LINE>}
).scalingMetricsTracker.addToResponseProcessingTime(preProcessingTime);
164,664
public void onCreate() {<NEW_LINE>SharedPreferences themePrefs = getSharedPreferences("THEME", 0);<NEW_LINE>Boolean isDark = <MASK><NEW_LINE>if (isDark)<NEW_LINE>setTheme(R.style.DarkTheme);<NEW_LINE>else<NEW_LINE>setTheme(R.style.AppTheme);<NEW_LINE>super.onCreate();<NEW_LINE>ACRA.init(this);<NEW_LINE>Services.init(this);<NEW_LINE>// initialize the system<NEW_LINE>try {<NEW_LINE>System.init(this);<NEW_LINE>} catch (Exception e) {<NEW_LINE>// ignore exception when the user has wifi off<NEW_LINE>if (!(e instanceof NoRouteToHostException))<NEW_LINE>System.errorLogging(e);<NEW_LINE>}<NEW_LINE>CoreConfigurationBuilder builder = new CoreConfigurationBuilder(this);<NEW_LINE>builder.setBuildConfigClass(BuildConfig.class).setReportFormat(StringFormat.JSON);<NEW_LINE>builder.getPluginConfigurationBuilder(HttpSenderConfigurationBuilder.class);<NEW_LINE>builder.getPluginConfigurationBuilder(NotificationConfigurationBuilder.class);<NEW_LINE>ACRA.init(this, builder);<NEW_LINE>// load system modules even if the initialization failed<NEW_LINE>System.registerPlugin(new RouterPwn());<NEW_LINE>System.registerPlugin(new Traceroute());<NEW_LINE>System.registerPlugin(new PortScanner());<NEW_LINE>System.registerPlugin(new Inspector());<NEW_LINE>System.registerPlugin(new ExploitFinder());<NEW_LINE>System.registerPlugin(new LoginCracker());<NEW_LINE>System.registerPlugin(new Sessions());<NEW_LINE>System.registerPlugin(new MITM());<NEW_LINE>System.registerPlugin(new PacketForger());<NEW_LINE>}
themePrefs.getBoolean("isDark", false);
1,809,603
public void iterationStart(LoopIterationEvent event) {<NEW_LINE>// Cannot use getThreadContext() as not cloned per thread<NEW_LINE>JMeterVariables variables = JMeterContextService.getContext().getVariables();<NEW_LINE>long start = getStart();<NEW_LINE>long end = getEnd();<NEW_LINE>long increment = getIncrement();<NEW_LINE>if (!isPerUser()) {<NEW_LINE>synchronized (this) {<NEW_LINE>if (globalCounter == Long.MIN_VALUE || globalCounter > end) {<NEW_LINE>globalCounter = start;<NEW_LINE>}<NEW_LINE>variables.put(getVarName(), formatNumber(globalCounter));<NEW_LINE>globalCounter += increment;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>if (isResetOnThreadGroupIteration()) {<NEW_LINE>int iteration = variables.getIteration();<NEW_LINE>Long lastIterationNumber = perTheadLastIterationNumber.get();<NEW_LINE>if (iteration != lastIterationNumber) {<NEW_LINE>// reset<NEW_LINE>current = getStart();<NEW_LINE>}<NEW_LINE>perTheadLastIterationNumber.set((long) iteration);<NEW_LINE>}<NEW_LINE>variables.put(getVarName(), formatNumber(current));<NEW_LINE>current += increment;<NEW_LINE>if (current > end) {<NEW_LINE>current = start;<NEW_LINE>}<NEW_LINE>perTheadNumber.set(current);<NEW_LINE>}<NEW_LINE>}
long current = perTheadNumber.get();
666,480
private static MBPartner cleanBPartner(Properties ctx, MBPartner source) {<NEW_LINE>if (source == null)<NEW_LINE>source = new MBPartner(ctx, 0, null);<NEW_LINE>// Reset<NEW_LINE>source.set_ValueNoCheck("C_BPartner_ID", new Integer(0));<NEW_LINE>source.setTaxID("");<NEW_LINE>source.setValue("");<NEW_LINE>source.setName("");<NEW_LINE>source.setName2(null);<NEW_LINE>source.setDUNS("");<NEW_LINE>source.setFirstSale(null);<NEW_LINE>//<NEW_LINE>source.setSO_CreditLimit(Env.ZERO);<NEW_LINE>source.setSO_CreditUsed(Env.ZERO);<NEW_LINE>source.setTotalOpenBalance(Env.ZERO);<NEW_LINE>// s_template.setRating(null);<NEW_LINE>//<NEW_LINE>source.setActualLifeTimeValue(Env.ZERO);<NEW_LINE>source.setPotentialLifeTimeValue(Env.ZERO);<NEW_LINE><MASK><NEW_LINE>source.setShareOfCustomer(0);<NEW_LINE>source.setSalesVolume(0);<NEW_LINE>// Reset Created, Updated to current system time ( teo_sarca )<NEW_LINE>Timestamp ts = new Timestamp(System.currentTimeMillis());<NEW_LINE>source.set_ValueNoCheck("Created", ts);<NEW_LINE>source.set_ValueNoCheck("Updated", ts);<NEW_LINE>// Return<NEW_LINE>return source;<NEW_LINE>}
source.setAcqusitionCost(Env.ZERO);
183,218
final ListTemplateAliasesResult executeListTemplateAliases(ListTemplateAliasesRequest listTemplateAliasesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTemplateAliasesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListTemplateAliasesRequest> request = null;<NEW_LINE>Response<ListTemplateAliasesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListTemplateAliasesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTemplateAliasesRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "QuickSight");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListTemplateAliasesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTemplateAliasesResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTemplateAliases");
215,575
private EventSetDescriptor[] introspectEvents() throws IntrospectionException {<NEW_LINE>// Get descriptors for the public methods<NEW_LINE>// FIXME: performance<NEW_LINE>MethodDescriptor[] theMethods = introspectMethods();<NEW_LINE>if (theMethods == null)<NEW_LINE>return null;<NEW_LINE>HashMap<String, HashMap> eventTable = new HashMap<String, HashMap>(theMethods.length);<NEW_LINE>// Search for methods that add an Event Listener<NEW_LINE>for (int i = 0; i < theMethods.length; i++) {<NEW_LINE>introspectListenerMethods(PREFIX_ADD, theMethods[i].getMethod(), eventTable);<NEW_LINE>introspectListenerMethods(PREFIX_REMOVE, theMethods[i].getMethod(), eventTable);<NEW_LINE>introspectGetListenerMethods(theMethods[i].getMethod(), eventTable);<NEW_LINE>}<NEW_LINE>ArrayList<EventSetDescriptor> eventList = new ArrayList<EventSetDescriptor>();<NEW_LINE>for (Map.Entry<String, HashMap> entry : eventTable.entrySet()) {<NEW_LINE>HashMap table = entry.getValue();<NEW_LINE>Method add = (Method) table.get(PREFIX_ADD);<NEW_LINE>Method remove = (Method) table.get(PREFIX_REMOVE);<NEW_LINE>if ((add == null) || (remove == null)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Method get = (Method) table.get(PREFIX_GET);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>Class<?> listenerType = (<MASK><NEW_LINE>// $NON-NLS-1$<NEW_LINE>Method[] listenerMethods = (Method[]) table.get("listenerMethods");<NEW_LINE>EventSetDescriptor eventSetDescriptor = new EventSetDescriptor(decapitalize(entry.getKey()), listenerType, listenerMethods, add, remove, get);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>eventSetDescriptor.setUnicast(table.get("isUnicast") != null);<NEW_LINE>eventList.add(eventSetDescriptor);<NEW_LINE>}<NEW_LINE>EventSetDescriptor[] theEvents = new EventSetDescriptor[eventList.size()];<NEW_LINE>eventList.toArray(theEvents);<NEW_LINE>return theEvents;<NEW_LINE>}
Class) table.get("listenerType");
976,236
public List<String> sortFile(File sourceFile) {<NEW_LINE>List<String> lines = new LinkedList<String>();<NEW_LINE>try {<NEW_LINE>BufferedReader reader = new <MASK><NEW_LINE>String line = reader.readLine();<NEW_LINE>while (line != null) {<NEW_LINE>line = line.replace(" ", "").trim();<NEW_LINE>while (!line.endsWith(";")) {<NEW_LINE>line += reader.readLine();<NEW_LINE>}<NEW_LINE>if (!line.equals("") && line.startsWith("#") && line.endsWith(";") && line.contains("=")) {<NEW_LINE>lines.add(line);<NEW_LINE>}<NEW_LINE>line = reader.readLine();<NEW_LINE>}<NEW_LINE>reader.close();<NEW_LINE>Collections.sort(lines, new Comparator<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public int compare(String o1, String o2) {<NEW_LINE>if (o1.startsWith("#")) {<NEW_LINE>if (o2.startsWith("#")) {<NEW_LINE>if (o1.indexOf("=") != -1 && o2.indexOf("=") != -1) {<NEW_LINE>int diff = o1.substring(o1.indexOf("=")).compareTo(o2.substring(o2.indexOf("=")));<NEW_LINE>diff += 100 * (Integer.parseInt(o1.substring(1, o1.indexOf("="))) - Integer.parseInt(o2.substring(1, o2.indexOf("="))));<NEW_LINE>return diff;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return o1.compareTo(o2);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (FileNotFoundException e) {<NEW_LINE>LOGGER.error("", e);<NEW_LINE>} catch (IOException e) {<NEW_LINE>LOGGER.error("", e);<NEW_LINE>}<NEW_LINE>return lines;<NEW_LINE>}
BufferedReader(new FileReader(sourceFile));
69,051
public CreateBillingGroupResult createBillingGroup(CreateBillingGroupRequest createBillingGroupRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBillingGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateBillingGroupRequest> request = null;<NEW_LINE>Response<CreateBillingGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateBillingGroupRequestMarshaller().marshall(createBillingGroupRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<CreateBillingGroupResult, JsonUnmarshallerContext> unmarshaller = new CreateBillingGroupResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<CreateBillingGroupResult> responseHandler = <MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
new JsonResponseHandler<CreateBillingGroupResult>(unmarshaller);
1,483,020
public static DescribeClusterConnectionResponse unmarshall(DescribeClusterConnectionResponse describeClusterConnectionResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeClusterConnectionResponse.setRequestId(_ctx.stringValue("DescribeClusterConnectionResponse.RequestId"));<NEW_LINE>describeClusterConnectionResponse.setNetType(_ctx.stringValue("DescribeClusterConnectionResponse.NetType"));<NEW_LINE>describeClusterConnectionResponse.setVpcId(_ctx.stringValue("DescribeClusterConnectionResponse.VpcId"));<NEW_LINE>describeClusterConnectionResponse.setVSwitchId(_ctx.stringValue("DescribeClusterConnectionResponse.VSwitchId"));<NEW_LINE>describeClusterConnectionResponse.setDbType(_ctx.stringValue("DescribeClusterConnectionResponse.DbType"));<NEW_LINE>describeClusterConnectionResponse.setIsMultimod(_ctx.stringValue("DescribeClusterConnectionResponse.IsMultimod"));<NEW_LINE>UiProxyConnAddrInfo uiProxyConnAddrInfo = new UiProxyConnAddrInfo();<NEW_LINE>uiProxyConnAddrInfo.setConnAddr(_ctx.stringValue("DescribeClusterConnectionResponse.UiProxyConnAddrInfo.ConnAddr"));<NEW_LINE>uiProxyConnAddrInfo.setConnAddrPort(_ctx.stringValue("DescribeClusterConnectionResponse.UiProxyConnAddrInfo.ConnAddrPort"));<NEW_LINE>uiProxyConnAddrInfo.setNetType(_ctx.stringValue("DescribeClusterConnectionResponse.UiProxyConnAddrInfo.NetType"));<NEW_LINE>describeClusterConnectionResponse.setUiProxyConnAddrInfo(uiProxyConnAddrInfo);<NEW_LINE>ThriftConn thriftConn = new ThriftConn();<NEW_LINE>thriftConn.setConnAddr(_ctx.stringValue("DescribeClusterConnectionResponse.ThriftConn.ConnAddr"));<NEW_LINE>thriftConn.setConnAddrPort(_ctx.stringValue("DescribeClusterConnectionResponse.ThriftConn.ConnAddrPort"));<NEW_LINE>thriftConn.setNetType(_ctx.stringValue("DescribeClusterConnectionResponse.ThriftConn.NetType"));<NEW_LINE>describeClusterConnectionResponse.setThriftConn(thriftConn);<NEW_LINE>List<ZkConnAddr> zkConnAddrs = new ArrayList<ZkConnAddr>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeClusterConnectionResponse.ZkConnAddrs.Length"); i++) {<NEW_LINE>ZkConnAddr zkConnAddr = new ZkConnAddr();<NEW_LINE>zkConnAddr.setConnAddr(_ctx.stringValue("DescribeClusterConnectionResponse.ZkConnAddrs[" + i + "].ConnAddr"));<NEW_LINE>zkConnAddr.setConnAddrPort(_ctx.stringValue("DescribeClusterConnectionResponse.ZkConnAddrs[" + i + "].ConnAddrPort"));<NEW_LINE>zkConnAddr.setNetType(_ctx.stringValue("DescribeClusterConnectionResponse.ZkConnAddrs[" + i + "].NetType"));<NEW_LINE>zkConnAddrs.add(zkConnAddr);<NEW_LINE>}<NEW_LINE>describeClusterConnectionResponse.setZkConnAddrs(zkConnAddrs);<NEW_LINE>List<SlbConnAddr> slbConnAddrs = new ArrayList<SlbConnAddr>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeClusterConnectionResponse.SlbConnAddrs.Length"); i++) {<NEW_LINE>SlbConnAddr slbConnAddr = new SlbConnAddr();<NEW_LINE>slbConnAddr.setSlbType(_ctx.stringValue("DescribeClusterConnectionResponse.SlbConnAddrs[" + i + "].SlbType"));<NEW_LINE>ConnAddrInfo connAddrInfo = new ConnAddrInfo();<NEW_LINE>connAddrInfo.setConnAddr(_ctx.stringValue("DescribeClusterConnectionResponse.SlbConnAddrs[" + i + "].ConnAddrInfo.ConnAddr"));<NEW_LINE>connAddrInfo.setConnAddrPort(_ctx.stringValue("DescribeClusterConnectionResponse.SlbConnAddrs[" + i + "].ConnAddrInfo.ConnAddrPort"));<NEW_LINE>connAddrInfo.setNetType(_ctx.stringValue("DescribeClusterConnectionResponse.SlbConnAddrs[" + i + "].ConnAddrInfo.NetType"));<NEW_LINE>slbConnAddr.setConnAddrInfo(connAddrInfo);<NEW_LINE>slbConnAddrs.add(slbConnAddr);<NEW_LINE>}<NEW_LINE>describeClusterConnectionResponse.setSlbConnAddrs(slbConnAddrs);<NEW_LINE>List<ServiceConnAddr> serviceConnAddrs = new ArrayList<ServiceConnAddr>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeClusterConnectionResponse.ServiceConnAddrs.Length"); i++) {<NEW_LINE>ServiceConnAddr serviceConnAddr = new ServiceConnAddr();<NEW_LINE>serviceConnAddr.setConnType(_ctx.stringValue<MASK><NEW_LINE>ConnAddrInfo1 connAddrInfo1 = new ConnAddrInfo1();<NEW_LINE>connAddrInfo1.setConnAddr(_ctx.stringValue("DescribeClusterConnectionResponse.ServiceConnAddrs[" + i + "].ConnAddrInfo.ConnAddr"));<NEW_LINE>connAddrInfo1.setConnAddrPort(_ctx.stringValue("DescribeClusterConnectionResponse.ServiceConnAddrs[" + i + "].ConnAddrInfo.ConnAddrPort"));<NEW_LINE>connAddrInfo1.setNetType(_ctx.stringValue("DescribeClusterConnectionResponse.ServiceConnAddrs[" + i + "].ConnAddrInfo.NetType"));<NEW_LINE>serviceConnAddr.setConnAddrInfo1(connAddrInfo1);<NEW_LINE>serviceConnAddrs.add(serviceConnAddr);<NEW_LINE>}<NEW_LINE>describeClusterConnectionResponse.setServiceConnAddrs(serviceConnAddrs);<NEW_LINE>return describeClusterConnectionResponse;<NEW_LINE>}
("DescribeClusterConnectionResponse.ServiceConnAddrs[" + i + "].ConnType"));
145,282
private void processJsonNode(ObjectMapper mapper, JsonNode node) {<NEW_LINE>JsonNode eventTypeNode = node.get("eventType");<NEW_LINE>if (eventTypeNode == null) {<NEW_LINE>System.err.println(format("{0}: Invalid message, missing eventType", discoveryName));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>switch(eventTypeNode.asText()) {<NEW_LINE>case "error":<NEW_LINE>try {<NEW_LINE>PluggableDiscoveryMessage msg = mapper.treeToValue(node, PluggableDiscoveryMessage.class);<NEW_LINE>debug(<MASK><NEW_LINE>if (msg.getMessage().contains("START_SYNC")) {<NEW_LINE>startPolling();<NEW_LINE>}<NEW_LINE>} catch (JsonProcessingException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>case "list":<NEW_LINE>JsonNode portsNode = node.get("ports");<NEW_LINE>if (portsNode == null) {<NEW_LINE>System.err.println(format("{0}: Invalid message, missing ports list", discoveryName));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!portsNode.isArray()) {<NEW_LINE>System.err.println(format("{0}: Invalid message, ports list should be an array", discoveryName));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>synchronized (portList) {<NEW_LINE>portList.clear();<NEW_LINE>}<NEW_LINE>portsNode.forEach(portNode -> {<NEW_LINE>BoardPort port = mapJsonNodeToBoardPort(mapper, node);<NEW_LINE>if (port != null) {<NEW_LINE>addOrUpdate(port);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return;<NEW_LINE>// Messages for SYNC updates<NEW_LINE>case "add":<NEW_LINE>BoardPort addedPort = mapJsonNodeToBoardPort(mapper, node);<NEW_LINE>if (addedPort != null) {<NEW_LINE>addOrUpdate(addedPort);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>case "remove":<NEW_LINE>BoardPort removedPort = mapJsonNodeToBoardPort(mapper, node);<NEW_LINE>if (removedPort != null) {<NEW_LINE>remove(removedPort);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>default:<NEW_LINE>debug("Invalid event: " + eventTypeNode.asText());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}
"error: " + msg.getMessage());
528,215
private static void createSipConnectorVirtualHost(Map<String, Object> sipEndpointProperties, boolean isSslEnabled, ConfigurationAdmin configAdminRef) throws IOException, InvalidSyntaxException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Object[] params = { sipEndpointProperties, isSslEnabled };<NEW_LINE>Tr.debug(tc, "Creates SIP connector virtual host for SIP endpoint", params);<NEW_LINE>}<NEW_LINE>List<String> hostAliasesFromEndpoint = createHostAliasesFromEndpoint(sipEndpointProperties, isSslEnabled);<NEW_LINE>Hashtable<String, Object> props = new Hashtable<String, Object>();<NEW_LINE><MASK><NEW_LINE>props.put("config.displayId", "virtualHost[" + SIP_CONNECTOR_VH_ID + "]");<NEW_LINE>props.put("config.id", VH_FACTORY_PID + "[" + SIP_CONNECTOR_VH_ID + "]");<NEW_LINE>props.put("enabled", "true");<NEW_LINE>String virtualHostBundle = getVirtualHostBundleLocation(configAdminRef);<NEW_LINE>Configuration vhConfig = configAdminRef.createFactoryConfiguration(VH_FACTORY_PID, virtualHostBundle);<NEW_LINE>Object[] listToArray = hostAliasesFromEndpoint.toArray();<NEW_LINE>String[] vhHostAliases = Arrays.copyOf(listToArray, listToArray.length, String[].class);<NEW_LINE>for (String ha : hostAliasesFromEndpoint) {<NEW_LINE>VirtualHostAliasImpl vhai = new VirtualHostAliasImpl();<NEW_LINE>vhai.init(ha);<NEW_LINE>if (!s_sipConnectorVH_hostAliases.contains(vhai)) {<NEW_LINE>s_sipConnectorVH_hostAliases.add(vhai);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>props.put(HOST_ALIAS_ATTRIBUTE, vhHostAliases);<NEW_LINE>vhConfig.update(props);<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Finish to create SIP connector virtual host for SIP endpoint", props);<NEW_LINE>}<NEW_LINE>}
props.put("id", SIP_CONNECTOR_VH_ID);
602,049
public static void wipePS(ByteBuffer _in, ByteBuffer out, List<ByteBuffer> spsList, List<ByteBuffer> ppsList) {<NEW_LINE>ByteBuffer dup = _in.duplicate();<NEW_LINE>while (dup.hasRemaining()) {<NEW_LINE>ByteBuffer buf = H264Utils.nextNALUnit(dup);<NEW_LINE>if (buf == null)<NEW_LINE>break;<NEW_LINE>NALUnit nu = NALUnit.<MASK><NEW_LINE>if (nu.type == NALUnitType.PPS) {<NEW_LINE>if (ppsList != null)<NEW_LINE>ppsList.add(NIOUtils.duplicate(buf));<NEW_LINE>} else if (nu.type == NALUnitType.SPS) {<NEW_LINE>if (spsList != null)<NEW_LINE>spsList.add(NIOUtils.duplicate(buf));<NEW_LINE>} else if (out != null) {<NEW_LINE>out.putInt(1);<NEW_LINE>out.put(buf);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (out != null)<NEW_LINE>out.flip();<NEW_LINE>}
read(buf.duplicate());
930,261
public void added(Rule rule) {<NEW_LINE>if (!rule.getTags().contains(RULES_TAG)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HueRuleEntry entry = new HueRuleEntry(rule.getName());<NEW_LINE>String desc = rule.getDescription();<NEW_LINE>if (desc != null) {<NEW_LINE>entry.description = desc;<NEW_LINE>}<NEW_LINE>rule.getConditions().stream().filter(c -> c.getTypeUID().equals("hue.ruleCondition")).forEach(c -> {<NEW_LINE>HueRuleEntry.Condition condition = c.getConfiguration().<MASK><NEW_LINE>// address with pattern "/sensors/2/state/buttonevent"<NEW_LINE>String[] parts = condition.address.split("/");<NEW_LINE>if (parts.length < 3) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>entry.conditions.add(condition);<NEW_LINE>});<NEW_LINE>rule.getActions().stream().filter(a -> a.getTypeUID().equals("rules.HttpAction")).forEach(a -> {<NEW_LINE>HueCommand command = RuleUtils.httpActionToHueCommand(cs.ds, a, rule.getName());<NEW_LINE>if (command == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Remove the "/api/{user}" part<NEW_LINE>String[] parts = command.address.split("/");<NEW_LINE>command.address = "/" + String.join("/", Arrays.copyOfRange(parts, 3, parts.length));<NEW_LINE>entry.actions.add(command);<NEW_LINE>});<NEW_LINE>cs.ds.rules.put(rule.getUID(), entry);<NEW_LINE>}
as(HueRuleEntry.Condition.class);
19,681
// ///////////////////////////////////////////////////////////////////////<NEW_LINE>// HACKING section<NEW_LINE>// Let's simulate some hacking that is needed if the framework is unaware<NEW_LINE>// of hotswap agent plugin.<NEW_LINE>// Use this approach only if you cannot or do not want to modify framework<NEW_LINE>// classes to be more "reload" friendly.<NEW_LINE>// ///////////////////////////////////////////////////////////////////////<NEW_LINE>@OnResourceFileEvent(path = PrinterSourceScanner.PRINTER_PROPERTY_FILE, events = FileEvent.MODIFY)<NEW_LINE>public void reloadConfiguration() throws IOException {<NEW_LINE>// get printer internal printSources list and exchange old to new<NEW_LINE>// noinspection unchecked<NEW_LINE>List<PrintSource> currentSource = (List<PrintSource>) ReflectionHelper.get(printerService, "printSources");<NEW_LINE>// we should remove only previously autodiscovered printers, not the manually added ones.<NEW_LINE>currentSource.removeAll(autoDiscoveredPrintSources);<NEW_LINE>// use scanner to load new configuration<NEW_LINE>// modified scanPrintSources method will set autoDiscoveredPrintSources to newly discovered list.<NEW_LINE>currentSource.addAll(new <MASK><NEW_LINE>// refresh cache<NEW_LINE>printerService.refresh();<NEW_LINE>}
PrinterSourceScanner().scanPrintSources());
123,993
private static void pushValue(final V8 v8, final V8Array result, final Object value, final Map<Object, V8Value> cache) {<NEW_LINE>if (value == null) {<NEW_LINE>result.pushUndefined();<NEW_LINE>} else if (value instanceof Integer) {<NEW_LINE>result.push(value);<NEW_LINE>} else if (value instanceof Long) {<NEW_LINE>result.push(new <MASK><NEW_LINE>} else if (value instanceof Double) {<NEW_LINE>result.push(value);<NEW_LINE>} else if (value instanceof Float) {<NEW_LINE>result.push(value);<NEW_LINE>} else if (value instanceof String) {<NEW_LINE>result.push((String) value);<NEW_LINE>} else if (value instanceof Boolean) {<NEW_LINE>result.push(value);<NEW_LINE>} else if (value instanceof TypedArray) {<NEW_LINE>V8TypedArray v8TypedArray = toV8TypedArray(v8, (TypedArray) value, cache);<NEW_LINE>result.push(v8TypedArray);<NEW_LINE>} else if (value instanceof ArrayBuffer) {<NEW_LINE>V8ArrayBuffer v8ArrayBuffer = toV8ArrayBuffer(v8, (ArrayBuffer) value, cache);<NEW_LINE>result.push(v8ArrayBuffer);<NEW_LINE>} else if (value instanceof V8Value) {<NEW_LINE>result.push((V8Value) value);<NEW_LINE>} else if (value instanceof Map) {<NEW_LINE>V8Object object = toV8Object(v8, (Map) value, cache);<NEW_LINE>result.push(object);<NEW_LINE>} else if (value instanceof List) {<NEW_LINE>V8Array array = toV8Array(v8, (List) value, cache);<NEW_LINE>result.push(array);<NEW_LINE>} else {<NEW_LINE>throw new IllegalStateException("Unsupported Object of type: " + value.getClass());<NEW_LINE>}<NEW_LINE>}
Double((Long) value));
1,612,580
public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("informix " + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE>int size = param.getSubSize();<NEW_LINE>if (size == 0) {<NEW_LINE>Object o = param.<MASK><NEW_LINE>if ((o instanceof IfxConn)) {<NEW_LINE>m_ifxConn = (IfxConn) o;<NEW_LINE>return doQuery(null);<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("informix" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Object cli = new Object();<NEW_LINE>Object[] objs = new Object[size - 1];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>if (param.getSub(i) == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("informix" + mm.getMessage("function.invalidParam"));<NEW_LINE>}<NEW_LINE>if (i == 0) {<NEW_LINE>cli = param.getSub(i).getLeafExpression().calculate(ctx);<NEW_LINE>if ((cli instanceof IfxConn)) {<NEW_LINE>m_ifxConn = (IfxConn) cli;<NEW_LINE>} else {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("informix" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>objs[i - 1] = param.getSub(i).getLeafExpression().calculate(ctx);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (m_ifxConn == null) {<NEW_LINE>throw new RQException("read is null");<NEW_LINE>}<NEW_LINE>if (objs.length < 1) {<NEW_LINE>throw new RQException("informix param is empty");<NEW_LINE>}<NEW_LINE>return doQuery(objs);<NEW_LINE>}
getLeafExpression().calculate(ctx);
1,816,089
public PCollection<KV<ShardedKey<K>, Iterable<InputT>>> expand(PCollection<KV<K, InputT>> input) {<NEW_LINE>checkArgument(input.getCoder() instanceof KvCoder, "coder specified in the input PCollection is not a KvCoder");<NEW_LINE>KvCoder<K, InputT> inputCoder = (KvCoder<K, InputT>) input.getCoder();<NEW_LINE>Coder<K> keyCoder = (Coder<K>) inputCoder.<MASK><NEW_LINE>Coder<InputT> valueCoder = (Coder<InputT>) inputCoder.getCoderArguments().get(1);<NEW_LINE>return input.apply(MapElements.via(new SimpleFunction<KV<K, InputT>, KV<ShardedKey<K>, InputT>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public KV<ShardedKey<K>, InputT> apply(KV<K, InputT> input) {<NEW_LINE>long tid = Thread.currentThread().getId();<NEW_LINE>ByteBuffer buffer = ByteBuffer.allocate(3 * Long.BYTES);<NEW_LINE>buffer.putLong(workerUuid.getMostSignificantBits());<NEW_LINE>buffer.putLong(workerUuid.getLeastSignificantBits());<NEW_LINE>buffer.putLong(tid);<NEW_LINE>return KV.of(ShardedKey.of(input.getKey(), buffer.array()), input.getValue());<NEW_LINE>}<NEW_LINE>})).setCoder(KvCoder.of(ShardedKey.Coder.of(keyCoder), valueCoder)).apply(new GroupIntoBatches<>(getBatchingParams()));<NEW_LINE>}
getCoderArguments().get(0);
111,219
public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>overridePendingTransition(0, 0);<NEW_LINE>SharedPreferences sharedPrefs = getSharedPreferences("com.klinker.android.twitter_world_preferences", 0);<NEW_LINE>int currentAccount = sharedPrefs.getInt("current_account", 1);<NEW_LINE>int page = 0;<NEW_LINE>for (int i = 0; i < TimelinePagerAdapter.MAX_EXTRA_PAGES; i++) {<NEW_LINE>String pageIdentifier = "account_" + currentAccount + "_page_" + (i + 1);<NEW_LINE>int type = sharedPrefs.<MASK><NEW_LINE>if (type == AppSettings.PAGE_TYPE_ACTIVITY) {<NEW_LINE>page = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Intent mentions = new Intent(this, MainActivity.class);<NEW_LINE>sharedPrefs.edit().putBoolean("open_a_page", true).commit();<NEW_LINE>sharedPrefs.edit().putInt("open_what_page", page).commit();<NEW_LINE>finish();<NEW_LINE>overridePendingTransition(0, 0);<NEW_LINE>startActivity(mentions);<NEW_LINE>}
getInt(pageIdentifier, AppSettings.PAGE_TYPE_NONE);
1,064,408
public QuranRow fromBookmark(Context context, Bookmark bookmark, Long tagId) {<NEW_LINE>final QuranRow.Builder builder = new QuranRow.Builder();<NEW_LINE>if (bookmark.isPageBookmark()) {<NEW_LINE>final int sura = quranInfo.getSuraNumberFromPage(bookmark.getPage());<NEW_LINE>builder.withText(quranDisplayData.getSuraNameString(context, bookmark.getPage())).withMetadata(quranDisplayData.getPageSubtitle(context, bookmark.getPage())).withType(QuranRow.PAGE_BOOKMARK).withBookmark(bookmark).withDate(bookmark.getTimestamp()).withSura(sura).withImageResource(R.drawable.ic_favorite);<NEW_LINE>} else {<NEW_LINE>String ayahText = bookmark.getAyahText();<NEW_LINE>final String title;<NEW_LINE>final String metadata;<NEW_LINE>if (ayahText == null) {<NEW_LINE>title = quranDisplayData.getAyahString(bookmark.getSura(), <MASK><NEW_LINE>metadata = quranDisplayData.getPageSubtitle(context, bookmark.getPage());<NEW_LINE>} else {<NEW_LINE>title = ayahText;<NEW_LINE>metadata = quranDisplayData.getAyahMetadata(bookmark.getSura(), bookmark.getAyah(), bookmark.getPage(), context);<NEW_LINE>}<NEW_LINE>builder.withText(title).withMetadata(metadata).withType(QuranRow.AYAH_BOOKMARK).withBookmark(bookmark).withDate(bookmark.getTimestamp()).withImageResource(R.drawable.ic_favorite).withImageOverlayColor(ContextCompat.getColor(context, R.color.ayah_bookmark_color));<NEW_LINE>}<NEW_LINE>if (tagId != null) {<NEW_LINE>builder.withTagId(tagId);<NEW_LINE>}<NEW_LINE>return builder.build();<NEW_LINE>}
bookmark.getAyah(), context);
1,544,422
public void writeField(FieldInfo fieldInfo, PointsReader reader) throws IOException {<NEW_LINE>PointValues.PointTree values = reader.getValues(<MASK><NEW_LINE>BKDConfig config = new BKDConfig(fieldInfo.getPointDimensionCount(), fieldInfo.getPointIndexDimensionCount(), fieldInfo.getPointNumBytes(), maxPointsInLeafNode);<NEW_LINE>try (BKDWriter writer = new BKDWriter(writeState.segmentInfo.maxDoc(), writeState.directory, writeState.segmentInfo.name, config, maxMBSortInHeap, values.size())) {<NEW_LINE>if (values instanceof MutablePointTree) {<NEW_LINE>Runnable finalizer = writer.writeField(metaOut, indexOut, dataOut, fieldInfo.name, (MutablePointTree) values);<NEW_LINE>if (finalizer != null) {<NEW_LINE>metaOut.writeInt(fieldInfo.number);<NEW_LINE>finalizer.run();<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>values.visitDocValues(new IntersectVisitor() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void visit(int docID) {<NEW_LINE>throw new IllegalStateException();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void visit(int docID, byte[] packedValue) throws IOException {<NEW_LINE>writer.add(packedValue, docID);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Relation compare(byte[] minPackedValue, byte[] maxPackedValue) {<NEW_LINE>return Relation.CELL_CROSSES_QUERY;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>// We could have 0 points on merge since all docs with dimensional fields may be deleted:<NEW_LINE>Runnable finalizer = writer.finish(metaOut, indexOut, dataOut);<NEW_LINE>if (finalizer != null) {<NEW_LINE>metaOut.writeInt(fieldInfo.number);<NEW_LINE>finalizer.run();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
fieldInfo.name).getPointTree();
389,946
public boolean isTriggerActive(IStatementContainer container, IStatementParameter[] parameters) {<NEW_LINE>if (!(container instanceof IGate) || parameters.length < 1 || !(parameters[0] instanceof StatementParameterRedstoneLevel)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int level = ((StatementParameterRedstoneLevel) parameters[0]).level;<NEW_LINE>IGate gate = (IGate) container;<NEW_LINE>TileGenericPipe tile = (TileGenericPipe) gate.getPipe().getTile();<NEW_LINE>int inputLevel = tile.redstoneInput;<NEW_LINE>if (parameters.length > 1 && parameters[1] instanceof StatementParamGateSideOnly && ((StatementParamGateSideOnly) parameters[1]).isOn) {<NEW_LINE>inputLevel = tile.redstoneInputSide[gate.<MASK><NEW_LINE>}<NEW_LINE>switch(mode) {<NEW_LINE>case LESS:<NEW_LINE>return inputLevel < level;<NEW_LINE>case EQUAL:<NEW_LINE>default:<NEW_LINE>return inputLevel == level;<NEW_LINE>case GREATER:<NEW_LINE>return inputLevel > level;<NEW_LINE>}<NEW_LINE>}
getSide().ordinal()];
271,609
/* (non-Javadoc)<NEW_LINE>* @see org.docx4j.openpackaging.parts.WordprocessingML.AltChunkInterface#addAltChunkOfTypeHTML(java.io.InputStream)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public AlternativeFormatInputPart addAltChunk(AltChunkType type, InputStream is, int index) throws Docx4JException {<NEW_LINE>AlternativeFormatInputPart afiPart = new AlternativeFormatInputPart(type);<NEW_LINE>Relationship altChunkRel = this.addTargetPart(afiPart, AddPartBehaviour.RENAME_IF_NAME_EXISTS);<NEW_LINE>// now that its attached to the package ..<NEW_LINE>afiPart.registerInContentTypeManager();<NEW_LINE>afiPart.setBinaryData(is);<NEW_LINE>// .. the bit in document body<NEW_LINE>CTAltChunk ac = Context.getWmlObjectFactory().createCTAltChunk();<NEW_LINE>ac.setId(altChunkRel.getId());<NEW_LINE>if (this instanceof ContentAccessor) {<NEW_LINE>if (index < 0) {<NEW_LINE>((ContentAccessor) this).getContent().add(ac);<NEW_LINE>} else {<NEW_LINE>((ContentAccessor) this).getContent().add(index, ac);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>throw new Docx4JException(this.getClass(<MASK><NEW_LINE>}<NEW_LINE>return afiPart;<NEW_LINE>}
).getName() + " doesn't implement ContentAccessor");
1,006,502
// Throws a RuntimeException if failed trade cannot be changed to OPEN for any reason.<NEW_LINE>private void verifyCanUnfailTrade(Trade failedTrade) {<NEW_LINE>if (tradeUtil.getTradeAddresses(failedTrade) == null)<NEW_LINE>throw new IllegalStateException(format("cannot change failed trade to open because no trade addresses found for '%s'"<MASK><NEW_LINE>if (!failedTradesManager.hasDepositTx(failedTrade))<NEW_LINE>throw new IllegalStateException(format("cannot change failed trade to open, no deposit tx found for '%s'", failedTrade.getId()));<NEW_LINE>if (!failedTradesManager.hasDelayedPayoutTxBytes(failedTrade))<NEW_LINE>throw new IllegalStateException(format("cannot change failed trade to open, no delayed payout tx found for '%s'", failedTrade.getId()));<NEW_LINE>failedTradesManager.getBlockingTradeIds(failedTrade).ifPresent(tradeIds -> {<NEW_LINE>throw new IllegalStateException(format("cannot change failed trade '%s' to open at this time," + "%ntry again after completing trade(s):%n\t%s", failedTrade.getId(), String.join(", ", tradeIds)));<NEW_LINE>});<NEW_LINE>}
, failedTrade.getId()));
1,774,813
public static void plus(IntIterableRangeSet setr, IntIterableRangeSet set1, int l, int u) {<NEW_LINE>setr.clear();<NEW_LINE>int <MASK><NEW_LINE>if (s1 > 0 && l <= u) {<NEW_LINE>int k = 0;<NEW_LINE>setr.grow(set1.SIZE);<NEW_LINE>int lb = set1.ELEMENTS[0] + l;<NEW_LINE>int ub = set1.ELEMENTS[1] + u;<NEW_LINE>for (; k < s1; k++) {<NEW_LINE>int _lb = set1.ELEMENTS[k << 1] + l;<NEW_LINE>if (lb <= _lb && _lb <= ub + 1) {<NEW_LINE>ub = Math.max(set1.ELEMENTS[(k << 1) + 1] + u, ub);<NEW_LINE>} else {<NEW_LINE>setr.pushRange(lb, ub);<NEW_LINE>lb = set1.ELEMENTS[k << 1] + l;<NEW_LINE>ub = set1.ELEMENTS[(k << 1) + 1] + u;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setr.pushRange(lb, ub);<NEW_LINE>}<NEW_LINE>}
s1 = set1.SIZE >> 1;
1,124,232
public static IndexOrdinalsFieldData buildEmpty(IndexReader indexReader, IndexOrdinalsFieldData indexFieldData) throws IOException {<NEW_LINE>assert indexReader.leaves().size() > 1;<NEW_LINE>final LeafOrdinalsFieldData[] atomicFD = new LeafOrdinalsFieldData[indexReader.leaves().size()];<NEW_LINE>final SortedSetDocValues[] subs = new SortedSetDocValues[indexReader.<MASK><NEW_LINE>for (int i = 0; i < indexReader.leaves().size(); ++i) {<NEW_LINE>atomicFD[i] = new AbstractLeafOrdinalsFieldData(AbstractLeafOrdinalsFieldData.DEFAULT_SCRIPT_FUNCTION) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public SortedSetDocValues getOrdinalsValues() {<NEW_LINE>return DocValues.emptySortedSet();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public long ramBytesUsed() {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Collection<Accountable> getChildResources() {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void close() {<NEW_LINE>}<NEW_LINE>};<NEW_LINE>subs[i] = atomicFD[i].getOrdinalsValues();<NEW_LINE>}<NEW_LINE>final OrdinalMap ordinalMap = OrdinalMap.build(null, subs, PackedInts.DEFAULT);<NEW_LINE>return new GlobalOrdinalsIndexFieldData(indexFieldData.getFieldName(), indexFieldData.getValuesSourceType(), atomicFD, ordinalMap, 0, AbstractLeafOrdinalsFieldData.DEFAULT_SCRIPT_FUNCTION);<NEW_LINE>}
leaves().size()];
707,468
private void registerStandardImportProcesses() {<NEW_LINE>final IImportProcessFactory importProcessesFactory = Services.get(IImportProcessFactory.class);<NEW_LINE>importProcessesFactory.registerImportProcess(I_I_BPartner.class, BPartnerImportProcess.class);<NEW_LINE>importProcessesFactory.registerImportProcess(I_I_User.class, ADUserImportProcess.class);<NEW_LINE>importProcessesFactory.registerImportProcess(I_I_Product.class, ProductImportProcess.class);<NEW_LINE>importProcessesFactory.registerImportProcess(I_I_Request.class, RequestImportProcess.class);<NEW_LINE>importProcessesFactory.registerImportProcess(I_I_DiscountSchema.class, DiscountSchemaImportProcess.class);<NEW_LINE>importProcessesFactory.registerImportProcess(I_I_BPartner_GlobalID.class, BPartnerGlobalIDImportProcess.class);<NEW_LINE>importProcessesFactory.registerImportProcess(<MASK><NEW_LINE>importProcessesFactory.registerImportProcess(I_I_Postal.class, PostalCodeImportProcess.class);<NEW_LINE>importProcessesFactory.registerImportProcess(I_I_DataEntry_Record.class, DataEntryRecordsImportProcess.class);<NEW_LINE>}
I_I_Replenish.class, ReplenishmentImportProcess.class);
1,541,389
public void initialize(ExtensionContext context) {<NEW_LINE>if (initialized) {<NEW_LINE>Monitor monitor = context.getMonitor();<NEW_LINE>monitor.severe(() -> "SpotifyTransferExtension already initialized");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>AppCredentials appCredentials;<NEW_LINE>try {<NEW_LINE>appCredentials = context.getService(AppCredentialStore.class).getAppCredentials("SPOTIFY_KEY", "SPOTIFY_SECRET");<NEW_LINE>} catch (IOException e) {<NEW_LINE>Monitor monitor = context.getMonitor();<NEW_LINE>monitor.info(() -> "Unable to retrieve Spotify AppCredentials. " + "Did you set SPOTIFY_KEY and SPOTIFY_SECRET?");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Monitor monitor = context.getMonitor();<NEW_LINE>SpotifyApi spotifyApi = new SpotifyApi.Builder().setClientId(appCredentials.getKey()).setClientSecret(appCredentials.<MASK><NEW_LINE>exporter = new SpotifyPlaylistExporter(monitor, spotifyApi);<NEW_LINE>importer = new SpotifyPlaylistImporter(monitor, spotifyApi);<NEW_LINE>initialized = true;<NEW_LINE>}
getSecret()).build();
1,688,755
private void checkAuthnStatement(List<AuthnStatement> authnStatements) {<NEW_LINE>if (authnStatements.size() != 1) {<NEW_LINE>throw samlException("SAML Assertion subject contains [{}] Authn Statements while exactly one was expected.", authnStatements.size());<NEW_LINE>}<NEW_LINE>final AuthnStatement authnStatement = authnStatements.get(0);<NEW_LINE>// "past now" that is now - the maximum skew we will tolerate. Essentially "if our clock is 2min fast, what time is it now?"<NEW_LINE>final Instant now = now();<NEW_LINE>final Instant pastNow = now.minusMillis(maxSkewInMillis());<NEW_LINE>if (authnStatement.getSessionNotOnOrAfter() != null && pastNow.isBefore(authnStatement.getSessionNotOnOrAfter()) == false) {<NEW_LINE>throw samlException("Rejecting SAML assertion's Authentication Statement because [{}] is on/after [{}]", pastNow, authnStatement.getSessionNotOnOrAfter());<NEW_LINE>}<NEW_LINE>List<String> reqAuthnCtxClassRef = this.getSpConfiguration().getReqAuthnCtxClassRef();<NEW_LINE>if (reqAuthnCtxClassRef.isEmpty() == false) {<NEW_LINE>String authnCtxClassRefValue = null;<NEW_LINE>if (authnStatement.getAuthnContext() != null && authnStatement.getAuthnContext().getAuthnContextClassRef() != null) {<NEW_LINE>authnCtxClassRefValue = authnStatement.getAuthnContext()<MASK><NEW_LINE>}<NEW_LINE>if (Strings.isNullOrEmpty(authnCtxClassRefValue) || reqAuthnCtxClassRef.contains(authnCtxClassRefValue) == false) {<NEW_LINE>throw samlException("Rejecting SAML assertion as the AuthnContextClassRef [{}] is not one of the ({}) that were " + "requested in the corresponding AuthnRequest", authnCtxClassRefValue, reqAuthnCtxClassRef);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
.getAuthnContextClassRef().getURI();
879,216
protected String rrToString() {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(alg);<NEW_LINE>sb.append(" ");<NEW_LINE>if (Options.check("multiline")) {<NEW_LINE>sb.append("(\n\t");<NEW_LINE>}<NEW_LINE>sb.append(FormattedTime.format(timeInception));<NEW_LINE>sb.append(" ");<NEW_LINE>sb.append(FormattedTime.format(timeExpire));<NEW_LINE>sb.append(" ");<NEW_LINE>sb.append(modeString());<NEW_LINE>sb.append(" ");<NEW_LINE>sb.append(Rcode.TSIGstring(error));<NEW_LINE>if (Options.check("multiline")) {<NEW_LINE>sb.append("\n");<NEW_LINE>if (key != null) {<NEW_LINE>sb.append(base64.formatString(key<MASK><NEW_LINE>sb.append("\n");<NEW_LINE>}<NEW_LINE>if (other != null) {<NEW_LINE>sb.append(base64.formatString(other, 64, "\t", false));<NEW_LINE>}<NEW_LINE>sb.append(" )");<NEW_LINE>} else {<NEW_LINE>sb.append(" ");<NEW_LINE>if (key != null) {<NEW_LINE>sb.append(base64.toString(key));<NEW_LINE>sb.append(" ");<NEW_LINE>}<NEW_LINE>if (other != null) {<NEW_LINE>sb.append(base64.toString(other));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return sb.toString();<NEW_LINE>}
, 64, "\t", false));
244,003
public ObjectInstance createMBean(String className, ObjectName name, ObjectName loaderName, Object[] params, String[] signature) throws ReflectionException, InstanceAlreadyExistsException, MBeanRegistrationException, MBeanException, NotCompliantMBeanException, InstanceNotFoundException {<NEW_LINE>ObjectInstance oi = null;<NEW_LINE>try {<NEW_LINE>oi = super.createMBean(className, name, loaderName, params, signature);<NEW_LINE>emitJMXMBeanCreateAction(name, className, loaderName, params, signature, "createMBean", "success", "Successful create of MBean");<NEW_LINE>} catch (ReflectionException e) {<NEW_LINE>emitJMXMBeanCreateAction(name, className, loaderName, params, <MASK><NEW_LINE>throw e;<NEW_LINE>} catch (InstanceAlreadyExistsException e) {<NEW_LINE>emitJMXMBeanCreateAction(name, className, loaderName, params, signature, "createMBean", "failure", "Instance of MBean already exists");<NEW_LINE>throw e;<NEW_LINE>} catch (MBeanRegistrationException e) {<NEW_LINE>emitJMXMBeanCreateAction(name, className, loaderName, params, signature, "createMBean", "failure", "MBean registration failure");<NEW_LINE>throw e;<NEW_LINE>} catch (MBeanException e) {<NEW_LINE>emitJMXMBeanCreateAction(name, className, loaderName, params, signature, "createMBean", "failure", "MBean constructor exception");<NEW_LINE>throw e;<NEW_LINE>} catch (NotCompliantMBeanException e) {<NEW_LINE>emitJMXMBeanCreateAction(name, className, loaderName, params, signature, "createMBean", "failure", "Not compliant MBean");<NEW_LINE>throw e;<NEW_LINE>}<NEW_LINE>return oi;<NEW_LINE>}
signature, "createMBean", "failure", "Class definition not found for MBean");
1,429,632
public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE><MASK><NEW_LINE>get_scanner_result result = new get_scanner_result();<NEW_LINE>if (e instanceof org.apache.thrift.transport.TTransportException) {<NEW_LINE>_LOGGER.error("TTransportException inside handler", e);<NEW_LINE>fb.close();<NEW_LINE>return;<NEW_LINE>} else if (e instanceof org.apache.thrift.TApplicationException) {<NEW_LINE>_LOGGER.error("TApplicationException inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = (org.apache.thrift.TApplicationException) e;<NEW_LINE>} else {<NEW_LINE>_LOGGER.error("Exception inside handler", e);<NEW_LINE>msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;<NEW_LINE>msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>fcall.sendResponse(fb, msg, msgType, seqid);<NEW_LINE>} catch (java.lang.Exception ex) {<NEW_LINE>_LOGGER.error("Exception writing to internal frame buffer", ex);<NEW_LINE>fb.close();<NEW_LINE>}<NEW_LINE>}
org.apache.thrift.TSerializable msg;
132,203
final DeleteIntegrationAssociationResult executeDeleteIntegrationAssociation(DeleteIntegrationAssociationRequest deleteIntegrationAssociationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteIntegrationAssociationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteIntegrationAssociationRequest> request = null;<NEW_LINE>Response<DeleteIntegrationAssociationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteIntegrationAssociationRequestProtocolMarshaller(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, "Connect");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteIntegrationAssociation");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteIntegrationAssociationResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteIntegrationAssociationResultJsonUnmarshaller());<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(deleteIntegrationAssociationRequest));
554,950
private void onDeleteClickeddialogtext(String reason) {<NEW_LINE>applicationKvStore.putBoolean(String.format(NOMINATING_FOR_DELETION_MEDIA, media.getImageUrl()), true);<NEW_LINE>enableProgressBar();<NEW_LINE>Single<Boolean> resultSingletext = reasonBuilder.getReason(media, reason).flatMap(reasonString -> deleteHelper.makeDeletion(getContext<MASK><NEW_LINE>resultSingletext.subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(s -> {<NEW_LINE>if (applicationKvStore.getBoolean(String.format(NOMINATING_FOR_DELETION_MEDIA, media.getImageUrl()), false)) {<NEW_LINE>applicationKvStore.remove(String.format(NOMINATING_FOR_DELETION_MEDIA, media.getImageUrl()));<NEW_LINE>callback.nominatingForDeletion(index);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(), media, reason));
1,617,331
private BLangBlockStmt rewriteNestedOnFail(BLangOnFailClause onFailClause, BLangFail fail) {<NEW_LINE>BLangOnFailClause currentOnFail = this.onFailClause;<NEW_LINE>BLangBlockStmt onFailBody = ASTBuilderUtil.createBlockStmt(onFailClause.pos);<NEW_LINE>onFailBody.stmts.addAll(onFailClause.body.stmts);<NEW_LINE>onFailBody.scope = onFailClause.body.scope;<NEW_LINE>onFailBody.mapSymbol = onFailClause.body.mapSymbol;<NEW_LINE>onFailBody.failureBreakMode = onFailClause.body.failureBreakMode;<NEW_LINE>BVarSymbol onFailErrorVariableSymbol = ((BLangSimpleVariableDef) onFailClause.variableDefinitionNode).var.symbol;<NEW_LINE>BLangSimpleVariable errorVar = ASTBuilderUtil.createVariable(onFailErrorVariableSymbol.pos, onFailErrorVariableSymbol.name.value, onFailErrorVariableSymbol.type, rewrite(fail.expr, env), onFailErrorVariableSymbol);<NEW_LINE>BLangSimpleVariableDef errorVarDef = ASTBuilderUtil.createVariableDef(onFailClause.pos, errorVar);<NEW_LINE>onFailBody.scope.define(onFailErrorVariableSymbol.name, onFailErrorVariableSymbol);<NEW_LINE>onFailBody.<MASK><NEW_LINE>int currentOnFailIndex = this.enclosingOnFailClause.indexOf(this.onFailClause);<NEW_LINE>int enclosingOnFailIndex = currentOnFailIndex <= 0 ? this.enclosingOnFailClause.size() - 1 : (currentOnFailIndex - 1);<NEW_LINE>this.onFailClause = this.enclosingOnFailClause.get(enclosingOnFailIndex);<NEW_LINE>onFailBody = rewrite(onFailBody, env);<NEW_LINE>BLangFail failToEndBlock = new BLangFail();<NEW_LINE>if (onFailClause.isInternal && fail.exprStmt != null) {<NEW_LINE>if (fail.exprStmt instanceof BLangPanic) {<NEW_LINE>setPanicErrorToTrue(onFailBody, onFailClause);<NEW_LINE>} else {<NEW_LINE>onFailBody.stmts.add((BLangStatement) fail.exprStmt);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (onFailClause.bodyContainsFail && !onFailClause.isInternal) {<NEW_LINE>onFailBody.stmts.add(failToEndBlock);<NEW_LINE>}<NEW_LINE>this.onFailClause = currentOnFail;<NEW_LINE>return onFailBody;<NEW_LINE>}
stmts.add(0, errorVarDef);
476,960
public ChannelActivity unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ChannelActivity channelActivity = new ChannelActivity();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("name", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>channelActivity.setName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("channelName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>channelActivity.setChannelName(context.getUnmarshaller(String.<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("next", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>channelActivity.setNext(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 channelActivity;<NEW_LINE>}
class).unmarshall(context));
224,559
private void saveIntIntRows(ServerPartition part, ServerRow[] rows, MatrixPartitionMeta partMeta, PSMatrixSaveContext saveContext, DataOutputStream output) throws IOException {<NEW_LINE>Vector vec = ServerRowUtils.getVector((ServerIntIntRow) rows[0]);<NEW_LINE>// int size = rows.size();<NEW_LINE>int indexOffset = (int) part.getPartitionKey().getStartCol();<NEW_LINE>IntIntVectorStorage storage = ((<MASK><NEW_LINE>IntIntsCol col = new IntIntsCol(0, new int[rows.length]);<NEW_LINE>int startCol = (int) rows[0].getStartCol();<NEW_LINE>int endCol = (int) rows[0].getEndCol();<NEW_LINE>if (storage.isDense()) {<NEW_LINE>for (int i = startCol; i < endCol; i++) {<NEW_LINE>col.colId = i;<NEW_LINE>for (int j = 0; j < rows.length; j++) {<NEW_LINE>col.colElems[j] = ((ServerIntIntRow) (rows[j])).get(col.colId);<NEW_LINE>}<NEW_LINE>save(col, output);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (saveContext.sortFirst()) {<NEW_LINE>int[] indices = storage.getIndices();<NEW_LINE>Sort.quickSort(indices, 0, indices.length - 1);<NEW_LINE>for (int i = 0; i < indices.length; i++) {<NEW_LINE>col.colId = indices[i] + indexOffset;<NEW_LINE>for (int j = 0; j < rows.length; j++) {<NEW_LINE>col.colElems[j] = ((ServerIntIntRow) (rows[j])).get(col.colId);<NEW_LINE>}<NEW_LINE>save(col, output);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>ObjectIterator<Int2IntMap.Entry> iter = storage.entryIterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>col.colId = iter.next().getIntKey() + indexOffset;<NEW_LINE>for (int j = 0; j < rows.length; j++) {<NEW_LINE>col.colElems[j] = ((ServerIntIntRow) (rows[j])).get(col.colId);<NEW_LINE>}<NEW_LINE>save(col, output);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
IntIntVector) vec).getStorage();
1,513,071
public static void deleteLocalInstructionComment(final SQLProvider provider, final INaviCodeNode codeNode, final INaviInstruction instruction, final Integer commentId, final Integer userId) throws CouldntDeleteException {<NEW_LINE>Preconditions.checkNotNull(codeNode, "IE02432: codeNode argument can not be null");<NEW_LINE>Preconditions.checkNotNull(provider, "IE02433: provider argument can not be null");<NEW_LINE>Preconditions.checkNotNull(instruction, "IE02434: instruction argument can not be null");<NEW_LINE>Preconditions.checkNotNull(commentId, "IE02435: comment argument can not be null");<NEW_LINE>Preconditions.checkNotNull(userId, "IE02436: userId argument can not be null");<NEW_LINE>final String function = " { ? = call delete_local_instruction_comment(?, ?, ?, ?, ?) } ";<NEW_LINE>try {<NEW_LINE>final CallableStatement deleteCommentStatement = provider.getConnection().getConnection().prepareCall(function);<NEW_LINE>try {<NEW_LINE>deleteCommentStatement.<MASK><NEW_LINE>deleteCommentStatement.setInt(2, instruction.getModule().getConfiguration().getId());<NEW_LINE>deleteCommentStatement.setInt(3, codeNode.getId());<NEW_LINE>deleteCommentStatement.setObject(4, instruction.getAddress().toBigInteger(), Types.BIGINT);<NEW_LINE>deleteCommentStatement.setInt(5, commentId);<NEW_LINE>deleteCommentStatement.setInt(6, userId);<NEW_LINE>deleteCommentStatement.execute();<NEW_LINE>deleteCommentStatement.getInt(1);<NEW_LINE>if (deleteCommentStatement.wasNull()) {<NEW_LINE>throw new IllegalArgumentException("Error: the comment id returned from the database was null");<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>deleteCommentStatement.close();<NEW_LINE>}<NEW_LINE>} catch (final SQLException exception) {<NEW_LINE>throw new CouldntDeleteException(exception);<NEW_LINE>}<NEW_LINE>}
registerOutParameter(1, Types.INTEGER);
1,141,313
public static List<SingleDml> dml2SingleDmls(Dml dml, boolean caseInsensitive) {<NEW_LINE>List<SingleDml> singleDmls = new ArrayList<>();<NEW_LINE>if (dml.getData() != null) {<NEW_LINE>int size = dml.getData().size();<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>SingleDml singleDml = new SingleDml();<NEW_LINE>singleDml.setDestination(dml.getDestination());<NEW_LINE>singleDml.setDatabase(dml.getDatabase());<NEW_LINE>singleDml.setTable(dml.getTable());<NEW_LINE>singleDml.setType(dml.getType());<NEW_LINE>Map<String, Object> data = dml.getData().get(i);<NEW_LINE>if (caseInsensitive) {<NEW_LINE>data = toCaseInsensitiveMap(data);<NEW_LINE>}<NEW_LINE>singleDml.setData(data);<NEW_LINE>if (dml.getOld() != null) {<NEW_LINE>Map<String, Object> oldData = dml.<MASK><NEW_LINE>if (caseInsensitive) {<NEW_LINE>oldData = toCaseInsensitiveMap(oldData);<NEW_LINE>}<NEW_LINE>singleDml.setOld(oldData);<NEW_LINE>}<NEW_LINE>singleDmls.add(singleDml);<NEW_LINE>}<NEW_LINE>} else if ("TRUNCATE".equalsIgnoreCase(dml.getType())) {<NEW_LINE>SingleDml singleDml = new SingleDml();<NEW_LINE>singleDml.setDestination(dml.getDestination());<NEW_LINE>singleDml.setDatabase(dml.getDatabase());<NEW_LINE>singleDml.setTable(dml.getTable());<NEW_LINE>singleDml.setType(dml.getType());<NEW_LINE>singleDmls.add(singleDml);<NEW_LINE>}<NEW_LINE>return singleDmls;<NEW_LINE>}
getOld().get(i);
254,762
private Mono<PagedResponse<FrontDoorInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><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 apiVersion = "2020-05-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), apiVersion, accept, context)).<PagedResponse<FrontDoorInner>>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()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
1,799,115
public boolean visit(SQLShowColumnsStatement x) {<NEW_LINE>final List<SqlNode> operands = new LinkedList<>();<NEW_LINE>final SqlNode like = convertToSqlNode(x.getLike());<NEW_LINE>final SqlNode where = convertToSqlNode(x.getWhere());<NEW_LINE>final List<SqlSpecialIdentifier> specialIdentifiers = new LinkedList<>();<NEW_LINE>if (x.isFull()) {<NEW_LINE>specialIdentifiers.add(SqlSpecialIdentifier.FULL);<NEW_LINE>}<NEW_LINE>specialIdentifiers.add(SqlSpecialIdentifier.COLUMNS);<NEW_LINE>int tableIndex = -1;<NEW_LINE>final SqlNode table = convertToSqlNode(x.getTable());<NEW_LINE>if (null != table) {<NEW_LINE>operands.add(SqlLiteral.createSymbol(SqlSpecialIdentifier.FROM, SqlParserPos.ZERO));<NEW_LINE>operands.add(table);<NEW_LINE>tableIndex = specialIdentifiers.size() + operands.size() - 1;<NEW_LINE>}<NEW_LINE>int dbIndex = -1;<NEW_LINE>final SqlNode db = <MASK><NEW_LINE>if (null != db) {<NEW_LINE>operands.add(SqlLiteral.createSymbol(SqlSpecialIdentifier.FROM, SqlParserPos.ZERO));<NEW_LINE>operands.add(db);<NEW_LINE>dbIndex = specialIdentifiers.size() + operands.size() - 1;<NEW_LINE>}<NEW_LINE>this.sqlNode = new SqlShow(SqlParserPos.ZERO, specialIdentifiers, operands, like, where, null, null, tableIndex, dbIndex, true);<NEW_LINE>return false;<NEW_LINE>}
convertToSqlNode(x.getDatabase());
968,375
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {<NEW_LINE>super.onCreatePreferences(savedInstanceState, rootKey);<NEW_LINE>addPreferencesFromResource(R.xml.preferences_behavior);<NEW_LINE>Preference copyOnTapPreference = findPreference("pref_copy_on_tap");<NEW_LINE>copyOnTapPreference.setOnPreferenceChangeListener((preference, newValue) -> {<NEW_LINE>getResult(<MASK><NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>Preference entryHighlightPreference = findPreference("pref_highlight_entry");<NEW_LINE>entryHighlightPreference.setOnPreferenceChangeListener((preference, newValue) -> {<NEW_LINE>getResult().putExtra("needsRefresh", true);<NEW_LINE>_entryPausePreference.setEnabled(_prefs.isTapToRevealEnabled() || (boolean) newValue);<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>_entryPausePreference = findPreference("pref_pause_entry");<NEW_LINE>_entryPausePreference.setOnPreferenceChangeListener((preference, newValue) -> {<NEW_LINE>getResult().putExtra("needsRefresh", true);<NEW_LINE>return true;<NEW_LINE>});<NEW_LINE>_entryPausePreference.setEnabled(_prefs.isTapToRevealEnabled() || _prefs.isEntryHighlightEnabled());<NEW_LINE>}
).putExtra("needsRefresh", true);
1,735,069
public double score(DataPoint x) {<NEW_LINE>IntList knn = new IntList(minPnts);<NEW_LINE>DoubleList dists = new DoubleList(minPnts);<NEW_LINE>vc.search(x.getNumericalValues(), minPnts, knn, dists);<NEW_LINE>double e_pdist = 0;<NEW_LINE>double stndDist_q = 0;<NEW_LINE>for (int i_indx = 0; i_indx < minPnts; i_indx++) {<NEW_LINE>int neighbor = knn.get(i_indx);<NEW_LINE>double dist = dists.get(i_indx);<NEW_LINE>e_pdist += standard_distance[neighbor];<NEW_LINE>stndDist_q += dist * dist;<NEW_LINE>}<NEW_LINE>// lrd_x now has the local reachability distance of the query x<NEW_LINE>stndDist_q = Math.sqrt(stndDist_q / minPnts + 1e-6);<NEW_LINE>// normalize pdist of neighbors<NEW_LINE>e_pdist /= minPnts;<NEW_LINE>double plof_os = stndDist_q / e_pdist - 1;<NEW_LINE>double loop = Math.max(0, SpecialMath.erf(plof_os / (lambda * nPLOF * Math<MASK><NEW_LINE>// loop, > 1/2 indicates outlier, <= 1/2 indicates inlier.<NEW_LINE>// to map to interface (negative = outlier), -1*(loop-1/2)<NEW_LINE>return -(loop - 0.5);<NEW_LINE>}
.sqrt(2))));
696,246
public GroupLevelInfo display(ProblemReport report) {<NEW_LINE>Machine machine = report.getMachines().get(m_model.getIpAddress());<NEW_LINE>if (machine == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Collection<Entity> entities = machine.getEntities().values();<NEW_LINE>for (Entity entity : entities) {<NEW_LINE>Map<String, JavaThread> threads = entity.getThreads();<NEW_LINE>for (java.util.Map.Entry<String, JavaThread> entry : threads.entrySet()) {<NEW_LINE>JavaThread thread = entry.getValue();<NEW_LINE>String groupName = thread.getGroupName();<NEW_LINE>GroupStatistics <MASK><NEW_LINE>statistics.add(thread.getSegments(), entity.getType());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long currentTimeMillis = System.currentTimeMillis();<NEW_LINE>long currentHours = currentTimeMillis - currentTimeMillis % (60 * 60 * 1000);<NEW_LINE>if (currentHours == m_model.getLongDate()) {<NEW_LINE>for (int i = m_minutes; i >= 0; i--) {<NEW_LINE>m_datas.add(getShowDetailByMinte(i));<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>for (int i = 0; i <= m_minutes; i++) {<NEW_LINE>m_datas.add(getShowDetailByMinte(i));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
statistics = findOrCreatGroupStatistics(groupName, m_minutes);
364,254
private Optional<X509Certificate> parseUrlEncodedPem(String urlEncodedPem) {<NEW_LINE>String certPem;<NEW_LINE>try {<NEW_LINE>certPem = URLDecoder.decode(urlEncodedPem, UTF_8);<NEW_LINE>} catch (NullPointerException | IllegalArgumentException e) {<NEW_LINE>logger.warn(format("Unable to decode url-encoded certificate from %s header", XFCC_HEADER_NAME), e);<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>CertificateFactory cf;<NEW_LINE>try {<NEW_LINE>cf = CertificateFactory.getInstance("X.509");<NEW_LINE>} catch (CertificateException e) {<NEW_LINE>// Should never happen (X.509 supported by default)<NEW_LINE>logger.error("Unexpected error: Unable to get X.509 certificate factory");<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>X509Certificate cert;<NEW_LINE>try {<NEW_LINE>cert = (X509Certificate) cf.generateCertificate(new ByteArrayInputStream(certPem.getBytes(UTF_8)));<NEW_LINE>} catch (CertificateException e) {<NEW_LINE>// Certificate must have been invalid<NEW_LINE>logger.warn(format<MASK><NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>return Optional.of(cert);<NEW_LINE>}
("Failed to parse client certificate from %s header", XFCC_HEADER_NAME), e);
888,138
public com.amazonaws.services.simpleemailv2.model.BadRequestException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simpleemailv2.model.BadRequestException badRequestException = new com.amazonaws.services.simpleemailv2.model.BadRequestException(null);<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return badRequestException;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
1,693,854
private void initCacheStrategyButton() {<NEW_LINE>mLayoutCacheStrategy = (RadioSelectView) findViewById(R.id.liveplayer_rsv_cache_strategy);<NEW_LINE>mImageCacheStrategyShadow = (ImageView) findViewById(R.id.liveplayer_btn_cache_strategy_shadow);<NEW_LINE>mButtonCacheStrategy = (ImageButton) <MASK><NEW_LINE>mButtonCacheStrategy.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>mLayoutCacheStrategy.setVisibility(mLayoutCacheStrategy.getVisibility() == View.VISIBLE ? View.GONE : View.VISIBLE);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>mLayoutCacheStrategy.setTitle(R.string.liveplayer_cache_strategy);<NEW_LINE>String[] stringArray = getResources().getStringArray(R.array.liveplayer_cache_strategy);<NEW_LINE>mLayoutCacheStrategy.setData(stringArray, Constants.CACHE_STRATEGY_AUTO);<NEW_LINE>mLayoutCacheStrategy.setRadioSelectListener(new RadioSelectView.RadioSelectListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClose() {<NEW_LINE>mLayoutCacheStrategy.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onChecked(int prePosition, RadioButton preRadioButton, int curPosition, RadioButton curRadioButton) {<NEW_LINE>if (curPosition == Constants.CACHE_STRATEGY_FAST) {<NEW_LINE>mLogInfoWindow.setCacheTime(Constants.CACHE_TIME_FAST);<NEW_LINE>} else {<NEW_LINE>mLogInfoWindow.setCacheTime(Constants.CACHE_TIME_SMOOTH);<NEW_LINE>}<NEW_LINE>setCacheStrategy(curPosition);<NEW_LINE>mLayoutCacheStrategy.setVisibility(View.GONE);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>setCacheStrategy(Constants.CACHE_STRATEGY_AUTO);<NEW_LINE>mLogInfoWindow.setCacheTime(Constants.CACHE_TIME_SMOOTH);<NEW_LINE>}
findViewById(R.id.liveplayer_btn_cache_strategy);
1,231,003
protected void processThermostatSetpointReport(SerialMessage serialMessage, int offset, int endpoint) {<NEW_LINE>int setpointTypeCode = serialMessage.getMessagePayloadByte(offset + 1);<NEW_LINE>int scale = (serialMessage.getMessagePayloadByte(offset + <MASK><NEW_LINE>try {<NEW_LINE>BigDecimal value = extractValue(serialMessage.getMessagePayload(), offset + 2);<NEW_LINE>logger.debug("NODE {}: Thermostat Setpoint report Scale = {}", this.getNode().getNodeId(), scale);<NEW_LINE>logger.debug("NODE {}: Thermostat Setpoint Value = {}", this.getNode().getNodeId(), value);<NEW_LINE>SetpointType setpointType = SetpointType.getSetpointType(setpointTypeCode);<NEW_LINE>if (setpointType == null) {<NEW_LINE>logger.error("NODE {}: Unknown Setpoint Type = {}, ignoring report.", this.getNode().getNodeId(), setpointTypeCode);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// setpoint type seems to be supported, add it to the list.<NEW_LINE>Setpoint setpoint = setpoints.get(setpointType);<NEW_LINE>if (setpoint == null) {<NEW_LINE>setpoint = new Setpoint(setpointType);<NEW_LINE>setpoints.put(setpointType, setpoint);<NEW_LINE>}<NEW_LINE>setpoint.setInitialised();<NEW_LINE>logger.debug("NODE {}: Thermostat Setpoint Report, Type {} ({}), value = {}", this.getNode().getNodeId(), setpointType.getLabel(), setpointTypeCode, value.toPlainString());<NEW_LINE>ZWaveThermostatSetpointValueEvent zEvent = new ZWaveThermostatSetpointValueEvent(this.getNode().getNodeId(), endpoint, setpointType, scale, value);<NEW_LINE>this.getController().notifyEventListeners(zEvent);<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}
2) >> 3) & 0x03;
1,734,357
public Observable<ServiceResponse<Void>> deleteFaceWithServiceResponseAsync(String faceListId, UUID persistedFaceId) {<NEW_LINE>if (this.client.azureRegion() == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (faceListId == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter faceListId is required and cannot be null.");<NEW_LINE>}<NEW_LINE>if (persistedFaceId == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter persistedFaceId is required and cannot be null.");<NEW_LINE>}<NEW_LINE>String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", <MASK><NEW_LINE>return service.deleteFace(faceListId, persistedFaceId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()).flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {<NEW_LINE>try {<NEW_LINE>ServiceResponse<Void> clientResponse = deleteFaceDelegate(response);<NEW_LINE>return Observable.just(clientResponse);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>return Observable.error(t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
this.client.azureRegion());
1,494,492
public static double stringSimilarity(String... strings) {<NEW_LINE>if (strings == null)<NEW_LINE>return 0;<NEW_LINE>Counter<String> counter = new Counter<>();<NEW_LINE>Counter<String> counter2 = new Counter<>();<NEW_LINE>for (int i = 0; i < strings[0].length(); i++) counter.incrementCount(String.valueOf(strings[0].charAt(i)), 1.0f);<NEW_LINE>for (int i = 0; i < strings[1].length(); i++) counter2.incrementCount(String.valueOf(strings[1].charAt(i)), 1.0f);<NEW_LINE>Set<String> v1 = counter.keySet();<NEW_LINE>Set<String> v2 = counter2.keySet();<NEW_LINE>Set<String> both = <MASK><NEW_LINE>double sclar = 0, norm1 = 0, norm2 = 0;<NEW_LINE>for (String k : both) sclar += counter.getCount(k) * counter2.getCount(k);<NEW_LINE>for (String k : v1) norm1 += counter.getCount(k) * counter.getCount(k);<NEW_LINE>for (String k : v2) norm2 += counter2.getCount(k) * counter2.getCount(k);<NEW_LINE>return sclar / Math.sqrt(norm1 * norm2);<NEW_LINE>}
SetUtils.intersection(v1, v2);
1,849,021
private void compileGetValue(ArrayInitializer ai, IType arrayType) throws CompileException {<NEW_LINE>if (!(arrayType instanceof IClass) || !((IClass) arrayType).isArray()) {<NEW_LINE>this.compileError("Array initializer not allowed for non-array type \"" + arrayType.toString() + "\"");<NEW_LINE>}<NEW_LINE>IClass ct = ((IClass) arrayType).getComponentType();<NEW_LINE>assert ct != null;<NEW_LINE>this.consT(ai, Integer.valueOf(ai.values.length));<NEW_LINE>// locatable<NEW_LINE>this.// locatable<NEW_LINE>newArray(// dimExprCount<NEW_LINE>ai, // dims<NEW_LINE>1, // componentType<NEW_LINE>0, ct);<NEW_LINE>for (int i = 0; i < ai.values.length; ++i) {<NEW_LINE>ArrayInitializerOrRvalue aiorv = ai.values[i];<NEW_LINE>this.dup(aiorv);<NEW_LINE><MASK><NEW_LINE>if (aiorv instanceof Rvalue) {<NEW_LINE>Rvalue rv = (Rvalue) aiorv;<NEW_LINE>// locatable<NEW_LINE>this.// locatable<NEW_LINE>assignmentConversion(// sourceType<NEW_LINE>ai, // targetType<NEW_LINE>this.compileGetValue(rv), // constantValue<NEW_LINE>ct, this.getConstantValue(rv));<NEW_LINE>} else if (aiorv instanceof ArrayInitializer) {<NEW_LINE>this.compileGetValue((ArrayInitializer) aiorv, ct);<NEW_LINE>} else {<NEW_LINE>throw new InternalCompilerException("Unexpected array initializer or rvalue class " + aiorv.getClass().getName());<NEW_LINE>}<NEW_LINE>this.arraystore(aiorv, ct);<NEW_LINE>}<NEW_LINE>}
this.consT(ai, i);
1,801,698
boolean canSkipPhase1(Store.MetadataSnapshot source, Store.MetadataSnapshot target) {<NEW_LINE>if (source.getSyncId() == null || source.getSyncId().equals(target.getSyncId()) == false) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (source.numDocs() != target.numDocs()) {<NEW_LINE>throw new IllegalStateException("try to recover " + request.shardId() + " from primary shard with sync id but number " + "of docs differ: " + source.numDocs() + " (" + request.sourceNode().getName() + ", primary) vs " + target.numDocs() + "(" + request.targetNode().getName() + ")");<NEW_LINE>}<NEW_LINE>SequenceNumbers.CommitInfo sourceSeqNos = SequenceNumbers.loadSeqNoInfoFromLuceneCommit(source.<MASK><NEW_LINE>SequenceNumbers.CommitInfo targetSeqNos = SequenceNumbers.loadSeqNoInfoFromLuceneCommit(target.commitUserData().entrySet());<NEW_LINE>if (sourceSeqNos.localCheckpoint != targetSeqNos.localCheckpoint || targetSeqNos.maxSeqNo != sourceSeqNos.maxSeqNo) {<NEW_LINE>final String message = "try to recover " + request.shardId() + " with sync id but " + "seq_no stats are mismatched: [" + source.commitUserData() + "] vs [" + target.commitUserData() + "]";<NEW_LINE>assert false : message;<NEW_LINE>throw new IllegalStateException(message);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
commitUserData().entrySet());
1,795,499
private LineMarkerInfo<?> attachFormType(@NotNull PsiElement psiElement) {<NEW_LINE>// form(theform);<NEW_LINE>PsiElement twigFunctionParameterIdentifierPsi = TwigUtil.getTwigFunctionParameterIdentifierPsi(psiElement);<NEW_LINE>if (twigFunctionParameterIdentifierPsi == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Collection<TwigTypeContainer> twigTypeContainers = TwigTypeResolveUtil.resolveTwigMethodName(twigFunctionParameterIdentifierPsi<MASK><NEW_LINE>Collection<PhpClass> phpClasses = new HashSet<>();<NEW_LINE>for (TwigTypeContainer twigTypeContainer : twigTypeContainers) {<NEW_LINE>Object dataHolder = twigTypeContainer.getDataHolder();<NEW_LINE>if (dataHolder instanceof FormDataHolder && PhpElementsUtil.isInstanceOf(((FormDataHolder) dataHolder).getFormType(), "\\Symfony\\Component\\Form\\FormTypeInterface")) {<NEW_LINE>phpClasses.add(((FormDataHolder) dataHolder).getFormType());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (phpClasses.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>NavigationGutterIconBuilder<PsiElement> builder = NavigationGutterIconBuilder.create(Symfony2Icons.FORM_TYPE_LINE_MARKER).setTargets(phpClasses).setTooltipText("Navigate to Form").setCellRenderer(new MyBlockListCellRenderer());<NEW_LINE>return builder.createLineMarkerInfo(psiElement.getFirstChild());<NEW_LINE>}
, TwigTypeResolveUtil.formatPsiTypeNameWithCurrent(twigFunctionParameterIdentifierPsi));
255,510
final AddAttributesToFindingsResult executeAddAttributesToFindings(AddAttributesToFindingsRequest addAttributesToFindingsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addAttributesToFindingsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AddAttributesToFindingsRequest> request = null;<NEW_LINE>Response<AddAttributesToFindingsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new AddAttributesToFindingsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(addAttributesToFindingsRequest));<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, "Inspector");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<AddAttributesToFindingsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new AddAttributesToFindingsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
addHandlerContext(HandlerContextKey.OPERATION_NAME, "AddAttributesToFindings");
1,281,784
protected ChannelFactoryBuilder newChannelFactoryBuilder(boolean sslEnable) {<NEW_LINE>final int channelExecutorQueueSize = grpcTransportConfig.getMetadataChannelExecutorQueueSize();<NEW_LINE>final UnaryCallDeadlineInterceptor unaryCallDeadlineInterceptor = new UnaryCallDeadlineInterceptor(grpcTransportConfig.getMetadataRequestTimeout());<NEW_LINE>final <MASK><NEW_LINE>ChannelFactoryBuilder channelFactoryBuilder = new DefaultChannelFactoryBuilder("MetadataGrpcDataSender");<NEW_LINE>channelFactoryBuilder.setHeaderFactory(headerFactory);<NEW_LINE>channelFactoryBuilder.setNameResolverProvider(nameResolverProvider);<NEW_LINE>channelFactoryBuilder.addClientInterceptor(unaryCallDeadlineInterceptor);<NEW_LINE>if (clientInterceptorList != null) {<NEW_LINE>for (ClientInterceptor clientInterceptor : clientInterceptorList) {<NEW_LINE>logger.info("addClientInterceptor:{}", clientInterceptor);<NEW_LINE>channelFactoryBuilder.addClientInterceptor(clientInterceptor);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>channelFactoryBuilder.setExecutorQueueSize(channelExecutorQueueSize);<NEW_LINE>channelFactoryBuilder.setClientOption(clientOption);<NEW_LINE>if (sslEnable) {<NEW_LINE>SslOption sslOption = grpcTransportConfig.getSslOption();<NEW_LINE>channelFactoryBuilder.setSslOption(sslOption);<NEW_LINE>}<NEW_LINE>return channelFactoryBuilder;<NEW_LINE>}
ClientOption clientOption = grpcTransportConfig.getMetadataClientOption();
979,693
protected ExecutableDdlJob doCreate() {<NEW_LINE>ValidateGsiExistenceTask validateTask = new ValidateGsiExistenceTask(schemaName, primaryTableName, indexTableName, null, null);<NEW_LINE>List<DdlTask> taskList = new ArrayList<>();<NEW_LINE>// 1. validate<NEW_LINE>taskList.add(validateTask);<NEW_LINE>// 2. GSI status: public -> write_only -> delete_only -> absent<NEW_LINE>if (!skipSchemaChange) {<NEW_LINE>List<DdlTask> bringDownTasks = GsiTaskFactory.dropGlobalIndexTasks(schemaName, primaryTableName, indexTableName);<NEW_LINE>taskList.addAll(bringDownTasks);<NEW_LINE>}<NEW_LINE>// remove indexes meta for primary table<NEW_LINE>GsiDropCleanUpTask gsiDropCleanUpTask = new GsiDropCleanUpTask(schemaName, primaryTableName, indexTableName);<NEW_LINE>taskList.add(gsiDropCleanUpTask);<NEW_LINE>TableSyncTask tableSyncTaskAfterCleanUpGsiIndexesMeta = new TableSyncTask(schemaName, primaryTableName);<NEW_LINE>taskList.add(tableSyncTaskAfterCleanUpGsiIndexesMeta);<NEW_LINE>// drop gsi physical table<NEW_LINE>DropGsiPhyDdlTask dropGsiPhyDdlTask = new DropGsiPhyDdlTask(schemaName, primaryTableName, indexTableName);<NEW_LINE>taskList.add(dropGsiPhyDdlTask);<NEW_LINE>// table status: public -> absent<NEW_LINE>DropGsiTableRemoveMetaTask dropGsiTableRemoveTableMetaTask = new DropGsiTableRemoveMetaTask(schemaName, primaryTableName, indexTableName);<NEW_LINE>taskList.add(dropGsiTableRemoveTableMetaTask);<NEW_LINE>// 4. sync after drop table<NEW_LINE>TablesSyncTask dropTableSyncTask = new TablesSyncTask(schemaName, Lists<MASK><NEW_LINE>taskList.add(dropTableSyncTask);<NEW_LINE>final ExecutableDdlJob4DropGsi executableDdlJob = new ExecutableDdlJob4DropGsi();<NEW_LINE>executableDdlJob.addSequentialTasks(taskList);<NEW_LINE>// todo delete me<NEW_LINE>executableDdlJob.labelAsHead(validateTask);<NEW_LINE>executableDdlJob.labelAsTail(dropTableSyncTask);<NEW_LINE>executableDdlJob.labelTask(HIDE_TABLE_TASK, dropGsiTableRemoveTableMetaTask);<NEW_LINE>executableDdlJob.setValidateTask(validateTask);<NEW_LINE>// executableDdlJob.setBringDownTaskList();<NEW_LINE>executableDdlJob.setGsiDropCleanUpTask(gsiDropCleanUpTask);<NEW_LINE>executableDdlJob.setTableSyncTaskAfterCleanUpGsiIndexesMeta(tableSyncTaskAfterCleanUpGsiIndexesMeta);<NEW_LINE>executableDdlJob.setDropGsiPhyDdlTask(dropGsiPhyDdlTask);<NEW_LINE>executableDdlJob.setDropGsiTableRemoveMetaTask(dropGsiTableRemoveTableMetaTask);<NEW_LINE>executableDdlJob.setFinalSyncTask(dropTableSyncTask);<NEW_LINE>return executableDdlJob;<NEW_LINE>}
.newArrayList(primaryTableName, indexTableName));