idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,358,870 | public String render(EnumModel model, int index, int size, Map<String, Object> session) {<NEW_LINE>if (isExcludedClass(model.getType().getName())) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>StringWriter sw = new StringWriter();<NEW_LINE>PrintWriter writer = new PrintWriter(sw);<NEW_LINE>if (index == 0) {<NEW_LINE>Util... | .print(includeFileIfPresent("enum.footer.d.ts")); |
6,055 | final GetLaunchTemplateDataResult executeGetLaunchTemplateData(GetLaunchTemplateDataRequest getLaunchTemplateDataRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getLaunchTemplateDataRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,451,596 | public void toggleSimilarNames() {<NEW_LINE>ArrayList<MASK><NEW_LINE>for (int i = 0; i < checkedItemsIndexes.size(); i++) {<NEW_LINE>LayoutElementParcelable selectedElement = getItemsDigested().get(checkedItemsIndexes.get(i)).getElem();<NEW_LINE>int fuzzinessFactor = selectedElement.title.length() / SelectionPopupMenu.... | <Integer> checkedItemsIndexes = getCheckedItemsIndex(); |
1,291,311 | private void completeUDPWrite(InetSocketAddress srcAddr, InetSocketAddress dstAddr, ByteBuf udpBuf, ByteBufAllocator byteBufAllocator, ChannelHandlerContext ctx) {<NEW_LINE>ByteBuf ipBuf = byteBufAllocator.buffer();<NEW_LINE>ByteBuf ethernetBuf = byteBufAllocator.buffer();<NEW_LINE>ByteBuf pcap = byteBufAllocator.buffe... | getAddress().getAddress()); |
841,172 | private String[] generateListenerMethodHeader(String methodName, Method originalMethod, Writer writer) throws IOException {<NEW_LINE>Class[] paramTypes = originalMethod.getParameterTypes();<NEW_LINE>String[] paramNames;<NEW_LINE>if (paramTypes.length == 1 && EventObject.class.isAssignableFrom(paramTypes[0])) {<NEW_LINE... | .write(paramNames[i]); |
463,073 | public Object importSaleOrderFromSupplyChain(Object bean, Map<String, Object> values) {<NEW_LINE>try {<NEW_LINE>SaleOrderWorkflowService saleOrderWorkflowService = <MASK><NEW_LINE>StockMoveService stockMoveService = Beans.get(StockMoveService.class);<NEW_LINE>SaleOrder saleOrder = (SaleOrder) importSaleOrder.importSale... | Beans.get(SaleOrderWorkflowService.class); |
1,029,875 | public List<CatalogPartitionSpec> listPartitions(ObjectPath tablePath, CatalogPartitionSpec partitionSpec) throws TableNotExistException, TableNotPartitionedException, PartitionSpecInvalidException, CatalogException {<NEW_LINE>try {<NEW_LINE>Iterator<Partition> partitionIterator = getCurrentOdps().tables().get(tablePat... | partitionMap = new LinkedHashMap<>(); |
472,455 | // autogenerated by CtBiScannerGenerator<NEW_LINE>@java.lang.Override<NEW_LINE>public <T> void visitCtArrayWrite(final spoon.reflect.code.CtArrayWrite<T> arrayWrite) {<NEW_LINE>spoon.reflect.code.CtArrayWrite other = ((spoon.reflect.code.CtArrayWrite) (this.stack.peek()));<NEW_LINE>enter(arrayWrite);<NEW_LINE>biScan(sp... | ), other.getTypeCasts()); |
773,918 | public void connect(final OnTransportConnected callback) {<NEW_LINE>new Thread(() -> {<NEW_LINE>final int timeout = candidate.getType() == JingleCandidate.TYPE_DIRECT ? SOCKET_TIMEOUT_DIRECT : SOCKET_TIMEOUT_PROXY;<NEW_LINE>try {<NEW_LINE>final boolean useTor = this.account.isOnion() || connection.getConnectionManager(... | ), candidate.getPort()); |
1,190,789 | protected void startSession(Capabilities capabilities) {<NEW_LINE>Response response = <MASK><NEW_LINE>if (response == null) {<NEW_LINE>throw new SessionNotCreatedException("The underlying command executor returned a null response.");<NEW_LINE>}<NEW_LINE>Object responseValue = response.getValue();<NEW_LINE>if (responseV... | execute(new AppiumNewSessionCommandPayload(capabilities)); |
3,592 | static void registerTypeAdapters(final Moshi.Builder moshiBuilder, final JsonProvider.Flag... flags) {<NEW_LINE>moshiBuilder.add(Date.class, applyFlagsToAdapter(new DateTypeAdapter(), flags));<NEW_LINE>moshiBuilder.add(Instant.class, applyFlagsToAdapter(new InstantTypeAdapter(), flags));<NEW_LINE>moshiBuilder.add(X509C... | new LongAdderTypeAdaptor(), flags)); |
946,064 | public void writeText(char c) throws IOException {<NEW_LINE>// process the rest<NEW_LINE>if (c == '<') {<NEW_LINE>super.w.write("<");<NEW_LINE>} else if (c == '>') {<NEW_LINE><MASK><NEW_LINE>} else if (c == '&') {<NEW_LINE>super.w.write("&");<NEW_LINE>} else if (c == '"') {<NEW_LINE>super.w.write(""");<NEW_... | super.w.write(">"); |
971,827 | public void openConsole(String absolutePath) throws IOException {<NEW_LINE>Runtime runtime = Runtime.getRuntime();<NEW_LINE>Process p = runtime.exec("readlink /etc/alternatives/x-terminal-emulator");<NEW_LINE>BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));<NEW_LINE>String emulator... | (File.separator) + 1); |
331,803 | private void switchType(boolean writable) {<NEW_LINE>int index = findMatchingComboItem();<NEW_LINE>if (index == -1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String s = typeComboBox<MASK><NEW_LINE>int last = s.indexOf("<");<NEW_LINE>String suffix = last == -1 ? "" : s.substring(last);<NEW_LINE>if (writable) {<NEW_LINE>typ... | .getSelectedItem().toString(); |
196,064 | private void initializeMeta() throws BlockAlreadyExistsException, IOException, WorkerOutOfSpaceException, InvalidPathException {<NEW_LINE>// Create the storage directory path<NEW_LINE>boolean isDirectoryNewlyCreated = FileUtils.createStorageDirPath(mDirPath, ServerConfiguration.getString(PropertyKey.WORKER_DATA_FOLDER_... | "can not delete file {}", path.getAbsolutePath()); |
1,394,028 | private static int[] square(int[] w, int[] x) {<NEW_LINE>// Note: this method allows w to be only (2 * x.Length - 1) words if result will fit<NEW_LINE>// if (w.length != 2 * x.length)<NEW_LINE>// {<NEW_LINE>// throw new IllegalArgumentException("no I don't think so...");<NEW_LINE>// }<NEW_LINE>long c;<NEW_LINE>int wBas... | (x[j] & IMASK); |
743,690 | private GroupManager.GroupActionResult fetchGroupStateAndSendUpdate(@NonNull Recipient groupRecipient, @NonNull DecryptedGroup decryptedGroup, @NonNull DecryptedGroupChange decryptedChange, @NonNull GroupChange signedGroupChange) throws GroupChangeFailedException, IOException {<NEW_LINE>try {<NEW_LINE>new GroupsV2State... | add(new RequestGroupV2InfoJob(groupId)); |
1,593,087 | public void transform(Templates xslt, Map<String, Object> transformParameters, Result result) throws Docx4JException {<NEW_LINE>// JAXBResult result = XmlUtils.prepareJAXBResult(jc);<NEW_LINE>if (jaxbElement == null) {<NEW_LINE>PartStore partStore = this.getPackage().getSourcePartStore();<NEW_LINE>String name = this.ge... | .docx4j.XmlUtils.neww3cDomDocument(); |
1,059,045 | protected void init(Properties props) throws BadRealmException, NoSuchRealmException {<NEW_LINE>super.init(props);<NEW_LINE>String file = props.getProperty(PARAM_KEYFILE);<NEW_LINE>if (file == null) {<NEW_LINE>throw new BadRealmException<MASK><NEW_LINE>}<NEW_LINE>if (file.contains("$")) {<NEW_LINE>file = RelativePathRe... | (sm.getString("filerealm.nofile")); |
332,210 | public TransitionState unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TransitionState transitionState = new TransitionState();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
808,563 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "symbol" };<NEW_LINE>sendTimer(env, 1000);<NEW_LINE>String text = "@name('s0') select irstream * from SupportMarketDataBean#time_length_batch(10 sec, 3, 'force_update')";<NEW_LINE>env.compileDeployAddListenerMileZero(text, "s0");<NEW... | "s0", fields, null, null); |
747,915 | void UIThreadInit(@NonNull final GLViewHolder viewHolder, @Nullable final HttpHandler handler) {<NEW_LINE>// Use the DefaultHttpHandler if none is provided<NEW_LINE>if (handler == null) {<NEW_LINE>httpHandler = new DefaultHttpHandler();<NEW_LINE>} else {<NEW_LINE>httpHandler = handler;<NEW_LINE>}<NEW_LINE>Context conte... | = new MapRenderer(this, uiThreadHandler); |
1,441,187 | private // ---------//<NEW_LINE>void addSlur(SlurInter slur, Integer num, HorizontalSide side, boolean continuation) {<NEW_LINE>final Staff staff = current.note.getStaff();<NEW_LINE>final CubicCurve2D curve = slur.getCurve();<NEW_LINE>// Slur element<NEW_LINE>final Slur pmSlur = factory.createSlur();<NEW_LINE>if (num !... | AboveBelow.ABOVE : AboveBelow.BELOW); |
584,866 | public static void show(final Context context, @NonNull final MuteSelectionListener listener) {<NEW_LINE>AlertDialog.Builder builder = new AlertDialog.Builder(context);<NEW_LINE>builder.setTitle(R.string.menu_mute);<NEW_LINE>builder.setNegativeButton(R.string.cancel, null);<NEW_LINE>builder.setItems(R.array.mute_durati... | TimeUnit.DAYS.toSeconds(1); |
481,570 | public // added by Gary - ghuang@cs.umass.edu<NEW_LINE>InstanceList sampleWithWeights(java.util.Random r, double[] weights) {<NEW_LINE>if (weights.length != size())<NEW_LINE>throw new IllegalArgumentException("length of weight vector must equal number of instances");<NEW_LINE>if (size() == 0)<NEW_LINE>return cloneEmpty... | .add(get(b)); |
395,721 | /* *<NEW_LINE>* Remove the redundant rows for the same option based on the scope and return<NEW_LINE>* the value that takes precedence over others. For example the option set in session<NEW_LINE>* scope takes precedence over system and boot and etc.,<NEW_LINE>*/<NEW_LINE>public Iterator<OptionValue> sortOptions(Iterato... | (optionsmap.get(name)); |
709,121 | private static SuggestedFix convertListToSetInit(VariableTree var, VisitorState state) {<NEW_LINE>SuggestedFix.Builder fix = SuggestedFix.builder().addImport(ImmutableSet.class.getName()).replace(stripParameters(var.getType()), "ImmutableSet");<NEW_LINE>if (IMMUTABLE_LIST_FACTORIES.matches(var.getInitializer(), state))... | .getIdentifier()), "ImmutableSet.Builder"); |
975,368 | public void calculateDerivedFields() {<NEW_LINE>// In doubleton sets, the rate of different alleles over het sites is half the replication rate,<NEW_LINE>biSiteHeterogeneityRate = nDifferentAllelesBiDups / (double) (nDifferentAllelesBiDups + nAlternateAllelesBiDups + nReferenceAllelesBiDups);<NEW_LINE>biSiteHomogeneity... | + nMismatchingUMIsInSameBiDups) / (double) nExactlyDouble; |
972,301 | public boolean onGenericMotion(View v, MotionEvent event) {<NEW_LINE>if (activity.joystickActive == false) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int id = event.getDeviceId();<NEW_LINE>int index = activity.indexOfJoystick(id);<NEW_LINE>if (index >= 0) {<NEW_LINE>float ax = event.getAxisValue(MotionEvent.AXIS_X, 0... | index, 1, 0, az); |
281,159 | public void toGraphviz(@Nullable CircuitOperator sourceToShow, boolean deep, int indent, StringBuilder builder) {<NEW_LINE>String src = sourceToShow != null ? sourceToShow.graphvizId() : this.source.graphvizId();<NEW_LINE>for (Pair<ComputationalElement, ComputationalElement> cp : this.consumers) {<NEW_LINE>Utilities.in... | ("\"]").append("\n"); |
532,831 | private static RequestInput parseRequest(ChannelHandlerContext ctx, FullHttpRequest req, QueryStringDecoder decoder) {<NEW_LINE>String requestId = NettyUtils.<MASK><NEW_LINE>RequestInput inputData = new RequestInput(requestId);<NEW_LINE>if (decoder != null) {<NEW_LINE>for (Map.Entry<String, List<String>> entry : decode... | getRequestId(ctx.channel()); |
1,412,118 | private void sortTypeDescContextItems(BallerinaCompletionContext context, List<LSCompletionItem> completionItems) {<NEW_LINE>for (LSCompletionItem lsItem : completionItems) {<NEW_LINE>String sortText = "";<NEW_LINE>boolean isModuleCItem = SortingUtil.isModuleCompletionItem(lsItem);<NEW_LINE>if (!isModuleCItem && lsItem... | ) + genSortTextForModule(context, lsItem); |
1,100,545 | private CCLicense retrieveLicenseObject(final String licenseId, CloseableHttpResponse response) throws IOException, JDOMException {<NEW_LINE>String responseString = EntityUtils.toString(response.getEntity());<NEW_LINE>XPathExpression<Object> licenseClassXpath = XPathFactory.instance().compile("//licenseclass", Filters.... | this.parser.build(is); |
739,665 | protected static BufferedImage applyExplicitMask(BufferedImage baseImage, Color fill) {<NEW_LINE>// create an<NEW_LINE>int baseWidth = baseImage.getWidth();<NEW_LINE>int baseHeight = baseImage.getHeight();<NEW_LINE>BufferedImage imageMask;<NEW_LINE>if (hasAlpha(baseImage)) {<NEW_LINE>imageMask = baseImage;<NEW_LINE>} e... | int fillRgb = fill.getRGB(); |
609,695 | public VoidResult extendBucketWorm(ExtendBucketWormRequest extendBucketWormRequest) throws OSSException, ClientException {<NEW_LINE>assertParameterNotNull(extendBucketWormRequest, "extendBucketWormRequest");<NEW_LINE>String bucketName = extendBucketWormRequest.getBucketName();<NEW_LINE>String wormId = extendBucketWormR... | HashMap<String, String>(); |
1,301,648 | public Container andNot(BitmapContainer x) {<NEW_LINE>// could be implemented as toTemporaryBitmap().iandNot(x);<NEW_LINE>int card = this.getCardinality();<NEW_LINE>if (card <= ArrayContainer.DEFAULT_MAX_SIZE) {<NEW_LINE>// result can only be an array (assuming that we never make a RunContainer)<NEW_LINE>ArrayContainer... | cardinalityInRange(lastPos, BitmapContainer.MAX_CAPACITY); |
244,568 | public OCompositeKey preprocess(OCompositeKey value, Object... hints) {<NEW_LINE>if (value == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final OType[] types = (OType[]) hints;<NEW_LINE>final List<Object> keys = value.getKeys();<NEW_LINE>boolean preprocess = false;<NEW_LINE>for (int i = 0; i < keys.size(); i++) {... | addKey(calendar.getTime()); |
661,784 | public ListSnapshotsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListSnapshotsResult listSnapshotsResult = new ListSnapshotsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | )).unmarshall(context)); |
1,160,309 | public void convertToJson(BpmnJsonConverterContext converterContext, BaseElement baseElement, ActivityProcessor processor, BpmnModel model, FlowElementsContainer container, ArrayNode shapesArrayNode, double subProcessX, double subProcessY) {<NEW_LINE>MessageFlow messageFlow = (MessageFlow) baseElement;<NEW_LINE>ObjectN... | EDITOR_BOUNDS_Y, graphicInfo.getY()); |
444,716 | public void run(RegressionEnvironment env) {<NEW_LINE>String name = "MyContextStartS0EndS1";<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String contextEPL = "@name('ctx') @public create context MyContextStartS0EndS1 start SupportBean_S0 as s0 end SupportBean_S1";<NEW_LINE>env.compileDeploy(contextEPL,... | sendEventBean(new SupportBean_S0(1)); |
69,852 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String serviceTopologyName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,166,830 | private String processCompiledCode(DefDescriptor<ModuleDef> descriptor, String code, CodeType codeType, Location location) throws InvalidDefinitionException {<NEW_LINE>StringBuilder processedCode = new StringBuilder();<NEW_LINE>if (codeType == CodeType.COMPAT || codeType == CodeType.PROD_COMPAT) {<NEW_LINE>String amdSt... | (module).append("}"); |
1,821,445 | private void loadNode44() {<NEW_LINE>DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.AddReferencesItem_Encoding_DefaultBinary, new QualifiedName(0, "Default Binary"), new LocalizedText("en", "Default Binary"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0)<MASK... | , UByte.valueOf(0)); |
547,476 | private void processLocalProperty(PropertyTokenHolder tokens, PropertyValue pv) {<NEW_LINE>PropertyHandler ph = getLocalPropertyHandler(tokens.actualName);<NEW_LINE>if (ph == null || !ph.isWritable()) {<NEW_LINE>if (pv.isOptional()) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Ignoring optional valu... | tokens.canonicalName + "'", ex); |
1,278,264 | public PurchaseOrder mergePurchaseOrders(List<PurchaseOrder> purchaseOrderList, Currency currency, Partner supplierPartner, Company company, StockLocation stockLocation, Partner contactPartner, PriceList priceList, TradingName tradingName) throws AxelorException {<NEW_LINE>String numSeq = "";<NEW_LINE>String externalRe... | ), priceList, supplierPartner, tradingName); |
519,418 | private void initializeViews() {<NEW_LINE>setContentView(R.layout.activity_pc_view);<NEW_LINE>UiHelper.notifyNewRootView(this);<NEW_LINE>// Set default preferences if we've never been run<NEW_LINE>PreferenceManager.setDefaultValues(this, R.xml.preferences, false);<NEW_LINE>// Set the correct layout for the PC grid<NEW_... | findViewById(R.id.helpButton); |
1,468,654 | public void addRuleInstances(Digester digester) {<NEW_LINE>digester.addObjectCreate(PATTERN_ROOT, JRSimpleTemplate.class);<NEW_LINE>digester.addCallMethod(PATTERN_INCLUDED_TEMPLATE, "addIncludedTemplate", 0);<NEW_LINE>digester.addFactoryCreate(PATTERN_STYLE, JRTemplateStyleFactory.class);<NEW_LINE>digester.addSetNext(P... | Left.class.getName()); |
418,413 | public Unit call() throws IOException, StreamNotFoundException, ShellNotRunningException, IllegalArgumentException {<NEW_LINE>OutputStream outputStream;<NEW_LINE>File destFile = null;<NEW_LINE>switch(fileAbstraction.scheme) {<NEW_LINE>case CONTENT:<NEW_LINE>Objects.requireNonNull(fileAbstraction.uri);<NEW_LINE>if (file... | write(dataToSave.getBytes()); |
778,759 | public void cancelRequest(DnsMessage msg, boolean isTimeout) {<NEW_LINE>if (c_logger.isTraceEntryExitEnabled())<NEW_LINE>c_logger.traceEntry(this, "SipResolver: cancelRequest: entry id=" + hashCode());<NEW_LINE>RequestPending request;<NEW_LINE>synchronized (_requestPending) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()... | c_logger.traceExit(this, "SipResolver: cancelRequest: exit"); |
465,414 | private static void addContentsOfFolderToManifest(String folderPath, String pathPrefix, ArrayList<String> manifest) {<NEW_LINE>File folder = new File(folderPath);<NEW_LINE>File[] folderFiles = folder.listFiles();<NEW_LINE>for (File file : folderFiles) {<NEW_LINE>String fileName = file.getName();<NEW_LINE><MASK><NEW_LIN... | String fullFilePath = file.getAbsolutePath(); |
1,508,591 | private boolean isCurrentUserAdminJ() {<NEW_LINE>boolean adm = false;<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>setEnvironmentVariable("LANG", "C", EnvironmentScope.PROCESS, false);<NEW_LINE>setEnvironmentVariable("LC_COLLATE", "C", EnvironmentScope.PROCESS, false);<NEW_LINE>setEnvironmentVariable("LC_CTYPE", "C", Environ... | ("uid=([0-9]+)\\(").matcher(stdout); |
1,431,596 | public static ListAggregateConfigRulesResponse unmarshall(ListAggregateConfigRulesResponse listAggregateConfigRulesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAggregateConfigRulesResponse.setRequestId(_ctx.stringValue("ListAggregateConfigRulesResponse.RequestId"));<NEW_LINE>ConfigRules configRules = new ConfigRu... | ("ListAggregateConfigRulesResponse.ConfigRules.ConfigRuleList[" + i + "].CreateBy.AggregatorName")); |
188,550 | TypeBinding substituteInferenceVariable(InferenceVariable var, TypeBinding substituteType) {<NEW_LINE>if (this.inRecursiveFunction)<NEW_LINE>return this;<NEW_LINE>this.inRecursiveFunction = true;<NEW_LINE>try {<NEW_LINE>boolean haveSubstitution = false;<NEW_LINE>ReferenceBinding currentSuperclass = this.superclass;<NEW... | int length = this.superInterfaces.length; |
405,329 | protected void initialize(ThrowAnalysis throwAnalysis, boolean omitExceptingUnitEdges) {<NEW_LINE>int size = unitChain.size();<NEW_LINE>if (Options.v().time()) {<NEW_LINE>Timers.v().graphTimer.start();<NEW_LINE>}<NEW_LINE>unitToUnexceptionalSuccs = new LinkedHashMap<Unit, List<Unit>>(size * 2 + 1, 0.7f);<NEW_LINE>unitT... | size * 2 + 1, 0.7f); |
402,608 | public CompletableFuture<Void> updateCheckpoint(CompleteLease lease, Checkpoint checkpoint) {<NEW_LINE>AzureBlobLease updatedLease = new AzureBlobLease((AzureBlobLease) lease);<NEW_LINE>TRACE_LOGGER.debug(this.hostContext.withHostAndPartition(checkpoint.getPartitionId(), "Checkpointing at " + checkpoint.getOffset() + "... | + checkpoint.getSequenceNumber())); |
889,586 | public void updateConfig(String subject, CompatibilityLevel compatibility) throws MojoExecutionException {<NEW_LINE>try {<NEW_LINE>String updatedCompatibility;<NEW_LINE>if (subject.equalsIgnoreCase("null") || subject.equals("__GLOBAL")) {<NEW_LINE>updatedCompatibility = this.client().updateCompatibility(null, compatibi... | subject, compatibility.toString()); |
1,548,998 | protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException, ServletException {<NEW_LINE>JsonObject input = InputParser.parseJsonObjectOrThrowError(req);<NEW_LINE>String email = InputParser.parseStringOrThrowError(input, "email", false);<NEW_LINE>String password = InputParser.parseStringO... | normalisedEmail = Utils.normaliseEmail(email); |
419,248 | private <K> K wrapHttpExecute(Class<K> returnType, CloseableHttpClient httpClient, HttpUriRequest httpUriRequest, Map<String, String> headers) throws IOException {<NEW_LINE>CloseableHttpResponse response;<NEW_LINE>String xid = RootContext.getXID();<NEW_LINE>if (xid != null) {<NEW_LINE>headers.put(RootContext.KEY_XID, x... | headers.forEach(httpUriRequest::addHeader); |
1,324,139 | protected void paintLoc(Graphics2D g2, String loc) {<NEW_LINE>Map map = getMapEnv().getMap();<NEW_LINE>Point2D pt = map.getPosition(loc);<NEW_LINE>if (pt != null) {<NEW_LINE>int x = x(pt);<NEW_LINE>int y = y(pt);<NEW_LINE>String info = "";<NEW_LINE>List<String> track = new ArrayList<>();<NEW_LINE>if (!env.getAgents().i... | list = new ArrayList<>(); |
637,515 | public void marshall(ChannelMessageCallback channelMessageCallback, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (channelMessageCallback.getMessageId() != null) {<NEW_LINE>String messageId = channelMessageCallback.getMessageId();<NEW_LINE>jsonWriter.name("MessageId");<NEW_... | String metadata = channelMessageCallback.getMetadata(); |
512,208 | // **********************************************************************<NEW_LINE>// Check for illegal re-assignment<NEW_LINE>// **********************************************************************<NEW_LINE>@Override<NEW_LINE>public Void visitUnary(UnaryTree tree, Void p) {<NEW_LINE>Tree.Kind treeKind = tree.getKind... | valueType = atypeFactory.getAnnotatedTypeRhsUnaryAssign(tree); |
1,661,806 | public void paint(Graphics g) {<NEW_LINE>List target = (List) _target;<NEW_LINE>Dimension sz = target.getSize();<NEW_LINE>int w = sz.width;<NEW_LINE>int h = sz.height;<NEW_LINE>g.setColor(target.getBackground());<NEW_LINE>FakePeerUtils.drawLoweredBox(g, 0, 0, w, h);<NEW_LINE><MASK><NEW_LINE>if (n <= 0)<NEW_LINE>return;... | int n = target.getItemCount(); |
1,127,457 | public static List<String> cutString(String s, ChatFormatting defaultColor, ChatFormatting highlightColor, int indent) {<NEW_LINE>// Apply markup<NEW_LINE>String markedUp = s.replaceAll("_([^_]+)_", highlightColor + "$1" + defaultColor);<NEW_LINE>// Split words<NEW_LINE>List<String> words = new LinkedList<>();<NEW_LINE... | String format = defaultColor.toString(); |
761,761 | public void onRenderTooltip(RenderTooltipEvent.PostText event) {<NEW_LINE>ItemStack stack = event.getStack();<NEW_LINE>if (stack.getItem() instanceof IBulletContainer) {<NEW_LINE>NonNullList<ItemStack> bullets = ((IBulletContainer) stack.getItem()).getBullets(stack);<NEW_LINE>if (bullets != null) {<NEW_LINE>int bulletA... | scale(.5f, .5f, 1); |
46,829 | static Map<Address, List<Shard>> assignShards(Collection<Shard> shards, Collection<Address> addresses) {<NEW_LINE>Map<String, List<Shard>> nodeCandidates = shards.stream().collect(groupingBy(Shard::getIp));<NEW_LINE>Map<Address, List<Shard>> nodeAssigned = new HashMap<>();<NEW_LINE>if (!addresses.stream().map(Address::... | getOrDefault(host, emptyList()); |
1,669,403 | private void split(double[] e, int p, int k, boolean wantu) {<NEW_LINE>double f = e[k - 1];<NEW_LINE>e[k - 1] = 0.0;<NEW_LINE>for (int j = k; j < p; j++) {<NEW_LINE>double t = FastMath.hypot(s[j], f);<NEW_LINE>double cs = s[j] / t;<NEW_LINE>double sn = f / t;<NEW_LINE>s[j] = t;<NEW_LINE>f = -sn * e[j];<NEW_LINE>e[j<MAS... | ] = cs * e[j]; |
381,076 | private void addThisOrSuperConstructor(final Env env, final TypeMirror type, final Element elem, final String name, final ExecutableElement toExclude) throws IOException {<NEW_LINE>final CompilationController controller = env.getController();<NEW_LINE>final Elements elements = controller.getElements();<NEW_LINE>final T... | Scope scope = env.getScope(); |
578,906 | private void initializeBcp47LanguageMap() {<NEW_LINE>Map<String, String> regionsMap;<NEW_LINE>Map<String, String> languagesMap;<NEW_LINE>ourLog.info("Loading BCP47 Language Registry");<NEW_LINE>String input = ClasspathUtil.loadResource("org/hl7/fhir/common/hapi/validation/support/registry.json");<NEW_LINE>ArrayNode map... | .code(694) + e); |
1,377,730 | protected Object handleFallback(Invocation inv, String fallback, String defaultFallback, Class<?>[] fallbackClass, Throwable ex) throws Throwable {<NEW_LINE>Object[] originArgs = inv.getArgs();<NEW_LINE>// Execute fallback function if configured.<NEW_LINE>Method fallbackMethod = <MASK><NEW_LINE>if (fallbackMethod != nu... | extractFallbackMethod(inv, fallback, fallbackClass); |
471,359 | protected Object convertToInternal(Object payload, MessageHeaders headers, Object conversionHint) {<NEW_LINE>// encode payload to json string or byte[]<NEW_LINE>Object obj = null;<NEW_LINE>if (byte[].class == getSerializedPayloadClass()) {<NEW_LINE>if (payload instanceof String && config.isJSONB()) {<NEW_LINE>obj = JSO... | ), config.getWriterFeatures()); |
1,364,916 | public ArrayList<Actor> scrapeActors() {<NEW_LINE>Elements castElements = document.select("span.cast");<NEW_LINE>ArrayList<Actor> actorList = new ArrayList<>(castElements.size());<NEW_LINE>for (Element castElement : castElements) {<NEW_LINE>String actressName = castElement.select("span.star a").text().trim();<NEW_LINE>... | .text().trim(); |
167,738 | protected Rectangle calculateTrackRect() {<NEW_LINE>int w = slider.getWidth();<NEW_LINE>int h = slider.getHeight();<NEW_LINE>Rectangle r = new Rectangle();<NEW_LINE>if (slider.getOrientation() == GradientSlider.HORIZONTAL) {<NEW_LINE>r.x = TRIANGLE_SIZE;<NEW_LINE>r.y = 3;<NEW_LINE>r.height = h - TRIANGLE_SIZE - r.y;<NE... | / 2 - r.width / 2; |
1,614,901 | private void mergeBucketsWithPlan(List<Bucket> buckets, List<BucketRange> plan, ReduceContext reduceContext) {<NEW_LINE>for (int i = plan.size() - 1; i >= 0; i--) {<NEW_LINE>BucketRange <MASK><NEW_LINE>int endIdx = range.endIdx;<NEW_LINE>int startIdx = range.startIdx;<NEW_LINE>if (startIdx == endIdx)<NEW_LINE>continue;... | range = plan.get(i); |
62,763 | private int createAcmeFile(WsLocationAdmin wslocation) {<NEW_LINE>acmeFile = wslocation.getServerWorkareaResource(acmeFileName).asFile();<NEW_LINE>if (tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(tc, "Acme history filed prepped from workarea " + acmeFile.getAbsolutePath());<NEW_LINE>}<NEW_LINE>if (acmeFile.exists()) {<NEW_... | fr.write(h + "\n"); |
313,880 | public Object execute(ExecutionEvent event) throws ExecutionException {<NEW_LINE>if (RELEASE_NOTES_URL == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();<NEW_LINE>if (support.isInternalWebBrowserAvailable()) {<NEW_LINE>//... | getExternalBrowser().openURL(RELEASE_NOTES_URL); |
1,667,190 | private void onRestoreFileVersionOperationFinish(RemoteOperationResult result) {<NEW_LINE>if (result.isSuccess()) {<NEW_LINE>OCFile file = getFile();<NEW_LINE>// delete old local copy<NEW_LINE>if (file.isDown()) {<NEW_LINE>List<OCFile> <MASK><NEW_LINE>list.add(file);<NEW_LINE>getFileOperationsHelper().removeFiles(list,... | list = new ArrayList<>(); |
345,482 | public static DescribeGatewayBlockVolumesResponse unmarshall(DescribeGatewayBlockVolumesResponse describeGatewayBlockVolumesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGatewayBlockVolumesResponse.setRequestId<MASK><NEW_LINE>describeGatewayBlockVolumesResponse.setMessage(_ctx.stringValue("DescribeGatewayBlock... | (_ctx.stringValue("DescribeGatewayBlockVolumesResponse.RequestId")); |
283,429 | public void renderResource(String templateName, Map<String, Object> model, Writer writer) {<NEW_LINE>String language = (String) model.get(PippoConstants.REQUEST_PARAMETER_LANG);<NEW_LINE>if (StringUtils.isNullOrEmpty(language)) {<NEW_LINE>language = getLanguageOrDefault(language);<NEW_LINE>}<NEW_LINE>// prepare the loc... | template.render(writer, model); |
239,562 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>// Setting IpAddress To Log and taking header for original IP if forwarded from proxy<NEW_LINE>ShepherdLogManager.setRequestIp(request.getRemoteAddr(), request.getHeader("X-Forwarded-For"));<NEW_... | Getter.getProgressJSON(ApplicationRoot, classId); |
413,267 | public HopDestination unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>HopDestination hopDestination = new HopDestination();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
1,578,962 | public String test() {<NEW_LINE>// AppsServer<NEW_LINE>String server = p_data.getAppsServer();<NEW_LINE>boolean pass = server != null && server.length() > 0 && server.toLowerCase().indexOf("localhost") == -1 && !server.equals("127.0.0.1");<NEW_LINE>InetAddress appsServer = null;<NEW_LINE>String error = "Not correct: Ap... | int sslPort = p_data.getAppsServerSSLPort(); |
1,442,920 | public double[] transformToDoubleValuesSV(ProjectionBlock projectionBlock) {<NEW_LINE>int length = projectionBlock.getNumDocs();<NEW_LINE>if (_differences == null || _differences.length < length) {<NEW_LINE>_differences = new double[length];<NEW_LINE>}<NEW_LINE>if (_firstTransformFunction == null) {<NEW_LINE>Arrays.fil... | values = _firstTransformFunction.transformToDoubleValuesSV(projectionBlock); |
233,723 | public TaskProvider<? extends Task> createTask(Project project) {<NEW_LINE>project.getPlugins().apply(CompileOnlyResolvePlugin.class);<NEW_LINE>project.getConfigurations().create("forbiddenApisCliJar");<NEW_LINE>project.getDependencies().add("forbiddenApisCliJar", "de.thetaphi:forbiddenapis:3.2");<NEW_LINE>Configuratio... | .provider(BuildParams::getRuntimeJavaVersion)); |
191,332 | private static Map<String, IndexAbstraction> filterIndicesLookup(Context context, SortedMap<String, IndexAbstraction> indicesLookup, Predicate<? super Map.Entry<String, IndexAbstraction>> filter, IndicesOptions options) {<NEW_LINE>boolean shouldConsumeStream = false;<NEW_LINE>Stream<Map.Entry<String, IndexAbstraction>>... | stream = stream.filter(filter); |
1,559,593 | public void indexAll(IProject project) {<NEW_LINE>// New index is disabled, see bug 544898<NEW_LINE>// this.indexer.makeDirty(project);<NEW_LINE>if (JavaCore.getPlugin() == null)<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>// Disable index manager to avoid synchronization lock contention when adding new index requests to ... | ) entry).getLibraryIndexLocation()); |
1,285,333 | public static void process_sub(GrayS16 orig, GrayS16 derivX, GrayS16 derivY) {<NEW_LINE>final short[] data = orig.data;<NEW_LINE>final short[] imgX = derivX.data;<NEW_LINE>final short[] imgY = derivY.data;<NEW_LINE>final int width = orig.getWidth();<NEW_LINE>final int height = orig.getHeight() - 1;<NEW_LINE>final int s... | + derivY.stride * y + 1; |
1,304,876 | public static WorkerConfigs buildSpecWorkerConfigs(final Configs configs) {<NEW_LINE>final Optional<Map<String, String>> nodeSelectors = configs.getSpecJobKubeNodeSelectors().isPresent() ? configs.getSpecJobKubeNodeSelectors<MASK><NEW_LINE>return new WorkerConfigs(configs.getWorkerEnvironment(), new ResourceRequirement... | () : configs.getJobKubeNodeSelectors(); |
1,815,715 | public static ListConvertableEcuResponse unmarshall(ListConvertableEcuResponse listConvertableEcuResponse, UnmarshallerContext _ctx) {<NEW_LINE>listConvertableEcuResponse.setRequestId(_ctx.stringValue("ListConvertableEcuResponse.RequestId"));<NEW_LINE>listConvertableEcuResponse.setCode(_ctx.integerValue("ListConvertabl... | ("ListConvertableEcuResponse.InstanceList[" + i + "].Mem")); |
1,293,761 | private boolean promptToRemoveMeasurements() {<NEW_LINE>var selectedItems = new ArrayList<>(listView.getSelectionModel().getSelectedItems());<NEW_LINE>if (selectedItems.isEmpty()) {<NEW_LINE>Dialogs.showErrorMessage("Remove measurements", "No measurements selected!");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String n... | logger.info("Removing measurements: {}", removeString); |
1,417,770 | private static int unescapeUnicodeList(Ruby runtime, ByteList to, byte[] bytes, int p, int end, Encoding[] encp, ByteList str, ErrorMode mode) {<NEW_LINE>while (p < end && ASCIIEncoding.INSTANCE.isSpace(bytes[p] & 0xff)) p++;<NEW_LINE>boolean hasUnicode = false;<NEW_LINE>while (true) {<NEW_LINE>int code = StringSupport... | runtime, str, "invalid Unicode list", mode); |
1,589,577 | private ImmutableMap<CommissionShare, I_C_Commission_Share> syncShareRecords(@NonNull final ImmutableList<CommissionShare> shares, @NonNull final CommissionInstanceId commissionInstanceId, @NonNull final OrgId orgId, @NonNull final CommissionStagingRecords records) {<NEW_LINE>final ImmutableList<I_C_Commission_Share> s... | shareRecordsToDelete.forEach(InterfaceWrapperHelper::delete); |
1,400,523 | static OrcaRefill create(@NonNull DesfireRecord record) {<NEW_LINE>byte[] useData = record<MASK><NEW_LINE>long[] usefulData = new long[useData.length];<NEW_LINE>for (int i = 0; i < useData.length; i++) {<NEW_LINE>usefulData[i] = ((long) useData[i]) & 0xFF;<NEW_LINE>}<NEW_LINE>long timestamp = ((0x0F & usefulData[3]) <<... | .getData().bytes(); |
477,875 | public ActionCollectionDTO updateCollectionDTOWithDefaultResources(ActionCollectionDTO collection) {<NEW_LINE>DefaultResources defaultResourceIds = collection.getDefaultResources();<NEW_LINE>if (defaultResourceIds == null || StringUtils.isEmpty(defaultResourceIds.getApplicationId()) || StringUtils.isEmpty(defaultResour... | setPageId(collection.getPageId()); |
1,071,191 | static SampledDataDt mapValueToSampledData(Components.SampledData value, String unit) {<NEW_LINE>SampledDataDt recordData = new SampledDataDt();<NEW_LINE>SimpleQuantityDt origin = new SimpleQuantityDt();<NEW_LINE>origin.setValue(new BigDecimal(value.originValue)).setCode(unit).setSystem<MASK><NEW_LINE>recordData.setOri... | (UNITSOFMEASURE_URI).setUnit(unit); |
930,246 | final StartMulticastGroupSessionResult executeStartMulticastGroupSession(StartMulticastGroupSessionRequest startMulticastGroupSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startMulticastGroupSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
650,267 | public boolean onCreateOptionsMenu(Menu menu) {<NEW_LINE>Log.d(TAG, "OnCreateOptionsMenu called");<NEW_LINE>try {<NEW_LINE>getMenuInflater().inflate(R.menu.vnccanvasactivitymenu, menu);<NEW_LINE>Menu inputMenu = menu.findItem(R.id.itemInputMode).getSubMenu();<NEW_LINE>inputModeMenuItems = new MenuItem[inputModeIds.leng... | Log.d(TAG, "OnCreateOptionsMenu complete"); |
1,468,622 | public Object readObject(JSONReader jsonReader, Type fieldType, Object fieldName, long features) {<NEW_LINE>if (jsonReader.readIfNull()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (jsonReader.nextIfMatch('[')) {<NEW_LINE>Float[] values = new Float[16];<NEW_LINE>int size = 0;<NEW_LINE>for (; ; ) {<NEW_LINE>if (jsonR... | .info("not support input " + str)); |
1,716,208 | protected void drawFrame(Canvas canvas) {<NEW_LINE>float percent = progress;<NEW_LINE>float percent2 = (float) (Math.sqrt(3.38f - (percent - 1.7f) * (percent - 1.7f)) - 0.7);<NEW_LINE>int width = mHTextView.getWidth();<NEW_LINE>int height = mHTextView.getHeight();<NEW_LINE>pA.x = 0;<NEW_LINE>pA.y = 0;<NEW_LINE>pB.x = w... | drawLine(canvas, pD, p6); |
105,410 | private void printPostInstallStepsDebian(File serviceFile) {<NEW_LINE>System.out.println(INTENSITY_BOLD + "Ubuntu/Debian Linux system detected (SystemV):" + INTENSITY_NORMAL);<NEW_LINE>System.out.println(" To install the service:");<NEW_LINE>System.out.println(" $ ln -s " + serviceFile.getPath() + " /etc/init.d/");... | System.out.println(""); |
544,316 | private void exportMagiskZipQAndAbove() {<NEW_LINE>Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);<NEW_LINE>intent.addCategory(Intent.CATEGORY_OPENABLE);<NEW_LINE>// you can set file mime-type<NEW_LINE>intent.setType("*/*");<NEW_LINE>// default file name<NEW_LINE>String backupFileNameWithExt <MASK><NEW_LINE>... | = "zygisk_thanox-" + BuildProp.THANOS_VERSION_NAME + ".zip"; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.