idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
111,967 | public FieldNode visitEnumConstant(final EnumConstantContext ctx) {<NEW_LINE>ClassNode classNode = ctx.getNodeMetaData(CLASS_DECLARATION_CLASS_NODE);<NEW_LINE>Objects.requireNonNull(classNode, "classNode should not be null");<NEW_LINE>InnerClassNode anonymousInnerClassNode = null;<NEW_LINE>if (asBoolean(ctx.anonymousIn... | setNameStart(nameNode.getStart()); |
716,591 | public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {<NEW_LINE>// compound assignment extra work<NEW_LINE>if (isCompound) {<NEW_LINE>// check the variable part is initialized if blank final<NEW_LINE>if (this.binding.isBlankFin... | declaringClass.original(), flowInfo); |
487,095 | protected void saveProperties() {<NEW_LINE>// This method assumes there are no error.<NEW_LINE>mProperties.name = mNameEditText.getText().toString();<NEW_LINE>// Keycodes<NEW_LINE>for (int i = 0; i < mKeycodeSpinners.length; ++i) {<NEW_LINE>if (mKeycodeSpinners[i].getSelectedItemPosition() < mSpecialArray.length) {<NEW... | getSelectedItemPosition() - mSpecialArray.length); |
727,572 | private void processFeatureRange(FeatureRange range, PredicateOptions options) {<NEW_LINE>range.clearPartitions();<NEW_LINE>int arity = options.getArity();<NEW_LINE>RangePruner rangePruner = new RangePruner(range, options, arity);<NEW_LINE><MASK><NEW_LINE>long to = rangePruner.getTo();<NEW_LINE>if (from < 0) {<NEW_LINE... | long from = rangePruner.getFrom(); |
1,734,820 | public void handleResponse(@NonNull PromoCityGallery promo) {<NEW_LINE>PromoCityGallery.Item[] items = promo.getItems();<NEW_LINE>if (items.length <= 0)<NEW_LINE>return;<NEW_LINE>UiUtils.show(mPlacePageView, R.id.catalog_promo_container, R.id.promo_poi_description_container, R.id.promo_poi_description_divider, R.id.pro... | findViewById(R.id.promo_poi_description); |
1,418,359 | final ListComponentBuildVersionsResult executeListComponentBuildVersions(ListComponentBuildVersionsRequest listComponentBuildVersionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listComponentBuildVersionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
103,051 | public List<String> generate(final PolicyValues policyValues) {<NEW_LINE>final PasswordRuleReaderHelper ruleHelper = policyValues.getRuleHelper();<NEW_LINE>if (!ruleHelper.readBooleanValue(PwmPasswordRule.AllowSpecial)) {<NEW_LINE>return Collections.singletonList(getLocalString(Message<MASK><NEW_LINE>} else {<NEW_LINE>... | .Requirement_AllowSpecial, null, policyValues)); |
108,861 | public static Histogram deserializeFromJson(String json) {<NEW_LINE>try {<NEW_LINE>JSONObject histogramJson = JSON.parseObject(json);<NEW_LINE>String type = histogramJson.getString("type");<NEW_LINE>DataType datatype = StatisticUtils.decodeDataType(type);<NEW_LINE>Histogram histogram = new Histogram(histogramJson.getIn... | upper = bucketJson.get("upper"); |
1,311,257 | private void mountVerify() {<NEW_LINE>// force a post if otherwise<NEW_LINE>verify.method(HttpMethod.POST).order(order - 1).handler(ctx -> {<NEW_LINE>final User user = ctx.user();<NEW_LINE>if (user == null || user.get("username") == null) {<NEW_LINE>ctx.fail(new IllegalStateException("User object misses 'username' attr... | mergeIn(user.principal()); |
286,599 | public Request<DeleteProvisioningTemplateVersionRequest> marshall(DeleteProvisioningTemplateVersionRequest deleteProvisioningTemplateVersionRequest) {<NEW_LINE>if (deleteProvisioningTemplateVersionRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteProvisioningTemplate... | <DeleteProvisioningTemplateVersionRequest>(deleteProvisioningTemplateVersionRequest, "AWSIot"); |
941,264 | protected Void doInBackground(Void... params) {<NEW_LINE>try {<NEW_LINE>GcmPubSub.getInstance(mContext<MASK><NEW_LINE>mLogger.log(Log.INFO, "topic unsubscription succeeded." + "\ngcmToken: " + gcmToken + "\ntopic: " + topic);<NEW_LINE>// Save the token in the address book<NEW_LINE>Sender entry = mSenders.getSender(send... | ).unsubscribe(gcmToken, topic); |
671,063 | public void addModule(Object input) {<NEW_LINE>if (!shouldLoadOnCurrentNodeType(input)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (input instanceof DruidModule) {<NEW_LINE>if (!checkModuleClass(input.getClass())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>baseInjector.injectMembers(input);<NEW_LINE>modules.add(registerJack... | .add((Module) input); |
1,760,891 | public void addInstances(InstanceList training) {<NEW_LINE>alphabet = training.getDataAlphabet();<NEW_LINE>numTypes = alphabet.size();<NEW_LINE>betaSum = beta * numTypes;<NEW_LINE>typeTopicCounts = new int[numTypes][numTopics];<NEW_LINE>typeTopicWeights = new double[numTypes][numTopics];<NEW_LINE>totalTopicWeights = ne... | [tokenSequence.size()]); |
672,782 | public final ArrayContext array() throws RecognitionException {<NEW_LINE>ArrayContext _localctx = new <MASK><NEW_LINE>enterRule(_localctx, 10, RULE_array);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(45);<NEW_LINE>match(LBRACKET);<NEW_LINE>setState(54);<NEW_LINE>_... | ArrayContext(_ctx, getState()); |
1,222,473 | private static int writePatch(Enumeration entries, ZipOutputStream out, BufferedOutputStream bo, ZipFile zipFile, int i) throws IOException {<NEW_LINE>byte[] buffer = new byte[BUFFEREDSIZE];<NEW_LINE>while (entries.hasMoreElements()) {<NEW_LINE>ZipEntry zipEnt = (ZipEntry) entries.nextElement();<NEW_LINE>String name = ... | setSize(zipEnt.getSize()); |
1,678,760 | public static boolean checkPasswordWithSalt(final String iPassword, final String iHash, final String algorithm) {<NEW_LINE>if (!isAlgorithmSupported(algorithm)) {<NEW_LINE>OLogManager.instance().error(OSecuritySystem.class, "The password hash algorithm is not supported: %s", null, algorithm);<NEW_LINE>return false;<NEW... | = hexToByteArray(params[0]); |
1,187,080 | public static boolean walkOffsetsFromPointer(Pointer baseAddress, NonmovableArray<Byte> referenceMapEncoding, long referenceMapIndex, ObjectReferenceVisitor visitor, Object holderObject) {<NEW_LINE>assert ReferenceMapIndex.denotesValidReferenceMap(referenceMapIndex);<NEW_LINE>assert referenceMapEncoding.isNonNull();<NE... | position = position.add(4); |
1,734,428 | public void onRestRequest(RestRequest req, RequestContext requestContext, Map<String, String> wireAttrs, NextFilter<RestRequest, RestResponse> nextFilter) {<NEW_LINE>try {<NEW_LINE>if (_requestContentEncoding.hasCompressor()) {<NEW_LINE>if (_helper.shouldCompressRequest(req.getEntity().length(), (CompressionOption) req... | Compressor compressor = _requestContentEncoding.getCompressor(); |
726,160 | private void addTagsFavInformation() {<NEW_LINE>Set<String> favTags = getFavTags(getApplicationContext());<NEW_LINE>final MultiSelectListPreference selectListPreference = (MultiSelectListPreference) findPreference("pref-fav-tags-list");<NEW_LINE>Set<String> tagsSet = KissApplication.getApplication(this).getDataHandler(... | setTitle(R.string.pref_fav_tags_select); |
94,710 | final CreateMatchmakingConfigurationResult executeCreateMatchmakingConfiguration(CreateMatchmakingConfigurationRequest createMatchmakingConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createMatchmakingConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = execu... | endClientExecution(awsRequestMetrics, request, response); |
1,398,179 | // Modification Operations<NEW_LINE>@Override<NEW_LINE>public int add(E element, int occurrences) {<NEW_LINE>checkNotNull(element);<NEW_LINE>if (occurrences == 0) {<NEW_LINE>return count(element);<NEW_LINE>}<NEW_LINE>CollectPreconditions.checkPositive(occurrences, "occurences");<NEW_LINE>while (true) {<NEW_LINE>AtomicI... | "Overflow adding " + occurrences + " occurrences to a count of " + oldValue); |
1,361,678 | protected void processSimpleContent(SchemaRep.SimpleContent el) throws Schema2BeansException {<NEW_LINE>processContainsSubElements(el);<NEW_LINE>// System.out.println("lastDefinedType="+lastDefinedType);<NEW_LINE>if (lastDefinedType == null)<NEW_LINE>return;<NEW_LINE>SchemaRep.ElementExpr <MASK><NEW_LINE>if (schemaType... | schemaTypeDef = schema.getSchemaTypeDefResolvedNamespace(lastDefinedType); |
1,499,203 | private void initialize(String isolateId) {<NEW_LINE>this.isolateId = isolateId;<NEW_LINE>vmService.getIsolate(isolateId, new GetIsolateConsumer() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void received(Isolate response) {<NEW_LINE>for (LibraryRef library : response.getLibraries()) {<NEW_LINE>if (libraryNames.cont... | + error.toString())); |
1,628,125 | public String format(long value) {<NEW_LINE>if ((offset < SECONDS && value < CUT_OVER_BELOW_S) || (offset >= SECONDS && value < CUT_OVER_ABOVE_S)) {<NEW_LINE>return <MASK><NEW_LINE>} else if (offset == NAMES.length - 1) {<NEW_LINE>return String.format("%,dh", value);<NEW_LINE>}<NEW_LINE>int unit = offset;<NEW_LINE>whil... | value + " " + NAMES[offset]; |
556,921 | private void createInvoiceFacts(final Fact fact, final DocLine_Allocation line, final AmountSourceAndAcct invoiceTotalAllocatedAmtSourceAndAcct) {<NEW_LINE>final BigDecimal allocationSource = invoiceTotalAllocatedAmtSourceAndAcct.getAmtSource();<NEW_LINE>if (allocationSource.signum() == 0) {<NEW_LINE>// nothing to book... | AcctSchema as = fact.getAcctSchema(); |
1,541,856 | public Object execute(ShellSession session, String[] args) {<NEW_LINE>if (args.length == 0) {<NEW_LINE>System.out.println("inspect: requires an argument.");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!session.getVariables().containsKey(args[0])) {<NEW_LINE>System.out.println<MASK><NEW_LINE>return null;<NEW_LINE>}<NE... | ("inspect: no such variable: " + args[0]); |
1,027,177 | final DescribeCACertificateResult executeDescribeCACertificate(DescribeCACertificateRequest describeCACertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCACertificateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | invoke(request, responseHandler, executionContext); |
1,802,694 | public static Object[] fromTensor(Tensor<?> tensor) {<NEW_LINE>Preconditions.checkArgument(tensor.shape().numDimensions() == 1, "Can only convert tensors with shape long[]");<NEW_LINE>final int size = (int) tensor.shape().size(0);<NEW_LINE>Object[] res = new Object[size];<NEW_LINE>if (TInt32.DTYPE.equals(tensor.dataTyp... | [i] = floats[i]; |
332,074 | public void run() {<NEW_LINE>if (CollectionUtils.isEmpty(geocodes)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final long loadDetailsStartTime = System.currentTimeMillis();<NEW_LINE>int progress = 0;<NEW_LINE>for (final String geocode : geocodes) {<NEW_LINE>try {<NEW_LINE>if (handler.isDisposed()) {<NEW_LINE>break;<NEW_LIN... | System.currentTimeMillis() - loadDetailsStartTime); |
981,928 | public void findUsages(@Nonnull PsiElement psiElement, final PsiFile scopeFile, final FileEditor editor, boolean showDialog, @Nullable SearchScope searchScope) {<NEW_LINE>FindUsagesHandler handler = getFindUsagesHandler(psiElement, false);<NEW_LINE>if (handler == null)<NEW_LINE>return;<NEW_LINE>boolean singleFile = sco... | findUsagesOptions, handler, scopeFile, editor); |
242,650 | protected void checkIfUnknownAttributesPresent() {<NEW_LINE>Iterator<Entry<QName, Object>> iterator = unknownAttributes.entrySet().iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Entry<QName, Object> attribute = iterator.next();<NEW_LINE>QName attributeName = attribute.getKey();<NEW_LINE>Object attributeValu... | String namespace = attributeName.getNamespaceURI(); |
1,159,795 | String generateSql() {<NEW_LINE>String unique = myUnique ? "unique " : "";<NEW_LINE>String columns = String.join(", ", myColumns);<NEW_LINE>String includeClause = "";<NEW_LINE>String mssqlWhereClause = "";<NEW_LINE>if (!myIncludeColumns.isEmpty()) {<NEW_LINE>switch(getDriverType()) {<NEW_LINE>case POSTGRES_9_4:<NEW_LIN... | + ")" + includeClause + mssqlWhereClause + oracleOnlineDeferred; |
105,830 | private void generateFrameClassForFunction(PackageID packageID, BIRNode.BIRFunction func, Map<String, byte[]> pkgEntries, BType attachedType) {<NEW_LINE>String frameClassName = MethodGenUtils.getFrameClassName(JvmCodeGenUtil.getPackageName(packageID), func.name.value, attachedType);<NEW_LINE>ClassWriter cw = new Baller... | ).filePath(), null); |
247,985 | public ModelsMap postProcessModels(ModelsMap objs) {<NEW_LINE>List<ModelMap> models = postProcessModelsEnum(objs).getModels();<NEW_LINE>// process enum in models<NEW_LINE>for (ModelMap mo : models) {<NEW_LINE>CodegenModel cm = mo.getModel();<NEW_LINE>cm.imports = new TreeSet<>(cm.imports);<NEW_LINE>// name enum with mo... | oneOfRefs = new TreeSet<>(); |
114,756 | public static Map<String, Object> claimsFromJson(String jsonFormattedString) throws Exception {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "JSON String =" + jsonFormattedString);<NEW_LINE>}<NEW_LINE>JSONObject object = JSONObject.parse(jsonFormattedString);<NEW_LIN... | > iterator = set.iterator(); |
1,483,025 | final PutConfigurationSetReputationOptionsResult executePutConfigurationSetReputationOptions(PutConfigurationSetReputationOptionsRequest putConfigurationSetReputationOptionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putConfigurationSetReputationOptionsRequest);<NEW_LINE>AWSRequestMet... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,851,744 | public void onTraversalStart() {<NEW_LINE>super.onTraversalStart();<NEW_LINE>staticLogger = logger;<NEW_LINE>final SAMFileHeader header = getHeaderForReads();<NEW_LINE>if (pairedMode && header != null && header.getSortOrder() == SortOrder.coordinate) {<NEW_LINE>throw new UserException("In paired mode the BAM cannot be ... | (outputFilePrefix + ".rejected.bam"), false); |
261,376 | public void process(Node externs, Node root, ReferenceMap definitions) {<NEW_LINE>try (LogFile logFile = compiler.createOrReopenIndexedLog(this.getClass(), "decisions.log")) {<NEW_LINE>// avoid passing the log file through a bunch of methods<NEW_LINE>decisionsLog = logFile;<NEW_LINE>// Find all function nodes whose cal... | decisionsLog.log("property %s\tremoving return value", key); |
1,100,429 | private static double[][] bcucof(double[] y, double[] y1, double[] y2, double[] y12, double d1, double d2) {<NEW_LINE>double d1d2 = d1 * d2;<NEW_LINE>double[] cl = new double[16];<NEW_LINE>double[] x = new double[16];<NEW_LINE>double[][] c = new double[4][4];<NEW_LINE>for (int i = 0; i < 4; i++) {<NEW_LINE>x[i] = y[i];... | ] = y2[i] * d2; |
94,966 | public static void fractalTriangleWave(double[] line, int i, int j, double a, int roughness) {<NEW_LINE>int m = (j - i) / 2 + i;<NEW_LINE>if (i == j || i == m) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>line[m] = (line[i] + line<MASK><NEW_LINE>if (roughness > 0 && line.length > roughness * (j - i)) {<NEW_LINE>fractalTriang... | [j]) / 2 + a; |
1,225,826 | public void onBindViewHolder(@NonNull ViewHistoryHolder holder, int position) {<NEW_LINE>final String filePath = mHistoryList.<MASK><NEW_LINE>File file = new File(filePath);<NEW_LINE>final String operationDate = mHistoryList.get(position).getDate();<NEW_LINE>String[] formatDate = operationDate.split(" ");<NEW_LINE>Stri... | get(position).getFilePath(); |
377,548 | public static void main(String[] args) {<NEW_LINE>AllCyclesInDirectedGraphJohnson johnson = new AllCyclesInDirectedGraphJohnson();<NEW_LINE>Graph<Integer> graph = new Graph<>(true);<NEW_LINE>graph.addEdge(1, 2);<NEW_LINE>graph.addEdge(1, 8);<NEW_LINE>graph.addEdge(1, 5);<NEW_LINE>graph.addEdge(2, 9);<NEW_LINE>graph.add... | graph.addEdge(4, 5); |
306,491 | public Document importXMLDocument(final StringBuilder result, final Document documentToBeImported, final String trxName) {<NEW_LINE>final String xmlRequestStr = XMLHelper.createStringFromDOMNode(documentToBeImported);<NEW_LINE>if (xmlRequestStr == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Object xmlReques... | > xmlRequestClass = xmlRequest.getClass(); |
1,242,445 | public void onCheckedChanged(RadioGroup group, int checkedId) {<NEW_LINE>FragmentTransaction fragmentTrans = fragmentManager.beginTransaction();<NEW_LINE>hideFragments(fragmentTrans);<NEW_LINE>int id = (checkedId % 3 == 0 ? 3 : (checkedId % 3));<NEW_LINE>switch(id) {<NEW_LINE>case 1:<NEW_LINE>if (taskReportFragment == ... | R.id.dis_ll_fragment, taskReportFragment); |
237,533 | public Hcl visitBlock(Hcl.Block block, P p) {<NEW_LINE>Hcl.Block b = block;<NEW_LINE>b = b.withPrefix(visitSpace(b.getPrefix(), Space.Location.BLOCK, p));<NEW_LINE>b = b.withMarkers(visitMarkers(b.getMarkers(), p));<NEW_LINE>Expression temp = (Expression) visitBodyContent(b, p);<NEW_LINE>if (!(temp instanceof Hcl.Block... | .Location.BLOCK_CLOSE, p)); |
241,548 | private void handleLaunchingIntent(final Intent intent) {<NEW_LINE>if (intent == null)<NEW_LINE>return;<NEW_LINE>String intentAction = intent.getAction();<NEW_LINE>Uri intentData = intent.getData();<NEW_LINE>File file = (File) intent.getSerializableExtra(Document.EXTRA_PATH);<NEW_LINE>boolean intentIsView = Intent.ACTI... | ().startsWith("index.")); |
457,161 | public void beginMarkedContentSequence(PdfName tag, PdfDictionary property, boolean inline) {<NEW_LINE>if (property == null) {<NEW_LINE>content.append(tag.getBytes()).append(" BMC").append_i(separator);<NEW_LINE>} else {<NEW_LINE>content.append(tag.getBytes()).append(' ');<NEW_LINE>if (inline) {<NEW_LINE>try {<NEW_LINE... | append(name.getBytes()); |
377,233 | private void loadJSON(final String source) {<NEW_LINE>final JsonObject map = new JsonParser().parse(source).getAsJsonObject();<NEW_LINE>for (final Map.Entry<String, JsonElement> entry : map.entrySet()) {<NEW_LINE>final String key = entry.getKey();<NEW_LINE>final <MASK><NEW_LINE>boolean valid = false;<NEW_LINE>if (eleme... | JsonElement element = entry.getValue(); |
1,346,155 | public boolean insertGlobalTransactionDO(GlobalTransactionDO globalTransactionDO) {<NEW_LINE>String sql = LogStoreSqlsFactory.getLogStoreSqls(dbType).getInsertGlobalTransactionSQL(globalTable);<NEW_LINE>Connection conn = null;<NEW_LINE>PreparedStatement ps = null;<NEW_LINE>try {<NEW_LINE>int index = 1;<NEW_LINE>conn = ... | ++, globalTransactionDO.getXid()); |
1,043,904 | private String selectBestSearchParameterForCompartment(RequestDetails theRequestDetails, RuntimeResourceDefinition theResDef, String compartmentName) {<NEW_LINE>String searchParamName = null;<NEW_LINE>Set<String> queryParameters = theRequestDetails.getParameters().keySet();<NEW_LINE>List<RuntimeSearchParam> searchParam... | .get().getName(); |
1,434,846 | public Change[] fixMissing(DatabaseObject missingObject, DiffOutputControl control, Database referenceDatabase, Database comparisonDatabase, ChangeGeneratorChain chain) {<NEW_LINE>Index index = (Index) missingObject;<NEW_LINE>if (comparisonDatabase instanceof MSSQLDatabase && index.getRelation() instanceof Table) {<NEW... | return new Change[] { change }; |
1,624,542 | private static <T> void tryToSort(T[] arr, Comparator<?> cmp) {<NEW_LINE>if (cmp == null) {<NEW_LINE>// Type safe.<NEW_LINE>final Class<T> tClazz = (Class<T>) arr<MASK><NEW_LINE>if (!Comparable.class.isAssignableFrom(tClazz)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Don't use the natural ordering since that can't hand... | .getClass().getComponentType(); |
502,687 | public int doEndTag() throws JspException {<NEW_LINE>Object result = null;<NEW_LINE>// determine the value by...<NEW_LINE>if (this.property != null) {<NEW_LINE>if ((SecurityContextHolder.getContext() == null) || !(SecurityContextHolder.getContext() instanceof SecurityContext) || (SecurityContextHolder.getContext().getA... | .getContext().getAuthentication(); |
1,810,404 | final CreateOrUpdateTagsResult executeCreateOrUpdateTags(CreateOrUpdateTagsRequest createOrUpdateTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createOrUpdateTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | CreateOrUpdateTagsResult>(new CreateOrUpdateTagsResultStaxUnmarshaller()); |
880,751 | public static void main(String[] args) {<NEW_LINE>String host = "localhost";<NEW_LINE>Cluster.Builder builder = Cluster.build();<NEW_LINE>builder.addContactPoint(host);<NEW_LINE>builder.port(8182);<NEW_LINE>builder.serializer(new GryoMessageSerializerV3d0());<NEW_LINE>Cluster cluster = builder.create();<NEW_LINE>// Cre... | valueMap(true).toList(); |
1,680,205 | public void executeMultiQuery(final Collection<InternalVertex> vertices, final SliceQuery sq, final QueryProfiler profiler) {<NEW_LINE>LongArrayList vertexIds = new LongArrayList(vertices.size());<NEW_LINE>for (InternalVertex v : vertices) {<NEW_LINE>if (!v.isNew() && v.hasId() && (v instanceof CacheVertex) && !v.hasLo... | add(v.longId()); |
503,881 | public Object buildResult(RequestEntity requestEntity, int code, String message, Object data) {<NEW_LINE>long timestamp = System.currentTimeMillis();<NEW_LINE>if (this.responseScript != null) {<NEW_LINE>MagicScriptContext context = new MagicScriptContext();<NEW_LINE>context.setScriptName(requestEntity.getMagicScriptCon... | context.set("code", code); |
1,186,036 | public static void createWithoutNamespace(final XmlNodeTrx wtx) throws SirixException {<NEW_LINE>wtx.moveToDocumentRoot();<NEW_LINE>wtx.insertElementAsFirstChild(new QNm("a"));<NEW_LINE>wtx.insertAttribute(new QNm("i"), "j");<NEW_LINE>wtx.moveToParent();<NEW_LINE>wtx.insertTextAsFirstChild("oops1");<NEW_LINE>wtx.insert... | new QNm("x"), "y"); |
462,864 | public final CreateVariableExprContext createVariableExpr() throws RecognitionException {<NEW_LINE>CreateVariableExprContext _localctx = new CreateVariableExprContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 88, RULE_createVariableExpr);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW... | _la = _input.LA(1); |
1,336,095 | V replace(K key, int hash, V newValue) {<NEW_LINE>lock();<NEW_LINE>try {<NEW_LINE>preWriteCleanup();<NEW_LINE>AtomicReferenceArray<E> table = this.table;<NEW_LINE>int index = hash & (table.length() - 1);<NEW_LINE>E first = table.get(index);<NEW_LINE>for (E e = first; e != null; e = e.getNext()) {<NEW_LINE>K entryKey = ... | newFirst = removeFromChain(first, e); |
37,848 | protected void copyData(int srcRawIndex, LAState tgt, int dstRawIndex, int len) {<NEW_LINE>if (tgt.getClass() == getClass()) {<NEW_LINE>// same type<NEW_LINE>System.arraycopy(laStateShorts, srcRawIndex, ((ByteState) tgt).laStateShorts, dstRawIndex, len);<NEW_LINE>} else {<NEW_LINE>// large state<NEW_LINE>int[] las = ((... | .integer(val >> 8); |
1,405,989 | public static // }<NEW_LINE>void storeClients(Collection<BaseClient> clients) throws OAuthProviderException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "storeClients");<NEW_LINE>// Quick and dirty for now, until the XML format gets finalized<NEW_LINE>String ls = System.getProperty("line.separator");<NEW_L... | + client.getClientName() + "\" "; |
1,684,798 | public CompletableFuture<Void> iterateAllSubscriptions(@NotNull final IterationCallback<SubscriptionsForClientResult> callback, @NotNull final Executor callbackExecutor) {<NEW_LINE>Preconditions.checkNotNull(callback, "Callback cannot be null");<NEW_LINE>Preconditions.checkNotNull(callback, "Callback executor cannot be... | CompletableFuture.failedFuture(PluginServiceRateLimitService.RATE_LIMIT_EXCEEDED_EXCEPTION); |
1,107,249 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see com.aptana.formatter.AbstractScriptFormatter#detectIndentationLevel(org.eclipse.jface.text.IDocument, int)<NEW_LINE>*/<NEW_LINE>public int detectIndentationLevel(IDocument document, int offset, boolean isSelection, IFormattingContext formattingContext) {<NEW_LINE>int indent =... | root.accept(context, detector); |
1,179,362 | public static void main(String[] args) {<NEW_LINE>MediaManager media = DefaultMediaManager.INSTANCE;<NEW_LINE>// String fileName0 = UtilIO.pathExample("denseflow/dogdance07.png");<NEW_LINE>// String fileName1 = UtilIO.pathExample("denseflow/dogdance08.png");<NEW_LINE>String fileName0 = UtilIO.pathExample("denseflow/Urb... | ConvertBufferedImage.convertFrom(buff0, full); |
871,381 | protected void doLoad(Accumulator<FunctionReachabilityResult> accumulator, TaskMonitor monitor) throws CancelledException {<NEW_LINE>if (fromFunction == null || toFunction == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>monitor.setIndeterminate(true);<NEW_LINE>monitor.setMessage("Creating callgraph...");<NEW_LINE>Map<A... | instanceMap = new HashMap<>(); |
753,204 | public void run(CompilationController compilationController) throws Exception {<NEW_LINE>compilationController.toPhase(Phase.ELEMENTS_RESOLVED);<NEW_LINE>Trees trees = compilationController.getTrees();<NEW_LINE>CompilationUnitTree compilationUnitTree = compilationController.getCompilationUnit();<NEW_LINE>List<? extends... | > typeDecls = compilationUnitTree.getTypeDecls(); |
777,692 | public static DescribeComponentsResponse unmarshall(DescribeComponentsResponse describeComponentsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeComponentsResponse.setRequestId(_ctx.stringValue("DescribeComponentsResponse.RequestId"));<NEW_LINE>describeComponentsResponse.setCode(_ctx.stringValue("DescribeCompone... | ("DescribeComponentsResponse.Data[" + i + "].Expired")); |
42,056 | protected void configureService(ServiceBusClientBuilder.ServiceBusReceiverClientBuilder builder) {<NEW_LINE>Assert.notNull(receiverClientProperties.getEntityType(), "Entity type cannot be null.");<NEW_LINE>Assert.notNull(receiverClientProperties.getEntityName(), "Entity name cannot be null.");<NEW_LINE>if (ServiceBusEn... | receiverClientProperties.getSubscriptionName(), "Subscription cannot be null."); |
199,720 | public void verify(Component component, JRVerifier verifier) {<NEW_LINE>ListComponent listComponent = (ListComponent) component;<NEW_LINE>JRDatasetRun datasetRun = listComponent.getDatasetRun();<NEW_LINE>if (datasetRun == null) {<NEW_LINE>verifier.addBrokenRule("No list subdataset run set", listComponent);<NEW_LINE>} e... | .getCurrentComponentElement().getWidth(); |
522,610 | public void validate(final EventBasedGateway element, final ValidationResultCollector validationResultCollector) {<NEW_LINE>final Collection<SequenceFlow<MASK><NEW_LINE>if (outgoingSequenceFlows.size() < 2) {<NEW_LINE>validationResultCollector.addError(0, "Event-based gateway must have at least 2 outgoing sequence flow... | > outgoingSequenceFlows = element.getOutgoing(); |
1,842,365 | private void updateCurrentKeyStrokeInfo() {<NEW_LINE>if (myConflictInfoArea == null || myKeystrokePreview == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>myConflictInfoArea.setText(null);<NEW_LINE>myKeystrokePreview.setText(" ");<NEW_LINE>if (myKeymap == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>KeyboardShortcut key... | actionPath != null ? actionPath : actionId); |
309,350 | public void writeQuotedString(CharSequence charSequence) throws IOException {<NEW_LINE>writer.write('"');<NEW_LINE>String string = charSequence.toString();<NEW_LINE>for (int i = 0; i < string.length(); i++) {<NEW_LINE>char <MASK><NEW_LINE>if ((c >= ' ') && (c < 0x7f)) {<NEW_LINE>if ((c == '\'') || (c == '\"') || (c == ... | c = string.charAt(i); |
384,846 | protected void handleMapPutMany(String[] args) {<NEW_LINE>int count = 1;<NEW_LINE>if (args.length > 1) {<NEW_LINE>count = Integer.parseInt(args[1]);<NEW_LINE>}<NEW_LINE>int b = ONE_HUNDRED;<NEW_LINE>byte[] value = new byte[b];<NEW_LINE>if (args.length > 2) {<NEW_LINE>b = Integer.parseInt(args[2]);<NEW_LINE>value = new ... | getMap().putAll(theMap); |
1,777,168 | public Builder mergeFrom(org.apache.submarine.server.api.proto.TritonModelConfig.ModelDynamicBatching other) {<NEW_LINE>if (other == org.apache.submarine.server.api.proto.TritonModelConfig.ModelDynamicBatching.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (!other.preferredBatchSize_.isEmpty()) {<NEW_LINE>if (... | mergeDefaultQueuePolicy(other.getDefaultQueuePolicy()); |
1,799,895 | public static String[] splitOnWordBoundaries(String toSplit) {<NEW_LINE>String result = toSplit;<NEW_LINE>// All non-alphanumeric characters are spaces<NEW_LINE>// acm-success -> "acm success"<NEW_LINE>result = <MASK><NEW_LINE>// If a number has a standalone v in front of it, separate it out (version).<NEW_LINE>// TEST... | result.replaceAll("[^A-Za-z0-9]+", " "); |
1,648,570 | public Object execute(VirtualFrame frame) {<NEW_LINE>JSDynamicObject functionObject = JSFrameUtil.getFunctionObject(frame);<NEW_LINE>JSDynamicObject promise <MASK><NEW_LINE>Object resolution = resolutionNode.execute(frame);<NEW_LINE>AlreadyResolved alreadyResolved = (AlreadyResolved) getAlreadyResolvedNode.getValue(fun... | = (JSDynamicObject) getPromise(functionObject); |
1,764,080 | /*<NEW_LINE>* x = expr;<NEW_LINE>*<NEW_LINE>* expr is a constant<NEW_LINE>*<NEW_LINE>* epr is a local (Note we are not going to worry about fieldRefs)<NEW_LINE>*<NEW_LINE>* expr is a Unary op with neg followed by a local or field<NEW_LINE>*<NEW_LINE>* expr is actually exp1 op expr2 ..... ( x = x+1, y = i * 3, x = 3 *0<... | Value left = defStmt.getLeftOp(); |
737,770 | public List<Option> asSortedList() {<NEW_LINE>ArrayList<Option> options = new ArrayList<Option>();<NEW_LINE>if (if_match_list != null)<NEW_LINE>for (byte[] value : if_match_list) options.add(new Option<MASK><NEW_LINE>if (hasUriHost())<NEW_LINE>options.add(new Option(OptionNumberRegistry.URI_HOST, getUriHost()));<NEW_LI... | (OptionNumberRegistry.IF_MATCH, value)); |
257,225 | private void updateTwinnedDeclaration(String alias, Name refName, Ref ref) {<NEW_LINE>checkNotNull(ref.getTwin());<NEW_LINE>// Don't handle declarations of an already flat name, just qualified names.<NEW_LINE>if (!ref.getNode().isGetProp()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Node rvalue = ref.getNode().getNext();<N... | ), refName.getFullName()); |
570,166 | public Object handle(HttpServletRequest request, @RequestBody(required = false) Map<String, String> body) {<NEW_LINE>HttpHeaders headers = new ServletServerHttpRequest(request).getHeaders();<NEW_LINE>Map<String, Object> arguments = getArguments(request, body);<NEW_LINE>try {<NEW_LINE>ServletSecurityContext securityCont... | securityContext, arguments, serverNamespaceArgumentResolver, producibleOperationArgumentResolver); |
206,284 | public void visit(final SwitchEntry n, final Void arg) {<NEW_LINE>printOrphanCommentsBeforeThisChildNode(n);<NEW_LINE>printComment(n.getComment(), arg);<NEW_LINE>// old/new switch<NEW_LINE>final String separator = (n.getType() == SwitchEntry.Type.STATEMENT_GROUP) ? ":" : " ->";<NEW_LINE>if (isNullOrEmpty(n.getLabels())... | label.accept(this, arg); |
433,828 | protected void initVariableMappers() {<NEW_LINE>valueMappers = new DefaultValueMappers(defaultSerializationFormat);<NEW_LINE>valueMappers.addMapper(new NullValueMapper());<NEW_LINE>valueMappers.addMapper(new BooleanValueMapper());<NEW_LINE>valueMappers.addMapper(new StringValueMapper());<NEW_LINE>valueMappers.addMapper... | addMapper(new FileValueMapper(engineClient)); |
280,024 | public Request<UpdateJobStatusRequest> marshall(UpdateJobStatusRequest updateJobStatusRequest) {<NEW_LINE>if (updateJobStatusRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<UpdateJobStatusRequest> request = new DefaultRequest<UpdateJobSta... | (updateJobStatusRequest.getAccountId())); |
1,484,813 | public void onRender(Env env, Scope scope, Writer writer) {<NEW_LINE>String <MASK><NEW_LINE>String style = getPara("style", scope);<NEW_LINE>Boolean hasThumbnail = getParaToBool("hasThumbnail", scope);<NEW_LINE>String orderBy = getPara("orderBy", scope, "id desc");<NEW_LINE>int count = getParaToInt("count", scope, 10);... | flag = getPara("flag", scope); |
1,431,824 | private boolean isEqual(Mirror left, Mirror right, EvaluationContext evaluationContext) {<NEW_LINE>if (left instanceof ObjectReference) {<NEW_LINE>return left.equals(right);<NEW_LINE>}<NEW_LINE>VirtualMachine vm = evaluationContext.getDebugger().getVirtualMachine();<NEW_LINE>if (vm == null) {<NEW_LINE>return false;<NEW... | PrimitiveValue) left).floatValue(); |
328,843 | private void decodeWs(WsAtta atta, SelectionKey key) {<NEW_LINE>try {<NEW_LINE>do {<NEW_LINE>Frame frame = atta.decoder.decode(buffer);<NEW_LINE>if (frame instanceof TextFrame || frame instanceof BinaryFrame) {<NEW_LINE>handler.handle(atta.channel, frame);<NEW_LINE>atta.decoder.reset();<NEW_LINE>} else if (frame instan... | .OPCODE_PONG, frame.data)); |
1,583,233 | private void drawEvents(List<JITEvent> events) {<NEW_LINE>Color colourMarker = Color.BLUE;<NEW_LINE>double lineWidth = 2.0;<NEW_LINE>int cumC = 0;<NEW_LINE>double lastCX = graphGapLeft + normaliseX(minX);<NEW_LINE>double lastCY = graphGapTop + normaliseY(0);<NEW_LINE>for (JITEvent event : events) {<NEW_LINE>long stamp ... | x), fix(y)); |
197,993 | public static void main(String[] args) {<NEW_LINE>// Create a queue service client.<NEW_LINE>String queueServiceURL = String.format("https://%s.queue.core.windows.net/%s", ACCOUNT_NAME, SAS_TOKEN);<NEW_LINE>QueueServiceClient queueServiceClient = new QueueServiceClientBuilder().endpoint(queueServiceURL).buildClient();<... | .getValue().receiveMessage(); |
806,655 | public void run() {<NEW_LINE>while (running) {<NEW_LINE>try {<NEW_LINE>Request first = requests.peek();<NEW_LINE>long timeout = 2000;<NEW_LINE>if (first != null) {<NEW_LINE>timeout = Math.max(first.toTimeout<MASK><NEW_LINE>}<NEW_LINE>int select = selector.select(timeout);<NEW_LINE>long now = currentTimeMillis();<NEW_LI... | (currentTimeMillis()), 200L); |
1,090,838 | public static DescribeAntChainTransactionStatisticsV2Response unmarshall(DescribeAntChainTransactionStatisticsV2Response describeAntChainTransactionStatisticsV2Response, UnmarshallerContext _ctx) {<NEW_LINE>describeAntChainTransactionStatisticsV2Response.setRequestId(_ctx.stringValue("DescribeAntChainTransactionStatist... | ("DescribeAntChainTransactionStatisticsV2Response.Result[" + i + "].Dt")); |
1,579,096 | public static void savePoseListCsv(List<Se3_F64> list, RotationType type, OutputStream output) {<NEW_LINE>PrintStream out = new PrintStream(output);<NEW_LINE>out.println("# 6-DOF pose");<NEW_LINE>out.println("# x, y, z, (rotation)");<NEW_LINE>out.println("rotation=" + type.name());<NEW_LINE>out.println("count=" + list.... | quat.z, quat.w); |
180,813 | default void applyTaskIdHistoryBaseQuery(StringBuilder sqlBuilder, Map<String, Object> binds, Optional<String> requestId, Optional<String> deployId, Optional<String> runId, Optional<String> host, Optional<ExtendedTaskState> lastTaskStatus, Optional<Long> startedBefore, Optional<Long> startedAfter, Optional<Long> update... | sqlBuilder, binds.isEmpty()); |
1,599,584 | private void showLikeStatus(final CommentHolder holder, int position) {<NEW_LINE>ReaderComment comment = getItem(position);<NEW_LINE>if (comment == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (mPost.canLikePost()) {<NEW_LINE>holder.mCountLikes.setVisibility(View.VISIBLE);<NEW_LINE>holder.mCountLikes.setSelected(com... | mCountLikes.setVisibility(View.GONE); |
1,450,964 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>// do not write default values<NEW_LINE>if (maxPageSearchSize != null && (maxPageSearchSize.equals(DEFAULT_MAX_PAGE_SEARCH_SIZE) == false)) {<NEW_LINE>builder.field(TransformField.MAX_... | datesAsEpochMillis > 0 ? true : false); |
1,163,482 | private static void zipDir(String dir, String zipPath, String fScript) throws IOException {<NEW_LINE>ZipOutputStream zos = null;<NEW_LINE>try {<NEW_LINE>zos = new ZipOutputStream(new FileOutputStream(zipPath));<NEW_LINE>File zipDir = new File(dir);<NEW_LINE>String[] dirList = zipDir.list();<NEW_LINE>byte[] readBuffer =... | (zipDir, dirList[i]); |
1,187,910 | public static CodegenMethod generateGroupKeyArrayViewCodegen(CodegenMethod generateGroupKeySingle, CodegenClassScope classScope, CodegenInstanceAux instance) {<NEW_LINE>Consumer<CodegenMethod> code = method -> {<NEW_LINE>method.getBlock().ifRefNullReturnNull("events").declareVar(EventBean.EPTYPEARRAY, "eventsPerStream"... | ref("eventsPerStream"), REF_ISNEWDATA)); |
367,445 | public ValidationResult onValidate(ReadState readState) {<NEW_LINE>ValidationResult.ValidationResultBuilder <MASK><NEW_LINE>vrb.detail(ALLOWABLE_VARIANCE_PERCENT_NAME, allowableVariancePercent).detail(DATA_TYPE_NAME, typeName);<NEW_LINE>HollowTypeReadState typeState = readState.getStateEngine().getTypeState(typeName);<... | vrb = ValidationResult.from(this); |
892,086 | static SaveLocationChange determinePaths(DownloadManager dm, MovementInformation mi, boolean check_source, boolean is_test) {<NEW_LINE>boolean proceed = !check_source || mi.source.<MASK><NEW_LINE>if (!proceed) {<NEW_LINE>logInfo("Cannot consider " + describe(dm, mi) + " - does not match source criteria.", dm);<NEW_LINE... | matchesDownload(dm, mi, is_test); |
1,727,623 | public void update(Object newValue, Object oldValue) {<NEW_LINE>StatementResultService statementResultService = agentInstanceContext.getStatementResultService();<NEW_LINE>if (statementResultService.isMakeNatural() || statementResultService.isMakeSynthetic()) {<NEW_LINE>String variableName = reader.getMetaData().getVari... | HashMap<String, Object>(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.