idx
int32
46
1.86M
input
stringlengths
321
6.6k
target
stringlengths
9
1.24k
998,526
public Project createProjectRefsAndExprs(RelNode projChild, boolean adjust, boolean rightSide, RelNode origProj) {<NEW_LINE>List<RexNode> preserveExprs;<NEW_LINE>int nInputRefs;<NEW_LINE>int offset;<NEW_LINE>if (rightSide) {<NEW_LINE>preserveExprs = rightPreserveExprs;<NEW_LINE>nInputRefs = nRightProject;<NEW_LINE>offset = nSysFields + nFields;<NEW_LINE>} else {<NEW_LINE>preserveExprs = childPreserveExprs;<NEW_LINE>nInputRefs = nProject;<NEW_LINE>offset = nSysFields;<NEW_LINE>}<NEW_LINE>int refIdx = offset - 1;<NEW_LINE>List<Pair<RexNode, String>> newProjects = new ArrayList<>();<NEW_LINE>List<RelDataTypeField> destFields = projChild.getRowType().getFieldList();<NEW_LINE>List<String> fieldNames = origProj.getRowType().getFieldNames();<NEW_LINE>// creating map of aliases and column refs<NEW_LINE>HashMap<Integer, String> fieldsMap = new HashMap<Integer, String>();<NEW_LINE>for (int i = 0; i < nInputRefs; i++) {<NEW_LINE>if (i < origProj.getChildExps().size()) {<NEW_LINE>fieldsMap.put(origProj.getChildExps().get(i).hashCode(), fieldNames.get(i));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// add on the input references<NEW_LINE>for (int i = 0; i < nInputRefs; i++) {<NEW_LINE>refIdx = projRefs.nextSetBit(refIdx + 1);<NEW_LINE>assert refIdx >= 0;<NEW_LINE>final RelDataTypeField destField = destFields.get(refIdx - offset);<NEW_LINE>newProjects.add(Pair.of(rexBuilder.makeInputRef(destField.getType(), refIdx - offset), fieldsMap.get(refIdx - offset)));<NEW_LINE>}<NEW_LINE>// add on the expressions that need to be preserved, converting the<NEW_LINE>// arguments to reference the projected columns (if necessary)<NEW_LINE>int[] adjustments = {};<NEW_LINE>if ((preserveExprs.size() > 0) && adjust) {<NEW_LINE>adjustments = new int[childFields.size()];<NEW_LINE>for (int idx = offset; idx < childFields.size(); idx++) {<NEW_LINE>adjustments[idx] = -offset;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>for (RexNode projExpr : preserveExprs) {<NEW_LINE>RexNode newExpr;<NEW_LINE>if (adjust) {<NEW_LINE>newExpr = projExpr.accept(new RelOptUtil.RexInputConverter(rexBuilder, childFields, destFields, adjustments));<NEW_LINE>} else {<NEW_LINE>newExpr = projExpr;<NEW_LINE>}<NEW_LINE>newProjects.add(Pair.of(newExpr, ((RexCall) projExpr).getOperator().getName()));<NEW_LINE>}<NEW_LINE>return (Project) relBuilder.push(projChild).projectNamed(Pair.left(newProjects), Pair.right(newProjects<MASK><NEW_LINE>}
), true).build();
208,470
public void gen(TreeElement t) {<NEW_LINE>// save AST cursor<NEW_LINE>println("__t" + t.ID + " as AST " + " = _t");<NEW_LINE>// If there is a label on the root, then assign that to the variable<NEW_LINE>if (t.root.getLabel() != null) {<NEW_LINE>println(t.root.getLabel() + " = (ASTNULL == _t) ? null : cast(" + labeledElementASTType + ", _t)");<NEW_LINE>}<NEW_LINE>// check for invalid modifiers ! and ^ on tree element roots<NEW_LINE>if (t.root.getAutoGenType() == GrammarElement.AUTO_GEN_BANG) {<NEW_LINE>antlrTool.error("Suffixing a root node with '!' is not implemented", grammar.getFilename(), t.getLine(), t.getColumn());<NEW_LINE>t.root.setAutoGenType(GrammarElement.AUTO_GEN_NONE);<NEW_LINE>}<NEW_LINE>if (t.root.getAutoGenType() == GrammarElement.AUTO_GEN_CARET) {<NEW_LINE>antlrTool.warning("Suffixing a root node with '^' is redundant; already a root", grammar.getFilename(), t.getLine(), t.getColumn());<NEW_LINE>t.root.setAutoGenType(GrammarElement.AUTO_GEN_NONE);<NEW_LINE>}<NEW_LINE>// Generate AST variables<NEW_LINE>genElementAST(t.root);<NEW_LINE>if (grammar.buildAST) {<NEW_LINE>// Save the AST construction state<NEW_LINE>println("__currentAST" + t.ID + " as ASTPair = currentAST.copy()");<NEW_LINE>// Make the next item added a child of the TreeElement root<NEW_LINE>println("currentAST.root = currentAST.child");<NEW_LINE>println("currentAST.child = null");<NEW_LINE>}<NEW_LINE>// match root<NEW_LINE>if (t.root instanceof WildcardElement) {<NEW_LINE>println("raise MismatchedTokenException() if _t is null");<NEW_LINE>} else {<NEW_LINE>genMatch(t.root);<NEW_LINE>}<NEW_LINE>// move to list of children<NEW_LINE>println("_t = _t.getFirstChild()");<NEW_LINE>// walk list of children, generating code for each<NEW_LINE>for (int i = 0; i < t.getAlternatives().size(); i++) {<NEW_LINE>Alternative a = t.getAlternativeAt(i);<NEW_LINE>AlternativeElement e = a.head;<NEW_LINE>while (e != null) {<NEW_LINE>e.generate();<NEW_LINE>e = e.next;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (grammar.buildAST) {<NEW_LINE>// restore the AST construction state to that just after the<NEW_LINE>// tree root was added<NEW_LINE>println("ASTPair.PutInstance(currentAST)");<NEW_LINE>println("currentAST = __currentAST" + t.ID);<NEW_LINE>}<NEW_LINE>// restore AST cursor<NEW_LINE><MASK><NEW_LINE>// move cursor to sibling of tree just parsed<NEW_LINE>println("_t = _t.getNextSibling()");<NEW_LINE>}
println("_t = __t" + t.ID);
1,732,829
public void visitValue(PValue value, Node producer) {<NEW_LINE>for (Entry<ProjectionProducer<PTransform<?, ?>>, Map<PCollection<?>, FieldAccessDescriptor>> entry : pCollFieldAccess.entrySet()) {<NEW_LINE>FieldAccessDescriptor fieldAccess = entry.getValue().get(value);<NEW_LINE>if (fieldAccess == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>BiMap<PCollection<?>, TupleTag<?>> outputs = ImmutableBiMap.copyOf(producer.getOutputs()).inverse();<NEW_LINE>TupleTag<?> tag = outputs.get(value);<NEW_LINE>Preconditions.checkArgumentNotNull(<MASK><NEW_LINE>ImmutableMap.Builder<TupleTag<?>, FieldAccessDescriptor> tagEntryBuilder = tagFieldAccess.build().get(entry.getKey());<NEW_LINE>if (tagEntryBuilder == null) {<NEW_LINE>tagEntryBuilder = ImmutableMap.builder();<NEW_LINE>tagFieldAccess.put(entry.getKey(), tagEntryBuilder);<NEW_LINE>}<NEW_LINE>tagEntryBuilder.put(tag, fieldAccess);<NEW_LINE>}<NEW_LINE>}
tag, "PCollection %s not found in outputs of producer %s", value, producer);
1,305,294
public void process(JCas jcas) throws AnalysisEngineProcessException {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>resultView = jcas.getView("Result");<NEW_LINE>passagesView = jcas.getView("Passages");<NEW_LINE>jcas.createView("PickedPassages");<NEW_LINE>questionView = jcas.getView("Question");<NEW_LINE>pickedPassagesView = jcas.getView("PickedPassages");<NEW_LINE>} catch (CASException e) {<NEW_LINE>throw new AnalysisEngineProcessException(e);<NEW_LINE>}<NEW_LINE>pickedPassagesView.setDocumentText(passagesView.getDocumentText());<NEW_LINE>pickedPassagesView.setDocumentLanguage(passagesView.getDocumentLanguage());<NEW_LINE>int sourceID = JCasUtil.selectSingle(resultView, ResultInfo.class).getSourceID();<NEW_LINE>FSIndex idx = passagesView.getJFSIndexRepository().getIndex("SortedPassages");<NEW_LINE>FSIterator passages = idx.iterator();<NEW_LINE>int i = 0;<NEW_LINE>CasCopier copier = new CasCopier(passagesView.getCas(), pickedPassagesView.getCas());<NEW_LINE>while (passages.hasNext() && i++ < numPicked) {<NEW_LINE>Passage passage = (Passage) passages.next();<NEW_LINE>AnsweringPassage ap = new AnsweringPassage(SnippetIDGenerator.getInstance().generateID(), sourceID, passage.getCoveredText());<NEW_LINE>QuestionDashboard.getInstance().get(questionView).addSnippet(ap);<NEW_LINE>Passage p2 = (Passage) copier.copyFs(passage);<NEW_LINE>p2.setSnippetID(ap.getSnippetID());<NEW_LINE>p2.addToIndexes();<NEW_LINE>for (Annotation a : covering.get(passage)) {<NEW_LINE>if (!copier.alreadyCopied(a)) {<NEW_LINE>Annotation a2 = (Annotation) copier.copyFs(a);<NEW_LINE>a2.addToIndexes();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int n_tokens = JCasUtil.selectCovered(Token.class, passage).size();<NEW_LINE>logger.debug(passage.getScore() + " | " + passage.getCoveredText() + " | " + n_tokens);<NEW_LINE>}<NEW_LINE>}
JCas resultView, passagesView, pickedPassagesView, questionView;
955,856
public static boolean openPageByUrl(Context context, String url, Map params, int requestCode) {<NEW_LINE>String path = url.split("\\?")[0];<NEW_LINE>Log.i("openPageByUrl", path);<NEW_LINE>try {<NEW_LINE>if (pageName.containsKey(path)) {<NEW_LINE>Intent intent = FlutterActivity.createDefaultIntent(context);<NEW_LINE>if (context instanceof Activity) {<NEW_LINE>Activity activity = (Activity) context;<NEW_LINE>activity.startActivityForResult(intent, requestCode);<NEW_LINE>} else {<NEW_LINE>context.startActivity(intent);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} else if (url.startsWith(FLUTTER_FRAGMENT_PAGE_URL)) {<NEW_LINE>context.startActivity(new Intent<MASK><NEW_LINE>return true;<NEW_LINE>} else if (url.startsWith(NATIVE_PAGE_URL)) {<NEW_LINE>context.startActivity(new Intent(context, NativePageActivity.class));<NEW_LINE>return true;<NEW_LINE>} else if (url.startsWith(FLUTTER_CUSTOM_VIEW_URL)) {<NEW_LINE>context.startActivity(new Intent(context, TabCustomViewActivity.class));<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>return false;<NEW_LINE>} catch (Throwable t) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>}
(context, TabMainActivity.class));
854,427
private void handleColorCommand(Command command) {<NEW_LINE>if (command instanceof HSBType) {<NEW_LINE>setColor((HSBType) command);<NEW_LINE>setBrightness(((HSBType) command).getBrightness());<NEW_LINE>} else if (command instanceof OnOffType) {<NEW_LINE>setState(((OnOffType) command));<NEW_LINE>} else if (command instanceof PercentType) {<NEW_LINE>// PaperUI sends PercentType on color channel when changing Brightness<NEW_LINE>setBrightness((PercentType) command);<NEW_LINE>} else if (command instanceof IncreaseDecreaseType) {<NEW_LINE>// increase or decrease only the brightness, but keep color<NEW_LINE>if (state != null && state.getBrightness() != null) {<NEW_LINE>int current = state.getBrightness().intValue();<NEW_LINE>if (IncreaseDecreaseType.INCREASE.equals(command)) {<NEW_LINE>setBrightness(new PercentType(Math.min(current + STEP, PercentType.HUNDRED.intValue())));<NEW_LINE>} else {<NEW_LINE>setBrightness(new PercentType(Math.max(current - STEP, PercentType.<MASK><NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.debug("Cannot handle inc/dec for color as current brightness is not known.");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>logger.debug("Can't handle command {} on channel {}", command, CHANNEL_COLOR);<NEW_LINE>}<NEW_LINE>}
ZERO.intValue())));
1,750,906
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/fake/outer/number";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, String> localVarCookieParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "*/*" };<NEW_LINE>final String <MASK><NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] {};<NEW_LINE>TypeReference<BigDecimal> localVarReturnType = new TypeReference<BigDecimal>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
1,622,654
public static SparseVector predictSparseVector(String content, double minTF, HashMap<String, Tuple2<Integer, Double>> wordIdWeight, FeatureType featureType, int featureNum) {<NEW_LINE>HashMap<String, Integer> wordCount = new HashMap<>(0);<NEW_LINE>String[] tokens = content.split(NLPConstant.WORD_DELIMITER);<NEW_LINE>double minTermCount = minTF >= 1.0 ? minTF : minTF * tokens.length;<NEW_LINE>double tokenRatio = 1.0 / tokens.length;<NEW_LINE>for (String token : tokens) {<NEW_LINE>if (wordIdWeight.containsKey(token)) {<NEW_LINE>wordCount.merge(token, 1, Integer::sum);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>int[] indexes = new int[wordCount.size()];<NEW_LINE>double[] values = new double[indexes.length];<NEW_LINE>int pos = 0;<NEW_LINE>for (Map.Entry<String, Integer> entry : wordCount.entrySet()) {<NEW_LINE>double count = entry.getValue();<NEW_LINE>if (count >= minTermCount) {<NEW_LINE>Tuple2<Integer, Double> idWeight = wordIdWeight.<MASK><NEW_LINE>indexes[pos] = idWeight.f0;<NEW_LINE>values[pos++] = featureType.featureValueFunc.apply(idWeight.f1, count, tokenRatio);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return new SparseVector(featureNum, Arrays.copyOf(indexes, pos), Arrays.copyOf(values, pos));<NEW_LINE>}
get(entry.getKey());
389,663
final DescribeEventsResult executeDescribeEvents(DescribeEventsRequest describeEventsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeEventsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeEventsRequest> request = null;<NEW_LINE>Response<DescribeEventsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeEventsRequestMarshaller().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, "Redshift");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeEvents");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeEventsResult> responseHandler = new StaxResponseHandler<DescribeEventsResult>(new DescribeEventsResultStaxUnmarshaller());<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(describeEventsRequest));
873,757
public void markStoreCorrupted(IOException exception) throws IOException {<NEW_LINE>ensureOpen();<NEW_LINE>if (!isMarkedCorrupted()) {<NEW_LINE>final String corruptionMarkerName = CORRUPTED_MARKER_NAME_PREFIX + UUIDs.randomBase64UUID();<NEW_LINE>try (IndexOutput output = this.directory().createOutput(corruptionMarkerName, IOContext.DEFAULT)) {<NEW_LINE>CodecUtil.writeHeader(output, CODEC, CORRUPTED_MARKER_CODEC_VERSION);<NEW_LINE>BytesStreamOutput out = new BytesStreamOutput();<NEW_LINE>out.writeException(exception);<NEW_LINE>BytesReference bytes = out.bytes();<NEW_LINE>output.writeVInt(bytes.length());<NEW_LINE><MASK><NEW_LINE>output.writeBytes(ref.bytes, ref.offset, ref.length);<NEW_LINE>CodecUtil.writeFooter(output);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>logger.warn("Can't mark store as corrupted", ex);<NEW_LINE>}<NEW_LINE>directory().sync(Collections.singleton(corruptionMarkerName));<NEW_LINE>}<NEW_LINE>}
BytesRef ref = bytes.toBytesRef();
172,160
public void receive(IMessage message) {<NEW_LINE>if (message instanceof LJ1200Message) {<NEW_LINE>LJ1200Message lj = (LJ1200Message) message;<NEW_LINE>if (lj.isValid()) {<NEW_LINE>String address = lj.getAddress();<NEW_LINE>mAddresses.add(address);<NEW_LINE>MutableIdentifierCollection ic = new MutableIdentifierCollection(getIdentifierCollection().getIdentifiers());<NEW_LINE>ic.remove(IdentifierClass.USER);<NEW_LINE>ic.update(lj.getIdentifiers());<NEW_LINE>DecodeEvent event = DecodeEvent.builder(System.currentTimeMillis()).identifiers(ic).channel(getCurrentChannel()).details("LOJACK").eventDescription(lj.toString()).build();<NEW_LINE>broadcast(event);<NEW_LINE>broadcast(new DecoderStateEvent(this, Event.DECODE, State.DATA));<NEW_LINE>}<NEW_LINE>} else if (message instanceof LJ1200TransponderMessage) {<NEW_LINE>LJ1200TransponderMessage transponder = (LJ1200TransponderMessage) message;<NEW_LINE>MutableIdentifierCollection ic = new MutableIdentifierCollection(<MASK><NEW_LINE>ic.remove(IdentifierClass.USER);<NEW_LINE>ic.update(transponder.getIdentifiers());<NEW_LINE>DecodeEvent transponderEvent = DecodeEvent.builder(System.currentTimeMillis()).identifiers(ic).channel(getCurrentChannel()).details("LOJACK TRANSPONDER").eventDescription(transponder.toString()).build();<NEW_LINE>broadcast(transponderEvent);<NEW_LINE>}<NEW_LINE>}
getIdentifierCollection().getIdentifiers());
1,270,067
public void marshall(AwsEc2VpnConnectionDetails awsEc2VpnConnectionDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsEc2VpnConnectionDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(<MASK><NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getState(), STATE_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getCustomerGatewayId(), CUSTOMERGATEWAYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getCustomerGatewayConfiguration(), CUSTOMERGATEWAYCONFIGURATION_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getType(), TYPE_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getVpnGatewayId(), VPNGATEWAYID_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getCategory(), CATEGORY_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getVgwTelemetry(), VGWTELEMETRY_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getOptions(), OPTIONS_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getRoutes(), ROUTES_BINDING);<NEW_LINE>protocolMarshaller.marshall(awsEc2VpnConnectionDetails.getTransitGatewayId(), TRANSITGATEWAYID_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
awsEc2VpnConnectionDetails.getVpnConnectionId(), VPNCONNECTIONID_BINDING);
212,125
private void startImportOperation(@ImportType int backupType, Uri uri) {<NEW_LINE>// Start batch ops service<NEW_LINE>Intent intent = new Intent(activity, BatchOpsService.class);<NEW_LINE>BatchOpsManager.Result input = new BatchOpsManager.Result(Collections.emptyList());<NEW_LINE>intent.putStringArrayListExtra(BatchOpsService.EXTRA_OP_PKG, input.getFailedPackages());<NEW_LINE>intent.putIntegerArrayListExtra(BatchOpsService.EXTRA_OP_USERS, input.getAssociatedUserHandles());<NEW_LINE>intent.putExtra(BatchOpsService.EXTRA_OP, BatchOpsManager.OP_IMPORT_BACKUPS);<NEW_LINE>Bundle args = new Bundle();<NEW_LINE>args.putInt(BatchOpsManager.ARG_BACKUP_TYPE, backupType);<NEW_LINE>args.putParcelable(BatchOpsManager.ARG_URI, uri);<NEW_LINE>intent.putExtra(BatchOpsService.EXTRA_OP_EXTRA_ARGS, args);<NEW_LINE><MASK><NEW_LINE>}
ContextCompat.startForegroundService(activity, intent);
1,346,652
// TODO Tracked in https://github.com/ankidroid/Anki-Android/issues/5019<NEW_LINE>@SuppressWarnings("deprecation")<NEW_LINE>protected void buildLists() {<NEW_LINE>android.preference.ListPreference deckConfPref = (android.preference.ListPreference) findPreference("deckConf");<NEW_LINE>List<DeckConfig> confs = mCol.getDecks().allConf();<NEW_LINE>Collections.sort(confs, NamedJSONComparator.INSTANCE);<NEW_LINE>String[] confValues = new String[confs.size()];<NEW_LINE>String[] confLabels = new String[confs.size()];<NEW_LINE>for (int i = 0; i < confs.size(); i++) {<NEW_LINE>DeckConfig o = confs.get(i);<NEW_LINE>confValues[i] = o.getString("id");<NEW_LINE>confLabels[i] = o.getString("name");<NEW_LINE>}<NEW_LINE>deckConfPref.setEntries(confLabels);<NEW_LINE>deckConfPref.setEntryValues(confValues);<NEW_LINE>deckConfPref.setValue(mPref.getString("deckConf", "0"));<NEW_LINE>android.preference.ListPreference newOrderPref = (android.preference.ListPreference) findPreference("newOrder");<NEW_LINE>newOrderPref.setEntries(R.array.new_order_labels);<NEW_LINE>newOrderPref.<MASK><NEW_LINE>newOrderPref.setValue(mPref.getString("newOrder", "0"));<NEW_LINE>android.preference.ListPreference leechActPref = (android.preference.ListPreference) findPreference("lapLeechAct");<NEW_LINE>leechActPref.setEntries(R.array.leech_action_labels);<NEW_LINE>leechActPref.setEntryValues(R.array.leech_action_values);<NEW_LINE>leechActPref.setValue(mPref.getString("lapLeechAct", Integer.toString(Consts.LEECH_SUSPEND)));<NEW_LINE>}
setEntryValues(R.array.new_order_values);
316,771
public static int difference(@Nonnull String s1, @Nonnull String s2) {<NEW_LINE>int[][] a = new int[s1.length()][s2.length()];<NEW_LINE>for (int i = 0; i < s1.length(); i++) {<NEW_LINE>a[i][0] = i;<NEW_LINE>}<NEW_LINE>for (int j = 0; j < s2.length(); j++) {<NEW_LINE>a[0][j] = j;<NEW_LINE>}<NEW_LINE>for (int i = 1; i < s1.length(); i++) {<NEW_LINE>for (int j = 1; j < s2.length(); j++) {<NEW_LINE>a[i][j] = Math.min(Math.min(a[i - 1][j - 1] + (s1.charAt(i) == s2.charAt(j) ? 0 : 1), a[i - 1][j] + 1), a[i][j - 1] + 1);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return a[s1.length() - 1][<MASK><NEW_LINE>}
s2.length() - 1];
5,988
private ByteBuffer generateLineRendering(HashMapVirtualObject ifcProduct, IntBuffer indicesAsInt, DoubleBuffer verticesAsDouble, FloatBuffer normalsAsFloat, float margin) {<NEW_LINE>Set<ComplexLine> lines = new TreeSet<>();<NEW_LINE>for (int i = 0; i < indicesAsInt.capacity(); i += 3) {<NEW_LINE>for (int j = 0; j < 3; j++) {<NEW_LINE>int index1 = <MASK><NEW_LINE>int index2 = indicesAsInt.get(i + (j + 1) % 3);<NEW_LINE>ComplexLine line = new ComplexLine(index1, index2, verticesAsDouble, normalsAsFloat, margin);<NEW_LINE>if (lines.contains(line)) {<NEW_LINE>lines.remove(line);<NEW_LINE>} else {<NEW_LINE>lines.add(line);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ComplexLine lastLine = null;<NEW_LINE>int size = 0;<NEW_LINE>for (ComplexLine line : lines) {<NEW_LINE>if (lastLine != null && Arrays.equals(lastLine.getV1(), line.getV1()) && Arrays.equals(lastLine.getV2(), line.getV2())) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>lastLine = line;<NEW_LINE>size++;<NEW_LINE>}<NEW_LINE>ByteBuffer byteBuffer = ByteBuffer.allocate(size * 2 * 4).order(ByteOrder.LITTLE_ENDIAN);<NEW_LINE>IntBuffer newIndices = byteBuffer.asIntBuffer();<NEW_LINE>for (ComplexLine line : lines) {<NEW_LINE>if (Arrays.equals(lastLine.getV1(), line.getV1()) && Arrays.equals(lastLine.getV2(), line.getV2())) {<NEW_LINE>// Only one line needs to be drawn in the end, regardless of the normal<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>newIndices.put(line.getIndex1());<NEW_LINE>newIndices.put(line.getIndex2());<NEW_LINE>lastLine = line;<NEW_LINE>// System.out.println(line);<NEW_LINE>}<NEW_LINE>return byteBuffer;<NEW_LINE>}
indicesAsInt.get(i + j);
1,810,977
private void checkProbe() {<NEW_LINE>MatOfDouble pMean = new MatOfDouble();<NEW_LINE>MatOfDouble pStdDev = new MatOfDouble();<NEW_LINE>Core.meanStdDev(probe, pMean, pStdDev);<NEW_LINE>double min = 0.00001;<NEW_LINE>isPlainColor = false;<NEW_LINE>double sum = 0.0;<NEW_LINE>double[] arr = pStdDev.toArray();<NEW_LINE>for (int i = 0; i < arr.length; i++) {<NEW_LINE>sum += arr[i];<NEW_LINE>}<NEW_LINE>if (sum < min) {<NEW_LINE>isPlainColor = true;<NEW_LINE>}<NEW_LINE>sum = 0.0;<NEW_LINE>arr = pMean.toArray();<NEW_LINE>for (int i = 0; i < arr.length; i++) {<NEW_LINE>sum += arr[i];<NEW_LINE>}<NEW_LINE>if (sum < min && isPlainColor) {<NEW_LINE>isBlack = true;<NEW_LINE>}<NEW_LINE>resizeFactor = Math.min(((double) probe.width()) / resizeMinDownSample, ((double) probe.height()) / resizeMinDownSample);<NEW_LINE>resizeFactor = <MASK><NEW_LINE>}
Math.max(1.0, resizeFactor);
1,488,490
public static DescribeTopDomainsByFlowResponse unmarshall(DescribeTopDomainsByFlowResponse describeTopDomainsByFlowResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeTopDomainsByFlowResponse.setRequestId(_ctx.stringValue("DescribeTopDomainsByFlowResponse.RequestId"));<NEW_LINE>describeTopDomainsByFlowResponse.setStartTime(_ctx.stringValue("DescribeTopDomainsByFlowResponse.StartTime"));<NEW_LINE>describeTopDomainsByFlowResponse.setEndTime(_ctx.stringValue("DescribeTopDomainsByFlowResponse.EndTime"));<NEW_LINE>describeTopDomainsByFlowResponse.setDomainCount(_ctx.longValue("DescribeTopDomainsByFlowResponse.DomainCount"));<NEW_LINE>describeTopDomainsByFlowResponse.setDomainOnlineCount(_ctx.longValue("DescribeTopDomainsByFlowResponse.DomainOnlineCount"));<NEW_LINE>List<TopDomain> topDomains = new ArrayList<TopDomain>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeTopDomainsByFlowResponse.TopDomains.Length"); i++) {<NEW_LINE>TopDomain topDomain = new TopDomain();<NEW_LINE>topDomain.setDomainName(_ctx.stringValue("DescribeTopDomainsByFlowResponse.TopDomains[" + i + "].DomainName"));<NEW_LINE>topDomain.setRank(_ctx.longValue("DescribeTopDomainsByFlowResponse.TopDomains[" + i + "].Rank"));<NEW_LINE>topDomain.setTotalTraffic(_ctx.stringValue<MASK><NEW_LINE>topDomain.setTrafficPercent(_ctx.stringValue("DescribeTopDomainsByFlowResponse.TopDomains[" + i + "].TrafficPercent"));<NEW_LINE>topDomain.setMaxBps(_ctx.floatValue("DescribeTopDomainsByFlowResponse.TopDomains[" + i + "].MaxBps"));<NEW_LINE>topDomain.setMaxBpsTime(_ctx.stringValue("DescribeTopDomainsByFlowResponse.TopDomains[" + i + "].MaxBpsTime"));<NEW_LINE>topDomain.setTotalAccess(_ctx.longValue("DescribeTopDomainsByFlowResponse.TopDomains[" + i + "].TotalAccess"));<NEW_LINE>topDomains.add(topDomain);<NEW_LINE>}<NEW_LINE>describeTopDomainsByFlowResponse.setTopDomains(topDomains);<NEW_LINE>return describeTopDomainsByFlowResponse;<NEW_LINE>}
("DescribeTopDomainsByFlowResponse.TopDomains[" + i + "].TotalTraffic"));
1,322,020
private static CardMessage.Builder from(MessagesProto.CardMessage in) {<NEW_LINE>CardMessage.Builder builder = CardMessage.builder();<NEW_LINE>if (in.hasTitle()) {<NEW_LINE>builder.setTitle(decode(in.getTitle()));<NEW_LINE>}<NEW_LINE>if (in.hasBody()) {<NEW_LINE>builder.setBody(decode(in.getBody()));<NEW_LINE>}<NEW_LINE>if (!TextUtils.isEmpty(in.getBackgroundHexColor())) {<NEW_LINE>builder.setBackgroundHexColor(in.getBackgroundHexColor());<NEW_LINE>}<NEW_LINE>if (in.hasPrimaryAction() || in.hasPrimaryActionButton()) {<NEW_LINE>builder.setPrimaryAction(decode(in.getPrimaryAction()<MASK><NEW_LINE>}<NEW_LINE>if (in.hasSecondaryAction() || in.hasSecondaryActionButton()) {<NEW_LINE>builder.setSecondaryAction(decode(in.getSecondaryAction(), in.getSecondaryActionButton()));<NEW_LINE>}<NEW_LINE>if (!TextUtils.isEmpty(in.getPortraitImageUrl())) {<NEW_LINE>builder.setPortraitImageData(ImageData.builder().setImageUrl(in.getPortraitImageUrl()).build());<NEW_LINE>}<NEW_LINE>if (!TextUtils.isEmpty(in.getLandscapeImageUrl())) {<NEW_LINE>builder.setLandscapeImageData(ImageData.builder().setImageUrl(in.getLandscapeImageUrl()).build());<NEW_LINE>}<NEW_LINE>return builder;<NEW_LINE>}
, in.getPrimaryActionButton()));
186,792
private static CEntryPointData create(String providedName, Supplier<String> alternativeNameSupplier, Class<? extends Function<String, String>> nameTransformation, String documentation, Builtin builtin, Class<?> prologue, Class<?> prologueBailout, Class<?> epilogue, Class<?> exceptionHandler, Publish publishAs) {<NEW_LINE>// Delay generating the final symbol name because this method may be called early at a time<NEW_LINE>// where some of the environment (such as ImageSingletons) is incomplete<NEW_LINE>Supplier<String> symbolNameSupplier = () -> {<NEW_LINE>String symbolName = !providedName.isEmpty() ? providedName : alternativeNameSupplier.get();<NEW_LINE>if (nameTransformation != null) {<NEW_LINE>try {<NEW_LINE>Function<String, String> instance = nameTransformation<MASK><NEW_LINE>symbolName = instance.apply(symbolName);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw VMError.shouldNotReachHere(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return symbolName;<NEW_LINE>};<NEW_LINE>return new CEntryPointData(symbolNameSupplier, providedName, documentation, builtin, prologue, prologueBailout, epilogue, exceptionHandler, publishAs);<NEW_LINE>}
.getDeclaredConstructor().newInstance();
1,174,182
protected void parse(Object obj) throws JSONException {<NEW_LINE>Logger.T(TAG, "parse: " + ((obj == null) ? "<null>" : obj.getClass().getSimpleName()));<NEW_LINE>if (Map.class.isInstance(obj)) {<NEW_LINE>Logger.T(TAG, "Parsing Map instance >>>");<NEW_LINE>parseMap((Map<String, ?>) obj);<NEW_LINE>Logger.T(TAG, "Finishing Map instance <<<");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (Collection.class.isInstance(obj)) {<NEW_LINE>Logger.T(TAG, "Parsing Collection instance >>>");<NEW_LINE>parseCollection(<MASK><NEW_LINE>Logger.T(TAG, "Finishing Collection instance <<<");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (Bundle.class.isInstance(obj)) {<NEW_LINE>Logger.T(TAG, "Parsing Bundle instance >>>");<NEW_LINE>parseBundle((Bundle) obj);<NEW_LINE>Logger.T(TAG, "Finishing Bundle instance <<<");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mStringer.value(obj);<NEW_LINE>}
(Collection<?>) obj);
1,723,638
public void apply(IntrinsicContext context, InvocationExpr invocation) {<NEW_LINE>switch(invocation.getMethod().getName()) {<NEW_LINE>case "fillZero":<NEW_LINE>context.includes().addInclude("<string.h>");<NEW_LINE>context.writer().print("memset(");<NEW_LINE>context.emit(invocation.getArguments().get(0));<NEW_LINE>context.writer().print(", 0, ");<NEW_LINE>context.emit(invocation.getArguments().get(1));<NEW_LINE>context.writer().print(")");<NEW_LINE>break;<NEW_LINE>case "fill":<NEW_LINE>context.includes().addInclude("<string.h>");<NEW_LINE>context.writer().print("memset(");<NEW_LINE>context.emit(invocation.getArguments().get(0));<NEW_LINE>context.writer().print(", ");<NEW_LINE>context.emit(invocation.getArguments().get(1));<NEW_LINE>context.writer().print(", ");<NEW_LINE>context.emit(invocation.getArguments().get(2));<NEW_LINE>context.writer().print(")");<NEW_LINE>break;<NEW_LINE>case "moveMemoryBlock":<NEW_LINE>context.includes().addInclude("<string.h>");<NEW_LINE>context.writer().print("memmove(");<NEW_LINE>context.emit(invocation.getArguments().get(1));<NEW_LINE>context.<MASK><NEW_LINE>context.emit(invocation.getArguments().get(0));<NEW_LINE>context.writer().print(", ");<NEW_LINE>context.emit(invocation.getArguments().get(2));<NEW_LINE>context.writer().print(")");<NEW_LINE>break;<NEW_LINE>case "isInitialized":<NEW_LINE>context.writer().print("(((TeaVM_Class *) ");<NEW_LINE>context.emit(invocation.getArguments().get(0));<NEW_LINE>context.writer().print(")->").print(context.names().forMemberField(FLAGS_FIELD)).print(" & INT32_C(" + RuntimeClass.INITIALIZED + "))");<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}
writer().print(", ");
341,807
final GetTrafficPolicyInstanceCountResult executeGetTrafficPolicyInstanceCount(GetTrafficPolicyInstanceCountRequest getTrafficPolicyInstanceCountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTrafficPolicyInstanceCountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetTrafficPolicyInstanceCountRequest> request = null;<NEW_LINE>Response<GetTrafficPolicyInstanceCountResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new GetTrafficPolicyInstanceCountRequestMarshaller().marshall(super.beforeMarshalling(getTrafficPolicyInstanceCountRequest));<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, "Route 53");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "GetTrafficPolicyInstanceCount");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<GetTrafficPolicyInstanceCountResult> responseHandler = new StaxResponseHandler<GetTrafficPolicyInstanceCountResult>(new GetTrafficPolicyInstanceCountResultStaxUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
957,621
private Map<String, Set<IFile>> buildPrimaryFqnToFilesMap() {<NEW_LINE>Map<String, Set<IFile>> primaryFqnToFiles = new HashMap<>();<NEW_LINE>Map<String, FqnCache<IFile>> extensionCaches = getModule().getPathCache().getExtensionCaches();<NEW_LINE>for (Map.Entry<String, FqnCache<IFile>> entry : extensionCaches.entrySet()) {<NEW_LINE><MASK><NEW_LINE>if (!handlesFileExtension(ext)) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>FqnCache<IFile> fileCache = entry.getValue();<NEW_LINE>for (String fqn : fileCache.getFqns()) {<NEW_LINE>IFile file = fileCache.get(fqn);<NEW_LINE>if (file != null && handlesFile(file)) {<NEW_LINE>String primaryFqn = getTypeNameForFile(fqn, file);<NEW_LINE>if (primaryFqn != null) {<NEW_LINE>String pfqn = primaryFqn.isEmpty() ? '-' + fqn : primaryFqn;<NEW_LINE>Set<IFile> files = primaryFqnToFiles.get(pfqn);<NEW_LINE>if (files == null) {<NEW_LINE>files = new ConcurrentHashSet<>();<NEW_LINE>}<NEW_LINE>if (!isDuplicate(file, files)) {<NEW_LINE>files.add(file);<NEW_LINE>primaryFqnToFiles.put(pfqn, files);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return primaryFqnToFiles;<NEW_LINE>}
String ext = entry.getKey();
225,140
public Object doQuery(Object[] objs) {<NEW_LINE>if (objs == null || objs.length < 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("spark_read1" + mm.getMessage(Integer.toString(param.getSubSize())));<NEW_LINE>}<NEW_LINE>if (!(objs[0] instanceof SparkCli)) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("spark_read2" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>SparkCli client = (SparkCli) objs[0];<NEW_LINE>if (!(objs[1] instanceof String)) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("spark_read3" + mm.getMessage("function.paramTypeError"));<NEW_LINE>}<NEW_LINE>// backup conf setting<NEW_LINE>Map<String, String> map = new HashMap<>();<NEW_LINE>if (option != null && option.contains("t")) {<NEW_LINE>map.put("header", "true");<NEW_LINE>}<NEW_LINE>for (int i = 2; i < objs.length; i++) {<NEW_LINE>if (objs[i] instanceof Object[]) {<NEW_LINE>Object[] os = (<MASK><NEW_LINE>map.put(os[0].toString(), os[1].toString());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Object ret = null;<NEW_LINE>if (option != null && option.contains("c")) {<NEW_LINE>// for cursor<NEW_LINE>ret = client.cursorRead((String) objs[1], map, m_ctx);<NEW_LINE>} else if (option != null && option.contains("q")) {<NEW_LINE>ret = client.readSequenceFile((String) objs[1], map);<NEW_LINE>} else {<NEW_LINE>ret = client.read((String) objs[1], map);<NEW_LINE>if (option != null && option.contains("x")) {<NEW_LINE>client.close();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return ret;<NEW_LINE>}
Object[]) objs[i];
1,067,679
// For the serialization format, see BridgeSerializationUtils::serializeABICallSpec<NEW_LINE>private static ABICallSpec deserializeABICallSpec(byte[] data) {<NEW_LINE>RLPList rlpList = (RLPList) RLP.decode2(data).get(0);<NEW_LINE>if (rlpList.size() != 2) {<NEW_LINE>throw new RuntimeException(String.format("Invalid serialized ABICallSpec. Expected 2 elements, but got %d"<MASK><NEW_LINE>}<NEW_LINE>String function = new String(rlpList.get(0).getRLPData(), StandardCharsets.UTF_8);<NEW_LINE>RLPList rlpArguments = (RLPList) rlpList.get(1);<NEW_LINE>byte[][] arguments = new byte[rlpArguments.size()][];<NEW_LINE>for (int k = 0; k < rlpArguments.size(); k++) {<NEW_LINE>arguments[k] = rlpArguments.get(k).getRLPData();<NEW_LINE>}<NEW_LINE>return new ABICallSpec(function, arguments);<NEW_LINE>}
, rlpList.size()));
948,538
public void init(String[] args) throws Exception {<NEW_LINE>RefineServer server = new RefineServer();<NEW_LINE>server.init(iface, port, host);<NEW_LINE>boolean headless = Configurations.getBoolean("refine.headless", false);<NEW_LINE>if (headless) {<NEW_LINE><MASK><NEW_LINE>logger.info("Running in headless mode");<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>RefineClient client = new RefineClient();<NEW_LINE>if ("*".equals(host)) {<NEW_LINE>if ("0.0.0.0".equals(iface)) {<NEW_LINE>logger.warn("No refine.host specified while binding to interface 0.0.0.0, guessing localhost.");<NEW_LINE>client.init("localhost", port);<NEW_LINE>} else {<NEW_LINE>client.init(iface, port);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>client.init(host, port);<NEW_LINE>}<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.warn("Sorry, some error prevented us from launching the browser for you.\n\n Point your browser to http://" + host + ":" + port + "/ to start using Refine.");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// hook up the signal handlers<NEW_LINE>Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownSignalHandler(server)));<NEW_LINE>server.join();<NEW_LINE>}
System.setProperty("java.awt.headless", "true");
958,064
public HazelcastInstance hazelcastInstance(JHipsterProperties jHipsterProperties) {<NEW_LINE>log.debug("Configuring Hazelcast");<NEW_LINE>Config config = new Config();<NEW_LINE>config.setInstanceName("gateway");<NEW_LINE>// The serviceId is by default the application's name, see Spring Boot's eureka.instance.appname property<NEW_LINE>String serviceId = discoveryClient.getLocalServiceInstance().getServiceId();<NEW_LINE><MASK><NEW_LINE>// In development, everything goes through 127.0.0.1, with a different port<NEW_LINE>if (env.acceptsProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)) {<NEW_LINE>log.debug("Application is running with the \"dev\" profile, Hazelcast " + "cluster will only work with localhost instances");<NEW_LINE>System.setProperty("hazelcast.local.localAddress", "127.0.0.1");<NEW_LINE>config.getNetworkConfig().setPort(serverProperties.getPort() + 5701);<NEW_LINE>config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);<NEW_LINE>config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);<NEW_LINE>for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) {<NEW_LINE>String clusterMember = "127.0.0.1:" + (instance.getPort() + 5701);<NEW_LINE>log.debug("Adding Hazelcast (dev) cluster member " + clusterMember);<NEW_LINE>config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// Production configuration, one host per instance all using port 5701<NEW_LINE>config.getNetworkConfig().setPort(5701);<NEW_LINE>config.getNetworkConfig().getJoin().getMulticastConfig().setEnabled(false);<NEW_LINE>config.getNetworkConfig().getJoin().getTcpIpConfig().setEnabled(true);<NEW_LINE>for (ServiceInstance instance : discoveryClient.getInstances(serviceId)) {<NEW_LINE>String clusterMember = instance.getHost() + ":5701";<NEW_LINE>log.debug("Adding Hazelcast (prod) cluster member " + clusterMember);<NEW_LINE>config.getNetworkConfig().getJoin().getTcpIpConfig().addMember(clusterMember);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>config.getMapConfigs().put("default", initializeDefaultMapConfig());<NEW_LINE>config.getMapConfigs().put("com.gateway.domain.*", initializeDomainMapConfig(jHipsterProperties));<NEW_LINE>return Hazelcast.newHazelcastInstance(config);<NEW_LINE>}
log.debug("Configuring Hazelcast clustering for instanceId: {}", serviceId);
418,099
static ImmutableOpenMap<String, List<AliasMetadata>> postProcess(GetAliasesRequest request, String[] concreteIndices, ImmutableOpenMap<String, List<AliasMetadata>> aliases, ClusterState state, SystemIndexAccessLevel systemIndexAccessLevel, ThreadContext threadContext, SystemIndices systemIndices) {<NEW_LINE>boolean noAliasesSpecified = request.getOriginalAliases() == null || request.getOriginalAliases().length == 0;<NEW_LINE>ImmutableOpenMap.Builder<String, List<AliasMetadata>> mapBuilder = ImmutableOpenMap.builder(aliases);<NEW_LINE>for (String index : concreteIndices) {<NEW_LINE>IndexAbstraction ia = state.metadata().getIndicesLookup().get(index);<NEW_LINE>assert ia.getType() == IndexAbstraction.Type.CONCRETE_INDEX;<NEW_LINE>if (ia.getParentDataStream() != null) {<NEW_LINE>// Don't include backing indices of data streams,<NEW_LINE>// because it is just noise. Aliases can't refer<NEW_LINE>// to backing indices directly.<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (aliases.get(index) == null && noAliasesSpecified) {<NEW_LINE>List<AliasMetadata> previous = mapBuilder.put(index, Collections.emptyList());<NEW_LINE>assert previous == null;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final ImmutableOpenMap<String, List<AliasMetadata><MASK><NEW_LINE>if (systemIndexAccessLevel != SystemIndexAccessLevel.ALL) {<NEW_LINE>checkSystemIndexAccess(request, systemIndices, state, finalResponse, systemIndexAccessLevel, threadContext);<NEW_LINE>}<NEW_LINE>return finalResponse;<NEW_LINE>}
> finalResponse = mapBuilder.build();
735,771
private boolean checkForLogrotateAdditionalFilesToDelete(SingularityExecutorTaskDefinition taskDefinition) {<NEW_LINE>return configuration.getLogrotateAdditionalFiles().stream().filter(SingularityExecutorLogrotateAdditionalFile::isDeleteInExecutorCleanup).allMatch(toDelete -> {<NEW_LINE>String glob = String.format("glob:%s/%s", taskDefinition.getTaskDirectoryPath().toAbsolutePath(), toDelete.getFilename());<NEW_LINE>log.debug("Trying to delete {} for task {} using glob {}...", toDelete.getFilename(), taskDefinition.getTaskId(), glob);<NEW_LINE>try {<NEW_LINE>List<Path> matches = findGlob(taskDefinition.getTaskDirectoryPath().toAbsolutePath(), taskDefinition.getTaskDirectoryPath().getFileSystem<MASK><NEW_LINE>for (Path match : matches) {<NEW_LINE>Files.delete(match);<NEW_LINE>log.debug("Deleted {}", match);<NEW_LINE>}<NEW_LINE>return true;<NEW_LINE>} catch (IOException e) {<NEW_LINE>log.error("Unable to list files while trying to delete for {}", toDelete);<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}
().getPathMatcher(glob));
1,325,200
final ListInputsResult executeListInputs(ListInputsRequest listInputsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listInputsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListInputsRequest> request = null;<NEW_LINE>Response<ListInputsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new ListInputsRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(listInputsRequest));<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, "MediaLive");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListInputs");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<ListInputsResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new ListInputsResultJsonUnmarshaller());<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.ClientExecuteTime);
426,855
private void appendStack(String title, List<StarlarkThread.CallStackEntry> stack) throws IOException {<NEW_LINE>// For readability, ensure columns line up.<NEW_LINE>int maxLocLen = 0;<NEW_LINE>for (StarlarkThread.CallStackEntry fr : stack) {<NEW_LINE>maxLocLen = Math.max(maxLocLen, fr.location.toString().length());<NEW_LINE>}<NEW_LINE>if (maxLocLen > 0) {<NEW_LINE>writer.append(title).append(lineTerm);<NEW_LINE>for (StarlarkThread.CallStackEntry fr : stack) {<NEW_LINE>// TODO(b/151151653): display root-relative<NEW_LINE>String loc = fr.location.toString();<NEW_LINE>// Java's String.format doesn't support<NEW_LINE>// right-padding with %*s, so we must loop.<NEW_LINE>writer.append<MASK><NEW_LINE>for (int i = loc.length(); i < maxLocLen; i++) {<NEW_LINE>writer.append(' ');<NEW_LINE>}<NEW_LINE>writer.append(" in ").append(fr.name).append(lineTerm);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
("# ").append(loc);
92,530
public final DeclaracaoFuncaoContext declaracaoFuncao() throws RecognitionException {<NEW_LINE>DeclaracaoFuncaoContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 24, RULE_declaracaoFuncao);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(170);<NEW_LINE>match(FUNCAO);<NEW_LINE>setState(172);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>if (_la == TIPO) {<NEW_LINE>{<NEW_LINE>setState(171);<NEW_LINE>match(TIPO);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(174);<NEW_LINE>match(ID);<NEW_LINE>setState(175);<NEW_LINE>parametroFuncao();<NEW_LINE>setState(176);<NEW_LINE>match(ABRE_CHAVES);<NEW_LINE>setState(180);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << ABRE_PARENTESES) | (1L << TIPO) | (1L << FACA) | (1L << ENQUANTO) | (1L << PARA) | (1L << SE) | (1L << CONSTANTE) | (1L << ESCOLHA) | (1L << PARE) | (1L << RETORNE) | (1L << OP_NAO) | (1L << OP_SUBTRACAO) | (1L << OP_ADICAO) | (1L << OP_INCREMENTO_UNARIO) | (1L << OP_DECREMENTO_UNARIO) | (1L << OP_NOT_BITWISE) | (1L << LOGICO) | (1L << CARACTER) | (1L << STRING) | (1L << ID) | (1L << REAL) | (1L << INT) | (1L << HEXADECIMAL))) != 0)) {<NEW_LINE>{<NEW_LINE>{<NEW_LINE>setState(177);<NEW_LINE>comando();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>setState(182);<NEW_LINE>_errHandler.sync(this);<NEW_LINE>_la = _input.LA(1);<NEW_LINE>}<NEW_LINE>setState(183);<NEW_LINE>match(FECHA_CHAVES);<NEW_LINE>}<NEW_LINE>} catch (RecognitionException re) {<NEW_LINE>_localctx.exception = re;<NEW_LINE>_errHandler.reportError(this, re);<NEW_LINE>_errHandler.recover(this, re);<NEW_LINE>} finally {<NEW_LINE>exitRule();<NEW_LINE>}<NEW_LINE>return _localctx;<NEW_LINE>}
DeclaracaoFuncaoContext(_ctx, getState());
745,509
public static OfYear read(CharFlow flow) {<NEW_LINE>int flags = Base46.decodeUnsigned(flow);<NEW_LINE>boolean advance = (flags & 1) != 0;<NEW_LINE>boolean hasDayOfWeek <MASK><NEW_LINE>int modeBits = (flags >>> 2) & 3;<NEW_LINE>char mode;<NEW_LINE>switch(modeBits) {<NEW_LINE>case 1:<NEW_LINE>mode = 'w';<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>mode = 's';<NEW_LINE>break;<NEW_LINE>default:<NEW_LINE>mode = 'u';<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>int monthOfYear = Base46.decodeUnsigned(flow);<NEW_LINE>int dayOfMonth = Base46.decode(flow);<NEW_LINE>int dayOfWeek = hasDayOfWeek ? Base46.decode(flow) : 0;<NEW_LINE>int millisOfDay = (int) StorableDateTimeZone.readUnsignedTime(flow);<NEW_LINE>return new OfYear(mode, monthOfYear, dayOfMonth, dayOfWeek, advance, millisOfDay);<NEW_LINE>}
= (flags & 2) != 0;
465,635
private void drawTurtle(UGraphic ug) {<NEW_LINE>if (showTurtle == false) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final UPolygon poly = new UPolygon();<NEW_LINE>double size = 2;<NEW_LINE>double deltax = 4.5 * size;<NEW_LINE>poly.addPoint(0 * size - deltax, 0);<NEW_LINE>poly.addPoint(0 * size - deltax, -2 * size);<NEW_LINE>poly.addPoint(1 * size - deltax, -2 * size);<NEW_LINE>poly.addPoint(1 * size - deltax, -4 * size);<NEW_LINE>poly.addPoint(2 * size - deltax, -4 * size);<NEW_LINE>poly.addPoint(2 * size <MASK><NEW_LINE>poly.addPoint(3 * size - deltax, -6 * size);<NEW_LINE>poly.addPoint(3 * size - deltax, -8 * size);<NEW_LINE>poly.addPoint(4 * size - deltax, -8 * size);<NEW_LINE>poly.addPoint(4 * size - deltax, -9 * size);<NEW_LINE>poly.addPoint(5 * size - deltax, -9 * size);<NEW_LINE>poly.addPoint(5 * size - deltax, -8 * size);<NEW_LINE>poly.addPoint(6 * size - deltax, -8 * size);<NEW_LINE>poly.addPoint(6 * size - deltax, -6 * size);<NEW_LINE>poly.addPoint(7 * size - deltax, -6 * size);<NEW_LINE>poly.addPoint(7 * size - deltax, -4 * size);<NEW_LINE>poly.addPoint(8 * size - deltax, -4 * size);<NEW_LINE>poly.addPoint(8 * size - deltax, -2 * size);<NEW_LINE>poly.addPoint(9 * size - deltax, -2 * size);<NEW_LINE>poly.addPoint(9 * size - deltax, 0);<NEW_LINE>poly.addPoint(0 * size - deltax, 0);<NEW_LINE>final double angle = -dtor(turtleDirection - 90);<NEW_LINE>poly.rotate(angle);<NEW_LINE>// ug.setAntiAliasing(false);<NEW_LINE>final HColorSet htmlColorSet = HColorSet.instance();<NEW_LINE>final HColor turtleColor1 = htmlColorSet.getColorOrWhite("OliveDrab");<NEW_LINE>final HColor turtleColor2 = htmlColorSet.getColorOrWhite("MediumSpringGreen");<NEW_LINE>ug.apply(turtleColor1).apply(turtleColor2.bg()).apply(new UTranslate(x, -y)).draw(poly);<NEW_LINE>// ug.setAntiAliasing(true);<NEW_LINE>}
- deltax, -6 * size);
281,330
public ApiResponse<String> uploadPostResumableShareWithHttpInfo(String shareid, FileMetadata metadata) throws ApiException {<NEW_LINE>Object localVarPostBody = metadata;<NEW_LINE>// verify the required parameter 'shareid' is set<NEW_LINE>if (shareid == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// verify the required parameter 'metadata' is set<NEW_LINE>if (metadata == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'metadata' when calling uploadPostResumableShare");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/upload/shares/{shareid}/resumable".replaceAll("\\{" + "shareid" + "\\}", apiClient.escapeString(shareid.toString()));<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = { "application/json", "text/json" };<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<String> localVarReturnType = new GenericType<String>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);<NEW_LINE>}
throw new ApiException(400, "Missing the required parameter 'shareid' when calling uploadPostResumableShare");
724,823
public Ic3Data.Application.Component.ExitPoint.Intent buildPartial() {<NEW_LINE>Ic3Data.Application.Component.ExitPoint.Intent result = new Ic3Data.Application.Component.ExitPoint.Intent(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (attributesBuilder_ == null) {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>attributes_ = java.util.Collections.unmodifiableList(attributes_);<NEW_LINE>bitField0_ = (bitField0_ & ~0x00000001);<NEW_LINE>}<NEW_LINE>result.attributes_ = attributes_;<NEW_LINE>} else {<NEW_LINE>result<MASK><NEW_LINE>}<NEW_LINE>if (((from_bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>to_bitField0_ |= 0x00000001;<NEW_LINE>}<NEW_LINE>result.permission_ = permission_;<NEW_LINE>result.bitField0_ = to_bitField0_;<NEW_LINE>onBuilt();<NEW_LINE>return result;<NEW_LINE>}
.attributes_ = attributesBuilder_.build();
1,396,497
public boolean removeReadEntity(RateControlledEntity entity) {<NEW_LINE>boolean found = false;<NEW_LINE>try {<NEW_LINE>entities_mon.enter();<NEW_LINE>if (entity.getPriority() == RateControlledEntity.PRIORITY_HIGH) {<NEW_LINE>// copy-on-write<NEW_LINE>ArrayList<RateControlledEntity> high_new = new ArrayList<>(high_priority_entities);<NEW_LINE>if (high_new.remove(entity)) {<NEW_LINE>high_priority_entities = high_new;<NEW_LINE>found = true;<NEW_LINE>} else {<NEW_LINE>Debug.out("entity not found");<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>// copy-on-write<NEW_LINE>ArrayList<RateControlledEntity> norm_new <MASK><NEW_LINE>if (norm_new.remove(entity)) {<NEW_LINE>normal_priority_entities = norm_new;<NEW_LINE>found = true;<NEW_LINE>} else {<NEW_LINE>Debug.out("entity not found");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>entity_count = normal_priority_entities.size() + high_priority_entities.size();<NEW_LINE>} finally {<NEW_LINE>entities_mon.exit();<NEW_LINE>}<NEW_LINE>return (found);<NEW_LINE>}
= new ArrayList<>(normal_priority_entities);
712,533
private void processEEPs(EnoceanBindingProvider enoceanBindingProvider, String itemName) {<NEW_LINE>EnoceanParameterAddress parameterAddress = enoceanBindingProvider.getParameterAddress(itemName);<NEW_LINE>EEPId eep = enoceanBindingProvider.getEEP(itemName);<NEW_LINE>esp3Host.addDeviceProfile(parameterAddress.getEnoceanDeviceId(), eep);<NEW_LINE>Item item = enoceanBindingProvider.getItem(itemName);<NEW_LINE>if (profiles.containsKey(parameterAddress.getAsString())) {<NEW_LINE>Profile profile = profiles.get(parameterAddress.getAsString());<NEW_LINE>profile.removeItem(item);<NEW_LINE>}<NEW_LINE>Class<Profile> customProfileClass = enoceanBindingProvider.getCustomProfile(itemName);<NEW_LINE>if (customProfileClass != null) {<NEW_LINE>Constructor<Profile> constructor;<NEW_LINE>Profile profile;<NEW_LINE>try {<NEW_LINE>constructor = customProfileClass.getConstructor(Item.class, EventPublisher.class);<NEW_LINE>profile = constructor.newInstance(item, eventPublisher);<NEW_LINE>addProfile(item, parameterAddress, profile);<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error("Could not create class for profile " + customProfileClass, e);<NEW_LINE>}<NEW_LINE>} else if (EEPId.EEP_F6_02_01.equals(eep) || EEPId.EEP_F6_10_00.equals(eep)) {<NEW_LINE>if (item.getClass().equals(RollershutterItem.class)) {<NEW_LINE>RollershutterProfile profile = new RollershutterProfile(item, eventPublisher);<NEW_LINE>addProfile(item, parameterAddress, profile);<NEW_LINE>}<NEW_LINE>if (item.getClass().equals(DimmerItem.class)) {<NEW_LINE>DimmerOnOffProfile profile = new DimmerOnOffProfile(item, eventPublisher);<NEW_LINE>addProfile(item, parameterAddress, profile);<NEW_LINE>}<NEW_LINE>if (item.getClass().equals(SwitchItem.class) && parameterAddress.getParameterId() == null) {<NEW_LINE>SwitchOnOffProfile profile = new SwitchOnOffProfile(item, eventPublisher);<NEW_LINE>addProfile(item, parameterAddress, profile);<NEW_LINE>}<NEW_LINE>if (item.getClass().equals(StringItem.class) && EEPId.EEP_F6_10_00.equals(eep)) {<NEW_LINE>WindowHandleProfile profile = new WindowHandleProfile(item, eventPublisher);<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
addProfile(item, parameterAddress, profile);
1,050,299
private void saveBlobsTSSSaver(StringBuilder responseBuilder) {<NEW_LINE>Map<Object, Object> deviceParameters = new HashMap<>();<NEW_LINE>deviceParameters.put("ecid", String.valueOf(Long.parseLong(ecid, 16)));<NEW_LINE>deviceParameters.put("deviceIdentifier", deviceIdentifier);<NEW_LINE>deviceParameters.put("boardConfig", getBoardConfig());<NEW_LINE>if (generator != null) {<NEW_LINE>deviceParameters.put("generator", generator);<NEW_LINE>}<NEW_LINE>if (apnonce != null) {<NEW_LINE>deviceParameters.put("apnonce", apnonce);<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>var headers = new HashMap<String, String>();<NEW_LINE>headers.put("Content-Type", "application/x-www-form-urlencoded");<NEW_LINE>HttpResponse<String> response;<NEW_LINE>try {<NEW_LINE>response = Network.makePOSTRequest("https://tsssaver.1conan.com/v2/api/save.php", deviceParameters, headers, true);<NEW_LINE>} catch (IOException | InterruptedException e) {<NEW_LINE>e.printStackTrace();<NEW_LINE>responseBuilder.append("Error encountered while trying to save blobs to TSSSaver: ").append(e.getMessage());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>System.out.println(response.body());<NEW_LINE>@SuppressWarnings("rawtypes")<NEW_LINE>Map responseBody = new Gson().fromJson(response.body(), Map.class);<NEW_LINE>if (responseBody.containsKey("errors")) {<NEW_LINE>responseBuilder.append("Error encountered while trying to save blobs to TSSSaver: ").append(responseBody.get("errors"));<NEW_LINE>} else {<NEW_LINE>responseBuilder.append("Also saved blobs online to TSS Saver.");<NEW_LINE>}<NEW_LINE>}
System.out.println(deviceParameters);
1,121,774
public static ContentImpl createInstance(AnnotationModel annotation, ApiContext context) {<NEW_LINE>ContentImpl from = new ContentImpl();<NEW_LINE>String typeName = annotation.getValue("mediaType", String.class);<NEW_LINE>if (typeName == null || typeName.isEmpty()) {<NEW_LINE>typeName = javax.ws.rs.core.MediaType.WILDCARD;<NEW_LINE>}<NEW_LINE>MediaType mediaType = new MediaTypeImpl();<NEW_LINE>from.addMediaType(typeName, mediaType);<NEW_LINE>extractAnnotations(annotation, context, "examples", "name", ExampleImpl::createInstance, mediaType::addExample);<NEW_LINE>mediaType.setExample(annotation.getValue<MASK><NEW_LINE>AnnotationModel schemaAnnotation = annotation.getValue("schema", AnnotationModel.class);<NEW_LINE>if (schemaAnnotation != null) {<NEW_LINE>Boolean hidden = schemaAnnotation.getValue("hidden", Boolean.class);<NEW_LINE>if (hidden == null || !hidden) {<NEW_LINE>mediaType.setSchema(SchemaImpl.createInstance(schemaAnnotation, context));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>extractAnnotations(annotation, context, "encoding", "name", EncodingImpl::createInstance, mediaType::addEncoding);<NEW_LINE>return from;<NEW_LINE>}
("example", String.class));
174,041
private void storeInitialState() {<NEW_LINE>mKeyState[0] = mSharedPreferences.getBoolean(IMAGE_TO_PDF_KEY, false);<NEW_LINE>mKeyState[1] = mSharedPreferences.getBoolean(TEXT_TO_PDF_KEY, false);<NEW_LINE>mKeyState[2] = mSharedPreferences.getBoolean(QR_BARCODE_KEY, false);<NEW_LINE>mKeyState[3] = mSharedPreferences.getBoolean(VIEW_FILES_KEY, false);<NEW_LINE>mKeyState[4] = mSharedPreferences.getBoolean(HISTORY_KEY, false);<NEW_LINE>mKeyState[5] = mSharedPreferences.getBoolean(ADD_PASSWORD_KEY, false);<NEW_LINE>mKeyState[6] = mSharedPreferences.getBoolean(REMOVE_PASSWORD_KEY, false);<NEW_LINE>mKeyState[7] = mSharedPreferences.getBoolean(ROTATE_PAGES_KEY, false);<NEW_LINE>mKeyState[8] = mSharedPreferences.getBoolean(ADD_WATERMARK_KEY, false);<NEW_LINE>mKeyState[9] = mSharedPreferences.getBoolean(ADD_IMAGES_KEY, false);<NEW_LINE>mKeyState[10] = mSharedPreferences.getBoolean(MERGE_PDF_KEY, false);<NEW_LINE>mKeyState[11] = <MASK><NEW_LINE>mKeyState[12] = mSharedPreferences.getBoolean(INVERT_PDF_KEY, false);<NEW_LINE>mKeyState[13] = mSharedPreferences.getBoolean(COMPRESS_PDF_KEY, false);<NEW_LINE>mKeyState[14] = mSharedPreferences.getBoolean(REMOVE_DUPLICATE_PAGES_KEY, false);<NEW_LINE>mKeyState[15] = mSharedPreferences.getBoolean(REMOVE_PAGES_KEY, false);<NEW_LINE>mKeyState[16] = mSharedPreferences.getBoolean(REORDER_PAGES_KEY, false);<NEW_LINE>mKeyState[17] = mSharedPreferences.getBoolean(EXTRACT_IMAGES_KEY, false);<NEW_LINE>mKeyState[18] = mSharedPreferences.getBoolean(PDF_TO_IMAGES_KEY, false);<NEW_LINE>mKeyState[19] = mSharedPreferences.getBoolean(EXCEL_TO_PDF_KEY, false);<NEW_LINE>mKeyState[20] = mSharedPreferences.getBoolean(ZIP_TO_PDF_KEY, false);<NEW_LINE>}
mSharedPreferences.getBoolean(SPLIT_PDF_KEY, false);
1,261,749
public static ColumnVector md5Hash(ColumnView... columns) {<NEW_LINE>if (columns.length < 1) {<NEW_LINE>throw new IllegalArgumentException("MD5 hashing requires at least 1 column of input");<NEW_LINE>}<NEW_LINE>long[] columnViews = new long[columns.length];<NEW_LINE>long size = <MASK><NEW_LINE>for (int i = 0; i < columns.length; i++) {<NEW_LINE>assert columns[i] != null : "Column vectors passed may not be null";<NEW_LINE>assert columns[i].getRowCount() == size : "Row count mismatch, all columns must be the same size";<NEW_LINE>assert !columns[i].getType().isDurationType() : "Unsupported column type Duration";<NEW_LINE>assert !columns[i].getType().isTimestampType() : "Unsupported column type Timestamp";<NEW_LINE>assert !columns[i].getType().isNestedType() || columns[i].getType().equals(DType.LIST) : "Unsupported nested type column";<NEW_LINE>columnViews[i] = columns[i].getNativeView();<NEW_LINE>}<NEW_LINE>return new ColumnVector(hash(columnViews, HashType.HASH_MD5.getNativeId(), 0));<NEW_LINE>}
columns[0].getRowCount();
853,209
final DeleteQuickConnectResult executeDeleteQuickConnect(DeleteQuickConnectRequest deleteQuickConnectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteQuickConnectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteQuickConnectRequest> request = null;<NEW_LINE>Response<DeleteQuickConnectResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteQuickConnectRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteQuickConnectRequest));<NEW_LINE>// Binds the request metrics to the current request.<NEW_LINE>request.setAWSRequestMetrics(awsRequestMetrics);<NEW_LINE>request.addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint);<NEW_LINE>request.addHandlerContext(HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SIGNING_REGION, getSigningRegion());<NEW_LINE>request.addHandlerContext(HandlerContextKey.SERVICE_ID, "Connect");<NEW_LINE>request.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeleteQuickConnectResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteQuickConnectResultJsonUnmarshaller());<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, "DeleteQuickConnect");
272,482
void readACValues(BitReader _in, int[] target, VLC table, int[] quantTable) {<NEW_LINE>int code;<NEW_LINE>int curOff = 1;<NEW_LINE>do {<NEW_LINE>code = table.readVLC16(_in);<NEW_LINE>if (code == 0xF0) {<NEW_LINE>curOff += 16;<NEW_LINE>} else if (code > 0) {<NEW_LINE>int rle = code >> 4;<NEW_LINE>curOff += rle;<NEW_LINE>int len = code & 0xf;<NEW_LINE>target[mapping4x4[curOff]] = toValue(_in.readNBit(len), len) * quantTable[curOff];<NEW_LINE>curOff++;<NEW_LINE>}<NEW_LINE>} while (<MASK><NEW_LINE>if (code != 0) {<NEW_LINE>do {<NEW_LINE>code = table.readVLC16(_in);<NEW_LINE>if (code == 0xF0) {<NEW_LINE>curOff += 16;<NEW_LINE>} else if (code > 0) {<NEW_LINE>int rle = code >> 4;<NEW_LINE>curOff += rle;<NEW_LINE>int len = code & 0xf;<NEW_LINE>_in.skip(len);<NEW_LINE>curOff++;<NEW_LINE>}<NEW_LINE>} while (code != 0 && curOff < 64);<NEW_LINE>}<NEW_LINE>}
code != 0 && curOff < 19);
735,173
private SourceSet createAotMainSourceSet(SourceSetContainer sourceSets, ConfigurationContainer configurations, Path generatedFilesPath) {<NEW_LINE>File aotSourcesDirectory = generatedFilesPath.resolve("runtimeSources").resolve(AOT_MAIN_SOURCE_SET_NAME).toFile();<NEW_LINE>File aotResourcesDirectory = generatedFilesPath.resolve("resources").resolve(AOT_MAIN_SOURCE_SET_NAME).toFile();<NEW_LINE>SourceSet aotMainSourceSet = sourceSets.create(AOT_MAIN_SOURCE_SET_NAME);<NEW_LINE>FileCollection aotCompileClasspath = sourceSets.findByName(SourceSet.MAIN_SOURCE_SET_NAME).getRuntimeClasspath().minus(configurations<MASK><NEW_LINE>aotMainSourceSet.setCompileClasspath(aotCompileClasspath);<NEW_LINE>aotMainSourceSet.getJava().setSrcDirs(Collections.singletonList(aotSourcesDirectory));<NEW_LINE>aotMainSourceSet.getResources().setSrcDirs(Collections.singletonList(aotResourcesDirectory));<NEW_LINE>return aotMainSourceSet;<NEW_LINE>}
.getByName(SpringBootPlugin.DEVELOPMENT_ONLY_CONFIGURATION_NAME));
1,085,392
public static IRubyObject unresolvedSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) {<NEW_LINE>// We have to rely on the frame stack to find the implementation class<NEW_LINE>RubyModule klazz = context.getFrameKlazz();<NEW_LINE>String methodName = context.getFrameName();<NEW_LINE>Helpers.checkSuperDisabledOrOutOfMethod(context, klazz, methodName);<NEW_LINE>RubyClass superClass = searchNormalSuperclass(klazz);<NEW_LINE>CacheEntry entry = superClass != null ? superClass.<MASK><NEW_LINE>IRubyObject rVal;<NEW_LINE>if (entry.method.isUndefined()) {<NEW_LINE>rVal = Helpers.callMethodMissing(context, self, entry.method.getVisibility(), methodName, CallType.SUPER, args, block);<NEW_LINE>} else {<NEW_LINE>rVal = entry.method.call(context, self, entry.sourceModule, methodName, args, block);<NEW_LINE>}<NEW_LINE>return rVal;<NEW_LINE>}
searchWithCache(methodName) : CacheEntry.NULL_CACHE;
372,651
public static void onExit(@Advice.This ILoggingEvent event, @Advice.Return(typing = Typing.DYNAMIC, readOnly = false) Map<String, String> contextData) {<NEW_LINE>if (contextData != null && contextData.containsKey(TRACE_ID)) {<NEW_LINE>// Assume already instrumented event if traceId is present.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Span currentSpan = VirtualField.find(ILoggingEvent.class, Span.class).get(event);<NEW_LINE>if (currentSpan == null || !currentSpan.getSpanContext().isValid()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, String> spanContextData = new HashMap<>();<NEW_LINE><MASK><NEW_LINE>spanContextData.put(TRACE_ID, spanContext.getTraceId());<NEW_LINE>spanContextData.put(SPAN_ID, spanContext.getSpanId());<NEW_LINE>spanContextData.put(TRACE_FLAGS, spanContext.getTraceFlags().asHex());<NEW_LINE>if (contextData == null) {<NEW_LINE>contextData = spanContextData;<NEW_LINE>} else {<NEW_LINE>contextData = new UnionMap<>(contextData, spanContextData);<NEW_LINE>}<NEW_LINE>}
SpanContext spanContext = currentSpan.getSpanContext();
875,066
final DescribeHostsResult executeDescribeHosts(DescribeHostsRequest describeHostsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeHostsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeHostsRequest> request = null;<NEW_LINE>Response<DescribeHostsResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DescribeHostsRequestMarshaller().marshall(super.beforeMarshalling(describeHostsRequest));<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, "EC2");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeHosts");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<DescribeHostsResult> responseHandler = new StaxResponseHandler<<MASK><NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>endClientExecution(awsRequestMetrics, request, response);<NEW_LINE>}<NEW_LINE>}
DescribeHostsResult>(new DescribeHostsResultStaxUnmarshaller());
643,085
final AssumeRoleResult executeAssumeRole(AssumeRoleRequest assumeRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(assumeRoleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<AssumeRoleRequest> request = null;<NEW_LINE>Response<AssumeRoleResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new AssumeRoleRequestMarshaller().marshall(super.beforeMarshalling(assumeRoleRequest));<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, "STS");<NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "AssumeRole");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>StaxResponseHandler<AssumeRoleResult> responseHandler = new StaxResponseHandler<AssumeRoleResult>(new AssumeRoleResultStaxUnmarshaller());<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,548,417
protected List<ClassResult> groupResults(Set<ITestResult> results) {<NEW_LINE>List<ClassResult> classResults = Lists.newArrayList();<NEW_LINE>if (!results.isEmpty()) {<NEW_LINE>List<MethodResult> resultsPerClass = Lists.newArrayList();<NEW_LINE>List<ITestResult> resultsPerMethod = Lists.newArrayList();<NEW_LINE>List<ITestResult> resultsList = Lists.newArrayList(results);<NEW_LINE>resultsList.sort(RESULT_COMPARATOR);<NEW_LINE>Iterator<ITestResult<MASK><NEW_LINE>assert resultsIterator.hasNext();<NEW_LINE>ITestResult result = resultsIterator.next();<NEW_LINE>resultsPerMethod.add(result);<NEW_LINE>String previousClassName = result.getTestClass().getName();<NEW_LINE>String previousMethodName = result.getMethod().getMethodName();<NEW_LINE>while (resultsIterator.hasNext()) {<NEW_LINE>result = resultsIterator.next();<NEW_LINE>String className = result.getTestClass().getName();<NEW_LINE>if (!previousClassName.equals(className)) {<NEW_LINE>// Different class implies different method<NEW_LINE>assert !resultsPerMethod.isEmpty();<NEW_LINE>resultsPerClass.add(new MethodResult(resultsPerMethod));<NEW_LINE>resultsPerMethod = Lists.newArrayList();<NEW_LINE>assert !resultsPerClass.isEmpty();<NEW_LINE>classResults.add(new ClassResult(previousClassName, resultsPerClass));<NEW_LINE>resultsPerClass = Lists.newArrayList();<NEW_LINE>previousClassName = className;<NEW_LINE>previousMethodName = result.getMethod().getMethodName();<NEW_LINE>} else {<NEW_LINE>String methodName = result.getMethod().getMethodName();<NEW_LINE>if (!previousMethodName.equals(methodName)) {<NEW_LINE>assert !resultsPerMethod.isEmpty();<NEW_LINE>resultsPerClass.add(new MethodResult(resultsPerMethod));<NEW_LINE>resultsPerMethod = Lists.newArrayList();<NEW_LINE>previousMethodName = methodName;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>resultsPerMethod.add(result);<NEW_LINE>}<NEW_LINE>assert !resultsPerMethod.isEmpty();<NEW_LINE>resultsPerClass.add(new MethodResult(resultsPerMethod));<NEW_LINE>assert !resultsPerClass.isEmpty();<NEW_LINE>classResults.add(new ClassResult(previousClassName, resultsPerClass));<NEW_LINE>}<NEW_LINE>return classResults;<NEW_LINE>}
> resultsIterator = resultsList.iterator();
1,590,395
public static DescribeScdnCcQpsInfoResponse unmarshall(DescribeScdnCcQpsInfoResponse describeScdnCcQpsInfoResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeScdnCcQpsInfoResponse.setRequestId(_ctx.stringValue("DescribeScdnCcQpsInfoResponse.RequestId"));<NEW_LINE>List<String> totals = new ArrayList<String>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeScdnCcQpsInfoResponse.Totals.Length"); i++) {<NEW_LINE>totals.add(_ctx.stringValue("DescribeScdnCcQpsInfoResponse.Totals[" + i + "]"));<NEW_LINE>}<NEW_LINE>describeScdnCcQpsInfoResponse.setTotals(totals);<NEW_LINE>List<String> attacks <MASK><NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeScdnCcQpsInfoResponse.Attacks.Length"); i++) {<NEW_LINE>attacks.add(_ctx.stringValue("DescribeScdnCcQpsInfoResponse.Attacks[" + i + "]"));<NEW_LINE>}<NEW_LINE>describeScdnCcQpsInfoResponse.setAttacks(attacks);<NEW_LINE>List<TimeScope> timeScopes = new ArrayList<TimeScope>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("DescribeScdnCcQpsInfoResponse.TimeScopes.Length"); i++) {<NEW_LINE>TimeScope timeScope = new TimeScope();<NEW_LINE>timeScope.setInterval(_ctx.stringValue("DescribeScdnCcQpsInfoResponse.TimeScopes[" + i + "].Interval"));<NEW_LINE>timeScope.setStart(_ctx.stringValue("DescribeScdnCcQpsInfoResponse.TimeScopes[" + i + "].Start"));<NEW_LINE>timeScopes.add(timeScope);<NEW_LINE>}<NEW_LINE>describeScdnCcQpsInfoResponse.setTimeScopes(timeScopes);<NEW_LINE>return describeScdnCcQpsInfoResponse;<NEW_LINE>}
= new ArrayList<String>();
656,325
public void run() {<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>Pack p = null;<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("objHash", agentDailyProxy.getObjHashLv(date, serverId, CounterConstants.MARIA_PLUGIN));<NEW_LINE>param.put("sdate", date);<NEW_LINE>param.put("edate", date);<NEW_LINE>p = tcp.getSingle(RequestCmd.DB_DAILY_CONNECTIONS, param);<NEW_LINE>} catch (Exception e) {<NEW_LINE>ConsoleProxy.errorSafe(e.toString());<NEW_LINE>} finally {<NEW_LINE>TcpProxy.putTcpProxy(tcp);<NEW_LINE>}<NEW_LINE>if (p == null) {<NEW_LINE>ExUtil.exec(canvas, new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>setTitleImage(Images.inactive);<NEW_LINE>DbDailyTotalConnView.this.setContentDescription(date.substring(0, 4) + "-" + date.substring(5, 6) + "-" + date.substring(7, 8));<NEW_LINE>long stime = DateUtil.yyyymmdd(date);<NEW_LINE>long etime <MASK><NEW_LINE>xyGraph.primaryXAxis.setRange(stime, etime);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>MapPack m = (MapPack) p;<NEW_LINE>final ListValue timeLv = m.getList("time");<NEW_LINE>final ListValue totalLv = m.getList("total");<NEW_LINE>final ListValue activeLv = m.getList("active");<NEW_LINE>ExUtil.exec(canvas, new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>setTitleImage(Images.active);<NEW_LINE>CircularBufferDataProvider totalProvider = (CircularBufferDataProvider) totalTrace.getDataProvider();<NEW_LINE>CircularBufferDataProvider activeProvider = (CircularBufferDataProvider) activeTrace.getDataProvider();<NEW_LINE>totalProvider.clearTrace();<NEW_LINE>activeProvider.clearTrace();<NEW_LINE>for (int i = 0; i < timeLv.size(); i++) {<NEW_LINE>long time = timeLv.getLong(i);<NEW_LINE>double totalV = totalLv.getDouble(i);<NEW_LINE>double activeV = activeLv.getDouble(i);<NEW_LINE>totalProvider.addSample(new Sample(time, totalV));<NEW_LINE>activeProvider.addSample(new Sample(time, activeV));<NEW_LINE>}<NEW_LINE>DbDailyTotalConnView.this.setContentDescription(date.substring(0, 4) + "-" + date.substring(4, 6) + "-" + date.substring(6, 8));<NEW_LINE>long stime = DateUtil.yyyymmdd(date);<NEW_LINE>long etime = stime + DateUtil.MILLIS_PER_DAY - 1;<NEW_LINE>xyGraph.primaryXAxis.setRange(stime, etime);<NEW_LINE>double max = ChartUtil.getMax(totalProvider.iterator());<NEW_LINE>xyGraph.primaryYAxis.setRange(0, max);<NEW_LINE>}<NEW_LINE>});<NEW_LINE>}<NEW_LINE>}
= stime + DateUtil.MILLIS_PER_DAY - 1;
381,321
private List<CSSASMechConfig> extractASMech(Map<String, Object> authenticationLayerProperties) {<NEW_LINE>List<CSSASMechConfig> cssasMechConfigs = new ArrayList<CSSASMechConfig>();<NEW_LINE>List<String> configuredMechanisms = new ArrayList<String>();<NEW_LINE>String establishTrustInClient = (String) authenticationLayerProperties.get(KEY_ESTABLISH_TRUST_IN_CLIENT);<NEW_LINE>printTrace("EstablishTrustInClient", establishTrustInClient, 3);<NEW_LINE>boolean required = false;<NEW_LINE>if (OPTION_REQUIRED.equals(establishTrustInClient)) {<NEW_LINE>required = true;<NEW_LINE>} else if (OPTION_NEVER.equals(establishTrustInClient)) {<NEW_LINE>logWarning("CSIv2_COMMON_AUTH_LAYER_DISABLED", establishTrustInClient);<NEW_LINE>cssasMechConfigs<MASK><NEW_LINE>return cssasMechConfigs;<NEW_LINE>}<NEW_LINE>List<String> mechanisms = getAsMechanisms(authenticationLayerProperties);<NEW_LINE>if (mechanisms.isEmpty()) {<NEW_LINE>logWarning("CSIv2_CLIENT_AUTH_MECHANISMS_NULL");<NEW_LINE>cssasMechConfigs.add(new CSSNULLASMechConfig());<NEW_LINE>} else {<NEW_LINE>for (String mech : mechanisms) {<NEW_LINE>if (!configuredMechanisms.contains(mech.toUpperCase())) {<NEW_LINE>CSSASMechConfig camConfig = handleASMech(mech, authenticator, domain, required, authenticationLayerProperties);<NEW_LINE>if (camConfig != null) {<NEW_LINE>cssasMechConfigs.add(camConfig);<NEW_LINE>} else {<NEW_LINE>logWarning("CSIv2_CLIENT_AUTH_MECHANISM_INVALID");<NEW_LINE>}<NEW_LINE>configuredMechanisms.add(mech.toUpperCase());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (cssasMechConfigs.isEmpty()) {<NEW_LINE>cssasMechConfigs.add(new CSSNULLASMechConfig());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return cssasMechConfigs;<NEW_LINE>}
.add(new CSSNULLASMechConfig());
832,705
final DeleteJobQueueResult executeDeleteJobQueue(DeleteJobQueueRequest deleteJobQueueRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteJobQueueRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeleteJobQueueRequest> request = null;<NEW_LINE>Response<DeleteJobQueueResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeleteJobQueueRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deleteJobQueueRequest));<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, "Batch");<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<DeleteJobQueueResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeleteJobQueueResultJsonUnmarshaller());<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, "DeleteJobQueue");
1,558,447
public void testMessageOrder_B_SecOff(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>JMSProducer producer1 = jmsContextQueue.createProducer();<NEW_LINE>JMSProducer producer2 = jmsContextQueueNew.createProducer();<NEW_LINE>JMSConsumer jmsConsumer = jmsContextQueue.createConsumer(jmsQueue);<NEW_LINE>int[] msgOrder = new int[10];<NEW_LINE>for (int msgNo = 0; msgNo < 10; msgNo++) {<NEW_LINE>if ((msgNo % 2) == 0) {<NEW_LINE>Message msg = jmsContextQueue.createMessage();<NEW_LINE>msg.setIntProperty("Message_Order", msgNo);<NEW_LINE>producer1.send(jmsQueue, msg);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>msg.setIntProperty("Message_Order", msgNo);<NEW_LINE>producer2.send(jmsQueue, msg);<NEW_LINE>}<NEW_LINE>int msgRcvd = jmsConsumer.receive(1000).getIntProperty("Message_Order");<NEW_LINE>System.out.println("Received message [ " + msgRcvd + " ]");<NEW_LINE>msgOrder[msgNo] = msgRcvd;<NEW_LINE>}<NEW_LINE>int outOfOrderCount = 0;<NEW_LINE>for (int msgNo = 0; msgNo < 10; msgNo++) {<NEW_LINE>if (msgOrder[msgNo] != msgNo) {<NEW_LINE>outOfOrderCount++;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>boolean testFailed = false;<NEW_LINE>if (outOfOrderCount != 0) {<NEW_LINE>testFailed = true;<NEW_LINE>}<NEW_LINE>if (testFailed) {<NEW_LINE>throw new Exception("testMessageOrder_B_SecOff failed: Messages were not received in the expected order");<NEW_LINE>}<NEW_LINE>}
Message msg = jmsContextQueueNew.createMessage();
1,166,673
public static RefactoringStatus checkParameterTypeSyntax(String type, IJavaProject project) {<NEW_LINE>String newTypeName = ParameterInfo.stripEllipsis(type.trim()).trim();<NEW_LINE>String typeLabel = BasicElementLabels.getJavaElementName(type);<NEW_LINE>if ("".equals(newTypeName.trim())) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>String msg = Messages.format(RefactoringCoreMessages.TypeContextChecker_parameter_type, typeLabel);<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(msg);<NEW_LINE>}<NEW_LINE>if (ParameterInfo.isVarargs(type) && !JavaModelUtil.is50OrHigher(project)) {<NEW_LINE>String msg = Messages.format(RefactoringCoreMessages.TypeContextChecker_no_vararg_below_50, typeLabel);<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(msg);<NEW_LINE>}<NEW_LINE>List<String> problemsCollector = new ArrayList<>(0);<NEW_LINE>Type parsedType = parseType(newTypeName, project, problemsCollector);<NEW_LINE>boolean valid = parsedType != null;<NEW_LINE>if (valid && parsedType instanceof PrimitiveType) {<NEW_LINE>valid = !PrimitiveType.VOID.equals(((PrimitiveType<MASK><NEW_LINE>}<NEW_LINE>if (!valid) {<NEW_LINE>String msg = Messages.format(RefactoringCoreMessages.TypeContextChecker_invalid_type_name, BasicElementLabels.getJavaElementName(newTypeName));<NEW_LINE>return RefactoringStatus.createFatalErrorStatus(msg);<NEW_LINE>}<NEW_LINE>if (problemsCollector.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>RefactoringStatus result = new RefactoringStatus();<NEW_LINE>for (String problem : problemsCollector) {<NEW_LINE>String msg = Messages.format(RefactoringCoreMessages.TypeContextChecker_invalid_type_syntax, new String[] { BasicElementLabels.getJavaElementName(newTypeName), BasicElementLabels.getJavaElementName(problem) });<NEW_LINE>result.addError(msg);<NEW_LINE>}<NEW_LINE>return result;<NEW_LINE>}
) parsedType).getPrimitiveTypeCode());
266,848
private void repositoriesChanged(PropertyChangeEvent evt) {<NEW_LINE>List<RepositoryImpl> oldRepositories = (List) (evt.getOldValue() == null ? Collections.emptyList(<MASK><NEW_LINE>List<RepositoryImpl> newRepositories = (List) (evt.getNewValue() == null ? Collections.emptyList() : evt.getNewValue());<NEW_LINE>Set<RepositoryImpl> removed = new HashSet<RepositoryImpl>(oldRepositories);<NEW_LINE>removed.removeAll(newRepositories);<NEW_LINE>if (!removed.isEmpty()) {<NEW_LINE>// do we want to delete the data permanently???<NEW_LINE>// what if it's a team repo or user recreates the repository???<NEW_LINE>// synchronized (persistedTasks) {<NEW_LINE>// remove from persisting data<NEW_LINE>// }<NEW_LINE>boolean changed = false;<NEW_LINE>for (IssueImpl impl : getScheduledTasks()) {<NEW_LINE>if (removed.contains(impl.getRepositoryImpl())) {<NEW_LINE>if (null != scheduledTasks.remove(impl)) {<NEW_LINE>changed = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (changed) {<NEW_LINE>fireChange();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
) : evt.getOldValue());
624,269
protected void performRewrite(TransformationContext ctx) throws Exception {<NEW_LINE>// path should be the typecast expression<NEW_LINE>TreePath path = ctx.getPath();<NEW_LINE>TreePath exprPath = exprHandle.resolve(ctx.getWorkingCopy());<NEW_LINE>if (path.getLeaf().getKind() != Tree.Kind.TYPE_CAST || exprPath == null || !EXPRESSION_KINDS.contains(exprPath.getLeaf().getKind())) {<NEW_LINE>// PENDING - some message ?<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>TreeMaker make = ctx.getWorkingCopy().getTreeMaker();<NEW_LINE>TypeCastTree cast = (TypeCastTree) path.getLeaf();<NEW_LINE>// rewrite the type cast to the casted Math.random()<NEW_LINE>copy.rewrite(path.getLeaf(), cast.getExpression());<NEW_LINE>// rewrite the outermost expression to a typecast of it<NEW_LINE>ExpressionTree expr = (ExpressionTree) exprPath.getLeaf();<NEW_LINE>if (expr.getKind() != Tree.Kind.PARENTHESIZED) {<NEW_LINE>expr = make.Parenthesized(expr);<NEW_LINE>}<NEW_LINE>copy.rewrite(exprPath.getLeaf(), make.TypeCast(cast.getType(), (ExpressionTree) expr));<NEW_LINE>}
WorkingCopy copy = ctx.getWorkingCopy();
1,060,962
public void startTomcat() throws LifecycleException {<NEW_LINE>tomcat = new Tomcat();<NEW_LINE>tomcat.setPort(randomPort);<NEW_LINE>tomcat.setHostname("localhost");<NEW_LINE>String appBase = ".";<NEW_LINE>tomcat.getHost().setAppBase(appBase);<NEW_LINE>File docBase = new File(System.getProperty("java.io.tmpdir"));<NEW_LINE>Context context = tomcat.addContext("", docBase.getAbsolutePath());<NEW_LINE>// add a servlet<NEW_LINE>Class servletClass = MyServlet.class;<NEW_LINE>Tomcat.addServlet(context, servletClass.getSimpleName(<MASK><NEW_LINE>context.addServletMappingDecoded("/my-servlet/*", servletClass.getSimpleName());<NEW_LINE>// add a filter and filterMapping<NEW_LINE>Class filterClass = MyFilter.class;<NEW_LINE>FilterDef myFilterDef = new FilterDef();<NEW_LINE>myFilterDef.setFilterClass(filterClass.getName());<NEW_LINE>myFilterDef.setFilterName(filterClass.getSimpleName());<NEW_LINE>context.addFilterDef(myFilterDef);<NEW_LINE>FilterMap myFilterMap = new FilterMap();<NEW_LINE>myFilterMap.setFilterName(filterClass.getSimpleName());<NEW_LINE>myFilterMap.addURLPattern("/my-servlet/*");<NEW_LINE>context.addFilterMap(myFilterMap);<NEW_LINE>tomcat.start();<NEW_LINE>// uncomment for live test<NEW_LINE>// tomcat<NEW_LINE>// .getServer()<NEW_LINE>// .await();<NEW_LINE>}
), servletClass.getName());
556,520
public ODocument toNetworkStream() {<NEW_LINE>ODocument document = new ODocument();<NEW_LINE>document.setTrackingChanges(false);<NEW_LINE>document.field("name", getName());<NEW_LINE>document.field("type", getType().id);<NEW_LINE>document.field("globalId", globalRef.getId());<NEW_LINE>document.field("mandatory", mandatory);<NEW_LINE>document.field("readonly", readonly);<NEW_LINE>document.field("notNull", notNull);<NEW_LINE>document.field("defaultValue", defaultValue);<NEW_LINE>document.field("min", min);<NEW_LINE>document.field("max", max);<NEW_LINE>if (regexp != null) {<NEW_LINE>document.field("regexp", regexp);<NEW_LINE>} else {<NEW_LINE>document.removeField("regexp");<NEW_LINE>}<NEW_LINE>if (linkedType != null)<NEW_LINE>document.field("linkedType", linkedType.id);<NEW_LINE>if (linkedClass != null || linkedClassName != null)<NEW_LINE>document.field("linkedClass", linkedClass != null ? linkedClass.getName() : linkedClassName);<NEW_LINE>document.field("customFields", customFields != null && customFields.size() > 0 ? <MASK><NEW_LINE>if (collate != null) {<NEW_LINE>document.field("collate", collate.getName());<NEW_LINE>}<NEW_LINE>document.field("description", description);<NEW_LINE>return document;<NEW_LINE>}
customFields : null, OType.EMBEDDEDMAP);
163,635
public static List<String> serializeTree(Node node) {<NEW_LINE>List<String> serialized = new ArrayList<>();<NEW_LINE>int id = 0;<NEW_LINE>Deque<NodeSerializable> nodeQ = new ArrayDeque<>();<NEW_LINE>nodeQ.addFirst(new NodeSerializable().setNode(node).setId(id++));<NEW_LINE>while (!nodeQ.isEmpty()) {<NEW_LINE>NodeSerializable nodeSerializable = nodeQ.pollLast();<NEW_LINE>if (!(nodeSerializable.node.isLeaf())) {<NEW_LINE>int len = nodeSerializable.node.getNextNodes().length;<NEW_LINE>int[] nextIds = new int[len];<NEW_LINE>for (int j = 0; j < nodeSerializable.node.getNextNodes().length; ++j) {<NEW_LINE>nextIds[j] = id;<NEW_LINE>nodeQ.addFirst(new NodeSerializable().setNode(nodeSerializable.node.getNextNodes()[j]<MASK><NEW_LINE>}<NEW_LINE>nodeSerializable.setNextIds(nextIds);<NEW_LINE>}<NEW_LINE>serialized.add(JsonConverter.toJson(nodeSerializable));<NEW_LINE>}<NEW_LINE>return serialized;<NEW_LINE>}
).setId(id++));
1,081,682
private synchronized void doDelegate(Collection<? extends LookupProvider> providers) {<NEW_LINE>// unregister listeners from the old results:<NEW_LINE>for (Lookup.Result<?> r : results) {<NEW_LINE>r.removeLookupListener(this);<NEW_LINE>}<NEW_LINE>List<Lookup> newLookups = new ArrayList<Lookup>();<NEW_LINE>for (LookupProvider elem : providers) {<NEW_LINE>if (old.contains(elem)) {<NEW_LINE>int index = old.indexOf(elem);<NEW_LINE>newLookups.add<MASK><NEW_LINE>} else {<NEW_LINE>Lookup newone = elem.createAdditionalLookup(baseLookup);<NEW_LINE>assert newone != null;<NEW_LINE>newLookups.add(newone);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>old = new ArrayList<LookupProvider>(providers);<NEW_LINE>currentLookups = newLookups;<NEW_LINE>newLookups.add(baseLookup);<NEW_LINE>Lookup lkp = new ProxyLookup(newLookups.toArray(new Lookup[newLookups.size()]));<NEW_LINE>setLookups(lkp);<NEW_LINE>}
(currentLookups.get(index));
809,808
public DeleteLoadBalancerResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteLoadBalancerResult deleteLoadBalancerResult = new DeleteLoadBalancerResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return deleteLoadBalancerResult;<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("operations", targetDepth)) {<NEW_LINE>context.nextToken();<NEW_LINE>deleteLoadBalancerResult.setOperations(new ListUnmarshaller<Operation>(OperationJsonUnmarshaller.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 deleteLoadBalancerResult;<NEW_LINE>}
int originalDepth = context.getCurrentDepth();
584,885
public void attached(Database database) {<NEW_LINE>for (Map.Entry<String, String> param : this.databaseParams.entrySet()) {<NEW_LINE>try {<NEW_LINE>ObjectUtil.setProperty(database, param.getKey(<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>Scope.getCurrentScope().getLog(getClass()).warning("Error setting database parameter " + param.getKey() + ": " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (database instanceof AbstractJdbcDatabase) {<NEW_LINE>((AbstractJdbcDatabase) database).setCaseSensitive(this.caseSensitive);<NEW_LINE>}<NEW_LINE>if (snapshot == null) {<NEW_LINE>try {<NEW_LINE>snapshot = new EmptyDatabaseSnapshot(database);<NEW_LINE>} catch (DatabaseException | InvalidExampleException e) {<NEW_LINE>throw new UnexpectedLiquibaseException(e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>ChangeLogHistoryServiceFactory.getInstance().register(createChangeLogHistoryService(database));<NEW_LINE>}
), param.getValue());
732,123
public void paint(Editor editor, Graphics g, Rectangle r) {<NEW_LINE>final TextAttributes color = editor.getColorsScheme().getAttributes(myKey);<NEW_LINE>ColorValue bgColor = color.getBackgroundColor();<NEW_LINE>if (bgColor == null) {<NEW_LINE>bgColor = color.getForegroundColor();<NEW_LINE>}<NEW_LINE>if (editor.getSettings().isLineNumbersShown() || ((EditorGutterComponentEx) editor.getGutter()).isAnnotationsShown()) {<NEW_LINE>if (bgColor != null) {<NEW_LINE>bgColor = bgColor.withAlpha(0.6f);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (bgColor != null) {<NEW_LINE>g.setColor<MASK><NEW_LINE>}<NEW_LINE>g.fillRect(r.x, r.y, r.width, r.height);<NEW_LINE>final LineData lineData = getLineData(editor.xyToLogicalPosition(new Point(0, r.y)).line);<NEW_LINE>if (lineData != null && lineData.isCoveredByOneTest()) {<NEW_LINE>TargetAWT.to(AllIcons.Gutter.Unique).paintIcon(editor.getComponent(), g, r.x, r.y);<NEW_LINE>}<NEW_LINE>}
(TargetAWT.to(bgColor));
1,616,394
private void readObject(ObjectInputStream input) throws ClassNotFoundException, IOException {<NEW_LINE>input.defaultReadObject();<NEW_LINE>this.proxyRestrictionAudience <MASK><NEW_LINE>this.signerCertificates = new ArrayList<X509Certificate>();<NEW_LINE>this.signerCertificateDN = new ArrayList<String>();<NEW_LINE>this.confirmationMethod = new ArrayList<String>();<NEW_LINE>this.audienceRestriction = new ArrayList<String>();<NEW_LINE>this.attributes = new ArrayList<Saml20Attribute>();<NEW_LINE>this.maps = new HashMap<String, Object>();<NEW_LINE>this.wasDeserialized = true;<NEW_LINE>ByteArrayDecoder bad = new ByteArrayDecoder();<NEW_LINE>try {<NEW_LINE>Assertion assertion = (Assertion) bad.unmarshallMessage(new ByteArrayInputStream(samlString.getBytes()));<NEW_LINE>this.init(assertion);<NEW_LINE>} catch (MessageDecodingException e) {<NEW_LINE>throw new IOException("Error unmarshalling SAML during deserialization. " + e.getMessage(), e);<NEW_LINE>} catch (SamlException e) {<NEW_LINE>throw new IOException("Error initializing " + Saml20TokenImpl.class.getSimpleName() + " during deserialization. " + e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}
= new ArrayList<String>();
813,130
protected void afterHookedMethod(MethodHookParam param) throws Throwable {<NEW_LINE>Hookers.logD("LoadedApk#<init> starts");<NEW_LINE>try {<NEW_LINE>LoadedApk loadedApk = (LoadedApk) param.thisObject;<NEW_LINE>String packageName = loadedApk.getPackageName();<NEW_LINE>Object mAppDir = XposedHelpers.getObjectField(loadedApk, "mAppDir");<NEW_LINE>Hookers.logD("LoadedApk#<init> ends: " + mAppDir);<NEW_LINE>XResources.setPackageNameForResDir(packageName, loadedApk.getResDir());<NEW_LINE>if (packageName.equals("android")) {<NEW_LINE>Hookers.logD("LoadedApk#<init> is android, skip: " + mAppDir);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// mIncludeCode checking should go ahead of loadedPackagesInProcess added checking<NEW_LINE>if (!XposedHelpers.getBooleanField(loadedApk, "mIncludeCode")) {<NEW_LINE>Hookers.logD("LoadedApk#<init> mIncludeCode == false: " + mAppDir);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!XposedInit.loadedPackagesInProcess.add(packageName)) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// OnePlus magic...<NEW_LINE>if (Log.getStackTraceString(new Throwable()).contains("android.app.ActivityThread$ApplicationThread.schedulePreload")) {<NEW_LINE>Hookers.logD("LoadedApk#<init> maybe oneplus's custom opt, skip");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LoadedApkGetCL hook = new LoadedApkGetCL(loadedApk, packageName, AndroidAppHelper.currentProcessName(), false);<NEW_LINE>hook.setUnhook(XposedHelpers.findAndHookMethod(LoadedApk.class, "getClassLoader", hook));<NEW_LINE>} catch (Throwable t) {<NEW_LINE>Hookers.logE("error when hooking LoadedApk.<init>", t);<NEW_LINE>}<NEW_LINE>}
Hookers.logD("LoadedApk#<init> has been loaded before, skip: " + mAppDir);
1,199,402
public Joiner skipNulls() {<NEW_LINE>return new Joiner(this) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public <A extends Appendable> A appendTo(A appendable, Iterator<? extends @Nullable Object> parts) throws IOException {<NEW_LINE>checkNotNull(appendable, "appendable");<NEW_LINE>checkNotNull(parts, "parts");<NEW_LINE>while (parts.hasNext()) {<NEW_LINE><MASK><NEW_LINE>if (part != null) {<NEW_LINE>appendable.append(Joiner.this.toString(part));<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>while (parts.hasNext()) {<NEW_LINE>Object part = parts.next();<NEW_LINE>if (part != null) {<NEW_LINE>appendable.append(separator);<NEW_LINE>appendable.append(Joiner.this.toString(part));<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return appendable;<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Joiner useForNull(String nullText) {<NEW_LINE>throw new UnsupportedOperationException("already specified skipNulls");<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public MapJoiner withKeyValueSeparator(String kvs) {<NEW_LINE>throw new UnsupportedOperationException("can't use .skipNulls() with maps");<NEW_LINE>}<NEW_LINE>};<NEW_LINE>}
Object part = parts.next();
72,586
public void addPages() {<NEW_LINE>// Create a page, set the title, and the initial model file name.<NEW_LINE>//<NEW_LINE>newFileCreationPage = new OpenDDSModelWizardNewFileCreationPage("Whatever", selection);<NEW_LINE>newFileCreationPage.setTitle(OpenDDSEditorPlugin.INSTANCE.getString("_UI_OpenDDSModelWizard_label"));<NEW_LINE>newFileCreationPage.setDescription(OpenDDSEditorPlugin.INSTANCE.getString("_UI_OpenDDSModelWizard_description"));<NEW_LINE>newFileCreationPage.setFileName(OpenDDSEditorPlugin.INSTANCE.getString("_UI_OpenDDSEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));<NEW_LINE>addPage(newFileCreationPage);<NEW_LINE>// Try and get the resource selection to determine a current directory for the file dialog.<NEW_LINE>//<NEW_LINE>if (selection != null && !selection.isEmpty()) {<NEW_LINE>// Get the resource...<NEW_LINE>//<NEW_LINE>Object selectedElement = selection.iterator().next();<NEW_LINE>if (selectedElement instanceof IResource) {<NEW_LINE>// Get the resource parent, if its a file.<NEW_LINE>//<NEW_LINE>IResource selectedResource = (IResource) selectedElement;<NEW_LINE>if (selectedResource.getType() == IResource.FILE) {<NEW_LINE>selectedResource = selectedResource.getParent();<NEW_LINE>}<NEW_LINE>// This gives us a directory...<NEW_LINE>//<NEW_LINE>if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {<NEW_LINE>// Set this for the container.<NEW_LINE>//<NEW_LINE>newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());<NEW_LINE>// Make up a unique new name here.<NEW_LINE>//<NEW_LINE>String defaultModelBaseFilename = OpenDDSEditorPlugin.INSTANCE.getString("_UI_OpenDDSEditorFilenameDefaultBase");<NEW_LINE>String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);<NEW_LINE>String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;<NEW_LINE>for (int i = 1; ((IContainer) selectedResource).findMember(modelFilename) != null; ++i) {<NEW_LINE>modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;<NEW_LINE>}<NEW_LINE>newFileCreationPage.setFileName(modelFilename);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>initialObjectCreationPage = new OpenDDSModelWizardInitialObjectCreationPage("Whatever2");<NEW_LINE>initialObjectCreationPage.setTitle(OpenDDSEditorPlugin.INSTANCE.getString("_UI_OpenDDSModelWizard_label"));<NEW_LINE>initialObjectCreationPage.setDescription(OpenDDSEditorPlugin<MASK><NEW_LINE>addPage(initialObjectCreationPage);<NEW_LINE>}
.INSTANCE.getString("_UI_Wizard_initial_object_description"));
994,977
void queueBufferForAssetStorage(int assetid, byte[] buffer) {<NEW_LINE>UserError.Log.d(TAG, "QUEUE BUFFER FOR ASSET STORAGE: " + assetid + " " + buffer.length);<NEW_LINE>int startChunk = 1;<NEW_LINE>if (buffer.length > 65535) {<NEW_LINE>throw new RuntimeException("To big for page");<NEW_LINE>}<NEW_LINE>// warning nixes all pending items! but otherwise we don't have sequence set up<NEW_LINE>commandQueue.clear();<NEW_LINE>while (buffer.length > 0) {<NEW_LINE>val chunk = Arrays.copyOfRange(buffer, 0, Math.min(buffer.length, 256));<NEW_LINE>UserError.Log.d(TAG, "Buffer Chunk size: " + chunk.length);<NEW_LINE>buffer = Arrays.copyOfRange(buffer, chunk.length, buffer.length);<NEW_LINE>UserError.Log.d(TAG, "buffer size remaining: " + <MASK><NEW_LINE>final ThinJamItem item = new ThinJamItem(0, 0, 0, 0, chunk).setSpecificId(((assetid >> 7) & 0xff) | (byte) 0x80).setType(((assetid & 0x7f))).useAck().setSequence(startChunk);<NEW_LINE>commandQueue.add(item);<NEW_LINE>startChunk++;<NEW_LINE>}<NEW_LINE>}
buffer.length + " chunk: " + startChunk);
1,297,272
public void writeAllCurrentRequestsAsPart(Map<JavaInformations, List<CounterRequestContext>> currentRequests, Collector collector, List<Counter> counters, long timeOfSnapshot) throws IOException {<NEW_LINE>try {<NEW_LINE>document.open();<NEW_LINE>// on remplace les parentCounters<NEW_LINE>final List<CounterRequestContext> allCurrentRequests = new ArrayList<>();<NEW_LINE>for (final List<CounterRequestContext> rootCurrentContexts : currentRequests.values()) {<NEW_LINE>allCurrentRequests.addAll(rootCurrentContexts);<NEW_LINE>}<NEW_LINE>CounterRequestContext.replaceParentCounters(allCurrentRequests, counters);<NEW_LINE>final List<PdfCounterReport> pdfCounterReports = new ArrayList<>();<NEW_LINE>// ce range n'a pas d'importance pour ce pdf<NEW_LINE>final Range range = Period.TOUT.getRange();<NEW_LINE>for (final Counter counter : counters) {<NEW_LINE>final PdfCounterReport pdfCounterReport = new PdfCounterReport(collector, counter, range, false, document);<NEW_LINE>pdfCounterReports.add(pdfCounterReport);<NEW_LINE>}<NEW_LINE>final Font normalFont = PdfFonts.NORMAL.getFont();<NEW_LINE>for (final Map.Entry<JavaInformations, List<CounterRequestContext>> entry : currentRequests.entrySet()) {<NEW_LINE>final JavaInformations javaInformations = entry.getKey();<NEW_LINE>final List<CounterRequestContext<MASK><NEW_LINE>addParagraph(getString("Requetes_en_cours"), "hourglass.png");<NEW_LINE>if (rootCurrentContexts.isEmpty()) {<NEW_LINE>addToDocument(new Phrase(getString("Aucune_requete_en_cours"), normalFont));<NEW_LINE>} else {<NEW_LINE>final PdfCounterRequestContextReport pdfCounterRequestContextReport = new PdfCounterRequestContextReport(rootCurrentContexts, pdfCounterReports, javaInformations.getThreadInformationsList(), javaInformations.isStackTraceEnabled(), pdfDocumentFactory, document);<NEW_LINE>pdfCounterRequestContextReport.setTimeOfSnapshot(timeOfSnapshot);<NEW_LINE>pdfCounterRequestContextReport.writeContextDetails();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} catch (final DocumentException e) {<NEW_LINE>throw createIOException(e);<NEW_LINE>}<NEW_LINE>document.close();<NEW_LINE>}
> rootCurrentContexts = entry.getValue();
1,561,918
public static void vertical3(Kernel1D_S32 kernel, GrayU8 input, GrayI16 output, int skip) {<NEW_LINE>final byte[] dataSrc = input.data;<NEW_LINE>final short[] dataDst = output.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final <MASK><NEW_LINE>final int width = input.width;<NEW_LINE>final int heightEnd = UtilDownConvolve.computeMaxSide(input.height, skip, radius);<NEW_LINE>final int offsetY = UtilDownConvolve.computeOffset(skip, radius);<NEW_LINE>for (int y = offsetY; y <= heightEnd; y += skip) {<NEW_LINE>int indexDst = output.startIndex + (y / skip) * output.stride;<NEW_LINE>int i = input.startIndex + (y - radius) * input.stride;<NEW_LINE>final int iEnd = i + width;<NEW_LINE>for (; i < iEnd; i++) {<NEW_LINE>int indexSrc = i;<NEW_LINE>int total = (dataSrc[indexSrc] & 0xFF) * k1;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k2;<NEW_LINE>indexSrc += input.stride;<NEW_LINE>total += (dataSrc[indexSrc] & 0xFF) * k3;<NEW_LINE>dataDst[indexDst++] = (short) total;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
int radius = kernel.getRadius();
1,757,168
public Pair<List<? extends Site2SiteVpnGateway>, Integer> searchForVpnGateways(ListVpnGatewaysCmd cmd) {<NEW_LINE>Long id = cmd.getId();<NEW_LINE>Long vpcId = cmd.getVpcId();<NEW_LINE>Boolean display = cmd.getDisplay();<NEW_LINE>Long domainId = cmd.getDomainId();<NEW_LINE>boolean isRecursive = cmd.isRecursive();<NEW_LINE>String accountName = cmd.getAccountName();<NEW_LINE>boolean listAll = cmd.listAll();<NEW_LINE>long startIndex = cmd.getStartIndex();<NEW_LINE>long pageSizeVal = cmd.getPageSizeVal();<NEW_LINE>Account caller = CallContext.current().getCallingAccount();<NEW_LINE>List<Long> permittedAccounts = new ArrayList<Long>();<NEW_LINE>Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject = new Ternary<Long, Boolean, ListProjectResourcesCriteria>(domainId, isRecursive, null);<NEW_LINE>_accountMgr.buildACLSearchParameters(caller, id, accountName, cmd.getProjectId(), permittedAccounts, domainIdRecursiveListProject, listAll, false);<NEW_LINE>domainId = domainIdRecursiveListProject.first();<NEW_LINE>isRecursive = domainIdRecursiveListProject.second();<NEW_LINE>ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third();<NEW_LINE>Filter searchFilter = new Filter(Site2SiteVpnGatewayVO.class, "id", false, startIndex, pageSizeVal);<NEW_LINE>SearchBuilder<Site2SiteVpnGatewayVO> sb = _vpnGatewayDao.createSearchBuilder();<NEW_LINE>_accountMgr.buildACLSearchBuilder(sb, <MASK><NEW_LINE>sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);<NEW_LINE>sb.and("vpcId", sb.entity().getVpcId(), SearchCriteria.Op.EQ);<NEW_LINE>sb.and("display", sb.entity().isDisplay(), SearchCriteria.Op.EQ);<NEW_LINE>SearchCriteria<Site2SiteVpnGatewayVO> sc = sb.create();<NEW_LINE>_accountMgr.buildACLSearchCriteria(sc, domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);<NEW_LINE>if (id != null) {<NEW_LINE>sc.addAnd("id", SearchCriteria.Op.EQ, id);<NEW_LINE>}<NEW_LINE>if (display != null) {<NEW_LINE>sc.setParameters("display", display);<NEW_LINE>}<NEW_LINE>if (vpcId != null) {<NEW_LINE>sc.addAnd("vpcId", SearchCriteria.Op.EQ, vpcId);<NEW_LINE>}<NEW_LINE>Pair<List<Site2SiteVpnGatewayVO>, Integer> result = _vpnGatewayDao.searchAndCount(sc, searchFilter);<NEW_LINE>return new Pair<List<? extends Site2SiteVpnGateway>, Integer>(result.first(), result.second());<NEW_LINE>}
domainId, isRecursive, permittedAccounts, listProjectResourcesCriteria);
62,666
public X509Certificate[] sendHPB() throws IOException, GeneralSecurityException, AxelorException, JDOMException {<NEW_LINE>HPBRequestElement request;<NEW_LINE>KeyManagementResponseElement response;<NEW_LINE>HttpRequestSender sender;<NEW_LINE>HPBResponseOrderDataElement orderData;<NEW_LINE>ContentFactory factory;<NEW_LINE>int httpCode;<NEW_LINE>sender = new HttpRequestSender(session);<NEW_LINE>request = new HPBRequestElement(session);<NEW_LINE>request.build();<NEW_LINE>request.validate();<NEW_LINE>httpCode = sender.send(new ByteArrayContentFactory<MASK><NEW_LINE>EbicsUtils.checkHttpCode(httpCode);<NEW_LINE>response = new KeyManagementResponseElement(sender.getResponseBody(), "HBPResponse", session.getUser());<NEW_LINE>response.build();<NEW_LINE>response.report(new EbicsRootElement[] { request, response });<NEW_LINE>EbicsUserService userService = Beans.get(EbicsUserService.class);<NEW_LINE>factory = new ByteArrayContentFactory(EbicsUtils.unzip(userService.decrypt(session.getUser(), response.getOrderData(), response.getTransactionKey())));<NEW_LINE>orderData = new HPBResponseOrderDataElement(factory, session.getUser());<NEW_LINE>orderData.build();<NEW_LINE>return createCertificates(orderData);<NEW_LINE>}
(request.prettyPrint()));
1,271,880
protected void generateExpressionResultCode(BlockScope currentScope, CodeStream codeStream) {<NEW_LINE>SwitchExpression se = this.switchExpression;<NEW_LINE>if (se != null && se.containsTry && se.resolvedType != null) {<NEW_LINE>addSecretYieldResultValue(this.scope);<NEW_LINE>assert this.secretYieldResultValue != null;<NEW_LINE>codeStream.record(this.secretYieldResultValue);<NEW_LINE>SingleNameReference lhs = new SingleNameReference(this.secretYieldResultValue.name, 0);<NEW_LINE>lhs.binding = this.secretYieldResultValue;<NEW_LINE>// clear bits<NEW_LINE>lhs.bits &= ~ASTNode.RestrictiveFlagMASK;<NEW_LINE>lhs.bits |= Binding.LOCAL;<NEW_LINE>lhs.bits |= ASTNode.IsSecretYieldValueUsage;<NEW_LINE>// TODO : Can be skipped?<NEW_LINE>((LocalVariableBinding) lhs.binding).markReferenced();<NEW_LINE>Assignment assignment = new Assignment(<MASK><NEW_LINE>assignment.generateCode(this.scope, codeStream);<NEW_LINE>int l = this.subroutines == null ? 0 : this.subroutines.length;<NEW_LINE>boolean foundFinally = false;<NEW_LINE>if (l > 0) {<NEW_LINE>for (int i = 0; i < l; ++i) {<NEW_LINE>SubRoutineStatement srs = this.subroutines[i];<NEW_LINE>srs.exitAnyExceptionHandler();<NEW_LINE>srs.exitDeclaredExceptionHandlers(codeStream);<NEW_LINE>if (srs instanceof TryStatement) {<NEW_LINE>TryStatement ts = (TryStatement) srs;<NEW_LINE>if (ts.finallyBlock != null) {<NEW_LINE>foundFinally = true;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (!foundFinally) {<NEW_LINE>// no finally - TODO: Check for SynSta?<NEW_LINE>se.loadStoredTypesAndKeep(codeStream);<NEW_LINE>codeStream.load(this.secretYieldResultValue);<NEW_LINE>}<NEW_LINE>codeStream.removeVariable(this.secretYieldResultValue);<NEW_LINE>} else {<NEW_LINE>this.expression.generateCode(this.scope, codeStream, se != null);<NEW_LINE>}<NEW_LINE>}
lhs, this.expression, 0);
819,864
public OCommandExecutorSQLCreateUser parse(OCommandRequest iRequest) {<NEW_LINE>init((OCommandRequestText) iRequest);<NEW_LINE>parserRequiredKeyword(KEYWORD_CREATE);<NEW_LINE>parserRequiredKeyword(KEYWORD_USER);<NEW_LINE>this.userName = parserRequiredWord(false, "Expected <user-name>");<NEW_LINE>parserRequiredKeyword(KEYWORD_IDENTIFIED);<NEW_LINE>parserRequiredKeyword(KEYWORD_BY);<NEW_LINE>this.pass = parserRequiredWord(false, "Expected <user-password>");<NEW_LINE>this.roles = new ArrayList<String>();<NEW_LINE>String temp;<NEW_LINE>while ((temp = parseOptionalWord(true)) != null) {<NEW_LINE>if (parserIsEnded()) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (temp.equals(KEYWORD_ROLE)) {<NEW_LINE>String role = parserRequiredWord(false, "Expected <role-name>");<NEW_LINE>int roleLen = (role != null) ? role.length() : 0;<NEW_LINE>if (roleLen > 0) {<NEW_LINE>if (role.charAt(0) == '[' && role.charAt(roleLen - 1) == ']') {<NEW_LINE>role = role.substring(1, role.length() - 1);<NEW_LINE>String[] <MASK><NEW_LINE>for (String spl : splits) {<NEW_LINE>if (spl.length() > 0) {<NEW_LINE>this.roles.add(spl);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>this.roles.add(role);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>return this;<NEW_LINE>}
splits = role.split("[, ]");
1,196,211
public static void execute(ManagerConnection c, int numLines) {<NEW_LINE>ByteBuffer buffer = c.allocate();<NEW_LINE>// write header<NEW_LINE>buffer = header.write(buffer, c, true);<NEW_LINE>// write fields<NEW_LINE>for (FieldPacket field : fields) {<NEW_LINE>buffer = field.write(buffer, c, true);<NEW_LINE>}<NEW_LINE>// write eof<NEW_LINE>buffer = eof.write(buffer, c, true);<NEW_LINE>// write rows<NEW_LINE>byte packetId = eof.packetId;<NEW_LINE>String filename = SystemConfig.getHomePath() + File.separator <MASK><NEW_LINE>String[] lines = getLinesByLogFile(filename, numLines);<NEW_LINE>boolean linesIsEmpty = true;<NEW_LINE>for (int i = 0; i < lines.length; i++) {<NEW_LINE>String line = lines[i];<NEW_LINE>if (line != null) {<NEW_LINE>RowDataPacket row = new RowDataPacket(FIELD_COUNT);<NEW_LINE>row.add(StringUtil.encode(line.substring(0, 19), c.getCharset()));<NEW_LINE>row.add(StringUtil.encode(line.substring(19, line.length()), c.getCharset()));<NEW_LINE>row.packetId = ++packetId;<NEW_LINE>buffer = row.write(buffer, c, true);<NEW_LINE>linesIsEmpty = false;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (linesIsEmpty) {<NEW_LINE>RowDataPacket row = new RowDataPacket(FIELD_COUNT);<NEW_LINE>row.add(StringUtil.encode("NULL", c.getCharset()));<NEW_LINE>row.add(StringUtil.encode("NULL", c.getCharset()));<NEW_LINE>row.packetId = ++packetId;<NEW_LINE>buffer = row.write(buffer, c, true);<NEW_LINE>}<NEW_LINE>// write last eof<NEW_LINE>EOFPacket lastEof = new EOFPacket();<NEW_LINE>lastEof.packetId = ++packetId;<NEW_LINE>buffer = lastEof.write(buffer, c, true);<NEW_LINE>// write buffer<NEW_LINE>c.write(buffer);<NEW_LINE>}
+ "logs" + File.separator + "mycat.log";
1,100,824
protected int update(Connection conn, BaseClient newClient) {<NEW_LINE>String methodName = "update";<NEW_LINE>_log.entering(CLASS, methodName, new Object[] { conn, newClient });<NEW_LINE>PreparedStatement st = null;<NEW_LINE>int retVal = 0;<NEW_LINE>try {<NEW_LINE>String insert = "UPDATE " + tableName + " SET " + TableConstants.COL_CC2_COMPONENTID + "=? ," + TableConstants.COL_CC2_CLIENTSECRET + "=? ," + TableConstants.COL_CC2_DISPLAYNAME + "=? ," + TableConstants.COL_CC2_REDIRECTURI + "=? ," + TableConstants.COL_CC2_ENABLED + "=? " + "WHERE " + TableConstants.COL_CC2_CLIENTID + " = ? AND " + TableConstants.COL_CC2_COMPONENTID + " = ?";<NEW_LINE>st = conn.prepareStatement(insert);<NEW_LINE>st.setString(1, componentId);<NEW_LINE>st.setString(2, newClient.getClientSecret());<NEW_LINE>st.setString(3, newClient.getClientName());<NEW_LINE>// This class isn't used anymore.. it has been superceded by CachedDBOidcClientProvider<NEW_LINE>// st.setString(4, newClient.getRedirectUri());<NEW_LINE>// enabled<NEW_LINE>st.setInt(5, newClient.<MASK><NEW_LINE>st.setString(6, newClient.getClientId());<NEW_LINE>st.setString(7, componentId);<NEW_LINE>retVal = st.executeUpdate();<NEW_LINE>} catch (SQLException e) {<NEW_LINE>// log but don't fail<NEW_LINE>_log.logp(Level.SEVERE, CLASS, methodName, e.getMessage(), e);<NEW_LINE>} finally {<NEW_LINE>if (st != null) {<NEW_LINE>try {<NEW_LINE>st.close();<NEW_LINE>} catch (SQLException e) {<NEW_LINE>_log.logp(Level.SEVERE, CLASS, methodName, e.getMessage(), e);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>_log.exiting(CLASS, methodName, retVal);<NEW_LINE>}<NEW_LINE>return retVal;<NEW_LINE>}
isEnabled() ? 1 : 0);
1,564,948
public void computeColors() {<NEW_LINE>// SootAttributesHandler handler, ITextViewer viewer, IEditorPart editorPart){<NEW_LINE>if ((getHandler() == null) || (getHandler().getAttrList() == null))<NEW_LINE>return;<NEW_LINE>ArrayList sortedAttrs = sortAttrsByLength(<MASK><NEW_LINE>Iterator it = sortedAttrs.iterator();<NEW_LINE>setStyleList(new ArrayList());<NEW_LINE>getDisplay().asyncExec(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>if ((getViewer() != null) && (getViewer().getTextWidget() != null)) {<NEW_LINE>setBgColor(getViewer().getTextWidget().getBackground());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>});<NEW_LINE>while (it.hasNext()) {<NEW_LINE>// sets colors for stmts<NEW_LINE>SootAttribute sa = (SootAttribute) it.next();<NEW_LINE>if ((sa.getJavaStartLn() != 0) && (sa.getJavaEndLn() != 0)) {<NEW_LINE>if (sa.getJavaStartPos() != 0 && sa.getJavaEndPos() != 0) {<NEW_LINE>if (sa.getColorList() != null) {<NEW_LINE>Iterator cit = sa.getColorList().iterator();<NEW_LINE>while (cit.hasNext()) {<NEW_LINE>ColorAttribute ca = (ColorAttribute) cit.next();<NEW_LINE>if (getHandler().isShowAllTypes()) {<NEW_LINE>boolean fg = ca.fg() == 1 ? true : false;<NEW_LINE>// , tp);<NEW_LINE>setAttributeTextColor(sa.getJavaStartLn(), sa.getJavaEndLn(), sa.getJavaStartPos() + 1, sa.getJavaEndPos() + 1, ca.getRGBColor(), fg);<NEW_LINE>} else {<NEW_LINE>if (getHandler().getTypesToShow().contains(ca.type())) {<NEW_LINE>boolean fg = ca.fg() == 1 ? true : false;<NEW_LINE>// , tp);<NEW_LINE>setAttributeTextColor(sa.getJavaStartLn(), sa.getJavaEndLn(), sa.getJavaStartPos() + 1, sa.getJavaEndPos() + 1, ca.getRGBColor(), fg);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>changeStyles();<NEW_LINE>}
getHandler().getAttrList());
127,882
public com.amazonaws.services.clouddirectory.model.StillContainsLinksException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.clouddirectory.model.StillContainsLinksException stillContainsLinksException = new com.amazonaws.services.clouddirectory.model.StillContainsLinksException(null);<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MASK><NEW_LINE>if (token == null)<NEW_LINE>token = context.nextToken();<NEW_LINE>if (token == VALUE_NULL) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>while (true) {<NEW_LINE>if (token == null)<NEW_LINE>break;<NEW_LINE>if (token == FIELD_NAME || token == START_OBJECT) {<NEW_LINE>} 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 stillContainsLinksException;<NEW_LINE>}
JsonToken token = context.getCurrentToken();
1,268,178
public final void command_output() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST command_output_AST = null;<NEW_LINE>switch(LA(1)) {<NEW_LINE>case COMMAND_OUTPUT:<NEW_LINE>{<NEW_LINE>AST tmp288_AST = null;<NEW_LINE>tmp288_AST = astFactory<MASK><NEW_LINE>astFactory.addASTChild(currentAST, tmp288_AST);<NEW_LINE>match(COMMAND_OUTPUT);<NEW_LINE>command_output_AST = (AST) currentAST.root;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case COMMAND_OUTPUT_BEFORE_EXPRESSION_SUBSTITUTION:<NEW_LINE>{<NEW_LINE>AST tmp289_AST = null;<NEW_LINE>tmp289_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.makeASTRoot(currentAST, tmp289_AST);<NEW_LINE>match(COMMAND_OUTPUT_BEFORE_EXPRESSION_SUBSTITUTION);<NEW_LINE>expression_substituation();<NEW_LINE>astFactory.addASTChild(currentAST, returnAST);<NEW_LINE>if (inputState.guessing == 0) {<NEW_LINE>tellLexerWeHaveFinishedParsingStringExpressionSubstituation();<NEW_LINE>}<NEW_LINE>{<NEW_LINE>_loop218: do {<NEW_LINE>if ((LA(1) == STRING_BETWEEN_EXPRESSION_SUBSTITUTION)) {<NEW_LINE>AST tmp290_AST = null;<NEW_LINE>tmp290_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp290_AST);<NEW_LINE>match(STRING_BETWEEN_EXPRESSION_SUBSTITUTION);<NEW_LINE>expression_substituation();<NEW_LINE>astFactory.addASTChild(currentAST, returnAST);<NEW_LINE>if (inputState.guessing == 0) {<NEW_LINE>tellLexerWeHaveFinishedParsingStringExpressionSubstituation();<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>break _loop218;<NEW_LINE>}<NEW_LINE>} while (true);<NEW_LINE>}<NEW_LINE>AST tmp291_AST = null;<NEW_LINE>tmp291_AST = astFactory.create(LT(1));<NEW_LINE>astFactory.addASTChild(currentAST, tmp291_AST);<NEW_LINE>match(STRING_AFTER_EXPRESSION_SUBSTITUTION);<NEW_LINE>command_output_AST = (AST) currentAST.root;<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>default:<NEW_LINE>{<NEW_LINE>throw new NoViableAltException(LT(1), getFilename());<NEW_LINE>}<NEW_LINE>}<NEW_LINE>returnAST = command_output_AST;<NEW_LINE>}
.create(LT(1));
374,819
final DeletePackageResult executeDeletePackage(DeletePackageRequest deletePackageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePackageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DeletePackageRequest> request = null;<NEW_LINE>Response<DeletePackageResult> response = null;<NEW_LINE>try {<NEW_LINE>awsRequestMetrics.startEvent(Field.RequestMarshallTime);<NEW_LINE>try {<NEW_LINE>request = new DeletePackageRequestProtocolMarshaller(protocolFactory).marshall(super.beforeMarshalling(deletePackageRequest));<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.<MASK><NEW_LINE>request.addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeletePackage");<NEW_LINE>request.addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig);<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.RequestMarshallTime);<NEW_LINE>}<NEW_LINE>HttpResponseHandler<AmazonWebServiceResponse<DeletePackageResult>> responseHandler = protocolFactory.createResponseHandler(new JsonOperationMetadata().withPayloadJson(true).withHasStreamingSuccessResponse(false), new DeletePackageResultJsonUnmarshaller());<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.SERVICE_ID, "OpenSearch");
1,549,426
public RangeEndpoint append(Object value, Equality equality) {<NEW_LINE>ComponentSerializer<?> serializer = components.get(position);<NEW_LINE>position++;<NEW_LINE>// First, serialize the ByteBuffer for this component<NEW_LINE>ByteBuffer cb;<NEW_LINE>try {<NEW_LINE>cb = serializer.serializeValue(value);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>if (cb == null) {<NEW_LINE>cb = EMPTY_BYTE_BUFFER;<NEW_LINE>}<NEW_LINE>if (cb.limit() + COMPONENT_OVERHEAD > out.remaining()) {<NEW_LINE>int exponent = (int) Math.ceil(Math.log((double) (cb.limit() + COMPONENT_OVERHEAD) / (double) out.limit()) / Math.log(2));<NEW_LINE>int newBufferSize = out.limit() * (int) Math.pow(2, exponent);<NEW_LINE>ByteBuffer temp = ByteBuffer.allocate(newBufferSize);<NEW_LINE>out.flip();<NEW_LINE>temp.put(out);<NEW_LINE>out = temp;<NEW_LINE>}<NEW_LINE>// Write the data: <length><data><0><NEW_LINE>out.putShort((short) cb.remaining());<NEW_LINE>out.put(cb.slice());<NEW_LINE>out.<MASK><NEW_LINE>return this;<NEW_LINE>}
put(equality.toByte());
191,928
public static ListFlowProjectClusterSettingResponse unmarshall(ListFlowProjectClusterSettingResponse listFlowProjectClusterSettingResponse, UnmarshallerContext _ctx) {<NEW_LINE>listFlowProjectClusterSettingResponse.setRequestId(_ctx.stringValue("ListFlowProjectClusterSettingResponse.RequestId"));<NEW_LINE>listFlowProjectClusterSettingResponse.setPageNumber(_ctx.integerValue("ListFlowProjectClusterSettingResponse.PageNumber"));<NEW_LINE>listFlowProjectClusterSettingResponse.setPageSize<MASK><NEW_LINE>listFlowProjectClusterSettingResponse.setTotal(_ctx.integerValue("ListFlowProjectClusterSettingResponse.Total"));<NEW_LINE>List<ClusterSetting> clusterSettings = new ArrayList<ClusterSetting>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("ListFlowProjectClusterSettingResponse.ClusterSettings.Length"); i++) {<NEW_LINE>ClusterSetting clusterSetting = new ClusterSetting();<NEW_LINE>clusterSetting.setGmtCreate(_ctx.longValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].GmtCreate"));<NEW_LINE>clusterSetting.setGmtModified(_ctx.longValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].GmtModified"));<NEW_LINE>clusterSetting.setProjectId(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].ProjectId"));<NEW_LINE>clusterSetting.setClusterId(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].ClusterId"));<NEW_LINE>clusterSetting.setK8sClusterId(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].K8sClusterId"));<NEW_LINE>clusterSetting.setClusterName(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].ClusterName"));<NEW_LINE>clusterSetting.setDefaultUser(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].DefaultUser"));<NEW_LINE>clusterSetting.setDefaultQueue(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].DefaultQueue"));<NEW_LINE>List<String> userList = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].UserList.Length"); j++) {<NEW_LINE>userList.add(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].UserList[" + j + "]"));<NEW_LINE>}<NEW_LINE>clusterSetting.setUserList(userList);<NEW_LINE>List<String> queueList = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].QueueList.Length"); j++) {<NEW_LINE>queueList.add(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].QueueList[" + j + "]"));<NEW_LINE>}<NEW_LINE>clusterSetting.setQueueList(queueList);<NEW_LINE>List<String> hostList = new ArrayList<String>();<NEW_LINE>for (int j = 0; j < _ctx.lengthValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].HostList.Length"); j++) {<NEW_LINE>hostList.add(_ctx.stringValue("ListFlowProjectClusterSettingResponse.ClusterSettings[" + i + "].HostList[" + j + "]"));<NEW_LINE>}<NEW_LINE>clusterSetting.setHostList(hostList);<NEW_LINE>clusterSettings.add(clusterSetting);<NEW_LINE>}<NEW_LINE>listFlowProjectClusterSettingResponse.setClusterSettings(clusterSettings);<NEW_LINE>return listFlowProjectClusterSettingResponse;<NEW_LINE>}
(_ctx.integerValue("ListFlowProjectClusterSettingResponse.PageSize"));
1,252,747
protected void paintTab(final Graphics g, final int tabPlacement, final Rectangle[] rects, final int tabIndex, final Rectangle iconRect, final Rectangle textRect) {<NEW_LINE>final Rectangle tabRect = rects[tabIndex];<NEW_LINE>final int selectedIndex = tabPane.getSelectedIndex();<NEW_LINE>final boolean isSelected = selectedIndex == tabIndex;<NEW_LINE>Graphics2D g2 = null;<NEW_LINE>Polygon cropShape = null;<NEW_LINE>Shape save = null;<NEW_LINE>int cropx = 0;<NEW_LINE>int cropy = 0;<NEW_LINE>if (scrollableTabLayoutEnabled()) {<NEW_LINE>if (g instanceof Graphics2D) {<NEW_LINE>g2 = (Graphics2D) g;<NEW_LINE>// Render visual for cropped tab edge...<NEW_LINE>Rectangle viewRect = tabScroller.viewport.getViewRect();<NEW_LINE>int cropline;<NEW_LINE>switch(tabPlacement) {<NEW_LINE>case LEFT:<NEW_LINE>case RIGHT:<NEW_LINE>cropline = viewRect.y + viewRect.height;<NEW_LINE>if ((tabRect.y < cropline) && (tabRect.y + tabRect.height > cropline)) {<NEW_LINE>cropShape = createCroppedTabClip(tabPlacement, tabRect, cropline);<NEW_LINE>cropx = tabRect.x;<NEW_LINE>cropy = cropline - 1;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case TOP:<NEW_LINE>case BOTTOM:<NEW_LINE>default:<NEW_LINE>cropline = viewRect.x + viewRect.width;<NEW_LINE>if ((tabRect.x < cropline) && (tabRect.x + tabRect.width > cropline)) {<NEW_LINE>cropShape = createCroppedTabClip(tabPlacement, tabRect, cropline);<NEW_LINE>cropx = cropline - 1;<NEW_LINE>cropy = tabRect.y;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (cropShape != null) {<NEW_LINE>save = g.getClip();<NEW_LINE>g2.clip(cropShape);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>paintTabBackground(g, tabPlacement, tabIndex, tabRect.x, tabRect.y, tabRect.width, tabRect.height, isSelected);<NEW_LINE>paintTabBorder(g, tabPlacement, tabIndex, tabRect.x, tabRect.y, tabRect.width, tabRect.height, isSelected);<NEW_LINE>String <MASK><NEW_LINE>Font font = tabPane.getFont();<NEW_LINE>FontMetrics metrics = g.getFontMetrics(font);<NEW_LINE>Icon icon = getIconForTab(tabIndex);<NEW_LINE>layoutLabel(tabPlacement, metrics, tabIndex, title, icon, tabRect, iconRect, textRect, isSelected);<NEW_LINE>paintText(g, tabPlacement, font, metrics, tabIndex, title, textRect, isSelected);<NEW_LINE>paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected);<NEW_LINE>paintFocusIndicator(g, tabPlacement, rects, tabIndex, iconRect, textRect, isSelected);<NEW_LINE>if (cropShape != null) {<NEW_LINE>paintCroppedTabEdge(g, tabPlacement, tabIndex, isSelected, cropx, cropy);<NEW_LINE>g.setClip(save);<NEW_LINE>}<NEW_LINE>}
title = tabPane.getTitleAt(tabIndex);
71,791
private void timeBasedRotation(String propertyValue) {<NEW_LINE>rotationOnDateChange = false;<NEW_LINE>if (propertyValue != null) {<NEW_LINE>rotationOnDateChange = Boolean.parseBoolean(propertyValue);<NEW_LINE>}<NEW_LINE>if (rotationOnDateChange) {<NEW_LINE>rotationOnDateChange();<NEW_LINE>} else {<NEW_LINE>rotationTimeLimitValue = 0L;<NEW_LINE>try {<NEW_LINE>propertyValue = manager.getProperty(className + ".rotationTimelimitInMinutes");<NEW_LINE>if (propertyValue != null) {<NEW_LINE>rotationTimeLimitValue = Long.parseLong(propertyValue);<NEW_LINE>}<NEW_LINE>} catch (NumberFormatException e) {<NEW_LINE>logRecord = new LogRecord(Level.WARNING, LogFacade.INVALID_ATTRIBUTE_VALUE);<NEW_LINE>logRecord.setParameters(new Object[] { propertyValue, "rotationTimelimitInMinutes" });<NEW_LINE>logRecord.setResourceBundle(ResourceBundle.getBundle(LogFacade.LOGGING_RB_NAME));<NEW_LINE>logRecord.setThreadID((int) Thread.<MASK><NEW_LINE>logRecord.setLoggerName(LogFacade.LOGGING_LOGGER_NAME);<NEW_LINE>EarlyLogHandler.earlyMessages.add(logRecord);<NEW_LINE>}<NEW_LINE>rotationOnTimeLimit();<NEW_LINE>}<NEW_LINE>}
currentThread().getId());
1,685,151
public ApiResponse<RecycleBinContents> recycleBinGetRecycleBinContentsWithHttpInfo(Integer pageIndex, Integer pageSize, String sortExpression) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'pageIndex' is set<NEW_LINE>if (pageIndex == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'pageIndex' when calling recycleBinGetRecycleBinContents");<NEW_LINE>}<NEW_LINE>// verify the required parameter 'pageSize' is set<NEW_LINE>if (pageSize == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'pageSize' when calling recycleBinGetRecycleBinContents");<NEW_LINE>}<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/v4/recyclebin";<NEW_LINE>// query params<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>Map<String, String> localVarHeaderParams = new HashMap<String, String>();<NEW_LINE>Map<String, Object> localVarFormParams = new HashMap<String, Object>();<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageIndex", pageIndex));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));<NEW_LINE>localVarQueryParams.addAll(apiClient.parameterToPairs("", "sortExpression", sortExpression));<NEW_LINE>final String[] localVarAccepts = { "application/json", "text/json" };<NEW_LINE>final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);<NEW_LINE>final String[] localVarContentTypes = {};<NEW_LINE>final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);<NEW_LINE>String[] localVarAuthNames = new String[] { "oauth2" };<NEW_LINE>GenericType<RecycleBinContents> localVarReturnType = new GenericType<RecycleBinContents>() {<NEW_LINE>};<NEW_LINE>return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, <MASK><NEW_LINE>}
localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
165,263
private DistributedLogServer buildServer() {<NEW_LINE>return DistributedLogServer.builder().withServerName(partition.name()).withMembershipService(managementService.getMembershipService()).withMemberGroupProvider(config.getMemberGroupProvider()).withProtocol(new LogServerCommunicator(partition.name(), Serializer.using(LogNamespaces.PROTOCOL), managementService.getMessagingService())).withPrimaryElection(managementService.getElectionService().getElectionFor(partition.id())).withStorageLevel(config.getStorageConfig().getLevel()).withDirectory(config.getStorageConfig().getDirectory(partition.name())).withMaxSegmentSize((int) config.getStorageConfig().getSegmentSize().bytes()).withMaxEntrySize((int) config.getStorageConfig().getMaxEntrySize().bytes()).withFlushOnCommit(config.getStorageConfig().isFlushOnCommit()).withMaxLogSize(config.getCompactionConfig().getSize().bytes()).withMaxLogAge(config.getCompactionConfig().getAge()).<MASK><NEW_LINE>}
withThreadContextFactory(threadFactory).build();
311,304
private void updateTerminal(Location l, BlockMenu terminal, int slot, int index, List<ItemStackAndInteger> items) {<NEW_LINE>if (items.size() > index) {<NEW_LINE>ItemStackAndInteger item = items.get(index);<NEW_LINE>ItemStack stack = item.getItem().clone();<NEW_LINE>stack.setAmount(1);<NEW_LINE>ItemMeta im = stack.getItemMeta();<NEW_LINE>List<String> lore = new ArrayList<>();<NEW_LINE>lore.add("");<NEW_LINE>lore.add(ChatColors.color("&7Stored Items: &f" + NumberUtils.getCompactDouble(<MASK><NEW_LINE>if (stack.getMaxStackSize() > 1) {<NEW_LINE>int amount = item.getInt() > stack.getMaxStackSize() ? stack.getMaxStackSize() : item.getInt();<NEW_LINE>lore.add(ChatColors.color("&7<Left Click: Request 1 | Right Click: Request " + amount + ">"));<NEW_LINE>} else {<NEW_LINE>lore.add(ChatColors.color("&7<Left Click: Request 1>"));<NEW_LINE>}<NEW_LINE>lore.add("");<NEW_LINE>if (im.hasLore()) {<NEW_LINE>lore.addAll(im.getLore());<NEW_LINE>}<NEW_LINE>im.setLore(lore);<NEW_LINE>stack.setItemMeta(im);<NEW_LINE>terminal.replaceExistingItem(slot, stack);<NEW_LINE>terminal.addMenuClickHandler(slot, (p, sl, is, action) -> {<NEW_LINE>int amount = item.getInt() > item.getItem().getMaxStackSize() ? item.getItem().getMaxStackSize() : item.getInt();<NEW_LINE>ItemStack requestedItem = new CustomItemStack(item.getItem(), action.isRightClicked() ? amount : 1);<NEW_LINE>itemRequests.add(new ItemRequest(l, 44, requestedItem, ItemTransportFlow.WITHDRAW));<NEW_LINE>return false;<NEW_LINE>});<NEW_LINE>} else {<NEW_LINE>terminal.replaceExistingItem(slot, terminalPlaceholderItem);<NEW_LINE>terminal.addMenuClickHandler(slot, ChestMenuUtils.getEmptyClickHandler());<NEW_LINE>}<NEW_LINE>}
item.getInt())));
1,147,681
private List<DataSourceListBo> reorderDataSourceListBos(List<DataSourceListBo> dataSourceListBos) {<NEW_LINE>// reorder dataSourceBo using id and timeSlot<NEW_LINE>MultiKeyMap<Long, DataSourceListBo> dataSourceListBoMap = new MultiKeyMap<>();<NEW_LINE>for (DataSourceListBo dataSourceListBo : dataSourceListBos) {<NEW_LINE>for (DataSourceBo dataSourceBo : dataSourceListBo.getList()) {<NEW_LINE>int id = dataSourceBo.getId();<NEW_LINE>long timestamp = dataSourceBo.getTimestamp();<NEW_LINE>long timeSlot = AgentStatUtils.getBaseTimestamp(timestamp);<NEW_LINE>DataSourceListBo mappedDataSourceListBo = <MASK><NEW_LINE>if (mappedDataSourceListBo == null) {<NEW_LINE>mappedDataSourceListBo = new DataSourceListBo();<NEW_LINE>mappedDataSourceListBo.setAgentId(dataSourceBo.getAgentId());<NEW_LINE>mappedDataSourceListBo.setStartTimestamp(dataSourceBo.getStartTimestamp());<NEW_LINE>mappedDataSourceListBo.setTimestamp(dataSourceBo.getTimestamp());<NEW_LINE>dataSourceListBoMap.put((long) id, timeSlot, mappedDataSourceListBo);<NEW_LINE>}<NEW_LINE>// set fastest timestamp<NEW_LINE>if (mappedDataSourceListBo.getTimestamp() > dataSourceBo.getTimestamp()) {<NEW_LINE>mappedDataSourceListBo.setTimestamp(dataSourceBo.getTimestamp());<NEW_LINE>}<NEW_LINE>mappedDataSourceListBo.add(dataSourceBo);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Collection<DataSourceListBo> values = dataSourceListBoMap.values();<NEW_LINE>return new ArrayList<>(values);<NEW_LINE>}
dataSourceListBoMap.get(id, timeSlot);
1,563,425
public TagStreamResult tagStream(TagStreamRequest tagStreamRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagStreamRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<TagStreamRequest> request = null;<NEW_LINE>Response<TagStreamResult> response = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>request = new TagStreamRequestMarshaller().marshall(tagStreamRequest);<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<TagStreamResult, JsonUnmarshallerContext> unmarshaller = new TagStreamResultJsonUnmarshaller();<NEW_LINE>JsonResponseHandler<TagStreamResult> responseHandler = new JsonResponseHandler<TagStreamResult>(unmarshaller);<NEW_LINE>response = invoke(request, responseHandler, executionContext);<NEW_LINE>return response.getAwsResponse();<NEW_LINE>} finally {<NEW_LINE>awsRequestMetrics.endEvent(Field.ClientExecuteTime);<NEW_LINE>endClientExecution(awsRequestMetrics, request, response, LOGGING_AWS_REQUEST_METRIC);<NEW_LINE>}<NEW_LINE>}
awsRequestMetrics.startEvent(Field.RequestMarshallTime);
485,831
private boolean useOffloadedPlayback(Format format, AudioAttributes audioAttributes) {<NEW_LINE>if (Util.SDK_INT < 29 || offloadMode == OFFLOAD_MODE_DISABLED) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>@C.Encoding<NEW_LINE>int encoding = MimeTypes.getEncoding(checkNotNull(format.sampleMimeType), format.codecs);<NEW_LINE>if (encoding == C.ENCODING_INVALID) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int channelConfig = <MASK><NEW_LINE>if (channelConfig == AudioFormat.CHANNEL_INVALID) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>AudioFormat audioFormat = getAudioFormat(format.sampleRate, channelConfig, encoding);<NEW_LINE>switch(getOffloadedPlaybackSupport(audioFormat, audioAttributes.getAudioAttributesV21())) {<NEW_LINE>case AudioManager.PLAYBACK_OFFLOAD_NOT_SUPPORTED:<NEW_LINE>return false;<NEW_LINE>case AudioManager.PLAYBACK_OFFLOAD_SUPPORTED:<NEW_LINE>boolean isGapless = format.encoderDelay != 0 || format.encoderPadding != 0;<NEW_LINE>boolean gaplessSupportRequired = offloadMode == OFFLOAD_MODE_ENABLED_GAPLESS_REQUIRED;<NEW_LINE>return !isGapless || !gaplessSupportRequired;<NEW_LINE>case AudioManager.PLAYBACK_OFFLOAD_GAPLESS_SUPPORTED:<NEW_LINE>return true;<NEW_LINE>default:<NEW_LINE>throw new IllegalStateException();<NEW_LINE>}<NEW_LINE>}
Util.getAudioTrackChannelConfig(format.channelCount);
1,248,388
public JSFunction compile(final CompilationContext context, final String identifier, final String[] formalParameters, final Statement body, final boolean strict) {<NEW_LINE>int statementNumber = body.getStatementNumber();<NEW_LINE>BlockManager.Entry entry = context.getBlockManager().retrieve(statementNumber);<NEW_LINE>BasicBlock code = entry.getCompiled();<NEW_LINE>if (code == null) {<NEW_LINE>code = new InterpretedBasicBlock(this.factory, body, strict);<NEW_LINE>entry.setCompiled(code);<NEW_LINE>}<NEW_LINE>LexicalEnvironment lexEnv = null;<NEW_LINE>if (identifier != null) {<NEW_LINE>LexicalEnvironment funcEnv = LexicalEnvironment.newDeclarativeEnvironment(context.getLexicalEnvironment());<NEW_LINE>((DeclarativeEnvironmentRecord) funcEnv.getRecord()<MASK><NEW_LINE>lexEnv = funcEnv;<NEW_LINE>} else {<NEW_LINE>lexEnv = context.getLexicalEnvironment();<NEW_LINE>}<NEW_LINE>JavascriptFunction function = new JavascriptFunction(context.getGlobalContext(), identifier, code, lexEnv, strict, formalParameters);<NEW_LINE>if (identifier != null) {<NEW_LINE>((DeclarativeEnvironmentRecord) lexEnv.getRecord()).setMutableBinding(identifier, function, strict);<NEW_LINE>}<NEW_LINE>function.setDebugContext("<anonymous>");<NEW_LINE>return function;<NEW_LINE>}
).createMutableBinding(identifier, true);
906,329
final protected void createUI() {<NEW_LINE>backgroundImage = Icons.getIcon("logo.wizard.png");<NEW_LINE>setLayout(new BorderLayout(7, 7));<NEW_LINE>marginPanel.setPreferredSize(new Dimension(150, 400));<NEW_LINE>add(marginPanel, BorderLayout.WEST);<NEW_LINE>marginPanel.setOpaque(false);<NEW_LINE>marginPanel.setEnabled(false);<NEW_LINE>marginPanel.add(marginLabel, BorderLayout.NORTH);<NEW_LINE>marginLabel.setBorder(BorderFactory.createEmptyBorder(30, 8, 0, 0));<NEW_LINE>instructionArea.setBorder(null);<NEW_LINE>instructionArea.setOpaque(false);<NEW_LINE>// instructionArea.setWrapStyleWord(true);<NEW_LINE>// instructionArea.setLineWrap(true);<NEW_LINE>// instructionArea.setEditable(false);<NEW_LINE>setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));<NEW_LINE>JPanel containerPanel = new JPanel(<MASK><NEW_LINE>add(containerPanel);<NEW_LINE>containerPanel.setOpaque(false);<NEW_LINE>JLabel label = new JLabel(title);<NEW_LINE>label.setOpaque(false);<NEW_LINE>label.setFont(label.getFont().deriveFont(Font.BOLD, 14.0f));<NEW_LINE>containerPanel.add(label, BorderLayout.NORTH);<NEW_LINE>JPanel contentAndInstructionHolder = new HolderPanel();<NEW_LINE>contentAndInstructionHolder.add(instructionArea, BorderLayout.NORTH);<NEW_LINE>JPanel contentBorderPanel = new JPanel(new BorderLayout());<NEW_LINE>contentBorderPanel.setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 0));<NEW_LINE>contentBorderPanel.add(contentHolder);<NEW_LINE>contentBorderPanel.setOpaque(false);<NEW_LINE>contentHolder.setOpaque(false);<NEW_LINE>contentAndInstructionHolder.add(contentBorderPanel, BorderLayout.CENTER);<NEW_LINE>containerPanel.add(contentAndInstructionHolder);<NEW_LINE>createUI(contentHolder);<NEW_LINE>setComponentTransparency(contentHolder);<NEW_LINE>}
new BorderLayout(7, 7));
1,755,190
public void copyNonSystemHeaders(SipServletRequest origRequest, OutgoingSipServletRequest request) {<NEW_LINE>Iterator iterator = ((SipServletRequestImpl) origRequest).getJainSipHeaders();<NEW_LINE>if (iterator != null) {<NEW_LINE>Request jainOutReq = request.getRequest();<NEW_LINE>Header header;<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>header = (Header) iterator.next();<NEW_LINE>// Dont copy the following headers: Via, Record-Route, CSeq,<NEW_LINE>// To, From, CallId. Contact is copied only in REGISTER requests<NEW_LINE>if (!header.getName().equals(ViaHeader.name) && !header.getName().equals(RecordRouteHeader.name) && !header.getName().equals(CSeqHeader.name) && !header.getName().equals(ToHeader.name) && !header.getName().equals(FromHeader.name) && !header.getName().equals(CallIdHeader.name) && !header.getName().equals(MaxForwardsHeader.name) && !header.getName().equals(ContentTypeHeader.name) && !header.getName().equals(ContentLengthHeader.name) && !header.getName().equals(SipStackUtil.DESTINATION_URI) && !header.getName().equals(ContactHeader.name) || (header.getName().equals(ContactHeader.name) && request.getMethod().equals(Request.REGISTER))) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}
jainOutReq.addHeader(header, false);
1,252,747
protected void paintTab(final Graphics g, final int tabPlacement, final Rectangle[] rects, final int tabIndex, final Rectangle iconRect, final Rectangle textRect) {<NEW_LINE>final Rectangle tabRect = rects[tabIndex];<NEW_LINE>final int selectedIndex = tabPane.getSelectedIndex();<NEW_LINE>final boolean isSelected = selectedIndex == tabIndex;<NEW_LINE>Graphics2D g2 = null;<NEW_LINE>Polygon cropShape = null;<NEW_LINE>Shape save = null;<NEW_LINE>int cropx = 0;<NEW_LINE>int cropy = 0;<NEW_LINE>if (scrollableTabLayoutEnabled()) {<NEW_LINE>if (g instanceof Graphics2D) {<NEW_LINE>g2 = (Graphics2D) g;<NEW_LINE>// Render visual for cropped tab edge...<NEW_LINE>Rectangle viewRect = tabScroller.viewport.getViewRect();<NEW_LINE>int cropline;<NEW_LINE>switch(tabPlacement) {<NEW_LINE>case LEFT:<NEW_LINE>case RIGHT:<NEW_LINE>cropline = viewRect.y + viewRect.height;<NEW_LINE>if ((tabRect.y < cropline) && (tabRect.y + tabRect.height > cropline)) {<NEW_LINE>cropShape = createCroppedTabClip(tabPlacement, tabRect, cropline);<NEW_LINE>cropx = tabRect.x;<NEW_LINE>cropy = cropline - 1;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case TOP:<NEW_LINE>case BOTTOM:<NEW_LINE>default:<NEW_LINE>cropline = viewRect.x + viewRect.width;<NEW_LINE>if ((tabRect.x < cropline) && (tabRect.x + tabRect.width > cropline)) {<NEW_LINE>cropShape = createCroppedTabClip(tabPlacement, tabRect, cropline);<NEW_LINE>cropx = cropline - 1;<NEW_LINE>cropy = tabRect.y;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (cropShape != null) {<NEW_LINE>save = g.getClip();<NEW_LINE>g2.clip(cropShape);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>paintTabBackground(g, tabPlacement, tabIndex, tabRect.x, tabRect.y, tabRect.width, tabRect.height, isSelected);<NEW_LINE>paintTabBorder(g, tabPlacement, tabIndex, tabRect.x, tabRect.y, tabRect.width, tabRect.height, isSelected);<NEW_LINE>String title = tabPane.getTitleAt(tabIndex);<NEW_LINE>Font font = tabPane.getFont();<NEW_LINE>FontMetrics metrics = g.getFontMetrics(font);<NEW_LINE>Icon icon = getIconForTab(tabIndex);<NEW_LINE>layoutLabel(tabPlacement, metrics, tabIndex, title, icon, tabRect, iconRect, textRect, isSelected);<NEW_LINE>paintText(g, tabPlacement, font, metrics, tabIndex, title, textRect, isSelected);<NEW_LINE>paintIcon(g, tabPlacement, tabIndex, icon, iconRect, isSelected);<NEW_LINE>paintFocusIndicator(g, tabPlacement, rects, tabIndex, iconRect, textRect, isSelected);<NEW_LINE>if (cropShape != null) {<NEW_LINE>paintCroppedTabEdge(g, tabPlacement, <MASK><NEW_LINE>g.setClip(save);<NEW_LINE>}<NEW_LINE>}
tabIndex, isSelected, cropx, cropy);
818,077
private void rehash(final int newSize, boolean hashOnData) {<NEW_LINE>final int newMask = newSize - 1;<NEW_LINE>bytesUsed.addAndGet(Integer.BYTES * (newSize));<NEW_LINE>final int[] newHash = new int[newSize];<NEW_LINE>Arrays.fill(newHash, -1);<NEW_LINE>for (int i = 0; i < hashSize; i++) {<NEW_LINE>final int e0 = ids[i];<NEW_LINE>if (e0 != -1) {<NEW_LINE>int code;<NEW_LINE>if (hashOnData) {<NEW_LINE>final int off = bytesStart[e0];<NEW_LINE>final int start = off & BYTE_BLOCK_MASK;<NEW_LINE>final byte[] bytes = pool<MASK><NEW_LINE>final int len;<NEW_LINE>int pos;<NEW_LINE>if ((bytes[start] & 0x80) == 0) {<NEW_LINE>// length is 1 byte<NEW_LINE>len = bytes[start];<NEW_LINE>pos = start + 1;<NEW_LINE>} else {<NEW_LINE>len = ((short) BitUtil.VH_BE_SHORT.get(bytes, start)) & 0x7FFF;<NEW_LINE>pos = start + 2;<NEW_LINE>}<NEW_LINE>code = doHash(bytes, pos, len);<NEW_LINE>} else {<NEW_LINE>code = bytesStart[e0];<NEW_LINE>}<NEW_LINE>int hashPos = code & newMask;<NEW_LINE>assert hashPos >= 0;<NEW_LINE>if (newHash[hashPos] != -1) {<NEW_LINE>// Conflict; use linear probe to find an open slot<NEW_LINE>// (see LUCENE-5604):<NEW_LINE>do {<NEW_LINE>code++;<NEW_LINE>hashPos = code & newMask;<NEW_LINE>} while (newHash[hashPos] != -1);<NEW_LINE>}<NEW_LINE>newHash[hashPos] = e0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>hashMask = newMask;<NEW_LINE>bytesUsed.addAndGet(Integer.BYTES * (-ids.length));<NEW_LINE>ids = newHash;<NEW_LINE>hashSize = newSize;<NEW_LINE>hashHalfSize = newSize / 2;<NEW_LINE>}
.buffers[off >> BYTE_BLOCK_SHIFT];
1,658,687
private static Set<UpdateElement> handleBackwardCompatability(Set<ModuleInfo> forInstall, Set<Dependency> brokenDependencies, boolean aggressive) {<NEW_LINE>if (cachedInfosReference != null) {<NEW_LINE>Set<ModuleInfo> cir = cachedInfosReference.get();<NEW_LINE>if (cir != null && cir.equals(forInstall)) {<NEW_LINE>if (cachedResultReference != null) {<NEW_LINE>Set<UpdateElement<MASK><NEW_LINE>if (crr != null) {<NEW_LINE>return crr;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>cachedInfosReference = new WeakReference<Set<ModuleInfo>>(forInstall);<NEW_LINE>err.finest("calling handleBackwardCompatability(size: " + forInstall.size() + ")");<NEW_LINE>Set<UpdateElement> moreRequested = new HashSet<UpdateElement>();<NEW_LINE>// backward compatibility<NEW_LINE>for (ModuleInfo mi : forInstall) {<NEW_LINE>moreRequested.addAll(handleBackwardCompatability4ModuleInfo(mi, forInstall, brokenDependencies, aggressive));<NEW_LINE>}<NEW_LINE>cachedResultReference = new WeakReference<Set<UpdateElement>>(moreRequested);<NEW_LINE>return moreRequested;<NEW_LINE>}
> crr = cachedResultReference.get();
1,521,650
public void marshall(BotAliasSummary botAliasSummary, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (botAliasSummary == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(botAliasSummary.getBotAliasId(), BOTALIASID_BINDING);<NEW_LINE>protocolMarshaller.marshall(botAliasSummary.getBotAliasName(), BOTALIASNAME_BINDING);<NEW_LINE>protocolMarshaller.marshall(botAliasSummary.getDescription(), DESCRIPTION_BINDING);<NEW_LINE>protocolMarshaller.marshall(botAliasSummary.getBotVersion(), BOTVERSION_BINDING);<NEW_LINE>protocolMarshaller.marshall(botAliasSummary.getBotAliasStatus(), BOTALIASSTATUS_BINDING);<NEW_LINE>protocolMarshaller.marshall(botAliasSummary.getCreationDateTime(), CREATIONDATETIME_BINDING);<NEW_LINE>protocolMarshaller.marshall(botAliasSummary.getLastUpdatedDateTime(), LASTUPDATEDDATETIME_BINDING);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new SdkClientException("Unable to marshall request to JSON: " + <MASK><NEW_LINE>}<NEW_LINE>}
e.getMessage(), e);