idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,336,413 | public static SceneGraphImageObject fromJSONObject(SceneGraphImage img, JSONObject obj) {<NEW_LINE>List<String> names = (List<String>) obj.get("names");<NEW_LINE>List<JSONArray> labelArrays = (List<JSONArray>) obj.get("labels");<NEW_LINE>List<List<CoreLabel>> labelsList = null;<NEW_LINE>if (labelArrays != null) {<NEW_L... | ("h")).intValue(); |
440,135 | void createFirstWindow() {<NEW_LINE>if (!downstreamCancelled.get()) {<NEW_LINE>if (requested.get() != 0L) {<NEW_LINE>emitted = 1;<NEW_LINE>windowCount.getAndIncrement();<NEW_LINE>UnicastProcessor<T> window = <MASK><NEW_LINE>windows.add(window);<NEW_LINE>FlowableWindowSubscribeIntercept<T> intercept = new FlowableWindow... | UnicastProcessor.create(bufferSize, this); |
396,554 | private long logStoreFiles(DiagnosticsLogger logger, String prefix, Path dir, MappedFileCounter mappedCounter) {<NEW_LINE>if (!Files.isDirectory(dir)) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>Path[] files = FileUtils.listPaths(dir);<NEW_LINE>if (files == null) {<NEW_LINE>logger.log(prefix + "<INACCESSIBLE>");<NEW_LINE>... | .comparing(Path::getFileName)); |
927,965 | public CaseInstanceMigrationBuilder fromCaseInstanceMigrationDocument(CaseInstanceMigrationDocument caseInstanceMigrationDocument) {<NEW_LINE>this.caseInstanceMigrationDocumentDocumentBuilder.setCaseDefinitionToMigrateTo(caseInstanceMigrationDocument.getMigrateToCaseDefinitionId());<NEW_LINE>this.caseInstanceMigrationD... | ), caseInstanceMigrationDocument.getMigrateToCaseDefinitionVersion()); |
575,704 | public void trackLinkLoadTime(long timeSaved, LinkLoadType linkLoadType, String url) {<NEW_LINE>switch(linkLoadType) {<NEW_LINE>case AppRedirectInstant:<NEW_LINE>// Add some time for the time taken to animate to the new app<NEW_LINE>timeSaved += APP_CHANGE_ANIM_TIME;<NEW_LINE>break;<NEW_LINE>case AppRedirectBrowser:<NE... | MainApplication.postEvent(mContext, mLinkLoadTimeStatsUpdatedEvent); |
1,617,915 | private PublicKey generatePublicImpl(KeySpec keySpec) throws InvalidKeyException, InvalidKeySpecException {<NEW_LINE>if (keySpec instanceof X509EncodedKeySpec) {<NEW_LINE>X509EncodedKeySpec x509Spec = (X509EncodedKeySpec) keySpec;<NEW_LINE>XDHPublicKeyImpl result = new XDHPublicKeyImpl(x509Spec.getEncoded());<NEW_LINE>... | new, result.getParams()); |
1,548,490 | private static void handleSubqueryExplain(ExecutionContext executionContext, RelNode logicalPlan, ArrayResultCursor result, AtomicInteger max, AtomicInteger current) {<NEW_LINE>if (current.incrementAndGet() > max.get()) {<NEW_LINE>max.set(current.get());<NEW_LINE>}<NEW_LINE>for (RexDynamicParam rexDynamicParam : Optimi... | getCurrentParameter(), null, executionContext); |
948,034 | public void provideFrames() throws InterruptedException {<NEW_LINE>MpegSectionInfo moof;<NEW_LINE>try (ReadableByteChannel channel = new DetachedByteChannel(Channels.newChannel(reader.seek))) {<NEW_LINE>while ((moof = reader.nextChild(root)) != null) {<NEW_LINE>if (!"moof".equals(moof.type)) {<NEW_LINE>reader.skip(moof... | , fragment.sampleSizes[i]); |
460,674 | QtyCalculationsBOMLine toQtyCalculationsBOMLine(@NonNull final I_PP_Order order, @NonNull final I_PP_Order_BOMLine orderBOMLine) {<NEW_LINE>return //<NEW_LINE>QtyCalculationsBOMLine.builder().bomProductId(ProductId.ofRepoId(order.getM_Product_ID())).bomProductUOM(uomDAO.getById(order.getC_UOM_ID())).componentType(BOMCo... | ())).build(); |
708,284 | private void importBPartnerPharmaFields(@NonNull final I_I_BPartner ibpartner, @NonNull final Object targetModel) {<NEW_LINE>final I_C_BPartner bpartner = InterfaceWrapperHelper.create(targetModel, I_C_BPartner.class);<NEW_LINE>bpartner.setIsPharmaciePermission(ibpartner.isPharmaciePermission());<NEW_LINE>if (!Check.is... | setSalesResponsible(ibpartner.getSalesResponsible()); |
1,748,564 | public static void handleFilteredAttributes(Field component, Datasource datasource, MetaPropertyPath mpp) {<NEW_LINE>if (component.isRequired() && datasource.getState() == Datasource.State.VALID && datasource.getItem() != null && mpp.getMetaProperty().getRange().isClass()) {<NEW_LINE>Entity targetItem = datasource.getI... | getItem().getValueEx(basePropertyItem); |
921,480 | public AutoScaleVmProfile updateAutoScaleVmProfile(UpdateAutoScaleVmProfileCmd cmd) {<NEW_LINE>Long profileId = cmd.getId();<NEW_LINE><MASK><NEW_LINE>Long autoscaleUserId = cmd.getAutoscaleUserId();<NEW_LINE>Map counterParamList = cmd.getCounterParamList();<NEW_LINE>Integer destroyVmGraceperiod = cmd.getDestroyVmGracep... | Long templateId = cmd.getTemplateId(); |
17,607 | private static Type createOverlayImplementationType(Type type) {<NEW_LINE>TypeDeclaration overlayImpl = type.getDeclaration().getOverlayImplementationTypeDeclaration();<NEW_LINE><MASK><NEW_LINE>Type overlayClass = new Type(type.getSourcePosition(), type.getVisibility(), overlayImpl);<NEW_LINE>for (Member member : type.... | DeclaredTypeDescriptor overlayImplDescriptor = overlayImpl.toUnparameterizedTypeDescriptor(); |
1,080,782 | private void closestFarthestPoints(LineSegment2D_F32 a, LineSegment2D_F32 b) {<NEW_LINE>dist[0] = a.<MASK><NEW_LINE>dist[1] = a.a.distance2(b.b);<NEW_LINE>dist[2] = a.b.distance2(b.a);<NEW_LINE>dist[3] = a.b.distance2(b.b);<NEW_LINE>// find the two points which are closest together and save which ones those are<NEW_LIN... | a.distance2(b.a); |
449,565 | public void onBindViewHolder(final PhotoViewHolder holder, final int position) {<NEW_LINE>Photo <MASK><NEW_LINE>TextView authorview = holder.itemView.findViewById(R.id.author);<NEW_LINE>ImageView photoview = holder.itemView.findViewById(R.id.photo);<NEW_LINE>holder.setAuthor(data.author);<NEW_LINE>photoview.setTransiti... | data = photos.get(position); |
303,116 | public static void main(final String[] args) throws InterruptedException {<NEW_LINE>final MediaDriver driver = EMBEDDED_MEDIA_DRIVER ? MediaDriver.launchEmbedded() : null;<NEW_LINE>final Aeron.Context ctx = new Aeron.Context().availableImageHandler(Ping::availablePongImageHandler);<NEW_LINE>final FragmentHandler fragme... | println("Message length of " + MESSAGE_LENGTH + " bytes"); |
553,592 | public void bind(@NonNull ReviewCommentModel commentModel) {<NEW_LINE>if (commentModel.getUser() != null) {<NEW_LINE>avatarView.setUrl(commentModel.getUser().getAvatarUrl(), commentModel.getUser().getLogin(), commentModel.getUser().isOrganizationType(), LinkParserHelper.isEnterprise(commentModel.getHtmlUrl()));<NEW_LIN... | setText(R.string.original_poster); |
1,577,852 | void analyze(Document doc, InputStream in, Writer xrefOut, JFieldBuilder jfbuilder) throws IOException {<NEW_LINE>List<String> defs = new ArrayList<>();<NEW_LINE>List<String> refs = new ArrayList<>();<NEW_LINE>List<String> full = new ArrayList<>();<NEW_LINE>StringWriter dout, rout, fout;<NEW_LINE>if (jfbuilder == null)... | String fstr = fout.toString(); |
164,956 | public CompletableFuture<LogRecordWithDLSN> asyncReadLastRecord(final LogSegmentMetadata l, final boolean fence, final boolean includeControl, final boolean includeEndOfStream) {<NEW_LINE>final AtomicInteger numRecordsScanned = new AtomicInteger(0);<NEW_LINE>final Stopwatch stopwatch = Stopwatch.createStarted();<NEW_LI... | .MICROSECONDS), TimeUnit.MICROSECONDS); |
1,120,263 | private static long timeLogToChronicle(int count) throws IOException {<NEW_LINE><MASK><NEW_LINE>final String basePath = System.getProperty("java.io.tmpdir", "/tmp") + "/my.logger.log";<NEW_LINE>deleteOnExit(basePath);<NEW_LINE>IntIndexedChronicle tsc = new IntIndexedChronicle(basePath);<NEW_LINE>tsc.useUnsafe(USE_UNSAF... | long start = System.nanoTime(); |
1,202,182 | public SQLStatement parseCreateCclTrigger() {<NEW_LINE>if (lexer.token() == Token.CREATE) {<NEW_LINE>lexer.nextToken();<NEW_LINE>}<NEW_LINE>DrdsCreateCclTriggerStatement stmt = new DrdsCreateCclTriggerStatement();<NEW_LINE>acceptIdentifier("CCL_TRIGGER");<NEW_LINE>if (lexer.token() == Token.IF) {<NEW_LINE>lexer.nextTok... | SQLName name = exprParser.name(); |
1,610,218 | private void invoiceLine(MRequest request, MInvoice invoice) {<NEW_LINE>AtomicInteger lineNo = new AtomicInteger(<MASK><NEW_LINE>Arrays.stream(request.getUpdates(null)).filter(requestUpdate -> requestUpdate.getQtyInvoiced() != null && requestUpdate.getQtyInvoiced().signum() != 0 && (requestUpdate.getM_ProductSpent_ID()... | invoice.getLines().length); |
277,289 | public Object evaluateRecord(OIdentifiable iRecord, ODocument iCurrentResult, OSQLFilterCondition iCondition, Object iLeft, Object iRight, OCommandContext iContext, final ODocumentSerializer serializer) {<NEW_LINE>List<Number> left = (List<Number>) iLeft;<NEW_LINE>double lat = left.get(0).doubleValue();<NEW_LINE>double... | (distance, DistanceUtils.EARTH_MEAN_RADIUS_KM)); |
1,594,243 | public static DescribeEventsResponse unmarshall(DescribeEventsResponse describeEventsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeEventsResponse.setRequestId(_ctx.stringValue("DescribeEventsResponse.RequestId"));<NEW_LINE>describeEventsResponse.setTotalRecordCount(_ctx.integerValue("DescribeEventsResponse.Tot... | ("DescribeEventsResponse.EventItems[" + i + "].EventId")); |
1,592,955 | public void init(Configuration conf, ParameterServerId[] psIds) {<NEW_LINE>int serverNum = conf.getInt(AngelConf.ANGEL_PS_NUMBER, AngelConf.DEFAULT_ANGEL_PS_NUMBER);<NEW_LINE>maxInflightRPCNumPerServer.set(conf.getInt(AngelConf.ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM_PERSERVER, AngelConf.DEFAULT_ANGEL_MATRIXTRANSFER_MAX_RE... | AngelConf.ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM, AngelConf.DEFAULT_ANGEL_MATRIXTRANSFER_MAX); |
886,943 | final StartImportFileTaskResult executeStartImportFileTask(StartImportFileTaskRequest startImportFileTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(startImportFileTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
668,729 | Collection<BQModule> toDIModules(Collection<BQModuleMetadata> modulesMetadata) {<NEW_LINE>ModuleGraph moduleGraph = new ModuleGraph(modulesMetadata.size());<NEW_LINE>Map<Class<? extends BQModule>, BQModuleMetadata> moduleByClass = new HashMap<>();<NEW_LINE>modulesMetadata.forEach(metadata -> {<NEW_LINE>Class<? extends ... | -> traceMessage(metadata, overrideModule)); |
470,539 | public void execute() throws IOException {<NEW_LINE>// collect types<NEW_LINE>try {<NEW_LINE>collectTypes();<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new QueryException(e);<NEW_LINE>}<NEW_LINE>// go through supertypes<NEW_LINE>Set<Supertype> additions = new HashSet<>();<NEW_LINE>for (Map.Entry<Class<?>, EntityTy... | addSupertypeFields(type, allTypes, handled); |
527,534 | protected String doIt() throws Exception {<NEW_LINE>final List<IReferenceNoGeneratorInstance> generatorInstancesAll = Services.get(IReferenceNoBL.class).getReferenceNoGeneratorInstances(getCtx());<NEW_LINE>final Map<Integer, List<IReferenceNoGeneratorInstance>> tableId2GeneratorInstances = groupByTableId(generatorInsta... | count_ok + " reference numbers generated; " + count_skipped + " skipped."); |
455,641 | public void run() {<NEW_LINE>if (Vertx.currentContext() != context) {<NEW_LINE>throw new IllegalArgumentException("Wrong Vert.x context used for multipart upload. Expected: " + context + ", actual: " + Vertx.currentContext());<NEW_LINE>}<NEW_LINE>AtomicInteger counter = new AtomicInteger();<NEW_LINE>while (!ended) {<NE... | pending.write(InboundBuffer.END_SENTINEL); |
1,234,360 | public static String[] resolveStringValues(@Nullable Object value, @Nullable Function<Object, Object> valueMapper) {<NEW_LINE>if (value == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (valueMapper != null) {<NEW_LINE>value = valueMapper.apply(value);<NEW_LINE>}<NEW_LINE>if (value instanceof CharSequence) {<NEW_... | i] = entry.toString(); |
1,566,025 | public StreamObserver<Messages.SimpleRequest> streamingBothWays(final StreamObserver<Messages.SimpleResponse> observer) {<NEW_LINE>// receive data forever and send data forever until client cancels or we shut down.<NEW_LINE>final ServerCallStreamObserver<Messages.SimpleResponse> responseObserver = (<MASK><NEW_LINE>// I... | ServerCallStreamObserver<Messages.SimpleResponse>) observer; |
1,800,504 | private void updateCategory(TicketCategoryModification tc, boolean freeOfCharge, ZoneId zoneId, Event event, boolean resetTicketsToFree) {<NEW_LINE>int eventId = event.getId();<NEW_LINE>final int price = evaluatePrice(tc.getPrice(), freeOfCharge, event.getCurrency());<NEW_LINE>TicketCategory original = ticketCategoryRe... | insertUpdateTicketInCategoryId(tc.getId()); |
1,491,873 | public byte[] apply(Object value) {<NEW_LINE>try {<NEW_LINE>Object[] kryoAndBuffer = kryoThreadLocal.get();<NEW_LINE>Kryo kryo = (Kryo) kryoAndBuffer[0];<NEW_LINE>WeakReference<byte[]> ref = (WeakReference<byte[]>) kryoAndBuffer[1];<NEW_LINE>byte[] buffer = ref.get();<NEW_LINE>if (buffer == null) {<NEW_LINE>buffer = ne... | >(output.getBuffer()); |
308,153 | public void start() throws Exception {<NEW_LINE>// Thread pool<NEW_LINE>final QueuedThreadPool threadPool = new QueuedThreadPool();<NEW_LINE>threadPool.setMinThreads(10);<NEW_LINE>threadPool.setMaxThreads(500);<NEW_LINE>// Jetty Server<NEW_LINE>server = new Server(threadPool);<NEW_LINE>// Setup Scheduler<NEW_LINE>serve... | final HttpConfiguration httpConfig = new HttpConfiguration(); |
36,575 | private Object calculateLocal(OResult currentRecord, Object target, OCommandContext ctx) {<NEW_LINE>if (methodCall != null) {<NEW_LINE>return methodCall.execute(target, ctx);<NEW_LINE>} else if (suffix != null) {<NEW_LINE>return suffix.execute(target, ctx);<NEW_LINE>} else if (arrayRange != null) {<NEW_LINE>return arra... | result = new ArrayList<>(); |
967,855 | final DisassociateApplicationFleetResult executeDisassociateApplicationFleet(DisassociateApplicationFleetRequest disassociateApplicationFleetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateApplicationFleetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | (super.beforeMarshalling(disassociateApplicationFleetRequest)); |
854,167 | public static Place from(NearbyResultItem item) {<NEW_LINE>String itemClass = item.getClassName().getValue();<NEW_LINE>String classEntityId = "";<NEW_LINE>if (!StringUtils.isBlank(itemClass)) {<NEW_LINE>classEntityId = itemClass.replace("http://www.wikidata.org/entity/", "");<NEW_LINE>}<NEW_LINE>// Set description when... | ()) ? "" : description); |
1,619,740 | private synchronized BufferedLogChannel allocateNewLog(File dirForNextEntryLog, String suffix) throws IOException {<NEW_LINE>List<File> ledgersDirs = ledgerDirsManager.getAllLedgerDirs();<NEW_LINE>String logFileName;<NEW_LINE>// It would better not to overwrite existing entry log files<NEW_LINE>File testLogFile = null;... | Long.toHexString(preallocatedLogId) + suffix; |
1,270,932 | public ApiResponse<BackupClient> backupGetClientWithHttpInfo(String id) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'id' when calling backupGetClient")... | localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
1,448,639 | public boolean substituteVariableAccess(VariableAccessElement variableAccess) {<NEW_LINE>String targetClassName = variableAccess.getTargetElement().toString();<NEW_LINE><MASK><NEW_LINE>if (variableAccess.getVariable().getModifiers().contains(Modifier.STATIC) && isMappedType(targetClassName) && targetClassName.startsWit... | String variableName = variableAccess.getVariableName(); |
1,728,596 | private void submitTask(long beId, TRoutineLoadTask tTask) throws LoadException {<NEW_LINE>Backend backend = Catalog.getCurrentSystemInfo().getBackend(beId);<NEW_LINE>if (backend == null) {<NEW_LINE>throw new LoadException("failed to send tasks to backend " + beId + " because not exist");<NEW_LINE>}<NEW_LINE>TNetworkAd... | (Lists.newArrayList(tTask)); |
632,383 | private void writeVirtualMethods(BaksmaliWriter writer, Set<String> directMethods) throws IOException {<NEW_LINE>boolean wroteHeader = false;<NEW_LINE>Set<String> writtenMethods = new HashSet<String>();<NEW_LINE>Iterable<? extends Method> virtualMethods;<NEW_LINE>if (classDef instanceof DexBackedClassDef) {<NEW_LINE>vi... | writer.write("# There is both a direct and virtual method with this signature.\n" + "# You will need to rename one of these methods, including all references.\n"); |
1,800,112 | final UpdateApprovalRuleTemplateDescriptionResult executeUpdateApprovalRuleTemplateDescription(UpdateApprovalRuleTemplateDescriptionRequest updateApprovalRuleTemplateDescriptionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateApprovalRuleTemplateDescriptionRequest);<NEW_LINE>AWSReque... | invoke(request, responseHandler, executionContext); |
1,024,315 | Proximity2DResult multiVertexGetNearestVertex(MultiVertexGeometry geom, Point2D inputPoint) {<NEW_LINE>MultiVertexGeometryImpl mpImpl = (MultiVertexGeometryImpl) geom._getImpl();<NEW_LINE>AttributeStreamOfDbl position = (AttributeStreamOfDbl) mpImpl.getAttributeStreamRef((Semantics.POSITION));<NEW_LINE>int pointCount =... | Point2D.sqrDistance(pt, inputPoint); |
964,283 | private RubyString calculateRubyName() {<NEW_LINE>boolean cache = true;<NEW_LINE>// no name...anonymous!<NEW_LINE>if (getBaseName() == null)<NEW_LINE>return calculateAnonymousRubyName();<NEW_LINE>Ruby runtime = getRuntime();<NEW_LINE>RubyClass objectClass = runtime.getObject();<NEW_LINE>List<RubyString> parents = new A... | RubyString fullName = runtime.newString(); |
1,050,477 | private List<String> aliveRemote(String name, List<Application> list) {<NEW_LINE>final List<String> values = new CopyOnWriteArrayList<>();<NEW_LINE>list.stream().filter(o -> {<NEW_LINE>try {<NEW_LINE>return !StringUtils.equals(o.getNode(), Config.node());<NEW_LINE>} catch (Exception e) {<NEW_LINE>logger.error(e);<NEW_L... | add(f.get()); |
161,930 | public void processIntegerTypeProperty(CodegenModel model, CodegenProperty property, String description, KtormSchema ktormSchema) {<NEW_LINE>Map<String, Object> columnDefinition = new HashMap<String, Object>();<NEW_LINE>String baseName = property.getBaseName();<NEW_LINE>String colName = toColumnName(baseName);<NEW_LINE... | Math.min(min, max); |
387,531 | private void writeDataFlowConfig(Document document, Element parentElement) {<NEW_LINE>Element dataFlowConfigTag = document.createElement(XMLConstants.TAG_DATA_FLOW_CONFIGURATION);<NEW_LINE>parentElement.appendChild(dataFlowConfigTag);<NEW_LINE><MASK><NEW_LINE>SolverConfiguration solverConfig = config.getSolverConfigura... | PathConfiguration pathConfig = config.getPathConfiguration(); |
958,954 | public void mouseReleased(MouseEvent e) {<NEW_LINE>isDragging = false;<NEW_LINE>// deselect rectangles on other selected pages.<NEW_LINE>ArrayList<AbstractPageViewComponent> selectedPages = documentViewModel.getSelectedPageText();<NEW_LINE>// check if we are over a page<NEW_LINE>AbstractPageViewComponent pageComponent ... | modeEvent.getPoint(), pageComp); |
1,380,162 | final AssociateResolverEndpointIpAddressResult executeAssociateResolverEndpointIpAddress(AssociateResolverEndpointIpAddressRequest associateResolverEndpointIpAddressRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(associateResolverEndpointIpAddressRequest);<NEW_LINE>AWSRequestMetrics awsRe... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
212,078 | private FragmentResult checkFragmented(final int lineInTheMiddle, final int offsetInStep, final BeforeAfter<List<String>> step, final boolean inBefore) {<NEW_LINE>final List<String> lines = inBefore ? step.getBefore() : step.getAfter();<NEW_LINE>final List<String> start = lines.subList(0, offsetInStep);<NEW_LINE>int st... | endDistance) - 1, !inBefore); |
1,362,235 | public void handleUserInvalidation(UserInvalidationEvent event) {<NEW_LINE>User user = event.getSource();<NEW_LINE>log.info("Handling user invalidation: {}", user.getLogin());<NEW_LINE>try (Transaction tx = persistence.createTransaction()) {<NEW_LINE>List<UUID> sessionsIds = userSessionsAPI.getUserSessionsStream().filt... | user.getLogin(), t); |
1,062,582 | public static void updateWebStartJarsOnChange(final EditableProperties ep, final PropertyEvaluator eval, boolean isWebStart) throws IOException {<NEW_LINE>Map<String, String> map = <MASK><NEW_LINE>filterOutLibItems(map, LIB_JAVAWS);<NEW_LINE>filterOutLibItems(map, LIB_PLUGIN);<NEW_LINE>if (isWebStart) {<NEW_LINE>Map<St... | getClassPathItems(ep, eval, ENDORSED_CLASSPATH); |
1,603,505 | public T fetchOne() throws NonUniqueResultException {<NEW_LINE>if (getMetadata().getModifiers().getLimit() == null) {<NEW_LINE>limit(2);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Query query = createQuery(false);<NEW_LINE>Object rv = execute(query, false);<NEW_LINE>if (rv instanceof List) {<NEW_LINE>// Compile time checking o... | = (List<T>) rv; |
1,116,275 | public boolean action(Request request, Response response) {<NEW_LINE>if (request.getNettyRequest() instanceof FullHttpRequest) {<NEW_LINE>JSONObject jsonObject = new JSONObject();<NEW_LINE>jsonObject.put("node", "1");<NEW_LINE>JSONObject cpuObject = new JSONObject();<NEW_LINE>jsonObject.put("cpu", cpuObject);<NEW_LINE>... | getRuntime().maxMemory()); |
1,824,231 | protected Map<String, Object> completeOAuthFlow(final String clientId, final String clientSecret, final String authCode, final String redirectUrl, final JsonNode inputOAuthConfiguration, final JsonNode oAuthParamConfig) throws IOException {<NEW_LINE>final var accessTokenUrl = getAccessTokenUrl(inputOAuthConfiguration);... | HttpResponse.BodyHandlers.ofString()); |
232,831 | private static RoutingPolicy computeBgpNeighborExportRoutingPolicy(Configuration c, BgpNeighbor neighbor, BgpVrf bgpVrf, @Nullable Long localAs) {<NEW_LINE>String vrfName = bgpVrf.getVrfName();<NEW_LINE>RoutingPolicy.Builder peerExportPolicy = RoutingPolicy.builder().setOwner(c).setName(generatedBgpPeerExportPolicyName... | getAcceptStatements(neighbor, bgpVrf, localAs); |
1,654,927 | protected KeyPoint transformKeyPoint(AffineTransform transformInverse, KeyPoint keyPoint) {<NEW_LINE>Point2D.Double p0 = new Point2D.Double(keyPoint.pt.x, keyPoint.pt.y);<NEW_LINE>Point2D.Double p1 = new Point2D.Double(keyPoint.pt.x + keyPoint.size * Math.acos(keyPoint.angle), keyPoint.pt.y - keyPoint.size * Math.acos(... | p1T = new Point2D.Double(); |
1,346,293 | protected void initHistoryJobHandlers() {<NEW_LINE>if (isAsyncHistoryEnabled) {<NEW_LINE>historyJobHandlers = new HashMap<>();<NEW_LINE>List<HistoryJsonTransformer> allHistoryJsonTransformers = new ArrayList<>(initDefaultHistoryJsonTransformers());<NEW_LINE>if (customHistoryJsonTransformers != null) {<NEW_LINE>allHisto... | = new AsyncHistoryJobZippedHandler(HistoryJsonConstants.JOB_HANDLER_TYPE_DEFAULT_ASYNC_HISTORY_ZIPPED); |
1,346,658 | final CancelJobResult executeCancelJob(CancelJobRequest cancelJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cancelJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | false), new CancelJobResultJsonUnmarshaller()); |
1,137,083 | private List<String> exceptionChainStringToListOfExceptions(String s) {<NEW_LINE>List<String> chain = new ArrayList<String>();<NEW_LINE>Pattern stackTraceCausedByClause = Pattern.compile(".*^(?!Caused by).+\\n(?:.*\\tat.+\\n)+");<NEW_LINE>Pattern stackTraceOtherThanCausedByClause = Pattern.compile(".*Caused by.+\\n(?:.... | add(matcher.group()); |
1,816,376 | public void accept(XMLEvent event, SynchronousSink<List<XMLEvent>> sink) {<NEW_LINE>if (event.isStartElement()) {<NEW_LINE>if (this.barrier == Integer.MAX_VALUE) {<NEW_LINE>QName startElementName = event.asStartElement().getName();<NEW_LINE>if (this.desiredName.equals(startElementName)) {<NEW_LINE>this.events = new Arr... | this.events != null, "No XMLEvent List"); |
480,916 | public void putRouteUnit(final RouteMapper dataSourceMapper, final Collection<RouteMapper> tableMappers) {<NEW_LINE>Collection<RouteUnit> targets = getTargetRouteUnits(dataSourceMapper);<NEW_LINE>if (targets.isEmpty()) {<NEW_LINE>RouteUnit unit = new RouteUnit(dataSourceMapper, new LinkedHashSet<>());<NEW_LINE>unit.get... | success = routeUnits.addAll(toBeAdded); |
1,402,672 | final ListSupportedPhoneNumberCountriesResult executeListSupportedPhoneNumberCountries(ListSupportedPhoneNumberCountriesRequest listSupportedPhoneNumberCountriesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSupportedPhoneNumberCountriesRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,292,628 | private static Optional<PluginPatcher> loadFromJar(File file) {<NEW_LINE>try (JarFile jarFile = new JarFile(file)) {<NEW_LINE>JarEntry jarEntry = jarFile.getJarEntry("plugin.yml");<NEW_LINE>if (jarEntry != null) {<NEW_LINE>try (InputStream stream = jarFile.getInputStream(jarEntry)) {<NEW_LINE>YamlConfiguration configur... | name = configuration.getString("arclight.patcher"); |
1,458,067 | private void performCodeGen() {<NEW_LINE>if (codeGenCompleted) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<Diagnostic> diagnostics = new ArrayList<>();<NEW_LINE>// add package resolution diagnostics<NEW_LINE>diagnostics.addAll(this.packageContext.getResolution().diagnosticResult().allDiagnostics);<NEW_LINE>// add balle... | .diagnosticResult = new DefaultDiagnosticResult(diagnostics); |
408,691 | public com.amazonaws.services.inspector2.model.ThrottlingException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.inspector2.model.ThrottlingException throttlingException = new com.amazonaws.services.inspector2.model.ThrottlingException(null);<NEW_LINE><MASK><N... | int originalDepth = context.getCurrentDepth(); |
1,367,554 | public void open(Map<String, Object> config, SinkContext sinkContext) throws Exception {<NEW_LINE>jdbcSinkConfig = JdbcSinkConfig.load(config);<NEW_LINE>jdbcUrl = jdbcSinkConfig.getJdbcUrl();<NEW_LINE>if (jdbcSinkConfig.getJdbcUrl() == null) {<NEW_LINE>throw new IllegalArgumentException("Required jdbc Url not set.");<N... | timeoutMs, timeoutMs, TimeUnit.MILLISECONDS); |
120,962 | private static String microsoftLogin(String email, String password, String cookie, String ppft, String urlPost) throws LoginException {<NEW_LINE>Map<String, String> <MASK><NEW_LINE>postData.put("login", email);<NEW_LINE>postData.put("loginfmt", email);<NEW_LINE>postData.put("passwd", password);<NEW_LINE>postData.put("P... | postData = new HashMap<>(); |
1,681,130 | public void validate(Object obj, Errors errors) {<NEW_LINE>CheckoutForm checkoutForm = (CheckoutForm) obj;<NEW_LINE>ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.addressLine1", "addressLine1.required");<NEW_LINE>ValidationUtils.rejectIfEmptyOrWhitespace(errors, "billingAddress.phonePrimary", "phone.... | rejectIfEmptyOrWhitespace(errors, "billingAddress.postalCode", "postalCode.required"); |
1,291,058 | protected void consumeTypeParameter1WithExtendsAndBounds() {<NEW_LINE>// TypeParameter1 ::= TypeParameterHeader 'extends' ReferenceType AdditionalBoundList1<NEW_LINE>int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];<NEW_LINE>TypeReference[] bounds = new TypeReference[additionalBoundsLengt... | bound.bits & ASTNode.HasTypeAnnotations); |
1,305,602 | private void writeEnumValueOfMethod(JEnumType type, JMethod method, JMethod valuesMethod) {<NEW_LINE>JField mapField;<NEW_LINE>TypeBinding mapType;<NEW_LINE>ReferenceBinding enumType = curCud.scope.getJavaLangEnum();<NEW_LINE>{<NEW_LINE>SourceInfo info = type.getSourceInfo();<NEW_LINE>JClassType mapClass = new JClassTy... | throw new RuntimeException("Unexpectedly unable to access Enum.createValueOfMap via reflection. " + "Likely a dependency on the com.google.gwt.user.User module is missing."); |
562,227 | private void loadSegment(ScheduleSetSegment segment) {<NEW_LINE>final long start = System.currentTimeMillis();<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>long offset = segment.getWrotePosition();<NEW_LINE>if (!loadingCursor.shiftCursor(baseOffset, offset)) {<NEW_LINE>LOGGER.error("doLoadSegment error,shift loadingCursor f... | long baseOffset = segment.getSegmentBaseOffset(); |
1,223,654 | // NOTE: before changing the SeqNo ORDER BY clause, please check were it is used<NEW_LINE>@Override<NEW_LINE>protected Iterator<I_C_Print_Job_Line> retrievePrintJobLines0(final I_C_Print_Job job, final int fromSeqNo, final int toSeqNo) {<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(job);<NEW_LINE>final... | params = new ArrayList<>(); |
1,488,727 | public MappeableContainer andNot(final MappeableBitmapContainer value2) {<NEW_LINE>int newCardinality = 0;<NEW_LINE>if (BufferUtil.isBackedBySimpleArray(this.bitmap) && BufferUtil.isBackedBySimpleArray(value2.bitmap)) {<NEW_LINE>long[] b = this.bitmap.array();<NEW_LINE>long[] v2 = value2.bitmap.array();<NEW_LINE>int le... | value2.bitmap.array()); |
922,134 | final ListNodegroupsResult executeListNodegroups(ListNodegroupsRequest listNodegroupsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listNodegroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListNodegro... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
855,680 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = <MASK><NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));<NEW_LINE>}<NEW_LINE>String res... | Utils.getValueFromIdByName(id, "resourceGroups"); |
1,783,885 | public AutoCloseable start() throws IOException, InterruptedException {<NEW_LINE>File bootstrapScript = File.createTempFile("bootstrap_beam_venv", ".py");<NEW_LINE>bootstrapScript.deleteOnExit();<NEW_LINE>try (FileOutputStream fout = new FileOutputStream(bootstrapScript.getAbsolutePath())) {<NEW_LINE>ByteStreams.copy(g... | LOG.info("Running bootstrap command " + bootstrapCommand); |
510,432 | public JSONObject toJSONObject(SceneGraphImage sceneGraphImage) {<NEW_LINE>JSONObject obj = new JSONObject();<NEW_LINE>JSONObject bbox = new JSONObject();<NEW_LINE>bbox.put("h", this.boundingBox.h);<NEW_LINE>bbox.put("w", this.boundingBox.w);<NEW_LINE>bbox.put("x", this.boundingBox.x);<NEW_LINE>bbox.put("y", this.bound... | (SceneGraphImageUtils.labelToString(lbl)); |
1,124,912 | private static SleepingEvent.Pre createAndPostSleepingEventPre(CauseStackManager.StackFrame frame, ForgeToSpongeEventData eventData) {<NEW_LINE>final PlayerSleepInBedEvent forgeEvent = (PlayerSleepInBedEvent) eventData.getForgeEvent();<NEW_LINE>final net.minecraft.world.World world = forgeEvent.getEntity().getEntityWor... | Entity) forgeEvent.getEntity()); |
52,382 | final TagResourceResult executeTagResource(TagResourceRequest tagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(tagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,686,426 | private static final OnError ignoreWarnOrFail() {<NEW_LINE>String value = null;<NEW_LINE>BundleContext bundleContext = priv.getBundleContext(FrameworkUtil.getBundle(VariableRegistry.class));<NEW_LINE>ServiceReference<VariableRegistry> ref = priv.getServiceReference(bundleContext, VariableRegistry.class);<NEW_LINE>Varia... | tc, "onError: " + value, x); |
1,321,483 | public void execute(String[] args) throws Exception {<NEW_LINE>Opts opts = new Opts();<NEW_LINE>opts.parseArgs(keyword(), args);<NEW_LINE>if (opts.filePath == null) {<NEW_LINE>throw new IllegalArgumentException("No properties file was given");<NEW_LINE>}<NEW_LINE>Path path = Path.of(opts.filePath);<NEW_LINE>if (!path.t... | ).asSubclass(CompactionPlanner.class); |
1,461,275 | public void execute(State state) throws WorkflowExecutionException {<NEW_LINE>TlsContext ctx = state.getTlsContext(connectionAlias);<NEW_LINE>StringBuilder sb = new StringBuilder("\n\nContext: " + ctx);<NEW_LINE>sb.append("\n (Record Layer) ");<NEW_LINE>if (ctx.getSelectedCipherSuite() == null) {<NEW_LINE>sb.append("\... | ).getServerRsaModulus()))); |
1,062,882 | public WeightedPath findSinglePath(Node start, Node end) {<NEW_LINE>lastMetadata = new Metadata();<NEW_LINE>AStarIterator iterator = new AStarIterator(start, end);<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>Node node = iterator.next();<NEW_LINE>if (node.equals(end)) {<NEW_LINE>// Hit, return path<NEW_LINE>double we... | node = rel.getOtherNode(node); |
587,481 | final BatchGetAggregateResourceConfigResult executeBatchGetAggregateResourceConfig(BatchGetAggregateResourceConfigRequest batchGetAggregateResourceConfigRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchGetAggregateResourceConfigRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | invoke(request, responseHandler, executionContext); |
138,719 | private synchronized void loadEntries(Path mapFile, boolean failFast) throws IOException {<NEW_LINE>if (!mapFile.exists()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long fileSize = mapFile.getFileSize();<NEW_LINE>if (fileSize < MIN_MAPFILE_SIZE) {<NEW_LINE>if (failFast) {<NEW_LINE>throw new IOException(mapFile + " is too ... | DataInputStream(new ByteArrayInputStream(mapBytes)); |
82,390 | protected soot.Local handlePrivateFieldUnarySet(polyglot.ast.Unary unary) {<NEW_LINE>polyglot.ast.Field fLeft = (polyglot.ast.Field) unary.expr();<NEW_LINE>soot.Value base = base().getBaseLocal(fLeft.target());<NEW_LINE>soot.Value fieldGetLocal = getPrivateAccessFieldLocal(fLeft, base);<NEW_LINE>soot.Local tmp = genera... | ).newAssignStmt(tmp, fieldGetLocal); |
672,338 | private synchronized void sendMessage(ApnsNotification m, boolean fromBuffer) throws NetworkIOException {<NEW_LINE>logger.debug("sendMessage {} fromBuffer: {}", m, fromBuffer);<NEW_LINE>if (delegate instanceof StartSendingApnsDelegate) {<NEW_LINE>((StartSendingApnsDelegate) delegate).startSending(m, fromBuffer);<NEW_LI... | write(m.marshall()); |
635,817 | int run(final Namespace options, final HeliosClient client, final PrintStream out, final boolean json, final BufferedReader stdin) throws ExecutionException, InterruptedException, IOException {<NEW_LINE>final String name = options.getString(nameArg.getDest());<NEW_LINE>final RemoveDeploymentGroupResponse status = clien... | removeDeploymentGroup(name).get(); |
1,138,922 | public void caseArrayType(ArrayType type) {<NEW_LINE>Node array = node;<NEW_LINE>for (Type t = type; t instanceof ArrayType; t = ((ArrayType) t).getElementType()) {<NEW_LINE>ArrayType at = (ArrayType) t;<NEW_LINE>if (at.baseType instanceof RefType) {<NEW_LINE>// var tmpArray;<NEW_LINE>LocalVarNode localArray = pag.make... | pag.addEdge(newArray, localArray); |
1,227,322 | public boolean fillAndScanCommand(ScriptHost host, int x, int y, int z) {<NEW_LINE>if (CarpetServer.scriptServer.stopAll)<NEW_LINE>return false;<NEW_LINE>try {<NEW_LINE>Context context = new CarpetContext(host, source, origin).with("x", (c, t) -> new NumericValue(x - origin.getX()).bindTo("x")).with("y", (c, t) -> new ... | (cc, tt) -> playerValue); |
71,437 | public static double[][] rref(double[][] matrix) {<NEW_LINE>double[][] rref = new double[matrix.length][];<NEW_LINE>for (int i = 0; i < matrix.length; i++) {<NEW_LINE>rref[i] = Arrays.copyOf(matrix[i], matrix[i].length);<NEW_LINE>}<NEW_LINE>int r = 0;<NEW_LINE>for (int c = 0; c < rref[0].length && r < rref.length; c++)... | * rref[r][j]; |
253,407 | private NameEnvironmentAnswer findClassInternal(char[] typeName, String qualifiedPackageName, String qualifiedBinaryFileName, boolean asBinaryOnly) {<NEW_LINE>// most common case TODO(SHMOD): use module name from this.module?<NEW_LINE>if (!isPackage(qualifiedPackageName, null))<NEW_LINE>return null;<NEW_LINE>String fil... | doesFileExist(fileName + SUFFIX_STRING_java, qualifiedPackageName); |
1,461,628 | public void rearrangeBasicBlocks(List<BasicBlock> basicBlocks) {<NEW_LINE>if (!isPacked()) {<NEW_LINE>throw new IllegalStateException("This operation is not supported on unpacked programs");<NEW_LINE>}<NEW_LINE>if (basicBlocks.size() != this.basicBlocks.size()) {<NEW_LINE>throw new IllegalArgumentException("New list of... | ", expected " + basicBlockCount() + ")"); |
674,956 | public void mutateMany(Map<String, Map<StaticBuffer, KCVMutation>> mutations, StoreTransaction txh) throws BackendException {<NEW_LINE>Long putTimestamp = null;<NEW_LINE>Long delTimestamp = null;<NEW_LINE>MaskedTimestamp commitTime = null;<NEW_LINE>if (assignTimestamp) {<NEW_LINE>commitTime = new MaskedTimestamp(txh);<... | add(commands.getSecond()); |
1,062,007 | public static HystrixObservableCommand.Setter build(final HystrixHandle hystrixHandle) {<NEW_LINE>initHystrixHandleOnRequire(hystrixHandle);<NEW_LINE>HystrixCommandGroupKey groupKey = HystrixCommandGroupKey.Factory.asKey(hystrixHandle.getGroupKey());<NEW_LINE>HystrixCommandKey commandKey = HystrixCommandKey.Factory.<MA... | asKey(hystrixHandle.getCommandKey()); |
1,041,587 | protected Expression transformPropertyExpression(PropertyExpression pe) {<NEW_LINE>if (currentMethod != null && currentMethod.isStatic() && isSuperExpression(pe.getObjectExpression())) {<NEW_LINE>PropertyExpression pexp = new PropertyExpression(new ClassExpression(currentClass.getUnresolvedSuperClass()), transform(pe.g... | result = findStaticMethodImportFromModule(foundConstant, foundArgs); |
1,304,143 | protected CacheResult do_REMOVE(K key) {<NEW_LINE>try {<NEW_LINE>RedisFuture<Long> future = keyAsyncCommands.del(buildKey(key));<NEW_LINE>CacheResult result = new CacheResult(future.handle((rt, ex) -> {<NEW_LINE>if (ex != null) {<NEW_LINE>JetCacheExecutor.defaultExecutor().execute(() -> logError("REMOVE", key, ex));<NE... | CacheResultCode.FAIL, null, null); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.