idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,121,374 | private RequestPartitionId validateAndNormalizePartitionNames(RequestPartitionId theRequestPartitionId) {<NEW_LINE>List<Integer> ids = null;<NEW_LINE>for (int i = 0; i < theRequestPartitionId.getPartitionNames().size(); i++) {<NEW_LINE>PartitionEntity partition;<NEW_LINE>try {<NEW_LINE>partition = myPartitionConfigSvc.... | ids, theRequestPartitionId.getPartitionDate()); |
233,467 | private Set<BeanDefinition> scanCandidateComponents(String basePackage) {<NEW_LINE>Set<BeanDefinition> candidates = new LinkedHashSet<>();<NEW_LINE>try {<NEW_LINE>String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX + resolveBasePackage(basePackage) + '/' + this.resourcePattern;<NEW_LINE>Resource... | logger.debug("Identified candidate component class: " + resource); |
1,685,236 | private void loadAdmins() {<NEW_LINE>TLRPC.TL_channels_getParticipants req = new TLRPC.TL_channels_getParticipants();<NEW_LINE>req.channel = MessagesController.getInputChannel(currentChat);<NEW_LINE>req.filter = new TLRPC.TL_channelParticipantsAdmins();<NEW_LINE>req.offset = 0;<NEW_LINE>req.limit = 200;<NEW_LINE>int re... | putUsers(res.users, false); |
255,863 | public static boolean migrateMediaOptimizeSettings(SQLiteDatabase db) {<NEW_LINE>Cursor cursor = null;<NEW_LINE>try {<NEW_LINE>String sqlCommand = "SELECT * FROM " + SiteSettingsModel.SETTINGS_TABLE_NAME + ";";<NEW_LINE>cursor = db.rawQuery(sqlCommand, null);<NEW_LINE>if (cursor == null || cursor.getCount() == 0 || !cu... | cursor.getColumnIndexOrThrow("videoEncoderBitrate"))); |
1,014,335 | static QueryCollectorContext createMultiCollectorContext(Collection<Collector> subs) {<NEW_LINE>return new QueryCollectorContext(REASON_SEARCH_MULTI) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>Collector create(Collector in) {<NEW_LINE>List<Collector> subCollectors = new ArrayList<>();<NEW_LINE>subCollectors.add(in);<NEW_L... | subCollectors = new ArrayList<>(); |
848,708 | public void onEditorAction(int actionCode) {<NEW_LINE>HippyMap hippyMap = new HippyMap();<NEW_LINE>hippyMap.pushInt("actionCode", actionCode);<NEW_LINE>hippyMap.pushString("text", <MASK><NEW_LINE>switch(actionCode) {<NEW_LINE>case EditorInfo.IME_ACTION_GO:<NEW_LINE>hippyMap.pushString("actionName", "go");<NEW_LINE>brea... | getText().toString()); |
1,435,626 | final GetMigrationResult executeGetMigration(GetMigrationRequest getMigrationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getMigrationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,140,537 | public <T> Mono<Void> singleRequestNoResponse(ClientRequestPayload<T> payload, RpcOptions options) {<NEW_LINE>try {<NEW_LINE>final String name = payload.getRequestRpcMetadata().getName();<NEW_LINE>final <MASK><NEW_LINE>final InstrumentedClientRequestPayload<T> instrumentedClientRequestPayload = new InstrumentedClientRe... | long start = System.nanoTime(); |
675,589 | public List<ValidateError> validate() {<NEW_LINE>List<ValidateError> errors = new ArrayList<>();<NEW_LINE>Validator validator;<NEW_LINE>ValidateError error;<NEW_LINE>validator = ValidatorFactory.getInstance(Validator.REQUIRED);<NEW_LINE>error = validator.validate(this.functionKey, convLabelName("Function Key"));<NEW_LI... | , convLabelName("Row Id"), 64); |
1,434,963 | public ConnectionProvider<W, R> newStrategy(final List<HostHolder<W, R>> hosts) {<NEW_LINE>final int size = hosts.size();<NEW_LINE>return () -> Observable.create((OnSubscribe<Connection<R, W>>) subscriber -> {<NEW_LINE>ConnectionProvider<W, R> hostToUse;<NEW_LINE>HostHolder<W, R> host1 = hosts.get<MASK><NEW_LINE>HostHo... | (nextIndexFinder.call(size)); |
1,304,678 | public CommandExecutionResult execute(final SequenceDiagram diagram, BlocLines lines) throws NoSuchColorException {<NEW_LINE>final String firstLine = lines.getFirst().getTrimmed().getString();<NEW_LINE>final RegexResult arg = getConcat().matcher(firstLine);<NEW_LINE>if (arg == null)<NEW_LINE>return CommandExecutionResu... | .get("PARTS", 0)); |
498,900 | public void save(AssetManager manager, ResourceData resources) {<NEW_LINE>SaveData data = resources.createSaveData();<NEW_LINE>Array<ParticleEffect> effects = manager.getAll(ParticleEffect.class, new Array<ParticleEffect>());<NEW_LINE>Array<ParticleController> controllers = <MASK><NEW_LINE>Array<IntArray> effectsIndice... | new Array<ParticleController>(templates); |
266,840 | public Component matchIdentity(final Project project, final ComponentIdentity cid) {<NEW_LINE>String purlString = null;<NEW_LINE>String purlCoordinates = null;<NEW_LINE>if (cid.getPurl() != null) {<NEW_LINE>try {<NEW_LINE>final PackageURL purl = cid.getPurl();<NEW_LINE>purlString = cid.getPurl().canonicalize();<NEW_LIN... | newQuery(Component.class, "project == :project && ((purl != null && purl == :purl) || (purlCoordinates != null && purlCoordinates == :purlCoordinates) || (swidTagId != null && swidTagId == :swidTagId) || (cpe != null && cpe == :cpe) || (group == :group && name == :name && version == :version))"); |
1,821,458 | private CommandExecutionResult executeInternal(SequenceDiagram diagram, final RegexResult line0, BlocLines lines) throws NoSuchColorException {<NEW_LINE>final EventWithDeactivate m = diagram.getLastEventWithDeactivate();<NEW_LINE>if (m instanceof AbstractMessage || m instanceof GroupingLeaf) {<NEW_LINE>final NotePositi... | ("topurl"), UrlMode.STRICT); |
222,429 | public void acceptNameWithPrefixAndSuffix(char[] name, boolean isFirstPrefix, boolean isFirstSuffix, int reusedCharacters) {<NEW_LINE>if (isFirstPrefix && isFirstSuffix) {<NEW_LINE>int length = this.firstPrefixAndFirstSuffixResults.length;<NEW_LINE>if (length == this.firstPrefixAndFirstSuffixResultsCount) {<NEW_LINE>Sy... | int length = this.firstPrefixAndSuffixResults.length; |
53,979 | protected void doBuild(final DaemonCommandExecution execution, Build build) {<NEW_LINE>LOGGER.debug(DaemonMessages.STARTED_BUILD);<NEW_LINE>LOGGER.debug(<MASK><NEW_LINE>runningStats.buildStarted();<NEW_LINE>DaemonConnectionBackedEventConsumer buildEventConsumer = new DaemonConnectionBackedEventConsumer(execution);<NEW_... | "Executing build with daemon context: {}", execution.getDaemonContext()); |
447,598 | public void login(final String username, final String password, final LoginListener loginListener) {<NEW_LINE>Callback<NianticService.LoginValues> valuesCallback = new Callback<NianticService.LoginValues>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(Call<NianticService.LoginValues> call, Response<Ni... | > call = mNianticService.getLoginValues(); |
282,901 | private Exception recordJavaScriptError(ReadableMap jsErrorMap) {<NEW_LINE>String message = jsErrorMap.getString("message");<NEW_LINE>ReadableArray stackFrames = Objects.requireNonNull(jsErrorMap.getArray("frames"));<NEW_LINE>boolean isUnhandledPromiseRejection = jsErrorMap.getBoolean("isUnhandledRejection");<NEW_LINE>... | file = stackFrame.getString("file"); |
1,084,874 | @Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Operation(description = "Set the specified service metadata. Caller must have update privileges on the sys.auth domain.")<NEW_LINE>public void putServiceIdentitySystemMeta(@Parameter(description = "name of the domain", requir... | delegate.recordMetrics(context, code); |
223,151 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>super.onMeasure(widthMeasureSpec, heightMeasureSpec);<NEW_LINE>View view = resolveView();<NEW_LINE>if (view != null) {<NEW_LINE>int width = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>int height = MeasureSpec.getSize(heightMeasureSpec)... | = width - (viewPaddingSmall + viewPaddingLarge); |
442,986 | private static void route(GraphHopper hopper, GHRequest req, int expectedDistance, int expectedTime) {<NEW_LINE>GHResponse rsp = hopper.route(req);<NEW_LINE>// handle errors<NEW_LINE>if (rsp.hasErrors())<NEW_LINE>// if you get: Impossible curbside constraint: 'curbside=right'<NEW_LINE>// you either specify 'curbside=an... | getErrors().toString()); |
914,180 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>mSpinnerEntries = getSpinnerItems();<NEW_LINE>mUri = sampleUris().createSampleUri(ImageUriProvider.ImageSize.L);<NEW_LINE>mButton = (Button) view.findViewById(R.id.button);<NEW_LINE>mDraweeMain = (SimpleDraweeView) view.<MASK><NEW_LINE... | findViewById(R.id.drawee_view); |
764,625 | public boolean processResolveVariants(@NotNull GoScopeProcessor processor) {<NEW_LINE>GoScopeProcessor fieldProcessor = processor instanceof GoFieldProcessor ? processor : new GoFieldProcessor(myElement) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean execute(@NotNull PsiElement e, @NotNull ResolveState state) {... | processor.execute(e, state); |
1,155,710 | public void attributeValueChanged(AttributeEvent e) {<NEW_LINE>if (e.getAttribute() == NAME_ATTR) {<NEW_LINE>final var NewName = (String) e.getValue();<NEW_LINE>final var OldName = e.getOldValue() == null ? "ThisShouldNotHappen" : (String) e.getOldValue();<NEW_LINE>if (!NewName.equals(OldName)) {<NEW_LINE>if (NewName.i... | fireEvent(CircuitEvent.ACTION_SET_NAME, OldName); |
1,784,121 | private static boolean determineIf64Bit() {<NEW_LINE>String s = System.getProperty("sun.arch.data.model");<NEW_LINE>if (s != null) {<NEW_LINE>boolean b = s.equals("64");<NEW_LINE>syslog.debug("System architecture: " + <MASK><NEW_LINE>return b;<NEW_LINE>}<NEW_LINE>// Not a SUN VM<NEW_LINE>s = System.getProperty("java.vm... | (b ? "64 bit" : "32 bit")); |
1,691,538 | // Create Distribution Run Line<NEW_LINE>public boolean generateDistribution() {<NEW_LINE>m_run = new MDistributionRun(this.getCtx(), 0, this.get_TrxName());<NEW_LINE>m_run.setName("Generate from DRP " + p_DatePromised);<NEW_LINE>// m_run.setDescription("Generate from DRP");<NEW_LINE>m_run.save();<NEW_LINE>StringBuffer... | pstmt.setInt(2, p_M_Warehouse_ID); |
979,157 | private void defineLayout() {<NEW_LINE>CellConstraints cst = new CellConstraints();<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>// count label<NEW_LINE>sb.append("15dlu:grow");<NEW_LINE>// vip label+field<NEW_LINE>sb.append(",").append(Panel.getFieldInterval()).append(",12dlu,").append(Panel.getLabelInter... | (1, 1, "right, center")); |
1,036,346 | public Request<DescribeLoadBalancersRequest> marshall(DescribeLoadBalancersRequest describeLoadBalancersRequest) {<NEW_LINE>if (describeLoadBalancersRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DescribeLoadBalancersRequest> request = n... | request.setHttpMethod(HttpMethodName.POST); |
1,538,608 | // Use invokeAll where one or more tasks must run on the current thread due to the queue being full.<NEW_LINE>// To achieve this, we constrain maxConcurrency and maxQueueSize to 1 and supply 4 tasks to invokeAll,<NEW_LINE>// where the first task blocks until all others start. This causes maxConcurrency to be exceeded, ... | Callable<Boolean>>(4); |
1,805,501 | public static void main(String[] args) {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE>// 1) Set debugger to track XDocReport process<NEW_LINE>XDocReportRegistry.getRegistry(<MASK><NEW_LINE>// 2) Load ODS file by filling Velocity template engine and cache it<NEW_LINE>// to the registry<N... | ).setDebugger(SysOutDebugger.INSTANCE); |
119,065 | public okhttp3.Call postPingCall(SomeObj someObj, final ApiCallback _callback) throws ApiException {<NEW_LINE>String basePath = null;<NEW_LINE>// Operation Servers<NEW_LINE>String[] localBasePaths = new String[] {};<NEW_LINE>// Determine Base Path to Use<NEW_LINE>if (localCustomBaseUrl != null) {<NEW_LINE>basePath = lo... | localVarHeaderParams.put("Accept", localVarAccept); |
168,920 | protected Optional<Map<BlockHeader, List<TransactionReceipt>>> processResponse(final boolean streamClosed, final MessageData message, final EthPeer peer) {<NEW_LINE>if (streamClosed) {<NEW_LINE>// All outstanding requests have been responded to and we still haven't found the response<NEW_LINE>// we wanted. It must have... | .get(receiptsRoot(receiptsInBlock)); |
1,795,404 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Folder folder = emc.fi... | ids.get(i))); |
113,318 | public String saveEntity(HttpServletRequest request, HttpServletResponse response, Model model, @PathVariable Map<String, String> pathVars, @PathVariable(value = "id") String id, @ModelAttribute(value = "entityForm") EntityForm entityForm, BindingResult result, RedirectAttributes ra) throws Exception {<NEW_LINE>String ... | model.addAttribute("entity", entity); |
397,976 | protected List<Map<String, Object>> readFile() throws IOException, AxelorException {<NEW_LINE>List<Map<String, Object>> structuredContent = Lists.newArrayList();<NEW_LINE>List<String> fileContent = FileTool.reader(file.getPath());<NEW_LINE>for (String lineContent : fileContent) {<NEW_LINE>log.info("Read line : {}", lin... | movementLine.get("additionalInformation") + "\n"; |
1,094,636 | // -------------------------------------------------------------------------<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");<... | "point {} is not in the function domain", x.toString()); |
812,816 | final GetPipelineStateResult executeGetPipelineState(GetPipelineStateRequest getPipelineStateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getPipelineStateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,391,427 | public void serialize(ByteBuf out) {<NEW_LINE>int elemNum = size();<NEW_LINE>// Keys<NEW_LINE>ByteBufSerdeUtils.serializeInt(out, elemNum);<NEW_LINE>// [0, currentBatchIndex - 1] batchs<NEW_LINE>for (int i = 0; i < currentBatchIndex; i++) {<NEW_LINE>KeysValues batch = batchs.get(i);<NEW_LINE>for (int j = 0; j < batch.k... | , batch.values[j]); |
1,486,941 | static long toLong(String v) {<NEW_LINE>String buildPart = "1";<NEW_LINE>long buildType = 700;<NEW_LINE>if (v.endsWith("-SNAPSHOT")) {<NEW_LINE>buildPart = "";<NEW_LINE>v = v.substring(0, v.indexOf("-SNAPSHOT"));<NEW_LINE>buildType = 0;<NEW_LINE>} else if (v.contains("-alpha-")) {<NEW_LINE>buildPart = v.substring(v.las... | (parts[1]) : 0; |
968,502 | public CorrelationBatchOp linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>BatchOperator<?> in = checkAndGetFirst(inputs);<NEW_LINE>String[] selectedColNames = this.getParams().get(SELECTED_COLS);<NEW_LINE>if (selectedColNames == null) {<NEW_LINE>selectedColNames = in.getColNames();<NEW_LINE>}<NEW_LINE>// check col type... | save(summary.f1, collector); |
1,306,980 | public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call) {<NEW_LINE>final RelDataTypeFactory typeFactory = validator.getTypeFactory();<NEW_LINE>List<RelDataTypeFieldImpl> columns = new LinkedList<>();<NEW_LINE>columns.add(new RelDataTypeFieldImpl("Rule_Name", 0, typeFactory.createSql... | createSqlType(SqlTypeName.VARCHAR))); |
845,139 | public MaryData process(MaryData input) {<NEW_LINE>Document document = input.getDocument();<NEW_LINE>NodeIterator tokenIterator = MaryDomUtils.createNodeIterator(document, MaryXML.TOKEN);<NEW_LINE>Element token;<NEW_LINE>while ((token = (Element) tokenIterator.nextNode()) != null) {<NEW_LINE>String transcription;<NEW_L... | pos = token.getAttribute("pos"); |
795,205 | public void handle(Exception exception) {<NEW_LINE>if (exception instanceof LinkisClientRuntimeException) {<NEW_LINE>LinkisClientRuntimeException e = (LinkisClientRuntimeException) exception;<NEW_LINE>switch(e.getLevel()) {<NEW_LINE>case INFO:<NEW_LINE>logger.info(<MASK><NEW_LINE>LogUtils.getInformationLogger().info(e.... | e.getMessage(), e); |
897,854 | // this needs to be optimized (Sorted Map State)<NEW_LINE>private void onSortFlushTimer(BoundedWindow window, Instant timestamp) {<NEW_LINE>StateInternals stateInternals = stepContext.stateInternals();<NEW_LINE>StateNamespace namespace = StateNamespaces.window(windowCoder, window);<NEW_LINE>BagState<WindowedValue<Input... | keep = new ArrayList<>(); |
1,610,881 | private PostalAddress6CH createUnstructuredPstlAdr(@Nullable final org.compiere.model.I_C_BP_BankAccount bpBankAccount, @NonNull final I_C_Location location) {<NEW_LINE>final PostalAddress6CH pstlAdr = objectFactory.createPostalAddress6CH();<NEW_LINE>// note: C_Location.C_Country is a mandatory column<NEW_LINE>pstlAdr.... | add(bpBankAccount.getA_Street()); |
682,701 | public void onItemClick(int position) {<NEW_LINE>int color = mBrushItems.get(position).getColor();<NEW_LINE>if (position == mBrushItems.size() - 1) {<NEW_LINE>final MaterialDialog colorPallete = new MaterialDialog.Builder(this).title(R.string.choose_color_text).customView(R.layout.color_pallete_layout, true).positiveTe... | colorPallete.getActionButton(DialogAction.POSITIVE); |
163,439 | public void installNativeTheme() {<NEW_LINE>checkEDT();<NEW_LINE>if (nativeTheme != null) {<NEW_LINE>try {<NEW_LINE>Resources r = Resources.open(nativeTheme);<NEW_LINE>Hashtable h = r.getTheme(r<MASK><NEW_LINE>Preferences pref = Preferences.userNodeForPackage(JavaSEPort.class);<NEW_LINE>boolean desktopSkin = pref.getBo... | .getThemeResourceNames()[0]); |
1,699,682 | /* (non-Javadoc)<NEW_LINE>* @see org.netbeans.modules.java.hints.spi.ErrorRule#run(org.netbeans.api.java.source.CompilationInfo, java.lang.String, int, org.netbeans.modules.java.hints.spi.TreePath, org.netbeans.modules.java.hints.spi.ErrorRule.Data)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public List<Fix> run(Compilati... | Level.SEVERE, null, e); |
1,248,927 | private Wo list(Business business, Wi wi) throws Exception {<NEW_LINE>List<Unit> os = business.unit().<MASK><NEW_LINE>List<String> unitIds = new ArrayList<>();<NEW_LINE>for (Unit o : os) {<NEW_LINE>unitIds.add(o.getId());<NEW_LINE>}<NEW_LINE>EntityManager em = business.entityManagerContainer().get(Identity.class);<NEW_... | pick(wi.getUnitList()); |
1,433,050 | private void updateParentResourceSize(Resource resource, long size) {<NEW_LINE>if (resource.getSize() > 0) {<NEW_LINE>String[] splits = resource.getFullName().split("/");<NEW_LINE>for (int i = 1; i < splits.length; i++) {<NEW_LINE>String parentFullName = Joiner.on("/").join(Arrays.copyOfRange(splits, 0, i));<NEW_LINE>i... | getType().ordinal()); |
304,153 | // Visible for testing<NEW_LINE>static Resource buildResource(Map<String, String> sysEnv, DockerHelper dockerHelper) {<NEW_LINE>if (!isOnEcs(sysEnv)) {<NEW_LINE>return Resource.empty();<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>attrBuilders.put(ResourceAttributes.CLOUD_PROVIDER, ResourceAttributes.CloudProviderValues.AWS);<N... | AttributesBuilder attrBuilders = Attributes.builder(); |
1,837,325 | public void marshall(WorkspaceBundle workspaceBundle, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (workspaceBundle == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(workspaceBundle.getBundleId(), BUNDLEID... | workspaceBundle.getOwner(), OWNER_BINDING); |
1,182,236 | public static Location make4py(ArrayList args) {<NEW_LINE>Debug.log(3, "make: args: %s", args);<NEW_LINE>Location loc = getDefaultInstance4py();<NEW_LINE>if (null != args) {<NEW_LINE>int argn = 1;<NEW_LINE>for (Object arg : args) {<NEW_LINE>Debug.log(3, "%d: %s (%s)", argn++, arg.getClass().getSimpleName(), arg);<NEW_L... | ) args.get(0)); |
1,220,446 | public static ListCallTaskResponse unmarshall(ListCallTaskResponse listCallTaskResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCallTaskResponse.setRequestId(_ctx.stringValue("ListCallTaskResponse.RequestId"));<NEW_LINE>listCallTaskResponse.setCode(_ctx.stringValue("ListCallTaskResponse.Code"));<NEW_LINE>listCallTask... | ("ListCallTaskResponse.Data[" + i + "].Status")); |
918,994 | protected DataSource datasourceFromConfig(JdbcOptionsBean config) {<NEW_LINE>Properties props = new Properties();<NEW_LINE>props.putAll(config.getDsProperties());<NEW_LINE>setConfigProperty(props, "jdbcUrl", config.getJdbcUrl());<NEW_LINE>setConfigProperty(props, "username", config.getUsername());<NEW_LINE>setConfigPro... | "idleTimeout", config.getIdleTimeout()); |
13,633 | private void applyTheme(String css) throws IOException {<NEW_LINE>Debug.println("Theme is about to rewrite");<NEW_LINE>CSSEngine cssEngine = WidgetElement.getEngine(display);<NEW_LINE>if (hotSwap) {<NEW_LINE>HotSwap.INSTANCE.fixWindowMargins();<NEW_LINE>}<NEW_LINE>ExtendedDocumentCSS documentCSS = (ExtendedDocumentCSS)... | = new ArrayList<StyleSheet>(); |
1,811,274 | private boolean incrementalBuildLoop() throws CoreException {<NEW_LINE>int compileLoop = 0;<NEW_LINE>float increment = 0.40f;<NEW_LINE>while (this.sourceFiles.size() > 0) {<NEW_LINE>// added to in acceptResult<NEW_LINE>if (++compileLoop > MaxCompileLoop) {<NEW_LINE>if (JavaBuilder.DEBUG)<NEW_LINE>// $NON-NLS-1$<NEW_LIN... | this.sourceFiles.size()]; |
1,439,162 | public void mulligan(Game game, UUID playerId) {<NEW_LINE>Player player = game.getPlayer(playerId);<NEW_LINE>int numCards = startingHandSizes.get(player.getId());<NEW_LINE>player.getLibrary().addAll(player.getHand().getCards(game), game);<NEW_LINE>player.getHand().clear();<NEW_LINE>player.shuffleLibrary(null, game);<NE... | ) - newHandSize) + " more) to put on the bottom of your library")); |
444,352 | private boolean hasConflictTranslated(Collection<Component> components, int dx, int dy, boolean selfConflicts) {<NEW_LINE><MASK><NEW_LINE>if (circuit == null)<NEW_LINE>return false;<NEW_LINE>for (Component comp : components) {<NEW_LINE>if (!(comp instanceof Wire)) {<NEW_LINE>for (EndData endData : comp.getEnds()) {<NEW... | Circuit circuit = proj.getCurrentCircuit(); |
1,678,548 | private void listenForInitSessionEventsToReactNative(ReactApplicationContext reactContext) {<NEW_LINE>mInitSessionFinishedEventReceiver = new BroadcastReceiver() {<NEW_LINE><NEW_LINE>RNBranchModule mBranchModule;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onReceive(Context context, Intent intent) {<NEW_LINE>fina... | uri = intent.getParcelableExtra(NATIVE_INIT_SESSION_STARTED_EVENT_URI); |
159,253 | public static int binarySearch(float[] array, int startIndex, int endIndex, float value) {<NEW_LINE>checkIndexForBinarySearch(array.length, startIndex, endIndex);<NEW_LINE>int intBits = Float.floatToIntBits(value);<NEW_LINE>int low = startIndex, mid = -1, high = endIndex - 1;<NEW_LINE>while (low <= high) {<NEW_LINE>mid... | low + high) >>> 1; |
1,456,378 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.date_picker_dialog, container, false);<NEW_LINE>Button doneButton = (Button) view.findViewById(R.id.done_button);<NEW_LINE>Button cancelButton = (Button) view.findViewById(R... | findViewById(R.id.date_picker); |
173,339 | protected List<BaseUrl> parseBaseUrl(XmlPullParser xpp, List<BaseUrl> parentBaseUrls, boolean dvbProfileDeclared) throws XmlPullParserException, IOException {<NEW_LINE>@Nullable<NEW_LINE>String priorityValue = xpp.getAttributeValue(null, "dvb:priority");<NEW_LINE>int priority = priorityValue != null ? Integer.parseInt(... | , serviceLocation, priority, weight)); |
135,870 | protected SecretKey engineGenerateKey() {<NEW_LINE>if (genSpec != null) {<NEW_LINE>BCFrodoPublicKey pubKey = (BCFrodoPublicKey) genSpec.getPublicKey();<NEW_LINE>FrodoKEMGenerator kemGen = new FrodoKEMGenerator(random);<NEW_LINE>SecretWithEncapsulation secEnc = kemGen.<MASK><NEW_LINE>SecretKey rv = new SecretKeyWithEnca... | generateEncapsulated(pubKey.getKeyParams()); |
832,020 | private void runInternal() {<NEW_LINE>final long now = Clock.currentTimeMillis();<NEW_LINE>// if this node is the owner of a partition, we use this criteria time.<NEW_LINE>final long ownerHighestStoreTime = calculateHighestStoreTime(lastHighestStoreTime, now);<NEW_LINE>// if this node is the backup of a partition, we u... | selectEntriesToStore(recordStore, ownersList, ownerHighestStoreTime); |
271,187 | private static double calculateSigma(double clipNorm, double eps, double targetDelta) {<NEW_LINE>double <MASK><NEW_LINE>double alpha = 1d;<NEW_LINE>if (targetDelta > deltaZero) {<NEW_LINE>double sPositive = calculateSPositive(eps, targetDelta, 0, 1);<NEW_LINE>alpha = Math.sqrt(1.0 + sPositive / 2.0) - Math.sqrt(sPositi... | deltaZero = calculateBPositive(eps, 0); |
1,643,734 | public void createNotification(MessageNotificationManager.Chat chat, boolean alert) {<NEW_LINE>boolean inForeground = isAppInForeground(context);<NEW_LINE>NotificationCompat.Builder builder = new NotificationCompat.Builder(context, getChannelID(chat)).setColor(context.getResources().getColor(R.color.persistent_notifica... | , chat.getAccountJid())); |
1,136,943 | public void onClick(View v) {<NEW_LINE>final ListPopupWindow popup = new ListPopupWindow(v.getContext());<NEW_LINE>popup.setAnchorView(splitIntervalView);<NEW_LINE>popup.setContentWidth(AndroidUtils.dpToPx(app, 200f));<NEW_LINE>popup.setModal(true);<NEW_LINE>popup.setDropDownGravity(Gravity.RIGHT | Gravity.TOP);<NEW_LI... | dpToPx(app, -6f)); |
1,335,008 | public void onTestStart(ITestResult result) {<NEW_LINE>// create new folder for test report<NEW_LINE>ReportContext.createTestDir();<NEW_LINE>LOGGER.debug("AbstractTestListener->onTestStart");<NEW_LINE>LOGGER.debug("Test Directory: {}", ReportContext.getTestDir().getName());<NEW_LINE>IRetryAnalyzer curRetryAnalyzer = ge... | startItem(result, Messager.TEST_STARTED); |
1,406,116 | public static String encode(Type parameter) {<NEW_LINE>if (parameter instanceof NumericType) {<NEW_LINE>return encodeNumeric(((NumericType) parameter));<NEW_LINE>} else if (parameter instanceof Address) {<NEW_LINE>return encodeAddress((Address) parameter);<NEW_LINE>} else if (parameter instanceof Bool) {<NEW_LINE>retur... | return encodeStaticArrayWithDynamicStruct((StaticArray) parameter); |
179,322 | public UpdateAppInstanceResult updateAppInstance(UpdateAppInstanceRequest updateAppInstanceRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateAppInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAws... | new JsonResponseHandler<UpdateAppInstanceResult>(unmarshaller); |
959,766 | public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>Toolbar toolbar = view.findViewById(R.id.payments_recovery_start_fragment_toolbar);<NEW_LINE>TextView title = view.findViewById(R.id.payments_recovery_start_fragment_title);<NEW_LINE>LearnMoreTextView message = view.findViewBy... | addCallback(getViewLifecycleOwner(), onBackPressed); |
273,867 | public RequestProcessor.Task refresh(String expected, String unexpected) {<NEW_LINE>if (children instanceof Refreshable) {<NEW_LINE>((Refreshable) children).updateKeys();<NEW_LINE>boolean foundExpected = expected == null;<NEW_LINE>boolean foundUnexpected = false;<NEW_LINE>for (Node node : children.getNodes()) {<NEW_LIN... | new IllegalStateException("did not find a child node, named " + expected)); |
130,903 | private void makeConstructor() {<NEW_LINE>this.mv = this.classWriter.visitMethod(ACC_PUBLIC, CONSTRUCTOR_METHOD_NAME, "(Lcom/googlecode/aviator/AviatorEvaluatorInstance;Ljava/util/List;Lcom/googlecode/aviator/lexer/SymbolTable;)V", null, null);<NEW_LINE>this.mv.visitCode();<NEW_LINE>this.mv.visitVarInsn(ALOAD, 0);<NEW_... | this.className, innerName, "Lcom/googlecode/aviator/runtime/type/AviatorJavaType;"); |
1,151,673 | public void initialize(Server server, Injector injector) {<NEW_LINE>final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);<NEW_LINE>root.addServlet(new ServletHolder(new DefaultServlet()), "/*");<NEW_LINE>// Add LimitRequestsFilter as first in the chain if enabled.<NEW_LINE>if (se... | GuiceFilter.class, "/*", null); |
638,378 | private static String createJwtEs(String projectId, String privateKeyFile) throws NoSuchAlgorithmException, IOException, InvalidKeySpecException {<NEW_LINE>DateTime now = new DateTime();<NEW_LINE>// Create a JWT to authenticate this device. The device will be disconnected after the token<NEW_LINE>// expires, and will h... | kf = KeyFactory.getInstance("EC"); |
1,246,140 | public void executeStreamQuery(final ServerWebSocket webSocket, final MultiMap requestParams, final KsqlSecurityContext ksqlSecurityContext, final Context context) {<NEW_LINE>try {<NEW_LINE>final long startTimeNanos = Time.SYSTEM.nanoseconds();<NEW_LINE>activenessRegistrar.updateLastRequestTime();<NEW_LINE>validateVers... | log.debug("Timeout while processing request", e); |
226,136 | private void registerImportOriginRegistryIfNecessary(ConfigurableListableBeanFactory beanFactory) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Retrieving import origins if necessary");<NEW_LINE>}<NEW_LINE>String importRegistryBeanName = ConfigurationClassPostProcessor.class.getName() + ".importRegis... | beanType = beanFactory.getType(name); |
980,178 | public String multiply(String num1, String num2) {<NEW_LINE>if (isZero(num1) || isZero(num2)) {<NEW_LINE>return "0";<NEW_LINE>}<NEW_LINE>int[] a1 = new int[num1.length()];<NEW_LINE>int[] a2 = new int[num2.length()];<NEW_LINE>int[] product = new int[num1.length(<MASK><NEW_LINE>for (int i = a1.length - 1; i >= 0; i--) {<... | ) + num2.length()]; |
55,522 | private PreviewPreset readXML(Document document) {<NEW_LINE>// For retrieving property class if it is not in the xml (old serialization)<NEW_LINE>DefaultPreset // For retrieving property class if it is not in the xml (old serialization)<NEW_LINE>defaultPreset = new DefaultPreset();<NEW_LINE>Element presetE = document.g... | PreviewProperties.readValueFromText(stringValue, valueClass); |
641,276 | public static void doTeleportEffect(World world, double x, double y, double z) {<NEW_LINE>Random random = world.rand;<NEW_LINE>for (int i = 0; i < 100; ++i) {<NEW_LINE>double d = random.nextDouble() * 2D;<NEW_LINE>double mag = 2;<NEW_LINE>double motionX = (0.5 - random.nextDouble()) * mag * d;<NEW_LINE>double motionY =... | ).effectRenderer.addEffect(entityfx); |
1,141,115 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "mfxer");<NEW_LINE>final IOperandTreeNode targetR... | 1L), dw, tmpVar1)); |
1,688,724 | public HttpClient build() {<NEW_LINE>java.net.http.HttpClient.Builder httpClientBuilder = this.httpClientBuilder == null ? java.net.http.HttpClient.newBuilder() : this.httpClientBuilder;<NEW_LINE>httpClientBuilder = (this.connectionTimeout != null) ? httpClientBuilder.connectTimeout(this.connectionTimeout) : httpClient... | ProxyOptions.fromConfiguration(buildConfiguration) : proxyOptions; |
1,759,037 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>super.onCreateView(inflater, container, savedInstanceState);<NEW_LINE>sharedPrefs = context.getSharedPreferences("com.klinker.android.twitter_world_preferences", 0);<NEW_LINE><MASK><NEW_LINE>layout = inflater.in... | settings = AppSettings.getInstance(context); |
912,671 | public void propagateTtl(InstanceState state) {<NEW_LINE>var data = getStateData(state);<NEW_LINE>final var triggered = data.updateClock(state.getPortValue(PORT_INDEX_CLK), StdAttr.TRIG_RISING);<NEW_LINE>var counter = data.getValue().toLongValue();<NEW_LINE>if (triggered) {<NEW_LINE>final var nClear = state.getPortValu... | = (counter + 1) & 15; |
1,087,993 | public AutoScaleVmGroupResponse createAutoScaleVmGroupResponse(AutoScaleVmGroup vmGroup) {<NEW_LINE>AutoScaleVmGroupResponse response = new AutoScaleVmGroupResponse();<NEW_LINE>response.setId(vmGroup.getUuid());<NEW_LINE>response.setMinMembers(vmGroup.getMinMembers());<NEW_LINE>response.setMaxMembers(vmGroup.getMaxMemb... | = new ArrayList<AutoScalePolicy>(); |
1,755,389 | public void paintComponent(java.awt.Graphics g) {<NEW_LINE>if (res.isOverrideMode()) {<NEW_LINE>if (res.isOverridenResource(getText())) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>if (charged) {<NEW_LINE>DELETE_ICON.paintIcon(this, g, getWidth() - X_ICON.getIconWidth(), 0);<NEW_LINE>} else {<NEW_LINE>Graphics2D g2d = ... | X_ICON.getIconWidth(), 0); |
127,571 | private ApproximationLine approximateUpperHull(ConvexHull convexHull, double[] log_k, double[] log_kDist) {<NEW_LINE>StringBuilder msg = LOG.isDebugging() ? new StringBuilder(1000) : null;<NEW_LINE>int[] upperHull = convexHull.getUpperHull();<NEW_LINE>int u = convexHull.getNumberOfPointsInUpperHull();<NEW_LINE>int k_0 ... | - log_kDist[k - k_0]); |
805,486 | private static boolean checkLineStats(InsnNode t, InsnNode e) {<NEW_LINE>if (t.getResult() == null || e.getResult() == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>PhiInsn tPhi = t.getResult().getSVar().getOnlyOneUseInPhi();<NEW_LINE>PhiInsn ePhi = e.getResult().getSVar().getOnlyOneUseInPhi();<NEW_LINE>if (ePhi =... | int sourceLine = assignInsn.getSourceLine(); |
220,120 | private void removeEntries(final ActivitiesEntry[] toRemove, final int startIndex) {<NEW_LINE>final ActivitiesEntry entry = toRemove[startIndex];<NEW_LINE>if (entry == null || ActivitiesConstants.TYPEID_HEADER.equals(entry.getTypeID())) {<NEW_LINE>int nextIndex = startIndex + 1;<NEW_LINE>if (nextIndex < toRemove.length... | { 2, 0, 1 }); |
1,024,374 | public MHRMovement saveMovement() {<NEW_LINE>MHRConcept concept = MHRConcept.getById(Env.getCtx(), getConceptId(), null);<NEW_LINE>MHRMovement movement = new MHRMovement(Env.getCtx(), movementId, null);<NEW_LINE>I_HR_Period payrollPeriod = getPayrollProcess().getHR_Period();<NEW_LINE>movement.setSeqNo(concept.getSeqNo(... | movement.setValidFrom(getValidFrom()); |
894,094 | public static String leftPad(String message, int spaces) {<NEW_LINE>StringBuilder returnMessage = new StringBuilder();<NEW_LINE>String padding = StringUtils.leftPad("", spaces);<NEW_LINE>int paddingWidth = getPxMessageWidth(padding);<NEW_LINE>String[] parts = StringUtils.split(message, ' ');<NEW_LINE>int lineWidth = pa... | (finishedLine).append("\n"); |
1,175,235 | protected static final <R extends Record, TR extends Table<R>, T, X, U> TableField<R, U> createField(Name name, DataType<T> type, TR table, String comment, Converter<X, U> converter, Binding<T, X> binding, Generator<R, TR, U> generator) {<NEW_LINE>Binding<T, U> actualBinding = DefaultBinding.newBinding(converter, type,... | type : type.asConvertedDataType(actualBinding); |
45,274 | public static AlertDialog selectGPXFile(final Activity activity, final boolean showCurrentGpx, final boolean multipleChoice, final CallbackWithObject<GPXFile[]> callbackWithObject, boolean nightMode) {<NEW_LINE>int dialogThemeRes = nightMode ? R.style.OsmandDarkTheme : R.style.OsmandLightTheme;<NEW_LINE>OsmandApplicati... | getSortedGPXFilesInfo(dir, null, false); |
640,165 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LINE>List<String> ids = bu... | emc.beginTransaction(IMConversationExt.class); |
1,048,587 | public void run() {<NEW_LINE>Context context = mCore.getContext();<NEW_LINE>String mainProc = context.getPackageName();<NEW_LINE>if (mainProc.contains(":")) {<NEW_LINE>mainProc = mainProc.substring(0, mainProc.indexOf(":"));<NEW_LINE>}<NEW_LINE>ActivityManager am = (ActivityManager) context.getSystemService(Context.ACT... | importance + ", reason = " + item.importanceReasonComponent); |
1,203,114 | private void initialize() {<NEW_LINE>Map<String, Set<String>> contextToSet = new HashMap<String, Set<String>>();<NEW_LINE>ResourceBundle bundle = <MASK><NEW_LINE>Enumeration enumeration = bundle.getKeys();<NEW_LINE>while (enumeration.hasMoreElements()) {<NEW_LINE>String bundleKey = (String) enumeration.nextElement();<N... | NbBundle.getBundle(AssistantMessages.class); |
1,664,309 | private static TransitGatewayRouteTable create(@Nullable @JsonProperty(JSON_KEY_TRANSIT_GATEWAY_ID) String gatewayId, @Nullable @JsonProperty(JSON_KEY_TRANSIT_GATEWAY_ROUTE_TABLE_ID) String routeTableId, @Nullable @JsonProperty(JSON_KEY_DEFAULT_ASSOCIATION_ROUTE_TABLE) Boolean defaultAssociationRouteTable, @Nullable @J... | routeTableId, gatewayId, defaultAssociationRouteTable, defaultPropagationRouteTable); |
1,270,820 | public void deserialize(ByteBuffer buffer) throws IllegalPathException {<NEW_LINE>int length = buffer.getInt();<NEW_LINE>byte[] bytes = new byte[length];<NEW_LINE>buffer.get(bytes);<NEW_LINE>path = new <MASK><NEW_LINE>dataType = TSDataType.values()[buffer.get()];<NEW_LINE>encoding = TSEncoding.values()[buffer.get()];<N... | PartialPath(new String(bytes)); |
1,147,010 | private void loadFamilyFonts(String family) {<NEW_LINE>// In this method, we load all fonts for a given family,<NEW_LINE>// as we don't know which styles and weights will be used.<NEW_LINE>if (_loadedFontFamilies.contains(family)) {<NEW_LINE>return;<NEW_LINE>} else {<NEW_LINE>_loadedFontFamilies.add(family);<NEW_LINE>}... | LogMessageId1Param.EXCEPTION_COULD_NOT_LOAD_FONT, entry.src); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.