idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
1,304,382
public static // d680497.1<NEW_LINE>void validateMergedXML(ModuleInitData mid) throws EJBConfigurationException {<NEW_LINE>if (!validationEnabled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>EJBJar mergedEJBJar = mid.getMergedEJBJar();<NEW_LINE>if (mergedEJBJar == null) {<NEW_LINE>// managed beans only<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> errors = new ArrayList<String>();<NEW_LINE>List<EnterpriseBean> mergedBeans = mergedEJBJar.getEnterpriseBeans();<NEW_LINE>if (mergedBeans == null) {<NEW_LINE><MASK><NEW_LINE>logErrors(mid.ivJ2EEName, errors);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TreeSet<String> mergedNames = new TreeSet<String>();<NEW_LINE>for (EnterpriseBean mergedBean : mergedBeans) {<NEW_LINE>mergedNames.add(mergedBean.getName());<NEW_LINE>}<NEW_LINE>for (BeanInitData bid : mid.ivBeans) {<NEW_LINE>mergedNames.remove(bid.ivName);<NEW_LINE>}<NEW_LINE>if (!mergedNames.isEmpty()) {<NEW_LINE>errors.add(MERGE + "contains extra EJBs named " + mergedNames);<NEW_LINE>}<NEW_LINE>logErrors(mid.ivJ2EEName, errors);<NEW_LINE>}
errors.add(MERGE + "contains no EJBs.");
1,214,405
private Principal buildPrincipal(Jwt jwt) {<NEW_LINE>String subject = jwt.subject().orElseThrow(() -> new JwtException("JWT does not contain subject claim, cannot create principal."));<NEW_LINE>String name = jwt.preferredUsername().orElse(subject);<NEW_LINE>Principal.Builder builder = Principal.builder();<NEW_LINE>builder.name(name).id(subject);<NEW_LINE>jwt.payloadClaims().forEach((key, jsonValue) -> builder.addAttribute(key, <MASK><NEW_LINE>jwt.email().ifPresent(value -> builder.addAttribute("email", value));<NEW_LINE>jwt.emailVerified().ifPresent(value -> builder.addAttribute("email_verified", value));<NEW_LINE>jwt.locale().ifPresent(value -> builder.addAttribute("locale", value));<NEW_LINE>jwt.familyName().ifPresent(value -> builder.addAttribute("family_name", value));<NEW_LINE>jwt.givenName().ifPresent(value -> builder.addAttribute("given_name", value));<NEW_LINE>jwt.fullName().ifPresent(value -> builder.addAttribute("full_name", value));<NEW_LINE>return builder.build();<NEW_LINE>}
JwtUtil.toObject(jsonValue)));
662,054
public SampleLocatableMetadata readActualHeader(final LineIterator reader) {<NEW_LINE>final List<String> samHeaderLines = new ArrayList<>(SAM_HEADER_LINES_INITIAL_CAPACITY);<NEW_LINE>// we check that the SAM header lines and the column header line are present in the correct order, then return the mandatory column header<NEW_LINE>boolean isSAMHeaderPresent = false;<NEW_LINE>while (reader.hasNext()) {<NEW_LINE>final String line = reader.peek();<NEW_LINE>if (line.startsWith(CopyNumberFormatsUtils.COMMENT_PREFIX)) {<NEW_LINE>isSAMHeaderPresent = true;<NEW_LINE>samHeaderLines.add(line);<NEW_LINE>reader.next();<NEW_LINE>} else {<NEW_LINE>if (!isSAMHeaderPresent) {<NEW_LINE>throw new UserException.MalformedFile("SAM header lines must be at the beginning of the file.");<NEW_LINE>} else if (!line.startsWith(COLUMN_HEADER_STRING)) {<NEW_LINE>throw new UserException.MalformedFile("File does not have a column header.");<NEW_LINE>} else {<NEW_LINE>// we just peeked at the column header line, so we need to advance past it<NEW_LINE>reader.next();<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final SAMFileHeader samFileHeader = new SAMTextHeaderCodec().decode(BufferedLineReader.fromString(StringUtils.join(samHeaderLines, System.lineSeparator())), null);<NEW_LINE>return MetadataUtils.fromHeader(<MASK><NEW_LINE>}
samFileHeader, Metadata.Type.SAMPLE_LOCATABLE);
1,704,842
public void beforePassivation(int i) {<NEW_LINE>cmkey = new CMKey("Test bean for passivation " + i);<NEW_LINE>cmkeyString1 = cmkey.toString();<NEW_LINE>try {<NEW_LINE>createInitialContext();<NEW_LINE>// cmHome = (CMEntityHome) PortableRemoteObject.narrow(new InitialContext().lookup("java:app/StatefulPassivationEJB/CMEntity"), CMEntityHome.class);<NEW_LINE>Object tmpObj = ic.lookup("CMEntity");<NEW_LINE>// d163474<NEW_LINE>cmHome = (CMEntityHome) PortableRemoteObject.narrow(tmpObj, CMEntityHome.class);<NEW_LINE>} catch (NamingException ex) {<NEW_LINE>throw new EJBException("lookup of CMEntity home failed.", ex);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>cmEntity = cmHome.create(cmkey);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new EJBException("create cmEntity failed. primaryKey = " + cmkeyString1, ex);<NEW_LINE>}<NEW_LINE>cmkey = new CMKey("Test key for passivation" + this);<NEW_LINE>cmkeyString2 = cmkey.toString();<NEW_LINE>try {<NEW_LINE>jndiEnc = (Context) ic.lookup("java:comp/env");<NEW_LINE>} catch (NamingException ex) {<NEW_LINE>throw new EJBException("Failed to look up java:comp/env.", ex);<NEW_LINE>}<NEW_LINE>utx = sessionContext.getUserTransaction();<NEW_LINE>try {<NEW_LINE>ByteArrayOutputStream bStream = new ByteArrayOutputStream();<NEW_LINE><MASK><NEW_LINE>ostream.writeObject(sessionContext.getEJBObject().getHandle());<NEW_LINE>bStream.flush();<NEW_LINE>bStream.close();<NEW_LINE>svHandleBytes = bStream.toByteArray();<NEW_LINE>} catch (Exception ex) {<NEW_LINE>throw new EJBException("failed to write EJBObject to file");<NEW_LINE>}<NEW_LINE>}
ObjectOutputStream ostream = new ObjectOutputStream(bStream);
69,051
public CreateBillingGroupResult createBillingGroup(CreateBillingGroupRequest createBillingGroupRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBillingGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<CreateBillingGroupRequest> request = null;<NEW_LINE>Response<CreateBillingGroupResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new CreateBillingGroupRequestMarshaller().marshall(createBillingGroupRequest);<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>Unmarshaller<CreateBillingGroupResult, JsonUnmarshallerContext> unmarshaller = new CreateBillingGroupResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<CreateBillingGroupResult> responseHandler = new JsonResponseHandler<CreateBillingGroupResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(<MASK><NEW_LINE>}<NEW_LINE>}
awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);
1,789,848
public static long read(ByteArrayInputStream in) throws BTChipException {<NEW_LINE>long result = 0;<NEW_LINE>int val1 = (int) (in.read() & 0xff);<NEW_LINE>if (val1 < 0xfd) {<NEW_LINE>result = val1;<NEW_LINE>} else if (val1 == 0xfd) {<NEW_LINE>result |= (int) (in.read() & 0xff);<NEW_LINE>result |= (((int) in.read() & 0xff) << 8);<NEW_LINE>} else if (val1 == 0xfe) {<NEW_LINE>result |= (int) (in.read() & 0xff);<NEW_LINE>result |= (((int) in.read() & 0xff) << 8);<NEW_LINE>result |= (((int) in.read() & 0xff) << 16);<NEW_LINE>result |= (((int) in.read<MASK><NEW_LINE>} else {<NEW_LINE>throw new BTChipException("Unsupported varint encoding");<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
() & 0xff) << 24);
518,644
private FLClientStatus checkSignature(ReturnExchangeKeys bufData, int dataIndex, byte[] cPkByte, byte[] sPkByte) {<NEW_LINE>ByteBuffer signature = bufData.remotePublickeys(dataIndex).signatureAsByteBuffer();<NEW_LINE>if (signature == null) {<NEW_LINE>LOGGER.severe(Common.addTag("[checkSignature] the signature get from server is null, please confirm that pki_verify mode is open at server."));<NEW_LINE>return FLClientStatus.FAILED;<NEW_LINE>}<NEW_LINE>byte[] sigByte = new byte[signature.remaining()];<NEW_LINE>signature.get(sigByte);<NEW_LINE>int certifyNum = bufData.remotePublickeys(dataIndex).certificateChainLength();<NEW_LINE>String[] pemCerts = new String[certifyNum];<NEW_LINE>for (int certIndex = 0; certIndex < certifyNum; certIndex++) {<NEW_LINE>pemCerts[certIndex] = bufData.remotePublickeys(dataIndex).certificateChain(certIndex);<NEW_LINE>}<NEW_LINE>X509Certificate[] x509Certificates = CertVerify.transformPemArrayToX509Array(pemCerts);<NEW_LINE>if (x509Certificates.length < 2) {<NEW_LINE>LOGGER.severe(Common.addTag("the length of x509Certificates is not valid, should be >= 2"));<NEW_LINE>return FLClientStatus.FAILED;<NEW_LINE>}<NEW_LINE>String certificateHash = PkiUtil.genHashFromCer(x509Certificates[1]);<NEW_LINE>LOGGER.info<MASK><NEW_LINE>// check srcId<NEW_LINE>String srcFlId = bufData.remotePublickeys(dataIndex).flId();<NEW_LINE>if (certificateHash.equals(srcFlId)) {<NEW_LINE>LOGGER.info(Common.addTag("Check flID success and source flID is:" + srcFlId));<NEW_LINE>} else {<NEW_LINE>LOGGER.severe(Common.addTag("Check flID failed!" + "source flID: " + srcFlId + "Hash ID from certificate:" + " " + certificateHash.equals(srcFlId)));<NEW_LINE>return FLClientStatus.FAILED;<NEW_LINE>}<NEW_LINE>certificateList.put(srcFlId, x509Certificates);<NEW_LINE>String timestamp = bufData.remotePublickeys(dataIndex).timestamp();<NEW_LINE>String clientID = flParameter.getClientID();<NEW_LINE>if (!verifySignature(clientID, x509Certificates, sigByte, cPkByte, sPkByte, timestamp, iteration)) {<NEW_LINE>LOGGER.info(Common.addTag("[PairWiseMask] FlID: " + srcFlId + ", signature authentication failed"));<NEW_LINE>return FLClientStatus.FAILED;<NEW_LINE>} else {<NEW_LINE>LOGGER.info(Common.addTag("[PairWiseMask] Verify signature success!"));<NEW_LINE>}<NEW_LINE>// check iteration and timestamp<NEW_LINE>int remoteIter = bufData.iteration();<NEW_LINE>FLClientStatus iterTimeCheck = checkIterAndTimestamp(remoteIter, timestamp);<NEW_LINE>if (iterTimeCheck == FLClientStatus.FAILED) {<NEW_LINE>return FLClientStatus.FAILED;<NEW_LINE>}<NEW_LINE>return FLClientStatus.SUCCESS;<NEW_LINE>}
(Common.addTag("Get certificate hash success!"));
697,377
protected Node[] createNodes(LibraryManager mgr) {<NEW_LINE>List<Library> libs = new ArrayList<Library>();<NEW_LINE>for (Library lib : mgr.getLibraries()) {<NEW_LINE>if (filter == null || filter.accept(lib)) {<NEW_LINE>libs.add(lib);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (libs.isEmpty()) {<NEW_LINE>return new Node[0];<NEW_LINE>} else {<NEW_LINE>Collections.sort(libs, new Comparator<Library>() {<NEW_LINE><NEW_LINE>Collator COLL = Collator.getInstance();<NEW_LINE><NEW_LINE>public int compare(Library lib1, Library lib2) {<NEW_LINE>return COLL.compare(lib1.getDisplayName(), lib2.getDisplayName());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>Node n = new AbstractNode(new LibraryChildren(libs)) {<NEW_LINE><NEW_LINE>Node iconDelegate = DataFolder.findFolder(FileUtil.getConfigRoot()).getNodeDelegate();<NEW_LINE><NEW_LINE>public Image getIcon(int type) {<NEW_LINE>return iconDelegate.getIcon(type);<NEW_LINE>}<NEW_LINE><NEW_LINE>public Image getOpenedIcon(int type) {<NEW_LINE>return iconDelegate.getOpenedIcon(type);<NEW_LINE>}<NEW_LINE>};<NEW_LINE>n.setName(mgr.getDisplayName());<NEW_LINE>n.<MASK><NEW_LINE>return new Node[] { n };<NEW_LINE>}<NEW_LINE>}
setDisplayName(mgr.getDisplayName());
953,685
private static void updateColumnFromState(CustomGridColumn column, GridColumnState state) {<NEW_LINE>column.setWidth(state.width);<NEW_LINE>column.setMinimumWidth(state.minWidth);<NEW_LINE>column.setMaximumWidth(state.maxWidth);<NEW_LINE>column.setExpandRatio(state.expandRatio);<NEW_LINE>assert state.rendererConnector instanceof AbstractGridRendererConnector : "GridColumnState.rendererConnector is invalid (not subclass of " + "AbstractRendererConnector)";<NEW_LINE>column.setRenderer((AbstractGridRendererConnector<Object>) state.rendererConnector);<NEW_LINE>column.setSortable(state.sortable);<NEW_LINE>column.setResizable(state.resizable);<NEW_LINE>column.setHeaderCaption(state.headerCaption);<NEW_LINE><MASK><NEW_LINE>column.setHidable(state.hidable);<NEW_LINE>column.setHidingToggleCaption(state.hidingToggleCaption);<NEW_LINE>column.setEditable(state.editable);<NEW_LINE>column.setEditorConnector((AbstractComponentConnector) state.editorConnector);<NEW_LINE>}
column.setHidden(state.hidden);
1,380,614
private static void findEquivalenceClasses(BlazeContext context, Project project, BlazeProjectData blazeProjectData, Map<TargetKey, BlazeResolveConfigurationData> targetToData, BlazeConfigurationResolverResult.Builder builder) {<NEW_LINE>Multimap<BlazeResolveConfigurationData, TargetKey> dataEquivalenceClasses = ArrayListMultimap.create();<NEW_LINE>for (Map.Entry<TargetKey, BlazeResolveConfigurationData> entry : targetToData.entrySet()) {<NEW_LINE>TargetKey target = entry.getKey();<NEW_LINE>BlazeResolveConfigurationData data = entry.getValue();<NEW_LINE>dataEquivalenceClasses.put(data, target);<NEW_LINE>}<NEW_LINE>ImmutableMap.Builder<BlazeResolveConfigurationData, BlazeResolveConfiguration> dataToConfiguration = ImmutableMap.builder();<NEW_LINE>for (Map.Entry<BlazeResolveConfigurationData, Collection<TargetKey>> entry : dataEquivalenceClasses.asMap().entrySet()) {<NEW_LINE>BlazeResolveConfigurationData data = entry.getKey();<NEW_LINE>Collection<TargetKey> targets = entry.getValue();<NEW_LINE>dataToConfiguration.put(data, BlazeResolveConfiguration.createForTargets(project<MASK><NEW_LINE>}<NEW_LINE>context.output(PrintOutput.log(String.format("%s unique C configurations, %s C targets", dataEquivalenceClasses.keySet().size(), dataEquivalenceClasses.size())));<NEW_LINE>builder.setUniqueConfigurations(dataToConfiguration.build());<NEW_LINE>}
, blazeProjectData, data, targets));
1,164,586
protected ErrorCode processFlow(WorkFlow flow, WorkFlowVO vo, int position) {<NEW_LINE>if (vo == null) {<NEW_LINE>vo = new WorkFlowVO();<NEW_LINE>}<NEW_LINE>vo.setChainUuid(chainvo.getUuid());<NEW_LINE>vo.setName(flow.getName());<NEW_LINE><MASK><NEW_LINE>vo.setContext(context.toBytes());<NEW_LINE>vo.setPosition(position);<NEW_LINE>vo = dbf.updateAndRefresh(vo);<NEW_LINE>try {<NEW_LINE>flow.process(context);<NEW_LINE>vo.setState(flowState.getNextState(vo.getState(), WorkFlowStateEvent.done));<NEW_LINE>vo.setContext(context.toBytes());<NEW_LINE>dbf.update(vo);<NEW_LINE>logger.debug(String.format("Successfully processed workflow[%s] in chain[%s]", flow.getName(), getName()));<NEW_LINE>return null;<NEW_LINE>} catch (WorkFlowException e) {<NEW_LINE>vo.setReason(e.getErrorCode().toString());<NEW_LINE>vo.setState(flowState.getNextState(vo.getState(), WorkFlowStateEvent.failed));<NEW_LINE>logger.debug(String.format("workflow[%s] in chain[%s] failed because %s", flow.getName(), getName(), e.getErrorCode()));<NEW_LINE>dbf.update(vo);<NEW_LINE>return e.getErrorCode();<NEW_LINE>} catch (Throwable t) {<NEW_LINE>ErrorCode err = inerr(t.getMessage());<NEW_LINE>vo.setReason(err.toString());<NEW_LINE>vo.setState(flowState.getNextState(vo.getState(), WorkFlowStateEvent.failed));<NEW_LINE>logger.debug(String.format("workflow[%s] in chain[%s] failed because of an unhandle exception", flow.getName(), getName()), t);<NEW_LINE>dbf.update(vo);<NEW_LINE>return err;<NEW_LINE>}<NEW_LINE>}
vo.setState(WorkFlowState.Processing);
320,253
private int wrapPositionForTabbedTextWithoutOptimization(@Nonnull Editor editor, @Nonnull CharSequence text, int spaceSize, int startLineOffset, int endLineOffset, int targetRangeEndOffset, int reservedWidthInColumns) {<NEW_LINE>int width = 0;<NEW_LINE>int x = 0;<NEW_LINE>int newX;<NEW_LINE>int symbolWidth;<NEW_LINE>int result = Integer.MAX_VALUE;<NEW_LINE>boolean wrapLine = false;<NEW_LINE>for (int i = startLineOffset; i < Math.min(endLineOffset, targetRangeEndOffset); i++) {<NEW_LINE>char <MASK><NEW_LINE>if (c == '\t') {<NEW_LINE>newX = EditorUtil.nextTabStop(x, editor);<NEW_LINE>int diffInPixels = newX - x;<NEW_LINE>symbolWidth = diffInPixels / spaceSize;<NEW_LINE>if (diffInPixels % spaceSize > 0) {<NEW_LINE>symbolWidth++;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>newX = x + EditorUtil.charWidth(c, Font.PLAIN, editor);<NEW_LINE>symbolWidth = 1;<NEW_LINE>}<NEW_LINE>if (width + symbolWidth + reservedWidthInColumns >= myRightMargin && (Math.min(endLineOffset, targetRangeEndOffset) - i) >= reservedWidthInColumns) {<NEW_LINE>result = i - 1;<NEW_LINE>}<NEW_LINE>if (width + symbolWidth >= myRightMargin) {<NEW_LINE>wrapLine = true;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>x = newX;<NEW_LINE>width += symbolWidth;<NEW_LINE>}<NEW_LINE>return wrapLine ? result : -1;<NEW_LINE>}
c = text.charAt(i);
847,964
public <K> ScoredDocuments searchTweets(String queryString, long t) {<NEW_LINE>SearchHits results = null;<NEW_LINE>String specials = "+-=&|><!(){}[]^\"~*?:\\/";<NEW_LINE>for (int i = 0; i < specials.length(); i++) {<NEW_LINE>char c = specials.charAt(i);<NEW_LINE>queryString = queryString.replace(String.valueOf(c), " ");<NEW_LINE>}<NEW_LINE>// Do not consider the tweets with tweet ids that are beyond the queryTweetTime<NEW_LINE>// <querytweettime> tag contains the timestamp of the query in terms of the<NEW_LINE>// chronologically nearest tweet id within the corpus<NEW_LINE>RangeQueryBuilder queryTweetTime = QueryBuilders.rangeQuery(TweetGenerator.TweetField.ID_LONG.name).from(0L).to(t);<NEW_LINE>QueryStringQueryBuilder queryTerms = QueryBuilders.queryStringQuery(queryString).defaultField("contents").analyzer("english");<NEW_LINE>BoolQueryBuilder query = QueryBuilders.boolQuery().filter<MASK><NEW_LINE>SearchRequest searchRequest = new SearchRequest(args.esIndex);<NEW_LINE>SearchSourceBuilder sourceBuilder = new SearchSourceBuilder();<NEW_LINE>sourceBuilder.query(query);<NEW_LINE>sourceBuilder.size(args.hits);<NEW_LINE>sourceBuilder.sort(new ScoreSortBuilder().order(SortOrder.DESC));<NEW_LINE>sourceBuilder.sort(new FieldSortBuilder(TweetGenerator.TweetField.ID_LONG.name).order(SortOrder.DESC));<NEW_LINE>searchRequest.source(sourceBuilder);<NEW_LINE>try {<NEW_LINE>SearchResponse searchResponse = client.search(searchRequest, COMMON_OPTIONS);<NEW_LINE>results = searchResponse.getHits();<NEW_LINE>} catch (Exception e) {<NEW_LINE>LOG.error("Exception during ES query: ", e);<NEW_LINE>}<NEW_LINE>ScoreTiesAdjusterReranker reranker = new ScoreTiesAdjusterReranker();<NEW_LINE>return reranker.rerank(ScoredDocuments.fromESDocs(results), null);<NEW_LINE>}
(queryTweetTime).should(queryTerms);
209,583
public static void fstat(EFile efile, String file_name) throws Pausable {<NEW_LINE>// System.err.println("trying entry for "+file_name);<NEW_LINE>try {<NEW_LINE>ZipEntry ent;<NEW_LINE><MASK><NEW_LINE>if (ent == null) {<NEW_LINE>ent = get_entry(file_name);<NEW_LINE>if (ent == null) {<NEW_LINE>efile.reply_posix_error(Posix.ENOENT);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// System.err.println("got entry for "+file_name+" : "+ent.toString()+" isdir="+ent.isDirectory());<NEW_LINE>long file_size = ent.getSize();<NEW_LINE>int file_type = ent.isDirectory() ? EFile.FT_DIRECTORY : EFile.FT_REGULAR;<NEW_LINE>final int RESULT_SIZE = (1 + (29 * 4));<NEW_LINE>ByteBuffer res = ByteBuffer.allocate(RESULT_SIZE);<NEW_LINE>res.order(ByteOrder.BIG_ENDIAN);<NEW_LINE>res.put(EFile.FILE_RESP_INFO);<NEW_LINE>res.putLong(file_size);<NEW_LINE>res.putInt(file_type);<NEW_LINE>put_time(res, ent.getTime());<NEW_LINE>put_time(res, ent.getTime());<NEW_LINE>put_time(res, ent.getTime());<NEW_LINE>res.putInt(0000400);<NEW_LINE>res.putInt(1);<NEW_LINE>res.putInt(0);<NEW_LINE>res.putInt(0);<NEW_LINE>res.putInt(file_name.hashCode());<NEW_LINE>res.putInt(0);<NEW_LINE>res.putInt(0);<NEW_LINE>res.putInt(EFile.FA_READ);<NEW_LINE>efile.driver_output2(res, null);<NEW_LINE>} catch (IOException e) {<NEW_LINE>efile.reply_posix_error(IO.exception_to_posix_code(e));<NEW_LINE>}<NEW_LINE>}
ent = get_entry(file_name + "/");
1,524,320
public PlanFragment visitPhysicalMysqlScan(OptExpression optExpression, ExecPlan context) {<NEW_LINE>PhysicalMysqlScanOperator node = (PhysicalMysqlScanOperator) optExpression.getOp();<NEW_LINE>context.getDescTbl().addReferencedTable(node.getTable());<NEW_LINE>TupleDescriptor tupleDescriptor = context.getDescTbl().createTupleDescriptor();<NEW_LINE>tupleDescriptor.setTable(node.getTable());<NEW_LINE>for (Map.Entry<ColumnRefOperator, Column> entry : node.getColRefToColumnMetaMap().entrySet()) {<NEW_LINE>SlotDescriptor slotDescriptor = context.getDescTbl().addSlotDescriptor(tupleDescriptor, new SlotId(entry.getKey().getId()));<NEW_LINE>slotDescriptor.setColumn(entry.getValue());<NEW_LINE>slotDescriptor.setIsNullable(entry.getValue().isAllowNull());<NEW_LINE>slotDescriptor.setIsMaterialized(true);<NEW_LINE>context.getColRefToExpr().put(entry.getKey(), new SlotRef(entry.getKey().getName(), slotDescriptor));<NEW_LINE>}<NEW_LINE>tupleDescriptor.computeMemLayout();<NEW_LINE>MysqlScanNode scanNode = new MysqlScanNode(context.getNextNodeId(), tupleDescriptor, (MysqlTable) node.getTable());<NEW_LINE>// set predicate<NEW_LINE>List<ScalarOperator> predicates = Utils.extractConjuncts(node.getPredicate());<NEW_LINE>ScalarOperatorToExpr.FormatterContext formatterContext = new ScalarOperatorToExpr.FormatterContext(context.getColRefToExpr());<NEW_LINE>formatterContext.setImplicitCast(true);<NEW_LINE>for (ScalarOperator predicate : predicates) {<NEW_LINE>scanNode.getConjuncts().add(ScalarOperatorToExpr.buildExecExpression(predicate, formatterContext));<NEW_LINE>}<NEW_LINE>scanNode.<MASK><NEW_LINE>scanNode.computeColumnsAndFilters();<NEW_LINE>scanNode.computeStatistics(optExpression.getStatistics());<NEW_LINE>context.getScanNodes().add(scanNode);<NEW_LINE>PlanFragment fragment = new PlanFragment(context.getNextFragmentId(), scanNode, DataPartition.UNPARTITIONED);<NEW_LINE>context.getFragments().add(fragment);<NEW_LINE>return fragment;<NEW_LINE>}
setLimit(node.getLimit());
1,566,198
public ScanProvisionedProductsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ScanProvisionedProductsResult scanProvisionedProductsResult = new ScanProvisionedProductsResult();<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 scanProvisionedProductsResult;<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("ProvisionedProducts", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>scanProvisionedProductsResult.setProvisionedProducts(new ListUnmarshaller<ProvisionedProductDetail>(ProvisionedProductDetailJsonUnmarshaller.getInstance(<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("NextPageToken", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>scanProvisionedProductsResult.setNextPageToken(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 scanProvisionedProductsResult;<NEW_LINE>}
)).unmarshall(context));
726,224
void checkReadable() throws SQLException, IOException {<NEW_LINE>checkClosed();<NEW_LINE>if (state == State.SET_CALLED) {<NEW_LINE>if (domResult != null) {<NEW_LINE>Node node = domResult.getNode();<NEW_LINE>domResult = null;<NEW_LINE>TransformerFactory factory = TransformerFactory.newInstance();<NEW_LINE>try {<NEW_LINE>Transformer transformer = factory.newTransformer();<NEW_LINE>DOMSource domSource = new DOMSource(node);<NEW_LINE>StringWriter stringWriter = new StringWriter();<NEW_LINE>StreamResult streamResult = new StreamResult(stringWriter);<NEW_LINE>transformer.transform(domSource, streamResult);<NEW_LINE>completeWrite(conn.createClob(new StringReader(stringWriter.toString<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw logAndConvert(e);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>} else if (closable != null) {<NEW_LINE>closable.close();<NEW_LINE>closable = null;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>throw DbException.getUnsupportedException("Stream setter is not yet closed.");<NEW_LINE>}<NEW_LINE>}
()), -1));
1,756,149
public void onComplete() {<NEW_LINE>if (payloadSubscriber != null) {<NEW_LINE>// We have a subscriber that has seen onNext()<NEW_LINE>payloadSubscriber.onComplete();<NEW_LINE>} else {<NEW_LINE>final Object maybeSubscriber = maybePayloadSubUpdater.getAndSet(this, EMPTY_COMPLETED);<NEW_LINE>if (maybeSubscriber instanceof PublisherSource.Subscriber) {<NEW_LINE>if (maybePayloadSubUpdater.compareAndSet(SplicingSubscriber.this, EMPTY_COMPLETED, EMPTY_COMPLETED_DELIVERED)) {<NEW_LINE>((PublisherSource.Subscriber<Payload<MASK><NEW_LINE>} else {<NEW_LINE>((PublisherSource.Subscriber<Payload>) maybeSubscriber).onError(new IllegalStateException("Duplicate Subscribers are not allowed. Existing: " + maybeSubscriber + ", failed the race with a duplicate, but neither has seen onNext()"));<NEW_LINE>}<NEW_LINE>} else if (!metaSeenInOnNext) {<NEW_LINE>dataSubscriber.onError(new IllegalStateException("Empty stream"));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
>) maybeSubscriber).onComplete();
47,829
Object convertInputIfNecessary(Object input) {<NEW_LINE>List<Object> convertedResults = new ArrayList<Object>();<NEW_LINE>if (input instanceof Tuple2) {<NEW_LINE>convertedResults.add(this.doConvert(((Tuple2) input).getT1(), getInputArgumentType(0)));<NEW_LINE>convertedResults.add(this.doConvert(((Tuple2) input).getT2(), getInputArgumentType(1)));<NEW_LINE>}<NEW_LINE>if (input instanceof Tuple3) {<NEW_LINE>convertedResults.add(this.doConvert(((Tuple3) input).getT3(), getInputArgumentType(2)));<NEW_LINE>}<NEW_LINE>if (input instanceof Tuple4) {<NEW_LINE>convertedResults.add(this.doConvert(((Tuple4) input).getT4(), getInputArgumentType(3)));<NEW_LINE>}<NEW_LINE>if (input instanceof Tuple5) {<NEW_LINE>convertedResults.add(this.doConvert(((Tuple5) input).getT5(), getInputArgumentType(4)));<NEW_LINE>}<NEW_LINE>if (input instanceof Tuple6) {<NEW_LINE>convertedResults.add(this.doConvert(((Tuple6) input).getT6(), getInputArgumentType(5)));<NEW_LINE>}<NEW_LINE>if (input instanceof Tuple7) {<NEW_LINE>convertedResults.add(this.doConvert(((Tuple7) input).getT7(), getInputArgumentType(6)));<NEW_LINE>}<NEW_LINE>if (input instanceof Tuple8) {<NEW_LINE>convertedResults.add(this.doConvert(((Tuple8) input).getT8(), getInputArgumentType(7)));<NEW_LINE>}<NEW_LINE>input = CollectionUtils.isEmpty(convertedResults) ? this.doConvert(input, getInputArgumentType(0)) : Tuples.<MASK><NEW_LINE>return input;<NEW_LINE>}
fromArray(convertedResults.toArray());
1,125,523
protected void findEigenVectors(double[][] imat, double[][] evs, double[] lambda) {<NEW_LINE>final int size = imat.length;<NEW_LINE>Random rnd = random.getSingleThreadedRandom();<NEW_LINE>double[<MASK><NEW_LINE>FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("Learning projections", tdim, LOG) : null;<NEW_LINE>for (int d = 0; d < tdim; ) {<NEW_LINE>final double[] cur = evs[d];<NEW_LINE>randomInitialization(cur, rnd);<NEW_LINE>double l = multiply(imat, cur, tmp);<NEW_LINE>for (int iter = 0; iter < 100; iter++) {<NEW_LINE>// This will scale "tmp" to unit length, and copy it to cur:<NEW_LINE>double delta = updateEigenvector(tmp, cur, l);<NEW_LINE>if (delta < 1e-10) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>l = multiply(imat, cur, tmp);<NEW_LINE>}<NEW_LINE>lambda[d++] = l = estimateEigenvalue(imat, cur);<NEW_LINE>LOG.incrementProcessed(prog);<NEW_LINE>if (d == tdim) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>// Update matrix<NEW_LINE>updateMatrix(imat, cur, l);<NEW_LINE>}<NEW_LINE>LOG.ensureCompleted(prog);<NEW_LINE>}
] tmp = new double[size];
1,770,857
private void loadEmojiIcons() {<NEW_LINE>final IndexedSprite[] modIcons = client.getModIcons();<NEW_LINE>if (modIconsStart != -1 || modIcons == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Emoji[] emojis = Emoji.values();<NEW_LINE>final IndexedSprite[] newModIcons = Arrays.copyOf(modIcons, modIcons.length + emojis.length);<NEW_LINE>modIconsStart = modIcons.length;<NEW_LINE>for (int i = 0; i < emojis.length; i++) {<NEW_LINE>final Emoji emoji = emojis[i];<NEW_LINE>try {<NEW_LINE>final <MASK><NEW_LINE>final IndexedSprite sprite = ImageUtil.getImageIndexedSprite(image, client);<NEW_LINE>newModIcons[modIconsStart + i] = sprite;<NEW_LINE>} catch (Exception ex) {<NEW_LINE>log.warn("Failed to load the sprite for emoji " + emoji, ex);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>log.debug("Adding emoji icons");<NEW_LINE>client.setModIcons(newModIcons);<NEW_LINE>}
BufferedImage image = emoji.loadImage();
650,159
private static void radixSort(int[] array) {<NEW_LINE>int m = array[0];<NEW_LINE>int ex = 1;<NEW_LINE>int n = array.length;<NEW_LINE>// initial bucket<NEW_LINE>int[] b = new int[10];<NEW_LINE>// loop through the array<NEW_LINE>// find the max element<NEW_LINE>for (int i = 1; i < n; i++) {<NEW_LINE>if (array[i] > m)<NEW_LINE>m = array[i];<NEW_LINE>}<NEW_LINE>while (m / ex > 0) {<NEW_LINE>int[] bucket = new int[10];<NEW_LINE>for (int i = 0; i < n; i++) bucket[(array[i<MASK><NEW_LINE>for (int i = 1; i < 10; i++) bucket[i] += bucket[i - 1];<NEW_LINE>for (int i = n - 1; i >= 0; i--) b[--bucket[(array[i] / ex) % 10]] = array[i];<NEW_LINE>for (int i = 0; i < n; i++) array[i] = b[i];<NEW_LINE>ex *= 10;<NEW_LINE>}<NEW_LINE>}
] / ex) % 10]++;
176,642
final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListTagsForResourceRequest> request = null;<NEW_LINE>Response<ListTagsForResourceResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new ListTagsForResourceRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listTagsForResourceRequest));<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, "drs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListTagsForResource");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListTagsForResourceResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListTagsForResourceResultJsonUnmarshaller());<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.RequestMarshallTime);
1,587,138
public void run() {<NEW_LINE>ServiceTask task;<NEW_LINE>ThreadWorkUsage workUsage = null;<NEW_LINE>if (SystemConfig.getInstance().getUseThreadUsageStat() == 1) {<NEW_LINE>String threadName = Thread.currentThread().getName();<NEW_LINE>workUsage = new ThreadWorkUsage();<NEW_LINE>DbleServer.getInstance().getThreadUsedMap().put(threadName, workUsage);<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>try {<NEW_LINE>if (Thread.currentThread().isInterrupted()) {<NEW_LINE>DbleServer.getInstance().getThreadUsedMap().remove(Thread.<MASK><NEW_LINE>LOGGER.debug("interrupt thread:{},concurrentBackQueue:{}", Thread.currentThread().toString(), concurrentBackQueue);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>while ((task = concurrentBackQueue.poll()) != null) {<NEW_LINE>// threadUsageStat start<NEW_LINE>long workStart = 0;<NEW_LINE>if (workUsage != null) {<NEW_LINE>workStart = System.nanoTime();<NEW_LINE>}<NEW_LINE>task.getService().execute(task, threadContext);<NEW_LINE>// threadUsageStat end<NEW_LINE>if (workUsage != null) {<NEW_LINE>workUsage.setCurrentSecondUsed(workUsage.getCurrentSecondUsed() + System.nanoTime() - workStart);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>LOGGER.warn("Unknown error:", t);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
currentThread().getName());
788,548
public void start(Blade blade) throws Exception {<NEW_LINE>this.blade = blade;<NEW_LINE>this.environment = blade.environment();<NEW_LINE>this.processors = blade.processors();<NEW_LINE>this.loaders = blade.loaders();<NEW_LINE>long startMs = System.currentTimeMillis();<NEW_LINE>int padSize = 16;<NEW_LINE>log.info("{} {}{}", StringKit.padRight("app.env", padSize), getPrefixSymbol(), environment.get(ENV_KEY_APP_ENV, "default"));<NEW_LINE>log.info("{} {}{}", StringKit.padRight("app.pid", padSize), getPrefixSymbol(), BladeKit.getPID());<NEW_LINE>log.info("{} {}{}", StringKit.padRight("app.devMode", padSize), getPrefixSymbol(), blade.devMode());<NEW_LINE>log.info("{} {}{}", StringKit.padRight("jdk.version", padSize), getPrefixSymbol(), System.getProperty("java.version"));<NEW_LINE>log.info("{} {}{}", StringKit.padRight("user.dir", padSize), getPrefixSymbol(), System.getProperty("user.dir"));<NEW_LINE>log.info("{} {}{}", StringKit.padRight("java.io.tmpdir", padSize), getPrefixSymbol(), System.getProperty("java.io.tmpdir"));<NEW_LINE>log.info("{} {}{}", StringKit.padRight("user.timezone", padSize), getPrefixSymbol()<MASK><NEW_LINE>log.info("{} {}{}", StringKit.padRight("file.encoding", padSize), getPrefixSymbol(), System.getProperty("file.encoding"));<NEW_LINE>log.info("{} {}{}", StringKit.padRight("app.classpath", padSize), getPrefixSymbol(), CLASSPATH);<NEW_LINE>this.initConfig();<NEW_LINE>String contextPath = environment.get(ENV_KEY_CONTEXT_PATH, "/");<NEW_LINE>WebContext.init(blade, contextPath);<NEW_LINE>this.initIoc();<NEW_LINE>this.watchEnv();<NEW_LINE>this.startServer(startMs);<NEW_LINE>this.sessionCleaner();<NEW_LINE>this.startTask();<NEW_LINE>this.shutdownHook();<NEW_LINE>}
, System.getProperty("user.timezone"));
710,854
public void process(JCas jcas) throws AnalysisEngineProcessException {<NEW_LINE>JCas questionView, resultView, passagesView;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>resultView = jcas.getView("Result");<NEW_LINE>passagesView = jcas.getView("PickedPassages");<NEW_LINE>} catch (CASException e) {<NEW_LINE>throw new AnalysisEngineProcessException(e);<NEW_LINE>}<NEW_LINE>ResultInfo ri = JCasUtil.selectSingle(resultView, ResultInfo.class);<NEW_LINE>for (Passage p : JCasUtil.select(passagesView, Passage.class)) {<NEW_LINE>for (NamedEntity ne : JCasUtil.selectCovered(NamedEntity.class, p)) {<NEW_LINE>String text = ne.getCoveredText();<NEW_LINE>fv.setFeature(AF.OriginPsgSurprise, 1.0);<NEW_LINE>}<NEW_LINE>addCandidateAnswer(passagesView, p, ne, fv);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
questionView = jcas.getView("Question");
627,534
private void sendShardAction(final String actionName, final ClusterState currentState, final TransportRequest request, final ActionListener<Void> listener) {<NEW_LINE>ClusterStateObserver observer = new ClusterStateObserver(currentState, clusterService, null, logger, threadPool.getThreadContext());<NEW_LINE>DiscoveryNode masterNode = currentState.nodes().getMasterNode();<NEW_LINE>Predicate<ClusterState> changePredicate = MasterNodeChangePredicate.build(currentState);<NEW_LINE>if (masterNode == null) {<NEW_LINE>logger.warn("no master known for action [{}] for shard entry [{}]", actionName, request);<NEW_LINE>waitForNewMasterAndRetry(actionName, observer, request, listener, changePredicate);<NEW_LINE>} else {<NEW_LINE>logger.debug("sending [{}] to [{}] for shard entry [{}]", actionName, masterNode.getId(), request);<NEW_LINE>transportService.sendRequest(masterNode, actionName, request, new EmptyTransportResponseHandler(ThreadPool.Names.SAME) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleResponse(TransportResponse.Empty response) {<NEW_LINE>listener.onResponse(null);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void handleException(TransportException exp) {<NEW_LINE>if (isMasterChannelException(exp)) {<NEW_LINE>waitForNewMasterAndRetry(actionName, observer, request, listener, changePredicate);<NEW_LINE>} else {<NEW_LINE>logger.warn(new ParameterizedMessage("unexpected failure while sending request [{}]" + " to [{}] for shard entry [{}]", actionName<MASK><NEW_LINE>listener.onFailure(exp instanceof RemoteTransportException ? (Exception) (exp.getCause() instanceof Exception ? exp.getCause() : new ElasticsearchException(exp.getCause())) : exp);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
, masterNode, request), exp);
631,308
public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent sourcePermanent = game.getPermanentEntering(source.getSourceId());<NEW_LINE>if (sourcePermanent != null && controller != null) {<NEW_LINE>TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(new FilterInstantOrSorceryCard("instant or sorcery card from your graveyard"));<NEW_LINE>if (controller.chooseTarget(outcome, target, source, game)) {<NEW_LINE>UUID exileId = CardUtil.getExileZoneId(game, source.getSourceId(), game.getState().getZoneChangeCounter(source.getSourceId()) + 1);<NEW_LINE>Card card = controller.getGraveyard().get(target.getFirstTarget(), game);<NEW_LINE>if (card != null) {<NEW_LINE>controller.moveCardsToExile(card, source, game, true, <MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
exileId, sourcePermanent.getIdName());
1,048,995
private static RangeFilterValues fromRange(int size, Value[] equalityValues, PropertyIndexQuery.RangePredicate<?> predicate) {<NEW_LINE>Value lower = predicate.fromValue();<NEW_LINE>Value upper = predicate.toValue();<NEW_LINE>if (lower == null || upper == null) {<NEW_LINE>throw new IllegalStateException("Use Values.NO_VALUE to encode the lack of a bound");<NEW_LINE>}<NEW_LINE>ValueTuple selectedLower;<NEW_LINE>boolean selectedIncludeLower;<NEW_LINE>ValueTuple selectedUpper;<NEW_LINE>boolean selectedIncludeUpper;<NEW_LINE>if (lower == NO_VALUE) {<NEW_LINE>Value min = Values.minValue(predicate.valueGroup(), upper);<NEW_LINE>selectedLower = getCompositeValueTuple(size, equalityValues, min, true);<NEW_LINE>selectedIncludeLower = true;<NEW_LINE>} else {<NEW_LINE>selectedLower = getCompositeValueTuple(size, equalityValues, lower, true);<NEW_LINE>selectedIncludeLower = predicate.fromInclusive();<NEW_LINE>}<NEW_LINE>if (upper == NO_VALUE) {<NEW_LINE>Value max = Values.maxValue(<MASK><NEW_LINE>selectedUpper = getCompositeValueTuple(size, equalityValues, max, false);<NEW_LINE>selectedIncludeUpper = false;<NEW_LINE>} else {<NEW_LINE>selectedUpper = getCompositeValueTuple(size, equalityValues, upper, false);<NEW_LINE>selectedIncludeUpper = predicate.toInclusive();<NEW_LINE>}<NEW_LINE>return new RangeFilterValues(selectedLower, selectedIncludeLower, selectedUpper, selectedIncludeUpper);<NEW_LINE>}
predicate.valueGroup(), lower);
1,233,481
public void configure() throws Exception {<NEW_LINE>errorHandler(noErrorHandler());<NEW_LINE>from(direct(MF_GET_PRODUCTS_ROUTE_ID)).routeId(MF_GET_PRODUCTS_ROUTE_ID).streamCaching().log("Route invoked").process(exchange -> {<NEW_LINE>final Object getProductsRequest = exchange.getIn().getBody();<NEW_LINE>if (!(getProductsRequest instanceof GetProductsCamelRequest)) {<NEW_LINE>throw new RuntimeCamelException("The route " + MF_GET_PRODUCTS_ROUTE_ID + " requires the body to be instanceof GetProductsCamelRequest. " + "However, it is " + (getProductsRequest == null ? "null" : getProductsRequest.getClass().getName()));<NEW_LINE>}<NEW_LINE>final GetProductsCamelRequest getProductsCamelRequest = (GetProductsCamelRequest) getProductsRequest;<NEW_LINE>exchange.getIn().setHeader("queryParams", getQueryParams(getProductsCamelRequest));<NEW_LINE>}).removeHeaders("CamelHttp*").setHeader(CoreConstants.AUTHORIZATION, simple(CoreConstants.AUTHORIZATION_TOKEN)).setHeader(Exchange.HTTP_METHOD, constant(HttpEndpointBuilderFactory.HttpMethods.GET)).toD("{{metasfresh.products.v2.api.uri}}?${header.queryParams}").to(direct(UNPACK_V2_API_RESPONSE));<NEW_LINE>from(direct(MF_UPSERT_PRODUCT_V2_CAMEL_URI)).routeId(MF_UPSERT_PRODUCT_V2_CAMEL_URI).streamCaching().process(exchange -> {<NEW_LINE>final var lookupRequest = exchange.getIn().getBody();<NEW_LINE>if (!(lookupRequest instanceof ProductUpsertCamelRequest)) {<NEW_LINE>throw new RuntimeCamelException("The route " + MF_UPSERT_PRODUCT_V2_CAMEL_URI + " requires the body to be instanceof ProductUpsertCamelRequest V2." + " However, it is " + (lookupRequest == null ? "null" : lookupRequest.getClass().getName()));<NEW_LINE>}<NEW_LINE>exchange.getIn().setHeader(HEADER_ORG_CODE, ((ProductUpsertCamelRequest<MASK><NEW_LINE>final var jsonRequestProductUpsert = ((ProductUpsertCamelRequest) lookupRequest).getJsonRequestProductUpsert();<NEW_LINE>log.info("Product upsert route invoked with " + jsonRequestProductUpsert.getRequestItems().size() + " requestItems");<NEW_LINE>exchange.getIn().setBody(jsonRequestProductUpsert);<NEW_LINE>}).marshal(CamelRouteHelper.setupJacksonDataFormatFor(getContext(), JsonRequestProductUpsert.class)).removeHeaders("CamelHttp*").setHeader(CoreConstants.AUTHORIZATION, simple(CoreConstants.AUTHORIZATION_TOKEN)).setHeader(Exchange.HTTP_METHOD, constant(HttpEndpointBuilderFactory.HttpMethods.PUT)).toD("{{metasfresh.upsert-product-v2.api.uri}}/${header." + HEADER_ORG_CODE + "}").to(direct(UNPACK_V2_API_RESPONSE));<NEW_LINE>}
) lookupRequest).getOrgCode());
119,323
public Request<ListProvisioningTemplateVersionsRequest> marshall(ListProvisioningTemplateVersionsRequest listProvisioningTemplateVersionsRequest) {<NEW_LINE>if (listProvisioningTemplateVersionsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListProvisioningTemplateVersionsRequest)");<NEW_LINE>}<NEW_LINE>Request<ListProvisioningTemplateVersionsRequest> request = new DefaultRequest<ListProvisioningTemplateVersionsRequest>(listProvisioningTemplateVersionsRequest, "AWSIot");<NEW_LINE>request.setHttpMethod(HttpMethodName.GET);<NEW_LINE>String uriResourcePath = "/provisioning-templates/{templateName}/versions";<NEW_LINE>uriResourcePath = uriResourcePath.replace("{templateName}", (listProvisioningTemplateVersionsRequest.getTemplateName() == null) ? "" : StringUtils.fromString(listProvisioningTemplateVersionsRequest.getTemplateName()));<NEW_LINE>if (listProvisioningTemplateVersionsRequest.getMaxResults() != null) {<NEW_LINE>request.addParameter("maxResults", StringUtils.fromInteger(listProvisioningTemplateVersionsRequest.getMaxResults()));<NEW_LINE>}<NEW_LINE>if (listProvisioningTemplateVersionsRequest.getNextToken() != null) {<NEW_LINE>request.addParameter("nextToken", StringUtils.fromString(listProvisioningTemplateVersionsRequest.getNextToken()));<NEW_LINE>}<NEW_LINE>request.setResourcePath(uriResourcePath);<NEW_LINE>if (!request.getHeaders().containsKey("Content-Type")) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>return request;<NEW_LINE>}
request.addHeader("Content-Type", "application/x-amz-json-1.0");
42,323
public EventLoopGroup init(Bootstrap bootstrap, final DockerClientConfig dockerClientConfig) {<NEW_LINE>EventLoopGroup nioEventLoopGroup = new NioEventLoopGroup(<MASK><NEW_LINE>InetAddress addr = InetAddress.getLoopbackAddress();<NEW_LINE>final SocketAddress proxyAddress = new InetSocketAddress(addr, 8008);<NEW_LINE>Security.addProvider(new BouncyCastleProvider());<NEW_LINE>ChannelFactory<NioSocketChannel> factory = () -> configure(new NioSocketChannel());<NEW_LINE>bootstrap.group(nioEventLoopGroup).channelFactory(factory).handler(new ChannelInitializer<SocketChannel>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void initChannel(final SocketChannel channel) throws Exception {<NEW_LINE>// channel.pipeline().addLast(new<NEW_LINE>// HttpProxyHandler(proxyAddress));<NEW_LINE>channel.pipeline().addLast(new HttpClientCodec());<NEW_LINE>channel.pipeline().addLast(new HttpContentDecompressor());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>return nioEventLoopGroup;<NEW_LINE>}
0, new DefaultThreadFactory(threadPrefix));
1,525,181
public static Response apiCall(String method, Map<String, Object> params, String connectionString) throws LbryRequestException {<NEW_LINE>long counter = new Double(System.currentTimeMillis() / 1000.0).longValue();<NEW_LINE>JSONObject requestParams = buildJsonParams(params);<NEW_LINE>JSONObject requestBody = new JSONObject();<NEW_LINE>try {<NEW_LINE>requestBody.put("jsonrpc", "2.0");<NEW_LINE>requestBody.put("method", method);<NEW_LINE>requestBody.put("params", requestParams);<NEW_LINE><MASK><NEW_LINE>} catch (JSONException ex) {<NEW_LINE>throw new LbryRequestException("Could not build the JSON request body.", ex);<NEW_LINE>}<NEW_LINE>RequestBody body = RequestBody.create(requestBody.toString(), Helper.JSON_MEDIA_TYPE);<NEW_LINE>Request request = new Request.Builder().url(connectionString).post(body).build();<NEW_LINE>OkHttpClient client = new OkHttpClient.Builder().writeTimeout(300, TimeUnit.SECONDS).readTimeout(300, TimeUnit.SECONDS).build();<NEW_LINE>try {<NEW_LINE>return client.newCall(request).execute();<NEW_LINE>} catch (IOException ex) {<NEW_LINE>throw new LbryRequestException(String.format("\"%s\" method to %s failed", method, connectionString), ex);<NEW_LINE>}<NEW_LINE>}
requestBody.put("counter", counter);
1,798,713
public void onSuccess(List<V2TIMMessage> v2TIMMessages) {<NEW_LINE>if (v2TIMMessages.size() == 1) {<NEW_LINE>// found message<NEW_LINE>option.setLastMsg(v2TIMMessages.get(0));<NEW_LINE>V2TIMManager.getMessageManager().getHistoryMessageList(option, new V2TIMValueCallback<List<V2TIMMessage>>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onSuccess(List<V2TIMMessage> v2TIMMessages) {<NEW_LINE>LinkedList<HashMap<String, Object>> msgs = new LinkedList<HashMap<String, Object>>();<NEW_LINE>for (int i = 0; i < v2TIMMessages.size(); i++) {<NEW_LINE>HashMap<String, Object> msg = CommonUtil.convertV2TIMMessageToMap<MASK><NEW_LINE>msgs.add(msg);<NEW_LINE>}<NEW_LINE>CommonUtil.returnSuccess(result, msgs);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onError(int code, String desc) {<NEW_LINE>CommonUtil.returnError(result, code, desc);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>CommonUtil.returnError(result, -1, "message not found");<NEW_LINE>}<NEW_LINE>}
(v2TIMMessages.get(i));
1,030,705
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_maps);<NEW_LINE>screenOrientation = getResources().getConfiguration().orientation;<NEW_LINE>Display display = getWindowManager().getDefaultDisplay();<NEW_LINE>outMetrics = new DisplayMetrics();<NEW_LINE>display.getMetrics(outMetrics);<NEW_LINE>Toolbar tB = findViewById(R.id.toolbar_maps);<NEW_LINE>setSupportActionBar(tB);<NEW_LINE>ActionBar aB = getSupportActionBar();<NEW_LINE>if (aB == null) {<NEW_LINE>finish();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>aB.setDisplayHomeAsUpEnabled(true);<NEW_LINE>aB.setDisplayShowHomeEnabled(true);<NEW_LINE>aB.setTitle(StringResourcesUtils.getString(R.string.title_activity_maps).toUpperCase());<NEW_LINE>((ViewGroup) findViewById(R.id.parent_layout_maps)).getLayoutTransition().setDuration(500);<NEW_LINE>((ViewGroup) findViewById(R.id.parent_layout_maps)).getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);<NEW_LINE>progressBar = findViewById(R.id.progressbar_maps);<NEW_LINE>progressBar.setVisibility(View.VISIBLE);<NEW_LINE>mapLayout = findViewById(R.id.map_layout);<NEW_LINE>fullscreenMarkerIcon = findViewById(R.id.fullscreen_marker_icon);<NEW_LINE>fullscreenMarkerIcon.setVisibility(View.INVISIBLE);<NEW_LINE>fullscreenMarkerIconShadow = findViewById(R.id.fullscreen_marker_icon_shadow);<NEW_LINE>fullscreenMarkerIconShadow.setVisibility(View.GONE);<NEW_LINE>setFullScreenFab = findViewById(R.id.set_fullscreen_fab);<NEW_LINE>setFullScreenFab.setOnClickListener(this);<NEW_LINE>setFullScreenFab.setVisibility(View.GONE);<NEW_LINE>myLocationFab = findViewById(R.id.my_location_fab);<NEW_LINE>Drawable myLocationFabDrawable = (ContextCompat.getDrawable(this, R.drawable.ic_small_location));<NEW_LINE>myLocationFab.setImageDrawable(myLocationFabDrawable);<NEW_LINE>myLocationFab.setOnClickListener(this);<NEW_LINE>myLocationFab.setVisibility(View.GONE);<NEW_LINE>sendCurrentLocationLayout = findViewById(R.id.send_current_location_layout);<NEW_LINE>sendCurrentLocationLayout.setOnClickListener(this);<NEW_LINE>currentLocationName = findViewById(R.id.address_name_label);<NEW_LINE>currentLocationAddress = findViewById(R.id.address_label);<NEW_LINE>sendCurrentLocationLandscapeLayout = findViewById(R.id.send_current_location_layout_landscape);<NEW_LINE>sendCurrentLocationLandscapeLayout.setOnClickListener(this);<NEW_LINE>currentLocationLandscape = findViewById(R.id.address_name_label_landscape);<NEW_LINE>geocoder = new Geocoder(this, Locale.getDefault());<NEW_LINE>Bitmap icon = drawableBitmap(mutateIconSecondary(this, R.drawable.ic_send_location, R.color.red_800));<NEW_LINE>mapHandler <MASK><NEW_LINE>isGPSEnabled = isGPSEnabled();<NEW_LINE>}
= new MapHandlerImpl(this, icon);
322,128
private Set<MetricAnomaly<BrokerEntity>> createSlowBrokerAnomalies(Set<BrokerEntity> detectedMetricAnomalies, int clusterSize) {<NEW_LINE>Set<MetricAnomaly<BrokerEntity>> detectedSlowBrokers = new HashSet<>();<NEW_LINE>Map<BrokerEntity, Long> brokersToDemote = new HashMap<>();<NEW_LINE>Map<BrokerEntity, Long> <MASK><NEW_LINE>for (BrokerEntity broker : detectedMetricAnomalies) {<NEW_LINE>// Report anomaly if slowness score reaches threshold for broker decommission/demotion.<NEW_LINE>int slownessScore = _brokerSlownessScore.get(broker);<NEW_LINE>if (slownessScore == _slowBrokerDecommissionScore) {<NEW_LINE>brokersToRemove.put(broker, _detectedSlowBrokers.get(broker));<NEW_LINE>} else if (slownessScore >= _slowBrokerDemotionScore) {<NEW_LINE>brokersToDemote.put(broker, _detectedSlowBrokers.get(broker));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// Update number of slow brokers with the given type.<NEW_LINE>int numBrokersToDemoteOrRemove = brokersToDemote.size() + brokersToRemove.size();<NEW_LINE>_numSlowBrokersByType.put(MetricAnomalyType.PERSISTENT, brokersToRemove.size());<NEW_LINE>_numSlowBrokersByType.put(MetricAnomalyType.RECENT, brokersToDemote.size());<NEW_LINE>_numSlowBrokersByType.put(MetricAnomalyType.SUSPECT, _detectedSlowBrokers.size() - numBrokersToDemoteOrRemove);<NEW_LINE>// If too many brokers in the cluster are detected as slow brokers, report anomaly as not fixable.<NEW_LINE>// Otherwise report anomaly with brokers to be removed/demoted.<NEW_LINE>if (numBrokersToDemoteOrRemove > clusterSize * _selfHealingUnfixableRatio) {<NEW_LINE>brokersToRemove.forEach(brokersToDemote::put);<NEW_LINE>detectedSlowBrokers.add(createSlowBrokersAnomaly(brokersToDemote, false, false));<NEW_LINE>} else {<NEW_LINE>if (!brokersToDemote.isEmpty()) {<NEW_LINE>detectedSlowBrokers.add(createSlowBrokersAnomaly(brokersToDemote, true, false));<NEW_LINE>}<NEW_LINE>if (!brokersToRemove.isEmpty()) {<NEW_LINE>detectedSlowBrokers.add(createSlowBrokersAnomaly(brokersToRemove, _slowBrokerRemovalEnabled, true));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return detectedSlowBrokers;<NEW_LINE>}
brokersToRemove = new HashMap<>();
1,420,297
public void onCreate() {<NEW_LINE>super.onCreate();<NEW_LINE>final MarsServiceProfile profile = gFactory.createMarsServiceProfile();<NEW_LINE>stub <MASK><NEW_LINE>// set callback<NEW_LINE>AppLogic.setCallBack(stub);<NEW_LINE>StnLogic.setCallBack(stub);<NEW_LINE>SdtLogic.setCallBack(stub);<NEW_LINE>// Initialize the Mars PlatformComm<NEW_LINE>Mars.init(getApplicationContext(), new Handler(Looper.getMainLooper()));<NEW_LINE>// Initialize the Mars<NEW_LINE>StnLogic.setLonglinkSvrAddr(profile.longLinkHost(), profile.longLinkPorts());<NEW_LINE>StnLogic.setShortlinkSvrAddr(profile.shortLinkPort());<NEW_LINE>StnLogic.setClientVersion(profile.productID());<NEW_LINE>Mars.onCreate(true);<NEW_LINE>StnLogic.makesureLongLinkConnected();<NEW_LINE>//<NEW_LINE>Log.d(TAG, "mars service native created");<NEW_LINE>}
= new MarsServiceStub(this, profile);
140,696
public Response lockDataset(@PathParam("identifier") String id, @PathParam("type") DatasetLock.Reason lockType) {<NEW_LINE>return response(req -> {<NEW_LINE>try {<NEW_LINE>AuthenticatedUser user = findAuthenticatedUserOrDie();<NEW_LINE>if (!user.isSuperuser()) {<NEW_LINE>return error(Response.Status.FORBIDDEN, "This API end point can be used by superusers only.");<NEW_LINE>}<NEW_LINE>Dataset dataset = findDatasetOrDie(id);<NEW_LINE>DatasetLock lock = dataset.getLockFor(lockType);<NEW_LINE>if (lock != null) {<NEW_LINE>return error(Response.<MASK><NEW_LINE>}<NEW_LINE>lock = new DatasetLock(lockType, user);<NEW_LINE>execCommand(new AddLockCommand(req, dataset, lock));<NEW_LINE>// refresh the dataset:<NEW_LINE>dataset = findDatasetOrDie(id);<NEW_LINE>// ... and kick of dataset reindexing:<NEW_LINE>try {<NEW_LINE>indexService.indexDataset(dataset, true);<NEW_LINE>} catch (IOException | SolrServerException e) {<NEW_LINE>String failureLogText = "Post add lock indexing failed. You can kickoff a re-index of this dataset with: \r\n curl http://localhost:8080/api/admin/index/datasets/" + dataset.getId().toString();<NEW_LINE>failureLogText += "\r\n" + e.getLocalizedMessage();<NEW_LINE>LoggingUtil.writeOnSuccessFailureLog(null, failureLogText, dataset);<NEW_LINE>}<NEW_LINE>return ok("dataset locked with lock type " + lockType);<NEW_LINE>} catch (WrappedResponse wr) {<NEW_LINE>return wr.getResponse();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
Status.FORBIDDEN, "dataset already locked with lock type " + lockType);
835,953
public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>final long totalBytes = totalBytes();<NEW_LINE>builder.field(TOTAL, new ByteSizeValue(totalBytes));<NEW_LINE>builder.field(TOTAL_IN_BYTES, totalBytes);<NEW_LINE>builder.startObject(INVERTED_INDEX);<NEW_LINE>builder.field(TOTAL, new ByteSizeValue(invertedIndexBytes));<NEW_LINE>builder.field(TOTAL_IN_BYTES, invertedIndexBytes);<NEW_LINE>builder.endObject();<NEW_LINE>builder.field(STORED_FIELDS, new ByteSizeValue(storedFieldBytes));<NEW_LINE><MASK><NEW_LINE>builder.field(DOC_VALUES, new ByteSizeValue(docValuesBytes));<NEW_LINE>builder.field(DOC_VALUES_IN_BYTES, docValuesBytes);<NEW_LINE>builder.field(POINTS, new ByteSizeValue(pointsBytes));<NEW_LINE>builder.field(POINTS_IN_BYTES, pointsBytes);<NEW_LINE>builder.field(NORMS, new ByteSizeValue(normsBytes));<NEW_LINE>builder.field(NORMS_IN_BYTES, normsBytes);<NEW_LINE>builder.field(TERM_VECTORS, new ByteSizeValue(termVectorsBytes));<NEW_LINE>builder.field(TERM_VECTORS_IN_BYTES, termVectorsBytes);<NEW_LINE>return builder;<NEW_LINE>}
builder.field(STORED_FIELDS_IN_BYTES, storedFieldBytes);
1,707,291
private void embedTraining(final EncogProgramNode node) {<NEW_LINE>final File dataFile = (File) node.getArgs().get(0).getValue();<NEW_LINE>final MLDataSet data = EncogUtility.loadEGB2Memory(dataFile);<NEW_LINE>addInclude("Encog.ML.Data.Basic");<NEW_LINE>// generate the input data<NEW_LINE>indentLine("public static readonly double[][] INPUT_DATA = {");<NEW_LINE>for (final MLDataPair pair : data) {<NEW_LINE>final MLData item = pair.getInput();<NEW_LINE>final StringBuilder line = new StringBuilder();<NEW_LINE>NumberList.toList(CSVFormat.EG_FORMAT, line, item.getData());<NEW_LINE>line.insert(0, "new double[] { ");<NEW_LINE>line.append(" },");<NEW_LINE>addLine(line.toString());<NEW_LINE>}<NEW_LINE>unIndentLine("};");<NEW_LINE>addBreak();<NEW_LINE>// generate the ideal data<NEW_LINE>indentLine("public static readonly double[][] IDEAL_DATA = {");<NEW_LINE>for (final MLDataPair pair : data) {<NEW_LINE>final <MASK><NEW_LINE>final StringBuilder line = new StringBuilder();<NEW_LINE>NumberList.toList(CSVFormat.EG_FORMAT, line, item.getData());<NEW_LINE>line.insert(0, "new double[] { ");<NEW_LINE>line.append(" },");<NEW_LINE>addLine(line.toString());<NEW_LINE>}<NEW_LINE>unIndentLine("};");<NEW_LINE>}
MLData item = pair.getIdeal();
611,490
public StringBuilder adminEnableDisableTopicAuthControl(HttpServletRequest req, StringBuilder sBuffer, ProcessResult result) {<NEW_LINE>// check and get operation info<NEW_LINE>if (!WebParameterUtils.getAUDBaseInfo(req, true, null, sBuffer, result)) {<NEW_LINE>WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());<NEW_LINE>return sBuffer;<NEW_LINE>}<NEW_LINE>BaseEntity opEntity = (BaseEntity) result.getRetData();<NEW_LINE>// check and get topicName field<NEW_LINE>if (!WebParameterUtils.getStringParamValue(req, WebFieldDef.COMPSTOPICNAME, true, null, sBuffer, result)) {<NEW_LINE>WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());<NEW_LINE>return sBuffer;<NEW_LINE>}<NEW_LINE>Set<String> topicNameSet = (Set<String>) result.getRetData();<NEW_LINE>// get authCtrlStatus info<NEW_LINE>if (!WebParameterUtils.getBooleanParamValue(req, WebFieldDef.ISENABLE, false, false, sBuffer, result)) {<NEW_LINE>WebParameterUtils.buildFailResult(<MASK><NEW_LINE>return sBuffer;<NEW_LINE>}<NEW_LINE>Boolean enableTopicAuth = (Boolean) result.getRetData();<NEW_LINE>// add or update records<NEW_LINE>List<TopicProcessResult> retInfo = new ArrayList<>();<NEW_LINE>for (String topicName : topicNameSet) {<NEW_LINE>retInfo.add(defMetaDataService.insertTopicCtrlConf(opEntity, topicName, enableTopicAuth, sBuffer, result));<NEW_LINE>}<NEW_LINE>return buildRetInfo(retInfo, sBuffer);<NEW_LINE>}
sBuffer, result.getErrMsg());
1,214,201
private void handleResult(Protocol.Digest digest, BatchReadBlobsResponse.Response batchResponse, ImmutableCollection<Callable<WritableByteChannel>> writableByteChannels) throws IOException {<NEW_LINE>if (!Status.fromCodeValue(batchResponse.getStatus().getCode()).isOk()) {<NEW_LINE>throw new BuckUncheckedExecutionException(String.format("Invalid batchResponse from CAS server for digest: [%s], code: [%s] message: [%s].", digest, batchResponse.getStatus().getCode(), batchResponse.getStatus<MASK><NEW_LINE>}<NEW_LINE>MessageDigest messageDigest = protocol.getMessageDigest();<NEW_LINE>for (ByteBuffer dataByteBuffer : batchResponse.getData().asReadOnlyByteBufferList()) {<NEW_LINE>messageDigest.update(dataByteBuffer.duplicate());<NEW_LINE>for (Callable<WritableByteChannel> callable : writableByteChannels) {<NEW_LINE>// Reset buffer position for each channel that's written to<NEW_LINE>try (WritableByteChannel channel = callable.call()) {<NEW_LINE>channel.write(dataByteBuffer.duplicate());<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new BuckUncheckedExecutionException("Unable to write " + digest + " to channel");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>String receivedHash = HashCode.fromBytes(messageDigest.digest()).toString();<NEW_LINE>if (digest.getSize() != batchResponse.getData().size() || !digest.getHash().equals(receivedHash)) {<NEW_LINE>throw new BuckUncheckedExecutionException("Digest of received bytes: " + receivedHash + ":" + batchResponse.getData().size() + " doesn't match expected digest: " + digest);<NEW_LINE>}<NEW_LINE>}
().getMessage()));
1,292,470
public static ZonedDateTime actionZDTPlusMinusTimePeriod(ZonedDateTime zdt, int factor, TimePeriod tp) {<NEW_LINE>if (tp == null) {<NEW_LINE>return zdt;<NEW_LINE>}<NEW_LINE>if (tp.getYears() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.getYears(), ChronoUnit.YEARS);<NEW_LINE>}<NEW_LINE>if (tp.getMonths() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.getMonths(), ChronoUnit.MONTHS);<NEW_LINE>}<NEW_LINE>if (tp.getWeeks() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.getWeeks(), ChronoUnit.WEEKS);<NEW_LINE>}<NEW_LINE>if (tp.getDays() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.getDays(), ChronoUnit.DAYS);<NEW_LINE>}<NEW_LINE>if (tp.getHours() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.getHours(), ChronoUnit.HOURS);<NEW_LINE>}<NEW_LINE>if (tp.getMinutes() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.getMinutes(), ChronoUnit.MINUTES);<NEW_LINE>}<NEW_LINE>if (tp.getSeconds() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.<MASK><NEW_LINE>}<NEW_LINE>if (tp.getMilliseconds() != null) {<NEW_LINE>zdt = zdt.plus(factor * tp.getMilliseconds(), ChronoUnit.MILLIS);<NEW_LINE>}<NEW_LINE>return zdt;<NEW_LINE>}
getSeconds(), ChronoUnit.SECONDS);
1,808,755
protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);<NEW_LINE>setContentView(R.layout.activity_open_gl);<NEW_LINE>folder = PathUtils.getRecordPath();<NEW_LINE>openGlView = findViewById(R.id.surfaceView);<NEW_LINE>button = findViewById(R.id.b_start_stop);<NEW_LINE>button.setOnClickListener(this);<NEW_LINE>bRecord = findViewById(R.id.b_record);<NEW_LINE>bRecord.setOnClickListener(this);<NEW_LINE>Button switchCamera = <MASK><NEW_LINE>switchCamera.setOnClickListener(this);<NEW_LINE>etUrl = findViewById(R.id.et_rtp_url);<NEW_LINE>etUrl.setHint(R.string.hint_rtmp);<NEW_LINE>rtmpCamera1 = new RtmpCamera1(openGlView, this);<NEW_LINE>openGlView.getHolder().addCallback(this);<NEW_LINE>openGlView.setOnTouchListener(this);<NEW_LINE>}
findViewById(R.id.switch_camera);
376,160
private void writeAttribute(int tag, VR vr, Object value, SpecificCharacterSet cs, Attributes attrs) throws SAXException {<NEW_LINE>if (TagUtils.isGroupLength(tag) || TagUtils.isPrivateCreator(tag))<NEW_LINE>return;<NEW_LINE>String privateCreator = attrs.getPrivateCreator(tag);<NEW_LINE><MASK><NEW_LINE>startElement("DicomAttribute");<NEW_LINE>if (value instanceof Value)<NEW_LINE>writeAttribute((Value) value, attrs.bigEndian());<NEW_LINE>else if (!vr.isInlineBinary()) {<NEW_LINE>writeValues(vr, value, attrs.bigEndian(), attrs.getSpecificCharacterSet(vr));<NEW_LINE>} else if (value instanceof byte[]) {<NEW_LINE>writeInlineBinary(attrs.bigEndian() ? vr.toggleEndian((byte[]) value, true) : (byte[]) value);<NEW_LINE>} else<NEW_LINE>throw new IllegalArgumentException("vr: " + vr + ", value class: " + value.getClass());<NEW_LINE>endElement("DicomAttribute");<NEW_LINE>}
addAttributes(tag, vr, privateCreator);
1,160,879
private void addEmptyLines(StyledDocument doc, int line, int numLines) {<NEW_LINE>int lastOffset = doc.getEndPosition().getOffset();<NEW_LINE>int totLines = org.openide.text.NbDocument.findLineNumber(doc, lastOffset);<NEW_LINE>// int totLines = doc.getDefaultRootElement().getElementIndex(lastOffset);<NEW_LINE>int offset = lastOffset;<NEW_LINE>if (line <= totLines) {<NEW_LINE>offset = org.openide.text.<MASK><NEW_LINE>// offset = doc.getDefaultRootElement().getElement(line).getStartOffset();<NEW_LINE>} else {<NEW_LINE>offset = lastOffset - 1;<NEW_LINE>Logger logger = Logger.getLogger(MergePanel.class.getName());<NEW_LINE>// NOI18N<NEW_LINE>logger.log(Level.WARNING, "line({0}) > totLines({1}): final offset({2})", new Object[] { line, totLines, offset });<NEW_LINE>logger.log(Level.INFO, null, new Exception());<NEW_LINE>}<NEW_LINE>// int endOffset = doc.getEndPosition().getOffset();<NEW_LINE>// if (offset > endOffset) offset = endOffset;<NEW_LINE>String insStr = strCharacters('\n', numLines);<NEW_LINE>// System.out.println("addEmptyLines = '"+insStr+"'");<NEW_LINE>try {<NEW_LINE>doc.insertString(offset, insStr, null);<NEW_LINE>} catch (BadLocationException e) {<NEW_LINE>org.openide.ErrorManager.getDefault().notify(e);<NEW_LINE>}<NEW_LINE>// initScrollBars();<NEW_LINE>}
NbDocument.findLineOffset(doc, line);
442,307
protected void initUI() {<NEW_LINE>var pickupWood = getUIFactoryService().newButton(getip(<MASK><NEW_LINE>pickupWood.setStyle("-fx-background-color: saddlebrown");<NEW_LINE>var pickupStone = getUIFactoryService().newButton(getip("stone").asString("Stone: %d"));<NEW_LINE>pickupStone.setStyle("-fx-background-color: grey");<NEW_LINE>var pickupCrystal = getUIFactoryService().newButton(getip("crystal").asString("Crystal: %d"));<NEW_LINE>pickupCrystal.setStyle("-fx-background-color: aqua");<NEW_LINE>pickupWood.setOnAction(actionEvent -> pickupItem(woodEntity, "Wood", "Wood description", 1));<NEW_LINE>pickupStone.setOnAction(actionEvent -> pickupItem(stoneEntity, "Stone", "Stone description", 1));<NEW_LINE>pickupCrystal.setOnAction(actionEvent -> pickupItem(crystalEntity, "Crystal", "Crystal description", 1));<NEW_LINE>var vbox = new VBox(5, pickupWood, pickupStone, pickupCrystal);<NEW_LINE>addUINode(vbox, 10, 10);<NEW_LINE>}
"wood").asString("Wood: %d"));
511,837
public boolean test(ThreadPool pool) {<NEW_LINE>final <MASK><NEW_LINE>final int queueSize = queue.size();<NEW_LINE>// Is the queue above the threshold?<NEW_LINE>if (queueSize > queueThreshold) {<NEW_LINE>// Yes. Should we grow?<NEW_LINE>// Note that this random number generator is quite fast, and on average is faster than or equivalent to<NEW_LINE>// alternatives such as a counter (which does not provide even distribution) or System.nanoTime().<NEW_LINE>if (alwaysAdd || queueSize > alwaysThreshold || ThreadLocalRandom.current().nextFloat() < rate) {<NEW_LINE>// Yep<NEW_LINE>Event.add(Event.Type.ADD, pool, queue);<NEW_LINE>return true;<NEW_LINE>} else {<NEW_LINE>// No, so don't grow yet<NEW_LINE>Event.add(Event.Type.WAIT, pool, queue);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Queue is below the threshold, don't grow<NEW_LINE>Event.add(Event.Type.BELOW, pool, queue);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
WorkQueue queue = pool.getQueue();
193,980
public static void main(String[] args) {<NEW_LINE>if (args.length < 1) {<NEW_LINE>System.out.println("Usage: java twitter4j.examples.suggestedusers.GetMemberSuggestions [slug]");<NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>System.out.println("Showing suggested users in " + args[0] + " category.");<NEW_LINE>try {<NEW_LINE>Twitter twitter = <MASK><NEW_LINE>ResponseList<User> users = twitter.getMemberSuggestions(args[0]);<NEW_LINE>for (User user : users) {<NEW_LINE>if (user.getStatus() != null) {<NEW_LINE>System.out.println("@" + user.getScreenName() + " - " + user.getStatus().getText());<NEW_LINE>} else {<NEW_LINE>// the user is protected<NEW_LINE>System.out.println("@" + user.getScreenName());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>System.out.println("done.");<NEW_LINE>System.exit(0);<NEW_LINE>} catch (TwitterException te) {<NEW_LINE>te.printStackTrace();<NEW_LINE>System.out.println("Failed to get suggested users: " + te.getMessage());<NEW_LINE>System.exit(-1);<NEW_LINE>}<NEW_LINE>}
new TwitterFactory().getInstance();
1,430,988
public void deletePet(Long petId, String apiKey) throws TimeoutException, ExecutionException, InterruptedException, ApiException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling deletePet", new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"));<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String path = "/pet/{petId}".replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));<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>headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));<NEW_LINE>String[] contentTypes = {};<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>HttpEntity httpEntity = localVarBuilder.build();<NEW_LINE>postBody = httpEntity;<NEW_LINE>} else {<NEW_LINE>// normal form params<NEW_LINE>}<NEW_LINE>String[] authNames = new String[] { "petstore_auth" };<NEW_LINE>try {<NEW_LINE>String localVarResponse = apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames);<NEW_LINE>if (localVarResponse != null) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (ApiException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (InterruptedException ex) {<NEW_LINE>throw ex;<NEW_LINE>} catch (ExecutionException ex) {<NEW_LINE>if (ex.getCause() instanceof VolleyError) {<NEW_LINE>VolleyError volleyError = (VolleyError) ex.getCause();<NEW_LINE>if (volleyError.networkResponse != null) {<NEW_LINE>throw new ApiException(volleyError.networkResponse.<MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>throw ex;<NEW_LINE>} catch (TimeoutException ex) {<NEW_LINE>throw ex;<NEW_LINE>}<NEW_LINE>}
statusCode, volleyError.getMessage());
113,042
public static ZemberekGrpcConfiguration loadFromFile(Path path) throws IOException {<NEW_LINE>KeyValueReader reader <MASK><NEW_LINE>Map<String, String> keyValues = reader.loadFromFile(path.toFile());<NEW_LINE>String lmVal = keyValues.get("normalization.lm");<NEW_LINE>if (lmVal == null) {<NEW_LINE>throw new IllegalStateException(path + " file does not contain normalization.lm key");<NEW_LINE>}<NEW_LINE>String normalizationRootVal = keyValues.get("normalization.dataRoot");<NEW_LINE>if (normalizationRootVal == null) {<NEW_LINE>throw new IllegalStateException(path + " file does not contain normalization.dataRoot key");<NEW_LINE>}<NEW_LINE>Path lmPath = Paths.get(lmVal);<NEW_LINE>IOUtil.checkFileArgument(lmPath, "Language model path");<NEW_LINE>Path normalizationPath = Paths.get(normalizationRootVal);<NEW_LINE>IOUtil.checkFileArgument(normalizationPath, "Normalization root path");<NEW_LINE>return new ZemberekGrpcConfiguration(lmPath, normalizationPath);<NEW_LINE>}
= new KeyValueReader("=", "#");
607,239
public void transform(TypeTransformer transformer) {<NEW_LINE>transformer.applyAdviceToMethod(isMethod().and(nameStartsWith("end").or(named("sendHead"))), HttpRequestInstrumentation.class.getName() + "$EndRequestAdvice");<NEW_LINE>transformer.applyAdviceToMethod(isMethod().and(named("handleException")), HttpRequestInstrumentation.<MASK><NEW_LINE>transformer.applyAdviceToMethod(isMethod().and(named("handleResponse")), HttpRequestInstrumentation.class.getName() + "$HandleResponseAdvice");<NEW_LINE>transformer.applyAdviceToMethod(isMethod().and(isPrivate()).and(nameStartsWith("write").or(nameStartsWith("connected"))), HttpRequestInstrumentation.class.getName() + "$MountContextAdvice");<NEW_LINE>transformer.applyAdviceToMethod(isMethod().and(named("exceptionHandler")).and(takesArgument(0, named("io.vertx.core.Handler"))), HttpRequestInstrumentation.class.getName() + "$ExceptionHandlerAdvice");<NEW_LINE>}
class.getName() + "$HandleExceptionAdvice");
427,997
public DataRecord deserialize(final DataInput source, @NonNegative final long recordID, final SirixDeweyID deweyID, final PageReadOnlyTrx pageReadTrx) throws IOException {<NEW_LINE>final int valueSize = source.readInt();<NEW_LINE>final byte[] value = new byte[valueSize];<NEW_LINE>source.readFully(value, 0, valueSize);<NEW_LINE>final int typeSize = source.readInt();<NEW_LINE>final byte[] type = new byte[typeSize];<NEW_LINE>source.readFully(type, 0, typeSize);<NEW_LINE>final int keySize = source.readInt();<NEW_LINE>final Set<Long> nodeKeys = new HashSet<>(keySize);<NEW_LINE>if (keySize > 0) {<NEW_LINE>long key = getVarLong(source);<NEW_LINE>nodeKeys.add(key);<NEW_LINE>for (int i = 1; i < keySize; i++) {<NEW_LINE>key += getVarLong(source);<NEW_LINE>nodeKeys.add(key);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final Type atomicType = resolveType(new String(type, Constants.DEFAULT_ENCODING));<NEW_LINE>// Node delegate.<NEW_LINE>final NodeDelegate nodeDel = deserializeNodeDelegateWithoutIDs(source, recordID, pageReadTrx);<NEW_LINE><MASK><NEW_LINE>final long rightChild = getVarLong(source);<NEW_LINE>final long pathNodeKey = getVarLong(source);<NEW_LINE>final boolean isChanged = source.readBoolean();<NEW_LINE>final Atomic atomic = AtomicUtil.fromBytes(value, atomicType);<NEW_LINE>final var node = new RBNode<>(new CASValue(atomic, atomicType, pathNodeKey), new NodeReferences(nodeKeys), nodeDel);<NEW_LINE>node.setLeftChildKey(leftChild);<NEW_LINE>node.setRightChildKey(rightChild);<NEW_LINE>node.setChanged(isChanged);<NEW_LINE>return node;<NEW_LINE>}
final long leftChild = getVarLong(source);
495,887
// for the Android compatibility we must use old Java Date class<NEW_LINE>@SuppressWarnings("JdkObsolete")<NEW_LINE>@NotNull<NEW_LINE>protected SentryEvent createEvent(@NotNull final LogEvent loggingEvent) {<NEW_LINE>final SentryEvent event = new SentryEvent(DateUtils.getDateTime(loggingEvent.getTimeMillis()));<NEW_LINE>final Message message = new Message();<NEW_LINE>message.setMessage(loggingEvent.getMessage().getFormat());<NEW_LINE>message.setFormatted(loggingEvent.getMessage().getFormattedMessage());<NEW_LINE>message.setParams(toParams(loggingEvent.getMessage().getParameters()));<NEW_LINE>event.setMessage(message);<NEW_LINE>event.setLogger(loggingEvent.getLoggerName());<NEW_LINE>event.setLevel(formatLevel(loggingEvent.getLevel()));<NEW_LINE>final ThrowableProxy throwableInformation = loggingEvent.getThrownProxy();<NEW_LINE>if (throwableInformation != null) {<NEW_LINE>event.setThrowable(throwableInformation.getThrowable());<NEW_LINE>}<NEW_LINE>if (loggingEvent.getThreadName() != null) {<NEW_LINE>event.setExtra("thread_name", loggingEvent.getThreadName());<NEW_LINE>}<NEW_LINE>if (loggingEvent.getMarker() != null) {<NEW_LINE>event.setExtra("marker", loggingEvent.<MASK><NEW_LINE>}<NEW_LINE>final Map<String, String> contextData = CollectionUtils.filterMapEntries(loggingEvent.getContextData().toMap(), entry -> entry.getValue() != null);<NEW_LINE>if (!contextData.isEmpty()) {<NEW_LINE>event.getContexts().put("Context Data", contextData);<NEW_LINE>}<NEW_LINE>return event;<NEW_LINE>}
getMarker().toString());
1,695,976
private static String serializeHistogram(QuantileDigest digest) {<NEW_LINE>int buckets = 100;<NEW_LINE>long min = digest.getMin();<NEW_LINE><MASK><NEW_LINE>long bucketSize = (max - min + buckets) / buckets;<NEW_LINE>ImmutableList.Builder<Long> boundaryBuilder = ImmutableList.builder();<NEW_LINE>for (int i = 1; i < buckets + 1; ++i) {<NEW_LINE>boundaryBuilder.add(min + bucketSize * i);<NEW_LINE>}<NEW_LINE>ImmutableList<Long> boundaries = boundaryBuilder.build();<NEW_LINE>List<QuantileDigest.Bucket> counts = digest.getHistogram(boundaries);<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>// add bogus bucket (fb303 ui ignores the first one, for whatever reason)<NEW_LINE>builder.append("-1:0:0,");<NEW_LINE>for (int i = 0; i < boundaries.size(); ++i) {<NEW_LINE>long lowBoundary = min;<NEW_LINE>if (i > 0) {<NEW_LINE>lowBoundary = boundaries.get(i - 1);<NEW_LINE>}<NEW_LINE>builder.append(lowBoundary).append(':').append(Math.round(counts.get(i).getCount())).append(':').append(Math.round(counts.get(i).getMean())).append(',');<NEW_LINE>}<NEW_LINE>// add a final bucket so that fb303 ui shows the max value<NEW_LINE>builder.append(max);<NEW_LINE>builder.append(":0:0");<NEW_LINE>return builder.toString();<NEW_LINE>}
long max = digest.getMax();
366,875
private Mono<PagedResponse<EHNamespaceInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>final String apiVersion = "2018-01-01-preview";<NEW_LINE>final String accept = "application/json";<NEW_LINE>context = this.client.mergeContext(context);<NEW_LINE>return service.listByResourceGroup(this.client.getEndpoint(), resourceGroupName, apiVersion, this.client.getSubscriptionId(), accept, context).map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null));<NEW_LINE>}
error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
573,401
void doRefresh(boolean currentBuilderOnly) {<NEW_LINE>if (currentBuilderOnly)<NEW_LINE>LOG.assertTrue(myCurrentViewType != null);<NEW_LINE>if (!isValidBase())<NEW_LINE>return;<NEW_LINE>// seems like we are in the middle of refresh already<NEW_LINE>if (getCurrentBuilder() == null)<NEW_LINE>return;<NEW_LINE>final Ref<Pair<List<Object>, List<Object>>> storedInfo = new Ref<Pair<List<Object>, List<Object>>>();<NEW_LINE>if (myCurrentViewType != null) {<NEW_LINE>final HierarchyTreeBuilder builder = getCurrentBuilder();<NEW_LINE>storedInfo.set(builder.storeExpandedAndSelectedInfo());<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>if (element == null || !isApplicableElement(element)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String currentViewType = myCurrentViewType;<NEW_LINE>if (currentBuilderOnly) {<NEW_LINE>Disposer.dispose(getCurrentBuilder());<NEW_LINE>} else {<NEW_LINE>disposeBuilders();<NEW_LINE>}<NEW_LINE>setHierarchyBase(element);<NEW_LINE>validate();<NEW_LINE>ApplicationManager.getApplication().invokeLater(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>changeView(currentViewType);<NEW_LINE>final HierarchyTreeBuilder builder = getCurrentBuilder();<NEW_LINE>builder.restoreExpandedAndSelectedInfo(storedInfo.get());<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
PsiElement element = mySmartPsiElementPointer.getElement();
842,856
public void addField(final VEditor fieldEditor) {<NEW_LINE>final GridField gridField = fieldEditor.getField();<NEW_LINE>//<NEW_LINE>// Special case: Field which is an Included tab placeholder<NEW_LINE>final int AD_Tab_ID = gridField.getIncluded_Tab_ID();<NEW_LINE>if (AD_Tab_ID > 0) {<NEW_LINE>// Create the included tab field group place holder.<NEW_LINE>final VPanelFieldGroup groupPanel = fieldGroupFactory.newEmptyPanelForIncludedTab(AD_Tab_ID);<NEW_LINE>mainGroupPanel.addIncludedFieldGroup(groupPanel);<NEW_LINE>includedGroupPanelsByTabId.put(AD_Tab_ID, groupPanel);<NEW_LINE>// If the grid controller for this tab was already added (see includeTab method),<NEW_LINE>// We can really add the grid controller inside this field group.<NEW_LINE>final GridController includedGC = includedTabList.get(AD_Tab_ID);<NEW_LINE>if (includedGC != null) {<NEW_LINE>includeTab(includedGC);<NEW_LINE>}<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final String columnName = gridField.getColumnName();<NEW_LINE>final GridFieldLayoutConstraints layoutConstraints = gridField.getLayoutConstraints();<NEW_LINE><MASK><NEW_LINE>//<NEW_LINE>// Get/Create the field group panel<NEW_LINE>final VPanelFieldGroup groupPanel;<NEW_LINE>{<NEW_LINE>final FieldGroupVO fieldGroup = gridField.getFieldGroup();<NEW_LINE>// Get previous field group panel<NEW_LINE>final VPanelFieldGroup previousFieldGroupPanel = getPreviousFieldGroupPanel(fieldGroup);<NEW_LINE>if (previousFieldGroupPanel != null) {<NEW_LINE>groupPanel = previousFieldGroupPanel;<NEW_LINE>} else {<NEW_LINE>groupPanel = createAndAddFieldGroup(fieldGroup);<NEW_LINE>// not same line anymore because we will add the field on a new field group panel<NEW_LINE>sameLine = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Create editor's label<NEW_LINE>CLabel fieldLabel = swingEditorFactory.getLabel(gridField);<NEW_LINE>if (fieldLabel != null && gridField.isCreateMnemonic()) {<NEW_LINE>mnemonics.setMnemonic(fieldLabel, gridField.getMnemonic());<NEW_LINE>}<NEW_LINE>if (fieldLabel == null) {<NEW_LINE>fieldLabel = new CLabel("");<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Add field label and field editor<NEW_LINE>groupPanel.addLabelAndEditor(fieldLabel, fieldEditor, sameLine);<NEW_LINE>// Add to internal map<NEW_LINE>columnName2label.put(columnName, fieldLabel);<NEW_LINE>columnName2editor.put(columnName, fieldEditor);<NEW_LINE>}
boolean sameLine = layoutConstraints.isSameLine();
1,337,673
final ListDelegatedAdminAccountsResult executeListDelegatedAdminAccounts(ListDelegatedAdminAccountsRequest listDelegatedAdminAccountsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDelegatedAdminAccountsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListDelegatedAdminAccountsRequest> request = null;<NEW_LINE>Response<ListDelegatedAdminAccountsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListDelegatedAdminAccountsRequestProtocolMarshaller(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, "Inspector2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDelegatedAdminAccounts");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListDelegatedAdminAccountsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListDelegatedAdminAccountsResultJsonUnmarshaller());<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(listDelegatedAdminAccountsRequest));
1,076,198
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {<NEW_LINE>// compute a nonce (do not use remote IP address due to proxy farms) format of<NEW_LINE>// nonce is: base64(expirationTime + ":" + md5Hex(expirationTime + ":" + key))<NEW_LINE>long expiryTime = System.currentTimeMillis() <MASK><NEW_LINE>String signatureValue = DigestAuthUtils.md5Hex(expiryTime + ":" + this.key);<NEW_LINE>String nonceValue = expiryTime + ":" + signatureValue;<NEW_LINE>String nonceValueBase64 = new String(Base64.getEncoder().encode(nonceValue.getBytes()));<NEW_LINE>// qop is quality of protection, as defined by RFC 2617. We do not use opaque due<NEW_LINE>// to IE violation of RFC 2617 in not representing opaque on subsequent requests<NEW_LINE>// in same session.<NEW_LINE>String authenticateHeader = "Digest realm=\"" + this.realmName + "\", " + "qop=\"auth\", nonce=\"" + nonceValueBase64 + "\"";<NEW_LINE>if (authException instanceof NonceExpiredException) {<NEW_LINE>authenticateHeader = authenticateHeader + ", stale=\"true\"";<NEW_LINE>}<NEW_LINE>logger.debug(LogMessage.format("WWW-Authenticate header sent to user agent: %s", authenticateHeader));<NEW_LINE>response.addHeader("WWW-Authenticate", authenticateHeader);<NEW_LINE>response.sendError(HttpStatus.UNAUTHORIZED.value(), HttpStatus.UNAUTHORIZED.getReasonPhrase());<NEW_LINE>}
+ (this.nonceValiditySeconds * 1000);
88,454
public /* ------------------------------------------------------------------------ */<NEW_LINE>String toTraceString() {<NEW_LINE>if (_traceableString == null) {<NEW_LINE>if (_password != null) {<NEW_LINE>try {<NEW_LINE>MessageDigest digester = MessageDigest.getInstance("SHA-256");<NEW_LINE>digester.update(SALT);<NEW_LINE>for (char c : _password) {<NEW_LINE>digester.update((byte) ((c & 0xFF00) >> 8));<NEW_LINE>digester.update((byte) <MASK><NEW_LINE>}<NEW_LINE>byte[] hash = digester.digest();<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>// Throw away the high nibbles of each byte to increase security and reduce the<NEW_LINE>// length of the trace string<NEW_LINE>for (byte b : hash) {<NEW_LINE>int i = b & 0x0F;<NEW_LINE>sb.append(Integer.toHexString(i));<NEW_LINE>}<NEW_LINE>_traceableString = sb.toString();<NEW_LINE>} catch (NoSuchAlgorithmException nsae) {<NEW_LINE>// No FFDC Code needed - fall back on the toString implementation<NEW_LINE>_traceableString = toString();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>_traceableString = "";
((c & 0x00FF)));
84,187
public void run() {<NEW_LINE>try {<NEW_LINE>// Determine first white char before dotPos<NEW_LINE>int rsPos = Utilities.getRowStart(doc, dotPos);<NEW_LINE>int startPos = Utilities.getFirstNonWhiteBwd(doc, dotPos, rsPos);<NEW_LINE>startPos = (startPos >= 0) ? (startPos + 1) : rsPos;<NEW_LINE>int startCol = <MASK><NEW_LINE>int endCol = Utilities.getNextTabColumn(doc, dotPos);<NEW_LINE>Preferences prefs = CodeStylePreferences.get(doc).getPreferences();<NEW_LINE>String tabStr = Analyzer.getWhitespaceString(startCol, endCol, prefs.getBoolean(SimpleValueNames.EXPAND_TABS, EditorPreferencesDefaults.defaultExpandTabs), prefs.getInt(SimpleValueNames.TAB_SIZE, EditorPreferencesDefaults.defaultTabSize));<NEW_LINE>// Search for the first non-common char<NEW_LINE>char[] removeChars = doc.getChars(startPos, dotPos - startPos);<NEW_LINE>int ind = 0;<NEW_LINE>while (ind < removeChars.length && removeChars[ind] == tabStr.charAt(ind)) {<NEW_LINE>ind++;<NEW_LINE>}<NEW_LINE>startPos += ind;<NEW_LINE>doc.remove(startPos, dotPos - startPos);<NEW_LINE>doc.insertString(startPos, tabStr.substring(ind), null);<NEW_LINE>} catch (BadLocationException ex) {<NEW_LINE>badLocationExceptions[0] = ex;<NEW_LINE>}<NEW_LINE>}
Utilities.getVisualColumn(doc, startPos);
7,835
public JustInTimeLookup create(Key key) {<NEW_LINE>Type type = key.type();<NEW_LINE>if (key.qualifier() != null || !(type instanceof ParameterizedType)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ParameterizedType parameterizedType = ((ParameterizedType) type);<NEW_LINE>Type rawType = parameterizedType.getRawType();<NEW_LINE>if (rawType != MembersInjector.class) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Type targetType = parameterizedType.getActualTypeArguments()[0];<NEW_LINE>if (targetType instanceof ParameterizedType) {<NEW_LINE>ParameterizedType innerType = (ParameterizedType) targetType;<NEW_LINE>if (innerType.getActualTypeArguments()[0] instanceof WildcardType) {<NEW_LINE>throw new IllegalStateException("Cannot inject members into types with unbounded type arguments: " + key);<NEW_LINE>}<NEW_LINE>// TODO what do we do here? turn Foo<Bar> into Foo.class? What if an injected type is the T?<NEW_LINE>throw new UnsupportedOperationException("TODO");<NEW_LINE>}<NEW_LINE>Class<?> targetClass = ((Class<?>) targetType);<NEW_LINE>return new JustInTimeLookup(<MASK><NEW_LINE>}
null, new UnlinkedMembersInjectorBinding(targetClass));
50,891
public static ListModulesByPageResponse unmarshall(ListModulesByPageResponse listModulesByPageResponse, UnmarshallerContext _ctx) {<NEW_LINE>listModulesByPageResponse.setRequestId(_ctx.stringValue("ListModulesByPageResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setPageNumber(_ctx.integerValue("ListModulesByPageResponse.Data.PageNumber"));<NEW_LINE>data.setPageSize(_ctx.integerValue("ListModulesByPageResponse.Data.PageSize"));<NEW_LINE>data.setTotalCount(_ctx.integerValue("ListModulesByPageResponse.Data.TotalCount"));<NEW_LINE>List<ModuleItem> items = new ArrayList<ModuleItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListModulesByPageResponse.Data.Items.Length"); i++) {<NEW_LINE>ModuleItem moduleItem = new ModuleItem();<NEW_LINE>moduleItem.setDescription(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].Description"));<NEW_LINE>moduleItem.setCreateTime(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].CreateTime"));<NEW_LINE>moduleItem.setModifiedTime(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].ModifiedTime"));<NEW_LINE>moduleItem.setIcon(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].Icon"));<NEW_LINE>moduleItem.setLatestPublishedCommit(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].LatestPublishedCommit"));<NEW_LINE>moduleItem.setLatestPublishedVersion(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].LatestPublishedVersion"));<NEW_LINE>moduleItem.setMinimumPlatformVersion(_ctx.stringValue<MASK><NEW_LINE>moduleItem.setModuleId(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].ModuleId"));<NEW_LINE>moduleItem.setModuleName(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].ModuleName"));<NEW_LINE>moduleItem.setOwnerUserId(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].OwnerUserId"));<NEW_LINE>moduleItem.setPlatform(_ctx.stringValue("ListModulesByPageResponse.Data.Items[" + i + "].Platform"));<NEW_LINE>items.add(moduleItem);<NEW_LINE>}<NEW_LINE>data.setItems(items);<NEW_LINE>listModulesByPageResponse.setData(data);<NEW_LINE>return listModulesByPageResponse;<NEW_LINE>}
("ListModulesByPageResponse.Data.Items[" + i + "].MinimumPlatformVersion"));
1,752,884
private boolean intersectsPixelClosure(Coordinate p0, Coordinate p1) {<NEW_LINE>double minx = hpx - TOLERANCE;<NEW_LINE>double maxx = hpx + TOLERANCE;<NEW_LINE>double miny = hpy - TOLERANCE;<NEW_LINE>double maxy = hpy + TOLERANCE;<NEW_LINE>Coordinate[<MASK><NEW_LINE>corner[UPPER_RIGHT] = new Coordinate(maxx, maxy);<NEW_LINE>corner[UPPER_LEFT] = new Coordinate(minx, maxy);<NEW_LINE>corner[LOWER_LEFT] = new Coordinate(minx, miny);<NEW_LINE>corner[LOWER_RIGHT] = new Coordinate(maxx, miny);<NEW_LINE>LineIntersector li = new RobustLineIntersector();<NEW_LINE>li.computeIntersection(p0, p1, corner[0], corner[1]);<NEW_LINE>if (li.hasIntersection())<NEW_LINE>return true;<NEW_LINE>li.computeIntersection(p0, p1, corner[1], corner[2]);<NEW_LINE>if (li.hasIntersection())<NEW_LINE>return true;<NEW_LINE>li.computeIntersection(p0, p1, corner[2], corner[3]);<NEW_LINE>if (li.hasIntersection())<NEW_LINE>return true;<NEW_LINE>li.computeIntersection(p0, p1, corner[3], corner[0]);<NEW_LINE>if (li.hasIntersection())<NEW_LINE>return true;<NEW_LINE>return false;<NEW_LINE>}
] corner = new Coordinate[4];
1,159,392
public <T> void declareNamedObject(BiConsumer<Value, T> consumer, NamedObjectParser<T, Context> namedObjectParser, ParseField parseField) {<NEW_LINE>if (consumer == null) {<NEW_LINE>throw new IllegalArgumentException("[consumer] is required");<NEW_LINE>}<NEW_LINE>if (namedObjectParser == null) {<NEW_LINE>throw new IllegalArgumentException("[parser] is required");<NEW_LINE>}<NEW_LINE>if (parseField == null) {<NEW_LINE>throw new IllegalArgumentException("[parseField] is required");<NEW_LINE>}<NEW_LINE>if (isConstructorArg(consumer)) {<NEW_LINE>Map<RestApiVersion, Integer> positions = addConstructorArg(consumer, parseField);<NEW_LINE>objectParser.declareNamedObject((target, v) -> target.constructorArg(positions<MASK><NEW_LINE>} else {<NEW_LINE>numberOfFields += 1;<NEW_LINE>objectParser.declareNamedObject(queueingConsumer(consumer, parseField), namedObjectParser, parseField);<NEW_LINE>}<NEW_LINE>}
, v), namedObjectParser, parseField);
439,814
public Page<MdmLinkJson> queryLinks(@Nullable String theGoldenResourceId, @Nullable String theSourceResourceId, @Nullable String theMatchResult, @Nullable String theLinkSource, MdmTransactionContext theMdmTransactionContext, MdmPageRequest thePageRequest) {<NEW_LINE>IIdType goldenResourceId = MdmControllerUtil.extractGoldenResourceIdDtOrNull(ProviderConstants.MDM_QUERY_LINKS_GOLDEN_RESOURCE_ID, theGoldenResourceId);<NEW_LINE>IIdType sourceId = MdmControllerUtil.extractSourceIdDtOrNull(ProviderConstants.MDM_QUERY_LINKS_RESOURCE_ID, theSourceResourceId);<NEW_LINE>MdmMatchResultEnum matchResult = MdmControllerUtil.extractMatchResultOrNull(theMatchResult);<NEW_LINE>MdmLinkSourceEnum <MASK><NEW_LINE>return myMdmLinkQuerySvc.queryLinks(goldenResourceId, sourceId, matchResult, linkSource, theMdmTransactionContext, thePageRequest);<NEW_LINE>}
linkSource = MdmControllerUtil.extractLinkSourceOrNull(theLinkSource);
516,085
final ListServicesResult executeListServices(ListServicesRequest listServicesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listServicesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListServicesRequest> request = null;<NEW_LINE>Response<ListServicesResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListServicesRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listServicesRequest));<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, "ServiceDiscovery");<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<ListServicesResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListServicesResultJsonUnmarshaller());<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, "ListServices");
1,063,717
private String placeOrder(CurrencyPair currencyPair, Order.OrderType orderSide, BigDecimal amount, BigDecimal price, BTCMarketsOrder.Type orderType, Set<Order.IOrderFlags> flags, String clientOrderId) throws IOException {<NEW_LINE>boolean postOnly = false;<NEW_LINE>if (flags.contains(BTCMarketsOrderFlags.POST_ONLY)) {<NEW_LINE>postOnly = true;<NEW_LINE>flags = Sets.filter(flags, flag -> flag != BTCMarketsOrderFlags.POST_ONLY);<NEW_LINE>}<NEW_LINE>BTCMarketsOrder.Side side = orderSide == BID ? BTCMarketsOrder.Side<MASK><NEW_LINE>final String marketId = currencyPair.base.toString() + "-" + currencyPair.counter.toString();<NEW_LINE>String timeInForce;<NEW_LINE>if (flags.contains(BTCMarketsOrderFlags.FOK)) {<NEW_LINE>timeInForce = "FOK";<NEW_LINE>} else if (flags.contains(BTCMarketsOrderFlags.IOC)) {<NEW_LINE>timeInForce = "IOC";<NEW_LINE>} else {<NEW_LINE>timeInForce = "GTC";<NEW_LINE>}<NEW_LINE>final BTCMarketsPlaceOrderResponse orderResponse = placeBTCMarketsOrder(marketId, amount, price, side, orderType, timeInForce, postOnly, clientOrderId);<NEW_LINE>return orderResponse.orderId;<NEW_LINE>}
.Bid : BTCMarketsOrder.Side.Ask;
1,641,024
public void onBindViewHolder(mRecyclerAdapter.mViewHolder holder, final int position) {<NEW_LINE>if (MODE == EditImageActivity.MODE_STICKER_TYPES) {<NEW_LINE>holder.itemView.setTag(stickerPath[position]);<NEW_LINE>}<NEW_LINE>int iconImageSize = (int) getActivity().getResources().getDimension(R.dimen.icon_item_image_size_recycler);<NEW_LINE>int midRowSize = (int) getActivity().getResources().getDimension(R.dimen.editor_mid_row_size);<NEW_LINE>holder.icon.setScaleType(ImageView.ScaleType.FIT_CENTER);<NEW_LINE>if (MODE == EditImageActivity.MODE_FILTERS) {<NEW_LINE>if (currentBitmap != null && filterThumbs != null && filterThumbs.size() > position) {<NEW_LINE>iconImageSize = (int) getActivity().getResources().getDimension(R.dimen.icon_item_image_size_filter_preview);<NEW_LINE>midRowSize = (int) getActivity().getResources().<MASK><NEW_LINE>holder.icon.setScaleType(ImageView.ScaleType.CENTER_CROP);<NEW_LINE>holder.icon.setImageBitmap(filterThumbs.get(position));<NEW_LINE>} else {<NEW_LINE>holder.icon.setImageResource(defaulticon);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>holder.icon.setImageResource(iconlist.getResourceId(position, defaulticon));<NEW_LINE>}<NEW_LINE>LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(iconImageSize, iconImageSize);<NEW_LINE>layoutParams.gravity = Gravity.CENTER_HORIZONTAL;<NEW_LINE>holder.icon.setLayoutParams(layoutParams);<NEW_LINE>holder.title.setText(titlelist.getString(position));<NEW_LINE>LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(midRowSize, midRowSize);<NEW_LINE>layoutParams.gravity = Gravity.CENTER;<NEW_LINE>holder.wrapper.setLayoutParams(layoutParams2);<NEW_LINE>holder.wrapper.setBackgroundColor(Color.TRANSPARENT);<NEW_LINE>if (currentSelection == position)<NEW_LINE>holder.wrapper.setBackgroundColor(ContextCompat.getColor(getContext(), R.color.md_grey_200));<NEW_LINE>holder.itemView.setOnClickListener(new View.OnClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onClick(View v) {<NEW_LINE>highlightSelectedOption(position, v);<NEW_LINE>itemClicked(position, v);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
getDimension(R.dimen.editor_filter_mid_row_size);
1,719,839
public void run() {<NEW_LINE>try {<NEW_LINE>logger.atInfo().log("Starting publish job.");<NEW_LINE>Job job = dataflow.projects().locations().jobs().get(projectId, jobRegion, jobId).execute();<NEW_LINE>String state = job.getCurrentState();<NEW_LINE>switch(state) {<NEW_LINE>case JOB_DONE:<NEW_LINE>logger.atInfo(<MASK><NEW_LINE>response.setStatus(SC_OK);<NEW_LINE>if (shouldSendMonthlySpec11Email()) {<NEW_LINE>sendMonthlyEmail();<NEW_LINE>} else {<NEW_LINE>Optional<LocalDate> previousDate = spec11RegistrarThreatMatchesParser.getPreviousDateWithMatches(date);<NEW_LINE>if (previousDate.isPresent()) {<NEW_LINE>processDailyDiff(previousDate.get());<NEW_LINE>} else {<NEW_LINE>emailUtils.sendAlertEmail(String.format("Spec11 Diff Error %s", date), String.format("Could not find a previous file within the past month of %s", date));<NEW_LINE>response.setStatus(SC_NO_CONTENT);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case JOB_FAILED:<NEW_LINE>logger.atSevere().log("Dataflow job %s finished unsuccessfully.", jobId);<NEW_LINE>response.setStatus(SC_NO_CONTENT);<NEW_LINE>emailUtils.sendAlertEmail(String.format("Spec11 Dataflow Pipeline Failure %s", date), String.format("Spec11 %s job %s ended in status failure.", date, jobId));<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>logger.atInfo().log("Job in non-terminal state %s, retrying:", state);<NEW_LINE>response.setStatus(SC_NOT_MODIFIED);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>} catch (IOException | JSONException e) {<NEW_LINE>logger.atSevere().withCause(e).log("Failed to publish Spec11 reports.");<NEW_LINE>emailUtils.sendAlertEmail(String.format("Spec11 Publish Failure %s", date), String.format("Spec11 %s publish action failed due to %s", date, e.getMessage()));<NEW_LINE>response.setStatus(SC_INTERNAL_SERVER_ERROR);<NEW_LINE>response.setContentType(MediaType.PLAIN_TEXT_UTF_8);<NEW_LINE>response.setPayload(String.format("Template launch failed: %s", e.getMessage()));<NEW_LINE>}<NEW_LINE>}
).log("Dataflow job %s finished successfully, publishing results.", jobId);
655,447
public void onDataReceived(@NonNull final BluetoothDevice device, @NonNull final Data data) {<NEW_LINE>super.onDataReceived(device, data);<NEW_LINE>if (data.size() != 6) {<NEW_LINE>onInvalidDataReceived(device, data);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final int featuresValue = data.getIntValue(Data.FORMAT_UINT24_LE, 0);<NEW_LINE>final int typeAndSampleLocation = data.getIntValue(Data.FORMAT_UINT8, 3);<NEW_LINE>final int expectedCrc = data.getIntValue(Data.FORMAT_UINT16_LE, 4);<NEW_LINE>final <MASK><NEW_LINE>if (features.e2eCrcSupported) {<NEW_LINE>final int actualCrc = CRC16.MCRF4XX(data.getValue(), 0, 4);<NEW_LINE>if (actualCrc != expectedCrc) {<NEW_LINE>onContinuousGlucoseMonitorFeaturesReceivedWithCrcError(device, data);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// If the device doesn't support E2E-safety the value of the field shall be set to 0xFFFF.<NEW_LINE>if (expectedCrc != 0xFFFF) {<NEW_LINE>onInvalidDataReceived(device, data);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>@SuppressLint("WrongConstant")<NEW_LINE>final int // least significant nibble<NEW_LINE>type = typeAndSampleLocation & 0x0F;<NEW_LINE>// most significant nibble<NEW_LINE>final int sampleLocation = typeAndSampleLocation >> 4;<NEW_LINE>onContinuousGlucoseMonitorFeaturesReceived(device, features, type, sampleLocation, features.e2eCrcSupported);<NEW_LINE>}
CGMFeatures features = new CGMFeatures(featuresValue);
178,358
public List<CompletionItem> completeAttributes(CompletionContext context) {<NEW_LINE>// COPIED FROM AngularHtmlExtension<NEW_LINE>List<CompletionItem> items = new ArrayList<>();<NEW_LINE>Element element = context.getCurrentNode();<NEW_LINE>if (element != null) {<NEW_LINE>switch(element.type()) {<NEW_LINE>case OPEN_TAG:<NEW_LINE>OpenTag ot = (OpenTag) element;<NEW_LINE>String name = ot.unqualifiedName().toString();<NEW_LINE>Collection<CustomAttribute> customAttributes = getCustomAttributes(name);<NEW_LINE>for (CustomAttribute ca : customAttributes) {<NEW_LINE>items.add(new LatteAttributeCompletionItem(ca, context.getCCItemStartOffset()));<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (context.getPrefix().length() > 0) {<NEW_LINE>// filter the items according to the prefix<NEW_LINE>Iterator<CompletionItem> itr = items.iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>CharSequence insertPrefix = itr<MASK><NEW_LINE>if (insertPrefix != null) {<NEW_LINE>if (!LexerUtils.startsWith(insertPrefix, context.getPrefix(), true, false)) {<NEW_LINE>itr.remove();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return items;<NEW_LINE>}
.next().getInsertPrefix();
176,184
public boolean showMenuAction(@Nullable Object object) {<NEW_LINE>OsmandApplication app = view.getApplication();<NEW_LINE>MapActivity mapActivity = view.getMapActivity();<NEW_LINE>TravelHelper travelHelper = app.getTravelHelper();<NEW_LINE>if (mapActivity != null && object instanceof Amenity) {<NEW_LINE>Amenity amenity = (Amenity) object;<NEW_LINE>if (amenity.getSubType().equals(ROUTE_TRACK)) {<NEW_LINE>TravelGpx travelGpx = travelHelper.searchGpx(amenity.getLocation(), amenity.getRouteId(<MASK><NEW_LINE>if (travelGpx == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>travelHelper.openTrackMenu(travelGpx, mapActivity, amenity.getRouteId(), amenity.getLocation());<NEW_LINE>return true;<NEW_LINE>} else if (amenity.getSubType().equals(ROUTE_ARTICLE)) {<NEW_LINE>String lang = app.getLanguage();<NEW_LINE>lang = amenity.getContentLanguage(Amenity.DESCRIPTION, lang, "en");<NEW_LINE>String name = amenity.getName(lang);<NEW_LINE>TravelArticle article = travelHelper.getArticleByTitle(name, lang, true, null);<NEW_LINE>if (article == null) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>travelHelper.openTrackMenu(article, mapActivity, name, amenity.getLocation());<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>}
), amenity.getRef());
717,714
private void processLinesWithPaymentNoInvoice(final List<I_ESR_ImportLine> importLinesWithPaymentNoInvoice, final boolean withPayment) {<NEW_LINE>for (final I_ESR_ImportLine importLine : importLinesWithPaymentNoInvoice) {<NEW_LINE>final BigDecimal sum = importLine.getAmount();<NEW_LINE>refresh(importLine);<NEW_LINE>int importLinePaymentRecordId = importLine.getC_Payment_ID();<NEW_LINE>final PaymentId paymentId = PaymentId.ofRepoIdOrNull(importLinePaymentRecordId);<NEW_LINE>I_C_Payment payment = paymentId == null ? null : paymentDAO.getById(paymentId);<NEW_LINE>if (withPayment) {<NEW_LINE>Check.assumeNotNull(payment, "{} has a payment", importLine);<NEW_LINE>} else {<NEW_LINE>if (importLinePaymentRecordId <= 0) {<NEW_LINE>payment = createUnlinkedPaymentForLine(importLine, sum);<NEW_LINE>if (// task 09167: calling with true to preserve the old behavior<NEW_LINE>sysConfigBL.getBooleanValue(ESRConstants.SYSCONFIG_EAGER_PAYMENT_ALLOCATION, true)) {<NEW_LINE>// task 07783<NEW_LINE>payment.setIsAutoAllocateAvailableAmt(true);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Check.assume(payment.getAD_Org_ID() == importLine.getAD_Org_ID(), "Payment has the same org as {}", importLine);<NEW_LINE>final I_C_Invoice invoice = importLine.getC_Invoice();<NEW_LINE>Check.assumeNotNull(invoice, "{} has an invoice", importLine);<NEW_LINE>// make sure that we don't end up with inter-org allocations<NEW_LINE>Check.assume(invoice.getAD_Org_ID() == payment.getAD_Org_ID(), "Invoice {} and payment {} have the same AD_Org_ID");<NEW_LINE>payment.setC_Currency_ID(invoice.getC_Currency_ID());<NEW_LINE>// Note that we set OverUnderAmt to make it clear the we don't have Discount or WriteOff<NEW_LINE>final BigDecimal invoiceOpenAmt = invoiceDAO.retrieveOpenAmt(invoice);<NEW_LINE>final BigDecimal overUnderAmt = sum.subtract(invoiceOpenAmt);<NEW_LINE>if (X_ESR_ImportLine.ESR_DOCUMENT_STATUS_TotallyMatched.equals(importLine.getESR_Document_Status()) && !isInvoicePaidInCurrentImport(importLinesWithPaymentNoInvoice, invoice) && BigDecimal.ZERO.compareTo(overUnderAmt) == 0) {<NEW_LINE>payment.setC_Invoice_ID(invoice.getC_Invoice_ID());<NEW_LINE>payment.setOverUnderAmt(overUnderAmt);<NEW_LINE>}<NEW_LINE>payment.setDocStatus(IDocument.STATUS_Drafted);<NEW_LINE>payment.setDocAction(IDocument.ACTION_Complete);<NEW_LINE>paymentBL.save(payment);<NEW_LINE>// guard; there was some crappy code in MPayment, there might be more<NEW_LINE>Check.assume(payment.getAD_Org_ID() == importLine.getAD_Org_ID(), "Payment has the same org as {}", importLine);<NEW_LINE>documentBL.processEx(payment, IDocument.ACTION_Complete, IDocument.STATUS_Completed);<NEW_LINE>importLine.<MASK><NEW_LINE>esrImportDAO.save(importLine);<NEW_LINE>// note that there might be further lines for this invoice<NEW_LINE>updateLinesOpenAmt(importLine, invoice);<NEW_LINE>// saving, because updateLinesOpenAmt doesn't save the line it was called with<NEW_LINE>esrImportDAO.save(importLine);<NEW_LINE>}<NEW_LINE>}
setC_Payment_ID(payment.getC_Payment_ID());
273,212
private long[] repeatsToMatchShape(Shape desiredShape) {<NEW_LINE>Shape curShape = getShape();<NEW_LINE>int dimension = curShape.dimension();<NEW_LINE>if (desiredShape.dimension() > dimension) {<NEW_LINE>throw new IllegalArgumentException("The desired shape has too many dimensions");<NEW_LINE>}<NEW_LINE>if (desiredShape.dimension() < dimension) {<NEW_LINE>int additionalDimensions = dimension - desiredShape.dimension();<NEW_LINE>desiredShape = curShape.slice(0<MASK><NEW_LINE>}<NEW_LINE>long[] repeats = new long[dimension];<NEW_LINE>for (int i = 0; i < dimension; i++) {<NEW_LINE>if (curShape.get(i) == 0 || desiredShape.get(i) % curShape.get(i) != 0) {<NEW_LINE>throw new IllegalArgumentException("The desired shape is not a multiple of the original shape");<NEW_LINE>}<NEW_LINE>repeats[i] = Math.round(Math.ceil((double) desiredShape.get(i) / curShape.get(i)));<NEW_LINE>}<NEW_LINE>return repeats;<NEW_LINE>}
, additionalDimensions).addAll(desiredShape);
1,611,970
private void registerForMetamorphic(String variant, Consumer<FinishedRecipe> consumer) {<NEW_LINE>Block base = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_stone")).get();<NEW_LINE>Block slab = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_stone" + LibBlockNames.SLAB_SUFFIX)).get();<NEW_LINE>Block stair = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_stone" + LibBlockNames.STAIR_SUFFIX)).get();<NEW_LINE>Block brick = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_bricks")).get();<NEW_LINE>Block brickSlab = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_bricks" + LibBlockNames.SLAB_SUFFIX)).get();<NEW_LINE>Block brickStair = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_bricks" + LibBlockNames.STAIR_SUFFIX)).get();<NEW_LINE>Block brickWall = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_bricks" + LibBlockNames.WALL_SUFFIX)).get();<NEW_LINE>Block chiseledBrick = Registry.BLOCK.getOptional(prefix("chiseled_" + LibBlockNames.METAMORPHIC_PREFIX + variant + "_bricks")).get();<NEW_LINE>Block cobble = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_cobblestone")).get();<NEW_LINE>Block cobbleSlab = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_cobblestone" + LibBlockNames.SLAB_SUFFIX)).get();<NEW_LINE>Block cobbleStair = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_cobblestone" + LibBlockNames<MASK><NEW_LINE>Block cobbleWall = Registry.BLOCK.getOptional(prefix(LibBlockNames.METAMORPHIC_PREFIX + variant + "_cobblestone" + LibBlockNames.WALL_SUFFIX)).get();<NEW_LINE>consumer.accept(stonecutting(base, slab, 2));<NEW_LINE>consumer.accept(stonecutting(base, stair));<NEW_LINE>consumer.accept(stonecutting(base, brick));<NEW_LINE>consumer.accept(stonecutting(base, brickSlab, 2));<NEW_LINE>consumer.accept(stonecutting(base, brickStair));<NEW_LINE>consumer.accept(stonecutting(base, brickWall));<NEW_LINE>consumer.accept(stonecutting(base, chiseledBrick));<NEW_LINE>consumer.accept(stonecutting(brick, brickSlab, 2));<NEW_LINE>consumer.accept(stonecutting(brick, brickStair));<NEW_LINE>consumer.accept(stonecutting(brick, brickWall));<NEW_LINE>consumer.accept(stonecutting(brick, chiseledBrick));<NEW_LINE>consumer.accept(stonecutting(cobble, cobbleSlab, 2));<NEW_LINE>consumer.accept(stonecutting(cobble, cobbleStair));<NEW_LINE>consumer.accept(stonecutting(cobble, cobbleWall));<NEW_LINE>}
.STAIR_SUFFIX)).get();
1,742,603
public Object constructValue() throws IOException {<NEW_LINE>if (source == null) {<NEW_LINE>throw constructLoadException(INCLUDE_SOURCE_ATTRIBUTE + " is required.");<NEW_LINE>}<NEW_LINE>URL location;<NEW_LINE>final ClassLoader cl = getClassLoader();<NEW_LINE>if (source.charAt(0) == '/') {<NEW_LINE>// FIXME: JIGSAW -- use Class.getResourceAsStream if resource is in a module<NEW_LINE>location = cl.getResource(source.substring(1));<NEW_LINE>if (location == null) {<NEW_LINE>throw constructLoadException("Cannot resolve path: " + source);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (FXMLLoader.this.location == null) {<NEW_LINE>throw constructLoadException("Base location is undefined.");<NEW_LINE>}<NEW_LINE>location = new URL(FXMLLoader.this.location, source);<NEW_LINE>}<NEW_LINE>FXMLLoader fxmlLoader = new FXMLLoader(location, resources, builderFactory, controllerFactory, charset, loaders);<NEW_LINE>fxmlLoader.parentLoader = FXMLLoader.this;<NEW_LINE>if (isCyclic(FXMLLoader.this, fxmlLoader)) {<NEW_LINE>throw new IOException(String.format("Including \"%s\" in \"%s\" created cyclic reference.", fxmlLoader.location.toExternalForm(), FXMLLoader.this.location.toExternalForm()));<NEW_LINE>}<NEW_LINE>fxmlLoader.setClassLoader(cl);<NEW_LINE>fxmlLoader.setStaticLoad(staticLoad);<NEW_LINE>Object value = fxmlLoader.loadImpl(callerClass);<NEW_LINE>if (fx_id != null) {<NEW_LINE>String id = this.fx_id + CONTROLLER_SUFFIX;<NEW_LINE>Object controller = fxmlLoader.getController();<NEW_LINE><MASK><NEW_LINE>injectFields(id, controller);<NEW_LINE>}<NEW_LINE>return value;<NEW_LINE>}
namespace.put(id, controller);
246,662
/* (non-Javadoc)<NEW_LINE>* @see org.netbeans.modules.web.common.websocket.WebSocketChanelHandler#sendHandshake()<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void sendHandshake() throws IOException {<NEW_LINE>String acceptKey = createAcceptKey(getKey());<NEW_LINE>if (acceptKey == null) {<NEW_LINE>close();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>StringBuilder builder = new StringBuilder(Utils.HTTP_RESPONSE);<NEW_LINE>builder.append(Utils.CRLF);<NEW_LINE>builder.append(Utils.WS_UPGRADE);<NEW_LINE>builder.append(Utils.CRLF);<NEW_LINE>builder.append(Utils.CONN_UPGRADE);<NEW_LINE>builder.append(Utils.CRLF);<NEW_LINE>// NOI18N<NEW_LINE>builder.append("Sec-WebSocket-Origin: ");<NEW_LINE>// NOI18N<NEW_LINE>String origin = getWebSocketPoint().getContext(myKey).getHeaders().get("Sec-WebSocket-Origin");<NEW_LINE>if (origin == null) {<NEW_LINE>// NOI18N<NEW_LINE>origin = getWebSocketPoint().getContext(myKey).getHeaders().get("Origin");<NEW_LINE>}<NEW_LINE>if (origin != null) {<NEW_LINE>builder.append(origin);<NEW_LINE>}<NEW_LINE>builder.append(Utils.CRLF);<NEW_LINE>builder.append(Utils.ACCEPT);<NEW_LINE>builder.append(": ");<NEW_LINE>builder.append(acceptKey);<NEW_LINE>builder.append(Utils.CRLF);<NEW_LINE><MASK><NEW_LINE>getWebSocketPoint().send(builder.toString().getBytes(Charset.forName(Utils.UTF_8)), myKey);<NEW_LINE>}
builder.append(Utils.CRLF);
568,438
public Builder mergeFrom(io.kubernetes.client.proto.V1Scheduling.PriorityClassList other) {<NEW_LINE>if (other == io.kubernetes.client.proto.V1Scheduling.PriorityClassList.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasMetadata()) {<NEW_LINE>mergeMetadata(other.getMetadata());<NEW_LINE>}<NEW_LINE>if (itemsBuilder_ == null) {<NEW_LINE>if (!other.items_.isEmpty()) {<NEW_LINE>if (items_.isEmpty()) {<NEW_LINE>items_ = other.items_;<NEW_LINE><MASK><NEW_LINE>} else {<NEW_LINE>ensureItemsIsMutable();<NEW_LINE>items_.addAll(other.items_);<NEW_LINE>}<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>if (!other.items_.isEmpty()) {<NEW_LINE>if (itemsBuilder_.isEmpty()) {<NEW_LINE>itemsBuilder_.dispose();<NEW_LINE>itemsBuilder_ = null;<NEW_LINE>items_ = other.items_;<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000002);<NEW_LINE>itemsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getItemsFieldBuilder() : null;<NEW_LINE>} else {<NEW_LINE>itemsBuilder_.addAllMessages(other.items_);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this.mergeUnknownFields(other.unknownFields);<NEW_LINE>onChanged();<NEW_LINE>return this;<NEW_LINE>}
bitField0_ = (bitField0_ & ~0x00000002);
1,814,319
private void resizeVolume(VolumeInfo volumeInfo) {<NEW_LINE>LOGGER.debug("Resizing PowerFlex volume");<NEW_LINE>Preconditions.checkArgument(volumeInfo != null, "volumeInfo cannot be null");<NEW_LINE>try {<NEW_LINE>String scaleIOVolumeId = ScaleIOUtil.getVolumePath(volumeInfo.getPath());<NEW_LINE>Long storagePoolId = volumeInfo.getPoolId();<NEW_LINE>ResizeVolumePayload payload = (ResizeVolumePayload) volumeInfo.getpayload();<NEW_LINE>long newSizeInBytes = payload.newSize != null ? payload.newSize : volumeInfo.getSize();<NEW_LINE>// Only increase size is allowed and size should be specified in granularity of 8 GB<NEW_LINE>if (newSizeInBytes <= volumeInfo.getSize()) {<NEW_LINE>throw new CloudRuntimeException("Only increase size is allowed for volume: " + volumeInfo.getName());<NEW_LINE>}<NEW_LINE>org.apache.cloudstack.storage.datastore.api.Volume scaleIOVolume = null;<NEW_LINE>long newSizeInGB = newSizeInBytes / (1024 * 1024 * 1024);<NEW_LINE>long newSizeIn8gbBoundary = (long) (Math.ceil(newSizeInGB / 8.0) * 8.0);<NEW_LINE>final ScaleIOGatewayClient client = getScaleIOClient(storagePoolId);<NEW_LINE>scaleIOVolume = client.resizeVolume(scaleIOVolumeId, (int) newSizeIn8gbBoundary);<NEW_LINE>if (scaleIOVolume == null) {<NEW_LINE>throw new CloudRuntimeException("Failed to resize volume: " + volumeInfo.getName());<NEW_LINE>}<NEW_LINE>VolumeVO volume = volumeDao.findById(volumeInfo.getId());<NEW_LINE><MASK><NEW_LINE>volume.setSize(scaleIOVolume.getSizeInKb() * 1024);<NEW_LINE>volumeDao.update(volume.getId(), volume);<NEW_LINE>StoragePoolVO storagePool = storagePoolDao.findById(storagePoolId);<NEW_LINE>long capacityBytes = storagePool.getCapacityBytes();<NEW_LINE>long usedBytes = storagePool.getUsedBytes();<NEW_LINE>long newVolumeSize = volume.getSize();<NEW_LINE>usedBytes += newVolumeSize - oldVolumeSize;<NEW_LINE>storagePool.setUsedBytes(usedBytes > capacityBytes ? capacityBytes : usedBytes);<NEW_LINE>storagePoolDao.update(storagePoolId, storagePool);<NEW_LINE>} catch (Exception e) {<NEW_LINE>String errMsg = "Unable to resize PowerFlex volume: " + volumeInfo.getId() + " due to " + e.getMessage();<NEW_LINE>LOGGER.warn(errMsg);<NEW_LINE>throw new CloudRuntimeException(errMsg, e);<NEW_LINE>}<NEW_LINE>}
long oldVolumeSize = volume.getSize();
1,137,609
public S3DestinationSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>S3DestinationSettings s3DestinationSettings = new S3DestinationSettings();<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("accessControl", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>s3DestinationSettings.setAccessControl(S3DestinationAccessControlJsonUnmarshaller.getInstance<MASK><NEW_LINE>}<NEW_LINE>if (context.testExpression("encryption", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>s3DestinationSettings.setEncryption(S3EncryptionSettingsJsonUnmarshaller.getInstance().unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return s3DestinationSettings;<NEW_LINE>}
().unmarshall(context));
128,671
public static Query<Long> averageSessionLengthPerRegularPlayer(long after, long before, Long threshold) {<NEW_LINE>return database -> {<NEW_LINE>// INNER JOIN limits the users to only those that are regular<NEW_LINE>String selectSessionLengthPerPlayer = SELECT + "p." + SessionsTable.USER_UUID + "," + "p." + SessionsTable.SESSION_END + "-p." + SessionsTable.SESSION_START + " as length" + FROM + SessionsTable.TABLE_NAME + " p" + INNER_JOIN + '(' + selectActivityIndexSQL() + ") q2 on q2." + SessionsTable.USER_UUID + "=p." + SessionsTable.USER_UUID + WHERE + "p." + SessionsTable.SESSION_END + "<=?" + AND + "p." + SessionsTable.SESSION_START + ">=?" + AND + "q2.activity_index>=?" + AND + "q2.activity_index<?";<NEW_LINE>String selectAverage = SELECT + "AVG(length) as average" <MASK><NEW_LINE>return database.query(new QueryStatement<Long>(selectAverage, 100) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void prepare(PreparedStatement statement) throws SQLException {<NEW_LINE>setSelectActivityIndexSQLParameters(statement, 1, threshold, before);<NEW_LINE>statement.setLong(9, before);<NEW_LINE>statement.setLong(10, after);<NEW_LINE>statement.setDouble(11, ActivityIndex.REGULAR);<NEW_LINE>statement.setDouble(12, 5.1);<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Long processResults(ResultSet set) throws SQLException {<NEW_LINE>return set.next() ? (long) set.getDouble("average") : 0;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>};<NEW_LINE>}
+ FROM + '(' + selectSessionLengthPerPlayer + ") q1";
800,509
protected void onPostExecute(Cursor cursor) {<NEW_LINE>if (cursor != null) {<NEW_LINE>Cursor c = null;<NEW_LINE>try {<NEW_LINE>c = cursorAdapter.getCursor();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>cursorAdapter = new TimeLineCursorAdapter(context, cursor, true);<NEW_LINE>try {<NEW_LINE>listView.setAdapter(cursorAdapter);<NEW_LINE>} catch (Exception e) {<NEW_LINE>// database is closed<NEW_LINE>try {<NEW_LINE>DMDataSource.getInstance(context).close();<NEW_LINE>} catch (Exception x) {<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>listView.setVisibility(View.VISIBLE);<NEW_LINE>listView.setStackFromBottom(true);<NEW_LINE>try {<NEW_LINE>c.close();<NEW_LINE>} catch (Exception e) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LinearLayout spinner = (LinearLayout) findViewById(R.id.list_progress);<NEW_LINE>spinner.setVisibility(View.GONE);<NEW_LINE>}
new GetList().execute();
402,609
public ListTagsForCertificateResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListTagsForCertificateResult listTagsForCertificateResult = new ListTagsForCertificateResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return listTagsForCertificateResult;<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("Tags", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>listTagsForCertificateResult.setTags(new ListUnmarshaller<Tag>(TagJsonUnmarshaller.getInstance()).unmarshall(context));<NEW_LINE>}<NEW_LINE>} else if (token == END_ARRAY || token == END_OBJECT) {<NEW_LINE>if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {<NEW_LINE>if (context.getCurrentDepth() <= originalDepth)<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>token = context.nextToken();<NEW_LINE>}<NEW_LINE>return listTagsForCertificateResult;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,751,832
private SchemeGenerator buildSchemeGenerator(ImmutableMap<PBXTarget, Path> targetToProjectPathMap, Path outputDirectory, String schemeName, Optional<PBXTarget> primaryTarget, Optional<XcodeWorkspaceConfigDescriptionArg> schemeConfigArg, ImmutableSet<PBXTarget> orderedBuildTargets, ImmutableSet<PBXTarget> orderedBuildTestTargets, ImmutableSet<PBXTarget> orderedRunTestTargets, Optional<String> runnablePath, Optional<String> remoteRunnablePath, Optional<ImmutableMap<SchemeActionType, PBXTarget>> expandVariablesBasedOn) {<NEW_LINE>Optional<ImmutableMap<SchemeActionType, ImmutableMap<String, String>>> environmentVariables = Optional.empty();<NEW_LINE>Optional<ImmutableMap<SchemeActionType, ImmutableMap<String, String>>> commandLineArguments = Optional.empty();<NEW_LINE>Optional<ImmutableMap<SchemeActionType, ImmutableMap<XCScheme.AdditionalActions, ImmutableList<String>>>> additionalSchemeActions = Optional.empty();<NEW_LINE>XCScheme.LaunchAction.LaunchStyle launchStyle = XCScheme.LaunchAction.LaunchStyle.AUTO;<NEW_LINE>Optional<XCScheme.LaunchAction.WatchInterface> watchInterface = Optional.empty();<NEW_LINE>Optional<String> notificationPayloadFile = Optional.empty();<NEW_LINE>Optional<Boolean> wasCreatedForAppExtension = Optional.empty();<NEW_LINE>Optional<String<MASK><NEW_LINE>Optional<String> applicationRegion = Optional.empty();<NEW_LINE>if (schemeConfigArg.isPresent()) {<NEW_LINE>environmentVariables = schemeConfigArg.get().getEnvironmentVariables();<NEW_LINE>commandLineArguments = schemeConfigArg.get().getCommandLineArguments();<NEW_LINE>additionalSchemeActions = schemeConfigArg.get().getAdditionalSchemeActions();<NEW_LINE>launchStyle = schemeConfigArg.get().getLaunchStyle().orElse(launchStyle);<NEW_LINE>watchInterface = schemeConfigArg.get().getWatchInterface();<NEW_LINE>notificationPayloadFile = schemeConfigArg.get().getNotificationPayloadFile();<NEW_LINE>wasCreatedForAppExtension = schemeConfigArg.get().getWasCreatedForAppExtension();<NEW_LINE>applicationLanguage = schemeConfigArg.get().getApplicationLanguage();<NEW_LINE>applicationRegion = schemeConfigArg.get().getApplicationRegion();<NEW_LINE>}<NEW_LINE>return new SchemeGenerator(rootCell.getFilesystem(), primaryTarget, orderedBuildTargets, orderedBuildTestTargets, orderedRunTestTargets, schemeName, outputDirectory, parallelizeBuild, wasCreatedForAppExtension, runnablePath, remoteRunnablePath, XcodeWorkspaceConfigDescription.getActionConfigNamesFromArg(schemeConfigArg), targetToProjectPathMap, environmentVariables, expandVariablesBasedOn, commandLineArguments, additionalSchemeActions, launchStyle, watchInterface, notificationPayloadFile, applicationLanguage, applicationRegion);<NEW_LINE>}
> applicationLanguage = Optional.empty();
407,214
public void applyWheelTransform() {<NEW_LINE>if (wheelSpatial == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Quaternion localRotationQuat = wheelSpatial.getLocalRotation();<NEW_LINE>Vector3f localLocation = wheelSpatial.getLocalTranslation();<NEW_LINE>if (!applyLocal && wheelSpatial.getParent() != null) {<NEW_LINE>localLocation.set(wheelWorldLocation).subtractLocal(wheelSpatial.<MASK><NEW_LINE>localLocation.divideLocal(wheelSpatial.getParent().getWorldScale());<NEW_LINE>tmp_inverseWorldRotation.set(wheelSpatial.getParent().getWorldRotation()).inverseLocal().multLocal(localLocation);<NEW_LINE>localRotationQuat.set(wheelWorldRotation);<NEW_LINE>tmp_inverseWorldRotation.set(wheelSpatial.getParent().getWorldRotation()).inverseLocal().mult(localRotationQuat, localRotationQuat);<NEW_LINE>wheelSpatial.setLocalTranslation(localLocation);<NEW_LINE>wheelSpatial.setLocalRotation(localRotationQuat);<NEW_LINE>} else {<NEW_LINE>wheelSpatial.setLocalTranslation(wheelWorldLocation);<NEW_LINE>wheelSpatial.setLocalRotation(wheelWorldRotation);<NEW_LINE>}<NEW_LINE>}
getParent().getWorldTranslation());
290,991
private ConcurrentHashMap<String, Boolean> initDbLockStatus(DataSource dataSource) throws SQLException, TddlNestableRuntimeException {<NEW_LINE>Connection connection = null;<NEW_LINE>Statement statement = null;<NEW_LINE>List<Triple> expiredLocks = new ArrayList();<NEW_LINE>ConcurrentHashMap<String, Boolean> tmpReadOnlyCache = new ConcurrentHashMap<>();<NEW_LINE>try {<NEW_LINE>Date now = generateTimeFromDb(dataSource, 0);<NEW_LINE>connection = dataSource.getConnection();<NEW_LINE>statement = connection.createStatement();<NEW_LINE>ResultSet rs = statement.executeQuery(SELECT_ALL_SQL);<NEW_LINE>while (rs.next()) {<NEW_LINE>String database = rs.getString("db_name");<NEW_LINE>String table = rs.getString("tb_name");<NEW_LINE>int status = rs.getInt("status");<NEW_LINE>// check if expired<NEW_LINE>Date expireTime = rs.getTimestamp("expire_time");<NEW_LINE>if (expireTime.before(now)) {<NEW_LINE>expiredLocks.add(new ImmutableTriple<MASK><NEW_LINE>} else {<NEW_LINE>setReadOnlyCache(tmpReadOnlyCache, database, table, status != 0);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} finally {<NEW_LINE>if (statement != null) {<NEW_LINE>statement.close();<NEW_LINE>}<NEW_LINE>if (connection != null) {<NEW_LINE>connection.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// remove expired locks<NEW_LINE>for (Triple triple : expiredLocks) {<NEW_LINE>setDbStatus((String) triple.getLeft(), DbReadOnlyStatus.WRITEABLE, -1, (Date) triple.getRight());<NEW_LINE>}<NEW_LINE>return tmpReadOnlyCache;<NEW_LINE>}
(database, table, expireTime));
1,115,985
public void read(RelationshipGroupRecord record, PageCursor cursor, RecordLoad mode, int recordSize, int recordsPerPage) {<NEW_LINE>// [ , x] in use<NEW_LINE>// [ ,xxx ] high next id bits<NEW_LINE>// [ xxx, ] high firstOut bits<NEW_LINE>long headerByte = cursor.getByte();<NEW_LINE>boolean inUse <MASK><NEW_LINE>record.setInUse(inUse);<NEW_LINE>if (mode.shouldLoad(inUse)) {<NEW_LINE>// [ ,xxx ] high firstIn bits<NEW_LINE>// [ xxx, ] high firstLoop bits<NEW_LINE>long highByte = cursor.getByte();<NEW_LINE>int type = cursor.getShort() & 0xFFFF;<NEW_LINE>long nextLowBits = cursor.getInt() & 0xFFFFFFFFL;<NEW_LINE>long nextOutLowBits = cursor.getInt() & 0xFFFFFFFFL;<NEW_LINE>long nextInLowBits = cursor.getInt() & 0xFFFFFFFFL;<NEW_LINE>long nextLoopLowBits = cursor.getInt() & 0xFFFFFFFFL;<NEW_LINE>long owningNode = (cursor.getInt() & 0xFFFFFFFFL) | (((long) cursor.getByte()) << 32);<NEW_LINE>long nextMod = (headerByte & 0xE) << 31;<NEW_LINE>long nextOutMod = (headerByte & 0x70) << 28;<NEW_LINE>long nextInMod = (highByte & 0xE) << 31;<NEW_LINE>long nextLoopMod = (highByte & 0x70) << 28;<NEW_LINE>record.initialize(inUse, type, BaseRecordFormat.longFromIntAndMod(nextOutLowBits, nextOutMod), BaseRecordFormat.longFromIntAndMod(nextInLowBits, nextInMod), BaseRecordFormat.longFromIntAndMod(nextLoopLowBits, nextLoopMod), owningNode, BaseRecordFormat.longFromIntAndMod(nextLowBits, nextMod));<NEW_LINE>}<NEW_LINE>}
= isInUse((byte) headerByte);
609,898
public LogicalSubQueryPlan buildLogicalQueryPlan(ContextManager contextManager) {<NEW_LINE><MASK><NEW_LINE>LogicalVertex delegateSourceVertex = getInputNode().getOutputVertex();<NEW_LINE>logicalSubQueryPlan.addLogicalVertex(delegateSourceVertex);<NEW_LINE>LogicalVertex filterVertex = delegateSourceVertex;<NEW_LINE>for (TreeNode andTreeNode : andTreeNodeList) {<NEW_LINE>LogicalQueryPlan logicalQueryPlan = new LogicalQueryPlan(contextManager);<NEW_LINE>logicalQueryPlan.addLogicalVertex(filterVertex);<NEW_LINE>filterVertex = TreeNodeUtils.buildFilterTreeNode(andTreeNode, contextManager, logicalQueryPlan, filterVertex, schema);<NEW_LINE>logicalSubQueryPlan.mergeLogicalQueryPlan(logicalQueryPlan);<NEW_LINE>}<NEW_LINE>LogicalVertex outputVertex = logicalSubQueryPlan.getOutputVertex();<NEW_LINE>addUsedLabelAndRequirement(outputVertex, contextManager.getTreeNodeLabelManager());<NEW_LINE>setFinishVertex(outputVertex, contextManager.getTreeNodeLabelManager());<NEW_LINE>return logicalSubQueryPlan;<NEW_LINE>}
LogicalSubQueryPlan logicalSubQueryPlan = new LogicalSubQueryPlan(contextManager);
136,451
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>String clientId = config.getValue("client.clientId", String.class);<NEW_LINE>String clientSecret = config.getValue("client.clientSecret", String.class);<NEW_LINE>JsonObject actualTokenResponse = (JsonObject) request.getSession().getAttribute("tokenResponse");<NEW_LINE>Client client = ClientBuilder.newClient();<NEW_LINE>WebTarget target = client.target(config.getValue("provider.tokenUri", String.class));<NEW_LINE>Form form = new Form();<NEW_LINE>form.param("grant_type", "refresh_token");<NEW_LINE>form.param("refresh_token", actualTokenResponse.getString("refresh_token"));<NEW_LINE>String <MASK><NEW_LINE>if (scope != null && !scope.isEmpty()) {<NEW_LINE>form.param("scope", scope);<NEW_LINE>}<NEW_LINE>Response jaxrsResponse = target.request(MediaType.APPLICATION_JSON_TYPE).header(HttpHeaders.AUTHORIZATION, getAuthorizationHeaderValue(clientId, clientSecret)).post(Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE), Response.class);<NEW_LINE>JsonObject tokenResponse = jaxrsResponse.readEntity(JsonObject.class);<NEW_LINE>if (jaxrsResponse.getStatus() == 200) {<NEW_LINE>request.getSession().setAttribute("tokenResponse", tokenResponse);<NEW_LINE>} else {<NEW_LINE>request.setAttribute("error", tokenResponse.getString("error_description", "error!"));<NEW_LINE>}<NEW_LINE>dispatch("/", request, response);<NEW_LINE>}
scope = request.getParameter("scope");
1,143,882
public static void run() throws IOException {<NEW_LINE>Path outputDir = Paths.get(Objects.requireNonNull(OUTPUT_DIR, "No output dir provided with the 'fabric-api.datagen.output-dir' property"));<NEW_LINE>List<EntrypointContainer<DataGeneratorEntrypoint>> dataGeneratorInitializers = FabricLoader.getInstance().getEntrypointContainers(ENTRYPOINT_KEY, DataGeneratorEntrypoint.class);<NEW_LINE>if (dataGeneratorInitializers.isEmpty()) {<NEW_LINE>LOGGER.warn("No data generator entrypoints are defined. Implement {} and add your class to the '{}' entrypoint key in your fabric.mod.json.", DataGeneratorEntrypoint.class.getName(), ENTRYPOINT_KEY);<NEW_LINE>}<NEW_LINE>for (EntrypointContainer<DataGeneratorEntrypoint> entrypointContainer : dataGeneratorInitializers) {<NEW_LINE>if (MOD_ID_FILTER != null) {<NEW_LINE>if (!entrypointContainer.getProvider().getMetadata().getId().equals(MOD_ID_FILTER)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>LOGGER.info("Running data generator for {}", entrypointContainer.getProvider().getMetadata().getName());<NEW_LINE>FabricDataGenerator dataGenerator = new FabricDataGenerator(outputDir, entrypointContainer.getProvider(), STRICT_VALIDATION);<NEW_LINE>entrypointContainer.<MASK><NEW_LINE>dataGenerator.run();<NEW_LINE>}<NEW_LINE>}
getEntrypoint().onInitializeDataGenerator(dataGenerator);
1,529,415
private Authentication authentication(Map<String, Object> metadata) {<NEW_LINE>byte[] authenticationMetadata = (byte[]) metadata.get("authentication");<NEW_LINE>if (authenticationMetadata == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ByteBuf rawAuthentication <MASK><NEW_LINE>try {<NEW_LINE>rawAuthentication.writeBytes(authenticationMetadata);<NEW_LINE>if (!AuthMetadataCodec.isWellKnownAuthType(rawAuthentication)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>WellKnownAuthType wellKnownAuthType = AuthMetadataCodec.readWellKnownAuthType(rawAuthentication);<NEW_LINE>if (WellKnownAuthType.SIMPLE.equals(wellKnownAuthType)) {<NEW_LINE>return simple(rawAuthentication);<NEW_LINE>}<NEW_LINE>if (WellKnownAuthType.BEARER.equals(wellKnownAuthType)) {<NEW_LINE>return bearer(rawAuthentication);<NEW_LINE>}<NEW_LINE>throw new IllegalArgumentException("Unknown Mime Type " + wellKnownAuthType);<NEW_LINE>} finally {<NEW_LINE>rawAuthentication.release();<NEW_LINE>}<NEW_LINE>}
= ByteBufAllocator.DEFAULT.buffer();
1,516,800
private void sendResponse(final long listingStartTimeNanos, final long deleteStartTimeNanos) {<NEW_LINE>final Exception exception = failure.get();<NEW_LINE>if (exception == null) {<NEW_LINE>final long completionTimeNanos = System.nanoTime();<NEW_LINE>logger.trace("[{}] completed successfully", request.getDescription());<NEW_LINE>listener.onResponse(new Response(transportService.getLocalNode().getId(), transportService.getLocalNode().getName(), request.getRepositoryName(), request.blobCount, request.concurrency, request.readNodeCount, request.earlyReadNodeCount, request.maxBlobSize, request.maxTotalDataSize, request.seed, request.rareActionProbability, blobPath, summary.build(), responses, deleteStartTimeNanos - listingStartTimeNanos, completionTimeNanos - deleteStartTimeNanos));<NEW_LINE>} else {<NEW_LINE>logger.debug(new ParameterizedMessage("analysis of repository [{}] failed", request.repositoryName), exception);<NEW_LINE>listener.onFailure(new RepositoryVerificationException(request.getRepositoryName(), "analysis failed, you may need to manually remove [" <MASK><NEW_LINE>}<NEW_LINE>}
+ blobPath + "]", exception));
243,190
public static DescribeApisByTrafficControlResponse unmarshall(DescribeApisByTrafficControlResponse describeApisByTrafficControlResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeApisByTrafficControlResponse.setRequestId(_ctx.stringValue("DescribeApisByTrafficControlResponse.RequestId"));<NEW_LINE>describeApisByTrafficControlResponse.setTotalCount(_ctx.integerValue("DescribeApisByTrafficControlResponse.TotalCount"));<NEW_LINE>describeApisByTrafficControlResponse.setPageSize(_ctx.integerValue("DescribeApisByTrafficControlResponse.PageSize"));<NEW_LINE>describeApisByTrafficControlResponse.setPageNumber(_ctx.integerValue("DescribeApisByTrafficControlResponse.PageNumber"));<NEW_LINE>List<ApiInfo> apiInfos = new ArrayList<ApiInfo>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeApisByTrafficControlResponse.ApiInfos.Length"); i++) {<NEW_LINE>ApiInfo apiInfo = new ApiInfo();<NEW_LINE>apiInfo.setRegionId(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].RegionId"));<NEW_LINE>apiInfo.setGroupId(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].GroupId"));<NEW_LINE>apiInfo.setGroupName(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].GroupName"));<NEW_LINE>apiInfo.setStageName(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].StageName"));<NEW_LINE>apiInfo.setApiId(_ctx.stringValue<MASK><NEW_LINE>apiInfo.setApiName(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].ApiName"));<NEW_LINE>apiInfo.setDescription(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].Description"));<NEW_LINE>apiInfo.setVisibility(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].Visibility"));<NEW_LINE>apiInfo.setBoundTime(_ctx.stringValue("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].BoundTime"));<NEW_LINE>apiInfos.add(apiInfo);<NEW_LINE>}<NEW_LINE>describeApisByTrafficControlResponse.setApiInfos(apiInfos);<NEW_LINE>return describeApisByTrafficControlResponse;<NEW_LINE>}
("DescribeApisByTrafficControlResponse.ApiInfos[" + i + "].ApiId"));
577,032
public static boolean registryCreateKey(WinReg.HKEY hKey, String keyName, int samDesiredExtra) {<NEW_LINE>HKEYByReference phkResult = new HKEYByReference();<NEW_LINE>IntByReference lpdwDisposition = new IntByReference();<NEW_LINE>int rc = Advapi32.INSTANCE.RegCreateKeyEx(hKey, keyName, 0, null, WinNT.REG_OPTION_NON_VOLATILE, WinNT.KEY_READ | samDesiredExtra, null, phkResult, lpdwDisposition);<NEW_LINE>if (rc != W32Errors.ERROR_SUCCESS) {<NEW_LINE>throw new Win32Exception(rc);<NEW_LINE>}<NEW_LINE>rc = Advapi32.INSTANCE.RegCloseKey(phkResult.getValue());<NEW_LINE>if (rc != W32Errors.ERROR_SUCCESS) {<NEW_LINE>throw new Win32Exception(rc);<NEW_LINE>}<NEW_LINE>return WinNT<MASK><NEW_LINE>}
.REG_CREATED_NEW_KEY == lpdwDisposition.getValue();
904,741
void updateObjective(GraphManager graphMgr) {<NEW_LINE>// TODO: We can refine the branching factor by not strictly considering entity types only<NEW_LINE>double cost;<NEW_LINE>if (isSelfClosure()) {<NEW_LINE>cost = 1;<NEW_LINE>} else if (!to.props().labels().isEmpty()) {<NEW_LINE>cost = graphMgr.schema().stats().subTypesSum(to.props().labels(), true);<NEW_LINE>} else if (!from.props().labels().isEmpty()) {<NEW_LINE>cost = graphMgr.schema().stats().inOwnsMean(from.props().labels(), isKey) * graphMgr.schema().stats().subTypesMean(graphMgr.schema().entityTypes().stream(), true);<NEW_LINE>} else {<NEW_LINE>cost = graphMgr.schema().stats().inOwnsMean(graphMgr.schema().attributeTypes().stream(), isKey) * graphMgr.schema().stats().subTypesMean(graphMgr.schema().entityTypes().stream(), true);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>setObjectiveCoefficient(cost);<NEW_LINE>}
assert !Double.isNaN(cost);
972,403
private void insertDefault(SQLiteDatabase db) {<NEW_LINE>ContentValues screenValues = new ContentValues();<NEW_LINE>screenValues.put(DB_KEY_SCREEN_COLORS, 32);<NEW_LINE>screenValues.put(DB_KEY_SCREEN_RESOLUTION, 1);<NEW_LINE>screenValues.put(DB_KEY_SCREEN_WIDTH, 1024);<NEW_LINE>screenValues.put(DB_KEY_SCREEN_HEIGHT, 768);<NEW_LINE>final long idScreen = db.insert(DB_TABLE_SCREEN, null, screenValues);<NEW_LINE>final long idScreen3g = db.insert(DB_TABLE_SCREEN, null, screenValues);<NEW_LINE>ContentValues performanceValues = new ContentValues();<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_RFX, 1);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_GFX, 1);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_H264, 0);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_WALLPAPER, 0);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_THEME, 0);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_DRAG, 0);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_MENU_ANIMATIONS, 0);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_FONTS, 0);<NEW_LINE>performanceValues.put(DB_KEY_PERFORMANCE_COMPOSITION, 0);<NEW_LINE>final long idPerformance = db.insert(DB_TABLE_PERFORMANCE, null, performanceValues);<NEW_LINE>final long idPerformance3g = db.insert(DB_TABLE_PERFORMANCE, null, performanceValues);<NEW_LINE>ContentValues bookmarkValues = new ContentValues();<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_LABEL, "Test Server");<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_HOSTNAME, "testservice.afreerdp.com");<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_USERNAME, "");<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_PASSWORD, "");<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_DOMAIN, "");<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_PORT, "3389");<NEW_LINE>bookmarkValues.put(DB_KEY_SCREEN_SETTINGS, idScreen);<NEW_LINE>bookmarkValues.put(DB_KEY_SCREEN_SETTINGS_3G, idScreen3g);<NEW_LINE>bookmarkValues.put(DB_KEY_PERFORMANCE_FLAGS, idPerformance);<NEW_LINE>bookmarkValues.put(DB_KEY_PERFORMANCE_FLAGS_3G, idPerformance3g);<NEW_LINE><MASK><NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_REDIRECT_SOUND, 0);<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_REDIRECT_MICROPHONE, 0);<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_SECURITY, 0);<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_REMOTE_PROGRAM, "");<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_WORK_DIR, "");<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_ASYNC_CHANNEL, 1);<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_ASYNC_UPDATE, 1);<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_CONSOLE_MODE, 0);<NEW_LINE>bookmarkValues.put(DB_KEY_BOOKMARK_DEBUG_LEVEL, "INFO");<NEW_LINE>db.insert(DB_TABLE_BOOKMARK, null, bookmarkValues);<NEW_LINE>}
bookmarkValues.put(DB_KEY_BOOKMARK_REDIRECT_SDCARD, 0);
27,019
public void visit(Entry target) {<NEW_LINE>final String property = (String) target.getAttribute("property");<NEW_LINE>if (ResourceController.getResourceController().getBooleanProperty(property, false)) {<NEW_LINE>try {<NEW_LINE>final String keyName = (String) target.getAttribute("actionKey");<NEW_LINE>final AFreeplaneAction existingAction = freeplaneActions.getAction(keyName);<NEW_LINE>final AFreeplaneAction action;<NEW_LINE>if (existingAction != null)<NEW_LINE>action = existingAction;<NEW_LINE>else {<NEW_LINE>final String className = (String) target.getAttribute("actionClass");<NEW_LINE>final Class<?> classDefinition = getClass().<MASK><NEW_LINE>action = (AFreeplaneAction) classDefinition.newInstance();<NEW_LINE>freeplaneActions.addAction(action);<NEW_LINE>}<NEW_LINE>new EntryAccessor().setAction(target, action);<NEW_LINE>return;<NEW_LINE>} catch (Exception e) {<NEW_LINE>LogUtils.severe(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
getClassLoader().loadClass(className);
1,507,703
public static Object startLettuceCommand(Object channel, Object redisCommand) {<NEW_LINE>if (TraceContextManager.isForceDiscarded()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>TraceContext ctx = TraceContextManager.getContext();<NEW_LINE>if (ctx == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (redisCommand instanceof Collection) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (lettuceTracer == null) {<NEW_LINE>lettuceTracer = LettuceTraceFactory.create(channel.getClass().getClassLoader());<NEW_LINE>}<NEW_LINE>String command = lettuceTracer.getCommand(redisCommand);<NEW_LINE>if (command == null)<NEW_LINE>return null;<NEW_LINE>lettuceTracer.startRedis(ctx, channel);<NEW_LINE>String args = lettuceTracer.parseArgs(redisCommand);<NEW_LINE>ParameterizedMessageStep step = new ParameterizedMessageStep();<NEW_LINE>step.start_time = (int) (System.<MASK><NEW_LINE>step.putTempMessage("command", command);<NEW_LINE>step.putTempMessage("args", args);<NEW_LINE>ctx.profile.push(step);<NEW_LINE>return new LocalContext(ctx, step);<NEW_LINE>}
currentTimeMillis() - ctx.startTime);