idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,429,746 | private void init() {<NEW_LINE>// Table<NEW_LINE>table = new JTable();<NEW_LINE>table.setName("");<NEW_LINE>table.setModel(httpPanelTabularModel);<NEW_LINE>table.setGridColor(java.awt.Color.gray);<NEW_LINE>table.setIntercellSpacing(new java.awt.Dimension(1, 1));<NEW_LINE>table.setRowHeight(DisplayUtils.getScaledSize(18... | (table), BorderLayout.CENTER); |
1,739,784 | public static final boolean featureDialog(final FeatureInfo featureInfo, final String notFoundMessage, final String featureName) {<NEW_LINE>final CountDownLatch called = new CountDownLatch(1);<NEW_LINE>final boolean[] result = new boolean[] { false };<NEW_LINE>final DialogDescriptor[] descriptor = new DialogDescriptor[... | ].setValue(DialogDescriptor.CLOSED_OPTION); |
991,008 | // CHECKSTYLE:OFF<NEW_LINE>private void reportOnCacheInformations() {<NEW_LINE>// NOPMD<NEW_LINE>// CHECKSTYLE:ON<NEW_LINE>final List<CacheInformations> cacheInformationsList = javaInformations.getCacheInformationsList();<NEW_LINE>final Map<String, CacheInformations> cacheInfos = new LinkedHashMap<>(cacheInformationsLi... | MetricType.GAUGE, "cache_hits_pct", "cache hits percent"); |
1,537,372 | private Ini loadSystemIniFile(String fileName) {<NEW_LINE>// config files from userdir<NEW_LINE>// NOI18N<NEW_LINE>String filePath = getUserConfigPath() + "/" + fileName;<NEW_LINE>File file = FileUtil.normalizeFile(new File(filePath));<NEW_LINE>Ini system = null;<NEW_LINE>try {<NEW_LINE>system = new Ini(new FileReader(... | () + "/" + fileName)); |
872,218 | private void updateSize() {<NEW_LINE>Font f = getFont();<NEW_LINE>if (maxDimension == null) {<NEW_LINE>maxDimension = new Dimension();<NEW_LINE>}<NEW_LINE>if (f != null) {<NEW_LINE>Border b = getBorder();<NEW_LINE>Insets ins = (b != null) ? b.getBorderInsets(this) : NULL_INSETS;<NEW_LINE>FontMetrics fm = getFontMetrics... | String text = this.getText(); |
691,765 | public ExportResult<SocialActivityContainerResource> export(UUID jobId, CookiesAndUrlAuthData authData, Optional<ExportInformation> exportInformation) throws Exception {<NEW_LINE>checkState(authData.getCookies().size() == 1, <MASK><NEW_LINE>String maxId = null;<NEW_LINE>if (exportInformation.isPresent()) {<NEW_LINE>Str... | "Exactly 1 cookie expected: %s", authData.getCookies()); |
884,779 | @Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Requests a refresh of a specific projects metrics")<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Access to the specified project is forbidden"), @ApiResponse(code = 404, mess... | dispatch(new MetricsUpdateEvent(project)); |
1,497,970 | public void onItemClick(int position) {<NEW_LINE>ListedApp listedApp = adapter.data.get(position);<NEW_LINE>if (listedApp.isInstalled) {<NEW_LINE>if (listedApp.isRegistered) {<NEW_LINE>// Edit app settings<NEW_LINE>Intent intent = new Intent(getActivity(), AppSettingsActivity.class);<NEW_LINE>intent.putExtra(<MASK><NEW... | AppSettingsActivity.EXTRA_PACKAGE_NAME, listedApp.packageName); |
855,195 | public void addNewTenant(String tenantDomain, String tenantFirstName, String tenantLastName, String adminUsername, String adminPassWord, String email) throws InterruptedException, IOException {<NEW_LINE>driver.findElement(By.id(uiElementMapper.getElement("tenant.domain"))).sendKeys(tenantDomain);<NEW_LINE>driver.findEl... | ))).sendKeys(email); |
327,437 | private void hospital(Encounter encounter, CPCDSAttributes attributes, String payerName) throws IOException {<NEW_LINE>StringBuilder s = new StringBuilder();<NEW_LINE>// Id,Name,Address,City,State,ZIP,Phone,Type,Ownership<NEW_LINE>Boolean continueFlag = true;<NEW_LINE>if (exportedHospitals.contains(attributes.getServic... | add(attributes.getServiceSiteNPI()); |
594,708 | public void run() {<NEW_LINE>try {<NEW_LINE>parser.beginParsing(new File(filename));<NEW_LINE>String[] row;<NEW_LINE>while ((row = parser.parseNext()) != null) {<NEW_LINE>if ((row.length == 1 && row[0] == null) || (row.length == 1 && row[0].isEmpty()) || row.length == 0) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String ... | shardingNodeWriter.write(row, errorFlag); |
51,805 | public CodegenModel fromModel(String name, Schema model) {<NEW_LINE>CodegenModel cm = super.fromModel(name, model);<NEW_LINE>// TODO Check enum model handling<NEW_LINE>if (cm.interfaces == null) {<NEW_LINE>cm.interfaces = new ArrayList<String>();<NEW_LINE>}<NEW_LINE>Boolean hasDefaultValues = false;<NEW_LINE>// for (de... | propertyMappings = new ArrayList<>(); |
664,021 | static String addRemovePrefix(String prefix, String object, boolean add) {<NEW_LINE>if (prefix == null) {<NEW_LINE>throw new IllegalArgumentException("prefix");<NEW_LINE>}<NEW_LINE>if (object == null) {<NEW_LINE>throw new NullPointerException("object");<NEW_LINE>}<NEW_LINE>if (object.length() == 0) {<NEW_LINE>return ""... | , bsonObject.get(key)); |
340,937 | public Request<CreateAppInstanceAdminRequest> marshall(CreateAppInstanceAdminRequest createAppInstanceAdminRequest) {<NEW_LINE>if (createAppInstanceAdminRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(CreateAppInstanceAdminRequest)");<NEW_LINE>}<NEW_LINE>Request<CreateAp... | .toString(content.length)); |
1,219,808 | public int LAPACKE_zuncsd2by1_work(int arg0, byte arg1, byte arg2, byte arg3, int arg4, int arg5, int arg6, DoubleBuffer arg7, int arg8, DoubleBuffer arg9, int arg10, DoubleBuffer arg11, DoubleBuffer arg12, int arg13, DoubleBuffer arg14, int arg15, DoubleBuffer arg16, int arg17, DoubleBuffer arg18, int arg19, DoubleBuf... | arg19, arg20, arg21, arg22); |
1,413,696 | static int lca_query(int p, int q) {<NEW_LINE>int tmp, log, i;<NEW_LINE>// if p is situated on a higher level than q then we swap them<NEW_LINE>if (level[p] < level[q]) {<NEW_LINE>tmp = p;<NEW_LINE>p = q;<NEW_LINE>q = tmp;<NEW_LINE>}<NEW_LINE>// we compute the value of [log(level[p)]<NEW_LINE>for (log = 1; 1 << log <= ... | = P[q][i]; |
238,570 | final ListTableStorageOptimizersResult executeListTableStorageOptimizers(ListTableStorageOptimizersRequest listTableStorageOptimizersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTableStorageOptimizersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | false), new ListTableStorageOptimizersResultJsonUnmarshaller()); |
453,390 | public boolean place(@Nonnull FeaturePlaceContext<MysticalFlowerConfig> ctx) {<NEW_LINE>WorldGenLevel level = ctx.level();<NEW_LINE>Random rand = ctx.random();<NEW_LINE>MysticalFlowerConfig config = ctx.config();<NEW_LINE>BlockPos pos = ctx.origin();<NEW_LINE>boolean any = false;<NEW_LINE>int dist = Math.min(8, Math.ma... | ) + rand.nextInt(16); |
919,480 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Cards cards = new CardsImpl(player.getLibrary().getTopCards(game, 6));<NEW_LINE>player.revealCards(source, cards, game);<NEW_LINE... | cards, game, source, false); |
759,531 | public Enumerable<Object[]> scan(DataContext root) {<NEW_LINE>final AuthenticationResult authenticationResult = (AuthenticationResult) Preconditions.checkNotNull(root.get(PlannerContext.DATA_CTX_AUTHENTICATION_RESULT), "authenticationResult in dataContext");<NEW_LINE>checkStateReadAccessForServers(authenticationResult,... | iterateAllSegments(), SEGMENT_RA_GENERATOR, authorizerMapper); |
884,464 | public static FaceletTagLibrary create(ExternalContext externalContext, URL url) throws IOException {<NEW_LINE>InputStream is = null;<NEW_LINE>FaceletTagLibrary t = null;<NEW_LINE>URLConnection conn = null;<NEW_LINE>try {<NEW_LINE>boolean schemaValidating = false;<NEW_LINE>// validate XML<NEW_LINE>if (MyfacesConfig.get... | version = ConfigFilesXmlValidationUtils.getFaceletTagLibVersion(url); |
1,557,201 | private void createJmbeLibrary(Path library) {<NEW_LINE>JmbeCreator jmbeCreator = new JmbeCreator(mCurrentRelease, library);<NEW_LINE>getConsoleTextArea().textProperty().bind(jmbeCreator.consoleOutputProperty());<NEW_LINE>jmbeCreator.completeProperty().addListener((observable, oldValue, newValue) -> {<NEW_LINE>getCreat... | .completeProperty().unbind(); |
213,236 | private ClientMessage encodeAuthenticationRequest(Address toAddress) {<NEW_LINE>InternalSerializationService ss = client.getSerializationService();<NEW_LINE>byte serializationVersion = ss.getVersion();<NEW_LINE>CandidateClusterContext currentContext = clusterDiscoveryService.current();<NEW_LINE>Credentials credentials ... | toData(credentials).toByteArray(); |
265,810 | public void authenticate(AuthenticationFlowContext context) {<NEW_LINE>String username = retrieveUsername(context);<NEW_LINE>if (username == null) {<NEW_LINE>context.getEvent().error(Errors.USER_NOT_FOUND);<NEW_LINE>Response challengeResponse = errorResponse(Response.Status.UNAUTHORIZED.getStatusCode(), "invalid_reques... | failure(AuthenticationFlowError.INVALID_USER, challengeResponse); |
390,660 | public boolean validateMethodRequest(MethodConfig methodConfig) {<NEW_LINE>if (methodConfig.getSpreadsheetId() == null || methodConfig.getSpreadsheetId().isBlank()) {<NEW_LINE>throw new AppsmithPluginException(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, "Missing required field Spreadsheet Url");<NEW_LINE>}<NEW_L... | AppsmithPluginException(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR, "Missing required field Sheet name"); |
1,450,145 | private void initializeComponents() {<NEW_LINE>setLayout(new GridBagLayout());<NEW_LINE>JButton backwardButton, forwardButton;<NEW_LINE>add(backwardButton = new JButton("<"), new GridBagConstraints(0, 0, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, new Insets(0, 0, 0, <MASK><NEW_LINE>add(region... | 0), 0, 0)); |
224,863 | public void announce() throws AnnounceException {<NEW_LINE>org.jreleaser.model.Github github = context.getModel().getRelease().getGithub();<NEW_LINE>Discussions discussions = context.getModel().getAnnounce().getDiscussions();<NEW_LINE>String message = "";<NEW_LINE>if (isNotBlank(discussions.getMessage())) {<NEW_LINE>me... | ).debug("message: {}", message); |
97,529 | private void installFileSnapshotFiles(FileSnapshot snapshot, int slot, boolean isDataMigration) throws PullFileException {<NEW_LINE>List<RemoteTsFileResource<MASK><NEW_LINE>// pull file<NEW_LINE>for (int i = 0, remoteTsFileResourcesSize = remoteTsFileResources.size(); i < remoteTsFileResourcesSize; i++) {<NEW_LINE>Remo... | > remoteTsFileResources = snapshot.getDataFiles(); |
1,437,397 | public void processBindingConfiguration(String context, Item item, String bindingConfig) throws BindingConfigParseException {<NEW_LINE>PulseaudioBindingConfig config = new PulseaudioBindingConfig();<NEW_LINE>String[] <MASK><NEW_LINE>if (item instanceof StringItem) {<NEW_LINE>if (configParts.length != 1 && configParts.l... | configParts = bindingConfig.split(":"); |
1,613,890 | static EtdVariant parseCode(String code) {<NEW_LINE>switch(code.length()) {<NEW_LINE>case 0:<NEW_LINE>return MONTHLY;<NEW_LINE>case 1:<NEW_LINE>return ofMonthly(EtdSettlementType.parseCode(code));<NEW_LINE>case 2:<NEW_LINE>{<NEW_LINE>if (code.charAt(0) == 'W') {<NEW_LINE>return ofWeekly(Integer.parseInt(code.substring(... | (code.substring(2)); |
202,197 | private void updateUi() {<NEW_LINE>Integer solution = getSolution();<NEW_LINE>String solutionString = solution == null ? "" : solution.toString();<NEW_LINE>_tvSolution.setText(solutionString);<NEW_LINE>if (_captcha == null) {<NEW_LINE>findViewById(R.id.llCaptcha).setVisibility(View.INVISIBLE);<NEW_LINE>_pbWait.setVisib... | (R.id.ivCaptcha)); |
1,661,967 | public static <H extends Hcl> List<HclRightPadded<H>> withElements(List<HclRightPadded<H>> before, List<H> elements) {<NEW_LINE>// a cheaper check for the most common case when there are no changes<NEW_LINE>if (elements.size() == before.size()) {<NEW_LINE>boolean hasChanges = false;<NEW_LINE>for (int i = 0; i < before.... | (found.withElement(t)); |
1,735,875 | final PutCoreNetworkPolicyResult executePutCoreNetworkPolicy(PutCoreNetworkPolicyRequest putCoreNetworkPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putCoreNetworkPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | false), new PutCoreNetworkPolicyResultJsonUnmarshaller()); |
462,902 | public void marshall(DvbSubDestinationSettings dvbSubDestinationSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (dvbSubDestinationSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(dvbSubDes... | dvbSubDestinationSettings.getXPosition(), XPOSITION_BINDING); |
438,738 | public CompletableFuture<TermIndex> notifyInstallSnapshotFromLeader(RaftProtos.RoleInfoProto roleInfoProto, TermIndex firstTermIndexInLog) {<NEW_LINE>if (roleInfoProto.getRole() != RaftProtos.RaftPeerRole.FOLLOWER) {<NEW_LINE>return RaftJournalUtils.completeExceptionally(new IllegalStateException(String.format("Server ... | .getIndex(), latestJournalIndex)); |
972,215 | public Operation buildTags(HandlerMethod handlerMethod, Operation operation, OpenAPI openAPI, Locale locale) {<NEW_LINE>Set<io.swagger.v3.oas.models.tags.Tag> tags = new HashSet<>();<NEW_LINE>Set<String> tagsStr = new HashSet<>();<NEW_LINE>buildTagsFromClass(handlerMethod.getBeanType(), tags, tagsStr, locale);<NEW_LINE... | getClassJavadoc(handlerMethod.getBeanType()); |
684,028 | public static List<String> split(final String str, final char sep, final int lim) {<NEW_LINE>final int len = str.length();<NEW_LINE>if (len == 0)<NEW_LINE>return Collections.singletonList(str);<NEW_LINE>final ArrayList<String> result = new ArrayList<>(lim <= 0 ? 8 : lim);<NEW_LINE>int e;<NEW_LINE>int s = 0;<NEW_LINE>in... | (str.substring(s)); |
1,717,628 | // clamp timerange to case<NEW_LINE>@SuppressWarnings("AssignmentToMethodParameter")<NEW_LINE>synchronized public void pushTimeAndType(Interval timeRange, TimelineEventType.HierarchyLevel typeZoom) throws TskCoreException {<NEW_LINE>Interval overlappingTimeRange = this.filteredEvents.getSpanningInterval().overlap(timeR... | .modelParamsProperty().get(); |
1,036,114 | private void initDatabasesTab() {<NEW_LINE>new ViewModelListCellFactory<StudyDatabaseItem>().withText(StudyDatabaseItem::getName).install(databaseSelector);<NEW_LINE>databaseSelector.setItems(viewModel.getNonSelectedDatabases());<NEW_LINE>setupCommonPropertiesForTables(databaseSelector, this::addDatabase, databaseColum... | getValue().nameProperty()); |
365,270 | public void captureAudio(ActionListener response) {<NEW_LINE>if (!nativeInstance.checkMicrophoneUsage()) {<NEW_LINE>throw new RuntimeException("Please add the ios.NSMicrophoneUsageDescription build hint");<NEW_LINE>}<NEW_LINE>dropEvents = false;<NEW_LINE>String p = FileSystemStorage.getInstance().getAppHomePath();<NEW_... | new ActionEvent(p + "cn1TempAudioFile")); |
257,330 | public void execute(DelegateExecution execution) {<NEW_LINE>try {<NEW_LINE>boolean isSkipExpressionEnabled = SkipExpressionUtil.isSkipExpressionEnabled(execution, skipExpression);<NEW_LINE>if (!isSkipExpressionEnabled || (isSkipExpressionEnabled && !SkipExpressionUtil.shouldSkipFlowElement(execution, skipExpression))) ... | serviceTaskId, execution.getProcessDefinitionId()); |
1,816,011 | public void gotValue(LiveExpression<ImmutableSet<RunTarget>> exp, ImmutableSet<RunTarget> actualRunTargets) {<NEW_LINE>synchronized (modelsPerTargetId) {<NEW_LINE>Map<String, RunTarget> currentTargetsPerId = new LinkedHashMap<>();<NEW_LINE>if (actualRunTargets != null) {<NEW_LINE>for (RunTarget runTarget : actualRunTar... | entry.getKey(), model); |
152,104 | public IRubyObject initialize(ThreadContext context, IRubyObject[] args, Block block) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>IRubyObject object;<NEW_LINE>IRubyObject method = runtime.newSymbol("each");<NEW_LINE>IRubyObject size = null;<NEW_LINE>if (block.isGiven()) {<NEW_LINE>Arity.checkArgumentCount(runti... | getWarnings().warn("Enumerator.new without a block is deprecated; use Object#to_enum"); |
1,835,765 | private void _moveToDyn(long did, @NonNull List<Long> ids) {<NEW_LINE>ArrayList<Object[]> data = new ArrayList<>(ids.size());<NEW_LINE>// long t = getTime().intTime(); // unused variable present (and unused) upstream<NEW_LINE>int u = mCol.usn();<NEW_LINE>for (long c = 0; c < ids.size(); c++) {<NEW_LINE>// start at -100... | ((int) c) }); |
870,141 | public boolean annotate(StringFieldValue text) {<NEW_LINE>// Already annotated with LINGUISTICS.<NEW_LINE>if (text.getSpanTree(SpanTrees.LINGUISTICS) != null)<NEW_LINE>return true;<NEW_LINE>Tokenizer tokenizer = factory.getTokenizer();<NEW_LINE>String input = (text.getString().length() <= config.getMaxTokenizeLength())... | 0, config.getMaxTokenizeLength()); |
67,101 | private void applyPattern() {<NEW_LINE>if (patternValues == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.pattern = new ArrayList<>(patternValues.size());<NEW_LINE>for (int i = 0; i < patternValues.size(); i++) {<NEW_LINE>float patternValue = (float) patternValues.getDouble(i);<NEW_LINE>boolean isGap = i % 2 != 0;<... | this.pattern.add(patternItem); |
560,944 | final DescribeFolderResult executeDescribeFolder(DescribeFolderRequest describeFolderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeFolderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
174,396 | /* http://www.w3.org/TR/css3-fonts/#font-weight-the-font-weight-property */<NEW_LINE>private ParsedValueImpl<String, FontWeight> parseFontWeight(Term root) throws ParseException {<NEW_LINE>if (root == null)<NEW_LINE>return null;<NEW_LINE>final Token token = root.token;<NEW_LINE>if (token == null || token.getText() == n... | findByWeight(900).name(); |
1,494,908 | public STATUS postAbstractInit(final PwmApplication pwmApplication, final DomainID domainID) throws PwmException {<NEW_LINE>this.pwmDomain = pwmApplication.domains().get(domainID);<NEW_LINE>if (!pwmDomain.getConfig().readSettingAsBoolean(PwmSetting.PW_EXPY_NOTIFY_ENABLE)) {<NEW_LINE>LOGGER.trace(getSessionLabel(), () -... | newException(PwmError.ERROR_PWNOTIFY_SERVICE_ERROR, "will remain closed, node service is not running"); |
58,422 | public void readPayload(PacketBufferBC buffer, Side netSide, MessageContext ctx) throws IOException {<NEW_LINE>int id = buffer.readUnsignedByte();<NEW_LINE>if (netSide == Side.SERVER) {<NEW_LINE>if (id == ID_UPDATE_PLUG) {<NEW_LINE>if (pluggable != null) {<NEW_LINE>pluggable.readPayload(buffer, netSide, ctx);<NEW_LINE>... | holder.eventBus.unregisterHandler(pluggable); |
118,398 | private void createCompassFramePicture() {<NEW_LINE>// The inside of the compass is white and transparent<NEW_LINE>final Paint innerPaint = new Paint();<NEW_LINE>innerPaint.setColor(Color.WHITE);<NEW_LINE>innerPaint.setAntiAlias(true);<NEW_LINE><MASK><NEW_LINE>innerPaint.setAlpha(200);<NEW_LINE>// The outer part (circl... | innerPaint.setStyle(Style.FILL); |
968,695 | public static ReplaceAppGroupCommodityCodeResponse unmarshall(ReplaceAppGroupCommodityCodeResponse replaceAppGroupCommodityCodeResponse, UnmarshallerContext _ctx) {<NEW_LINE>replaceAppGroupCommodityCodeResponse.setRequestId(_ctx.stringValue("ReplaceAppGroupCommodityCodeResponse.requestId"));<NEW_LINE>Result result = ne... | (_ctx.integerValue("ReplaceAppGroupCommodityCodeResponse.result.firstRankAlgoDeploymentId")); |
578,949 | void handle(SyncVolumeSizeOnPrimaryStorageMsg msg, String hostUuid, final ReturnValueCompletion<SyncVolumeSizeOnPrimaryStorageReply> completion) {<NEW_LINE><MASK><NEW_LINE>GetVolumeSizeCmd cmd = new GetVolumeSizeCmd();<NEW_LINE>cmd.installPath = msg.getInstallPath();<NEW_LINE>cmd.volumeUuid = msg.getVolumeUuid();<NEW_L... | final SyncVolumeSizeOnPrimaryStorageReply reply = new SyncVolumeSizeOnPrimaryStorageReply(); |
570,324 | static private final void ExpandBuff(boolean wrapAround) {<NEW_LINE>char[] newbuffer = new char[bufsize + 2048];<NEW_LINE>int[] newbufline = new int[bufsize + 2048];<NEW_LINE>int[] newbufcolumn = new int[bufsize + 2048];<NEW_LINE>try {<NEW_LINE>if (wrapAround) {<NEW_LINE>System.arraycopy(buffer, tokenBegin, newbuffer, ... | newbufline, 0, bufsize - tokenBegin); |
412,135 | public void configureImportedPaymentTable(IMiniTable miniTable) {<NEW_LINE>miniTable.setKeyColumnIndex(0);<NEW_LINE>// 0-Selection<NEW_LINE>miniTable.setColumnClass(0, IDColumn.class, true, getImportedPaymentColumnNames().get(0));<NEW_LINE>// 1-TrxDate<NEW_LINE>miniTable.setColumnClass(1, Timestamp.class, true);<NEW_LI... | 4, String.class, true); |
1,444,212 | protected void internalRespond(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>Project project = null;<NEW_LINE>// This command also supports retrieving rows for an importing job.<NEW_LINE>String importingJobID = request.getParameter("importingJobID");<NEW_LINE>... | response.setHeader("Cache-Control", "no-cache"); |
737,674 | private void fillGlobalTable(GlobalTable globalTable, int schemaSqlMaxLimit, Map<String, BaseTableConfig> tableConfigMap, Map<String, ShardingNodeConfig> shardingNodeConfigMap) {<NEW_LINE>String globalTableName = globalTable.getName();<NEW_LINE>String globalTableSqlMaxLimitStr = null == globalTable.getSqlMaxLimit() ? n... | table.getName(), table); |
886,928 | public Clustering<KMeansModel> run(Relation<NumberVector> relation) {<NEW_LINE>CFTree tree = cffactory.newTree(relation.getDBIDs(), relation);<NEW_LINE>// For efficiency, we also need the mean of each CF:<NEW_LINE>ClusteringFeature[] cfs = new ClusteringFeature[tree.leaves];<NEW_LINE>double[][] cfmeans = new double[tre... | z] = iter.get(); |
1,471,738 | public void mkdir(final OpenMode openMode, final String path, final MainFragment ma) {<NEW_LINE>mk(R.string.newfolder, "", (dialog, which) -> {<NEW_LINE>EditText textfield = dialog.getCustomView().findViewById(R.id.singleedittext_input);<NEW_LINE>mkDir(new HybridFile(openMode, path), new HybridFile(openMode, path, text... | STATE_ERROR, R.string.invalid_name); |
943,689 | private Result<Pair<EventAndOrganizationId, Ticket>> validatePinAndEvent(String pin, String eventName) {<NEW_LINE>var eventOptional = eventRepository.findOptionalEventAndOrganizationIdByShortName(eventName);<NEW_LINE>return new Result.Builder<EventAndOrganizationId>().checkPrecondition(eventOptional::isPresent, ErrorCo... | int numResults = tickets.size(); |
1,650,515 | public ImmutableMap<String, Function> call() throws Exception {<NEW_LINE>// This creates a dependency between function and the client.<NEW_LINE>// However, we need to know the load paths before we can do anything, so this is necessary.<NEW_LINE>PythonUtils.initializePython();<NEW_LINE>Py.getSystemState().path.append(ne... | (name, (PyFunction) o); |
480,475 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player targetPlayer = game.getPlayer(source.getFirstTarget());<NEW_LINE>Player you = game.getPlayer(source.getControllerId());<NEW_LINE>Card card = null;<NEW_LINE>if (targetPlayer != null && you != null) {<NEW_LINE>targetPlayer.revealCards("Talaras Bane", targe... | target.getFirstTarget(), game); |
1,063,982 | public boolean replace(Data key, Object oldValue, Object newValue, ExpiryPolicy expiryPolicy, UUID source, int completionId) {<NEW_LINE>long now = Clock.currentTimeMillis();<NEW_LINE>long startNanos = isStatisticsEnabled() ? Timer.nanos() : 0;<NEW_LINE>boolean isHit = false;<NEW_LINE>boolean replaced = false;<NEW_LINE>... | expiryPolicy = getExpiryPolicy(record, expiryPolicy); |
963,130 | public static void average(Planar<GrayF32> from, GrayF32 to) {<NEW_LINE>int numBands = from.getNumBands();<NEW_LINE>if (numBands == 1) {<NEW_LINE>to.setTo(from.getBand(0));<NEW_LINE>} else if (numBands == 3) {<NEW_LINE>GrayF32 band0 = from.getBand(0);<NEW_LINE>GrayF32 band1 = from.getBand(1);<NEW_LINE>GrayF32 band2 = f... | sum = band0.data[indexFrom]; |
13,997 | private List<ProfiledSpan> buildProfiledSpanList(SegmentObject segmentObject) {<NEW_LINE>List<ProfiledSpan> spans = new ArrayList<>();<NEW_LINE>segmentObject.getSpansList().forEach(spanObject -> {<NEW_LINE>ProfiledSpan span = new ProfiledSpan();<NEW_LINE>span.setSpanId(spanObject.getSpanId());<NEW_LINE>span.setParentSp... | setEndTime(spanObject.getEndTime()); |
1,186,701 | public static void actionZoom(Lookup lookup, Object value) {<NEW_LINE>if (lookup == null)<NEW_LINE>return;<NEW_LINE>//<NEW_LINE><MASK><NEW_LINE>// If not already exist or exact value<NEW_LINE>if (zoomQuery == null || value != null) {<NEW_LINE>// ColumnName might be changed in MTab.validateQuery<NEW_LINE>zoomQuery = new... | MQuery zoomQuery = lookup.getZoomQuery(); |
838,861 | private void dynInit() {<NEW_LINE>ColumnInfo[] layout = new ColumnInfo[] { // 1<NEW_LINE>new ColumnInfo(" ", ".", IDColumn.class, false, false, ""), // 3<NEW_LINE>new ColumnInfo(Msg.translate(Env.getCtx(), "DocumentNo"), ".", String.class), // 3<NEW_LINE>new ColumnInfo(Msg.translate(Env.getCtx(), "Date"), ".", Timestam... | , KeyNamePair.class, ".") }; |
897,335 | public com.amazonaws.services.marketplacecatalog.model.ThrottlingException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.marketplacecatalog.model.ThrottlingException throttlingException = new com.amazonaws.services.marketplacecatalog.model.ThrottlingException(... | JsonToken token = context.getCurrentToken(); |
847,412 | private // that contains the curve we want to dash in the first type elements<NEW_LINE>void somethingTo(final int type) {<NEW_LINE>final float[] _curCurvepts = curCurvepts;<NEW_LINE>if (pointCurve(_curCurvepts, type)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final LengthIterator _li = li;<NEW_LINE>final float[] _dash = d... | = (_idx + 1) % _dashLen; |
1,430,087 | public static ClientMessage encodeRequest(java.lang.String name, long delta, boolean getBeforeUpdate, java.util.Collection<java.util.Map.Entry<java.util.UUID, java.lang.Long>> replicaTimestamps, java.util.UUID targetReplicaUUID) {<NEW_LINE><MASK><NEW_LINE>clientMessage.setRetryable(false);<NEW_LINE>clientMessage.setOpe... | ClientMessage clientMessage = ClientMessage.createForEncode(); |
1,315,628 | private boolean createEmail(ExecutableFlow flow, Set<String> emailList, EmailMessage message, String status, String azkabanName, String scheme, String clientHostname, String clientPortNumber, boolean printData) {<NEW_LINE>Project project = azkaban.getProjectManager().getProject(flow.getProjectId());<NEW_LINE>if (emailL... | ().get("title")); |
912,503 | private void parseZone3(String text, boolean multipleInfo) {<NEW_LINE>String value = text.trim();<NEW_LINE><MASK><NEW_LINE>if (valueLowerCase.startsWith(KEY1_HEX_VOLUME) || valueLowerCase.startsWith(KEY2_HEX_VOLUME)) {<NEW_LINE>value = extractNumber(value, valueLowerCase.startsWith(KEY1_HEX_VOLUME) ? KEY1_HEX_VOLUME.le... | String valueLowerCase = value.toLowerCase(); |
1,208,624 | public void marshall(AwsS3BucketBucketLifecycleConfigurationRulesDetails awsS3BucketBucketLifecycleConfigurationRulesDetails, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (awsS3BucketBucketLifecycleConfigurationRulesDetails == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(..... | awsS3BucketBucketLifecycleConfigurationRulesDetails.getNoncurrentVersionExpirationInDays(), NONCURRENTVERSIONEXPIRATIONINDAYS_BINDING); |
1,563,167 | public static JDialog createDialog(JComponent parent, OWLEditorKit editorKit) {<NEW_LINE>JFrame parentFrame = (JFrame) SwingUtilities.getAncestorOfClass(JFrame.class, parent);<NEW_LINE>final JDialog dialog = new JDialog(parentFrame, <MASK><NEW_LINE>final SearchDialogPanel searchDialogPanel = new SearchDialogPanel(edito... | "Search", Dialog.ModalityType.MODELESS); |
1,023,408 | public UpdateRecoveryPointLifecycleResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateRecoveryPointLifecycleResult updateRecoveryPointLifecycleResult = new UpdateRecoveryPointLifecycleResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement... | ().unmarshall(context)); |
778,759 | public void cancelRequest(DnsMessage msg, boolean isTimeout) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled())<NEW_LINE>c_logger.traceEntry(this, "SipResolver: cancelRequest: entry id=" + hashCode());<NEW_LINE>RequestPending request;<NEW_LINE>synchronized (_requestPending) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()... | int total = _eventsCounter.reportEvent(); |
1,431,510 | public Object createInstance(List fileObjectList) {<NEW_LINE>ArrayList<FileObject> textBaseFilesList = new ArrayList<FileObject>();<NEW_LINE>for (Object o : fileObjectList) {<NEW_LINE>FileObject fileObject = null;<NEW_LINE>if (o instanceof FileObject) {<NEW_LINE>fileObject = (FileObject) o;<NEW_LINE>} else {<NEW_LINE>c... | String fullPath = fileObject.getPath(); |
1,076,167 | public void parse() throws IOException {<NEW_LINE>final List<Text> lines = this.lines();<NEW_LINE>final ANTLRErrorListener errors = new BaseErrorListener() {<NEW_LINE><NEW_LINE>// @checkstyle ParameterNumberCheck (10 lines)<NEW_LINE>@Override<NEW_LINE>public void syntaxError(final Recognizer<?, ?> recognizer, final Obj... | (xel).domQuietly()); |
1,566,425 | private void addAnchors(Template template, Rectangle slimBox) {<NEW_LINE>final Point2D center = GeoUtil.center2D(slimBox);<NEW_LINE>// Define common basic anchors<NEW_LINE>template.putOffset(Anchor.CENTER, center.getX(), center.getY());<NEW_LINE>template.putOffset(Anchor.MIDDLE_LEFT, slimBox.x, center.getY());<NEW_LINE... | left, center.getY()); |
284,485 | void considerConnect(SquareNode node0, SquareNode node1) {<NEW_LINE>// Find the side on each line which intersects the line connecting the two centers<NEW_LINE>lineA.a = node0.center;<NEW_LINE>lineA.b = node1.center;<NEW_LINE>int intersection0 = graph.findSideIntersect(node0, lineA, intersection, lineB);<NEW_LINE>conne... | connectLine.b.setTo(intersection); |
1,536,655 | private TransitLayer map(TransitTuningParameters tuningParameters) {<NEW_LINE>StopIndexForRaptor stopIndex;<NEW_LINE>Map<TripPattern, TripPatternWithRaptorStopIndexes> newTripPatternForOld;<NEW_LINE>HashMap<LocalDate, List<TripPatternForDate>> tripPatternsByStopByDate;<NEW_LINE><MASK><NEW_LINE>LOG.info("Mapping transit... | List<List<Transfer>> transferByStopIndex; |
1,794,716 | private static void addInnerClasspathItems(final Set<File> classpaths, final File item) {<NEW_LINE>final Manifest manifest = getClasspathItemManifest(item);<NEW_LINE>if (manifest == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Attributes attributes = manifest.getMainAttributes();<NEW_LINE>if (attributes == null) ... | StringUtil.splitc(s, ' '); |
1,448,061 | public ResultCursor sync() {<NEW_LINE>ArrayResultCursor result = new ArrayResultCursor("RULE");<NEW_LINE>result.addColumn("GROUP_NAME", DataTypes.StringType);<NEW_LINE>result.addColumn("DBKEY_NAME", DataTypes.StringType);<NEW_LINE>result.addColumn("START_TIME", DataTypes.LongType);<NEW_LINE>result.<MASK><NEW_LINE>resul... | addColumn("EXECUTE_TIME", DataTypes.LongType); |
1,108,354 | public double calculateProb(int first, int second) {<NEW_LINE>// Get vector for first vertex, as well as code for second:<NEW_LINE>INDArray vec = vertexVectors.getRow(first);<NEW_LINE>int codeLength = tree.getCodeLength(second);<NEW_LINE>long <MASK><NEW_LINE>int[] innerNodesForVertex = tree.getPathInnerNodes(second);<N... | code = tree.getCode(second); |
1,475,498 | private void precacheImage(@NonNull final Activity activity, @NonNull final ImageInfo info, final int positionInList, @NonNull final PrefsUtility.GifViewMode gifViewMode, @NonNull final PrefsUtility.ImageViewMode imageViewMode, @NonNull final PrefsUtility.VideoViewMode videoViewMode) {<NEW_LINE>// Don't precache huge i... | ("Not precaching '%s': images opened externally", info.urlOriginal)); |
448,318 | public ProjectHudsonJobCreator forProject(Project project) {<NEW_LINE>final NbMavenProject prj = project.getLookup(<MASK><NEW_LINE>if (prj == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>return new ProjectHudsonJobCreator() {<NEW_LINE><NEW_LINE>final HudsonSCM.Configuration scm = Helper.prepareSCM(prj.getMavenProj... | ).lookup(NbMavenProject.class); |
270,496 | protected void addCircleFault(float[][] tempBuffer, Random random, float faultHeight, float range) {<NEW_LINE>float radius = random.nextFloat() * (maxRadius - minRadius) + minRadius;<NEW_LINE>int intRadius = (int) FastMath.floor(radius);<NEW_LINE>// Allow circle center to be out of map if not by more than radius.<NEW_L... | dist, random, faultHeight, range); |
782,285 | private ArtifactKey find(String searchUrl, IProgressMonitor monitor) throws IOException, InterruptedException {<NEW_LINE>Duration <MASK><NEW_LINE>HttpClient client = HttpClient.newBuilder().connectTimeout(timeout).proxy(ProxySelector.getDefault()).version(Version.HTTP_2).build();<NEW_LINE>HttpRequest httpRequest = Http... | timeout = Duration.ofSeconds(10); |
970,070 | public static void main(String[] arg) throws Exception {<NEW_LINE>// Change the value of bucket to the S3 bucket that contains your image file.<NEW_LINE>// Change the value of photo to your image file name.<NEW_LINE>String photo = "input.png";<NEW_LINE>String bucket = "bucket";<NEW_LINE>int height = 0;<NEW_LINE>int wid... | = height * box.getTop(); |
480,365 | protected ConfigWatcherRegister initConfigReader() throws ModuleStartException {<NEW_LINE><MASK><NEW_LINE>if (Strings.isNullOrEmpty(settings.getServerAddr())) {<NEW_LINE>throw new ModuleStartException("Nacos serverAddr cannot be null or empty.");<NEW_LINE>}<NEW_LINE>if (settings.getPort() <= 0) {<NEW_LINE>throw new Mod... | log.info("settings: {}", settings); |
653,983 | public StartPHIDetectionJobResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StartPHIDetectionJobResult startPHIDetectionJobResult = new StartPHIDetectionJobResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | class).unmarshall(context)); |
674,288 | final GetTemplateResult executeGetTemplate(GetTemplateRequest getTemplateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getTemplateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,714,578 | public void testPOJO(Map<String, String> param, StringBuilder ret) throws Exception {<NEW_LINE>WebTarget target = client<MASK><NEW_LINE>Response response = target.request().accept(MediaType.APPLICATION_JSON).get();<NEW_LINE>if (response.getStatus() != 200) {<NEW_LINE>ret.append("response.getStatus() = " + response.getS... | .target(getAddress("pojo/person2/person")); |
1,115,775 | public void save(boolean async) {<NEW_LINE>if (this.closed) {<NEW_LINE>throw new IllegalStateException("Tried to save closed player");<NEW_LINE>}<NEW_LINE>super.saveNBT();<NEW_LINE>if (this.level != null) {<NEW_LINE>this.namedTag.putString("Level", this.level.getFolderName());<NEW_LINE>if (this.spawnPosition != null &&... | getFoodData().getFoodSaturationLevel()); |
402,269 | private static <T extends Statement> Optional<String> explainDataDefinition(T statement, List<Expression> parameters) {<NEW_LINE>if (!isDataDefinitionStatement(statement.getClass())) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LINE>if (statement instanceof CreateSchema) {<NEW_LINE>return Optional.of("CREATE SCHE... | ) statement).getName()); |
41,733 | // -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public Function<Double, Double> differentiate(Function<Double, Double> function, Function<Double, Boolean> domain) {<NEW_LINE>ArgChecker.notNull(function, "function");<NEW_LINE>ArgChecker.notNull(domain, "domain");<... | ] y = new double[3]; |
1,489,548 | void mergeXML(ManagedScheduledExecutor mxd) throws InjectionConfigurationException {<NEW_LINE>final boolean trace = TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled();<NEW_LINE>if (trace)<NEW_LINE>Tr.entry(this, tc, "mergeXML", mxd, mxd.getName(), (XMLContextServiceRef ? "(xml)" : " ") + "contextServiceRef... | String contextServiceRefValue = mxd.getContextServiceRef(); |
541,918 | public static DescribeIPv6TranslatorsResponse unmarshall(DescribeIPv6TranslatorsResponse describeIPv6TranslatorsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeIPv6TranslatorsResponse.setRequestId(_ctx.stringValue("DescribeIPv6TranslatorsResponse.RequestId"));<NEW_LINE>describeIPv6TranslatorsResponse.setPageSize... | ("DescribeIPv6TranslatorsResponse.Ipv6Translators[" + i + "].CreateTime")); |
1,243,290 | Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoResponse nodesInfo, boolean includeBootstrapPlugins) {<NEW_LINE>DiscoveryNodes nodes = state.getState().nodes();<NEW_LINE>Table table = getTableWithHeader(req);<NEW_LINE>for (DiscoveryNode node : nodes) {<NEW_LINE>NodeInfo info = nodesInfo.getNodesM... | addCell(pluginInfo.getVersion()); |
1,412,701 | public static LogResult postLog(@NonNull final Geocache cache, @NonNull final LogType logType, @NonNull final Calendar date, @NonNull final String log, @Nullable final String logPassword, @NonNull final OCApiConnector connector, @NonNull final ReportProblemType reportProblem) {<NEW_LINE>final Parameters params = new Pa... | LogResult(StatusCode.LOG_POST_ERROR, ""); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.