idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,031,330
final DescribeEC2InstanceLimitsResult executeDescribeEC2InstanceLimits(DescribeEC2InstanceLimitsRequest describeEC2InstanceLimitsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEC2InstanceLimitsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeEC2InstanceLimitsRequest> request = null;<NEW_LINE>Response<DescribeEC2InstanceLimitsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeEC2InstanceLimitsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeEC2InstanceLimitsRequest));<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, "GameLift");<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<DescribeEC2InstanceLimitsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeEC2InstanceLimitsResultJsonUnmarshaller());<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, "DescribeEC2InstanceLimits");
76,257
public void handleChunkUnload(ChunkEvent.Unload event) {<NEW_LINE>if (!onchunkgenerate)<NEW_LINE>return;<NEW_LINE>LevelAccessor w = event.getWorld();<NEW_LINE>if (!(w instanceof ServerLevel))<NEW_LINE>return;<NEW_LINE>ChunkAccess c = event.getChunk();<NEW_LINE>if (c != null) {<NEW_LINE>ForgeWorld fw = getWorld((ServerLevel) w, false);<NEW_LINE>ChunkPos cp = c.getPos();<NEW_LINE>if (fw != null) {<NEW_LINE>if (!checkIfKnownChunk(fw, cp)) {<NEW_LINE>int ymax = Integer.MIN_VALUE;<NEW_LINE>int ymin = Integer.MAX_VALUE;<NEW_LINE>LevelChunkSection[] sections = c.getSections();<NEW_LINE>for (int i = 0; i < sections.length; i++) {<NEW_LINE>if ((sections[i] != null) && (sections[i].isEmpty() == false)) {<NEW_LINE>int sy = <MASK><NEW_LINE>if (sy < ymin)<NEW_LINE>ymin = sy;<NEW_LINE>if ((sy + 16) > ymax)<NEW_LINE>ymax = sy + 16;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int x = cp.x << 4;<NEW_LINE>int z = cp.z << 4;<NEW_LINE>// If not empty AND not initial scan<NEW_LINE>if (ymax != Integer.MIN_VALUE) {<NEW_LINE>// Log.info("New generated chunk detected at " + cp + " for " + fw.getName());<NEW_LINE>mapManager.touchVolume(fw.getName(), x, ymin, z, x + 15, ymax, z + 15, "chunkgenerate");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>removeKnownChunk(fw, cp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
sections[i].bottomBlockY();
858,262
private static boolean checkFuncallRespondTo(ThreadContext context, RubyClass klass, IRubyObject recv, RespondToCallSite respondToSite) {<NEW_LINE>final Ruby runtime = context.runtime;<NEW_LINE>DynamicMethod me = respondToSite.retrieveCache(klass).method;<NEW_LINE>// NOTE: isBuiltin here would be NOEX_BASIC in MRI, a flag only added to respond_to?, method_missing, and<NEW_LINE>// respond_to_missing? Same effect, I believe.<NEW_LINE>if (me.isUndefined() || me.isBuiltin())<NEW_LINE>return true;<NEW_LINE>int required = me.getSignature().required();<NEW_LINE>if (required > 2)<NEW_LINE>throw runtime.newArgumentError("respond_to? must accept 1 or 2 arguments (requires " + required + ")");<NEW_LINE>if (required == 1) {<NEW_LINE>return respondToSite.respondsTo(context, recv, recv);<NEW_LINE>} else {<NEW_LINE>return respondToSite.respondsTo(<MASK><NEW_LINE>}<NEW_LINE>}
context, recv, recv, true);
1,293,251
public final void allToAllw(Object sendBuf, int[] sendCount, int[] sDispls, Datatype[] sendTypes, Object recvBuf, int[] recvCount, int[] rDispls, Datatype[] recvTypes) throws MPIException {<NEW_LINE>MPI.check();<NEW_LINE>int[] sendoffs = new int[sendTypes.length];<NEW_LINE>int[] recvoffs = new int[recvTypes.length];<NEW_LINE>boolean sdb = false, rdb = false;<NEW_LINE>if (sendBuf instanceof Buffer && !(sdb = ((Buffer) sendBuf).isDirect())) {<NEW_LINE>for (int i = 0; i < sendTypes.length; i++) {<NEW_LINE>sendoffs[i] = sendTypes<MASK><NEW_LINE>}<NEW_LINE>sendBuf = ((Buffer) sendBuf).array();<NEW_LINE>}<NEW_LINE>if (recvBuf instanceof Buffer && !(rdb = ((Buffer) recvBuf).isDirect())) {<NEW_LINE>for (int i = 0; i < recvTypes.length; i++) {<NEW_LINE>recvoffs[i] = recvTypes[i].getOffset(recvBuf);<NEW_LINE>}<NEW_LINE>recvBuf = ((Buffer) recvBuf).array();<NEW_LINE>}<NEW_LINE>long[] sendHandles = convertTypeArray(sendTypes);<NEW_LINE>long[] recvHandles = convertTypeArray(recvTypes);<NEW_LINE>int[] sendHandles_btypes = convertTypeArrayBtype(sendTypes);<NEW_LINE>int[] recvHandles_btypes = convertTypeArrayBtype(recvTypes);<NEW_LINE>allToAllw(handle, sendBuf, sdb, sendoffs, sendCount, sDispls, sendHandles, sendHandles_btypes, recvBuf, rdb, recvoffs, recvCount, rDispls, recvHandles, recvHandles_btypes);<NEW_LINE>}
[i].getOffset(sendBuf);
529,142
public byte[] decodeMessage() {<NEW_LINE>byte[] data = new byte[18];<NEW_LINE>data[0] = 0x11;<NEW_LINE>data[1] = PacketType.ENERGY.toByte();<NEW_LINE>data[2] = subType.toByte();<NEW_LINE>data[3] = seqNbr;<NEW_LINE>data[4] = (byte) ((sensorId & 0xFF00) >> 8);<NEW_LINE>data[5] = <MASK><NEW_LINE>data[6] = count;<NEW_LINE>// convert our 'amp' values back into Watts since this is what comes back<NEW_LINE>long instantUsage = (long) (instantAmps * WATTS_TO_AMPS_CONVERSION_FACTOR);<NEW_LINE>long totalUsage = (long) (totalAmpHours * WATTS_TO_AMPS_CONVERSION_FACTOR * TOTAL_USAGE_CONVERSION_FACTOR);<NEW_LINE>data[7] = (byte) ((instantUsage >> 24) & 0xFF);<NEW_LINE>data[8] = (byte) ((instantUsage >> 16) & 0xFF);<NEW_LINE>data[9] = (byte) ((instantUsage >> 8) & 0xFF);<NEW_LINE>data[10] = (byte) (instantUsage & 0xFF);<NEW_LINE>data[11] = (byte) ((totalUsage >> 40) & 0xFF);<NEW_LINE>data[12] = (byte) ((totalUsage >> 32) & 0xFF);<NEW_LINE>data[13] = (byte) ((totalUsage >> 24) & 0xFF);<NEW_LINE>data[14] = (byte) ((totalUsage >> 16) & 0xFF);<NEW_LINE>data[15] = (byte) ((totalUsage >> 8) & 0xFF);<NEW_LINE>data[16] = (byte) (totalUsage & 0xFF);<NEW_LINE>data[17] = (byte) (((signalLevel & 0x0F) << 4) | (batteryLevel & 0x0F));<NEW_LINE>return data;<NEW_LINE>}
(byte) (sensorId & 0x00FF);
1,125,076
private ValueSetTm parseValueSet(ca.uhn.fhir.model.dstu2.resource.ValueSet nextVs) {<NEW_LINE>myConceptCount += nextVs.getCodeSystem().getConcept().size();<NEW_LINE>ourLog.debug("Parsing ValueSetTm #{} - {} - {} concepts total", myValueSetCount++, nextVs.getName(), myConceptCount);<NEW_LINE>// output.addConcept(next.getCode().getValue(),<NEW_LINE>// next.getDisplay().getValue(), next.getDefinition());<NEW_LINE>ValueSetTm vs = new ValueSetTm();<NEW_LINE>vs.setName(nextVs.getName());<NEW_LINE>vs.setDescription(nextVs.getDescription());<NEW_LINE>vs.setId(StringUtils.defaultString(nextVs.getIdentifier().getValue()));<NEW_LINE>vs.setClassName(toClassName(nextVs.getName()));<NEW_LINE>{<NEW_LINE>CodeSystem define = nextVs.getCodeSystem();<NEW_LINE>String system = define.getSystemElement().getValueAsString();<NEW_LINE>for (CodeSystemConcept nextConcept : define.getConcept()) {<NEW_LINE>addDefinedConcept(vs, system, nextConcept);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (ca.uhn.fhir.model.dstu2.resource.ValueSet.ComposeInclude nextInclude : nextVs.getCompose().getInclude()) {<NEW_LINE>String system = nextInclude.getSystemElement().getValueAsString();<NEW_LINE>for (ComposeIncludeConcept nextConcept : nextInclude.getConcept()) {<NEW_LINE>String nextCodeValue = nextConcept.getCode();<NEW_LINE>vs.addConcept(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>// if (vs.getCodes().isEmpty()) {<NEW_LINE>// ourLog.info("ValueSet " + nextVs.getName() + " has no codes, not going to generate any code for it");<NEW_LINE>// return null;<NEW_LINE>// }<NEW_LINE>if (myValueSets.containsKey(vs.getName())) {<NEW_LINE>ourLog.warn("Duplicate Name: " + vs.getName());<NEW_LINE>} else {<NEW_LINE>myValueSets.put(vs.getName(), vs);<NEW_LINE>}<NEW_LINE>// This is hackish, but deals with "Administrative Gender Codes" vs "AdministrativeGender"<NEW_LINE>if (vs.getName().endsWith(" Codes")) {<NEW_LINE>myValueSets.put(vs.getName().substring(0, vs.getName().length() - 6).replace(" ", ""), vs);<NEW_LINE>}<NEW_LINE>myValueSets.put(vs.getName().replace(" ", ""), vs);<NEW_LINE>return vs;<NEW_LINE>}
system, nextCodeValue, null, null);
430,887
public void read(org.apache.thrift.protocol.TProtocol prot, query_aggregate_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet <MASK><NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct.mid = iprot.readI64();<NEW_LINE>struct.setMidIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(1)) {<NEW_LINE>struct.aggregate_name = iprot.readString();<NEW_LINE>struct.setAggregateNameIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(2)) {<NEW_LINE>struct.beg_ms = iprot.readI64();<NEW_LINE>struct.setBegMsIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(3)) {<NEW_LINE>struct.end_ms = iprot.readI64();<NEW_LINE>struct.setEndMsIsSet(true);<NEW_LINE>}<NEW_LINE>}
incoming = iprot.readBitSet(4);
1,127,811
public Flux<CommandResponse<PendingRecordsCommand, PendingMessages>> xPending(Publisher<PendingRecordsCommand> commands) {<NEW_LINE>return connection.execute(cmd -> Flux.from(commands).concatMap(command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Key must not be null!");<NEW_LINE>ByteBuffer groupName = ByteUtils.getByteBuffer(command.getGroupName());<NEW_LINE>io.lettuce.core.Range<String> range = RangeConverter.toRangeWithDefault(command.getRange(), "-", "+");<NEW_LINE>io.lettuce.core.Limit limit = command.isLimited() ? io.lettuce.core.Limit.from(command.getCount()) : io.lettuce<MASK><NEW_LINE>Flux<PendingMessage> publisher = command.hasConsumer() ? cmd.xpending(command.getKey(), io.lettuce.core.Consumer.from(groupName, ByteUtils.getByteBuffer(command.getConsumerName())), range, limit) : cmd.xpending(command.getKey(), groupName, range, limit);<NEW_LINE>return publisher.collectList().map(it -> {<NEW_LINE>return StreamConverters.toPendingMessages(command.getGroupName(), command.getRange(), it);<NEW_LINE>}).map(value -> new CommandResponse<>(command, value));<NEW_LINE>}));<NEW_LINE>}
.core.Limit.unlimited();
326,536
public Object createTreeWalker(final Node root, final double whatToShow, final Scriptable filter, boolean expandEntityReferences) throws DOMException {<NEW_LINE>// seems that Rhino doesn't like long as parameter type<NEW_LINE>// this strange conversation preserves NodeFilter.SHOW_ALL<NEW_LINE>final int whatToShowI = (int) Double.valueOf(whatToShow).longValue();<NEW_LINE>if (getBrowserVersion().hasFeature(JS_TREEWALKER_EXPAND_ENTITY_REFERENCES_FALSE)) {<NEW_LINE>expandEntityReferences = false;<NEW_LINE>}<NEW_LINE>final boolean filterFunctionOnly = getBrowserVersion().hasFeature(JS_TREEWALKER_FILTER_FUNCTION_ONLY);<NEW_LINE>final org.w3c.dom.traversal.NodeFilter filterWrapper = createFilterWrapper(filter, filterFunctionOnly);<NEW_LINE>final TreeWalker t = new TreeWalker(getPage(), root, whatToShowI, filterWrapper, expandEntityReferences);<NEW_LINE>t.setParentScope(getWindow(this));<NEW_LINE>t.setPrototype(staticGetPrototype(getWindow(<MASK><NEW_LINE>return t;<NEW_LINE>}
this), TreeWalker.class));
440,221
private String buildMessage(List<AlertRecord> alertRecordList) {<NEW_LINE>AlertRecord firstRecord = alertRecordList.get(0);<NEW_LINE>StringBuffer message = new StringBuffer();<NEW_LINE>message.append("Group Name: ").append(firstRecord.getGroupName()).append(NEW_LINE).append("Cluster Name: ").append(firstRecord.getClusterName()).append(NEW_LINE);<NEW_LINE>alertRecordList.forEach(alertRecord -> {<NEW_LINE>message.append("Redis Node: ").append(alertRecord.getRedisNode()).append(NEW_LINE).append("Alert Rule: ").append(alertRecord.getAlertRule()).append(NEW_LINE).append("Actual Value: ").append(alertRecord.getActualData()).append(NEW_LINE);<NEW_LINE>String ruleInfo = alertRecord.getRuleInfo();<NEW_LINE>if (!Strings.isNullOrEmpty(ruleInfo)) {<NEW_LINE>message.append("Rule Info: ").append(alertRecord.getRuleInfo()).append(NEW_LINE);<NEW_LINE>}<NEW_LINE>message.append(NEW_LINE);<NEW_LINE>});<NEW_LINE>message.append("Time: ").append(LocalDateTime.now<MASK><NEW_LINE>return message.toString();<NEW_LINE>}
().format(TIME_FORMATTER));
1,333,879
// rejectIt<NEW_LINE>@Override<NEW_LINE>public String completeIt() {<NEW_LINE>log.debug("Completed: {}", this);<NEW_LINE>// Re-Check<NEW_LINE>if (!m_justPrepared) {<NEW_LINE>String status = prepareIt();<NEW_LINE>if (!IDocument.STATUS_InProgress.equals(status))<NEW_LINE>return status;<NEW_LINE>}<NEW_LINE>m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);<NEW_LINE>if (m_processMsg != null)<NEW_LINE>return IDocument.STATUS_Invalid;<NEW_LINE>// Implicit Approval<NEW_LINE>approveIt();<NEW_LINE>// Add up Amounts & complete them<NEW_LINE>MJournal<MASK><NEW_LINE>BigDecimal TotalDr = BigDecimal.ZERO;<NEW_LINE>BigDecimal TotalCr = BigDecimal.ZERO;<NEW_LINE>for (final MJournal journal : journals) {<NEW_LINE>if (!journal.isActive()) {<NEW_LINE>journal.setProcessed(true);<NEW_LINE>journal.setDocStatus(DOCSTATUS_Voided);<NEW_LINE>journal.setDocAction(DOCACTION_None);<NEW_LINE>journal.save();<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>// Complete if not closed<NEW_LINE>if (DOCSTATUS_Closed.equals(journal.getDocStatus()) || DOCSTATUS_Voided.equals(journal.getDocStatus()) || DOCSTATUS_Reversed.equals(journal.getDocStatus()) || DOCSTATUS_Completed.equals(journal.getDocStatus()))<NEW_LINE>;<NEW_LINE>else {<NEW_LINE>String status = journal.completeIt();<NEW_LINE>if (!IDocument.STATUS_Completed.equals(status)) {<NEW_LINE>journal.setDocStatus(status);<NEW_LINE>journal.save();<NEW_LINE>m_processMsg = journal.getProcessMsg();<NEW_LINE>return status;<NEW_LINE>}<NEW_LINE>journal.setDocStatus(DOCSTATUS_Completed);<NEW_LINE>journal.save();<NEW_LINE>}<NEW_LINE>//<NEW_LINE>TotalDr = TotalDr.add(journal.getTotalDr());<NEW_LINE>TotalCr = TotalCr.add(journal.getTotalCr());<NEW_LINE>}<NEW_LINE>setTotalDr(TotalDr);<NEW_LINE>setTotalCr(TotalCr);<NEW_LINE>// User Validation<NEW_LINE>String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);<NEW_LINE>if (valid != null) {<NEW_LINE>m_processMsg = valid;<NEW_LINE>return IDocument.STATUS_Invalid;<NEW_LINE>}<NEW_LINE>// Set the definite document number after completed (if needed)<NEW_LINE>setDefiniteDocumentNo();<NEW_LINE>//<NEW_LINE>setProcessed(true);<NEW_LINE>setDocAction(DOCACTION_Close);<NEW_LINE>return IDocument.STATUS_Completed;<NEW_LINE>}
[] journals = getJournals(true);
979,120
public void read(org.apache.thrift.protocol.TProtocol prot, check_and_mutate_request struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(6);<NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct.hash_key = new blob();<NEW_LINE><MASK><NEW_LINE>struct.setHash_keyIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(1)) {<NEW_LINE>struct.check_sort_key = new blob();<NEW_LINE>struct.check_sort_key.read(iprot);<NEW_LINE>struct.setCheck_sort_keyIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(2)) {<NEW_LINE>struct.check_type = cas_check_type.findByValue(iprot.readI32());<NEW_LINE>struct.setCheck_typeIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(3)) {<NEW_LINE>struct.check_operand = new blob();<NEW_LINE>struct.check_operand.read(iprot);<NEW_LINE>struct.setCheck_operandIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(4)) {<NEW_LINE>{<NEW_LINE>org.apache.thrift.protocol.TList _list37 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());<NEW_LINE>struct.mutate_list = new java.util.ArrayList<mutate>(_list37.size);<NEW_LINE>mutate _elem38;<NEW_LINE>for (int _i39 = 0; _i39 < _list37.size; ++_i39) {<NEW_LINE>_elem38 = new mutate();<NEW_LINE>_elem38.read(iprot);<NEW_LINE>struct.mutate_list.add(_elem38);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>struct.setMutate_listIsSet(true);<NEW_LINE>}<NEW_LINE>if (incoming.get(5)) {<NEW_LINE>struct.return_check_value = iprot.readBool();<NEW_LINE>struct.setReturn_check_valueIsSet(true);<NEW_LINE>}<NEW_LINE>}
struct.hash_key.read(iprot);
1,066,319
public static Collection<RegressionExecution> executions() {<NEW_LINE>ArrayList<RegressionExecution> executions = new ArrayList<>();<NEW_LINE>executions.add(new ExprCoreAAEPropRootedTopLevelProp(false));<NEW_LINE>executions.add(new ExprCoreAAEPropRootedTopLevelProp(true));<NEW_LINE>executions.add(new ExprCoreAAEPropRootedNestedProp(false));<NEW_LINE>executions.add(new ExprCoreAAEPropRootedNestedProp(true));<NEW_LINE>executions.add(new ExprCoreAAEPropRootedNestedNestedProp(false));<NEW_LINE>executions.add(new ExprCoreAAEPropRootedNestedNestedProp(true));<NEW_LINE>executions.add(new ExprCoreAAEPropRootedNestedArrayProp());<NEW_LINE>executions.add(new ExprCoreAAEPropRootedNestedNestedArrayProp());<NEW_LINE>executions.add(new ExprCoreAAEVariableRootedTopLevelProp(false));<NEW_LINE>executions.add(new ExprCoreAAEVariableRootedTopLevelProp(true));<NEW_LINE>executions<MASK><NEW_LINE>executions.add(new ExprCoreAAEWithStaticMethodAndUDF(false));<NEW_LINE>executions.add(new ExprCoreAAEWithStaticMethodAndUDF(true));<NEW_LINE>executions.add(new ExprCoreAAEAdditionalInvalid());<NEW_LINE>executions.add(new ExprCoreAAEWithStringSplit());<NEW_LINE>return executions;<NEW_LINE>}
.add(new ExprCoreAAEVariableRootedChained());
322,691
private void fillSegment(FillBlock filler, Position position) {<NEW_LINE><MASK><NEW_LINE>boolean dataIndependentAddressing = isDataIndependentAddressing(position);<NEW_LINE>int startingIndex = getStartingIndex(position);<NEW_LINE>int currentOffset = position.lane * laneLength + position.slice * segmentLength + startingIndex;<NEW_LINE>int prevOffset = getPrevOffset(currentOffset);<NEW_LINE>if (dataIndependentAddressing) {<NEW_LINE>addressBlock = filler.addressBlock.clear();<NEW_LINE>inputBlock = filler.inputBlock.clear();<NEW_LINE>initAddressBlocks(filler, position, inputBlock, addressBlock);<NEW_LINE>}<NEW_LINE>final boolean withXor = isWithXor(position);<NEW_LINE>for (int index = startingIndex; index < segmentLength; ++index) {<NEW_LINE>long pseudoRandom = getPseudoRandom(filler, index, addressBlock, inputBlock, prevOffset, dataIndependentAddressing);<NEW_LINE>int refLane = getRefLane(position, pseudoRandom);<NEW_LINE>int refColumn = getRefColumn(position, index, pseudoRandom, refLane == position.lane);
Block addressBlock = null, inputBlock = null;
633,862
private void processSystemKext(LanguageService languageService, Program systemProgram, TaskMonitor monitor) throws Exception {<NEW_LINE>for (GFile file : fileToPrelinkInfoMap.keySet()) {<NEW_LINE>if (monitor.isCancelled()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (!isChildOf(systemKextFile, file)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>PrelinkMap prelinkMap = fileToPrelinkInfoMap.get(file);<NEW_LINE>if (prelinkMap == null || prelinkMap.getPrelinkExecutableLoadAddr() == -1) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Address address = systemProgram.getAddressFactory().getDefaultAddressSpace().getAddress(prelinkMap.getPrelinkExecutableLoadAddr());<NEW_LINE>ByteProvider systemKextProvider = new MemoryByteProvider(systemProgram.getMemory(), address);<NEW_LINE>MachHeader machHeader = new MachHeader(systemKextProvider, 0, false);<NEW_LINE>machHeader.parse();<NEW_LINE>// MachoLoader loader = new MachoLoader();<NEW_LINE>// loader.load( machHeader, systemProgram, new MessageLog(), monitor );<NEW_LINE>Namespace namespace = systemProgram.getSymbolTable().createNameSpace(null, file.getName(), SourceType.IMPORTED);<NEW_LINE>List<SymbolTableCommand> commands = machHeader.getLoadCommands(SymbolTableCommand.class);<NEW_LINE>for (SymbolTableCommand symbolTableCommand : commands) {<NEW_LINE>List<NList<MASK><NEW_LINE>for (NList symbol : symbols) {<NEW_LINE>if (monitor.isCancelled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Symbol sym = SymbolUtilities.getLabelOrFunctionSymbol(systemProgram, symbol.getString(), err -> Msg.error(this, err));<NEW_LINE>if (sym != null) {<NEW_LINE>sym.setNamespace(namespace);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> symbols = symbolTableCommand.getSymbols();
505,090
public void marshall(DocumentClassifierProperties documentClassifierProperties, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (documentClassifierProperties == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getDocumentClassifierArn(), DOCUMENTCLASSIFIERARN_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getLanguageCode(), LANGUAGECODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getStatus(), STATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getMessage(), MESSAGE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getSubmitTime(), SUBMITTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getEndTime(), ENDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getTrainingStartTime(), TRAININGSTARTTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getTrainingEndTime(), TRAININGENDTIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getInputDataConfig(), INPUTDATACONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getOutputDataConfig(), OUTPUTDATACONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getClassifierMetadata(), CLASSIFIERMETADATA_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getVolumeKmsKeyId(), VOLUMEKMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getVpcConfig(), VPCCONFIG_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getMode(), MODE_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getModelKmsKeyId(), MODELKMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getVersionName(), VERSIONNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(documentClassifierProperties.getSourceModelArn(), SOURCEMODELARN_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
documentClassifierProperties.getDataAccessRoleArn(), DATAACCESSROLEARN_BINDING);
1,601,898
static // / @brief Print the solution.<NEW_LINE>void printSolution(RoutingModel routing, RoutingIndexManager manager, Assignment solution) {<NEW_LINE>logger.info("Objective: " + solution.objectiveValue());<NEW_LINE>logger.info("Breaks:");<NEW_LINE>AssignmentIntervalContainer intervals = solution.intervalVarContainer();<NEW_LINE>for (int i = 0; i < intervals.size(); ++i) {<NEW_LINE>IntervalVarElement breakInterval = intervals.element(i);<NEW_LINE>if (breakInterval.performedValue() == 1) {<NEW_LINE>logger.info(breakInterval.var().name() + " " + breakInterval);<NEW_LINE>} else {<NEW_LINE>logger.info(breakInterval.var().name() + ": Unperformed");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>long totalTime = 0;<NEW_LINE>RoutingDimension timeDimension = routing.getMutableDimension("Time");<NEW_LINE>for (int i = 0; i < manager.getNumberOfVehicles(); ++i) {<NEW_LINE>logger.info("Route for Vehicle " + i + ":");<NEW_LINE>long index = routing.start(i);<NEW_LINE>String route = "";<NEW_LINE>while (!routing.isEnd(index)) {<NEW_LINE>IntVar timeVar = timeDimension.cumulVar(index);<NEW_LINE>route += manager.indexToNode(index) + " Time(" + <MASK><NEW_LINE>index = solution.value(routing.nextVar(index));<NEW_LINE>}<NEW_LINE>IntVar timeVar = timeDimension.cumulVar(index);<NEW_LINE>route += manager.indexToNode(index) + " Time(" + solution.value(timeVar) + ")";<NEW_LINE>logger.info(route);<NEW_LINE>logger.info("Time of the route: " + solution.value(timeVar) + "min");<NEW_LINE>totalTime += solution.value(timeVar);<NEW_LINE>}<NEW_LINE>logger.info("Total time of all roues: " + totalTime + "min");<NEW_LINE>}
solution.value(timeVar) + ") -> ";
258,795
static final void formatJSONMap0(Record record, AbstractRow<?> fields, JSONFormat format, int recordLevel, Writer writer) throws java.io.IOException {<NEW_LINE>if (record == null) {<NEW_LINE>writer.append("null");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String separator = "";<NEW_LINE>int size = fields.size();<NEW_LINE>boolean wrapRecords = format.wrapSingleColumnRecords() || size > 1;<NEW_LINE>if (wrapRecords)<NEW_LINE>writer.append('{');<NEW_LINE>for (int index = 0; index < size; index++) {<NEW_LINE>writer.append(separator);<NEW_LINE>if (format.format())<NEW_LINE>if (size > 1)<NEW_LINE>writer.append(format.newline()).append(format.indentString(recordLevel + 1));<NEW_LINE>else if (format.wrapSingleColumnRecords())<NEW_LINE>writer.append(' ');<NEW_LINE>if (wrapRecords) {<NEW_LINE>JSONValue.writeJSONString(record.field(index).getName(), writer);<NEW_LINE>writer.append(':');<NEW_LINE>if (format.format())<NEW_LINE>writer.append(' ');<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>formatJSON0(record.get(index), writer, format.globalIndent(format.globalIndent() + format.indent() * (recordLevel + 1)));<NEW_LINE>format.globalIndent(previous);<NEW_LINE>if (format.format() && format.wrapSingleColumnRecords() && size == 1)<NEW_LINE>writer.append(' ');<NEW_LINE>separator = ",";<NEW_LINE>}<NEW_LINE>if (wrapRecords)<NEW_LINE>if (format.format() && size > 1)<NEW_LINE>writer.append(format.newline()).append(format.indentString(recordLevel)).append('}');<NEW_LINE>else<NEW_LINE>writer.append('}');<NEW_LINE>}
int previous = format.globalIndent();
851,380
private Map<String, String> findTableNameFromSubqueryByColumnProjection(final Collection<ColumnProjection> columns, final Map<String, String> ownerTableNames) {<NEW_LINE>if (ownerTableNames.size() == columns.size() || subqueryTables.isEmpty()) {<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>Map<String, String> result = new LinkedHashMap<>(columns.size(), 1);<NEW_LINE>for (ColumnProjection each : columns) {<NEW_LINE>if (ownerTableNames.containsKey(each.getExpression())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Collection<SubqueryTableContext> subqueryTableContexts = subqueryTables.getOrDefault(each.getOwner(), Collections.emptyList());<NEW_LINE>for (SubqueryTableContext subqueryTableContext : subqueryTableContexts) {<NEW_LINE>if (subqueryTableContext.getColumnNames().contains(each.getName())) {<NEW_LINE>result.put(each.getExpression(<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
), subqueryTableContext.getTableName());
1,021,509
static void listRepositories(File repositoriesRootDir, boolean includeUserAccessDetails) {<NEW_LINE>String[] names = RepositoryManager.getRepositoryNames(repositoriesRootDir);<NEW_LINE><MASK><NEW_LINE>if (names.length == 0) {<NEW_LINE>System.out.println(" <No repositories have been created>");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (String name : names) {<NEW_LINE>File repoDir = new File(repositoriesRootDir, NamingUtilities.mangle(name));<NEW_LINE>String rootPath = repoDir.getAbsolutePath();<NEW_LINE>boolean isIndexed = IndexedLocalFileSystem.isIndexed(rootPath);<NEW_LINE>String type;<NEW_LINE>if (isIndexed || IndexedLocalFileSystem.hasIndexedStructure(rootPath)) {<NEW_LINE>type = "Indexed Filesystem";<NEW_LINE>try {<NEW_LINE>int indexVersion = IndexedLocalFileSystem.readIndexVersion(rootPath);<NEW_LINE>if (indexVersion == IndexedLocalFileSystem.LATEST_INDEX_VERSION) {<NEW_LINE>type = null;<NEW_LINE>} else {<NEW_LINE>type += " (V" + indexVersion + ")";<NEW_LINE>}<NEW_LINE>} catch (IOException e) {<NEW_LINE>type += "(unknown)";<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>type = "Mangled Filesystem";<NEW_LINE>}<NEW_LINE>System.out.println(" " + name + (type == null ? "" : (" - uses " + type)));<NEW_LINE>if (includeUserAccessDetails) {<NEW_LINE>System.out.print(Repository.getFormattedUserPermissions(repoDir, " "));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
System.out.println("\nRepositories:");
11,717
public <T> T chooseElement(final String dialogTitle, final String message, final List<T> elements, Function<T, String> labelFun) {<NEW_LINE>try (LiveVariable<T> chosen = new LiveVariable<>()) {<NEW_LINE>getShell().getDisplay().syncExec(new Runnable() {<NEW_LINE><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>public void run() {<NEW_LINE>ILabelProvider labelProvider = new LabelProvider() {<NEW_LINE><NEW_LINE>public String getText(Object element) {<NEW_LINE>return labelFun.apply((T) element);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>try {<NEW_LINE>ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), labelProvider);<NEW_LINE>dialog.<MASK><NEW_LINE>dialog.setTitle(dialogTitle);<NEW_LINE>dialog.setMessage(message);<NEW_LINE>dialog.setMultipleSelection(false);<NEW_LINE>int result = dialog.open();<NEW_LINE>labelProvider.dispose();<NEW_LINE>if (result == Window.OK) {<NEW_LINE>chosen.setValue((T) dialog.getFirstResult());<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>labelProvider.dispose();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return chosen.getValue();<NEW_LINE>}<NEW_LINE>}
setElements(elements.toArray());
987,020
private SqlNodeList convertOrderby(SQLOrderBy orderBy) {<NEW_LINE>if (orderBy == null) {<NEW_LINE>// org/apache/calcite/calcite-core/1.23.0/calcite-core-1.23.0-sources.jar!/org/apache/calcite/sql/validate/SqlValidatorImpl.java:1353<NEW_LINE>return new SqlNodeList(Collections.emptyList(), SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>List<SQLSelectOrderByItem> items = orderBy.getItems();<NEW_LINE>List<SqlNode> orderByNodes = new ArrayList<SqlNode>(items.size());<NEW_LINE>for (SQLSelectOrderByItem item : items) {<NEW_LINE>SqlNode node = convertToSqlNode(item.getExpr());<NEW_LINE>if (item.getType() == SQLOrderingSpecification.DESC) {<NEW_LINE>node = new SqlBasicCall(SqlStdOperatorTable.DESC, new SqlNode[] { node }, SqlParserPos.ZERO);<NEW_LINE>}<NEW_LINE>SQLSelectOrderByItem.NullsOrderType nullsOrderType = item.getNullsOrderType();<NEW_LINE>if (nullsOrderType != null) {<NEW_LINE>switch(nullsOrderType) {<NEW_LINE>case NullsFirst:<NEW_LINE>node = new SqlBasicCall(SqlStdOperatorTable.NULLS_FIRST, new SqlNode[] { node }, SqlParserPos.ZERO);<NEW_LINE>break;<NEW_LINE>case NullsLast:<NEW_LINE>node = new SqlBasicCall(SqlStdOperatorTable.NULLS_LAST, new SqlNode[] { node }, SqlParserPos.ZERO);<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>orderByNodes.add(node);<NEW_LINE>}<NEW_LINE>return new <MASK><NEW_LINE>}
SqlNodeList(orderByNodes, SqlParserPos.ZERO);
746,205
private void processResources(ResourceSet resources, final IProgressMonitor monitor) {<NEW_LINE>if (monitor != null) {<NEW_LINE>monitor.beginTask(<MASK><NEW_LINE>}<NEW_LINE>// create thread pool to process the diagrams in parallel<NEW_LINE>ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());<NEW_LINE>try {<NEW_LINE>List<ExportTask> tasks = new ArrayList<ExportTask>();<NEW_LINE>final Object monitorLock = new Object();<NEW_LINE>final LinkedHashSet<String> diagramsInProgress = new LinkedHashSet<String>();<NEW_LINE>// create a task for each resource. This will submit them to the executor<NEW_LINE>for (final IResource resource : resources.uxfFiles) {<NEW_LINE>tasks.add(new ExportTask(resource, executor, monitor, monitorLock, diagramsInProgress));<NEW_LINE>}<NEW_LINE>// await finishing all tasks. This also causes the resource refresh and placing problem markers<NEW_LINE>for (ExportTask task : tasks) {<NEW_LINE>task.awaitFinish();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>// shutdown the pool<NEW_LINE>executor.shutdownNow();<NEW_LINE>}<NEW_LINE>// process compilation units and create makers for missing images<NEW_LINE>for (ICompilationUnit cu : resources.units) {<NEW_LINE>if (monitor != null) {<NEW_LINE>monitor.subTask("processing " + cu.getElementName());<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (!cu.exists()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>IResource correspondingResource = cu.getCorrespondingResource();<NEW_LINE>if (correspondingResource == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>correspondingResource.deleteMarkers(IMG_MISSING_MARKER_TYPE, false, IResource.DEPTH_INFINITE);<NEW_LINE>for (ImageReference reference : UmletPluginUtils.collectAllImageRefs(cu)) {<NEW_LINE>SourceString srcAttrValue = reference.srcAttr.value;<NEW_LINE>IPath path = UmletPluginUtils.getRootRelativePath(cu, srcAttrValue.getValue());<NEW_LINE>IFile imageFile = UmletPluginUtils.getFile(UmletPluginUtils.getPackageFragmentRoot(cu), path);<NEW_LINE>if (!imageFile.exists()) {<NEW_LINE>IMarker marker = correspondingResource.createMarker(IMG_MISSING_MARKER_TYPE);<NEW_LINE>marker.setAttribute(IMarker.MESSAGE, "Unable to find referenced image " + path);<NEW_LINE>marker.setAttribute(IMarker.LOCATION, "JavaDoc");<NEW_LINE>marker.setAttribute(IMarker.CHAR_START, srcAttrValue.start);<NEW_LINE>marker.setAttribute(IMarker.CHAR_END, srcAttrValue.end + 1);<NEW_LINE>marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_WARNING);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (CoreException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>} finally {<NEW_LINE>if (monitor != null) {<NEW_LINE>monitor.worked(1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (monitor != null) {<NEW_LINE>monitor.done();<NEW_LINE>}<NEW_LINE>}
"Update Umlet Diagrams", resources.size());
684,543
private void recordClientData(ClientData cd, HttpServletRequest request) {<NEW_LINE>String protocol = request.getProtocol();<NEW_LINE>while (// NOI18N<NEW_LINE>protocol.endsWith("\n")) protocol = protocol.substring(0, <MASK><NEW_LINE>// NOI18N<NEW_LINE>cd.setAttributeValue("protocol", protocol);<NEW_LINE>// NOI18N<NEW_LINE>// NOI18N<NEW_LINE>cd.// NOI18N<NEW_LINE>setAttributeValue("remoteAddress", request.getRemoteAddr());<NEW_LINE>Enumeration hvals;<NEW_LINE>StringBuffer valueBuf;<NEW_LINE>int counter;<NEW_LINE>// Software used<NEW_LINE>valueBuf = new StringBuffer(128);<NEW_LINE>counter = 0;<NEW_LINE>hvals = request.getHeaders(Constants.Http.userAgent);<NEW_LINE>if (hvals != null) {<NEW_LINE>while (hvals.hasMoreElements()) {<NEW_LINE>// NOI18N<NEW_LINE>if (counter > 0)<NEW_LINE>valueBuf.append(", ");<NEW_LINE>valueBuf.append((String) hvals.nextElement());<NEW_LINE>++counter;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>cd.setAttributeValue("software", valueBuf.toString());<NEW_LINE>// Languages<NEW_LINE>valueBuf = new StringBuffer(128);<NEW_LINE>counter = 0;<NEW_LINE>hvals = request.getHeaders(Constants.Http.acceptLang);<NEW_LINE>if (hvals != null) {<NEW_LINE>while (hvals.hasMoreElements()) {<NEW_LINE>// NOI18N<NEW_LINE>if (counter > 0)<NEW_LINE>valueBuf.append(", ");<NEW_LINE>valueBuf.append((String) hvals.nextElement());<NEW_LINE>++counter;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>cd.setAttributeValue("locale", valueBuf.toString());<NEW_LINE>// File formats<NEW_LINE>valueBuf = new StringBuffer(128);<NEW_LINE>counter = 0;<NEW_LINE>hvals = request.getHeaders(Constants.Http.accept);<NEW_LINE>if (hvals != null) {<NEW_LINE>while (hvals.hasMoreElements()) {<NEW_LINE>// NOI18N<NEW_LINE>if (counter > 0)<NEW_LINE>valueBuf.append(", ");<NEW_LINE>valueBuf.append((String) hvals.nextElement());<NEW_LINE>++counter;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>cd.setAttributeValue("formatsAccepted", valueBuf.toString());<NEW_LINE>// Encoding<NEW_LINE>valueBuf = new StringBuffer(128);<NEW_LINE>counter = 0;<NEW_LINE>hvals = request.getHeaders(Constants.Http.acceptEncoding);<NEW_LINE>if (hvals != null) {<NEW_LINE>while (hvals.hasMoreElements()) {<NEW_LINE>// NOI18N<NEW_LINE>if (counter > 0)<NEW_LINE>valueBuf.append(", ");<NEW_LINE>valueBuf.append((String) hvals.nextElement());<NEW_LINE>++counter;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>cd.setAttributeValue("encodingsAccepted", valueBuf.toString());<NEW_LINE>// Char sets<NEW_LINE>valueBuf = new StringBuffer(128);<NEW_LINE>counter = 0;<NEW_LINE>hvals = request.getHeaders(Constants.Http.acceptCharset);<NEW_LINE>if (hvals != null) {<NEW_LINE>while (hvals.hasMoreElements()) {<NEW_LINE>// NOI18N<NEW_LINE>if (counter > 0)<NEW_LINE>valueBuf.append(", ");<NEW_LINE>valueBuf.append((String) hvals.nextElement());<NEW_LINE>++counter;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// NOI18N<NEW_LINE>cd.setAttributeValue("charsetsAccepted", valueBuf.toString());<NEW_LINE>}
protocol.length() - 2);
395,661
private synchronized void invalidateDevices() {<NEW_LINE>UsbManager usbManager = (UsbManager) mContext.getSystemService(Context.USB_SERVICE);<NEW_LINE>HashMap<String, UsbDevice> devicesMap = usbManager.getDeviceList();<NEW_LINE>List<String> intelDevices = new ArrayList<String>();<NEW_LINE>for (Map.Entry<String, UsbDevice> entry : devicesMap.entrySet()) {<NEW_LINE>UsbDevice usbDevice = entry.getValue();<NEW_LINE>if (UsbUtilities.isIntel(usbDevice))<NEW_LINE>intelDevices.add(entry.getKey());<NEW_LINE>}<NEW_LINE>Iterator<Map.Entry<String, UsbDesc>> iter = mDescriptors.entrySet().iterator();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Map.Entry<String, UsbDesc<MASK><NEW_LINE>if (!intelDevices.contains(entry.getKey())) {<NEW_LINE>removeDevice(entry.getValue());<NEW_LINE>iter.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (String name : intelDevices) {<NEW_LINE>if (!mDescriptors.containsKey(name)) {<NEW_LINE>addDevice(devicesMap.get(name));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
> entry = iter.next();
554,372
private Scorer req(Collection<ScorerSupplier> requiredNoScoring, Collection<ScorerSupplier> requiredScoring, long leadCost) throws IOException {<NEW_LINE>if (requiredNoScoring.size() + requiredScoring.size() == 1) {<NEW_LINE>Scorer req = (requiredNoScoring.isEmpty() ? requiredScoring : requiredNoScoring).iterator().next().get(leadCost);<NEW_LINE>if (scoreMode.needsScores() == false) {<NEW_LINE>return req;<NEW_LINE>}<NEW_LINE>if (requiredScoring.isEmpty()) {<NEW_LINE>// Scores are needed but we only have a filter clause<NEW_LINE>// BooleanWeight expects that calling score() is ok so we need to wrap<NEW_LINE>// to prevent score() from being propagated<NEW_LINE>return new FilterScorer(req) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public float score() throws IOException {<NEW_LINE>return 0f;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public float getMaxScore(int upTo) throws IOException {<NEW_LINE>return 0f;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}<NEW_LINE>return req;<NEW_LINE>} else {<NEW_LINE>List<Scorer> requiredScorers = new ArrayList<>();<NEW_LINE>List<Scorer> <MASK><NEW_LINE>for (ScorerSupplier s : requiredNoScoring) {<NEW_LINE>requiredScorers.add(s.get(leadCost));<NEW_LINE>}<NEW_LINE>for (ScorerSupplier s : requiredScoring) {<NEW_LINE>Scorer scorer = s.get(leadCost);<NEW_LINE>scoringScorers.add(scorer);<NEW_LINE>}<NEW_LINE>if (scoreMode == ScoreMode.TOP_SCORES && scoringScorers.size() > 1) {<NEW_LINE>Scorer blockMaxScorer = new BlockMaxConjunctionScorer(weight, scoringScorers);<NEW_LINE>if (requiredScorers.isEmpty()) {<NEW_LINE>return blockMaxScorer;<NEW_LINE>}<NEW_LINE>scoringScorers = Collections.singletonList(blockMaxScorer);<NEW_LINE>}<NEW_LINE>requiredScorers.addAll(scoringScorers);<NEW_LINE>return new ConjunctionScorer(weight, requiredScorers, scoringScorers);<NEW_LINE>}<NEW_LINE>}
scoringScorers = new ArrayList<>();
168,105
public static Bech32Data decode(final String str) throws IllegalArgumentException {<NEW_LINE><MASK><NEW_LINE>if (str.length() < 8) {<NEW_LINE>throw new IllegalArgumentException("Input too short: " + str.length());<NEW_LINE>}<NEW_LINE>if (str.length() > 90) {<NEW_LINE>throw new IllegalArgumentException("Input too long: " + str.length());<NEW_LINE>}<NEW_LINE>for (int i = 0; i < str.length(); ++i) {<NEW_LINE>char c = str.charAt(i);<NEW_LINE>String exceptionMsg = "InvalidCharacter(" + c + ", " + i + ")";<NEW_LINE>if (c < 33 || c > 126) {<NEW_LINE>throw new IllegalArgumentException(exceptionMsg);<NEW_LINE>}<NEW_LINE>if (c >= 'a' && c <= 'z') {<NEW_LINE>if (upper) {<NEW_LINE>throw new IllegalArgumentException(exceptionMsg);<NEW_LINE>}<NEW_LINE>lower = true;<NEW_LINE>}<NEW_LINE>if (c >= 'A' && c <= 'Z') {<NEW_LINE>if (lower) {<NEW_LINE>throw new IllegalArgumentException(exceptionMsg);<NEW_LINE>}<NEW_LINE>upper = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final int pos = str.lastIndexOf('1');<NEW_LINE>if (pos < 1) {<NEW_LINE>throw new IllegalArgumentException("Missing human-readable part");<NEW_LINE>}<NEW_LINE>final int dataPartLength = str.length() - 1 - pos;<NEW_LINE>if (dataPartLength < 6) {<NEW_LINE>throw new IllegalArgumentException("Data part too short: " + dataPartLength);<NEW_LINE>}<NEW_LINE>byte[] values = new byte[dataPartLength];<NEW_LINE>for (int i = 0; i < dataPartLength; ++i) {<NEW_LINE>char c = str.charAt(i + pos + 1);<NEW_LINE>if (CHARSET_REV[c] == -1) {<NEW_LINE>throw new IllegalArgumentException("InvalidCharacter(" + c + ", " + i + pos + 1 + ")");<NEW_LINE>}<NEW_LINE>values[i] = CHARSET_REV[c];<NEW_LINE>}<NEW_LINE>String hrp = str.substring(0, pos).toLowerCase(Locale.ROOT);<NEW_LINE>if (!verifyChecksum(hrp, values)) {<NEW_LINE>throw new IllegalArgumentException("InvalidChecksum:");<NEW_LINE>}<NEW_LINE>return new Bech32Data(hrp, Arrays.copyOfRange(values, 0, values.length - 6));<NEW_LINE>}
boolean lower = false, upper = false;
1,411,791
final CreateApplicationPresignedUrlResult executeCreateApplicationPresignedUrl(CreateApplicationPresignedUrlRequest createApplicationPresignedUrlRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createApplicationPresignedUrlRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateApplicationPresignedUrlRequest> request = null;<NEW_LINE>Response<CreateApplicationPresignedUrlResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateApplicationPresignedUrlRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(createApplicationPresignedUrlRequest));<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, "Kinesis Analytics V2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateApplicationPresignedUrl");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<CreateApplicationPresignedUrlResult>> 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 CreateApplicationPresignedUrlResultJsonUnmarshaller());
1,138,895
public Mono<Response<Flux<ByteBuffer>>> rotateClusterCertificatesWithResponseAsync(String resourceGroupName, String resourceName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2020-11-01";<NEW_LINE>final String accept = "application/json";<NEW_LINE>return FluxUtil.withContext(context -> service.rotateClusterCertificates(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), resourceGroupName, resourceName, accept, context)).contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));<NEW_LINE>}
error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
332,938
public void iterate() {<NEW_LINE>// build covmat out of fitting matrix by multiplying diagonal elements with<NEW_LINE>// 1+lambda<NEW_LINE>for (int i = 0; i < numfit; i++) {<NEW_LINE>System.arraycopy(alpha[i], 0, covmat[i], 0, numfit);<NEW_LINE>covmat[i][i] *= (1.0 + lambda);<NEW_LINE>}<NEW_LINE>// Solve the equation system (Gauss-Jordan)<NEW_LINE>LinearEquationSystem ls = new LinearEquationSystem(covmat, beta);<NEW_LINE>ls.solveByTotalPivotSearch();<NEW_LINE>// update covmat with the inverse<NEW_LINE>covmat = ls.getCoefficents();<NEW_LINE>// and deltaparams with the solution vector<NEW_LINE>deltaparams = ls.getRHS();<NEW_LINE>// deltaparams = beta;<NEW_LINE>for (int i = 0, i2 = 0; i < numparams; i++) {<NEW_LINE>if (dofit[i]) {<NEW_LINE>paramstry[i] = params[<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>double newchisq = simulateParameters(paramstry);<NEW_LINE>// have the results improved?<NEW_LINE>if (newchisq < chisq) {<NEW_LINE>// TODO: Do we need a larger limit than MIN_NORMAL?<NEW_LINE>if (lambda * 0.1 > Double.MIN_NORMAL) {<NEW_LINE>lambda *= 0.1;<NEW_LINE>}<NEW_LINE>chisq = newchisq;<NEW_LINE>// keep modified covmat as new alpha matrix<NEW_LINE>// and da as new beta<NEW_LINE>for (int i = 0; i < numfit; i++) {<NEW_LINE>System.arraycopy(covmat[i], 0, alpha[i], 0, numfit);<NEW_LINE>beta[i] = deltaparams[i];<NEW_LINE>}<NEW_LINE>System.arraycopy(paramstry, 0, params, 0, numparams);<NEW_LINE>} else {<NEW_LINE>// TODO: Do we need a larger limit than MAX_VALUE?<NEW_LINE>// Does it ever make sense to go as far up?<NEW_LINE>// Anyway, this should prevent overflows.<NEW_LINE>if (lambda * 10 < Double.MAX_VALUE) {<NEW_LINE>lambda *= 10;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
i] + deltaparams[i2++];
528,401
private void parseAnonymousIpConfig(final JsonNode jo) throws JsonUtilsException {<NEW_LINE>final String anonymousPollingUrl = "anonymousip.polling.url";<NEW_LINE>final String anonymousPollingInterval = "anonymousip.polling.interval";<NEW_LINE>final String anonymousPolicyConfiguration = "anonymousip.policy.configuration";<NEW_LINE>final JsonNode config = JsonUtils.getJsonNode(jo, "config");<NEW_LINE>final String configUrl = JsonUtils.optString(config, anonymousPolicyConfiguration, null);<NEW_LINE>final String databaseUrl = JsonUtils.optString(config, anonymousPollingUrl, null);<NEW_LINE>if (configUrl == null) {<NEW_LINE><MASK><NEW_LINE>getAnonymousIpConfigUpdater().stopServiceUpdater();<NEW_LINE>AnonymousIp.getCurrentConfig().enabled = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (databaseUrl == null) {<NEW_LINE>LOGGER.info(anonymousPollingUrl + " not configured; stopping service updater and disabling feature");<NEW_LINE>getAnonymousIpDatabaseUpdater().stopServiceUpdater();<NEW_LINE>AnonymousIp.getCurrentConfig().enabled = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (jo.has(deliveryServicesKey)) {<NEW_LINE>final JsonNode dss = JsonUtils.getJsonNode(jo, deliveryServicesKey);<NEW_LINE>final Iterator<String> dsNames = dss.fieldNames();<NEW_LINE>while (dsNames.hasNext()) {<NEW_LINE>final String ds = dsNames.next();<NEW_LINE>final JsonNode dsNode = JsonUtils.getJsonNode(dss, ds);<NEW_LINE>if (JsonUtils.optString(dsNode, "anonymousBlockingEnabled").equals("true")) {<NEW_LINE>final long interval = JsonUtils.optLong(config, anonymousPollingInterval);<NEW_LINE>getAnonymousIpConfigUpdater().setDataBaseURL(configUrl, interval);<NEW_LINE>getAnonymousIpDatabaseUpdater().setDataBaseURL(databaseUrl, interval);<NEW_LINE>AnonymousIp.getCurrentConfig().enabled = true;<NEW_LINE>LOGGER.debug("Anonymous Blocking in use, scheduling service updaters and enabling feature");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.debug("No DS using anonymous ip blocking - disabling feature");<NEW_LINE>getAnonymousIpConfigUpdater().cancelServiceUpdater();<NEW_LINE>getAnonymousIpDatabaseUpdater().cancelServiceUpdater();<NEW_LINE>AnonymousIp.getCurrentConfig().enabled = false;<NEW_LINE>}
LOGGER.info(anonymousPolicyConfiguration + " not configured; stopping service updater and disabling feature");
1,296,799
@SubmarineApi<NEW_LINE>public Response list(@QueryParam("dictCode") String dictCode, @QueryParam("dictName") String dictName, @QueryParam("column") String column, @QueryParam("field") String field, @QueryParam("order") String order, @QueryParam("pageNo") int pageNo, @QueryParam("pageSize") int pageSize) {<NEW_LINE>LOG.info("queryDictList column:{}, field:{}, order:{}, pageNo:{}, pageSize:{}", column, field, order, pageNo, pageSize);<NEW_LINE>List<SysDictEntity> list = null;<NEW_LINE>SqlSession sqlSession = MyBatisUtil.getSqlSession();<NEW_LINE>SysDictMapper sysDictMapper = sqlSession.getMapper(SysDictMapper.class);<NEW_LINE>try {<NEW_LINE>Map<String, Object> where = new HashMap<>();<NEW_LINE>where.put("dictCode", dictCode);<NEW_LINE><MASK><NEW_LINE>list = sysDictMapper.selectAll(where, new RowBounds(pageNo, pageSize));<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error(e.getMessage(), e);<NEW_LINE>return new JsonResponse.Builder<>(Response.Status.OK).success(false).build();<NEW_LINE>} finally {<NEW_LINE>sqlSession.close();<NEW_LINE>}<NEW_LINE>PageInfo<SysDictEntity> page = new PageInfo<>(list);<NEW_LINE>ListResult<SysDictEntity> listResult = new ListResult(list, page.getTotal());<NEW_LINE>return new JsonResponse.Builder<ListResult<SysDictEntity>>(Response.Status.OK).success(true).result(listResult).build();<NEW_LINE>}
where.put("dictName", dictName);
260,024
final ImportServerCatalogResult executeImportServerCatalog(ImportServerCatalogRequest importServerCatalogRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importServerCatalogRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ImportServerCatalogRequest> request = null;<NEW_LINE>Response<ImportServerCatalogResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ImportServerCatalogRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(importServerCatalogRequest));<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, "SMS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ImportServerCatalog");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ImportServerCatalogResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ImportServerCatalogResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
1,221,719
private static <T> T merge(T v1, T v2) {<NEW_LINE>if (v2 == null)<NEW_LINE>return v1;<NEW_LINE>if (v1 instanceof Collection) {<NEW_LINE>final Collection<Object> c1 = (Collection<Object>) v1;<NEW_LINE>final Collection<Object> c2 = (Collection<Object>) v2;<NEW_LINE>final Collection<Object> cm;<NEW_LINE>if (v1 instanceof List)<NEW_LINE>cm = new ArrayList<>(c1.size() + c2.size());<NEW_LINE>else if (v1 instanceof Set)<NEW_LINE>cm = new HashSet<>(c1.size() + c2.size());<NEW_LINE>else<NEW_LINE>throw new RuntimeException("Unhandled type: " + v1.getClass().getName());<NEW_LINE>cm.addAll(c1);<NEW_LINE>addAllIfAbsent(cm, c2);<NEW_LINE>return (T) cm;<NEW_LINE>} else if (v1 instanceof Map) {<NEW_LINE>final Map<Object, Object> mm = new HashMap<>();<NEW_LINE>mm.putAll((Map<MASK><NEW_LINE>mm.putAll((Map<Object, Object>) v2);<NEW_LINE>return (T) mm;<NEW_LINE>} else<NEW_LINE>return v2;<NEW_LINE>}
<Object, Object>) v1);
1,762,415
private Difference textEdit2Difference(FileObject file, TextEdit edit) {<NEW_LINE>if (file != null) {<NEW_LINE>try {<NEW_LINE>EditorCookie ec = file.getLookup().lookup(EditorCookie.class);<NEW_LINE>StyledDocument doc = ec.openDocument();<NEW_LINE>CloneableEditorSupport es = file.getLookup().lookup(CloneableEditorSupport.class);<NEW_LINE>PositionRef start = es.createPositionRef(Utils.getOffset(doc, edit.getRange().getStart()), Position.Bias.Forward);<NEW_LINE>PositionRef end = es.createPositionRef(Utils.getOffset(doc, edit.getRange().getEnd()), Position.Bias.Forward);<NEW_LINE>PositionBounds bounds = new PositionBounds(start, end);<NEW_LINE>return new Difference(Difference.Kind.CHANGE, start, end, bounds.getText(<MASK><NEW_LINE>} catch (IOException | BadLocationException ex) {<NEW_LINE>Exceptions.printStackTrace(ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}
), edit.getNewText());
156,482
public static void process(GrayU8 input, GrayU8 output, int radiusX, int radiusY, int[] offset, int[] histogram) {<NEW_LINE>if (histogram == null)<NEW_LINE>histogram = new int[256];<NEW_LINE>else if (histogram.length < 256)<NEW_LINE>throw new IllegalArgumentException("'histogram' must have at least 256 elements.");<NEW_LINE><MASK><NEW_LINE>int h = 2 * radiusY + 1;<NEW_LINE>if (offset == null) {<NEW_LINE>offset = new int[w * h];<NEW_LINE>} else if (offset.length < w * h) {<NEW_LINE>throw new IllegalArgumentException("'offset' must be at least of length " + (w * w));<NEW_LINE>}<NEW_LINE>int threshold = (w * w) / 2 + 1;<NEW_LINE>int index = 0;<NEW_LINE>for (int i = -radiusY; i <= radiusY; i++) {<NEW_LINE>for (int j = -radiusX; j <= radiusX; j++) {<NEW_LINE>offset[index++] = i * input.stride + j;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (int y = radiusY; y < input.height - radiusY; y++) {<NEW_LINE>for (int x = radiusX; x < input.width - radiusX; x++) {<NEW_LINE>int seed = input.startIndex + y * input.stride + x;<NEW_LINE>for (int i = 0; i < 256; i++) {<NEW_LINE>histogram[i] = 0;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < offset.length; i++) {<NEW_LINE>int val = input.data[seed + offset[i]] & 0xFF;<NEW_LINE>histogram[val]++;<NEW_LINE>}<NEW_LINE>int count = 0;<NEW_LINE>int median;<NEW_LINE>for (median = 0; median < 256; median++) {<NEW_LINE>count += histogram[median];<NEW_LINE>if (count >= threshold)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>output.data[output.startIndex + y * output.stride + x] = (byte) median;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int w = 2 * radiusX + 1;
1,511,029
public ModelAndView alarmAddConfigForm(HttpSession session, HttpServletResponse response, HttpServletRequest request) {<NEW_LINE>ModelAndView mav = new ModelAndView();<NEW_LINE>String group = request.getParameter("ke_alarm_group_name");<NEW_LINE>String type = request.getParameter("ke_alarm_type");<NEW_LINE>String url = request.getParameter("ke_alarm_url");<NEW_LINE>String http = request.getParameter("ke_alarm_http");<NEW_LINE>String address = request.getParameter("ke_alarm_address");<NEW_LINE>String clusterAlias = session.getAttribute(KConstants.SessionAlias.CLUSTER_ALIAS).toString();<NEW_LINE>AlarmConfigInfo alarmConfig = new AlarmConfigInfo();<NEW_LINE>alarmConfig.setCluster(clusterAlias);<NEW_LINE>alarmConfig.setAlarmGroup(group);<NEW_LINE>alarmConfig.setAlarmType(type);<NEW_LINE>alarmConfig.setAlarmUrl(url);<NEW_LINE>alarmConfig.setHttpMethod(http);<NEW_LINE>alarmConfig.setAlarmAddress(address);<NEW_LINE>alarmConfig.setCreated(CalendarUtils.getDate());<NEW_LINE>alarmConfig.setModify(CalendarUtils.getDate());<NEW_LINE>Map<String, Object> params = new HashMap<>();<NEW_LINE>params.put("cluster", clusterAlias);<NEW_LINE>params.put("alarmGroup", group);<NEW_LINE>boolean findCode = alertService.findAlarmConfigByGroupName(params);<NEW_LINE>if (findCode) {<NEW_LINE>session.removeAttribute("Alarm_Config_Status");<NEW_LINE>session.setAttribute("Alarm_Config_Status", "Insert failed alarm group[" + <MASK><NEW_LINE>mav.setViewName("redirect:/alarm/config/failed");<NEW_LINE>} else {<NEW_LINE>int resultCode = alertService.insertOrUpdateAlarmConfig(alarmConfig);<NEW_LINE>if (resultCode > 0) {<NEW_LINE>session.removeAttribute("Alarm_Config_Status");<NEW_LINE>session.setAttribute("Alarm_Config_Status", "Insert success.");<NEW_LINE>mav.setViewName("redirect:/alarm/config/success");<NEW_LINE>} else {<NEW_LINE>session.removeAttribute("Alarm_Config_Status");<NEW_LINE>session.setAttribute("Alarm_Config_Status", "Insert failed.");<NEW_LINE>mav.setViewName("redirect:/alarm/config/failed");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return mav;<NEW_LINE>}
alarmConfig.getAlarmGroup() + "] has exist.");
1,740,796
public JsonObject toJson() {<NEW_LINE>JsonObject json = new JsonObject();<NEW_LINE>json.addProperty("name", name);<NEW_LINE>json.addProperty("hasAudio", hasAudio != null ? hasAudio : DefaultValues.hasAudio);<NEW_LINE>json.addProperty("hasVideo", hasVideo != null ? hasVideo : DefaultValues.hasVideo);<NEW_LINE>json.addProperty("outputMode", outputMode != null ? outputMode.name() : DefaultValues.outputMode.name());<NEW_LINE>if ((OutputMode.COMPOSED.equals(outputMode) || OutputMode.COMPOSED_QUICK_START.equals(outputMode)) && hasVideo) {<NEW_LINE>json.addProperty("recordingLayout", recordingLayout != null ? recordingLayout.name() : DefaultValues.recordingLayout.name());<NEW_LINE>json.addProperty("resolution", resolution != null ? resolution : DefaultValues.resolution);<NEW_LINE>json.addProperty("frameRate", frameRate != <MASK><NEW_LINE>json.addProperty("shmSize", shmSize != null ? shmSize : DefaultValues.shmSize);<NEW_LINE>if (RecordingLayout.CUSTOM.equals(recordingLayout)) {<NEW_LINE>json.addProperty("customLayout", customLayout != null ? customLayout : "");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (OutputMode.INDIVIDUAL.equals(outputMode)) {<NEW_LINE>json.addProperty("ignoreFailedStreams", ignoreFailedStreams != null ? ignoreFailedStreams : DefaultValues.ignoreFailedStreams);<NEW_LINE>}<NEW_LINE>if (this.mediaNode != null) {<NEW_LINE>json.addProperty("mediaNode", mediaNode);<NEW_LINE>}<NEW_LINE>return json;<NEW_LINE>}
null ? frameRate : DefaultValues.frameRate);
889,575
final DescribeICD10CMInferenceJobResult executeDescribeICD10CMInferenceJob(DescribeICD10CMInferenceJobRequest describeICD10CMInferenceJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeICD10CMInferenceJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeICD10CMInferenceJobRequest> request = null;<NEW_LINE>Response<DescribeICD10CMInferenceJobResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeICD10CMInferenceJobRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeICD10CMInferenceJobRequest));<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, "ComprehendMedical");<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<DescribeICD10CMInferenceJobResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DescribeICD10CMInferenceJobResultJsonUnmarshaller());<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, "DescribeICD10CMInferenceJob");
1,172,078
protected void buildTreeAndRestoreState(@Nonnull final XStackFrame stackFrame) {<NEW_LINE>XSourcePosition position = stackFrame.getSourcePosition();<NEW_LINE>XDebuggerTree tree = getTree();<NEW_LINE>tree.setSourcePosition(position);<NEW_LINE>createNewRootNode(stackFrame);<NEW_LINE>final <MASK><NEW_LINE>project.putUserData(XVariablesView.DEBUG_VARIABLES, new XVariablesView.InlineVariablesInfo());<NEW_LINE>project.putUserData(XVariablesView.DEBUG_VARIABLES_TIMESTAMPS, new ObjectLongHashMap<>());<NEW_LINE>clearInlays(tree);<NEW_LINE>Object newEqualityObject = stackFrame.getEqualityObject();<NEW_LINE>if (myFrameEqualityObject != null && newEqualityObject != null && myFrameEqualityObject.equals(newEqualityObject) && myTreeState != null) {<NEW_LINE>disposeTreeRestorer();<NEW_LINE>myTreeRestorer = myTreeState.restoreState(tree);<NEW_LINE>}<NEW_LINE>if (position != null && XDebuggerSettingsManager.getInstance().getDataViewSettings().isValueTooltipAutoShowOnSelection()) {<NEW_LINE>registerInlineEvaluator(stackFrame, position, project);<NEW_LINE>}<NEW_LINE>}
Project project = tree.getProject();
1,525,924
public boolean onClick(MouseEvent e, int clickCount) {<NEW_LINE>int row = getRowForLocation(e.getX(), e.getY());<NEW_LINE>if (row < 0)<NEW_LINE>return false;<NEW_LINE>final Object o = getPathForRow(row).getLastPathComponent();<NEW_LINE>if (!(o instanceof CheckedTreeNode))<NEW_LINE>return false;<NEW_LINE>Rectangle rowBounds = getRowBounds(row);<NEW_LINE>cellRenderer.setBounds(rowBounds);<NEW_LINE>Rectangle checkBounds = cellRenderer.myCheckbox.getBounds();<NEW_LINE>checkBounds.setLocation(rowBounds.getLocation());<NEW_LINE>if (checkBounds.height == 0)<NEW_LINE>checkBounds.height = checkBounds.width = rowBounds.height;<NEW_LINE><MASK><NEW_LINE>if (checkBounds.contains(e.getPoint())) {<NEW_LINE>if (node.isEnabled()) {<NEW_LINE>toggleNode(node);<NEW_LINE>setSelectionRow(row);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>} else if (clickCount > 1) {<NEW_LINE>onDoubleClick(node);<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
final CheckedTreeNode node = (CheckedTreeNode) o;
153,368
private void generateClassificationFile(String classificationName, String fileName, String pkg) throws IOException {<NEW_LINE>FileWriter outputFileWriter = null;<NEW_LINE>BufferedReader reader = null;<NEW_LINE>try {<NEW_LINE>outputFileWriter = new FileWriter(fileName);<NEW_LINE>classificationName = GeneratorUtilities.lowercase1stLetter(classificationName);<NEW_LINE>String uClassificationName = GeneratorUtilities.uppercase1stLetter(classificationName);<NEW_LINE>List<OmrsBeanAttribute> attrList = omrsBeanModel.<MASK><NEW_LINE>reader = new BufferedReader(new FileReader(CLASSIFICATION_TEMPLATE));<NEW_LINE>String line = reader.readLine();<NEW_LINE>while (line != null) {<NEW_LINE>Map<String, String> replacementMap = new HashMap<>();<NEW_LINE>replacementMap.put("uname", uClassificationName);<NEW_LINE>replacementMap.put("name", classificationName);<NEW_LINE>replacementMap.put("description", omrsBeanModel.getTypeDefDescription(uClassificationName));<NEW_LINE>replacementMap.put("package", pkg);<NEW_LINE>writeAttributesToFile(attrList, replacementMap, outputFileWriter, reader, line);<NEW_LINE>line = reader.readLine();<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>closeReaderAndFileWriter(outputFileWriter, reader);<NEW_LINE>}<NEW_LINE>}
getOmrsBeanClassificationAttributeMap().get(uClassificationName);
224,243
public static <U extends Locatable> void annotateReadLikelihoodsWithSupportedAlleles(final VariantContext vc, final AlleleLikelihoods<U, Allele> likelihoodsAllele, final Function<U, Collection<GATKRead>> readCollectionFunc) {<NEW_LINE>// assign supported alleles to each read<NEW_LINE>final Map<Allele, List<Allele>> alleleSubset = vc.getAlleles().stream().collect(Collectors.toMap(a -> a, Arrays::asList));<NEW_LINE>final AlleleLikelihoods<U, Allele> subsettedLikelihoods = likelihoodsAllele.marginalize(alleleSubset);<NEW_LINE>final Collection<AlleleLikelihoods<U, Allele>.BestAllele> bestAlleles = subsettedLikelihoods.bestAllelesBreakingTies().stream().filter(ba -> ba.isInformative()).<MASK><NEW_LINE>for (AlleleLikelihoods<U, Allele>.BestAllele bestAllele : bestAlleles) {<NEW_LINE>final Allele allele = bestAllele.allele;<NEW_LINE>for (final GATKRead read : readCollectionFunc.apply(bestAllele.evidence)) {<NEW_LINE>final String prevAllelesString = read.hasAttribute(SUPPORTED_ALLELES_TAG) ? read.getAttributeAsString(SUPPORTED_ALLELES_TAG) + ", " : "";<NEW_LINE>final String newAllelesString = vc.getContig() + ":" + vc.getStart() + "=" + vc.getAlleleIndex(allele);<NEW_LINE>read.setAttribute(SUPPORTED_ALLELES_TAG, prevAllelesString + newAllelesString);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
collect(Collectors.toList());
1,447,863
public Collection<Class<?>> load() throws PluginLoadException {<NEW_LINE>List<Class<?>> plugins = new ArrayList<>();<NEW_LINE>PluginClassLoader loader = new PluginClassLoader(pluginJarUrls.values().toArray(new URL[0]));<NEW_LINE>VMUtil.setParent(loader, Recaf.class.getClassLoader());<NEW_LINE>for (Path pluginPath : pluginJarUrls.keySet()) {<NEW_LINE>File path = pluginPath.toAbsolutePath().toFile();<NEW_LINE>String className = null;<NEW_LINE>try (JarFile jar = new JarFile(path)) {<NEW_LINE>for (Enumeration<JarEntry> entries = jar.entries(); entries.hasMoreElements(); ) {<NEW_LINE>JarEntry entry = entries.nextElement();<NEW_LINE>if (entry.isDirectory())<NEW_LINE>continue;<NEW_LINE>// Add classes<NEW_LINE>if (entry.getName().endsWith(".class")) {<NEW_LINE>className = toName(entry);<NEW_LINE>if (isPluginClass(jar, entry)) {<NEW_LINE>plugins.add(Class.forName<MASK><NEW_LINE>}<NEW_LINE>classToPlugin.put(className, pluginPath);<NEW_LINE>} else // Check for plugin icon<NEW_LINE>if (entry.getName().endsWith("icon.png")) {<NEW_LINE>BufferedImage image = ImageIO.read(jar.getInputStream(entry));<NEW_LINE>pluginIcons.put(pluginPath, image);<NEW_LINE>} else // Check for translation files<NEW_LINE>if (entry.getName().endsWith(LangUtil.DEFAULT_LANGUAGE + ".json")) {<NEW_LINE>LangUtil.load(jar.getInputStream(entry));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>throw new PluginLoadException(path, ex, "Failed to load jar file");<NEW_LINE>} catch (ReflectiveOperationException ex) {<NEW_LINE>throw new PluginLoadException(path, ex, "Failed to load '" + className + "' in jar");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return plugins;<NEW_LINE>}
(className, false, loader));
715,962
public void userGetWalletSummary(String currency, final Response.Listener<List<Transaction>> responseListener, final Response.ErrorListener errorListener) {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/user/walletSummary".replaceAll("\\{format\\}", "json");<NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams = new ArrayList<Pair>();<NEW_LINE>// header params<NEW_LINE>Map<String, String> headerParams = new HashMap<String, String>();<NEW_LINE>// form params<NEW_LINE>Map<String, String> formParams = new HashMap<String, String>();<NEW_LINE>queryParams.addAll(ApiInvoker.parameterToPairs("", "currency", currency));<NEW_LINE>String[] contentTypes = { "application/json", "application/x-www-form-urlencoded" };<NEW_LINE>String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";<NEW_LINE>if (contentType.startsWith("multipart/form-data")) {<NEW_LINE>// file uploading<NEW_LINE>MultipartEntityBuilder localVarBuilder = MultipartEntityBuilder.create();<NEW_LINE><MASK><NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] { "apiExpires", "apiKey", "apiSignature" };<NEW_LINE>try {<NEW_LINE>apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames, new Response.Listener<String>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(String localVarResponse) {<NEW_LINE>try {<NEW_LINE>responseListener.onResponse((List<Transaction>) ApiInvoker.deserialize(localVarResponse, "array", Transaction.class));<NEW_LINE>} catch (ApiException exception) {<NEW_LINE>errorListener.onErrorResponse(new VolleyError(exception));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}, new Response.ErrorListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onErrorResponse(VolleyError error) {<NEW_LINE>errorListener.onErrorResponse(error);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>errorListener.onErrorResponse(new VolleyError(ex));<NEW_LINE>}<NEW_LINE>}
HttpEntity httpEntity = localVarBuilder.build();
759,312
private void checkHashes() {<NEW_LINE>for (ModuleReference mref : nameToReference.values()) {<NEW_LINE>// get the recorded hashes, if any<NEW_LINE>if (!(mref instanceof ModuleReferenceImpl))<NEW_LINE>continue;<NEW_LINE>ModuleHashes hashes = ((ModuleReferenceImpl) mref).recordedHashes();<NEW_LINE>if (hashes == null)<NEW_LINE>continue;<NEW_LINE>ModuleDescriptor descriptor = mref.descriptor();<NEW_LINE>String algorithm = hashes.algorithm();<NEW_LINE>for (String dn : hashes.names()) {<NEW_LINE>ModuleReference mref2 = nameToReference.get(dn);<NEW_LINE>if (mref2 == null) {<NEW_LINE>ResolvedModule resolvedModule = findInParent(dn);<NEW_LINE>if (resolvedModule != null)<NEW_LINE>mref2 = resolvedModule.reference();<NEW_LINE>}<NEW_LINE>if (mref2 == null)<NEW_LINE>continue;<NEW_LINE>if (!(mref2 instanceof ModuleReferenceImpl)) {<NEW_LINE>findFail("Unable to compute the hash of module %s", dn);<NEW_LINE>}<NEW_LINE>ModuleReferenceImpl other = (ModuleReferenceImpl) mref2;<NEW_LINE>if (other != null) {<NEW_LINE>byte[] recordedHash = hashes.hashFor(dn);<NEW_LINE>byte[] actualHash = other.computeHash(algorithm);<NEW_LINE>if (actualHash == null)<NEW_LINE>findFail("Unable to compute the hash of module %s", dn);<NEW_LINE>if (!Arrays.equals(recordedHash, actualHash)) {<NEW_LINE>findFail("Hash of %s (%s) differs to expected hash (%s)" + " recorded in %s", dn, toHexString(actualHash), toHexString(recordedHash<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
), descriptor.name());
1,317,108
private static void generateEnumDecoder(final StringBuilder sb, final int level, final Token fieldToken, final Token typeToken, final String name) throws IOException {<NEW_LINE>final String referencedName = typeToken.referencedName();<NEW_LINE>final String enumType = formatStructName(referencedName == null ? typeToken.name() : referencedName);<NEW_LINE>if (fieldToken.isConstantEncoding()) {<NEW_LINE>indent(sb, level, "/// CONSTANT enum\n");<NEW_LINE>final Encoding encoding = fieldToken.encoding();<NEW_LINE>final String rawConstValueName = encoding.constValue().toString();<NEW_LINE>final int indexOfDot = rawConstValueName.indexOf('.');<NEW_LINE>final String constValueName = -1 == indexOfDot ? rawConstValueName : rawConstValueName.substring(indexOfDot + 1);<NEW_LINE>final String constantRustExpression = enumType + "::" + constValueName;<NEW_LINE>appendConstAccessor(sb, name, enumType, constantRustExpression, level);<NEW_LINE>} else {<NEW_LINE>final <MASK><NEW_LINE>final String rustPrimitiveType = rustTypeName(encoding.primitiveType());<NEW_LINE>indent(sb, level, "/// REQUIRED enum\n");<NEW_LINE>indent(sb, level, "#[inline]\n");<NEW_LINE>indent(sb, level, "pub fn %s(&self) -> %s {\n", formatFunctionName(name), enumType);<NEW_LINE>if (fieldToken.version() > 0) {<NEW_LINE>indent(sb, level + 1, "if self.acting_version < %d {\n", fieldToken.version());<NEW_LINE>indent(sb, level + 2, "return %s::default();\n", enumType);<NEW_LINE>indent(sb, level + 1, "}\n\n");<NEW_LINE>}<NEW_LINE>indent(sb, level + 1, "self.get_buf().get_%s_at(self.%s).into()\n", rustPrimitiveType, getBufOffset(typeToken));<NEW_LINE>indent(sb, level, "}\n\n");<NEW_LINE>}<NEW_LINE>}
Encoding encoding = typeToken.encoding();
1,648,398
protected void configureWebView() {<NEW_LINE>if (isActionableDirectUsage()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mWebView.getSettings().setJavaScriptEnabled(true);<NEW_LINE>mWebView.getSettings().setDomStorageEnabled(true);<NEW_LINE>CookieManager cookieManager = CookieManager.getInstance();<NEW_LINE>cookieManager.setAcceptThirdPartyCookies(mWebView, true);<NEW_LINE>final Bundle extras <MASK><NEW_LINE>// Configure the allowed URLs if available<NEW_LINE>ArrayList<String> allowedURL = null;<NEW_LINE>if (extras != null && extras.getBoolean(DISABLE_LINKS_ON_PAGE, false)) {<NEW_LINE>String addressToLoad = extras.getString(URL_TO_LOAD);<NEW_LINE>String authURL = extras.getString(AUTHENTICATION_URL);<NEW_LINE>allowedURL = new ArrayList<>();<NEW_LINE>if (!TextUtils.isEmpty(addressToLoad)) {<NEW_LINE>allowedURL.add(addressToLoad);<NEW_LINE>}<NEW_LINE>if (!TextUtils.isEmpty(authURL)) {<NEW_LINE>allowedURL.add(authURL);<NEW_LINE>}<NEW_LINE>if (extras.getStringArray(ALLOWED_URLS) != null) {<NEW_LINE>String[] urls = extras.getStringArray(ALLOWED_URLS);<NEW_LINE>for (String currentURL : urls) {<NEW_LINE>allowedURL.add(currentURL);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (mPreviewModeChangeAllowed) {<NEW_LINE>mWebView.getSettings().setUseWideViewPort(true);<NEW_LINE>mWebView.setInitialScale(PREVIEW_INITIAL_SCALE);<NEW_LINE>}<NEW_LINE>WebViewClient webViewClient = createWebViewClient(allowedURL);<NEW_LINE>mWebView.setWebViewClient(webViewClient);<NEW_LINE>mWPWebChromeClientWithFileChooser = new WPWebChromeClientWithFileChooser(this, mWebView, R.drawable.media_movieclip, (ProgressBar) findViewById(R.id.progress_bar), this);<NEW_LINE>mWebView.setWebChromeClient(mWPWebChromeClientWithFileChooser);<NEW_LINE>}
= getIntent().getExtras();
570,968
public VoidResponse removeCohortRegistration(String userId, String serverName, String serverToBeConfiguredName, String cohortName) {<NEW_LINE>String methodName = "removeCohortRegistration";<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Entering method: " + methodName + " with serverName " + serverName + " server To Be Configured Name " + serverToBeConfiguredName);<NEW_LINE>}<NEW_LINE>VoidResponse response = new VoidResponse();<NEW_LINE>AuditLog auditLog = null;<NEW_LINE>try {<NEW_LINE>auditLog = instanceHandler.getAuditLog(userId, serverName, methodName);<NEW_LINE>// unregister cohort<NEW_LINE>ServerAuthorViewHandler handler = instanceHandler.getServerAuthorViewHandler(userId, serverName, methodName);<NEW_LINE><MASK><NEW_LINE>} catch (Exception exception) {<NEW_LINE>restExceptionHandler.captureExceptions(response, exception, methodName, auditLog);<NEW_LINE>}<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Returning from method: " + methodName + " with response: " + response.toString());<NEW_LINE>}<NEW_LINE>return response;<NEW_LINE>}
handler.removeCohortRegistration(serverToBeConfiguredName, cohortName);
67,609
protected void encodeColumnHeaderContent(FacesContext context, DataTable table, UIColumn column, SortMeta sortMeta) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>UIComponent header = column.getFacet("header");<NEW_LINE>String headerText = column.getHeaderText();<NEW_LINE>writer.startElement("span", null);<NEW_LINE>writer.writeAttribute("class", DataTable.COLUMN_TITLE_CLASS, null);<NEW_LINE>if (ComponentUtils.shouldRenderFacet(header, table.isRenderEmptyFacets())) {<NEW_LINE>header.encodeAll(context);<NEW_LINE>} else if (headerText != null) {<NEW_LINE>if (table.isEscapeText()) {<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>writer.write(headerText);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>writer.endElement("span");<NEW_LINE>if (sortMeta != null) {<NEW_LINE>String sortIcon = resolveDefaultSortIcon(sortMeta);<NEW_LINE>if (sortIcon != null) {<NEW_LINE>writer.startElement("span", null);<NEW_LINE>writer.writeAttribute("class", sortIcon, null);<NEW_LINE>writer.endElement("span");<NEW_LINE>if (table.isMultiSort()) {<NEW_LINE>writer.startElement("span", null);<NEW_LINE>writer.writeAttribute("class", DataTable.SORTABLE_PRIORITY_CLASS, null);<NEW_LINE>writer.endElement("span");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
writer.writeText(headerText, "headerText");
661,277
private Map<String, String> buildRemapMultiVersions(Iterator<String> zipNameIterator) {<NEW_LINE>SimpleMultiMap<Integer, String> byVersions = SimpleMultiMap.newHashMap();<NEW_LINE>while (zipNameIterator.hasNext()) {<NEW_LINE>String name = zipNameIterator.next();<NEW_LINE>String prefix = "META-INF/versions/";<NEW_LINE>if (name.startsWith(prefix)) {<NEW_LINE>try {<NEW_LINE>int endIndex = name.indexOf('/', prefix.length());<NEW_LINE>if (endIndex == -1 || name.charAt(name.length() - 1) == '/') {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>int ver = Integer.parseInt(name.substring(prefix.length(), endIndex));<NEW_LINE>String normalizeUrl = name.substring(endIndex + 1, name.length());<NEW_LINE>byVersions.putValue(ver, normalizeUrl);<NEW_LINE>} catch (Exception e) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (byVersions.isEmpty()) {<NEW_LINE>return Collections.emptyMap();<NEW_LINE>}<NEW_LINE>JavaVersion javaVersion = JavaVersion.current();<NEW_LINE>Map<String, String> toRemap = new HashMap<String, String>();<NEW_LINE>// if version is 14, array will be 14,13,12,11,10,9,8<NEW_LINE>for (int ver = javaVersion.feature; ver != 7; ver--) {<NEW_LINE>Collection<String> urls = byVersions.get(ver);<NEW_LINE>if (urls.isEmpty()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>for (String url : urls) {<NEW_LINE>if (toRemap.containsKey(url)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>toRemap.put(url, buildVersionableUrl(ver, url));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return toRemap;<NEW_LINE>}
error("url: " + myFilePath, e);
1,399,677
public Result visit(TableModify modify) {<NEW_LINE>final Map<String, RelDataType> pairs = ImmutableMap.of();<NEW_LINE>final Context context = aliasContext(pairs, false);<NEW_LINE>// Target Table Name<NEW_LINE>final SqlIdentifier sqlTargetTable = getSqlTargetTable(modify);<NEW_LINE>switch(modify.getOperation()) {<NEW_LINE>case INSERT:<NEW_LINE>{<NEW_LINE>// Convert the input to a SELECT query or keep as VALUES. Not all<NEW_LINE>// dialects support naked VALUES, but all support VALUES inside INSERT.<NEW_LINE>final SqlNode sqlSource = visitInput(modify, 0).asQueryOrValues();<NEW_LINE>final SqlInsert sqlInsert = new SqlInsert(POS, SqlNodeList.EMPTY, sqlTargetTable, sqlSource, identifierList(modify.getTable().getRowType().getFieldNames()));<NEW_LINE>return result(sqlInsert, ImmutableList.<MASK><NEW_LINE>}<NEW_LINE>case UPDATE:<NEW_LINE>{<NEW_LINE>final Result input = visitInput(modify, 0);<NEW_LINE>final SqlUpdate sqlUpdate = new SqlUpdate(POS, sqlTargetTable, identifierList(modify.getUpdateColumnList()), exprList(context, modify.getSourceExpressionList()), ((SqlSelect) input.node).getWhere(), input.asSelect(), null);<NEW_LINE>return result(sqlUpdate, input.clauses, modify, null);<NEW_LINE>}<NEW_LINE>case DELETE:<NEW_LINE>{<NEW_LINE>final Result input = visitInput(modify, 0);<NEW_LINE>final SqlDelete sqlDelete = new SqlDelete(POS, sqlTargetTable, input.asSelect().getWhere(), input.asSelect(), null);<NEW_LINE>return result(sqlDelete, input.clauses, modify, null);<NEW_LINE>}<NEW_LINE>case MERGE:<NEW_LINE>default:<NEW_LINE>throw new AssertionError("not implemented: " + modify);<NEW_LINE>}<NEW_LINE>}
of(), modify, null);
1,614,661
private void registerDSDReferredByApplication(String appName, DataSourceDefinitionDescriptor dsd) {<NEW_LINE>// It is possible that JPA might call this method multiple times in a single deployment,<NEW_LINE>// when there are multiple PUs eg: one PU in each of war, ejb-jar. Make sure that<NEW_LINE>// DSD is bound to JNDI only when it is not already deployed.<NEW_LINE>if (!dsd.isDeployed()) {<NEW_LINE>CommonResourceProxy proxy = dataSourceDefinitionProxyProvider.get();<NEW_LINE><MASK><NEW_LINE>proxy.setDescriptor(dsd);<NEW_LINE>String dsdName = dsd.getName();<NEW_LINE>if (dsdName.startsWith(JAVA_APP_SCOPE_PREFIX)) {<NEW_LINE>dsd.setResourceId(appName);<NEW_LINE>}<NEW_LINE>if (dsdName.startsWith(JAVA_GLOBAL_SCOPE_PREFIX) || dsdName.startsWith(JAVA_APP_SCOPE_PREFIX)) {<NEW_LINE>ResourceInfo resourceInfo = new ResourceInfo(dsdName, appName, null);<NEW_LINE>try {<NEW_LINE>resourceNamingService.publishObject(resourceInfo, proxy, true);<NEW_LINE>dsd.setDeployed(true);<NEW_LINE>} catch (NamingException e) {<NEW_LINE>_logger.log(Level.WARNING, "dsd.registration.failed", new Object[] { appName, dsdName, e });<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
ResourceNamingService resourceNamingService = resourceNamingServiceProvider.get();
1,125,941
final DeleteAutoSnapshotResult executeDeleteAutoSnapshot(DeleteAutoSnapshotRequest deleteAutoSnapshotRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAutoSnapshotRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteAutoSnapshotRequest> request = null;<NEW_LINE>Response<DeleteAutoSnapshotResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteAutoSnapshotRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteAutoSnapshotRequest));<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, "Lightsail");<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<DeleteAutoSnapshotResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteAutoSnapshotResultJsonUnmarshaller());<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, "DeleteAutoSnapshot");
1,558,075
public com.amazonaws.services.simpleworkflow.model.WorkflowExecutionAlreadyStartedException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simpleworkflow.model.WorkflowExecutionAlreadyStartedException workflowExecutionAlreadyStartedException = new com.amazonaws.services.<MASK><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>} 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 workflowExecutionAlreadyStartedException;<NEW_LINE>}
simpleworkflow.model.WorkflowExecutionAlreadyStartedException(null);
1,109,434
protected void decompilerActionPerformed(DecompilerActionContext context) {<NEW_LINE>Function func = context.getFunction();<NEW_LINE>Program program = func.getProgram();<NEW_LINE>PcodeOp op = getCallOp(program, context.getTokenAtCursor());<NEW_LINE>Function calledfunc = getCalledFunction(program, op);<NEW_LINE>boolean varargs = false;<NEW_LINE>if (calledfunc != null) {<NEW_LINE>varargs = calledfunc.hasVarArgs();<NEW_LINE>}<NEW_LINE>if ((op.getOpcode() == PcodeOp.CALL) && !varargs) {<NEW_LINE>if (OptionDialog.showOptionDialog(context.getDecompilerPanel(), "Warning : Localized Override", "Incorrect information entered here may hide other good information.\n" + "For direct calls, it is usually better to alter the prototype on the function\n" + "itself, rather than overriding the local call. Proceed anyway?", "Proceed") != 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Address addr = op.getSeqnum().getTarget();<NEW_LINE>// Default if we don't have a real name<NEW_LINE>String name = "func";<NEW_LINE>String conv = program.getCompilerSpec().getDefaultCallingConvention().getName();<NEW_LINE>if (calledfunc != null) {<NEW_LINE>name = calledfunc.getName();<NEW_LINE>conv = calledfunc.getCallingConventionName();<NEW_LINE>}<NEW_LINE>String signature = generateSignature(op, name, calledfunc);<NEW_LINE>PluginTool tool = context.getTool();<NEW_LINE>ProtoOverrideDialog dialog = new ProtoOverrideDialog(tool, calledfunc != null ? calledfunc : func, signature, conv);<NEW_LINE>tool.showDialog(dialog);<NEW_LINE>FunctionDefinition fdef = dialog.getFunctionDefinition();<NEW_LINE>if (fdef == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int transaction = program.startTransaction("Override Signature");<NEW_LINE>boolean commit = false;<NEW_LINE>try {<NEW_LINE>HighFunctionDBUtil.writeOverride(func, addr, fdef);<NEW_LINE>commit = true;<NEW_LINE>} catch (Exception e) {<NEW_LINE>Msg.showError(getClass(), context.getDecompilerPanel(<MASK><NEW_LINE>} finally {<NEW_LINE>program.endTransaction(transaction, commit);<NEW_LINE>}<NEW_LINE>}
), "Override Signature Failed", "Error overriding signature: " + e);
1,543,937
private void checkExistingConfig(ServerConfiguration libertyConfig) {<NEW_LINE>String requestedPort = libertyConfig.getHttpEndpoints().get(0).getId().<MASK><NEW_LINE>// Checks ConfigurationAdmin to see if the ID for the following<NEW_LINE>// exist. This is done in priority order because if a higher<NEW_LINE>// priority configuration is found then we remove all the lower<NEW_LINE>// priority elements as well as the element with the matching ID<NEW_LINE>// 1. <virtualHost/> - highest priority<NEW_LINE>if (!libertyConfig.getVirtualHosts().isEmpty()) {<NEW_LINE>if (checkVirtualHost(libertyConfig, requestedPort)) {<NEW_LINE>// found matching ID for <virtualHost/> return because we cleared out the rest<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// 2. <httpEndpoint/> - second priority<NEW_LINE>if (checkHttpEndpoint(libertyConfig, requestedPort)) {<NEW_LINE>// found matching ID for <httpEndpoint/> return because we cleared out the other<NEW_LINE>// lower priority elements<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// 3. <ssl/> - third priority<NEW_LINE>if (checkSsl(libertyConfig, requestedPort)) {<NEW_LINE>// found matching ID for <ssl/> return because we cleared out the other<NEW_LINE>// lower priority elements<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// 4. <keyStore/> - forth priority, this checks for both the KeyStore and TrustStore<NEW_LINE>checkKeyStores(libertyConfig);<NEW_LINE>}
substring(ID_HTTP_ENDPOINT.length());
714,910
final DescribeServiceIntegrationResult executeDescribeServiceIntegration(DescribeServiceIntegrationRequest describeServiceIntegrationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeServiceIntegrationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeServiceIntegrationRequest> request = null;<NEW_LINE>Response<DescribeServiceIntegrationResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeServiceIntegrationRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(describeServiceIntegrationRequest));<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, "DevOps Guru");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeServiceIntegration");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DescribeServiceIntegrationResult>> 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 DescribeServiceIntegrationResultJsonUnmarshaller());
263,883
public static Object createObjectFromString(String type, String value) throws Exception {<NEW_LINE>Object result;<NEW_LINE>if (primitiveToWrapper.containsKey(type)) {<NEW_LINE>if (type.equals(Character.TYPE.getName())) {<NEW_LINE>result = new Character(value.charAt(0));<NEW_LINE>} else {<NEW_LINE>result = newStringConstructor(((Class<?>) primitiveToWrapper.get(type)<MASK><NEW_LINE>}<NEW_LINE>} else if (type.equals(Character.class.getName())) {<NEW_LINE>result = new Character(value.charAt(0));<NEW_LINE>} else if (Number.class.isAssignableFrom(Utils.getClass(type))) {<NEW_LINE>result = createNumberFromStringValue(type, value);<NEW_LINE>} else if (String[].class.isAssignableFrom(Utils.getClass(type))) {<NEW_LINE>// NOI18N<NEW_LINE>String[] args = value.split(",");<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>args[i] = args[i].trim();<NEW_LINE>}<NEW_LINE>result = args;<NEW_LINE>} else if (value == null || value.toString().equals("null")) {<NEW_LINE>// NOI18N<NEW_LINE>// hack for null value<NEW_LINE>result = null;<NEW_LINE>} else {<NEW_LINE>// try to create a Java object using<NEW_LINE>// the one-string-param constructor<NEW_LINE>result = newStringConstructor(type, value);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
).getName(), value);
1,822,698
public static PipelineSource fromDao(PipelineRuleParser parser, PipelineDao dao) {<NEW_LINE>Set<ParseError> errors = null;<NEW_LINE>Pipeline pipeline = null;<NEW_LINE>try {<NEW_LINE>pipeline = parser.parsePipeline(dao.id(<MASK><NEW_LINE>} catch (ParseException e) {<NEW_LINE>errors = e.getErrors();<NEW_LINE>}<NEW_LINE>final List<StageSource> stageSources = (pipeline == null) ? Collections.emptyList() : pipeline.stages().stream().map(stage -> StageSource.builder().match(stage.match()).rules(stage.ruleReferences()).stage(stage.stage()).build()).collect(Collectors.toList());<NEW_LINE>return builder().id(dao.id()).title(dao.title()).description(dao.description()).source(dao.source()).createdAt(dao.createdAt()).modifiedAt(dao.modifiedAt()).stages(stageSources).errors(errors).build();<NEW_LINE>}
), dao.source());
356,895
private AmazonS3 createAmazonS3Client(Configuration hadoopConfig, ClientConfiguration clientConfig) {<NEW_LINE>Optional<EncryptionMaterialsProvider> encryptionMaterialsProvider = createEncryptionMaterialsProvider(hadoopConfig);<NEW_LINE>AmazonS3Builder<? extends AmazonS3Builder, ? extends AmazonS3> clientBuilder;<NEW_LINE>String signerType = hadoopConfig.get(S3_SIGNER_TYPE);<NEW_LINE>if (signerType != null) {<NEW_LINE>clientConfig.withSignerOverride(signerType);<NEW_LINE>}<NEW_LINE>if (encryptionMaterialsProvider.isPresent()) {<NEW_LINE>clientBuilder = AmazonS3EncryptionClient.encryptionBuilder().withCredentials(credentialsProvider).withEncryptionMaterials(encryptionMaterialsProvider.get()).withClientConfiguration(clientConfig).withMetricsCollector(METRIC_COLLECTOR);<NEW_LINE>} else {<NEW_LINE>clientBuilder = AmazonS3Client.builder().withCredentials(credentialsProvider).withClientConfiguration(clientConfig).withMetricsCollector(METRIC_COLLECTOR);<NEW_LINE>}<NEW_LINE>boolean regionOrEndpointSet = false;<NEW_LINE>// use local region when running inside of EC2<NEW_LINE>if (pinS3ClientToCurrentRegion) {<NEW_LINE>Region region = Regions.getCurrentRegion();<NEW_LINE>if (region != null) {<NEW_LINE>clientBuilder = clientBuilder.withRegion(region.getName());<NEW_LINE>regionOrEndpointSet = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String endpoint = hadoopConfig.get(S3_ENDPOINT);<NEW_LINE>if (endpoint != null) {<NEW_LINE>clientBuilder = clientBuilder.withEndpointConfiguration(new EndpointConfiguration(endpoint, null));<NEW_LINE>regionOrEndpointSet = true;<NEW_LINE>}<NEW_LINE>if (isPathStyleAccess) {<NEW_LINE>clientBuilder = clientBuilder.enablePathStyleAccess();<NEW_LINE>}<NEW_LINE>if (!regionOrEndpointSet) {<NEW_LINE><MASK><NEW_LINE>clientBuilder.setForceGlobalBucketAccessEnabled(true);<NEW_LINE>}<NEW_LINE>return clientBuilder.build();<NEW_LINE>}
clientBuilder = clientBuilder.withRegion(US_EAST_1);
3,781
public void handleRefresh() {<NEW_LINE>if (!chromeCast.isConnected()) {<NEW_LINE>scheduler.cancelRefresh();<NEW_LINE>scheduler.scheduleConnect();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Status status;<NEW_LINE>try {<NEW_LINE>status = chromeCast.getStatus();<NEW_LINE>statusUpdater.processStatusUpdate(status);<NEW_LINE>if (status == null) {<NEW_LINE>scheduler.cancelRefresh();<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.debug("Failed to request status: {}", ex.getMessage());<NEW_LINE>statusUpdater.updateStatus(ThingStatus.OFFLINE, COMMUNICATION_ERROR, ex.getMessage());<NEW_LINE>scheduler.cancelRefresh();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (status != null && status.getRunningApp() != null) {<NEW_LINE><MASK><NEW_LINE>statusUpdater.updateMediaStatus(mediaStatus);<NEW_LINE>if (mediaStatus != null && mediaStatus.playerState == MediaStatus.PlayerState.IDLE && mediaStatus.idleReason != null && mediaStatus.idleReason != MediaStatus.IdleReason.INTERRUPTED) {<NEW_LINE>stopMediaPlayerApp();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.debug("Failed to request media status with a running app: {}", ex.getMessage());<NEW_LINE>// We were just able to request status, so let's not put the device OFFLINE.<NEW_LINE>}<NEW_LINE>}
MediaStatus mediaStatus = chromeCast.getMediaStatus();
945,720
private void createScanRangeLocationsForSplit(long partitionId, HivePartition partition, HdfsFileDesc fileDesc, HdfsFileBlockDesc blockDesc, long offset, long length) {<NEW_LINE>TScanRangeLocations scanRangeLocations = new TScanRangeLocations();<NEW_LINE>THdfsScanRange hdfsScanRange = new THdfsScanRange();<NEW_LINE>hdfsScanRange.setRelative_path(fileDesc.getFileName());<NEW_LINE>hdfsScanRange.setOffset(offset);<NEW_LINE>hdfsScanRange.setLength(length);<NEW_LINE>hdfsScanRange.setPartition_id(partitionId);<NEW_LINE>hdfsScanRange.setFile_length(fileDesc.getLength());<NEW_LINE>hdfsScanRange.setFile_format(partition.getFormat().toThrift());<NEW_LINE>hdfsScanRange.setText_file_desc(fileDesc.getTextFileFormatDesc().toThrift());<NEW_LINE>TScanRange scanRange = new TScanRange();<NEW_LINE>scanRange.setHdfs_scan_range(hdfsScanRange);<NEW_LINE>scanRangeLocations.setScan_range(scanRange);<NEW_LINE>if (blockDesc.getReplicaHostIds().length == 0) {<NEW_LINE>String message = String.format("hdfs file block has no host. file = %s/%s", partition.getFullPath(), fileDesc.getFileName());<NEW_LINE>throw new StarRocksPlannerException(message, ErrorType.INTERNAL_ERROR);<NEW_LINE>}<NEW_LINE>for (long hostId : blockDesc.getReplicaHostIds()) {<NEW_LINE>String <MASK><NEW_LINE>TScanRangeLocation scanRangeLocation = new TScanRangeLocation(new TNetworkAddress(host, -1));<NEW_LINE>scanRangeLocations.addToLocations(scanRangeLocation);<NEW_LINE>}<NEW_LINE>result.add(scanRangeLocations);<NEW_LINE>}
host = blockDesc.getDataNodeIp(hostId);
1,458,438
public BatchDeleteDevicePositionHistoryResult batchDeleteDevicePositionHistory(BatchDeleteDevicePositionHistoryRequest batchDeleteDevicePositionHistoryRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDeleteDevicePositionHistoryRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<BatchDeleteDevicePositionHistoryRequest> request = null;<NEW_LINE>Response<BatchDeleteDevicePositionHistoryResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new BatchDeleteDevicePositionHistoryRequestMarshaller().marshall(batchDeleteDevicePositionHistoryRequest);<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<BatchDeleteDevicePositionHistoryResult, JsonUnmarshallerContext> unmarshaller = new BatchDeleteDevicePositionHistoryResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<BatchDeleteDevicePositionHistoryResult> responseHandler = new JsonResponseHandler<BatchDeleteDevicePositionHistoryResult>(unmarshaller);<NEW_LINE>response = <MASK><NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
invoke(request, responseHandler, executionContext);
1,161,029
protected static void attachCallback(MqttClient client, String deviceId) throws MqttException, UnsupportedEncodingException {<NEW_LINE>mCallback = new MqttCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void connectionLost(Throwable cause) {<NEW_LINE>// Do nothing...<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void messageArrived(String topic, MqttMessage message) {<NEW_LINE>try {<NEW_LINE>String payload = new String(message.getPayload(), StandardCharsets.UTF_8.name());<NEW_LINE>System.out.println("Payload : " + payload);<NEW_LINE>// TODO: Insert your parsing / handling of the configuration message here.<NEW_LINE>//<NEW_LINE>} catch (UnsupportedEncodingException uee) {<NEW_LINE>System.err.println(uee);<NEW_LINE>}<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void deliveryComplete(IMqttDeliveryToken token) {<NEW_LINE>// Do nothing;<NEW_LINE>}<NEW_LINE>};<NEW_LINE>String commandTopic = String.format("/devices/%s/commands/#", deviceId);<NEW_LINE>System.out.println(String<MASK><NEW_LINE>String configTopic = String.format("/devices/%s/config", deviceId);<NEW_LINE>System.out.println(String.format("Listening on %s", configTopic));<NEW_LINE>client.subscribe(configTopic, 1);<NEW_LINE>client.subscribe(commandTopic, 1);<NEW_LINE>client.setCallback(mCallback);<NEW_LINE>}
.format("Listening on %s", commandTopic));
1,289,556
public RejectedLogEventsInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RejectedLogEventsInfo rejectedLogEventsInfo = new RejectedLogEventsInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("tooNewLogEventStartIndex", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>rejectedLogEventsInfo.setTooNewLogEventStartIndex(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("tooOldLogEventEndIndex", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>rejectedLogEventsInfo.setTooOldLogEventEndIndex(context.getUnmarshaller(Integer.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("expiredLogEventEndIndex", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>rejectedLogEventsInfo.setExpiredLogEventEndIndex(context.getUnmarshaller(Integer.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 rejectedLogEventsInfo;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
319,955
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>log.fine("Process Menu Request");<NEW_LINE>// Get Parameter: Exit<NEW_LINE>if (MobileUtil.getParameter(request, "Exit") != null) {<NEW_LINE>MobileUtil.createLoginPage(request, response, this, null, "Exit");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Get Session attributes<NEW_LINE>MobileSessionCtx wsc = MobileSessionCtx.get(request);<NEW_LINE>if (wsc.ctx == null) {<NEW_LINE>MobileUtil.createTimeoutPage(request, response, this, null);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Window<NEW_LINE>int AD_Window_ID = MobileUtil.getParameterAsInt(request, "AD_Window_ID");<NEW_LINE>// Forward to WWindow<NEW_LINE>if (AD_Window_ID != 0) {<NEW_LINE>log.fine("AD_Window_ID=" + AD_Window_ID);<NEW_LINE>//<NEW_LINE>String url = MobileEnv.getBaseDirectory("WWindow?AD_Window_ID=" + AD_Window_ID);<NEW_LINE><MASK><NEW_LINE>//<NEW_LINE>RequestDispatcher rd = getServletContext().getRequestDispatcher(url);<NEW_LINE>rd.forward(request, response);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int AD_User_ID = Env.getAD_User_ID(wsc.ctx);<NEW_LINE>int AD_Role_ID = Env.getAD_Role_ID(wsc.ctx);<NEW_LINE>int AD_Client_ID = Env.getAD_Client_ID(wsc.ctx);<NEW_LINE>int AD_Org_ID = Env.getAD_Client_ID(wsc.ctx);<NEW_LINE>String AD_Language = Env.getAD_Language(wsc.ctx);<NEW_LINE>if (wsc.loginInfo != null && wsc.loginInfo.length() > 0) {<NEW_LINE>MobileDoc doc = createPage(request, wsc, AD_Role_ID, AD_User_ID, AD_Client_ID, AD_Org_ID);<NEW_LINE>MobileUtil.createResponse(request, response, this, null, doc, false);<NEW_LINE>}<NEW_LINE>// Request not serviceable<NEW_LINE>MobileUtil.createErrorPage(request, response, this, "NotImplemented");<NEW_LINE>}
log.fine("Forward to=" + url);
1,003,254
public static SsaStyle fromStyleLine(String styleLine, Format format) {<NEW_LINE>checkArgument(styleLine.startsWith(STYLE_LINE_PREFIX));<NEW_LINE>String[] styleValues = TextUtils.split(styleLine.substring(STYLE_LINE_PREFIX.length()), ",");<NEW_LINE>if (styleValues.length != format.length) {<NEW_LINE>Log.w(TAG, Util.formatInvariant("Skipping malformed 'Style:' line (expected %s values, found %s): '%s'", format.length, styleValues.length, styleLine));<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>return new SsaStyle(styleValues[format.nameIndex].trim(), format.alignmentIndex != C.INDEX_UNSET ? parseAlignment(styleValues[format.alignmentIndex].trim()) : SSA_ALIGNMENT_UNKNOWN, format.primaryColorIndex != C.INDEX_UNSET ? parseColor(styleValues[format.primaryColorIndex].trim()) : null, format.fontSizeIndex != C.INDEX_UNSET ? parseFontSize(styleValues[format.fontSizeIndex].trim()) : Cue.DIMEN_UNSET, format.boldIndex != C.INDEX_UNSET && parseBooleanValue(styleValues[format.boldIndex].trim()), format.italicIndex != C.INDEX_UNSET && parseBooleanValue(styleValues[format.italicIndex].trim()), format.underlineIndex != C.INDEX_UNSET && parseBooleanValue(styleValues[format.underlineIndex].trim()), format.strikeoutIndex != C.INDEX_UNSET && parseBooleanValue(styleValues[format.strikeoutIndex].trim()));<NEW_LINE>} catch (RuntimeException e) {<NEW_LINE>Log.w(TAG, <MASK><NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>}
"Skipping malformed 'Style:' line: '" + styleLine + "'", e);
1,407,924
public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('var') create constant variable string MYVAR = '.*abc.*';\n" + "@name('s0') select * from SupportBean(theString regexp MYVAR);\n" + "" + "@name('ctx') create context MyContext start SupportBean_S0 as s0;\n" + "@name('s1') context MyContext select * from SupportBean(theString regexp context.s0.p00);\n" + "" + "@name('s2') select * from pattern[s0=SupportBean_S0 -> every SupportBean(theString regexp s0.p00)];\n" + "" + "@name('s3') select * from SupportBean(theString regexp '.*' || 'abc' || '.*');\n";<NEW_LINE>env.compileDeploy(epl);<NEW_LINE>EPDeployment deployment = env.deployment().getDeployment(env.deploymentId("s0"));<NEW_LINE>Set<String> statementNames = new LinkedHashSet<>();<NEW_LINE>for (EPStatement stmt : deployment.getStatements()) {<NEW_LINE>if (stmt.getName().startsWith("s")) {<NEW_LINE>stmt.addListener(env.listenerNew());<NEW_LINE>statementNames.add(stmt.getName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>env.milestone(0);<NEW_LINE>env.sendEventBean(new SupportBean_S0(1, ".*abc.*"));<NEW_LINE>sendSBAssert(env, "xabsx", statementNames, false);<NEW_LINE>sendSBAssert(env, "xabcx", statementNames, true);<NEW_LINE>if (hasFilterIndexPlanAdvanced(env)) {<NEW_LINE>Map<String, FilterItem> filters = SupportFilterServiceHelper.getFilterSvcAllStmtForTypeSingleFilter(env.runtime(), "SupportBean");<NEW_LINE>FilterItem s0 = filters.get("s0");<NEW_LINE>for (String name : statementNames) {<NEW_LINE>FilterItem sn = filters.get(name);<NEW_LINE>assertEquals(FilterOperator.REBOOL, sn.getOp());<NEW_LINE>assertNotNull(s0.getOptionalValue());<NEW_LINE><MASK><NEW_LINE>assertSame(s0.getIndex(), sn.getIndex());<NEW_LINE>assertSame(s0.getOptionalValue(), sn.getOptionalValue());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>env.undeployAll();<NEW_LINE>}
assertNotNull(s0.getIndex());
293,647
public static void handleObject(Object o) {<NEW_LINE>final SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig();<NEW_LINE>final String clsNameSuffix = getClassNameSuffix(o);<NEW_LINE>if (clsNameSuffix == null) {<NEW_LINE>// unsupported object type<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Class<?> cls = o.getClass();<NEW_LINE>final String name;<NEW_LINE>ConfigRoot configRoot = cls.getAnnotation(ConfigRoot.class);<NEW_LINE>if (configRoot != null && !configRoot.name().equals(ConfigItem.HYPHENATED_ELEMENT_NAME)) {<NEW_LINE>name = configRoot.name();<NEW_LINE>if (name.startsWith("<<")) {<NEW_LINE>throw new IllegalArgumentException(<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>name = dashify(cls.getSimpleName().substring(0, cls.getSimpleName().length() - clsNameSuffix.length()));<NEW_LINE>}<NEW_LINE>handleObject(QUARKUS_PROPERTY_PREFIX + name, o, config, gatherQuarkusPropertyNames(config));<NEW_LINE>}
"Found unsupported @ConfigRoot.name = " + name + " on " + cls);
1,314,242
public BExpressionValue evaluate() throws EvaluationException {<NEW_LINE>// The result of a range-expr is a new object belonging to the object type Iterable<int,()> that will iterate<NEW_LINE>// over a sequence of integers in increasing order, where the sequence includes all integers<NEW_LINE>// that are less than / less than or equal to the value of the second expression.<NEW_LINE>try {<NEW_LINE>BExpressionValue lhsResult = lhsEvaluator.evaluate();<NEW_LINE>BExpressionValue rhsResult = rhsEvaluator.evaluate();<NEW_LINE>BVariable lVar = VariableFactory.getVariable(context, lhsResult.getJdiValue());<NEW_LINE>BVariable rVar = VariableFactory.getVariable(context, rhsResult.getJdiValue());<NEW_LINE>SyntaxKind operatorType = syntaxNode.operator().kind();<NEW_LINE>// Determines the range (whether the end value should be exclusive), based on the operator type.<NEW_LINE>boolean excludeEndValue = operatorType == SyntaxKind.DOUBLE_DOT_LT_TOKEN;<NEW_LINE>Value excludeEndValueMirror = VMUtils.make(context, excludeEndValue).getJdiValue();<NEW_LINE>List<Value> argList = new ArrayList<>();<NEW_LINE>argList.add(getValueAsObject(context, lVar));<NEW_LINE>argList.add(getValueAsObject(context, rVar));<NEW_LINE>argList.add(getValueAsObject(context, excludeEndValueMirror));<NEW_LINE>GeneratedStaticMethod createIntRangeMethod = <MASK><NEW_LINE>createIntRangeMethod.setArgValues(argList);<NEW_LINE>return new BExpressionValue(context, createIntRangeMethod.invokeSafely());<NEW_LINE>} catch (EvaluationException e) {<NEW_LINE>throw e;<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw createEvaluationException(INTERNAL_ERROR, syntaxNode.toSourceCode().trim());<NEW_LINE>}<NEW_LINE>}
getGeneratedMethod(context, B_RANGE_EXPR_HELPER_CLASS, CREATE_INT_RANGE_METHOD);
540,022
public VocabularyFilterInfo unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VocabularyFilterInfo vocabularyFilterInfo = new VocabularyFilterInfo();<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("VocabularyFilterName", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>vocabularyFilterInfo.setVocabularyFilterName(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LanguageCode", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>vocabularyFilterInfo.setLanguageCode(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("LastModifiedTime", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>vocabularyFilterInfo.setLastModifiedTime(DateJsonUnmarshallerFactory.getInstance(<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return vocabularyFilterInfo;<NEW_LINE>}
"unixTimestamp").unmarshall(context));
1,662,884
public OpsItemEventFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>OpsItemEventFilter opsItemEventFilter = new OpsItemEventFilter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>if (context.testExpression("Key", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>opsItemEventFilter.setKey(context.getUnmarshaller(String.class).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Values", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>opsItemEventFilter.setValues(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context));<NEW_LINE>}<NEW_LINE>if (context.testExpression("Operator", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>opsItemEventFilter.setOperator(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 opsItemEventFilter;<NEW_LINE>}
String currentParentElement = context.getCurrentParentElement();
1,830,219
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {<NEW_LINE>AdapterView.AdapterContextMenuInfo <MASK><NEW_LINE>int positionInList = info.position;<NEW_LINE>if (positionInList < 0 || channelUserMapperList.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ChannelUserMapper channelUserMapper = channelUserMapperList.get(positionInList);<NEW_LINE>if (MobiComUserPreference.getInstance(ChannelInfoActivity.this).getUserId().equals(channelUserMapper.getUserKey())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean isHideRemove = alCustomizationSettings.isHideGroupRemoveMemberOption();<NEW_LINE>ChannelUserMapper loggedInUserMapper = ChannelService.getInstance(this).getChannelUserMapperByUserId(channelUserMapper.getKey(), MobiComUserPreference.getInstance(ChannelInfoActivity.this).getUserId());<NEW_LINE>String[] menuItems = getResources().getStringArray(R.array.channel_users_menu_option);<NEW_LINE>Contact contact = baseContactService.getContactById(channelUserMapper.getUserKey());<NEW_LINE>for (int i = 0; i < menuItems.length; i++) {<NEW_LINE>if (menuItems[i].equals(getString(R.string.make_admin_text_info)) && loggedInUserMapper != null && ChannelUserMapper.UserRole.MEMBER.getValue().equals(loggedInUserMapper.getRole())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (menuItems[i].equals(getString(R.string.remove_member)) && (isHideRemove || !isUserPresent || !ChannelUtils.isAdminUserId(userPreference.getUserId(), channel) && loggedInUserMapper != null && Integer.valueOf(0).equals(loggedInUserMapper.getRole()) || loggedInUserMapper != null && ChannelUserMapper.UserRole.MEMBER.getValue().equals(loggedInUserMapper.getRole()))) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (menuItems[i].equals(getString(R.string.make_admin_text_info)) && (!isUserPresent || ChannelUserMapper.UserRole.ADMIN.getValue().equals(channelUserMapper.getRole()) || (channel != null && Channel.GroupType.BROADCAST.getValue().equals(channel.getType())))) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (menuItems[i].equals(getString(R.string.make_admin_text_info))) {<NEW_LINE>menu.add(Menu.NONE, i, i, menuItems[i]);<NEW_LINE>} else {<NEW_LINE>menu.add(Menu.NONE, i, i, menuItems[i] + " " + contact.getDisplayName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
info = (AdapterView.AdapterContextMenuInfo) menuInfo;
1,785,883
private void repalceAndroidBuilder(ApplicationVariant applicationVariant) {<NEW_LINE>try {<NEW_LINE>if (applicationVariant instanceof ApplicationVariantImpl) {<NEW_LINE>VariantScope variantScope = ((ApplicationVariantImpl) applicationVariant).getVariantData().getScope();<NEW_LINE><MASK><NEW_LINE>// ReflectUtils.updateField(globalScope, "androidBuilder", AtlasBuildContext.androidBuilderMap.get(globalScope.getProject()));<NEW_LINE>// Field f = ProjectOptions.class.getDeclaredField("booleanOptions");<NEW_LINE>// f.setAccessible(true);<NEW_LINE>// Map map = (Map) f.get(((ApplicationVariantImpl) applicationVariant).getVariantData().getScope().getGlobalScope().getProjectOptions());<NEW_LINE>// map.put(BooleanOption.ENABLE_AAPT2, false);<NEW_LINE>AtlasBuildContext.androidBuilderMap.get(globalScope.getProject()).initAapt(globalScope.getProjectOptions());<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e, "write globalScope androidBuilder field failed!");<NEW_LINE>}<NEW_LINE>}
GlobalScope globalScope = variantScope.getGlobalScope();
975,092
public R read(JsonReader in) throws IOException {<NEW_LINE>JsonElement <MASK><NEW_LINE>Class<?> valueClass;<NEW_LINE>if (jsonElement.isJsonObject()) {<NEW_LINE>JsonElement typeNameJsonElement = jsonElement.getAsJsonObject().remove(TYPE_FIELD_NAME);<NEW_LINE>if (typeNameJsonElement != null) {<NEW_LINE>String typeName = typeNameJsonElement.getAsString();<NEW_LINE>try {<NEW_LINE>valueClass = Class.forName(typeName);<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>throw new JsonParseException("Could not find class " + typeName);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>valueClass = baseClass;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>valueClass = baseClass;<NEW_LINE>}<NEW_LINE>if (!baseClass.isAssignableFrom(valueClass)) {<NEW_LINE>throw new JsonParseException(valueClass.getName() + " does not derive from " + baseClass.getName());<NEW_LINE>}<NEW_LINE>TypeToken<?> valueType = TypeToken.get(valueClass);<NEW_LINE>TypeAdapter<R> delegate = (TypeAdapter<R>) gson.getDelegateAdapter(PolymorphicTypeAdapterFactory.this, valueType);<NEW_LINE>if (delegate == null) {<NEW_LINE>throw new JsonParseException("Could not deserialize " + valueClass.getName());<NEW_LINE>}<NEW_LINE>return delegate.fromJsonTree(jsonElement);<NEW_LINE>}
jsonElement = Streams.parse(in);
25,974
public static void main2(String[] args) {<NEW_LINE>String dbDriver = "COM.ibm.db2.jdbc.app.DB2Driver";<NEW_LINE>String url = "jdbc:db2:sample";<NEW_LINE>String user = "batra";<NEW_LINE>String pass = "varunbatra";<NEW_LINE>String querystring = "Select * from batra.employee";<NEW_LINE>String fn;<NEW_LINE>String ln;<NEW_LINE>String bd;<NEW_LINE>String sal;<NEW_LINE>try {<NEW_LINE>ConnectionProperties cp = new ConnectionProperties(dbDriver, url, user, pass);<NEW_LINE>Query query = new Query(cp, querystring);<NEW_LINE>QueryResults qs = query.execute();<NEW_LINE>System.out.println("Number of rows = " + qs.size());<NEW_LINE>while (qs.next()) {<NEW_LINE><MASK><NEW_LINE>ln = qs.getValue("LASTNAME");<NEW_LINE>bd = qs.getValue("BIRTHDATE");<NEW_LINE>sal = qs.getValue("SALARY");<NEW_LINE>System.out.println(fn + " " + ln + " birthdate " + bd + " salary " + sal);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>// com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.webcontainer.jsp.tsx.db.Query.main2", "348");<NEW_LINE>System.out.println("Exception: " + e.getMessage());<NEW_LINE>}<NEW_LINE>System.out.println("All is Fine!");<NEW_LINE>}
fn = qs.getValue("FIRSTNME");
152,405
// Updates prod.leftExpansions based on a walk of exp.<NEW_LINE>static private void addLeftMost(NormalProduction prod, Expansion exp) {<NEW_LINE>if (exp instanceof NonTerminal) {<NEW_LINE>for (int i = 0; i < prod.leIndex; i++) {<NEW_LINE>if (prod.getLeftExpansions()[i] == ((NonTerminal) exp).getProd()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (prod.leIndex == prod.getLeftExpansions().length) {<NEW_LINE>NormalProduction[] newle = new NormalProduction[prod.leIndex * 2];<NEW_LINE>System.arraycopy(prod.getLeftExpansions(), 0, newle, 0, prod.leIndex);<NEW_LINE>prod.setLeftExpansions(newle);<NEW_LINE>}<NEW_LINE>prod.getLeftExpansions()[prod.leIndex++] = ((NonTerminal) exp).getProd();<NEW_LINE>} else if (exp instanceof OneOrMore) {<NEW_LINE>addLeftMost(prod, ((OneOrMore) exp).expansion);<NEW_LINE>} else if (exp instanceof ZeroOrMore) {<NEW_LINE>addLeftMost(prod, ((ZeroOrMore) exp).expansion);<NEW_LINE>} else if (exp instanceof ZeroOrOne) {<NEW_LINE>addLeftMost(prod, ((ZeroOrOne) exp).expansion);<NEW_LINE>} else if (exp instanceof Choice) {<NEW_LINE>for (Iterator<? super Object> it = ((Choice) exp).getChoices().iterator(); it.hasNext(); ) {<NEW_LINE>addLeftMost(prod, (<MASK><NEW_LINE>}<NEW_LINE>} else if (exp instanceof Sequence) {<NEW_LINE>for (Iterator<? super Object> it = ((Sequence) exp).units.iterator(); it.hasNext(); ) {<NEW_LINE>Expansion e = (Expansion) it.next();<NEW_LINE>addLeftMost(prod, e);<NEW_LINE>if (!emptyExpansionExists(e)) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (exp instanceof TryBlock) {<NEW_LINE>addLeftMost(prod, ((TryBlock) exp).exp);<NEW_LINE>}<NEW_LINE>}
Expansion) it.next());
201,749
public CodegenMethod codegen(CodegenMethodScope parent, SAIFFInitializeSymbolWEventType symbols, CodegenClassScope classScope) {<NEW_LINE>CodegenMethod method = parent.makeChild(FilterSpecPlanPath.EPTYPE, FilterSpecParamForge.class, classScope);<NEW_LINE>method.getBlock().declareVar(FilterSpecPlanPathTriplet.EPTYPEARRAY, "triplets", newArrayByLength(FilterSpecPlanPathTriplet.EPTYPE, constant(triplets.length)));<NEW_LINE>for (int i = 0; i < triplets.length; i++) {<NEW_LINE>CodegenMethod triplet = triplets[i].codegen(method, symbols, classScope);<NEW_LINE>method.getBlock().assignArrayElement("triplets", constant(i), localMethod(triplet));<NEW_LINE>}<NEW_LINE>method.getBlock().declareVarNewInstance(FilterSpecPlanPath.EPTYPE, "path").exprDotMethod(ref("path"), "setTriplets", ref("triplets")).exprDotMethod(ref("path"), "setPathNegate", optionalEvaluator(pathNegate, method, classScope))<MASK><NEW_LINE>return method;<NEW_LINE>}
.methodReturn(ref("path"));
1,058,885
private void convertColumnNameToIndex(String fileName) {<NEW_LINE>String encoding = this.originConfig.getString(Key.ENCODING, Constant.DEFAULT_ENCODING);<NEW_LINE>int bufferSize = this.originConfig.getInt(<MASK><NEW_LINE>String delimiter = this.originConfig.getString(Key.FIELD_DELIMITER, Constant.DEFAULT_FIELD_DELIMITER + "");<NEW_LINE>List<Configuration> columns = this.originConfig.getListConfiguration(Key.COLUMN);<NEW_LINE>BufferedReader reader = FileHelper.readCompressFile(fileName, encoding, bufferSize);<NEW_LINE>try {<NEW_LINE>String fetchLine = reader.readLine();<NEW_LINE>String[] columnNames = fetchLine.split(delimiter);<NEW_LINE>int index;<NEW_LINE>for (Configuration column : columns) {<NEW_LINE>if (column.getString(Key.NAME) != null) {<NEW_LINE>index = getIndexByName(column.getString(Key.NAME), columnNames);<NEW_LINE>column.set(Key.INDEX, index);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.originConfig.set(Key.COLUMN, columns);<NEW_LINE>} catch (IOException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>} finally {<NEW_LINE>IOUtils.closeQuietly(reader, null);<NEW_LINE>}<NEW_LINE>}
Key.BUFFER_SIZE, Constant.DEFAULT_BUFFER_SIZE);
693,739
private File clickAndInterceptFileByProxyServer(WebElementSource anyClickableElement, WebElement clickable, long timeout, FileFilter fileFilter, DownloadAction action) throws FileNotFoundException {<NEW_LINE>Driver driver = anyClickableElement.driver();<NEW_LINE>Config config = driver.config();<NEW_LINE>if (!config.proxyEnabled()) {<NEW_LINE>throw new IllegalStateException("Cannot download file: proxy server is not enabled. Setup proxyEnabled");<NEW_LINE>}<NEW_LINE>SelenideProxyServer proxyServer = driver.getProxy();<NEW_LINE>if (proxyServer == null) {<NEW_LINE>throw new IllegalStateException("Cannot download file: proxy server is not started");<NEW_LINE>}<NEW_LINE>FileDownloadFilter filter = proxyServer.responseFilter("download");<NEW_LINE>if (filter == null) {<NEW_LINE>throw new IllegalStateException("Cannot download file: download filter is not activated");<NEW_LINE>}<NEW_LINE>filter.activate();<NEW_LINE>try {<NEW_LINE>waiter.wait(filter, new PreviousDownloadsCompleted(), timeout, config.pollingInterval());<NEW_LINE>filter.reset();<NEW_LINE>action.perform(driver, clickable);<NEW_LINE>waiter.wait(filter, new HasDownloads(fileFilter), <MASK><NEW_LINE>if (log.isInfoEnabled()) {<NEW_LINE>log.info(filter.downloads().filesAsString());<NEW_LINE>log.info("Just in case, all intercepted responses: {}", filter.responsesAsString());<NEW_LINE>}<NEW_LINE>return filter.downloads().firstDownloadedFile(anyClickableElement.toString(), timeout, fileFilter);<NEW_LINE>} finally {<NEW_LINE>filter.deactivate();<NEW_LINE>}<NEW_LINE>}
timeout, config.pollingInterval());
268,118
private // SyncManager#removeSession or SyncSession#close are package private & should not be public.<NEW_LINE>void invokeRemoveSession(SyncConfiguration syncConfig) {<NEW_LINE>try {<NEW_LINE>if (removeSessionMethod == null) {<NEW_LINE>synchronized (SyncObjectServerFacade.class) {<NEW_LINE>if (removeSessionMethod == null) {<NEW_LINE>Method removeSession = Sync.class.getDeclaredMethod("removeSession", SyncConfiguration.class);<NEW_LINE>removeSession.setAccessible(true);<NEW_LINE>removeSessionMethod = removeSession;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>removeSessionMethod.invoke(syncConfig.getUser().getApp().getSync(), syncConfig);<NEW_LINE>} catch (NoSuchMethodException e) {<NEW_LINE>throw new RealmException("Could not lookup method to remove session: " + <MASK><NEW_LINE>} catch (InvocationTargetException e) {<NEW_LINE>throw new RealmException("Could not invoke method to remove session: " + syncConfig.toString(), e);<NEW_LINE>} catch (IllegalAccessException e) {<NEW_LINE>throw new RealmException("Could not remove session: " + syncConfig.toString(), e);<NEW_LINE>}<NEW_LINE>}
syncConfig.toString(), e);
379,870
public void sampleTopics(int doc) {<NEW_LINE>FeatureSequence fs = (FeatureSequence) instances.get(doc).getData();<NEW_LINE>int seqLen = fs.getLength();<NEW_LINE>int[] docLevels = levels[doc];<NEW_LINE>NCRPNode[] path = new NCRPNode[numLevels];<NEW_LINE>NCRPNode node;<NEW_LINE>int[] levelCounts = new int[numLevels];<NEW_LINE>int type, token, level;<NEW_LINE>double sum;<NEW_LINE>// Get the leaf<NEW_LINE>node = documentLeaves[doc];<NEW_LINE>for (level = numLevels - 1; level >= 0; level--) {<NEW_LINE>path[level] = node;<NEW_LINE>node = node.parent;<NEW_LINE>}<NEW_LINE>double[] levelWeights = new double[numLevels];<NEW_LINE>// Initialize level counts<NEW_LINE>for (token = 0; token < seqLen; token++) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>for (token = 0; token < seqLen; token++) {<NEW_LINE>type = fs.getIndexAtPosition(token);<NEW_LINE>levelCounts[docLevels[token]]--;<NEW_LINE>node = path[docLevels[token]];<NEW_LINE>node.typeCounts[type]--;<NEW_LINE>node.totalTokens--;<NEW_LINE>sum = 0.0;<NEW_LINE>for (level = 0; level < numLevels; level++) {<NEW_LINE>levelWeights[level] = (alpha + levelCounts[level]) * (eta + path[level].typeCounts[type]) / (etaSum + path[level].totalTokens);<NEW_LINE>sum += levelWeights[level];<NEW_LINE>}<NEW_LINE>level = random.nextDiscrete(levelWeights, sum);<NEW_LINE>docLevels[token] = level;<NEW_LINE>levelCounts[docLevels[token]]++;<NEW_LINE>node = path[level];<NEW_LINE>node.typeCounts[type]++;<NEW_LINE>node.totalTokens++;<NEW_LINE>}<NEW_LINE>}
levelCounts[docLevels[token]]++;
774,997
public static void main(String[] args) {<NEW_LINE>Exercise19<Integer> linkedList = new Exercise19<>();<NEW_LINE>linkedList.add(0);<NEW_LINE>linkedList.add(1);<NEW_LINE>linkedList.add(2);<NEW_LINE>linkedList.add(3);<NEW_LINE>StdOut.println("Before removing last node");<NEW_LINE>StringJoiner listBeforeRemove = new StringJoiner(" ");<NEW_LINE>for (int number : linkedList) {<NEW_LINE>listBeforeRemove.add(String.valueOf(number));<NEW_LINE>}<NEW_LINE>StdOut.<MASK><NEW_LINE>StdOut.println("Expected: 0 1 2 3");<NEW_LINE>linkedList.deleteLastNode();<NEW_LINE>StdOut.println("\nAfter removing last node");<NEW_LINE>StringJoiner listAfterRemove = new StringJoiner(" ");<NEW_LINE>for (int number : linkedList) {<NEW_LINE>listAfterRemove.add(String.valueOf(number));<NEW_LINE>}<NEW_LINE>StdOut.println(listAfterRemove.toString());<NEW_LINE>StdOut.println("Expected: 0 1 2");<NEW_LINE>}
println(listBeforeRemove.toString());
1,266,435
public List<AssignedProductOptionDTO> findAssignedProductOptionsByProductId(Long productId) {<NEW_LINE><MASK><NEW_LINE>CriteriaQuery<AssignedProductOptionDTO> criteria = builder.createQuery(AssignedProductOptionDTO.class);<NEW_LINE>Root<SkuProductOptionValueXrefImpl> root = criteria.from(SkuProductOptionValueXrefImpl.class);<NEW_LINE>criteria.select(builder.construct(AssignedProductOptionDTO.class, root.get("sku").get("product").get("id"), root.get("productOptionValue").get("productOption").get("attributeName"), root.get("productOptionValue"), root.get("sku")));<NEW_LINE>criteria.where(builder.equal(root.get("sku").get("product").get("id"), productId));<NEW_LINE>criteria.orderBy(builder.asc(root.get("productOptionValue").get("productOption").get("attributeName")));<NEW_LINE>TypedQuery<AssignedProductOptionDTO> query = em.createQuery(criteria);<NEW_LINE>List<AssignedProductOptionDTO> dtos = query.getResultList();<NEW_LINE>List<AssignedProductOptionDTO> results = new ArrayList<>();<NEW_LINE>for (AssignedProductOptionDTO dto : dtos) {<NEW_LINE>if (dto.getSku().isActive()) {<NEW_LINE>results.add(dto);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return results;<NEW_LINE>}
CriteriaBuilder builder = em.getCriteriaBuilder();
1,180,485
public void handleLine(String line, PropertiesParserState state) {<NEW_LINE>DrawHandler drawer = state.getDrawer();<NEW_LINE>LineType ltBefore = drawer.getLineType();<NEW_LINE>LineType ltForLine = variants.get(line);<NEW_LINE>if (ltForLine != null) {<NEW_LINE>drawer.setLineType(ltForLine);<NEW_LINE>}<NEW_LINE>// should be always on top of background<NEW_LINE>drawer.setLayer(Layer.Foreground);<NEW_LINE>double linePos = state.getTextPrintPosition() - drawer.textHeightMax() + Y_SPACE / 2;<NEW_LINE>XValues xPos = state.getXLimits(linePos);<NEW_LINE>drawer.drawLine(xPos.getLeft() + 0.5, linePos, xPos.getRight() - 1, linePos);<NEW_LINE>state.increaseTextPrintPosition(Y_SPACE);<NEW_LINE><MASK><NEW_LINE>drawer.setLineType(ltBefore);<NEW_LINE>}
drawer.setLayer(Layer.Background);
76,251
public void marshall(MongoDbSettings mongoDbSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (mongoDbSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getUsername(), USERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getPassword(), PASSWORD_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getServerName(), SERVERNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getPort(), PORT_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getDatabaseName(), DATABASENAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getAuthType(), AUTHTYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getAuthMechanism(), AUTHMECHANISM_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getNestingLevel(), NESTINGLEVEL_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getExtractDocId(), EXTRACTDOCID_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getDocsToInvestigate(), DOCSTOINVESTIGATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getAuthSource(), AUTHSOURCE_BINDING);<NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getKmsKeyId(), KMSKEYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(mongoDbSettings.getSecretsManagerSecretId(), SECRETSMANAGERSECRETID_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
mongoDbSettings.getSecretsManagerAccessRoleArn(), SECRETSMANAGERACCESSROLEARN_BINDING);
790,175
private void init() {<NEW_LINE>inflate(getContext(), R.layout.contact_friend_profile_layout, this);<NEW_LINE>mHeadImageView = findViewById(R.id.friend_icon);<NEW_LINE>mNickNameView = findViewById(R.id.friend_nick_name);<NEW_LINE>mIDView = findViewById(R.id.friend_account);<NEW_LINE>mRemarkView = findViewById(R.id.remark);<NEW_LINE>mRemarkView.setOnClickListener(this);<NEW_LINE>mSignatureTagView = <MASK><NEW_LINE>mSignatureView = findViewById(R.id.friend_signature);<NEW_LINE>mMessageOptionView = findViewById(R.id.msg_rev_opt);<NEW_LINE>mMessageOptionView.setOnClickListener(this);<NEW_LINE>mChatTopView = findViewById(R.id.chat_to_top);<NEW_LINE>mAddBlackView = findViewById(R.id.blackList);<NEW_LINE>deleteFriendBtn = findViewById(R.id.btn_delete);<NEW_LINE>deleteFriendBtn.setOnClickListener(this);<NEW_LINE>chatBtn = findViewById(R.id.btn_chat);<NEW_LINE>chatBtn.setOnClickListener(this);<NEW_LINE>audioCallBtn = findViewById(R.id.btn_voice);<NEW_LINE>audioCallBtn.setOnClickListener(this);<NEW_LINE>videoCallBtn = findViewById(R.id.btn_video);<NEW_LINE>videoCallBtn.setOnClickListener(this);<NEW_LINE>addFriendSendBtn = findViewById(R.id.add_friend_send_btn);<NEW_LINE>addFriendSendBtn.setOnClickListener(this);<NEW_LINE>acceptFriendBtn = findViewById(R.id.accept_friend_send_btn);<NEW_LINE>refuseFriendBtn = findViewById(R.id.refuse_friend_send_btn);<NEW_LINE>addFriendArea = findViewById(R.id.add_friend_verify_area);<NEW_LINE>addWordingEditText = findViewById(R.id.add_wording_edit);<NEW_LINE>friendApplicationVerifyArea = findViewById(R.id.friend_application_verify_area);<NEW_LINE>friendApplicationAddWording = findViewById(R.id.friend_application_add_wording);<NEW_LINE>addFriendRemarkLv = findViewById(R.id.friend_remark_lv);<NEW_LINE>addFriendRemarkLv.setOnClickListener(this);<NEW_LINE>addFriendGroupLv = findViewById(R.id.friend_group_lv);<NEW_LINE>addFriendGroupLv.setContent(getContext().getString(R.string.contact_my_friend));<NEW_LINE>remarkAndGroupTip = findViewById(R.id.remark_and_group_tip);<NEW_LINE>mTitleBar = findViewById(R.id.friend_titlebar);<NEW_LINE>mTitleBar.setTitle(getResources().getString(R.string.profile_detail), ITitleBarLayout.Position.MIDDLE);<NEW_LINE>mTitleBar.getRightGroup().setVisibility(View.GONE);<NEW_LINE>mTitleBar.setOnLeftClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View view) {<NEW_LINE>((Activity) getContext()).finish();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
findViewById(R.id.friend_signature_tag);
1,655,367
public void addCurrencies() {<NEW_LINE>try {<NEW_LINE>InputStream is = mContext.getAssets().open("currency.json");<NEW_LINE>int size = is.available();<NEW_LINE>byte[] buffer = new byte[size];<NEW_LINE>is.read(buffer);<NEW_LINE>is.close();<NEW_LINE>s_ids_names = new String(buffer, "UTF-8");<NEW_LINE>} catch (IOException ex) {<NEW_LINE>ex.printStackTrace();<NEW_LINE>}<NEW_LINE>s_ids_names = s_ids_names.replace("{", "");<NEW_LINE>s_ids_names = s_ids_names.replace("}", "");<NEW_LINE>s_ids_names = s_ids_names.replace("\"", "");<NEW_LINE>stok <MASK><NEW_LINE>while (stok.hasMoreElements()) {<NEW_LINE>temp = stok.nextElement().toString();<NEW_LINE>if (temp.contains("currencySymbol")) {<NEW_LINE>temp = stok.nextElement().toString();<NEW_LINE>}<NEW_LINE>String[] split = temp.split(":");<NEW_LINE>temp = stok.nextElement().toString();<NEW_LINE>if (temp.contains("currencySymbol")) {<NEW_LINE>temp = stok.nextElement().toString();<NEW_LINE>}<NEW_LINE>String[] split2 = temp.split(":");<NEW_LINE>temp = null;<NEW_LINE>currences_names.add(new ZoneName(split[2], split2[1]));<NEW_LINE>}<NEW_LINE>Collections.sort(currences_names, (n1, n2) -> n1.shortName.compareTo(n2.shortName));<NEW_LINE>mAdaptorListView = new CurrencyConverterAdapter(CurrencyListViewActivity.this, currences_names);<NEW_LINE>RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(mContext.getApplicationContext());<NEW_LINE>mListview.setLayoutManager(mLayoutManager);<NEW_LINE>mListview.setAdapter(mAdaptorListView);<NEW_LINE>}
= new StringTokenizer(s_ids_names, ",");
541,175
public void configure(DslJson json) {<NEW_LINE>new LocalDateDslJsonConverter().configure(json);<NEW_LINE>new LocalDateTimeDslJsonConverter().configure(json);<NEW_LINE>new LocalTimeDslJsonConverter().configure(json);<NEW_LINE>new OffsetDateTimeDslJsonConverter().configure(json);<NEW_LINE>new OffsetTimeDslJsonConverter().configure(json);<NEW_LINE>new ZonedDateTimeDslJsonConverter().configure(json);<NEW_LINE>new dsl_json.java.sql.DateDslJsonConverter().configure(json);<NEW_LINE>new dsl_json.java.sql.<MASK><NEW_LINE>new dsl_json.java.util.DateDslJsonConverter().configure(json);<NEW_LINE>new dsl_json.java.sql.ResultSetDslJsonConverter().configure(json);<NEW_LINE>new ByteDslJsonConverter().configure(json);<NEW_LINE>new OptionalDoubleDslJsonConverter().configure(json);<NEW_LINE>new OptionalIntDslJsonConverter().configure(json);<NEW_LINE>new OptionalLongDslJsonConverter().configure(json);<NEW_LINE>new BigIntegerDslJsonConverter().configure(json);<NEW_LINE>new OptionalDslJsonConverter().configure(json);<NEW_LINE>}
TimestampDslJsonConverter().configure(json);
1,164,030
public void marshall(HyperParameterTuningJobConfig hyperParameterTuningJobConfig, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (hyperParameterTuningJobConfig == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(hyperParameterTuningJobConfig.getStrategy(), STRATEGY_BINDING);<NEW_LINE>protocolMarshaller.marshall(hyperParameterTuningJobConfig.getHyperParameterTuningJobObjective(), HYPERPARAMETERTUNINGJOBOBJECTIVE_BINDING);<NEW_LINE>protocolMarshaller.marshall(hyperParameterTuningJobConfig.getResourceLimits(), RESOURCELIMITS_BINDING);<NEW_LINE>protocolMarshaller.marshall(hyperParameterTuningJobConfig.getParameterRanges(), PARAMETERRANGES_BINDING);<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(hyperParameterTuningJobConfig.getTuningJobCompletionCriteria(), TUNINGJOBCOMPLETIONCRITERIA_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
hyperParameterTuningJobConfig.getTrainingJobEarlyStoppingType(), TRAININGJOBEARLYSTOPPINGTYPE_BINDING);
356,617
private void loadChangesToBrowser(final boolean inBackground, final boolean refresh) {<NEW_LINE>final CommittedChangesCache cache = CommittedChangesCache.getInstance(myProject);<NEW_LINE>cache.hasCachesForAnyRoot(new Consumer<Boolean>() {<NEW_LINE><NEW_LINE>public void consume(final Boolean notEmpty) {<NEW_LINE>if (Boolean.TRUE.equals(notEmpty)) {<NEW_LINE>final List<CommittedChangeList> list = cache.getCachedIncomingChanges();<NEW_LINE>if (list != null) {<NEW_LINE>myBrowser.getEmptyText().setText(VcsBundle.message("incoming.changes.empty.message"));<NEW_LINE>myBrowser.setItems(list, CommittedChangesBrowserUseCase.INCOMING);<NEW_LINE>} else if (refresh) {<NEW_LINE>cache.loadIncomingChangesAsync(myListConsumer, inBackground);<NEW_LINE>} else {<NEW_LINE>myBrowser.getEmptyText().setText<MASK><NEW_LINE>myBrowser.setItems(Collections.<CommittedChangeList>emptyList(), CommittedChangesBrowserUseCase.INCOMING);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
(VcsBundle.message("incoming.changes.empty.message"));
836,202
final GetTextDetectionResult executeGetTextDetection(GetTextDetectionRequest getTextDetectionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTextDetectionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetTextDetectionRequest> request = null;<NEW_LINE>Response<GetTextDetectionResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetTextDetectionRequestProtocolMarshaller(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, "Rekognition");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTextDetection");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<GetTextDetectionResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new GetTextDetectionResultJsonUnmarshaller());<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(getTextDetectionRequest));
494,646
public void peekGroupCallForRingingCheck(@NonNull GroupCallRingCheckInfo info) {<NEW_LINE>if (callManager == null) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>networkExecutor.execute(() -> {<NEW_LINE>try {<NEW_LINE>Recipient group = Recipient.resolved(info.getRecipientId());<NEW_LINE>GroupId.V2 groupId = group.requireGroupId().requireV2();<NEW_LINE>GroupExternalCredential credential = GroupManager.getGroupExternalCredential(context, groupId);<NEW_LINE>List<GroupCall.GroupMemberInfo> members = GroupManager.getUuidCipherTexts(context, groupId).entrySet().stream().map(entry -> new GroupCall.GroupMemberInfo(entry.getKey(), entry.getValue().serialize())).collect(Collectors.toList());<NEW_LINE>callManager.peekGroupCall(SignalStore.internalValues().groupCallingServer(), credential.getTokenBytes().toByteArray(), members, peekInfo -> {<NEW_LINE>receivedGroupCallPeekForRingingCheck(info, peekInfo.getDeviceCount());<NEW_LINE>});<NEW_LINE>} catch (IOException | VerificationFailedException | CallException e) {<NEW_LINE>Log.e(TAG, "error peeking for ringing check", e);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
Log.i(TAG, "Unable to peekGroupCall, call manager is null");
442,874
private void showVmInfoForSharedNetworks(boolean forVirtualNetworks, IpAddress ipAddr, IPAddressResponse ipResponse) {<NEW_LINE>if (!forVirtualNetworks) {<NEW_LINE>NicVO nic = ApiDBUtils.findByIp4AddressAndNetworkId(ipAddr.getAddress().toString(), ipAddr.getNetworkId());<NEW_LINE>if (nic == null) {<NEW_LINE>// find in nic_secondary_ips, user vm only<NEW_LINE>NicSecondaryIpVO secondaryIp = ApiDBUtils.findSecondaryIpByIp4AddressAndNetworkId(ipAddr.getAddress().toString(), ipAddr.getNetworkId());<NEW_LINE>if (secondaryIp != null) {<NEW_LINE>UserVm vm = ApiDBUtils.findUserVmById(secondaryIp.getVmId());<NEW_LINE>if (vm != null) {<NEW_LINE>ipResponse.setVirtualMachineId(vm.getUuid());<NEW_LINE>ipResponse.setVirtualMachineName(vm.getHostName());<NEW_LINE>if (vm.getDisplayName() != null) {<NEW_LINE>ipResponse.setVirtualMachineDisplayName(vm.getDisplayName());<NEW_LINE>} else {<NEW_LINE>ipResponse.setVirtualMachineDisplayName(vm.getHostName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (nic.getVmType() == VirtualMachine.Type.User) {<NEW_LINE>UserVm vm = ApiDBUtils.findUserVmById(nic.getInstanceId());<NEW_LINE>if (vm != null) {<NEW_LINE>ipResponse.setVirtualMachineId(vm.getUuid());<NEW_LINE>ipResponse.setVirtualMachineName(vm.getHostName());<NEW_LINE>if (vm.getDisplayName() != null) {<NEW_LINE>ipResponse.setVirtualMachineDisplayName(vm.getDisplayName());<NEW_LINE>} else {<NEW_LINE>ipResponse.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (nic.getVmType() == VirtualMachine.Type.DomainRouter) {<NEW_LINE>ipResponse.setIsSystem(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
setVirtualMachineDisplayName(vm.getHostName());
1,336,615
public EnvironmentProperties unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EnvironmentProperties environmentProperties = new EnvironmentProperties();<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("PropertyGroups", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>environmentProperties.setPropertyGroups(new ListUnmarshaller<PropertyGroup>(PropertyGroupJsonUnmarshaller.getInstance(<MASK><NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return environmentProperties;<NEW_LINE>}
)).unmarshall(context));
984,141
protected Action[] createNewTabActions() {<NEW_LINE>if (tabContext.rerun == null) {<NEW_LINE>tabContext.rerun = new ReRunAction(false);<NEW_LINE>tabContext.rerunDebug = new ReRunAction(true);<NEW_LINE>tabContext.resume = new ResumeAction();<NEW_LINE>tabContext.stop = new StopAction();<NEW_LINE>tabContext.options = new OptionsAction();<NEW_LINE>tabContext.overview = new ShowOverviewAction();<NEW_LINE>}<NEW_LINE>tabContext.rerun.setConfig(config);<NEW_LINE>tabContext.rerunDebug.setConfig(config);<NEW_LINE>tabContext.resume.setConfig(config);<NEW_LINE>tabContext.overview<MASK><NEW_LINE>tabContext.stop.setExecutor(this);<NEW_LINE>return new Action[] { tabContext.rerun, tabContext.rerunDebug, tabContext.resume, tabContext.overview, tabContext.stop, tabContext.options };<NEW_LINE>}
.setExecutor((MavenCommandLineExecutor) this);
755,712
public static HalProcessDefinition fromProcessDefinition(ProcessDefinition processDefinition, ProcessEngine processEngine) {<NEW_LINE>HalProcessDefinition halProcDef = new HalProcessDefinition();<NEW_LINE>halProcDef<MASK><NEW_LINE>halProcDef.key = processDefinition.getKey();<NEW_LINE>halProcDef.category = processDefinition.getCategory();<NEW_LINE>halProcDef.description = processDefinition.getDescription();<NEW_LINE>halProcDef.name = processDefinition.getName();<NEW_LINE>halProcDef.version = processDefinition.getVersion();<NEW_LINE>halProcDef.versionTag = processDefinition.getVersionTag();<NEW_LINE>halProcDef.resource = processDefinition.getResourceName();<NEW_LINE>halProcDef.deploymentId = processDefinition.getDeploymentId();<NEW_LINE>halProcDef.diagram = processDefinition.getDiagramResourceName();<NEW_LINE>halProcDef.suspended = processDefinition.isSuspended();<NEW_LINE>halProcDef.contextPath = ApplicationContextPathUtil.getApplicationPathForDeployment(processEngine, processDefinition.getDeploymentId());<NEW_LINE>halProcDef.linker.createLink(REL_SELF, processDefinition.getId());<NEW_LINE>halProcDef.linker.createLink(REL_DEPLOYMENT, processDefinition.getDeploymentId());<NEW_LINE>halProcDef.linker.createLink(REL_DEPLOYMENT_RESOURCE, processDefinition.getDeploymentId(), processDefinition.getResourceName());<NEW_LINE>return halProcDef;<NEW_LINE>}
.id = processDefinition.getId();
151,972
boolean initializeSignature(Object dataChunk, OperationLog log, int indent) throws PGPException {<NEW_LINE>if (!(dataChunk instanceof PGPSignatureList)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>PGPSignatureList sigList = (PGPSignatureList) dataChunk;<NEW_LINE>findAvailableSignature(sigList);<NEW_LINE>if (signingKey != null) {<NEW_LINE>// key found in our database!<NEW_LINE>signatureResultBuilder.initValid(signingKey);<NEW_LINE>JcaPGPContentVerifierBuilderProvider contentVerifierBuilderProvider = new JcaPGPContentVerifierBuilderProvider().setProvider(Constants.BOUNCY_CASTLE_PROVIDER_NAME);<NEW_LINE>signature.init(<MASK><NEW_LINE>checkKeySecurity(log, indent);<NEW_LINE>} else if (!sigList.isEmpty()) {<NEW_LINE>signatureResultBuilder.setSignatureAvailable(true);<NEW_LINE>signatureResultBuilder.setKnownKey(false);<NEW_LINE>signatureResultBuilder.setKeyId(sigList.get(0).getKeyID());<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
contentVerifierBuilderProvider, signingKey.getPublicKey());
1,383,413
public boolean install(String name, String url, String version) {<NEW_LINE>if (url.startsWith("---extensions---")) {<NEW_LINE>// url = RunTime.get().SikuliRepo + name + "-" + version + ".jar";<NEW_LINE>}<NEW_LINE>String extPath = fExtensions.getAbsolutePath();<NEW_LINE>String tmpdir = Commons.getIDETemp().getAbsolutePath();<NEW_LINE>try {<NEW_LINE>File localFile = new File(FileManager.downloadURL(new URL(url), tmpdir));<NEW_LINE>String extName = localFile.getName();<NEW_LINE>File targetFile = new File(extPath, extName);<NEW_LINE>if (targetFile.exists()) {<NEW_LINE>targetFile.delete();<NEW_LINE>}<NEW_LINE>if (!localFile.renameTo(targetFile)) {<NEW_LINE>Debug.error("ExtensionManager: Failed to install " + localFile.getName() + " to " + targetFile.getAbsolutePath());<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>addExtension(name, <MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>Debug.error("ExtensionManager: Failed to download " + url);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}
localFile.getAbsolutePath(), version);