idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,646,678 | public static ImageInfo parseImgur(final JsonObject object) {<NEW_LINE>final JsonObject image = object.getObject("image");<NEW_LINE>final JsonObject links = object.getObject("links");<NEW_LINE>String urlOriginal = null;<NEW_LINE>String urlBigSquare = null;<NEW_LINE>String title = null;<NEW_LINE>String caption = null;<N... | width = image.getLong("width"); |
1,308,514 | private int load_lob_contents() throws IOException {<NEW_LINE>if (_lob_loaded == LOB_STATE.EMPTY) {<NEW_LINE>load_lob_save_point();<NEW_LINE>}<NEW_LINE>if (_lob_loaded == LOB_STATE.READ) {<NEW_LINE><MASK><NEW_LINE>if (raw_size < 0 || raw_size > Integer.MAX_VALUE) {<NEW_LINE>load_lob_length_overflow_error(raw_size);<NEW... | long raw_size = _current_value_save_point.length(); |
487,121 | final ListSolutionsResult executeListSolutions(ListSolutionsRequest listSolutionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSolutionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | endClientExecution(awsRequestMetrics, request, response); |
1,746,301 | public Predicate generate(Map<String, EqualPredicate> prefixes, Map<String, RangePredicate> comparisons, AndPredicate andPredicate) {<NEW_LINE>if (!requiresGeneration) {<NEW_LINE>return andPredicate;<NEW_LINE>}<NEW_LINE>// If we are here, that means we were unable to perform any fast<NEW_LINE>// exits, so any further a... | ] predicates = new Predicate[newSize]; |
1,635,315 | private void addReturnStep(OSelectExecutionPlan result, OCommandContext context, boolean profilingEnabled) {<NEW_LINE>if (returnElements) {<NEW_LINE>result.chain(new ReturnMatchElementsStep(context, profilingEnabled));<NEW_LINE>} else if (returnPaths) {<NEW_LINE>result.chain(new ReturnMatchPathsStep(context, profilingE... | getItems().add(item); |
1,342,684 | private boolean processStructure(XmlTreeNode root, boolean firstPass) {<NEW_LINE>XmlElement element = root.getStartElement();<NEW_LINE>String name = element.getAttribute("NAME");<NEW_LINE>CategoryPath path = getCategoryPath(element);<NEW_LINE>Structure struct = null;<NEW_LINE>boolean isVariableLength = false;<NEW_LINE>... | (element.getAttribute("SIZE")); |
874,767 | public Column thirdQuartileNumberMerge(Table table, Column[] columnsToMerge, String newColumnTitle) {<NEW_LINE>checkTableAndColumnsAreNumberOrNumberList(table, columnsToMerge);<NEW_LINE>AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);<NEW_LINE>Column newColumn;<NEW_LINE>newC... | .getRowNumbers(row, columnsToMerge)); |
541,526 | /*<NEW_LINE>* NOTE: We only ever see one native thread due to the way we create core dumps.<NEW_LINE>*/<NEW_LINE>private Object readThread(DataEntry entry, Builder builder, Object addressSpace) throws IOException {<NEW_LINE>_file.seek(entry.offset);<NEW_LINE>// signalNumber<NEW_LINE>int signalNumber = _file.readInt();<... | , Long.toString(utimeSec)); |
550,294 | public <MT extends IBaseMetaType> MT metaDeleteOperation(IIdType theResourceId, MT theMetaDel, RequestDetails theRequest) {<NEW_LINE>TransactionDetails transactionDetails = new TransactionDetails();<NEW_LINE>// Notify interceptors<NEW_LINE>if (theRequest != null) {<NEW_LINE>ActionRequestDetails requestDetails = new Act... | ), w.getMillisAndRestart()); |
681,677 | public Cursor handle(RelNode logicalPlan, ExecutionContext executionContext) {<NEW_LINE>ArrayResultCursor result = new ArrayResultCursor("TRACE");<NEW_LINE>result.addColumn("ID", DataTypes.IntegerType);<NEW_LINE>result.addColumn("NODE_IP", DataTypes.StringType);<NEW_LINE>result.addColumn("TIMESTAMP", DataTypes.DoubleTy... | addColumn("ROWS", DataTypes.LongType); |
1,434,100 | static Header readHeader(Version version, int networkMessageSize, BytesReference bytesReference) throws IOException {<NEW_LINE>try (StreamInput streamInput = bytesReference.streamInput()) {<NEW_LINE>streamInput.skip(TcpHeader.BYTES_REQUIRED_FOR_MESSAGE_SIZE);<NEW_LINE><MASK><NEW_LINE>byte status = streamInput.readByte(... | long requestId = streamInput.readLong(); |
638,624 | protected boolean checkLoadLimiting(Indexer indexer) {<NEW_LINE>boolean preventedByLoadLimiting = indexer.getConfig().getLoadLimitOnRandom().isPresent() && random.nextInt(indexer.getConfig().getLoadLimitOnRandom().get()) + 1 != 1;<NEW_LINE>if (preventedByLoadLimiting) {<NEW_LINE>boolean loadLimitIgnored = configProvide... | getLoadLimitOnRandom().get()); |
1,754,406 | public // =============<NEW_LINE>void functionScore(OperatorCall<PathMappingCQ> queryLambda, ScoreFunctionCall<ScoreFunctionCreator<PathMappingCQ>> functionsLambda, final ConditionOptionCall<FunctionScoreQueryBuilder> opLambda) {<NEW_LINE>PathMappingCQ cq = new PathMappingCQ();<NEW_LINE>queryLambda.callback(cq);<NEW_LI... | cq.getQuery(), list); |
851,237 | private void verifyInterleavedProperties() {<NEW_LINE>doWithInterleavedProperties((spannerPersistentProperty) -> {<NEW_LINE>// getting the inner type will throw an exception if the property isn't a<NEW_LINE>// collection.<NEW_LINE>Class childType = spannerPersistentProperty.getColumnInnerType();<NEW_LINE>SpannerPersist... | <SpannerPersistentProperty> primaryKeyProperties = getFlattenedPrimaryKeyProperties(); |
1,052,603 | public static File decompress(String tarZipSource, String targetDir) {<NEW_LINE>File unFile = null;<NEW_LINE>// tar compress format<NEW_LINE>ArchiveStreamFactory archiveStreamFactory = new ArchiveStreamFactory();<NEW_LINE>try (FileInputStream inputStream = new FileInputStream(tarZipSource);<NEW_LINE>BufferedInputStream... | createDir(targetDir, entryName, 1); |
854,698 | public void actionPerformed(ActionEvent e) {<NEW_LINE>final RepositoryRegisterUI rrui = new RepositoryRegisterUI(RepositoryNode.this.info);<NEW_LINE>rrui.getAccessibleContext().setAccessibleDescription(LBL_Edit_Repo());<NEW_LINE>DialogDescriptor dd = new DialogDescriptor(rrui, LBL_Edit_Repo());<NEW_LINE>dd.setClosingOp... | getInstance().addOrModifyRepositoryInfo(info); |
505,090 | public void marshall(DocumentClassifierProperties documentClassifierProperties, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (documentClassifierProperties == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(... | documentClassifierProperties.getTrainingStartTime(), TRAININGSTARTTIME_BINDING); |
1,627,972 | public UploadResult uploadBackup(Exhibitor exhibitor, BackupMetaData backup, File source, final Map<String, String> configValues) throws Exception {<NEW_LINE>List<BackupMetaData> <MASK><NEW_LINE>if (availableBackups.contains(backup)) {<NEW_LINE>return UploadResult.DUPLICATE;<NEW_LINE>}<NEW_LINE>RetryPolicy retryPolicy ... | availableBackups = getAvailableBackups(exhibitor, configValues); |
875,220 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_bit_idauthentication);<NEW_LINE>request = (BitIDSignRequest) getIntent().getSerializableExtra(REQUEST);<NEW_LINE>signInButton = (Button) findViewById(R.id.btSignUp);<NEW_LINE>error... | signInButton.setVisibility(View.GONE); |
917,290 | private Node withIpAssigned(Node node) {<NEW_LINE>if (!node.type().isHost()) {<NEW_LINE>return node.with(node.ipConfig().withPrimary(nameResolver.resolveAll(node.hostname())));<NEW_LINE>}<NEW_LINE>int hostIndex = Integer.parseInt(node.hostname().replaceAll("^[a-z]+|-\\d+$", ""));<NEW_LINE>Set<String> addresses = Set.of... | iterator().next()); |
889,226 | public void execute() throws Exception {<NEW_LINE>File quickstartTmpDir = new File(_dataDir, String.valueOf(System.currentTimeMillis()));<NEW_LINE>File baseDir <MASK><NEW_LINE>File dataDir = new File(quickstartTmpDir, "rawdata");<NEW_LINE>Preconditions.checkState(dataDir.mkdirs());<NEW_LINE>File schemaFile = new File(b... | = new File(quickstartTmpDir, "githubEvents"); |
1,538,784 | private void attribute(MessageTextHandler messageTextHandler, Name attributeName, Name elementName, boolean atSentenceStart) throws SAXException {<NEW_LINE>String ns = attributeName.getNamespaceUri();<NEW_LINE>if (html || "".equals(ns)) {<NEW_LINE>messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart);<NEW_L... | messageTextString(messageTextHandler, ATTRIBUTE, atSentenceStart); |
233,986 | protected Control createPreferenceContent(Composite parent) {<NEW_LINE>Composite composite = UIUtils.createPlaceholder(parent, 1, 5);<NEW_LINE>// Misc settings<NEW_LINE>{<NEW_LINE>Group timeoutsGroup = UIUtils.createControlGroup(composite, CoreMessages.pref_page_error_handle_group_timeouts_title, 2, GridData.VERTICAL_A... | CoreMessages.pref_page_error_handle_recover_enabled_tip, false, 2); |
104,033 | private void addSubqueryJoinStatements(PostgresGlobalState globalState, List<PostgresJoin> joinStatements, PostgresTable fromTable) {<NEW_LINE>// JOIN with subquery<NEW_LINE>for (int i = 0; i < Randomly.smallNumber(); i++) {<NEW_LINE>PostgresTables subqueryTables = new PostgresTables(Randomly.nonEmptySubset(localTables... | (globalState).setColumns(columns); |
1,153,510 | private void refreshMappings(@Nullable WorkspaceFileValue newValue) {<NEW_LINE>if (newValue == null) {<NEW_LINE>dirToRepoMap = ImmutableSortedMap.of();<NEW_LINE>repoToDirMap = ImmutableSortedMap.of();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>dirToRepoMap = ImmutableSortedMap.copyOf(newValue.getManagedDirectories());<NEW_LI... | add(entry.getKey()); |
466,441 | // ----- private methods -----<NEW_LINE>private void init() {<NEW_LINE>factories.put(NotEmptyQuery.class, new NotEmptyQueryFactory(this));<NEW_LINE>factories.put(FulltextQuery.class, new KeywordQueryFactory(this));<NEW_LINE>factories.put(SpatialQuery.class, new SpatialQueryFactory(this));<NEW_LINE>factories.put(GroupQu... | class, new ArrayQueryFactory(this)); |
782,921 | public CompletableFuture<Void> addListener(CollectionEventListener<Map.Entry<K, Versioned<V>>> listener, Executor executor) {<NEW_LINE>AtomicMapEventListener<K, V> mapListener = event -> {<NEW_LINE>switch(event.type()) {<NEW_LINE>case INSERT:<NEW_LINE>listener.event(new CollectionEvent<>(CollectionEvent.Type.ADD, Maps.... | event.newValue()))); |
197,342 | public ImageRecycleBinInfo unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ImageRecycleBinInfo imageRecycleBinInfo = new ImageRecycleBinInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE... | ().unmarshall(context)); |
794,057 | public ArcFurnaceRecipe readFromJson(ResourceLocation recipeId, JsonObject json) {<NEW_LINE>JsonArray results = json.getAsJsonArray("results");<NEW_LINE>NonNullList<ItemStack> outputs = NonNullList.withSize(results.size(), ItemStack.EMPTY);<NEW_LINE>for (int i = 0; i < results.size(); i++) outputs.set(i, readOutput(res... | (json.get("input")); |
880,771 | public void actionPerformed(ActionEvent arg0) {<NEW_LINE>tableHosts.acceptText();<NEW_LINE>int r = tableHosts.getRowCount();<NEW_LINE>String defaultIP = UnitContext.getDefaultHost();<NEW_LINE>String ip = defaultIP;<NEW_LINE>if (isClusterEditing) {<NEW_LINE>ip = fixedIP;<NEW_LINE>} else {<NEW_LINE>if (r > 0) {<NEW_LINE>... | int row = tableHosts.addRow(); |
1,070,505 | public void replaceFriends(Set<String> friends, Set<String> packagesToExpose) {<NEW_LINE>removePublicAndFriends();<NEW_LINE>Element _confData = getConfData();<NEW_LINE><MASK><NEW_LINE>Element friendPackages = createModuleElement(doc, ProjectXMLManager.FRIEND_PACKAGES);<NEW_LINE>insertPublicOrFriend(friendPackages);<NEW... | Document doc = _confData.getOwnerDocument(); |
1,308,962 | public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List<Component> tooltip, TooltipFlag flagIn) {<NEW_LINE>if (TooltipUtil.isDisplay(stack)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// add all traits to the info<NEW_LINE>MaterialVariantId materialVariant = this.getMaterial(stack);<NEW_LINE>MaterialId i... | material = MaterialRegistry.getMaterial(id); |
594,736 | public static void cleanupEmptyProfiles(Element rootElement, List<String> profilesParents) {<NEW_LINE>IteratorIterable<Element> filteredElements = rootElement.getDescendants(new ElementFilter(POM_ELEMENT_PROFILES));<NEW_LINE>List<Element> profiles = new ArrayList<>();<NEW_LINE>for (Element profilesElement : filteredEle... | .POM_ELEMENT_ID, JDomCfg.POM_ELEMENT_ACTIVATION)); |
866,385 | private void writeLinksToComparisons(HTMLFile htmlFile, String headerStr, String csvFile) {<NEW_LINE>// should be already sorted!<NEW_LINE>List<JPlagComparison> comparisons = result.getComparisons(options.getMaximumNumberOfComparisons());<NEW_LINE>// Country tag<NEW_LINE>htmlFile.// Country tag<NEW_LINE>println(headerS... | ) + ">" + submissionNameA + "</TD><TD><nobr>-></nobr>"); |
397,489 | public static void updateErrorMessageForVerifyNoMoreInteractions(AssertionError errorToUpdate) {<NEW_LINE>String verifyNoMoreInteractionsInvocation = null;<NEW_LINE>StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();<NEW_LINE>for (int i = stackTrace.length - 1; i >= 0; i--) {<NEW_LINE>final StackTr... | "detailMessage", builder.toString()); |
128,882 | private HttpClient createHttpClient() {<NEW_LINE>SslContextFactory sslContextFactory = null;<NEW_LINE>try {<NEW_LINE>sslContextFactory = new RestletSslContextFactory(org.restlet.engine.ssl.SslUtils.getSslContextFactory(this));<NEW_LINE>} catch (Exception e) {<NEW_LINE>getLogger().log(Level.WARNING, "Unable to create th... | httpClient.setResponseBufferSize(getResponseBufferSize()); |
494,315 | private ScimUser syncGroups(ScimUser user) {<NEW_LINE>if (user == null) {<NEW_LINE>return user;<NEW_LINE>}<NEW_LINE>Set<ScimGroup> directGroups = membershipManager.getGroupsWithMember(user.getId(), <MASK><NEW_LINE>Set<ScimGroup> indirectGroups = membershipManager.getGroupsWithMember(user.getId(), true, identityZoneMana... | false, identityZoneManager.getCurrentIdentityZoneId()); |
536,139 | void calc(FastDistanceVectorData left, FastDistanceSparseData right, double[] res) {<NEW_LINE>Arrays.fill(res, 0.0);<NEW_LINE>int[][] rightIndices = right.getIndices();<NEW_LINE>double[][] rightValues = right.getValues();<NEW_LINE>if (left.vector instanceof DenseVector) {<NEW_LINE>double[] vector = ((DenseVector) left.... | [j] * values[i]; |
1,559,085 | private void logEnv() {<NEW_LINE>try {<NEW_LINE>OperatingSystemMXBean osBean = ManagementFactory.getOperatingSystemMXBean();<NEW_LINE>MBeanServer mserver = ManagementFactory.getPlatformMBeanServer();<NEW_LINE>// w/o dependency on Sun's JDK<NEW_LINE>// long totalMem = ((com.sun.management.OperatingSystemMXBean)osBean).g... | ("org.netbeans.ui.performance").log(lr); |
1,760,648 | protected void postEvent(String t, ActiveConfiguration c, Exception e) {<NEW_LINE>Map<String, Object> eventProps = new HashMap<String, Object>(4);<NEW_LINE>if (c.activeHost != null) {<NEW_LINE>eventProps.put(GenericServiceConstants.ENDPOINT_ACTIVE_HOST, c.activeHost);<NEW_LINE>}<NEW_LINE>eventProps.put(GenericServiceCo... | GenericServiceConstants.ENDPOINT_CONFIG_HOST, c.configHost); |
401,514 | public void visitAnnotations(AnnotatedNode node) {<NEW_LINE>List<AnnotationNode> annotations = node.getAnnotations();<NEW_LINE>if (annotations.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, AnnotationNode> tmpAnnotations = new HashMap<String, AnnotationNode>();<NEW_LINE>ClassNode annType;<NEW_LINE>for (A... | transform(member.getValue()); |
1,607,122 | private static void logMessageReceived(HttpExchange exchange, String content, RendererConfiguration renderer) {<NEW_LINE>StringBuilder header = new StringBuilder();<NEW_LINE>String soapAction = null;<NEW_LINE>header.append(exchange.getRequestMethod());<NEW_LINE>header.append(" ").append(exchange.getRequestURI());<NEW_L... | (value).append("\n"); |
575,812 | public void updateTableStatistics(long startTS, long tableId, long delta, long count) throws SQLException {<NEW_LINE>try (Statement tidbStmt = connection.createStatement()) {<NEW_LINE>String sql;<NEW_LINE>if (delta < 0) {<NEW_LINE>sql = String.format("update mysql.stats_meta set version = %s, count = count - %s, modify... | , count, tableId, -delta); |
1,139,155 | public static SecretKey androidPBKDF2(char[] pwArray, byte[] salt, int rounds, boolean useUtf8) {<NEW_LINE>PBEParametersGenerator generator = new PKCS5S2ParametersGenerator();<NEW_LINE>// Android treats password bytes as ASCII, which is obviously<NEW_LINE>// not the case when an AES key is used as a 'password'.<NEW_LIN... | params.getKey(), "AES"); |
187,957 | private void addHaNodeContainer(Node group, int number) {<NEW_LINE>String portOffset = System.getProperty("app.server." + number + ".port.offset");<NEW_LINE>String managementPort = System.getProperty("app.server." + number + ".management.port");<NEW_LINE>Validate.notNullOrEmpty(<MASK><NEW_LINE>Validate.notNullOrEmpty(m... | portOffset, "app.server." + number + ".port.offset is not set."); |
1,749,260 | private Configuration toVendorIndependentConfiguration() {<NEW_LINE>_c = new Configuration(getHostname(), ConfigurationFormat.CUMULUS_NCLU);<NEW_LINE>_c.setDeviceModel(DeviceModel.CUMULUS_UNSPECIFIED);<NEW_LINE>_c.setDefaultCrossZoneAction(LineAction.PERMIT);<NEW_LINE>_c.setDefaultInboundAction(LineAction.PERMIT);<NEW_... | _c, this, _routeMaps, _w); |
92,276 | private IndexTreePath<E> createNewRoot(final N oldRoot, final N newNode, DBID firstRoutingObjectID, DBID secondRoutingObjectID) {<NEW_LINE>N root = createNewDirectoryNode();<NEW_LINE>writeNode(root);<NEW_LINE>// switch the ids<NEW_LINE>oldRoot.setPageID(root.getPageID());<NEW_LINE>if (!oldRoot.isLeaf()) {<NEW_LINE>// F... | , getRootEntry(), -1); |
307,230 | public void closeNow() {<NEW_LINE>if (!closed.compareAndSet(false, true)) {<NEW_LINE>log.debug("Appenderator already closed, skipping closeNow() call.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>log.debug("Shutting down immediately...");<NEW_LINE>for (Map.Entry<SegmentIdWithShardSpec, Sink> entry : sinks.entrySet()) {<NEW_... | , TimeUnit.DAYS), "persistExecutor not terminated"); |
1,523,197 | private static DruidExpression literalToDruidExpression(final PlannerContext plannerContext, final RexNode rexNode) {<NEW_LINE>final SqlTypeName sqlTypeName = rexNode.getType().getSqlTypeName();<NEW_LINE>// Translate literal.<NEW_LINE>final ColumnType columnType = Calcites.getColumnTypeForRelDataType(rexNode.getType())... | columnType, DruidExpression.nullLiteral()); |
1,748,134 | Channel findOrCreate(InetSocketAddress address) {<NEW_LINE>Channel channel = find(address);<NEW_LINE>if (channel == null) {<NEW_LINE>LOG.debug("creating new channel for {}", address);<NEW_LINE>ChannelFuture channelFuture = bootstrap.connect(address);<NEW_LINE>channel = channelFuture.channel();<NEW_LINE>channels.put(get... | LOG.debug("closing channel for {}", address); |
8,750 | public static Publisher<?> invokeSuspendingFunction(Method method, Object target, Object... args) {<NEW_LINE>KFunction<?> function = Objects.requireNonNull(ReflectJvmMapping.getKotlinFunction(method));<NEW_LINE>if (method.isAccessible() && !KCallablesJvm.isAccessible(function)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>KCl... | KCallablesJvm.setAccessible(function, true); |
1,347,143 | public void initialize(WizardDescriptor wiz) {<NEW_LINE>this.wizardInfo = getWizardInfo();<NEW_LINE>this.helper = new ResourceConfigHelperHolder().getJMSHelper();<NEW_LINE>// this.wiz = wiz;<NEW_LINE>// NOI18N<NEW_LINE>wiz.putProperty("NewFileWizard_Title", NbBundle.getMessage<MASK><NEW_LINE>index = 0;<NEW_LINE>project... | (JMSWizard.class, "Templates/SunResources/JMS_Resource")); |
1,313,537 | private void handleFins(FinSet theFinSet) {<NEW_LINE>Image img = null;<NEW_LINE>java.awt.Image awtImage = new PrintableFinSet(theFinSet).createImage();<NEW_LINE>try {<NEW_LINE>img = Image.<MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>log.error("Could not write image to document.", e);<NEW_LINE>}<NEW_LINE>grid.addCel... | getInstance(writer, awtImage, 0.25f); |
308,500 | private BucketSearchResult splitBucket(final List<Long> path, final int keyIndex, final K keyToInsert, final OAtomicOperation atomicOperation) throws IOException {<NEW_LINE>final long pageIndex = path.get(path.size() - 1);<NEW_LINE>final OCacheEntry bucketEntry = loadPageForWrite(atomicOperation, fileId, pageIndex, fal... | = new ArrayList<>(indexToSplit); |
1,625,340 | public static EnumMethodDesc fromName(String name, ClasspathImportServiceCompileTime classpathImportService) throws ExprValidationException {<NEW_LINE>for (EnumMethodBuiltin e : EnumMethodBuiltin.values()) {<NEW_LINE>if (e.getNameCamel().toLowerCase(Locale.ENGLISH).equals(name.toLowerCase(Locale.ENGLISH))) {<NEW_LINE>r... | plugin, descriptor.getFootprints()); |
1,481,437 | private void determineOuterWedges(RadialMenuEntry entry) {<NEW_LINE>int entriesQty = entry.getChildren().size();<NEW_LINE>wedgeQty2 = entriesQty;<NEW_LINE>// if only default profile<NEW_LINE>if (entriesQty == 0) {<NEW_LINE>wedgeQty2 = 1;<NEW_LINE>}<NEW_LINE>// Wedge 2<NEW_LINE>float degSlice2 = 360 / wedgeQty2;<NEW_LIN... | 2 * Math.PI) / wedgeQty2; |
782,173 | public Builder mergeFrom(org.mlflow.api.proto.Service.GetExperiment.Response other) {<NEW_LINE>if (other == org.mlflow.api.proto.Service.GetExperiment.Response.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasExperiment()) {<NEW_LINE>mergeExperiment(other.getExperiment());<NEW_LINE>}<NEW_LINE>if (runsB... | bitField0_ = (bitField0_ & ~0x00000002); |
1,024,518 | public Object invoke(CameraAnimationsPlugin cameraAnimationsPlugin) {<NEW_LINE>// animateCamera / easeCamera only allows positive duration<NEW_LINE>if (mDuration == 0 || mCameraMode == CameraMode.NONE) {<NEW_LINE>cameraAnimationsPlugin.flyTo(mCameraUpdate, optionsBuilder.duration<MASK><NEW_LINE>}<NEW_LINE>// On iOS a d... | (0).build()); |
919,166 | public void fillOval(int x, int y, int w, int h) {<NEW_LINE>int startX;<NEW_LINE>int endX;<NEW_LINE>int offset;<NEW_LINE>int colour;<NEW_LINE>float as;<NEW_LINE>float bs;<NEW_LINE>if (w <= 0 || h <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>as = (w / 2.0f) * (w / 2.0f);<NEW_LINE>bs = (h / 2.0f) * (h / 2.0f);<NEW_LINE>c... | = x + offset + w / 2; |
369,709 | private Object constructWithClassBody(Class<?> type, Object[] args, BSHBlock block, CallStack callstack, Interpreter interpreter) throws EvalError {<NEW_LINE>String anon = "anon" + (++innerClassCount);<NEW_LINE>String name = callstack.top().getName() + "$" + anon;<NEW_LINE>This.CONTEXT_ARGS.get().put(anon, args);<NEW_L... | e, this, callstack, cause); |
269,460 | private static long[] transform(long[] v, int logN, boolean inverse) {<NEW_LINE>int n = 1 << logN;<NEW_LINE>long[] w = new long[n];<NEW_LINE>for (int i = 0; i < v.length; i++) w[Integer.reverse(i) >>> 32 - logN] = v[i];<NEW_LINE>for (int i = 0; i < logN; i++) {<NEW_LINE>int jMax = 1 << i;<NEW_LINE>int kStep = 2 << i;<N... | = 1 << exp - i - 1; |
413,024 | public static void main(final String[] args) {<NEW_LINE>LOG.fine(() -> "minion started");<NEW_LINE>enablePowerMockSupport();<NEW_LINE>final int port = Integer<MASK><NEW_LINE>Socket s = null;<NEW_LINE>try {<NEW_LINE>s = new Socket("localhost", port);<NEW_LINE>final SafeDataInputStream dis = new SafeDataInputStream(s.get... | .parseInt(args[0]); |
266,837 | // ------------------------------------------------------------------------------<NEW_LINE>// Method: NumericMatcher.handlePut<NEW_LINE>// ------------------------------------------------------------------------------<NEW_LINE>void handlePut(SimpleTest test, Conjunction selector, MatchTarget object, InternTable subExpr... | Object value = test.getValue(); |
700,146 | public static ListVodTemplateResponse unmarshall(ListVodTemplateResponse listVodTemplateResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVodTemplateResponse.setRequestId(_ctx.stringValue("ListVodTemplateResponse.RequestId"));<NEW_LINE>List<VodTemplateInfo> vodTemplateInfoList = new ArrayList<VodTemplateInfo>();<NEW_L... | ("ListVodTemplateResponse.VodTemplateInfoList[" + i + "].ModifyTime")); |
123,386 | public static void main(String[] args) {<NEW_LINE>List<String> stringList = new ArrayList<>();<NEW_LINE>stringList.add("host1");<NEW_LINE>stringList.add("host2");<NEW_LINE>stringList.add("host3");<NEW_LINE>stringList.add("host4");<NEW_LINE>stringList.add("host5");<NEW_LINE>Shard<String> stringShard = new Shard<>(string... | .getShardInfo("" + i)); |
1,415,541 | public Set<byte[]> zRevRangeByScore(byte[] key, Range range, org.springframework.data.redis.connection.Limit limit) {<NEW_LINE>Assert.notNull(key, "Key must not be null!");<NEW_LINE><MASK><NEW_LINE>byte[] min = JedisConverters.boundaryToBytesForZRange(range.getMin(), JedisConverters.NEGATIVE_INFINITY_BYTES);<NEW_LINE>b... | Assert.notNull(range, "Range cannot be null for ZREVRANGEBYSCORE."); |
972,120 | private Object JSONToList(Object obj, String delim) throws ParserException {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>if (obj instanceof JSONObject) {<NEW_LINE>JSONObject jobj = (JSONObject) obj;<NEW_LINE>for (Object ob : jobj.keySet()) {<NEW_LINE>if (sb.length() > 0) {<NEW_LINE>sb.append(delim);<NEW_L... | .toString(), "json.toStrList")); |
1,425,099 | static <B extends ParsedBucket> B parseSignificantTermsBucketXContent(final XContentParser parser, final B bucket, final CheckedBiConsumer<XContentParser, B, IOException> keyConsumer) throws IOException {<NEW_LINE>final List<Aggregation> aggregations = new ArrayList<>();<NEW_LINE>XContentParser.Token token;<NEW_LINE>St... | setKeyAsString(parser.text()); |
407,530 | public void checkClasses(ABCAnalysis abcAnalysis) throws AxelorException {<NEW_LINE>List<ABCAnalysisClass> abcAnalysisClassList = abcAnalysis.getAbcAnalysisClassList();<NEW_LINE>BigDecimal classQty, classWorth;<NEW_LINE>BigDecimal totalQty = BigDecimal.ZERO, totalWorth = BigDecimal.ZERO;<NEW_LINE><MASK><NEW_LINE>for (A... | BigDecimal comparisonValue = new BigDecimal(100); |
136,469 | public static String prettifyModel(Model model) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>List<Integer> states = model.getStates();<NEW_LINE>Collections.sort(states);<NEW_LINE>sb.append("Model(states=").append(states).append<MASK><NEW_LINE>for (int state : states) {<NEW_LINE>for (int next : model.getS... | (", ").append("successors={"); |
890,975 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)<NEW_LINE>*/<NEW_LINE>protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>ScriptingContainer container = ScriptingEngine.getInstance().getInitializedScriptingContainer();<NEW_LINE>Ruby runt... | printStackTrace(new PrintWriter(sw)); |
719,025 | private void addToMergedHeaderMap(TargetNode<? extends CxxLibraryDescription.CommonArg> targetNode, HeaderMap.Builder headerMapBuilder, ImmutableList.Builder<SourcePath> sourcePathsToBuildBuilder) {<NEW_LINE>CxxLibraryDescription.CommonArg arg = targetNode.getConstructorArg();<NEW_LINE>// If the target uses header syml... | resolve(entry.getKey()); |
759,132 | public void migrateNamespaceListToNewZk(final String namespaces, final String zkClusterKeyNew, final String lastUpdatedBy, final boolean updateDBOnly) throws SaturnJobConsoleException {<NEW_LINE>final List<String> namespaceList = new ArrayList<>();<NEW_LINE>String[] split = namespaces.split(",");<NEW_LINE>if (split != ... | , gson.toJson(migrationStatus)); |
347,898 | public SVCallRecord collapse(final Collection<SVCallRecord> items) {<NEW_LINE>validateRecords(items);<NEW_LINE>final String id = collapseIds(items);<NEW_LINE>final List<String> algorithms = collapseAlgorithms(items);<NEW_LINE>final StructuralVariantType type = collapseTypes(items);<NEW_LINE>final Map<String, Object> at... | = 1 + altAlleles.size(); |
1,182,816 | public void resolve(InjectionBinding<PersistenceContext> binding) throws InjectionException {<NEW_LINE>JPAPCtxtInjectionBinding pCtxtBinding = (JPAPCtxtInjectionBinding) binding;<NEW_LINE>final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();<NEW_LINE>if (isTraceOn && tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc,... | String applName = pCtxtBinding.getApplName(); |
542,985 | final GetTagsResult executeGetTags(GetTagsRequest getTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetTagsRequest> request = null;<NEW_LINE>Respo... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
387,008 | // Process incoming queue and put it on priority queue with next timestamp to rerun<NEW_LINE>private boolean processInQueue() {<NEW_LINE>boolean any = false;<NEW_LINE>while (true) {<NEW_LINE>long cursor = inSubSequence.next();<NEW_LINE>// -2 = there was a contest for queue index and this thread has lost<NEW_LINE>if (cu... | calculateNextTimestamp(retry.getAttemptDetails()); |
246,601 | private static List<? extends TypeMirror> computeAssignment(Set<ElementKind> types, CompilationInfo info, TreePath parent, Tree error, int offset) {<NEW_LINE>AssignmentTree at = <MASK><NEW_LINE>TypeMirror type = null;<NEW_LINE>if (at.getVariable() == error) {<NEW_LINE>type = info.getTrees().getTypeMirror(new TreePath(p... | (AssignmentTree) parent.getLeaf(); |
1,793,057 | public void startBenchmark(BenchmarkParams params) {<NEW_LINE>String opts = Utils.join(<MASK><NEW_LINE>if (opts.trim().isEmpty()) {<NEW_LINE>opts = "<none>";<NEW_LINE>}<NEW_LINE>println("# JMH version: " + params.getJmhVersion());<NEW_LINE>println("# VM version: JDK " + params.getJdkVersion() + ", " + params.getVmName(... | params.getJvmArgs(), " "); |
9,099 | public com.amazonaws.services.organizations.model.InvalidInputException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.organizations.model.InvalidInputException invalidInputException = new com.amazonaws.services.organizations.model.InvalidInputException(null);<... | int originalDepth = context.getCurrentDepth(); |
934,708 | public ResponseData<String> send(TransmissionRequest<?> request) {<NEW_LINE>try {<NEW_LINE>logger.info("[HttpTransmission.send] this is http transmission and the service type is: {}", request.getServiceType());<NEW_LINE>if (request.getTransType() != TransType.HTTP && request.getTransType() != TransType.HTTPS) {<NEW_LIN... | requestWarp = super.authTransmission(request); |
1,287,147 | public void onPlayerWhois(InfoComponent.PlayerWhoisEvent event) {<NEW_LINE>if (event.getPlayer() instanceof Player) {<NEW_LINE>Player player = (Player) event.getPlayer();<NEW_LINE>LocalPlayer localPlayer = plugin.wrapPlayer(player);<NEW_LINE>if (WorldGuard.getInstance().getPlatform().getGlobalStateManager().get(localPl... | (localPlayer, Flags.BUILD)); |
225,014 | private void meetingEnded(MeetingEnded message) {<NEW_LINE>Meeting <MASK><NEW_LINE>if (m != null) {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>m.setEndTime(now);<NEW_LINE>Map<String, Object> logData = new HashMap<>();<NEW_LINE>logData.put("meetingId", m.getInternalId());<NEW_LINE>logData.put("externalMeet... | m = getMeeting(message.meetingId); |
1,402,004 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>generateProjectLabel = new JLabel();<NEW_LINE>optionsLabel = new JLabel();<NEW_LINE>// NOI18N<NEW_LINE>generateProjectLabel.setText(" ");<NEW_LINE>// NOI18N<NEW_LINE>optionsLabel.s... | 119, Short.MAX_VALUE))); |
857,393 | public static ListTagResourcesResponse unmarshall(ListTagResourcesResponse listTagResourcesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listTagResourcesResponse.setRequestId<MASK><NEW_LINE>listTagResourcesResponse.setNextToken(_ctx.stringValue("ListTagResourcesResponse.NextToken"));<NEW_LINE>List<TagResource> tagReso... | (_ctx.stringValue("ListTagResourcesResponse.RequestId")); |
1,446,574 | // This method recursively visits all thread groups under `group'.<NEW_LINE>public static void visit(ThreadGroup group, int level, ExceptionReporting exceptionReporter) {<NEW_LINE>// Get threads in `group'<NEW_LINE><MASK><NEW_LINE>Thread[] threads = new Thread[numThreads * 2];<NEW_LINE>numThreads = group.enumerate(thre... | int numThreads = group.activeCount(); |
195,203 | public void CheckForInner(String script) {<NEW_LINE>String lower = script.toLowerCase(Locale.ROOT);<NEW_LINE>int column = lower.indexOf("innerhtml");<NEW_LINE>if (column >= 0) {<NEW_LINE>report.message(MessageId.SCP_007, EPUBLocation.create(fileName, locator.getLineNumber(), locator.getColumnNumber(), trimContext(scrip... | m.start()))); |
675,210 | public AirbyteConnectionStatus check(final JsonNode config) {<NEW_LINE>try {<NEW_LINE>final PulsarDestinationConfig pulsarConfig = PulsarDestinationConfig.getPulsarDestinationConfig(config);<NEW_LINE>final String testTopic = pulsarConfig.getTestTopic();<NEW_LINE>if (!testTopic.isBlank()) {<NEW_LINE>final String key = U... | "Could not connect to the Pulsar brokers with provided configuration. \n" + e.getMessage()); |
376,505 | public MultiValueMap<String, Connection<?>> findAllConnections() {<NEW_LINE>List<Connection<?>> resultList = jdbcTemplate.query(selectFromUserConnection() + " where userId = ? order by providerId, `rank`", connectionMapper, userId);<NEW_LINE>MultiValueMap<String, Connection<?>> connections = new LinkedMultiValueMap<Str... | Connection<?>>()); |
1,318,896 | public static PredictCategoryResponse unmarshall(PredictCategoryResponse predictCategoryResponse, UnmarshallerContext _ctx) {<NEW_LINE>predictCategoryResponse.setCode(_ctx.integerValue("PredictCategoryResponse.Code"));<NEW_LINE>predictCategoryResponse.setMessage(_ctx.stringValue("PredictCategoryResponse.Message"));<NEW... | ("PredictCategoryResponse.Response.Data[" + i + "].Category.CateLevelFiveId")); |
900,107 | public void marshall(ListEndpointConfigsRequest listEndpointConfigsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (listEndpointConfigsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(listEn... | listEndpointConfigsRequest.getNextToken(), NEXTTOKEN_BINDING); |
167,770 | public void consumerSetChange(boolean isEmpty) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "consumerSetChange", new Object[] { isEmpty });<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())<NEW_LINE>SibTr.debug(this, tc, "Sending Cons... | PRIORITY_MEDIUM, true, ThrottlingPolicy.BLOCK_THREAD); |
534,748 | private static String readResourceFile(File sunResourcesXml) throws IOException {<NEW_LINE>String content = null;<NEW_LINE>if (sunResourcesXml.exists()) {<NEW_LINE>sunResourcesXml = FileUtil.normalizeFile(sunResourcesXml);<NEW_LINE>FileObject sunResourcesFO = FileUtil.toFileObject(sunResourcesXml);<NEW_LINE>if (sunReso... | max = reader.read(buf); |
1,778,657 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>final int widthSize = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>final int heightSize = MeasureSpec.getSize(heightMeasureSpec);<NEW_LINE>if (widthSize == 0 && heightSize == 0) {<NEW_LINE>// If there are no constraints on size, let Fra... | getMeasuredWidth(), getMeasuredHeight()); |
821,107 | private MethodSpec overrideGlideStaticMethod(ExecutableElement methodToOverride) {<NEW_LINE>List<ParameterSpec> parameters = processorUtil.getParameters(methodToOverride);<NEW_LINE>TypeElement element = (TypeElement) processingEnv.getTypeUtils().asElement(methodToOverride.getReturnType());<NEW_LINE>MethodSpec.Builder b... | (ClassName.get(glideType)); |
903,945 | public static String modifyURL(String originalUrl, String newProtocol, int newPort, boolean omitPort) {<NEW_LINE>if (newProtocol == null || newProtocol.isEmpty() || (!omitPort && newPort < 0)) {<NEW_LINE>return originalUrl;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// Create handler to avoid unknown protocol error when parsin... | " and port = " + newUrl.getPort()); |
1,137,119 | protected CoderResult encodeLoop(CharBuffer source, ByteBuffer target) {<NEW_LINE>while (true) {<NEW_LINE>if (!source.hasRemaining()) {<NEW_LINE>return CoderResult.UNDERFLOW;<NEW_LINE>}<NEW_LINE>if (!target.hasRemaining()) {<NEW_LINE>return CoderResult.OVERFLOW;<NEW_LINE>}<NEW_LINE>int initialPosition = source.position... | put(tmpBuf, 0, len); |
114,637 | private Mono<Response<Void>> triggerTiPackageUpdateWithResponseAsync(String scope, String iotSensorName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (scope == n... | error(new IllegalArgumentException("Parameter scope is required and cannot be null.")); |
1,170,319 | private Submission loadBaseCodeViaName(String baseCodeName, File rootDirectory, Map<File, Submission> foundSubmissions) throws ExitException {<NEW_LINE>// Is the option value a single name after trimming spurious separators?<NEW_LINE>String name = baseCodeName;<NEW_LINE>while (name.startsWith(File.separator)) {<NEW_LIN... | .format("Basecode path \"%s\" relative to the working directory could not be found.", baseCodeName)); |
210,738 | // End of variables declaration//GEN-END:variables<NEW_LINE>@ProjectCustomizer.CompositeCategoryProvider.Registration(projectType = JDKProject.PROJECT_KEY, position = 100)<NEW_LINE>public static ProjectCustomizer.CompositeCategoryProvider createCategoryProvider() {<NEW_LINE>return new ProjectCustomizer.CompositeCategor... | context.lookup(Settings.class); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.