idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
825,879 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl(controller.getLibrary().getTopCards(game, (DomainValue.REGULAR).calculate(game, source, this)... | cards, game, source, true); |
545,696 | public okhttp3.Call systemScopesGetCall(final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/system-scopes";<NEW_LINE>List<Pair> localVarQueryParams = new ArrayList<Pair>();<NEW_LINE>List<Pair> localVarColl... | String[] localVarAccepts = { "application/json" }; |
758,911 | public void add(final ServiceComponent service) {<NEW_LINE>final Document doc = new Document();<NEW_LINE>addField(doc, IndexConstants.SERVICECOMPONENT_UUID, service.getUuid().toString(), Field.Store.YES, false);<NEW_LINE>addField(doc, IndexConstants.SERVICECOMPONENT_NAME, service.getName(), Field.Store.YES, true);<NEW_... | .level(NotificationLevel.ERROR)); |
525,511 | final DescribeSpotDatafeedSubscriptionResult executeDescribeSpotDatafeedSubscription(DescribeSpotDatafeedSubscriptionRequest describeSpotDatafeedSubscriptionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeSpotDatafeedSubscriptionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetri... | invoke(request, responseHandler, executionContext); |
602,998 | public synchronized void startMatch() {<NEW_LINE>if (table.getState() == TableState.STARTING) {<NEW_LINE>try {<NEW_LINE>if (table.isTournamentSubTable()) {<NEW_LINE>logger.info("Tourn. match started id:" + match.getId() + " tournId: " + table.getTournament().getId());<NEW_LINE>} else {<NEW_LINE>managerFactory.userManag... | user.getName() + ')'); |
965,308 | public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) {<NEW_LINE>LayoutInflater inflater <MASK><NEW_LINE>@SuppressLint("InflateParams")<NEW_LINE>View view = inflater.inflate(R.layout.fragment_installer, null);<NEW_LINE>tvMessage = view.findViewById(R.id.tvMidletInfo);<NEW_LINE>tvStatus = view.findViewById(R... | = requireActivity().getLayoutInflater(); |
1,733,822 | public boolean hasNext() {<NEW_LINE>if (getNext()) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>resetToLastKey();<NEW_LINE>// Fail if there is no node anymore.<NEW_LINE>if (!mHasNext) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// Setup everything.<NEW_LINE>mDiffCont = mDiffs.get(mIndex + mPrunedNodes + 1);<NEW_LINE>mD... | moveTo(mDiffCont.getOldNodeKey()); |
14,793 | final AuthorizeSecurityGroupEgressResult executeAuthorizeSecurityGroupEgress(AuthorizeSecurityGroupEgressRequest authorizeSecurityGroupEgressRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(authorizeSecurityGroupEgressRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | endClientExecution(awsRequestMetrics, request, response); |
87,702 | public Reservation unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>Reservation reservation = new Reservation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>whil... | ().unmarshall(context)); |
10,999 | private void resize() {<NEW_LINE>// can grow or shrink<NEW_LINE>final byte[] oldKeysArr = keysArr_;<NEW_LINE>final short[] oldCouponsArr = couponsArr_;<NEW_LINE>final byte[] oldStateArr = stateArr_;<NEW_LINE>final int oldSizeKeys = tableEntries_;<NEW_LINE>tableEntries_ = Math.max(nextPrime((int) (numActiveKeys_ / COUPO... | updateEntrySizeBytes(tableEntries_, keySizeBytes_, maxCouponsPerKey_); |
1,665,000 | private static EnumMap<Shape, Rational> buildShapeDurations() {<NEW_LINE>EnumMap<Shape, Rational> map = new <MASK><NEW_LINE>// 4 measures<NEW_LINE>map.put(Shape.LONG_REST, new Rational(4, 1));<NEW_LINE>// 2 measures<NEW_LINE>map.put(Shape.BREVE_REST, new Rational(2, 1));<NEW_LINE>map.put(Shape.BREVE, new Rational(2, 1)... | EnumMap<>(Shape.class); |
183,036 | static Iterable<Path> findAbsolutePaths(Object val) {<NEW_LINE>if (val instanceof Path) {<NEW_LINE>Path path = (Path) val;<NEW_LINE>if (path.isAbsolute()) {<NEW_LINE>return Collections.singleton(path);<NEW_LINE>}<NEW_LINE>} else if (val instanceof PathSourcePath) {<NEW_LINE>return findAbsolutePaths(((PathSourcePath) va... | Map<?, ?>) val; |
374,537 | // Use invokeAll where the group of tasks to invoke is a single task and where it is no tasks at all.<NEW_LINE>// When a single task is invoked, it runs on the current thread if a permit is available, and otherwise on a separate thread.<NEW_LINE>// However, if using CallerRuns, then it always runs on the current thread... | MINUTES.toNanos(15))); |
575,455 | protected <T> T retryIfEnabled(String locator, Supplier<T> action) {<NEW_LINE>if (options.isRetryEnabled()) {<NEW_LINE>// will throw exception if not found<NEW_LINE>waitFor(locator);<NEW_LINE>}<NEW_LINE>if (options.highlight) {<NEW_LINE>highlight(locator, options.highlightDuration);<NEW_LINE>}<NEW_LINE>String before = ... | Integer retryInterval = options.getRetryInterval(); |
183,176 | protected boolean init() {<NEW_LINE>if (!Skript.classExists("com.sk89q.worldguard.WorldGuard")) {<NEW_LINE>// Assume WorldGuard 6<NEW_LINE>try {<NEW_LINE>Class<?> oldHook = Class.forName("ch.njol.skript.module.worldguard6.WorldGuard6Hook", true, <MASK><NEW_LINE>oldHook.getDeclaredConstructor().newInstance();<NEW_LINE>r... | getClass().getClassLoader()); |
1,166,805 | private void populateFrrInterfaceProperties(Configuration c, FrrInterface iface) {<NEW_LINE>org.batfish.datamodel.Interface viIface = c.getAllInterfaces().get(iface.getName());<NEW_LINE>checkArgument(viIface != null, "VI interface object not found for interface %s", iface.getName());<NEW_LINE>if (iface.getAlias() != nu... | > ownedIpAddressesBuilder = ImmutableList.builder(); |
156,207 | protected GridPointers pointerizeOp(Op op, int... dimensions) {<NEW_LINE>GridPointers pointers = new GridPointers(op, dimensions);<NEW_LINE><MASK><NEW_LINE>val context = allocator.getDeviceContext();<NEW_LINE>pointers.setX(allocator.getPointer(op.x(), context));<NEW_LINE>pointers.setXShapeInfo(allocator.getPointer(op.x... | AtomicAllocator allocator = AtomicAllocator.getInstance(); |
1,181,198 | public Statistics estimateStatistics() {<NEW_LINE>// its a fresh table, no data<NEW_LINE>if (table.currentSnapshot() == null) {<NEW_LINE>return new Stats(0L, 0L);<NEW_LINE>}<NEW_LINE>// estimate stats using snapshot summary only for partitioned tables (metadata tables are unpartitioned)<NEW_LINE>if (!table.spec().isUnp... | estimateSize(lazyType(), numRows); |
1,846,194 | private boolean evaluateIsoSurface(VecD up, VecD direction) {<NEW_LINE>VecD pos = getFirstIntersectionWithHint(direction);<NEW_LINE>if (pos == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>VecD right = direction.cross(up).normalize(<MASK><NEW_LINE>up = up.multiply(SMOOTHNESS_ROTATION / SMOOTHNESS_GRID_SIZE);<NEW_L... | ).multiply(SMOOTHNESS_ROTATION / SMOOTHNESS_GRID_SIZE); |
1,356,713 | public void handle(HttpExchange t) throws IOException {<NEW_LINE>try {<NEW_LINE>LOGGER.debug("root req " + t.getRequestURI());<NEW_LINE>if (WebInterfaceServerUtil.deny(t)) {<NEW_LINE>throw new IOException("Access denied");<NEW_LINE>}<NEW_LINE>if (t.getRequestURI().getPath().contains("favicon")) {<NEW_LINE>WebInterfaceS... | ("logs", getLogs(true)); |
918,811 | public static <T> void assertEqualCollections(@Nonnull String message, @Nonnull Collection<T> actual, @Nonnull Collection<T> expected) {<NEW_LINE>if (!StringUtil.isEmptyOrSpaces(message) && !message.endsWith(":") && !message.endsWith(": ")) {<NEW_LINE>message += ": ";<NEW_LINE>}<NEW_LINE>if (actual.size() != expected.s... | + stringifyActualExpected(actual, expected)); |
72,600 | private TExecPlanFragmentParams streamLoadPutImpl(TStreamLoadPutRequest request) throws UserException {<NEW_LINE>String cluster = request.getCluster();<NEW_LINE>if (Strings.isNullOrEmpty(cluster)) {<NEW_LINE>cluster = SystemInfoService.DEFAULT_CLUSTER;<NEW_LINE>}<NEW_LINE>Catalog catalog = Catalog.getCurrentCatalog();<... | ), request.getTxnId()); |
1,025,547 | public static void generateTargetGroupFiles(Map<String, List<TargetGroupVH>> targetGrpMap) throws IOException {<NEW_LINE>String fieldNames;<NEW_LINE>String keys;<NEW_LINE>fieldNames = "trgtGrp.TargetGroupArn`trgtGrp.TargetGroupName`trgtGrp.vpcid`trgtGrp.protocol`trgtGrp.port`trgtGrp.HealthyThresholdCount`trgtGrp.Unheal... | targetGrpMap, fieldNames, "aws-targetgroup-instances.data", keys); |
1,477,209 | public boolean visit(AssertStatement node) {<NEW_LINE>Expression message = node.getMessage();<NEW_LINE>if (message != null) {<NEW_LINE>int atColon = this.tm.firstIndexBefore(message, TokenNameCOLON);<NEW_LINE>int afterColon = this.tm.firstIndexIn(message, -1);<NEW_LINE>if (this.options.wrap_before_assertion_message_ope... | this.secondaryWrapIndexes.add(afterColon); |
609,323 | public void process(ComplexEventChunk complexEventChunk) {<NEW_LINE>complexEventChunk.reset();<NEW_LINE>ComplexEventChunk<ComplexEvent> outputEventChunk = new ComplexEventChunk<>();<NEW_LINE>RateLimiterState state = stateHolder.getState();<NEW_LINE>try {<NEW_LINE>synchronized (state) {<NEW_LINE>while (complexEventChunk... | ComplexEvent event = complexEventChunk.next(); |
814,193 | public void read(org.apache.thrift.protocol.TProtocol iprot, adhoc_filter_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.<MASK><NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apache.thrift.protocol.TType.STOP... | apache.thrift.protocol.TField schemeField; |
1,021,428 | public static void runMain(IFindBugsEngine findBugs, TextUICommandLine commandLine) throws IOException {<NEW_LINE>boolean verbose = !commandLine.quiet();<NEW_LINE>try {<NEW_LINE>findBugs.execute();<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>// should not occur<NEW_LINE>assert false;<NEW_LINE>checkExitCodeFail... | log(FINE, "Analysis errors: {0}", errorCount); |
1,642,553 | public static ClientCompactionIntervalSpec fromSegments(List<DataSegment> segments, @Nullable Granularity segmentGranularity) {<NEW_LINE>Interval interval = JodaUtils.umbrellaInterval(segments.stream().map(DataSegment::getInterval).collect(Collectors.toList()));<NEW_LINE>LOGGER.info("Original umbrella interval %s in co... | (0).getDataSource()); |
496,047 | public static APIQueryPortForwardingRuleReply __example__() {<NEW_LINE>APIQueryPortForwardingRuleReply reply = new APIQueryPortForwardingRuleReply();<NEW_LINE>PortForwardingRuleInventory rule = new PortForwardingRuleInventory();<NEW_LINE>rule.setUuid(uuid());<NEW_LINE>rule.setName("TestAttachRule");<NEW_LINE>rule.setDe... | PortForwardingRuleState.Enabled.toString()); |
1,016,214 | void assign(TaskRequest request) {<NEW_LINE>final TaskRequest.AssignedResources assignedResources = request.getAssignedResources();<NEW_LINE>if (assignedResources != null) {<NEW_LINE>final List<ConsumeResult<MASK><NEW_LINE>if (consumedNamedResources != null && !consumedNamedResources.isEmpty()) {<NEW_LINE>for (Preferen... | > consumedNamedResources = assignedResources.getConsumedNamedResources(); |
1,794,798 | public static void main(String[] args) {<NEW_LINE>String text = "barcelona";<NEW_LINE>SuffixArray suffixArray = new Exercise28().new SuffixArray(text);<NEW_LINE>StdOut.println(" i index lcp rank select");<NEW_LINE>StdOut.println("------------------------------");<NEW_LINE>for (int i = 0; i < text.length(); i++) {<NEW_... | println("LCP 1: " + lcp1 + " Expected: 1"); |
1,716,047 | public void assignPoint(Person person, String cityName) {<NEW_LINE>List<Place> zipsForCity;<NEW_LINE>if (cityName == null) {<NEW_LINE>int size = zipCodes.keySet().size();<NEW_LINE>cityName = (String) zipCodes.keySet().toArray()[person.randInt(size)];<NEW_LINE>}<NEW_LINE>zipsForCity = zipCodes.get(cityName);<NEW_LINE>if... | attributes.get(Person.ZIP); |
1,396,015 | public static RawTx fromProto(protobuf.BaseTx protoBaseTx) {<NEW_LINE>ImmutableList<TxInput> txInputs = protoBaseTx.getTxInputsList().isEmpty() ? ImmutableList.copyOf(new ArrayList<>()) : ImmutableList.copyOf(protoBaseTx.getTxInputsList().stream().map(TxInput::fromProto).collect<MASK><NEW_LINE>protobuf.RawTx protoRawTx... | (Collectors.toList())); |
505,429 | private void initComponents() {<NEW_LINE>// GEN-BEGIN:initComponents<NEW_LINE>jSplitPane1 = new javax.swing.JSplitPane();<NEW_LINE>documentTabs = new javax.swing.JTabbedPane();<NEW_LINE>jScrollPane1 = new javax.swing.JScrollPane();<NEW_LINE>fileTree = new javax.swing.JTree();<NEW_LINE>toolbarPanel = new javax.swing.JPa... | .Dimension(400, 200)); |
1,321,361 | protected T constructMappedInstance(ResultSet rs, TypeConverter tc) throws SQLException {<NEW_LINE>Assert.state(this.mappedConstructor != null, "Mapped constructor was not initialized");<NEW_LINE>Object[] args;<NEW_LINE>if (this.constructorParameterNames != null && this.constructorParameterTypes != null) {<NEW_LINE>arg... | index, td.getType()); |
582,326 | private void updatePoolSize() {<NEW_LINE>DeviceProfile grid = BaseDraggingActivity.fromContext(getContext()).getDeviceProfile();<NEW_LINE><MASK><NEW_LINE>int approxRows = (int) Math.ceil(grid.availableHeightPx / grid.allAppsIconSizePx);<NEW_LINE>pool.setMaxRecycledViews(AllAppsGridAdapter.VIEW_TYPE_EMPTY_SEARCH, 1);<NE... | RecyclerView.RecycledViewPool pool = getRecycledViewPool(); |
1,742,652 | public void processResource(String resource, InputStream inputStream, List<Relocator> relocators, long time) throws IOException {<NEW_LINE>Attributes attributes;<NEW_LINE>if (shadedManifest == null) {<NEW_LINE>shadedManifest = new Manifest(inputStream);<NEW_LINE>attributes = shadedManifest.getMainAttributes();<NEW_LINE... | , findStrongerDefinition(packageDefinition, oldPackageDefinition)); |
1,035,630 | public LayoutAlgorithm.Builder<AttributedVertex, ?, ?> apply(String name) {<NEW_LINE>switch(name) {<NEW_LINE>case GEM:<NEW_LINE>return GEMLayoutAlgorithm.edgeAwareBuilder();<NEW_LINE>case FORCED_BALANCED:<NEW_LINE>return KKLayoutAlgorithm.<AttributedVertex>builder().preRelaxDuration(1000);<NEW_LINE>case FORCE_DIRECTED:... | ).layering(Layering.NETWORK_SIMPLEX); |
252,658 | private static boolean processCompositeIndexDelete(final OIndex index, final Set<String> dirtyFields, final ODocument iRecord, List<IndexChange> changes) {<NEW_LINE>final OCompositeIndexDefinition indexDefinition = (OCompositeIndexDefinition) index.getDefinition();<NEW_LINE>final String multiValueField = indexDefinitio... | (iRecord.field(field)); |
293,088 | private static void pointAddVar(boolean negate, PointExt p, PointExt r) {<NEW_LINE>int[] a = F.create();<NEW_LINE>int[] b = F.create();<NEW_LINE>int[] c = F.create();<NEW_LINE>int[] d = F.create();<NEW_LINE>int[] e = F.create();<NEW_LINE>int[] f = F.create();<NEW_LINE>int[] g = F.create();<NEW_LINE>int[] h = F.create()... | y, p.x, h); |
623,017 | public void warm(LeafReader reader) throws IOException {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>int indexedCount = 0;<NEW_LINE>int docValuesCount = 0;<NEW_LINE>int normsCount = 0;<NEW_LINE>for (FieldInfo info : reader.getFieldInfos()) {<NEW_LINE>if (info.getIndexOptions() != IndexOptions.NONE) {... | reader.getSortedNumericDocValues(info.name); |
393,101 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static void addInstanceFilter(com.sun.jdi.request.MethodExitRequest a, com.sun.jdi.ObjectReference b) throws org.netbeans.modules.debugger.jpda.jdi.InternalExceptionWrapper, org.netbeans.modules.debugger.jpda.jdi.VMDisconnectedExceptionWrapper {<NEW_LI... | Mirror) a).virtualMachine(); |
847,408 | private void updateComponents() {<NEW_LINE>boolean state;<NEW_LINE>if (updating) {<NEW_LINE>log.debug("Ignoring updateComponents");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.debug("Running updateComponents()");<NEW_LINE>updating = true;<NEW_LINE>// First enable all components if optimization not running<NEW_LINE>if (!ru... | log.debug("maximumStabilitySpimmer & UnitSelector enabled: " + state); |
1,231,635 | public void fitToSuppliedMarkers(ReadableArray markerIDsArray, ReadableMap edgePadding, boolean animated) {<NEW_LINE>if (map == null)<NEW_LINE>return;<NEW_LINE>LatLngBounds.Builder builder = new LatLngBounds.Builder();<NEW_LINE>String[] markerIDs = new String[markerIDsArray.size()];<NEW_LINE>for (int i = 0; i < markerI... | CameraUpdateFactory.newLatLngBounds(bounds, baseMapPadding); |
724,424 | public String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay) {<NEW_LINE>String name = getJobName();<NEW_LINE>// Store reference to applications job and service<NEW_LINE>JobDataMap jobData = new JobDataMap();<NEW_LINE>jobData.put(QuartzSchedulingServiceJob.SCHEDULING_SERVICE, this);<NEW_LINE>jobDa... | repeatForever()).build(); |
846,095 | private static void populateFindOnDemandQueryRuntime(FindOnDemandQueryRuntime findOnDemandQueryRuntime, MatchingMetaInfoHolder metaStreamInfoHolder, Selector selector, List<VariableExpressionExecutor> variableExpressionExecutors, Map<String, Table> tableMap, Map<String, Window> windowMap, int metaPosition, boolean grou... | (metaStreamInfoHolder.getMetaStateEvent())); |
604,931 | private static void checkSELinux() {<NEW_LINE>if (!DaemonUtils.hasSELinux()) {<NEW_LINE>System.out.println("- This device does not have SELinux");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!SELinux.isSELinuxEnabled()) {<NEW_LINE>System.out.println("- SELinux is disabled");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!SELin... | System.out.println("! SELinux is permissive"); |
28,456 | public static OpenSearchStatusException errorFromXContent(XContentParser parser) throws IOException {<NEW_LINE>XContentParser.<MASK><NEW_LINE>ensureExpectedToken(XContentParser.Token.START_OBJECT, token, parser);<NEW_LINE>OpenSearchException exception = null;<NEW_LINE>RestStatus status = null;<NEW_LINE>String currentFi... | Token token = parser.nextToken(); |
1,450,740 | private void detachVipForPrivateL3(VmNicInventory nic, Completion completion) {<NEW_LINE>VirtualRouterVmInventory vr = VirtualRouterVmInventory.valueOf((VirtualRouterVmVO) Q.New(VirtualRouterVmVO.class).eq(VirtualRouterVmVO_.uuid, nic.getVmInstanceUuid<MASK><NEW_LINE>List<VipVO> vips = SQL.New("select vip from VipVO vi... | ()).find()); |
940,865 | protected IndexImporter indexImporter(IndexConfig indexConfig, IndexImporterFactory importerFactory, BatchingNeoStores neoStores, EntityType entityType, MemoryTracker memoryTracker, CursorContext cursorContext, Function<CursorContext, StoreCursors> storeCursorsFactory) {<NEW_LINE>var schemaStore = neoStores.getNeoStore... | getSchemaRuleAccess(schemaStore, tokenHolders, metaDataStore); |
1,350,864 | // Asynchronous Send Statement<NEW_LINE>@Override<NEW_LINE>public void visit(BLangWorkerSend workerSendNode, AnalyzerData data) {<NEW_LINE>BSymbol receiver = symResolver.lookupSymbolInMainSpace(data.env, names.fromIdNode(workerSendNode.workerIdentifier));<NEW_LINE>if ((receiver.tag & SymTag.VARIABLE) != SymTag.VARIABLE... | expr.pos, DiagnosticErrorCode.INVALID_SEND_EXPR); |
649,954 | private void actionAcctSchema() {<NEW_LINE>KeyNamePair keyNamePair = (KeyNamePair) selAcctSchema.getSelectedItem();<NEW_LINE>if (keyNamePair == null)<NEW_LINE>return;<NEW_LINE>accountViewerData.C_AcctSchema_ID = keyNamePair.getKey();<NEW_LINE>accountViewerData.ASchema = MAcctSchema.get(Env.getCtx(), accountViewerData.C... | [selectionIndex].setActionCommand(columnName); |
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><MASK><NEW_LINE>if (func.po... | ClassWriter cw = new BallerinaClassWriter(COMPUTE_FRAMES); |
289,828 | // -------------------------------------------------------------------------<NEW_LINE>// XXX: QueryPart API<NEW_LINE>// -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public final void accept(Context<?> ctx) {<NEW_LINE>switch(ctx.family()) {<NEW_LINE>case CUBRID:<N... | (K_DATABASE).sql("()"); |
1,697,197 | final GetMinuteUsageResult executeGetMinuteUsage(GetMinuteUsageRequest getMinuteUsageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getMinuteUsageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetMinuteUs... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,319,578 | public CodegenExpression codegen(CodegenMethodScope codegenMethodScope, CodegenClassScope codegenClassScope, CodegenExpressionRef left, CodegenExpressionRef right, EPTypeClass ltype, EPTypeClass rtype) {<NEW_LINE>if (!divisionByZeroReturnsNull) {<NEW_LINE>return op(codegenAsDouble(left, ltype), "/", codegenAsDouble(rig... | "/", ref("d2Double"))); |
830,623 | public void read(org.apache.thrift.protocol.TProtocol iprot, deleteBlob_args struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org... | skip(iprot, schemeField.type); |
490,880 | private int assignReplicasForTier(final String tier, final int targetReplicantsInTier, final int currentReplicantsInTier, final DruidCoordinatorRuntimeParams params, final Predicate<ServerHolder> predicate, final DataSegment segment) {<NEW_LINE>final int numToAssign = targetReplicantsInTier - currentReplicantsInTier;<N... | getServer().getTier()); |
510,681 | public static DataSourceProxyConfig parseConfig(String url, Properties info) throws SQLException {<NEW_LINE>String restUrl = url.substring(DEFAULT_PREFIX.length());<NEW_LINE>DataSourceProxyConfig config = new DataSourceProxyConfig();<NEW_LINE>if (restUrl.startsWith(DRIVER_PREFIX)) {<NEW_LINE>int pos = restUrl.indexOf('... | setRawDriverClassName(driverText.trim()); |
402,019 | private static List<Entry> readEntries(String annotatorName, Set<String> noDefaultOverwriteLabels, List<Boolean> ignoreCaseList, List<String[]> headerList, Map<Entry, Integer> entryToMappingFileNumber, boolean verbose, String[] annotationFieldnames, String... mappings) {<NEW_LINE>// Unlike RegexNERClassifier, we don't ... | ), mappingFileIndex, entryToMappingFileNumber, verbose); |
1,251,255 | public void reset() {<NEW_LINE>if (!isEmpty_) {<NEW_LINE>isEmpty_ = true;<NEW_LINE>mem_.setBits(FLAGS_BYTE, (byte) (1 << Flags.IS_EMPTY.ordinal()));<NEW_LINE>}<NEW_LINE>final int lgResizeFactor = mem_.getByte(LG_RESIZE_FACTOR_BYTE);<NEW_LINE>final float samplingProbability = mem_.getFloat(SAMPLING_P_FLOAT);<NEW_LINE>fi... | getStartingCapacity(getNominalEntries(), lgResizeFactor); |
613,539 | private int convertTypeName(StringBuilder strB, int pos, String signature) {<NEW_LINE>final char[] chars = signature.toCharArray();<NEW_LINE>int k = 0;<NEW_LINE>while (chars[pos] == '[') {<NEW_LINE>k++;<NEW_LINE>pos++;<NEW_LINE>}<NEW_LINE>int nextPos = pos + 1;<NEW_LINE>switch(chars[pos]) {<NEW_LINE>case 'B':<NEW_LINE>... | substring(pos, nextPos))); |
38,989 | public FrameGrabber createFrameGrabber() throws FrameGrabber.Exception {<NEW_LINE>try {<NEW_LINE>settings.getFrameGrabber().getMethod("tryLoad").invoke(null);<NEW_LINE>FrameGrabber f;<NEW_LINE>if (settings.getDeviceFile() != null) {<NEW_LINE>f = settings.getFrameGrabber().getConstructor(File.class).newInstance(settings... | ? 0 : settings.getDeviceNumber(); |
911,412 | private static ByteBuf encodeReasonCodePlusPropertiesMessage(ChannelHandlerContext ctx, MqttMessage message) {<NEW_LINE>if (message.variableHeader() instanceof MqttReasonCodeAndPropertiesVariableHeader) {<NEW_LINE>MqttVersion mqttVersion = getMqttVersion(ctx);<NEW_LINE>MqttFixedHeader mqttFixedHeader = message.fixedHea... | writeByte(variableHeader.reasonCode()); |
1,117,325 | private void processFunction(@NotNull final Project project, @NotNull final ErlangFunction function, @Nullable Editor editor) {<NEW_LINE>if (!(function.getContainingFile() instanceof ErlangFile))<NEW_LINE>return;<NEW_LINE>ErlangFile file = (ErlangFile) function.getContainingFile();<NEW_LINE>List<ErlangExport> exports =... | exportPopupList = createExportJBList(editor, notEmptyExports); |
149,904 | public void start() throws Exception {<NEW_LINE>final ConnectionPool connectionPool = createPool();<NEW_LINE>metricRegistry.register(name(getClass(), connectionPool.getName(), "active"), (Gauge<Integer>) connectionPool::getActive);<NEW_LINE>metricRegistry.register(name(getClass(), connectionPool.getName(), "idle"), (Ga... | <Integer>) connectionPool::getSize); |
192,047 | private HBox createEntry(Environment environment) {<NEW_LINE>JFXButton renameButton = new JFXButton();<NEW_LINE>renameButton.setGraphic(new FontAwesomeIconView(FontAwesomeIcon.PENCIL, "1.5em"));<NEW_LINE>renameButton.setOnAction<MASK><NEW_LINE>JFXButton editButton = new JFXButton();<NEW_LINE>editButton.setGraphic(new F... | (e -> triggerRenameDialog(environment)); |
70,615 | private synchronized void markSupportedPids(int obdService, int start, long bitmask, PvList pvList) {<NEW_LINE>currSupportedPid = 0;<NEW_LINE>// Clear PID list on initial bitmask (offset 0)<NEW_LINE>if (start == 0) {<NEW_LINE>pidSupported.clear();<NEW_LINE>}<NEW_LINE>// loop through bits and mark corresponding PIDs as ... | , obdService, start + 0x20)); |
289,296 | public static void printRow(List<List<String>> lists, int i, List<Integer> maxSizeList) {<NEW_LINE>printf("|");<NEW_LINE>int count;<NEW_LINE>int maxSize;<NEW_LINE>String element;<NEW_LINE>StringBuilder paddingStr;<NEW_LINE>for (int j = 0; j < maxSizeList.size(); j++) {<NEW_LINE><MASK><NEW_LINE>element = lists.get(j).ge... | maxSize = maxSizeList.get(j); |
276,258 | public void onInit() {<NEW_LINE>if (this.initialized) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>super.onInit();<NEW_LINE>if (this.maxSubscribers == null) {<NEW_LINE>setMaxSubscribers(getIntegrationProperty(IntegrationProperties.CHANNELS_MAX_BROADCAST_SUBSCRIBERS, Integer.class));<NEW_LINE>}<NEW_LINE>if (this.messageConver... | new ChannelTopic(this.topicName)); |
1,190,152 | private static NotificationCompat.Builder createNotification(Context context, Intent intent) {<NEW_LINE>PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, /* Request code */<NEW_LINE>intent, PendingIntent.FLAG_ONE_SHOT);<NEW_LINE>String channelId = context.<MASK><NEW_LINE>Uri defaultSoundUri = Ringtone... | getString(R.string.default_notification_channel_id); |
627,976 | public List<OptExpression> transform(OptExpression input, OptimizerContext context) {<NEW_LINE>LogicalEsScanOperator operator = (LogicalEsScanOperator) input.getOp();<NEW_LINE>EsTablePartitions esTablePartitions = operator.getEsTablePartitions();<NEW_LINE>Collection<Long> partitionIds = null;<NEW_LINE>try {<NEW_LINE>pa... | add(esShardPartitions.getIndexName()); |
509,186 | CssTokens build() {<NEW_LINE>// Close any still open brackets.<NEW_LINE>{<NEW_LINE>int startOfCloseBrackets = sb.length();<NEW_LINE>closeBrackets(0);<NEW_LINE>emitMergedTokens(startOfCloseBrackets, sb.length());<NEW_LINE>}<NEW_LINE>if (tokenTypes == null) {<NEW_LINE>return EMPTY;<NEW_LINE>}<NEW_LINE>int[] bracketsTrunc... | sb.substring(0, cssEnd); |
1,472,171 | private void updateBottomBar() {<NEW_LINE>int position = mPager.getCurrentItem();<NEW_LINE>final Resources res = getResources();<NEW_LINE>if (position == mCurrentPageSequence.size()) {<NEW_LINE>mNextButton.setText(R.string.btn_wizard_finish);<NEW_LINE>mNextButton.setBackgroundDrawable(new ColorDrawable(ContextCompat.ge... | position != mPagerAdapter.getCutOffPage()); |
141,861 | public static List<StoreDefinition> dropZone(List<StoreDefinition> currentStoreDefs, int dropZoneId) {<NEW_LINE>List<StoreDefinition> adjustedStoreDefList = new ArrayList<StoreDefinition>();<NEW_LINE>for (StoreDefinition storeDef : currentStoreDefs) {<NEW_LINE>HashMap<Integer, Integer> zoneRepFactorMap = storeDef.getZo... | adjustedStoreDefBuilder = StoreDefinitionUtils.getBuilderForStoreDef(storeDef); |
886,444 | public ExecutionTimeValue<? extends C> calculateExecutionTimeValue() {<NEW_LINE>List<ExecutionTimeValue<? extends Iterable<? extends T>>> values = new ArrayList<>();<NEW_LINE>value.calculateExecutionTimeValue(values::add);<NEW_LINE>boolean fixed = true;<NEW_LINE>boolean changingContent = false;<NEW_LINE>for (ExecutionT... | >(values.size()); |
180,714 | public void createStreamMarker(String userId, String description, String token, StreamMarkerResult listener) {<NEW_LINE>Map<String, String> <MASK><NEW_LINE>data.put("user_id", userId);<NEW_LINE>if (description != null && !description.isEmpty()) {<NEW_LINE>data.put("description", description);<NEW_LINE>}<NEW_LINE>newApi... | data = new HashMap<>(); |
944,622 | public Collection<EventObject> findLastMessagesBefore(MetaContact contact, Date date, int count) throws RuntimeException {<NEW_LINE>LinkedList<EventObject> result = new LinkedList<EventObject>();<NEW_LINE>Iterator<Contact> iter = contact.getContacts();<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>Contact item = iter.next... | logger.error("Could not read history", e); |
1,025,392 | public boolean updateContext(final Properties ctx) {<NEW_LINE>final int sessionId = getAD_Session_ID();<NEW_LINE>if (sessionId <= 0) {<NEW_LINE>log.warn("Cannot update context because session is not saved yet");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!sessionPO.isActive()) {<NEW_LINE>log.debug("Cannot update co... | getContextAsInt(ctx, Env.CTXNAME_AD_Session_ID); |
1,560,022 | /* View action functions */<NEW_LINE>public void onButtonClick(View view) {<NEW_LINE>assert view.getClass().isInstance(Button.class);<NEW_LINE>Button button = (Button) view;<NEW_LINE>switch(button.getId()) {<NEW_LINE>case R.id.buttonCancel:<NEW_LINE>finish();<NEW_LINE>break;<NEW_LINE>case R.id.buttonSave:<NEW_LINE>Date... | findViewById(R.id.datePicker); |
273,881 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | invoke(request, responseHandler, executionContext); |
1,468,254 | public void actionPerformed(ActionContext context) {<NEW_LINE>GTree gTree = (GTree) context.getContextObject();<NEW_LINE>TreePath[] selectionPaths = gTree.getSelectionPaths();<NEW_LINE>TreePath treePath = selectionPaths[0];<NEW_LINE>final DataTypeNode dataTypeNode = (DataTypeNode) treePath.getLastPathComponent();<NEW_L... | DataTypeManager dataTypeManager = dataType.getDataTypeManager(); |
1,036,253 | public void init() {<NEW_LINE>model = new DefaultDiagramModel();<NEW_LINE>model.setMaxConnections(-1);<NEW_LINE>FlowChartConnector connector = new FlowChartConnector();<NEW_LINE>connector.setPaintStyle("{stroke:'#C7B097',strokeWidth:3}");<NEW_LINE>model.setDefaultConnector(connector);<NEW_LINE>Element start = new Eleme... | new BlankEndPoint(EndPointAnchor.LEFT)); |
170,240 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | false), new ListTagsForResourceResultJsonUnmarshaller()); |
1,588,432 | public final ExpressionListContext expressionList() throws RecognitionException {<NEW_LINE>ExpressionListContext _localctx = new ExpressionListContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 432, RULE_expressionList);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>se... | _errHandler.reportError(this, re); |
750,061 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View v = inflater.inflate(R.layout.available_gpx, container, false);<NEW_LINE>listView = v.findViewById(android.R.id.list);<NEW_LINE>setHasOptionsMenu(true);<NEW_LINE>if (OsmandPlugin.isActive(OsmandMon... | layout.list_shadow_footer, null, false); |
539,499 | public void SetData(Buffer data) {<NEW_LINE>if (data instanceof ByteBuffer) {<NEW_LINE>if (!data.isDirect()) {<NEW_LINE>ByteBuffer buff = ByteBuffer.allocateDirect(data.capacity());<NEW_LINE>buff.order(ByteOrder.nativeOrder());<NEW_LINE>buff.put((ByteBuffer) data);<NEW_LINE>data.rewind();<NEW_LINE>buff.rewind();<NEW_LI... | .SIZE / Byte.SIZE)); |
967,619 | public void serialize(ColumnDef def, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException {<NEW_LINE>jgen.writeStartObject();<NEW_LINE>jgen.writeStringField("type", def.getType());<NEW_LINE>jgen.writeStringField(<MASK><NEW_LINE>if (def instanceof StringColumnDef) {<NEW_LINE>jgen.... | "name", def.getName()); |
929,806 | private void notifyLayout(DomNode domStyle) {<NEW_LINE>if (mContext.getModuleManager().getJavaScriptModule(EventDispatcher.class) != null) {<NEW_LINE>if (!Float.isNaN(domStyle.getLayoutX()) && !Float.isNaN(domStyle.getLayoutY()) && !Float.isNaN(domStyle.getLayoutWidth()) && !Float.isNaN(domStyle.getLayoutHeight())) {<N... | event.pushMap("layout", onLayoutMap); |
1,368,123 | public Operand buildDXStr(Variable result, DXStrNode node) {<NEW_LINE>Node[] nodePieces = node.children();<NEW_LINE>Operand[] pieces = new Operand[nodePieces.length];<NEW_LINE>int estimatedSize = 0;<NEW_LINE>for (int i = 0; i < pieces.length; i++) {<NEW_LINE>estimatedSize += dynamicPiece(pieces, i, nodePieces[i]);<NEW_... | ] { stringResult }, null)); |
379,677 | public void loadTable(ResultSet rs) {<NEW_LINE>if (m_layout == null)<NEW_LINE>throw new UnsupportedOperationException("Layout not defined");<NEW_LINE>// Clear Table<NEW_LINE>setRowCount(0);<NEW_LINE>//<NEW_LINE>try {<NEW_LINE>while (rs.next()) {<NEW_LINE>int row = getRowCount();<NEW_LINE>setRowCount(row + 1);<NEW_LINE>... | data = rs.getDouble(colIndex); |
1,228,902 | public Optional<ImmutableSet<PreemptionVictim>> filterPreemptionVictims(ITaskConfig pendingTask, Iterable<PreemptionVictim> possibleVictims, AttributeAggregate jobState, Optional<HostOffer> offer, StoreProvider storeProvider) {<NEW_LINE>List<PreemptionVictim> sortedVictims = StreamSupport.stream(possibleVictims.spliter... | (ImmutableSet.copyOf(toPreemptTasks)); |
1,179,547 | private boolean passesFilterCheck(BuildContext context, SpringFactory factory) {<NEW_LINE>String factoryName = factory.getFactory().getName();<NEW_LINE>// TODO shame no ConditionalOnClass on these providers<NEW_LINE>if (factoryName.endsWith("FreeMarkerTemplateAvailabilityProvider")) {<NEW_LINE>return ClassUtils.isPrese... | "com.samskivert.mustache.Mustache", context.getClassLoader()); |
345,449 | private static Long toLong(String value) {<NEW_LINE>final String lowerSValue = value.toLowerCase(Locale.ROOT).trim();<NEW_LINE>if (lowerSValue.endsWith("k")) {<NEW_LINE>return (long) (Double.parseDouble(lowerSValue.substring(0, lowerSValue.length() - 1)) * C1);<NEW_LINE>} else if (lowerSValue.endsWith("kb")) {<NEW_LINE... | ) - 2)) * C3); |
409,029 | public void actionPerformed(AnActionEvent e) {<NEW_LINE>final <MASK><NEW_LINE>final LayoutTreeSelection selection = treeComponent.getSelection();<NEW_LINE>final CompositePackagingElement<?> parent = selection.getCommonParentElement();<NEW_LINE>if (parent == null)<NEW_LINE>return;<NEW_LINE>final PackagingElementNode<?> ... | LayoutTreeComponent treeComponent = myArtifactEditor.getLayoutTreeComponent(); |
633,744 | private void appendCardsStyle(AppDialogPresenter settingsPresenter) {<NEW_LINE>List<OptionItem> options = new ArrayList<>();<NEW_LINE>OptionItem animatedPreviewsOption = UiOptionItem.from(getContext().getString(R.string.card_animated_previews), option -> mMainUIData.enableCardAnimatedPreviews(option.isSelected()<MASK><... | ), mMainUIData.isCardAnimatedPreviewsEnabled()); |
829,364 | private void createReport(IBundleCoverage bundleCoverage) throws IOException {<NEW_LINE>Set<String> unknownFormats = Sets.difference(reportFormats, KNOWN_REPORT_FORMATS);<NEW_LINE>if (!unknownFormats.isEmpty()) {<NEW_LINE>throw new RuntimeException("Unable to parse formats: " + String.join(",", reportFormats));<NEW_LIN... | (new FileMultiReportOutput(reportDirectory))); |
289,867 | public static ListGroupsForUserResponse unmarshall(ListGroupsForUserResponse listGroupsForUserResponse, UnmarshallerContext _ctx) {<NEW_LINE>listGroupsForUserResponse.setCode(_ctx.stringValue("ListGroupsForUserResponse.Code"));<NEW_LINE>listGroupsForUserResponse.setMessage(_ctx.stringValue("ListGroupsForUserResponse.Me... | (_ctx.integerValue("ListGroupsForUserResponse.PageInfo.CurrentPage")); |
1,699,681 | public static ListAvailableEcsTypesResponse unmarshall(ListAvailableEcsTypesResponse listAvailableEcsTypesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAvailableEcsTypesResponse.setRequestId(_ctx.stringValue("ListAvailableEcsTypesResponse.RequestId"));<NEW_LINE>listAvailableEcsTypesResponse.setSupportSpotInstance(... | = new ArrayList<TypesInfo>(); |
784,382 | public void onComplete(FacebookDialog.PendingCall pendingCall, Bundle data) {<NEW_LINE>if (data == null || !data.containsKey(LIKE_DIALOG_RESPONSE_OBJECT_IS_LIKED_KEY)) {<NEW_LINE>// This is an empty result that we can't handle.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean isObjectLiked = data.getBoolean(LIKE_DIALOG_RES... | String likeCountStringWithLike = LikeActionController.this.likeCountStringWithLike; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.