idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,693,480 | public void appendIndexMapTo(Appendable out, String name, List<SourceMapSection> sections) throws IOException {<NEW_LINE>// Add the header fields.<NEW_LINE>out.append("{\n");<NEW_LINE>appendFirstField(out, "version", "3");<NEW_LINE>appendField(out, "file", escapeString(name));<NEW_LINE>// Add the line character maps.<N... | (section.getSectionValue())); |
1,592,054 | public List<InvoiceLine> createInvoiceLine(Invoice invoice, ProjectTask projectTask, int priority) throws AxelorException {<NEW_LINE>InvoiceLineGenerator invoiceLineGenerator = new InvoiceLineGenerator(invoice, projectTask.getProduct(), projectTask.getName(), projectTask.getUnitPrice(), BigDecimal.ZERO, projectTask.get... | = new ArrayList<InvoiceLine>(); |
1,277,711 | public void addTypical(String sItem, SoulissGenericTypical typical) {<NEW_LINE>int iBit = 0;<NEW_LINE>String sUseOfSlot = "";<NEW_LINE>if (typical.getType() == Constants.Souliss_T1A) {<NEW_LINE>logger.info("Add Item: {} - Typ: {}, Node:{}, Slot: {}, Bit: {}", sItem, Integer.toHexString(typical.getType()), typical.getSo... | ) + iBit + sUseOfSlot, typical); |
378,297 | private void transform(String xslt, File inFile, File outFile, Map params) {<NEW_LINE>Throwable caught = null;<NEW_LINE>try {<NEW_LINE>TransformerFactory transformerFactory = TransformerFactory.newInstance();<NEW_LINE>StreamSource xsltSource = new StreamSource(new StringReader(xslt));<NEW_LINE>Transformer transformer =... | .Entry) iter.next(); |
1,544,163 | private Optional<String> parseCodeFromRequest(@NotNull HttpServletRequest req) {<NEW_LINE>String code = req.getParameter("code");<NEW_LINE>if (code == null || code.trim().isEmpty()) {<NEW_LINE>try (BufferedReader rdr = req.getReader()) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>String line;<NEW_LINE>wh... | , error.getMessageBody() }); |
1,177,320 | public static FindServiceListResponse unmarshall(FindServiceListResponse findServiceListResponse, UnmarshallerContext _ctx) {<NEW_LINE>findServiceListResponse.setRequestId(_ctx.stringValue("FindServiceListResponse.RequestId"));<NEW_LINE>findServiceListResponse.setMessage(_ctx.stringValue("FindServiceListResponse.Messag... | ("FindServiceListResponse.Data.ServiceList[" + i + "].Alias")); |
1,105,412 | protected void performTask(HttpServletRequest req, HttpServletResponse resp, StringBuffer sb) throws ServletException, IOException {<NEW_LINE>// Values before any method call<NEW_LINE>writeLine(sb, "Start initial values");<NEW_LINE>printProgrammaticApiValues(req, sb);<NEW_LINE>writeLine(sb, "End initial values");<NEW_L... | "STARTTEST" + (i + 1)); |
1,398,810 | public UserIdentity login(String username, Object credentials, ServletRequest request) {<NEW_LINE>if (!(credentials instanceof SignedJWT)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (!(request instanceof HttpServletRequest)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SignedJWT jwtToken = (SignedJWT) credentials;<N... | request.getAttribute(JwtAuthenticator.JWT_TOKEN_REQUEST_ATTRIBUTE); |
1,464,233 | private static RoutingPolicy createNeighborImportPolicy(Configuration c, String policyName, BgpVrfNeighborAddressFamilyConfiguration af, Warnings w) {<NEW_LINE>RoutingPolicy.Builder ret = RoutingPolicy.builder().setOwner(c).setName(policyName);<NEW_LINE>String routeMap = af.getInboundRouteMap();<NEW_LINE>String prefixL... | Statements.SetWriteIntermediateBgpAttributes.toStaticStatement()); |
1,178,520 | private void writeChunkToOutputStream(byte[] chunk, int offset, int length) {<NEW_LINE>if (compressor == null && !dwrfEncryptor.isPresent()) {<NEW_LINE>compressedOutputStream.<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>checkArgument(length <= maxBufferSize, "Write chunk length must be less than max compression buffer s... | write(chunk, offset, length); |
1,479,391 | public void removeNonLeafEntry(final int entryIndex, final byte[] key, final int prevChild) {<NEW_LINE>if (isLeaf()) {<NEW_LINE>throw new IllegalStateException("Remove is applied to non-leaf buckets only");<NEW_LINE>}<NEW_LINE>final int entryPosition = getIntValue(POSITIONS_ARRAY_OFFSET + entryIndex * OIntegerSerialize... | final int leftChild = getIntValue(entryPosition); |
144,435 | public ListenableFuture<AlarmOperationResult> clearAlarm(TenantId tenantId, AlarmId alarmId, JsonNode details, long clearTime) {<NEW_LINE>return getAndUpdate(tenantId, alarmId, new Function<Alarm, AlarmOperationResult>() {<NEW_LINE><NEW_LINE>@Nullable<NEW_LINE>@Override<NEW_LINE>public AlarmOperationResult apply(@Nulla... | alarm.getTenantId(), alarm); |
165,709 | public <T> AggregatedPage<T> mapResults(SearchResponse response, Class<T> clazz, Pageable pageable) {<NEW_LINE>Aggregations aggregations = response.getAggregations();<NEW_LINE>Terms agg = aggregations.get(term);<NEW_LINE>long total = agg.getSumOfOtherDocCounts();<NEW_LINE>List<T> results = new ArrayList<T>();<NEW_LINE>... | getHits().getTotalHits()); |
722,402 | public <S> ProxyClient<S> newProxy(String primitiveName, PrimitiveType primitiveType, Class<S> serviceType, ServiceConfig serviceConfig, PartitionService partitionService) {<NEW_LINE>PartitionGroup <MASK><NEW_LINE>if (partitionGroup == null) {<NEW_LINE>throw new ConfigurationException("No Raft partition group matching ... | partitionGroup = partitionService.getPartitionGroup(this); |
1,326,341 | protected void buildCoordinate(GraphPayload payload, XmlBuilder b) {<NEW_LINE>int width = payload.getWidth();<NEW_LINE>int height = payload.getHeight();<NEW_LINE>int top = payload.getMarginTop();<NEW_LINE>int left = payload.getMarginLeft();<NEW_LINE>int bottom = payload.getMarginBottom();<NEW_LINE><MASK><NEW_LINE>int h... | int right = payload.getMarginRight(); |
581,440 | public void requestOrbotStart(final Activity activity) {<NEW_LINE>AlertDialog.Builder downloadDialog = new AlertDialog.Builder(activity);<NEW_LINE>downloadDialog.setTitle(R.string.start_orbot_);<NEW_LINE>downloadDialog.setMessage(R.string.orbot_doesn_t_appear_to_be_running_would_you_like_to_start_it_up_and_connect_to_t... | activity.startActivityForResult(intent, 1); |
1,661,983 | private static JdbcCatalog createCatalog(Params params, ClassLoader classLoader) {<NEW_LINE>String catalogName = params.get(JdbcCatalogParams.CATALOG_NAME);<NEW_LINE>CatalogFactory factory = createCatalogFactory(classLoader);<NEW_LINE>Map<String, String> properties = new HashMap<>();<NEW_LINE>properties.put(CATALOG_DER... | .get(JdbcCatalogParams.PASSWORD)); |
1,434,551 | private Collection<AbstractTreeNode> createListForSingleFile() {<NEW_LINE>PsiFile psiFile = getValue();<NEW_LINE>TodoItem[] items = findAllTodos(psiFile, myBuilder.getTodoTreeStructure().getSearchHelper());<NEW_LINE>ArrayList<AbstractTreeNode> children = new <MASK><NEW_LINE>Document document = PsiDocumentManager.getIns... | ArrayList<>(items.length); |
484,908 | public NestedVersionTwo decode(ProtoReader reader) throws IOException {<NEW_LINE>Builder builder = new Builder();<NEW_LINE>long token = reader.beginMessage();<NEW_LINE>for (int tag; (tag = reader.nextTag()) != -1; ) {<NEW_LINE>switch(tag) {<NEW_LINE>case 1:<NEW_LINE>builder.i(ProtoAdapter.INT32.decode(reader));<NEW_LIN... | .STRING.decode(reader)); |
94,344 | public GameConfigurationDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GameConfigurationDetails gameConfigurationDetails = new GameConfigurationDetails();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NE... | "iso8601").unmarshall(context)); |
1,847,418 | private void signJarFilesUsingBlobSigning() throws MojoFailureException, PackagerException, MojoExecutionException {<NEW_LINE>checkSigningConfiguration();<NEW_LINE>SignJarParams signJarParams = new SignJarParams();<NEW_LINE>signJarParams.setVerbose(verbose);<NEW_LINE>signJarParams.setKeyStore(keyStore);<NEW_LINE>signJa... | .addResource(nativeOutputDir, jarFile)); |
62,817 | public Request<ListDistributionsByKeyGroupRequest> marshall(ListDistributionsByKeyGroupRequest listDistributionsByKeyGroupRequest) {<NEW_LINE>if (listDistributionsByKeyGroupRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ListDistributions... | (listDistributionsByKeyGroupRequest.getMarker())); |
556,695 | protected byte[] serializeRecords(List<IndexedRecord> records) throws IOException {<NEW_LINE>HFileContext context = new HFileContextBuilder().withBlockSize(DEFAULT_BLOCK_SIZE).withCompression(compressionAlgorithm.get()).withCellComparator(new HoodieHBaseKVComparator()).build();<NEW_LINE>Configuration conf = new Configu... | ))) + 1 : -1; |
955,410 | /* reload application for each target. If the app is disabled for the target, it is an no-op.<NEW_LINE>* otherwise, the app is disabled and then enabled to force the reload.<NEW_LINE>*/<NEW_LINE>static public boolean reloadApplication(String appName, List<String> targets, HandlerContext handlerCtx) {<NEW_LINE>try {<NE... | (endpoint).get("enabled"); |
890,146 | private PComplex complexToComplexPower(PComplex a, PComplex b) {<NEW_LINE>if (b.getReal() == 0.0 && b.getImag() == 0.0) {<NEW_LINE>return factory().createComplex(1.0, 0.0);<NEW_LINE>}<NEW_LINE>if (a.getReal() == 0.0 && a.getImag() == 0.0) {<NEW_LINE>if (b.getImag() != 0.0 || b.getReal() < 0.0) {<NEW_LINE>throw raise(Ze... | ), a.getReal()); |
1,056,861 | private Iterator<I_C_Payment> retrievePayments() {<NEW_LINE>final Stopwatch stopwatch = Stopwatch.createStarted();<NEW_LINE>//<NEW_LINE>// Create the selection which we might need to update<NEW_LINE>final IQueryBuilder<I_C_Payment> queryBuilder = queryBL.createQueryBuilder(I_C_Payment.class).addOnlyActiveRecordsFilter(... | "Found " + count + " payments to evaluate. Took " + stopwatch); |
1,545,290 | public static QueryAuthResponse unmarshall(QueryAuthResponse queryAuthResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryAuthResponse.setRequestId(_ctx.stringValue("QueryAuthResponse.RequestId"));<NEW_LINE>queryAuthResponse.setCode(_ctx.integerValue("QueryAuthResponse.Code"));<NEW_LINE>queryAuthResponse.setSuccess(_ct... | (_ctx.stringValue("QueryAuthResponse.Data.ProductCode")); |
231,591 | void userRestoredMode(ModeImpl slidingMode, ModeImpl modeToRestore) {<NEW_LINE>TopComponent tcToSelect = modeToRestore.getPreviousSelectedTopComponent();<NEW_LINE>setModeMinimized(modeToRestore, false);<NEW_LINE>WindowManagerImpl wm = WindowManagerImpl.getInstance();<NEW_LINE>for (TopComponent tc : slidingMode.getOpene... | model.getModeTopComponentPreviousMode(slidingMode, id); |
1,717,326 | public static void main(String... args) {<NEW_LINE>ScheduledExecutorService <MASK><NEW_LINE>RetryPolicy<Object> retryPolicy = RetryPolicy.ofDefaults();<NEW_LINE>// Create a retryable functional interface<NEW_LINE>Function<String, String> bar = value -> Failsafe.with(retryPolicy).get(() -> value + "bar");<NEW_LINE>// Cr... | executor = Executors.newScheduledThreadPool(2); |
1,452,897 | public ShaderNodeDefinition findDefinition(Statement statement) throws IOException {<NEW_LINE>final String[] defLine = statement.getLine().split(":");<NEW_LINE>if (defLine.length != 3) {<NEW_LINE>throw new MatParseException("Can't find shader node definition for: ", statement);<NEW_LINE>}<NEW_LINE>final Map<String<MASK... | , ShaderNodeDefinition> nodeDefinitions = getNodeDefinitions(); |
706,161 | public OCacheEntry loadPageForWrite(long fileId, final long pageIndex, final boolean checkPinnedPages, final int pageCount, final boolean verifyChecksum) throws IOException {<NEW_LINE>assert pageCount > 0;<NEW_LINE>fileId = checkFileIdCompatibility(fileId, storageId);<NEW_LINE>if (deletedFiles.contains(fileId)) {<NEW_L... | changesContainer.pageChangesMap.get(pageIndex); |
1,653,337 | private void initPolarDbXComponents() {<NEW_LINE>// Set private protocol port first(or we will fail to connect metaDB with Xproto).<NEW_LINE>XConnectionManager.getInstance().setMetaDbPort(this.system.getMetaDbXprotoPort());<NEW_LINE>XConnectionManager.getInstance().setStorageDbPort(this.system.getStorageDbXprotoPort())... | Balancer balancer = Balancer.getInstance(); |
884,434 | public void handle(UAVHttpMessage data) {<NEW_LINE>String storeName = data.getRequest(DataStoreProtocol.DATASTORE_NAME);<NEW_LINE>AbstractDataStore store = DataStoreFactory.getInstance().get(storeName);<NEW_LINE>if (store != null) {<NEW_LINE>if (!store.isStarted()) {<NEW_LINE>store.start();<NEW_LINE>if (!store.isStarte... | putResponse(UAVHttpMessage.ERR, warnMsg); |
1,800,039 | public boolean read_scope(ReadScopeParameter p_par) {<NEW_LINE>try {<NEW_LINE>// read the unit<NEW_LINE>Object next_token = p_par.scanner.next_token();<NEW_LINE>if (!(next_token instanceof String)) {<NEW_LINE>FRLogger.warn("Resolution.read_scope: string expected");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>p_par.unit ... | = p_par.scanner.next_token(); |
214,305 | private static // would make it harder to read<NEW_LINE>MemberAddressProvider newMemberAddressProviderInstance(Class<? extends MemberAddressProvider> clazz, ILogger logger, Properties properties) {<NEW_LINE>Properties nonNullProps = properties == <MASK><NEW_LINE>MemberAddressProvider provider = InstantiationUtils.newIn... | null ? new Properties() : properties; |
439,083 | public PathAttributes toAttributes(final File f) {<NEW_LINE>if (DRIVE_SHORTCUT.equals(f.getMimeType())) {<NEW_LINE>final File.ShortcutDetails shortcutDetails = f.getShortcutDetails();<NEW_LINE>try {<NEW_LINE>return this.toAttributes(session.getClient().files().get(shortcutDetails.getTargetId()).setFields(DEFAULT_FIELDS... | getModifiedTime().getValue()); |
1,744,863 | public static void sendFileTo(final Activity a, final File file) {<NEW_LINE>if (!isValidFile(file)) {<NEW_LINE>Toast.makeText(a, R.string.file_not_found, Toast.LENGTH_LONG).show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final Intent intent = new Intent(Intent.ACTION_SEND);<NEW_LINE>intent.putExtra(Intent.E... | .setType(getMimeType(file)); |
113,701 | final UpdateMonitoringScheduleResult executeUpdateMonitoringSchedule(UpdateMonitoringScheduleRequest updateMonitoringScheduleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateMonitoringScheduleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,515,256 | private static void initIcons() {<NEW_LINE>if (null == buttonIconPaths) {<NEW_LINE>buttonIconPaths = new HashMap<Integer, String[]>(7);<NEW_LINE>// close button<NEW_LINE>String[] iconPaths = new String[4];<NEW_LINE>// NOI18N<NEW_LINE>iconPaths[TabControlButton.STATE_DEFAULT] = "org/openide/awt/resources/win8_bigclose_e... | ] = iconPaths[TabControlButton.STATE_DEFAULT]; |
1,422,438 | public void marshall(CreateProfileJobRequest createProfileJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createProfileJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(createProfileJo... | createProfileJobRequest.getJobSample(), JOBSAMPLE_BINDING); |
577,223 | final DeleteDBParameterGroupResult executeDeleteDBParameterGroup(DeleteDBParameterGroupRequest deleteDBParameterGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteDBParameterGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
543,777 | private int collapseLeaves(@Nonnull CompositeElement ast, @Nonnull StartMarker startMarker) {<NEW_LINE>final int start = myLexStarts[startMarker.myLexemeIndex];<NEW_LINE>final int end = myLexStarts[startMarker.myDoneMarker.myLexemeIndex];<NEW_LINE>final IElementType markerType = startMarker.myType;<NEW_LINE>final TreeE... | ] types = new IElementType[length]; |
1,067,702 | public HiresTileModel transform(int start, int count, float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) {<NEW_LINE>int end = start + count, index;<NEW_LINE>double x, y, z;<NEW_LINE>for (int face... | = face * FI_POSITION + i * 3; |
133,171 | public void collectAggregates(AggregateReader aggregateReader) throws Exception {<NEW_LINE>aggregateDao.store(aggregateReader);<NEW_LINE>alertingService.checkForDeletedAlerts(AGENT_ID);<NEW_LINE>if (!isCurrentlyDisabled()) {<NEW_LINE>for (AlertConfig alertConfig : configRepository.getAlertConfigs(AGENT_ID)) {<NEW_LINE>... | HealthchecksIoConfig healthchecksIoConfig = configRepository.getHealthchecksIoConfig(); |
1,168,940 | public void pingReceived(Ping pong) {<NEW_LINE><MASK><NEW_LINE>long previousPingTime = lastPingSentOn.get();<NEW_LINE>int previousPingValue = (int) (previousPingTime & 0xffffffffL);<NEW_LINE>int pongValue = pong.getValue2().intValue();<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Pong received: session=[{}]... | long now = System.currentTimeMillis(); |
1,186,512 | public void onError(java.lang.Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TSerializable msg;<NEW_LINE>waitForFateOperation_result result = new waitForFateOperation_result();<NEW_LINE>if (e instanceof org.apache.accumulo.core.clientImpl.thrift.ThriftSe... | _LOGGER.error("Exception inside handler", e); |
126,819 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>// TODO: This method is called when the BroadcastReceiver is receiving<NEW_LINE>// an Intent broadcast.<NEW_LINE>NativeInterop.setFilesDirPath(getApplicationContext().getFilesDir().getAbsolutePath());<NEW_LINE>Native... | NativeInterop.setAssetManager(getAssets()); |
1,758,525 | static ConfiguredType create(JsonObject type) {<NEW_LINE>ConfiguredType ct = new ConfiguredType(type.getString("type"), type.getBoolean("standalone", false), type.getString("prefix", null), type.getString("description", null), toList(type.getJsonArray("provides")));<NEW_LINE>List<String> producers = toList(type.getJson... | (ProducerMethod.parse(producer)); |
1,446,622 | public static DescribeDnsGtmMonitorConfigResponse unmarshall(DescribeDnsGtmMonitorConfigResponse describeDnsGtmMonitorConfigResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDnsGtmMonitorConfigResponse.setRequestId(_ctx.stringValue("DescribeDnsGtmMonitorConfigResponse.RequestId"));<NEW_LINE>describeDnsGtmMonitorCo... | ("DescribeDnsGtmMonitorConfigResponse.IspCityNodes[" + i + "].CityName")); |
144,496 | public void validate() {<NEW_LINE>if (ipRules() != null) {<NEW_LINE>ipRules().forEach(e -> e.validate());<NEW_LINE>}<NEW_LINE>if (consistencyPolicy() != null) {<NEW_LINE>consistencyPolicy().validate();<NEW_LINE>}<NEW_LINE>if (capabilities() != null) {<NEW_LINE>capabilities().forEach(e -> e.validate());<NEW_LINE>}<NEW_L... | e -> e.validate()); |
435,616 | DoubleArray computedBucketedCs01(ResolvedCdsTrade trade, List<ResolvedCdsTrade> bucketCds, CreditRatesProvider ratesProvider, ReferenceData refData) {<NEW_LINE>checkCdsBucket(trade, bucketCds);<NEW_LINE>ResolvedCds product = trade.getProduct();<NEW_LINE>Currency currency = product.getCurrency();<NEW_LINE>StandardId leg... | impliedSpread(bucketCds, ratesProvider, refData); |
983,501 | public String sort(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, Long id, int sort, HttpServletRequest request, ModelMap model) {<NEW_LINE>SysDept dept = sysDeptService.getEntity(admin.getDeptId());<NEW_LINE>CmsContent content = service.getEntity(id);<NEW_LINE>if (null != content) {<NEW_LINE>if (Cont... | sort).toString())); |
850,134 | public static ListOutboundOrderSKUTagsResponse unmarshall(ListOutboundOrderSKUTagsResponse listOutboundOrderSKUTagsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listOutboundOrderSKUTagsResponse.setRequestId(_ctx.stringValue("ListOutboundOrderSKUTagsResponse.RequestId"));<NEW_LINE>listOutboundOrderSKUTagsResponse.setPa... | (_ctx.integerValue("ListOutboundOrderSKUTagsResponse.PageSize")); |
561,403 | public void next() {<NEW_LINE>if (iter.hasNext()) {<NEW_LINE>try {<NEW_LINE>Handler<DeliveryContext<MASK><NEW_LINE>if (handler != null) {<NEW_LINE>handler.handle(this);<NEW_LINE>} else {<NEW_LINE>next();<NEW_LINE>}<NEW_LINE>} catch (Throwable t) {<NEW_LINE>log.error("Failure in interceptor", t);<NEW_LINE>}<NEW_LINE>} e... | > handler = iter.next(); |
1,805,892 | public int read(boolean firstRead, long readCount, byte[] buf, int off, int len) {<NEW_LINE>if (readCount > INITIAL_BUFFER_SIZE && readCount < maxMemorySize) {<NEW_LINE>int newMargin = maxMemorySize - MARGIN_MEDIUM;<NEW_LINE>if (bufferOverflowWarning != newMargin) {<NEW_LINE>LOGGER.debug("Setting margin to 2Mb");<NEW_L... | "Suspend Read: readCount=" + readCount + " / writeCount=" + writeCount); |
656,578 | public AttachmentViewInfo extractAttachmentInfo(Part part) throws MessagingException {<NEW_LINE>Uri uri;<NEW_LINE>long size;<NEW_LINE>boolean isContentAvailable;<NEW_LINE>if (part instanceof LocalPart) {<NEW_LINE>LocalPart localPart = (LocalPart) part;<NEW_LINE>String accountUuid = localPart.getAccountUuid();<NEW_LINE>... | AttachmentProvider.getAttachmentUri(accountUuid, messagePartId); |
1,300,151 | public void synthesizeAndDownload(String mavenCoords, String filetype, String dLocation, MavenRepository repository, boolean individualDownload) throws InstallException {<NEW_LINE>configureProxyAuthentication();<NEW_LINE>configureAuthentication(repository);<NEW_LINE>String repo = FormatUrlSuffix(repository.getRepositor... | version + "/").mkdirs(); |
1,822,303 | public okhttp3.Call connectPutNodeProxyCall(String name, String path, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/api/v1/nodes/{name}/proxy".replaceAll("\\{" + "name" + "\\}", localVarApiClient.esc... | localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); |
374,633 | private static void annotateBytecode(InputStream is, OutputStream os, MethodParamAnnotations nonnullParams, MethodReturnAnnotations nullableReturns, String nullableDesc, String nonnullDesc) throws IOException {<NEW_LINE><MASK><NEW_LINE>ClassWriter cw = new ClassWriter(0);<NEW_LINE>ClassNode cn = new ClassNode(Opcodes.A... | ClassReader cr = new ClassReader(is); |
646,651 | final public void drawU(UGraphic ug) {<NEW_LINE>final StringBounder stringBounder = ug.getStringBounder();<NEW_LINE>double shadow = 0;<NEW_LINE>if (UseStyle.useBetaStyle()) {<NEW_LINE>final Style style = getStyle();<NEW_LINE>shadow = style.value(PName.Shadowing).asDouble();<NEW_LINE>} else if (getSkinParam().shadowing2... | ).getCode() + " selected"); |
1,223,936 | static CompilationUnit canonicalize(CompilationUnit src) {<NEW_LINE>CompilationUnit.Builder unit = src.toBuilder();<NEW_LINE>{<NEW_LINE>List<FileInput<MASK><NEW_LINE>unit.clearRequiredInput();<NEW_LINE>unit.addAllRequiredInput(sortAndDedupe(orig));<NEW_LINE>}<NEW_LINE>{<NEW_LINE>List<String> orig = unit.getSourceFileLi... | > orig = unit.getRequiredInputList(); |
1,426,137 | public static DescribeLogMonitorAttributeResponse unmarshall(DescribeLogMonitorAttributeResponse describeLogMonitorAttributeResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeLogMonitorAttributeResponse.setRequestId(_ctx.stringValue("DescribeLogMonitorAttributeResponse.RequestId"));<NEW_LINE>describeLogMonitorAttri... | (_ctx.stringValue("DescribeLogMonitorAttributeResponse.LogMonitor.MetricName")); |
1,038,822 | private Response createResponse(AuthenticationFlowContext context, String subjectDN, boolean isUserEnabled, String errorMessage, Object[] errorParameters) {<NEW_LINE>LoginFormsProvider form = context.form();<NEW_LINE>if (errorMessage != null && errorMessage.trim().length() > 0) {<NEW_LINE>List<FormMessage> errors = new... | add(new FormMessage(errorMessage)); |
1,301,716 | private static void loadLibrary(NFIPosixSupport posix) {<NEW_LINE>String path = getLibPath(posix.context);<NEW_LINE>String withClause = posix.nfiBackend.equals("native") ? "" : "with " + posix.nfiBackend;<NEW_LINE>String src = String.format("%sload (RTLD_LOCAL) \"%s\"", withClause, path);<NEW_LINE>Source loadSrc = Sour... | CompilerDirectives.shouldNotReachHere("Unable to load native posix support library", e); |
871,091 | public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {<NEW_LINE>HttpServletRequest request = (HttpServletRequest) req;<NEW_LINE>HttpServletResponse response = (HttpServletResponse) res;<NEW_LINE>if (response.isCommitted()) {<NEW_LINE>if (tc.isDebugEnabled... | request, response, chain, matcher); |
999,613 | public void render(@Nonnull TileEnchanter enchanter, float f, PoseStack ms, MultiBufferSource buffers, int light, int overlay) {<NEW_LINE>float alphaMod = 0F;<NEW_LINE>if (enchanter.stage == TileEnchanter.State.GATHER_MANA) {<NEW_LINE>alphaMod = Math.min(20, enchanter.stageTicks) / 20F;<NEW_LINE>} else if (enchanter.st... | -2.5F, -2.5F, 0F); |
382,030 | private List<SpringPersistenceUnitInfo> readPersistenceUnitInfos() {<NEW_LINE>List<SpringPersistenceUnitInfo> infos = new ArrayList<>(1);<NEW_LINE>String defaultName = this.defaultPersistenceUnitName;<NEW_LINE>boolean buildDefaultUnit = (this.packagesToScan != <MASK><NEW_LINE>boolean foundDefaultUnit = false;<NEW_LINE>... | null || this.mappingResources != null); |
1,028,512 | private Address adjustTableEntryIfNonZero(Address tableBaseAddr, int entryIndex, long adjustment, ElfLoadHelper elfLoadHelper) throws MemoryAccessException, AddressOverflowException {<NEW_LINE>boolean is64Bit = elfLoadHelper.getElfHeader().is64Bit();<NEW_LINE>Memory memory = elfLoadHelper.getProgram().getMemory();<NEW_... | offset = memory.getLong(tableEntryAddr); |
1,734,708 | private GraphObjectMap utmToLatLon(final String zone, final String hemisphere, final String east, final String north) {<NEW_LINE>final GraphObjectMap obj = new GraphObjectMap();<NEW_LINE>// clean zone string (remove all non-digits)<NEW_LINE>final String cleanedZone = <MASK><NEW_LINE>final StringBuilder epsg = new Strin... | zone.replaceAll("[\\D]+", ""); |
223,315 | public AbstractCompilationUnit.ImportDeclaration parseImportDeclarationBody() throws CompileException, IOException {<NEW_LINE>final Location loc = this.location();<NEW_LINE>boolean isStatic = this.peekRead("static");<NEW_LINE>List<String> l = new ArrayList<>();<NEW_LINE>l.add(this.read(TokenType.IDENTIFIER));<NEW_LINE>... | .TypeImportOnDemandDeclaration(loc, identifiers)); |
1,309,989 | private JsonSchemaProperty computeSchemaForProperty(List<MongoPersistentProperty> path) {<NEW_LINE>String stringPath = path.stream().map(MongoPersistentProperty::getName).collect(Collectors.joining("."));<NEW_LINE>MongoPersistentProperty property = CollectionUtils.lastElement(path);<NEW_LINE>boolean required = isRequir... | createSchemaProperty(fieldName, targetType, required); |
1,731,209 | public void initialize(ExtensionContext context) {<NEW_LINE>// Note: initialize could be called twice in an account migration scenario<NEW_LINE>// where we import and export to the same service provider. So just return<NEW_LINE>// rather than throwing if called multiple times.<NEW_LINE>if (initialized)<NEW_LINE>return;... | fileUploadClient, mapper, monitor, credentialFactory); |
574,789 | public void actionPerformed(final ActionEvent e) {<NEW_LINE>JDialog dialog = null;<NEW_LINE>if (e != null) {<NEW_LINE>final Object source = e.getSource();<NEW_LINE>if (source instanceof Component) {<NEW_LINE>final Window window = SwingUtilities.getWindowAncestor((Component) source);<NEW_LINE>dialog = createDialog(windo... | UITools.addEscapeActionToDialog(dialog, action); |
1,312,571 | public static void main(String[] args) throws IOException {<NEW_LINE>PNMImageReader reader = new PNMImageReader(null);<NEW_LINE>for (String arg : args) {<NEW_LINE>File in = new File(arg);<NEW_LINE>reader.setInput<MASK><NEW_LINE>ImageReadParam param = reader.getDefaultReadParam();<NEW_LINE>param.setDestinationType(reade... | (ImageIO.createImageInputStream(in)); |
445,368 | private StepMeta udjc(List<DatasetTableField> datasetTableFields, DatasourceTypes datasourceType) {<NEW_LINE>StringBuilder handleBinaryTypeCode = new StringBuilder();<NEW_LINE>String excelCompletion = "";<NEW_LINE>for (DatasetTableField datasetTableField : datasetTableFields) {<NEW_LINE>if (datasetTableField.getDeExtra... | ).replace("ExcelCompletion", excelCompletion); |
1,616,682 | private void updateForCandidateType(@NonNull final CandidateType candidateType) {<NEW_LINE>final MainDataRecordIdentifier mainDataRecordIdentifier = getMainRecordIdentifier(candidateType);<NEW_LINE>final de.metas.material.cockpit.view.ddorderdetail.DDOrderDetailIdentifier ddOrderDetailIdentifier = de.metas.material.coc... | buildUpdateMainDataRequest(mainDataRecordIdentifier, candidateType, deltaQtyPending); |
611,477 | public Object execute(final ExecutionEvent event) throws ExecutionException {<NEW_LINE>final TreeMap<String, TreeSet<Model>> projectModelMap = buildMap();<NEW_LINE>if (projectModelMap == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Shell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();<NEW_LI... | HashMap<String, String>(); |
577,405 | public boolean onPreferenceClick(Preference preference) {<NEW_LINE>final NavController navController = <MASK><NEW_LINE>if (preference.getKey().equals(getString(R.string.user_dict_editor_key))) {<NEW_LINE>navController.navigate(DictionariesFragmentDirections.actionDictionariesFragmentToUserDictionaryEditorFragment());<N... | Navigation.findNavController(requireView()); |
1,578,699 | protected List<String> doInBackground(Void... params) {<NEW_LINE>ChatFileStorageFragment context = mContextWeakReference.get();<NEW_LINE>if (context != null) {<NEW_LINE>// get photos from gallery<NEW_LINE>String[] projection = new String[] { MediaStore.Images.Media.DATA, MediaStore.Images.Media._ID };<NEW_LINE>Uri uri ... | (cursor.getString(dataColumn)); |
1,428,922 | public void doChecks(Context context, ResultCollector collector) {<NEW_LINE>super.doChecks(context, collector);<NEW_LINE>PackageManager pm = context.getPackageManager();<NEW_LINE>try {<NEW_LINE>PermissionInfo info = pm.getPermissionInfo("android.permission.SYSTEM_ALERT_WINDOW", 0);<NEW_LINE>CharSequence permLabel = inf... | Log.w("SelfCheckPerms", e); |
713,629 | // findBPartner<NEW_LINE>@Override<NEW_LINE>public void refreshPanel() {<NEW_LINE>logger.fine("RefreshPanel");<NEW_LINE>if (!posPanel.hasOrder()) {<NEW_LINE>// Document Info<NEW_LINE>totalTitle.setTitle(Msg.getMsg(Env.getCtx(), "Totals"));<NEW_LINE>fieldSalesRep.setText(posPanel.getSalesRepName());<NEW_LINE>fieldDocume... | String currencyISOCode = posPanel.getCurSymbol(); |
627,131 | private static MediaType create(String type, String subtype, Multimap<String, String> parameters) {<NEW_LINE>checkNotNull(type);<NEW_LINE>checkNotNull(subtype);<NEW_LINE>checkNotNull(parameters);<NEW_LINE>String normalizedType = normalizeToken(type);<NEW_LINE>String normalizedSubtype = normalizeToken(subtype);<NEW_LINE... | .equals(normalizedSubtype), "A wildcard type cannot be used with a non-wildcard subtype"); |
1,617,468 | public ListIterator<E> listIterator(final int index) {<NEW_LINE>return new ListIterator<E>() {<NEW_LINE><NEW_LINE>final ListIterator<E> iter = underlying.listIterator(index);<NEW_LINE><NEW_LINE>@Nullable<NEW_LINE>E last = null;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>return iter.hasNex... | previousIndex() + 1, e); |
1,173,847 | public RexNode toDnf(RexNode rex) {<NEW_LINE>final List<RexNode> operands;<NEW_LINE>switch(rex.getKind()) {<NEW_LINE>case AND:<NEW_LINE>operands = flattenAnd(((RexCall) rex).getOperands());<NEW_LINE>final RexNode head = operands.get(0);<NEW_LINE>final RexNode headDnf = toDnf(head);<NEW_LINE>final List<RexNode> headDnfs... | return or(toDnfs(operands)); |
138,233 | public // }<NEW_LINE>void exportXMLData(ExportDataDumper eDD, String indent) {<NEW_LINE>// NOI18N<NEW_LINE>String newline = System.getProperty("line.separator");<NEW_LINE>// NOI18N<NEW_LINE>StringBuffer result = new StringBuffer(indent + "<Node>" + newline);<NEW_LINE>// NOI18N<NEW_LINE>result.append(indent).append(" <N... | ("</Bytes_Allocated>").append(newline); |
484,088 | protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {<NEW_LINE>if (!in.isReadable())<NEW_LINE>return;<NEW_LINE>int outLength = Type.VAR_INT.readPrimitive(in);<NEW_LINE>if (outLength == 0) {<NEW_LINE>out.add(in.readBytes<MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (outLength... | (in.readableBytes())); |
219,248 | public void run() {<NEW_LINE>RemoteObject observableInfo = remoteObject.apply(UNWRAP_SCRIPT);<NEW_LINE>boolean isObservable = false;<NEW_LINE>RemoteObject observable = null;<NEW_LINE>for (PropertyDescriptor descriptor : observableInfo.getProperties()) {<NEW_LINE>String name = descriptor.getName();<NEW_LINE>if ("0".equa... | ValueProperty.NAME, null, null); |
1,361,653 | protected void updateImageState() {<NEW_LINE>float viewWidth = getWidth();<NEW_LINE>float viewHeight = getHeight();<NEW_LINE>if ((int) viewWidth <= 0 || (int) viewHeight <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (sourceBitmap != null) {<NEW_LINE>BitmapShader imageShader = new BitmapShader(sourceBitmap, Shader.Til... | ), (dy + 0.5f)); |
364,777 | public static ListDeviceModelsResponse unmarshall(ListDeviceModelsResponse listDeviceModelsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listDeviceModelsResponse.setRequestId(_ctx.stringValue("ListDeviceModelsResponse.RequestId"));<NEW_LINE>List<Result> deviceModels = new ArrayList<Result>();<NEW_LINE>for (int i = 0; ... | ("ListDeviceModelsResponse.DeviceModels[" + i + "].ObjectKey")); |
990,557 | public Memory merge(String[] refs, ArrayMemory settings) throws IOException, GitAPIException {<NEW_LINE>MergeCommand command = getWrappedObject().merge();<NEW_LINE>for (String ref : refs) {<NEW_LINE>Repository repository = getWrappedObject().getRepository();<NEW_LINE>ObjectId objectId = repository.resolve(ref);<NEW_LIN... | ("commit").toBoolean()); |
770,849 | private static void sendMyInnerSchemaEvent(RegressionEnvironment env, EventRepresentationChoice eventRepresentationEnum, String col1, String col2in1, int col2in2) {<NEW_LINE>if (eventRepresentationEnum.isObjectArrayEvent()) {<NEW_LINE>env.sendEventObjectArray(new Object[] { col1, new Object[] { col2in1, col2in2 } }, "M... | theEvent.put("col2", inner); |
1,405,942 | private static Set<TypeDescriptorImpl> subtractImpl(Set<TypeDescriptorImpl> originalTypes, Set<TypeDescriptorImpl> toRemove) {<NEW_LINE>Set<TypeDescriptorImpl> result = new HashSet<>(originalTypes);<NEW_LINE>Set<TypeDescriptorImpl> todo = new HashSet<>(toRemove);<NEW_LINE>// 1. Remove simple non parameterized non compo... | get(typeDescriptorToRemove.getKey()); |
1,822,132 | private AbstractServiceFactoryBean createDispatchService(DataBinding db) {<NEW_LINE>AbstractServiceFactoryBean serviceFactory;<NEW_LINE>Service dispatchService = null;<NEW_LINE>if (null != wsdlURL) {<NEW_LINE>WSDLServiceFactory sf = new WSDLServiceFactory(bus, wsdlURL, serviceName);<NEW_LINE>dispatchService = sf.create... | sf.setServiceClass(DummyImpl.class); |
1,433,685 | public static String format(Text text, FormatToExpression format) {<NEW_LINE>if (text instanceof Simple) {<NEW_LINE>return ((<MASK><NEW_LINE>} else if (text instanceof Blank) {<NEW_LINE>return " ";<NEW_LINE>} else if (text instanceof Character) {<NEW_LINE>return "" + ((Character) text).getChar();<NEW_LINE>} else if (te... | Simple) text).getText(); |
117,584 | private Mono<PagedResponse<AvailablePrivateEndpointTypeInner>> listSinglePageAsync(String location, Context context) {<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>if... | .nextLink(), null)); |
533,681 | public TSTracingInfo fillRpcReturnTracingInfo() {<NEW_LINE>TSTracingInfo tsTracingInfo = new TSTracingInfo();<NEW_LINE>List<String> activityList = new ArrayList<>();<NEW_LINE>List<Long> elapsedTimeList = new ArrayList<>();<NEW_LINE>for (Pair<String, Long> pair : this.activityList) {<NEW_LINE>String activity = pair.left... | setSeqFileNum(seqFileSet.size()); |
697,794 | public Object visit(StringConstraint n, Void arg) {<NEW_LINE>Expression<?> exprLeft = n.getLeftOperand();<NEW_LINE>Comparator cmpr = n.getComparator();<NEW_LINE>double distance = 0.0;<NEW_LINE>if (exprLeft instanceof StringBinaryComparison) {<NEW_LINE>StringBinaryComparison scTarget = (StringBinaryComparison) exprLeft;... | ).intValue() == 0); |
1,520,814 | public Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String actionGroupName) {<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>if (resourceGroup... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
783,234 | public void visitRemote(Remote remote) {<NEW_LINE>String id = remote.getId();<NEW_LINE>String remoteIp = remote.getIp();<NEW_LINE>if (remoteIp == null) {<NEW_LINE>remoteIp = id;<NEW_LINE>int index = remoteIp.indexOf(":Caller");<NEW_LINE>if (index > -1) {<NEW_LINE>remoteIp = remoteIp.substring(0, index);<NEW_LINE>}<NEW_... | id, app, m_projectName, role); |
1,152,810 | public void insert(final SpanBo span) {<NEW_LINE>Objects.requireNonNull(span, "span");<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("insert ApplicationTraceIndex: {}", span);<NEW_LINE>}<NEW_LINE>// Assert agentId<NEW_LINE>CollectorUtils.checkAgentId(span.getAgentId());<NEW_LINE>// Assert applicationNam... | getTableName(DESCRIPTOR.getTable()); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.