idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
57,684 | public void invoke(@NotNull Project project, @NotNull PsiFile file, @Nullable("is null when called from inspection") Editor editor, @NotNull PsiElement startElement, @NotNull PsiElement endElement) {<NEW_LINE>if (editor == null) {<NEW_LINE>LOG.error("Cannot run quick fix without editor: " + getClass().getSimpleName(), ... | (file.getVirtualFile())); |
1,300,015 | private void readConfigFile(List<CFClientParams> params, File file) throws NoTargetsException, IOException {<NEW_LINE>try (FileReader reader = new FileReader(file)) {<NEW_LINE>Map<String, Object> userData = gson.fromJson(reader, Map.class);<NEW_LINE>if (userData != null) {<NEW_LINE>String refreshToken = (String) userDa... | , orgName, spaceName, sslDisabled)); |
1,452,875 | public void updateBlock(GlowBlock block) {<NEW_LINE>if (isNearWater(block) || GlowBiomeClimate.isRainy(block)) {<NEW_LINE>// set this block as fully wet<NEW_LINE>block.setData((byte) 7);<NEW_LINE>} else if (block.getData() > 0) {<NEW_LINE>// if this block is wet, it becomes less wet<NEW_LINE>block.// if this block is w... | = new BlockFadeEvent(block, state); |
1,480,816 | public final LogResult postLog(@NonNull final LogType logType, @NonNull final Calendar date, @NonNull final String log, @Nullable final String logPassword, @NonNull final List<TrackableLog> trackableLogs, @NonNull final ReportProblemType reportProblem) {<NEW_LINE>final LogResult result;<NEW_LINE>final boolean addFavori... | .favorite_check)).isChecked(); |
656,760 | final AdminDeleteUserAttributesResult executeAdminDeleteUserAttributes(AdminDeleteUserAttributesRequest adminDeleteUserAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(adminDeleteUserAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | (super.beforeMarshalling(adminDeleteUserAttributesRequest)); |
1,501,646 | public BDDDomain[] extDomain(BigInteger[] domainSizes) {<NEW_LINE>int offset = fdvarnum;<NEW_LINE>int binoffset;<NEW_LINE>int extravars = 0;<NEW_LINE>int n, bn;<NEW_LINE>boolean more;<NEW_LINE>int num = domainSizes.length;<NEW_LINE>{<NEW_LINE>domain = new BDDDomain[num];<NEW_LINE>} else /* Allocated before */<NEW_LINE>... | offset, r, 0, num); |
1,605,715 | public void handlePlayCompression(UserConnection user, int threshold) {<NEW_LINE>if (!user.isClientSide())<NEW_LINE>throw new IllegalStateException("PLAY state Compression packet is unsupported");<NEW_LINE>ChannelPipeline pipe = user.getChannel().pipeline();<NEW_LINE>if (threshold < 0) {<NEW_LINE>if (pipe.get("compress... | , "decompress", getDecoder(threshold)); |
1,772,993 | public void register(Registration registration) {<NEW_LINE>if (StringUtils.isEmpty(registration.getServiceId())) {<NEW_LINE>log.warn("No service to register for nacos client...");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>NamingService namingService = namingService();<NEW_LINE>String serviceId = registration.getServiceId();... | ), instance.getPort()); |
1,799,427 | public DescribeDetectMitigationActionsTaskResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeDetectMitigationActionsTaskResult describeDetectMitigationActionsTaskResult = new DescribeDetectMitigationActionsTaskResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE... | ().unmarshall(context)); |
566,199 | protected final AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {<NEW_LINE>BeanDefinitionBuilder handlerBuilder = parseHandler(element, parserContext);<NEW_LINE>IntegrationNamespaceUtils.setValueIfAttributeDefined(handlerBuilder, element, "output-channel", "outputChannelName");<NEW_LI... | BeanDefinitionBuilder.genericBeanDefinition(ConsumerEndpointFactoryBean.class); |
1,722,558 | private void waitForIntraBrokerReplicaTasksToFinish() {<NEW_LINE>List<ExecutionTask> finishedTasks = new ArrayList<>();<NEW_LINE>Set<Long> deletedTaskIds = new HashSet<>();<NEW_LINE>Set<Long> deadTaskIds = new HashSet<>();<NEW_LINE>do {<NEW_LINE>// If there is no finished tasks, we need to check if anything is blocked.... | .proposal().topicPartition(); |
1,234,431 | public void validate(final OidcCredentials credentials, final WebContext context) {<NEW_LINE>final AuthorizationCode code = credentials.getCode();<NEW_LINE>// if we have a code<NEW_LINE>if (code != null) {<NEW_LINE>try {<NEW_LINE>final String computedCallbackUrl = client.computeFinalCallbackUrl(context);<NEW_LINE>// To... | HTTPResponse httpResponse = tokenHttpRequest.send(); |
799,539 | public void actionPerformed(ActionEvent event) {<NEW_LINE>// TODO: refactor to put tab index from Tab enum<NEW_LINE>if (panelClass.equals("GlobalPanel")) {<NEW_LINE>new MacroButtonProperties(panelClass, MacroButtonPrefs.getNextIndex(), button.getProperties().getGroup());<NEW_LINE>} else if (panelClass.equals("CampaignP... | getProperties().getGroup()); |
1,647,391 | private String createQuery() {<NEW_LINE>Calendar prevDayQuery = (Calendar) prevDay.clone();<NEW_LINE>// NON-NLS<NEW_LINE>String // NON-NLS<NEW_LINE>query = // NON-NLS<NEW_LINE>"(dir_type = " + TskData.TSK_FS_NAME_TYPE_ENUM.REG.getValue() + ")" + " AND (known IS NULL OR known != 1) AND (";<NEW_LINE>long lowerLimit = pre... | = prevDayQuery.getTimeInMillis() / 1000; |
81,843 | public void paint(Graphics2D gr, Rectangle bounds) {<NEW_LINE>int destVerMax = bounds.y + bounds.height;<NEW_LINE>int destHorMax = bounds.x + bounds.width;<NEW_LINE>int destVerEdge = destVerMax - imageInsets.bottom;<NEW_LINE>int destHorEdge = destHorMax - imageInsets.right;<NEW_LINE>int horInner = bounds.width - imageI... | ymod + imageInsets.top, null); |
11,225 | private void execute(final Game game, final Player controller, final MageObject sourceObject, Ability source, final List<Card> cards, final boolean removeCounter) {<NEW_LINE>for (Card card : cards) {<NEW_LINE>if (filter.match(card, game)) {<NEW_LINE>final String counterName = counter.getName();<NEW_LINE>if (removeCount... | getControllerId(), source, game); |
1,717,193 | private String request() {<NEW_LINE>InputStreamReader in = null;<NEW_LINE>HttpURLConnection connection = null;<NEW_LINE>try {<NEW_LINE>connection = (HttpURLConnection) (new URL(metaServerEndpoint).openConnection());<NEW_LINE>connection.setConnectTimeout(1000);<NEW_LINE>connection.setReadTimeout(500);<NEW_LINE>connectio... | InputStreamReader(connection.getErrorStream()); |
1,491,142 | public void match(final AbstractInsnNode start, final IFilterOutput output) {<NEW_LINE>if (start.getOpcode() != /* ECJ */<NEW_LINE>Opcodes.ASTORE && start.getOpcode() != /* Kotlin */<NEW_LINE>Opcodes.ALOAD) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>cursor = start;<NEW_LINE>nextIsInvoke(Opcodes.<MASK><NEW_LINE>nextIsSwitch... | INVOKEVIRTUAL, "java/lang/String", "hashCode", "()I"); |
172,159 | public static void main(String[] args) {<NEW_LINE>CommandSpec spec = CommandSpec.create();<NEW_LINE>spec.addOption(OptionSpec.builder("-V", "--verbose").build());<NEW_LINE>spec.addOption(// so, this option is of type List<File><NEW_LINE>OptionSpec.builder("-f", "--file").paramLabel("FILES").type(List.class).// so, this... | .matchedOptionValue('f', defaultValue)); |
1,206,073 | public void bindItemLabel(List voList, String setFieldName, String getFieldName, String type) {<NEW_LINE>if (V.isEmpty(voList)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>LambdaQueryWrapper<Dictionary> queryWrapper = Wrappers.<Dictionary>lambdaQuery().select(Dictionary::getItemValue, Dictionary::getItemName).eq(Dictionary:... | labelList = new ArrayList<>(); |
515,185 | public AnnotatedSaga<T> doCreateInstance(String sagaIdentifier, Supplier<T> sagaFactory) {<NEW_LINE>try {<NEW_LINE>UnitOfWork<?> unitOfWork = CurrentUnitOfWork.get(), processRoot = unitOfWork.root();<NEW_LINE>T sagaRoot = sagaFactory.get();<NEW_LINE>resourceInjector.injectResources(sagaRoot);<NEW_LINE>AnnotatedSaga<T> ... | throw new SagaCreationException("An error occurred while attempting to create a new managed instance", e); |
1,664,777 | final ListConfigurationSetsResult executeListConfigurationSets(ListConfigurationSetsRequest listConfigurationSetsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listConfigurationSetsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,222,467 | private Mono<Response<AccountKeysInner>> listKeysWithResponseAsync(String resourceGroupName, String accountName) {<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 (th... | error(new IllegalArgumentException("Parameter accountName is required and cannot be null.")); |
947,396 | public Summary<ServiceSummaryItem> toSummary(List<DateAndMapPack> dnmPackList, int serverId) {<NEW_LINE>Summary<ServiceSummaryItem> summary = new Summary<>();<NEW_LINE>for (DateAndMapPack dnmPack : dnmPackList) {<NEW_LINE>long date = DateTimeHelper.getDefault().yyyymmdd(dnmPack.getYyyymmdd());<NEW_LINE>ListValue idList... | getMapPack().getList("mem"); |
210,439 | public void sendRequestToServiceUsingEureka(EurekaClient eurekaClient) {<NEW_LINE>// initialize the client<NEW_LINE>// this is the vip address for the example service to talk to as defined in conf/sample-eureka-service.properties<NEW_LINE>String vipAddress = "sampleservice.mydomain.net";<NEW_LINE>InstanceInfo nextServe... | " at port " + serverPort + "due to Exception " + e); |
1,169,034 | protected void exportStyledText(JRStyle style, JRStyledText styledText, Locale locale, boolean hiddenText, boolean startedHyperlink, boolean isNewLineJustified) {<NEW_LINE>StyledTextWriteContext context = new StyledTextWriteContext();<NEW_LINE>Color elementBackcolor = null;<NEW_LINE>Map<AttributedCharacterIterator.Attr... | localHyperlink = startHyperlink(hyperlink, true); |
446,408 | private void loadDoc(KOHelpItem binding, File cacheFile) throws URISyntaxException, MalformedURLException, IOException {<NEW_LINE>// NOI18N<NEW_LINE>LOG.fine("start loading doc");<NEW_LINE><MASK><NEW_LINE>URL url = new URI(docURL).toURL();<NEW_LINE>synchronized (cacheFile) {<NEW_LINE>StringWriter sw = new StringWriter(... | String docURL = binding.getExternalDocumentationURL(); |
1,461,051 | public Object run(@Cached GetThreadStateNode getThreadStateNode, @Cached GetClassNode getClassNode, @Cached GetTracebackNode getTracebackNode) {<NEW_LINE>PException currentException = getThreadStateNode.getCurrentException();<NEW_LINE>Object result;<NEW_LINE>if (currentException == null) {<NEW_LINE>result = getContext(... | exception), exception, traceback }); |
1,699,566 | public DescribeConnectorProfilesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeConnectorProfilesResult describeConnectorProfilesResult = new DescribeConnectorProfilesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = origi... | String currentParentElement = context.getCurrentParentElement(); |
846,950 | public static List<FieldAssertionMatcher> strictComparePayload(String expectedResult, String actualResult) {<NEW_LINE>List<FieldAssertionMatcher> matchers = new ArrayList<>();<NEW_LINE>String actualResultJson = readPayload(actualResult);<NEW_LINE>String expectedResultJson = readPayload(expectedResult);<NEW_LINE>try {<N... | ) + 1).trim(); |
1,012,077 | public TypecheckingResult visitLam(Concrete.LamExpression expr, Expression expectedType) {<NEW_LINE>try (var ignored = new Utils.SetContextSaver<>(context)) {<NEW_LINE>if (expectedType == null) {<NEW_LINE>return visitLam(expr.getParameters(), expr, NULL_PARAMETERS_PROVIDER);<NEW_LINE>}<NEW_LINE>expectedType = expectedT... | new NewExpression(null, classCall)); |
790,701 | public double[] analyse(double[] frame) {<NEW_LINE>if (frame.length != getFrameLengthSamples())<NEW_LINE>throw new IllegalArgumentException("Expected frame of length " + getFrameLengthSamples() + ", got " + frame.length);<NEW_LINE>// For correct phase, center time origin in the middle of windowed frame:<NEW_LINE>int le... | real.length - middle, middle); |
615,084 | private void loadNode90() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.NamespaceMetadataType_NamespaceFile_UserWritable, new QualifiedName(0, "UserWritable"), new LocalizedText("en", "UserWritable"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(V... | .expanded(), true)); |
1,801,276 | public static void main(String... args) {<NEW_LINE>MigrateTickets migrate = new MigrateTickets();<NEW_LINE>// filter out the baseFolder parameter<NEW_LINE>List<String> filtered = new ArrayList<String>();<NEW_LINE>String folder = "data";<NEW_LINE>for (int i = 0; i < args.length; i++) {<NEW_LINE>String arg = args[i];<NEW... | migrate.usage(parser, t); |
1,576,267 | private Map<String, String> extractXmlNamespaces(Node contextNode) throws JRException {<NEW_LINE>Map<String, String> namespaces = new HashMap<>();<NEW_LINE>List<Node> nlist;<NEW_LINE>String namespaceXPathString = "//namespace::node()";<NEW_LINE>try {<NEW_LINE>XPath xpath = new DOMXPath(namespaceXPathString);<NEW_LINE>n... | getParentNode().getNamespaceURI()); |
1,354,187 | public Map<TopicPartition, Long> read() throws IOException {<NEW_LINE>synchronized (lock) {<NEW_LINE>try (final BufferedReader reader = Files.newBufferedReader(file.toPath())) {<NEW_LINE>final int oldVersion = readInt(reader);<NEW_LINE>if (oldVersion == version) {<NEW_LINE>final int expectedSize = readInt(reader);<NEW_... | String line = reader.readLine(); |
463,829 | private static Comparator<SearchablePlugin> comparator(String query) {<NEW_LINE>if (StringUtils.isBlank(query)) {<NEW_LINE>return Comparator.nullsLast(Comparator.comparing(SearchablePlugin::isPinned, Comparator.nullsLast(Comparator.reverseOrder()))).thenComparing(SearchablePlugin::getSearchableName, Comparator.nullsLas... | qp))).count(); |
1,242,291 | public List<Subscription> execute(final List<String> clauses, final List<Object> params, final int limit, final boolean asc) {<NEW_LINE>final StringBuilder queryBuilder = new StringBuilder("SELECT s_subscription_object FROM zn_data.subscription ");<NEW_LINE>if (!clauses.isEmpty()) {<NEW_LINE>queryBuilder.append(" WHERE... | = new ArrayList<>(params); |
28,790 | /*<NEW_LINE>* typedef struct DECLSPEC_ALIGN(16) _CONTEXT { DWORD64 P1Home; DWORD64<NEW_LINE>* P2Home; DWORD64 P3Home; DWORD64 P4Home; DWORD64 P5Home; DWORD64 P6Home;<NEW_LINE>* DWORD ContextFlags; DWORD MxCsr; WORD SegCs; WORD SegDs; WORD SegEs; WORD<NEW_LINE>* SegFs; WORD SegGs; WORD SegSs; DWORD EFlags; DWORD64 Dr0; ... | reader.seek(contextRva + 120); |
453,158 | public static void main(String[] args) throws InterruptedException {<NEW_LINE>BarSeries series = createBarSeries();<NEW_LINE>Strategy strategy3DaySma = create3DaySmaStrategy(series);<NEW_LINE>BarSeriesManager seriesManager = new BarSeriesManager(series);<NEW_LINE>TradingRecord tradingRecord3DaySma = seriesManager.run(s... | System.out.println(calculate2DaySma); |
1,635,061 | public void read(org.apache.thrift.protocol.TProtocol iprot, getActiveLogs_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 == ... | struct.credentials.read(iprot); |
504,370 | public void beforeRequest(Request<?> request) {<NEW_LINE>AmazonWebServiceRequest originalRequest = request.getOriginalRequest();<NEW_LINE>if (originalRequest instanceof CopySnapshotRequest) {<NEW_LINE>String serviceName = "ec2";<NEW_LINE>CopySnapshotRequest originalCopySnapshotRequest = (CopySnapshotRequest) originalRe... | String sourceRegion = originalCopySnapshotRequest.getSourceRegion(); |
1,053,135 | final ImportImageResult executeImportImage(ImportImageRequest importImageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importImageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ImportImageRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,403,970 | private String generateListEntry(Dependency dep) {<NEW_LINE>String previousDepVersion = previousBomVersions.containsKey(dep.fullArtifactId()) ? previousBomVersions.get(dep.fullArtifactId()) : "N/A";<NEW_LINE>boolean depChanged = !dep.version().equals(previousDepVersion);<NEW_LINE>String boldOpenTag = depChanged ? "<b>"... | String tableStyle = depChanged ? " class=\"alt\"" : ""; |
229,233 | // verify the data and return the result. See JCA doc<NEW_LINE>// should be reset to the state after engineInitVerify call.<NEW_LINE>@Override<NEW_LINE>protected boolean engineVerify(byte[] sigBytes) throws SignatureException {<NEW_LINE>ensureInit();<NEW_LINE>try {<NEW_LINE>if (sigBytes.length != RSACore.getByteLength(... | byte[] mHash = getDigestValue(); |
689,537 | public void checkElementIsContainedInAttributeOfItsParent() {<NEW_LINE>_rootPackage.accept(new CtScanner() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void scan(CtRole role, CtElement element) {<NEW_LINE>if (element != null) {<NEW_LINE>// contract: element is contained in attribute of element's parent<NEW_LINE>CtEle... | (e -> e == element)); |
177,621 | private void updateTilesNumber() {<NEW_LINE>String tilesString = getString(R.string.shared_sting_tiles);<NEW_LINE>String downloadedNumber = OsmAndFormatter.formatValue(downloadedTilesNumber, "", false, 0, app).value;<NEW_LINE>String totalNumber = MessageFormat.format("({0})", OsmAndFormatter.formatValue(totalTilesNumbe... | Spannable spannable = new SpannableString(fullText); |
1,412,590 | public Rect2i deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {<NEW_LINE>if (json.isJsonArray()) {<NEW_LINE>JsonArray arr = json.getAsJsonArray();<NEW_LINE>if (arr.size() != 4) {<NEW_LINE>throw new JsonParseException("Rectangles expressed as arrays must have 4 e... | x, y, width, height); |
1,202,904 | protected void initChannel(Channel channel) throws Exception {<NEW_LINE>ChannelPipeline pipeline = channel.pipeline();<NEW_LINE>// Add the ConnectionLimitHandler to the pipeline if configured to do so.<NEW_LINE>if (TransportDescriptor.getNativeTransportMaxConcurrentConnections() > 0 || TransportDescriptor.getNativeTran... | pipeline.addLast("messageEncoder", messageEncoder); |
1,282,310 | private void prepareDataSentiment(Path path, boolean sentiment, List<String> reviewTexts) throws IOException {<NEW_LINE>File dir = path.toFile();<NEW_LINE>if (!dir.exists()) {<NEW_LINE>throw new IllegalArgumentException("Could not find Stanford Movie Review dataset");<NEW_LINE>}<NEW_LINE>File[] files = dir.listFiles(Fi... | (reviewPath), StandardCharsets.UTF_8); |
1,288,396 | private void buildNearestPoi(ViewGroup viewGroup) {<NEW_LINE>final int position = viewGroup.getChildCount();<NEW_LINE>final WeakReference<ViewGroup> viewGroupRef = new WeakReference<>(viewGroup);<NEW_LINE>buildNearestPoiRow(new SearchAmenitiesListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFinish(List<... | viewGroup.addView(amenitiesRow, insertIndex); |
721,299 | static void registerRenderers(EntityRenderersEvent.RegisterRenderers event) {<NEW_LINE>event.registerBlockEntityRenderer(TinkerSmeltery.tank.get(), TankBlockEntityRenderer::new);<NEW_LINE>event.registerBlockEntityRenderer(TinkerSmeltery.faucet.get(), FaucetBlockEntityRenderer::new);<NEW_LINE>event.registerBlockEntityRe... | get(), TankBlockEntityRenderer::new); |
450,086 | public static void main(String[] args) {<NEW_LINE>List<?> arguments;<NEW_LINE>try {<NEW_LINE>OptionSet <MASK><NEW_LINE>expandArrays = options.has("a");<NEW_LINE>arguments = options.nonOptionArguments();<NEW_LINE>if (arguments.isEmpty()) {<NEW_LINE>printHelp();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>} catch (OptionExcepti... | options = optionParser.parse(args); |
1,658,036 | final ListRoomsResult executeListRooms(ListRoomsRequest listRoomsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listRoomsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
179,837 | private JComponent createActionPanel(FlatWelcomePanel welcomePanel) {<NEW_LINE>JPanel actions = new NonOpaquePanel();<NEW_LINE>actions.setBorder(JBUI.Borders.emptyLeft(10));<NEW_LINE>actions.setLayout(new BoxLayout(actions, BoxLayout.Y_AXIS));<NEW_LINE>ActionManager actionManager = ActionManager.getInstance();<NEW_LINE... | ) FlatWelcomeScreen.this.getLayout(); |
1,711,181 | public // /////////////////////////////////////////////////////////////////////////////////////////<NEW_LINE>void applySnapshot(DaoState snapshot) {<NEW_LINE>allowDaoStateChange = true;<NEW_LINE>assertDaoStateChange();<NEW_LINE>log.info("Apply snapshot with chain height {}", snapshot.getChainHeight());<NEW_LINE>daoStat... | .getDecryptedBallotsWithMeritsList().clear(); |
1,827,945 | public static List<URI> readDnsConf() {<NEW_LINE>final Logger logger = LoggerFactory.getLogger(DnsUtil.class);<NEW_LINE>final boolean debug = logger.isDebugEnabled();<NEW_LINE>final File file = new File(Sys.sysProp(QBIT_DNS_RESOLV_CONF, "/etc/resolv.conf"));<NEW_LINE>if (file.exists()) {<NEW_LINE>final List<String> lin... | ), "", "", ""); |
65,630 | protected void presentResponse(ResponseContainer response, boolean verbose) {<NEW_LINE>StringBuilder b = new StringBuilder();<NEW_LINE>boolean isFirst = true;<NEW_LINE>List<AspectCliPresenter> aspectPresenters = plugins.loadOrderedSpiInstances(AspectCliPresenter.class);<NEW_LINE>for (AspectCliPresenter presenter : aspe... | (presenter.getStringRepresentation(aspect)); |
301,089 | public void loadAd(@NonNull Context context, @NonNull List<Banner> banners) {<NEW_LINE>LOGGER.i(TAG, "Load ads for " + banners);<NEW_LINE>detach();<NEW_LINE>cancel();<NEW_LINE>mLoadingCompleted = false;<NEW_LINE>mFailedProviders.clear();<NEW_LINE>if (banners.size() == 0)<NEW_LINE>return;<NEW_LINE>for (Banner banner : b... | createLoaderForBanner(banner, mCacheListener, mAdTracker); |
1,530,266 | public Slice nextChunk() throws IOException {<NEW_LINE>// 3 byte header<NEW_LINE>// NOTE: this must match BLOCK_HEADER_SIZE<NEW_LINE>ensureCompressedBytesAvailable(3);<NEW_LINE>lastCheckpoint = createInputStreamCheckpoint(getCurrentCompressedOffset(), nextUncompressedOffset);<NEW_LINE>int b0 = compressedBufferStream.re... | | (b0 >>> 1); |
979,388 | // verify if a URI path is compliance with the file format given<NEW_LINE>private static void checkFormat(String format, String uripath) {<NEW_LINE>final String lowerCaseUri = uripath.toLowerCase();<NEW_LINE>final boolean unknownExtensionForFormat = SUPPORTED_EXTENSIONS_BY_FORMAT.get(format.toLowerCase()).stream().none... | " is an invalid for the format " + format.toLowerCase()); |
1,673,774 | public static void writeColumnViewsToParquet(ParquetWriterOptions options, HostBufferConsumer consumer, ColumnView... columnViews) {<NEW_LINE>assert columnViews != null && columnViews.length > 0 : "ColumnViews can't be null or empty";<NEW_LINE>long rows = <MASK><NEW_LINE>for (ColumnView columnView : columnViews) {<NEW_... | columnViews[0].getRowCount(); |
256,088 | public final void containsEntry(@Nullable Object key, @Nullable Object value) {<NEW_LINE>// TODO(kak): Can we share any of this logic w/ MapSubject.containsEntry()?<NEW_LINE>if (!actual.containsEntry(key, value)) {<NEW_LINE>Map.Entry<Object, Object> entry = immutableEntry(key, value);<NEW_LINE>List<Map.Entry<Object, Ob... | , immutableEntry(key, value)); |
1,108,061 | public static void multiMapYamlGenerator(Map<String, Object> parent, Config config) {<NEW_LINE>if (config.getMultiMapConfigs().isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, Object> child = new LinkedHashMap<>();<NEW_LINE>for (MultiMapConfig subConfigAsObject : config.getMultiMapConfigs().values()) {<NEW... | "split-brain-protection-ref", subConfigAsObject.getSplitBrainProtectionName()); |
536,522 | public void run() {<NEW_LINE>Thread.currentThread().setPriority(Thread.MIN_PRIORITY);<NEW_LINE>final List<Request> requests = new LinkedList<>();<NEW_LINE>try {<NEW_LINE>while (!stopThread) {<NEW_LINE>final long slept = poll(requests);<NEW_LINE>boolean needsRendering = false;<NEW_LINE>boolean fastResume = false;<NEW_LI... | Thread.sleep(refreshInterval - slept); |
1,442,983 | void castLiteralToTargetColumnsType(InsertStmt insertStatement) {<NEW_LINE>Preconditions.checkState(insertStatement.getQueryStatement().getQueryRelation() instanceof ValuesRelation, "must values");<NEW_LINE>List<Column> fullSchema = insertStatement.getTargetTable().getFullSchema();<NEW_LINE>ValuesRelation values = (Val... | , targetColumn.getType())); |
293,327 | private static void generateSimpleNodeHeader() {<NEW_LINE>File file = new File(simpleNodeIncludeFile());<NEW_LINE>OutputFile outputFile = null;<NEW_LINE>try {<NEW_LINE>String[] options = new String[] { "MULTI", "NODE_USES_PARSER", "VISITOR", "TRACK_TOKENS", "NODE_PREFIX", "NODE_EXTENDS", "NODE_FACTORY", Options.USEROPT... | ).equals("void"))); |
216,581 | public DenseMatrix gradient(DenseMatrix coef, int iter) {<NEW_LINE>if (coef.numRows() != p + q + 1) {<NEW_LINE>throw new RuntimeException("Error!coef is not comparable with the model");<NEW_LINE>}<NEW_LINE>double[] arCoef = new double[p];<NEW_LINE>double[] maCoef = new double[q];<NEW_LINE>for (int i = 0; i < this.p; i+... | cResidual, arCoef, maCoef, sigma2); |
940,322 | // Pushes a frame we seek'd to<NEW_LINE>SegmentTermsEnumFrame pushFrame(FST.Arc<BytesRef> arc, BytesRef frameData, int length) throws IOException {<NEW_LINE>scratchReader.reset(frameData.bytes, frameData.offset, frameData.length);<NEW_LINE>final long code = scratchReader.readVLong();<NEW_LINE>final long fpSeek = code >... | f.setFloorData(scratchReader, frameData); |
28,771 | public void processArgs(CmdArgModule cmdLine) {<NEW_LINE>List<String> engineDecls = cmdLine.getValues(engineDecl);<NEW_LINE>// if ( x.size() > 0 )<NEW_LINE>// QueryEngineRegistry.get().factories().clear() ;<NEW_LINE>for (String engineName : engineDecls) {<NEW_LINE>switch(engineName.toLowerCase()) {<NEW_LINE>case "refer... | throw new CmdException("Engine name not recognized: " + engineName); |
888,712 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>Spinner countrySpinner = view.findViewById(R.id.delete_account_fragment_country_spinner);<NEW_LINE>View confirm = view.findViewById(R.id.delete_account_fragment_delete);<NEW_LINE>bullets = view.findViewById(R.id.delete_account... | getViewLifecycleOwner(), this::handleRegionUpdated); |
78,574 | public String createToken() {<NEW_LINE>PrivateKey privateKey = RSAKeypair4Auth.INSTANCE.getPrivateKey();<NEW_LINE>String instanceId = RegistrationManager.INSTANCE.getMicroserviceInstance().getInstanceId();<NEW_LINE>String serviceId = RegistrationManager.INSTANCE.getMicroservice().getServiceId();<NEW_LINE>if (instanceId... | LOGGER.error("create token error", e); |
854,979 | protected void paintComponent(Graphics g) {<NEW_LINE>Graphics2D g2D = (Graphics2D) g;<NEW_LINE>Rectangle bounds = getBounds();<NEW_LINE>m_icon.paintIcon(this, g2D, 0, 0);<NEW_LINE>// Paint Text<NEW_LINE>Color color = getForeground();<NEW_LINE>g2D.setPaint(color);<NEW_LINE>Font font = getFont();<NEW_LINE>//<NEW_LINE><MA... | AttributedString aString = new AttributedString(m_name); |
362,635 | public void process(final IFactAcctLogIterable logs) {<NEW_LINE>final ILoggable loggable = Loggables.get();<NEW_LINE>//<NEW_LINE>// Update Fact_Acct_Summary<NEW_LINE>final FactAcctSummaryUpdater factAcctSummaryUpdater = new FactAcctSummaryUpdater(factAcctLogDAO);<NEW_LINE>for (final I_Fact_Acct_Log log : logs) {<NEW_LI... | getGroupsCount(), I_Fact_Acct_Summary.Table_Name); |
169,589 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | invoke(request, responseHandler, executionContext); |
786,432 | public void computePairwiseGraph() {<NEW_LINE><MASK><NEW_LINE>System.out.println("### Creating Pairwise");<NEW_LINE>var config = new ConfigGeneratePairwiseImageGraph();<NEW_LINE>GeneratePairwiseImageGraph generatePairwise = FactorySceneReconstruction.generatePairwise(config);<NEW_LINE>BoofMiscOps.profile(() -> {<NEW_LI... | System.out.println("----------------------------------------------------------------------------"); |
703,124 | public void correlateBench(Blackhole bh) {<NEW_LINE>int n = 10_000_000;<NEW_LINE>for (int j = 0; j < 10; j++) {<NEW_LINE>double[] sin = sinTable(n);<NEW_LINE>double[] cos = cosTable(n);<NEW_LINE>double sinSin = correlate(sin, sin);<NEW_LINE>double sinCos = correlate(sin, cos);<NEW_LINE>double cosSin = correlate(cos, si... | Math.sqrt(cosCos * sinSin); |
1,727,633 | // ----- 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(GraphQu... | class, new KeywordQueryFactory(this)); |
211,843 | public void marshall(StartTopicsDetectionJobRequest startTopicsDetectionJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startTopicsDetectionJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.mar... | startTopicsDetectionJobRequest.getVpcConfig(), VPCCONFIG_BINDING); |
244,264 | public void enable() {<NEW_LINE>if (tfConfig != null) {<NEW_LINE>if (tfConfig.eIsSet(tfConfig.eClass().getEStructuralFeature("threshold"))) {<NEW_LINE>setThreshold(tfConfig.getThreshold());<NEW_LINE>}<NEW_LINE>if (tfConfig.eIsSet(tfConfig.eClass().getEStructuralFeature("callbackPeriod"))) {<NEW_LINE>setCallbackPeriod(t... | setMovingAverage(tfConfig.getMovingAverage()); |
1,465,659 | void handleIterableMode(CoreSubscriber<? super R> s, Iterable<? extends Publisher<? extends T>> sourcesIterable) {<NEW_LINE>Object[] scalars = new Object[8];<NEW_LINE>Publisher<? extends T>[] srcs = new Publisher[8];<NEW_LINE>int n = 0;<NEW_LINE>int sc = 0;<NEW_LINE>for (Publisher<? extends T> p : sourcesIterable) {<NE... | + (n >> 1)]; |
246,479 | static void handleRightClickAir(GlowPlayer player, ItemStack holding, EquipmentSlot slot) {<NEW_LINE>PlayerInteractEvent event = EventFactory.getInstance().onPlayerInteract(player, Action.RIGHT_CLICK_AIR, slot);<NEW_LINE>event.useItemInHand();<NEW_LINE>if (event.useItemInHand() == Event.Result.DENY) {<NEW_LINE>return;<... | slot, InventoryUtil.createEmptyStack()); |
763,015 | protected void translateCore(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) {<NEW_LINE>final IOperandTreeNode registerOperand1 = instruction.getOperands().get(0).getRootNode().getChildren().get(0);<NEW_LINE>final IOperandTreeNode registerOperand2 = i... | getChildren().get(0); |
1,019,681 | private void showConfigDialog() {<NEW_LINE>// Let the user pick a single directory, and configure a ".build-id/" search location<NEW_LINE>// and a recursive dir search location at that directory, as well as a<NEW_LINE>// same-dir search location to search the program's import directory.<NEW_LINE>GhidraFileChooser choos... | chooser.setFileSelectionMode(GhidraFileChooserMode.DIRECTORIES_ONLY); |
97,809 | public synchronized void createUser(User user, int account) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>long id = user.getId();<NEW_LINE>String screenName = user.getScreenName();<NEW_LINE>String name = user.getName();<NEW_LINE>String proPicUrl = user.getOriginalProfileImageURL();<NEW_LINE>values.<MA... | put(FollowersSQLiteHelper.COLUMN_ACCOUNT, account); |
736,167 | public SandBox retrieveUserSandBoxForParent(Long authorId, Long parentSandBoxId) {<NEW_LINE>CriteriaBuilder builder = sandBoxEntityManager.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<SandBox> criteria = builder.createQuery(SandBox.class);<NEW_LINE>Root<SandBoxManagementImpl> sandbox = criteria.from(SandBoxManagementIm... | restrictions.size()])); |
1,706,614 | private String formatAnnotation(FileInformation info, File file) {<NEW_LINE>// NOI18N<NEW_LINE>String statusString = "";<NEW_LINE>int status = info.getStatus();<NEW_LINE>if (status != FileInformation.STATUS_VERSIONED_UPTODATE) {<NEW_LINE>statusString = info.getShortStatusText();<NEW_LINE>}<NEW_LINE>String lockString = ... | ).getLabelInfo(file, mimeTypeFlag); |
1,040,243 | private File backupInstallDir(File installDir) throws IOException {<NEW_LINE>if (installDir.exists()) {<NEW_LINE>File parent = installDir.getParentFile();<NEW_LINE><MASK><NEW_LINE>for (int i = 1; i < 100; i++) {<NEW_LINE>File target = new File(parent, tempName + i);<NEW_LINE>if (!target.exists()) {<NEW_LINE>if (!instal... | String tempName = installDir.getName(); |
460,061 | public boolean executeCommand(final String args) {<NEW_LINE>setKfold(obtainCross());<NEW_LINE>final MLDataSet trainingSet = obtainTrainingSet();<NEW_LINE>MLMethod method = obtainMethod();<NEW_LINE>final MLTrain trainer = createTrainer(method, trainingSet);<NEW_LINE>if (method instanceof BayesianNetwork) {<NEW_LINE>fina... | EncogDirectoryPersistence.saveObject(resourceFile, method); |
1,266,491 | public static void editSettings(TileMap tileMap, Stage primaryStage, boolean renderSettings) {<NEW_LINE>// ignore request to display render settings directly if there is no world<NEW_LINE>if (tileMap.getDisabled() && renderSettings) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Optional<SettingsDialog.Result> result = new Set... | load(Config.getLocale()); |
1,181,689 | public UpdateEndpointsBatchResult updateEndpointsBatch(UpdateEndpointsBatchRequest updateEndpointsBatchRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateEndpointsBatchRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executio... | new JsonResponseHandler<UpdateEndpointsBatchResult>(unmarshaller); |
688,617 | final CheckoutBorrowLicenseResult executeCheckoutBorrowLicense(CheckoutBorrowLicenseRequest checkoutBorrowLicenseRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(checkoutBorrowLicenseRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.SERVICE_ID, "License Manager"); |
28,572 | static Object[] adaptArgumentsIfNecessary(Method method, @Nullable Object[] arguments) {<NEW_LINE>if (ObjectUtils.isEmpty(arguments)) {<NEW_LINE>return new Object[0];<NEW_LINE>}<NEW_LINE>if (method.isVarArgs()) {<NEW_LINE>if (method.getParameterCount() == arguments.length) {<NEW_LINE>Class<?>[] paramTypes = method.getP... | Array.newInstance(targetElementType, varargLength); |
388,691 | public static void horizontal7(Kernel1D_S32 kernel, GrayS16 image, GrayI16 dest) {<NEW_LINE>final short[] dataSrc = image.data;<NEW_LINE>final short[] dataDst = dest.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kern... | dataSrc[indexSrc++]) * k3; |
373,427 | private JComponent createActionsToolbar() {<NEW_LINE>DefaultActionGroup toolbarGroup = new DefaultActionGroup();<NEW_LINE>toolbarGroup.add(ActionManager.getInstance().getAction(VcsLogActionPlaces.TOOLBAR_ACTION_GROUP));<NEW_LINE>DefaultActionGroup mainGroup = new DefaultActionGroup();<NEW_LINE>mainGroup.add(ActionManag... | getAction(VcsLogActionPlaces.VCS_LOG_QUICK_SETTINGS_ACTION))); |
1,692,879 | public void initialize(boolean parsingCompilationUnit) {<NEW_LINE>// positioning the parser for a new compilation unit<NEW_LINE>// avoiding stack reallocation and all that....<NEW_LINE>this.javadoc = null;<NEW_LINE>this.astPtr = -1;<NEW_LINE>this.astLengthPtr = -1;<NEW_LINE>this.expressionPtr = -1;<NEW_LINE>this.expres... | this.scanner.lastPosition = -1; |
544,823 | private List<TcpChannel> initiateConnection(DiscoveryNode node, ConnectionProfile connectionProfile, ActionListener<Transport.Connection> listener) {<NEW_LINE>int numConnections = connectionProfile.getNumConnections();<NEW_LINE>assert numConnections > 0 : "A connection profile must be configured with at least one conne... | CloseableChannel.closeChannels(channels, false); |
994,973 | public HeuristicResult apply(MapReduceApplicationData data) {<NEW_LINE>if (!data.getSucceeded()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>MapReduceTaskData[] tasks = data.getReducerData();<NEW_LINE>List<Long> execTimeMs = new ArrayList<Long>();<NEW_LINE>List<Long> shuffleTimeMs <MASK><NEW_LINE>List<Long> sortTimeMs ... | = new ArrayList<Long>(); |
298,616 | public StructuralNode apply(StructuralNode parent, Parameters params) {<NEW_LINE>@SuppressWarnings("rawtypes")<NEW_LINE>Map<String, Schema> properties = params.properties;<NEW_LINE>List<String> schemaRequired = params.schemaRequired;<NEW_LINE>if (null == properties || properties.isEmpty())<NEW_LINE>return parent;<NEW_L... | , getSchemaTypeAsString(schema)))); |
761,911 | public static Host.Builder mapHostBuilder(ResultSet rs) throws SQLException {<NEW_LINE>Host.Builder builder = Host.newBuilder();<NEW_LINE>builder.setId(SqlUtil.getString(rs, "pk_host"));<NEW_LINE>builder.setName(SqlUtil.getString(rs, "host_name"));<NEW_LINE>builder.setAllocName(SqlUtil.getString(rs, "alloc_name"));<NEW... | (rs.getLong("int_mcp_free")); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.