idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
612,541 | public boolean onActivate(Level level, Player player, Block block, Block target, BlockFace face, double fx, double fy, double fz) {<NEW_LINE>if (Rail.isRailBlock(target)) {<NEW_LINE>Rail.Orientation type = ((BlockRail) target).getOrientation();<NEW_LINE>double adjacent = 0.0D;<NEW_LINE>if (type.isAscending()) {<NEW_LIN... | item.getCount() - 1); |
1,144,477 | protected void doApply(ApiRequest request, IPolicyContext context, IPListConfig config, IPolicyChain<ApiRequest> chain) {<NEW_LINE>String remoteAddr = getRemoteAddr(request, config);<NEW_LINE>if (isMatch(config, remoteAddr)) {<NEW_LINE>super.doApply(request, context, config, chain);<NEW_LINE>} else {<NEW_LINE>IPolicyFa... | context.getComponent(IPolicyFailureFactoryComponent.class); |
1,833,810 | private static void addBulkdataOptions(Options opts) {<NEW_LINE>OptionGroup group = new OptionGroup();<NEW_LINE>group.addOption(Option.builder("B").longOpt("no-bulkdata").desc(rb.getString("no-bulkdata")).build());<NEW_LINE>group.addOption(Option.builder("b").longOpt("with-bulkdata").desc(rb.getString("with-bulkdata"))... | "blk")).build()); |
649,976 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String job) throws Exception {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>if (!busi... | > readCompleteds = future_readCompleteds.get(); |
259,250 | public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) {<NEW_LINE>// ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_RENDERING,<NEW_LINE>// RenderingHints.VALUE_RENDER_QUALITY);<NEW_LINE>// TODO: change magic numbers to final fields<NEW_LINE>// match line color to default titledborde... | setColor(c.getBackground()); |
643,858 | public void validateDefinition() throws QuickFixException {<NEW_LINE>super.validateDefinition();<NEW_LINE>for (TokenDef def : tokens.values()) {<NEW_LINE>def.validateDefinition();<NEW_LINE>}<NEW_LINE>// tokens with providers are basically only expected to be used in isolation from other features<NEW_LINE>if (descriptor... | InvalidDefinitionException(msg, getLocation()); |
1,499,479 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_account_push_notifications);<NEW_LINE>final Intent intent = getIntent();<NEW_LINE>AccountJid account = getAccount(intent);<NEW_LINE>if (account == null) {<NEW_LINE>finish();<NEW_LI... | setNavigationIcon(R.drawable.ic_arrow_left_white_24dp); |
1,111,547 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>if (additionalProperties.containsKey(CURL_OPTIONS)) {<NEW_LINE>setCurlOptions(additionalProperties.get(CURL_OPTIONS).toString());<NEW_LINE>additionalProperties.<MASK><NEW_LINE>}<NEW_LINE>if (additionalProperties.containsKey(PROCESS_MARKDOWN)) {<NEW_LINE... | put("x-codegen-curl-options", this.curlOptions); |
1,507,040 | public Chart apply(@Nonnull final EntityResponse entityResponse) {<NEW_LINE>final Chart result = new Chart();<NEW_LINE>result.setUrn(entityResponse.getUrn().toString());<NEW_LINE>result.setType(EntityType.CHART);<NEW_LINE>EnvelopedAspectMap aspectMap = entityResponse.getAspects();<NEW_LINE>MappingHelper<Chart> mappingH... | mapToResult(EDITABLE_CHART_PROPERTIES_ASPECT_NAME, this::mapEditableChartProperties); |
1,798,758 | private void executeTask(@NotNull final PluginTaskExecution task) {<NEW_LINE>final PluginTaskOutput output = runTask(task);<NEW_LINE>// noinspection unchecked: generics extends a PluginTaskOutput<NEW_LINE>task.setOutputObject(output);<NEW_LINE>if (output.isAsync()) {<NEW_LINE>// handle async result<NEW_LINE>task.markAs... | > asyncFuture = output.getAsyncFuture(); |
443,393 | private void downloadAndReadItemFiles(@NonNull Map<RemoteFile, SettingsItemReader<? extends SettingsItem>> remoteFilesForRead, @NonNull Map<File, RemoteFile> remoteFilesForDownload) throws IOException {<NEW_LINE>OsmandApplication app = backupHelper.getApp();<NEW_LINE>List<FileDownloadTask> fileDownloadTasks = new Array... | "No temp item file: " + tempFile.getName()); |
373,753 | public String executeCustomFormLogin(HttpClient httpclient, String url, String username, String password, String viewState, String[] cookies) throws Exception {<NEW_LINE>String methodName = "executeCustomFormLogin";<NEW_LINE>Log.info(logClass, methodName, "Submitting custom login form (POST) = " + url + ", username = ... | new BasicNameValuePair("form:j_id_e", "Login")); |
1,336,413 | public static SceneGraphImageObject fromJSONObject(SceneGraphImage img, JSONObject obj) {<NEW_LINE>List<String> names = (List<String<MASK><NEW_LINE>List<JSONArray> labelArrays = (List<JSONArray>) obj.get("labels");<NEW_LINE>List<List<CoreLabel>> labelsList = null;<NEW_LINE>if (labelArrays != null) {<NEW_LINE>labelsList... | >) obj.get("names"); |
416,361 | private void executeOther(RouteResultset rrs) {<NEW_LINE>TraceManager.TraceObject traceObject = TraceManager.serviceTrace(shardingService, "execute-for-dml");<NEW_LINE>ExecutableHandler executableHandler = null;<NEW_LINE>try {<NEW_LINE>if (rrs.getNodes().length == 1 && !rrs.isEnableLoadDataFlag()) {<NEW_LINE>executable... | setPreExecuteEnd(TraceResult.SqlTraceType.SINGLE_NODE_QUERY); |
1,259,658 | public static <T extends Set<OffsetRange>> NodeVisitor<T> createMarkOccurrencesNodeVisitor(EditorFeatureContext context, T result, NodeType... nodeTypesToMatch) {<NEW_LINE>final Snapshot snapshot = context.getSnapshot();<NEW_LINE>int astCaretOffset = snapshot.getEmbeddedOffset(context.getCaretOffset());<NEW_LINE>if (as... | (Arrays.asList(nodeTypesToMatch)); |
845,241 | public Object execute(ExecutionEvent event) throws ExecutionException {<NEW_LINE>IWorkbenchWindow <MASK><NEW_LINE>IWorkbenchPage page = window.getActivePage();<NEW_LINE>if (page != null) {<NEW_LINE>IEditorPart part = HandlerUtil.getActiveEditor(event);<NEW_LINE>if (part != null) {<NEW_LINE>page.activate(part);<NEW_LINE... | window = HandlerUtil.getActiveWorkbenchWindowChecked(event); |
539,828 | private static void tryAssertion2StreamRangeCoercion(RegressionEnvironment env, AtomicInteger milestone, String epl, boolean isHasRangeReversal) {<NEW_LINE>env.compileDeployAddListenerMile(epl, "s0", milestone.getAndIncrement());<NEW_LINE>env.sendEventBean(new SupportBean_ST0("ST01", 10L));<NEW_LINE>env.sendEventBean(<... | new SupportBean_ST1("ST11", 20L)); |
382,185 | public void evaluateCondition(Metadata metadata, Index index, Listener listener, TimeValue masterTimeout) {<NEW_LINE>IndicesStatsRequest request = new IndicesStatsRequest();<NEW_LINE>request.clear();<NEW_LINE>String indexName = index.getName();<NEW_LINE>request.indices(indexName);<NEW_LINE>getClient().admin().indices()... | l.source()))); |
715,734 | public okhttp3.Call readNamespacedDeploymentStatusCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/apps/v1/namespaces/{namespace}/deployments/{nam... | = new String[] { "BearerToken" }; |
1,462,367 | public List<Number> GetOutputState(@Options(NxtMotorPort.class) String motorPortLetter) {<NEW_LINE>String functionName = "GetOutputState";<NEW_LINE>if (!checkBluetooth(functionName)) {<NEW_LINE>return new ArrayList<Number>();<NEW_LINE>}<NEW_LINE>// Make sure motorPortLetter is a valid NxtMotorPort.<NEW_LINE>NxtMotorPor... | (getSBYTEValueFromBytes(returnPackage, 4)); |
1,630,508 | public boolean triggerEvent(int id, int param) {<NEW_LINE>switch(id) {<NEW_LINE>case SET_KEEP_TICKS_EVENT:<NEW_LINE>recipeKeepTicks = param;<NEW_LINE>return true;<NEW_LINE>case SET_COOLDOWN_EVENT:<NEW_LINE>cooldown = param;<NEW_LINE>return true;<NEW_LINE>case CRAFT_EFFECT_EVENT:<NEW_LINE>{<NEW_LINE>if (level.isClientSi... | BLOCKS, 1F, 1F, false); |
1,821,380 | public ListRulesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListRulesResult listRulesResult = new ListRulesResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = conte... | int originalDepth = context.getCurrentDepth(); |
1,777,163 | protected void addPackageList(Content contentTree) throws IOException {<NEW_LINE>Content table = HtmlTree.TABLE(HtmlStyle.useSummary, 0, 3, 0, useTableSummary, getTableCaption(configuration.getResource("doclet.ClassUse_Packages.that.use.0", getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, cla... | tr.addStyle(HtmlStyle.rowColor); |
1,394,957 | public Key decode(BsonReader reader, DecoderContext decoderContext) {<NEW_LINE>reader.readStartDocument();<NEW_LINE>final String ref = reader.readString("$ref");<NEW_LINE>reader.readName();<NEW_LINE>final BsonReaderMark mark = reader.getMark();<NEW_LINE>Object idValue = null;<NEW_LINE>EntityModel model = null;<NEW_LINE... | ).decode(reader, decoderContext); |
1,653,046 | private void applyComponentChanges(Module context, EntityData.Prefab prefabData, PrefabData result) {<NEW_LINE>for (String removedComponent : prefabData.getRemovedComponentList()) {<NEW_LINE>ComponentMetadata<?> metadata = componentLibrary.resolve(removedComponent, context);<NEW_LINE>if (metadata != null) {<NEW_LINE>re... | componentSerializer.deserialize(componentData, context); |
1,745,136 | final ListSamplesResult executeListSamples(ListSamplesRequest listSamplesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSamplesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,241,714 | public PhpType complete(String s, Project project) {<NEW_LINE>int <MASK><NEW_LINE>if (endIndex == -1) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String originalSignature = s.substring(0, endIndex);<NEW_LINE>String parameter = s.substring(endIndex + 1);<NEW_LINE>parameter = PhpTypeProviderUtil.getResolvedParameter(PhpI... | endIndex = s.lastIndexOf(TRIM_KEY); |
372,562 | private void updatePosition(Drawing drawing) {<NEW_LINE>double size = SIZE / drawing.getScale();<NEW_LINE>double halfSize = size / 2d;<NEW_LINE>double arcSize = ARC_SIZE / drawing.getScale();<NEW_LINE>double margin = MARGIN / drawing.getScale();<NEW_LINE>this.shape.setRoundRect(0, 0, size, size, arcSize, arcSize);<NEW_... | () / 2d, -margin); |
1,430,556 | public boolean next() {<NEW_LINE>if (lastParsedPos == tail) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (mapIter != null) {<NEW_LINE>if (mapIter.hasNext()) {<NEW_LINE>Map.Entry<String, Any> entry = mapIter.next();<NEW_LINE>key = entry.getKey();<NEW_LINE>value = entry.getValue();<NEW_LINE>return true;<NEW_LINE>} els... | lastParsedPos = CodegenAccess.head(iter); |
1,564,584 | // Calibration for one option. Distribute the calculation according to the type of volatility (Black/Normal)<NEW_LINE>private Pair<Double, Double> calibrationAtm(double forward, double shift, double beta, double rho, double nu, BusinessDayAdjustment bda, ZonedDateTime calibrationDateTime, DayCount dayCount, Period expi... | pow(forward + shift, beta); |
1,296,551 | public List<Pair<ExecutionReference, ExecutableFlow>> handle(final ResultSet rs) throws SQLException {<NEW_LINE>if (!rs.next()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>final List<Pair<ExecutionReference, ExecutableFlow>> execFlows = new ArrayList<>();<NEW_LINE>do {<NEW_LINE>final int id = rs.getI... | SQLException("Error retrieving flow data " + id, e); |
138,007 | public void testSSLRedirectGet(String url, String user, String password, String secureUrl, LibertyServer server) throws Exception {<NEW_LINE>String methodName = "testSSLRedirectGet";<NEW_LINE>Log.info(thisClass, methodName, "url = " + url + ", user = " + user + ", password = " + password);<NEW_LINE>DefaultHttpClient ht... | thisClass, methodName, "Access https port directly, secureUrl: " + secureUrl); |
1,166,425 | private static synchronized void startLogging(final AgentBuilder.RedefinitionStrategy redefinitionStrategy, final Instrumentation instrumentation, final EnumMap<ConfigOption, String> configOptions) {<NEW_LINE>if (null != logTransformer) {<NEW_LINE>throw new IllegalStateException("agent already instrumented");<NEW_LINE>... | , configOptions.get(DISABLED_CLUSTER_EVENT_CODES)); |
1,523,867 | public void paint(GGlassPane glassPane, Graphics g) {<NEW_LINE>Rectangle defaultBounds = component.getBounds();<NEW_LINE>int width = (int) (defaultBounds.width * emphasis);<NEW_LINE>int height = (int) (defaultBounds.height * emphasis);<NEW_LINE>Rectangle emphasizedBounds = new Rectangle(defaultBounds.x, defaultBounds.y... | offsetY, width, height, null); |
1,460,690 | // --------------------------------------------<NEW_LINE>@Metadata(description = "Constructs an n-point circle from a 2-point line giving the radius")<NEW_LINE>public static Geometry circleByRadiusLine(Geometry radiusLine, @Metadata(title = "Number of vertices") int nPts) {<NEW_LINE>Coordinate[] radiusPts = radiusLine.... | sin(angStart + i * angInc); |
752,556 | public static void convert(GrayS8 input, GrayI16 output) {<NEW_LINE>if (input.isSubimage() || output.isSubimage()) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW_LINE>int indexSrc = input.getIndex(0, y);<NEW_LINE>int indexDst = output... | input.data[indexSrc++]); |
961,545 | protected <I extends RemoteExternalSystemService<S>, C extends I> I createService(@Nonnull Class<I> interfaceClass, @Nonnull final C impl) throws ClassNotFoundException, IllegalAccessException, InstantiationException, RemoteException {<NEW_LINE>if (!myStdOutputConfigured) {<NEW_LINE>myStdOutputConfigured = true;<NEW_LI... | new LineAwarePrintStream(System.err)); |
514,397 | private DoubleMatrix[] solveSensitivity(double[] xValues, double[] yValues) {<NEW_LINE>int nDataPts = xValues.length;<NEW_LINE>DoubleMatrix[] res = new DoubleMatrix[nDataPts];<NEW_LINE>double[][] coef = new double[nDataPts - 1][2];<NEW_LINE>for (int i = 0; i < nDataPts - 1; ++i) {<NEW_LINE>double[][] coefSensi = new do... | [1][i] = 1d; |
1,705,490 | public void uploadPagesFromUrlWithResponseCodeSnippet() {<NEW_LINE>// BEGIN: com.azure.storage.blob.specialized.PageBlobAsyncClient.uploadPagesFromUrlWithResponse#PageRange-String-Long-byte-PageBlobRequestConditions-BlobRequestConditions<NEW_LINE>PageRange pageRange = new PageRange().setStart<MASK><NEW_LINE>InputStream... | (0).setEnd(511); |
718,783 | public void propertyChange(PropertyChangeEvent evt) {<NEW_LINE>if (evt.getPropertyName().equals(IssueImpl.EVENT_ISSUE_DATA_CHANGED)) {<NEW_LINE>setVisible(repoPanel, false);<NEW_LINE>setNameAndTooltip();<NEW_LINE>} else if (evt.getPropertyName().equals(RepositoryRegistry.EVENT_REPOSITORIES_CHANGED)) {<NEW_LINE>if (!rep... | Object o = evt.getNewValue(); |
1,467,478 | public void run() {<NEW_LINE>super.run();<NEW_LINE>if (parent.isDirty()) {<NEW_LINE>try {<NEW_LINE>Object value = parent.extractEditorValue();<NEW_LINE>if (value instanceof Date) {<NEW_LINE>editor.setValue((Date) value);<NEW_LINE>}<NEW_LINE>} catch (DBException e) {<NEW_LINE>DBWorkbench.getPlatformUI().showError(Result... | parent.textMode.setChecked(true); |
989,249 | public static final String doubleToString(double d) {<NEW_LINE>// Check for special cases<NEW_LINE>if (MathUtil.equals(d, 0))<NEW_LINE>return "0";<NEW_LINE>if (Double.isNaN(d))<NEW_LINE>return "NaN";<NEW_LINE>if (Double.isInfinite(d)) {<NEW_LINE>if (d < 0)<NEW_LINE>return "-Inf";<NEW_LINE>else<NEW_LINE>return "Inf";<NE... | abs = Math.abs(d); |
646,303 | public void traceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer) {<NEW_LINE>// While it's not strictly speaking 2 blocks, we can model it as the statement / definition<NEW_LINE>// section of the for as being an enclosing block. (otherwise we add the variable in the wrong scope).<NEW_LINE>scopeDiscoverer.ente... | scopeDiscoverer.processOp04Statement(getBody()); |
1,660,279 | private HeaderInfo addHeader(String id, String title, AERunnable runnable) {<NEW_LINE>Composite composite = new Composite(topArea, SWT.NONE);<NEW_LINE>HeaderInfo headerInfo = new HeaderInfo(id, runnable, composite);<NEW_LINE>FillLayout fillLayout = new FillLayout();<NEW_LINE>fillLayout.marginWidth = 6;<NEW_LINE>fillLay... | Messages.setLanguageText(control, title); |
312,866 | /*<NEW_LINE>* API to insert row in table<NEW_LINE>* */<NEW_LINE>public static void tableInsertRows(GCPResourceClient gcpResourceClient, Map<String, Object> rowContent) {<NEW_LINE>try {<NEW_LINE>// Initialize client that will be used to send requests. This client only needs to be created<NEW_LINE>// once, and can be reu... | "Bigquery row insert response error: " + entry.getValue()); |
782,534 | public Prel prepareForLateralUnnestPipeline(List<RelNode> children) {<NEW_LINE>List<Integer> groupingCols = Lists.newArrayList();<NEW_LINE>groupingCols.add(0);<NEW_LINE>for (int groupingCol : groupSet.asList()) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>ImmutableBitSet groupingSet = ImmutableBitSet.of(groupingCols);<NEW_LIN... | groupingCols.add(groupingCol + 1); |
887,122 | public void windowClosed(WindowEvent e) {<NEW_LINE>Preferences prefs = NbPreferences.forModule(org.netbeans.modules.project.uiapi.CustomizerDialog.class);<NEW_LINE>prefs.putInt(CUSTOMIZER_DIALOG_X, e.getWindow().getX());<NEW_LINE>prefs.putInt(CUSTOMIZER_DIALOG_Y, e.getWindow().getY());<NEW_LINE>prefs.putInt(CUSTOMIZER_... | getWindow().getWidth()); |
430,961 | private Optional<StyleInfo> determineStyle() {<NEW_LINE>if (declaringType().isPresent()) {<NEW_LINE>DeclaringType type = declaringType().get();<NEW_LINE>Optional<DeclaringType> enclosing = type.enclosingOf();<NEW_LINE>if (enclosing.isPresent()) {<NEW_LINE>Optional<StyleInfo> enclosingStyle = enclosing<MASK><NEW_LINE>if... | .get().style(); |
1,351,436 | final GetCommentResult executeGetComment(GetCommentRequest getCommentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCommentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
704,464 | @UnitOfWork<NEW_LINE>@ApiOperation(value = "Mark feed entries", notes = "Mark feed entries as read (unread is not supported)")<NEW_LINE>@Timed<NEW_LINE>public Response markFeedEntries(@ApiParam(hidden = true) @SecurityCheck User user, @ApiParam(value = "Mark request", required = true) MarkRequest req) {<NEW_LINE>Precon... | Date(req.getOlderThan()); |
124,104 | protected Pair<List<LogicalProcessor>, List<PhysicalProcessor>> initProcessorCounts() {<NEW_LINE>int logicalProcessorCount = SysctlUtil.sysctl("hw.logicalcpu", 1);<NEW_LINE>int physicalProcessorCount = <MASK><NEW_LINE>int physicalPackageCount = SysctlUtil.sysctl("hw.packages", 1);<NEW_LINE>List<LogicalProcessor> logPro... | SysctlUtil.sysctl("hw.physicalcpu", 1); |
658,101 | public static int longestSubarrayWithDistinctEntries(List<Integer> A) {<NEW_LINE>// Records the most recent occurrences of each entry.<NEW_LINE>Map<Integer, Integer> mostRecentOccurrence = new HashMap<>();<NEW_LINE>int longestDupFreeSubarrayStartIdx = 0, result = 0;<NEW_LINE>for (int i = 0; i < A.size(); ++i) {<NEW_LIN... | A.size() - longestDupFreeSubarrayStartIdx); |
1,825,400 | void update(int pollResponseStatusCode, HttpHeaders pollResponseHeaders, String pollResponseBody) {<NEW_LINE>if (pollResponseStatusCode == 202) {<NEW_LINE>try {<NEW_LINE>this.provisioningState = ProvisioningState.IN_PROGRESS;<NEW_LINE>final URL locationUrl = <MASK><NEW_LINE>if (locationUrl != null) {<NEW_LINE>this.poll... | Util.getLocationUrl(pollResponseHeaders, logger); |
1,027,050 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>getSerializedSize();<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>output.writeSInt32(2, dx_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>output.writeSInt32(3, ... | , categories_.get(i)); |
798,383 | public void read(org.apache.thrift.protocol.TProtocol iprot, shutdown_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org... | skip(iprot, schemeField.type); |
359,413 | public com.amazonaws.services.wafv2.model.WAFNonexistentItemException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.wafv2.model.WAFNonexistentItemException wAFNonexistentItemException = new com.amazonaws.services.wafv2.model.WAFNonexistentItemException(null);<... | int originalDepth = context.getCurrentDepth(); |
1,668,108 | public GridBoundsChange performAction(GridManager gridManager, DesignerContext context) {<NEW_LINE>GridInfoProvider gridInfo = gridManager.getGridInfo();<NEW_LINE>boolean gapSupport = gridInfo.hasGaps();<NEW_LINE>int[] originalColumnBounds = gridInfo.getColumnBounds();<NEW_LINE>int[] originalRowBounds = gridInfo.getRow... | + 1] = oldColumnBounds[column]; |
761,410 | private void buildPrepParams(TDSWriter tdsWriter) throws SQLServerException {<NEW_LINE>if (getStatementLogger().isLoggable(java.util.logging.Level.FINE))<NEW_LINE>getStatementLogger().fine(toString() + ": calling sp_prepare: PreparedHandle:" + getPreparedStatementHandle() + ", SQL:" + preparedSQL);<NEW_LINE>expectPrepS... | writeRPCInt(null, 1, false); |
332,560 | private HollowHistoricalStateKeyOrdinalMapping createKeyOrdinalMappingFromDelta() {<NEW_LINE>HollowHistoricalStateKeyOrdinalMapping keyOrdinalMapping = new HollowHistoricalStateKeyOrdinalMapping(keyIndex);<NEW_LINE>for (String keyType : keyIndex.getTypeKeyIndexes().keySet()) {<NEW_LINE>HollowHistoricalStateTypeKeyOrdin... | ), removalIterator.countTotal()); |
1,820,402 | final UpdateMemberResult executeUpdateMember(UpdateMemberRequest updateMemberRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateMemberRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,782,940 | private void initComponents() {<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>previewPanel = new JPanel(new FlowLayout(0, 0, FlowLayout.LEADING));<NEW_LINE>previewPanel.setBorder(BorderFactory.createEmptyBorder(4<MASK><NEW_LINE>label = new JLabel();<NEW_LINE>label.setBorder(BorderFactory.createCompoundBorder(BorderF... | , 7, 2, 7)); |
689,990 | protected void initShards() {<NEW_LINE>if (getStrategyNullable() == null || !getStrategyNullable().isShardingByDb()) {<NEW_LINE>// Init with no shard support<NEW_LINE>for (DataBase db : databases.values()) {<NEW_LINE>if (db.isMaster())<NEW_LINE>masterDbs.add(db);<NEW_LINE>else<NEW_LINE>slaveDbs.add(db);<NEW_LINE>}<NEW_... | = new ArrayList<DataBase>(); |
580,471 | void validateAffectedFolds(Fold fold, DocumentEvent evt, Collection damaged) {<NEW_LINE>int startOffset = evt.getOffset();<NEW_LINE>int endOffset = startOffset + evt.getLength();<NEW_LINE>int childIndex = FoldUtilitiesImpl.findFoldStartIndex(fold, startOffset, true);<NEW_LINE>if (childIndex == -1) {<NEW_LINE>if (fold.g... | childFold = fold.getFold(childIndex); |
329,594 | private // and that our WSJdbcConnection properties are in sync with the underlying PostgreSQL connection's properties<NEW_LINE>void verifyClean(Connection con) throws Exception {<NEW_LINE>// Verify WSJdbcConnection values are all at the proper initial state<NEW_LINE>assertTrue("Default auto-commit value on a connectio... | (con).getTransactionIsolation()); |
1,606,712 | public PathSet paths(Id sourceV, Directions sourceDir, Id targetV, Directions targetDir, String label, int depth, long degree, long capacity, long limit) {<NEW_LINE>E.checkNotNull(sourceV, "source vertex id");<NEW_LINE>E.checkNotNull(targetV, "target vertex id");<NEW_LINE>this.checkVertexExist(sourceV, "source vertex")... | labelId, degree, capacity, limit); |
100,768 | public Result authenticate() {<NEW_LINE>// TODO: Call getAuthenticatedUser and then generate a session cookie for the UI if the user is authenticated.<NEW_LINE>final Optional<String> maybeRedirectPath = Optional.ofNullable(ctx().request().getQueryString(AUTH_REDIRECT_URI_PARAM));<NEW_LINE>final String <MASK><NEW_LINE>i... | redirectPath = maybeRedirectPath.orElse("/"); |
798,982 | boolean createFeatures3D(SceneWorkingGraph graph) {<NEW_LINE>int filtered = 0;<NEW_LINE>int total = 0;<NEW_LINE>// For each view, with a set inliers, create a set of triangulated 3D point features<NEW_LINE>for (int workingIdx = 0; workingIdx < graph.listViews.size(); workingIdx++) {<NEW_LINE>SceneWorkingGraph.View wvie... | inliers.getInlierCount() + " , "); |
1,118,625 | default void toJson(CharSink sink) {<NEW_LINE>sink.put('{');<NEW_LINE>sink.putQuoted("columnCount").put(':'<MASK><NEW_LINE>sink.put(',');<NEW_LINE>sink.putQuoted("columns").put(':');<NEW_LINE>sink.put('[');<NEW_LINE>for (int i = 0, n = getColumnCount(); i < n; i++) {<NEW_LINE>final int type = getColumnType(i);<NEW_LINE... | ).put(getColumnCount()); |
121,141 | private void init() {<NEW_LINE>// Add Header<NEW_LINE>GoogleNowBirthHeader header = new GoogleNowBirthHeader(getContext(<MASK><NEW_LINE>header.setButtonExpandVisible(true);<NEW_LINE>header.mName = "Gabriele Mariotti";<NEW_LINE>header.mSubName = "Birthday today";<NEW_LINE>addCardHeader(header);<NEW_LINE>// Add Expand Ar... | ), R.layout.carddemo_googlenowbirth_inner_header); |
1,313,865 | Long[] findTaskIds(long partition, TaskState state, boolean inState, Long minId, Integer maxResults) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (config.missedTaskThreshold != -1)<NEW_LINE>// should be unreachable<NEW_LINE>throw new UnsupportedOperationException();<NEW_LINE>Long[] results = null;<NEW_LINE>Transactio... | Config config = configRef.get(); |
570,805 | protected void rename(String oldName, String newName) throws IOException {<NEW_LINE>File of = getFile(oldName);<NEW_LINE>File nf = getFile(newName);<NEW_LINE>Random rndm = null;<NEW_LINE>for (int retry = 0; ; retry++) {<NEW_LINE>// #7086 - (nf.exists() && !nf.equals(of)) instead of nf.exists() - fix for Win32<NEW_LINE>... | [] { retry, msg }); |
1,222,537 | protected void reapplyRowWidths() {<NEW_LINE>double rowWidth = columnConfiguration.calculateRowWidth();<NEW_LINE>if (rowWidth < 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>while (row != null) {<NEW_LINE>// IF there is a rounding error when summing the columns, we<NEW_LINE>// need to round the tr width up ... | Element row = root.getFirstChildElement(); |
1,818,777 | public static boolean scrollToVisible(JViewport viewport, Rectangle fieldArea) {<NEW_LINE>Rectangle viewArea = viewport.getViewRect();<NEW_LINE>if (viewArea.contains(fieldArea)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Point pos = new Point();<NEW_LINE>pos.x = viewArea.x;<NEW_LINE>if (fieldArea.x + fieldArea.width ... | .getWidth() - viewArea.width; |
682,798 | public void handleInsert(InsertionContext context) {<NEW_LINE>final LookupElement delegate = getDelegate();<NEW_LINE>final TailType tailType = computeTailType(context);<NEW_LINE>final LookupItem lookupItem = delegate.as(LookupItem.CLASS_CONDITION_KEY);<NEW_LINE>if (lookupItem != null && tailType != null) {<NEW_LINE><MA... | lookupItem.setTailType(TailType.UNKNOWN); |
882,119 | public static QueryTransferInListResponse unmarshall(QueryTransferInListResponse queryTransferInListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryTransferInListResponse.setRequestId(_ctx.stringValue("QueryTransferInListResponse.RequestId"));<NEW_LINE>queryTransferInListResponse.setTotalItemNum(_ctx.integerValue("... | ("QueryTransferInListResponse.Data[" + i + "].InstanceId")); |
740,016 | private PoiTypeResult checkPoiType(NameStringMatcher nm, AbstractPoiType pf) {<NEW_LINE>PoiTypeResult res = null;<NEW_LINE>if (nm.matches(pf.getTranslation())) {<NEW_LINE>res = addIfMatch(nm, pf.<MASK><NEW_LINE>}<NEW_LINE>if (nm.matches(pf.getEnTranslation())) {<NEW_LINE>res = addIfMatch(nm, pf.getEnTranslation(), pf, ... | getTranslation(), pf, res); |
28,671 | public void controlChanged(final Object source) {<NEW_LINE>if (source == spinnerDescRadius) {<NEW_LINE>configKlt.templateRadius = ((Number) spinnerDescRadius.getValue()).intValue();<NEW_LINE>} else if (source == spinnerMaxTracks) {<NEW_LINE>configKlt.maximumTracks.setTo(spinnerMaxTracks.getValue());<NEW_LINE>} else if ... | .pruneClose = checkPruneClose.isSelected(); |
1,348,944 | private Component createRangeListPanel() {<NEW_LINE>addRangeButton = new JButton(ADD_ICON);<NEW_LINE>addRangeButton.addActionListener(new ActionListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent e) {<NEW_LINE>showAddRangeDialog();<NEW_LINE>}<NEW_LINE>});<NEW_LINE>addRangeButton.s... | new JPanel(new BorderLayout()); |
1,176,263 | public DescribeVirtualGatewaysResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeVirtualGatewaysResult describeVirtualGatewaysResult = new DescribeVirtualGatewaysResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth... | String currentParentElement = context.getCurrentParentElement(); |
1,536,574 | private void init() {<NEW_LINE>// Set up profile array list<NEW_LINE>profileList = new ArrayList<EMMLProfile>();<NEW_LINE>// Setup the httpEquiv splitter<NEW_LINE><MASK><NEW_LINE>// Setup the url extractor<NEW_LINE>// urlMatcher = Pattern.compile("\\s*(url[(]'(.*)'\\s*(.*)\\s*[)];)\\s*").matcher("");<NEW_LINE>// urlMat... | ctSplitter = Pattern.compile("\\s*-\\s*"); |
1,265,929 | public boolean onPreferenceClick(Preference preference) {<NEW_LINE>if (preference == mRelatedPostsPref) {<NEW_LINE>showRelatedPostsDialog();<NEW_LINE>} else if (preference == mMultipleLinksPref) {<NEW_LINE>showMultipleLinksDialog();<NEW_LINE>} else if (preference == mModerationHoldPref) {<NEW_LINE>mEditingList = mSiteS... | site_settings_denylist_title, R.string.site_settings_denylist_description); |
1,564,154 | private void dispose() {<NEW_LINE>if (!initialized) {<NEW_LINE>// The RubyContext will be finalized and disposed if patching fails (potentially for<NEW_LINE>// another language). In that case, there is nothing to clean or execute.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (consoleHolder != null) {<NEW_LINE>consoleHolder.... | language.ropeCache.getRopesReusedCount()); |
209,853 | public void handleEvent(Event event) {<NEW_LINE>if (hoveredItem == null || hoveredItem.isDisposed())<NEW_LINE>return;<NEW_LINE>if (eyeball != null) {<NEW_LINE>int endOfClientAreaX = tree.getClientArea().width + tree.getClientArea().x;<NEW_LINE>int endOfItemX = hoveredItem.getBounds().width + hoveredItem.getBounds().x;<... | eyeball.getBounds().width); |
339,757 | final DeleteWorkspaceResult executeDeleteWorkspace(DeleteWorkspaceRequest deleteWorkspaceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteWorkspaceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,291,926 | protected String doIt() throws Exception {<NEW_LINE>// Instance current Payment Selection<NEW_LINE>MPaySelection paySelection = new MPaySelection(getCtx(), getRecord_ID(), get_TrxName());<NEW_LINE>sequence.set(paySelection.getLastLineNo());<NEW_LINE>// Loop for keys<NEW_LINE>getSelectionKeys().forEach(key -> {<NEW_LINE... | .getAndAdd(10), paymentRule); |
1,309,315 | /*<NEW_LINE>private double clamp(double d){<NEW_LINE>double abs = Math.abs(d);<NEW_LINE>if ( Math.abs(abs-Math.round(abs)) < 0.001){<NEW_LINE>return Math.round(d);<NEW_LINE>}<NEW_LINE>return d;<NEW_LINE>}<NEW_LINE>private float clamp(float d){<NEW_LINE>float <MASK><NEW_LINE>if ( Math.abs(abs-Math.round(abs)) < 0.001){<... | abs = Math.abs(d); |
299,036 | public static GetOwnerApplyOrderDetailResponse unmarshall(GetOwnerApplyOrderDetailResponse getOwnerApplyOrderDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>getOwnerApplyOrderDetailResponse.setRequestId(_ctx.stringValue("GetOwnerApplyOrderDetailResponse.RequestId"));<NEW_LINE>getOwnerApplyOrderDetailResponse.setSu... | + "].ResourceDetail.OwnerIds[" + j + "]")); |
25,818 | private void writeClass() {<NEW_LINE>if (writingAssocBean) {<NEW_LINE>writer.append("/**").eol();<NEW_LINE>writer.append(" * Association query bean for %s.", shortName).eol();<NEW_LINE>writer.append(" * ").eol();<NEW_LINE>writer.append(" * THIS IS A GENERATED OBJECT, DO NOT MODIFY THIS CLASS.").eol();<NEW_LINE>writer.a... | append(" */").eol(); |
131,211 | public static LoadBalancerListenerInventory valueOf(LoadBalancerListenerVO vo) {<NEW_LINE>LoadBalancerListenerInventory inv = new LoadBalancerListenerInventory();<NEW_LINE>inv.setUuid(vo.getUuid());<NEW_LINE>inv.setLoadBalancerUuid(vo.getLoadBalancerUuid());<NEW_LINE>inv.setCreateDate(vo.getCreateDate());<NEW_LINE>inv.... | setLastOpDate(serverGroupVmNicRefVO.getLastOpDate()); |
327,770 | private ConfigDelta computeDelta(ConfigElement oldConfig, ConfigElement newConfig, RegistryEntry registryEntry, Map<String, DeltaType> variableDelta) throws ConfigMergeException {<NEW_LINE>ConfigElement oldElement = (oldConfig == null || !oldConfig.isEnabled()) ? null : oldConfig;<NEW_LINE>ConfigElement newElement = (n... | newNestedConfiguration = buildConfiguration(newElement, registryEntry); |
579,990 | private void fillUp() {<NEW_LINE>List<NodeHandler> connectNodes = new ArrayList<>();<NEW_LINE>Set<InetAddress> addressInUse = new HashSet<>();<NEW_LINE>Set<String> nodesInUse = new HashSet<>();<NEW_LINE>channelManager.getActivePeers().forEach(channel -> {<NEW_LINE>nodesInUse.add(channel.getPeerId());<NEW_LINE>addressIn... | add(channel.getInetAddress()); |
1,583,515 | private Contentlet runCheckinPublishNoWorkflow(final String resourceUri, final User user, final boolean isAutoPub, final boolean disableWorkflow, Contentlet fileAsset) throws DotDataException, DotSecurityException {<NEW_LINE>fileAsset.setBoolProperty(Contentlet.DISABLE_WORKFLOW, disableWorkflow);<NEW_LINE>fileAsset = c... | ), currentDate.getTime()); |
1,366,490 | private void showConfigPanelForCustomizer(WebModule webModule) {<NEW_LINE>Project enclosingProject = Util.getEnclosingProjectFromWebModule(webModule);<NEW_LINE>HibernateEnvironment he = enclosingProject.getLookup().lookup(HibernateEnvironment.class);<NEW_LINE>List<FileObject> configFileObjects = he.getAllHibernateConfi... | HibernateCfgDataObject) DataObject.find(configFile); |
1,049,153 | public DataSet<Row> buildIndex(BatchOperator in, Params params) {<NEW_LINE>Preconditions.checkArgument(params.get(VectorApproxNearestNeighborTrainParams.METRIC).equals(VectorApproxNearestNeighborTrainParams.Metric.EUCLIDEAN), "KDTree solver only supports Euclidean distance!");<NEW_LINE>EuclideanDistance distance = new ... | withBroadcastSet(statistics.f1, "vectorSize"); |
1,388,312 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,644,992 | public void enterS_interface(S_interfaceContext ctx) {<NEW_LINE>String nameAlpha = ctx.iname.name_prefix_alpha.getText();<NEW_LINE>String canonicalNamePrefix;<NEW_LINE>try {<NEW_LINE>canonicalNamePrefix = AsaConfiguration.getCanonicalInterfaceNamePrefix(nameAlpha);<NEW_LINE>} catch (BatfishException e) {<NEW_LINE>warn(... | = namePrefix.toString() + i; |
1,637,247 | private void runLayoutCodeProcess(final Runnable readAction, final Runnable writeAction) {<NEW_LINE>final ProgressWindow progressWindow = new ProgressWindow(true, myProject);<NEW_LINE>progressWindow.setTitle(myCommandName);<NEW_LINE>progressWindow.setText(myProgressText);<NEW_LINE>final <MASK><NEW_LINE>final Runnable p... | ModalityState modalityState = ModalityState.current(); |
343,500 | public static void consumeRecipes(Consumer<FillingRecipe> consumer, IIngredientManager ingredientManager) {<NEW_LINE>Collection<FluidStack> fluidStacks = ingredientManager.getAllIngredients(VanillaTypes.FLUID);<NEW_LINE>for (ItemStack stack : ingredientManager.getAllIngredients(VanillaTypes.ITEM)) {<NEW_LINE>if (stack.... | .getFluid().getRegistryName(); |
1,740,722 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {<NEW_LINE>if (holder instanceof MapMarkersGroupHeaderViewHolder) {<NEW_LINE>MapMarkersGroupHeaderViewHolder markersGroupHeaderViewHolder = (MapMarkersGroupHeaderViewHolder) holder;<NEW_LINE>markersGroupHeaderViewHolder.title.setText(app.getText... | .ic_action_folder, color | 0xff000000)); |
647,073 | public String changeMyselfPassword(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, String oldpassword, String password, String repassword, String encoding, HttpServletRequest request, HttpServletResponse response, ModelMap model) {<NEW_LINE>SysUser user = service.getEntity(admin.getId());<NEW_LINE>Stri... | addAttribute(CommonConstants.MESSAGE, "message.needReLogin"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.