idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,059,888 | public void fillRect(float x, float y, float w, float h) {<NEW_LINE>if (w <= 0 || h <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!isAntialiasedShape()) {<NEW_LINE>fillQuad(x, y, x + w, y + h);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (isComplexPaint) {<NEW_LINE>scratchRRect.setRoundRect(x, y, w, h, 0, 0);<NEW_LINE>r... | x, y, w, h); |
1,169,950 | private void save(ServerIntFloatRow row, PSMatrixSaveContext saveContext, MatrixPartitionMeta meta, DataOutputStream out) throws IOException {<NEW_LINE>int startCol = (int) meta.getStartCol();<NEW_LINE>IntFloatVector vector = ServerRowUtils.getVector(row);<NEW_LINE>IntFloatElement element = new IntFloatElement();<NEW_L... | = entry.getIntKey() + startCol; |
1,479,201 | ImmutableList<TypeMirror> erasedParameterTypes(ExecutableElement method, TypeElement in) {<NEW_LINE>if (method.getEnclosingElement().equals(in)) {<NEW_LINE>ImmutableList.Builder<TypeMirror> params = ImmutableList.builder();<NEW_LINE>for (VariableElement param : method.getParameters()) {<NEW_LINE>params.add(typeUtils.er... | , actuals.get(i)); |
24,197 | public static void showViewDescriptionDialog(final JFrame parent, final INaviView view) {<NEW_LINE>final CViewCommentDialog dlg = new CViewCommentDialog(parent, "Change view description", view.getName(), view.getConfiguration().getDescription());<NEW_LINE>dlg.setVisible(true);<NEW_LINE>if (!dlg.wasCancelled()) {<NEW_LI... | new String[] { "The view was not updated and the new view description is lost." }); |
1,162,682 | public void onSaveInstanceState(Bundle outState) {<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LINE>outState.putBoolean(STATE_ADDITIONAL_ROWS_VISIBLE, mAreAdditionalRowsVisible);<NEW_LINE>outState.putString(STATE_DRAFT_ID, composeMessageViewModel.getDraftId());<NEW_LINE>if (largeBody) {<NEW_LINE><MASK><NEW_LINE>m... | outState.putBoolean(EXTRA_MESSAGE_BODY_LARGE, true); |
930,812 | public static Node insert(Node node, Node childNode, byte key) {<NEW_LINE>Node4 current = (Node4) node;<NEW_LINE>if (current.count < 4) {<NEW_LINE>// insert leaf into current node<NEW_LINE>current.key = IntegerUtil.setByte(current.key, key, current.count);<NEW_LINE>current.children[current.count] = childNode;<NEW_LINE>... | node16.children, 0, 4); |
1,500,944 | protected void paintTabBorder(Graphics g, int index, int x, int y, int width, int height) {<NEW_LINE>Color borderColor = UIManager.getColor("NbTabControl.borderColor");<NEW_LINE>Color borderShadowColor = UIManager.getColor("NbTabControl.borderShadowColor");<NEW_LINE>g.setColor(borderColor);<NEW_LINE>if (index > 0) {<NE... | width - 1, y + 2); |
1,018,630 | public boolean revokePortForwardingRulesForVm(long vmId) {<NEW_LINE>boolean success = true;<NEW_LINE>UserVmVO vm = _vmDao.findByIdIncludingRemoved(vmId);<NEW_LINE>if (vm == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>List<PortForwardingRuleVO> rules = _portForwardingDao.listByVm(vmId);<NEW_LINE>Set<Long> ipsToRe... | s_logger.debug("No port forwarding rules are found for vm id=" + vmId); |
1,671,514 | private void extractImageFeatures(final ProgressMonitor progressMonitor, final int progress, T image, List<TupleDesc> descs, List<Point2D_F64> locs) {<NEW_LINE>if (configChanged) {<NEW_LINE>configChanged = false;<NEW_LINE>declareAlgorithms();<NEW_LINE>}<NEW_LINE>SwingUtilities.invokeLater(() -> progressMonitor.setNote(... | .setProgress(progress + 2)); |
1,398,968 | public static <O> Iterator<Set<O>> groupAndSort(final Iterator<? extends KeyValue<?, O>> values, final Comparator<O> comparator) {<NEW_LINE>return new LazyIterator<Set<O>>() {<NEW_LINE><NEW_LINE>final Iterator<? extends KeyValue<?, O>> valuesIterator = values;<NEW_LINE><NEW_LINE>Set<O> currentGroup = new TreeSet<O>(com... | new TreeSet<O>(comparator); |
149,850 | public BackupResponse newBackupResponse(Backup backup) {<NEW_LINE>VMInstanceVO vm = vmInstanceDao.findByIdIncludingRemoved(backup.getVmId());<NEW_LINE>AccountVO account = accountDao.findByIdIncludingRemoved(vm.getAccountId());<NEW_LINE>DomainVO domain = domainDao.findByIdIncludingRemoved(vm.getDomainId());<NEW_LINE>Dat... | setExternalId(backup.getExternalId()); |
1,105,430 | private String createJikesClasspath(String string, String javaHomePath) {<NEW_LINE>StringBuffer classpath = new StringBuffer();<NEW_LINE>classpath.append(javaHomePath + File.separator + "lib" + File.separator + "core.jar" + File.pathSeparatorChar);<NEW_LINE>classpath.append(javaHomePath + File.separator + "lib" + File.... | separator + "security.jar" + File.pathSeparatorChar); |
1,593,643 | /* GRECLIPSE edit<NEW_LINE>@Override<NEW_LINE>public void visitAnnotations(final AnnotatedNode node) {<NEW_LINE>List<AnnotationNode> annotations = node.getAnnotations();<NEW_LINE>if (annotations.isEmpty()) return;<NEW_LINE>Map<String, AnnotationNode> tmpAnnotations = new HashMap<>();<NEW_LINE>for (AnnotationNode an : a... | ] annTypeAnnotations = annTypeClass.getAnnotations(); |
413,607 | public static IdealState shrinkCustomIdealStateFor(IdealState oldIdealState, String topicName, String partitionToDelete) {<NEW_LINE>final CustomModeISBuilder customModeIdealStateBuilder = new CustomModeISBuilder(topicName);<NEW_LINE>int oldNumPartitions = oldIdealState.getNumPartitions();<NEW_LINE>customModeIdealStateB... | ).setMaxPartitionsPerNode(oldNumPartitions - 1); |
1,406,568 | public Mono<String> obtainSecuredResource() {<NEW_LINE>logger.info("Creating web client...");<NEW_LINE>Mono<String> resource = client.post().uri(tokenUri).header(HttpHeaders.AUTHORIZATION, "Basic " + Base64Utils.encodeToString((clientId + ":" + clientSecret).getBytes())).body(BodyInserters.fromFormData(OAuth2ParameterN... | map(res -> "Retrieved the resource using a manual approach: " + res); |
377,476 | public static KeyStore openKeyStore(File storeFile, String storePassword) {<NEW_LINE>String lc = storeFile.getName().toLowerCase();<NEW_LINE>String type = "JKS";<NEW_LINE>String provider = null;<NEW_LINE>if (lc.endsWith(".p12") || lc.endsWith(".pfx")) {<NEW_LINE>type = "PKCS12";<NEW_LINE>provider = BC;<NEW_LINE>}<NEW_L... | RuntimeException("Could not open keystore " + storeFile, e); |
668,427 | public void render(BufferedImage img, Region region) {<NEW_LINE>FieldFacet2D facet = region.getFacet(clazz);<NEW_LINE>int width = img.getWidth();<NEW_LINE>int height = img.getHeight();<NEW_LINE>ColorModel colorModel = img.getColorModel();<NEW_LINE>ColorBlender blender = ColorBlenders.forColorModel(ColorModels.RGBA, col... | getElem(z * width + x); |
714,042 | public static DescribeAccountListResponse unmarshall(DescribeAccountListResponse describeAccountListResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAccountListResponse.setRequestId(_ctx.stringValue("DescribeAccountListResponse.RequestId"));<NEW_LINE>describeAccountListResponse.setMessage(_ctx.stringValue("Descri... | (_ctx.booleanValue("DescribeAccountListResponse.Success")); |
1,138,127 | public static void addResourceContentChanges(final Map<FileObject, byte[]> resourceContentChanges, final Map<FileObject, List<Difference>> result) {<NEW_LINE>for (Entry<FileObject, byte[]> e : resourceContentChanges.entrySet()) {<NEW_LINE>try {<NEW_LINE>Charset encoding = FileEncodingQuery.getEncoding(e.getKey());<NEW_... | create(e.getKey()); |
909,044 | public Object openPluginsDialog(final Object attributes) {<NEW_LINE>// Get the configuration processor (the method invocation in the AbstractActionController already checked that<NEW_LINE>// it's valid)<NEW_LINE>final IConfigurationProcessor processor = getProcessor();<NEW_LINE>// Start a Job that will call the process... | EVENT_ID_PLUGINS, IBrowserNotificationConstants.EVENT_TYPE_CHANGED, jsonStatus); |
1,851,817 | public void destroySubcontext(String name) throws OperationNotSupportedException, EntityHasDescendantsException, EntityNotFoundException, WIMSystemException {<NEW_LINE>TimedDirContext ctx = getDirContext();<NEW_LINE>checkWritePermission(ctx);<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>ctx.destroySubcontext(new LdapName(nam... | destroySubcontext(new LdapName(name)); |
1,010,109 | protected void initDataBindings() {<NEW_LINE>BeanProperty<JCheckBox, Boolean> jCheckBoxBeanProperty = BeanProperty.create("selected");<NEW_LINE>BeanProperty<JButton, Boolean> jButtonBeanProperty = BeanProperty.create("enabled");<NEW_LINE>AutoBinding<JCheckBox, Boolean, JButton, Boolean> autoBinding = Bindings.createAut... | calibrationEnabledCheckbox, jCheckBoxBeanProperty, calibrationTipDiameter, jTextFieldBeanProperty); |
944,327 | private void attachTracing(ChannelHandlerContext ctx, RedisCommand<?, ?, ?> command) {<NEW_LINE>if (!tracingEnabled || !(command instanceof CompleteableCommand)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>TracedCommand<?, ?, ?> traced = CommandWrapper.unwrap(command, TracedCommand.class);<NEW_LINE>TraceContextProvider prov... | ).initialTraceContextProvider() : traced); |
1,077,808 | public static void renderBook(ResourceLocation book, Screen gui, int mouseX, int mouseY, float partialTicks, PoseStack ms) {<NEW_LINE>if (konamiTime > 0) {<NEW_LINE>String meme = I18n.get("botania.subtitle.way");<NEW_LINE>RenderSystem.disableDepthTest();<NEW_LINE>ms.pushPose();<NEW_LINE>int fullWidth = Minecraft.getIns... | scale(4, 4, 4); |
1,625,207 | public void retryTransfer(AndroidCompletedTransfer transfer) {<NEW_LINE>if (transfer.getType() == MegaTransfer.TYPE_DOWNLOAD) {<NEW_LINE>MegaNode node = megaApi.getNodeByHandle(Long.parseLong(transfer.getNodeHandle()));<NEW_LINE>if (node == null) {<NEW_LINE>logWarning("Node is null, not able to retry");<NEW_LINE>return... | String originalPath = transfer.getOriginalPath(); |
410,151 | public MessageBatch fetchMessages(StreamPartitionMsgOffset startMsgOffset, StreamPartitionMsgOffset endMsgOffset, int timeoutMillis) {<NEW_LINE>final MessageId startMessageId = ((MessageIdStreamOffset) startMsgOffset).getMessageId();<NEW_LINE>final MessageId endMessageId = endMsgOffset == null ? MessageId.latest : ((Me... | (startMessageId, endMessageId, messagesList)); |
1,017,928 | protected RestChannelConsumer doCatRequest(RestRequest restRequest, NodeClient client) {<NEW_LINE>String datafeedId = restRequest.param(DatafeedConfig.ID.getPreferredName());<NEW_LINE>if (Strings.isNullOrEmpty(datafeedId)) {<NEW_LINE>datafeedId = GetDatafeedsStatsAction.ALL;<NEW_LINE>}<NEW_LINE>Request request = new Re... | ()), request::setAllowNoMatch); |
1,561,233 | public void marshall(CreateAppRequest createAppRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createAppRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createAppRequest.getName(), NAME_BIN... | createAppRequest.getEnableBranchAutoBuild(), ENABLEBRANCHAUTOBUILD_BINDING); |
1,438,779 | private boolean swapInputs(RelMetadataQuery mq, LoptMultiJoin multiJoin, LoptJoinTree left, LoptJoinTree right, boolean selfJoin) {<NEW_LINE>boolean swap = false;<NEW_LINE>if (selfJoin) {<NEW_LINE>return !multiJoin.isLeftFactorInRemovableSelfJoin(((LoptJoinTree.Leaf) left.getFactorTree<MASK><NEW_LINE>}<NEW_LINE>final D... | ()).getId()); |
1,815,312 | public boolean runSinglePageTest(String resource, Java2DBuilderConfig additionalBuilderConfiguration) throws IOException {<NEW_LINE>String absResPath = this.resourcePath + resource + ".html";<NEW_LINE>String absExpPath = this.expectedSinglePage + resource + ".png";<NEW_LINE>File outputPath = new File(this.outputPath, r... | write(diffImage, "png", output); |
324,258 | public ServiceInfo listInstance(String namespaceId, String serviceName, Subscriber subscriber, String cluster, boolean healthOnly) {<NEW_LINE>Service service = getService(namespaceId, serviceName, true);<NEW_LINE>// For adapt 1.X subscribe logic<NEW_LINE>if (subscriber.getPort() > 0 && pushService.canEnablePush(subscri... | subscriber.getAddrStr(), true); |
324,436 | private static void addAutoPauseTrigger(Resources res, Step step, SharedPreferences prefs) {<NEW_LINE>boolean enableAutoPause = prefs.getBoolean(res.getString(R.string.pref_autopause_active), false);<NEW_LINE>if (!enableAutoPause)<NEW_LINE>return;<NEW_LINE>float autoPauseMinSpeed = 0;<NEW_LINE>float autoPauseAfterSecon... | .string.pref_autopause_minpace), "20"); |
595,339 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | format("The resource ID '%s' is not valid. Missing path segment 'transforms'.", id))); |
1,699,167 | static void test_sparc() {<NEW_LINE>// G1 register<NEW_LINE>Long g1 = 0x1230L;<NEW_LINE>// G2 register<NEW_LINE>Long g2 = 0x6789L;<NEW_LINE>// G3 register<NEW_LINE>Long g3 = 0x5555L;<NEW_LINE>System.out.print("Emulate SPARC code\n");<NEW_LINE>// Initialize emulator in Sparc mode<NEW_LINE>Unicorn u = new Unicorn(Unicorn... | reg_write(Unicorn.UC_SPARC_REG_G3, g3); |
1,420,539 | protected QueryBuilder doRewrite(QueryRewriteContext queryRewriteContext) {<NEW_LINE>if (supplier != null) {<NEW_LINE>return supplier.get() == null ? this : new TermsQueryBuilder(this.fieldName, supplier.get());<NEW_LINE>} else if (this.termsLookup != null) {<NEW_LINE>SetOnce<List<?>> supplier = new SetOnce<>();<NEW_LI... | this.fieldName, supplier::get); |
279,159 | private void saveContainerStructures(ActionRequest req, Container currentContainer, Container container) throws DotDataException, DotSecurityException {<NEW_LINE>List<ContainerStructure> oldContainerStructures = APILocator.<MASK><NEW_LINE>List<ContainerStructure> csList = new LinkedList<>();<NEW_LINE>// saving the mult... | getContainerAPI().getContainerStructures(currentContainer); |
1,089,553 | protected void writeExtraFieldsAndMethods(PrintWriterWithEditGen classBodyWriter, RewriteResultBuilder resultBuilder) {<NEW_LINE>// First check that a settings method is required at all<NEW_LINE>boolean noRewriteRequired = !sizeRequiresRewrite;<NEW_LINE>noRewriteRequired = noRewriteRequired && !pixelDensityRequiresRewr... | StringJoiner argJoiner = new StringJoiner(", "); |
924,743 | public DeserializationSchema<RowData> createRuntimeDecoder(DynamicTableSource.Context context, DataType physicalDataType) {<NEW_LINE>final List<ReadableMetadata> readableMetadata = metadataKeys.stream().map(k -> Stream.of(ReadableMetadata.values()).filter(rm -> rm.key.equals(k)).findFirst().orElseThrow(IllegalStateExce... | DataTypeUtils.appendRowFields(physicalDataType, metadataFields); |
1,124,516 | public com.amazonaws.services.simplesystemsmanagement.model.InvalidDeleteInventoryParametersException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.simplesystemsmanagement.model.InvalidDeleteInventoryParametersException invalidDeleteInventoryParametersExceptio... | String currentParentElement = context.getCurrentParentElement(); |
99,625 | public void run() {<NEW_LINE>ServiceTask task;<NEW_LINE>ThreadWorkUsage workUsage = null;<NEW_LINE>if (SystemConfig.getInstance().getUseThreadUsageStat() == 1) {<NEW_LINE>String threadName = Thread.currentThread().getName();<NEW_LINE>workUsage = new ThreadWorkUsage();<NEW_LINE>DbleServer.getInstance().getThreadUsedMap(... | ).put(threadName, workUsage); |
578,594 | public DynamoDBv2Action unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DynamoDBv2Action dynamoDBv2Action = new DynamoDBv2Action();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | class).unmarshall(context)); |
1,553,132 | public EditorInspector<?> createResponseInspector(Editor<?> editor, ModelItem modelItem) {<NEW_LINE>if (modelItem instanceof AbstractHttpRequestInterface<?>) {<NEW_LINE>HttpHeadersInspector inspector = new HttpHeadersInspector(new WsdlRequestResponseHeadersModel((AbstractHttpRequest<?>) modelItem));<NEW_LINE>inspector.... | !JMSUtils.checkIfJMS(modelItem)); |
818,644 | private void detectArtifacts(NbProjectInfoModel model) {<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>if (project.getPlugins().hasPlugin("java")) {<NEW_LINE>model.getInfo().put("main_jar", getProperty(project, "jar", "archivePath"));<NEW_LINE>}<NEW_LINE>if (project.getPlugins().hasPlugin("war")) {<NEW_LINE... | (project, "war", "webXml")); |
90,546 | public static String readFileEndAsString(File file, int size_limit, String charset) throws IOException {<NEW_LINE>FileInputStream fis = newFileInputStream(file);<NEW_LINE>try {<NEW_LINE>if (file.length() > size_limit) {<NEW_LINE>// doesn't really work with multi-byte chars but woreva<NEW_LINE>fis.skip(file.length() - s... | StringBuilder result = new StringBuilder(1024); |
432,291 | protected Component buildContent() {<NEW_LINE>JPanel mainPanel = new JPanel();<NEW_LINE>if (securityCheck instanceof AbstractSecurityScanWithProperties) {<NEW_LINE>mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));<NEW_LINE>mainPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));<NEW_LINE>JPanel ... | prefSize.getWidth(), 600); |
949,650 | public GetStudioComponentResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetStudioComponentResult getStudioComponentResult = new GetStudioComponentResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonT... | String currentParentElement = context.getCurrentParentElement(); |
895,742 | public static String truncate(CharSequence seq, int maxLength, String truncationIndicator) {<NEW_LINE>checkNotNull(seq);<NEW_LINE>// length to truncate the sequence to, not including the truncation indicator<NEW_LINE>int truncationLength <MASK><NEW_LINE>// in this worst case, this allows a maxLength equal to the length... | = maxLength - truncationIndicator.length(); |
447,264 | private static List<Rule> createRules(AndroidLibTarget target, @Nullable String appClass, List<String> extraDeps, List<String> extraResDeps) {<NEW_LINE>String manifestRuleName = ":" + AndroidBuckRuleComposer.libManifest(target);<NEW_LINE>List<Rule> androidLibRules = new ArrayList<>();<NEW_LINE>// Aidl<NEW_LINE>List<Rul... | collect(Collectors.toList()); |
1,475,249 | private static long chooseConfig(GLXCapabilities glxCaps, long display) {<NEW_LINE>try (MemoryStack stack = MemoryStack.stackPush()) {<NEW_LINE>IntBuffer attr = stack.mallocInt(60);<NEW_LINE>set(<MASK><NEW_LINE>set(attr, GLX13.GLX_DRAWABLE_TYPE, GLX13.GLX_WINDOW_BIT);<NEW_LINE>set(attr, GLX13.GLX_RENDER_TYPE, GLX13.GLX... | attr, GLX13.GLX_X_RENDERABLE, 1); |
1,532,620 | public AnnotationParsedLine parse(String line) {<NEW_LINE>AnnotationParsedLine result = null;<NEW_LINE>// NOI18N<NEW_LINE>String[] tokens = line.split("\\(");<NEW_LINE>for (Map.Entry<String, Set<String>> entry : ANNOTATIONS.entrySet()) {<NEW_LINE>if (tokens.length > 0 && AnnotationUtils.isTypeAnnotation(tokens[0], entr... | .length()), annotation); |
1,401,166 | private static void generic(MarketDataService marketDataService) throws IOException {<NEW_LINE>Ticker ticker = marketDataService.getTicker(CurrencyPair.BTC_USDT);<NEW_LINE>System.out.println("BTC / USDT Ticker: " + ticker.toString());<NEW_LINE>// Get the latest order book data for BTC/USD<NEW_LINE>OrderBook orderBook =... | ().size())); |
941,762 | public void copyFileToPrivateStorage(Message message, Uri uri, String type) throws FileCopyException {<NEW_LINE>String mime = MimeUtils.guessMimeTypeFromUriAndMime(mXmppConnectionService, uri, type);<NEW_LINE>Log.d(Config.LOGTAG, "copy " + uri.toString() + " to private storage (mime=" + mime + ")");<NEW_LINE>String ext... | d(Config.LOGTAG, "extension from mime type was null"); |
1,744,464 | public T poll() {<NEW_LINE>if (sourceMode == ASYNC) {<NEW_LINE>long dropped = 0;<NEW_LINE>for (; ; ) {<NEW_LINE>T v = s.poll();<NEW_LINE>try {<NEW_LINE>if (v == null || predicate.test(v)) {<NEW_LINE>if (dropped != 0) {<NEW_LINE>request(dropped);<NEW_LINE>}<NEW_LINE>return v;<NEW_LINE>}<NEW_LINE>Operators.onDiscard(v, t... | onDiscard(v, this.ctx); |
224,338 | public void crossValidateSetSigma(GeneralDataset<L, F> dataset, int kfold, final Scorer<L> scorer, LineSearcher minimizer) {<NEW_LINE>logger.info("##in Cross Validate, folds = " + kfold);<NEW_LINE>logger.info("##Scorer is " + scorer);<NEW_LINE>featureIndex = dataset.featureIndex;<NEW_LINE>labelIndex = dataset.labelInde... | CrossValidator<>(dataset, kfold); |
1,478,334 | static TextView createTextView(Context context, CharSequence text, FactSetTextConfig textConfig, HostConfig hostConfig, long spacing, ContainerStyle containerStyle, RenderArgs renderArgs) {<NEW_LINE>TextView textView = new TextView(context);<NEW_LINE>textView.setText(text);<NEW_LINE>TextBlockRenderer.applyTextColor(tex... | textConfig.getWeight(), renderArgs); |
485,603 | 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>int result = controller.rollDice(<MASK><NEW_LINE>Player player = game.getPlayer(getTargetPointer().getFirst(game, source)... | outcome, source, game, 6); |
830,101 | private Mono<CosmosDatabaseResponse> createDatabaseIfNotExistsInternal(CosmosAsyncDatabase database, ThroughputProperties throughputProperties, Context context) {<NEW_LINE>String spanName = "createDatabaseIfNotExists." + database.getId();<NEW_LINE>Context nestedContext = context.addData(TracerProvider.COSMOS_CALL_DEPTH... | setId(database.getId()); |
729,466 | public EntriesControlHandle register(Text text, IStartEndIgnore modifyListener, final String preferenceName) {<NEW_LINE>List<String> items = loadEntries(preferenceName);<NEW_LINE><MASK><NEW_LINE>Set<EntriesControlHandle> set = preferenceToTextAndListener.get(preferenceName);<NEW_LINE>if (set == null) {<NEW_LINE>set = n... | setTextText(text, modifyListener, items); |
824,243 | public Object callAction(ActionParam actionParam, String env, Cookie[] cookies, String tenant) {<NEW_LINE>log.info("[Action][Call] action label: {}", actionParam.getActionLabel());<NEW_LINE>String actionType = actionParam.getActionType();<NEW_LINE>ActionDO actionDO = new ActionDO();<NEW_LINE>if (!paramsValidation(actio... | setExecData(execData.toJSONString()); |
1,535,006 | private Map<String, String> stats() {<NEW_LINE>final Map<String, String> stats = new TreeMap<>();<NEW_LINE>if (workQueueProcessor != null) {<NEW_LINE>stats.putAll(workQueueProcessor.debugInfo());<NEW_LINE>stats.put("workQueueSize", String.valueOf(workQueueProcessor.queueSize()));<NEW_LINE>}<NEW_LINE>if (connectionPool ... | (connectionPool.activeConnectionCount())); |
1,596,252 | public void createMenuItems(Bundle savedInstanceState) {<NEW_LINE>OsmandApplication app = getMyApplication();<NEW_LINE>plugin = OsmandPlugin.getPlugin(OsmEditingPlugin.class);<NEW_LINE>if (app == null || plugin == null)<NEW_LINE>return;<NEW_LINE>poi = (OsmPoint[]) getArguments().getSerializable(OPENSTREETMAP_POINT);<NE... | findViewById(R.id.message_field); |
1,446,956 | public static void main(String[] args) throws IOException {<NEW_LINE>if (args.length != 4) {<NEW_LINE>logger.info("Usage: MnistConverter dataFile labelFile outFile propsFile");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DataInputStream xStream = IOUtils.getDataInputStream(args[0]);<NEW_LINE>DataInputStream yStream = IOUtils.... | int xMagic = xStream.readInt(); |
227,548 | private void initFromStrings(Class[] keys, String[] values) {<NEW_LINE>if (keys.length != values.length) {<NEW_LINE>throw new UnsupportedOperationException("Argument array lengths differ: " + Arrays.toString(keys) + " vs. " + Arrays.toString(values));<NEW_LINE>}<NEW_LINE>for (int i = 0; i < keys.length; i++) {<NEW_LINE... | parseInt(values[i])); |
588,764 | // Generate Loan Amortization<NEW_LINE>private String generateAmortization(MFMAgreement loan) {<NEW_LINE>String transactionName = (String) getParameter(FinancialSetting.PARAMETER_TRX_NAME);<NEW_LINE>List<AmortizationValue> amortizationList = new ArrayList<AmortizationValue>();<NEW_LINE>MFMProduct financialProduct = MFM... | , BigDecimal.ROUND_HALF_UP), transactionName); |
950,263 | public static GetNearbyCompanyResponse unmarshall(GetNearbyCompanyResponse getNearbyCompanyResponse, UnmarshallerContext _ctx) {<NEW_LINE>getNearbyCompanyResponse.setRequestId<MASK><NEW_LINE>getNearbyCompanyResponse.setCode(_ctx.integerValue("GetNearbyCompanyResponse.Code"));<NEW_LINE>getNearbyCompanyResponse.setMessag... | (_ctx.stringValue("GetNearbyCompanyResponse.RequestId")); |
423,802 | protected Query<?> buildQuery(DataFetchingEnvironment environment, QueryBuilder builder, StargateGraphqlContext context) throws UnauthorizedException {<NEW_LINE>String keyspaceName = environment.getArgument("name");<NEW_LINE>context.getAuthorizationService().authorizeSchemaWrite(context.getSubject(), keyspaceName, null... | .networkTopologyStrategy(parseDatacenters(datacenters)); |
1,585,576 | @ActionOutput(name = "output2", type = "java.lang.String")<NEW_LINE>public Map<String, Object> thingHandlerAction(@ActionInput(name = "input1") String input1, @ActionInput(name = "input2") String input2) {<NEW_LINE>logger.debug("thingHandlerAction called with inputs: {} {}", input1, input2);<NEW_LINE>// one can pass an... | result.put("output1", 23); |
1,832,327 | public void array(int length) {<NEW_LINE>if (length > IRBytecodeAdapter.MAX_ARGUMENTS)<NEW_LINE>throw new NotCompilableException("literal array has more than " + IRBytecodeAdapter.MAX_ARGUMENTS + " elements");<NEW_LINE>// use utility method for supported sizes<NEW_LINE>if (length <= RubyArraySpecialized.MAX_PACKED_SIZE... | classData.clsName, methodName, incomingSig); |
1,774,925 | public PaginationContext createPaginationContext(final SelectStatement selectStatement, final ProjectionsContext projectionsContext, final List<Object> parameters, final Collection<WhereSegment> whereSegments) {<NEW_LINE>Optional<LimitSegment> limitSegment = SelectStatementHandler.getLimitSegment(selectStatement);<NEW_... | TopProjectionSegment> topProjectionSegment = findTopProjection(selectStatement); |
618,810 | public void onConfigurationChanged(Configuration newConfig) {<NEW_LINE>try {<NEW_LINE>Context context = this.toolbar.getContext();<NEW_LINE>TypedArray typedArray = null;<NEW_LINE>// Fetch the toolbar's theme resource ID.<NEW_LINE>int styleAttributeId = TiRHelper.getResource("attr.toolbarStyle");<NEW_LINE>typedArray = c... | new int[] { styleAttributeId }); |
641,997 | private static void compareTwoMultiRedditList(List<MultiReddit> newMultiReddits, List<MultiReddit> oldMultiReddits, List<String> deletedMultiReddits) {<NEW_LINE>int newIndex = 0;<NEW_LINE>for (int oldIndex = 0; oldIndex < oldMultiReddits.size(); oldIndex++) {<NEW_LINE>if (newIndex >= newMultiReddits.size()) {<NEW_LINE>... | old = oldMultiReddits.get(oldIndex); |
1,493,430 | protected List<ItemStack> iterateOverSlots(ICorporeaRequest request, boolean doit) {<NEW_LINE>ImmutableList.Builder<ItemStack> builder = ImmutableList.builder();<NEW_LINE>for (int i = inv.getSlots() - 1; i >= 0; i--) {<NEW_LINE>ItemStack stackAt = inv.getStackInSlot(i);<NEW_LINE>if (request.getMatcher().test(stackAt)) ... | ) : request.getStillNeeded()); |
452,075 | public static void initSystemConfig() throws IOException, InvocationTargetException, IllegalAccessException {<NEW_LINE>SystemConfig systemConfig = SystemConfig.getInstance();<NEW_LINE>// -D properties<NEW_LINE>Properties system = ParameterMapping.mappingFromSystemProperty(<MASK><NEW_LINE>if (systemConfig.getInstanceNam... | systemConfig, StartProblemReporter.getInstance()); |
1,201,913 | public static byte[] convert(String digits) {<NEW_LINE>int length = digits.length();<NEW_LINE>if (length % 2 != 0) {<NEW_LINE>throw new IllegalArgumentException(rb.getString(LogFacade.ODD_NUMBER_HEX_DIGITS_EXCEPTION));<NEW_LINE>}<NEW_LINE>int bLength = length / 2;<NEW_LINE>byte[] bytes = new byte[bLength];<NEW_LINE>for... | (c1 - '0') * 16); |
1,520,291 | protected void createIndeterminateTimeline() {<NEW_LINE>if (indeterminateTransition != null) {<NEW_LINE>clearAnimation();<NEW_LINE>}<NEW_LINE>double dur = 1;<NEW_LINE>ProgressIndicator control = getSkinnable();<NEW_LINE>final double w = control.getWidth() - (<MASK><NEW_LINE>indeterminateTransition = new Timeline(new Ke... | snappedLeftInset() + snappedRightInset()); |
303,790 | public void resetPreviewWidget() {<NEW_LINE>if (selectedScreen != null) {<NEW_LINE>try {<NEW_LINE>// Construct a UISkinData instance.<NEW_LINE>JsonElement skinElement = JsonTreeConverter.deserialize(getEditor().getRoot());<NEW_LINE>UISkinData data = new UISkinFormat().load(skinElement);<NEW_LINE>// Get the selected scr... | .class).getSkin()); |
1,167,368 | public static DescribeDcdnUserResourcePackageResponse unmarshall(DescribeDcdnUserResourcePackageResponse describeDcdnUserResourcePackageResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDcdnUserResourcePackageResponse.setRequestId(_ctx.stringValue("DescribeDcdnUserResourcePackageResponse.RequestId"));<NEW_LINE>Lis... | ("DescribeDcdnUserResourcePackageResponse.ResourcePackageInfos[" + i + "].CurrCapacity")); |
1,597,235 | public void ensureFoldExists(FoldHierarchyTransaction transaction) {<NEW_LINE>if (isSolitaire() || !isStartMark()) {<NEW_LINE>throw new IllegalStateException();<NEW_LINE>}<NEW_LINE>if (fold == null) {<NEW_LINE>try {<NEW_LINE>if (!startMark) {<NEW_LINE>// NOI18N<NEW_LINE>throw new IllegalStateException("Not start mark: ... | Level.WARNING, null, e); |
420,833 | protected static boolean uninstallAddOnExtension(AddOn addOn, Extension extension, AddOnUninstallationProgressCallback callback) {<NEW_LINE>boolean uninstalledWithoutErrors = true;<NEW_LINE>if (extension.isEnabled()) {<NEW_LINE>String extUiName = extension.getUIName();<NEW_LINE>if (extension.canUnload()) {<NEW_LINE>log... | getExtensionLoader().removeExtension(extension); |
53,650 | private void loadNode284() {<NEW_LINE>TwoStateVariableTypeNode node = new TwoStateVariableTypeNode(this.context, Identifiers.AcknowledgeableConditionType_EnabledState, new QualifiedName(0, "EnabledState"), new LocalizedText("en", "EnabledState"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new D... | .expanded(), true)); |
150,163 | public void jacobian(double X, double Y, double Z, double[] inputX, double[] inputY, boolean computeIntrinsic, @Nullable double[] calibX, @Nullable double[] calibY) {<NEW_LINE>double normX = X / Z;<NEW_LINE>double normY = Y / Z;<NEW_LINE>double n2 = normX * normX + normY * normY;<NEW_LINE>double n2_X = 2 * normX / Z;<N... | k1 + k2 * n2) * n2; |
1,539,337 | public static Bitmap toRoundCorner(final Bitmap src, final float[] radii, @FloatRange(from = 0) float borderSize, @ColorInt int borderColor, final boolean recycle) {<NEW_LINE>if (isEmptyBitmap(src))<NEW_LINE>return null;<NEW_LINE>int width = src.getWidth();<NEW_LINE>int height = src.getHeight();<NEW_LINE>Paint paint = ... | setStyle(Paint.Style.STROKE); |
1,473,794 | public StaticObject toGuestComponent(Meta meta, ObjectKlass klass) {<NEW_LINE>assert meta<MASK><NEW_LINE>RuntimeConstantPool pool = klass.getConstantPool();<NEW_LINE>StaticObject component = meta.java_lang_reflect_RecordComponent.allocateInstance();<NEW_LINE>Symbol<Name> nameSymbol = pool.symbolAt(name);<NEW_LINE>Symbo... | .getJavaVersion().java16OrLater(); |
940,013 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>rootView = inflater.inflate(R.layout.processparent, container, false);<NEW_LINE>mainActivity = (MainActivity) getActivity();<NEW_LINE>accentColor = mainActivity.getAccent();<NEW_LINE>if (mainActivity.getAppTheme... | CustomServiceConnection(this, mLineChart, SERVICE_EXTRACT); |
598,852 | private void printFooterForIndex(FileWriter fw) throws IOException {<NEW_LINE>fw.write("<script>\n" + "var tf = new TableFilter(document.querySelector('.sortable_table'), {\n" + " base_path: 'https://unpkg.com/tablefilter@0.7.0/dist/tablefilter/',\n" + " auto_filter: { delay: 100 },\n" + " col_0: 'none',\n" + ... | " extensions: [{ name: 'sort' }]\n" + "});\n" + "tf.init();\n" + "</script>"); |
649,927 | private void initContactListData(final ProtocolProviderService protocolProvider) {<NEW_LINE>this.setCurrentProvider(protocolProvider);<NEW_LINE>srcContactList.removeAllContactSources();<NEW_LINE>ContactSourceService currentProviderContactSource = new ProtocolContactSourceServiceImpl(protocolProvider, OperationSetMultiU... | StringContactSourceServiceImpl(protocolProvider, OperationSetMultiUserChat.class); |
946,618 | private void init() {<NEW_LINE>runOnFilteredTableView(filteredTableView -> {<NEW_LINE>itemsPropertyListener = (Observable o) -> {<NEW_LINE>if (filteredTableView.getItems() != null) {<NEW_LINE>ObservableList<S> backingList = filteredTableView.getBackingList();<NEW_LINE>if (backingList != null) {<NEW_LINE>backingList.for... | itemsProperty().addListener(weakItemsPropertyListener); |
552,686 | void computeHistogram(int c_x, int c_y, double sigma) {<NEW_LINE>int r = (int) Math.ceil(sigma * sigmaEnlarge);<NEW_LINE>// specify the area being sampled<NEW_LINE>bound.x0 = c_x - r;<NEW_LINE>bound.y0 = c_y - r;<NEW_LINE>bound.x1 = c_x + r + 1;<NEW_LINE>bound.y1 = c_y + r + 1;<NEW_LINE>ImageGray rawDX = derivX.getImag... | theta / histAngleBin) % histogramMag.length; |
1,481,137 | public void clean() throws IOException {<NEW_LINE>Storage storage = new Storage(imageDir);<NEW_LINE>long currentVersion = storage.getImageJournalId();<NEW_LINE>long imageDeleteVersion = currentVersion - 1;<NEW_LINE>File currentImage = storage.getImageFile(currentVersion);<NEW_LINE>if (currentImage.exists()) {<NEW_LINE>... | file.getAbsoluteFile() + " deleted."); |
1,149,015 | private void generateOldLayout(ComponentContainer cont, CodeWriter initCodeWriter, CustomCodeData codeData) throws IOException {<NEW_LINE>RADVisualContainer visualCont = cont instanceof RADVisualContainer ? (RADVisualContainer) cont : null;<NEW_LINE>LayoutSupportManager layoutSupport = visualCont != null ? visualCont.g... | initCodeWriter.getWriter(), codeData); |
1,272,189 | // GEN-LAST:event_botaoFecharActionPerformed<NEW_LINE>private void listaPluginsMouseClicked(java.awt.event.MouseEvent evt) {<NEW_LINE>// GEN-FIRST:event_listaPluginsMouseClicked<NEW_LINE>final int index = ((JList) evt.getSource()).getSelectedIndex();<NEW_LINE>final Plugin <MASK><NEW_LINE>painelPlugins = new PainelPlugi... | plugin = plugins.get(index); |
1,369,918 | private void initDeclaredInterceptors() {<NEW_LINE>final LinkedHashSet<TypeElement> result = new LinkedHashSet<TypeElement>();<NEW_LINE>AnnotationParser parser = AnnotationParser.create(getHelper());<NEW_LINE>parser.expectClassArray("value", new ArrayValueHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Object ... | getTypes().asElement(typeMirror); |
506,729 | public void finish() {<NEW_LINE>try {<NEW_LINE>CharSequence oldPassphrase = oldPasswordField.getCharacters();<NEW_LINE>CharSequence newPassphrase = newPasswordController.passwordField.getCharacters();<NEW_LINE>Path masterkeyPath = vault.getPath().resolve(MASTERKEY_FILENAME);<NEW_LINE>byte[] <MASK><NEW_LINE>byte[] newMa... | oldMasterkeyBytes = Files.readAllBytes(masterkeyPath); |
127,553 | public static DescribeSnapshotsResponse unmarshall(DescribeSnapshotsResponse describeSnapshotsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSnapshotsResponse.setRequestId(_ctx.stringValue("DescribeSnapshotsResponse.RequestId"));<NEW_LINE>describeSnapshotsResponse.setNextToken(_ctx.stringValue("DescribeSnapshot... | + "].Tags[" + j + "].TagKey")); |
920,566 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {<NEW_LINE>if (FlipperUtils.shouldEnableFlipper(context)) {<NEW_LINE>final FlipperClient client = AndroidFlipperClient.getInstance(context);<NEW_LINE>client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.wi... | .addPlugin(new FrescoFlipperPlugin()); |
1,607,111 | public Map<String, Object> createProject(User loginUser, String name, String desc) {<NEW_LINE>Map<String, Object> result = new HashMap<>();<NEW_LINE>Map<String, Object> descCheck = checkDesc(desc);<NEW_LINE>if (descCheck.get(Constants.STATUS) != Status.SUCCESS) {<NEW_LINE>return descCheck;<NEW_LINE>}<NEW_LINE>Project p... | put(Constants.DATA_LIST, project); |
118,016 | final ListWebhooksResult executeListWebhooks(ListWebhooksRequest listWebhooksRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listWebhooksRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
127,183 | public UserNotification save(@NonNull final UserNotificationRequest request) {<NEW_LINE>final I_AD_Note notificationPO = InterfaceWrapperHelper.newInstanceOutOfTrx(I_AD_Note.class);<NEW_LINE>notificationPO.setAD_User_ID(request.getRecipient().getUserId().getRepoId());<NEW_LINE>notificationPO.setIsImportant(request.isIm... | (DEFAULT_AD_MESSAGE).orElse(null); |
193,941 | protected void buildActionMapping() {<NEW_LINE>mapping.clear();<NEW_LINE>Class<?> dc;<NEW_LINE>InterceptorManager interMan = InterceptorManager.me();<NEW_LINE>for (Routes routes : getRoutesList()) {<NEW_LINE>for (Route route : routes.getRouteItemList()) {<NEW_LINE>Class<? extends Controller> controllerClass = route.get... | action = mapping.get("/"); |
1,554,776 | <T> void ignoreManuallyRegisteredComponents(@Observes @WithAnnotations({ Path.class, Provider.class }) ProcessAnnotatedType<T> pat) {<NEW_LINE>final AnnotatedType<T<MASK><NEW_LINE>for (Binding binding : mergedBindings.getBindings()) {<NEW_LINE>if (ClassBinding.class.isAssignableFrom(binding.getClass())) {<NEW_LINE>Clas... | > annotatedType = pat.getAnnotatedType(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.