idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
959,951 | private void swap(RouteChange routeChange) {<NEW_LINE>final Scoop currentScoop = getActiveScoop(routeChange);<NEW_LINE>final ScreenSwap screenSwap = routeChange.toScreenSwap();<NEW_LINE>Screen previousScreen = screenSwap.previous;<NEW_LINE>Screen nextScreen = screenSwap.next;<NEW_LINE>final View prevView = active;<NEW_... | getTransition(nextViewController, screenSwap.direction); |
1,481,562 | private void applyOffsetToBiomes(IntArrayTag biomes, Point3i offset) {<NEW_LINE>if (biomes == null || biomes.getValue() == null || biomes.getValue().length != 1536) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int[] biomesArray = biomes.getValue();<NEW_LINE>int[] newBiomes = new int[1536];<NEW_LINE>for (int x = 0; x < 4; x++... | 16 + z * 4 + x]; |
76,526 | public Sql createAddColumnSql(Entity<?> en, MappingField mf) {<NEW_LINE>StringBuilder sb = new StringBuilder("ALTER TABLE ");<NEW_LINE>sb.append(en.getTableName()).append(" ADD ");<NEW_LINE>if (addColumnNeedColumn())<NEW_LINE>sb.append("COLUMN ");<NEW_LINE>sb.append(mf.getColumnNameInSql()).append(" ").append(evalField... | .replaceAll("@", "@@")); |
1,547,478 | final CreateSiteToSiteVpnAttachmentResult executeCreateSiteToSiteVpnAttachment(CreateSiteToSiteVpnAttachmentRequest createSiteToSiteVpnAttachmentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createSiteToSiteVpnAttachmentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | addHandlerContext(HandlerContextKey.SERVICE_ID, "NetworkManager"); |
548,307 | private PatResult strictMatch(String whole, String substr, Pattern pat) {<NEW_LINE>boolean strictLeft = substr.length() > 0 && WORD_CHAR.matcher(String.valueOf(substr.charAt(0))).matches();<NEW_LINE>boolean strictRight = substr.length() > 0 && WORD_CHAR.matcher(String.valueOf(substr.charAt(substr.length() - 1))).matche... | -1, -1, null); |
9,986 | public static ExpressionParsingState composeNegationExpression(final ExpressionParsingState state, final int nodeIndex) {<NEW_LINE>// Returning "state" means "try next in chain" or "success"<NEW_LINE>// Returning "null" means parsing error<NEW_LINE>final String input = state.get(nodeIndex).getInput();<NEW_LINE>if (Stri... | operatorPos = trimmedInput.lastIndexOf(OPERATOR_2); |
397,720 | protected void buttonPressed(int buttonId) {<NEW_LINE>if (buttonId == 0) {<NEW_LINE>response = JsonNodeFactory.instance.objectNode();<NEW_LINE>Iterator<String> iterator = userInput.fieldNames();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>String fieldName = iterator.next();<NEW_LINE>JsonNode value = userInput.path(f... | (VALUE).asText()); |
1,319,782 | public void read(org.apache.thrift.protocol.TProtocol prot, JavaObject struct) throws org.apache.thrift.TException {<NEW_LINE>TTupleProtocol iprot = (TTupleProtocol) prot;<NEW_LINE>struct<MASK><NEW_LINE>struct.set_full_class_name_isSet(true);<NEW_LINE>{<NEW_LINE>org.apache.thrift.protocol.TList _list5 = new org.apache.... | .full_class_name = iprot.readString(); |
1,493,274 | public <T> List<T> fetchEntitiesWithPropertiesAndOrder(Class<T> c, Property whereOrder, int order, Property[] properties, Object... values) {<NEW_LINE>if (values == null || properties == null)<NEW_LINE>throw new NullPointerException("You must have at least one value and one property");<NEW_LINE>if (values.length != pro... | eq(values[0])); |
1,839,306 | protected void updateBestPathCore(AStarEntry entryCurrent, int traversalId, boolean reverse) {<NEW_LINE>List<AStarEntry> <MASK><NEW_LINE>if (entries == null)<NEW_LINE>return;<NEW_LINE>ListIterator<AStarEntry> it = entries.listIterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>AStarEntry entryOther = it.next();<NEW_LI... | entries = bestWeightMapOtherCore.get(traversalId); |
699,237 | public synchronized void send() throws IOException {<NEW_LINE>try {<NEW_LINE>bufferWriter.flush();<NEW_LINE>final byte[] bytes = buffer.toByteArray();<NEW_LINE>final ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);<NEW_LINE>try (DatagramChannel channel = createDatagramChannel()) {<NEW_LINE>final int nbSentBytes = channe... | address.getPort(), e); |
1,512,205 | private void addToCache(GlyphLayout layout, float x, float y) {<NEW_LINE>int runCount = layout.runs.size;<NEW_LINE>if (runCount == 0)<NEW_LINE>return;<NEW_LINE>// Check if the number of font pages has changed.<NEW_LINE>if (pageVertices.length < font.regions.size)<NEW_LINE>setPageCount(font.regions.size);<NEW_LINE>layou... | ], gx, gy, lastColorFloatBits); |
1,613,415 | public void handle(MongoRequest request, MongoResponse response) throws Exception {<NEW_LINE><MASK><NEW_LINE>if (content == null) {<NEW_LINE>return;<NEW_LINE>} else if (content.isArray() && request.isPost()) {<NEW_LINE>// POST collection with array of documents<NEW_LINE>JsonArray passwords = JsonPath.read(BsonUtils.toJ... | var content = request.getContent(); |
564,441 | protected void consume() throws IOException {<NEW_LINE>while (getSource().hasTop()) {<NEW_LINE>Key k = getSource().getTopKey();<NEW_LINE>Value v = getSource().getTopValue();<NEW_LINE>if (onlineTables == null || current == null || managerState != ManagerState.NORMAL)<NEW_LINE>return;<NEW_LINE>TabletLocationState tls;<NE... | tls.extent.tableId()); |
597,632 | public void configure(Binder binder) {<NEW_LINE>binder.bindConstant().annotatedWith(Names.named("serviceName")).to("druid/indexer");<NEW_LINE>binder.bindConstant().annotatedWith(Names.named("servicePort")).to(8091);<NEW_LINE>binder.bindConstant().annotatedWith(Names.named("tlsServicePort")).to(8291);<NEW_LINE>binder.bi... | addResource(binder, SelfDiscoveryResource.class); |
831,279 | final UpdateStreamingImageResult executeUpdateStreamingImage(UpdateStreamingImageRequest updateStreamingImageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateStreamingImageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | endClientExecution(awsRequestMetrics, request, response); |
420,456 | private boolean isSyntheticConstructor(ClassNode classNode, PropertyNode constructorNode) {<NEW_LINE>// constructor may be synthetic from parser<NEW_LINE>Expression value = constructorNode.getValue();<NEW_LINE>if (!(value instanceof FunctionNode)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String keyName = constructo... | && body.getStatementCount() == 1; |
1,314,859 | final GetAccessTokenResult executeGetAccessToken(GetAccessTokenRequest getAccessTokenRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getAccessTokenRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,207,610 | public Client testClientModel(Client body) throws ApiException {<NEW_LINE>Object localVarPostBody = body;<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");<NEW_LINE>}<NEW_LINE>/... | HashMap<String, String>(); |
889,275 | static void run(Tokenizer tokenizer, Tokenizer.SplitMode mode, InputStream input, PrintStream output, MorphemeFormatterPlugin formatter, boolean ignoreError, boolean isFileInput, boolean isWordSegmentation) throws IOException {<NEW_LINE>try (InputStreamReader inputReader = isFileInput ? new InputStreamReader(input, Sta... | e.getMessage() + "\n"); |
133,352 | private String inferSingleArgumentType(String name, int tokenPos, List<Token> tokens) {<NEW_LINE>// First Group: Matches Type arg format<NEW_LINE>String // First Group: Matches Type arg format<NEW_LINE>pattern = // Second & Third Group: Deals with matching within strings<NEW_LINE>"([a-zA-Z_$][a-zA-Z_$0-9]* " + name + "... | .split(" ")[0]; |
177,807 | protected String composeCacheSummary() {<NEW_LINE>long totalHits = cacheHit.get() + diskHit.get();<NEW_LINE>if (totalHits < 1) {<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>long cacheHitPercent = (cacheHit.get() * 100) / totalHits;<NEW_LINE>StringBuilder sb = new StringBuilder(120);<NEW_LINE>sb.append("DB name:").append(ge... | append(useStatsSyncUsed.get()); |
1,065,460 | protected CompoundTag translateExplosionToBedrock(CompoundTag explosion, String newName) {<NEW_LINE>CompoundTag newExplosionData = new CompoundTag(newName);<NEW_LINE>if (explosion.get("Type") != null) {<NEW_LINE>newExplosionData.put(new ByteTag("FireworkType", MathUtils.getNbtByte(explosion.get("Type").getValue())));<N... | get("FadeColors").getValue(); |
646,174 | public static void startMethod(@Advice.This ProcedureCall call, @Advice.Origin("#m") String name, @Advice.Local("otelCallDepth") CallDepth callDepth, @Advice.Local("otelHibernateOperation") HibernateOperation hibernateOperation, @Advice.Local("otelContext") Context context, @Advice.Local("otelScope") Scope scope) {<NEW... | ).start(parentContext, hibernateOperation); |
1,005,881 | public void deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = <MASK><NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));<N... | Utils.getValueFromIdByName(id, "resourceGroups"); |
1,481,852 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>Permanent permanent = (Permanent) game.getLastKnownInformation(source.getSourceId(), Zone.BATTLEFIELD);<NEW_LINE>if (player == null || permanent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_... | getCount(CounterType.CHARGE))); |
544,204 | private static void updatePhi(RealVector phi, int user, int item, double rating, int featureCount, PMFModel userModel, PMFModel itemModel) {<NEW_LINE>for (int k = 0; k < featureCount; k++) {<NEW_LINE>double userWeightShp = userModel.getWeightShpEntry(user, k);<NEW_LINE>double userWeightRte = userModel.getWeightRteEntry... | itemModel.getWeightShpEntry(item, k); |
1,210,898 | public GetConnectionStatusResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetConnectionStatusResult getConnectionStatusResult = new GetConnectionStatusResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | int originalDepth = context.getCurrentDepth(); |
1,680,229 | private static void fillStructFieldNameVariants(@NotNull PsiFile file, @NotNull CompletionResultSet result, @NotNull GoStructLiteralCompletion.Variants variants, @Nullable GoReferenceExpression refExpression) {<NEW_LINE>if (refExpression == null || variants != GoStructLiteralCompletion.Variants.FIELD_NAME_ONLY && varia... | super.execute(o, state); |
1,855,330 | private void doRedirect(final HttpResponse httpResponse, final CompletionHandler<HttpResponse> completionHandler) {<NEW_LINE>// get location header<NEW_LINE>String locationString = null;<NEW_LINE>final List<String> locationHeader = httpResponse.getHeader("Location");<NEW_LINE>if (locationHeader != null && !locationHead... | String method = originalHttpRequest.getMethod(); |
1,458,463 | public void marshall(EntityRecognizerProperties entityRecognizerProperties, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (entityRecognizerProperties == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(entity... | entityRecognizerProperties.getVersionName(), VERSIONNAME_BINDING); |
1,208,692 | public void highlightDebugLocation(SourcePosition startPosition, SourcePosition endPosition, boolean executing) {<NEW_LINE>int firstRow = widget_.getEditor().getFirstVisibleRow();<NEW_LINE>int lastRow = widget_.getEditor().getLastVisibleRow();<NEW_LINE>// if the expression is large, let's just try to land in the middle... | ).scrollToLine(debugRow, true); |
1,016,750 | private void handleCode(CloseCode closeCode) {<NEW_LINE>if (closeCode == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mostRecentCloseCode = closeCode;<NEW_LINE>if (closeCode == CloseCode.DISALLOWED_INTENTS) {<NEW_LINE>Set<GatewayIntent> intents = DiscordSRV.api.getIntents();<NEW_LINE>boolean presences = intents.contain... | getLogger().severe("=============================================================="); |
1,161,950 | DataFileValue minorCompact(InMemoryMap memTable, TabletFile tmpDatafile, TabletFile newDatafile, long queued, CommitSession commitSession, long flushId, MinorCompactionReason mincReason) {<NEW_LINE>boolean failed = false;<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>timer.incrementStatusMinor();<NEW_LINE>... | queued, start, count, failed); |
719,603 | public static List<CompositeValuesSourceBuilder<?>> createValueSourceBuilders(final DateHistogramGroupConfig dateHistogram) {<NEW_LINE>final String dateHistogramField = dateHistogram.getField();<NEW_LINE>final String dateHistogramName = RollupField.formatIndexerAggName(dateHistogramField, DateHistogramAggregationBuilde... | fixedInterval(dateHistogram.getInterval()); |
1,436,759 | public ResultSet executeQuery(String sql) throws SQLException {<NEW_LINE>try {<NEW_LINE>int <MASK><NEW_LINE>if (isDebugEnabled()) {<NEW_LINE>debugCodeAssign("ResultSet", TraceObject.RESULT_SET, id, "executeQuery(" + quote(sql) + ')');<NEW_LINE>}<NEW_LINE>synchronized (session) {<NEW_LINE>checkClosed();<NEW_LINE>closeOl... | id = getNextId(TraceObject.RESULT_SET); |
500,234 | // TODO : clean<NEW_LINE>public int isLaxType(BType type, Set<BType> visited) {<NEW_LINE>if (!visited.add(type)) {<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>switch(type.tag) {<NEW_LINE>case TypeTags.JSON:<NEW_LINE>case TypeTags.XML:<NEW_LINE>case TypeTags.XML_ELEMENT:<NEW_LINE>return 1;<NEW_LINE>case TypeTags.MAP:<NEW_LI... | (getReferredType(type), visited); |
29,341 | public MOrderLine addOrUpdateLine(MProduct product, BigDecimal qtyOrdered, MProductPricing productPricing) {<NEW_LINE>// Valid Complete<NEW_LINE>if (!isDrafted())<NEW_LINE>return null;<NEW_LINE>// catch Exceptions at order.getLines()<NEW_LINE>MOrderLine[] lines = currentOrder.getLines(true, "Line");<NEW_LINE>for (MOrde... | setPriceList(productPricing.getPriceList()); |
654,083 | final StartChannelResult executeStartChannel(StartChannelRequest startChannelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startChannelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | endClientExecution(awsRequestMetrics, request, response); |
1,524,992 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = null;<NEW_LINE... | Wo.copier.copy(script); |
1,311,328 | public static Object evalKey(CacheInvokeContext context, CacheAnnoConfig cac) {<NEW_LINE>String keyScript = cac.getKey();<NEW_LINE>try {<NEW_LINE>if (cac.getKeyEvaluator() == null) {<NEW_LINE>if (CacheConsts.isUndefined(keyScript)) {<NEW_LINE>cac.setKeyEvaluator(o -> {<NEW_LINE>CacheInvokeContext c = (CacheInvokeContex... | keyScript, cac.getDefineMethod()); |
1,109,074 | private JTextField createFilterField() {<NEW_LINE><MASK><NEW_LINE>newFilterField.setBackground(BACKGROUND_COLOR);<NEW_LINE>newFilterField.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));<NEW_LINE>newFilterField.getDocument().addDocumentListener(new DocumentListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>publi... | JTextField newFilterField = new JTextField(20); |
781,661 | public BlockAction unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BlockAction blockAction = new BlockAction();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | JsonToken token = context.getCurrentToken(); |
332,817 | protected Collection<Dirent> readdir(PathFragment path, boolean followSymlinks) throws IOException {<NEW_LINE>String name = path.getPathString();<NEW_LINE>long startTime = Profiler.nanoTimeMaybe();<NEW_LINE>try {<NEW_LINE>Dirents unixDirents = NativePosixFiles.readdir(name, followSymlinks ? ReadTypes.FOLLOW : ReadTypes... | newArrayListWithCapacity(unixDirents.size()); |
1,197,319 | private JToggleButton createButton(MultiViewDescription description) {<NEW_LINE>final JToggleButton button = new JToggleButton();<NEW_LINE>Mnemonics.setLocalizedText(button, Actions.cutAmpersand(description.getDisplayName()));<NEW_LINE>button.<MASK><NEW_LINE>button.setRolloverEnabled(true);<NEW_LINE>Border b = (getButt... | setModel(new TabsButtonModel(description)); |
683,078 | public void run() {<NEW_LINE>if (isDestroy())<NEW_LINE>return;<NEW_LINE>toggleEmptyViewShow(false);<NEW_LINE>Globals g = hasState(STATE_HOT_RELOADING) ? hotReloadGlobals : globals;<NEW_LINE>LuaView luaView = createLuaView(g);<NEW_LINE>if (luaView == null)<NEW_LINE>return;<NEW_LINE>if (scriptBundle.getParams() != null)<... | .baseFilePath = scriptBundle.getBasePath(); |
1,424,976 | public static void constraintMatrix3x6(DMatrixRMaj L, DMatrixRMaj y, DogArray<Point3D_F64> controlWorldPts, List<Point3D_F64>[] nullPts) {<NEW_LINE>int row = 0;<NEW_LINE>for (int i = 0; i < 3; i++) {<NEW_LINE>Point3D_F64 ci = controlWorldPts.get(i);<NEW_LINE>Point3D_F64 vai = nullPts[0].get(i);<NEW_LINE>Point3D_F64 vbi... | set(row, 0, da); |
861,454 | public void onRender(MatrixStack matrixStack, float partialTicks) {<NEW_LINE>if (fakePlayer == null || !tracer.isChecked())<NEW_LINE>return;<NEW_LINE>// GL settings<NEW_LINE>GL11.glEnable(GL11.GL_BLEND);<NEW_LINE>GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);<NEW_LINE>GL11.glEnable(GL11.GL_LINE_SMOOT... | DrawMode.DEBUG_LINES, VertexFormats.POSITION); |
94,017 | public DeleteResult delete() throws IOException {<NEW_LINE>final AtomicLong deletedBlobs = new AtomicLong();<NEW_LINE>final AtomicLong deletedBytes = new AtomicLong();<NEW_LINE>try (AmazonS3Reference clientReference = blobStore.clientReference()) {<NEW_LINE>ObjectListing prevListing = null;<NEW_LINE>while (true) {<NEW_... | = new ArrayList<>(blobsToDelete); |
1,559,714 | public final PivotClauseContext pivotClause() throws RecognitionException {<NEW_LINE>PivotClauseContext _localctx = new PivotClauseContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 46, RULE_pivotClause);<NEW_LINE>try {<NEW_LINE>enterOuterAlt(_localctx, 1);<NEW_LINE>{<NEW_LINE>setState(482);<NEW_LINE>match(PIVOT)... | _localctx).vals = pivotArgs(); |
376,758 | public void runScript(String scriptName, String[] scriptArguments, GhidraState scriptState) throws Exception {<NEW_LINE>boolean isHeadlessScript = false;<NEW_LINE>if (scriptSetOption != null) {<NEW_LINE>resolveContinuationOptionWith(scriptSetOption);<NEW_LINE>scriptSetOption = null;<NEW_LINE>}<NEW_LINE>ResourceFile scr... | ) script).setRunningInnerScript(false); |
1,056,264 | private ExecutorFactory visitLimit(Limit limit, PipelineFragment pipelineFragment) {<NEW_LINE>PipelineFragment childFragment = new PipelineFragment(defaultParallelism, limit.getInput());<NEW_LINE>childFragment.setContainLimit(true);<NEW_LINE>ExecutorFactory childExecutorFactory = visit(limit, limit.getInput(), childFra... | outputColumns, pipelineFragment.getParallelism()); |
1,363,773 | private HttpRequest.Builder requestFor(String url, Map<ConfigurationKeys, MaybeConfiguration> configuration, ConfigurationLevel configurationLevel) {<NEW_LINE>// check if platform mode is active<NEW_LINE>boolean platformMode = configurationLevel.getOrganizationId().isPresent() && configuration.get(PLATFORM_MODE_ENABLED... | (URI.create(url)); |
3,513 | public void executeInThread(JobExecutionContext context) {<NEW_LINE><MASK><NEW_LINE>MetaSchedule metaSchedule = Beans.get(MetaScheduleRepository.class).findByName(jobDetail.getKey().getName());<NEW_LINE>String batchServiceClassName = metaSchedule.getBatchServiceSelect();<NEW_LINE>Class<? extends AbstractBatchService> b... | JobDetail jobDetail = context.getJobDetail(); |
74,406 | private void moveSizeWithFreeAspectRatio(RectF rect, float x, float y, RectF bounds, int viewWidth, int viewHeight, float snapMargin) {<NEW_LINE>switch(mType) {<NEW_LINE>case TOP_LEFT:<NEW_LINE>adjustTop(rect, y, bounds, snapMargin, 0, false, false);<NEW_LINE>adjustLeft(rect, x, bounds, snapMargin, 0, false, false);<NE... | snapMargin, 0, false, false); |
620,200 | public Result processWorkPackage(@NonNull final I_C_Queue_WorkPackage workpackage, final String localTrxName) {<NEW_LINE>trxManager.assertTrxNameNull(localTrxName);<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(workpackage);<NEW_LINE>final int adClientId = workpackage.getAD_Client_ID();<NEW_LINE>Check.<... | assume(adClientId > 0, "No point in calling this process with AD_Client_ID=0"); |
1,233,913 | public void onUpdate() {<NEW_LINE>if (isEntityAlive()) {<NEW_LINE>int timeSinceIgnited = getTimeSinceIgnited();<NEW_LINE>int fuseTime = getFuseTime();<NEW_LINE>if (timeSinceIgnited >= fuseTime - 1) {<NEW_LINE>setTimeSinceIgnited(0);<NEW_LINE>world.playSound(posX, posY, posZ, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCat... | ZooConfig.teleportRange.get()); |
579,375 | public String toDisplayData(int n) {<NEW_LINE>StringBuilder sbd = new StringBuilder();<NEW_LINE>if (indices.length > 0) {<NEW_LINE>if ((indices.length <= n || n < 0)) {<NEW_LINE>for (int i = 0; i < indices.length - 1; ++i) {<NEW_LINE>sbd.append(indices[i]).append(":").append(values[<MASK><NEW_LINE>}<NEW_LINE>sbd.append... | i]).append(" "); |
62,936 | private static long encodeCStringArray(byte[] data, long startOffset, long[] offsets, int startPos, Object[] src) {<NEW_LINE>// The code that calculates dataLen already checked that there is no overflow and that all<NEW_LINE>// offsets fit into an int.<NEW_LINE>long offset = startOffset;<NEW_LINE>for (int i = 0; i < sr... | + src.length] = -1; |
521,920 | public void run(RegressionEnvironment env) {<NEW_LINE>env.compileDeploy("@name('flow') create dataflow MyDataFlowOne " + "EventBusSource -> ReceivedStream<SupportBean> { filter : 1 = 2 } " + "DefaultSupportCaptureOp(ReceivedStream) {}");<NEW_LINE>DefaultSupportCaptureOp<Object> future = new DefaultSupportCaptureOp<>();... | fail(e.getMessage()); |
311,140 | public void loadData() {<NEW_LINE>if (!isAdded()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mService = PublicizeTable.getService(mServiceId);<NEW_LINE>if (mService == null) {<NEW_LINE>ToastUtils.showToast(getActivity(), R.string.error_generic);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>setTitle(mService.getLabel());<NEW_LINE>/... | findViewById(R.id.text_service); |
26,671 | public EnumActionResult onItemUseFirst(@Nonnull EntityPlayer player, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ, @Nonnull EnumHand hand) {<NEW_LINE>if (world.isRemote || !player.isSneaking()) {<NEW_LINE>return EnumActionResult.PASS;<NEW_LINE>}<NEW_LINE>Tile... | getPos().getX()); |
440,995 | public void run() {<NEW_LINE>// wait for service layer to be initialized<NEW_LINE>while (!Services.getInstance().isInitialized()) {<NEW_LINE>try {<NEW_LINE>Thread.sleep(1000);<NEW_LINE>} catch (InterruptedException iex) {<NEW_LINE>}<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>try (final Tx tx = app.tx()) {<NEW_LINE>for (... | App app = StructrApp.getInstance(); |
1,596,059 | private Mono<Response<NameAvailabilityInner>> executeWithResponseAsync(NameAvailabilityRequest nameAvailabilityRequest) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE... | error(new IllegalArgumentException("Parameter nameAvailabilityRequest is required and cannot be null.")); |
521,222 | protected KrollDict dictFromEvent(KrollDict dictToCopy) {<NEW_LINE>KrollDict data = new KrollDict();<NEW_LINE>if (dictToCopy.containsKey(TiC.EVENT_PROPERTY_X)) {<NEW_LINE>data.put(TiC.EVENT_PROPERTY_X, dictToCopy.get(TiC.EVENT_PROPERTY_X));<NEW_LINE>} else {<NEW_LINE>data.put(TiC.EVENT_PROPERTY_X, (double) 0);<NEW_LINE... | .EVENT_PROPERTY_SIZE, (double) 0); |
899,214 | private static Event generateEventFromCursor(Cursor cEvents, Context context) {<NEW_LINE>Event e = new Event();<NEW_LINE>e.id = cEvents.getLong(PROJECTION_EVENT_ID_INDEX);<NEW_LINE>e.title = cEvents.getString(PROJECTION_TITLE_INDEX);<NEW_LINE>e.location = cEvents.getString(PROJECTION_LOCATION_INDEX);<NEW_LINE>e.allDay ... | organizer = cEvents.getString(PROJECTION_ORGANIZER_INDEX); |
1,836,856 | private void handle(AddVmNicToSecurityGroupMsg msg) {<NEW_LINE>AddVmNicToSecurityGroupReply reply = new AddVmNicToSecurityGroupReply();<NEW_LINE>validate(msg);<NEW_LINE>SimpleQuery<VmNicVO> q = dbf.createQuery(VmNicVO.class);<NEW_LINE>q.add(VmNicVO_.uuid, Op.IN, msg.getVmNicUuids());<NEW_LINE>List<VmNicVO> nicvos = q.l... | setVmInstanceUuid(nic.getVmInstanceUuid()); |
130,039 | public Block intersect(@TypeParameter("E") Type type, @OperatorDependency(operator = IS_DISTINCT_FROM, argumentTypes = { "E", "E" }, convention = @Convention(arguments = { BLOCK_POSITION, BLOCK_POSITION }, result = FAIL_ON_NULL)) BlockPositionIsDistinctFrom elementIsDistinctFrom, @OperatorDependency(operator = HASH_COD... | intersectTypedSet.add(leftArray, i); |
187,072 | public static ListResourceEvaluationResultsResponse unmarshall(ListResourceEvaluationResultsResponse listResourceEvaluationResultsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listResourceEvaluationResultsResponse.setRequestId(_ctx.stringValue("ListResourceEvaluationResultsResponse.RequestId"));<NEW_LINE>EvaluationRes... | (_ctx.integerValue("ListResourceEvaluationResultsResponse.EvaluationResults.MaxResults")); |
1,755,763 | public FieldValue applyTo(FieldValue oldValue) {<NEW_LINE>if (oldValue instanceof TensorFieldValue) {<NEW_LINE>Tensor oldTensor = ((TensorFieldValue) oldValue).getTensor().orElseThrow(() -> new IllegalArgumentException("No existing tensor to apply update on"));<NEW_LINE>if (tensor.getTensor().isPresent()) {<NEW_LINE>Do... | left, right) -> left * right; |
1,531,593 | private boolean deleteHelper(ObjectLocation loc) throws IOException {<NEW_LINE>try {<NEW_LINE>ObjectsApi objectsApi = lfsClient.getObjects();<NEW_LINE>objectsApi.deleteObject(loc.getRepository(), loc.getRef(<MASK><NEW_LINE>} catch (ApiException e) {<NEW_LINE>// This condition mimics s3a behaviour in https://github.com/... | ), loc.getPath()); |
1,060,632 | public static byte[] decode(char[] in, int iOff, int iLen) {<NEW_LINE>// NOPMD<NEW_LINE>// CHECKSTYLE:ON<NEW_LINE>if (iLen % 4 != 0) {<NEW_LINE>throw new IllegalArgumentException("Length of Base64 encoded input string is not a multiple of 4.");<NEW_LINE>}<NEW_LINE>int iLength = iLen;<NEW_LINE>while (iLength > 0 && in[i... | int oLen = iLength * 3 / 4; |
1,390,494 | void addPredicateParamMissingForNonReference(String theResourceName, String theParamName, boolean theMissing, From<?, ? extends BaseResourceIndexedSearchParam> theJoin, RequestPartitionId theRequestPartitionId) {<NEW_LINE>if (!theRequestPartitionId.isAllPartitions()) {<NEW_LINE>if (theRequestPartitionId.isDefaultPartit... | (theRequestPartitionId.getPartitionIds())); |
293,472 | public Object visit(Object context1, NewOperatorExpression expr, boolean strict) {<NEW_LINE>ExecutionContext context = (ExecutionContext) context1;<NEW_LINE>Object ref = expr.getExpr().accept(context, this, strict);<NEW_LINE>Object memberExpr = getValue(context, ref);<NEW_LINE>Object[] args = new Object[expr.getArgumen... | .createTypeError("cannot construct with: " + ref)); |
939,432 | protected void activate(BundleContext context, Map<String, Object> props) {<NEW_LINE>final String jndiName = (String) props.get("jndiName");<NEW_LINE>final String urlValue = (<MASK><NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Registering JNDIURLEntry with value " +... | String) props.get("value"); |
1,760,097 | static AwsClient createAwsClient(AwsConfig awsConfig) {<NEW_LINE>Environment environment = new Environment();<NEW_LINE>AwsMetadataApi metadataApi = new AwsMetadataApi(awsConfig);<NEW_LINE>String region = resolveRegion(awsConfig, metadataApi, environment);<NEW_LINE>validateRegion(region);<NEW_LINE>AwsCredentialsProvider... | logEcsEnvironment(awsConfig, region, cluster); |
1,159,123 | private static Map<String, Object> prepareSampleDataForConfirmationEmail(Organization organization, Event event) {<NEW_LINE>TicketReservation reservation = sampleTicketReservation(event.getZoneId());<NEW_LINE>Optional<String> vat = Optional.of("VAT-NR");<NEW_LINE>List<TicketWithCategory> tickets = Collections.singleton... | event.getZoneId()))); |
409,649 | private Expression prepareUpdateCondition(Index foundIndex, Expression[] row) {<NEW_LINE>// MVPrimaryIndex is playing fast and loose with it's implementation of<NEW_LINE>// the Index interface.<NEW_LINE>// It returns all of the columns in the table when we call<NEW_LINE>// getIndexColumns() or getColumns().<NEW_LINE>//... | , row[i], false); |
37,031 | protected boolean beforeSave(boolean newRecord) {<NEW_LINE>if (newRecord && getParent().isComplete()) {<NEW_LINE>log.saveError("ParentComplete", Msg.translate(getCtx(), "M_RequisitionLine"));<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (getLine() == 0) {<NEW_LINE>String sql = "SELECT COALESCE(MAX(Line),0)+10 FROM M_R... | ), sql, getM_Requisition_ID()); |
1,327,418 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@name('s0') @public insert rstream into NextStream " + "select rstream s0.theString as theString from SupportBean#length(3) as s0", path);<NEW_LINE>env.addListener("s0");<NEW_LINE>env.compileDep... | sendEvent(env, "d", 2); |
559,047 | final DeleteVodSourceResult executeDeleteVodSource(DeleteVodSourceRequest deleteVodSourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVodSourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | false), new DeleteVodSourceResultJsonUnmarshaller()); |
1,201,399 | protected void process(Env env, Map<Option, String[]> maps) throws CommandException {<NEW_LINE>String[] pids = maps.get(ARGUMENT);<NEW_LINE>if (pids != null && pids.length == 1) {<NEW_LINE>try {<NEW_LINE>int pid = Integer.valueOf(pids[0]);<NEW_LINE>new ApplicationFinder(pid) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>publ... | 0, "--" + LONG_NAME + " requires exactly one value"); |
1,353,335 | private void pushFormatterDeclarationNodes(int parentEndOffset, CSSDeclarationNode[] declarations, FormatterBlockWithBeginEndNode formatterBlockNode) {<NEW_LINE>for (int i = 0; i < declarations.length; ++i) {<NEW_LINE>CSSDeclarationNode declarationNode = declarations[i];<NEW_LINE>CSSExpressionNode expressionNode = decl... | IRange statusRange = declarationNode.getStatusRange(); |
520,851 | private void updateFieldsFromUrl() {<NEW_LINE>JdbcUrl url = getSelectedJdbcUrl();<NEW_LINE>if (url == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If this is called because the URL is being changed due to<NEW_LINE>// changes in the fields, then don't circle back and update<NEW_LINE>// the fields again.<NEW_LINE>if (... | setUrl(urlField.getText()); |
1,371,670 | public static // the fourth parameter `initialConfStr` should be set the all of endpoints in raft cluster, eg : 127.0.0.1:8081::100,127.0.0.1:8082::40,127.0.0.1:8083::40.<NEW_LINE>void main(final String[] args) {<NEW_LINE>if (args.length < 4) {<NEW_LINE>System.out.println("Usage : java com.alipay.sofa.jraft.example.pri... | out.println("[PriorityElectionBootstrap] Leader start on term: " + leaderTerm); |
914,075 | public void validWitnessProductTwoBlock(BlockCapsule block) {<NEW_LINE>try {<NEW_LINE>BlockCapsule blockCapsule = historyBlockCapsuleCache.getIfPresent(block.getNum());<NEW_LINE>if (blockCapsule != null && Arrays.equals(blockCapsule.getWitnessAddress().toByteArray(), block.getWitnessAddress().toByteArray()) && !Arrays.... | cheatWitnessInfoMap.put(key, cheatWitnessInfo); |
201,818 | private Configuration buildConfig(final String name, final ExecutorService threadPool, final ObjectMapper objectMapper, final Validator validator) {<NEW_LINE>final ClientConfig config = new ClientConfig();<NEW_LINE>for (Object singleton : this.singletons) {<NEW_LINE>config.register(singleton);<NEW_LINE>}<NEW_LINE>for (... | apacheHttpClient = apacheHttpClientBuilder.buildWithDefaultRequestConfiguration(name); |
614,752 | public void deleteFilesUploadSessionsId(String uploadSessionId) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'uploadSessionId' is set<NEW_LINE>if (uploadSessionId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'uploadSessionId'... | String[] localVarAccepts = { "application/json" }; |
32,999 | protected void performContextAction(final Node[] nodes) {<NEW_LINE>final VCSContext ctx = HgUtils.getCurrentContext(nodes);<NEW_LINE>final File[] roots = HgUtils.getActionRoots(ctx);<NEW_LINE>if (roots == null || roots.length == 0)<NEW_LINE>return;<NEW_LINE>final File root = Mercurial.getInstance().getRepositoryRoot(ro... | panel = createPanel(root, roots); |
1,415,245 | final DeleteCustomLineItemResult executeDeleteCustomLineItem(DeleteCustomLineItemRequest deleteCustomLineItemRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteCustomLineItemRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | false), new DeleteCustomLineItemResultJsonUnmarshaller()); |
273,449 | public void init(Map<String, Object> params) {<NEW_LINE>super.init(params);<NEW_LINE>userDs.addItemPropertyChangeListener(new NameBuilderListener<>(userDs));<NEW_LINE>userDs.addItemPropertyChangeListener(e -> {<NEW_LINE>if ("timeZoneAuto".equals(e.getProperty())) {<NEW_LINE>timeZoneLookup.setEnabled(!Boolean.TRUE.equal... | Role.class, EntityOp.UPDATE); |
1,529,921 | public void writeBufferShort(ByteOrder order, long index, short value, @Shared("isBuffer") @Cached IsBufferNode isBuffer, @Shared("error") @Cached BranchProfile error, @Shared("classProfile") @Cached("createClassProfile()") ValueProfile classProfile) throws InvalidBufferOffsetException, UnsupportedMessageException {<NE... | create(index, Short.BYTES); |
374,275 | private XmlRpcStruct loadPowerDogResponse(boolean needsUpdate, PowerDogLocalApiServerConfig server) {<NEW_LINE>// Get all current linear values from the powerdog in case of an update<NEW_LINE>XmlRpcStruct response = null;<NEW_LINE>if (needsUpdate == true) {<NEW_LINE>try {<NEW_LINE>logger.debug("PowerDogLocalApi queryin... | warn(e.getMessage()); |
149,346 | public boolean visit(SQLDropTableStatement x) {<NEW_LINE>SqlNodeList hints = new SqlNodeList(SqlParserPos.ZERO);<NEW_LINE>if (x.isTemporary()) {<NEW_LINE>throw new FastSqlParserException(FastSqlParserException.ExceptionType.NOT_SUPPORT, "Do not support temporary table.");<NEW_LINE>}<NEW_LINE>if (x.getTableSources().siz... | getSimpleName(), PrivilegePoint.DROP); |
1,455,571 | public ExperimentConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ExperimentConfig experimentConfig = new ExperimentConfig();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = c... | int originalDepth = context.getCurrentDepth(); |
91,334 | private void listOptions(StringBuilder message, ProcessingEnvironment procEnv) {<NEW_LINE>try {<NEW_LINE>JavacProcessingEnvironment environment = (JavacProcessingEnvironment) procEnv;<NEW_LINE>Options instance = Options.instance(environment.getContext());<NEW_LINE>Field field = Permit.<MASK><NEW_LINE>@SuppressWarnings(... | getField(Options.class, "values"); |
1,083,649 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>App.getInstance().getDaggerComponent().inject(this);<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_help);<NEW_LINE>if (getSupportActionBar() != null) {<NEW_LINE>getSupportActionBar().setDisplayHomeAsUpEnabled(true);<N... | swRootCommandsLog.setVisibility(View.GONE); |
1,515,707 | public <T extends CFacade> void writeDataList(Class<T> clazz, ListBase listBase, int size, IOBiConsumer<Integer, T> forElem) throws IOException {<NEW_LINE>CPointer<Link> prevPointer = null;<NEW_LINE>Link prev = null;<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>CPointer<T> pointer = CFacade<MASK><NEW_LINE>CPointe... | .__io__addressof(writeData(clazz)); |
731,266 | public static void main(String[] args) throws Exception {<NEW_LINE>// snippet create-client<NEW_LINE>Client client = new Client();<NEW_LINE>// endsnippet<NEW_LINE>// snippet create-key<NEW_LINE>MockHsm.Key key = MockHsm.Key.create(client);<NEW_LINE>// endsnippet<NEW_LINE>// snippet signer-add-key<NEW_LINE>HsmSigner.add... | 100)).build(client); |
600,470 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jLabelProjectName = new javax.swing.JLabel();<NEW_LINE>jTextFieldProjectFolder = new javax.swing.JTextField();<NEW_LINE>jLabelProjectName.setDisplayedMnemonic(org.openide.util.NbBu... | javax.swing.GroupLayout(this); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.