idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
263,987 | public polyglot.ast.Node compile(polyglot.frontend.Compiler compiler, String fileName, polyglot.frontend.ExtensionInfo extInfo) {<NEW_LINE>SourceLoader source_loader = compiler.sourceExtension().sourceLoader();<NEW_LINE>try {<NEW_LINE>FileSource source = new FileSource(new File(fileName));<NEW_LINE>// This hack is to s... | sourceJobMap().get(source); |
849,411 | public static ReferenceTestProtocolSchedules create() {<NEW_LINE>final ImmutableMap.Builder<String, ProtocolSchedule> builder = ImmutableMap.builder();<NEW_LINE>builder.put("Frontier", createSchedule(new StubGenesisConfigOptions()));<NEW_LINE>builder.put("FrontierToHomesteadAt5", createSchedule(new StubGenesisConfigOpt... | ).eip150Block(5))); |
642,627 | final IRubyObject uptoEndless(ThreadContext context, Block block) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>StringSites sites = sites(context);<NEW_LINE>CallSite succ = sites.succ;<NEW_LINE>boolean isAscii = scanForCodeRange() == CR_7BIT;<NEW_LINE>RubyString current = strDup(context.runtime);<NEW_LINE>if (isA... | to, USASCIIEncoding.INSTANCE, CR_7BIT); |
1,007,393 | public BufferedImage intelligentResize(File incomingImage, int width, int height, int resampleOption) {<NEW_LINE>final String hash = DigestUtils.sha256Hex(incomingImage.getAbsolutePath());<NEW_LINE>Dimension originalSize = getWidthHeight(incomingImage);<NEW_LINE>width = <MASK><NEW_LINE>height = Math.min(maxSize, height... | Math.min(maxSize, width); |
1,471,425 | public void bind(OCShare publicShare, ShareeListAdapterListener listener) {<NEW_LINE>if (ShareType.EMAIL == publicShare.getShareType()) {<NEW_LINE>binding.name.setText(publicShare.getSharedWithDisplayName());<NEW_LINE>binding.icon.setImageDrawable(ResourcesCompat.getDrawable(context.getResources(), R.drawable.ic_email,... | copyLink.setVisibility(View.GONE); |
1,092,686 | private StringBuilder replace(String wmlTemplateString, int offset, StringBuilder strB, java.util.Map<String, ?> mappings) {<NEW_LINE>int startKey = wmlTemplateString.indexOf("${", offset);<NEW_LINE>if (startKey == -1)<NEW_LINE>return strB.append(wmlTemplateString.substring(offset));<NEW_LINE>else {<NEW_LINE>strB.appen... | substring(startKey + 2, keyEnd); |
1,841,634 | public boolean enterImportSpecifierNode(ImportSpecifierNode importSpecifierNode) {<NEW_LINE>if (importSpecifierNode.getIdentifier() != null) {<NEW_LINE>int start = importSpecifierNode.getIdentifier().getFinish();<NEW_LINE>TokenSequence<? extends JsTokenId> ts = LexUtilities.getJsPositionedSequence(result.getSnapshot(),... | length())), SEMANTIC_KEYWORD); |
13,619 | private static <T, P extends PersistentProperty<P>> PreferredConstructor<T, P> buildPreferredConstructor(Constructor<?> constructor, TypeInformation<T> typeInformation, @Nullable PersistentEntity<T, P> entity) {<NEW_LINE>if (constructor.getParameterCount() == 0) {<NEW_LINE>return new PreferredConstructor<>((Constructor... | parameterTypes = typeInformation.getParameterTypes(constructor); |
1,710,229 | private void handleAsyncException(@NonNull final UserId errorNotificationRecipient, @NonNull final Exception e1) {<NEW_LINE>final Throwable cause = AdempiereException.extractCause(e1);<NEW_LINE>final AdIssueId issueId = Services.get(IErrorManager<MASK><NEW_LINE>final TargetRecordAction targetAction = TargetRecordAction... | .class).createIssue(cause); |
800,948 | Object tofile(VirtualFrame frame, PArray self, Object file, @Cached PyObjectCallMethodObjArgs callMethod) {<NEW_LINE>if (self.getLength() > 0) {<NEW_LINE>int remaining = self.getLength() * self.getFormat().bytesize;<NEW_LINE>int blocksize = 64 * 1024;<NEW_LINE>int nblocks = (remaining + blocksize - 1) / blocksize;<NEW_... | buffer, 0, buffer.length); |
700,458 | private void trashComment() {<NEW_LINE>if (!isAdded() || mComment == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CommentStatus status = CommentStatus.fromString(mComment.getStatus());<NEW_LINE>// If the comment status is trash or spam, next deletion is a permanent deletion.<NEW_LINE>if (status == CommentStatus.TRASH |... | (R.string.dlg_sure_to_delete_comment)); |
1,358,542 | private RubyNumeric fix_expt(ThreadContext context, RubyInteger other, final int sign) {<NEW_LINE>final RubyInteger tnum, tden;<NEW_LINE>if (sign > 0) {<NEW_LINE>// other > 0<NEW_LINE>// exp > 0<NEW_LINE>tnum = (RubyInteger) <MASK><NEW_LINE>// exp > 0<NEW_LINE>tden = (RubyInteger) f_expt(context, den, other);<NEW_LINE>... | f_expt(context, num, other); |
1,266,684 | private void checkAuthAttributesNoDuplicates(final Map<String, List<AuthorizationAttribute>> allAttributes) throws UnableProcessException {<NEW_LINE>final String duplicatesErrMessage = allAttributes.entrySet().stream().map(entry -> {<NEW_LINE>final String property = entry.getKey();<NEW_LINE>final List<AuthorizationAttr... | format("authorization property '%s' contains duplicated attribute(s): %s", property, duplicatesStr); |
447,029 | private void extractPeakListList() throws UnsupportedAudioFileException {<NEW_LINE><MASK><NEW_LINE>TarsosDSPAudioInputStream stream = f.getMonoStream(sampleRate, 0);<NEW_LINE>final SpectralPeakProcessor spectralPeakFollower = new SpectralPeakProcessor(fftsize, overlap, sampleRate);<NEW_LINE>AudioDispatcher dispatcher =... | PipedAudioStream f = new PipedAudioStream(fileName); |
1,642,096 | private void executeCommand(String slicePath) {<NEW_LINE>if (exec == null)<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>String[] newArr = new String[exec.length + 1];<NEW_LINE>System.arraycopy(exec, 0, <MASK><NEW_LINE>newArr[exec.length] = slicePath;<NEW_LINE>ProcessWrapper pw = new ProcessWrapper(newArr, null);<NEW_LINE>i... | newArr, 0, exec.length); |
1,543,442 | public Status insert(String table, String key, Map<String, ByteIterator> values) {<NEW_LINE>try {<NEW_LINE>Set<String> fields = values.keySet();<NEW_LINE>PreparedStatement stmt = insertStmts.get(fields);<NEW_LINE>// Prepare statement on demand<NEW_LINE>if (stmt == null) {<NEW_LINE>Insert insertStmt = QueryBuilder.inser... | YCSB_KEY, QueryBuilder.bindMarker()); |
584,279 | public Site2SiteCustomerGatewayResponse createSite2SiteCustomerGatewayResponse(Site2SiteCustomerGateway result) {<NEW_LINE>Site2SiteCustomerGatewayResponse response = new Site2SiteCustomerGatewayResponse();<NEW_LINE>response.setId(result.getUuid());<NEW_LINE>response.setName(result.getName());<NEW_LINE>response.setGate... | setEspPolicy(result.getEspPolicy()); |
1,040,069 | private Observable<Boolean> addDepictsProperty(final String fileEntityId, final List<String> depictedItems) {<NEW_LINE>final EditClaim data = editClaim(// Wikipedia:Sandbox (Q10)<NEW_LINE>ConfigUtils.isBetaFlavour() ? // Wikipedia:Sandbox (Q10)<NEW_LINE>Collections.singletonList("Q10") : depictedItems);<NEW_LINE>return... | context, throwable.toString()); |
1,471,659 | protected XML resolveXml(Annotated a, Annotation[] annotations, io.swagger.v3.oas.annotations.media.Schema schema) {<NEW_LINE>// if XmlRootElement annotation, construct an Xml object and attach it to the model<NEW_LINE>XmlRootElement rootAnnotation = null;<NEW_LINE>if (a != null) {<NEW_LINE>rootAnnotation = a.getAnnota... | name(rootAnnotation.name()); |
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<<MASK><NEW_LINE>if (labelArrays != null) {<NEW_LINE>labelsList = Generics.new... | List<CoreLabel>> labelsList = null; |
1,266,569 | public void testSkipFirstExecution(PrintWriter out) throws Exception {<NEW_LINE>DBIncrementTask task = new DBIncrementTask("testSkipFirstExecution");<NEW_LINE>task.getExecutionProperties().put(AutoPurge.PROPERTY_NAME, AutoPurge.NEVER.toString());<NEW_LINE>Trigger trigger = new FixedRepeatTrigger(2, 59, 1);<NEW_LINE>Tas... | Integer result = status.get(); |
195,587 | public ContextManager build(final ContextManagerBuilderParameter parameter) throws SQLException {<NEW_LINE>ModeScheduleContextFactory.getInstance().init(parameter.getInstanceDefinition().getInstanceId().getId(), parameter.getModeConfig());<NEW_LINE>ClusterPersistRepository repository = ClusterPersistRepositoryFactory.n... | MetaDataPersistService metaDataPersistService = new MetaDataPersistService(repository); |
265,039 | public void refresh(TableCell cell) {<NEW_LINE>Object ds = cell.getDataSource();<NEW_LINE>if (!(ds instanceof Download)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Download dm = (Download) ds;<NEW_LINE>long value;<NEW_LINE>long sortValue;<NEW_LINE>String prefix = "";<NEW_LINE>int iState;<NEW_LINE>iState = dm.getState();<NE... | ) cell).setIcon(imgDown); |
1,360,338 | public final Result doWork() {<NEW_LINE>final PackageDirectory dir = Repository.get().getPackageDirectory();<NEW_LINE>if (dir == null)<NEW_LINE>return Result.retry();<NEW_LINE>dm.setPackageDirectory(dir);<NEW_LINE>if (BuildConfig.DEBUG)<NEW_LINE>Log.v(TAG, "doWork: " + getClass().getName());<NEW_LINE>DataPack p = getTa... | lock = locks.get(key); |
1,154,285 | public boolean onTouch(View v, MotionEvent event) {<NEW_LINE>postAction();<NEW_LINE>if (event.getAction() == MotionEvent.ACTION_DOWN && popupView.getLayoutParams() != null) {<NEW_LINE>x = event.getRawX();<NEW_LINE>y = event.getRawY();<NEW_LINE>w = popupView.getLayoutParams().width;<NEW_LINE>h = popupView.getLayoutParam... | x2 = AnchorHelper.getX(anchor); |
368,562 | public void addServiceService(final String objectName, final String serviceAddress, final ServiceQueue serviceQueue) {<NEW_LINE>servicesToStop.add(serviceQueue);<NEW_LINE>servicesToFlush.add(serviceQueue);<NEW_LINE><MASK><NEW_LINE>if (serviceAddress != null && !serviceAddress.isEmpty()) {<NEW_LINE>serviceMapping.put(se... | QueueDispatch dispatch = new QueueDispatch(serviceQueue); |
779,245 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>Player player = game.getPlayer(this.getTargetPointer().getFirst(game, source));<NEW_LINE>MageObject <MASK><NEW_LINE>if (controller != null && player != null && mageObject != null) {<NEW_LINE... | mageObject = game.getObject(source); |
1,808,722 | public void onError(Channel channel, Throwable error) {<NEW_LINE>if (error instanceof OutOfMemoryError) {<NEW_LINE>OutOfMemoryErrorDispatcher.onOutOfMemory((OutOfMemoryError) error);<NEW_LINE>}<NEW_LINE>if (channel == null) {<NEW_LINE>// todo: question is if logging is the best solution. If an exception happened withou... | logger.warning("Channel error occurred", error); |
898,436 | public void testDynamicDisableWithNoContextInfo() throws Exception {<NEW_LINE>// Step 1 - Update server configuration - ContextInfo = false , Threshold = 2s<NEW_LINE>CommonTasks.writeLogMsg(Level.INFO, "---> Updating server with ContextInfo = false");<NEW_LINE>server.setServerConfigurationFile("server_NOContextInfo.xm... | writeLogMsg(Level.INFO, "********* Removed Request Timing Feature..! *********"); |
838,630 | static double powerSeries(double a, double b, double x) throws ArithmeticException {<NEW_LINE>double s, t, u, v, n, t1, z, ai;<NEW_LINE>ai = 1.0 / a;<NEW_LINE>u = (1.0 - b) * x;<NEW_LINE>v = u / (a + 1.0);<NEW_LINE>t1 = v;<NEW_LINE>t = u;<NEW_LINE>n = 2.0;<NEW_LINE>s = 0.0;<NEW_LINE>z = MACHEP * ai;<NEW_LINE>while (Mat... | a * Math.log(x); |
949,637 | private void openPathSegments(String[] pathSegments, int from) throws IOException {<NEW_LINE>for (int i = from; i < pathSegments.length; i++) {<NEW_LINE>StringBuilder sb = new StringBuilder(pathSegments[0]);<NEW_LINE>StringBuilder parentPath = new StringBuilder(pathSegments[0]);<NEW_LINE>for (int j = 1; j <= i; j++) {<... | .append(pathSegments[j]); |
1,605,393 | public void destroy() {<NEW_LINE>if (logger.isInfoEnabled()) {<NEW_LINE>logger.info("Destroying protocol [" + this.getClass().getSimpleName() + "] ...");<NEW_LINE>}<NEW_LINE>super.destroy();<NEW_LINE>if (connectionMonitor != null) {<NEW_LINE>connectionMonitor.shutdown();<NEW_LINE>}<NEW_LINE>for (Map.Entry<String, Proto... | logger.warn("Error closing rest client", t); |
1,809,286 | public Hover onMouseMove(Fonts.TextMeasurer m, Repainter repainter, double x, double y, int mods) {<NEW_LINE>if (y >= (timeline.getPreferredHeight() / 2) && y <= timeline.getPreferredHeight() && x > LABEL_WIDTH) {<NEW_LINE>return flagHover(x);<NEW_LINE>}<NEW_LINE>double topHeight = top.getPreferredHeight();<NEW_LINE>Ho... | state.setHighlight(TimeSpan.ZERO); |
760,218 | static int multiplyAndSubtract(int[] a, int start, int[] b, int bLen, int c) {<NEW_LINE>long carry0 = 0;<NEW_LINE>long carry1 = 0;<NEW_LINE>for (int i = 0; i < bLen; i++) {<NEW_LINE>carry0 = TMultiplication.unsignedMultAddAdd(b[i], c, (int) carry0, 0);<NEW_LINE>carry1 = (a[start + i] & 0xffffffffL) - (carry0 & 0xffffff... | ] & 0xffffffffL) - carry0 + carry1; |
561,992 | public static byte[] generateWARCInfo(Map<String, String> fields) {<NEW_LINE>StringBuffer buffer = new StringBuffer();<NEW_LINE>buffer.append(WARC_VERSION);<NEW_LINE>buffer.append(CRLF);<NEW_LINE>buffer.append("WARC-Type: ").append(WARC_TYPE_WARCINFO).append(CRLF);<NEW_LINE>String mainID = UUID.randomUUID().toString();... | (filename).append(CRLF); |
65,420 | public boolean apply(Game game, Ability source) {<NEW_LINE>if (game.getPermanentEntering(source.getSourceId()) != null) {<NEW_LINE>OneShotEffect returnToHandEffect = new ReturnToHandTargetEffect();<NEW_LINE>ConditionalOneShotEffect mustBeOnBattlefieldToReturn = new <MASK><NEW_LINE>mustBeOnBattlefieldToReturn.setText("r... | ConditionalOneShotEffect(returnToHandEffect, DashAddDelayedTriggeredAbilityEffect::check); |
726,960 | public void visitPhpBinaryExpression(@NotNull BinaryExpression expression) {<NEW_LINE>final Collection<BooleanSupplier> callbacks = new ArrayList<>();<NEW_LINE>callbacks.add(() -> InstanceOfTraitStrategy.apply(expression, holder));<NEW_LINE>callbacks.add(() -> EqualsInAssignmentContextStrategy.apply(expression, holder)... | .apply(expression, holder)); |
1,219,710 | public BlazeCommandResult exec(CommandEnvironment env, OptionsParsingResult options) {<NEW_LINE>env.getEventBus()<MASK><NEW_LINE>BlazeRuntime runtime = env.getRuntime();<NEW_LINE>OutErr outErr = env.getReporter().getOutErr();<NEW_LINE>Options helpOptions = options.getOptions(Options.class);<NEW_LINE>if (options.getResi... | .post(new NoBuildEvent()); |
1,518,822 | public void started(Container moduleContainer) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug("started");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>WebAppConfiguration webConfig = (WebAppConfiguration) moduleContainer.adapt(WebAppConfig.class);<NEW_LINE>String name = webConfig.getModuleName();<N... | > siplets = appDesc.getSipServlets(); |
1,764,202 | private void syncInstancesIfTimestampDiffers(String appName, String id, InstanceInfo info, InstanceInfo infoFromPeer) {<NEW_LINE>try {<NEW_LINE>if (infoFromPeer != null) {<NEW_LINE>logger.warn("Peer wants us to take the instance information from it, since the timestamp differs," + "Id : {} My Timestamp : {}, Peer's tim... | logger.warn("Exception when trying to set information from peer :", e); |
1,175,991 | private void validateChecks(Set<String> tableChecks, Set<String> fieldChecks) {<NEW_LINE>if (tableChecks.isEmpty() && fieldChecks.isEmpty()) {<NEW_LINE>// Nothing to validate<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Set<String<MASK><NEW_LINE>List<String> undefinedChecks = Stream.concat(tableChecks.stream(), fieldChecks.str... | > staticChecks = dictionary.getCheckIdentifiers(); |
138,936 | private void processRankProfiles(List<RankProfile> ready, QueryProfileRegistry queryProfiles, ImportedMlModels importedModels, Schema schema, AttributeFields attributeFields, ModelContext.Properties deployProperties, ExecutorService executor) {<NEW_LINE>Map<String, Future<RawRankProfile>> futureRawRankProfiles = new Li... | add(rank.onnxModels()); |
381,589 | public DB2TableUniqueKey configureObject(DBRProgressMonitor monitor, Object table, DB2TableUniqueKey constraint, Map<String, Object> options) {<NEW_LINE>return new UITask<DB2TableUniqueKey>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected DB2TableUniqueKey runTask() {<NEW_LINE>EditConstraintPage editPage = new EditC... | getSelectedAttributes().size()); |
908,237 | private void loadContent() {<NEW_LINE>new RefreshBlobTask(repo, sha, this) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void onSuccess(Blob blob) throws Exception {<NEW_LINE>super.onSuccess(blob);<NEW_LINE><MASK><NEW_LINE>ViewUtils.setGone(codeView, false);<NEW_LINE>editor.setSource(path, blob);<NEW_LINE>CommitFil... | ViewUtils.setGone(loadingBar, true); |
1,263,037 | public final void initBeforeMapping(@NotNull final File file, @NotNull final RandomAccessFile raf, final long headerEnd, final boolean recover) throws IOException {<NEW_LINE>this.file = file;<NEW_LINE>this.raf = raf;<NEW_LINE>this.headerSize = roundUpMapHeaderSize(headerEnd);<NEW_LINE>if (!createdOrInMemory) {<NEW_LINE... | int) globalMutableState.maxSize()); |
410,636 | public static void main(String[] args) {<NEW_LINE>String fileName = UtilIO.pathExample("background/highway_bridge_jitter.mp4");<NEW_LINE>ImageType type = ImageType.pl(3, GrayU8.class);<NEW_LINE>// ImageType type = ImageType.single(GrayU8.class);<NEW_LINE>// ImageType type = ImageType.pl(3, GrayF32.class);<NEW_LINE>// I... | convertTo(frame, out, false); |
190,778 | public void collectInit(InitMessage request, StreamObserver<InitResponse> responseObserver) {<NEW_LINE>String agentId = request.getAgentId();<NEW_LINE>String v09AgentRollupId = request.getV09AgentRollupId();<NEW_LINE>if (!v09AgentRollupId.isEmpty()) {<NEW_LINE>// handle agents prior to 0.10.0<NEW_LINE>String v09AgentId... | getJavaInfo().getGlowrootAgentVersion()); |
38,300 | private void updateText() {<NEW_LINE>MapActivity mapActivity = getMapActivity();<NEW_LINE>if (mapActivity != null) {<NEW_LINE>TextView distanceTv = (TextView) mainView.findViewById(R.id.markers_distance_text_view);<NEW_LINE>TextView timeTv = (TextView) mainView.findViewById(R.id.markers_time_text_view);<NEW_LINE>TextVi... | dist / appMode.getDefaultSpeed()); |
475,032 | public Request<ListEntitiesForPolicyRequest> marshall(ListEntitiesForPolicyRequest listEntitiesForPolicyRequest) {<NEW_LINE>if (listEntitiesForPolicyRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<ListEntitiesForPolicyRequest> request = n... | (listEntitiesForPolicyRequest.getPolicyUsageFilter())); |
1,168,643 | private void doInterceptByTypeAndRate(LimiterManager.LimitConfigBean limitConfigBean, String resource, Invocation inv) {<NEW_LINE>switch(limitConfigBean.getType()) {<NEW_LINE>case LimitType.CONCURRENCY:<NEW_LINE>doInterceptForConcurrency(limitConfigBean.getRate(), resource, null, inv);<NEW_LINE>break;<NEW_LINE>case Lim... | getRequest()) + ":" + resource; |
109,355 | protected void showControl() {<NEW_LINE>Animation upAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.RELATIVE_TO_SELF, 0.0f);<NEW_LINE>upAction.setDuration(300);<NEW_LINE>Animation downAction = new TranslateAnimation(Animatio... | 1.0f, Animation.RELATIVE_TO_SELF, 0.0f); |
457,301 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>// create border paint<NEW_LINE>paintBorder.setColor(Color.BLACK);<NEW_LINE>paintBorder.setAntiAlias(true);<NEW_LINE>paintBorder.setStrokeWidth(25);<NEW_LINE>paintBorder.setStyle(... | , -11.0), 50.0f)); |
1,170,157 | private static void register(FileObject serverInstanceDir, String serverLocation, String domainLocation, String host, String port) throws IOException {<NEW_LINE>String displayName = generateDisplayName(serverInstanceDir);<NEW_LINE>// NOI18N<NEW_LINE>String url = URI_PREFIX + host <MASK><NEW_LINE>// NOI18N<NEW_LINE>Stri... | + ":" + port + "#default&" + serverLocation; |
1,212,680 | public int write(HollowSchema schema, HollowWriteRecord rec) {<NEW_LINE>int schemaOrdinal = schemaIdMapper.getSchemaId(schema);<NEW_LINE>int nextRecordOrdinal = recordLocationsByOrdinal.size();<NEW_LINE>int recStart = (int) buf.length();<NEW_LINE>VarInt.writeVInt(buf, schemaOrdinal);<NEW_LINE>if (rec instanceof HollowH... | existingRecLocs = recordLocationsByHashCode.get(recordHashCode); |
467,305 | void delete(Business business, ApplicationDict applicationDict, String... paths) throws Exception {<NEW_LINE>EntityManagerContainer emc = business.entityManagerContainer();<NEW_LINE>List<ApplicationDictItem> exists = this.listWithApplicationDictWithPath(business, applicationDict.getId(), paths);<NEW_LINE>if (exists.isE... | emc.beginTransaction(ApplicationDictItem.class); |
32,935 | // @Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })<NEW_LINE>@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })<NEW_LINE>public Response update(@HeaderParam(Constants.SESSION_TOKEN_HEADER_NAME) String sessionToken, @PathParam("entityClass") String entityClassName, String input, @Co... | entityClass.getSimpleName(), em); |
667,575 | public static void print(IntegralKernel kernel) {<NEW_LINE>int x0 = 0, x1 = 0, y0 = 0, y1 = 0;<NEW_LINE>for (int blockIdx = 0; blockIdx < kernel.blocks.length; blockIdx++) {<NEW_LINE>ImageRectangle k = kernel.blocks[blockIdx];<NEW_LINE>if (k.x0 < x0)<NEW_LINE>x0 = k.x0;<NEW_LINE>if (k.y0 < y0)<NEW_LINE>y0 = k.y0;<NEW_L... | r = kernel.blocks[i]; |
1,855,330 | private void doRedirect(final HttpResponse httpResponse, final CompletionHandler<HttpResponse> completionHandler) {<NEW_LINE>// get location header<NEW_LINE>String locationString = null;<NEW_LINE>final List<String> locationHeader = httpResponse.getHeader("Location");<NEW_LINE>if (locationHeader != null && !locationHead... | resolve(location.normalize()); |
276,565 | private void computeContainment(int imageArea) {<NEW_LINE>// mark that the track is in the inlier set and compute the containment rectangle<NEW_LINE>contRect.x0 = contRect.y0 = Double.MAX_VALUE;<NEW_LINE>contRect.x1 = contRect.y1 = -Double.MAX_VALUE;<NEW_LINE>List<AssociatedPair> matchSet = motion.getModelMatcher().get... | p = matchSet.get(matchIdx); |
1,469,927 | private static Map<String, Set<OffsetEquation>> sequencesAndOffsetsToMap(List<String> sequences, List<String> offsets, OffsetEquation extraEq) {<NEW_LINE>Map<String, Set<OffsetEquation>> map = new HashMap<>(CollectionsPlume.mapCapacity(sequences));<NEW_LINE>if (offsets.isEmpty()) {<NEW_LINE>for (String sequence : seque... | sequence = sequences.get(i); |
377,759 | void collectAndAggregatePartitionClassStorageStats(Map<String, Map<Long, Map<Short, Map<Short, ContainerStorageStats>>>> hostPartitionClassStorageStatsMap, PartitionId partitionId, List<PartitionId> unreachablePartitions) {<NEW_LINE>Store store = <MASK><NEW_LINE>if (store == null) {<NEW_LINE>unreachablePartitions.add(p... | storageManager.getStore(partitionId, false); |
1,017,755 | public void validate() {<NEW_LINE>final String kafkaSources = analysis.getAllDataSources().stream().filter(s -> s.getDataSource().getKsqlTopic().getValueFormat().getFormat().equals(KafkaFormat.NAME)).map(AliasedDataSource::getAlias).map(SourceName::text).collect<MASK><NEW_LINE>if (kafkaSources.isEmpty()) {<NEW_LINE>ret... | (Collectors.joining(", ")); |
1,649,888 | final GetContentModerationResult executeGetContentModeration(GetContentModerationRequest getContentModerationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getContentModerationRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
173,530 | private boolean initOpenVRCompositor(boolean set) {<NEW_LINE>if (set && vrSystem != null) {<NEW_LINE>vrCompositor = new VR_IVRCompositor_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRCompositor_Version, hmdErrorStore));<NEW_LINE>if (hmdErrorStore.get(0) == 0) {<NEW_LINE>logger.info("OpenVR Compositor ... | logger.info("vrCompositor initialization failed:" + errorString); |
647,467 | public void requestTeleport(double d0, double d1, double d2, float f, float f1, Set<PlayerPositionLookS2CPacket.Flag> set, boolean flag) {<NEW_LINE>// CraftBukkit - Return event status<NEW_LINE>Player player = this.getPlayer();<NEW_LINE>Location from = player.getLocation();<NEW_LINE>double x = d0;<NEW_LINE>double y = d... | getPluginManager().callEvent(event); |
259,904 | public Query rewrite(IndexReader reader) throws IOException {<NEW_LINE>Query rewritten = super.rewrite(reader);<NEW_LINE>if (rewritten != this) {<NEW_LINE>return rewritten;<NEW_LINE>}<NEW_LINE>if (termArrays.isEmpty()) {<NEW_LINE>return new MatchNoDocsQuery();<NEW_LINE>}<NEW_LINE>MultiPhraseQuery.Builder query = new Mu... | position = positions.get(sizeMinus1); |
241,242 | public static ImageResult toJpeg(@NonNull ImageProxy image, boolean flip) throws IOException {<NEW_LINE>ImageProxy.PlaneProxy[] planes = image.getPlanes();<NEW_LINE>ByteBuffer buffer = planes[0].getBuffer();<NEW_LINE>Rect cropRect = shouldCropImage(image) ? image.getCropRect() : null;<NEW_LINE>byte[] data = new byte[bu... | .first, dimens.second)); |
1,126,624 | public static MapToolVariableResolver callEventHandlerOld(final String macroTarget, final String args, final Token tokenInContext, Map<String, Object> varsToSet, boolean suppressChatOutput) {<NEW_LINE>if (varsToSet == null)<NEW_LINE>varsToSet = Collections.emptyMap();<NEW_LINE>MapToolVariableResolver newResolver = new ... | e.getMessage(), e); |
1,571,396 | private boolean testCount() {<NEW_LINE>final long start = System.currentTimeMillis();<NEW_LINE>final String dynWhere = getSQLWhere();<NEW_LINE>final <MASK><NEW_LINE>if (dynWhere.length() > 0) {<NEW_LINE>// includes first AND<NEW_LINE>sql.append(dynWhere);<NEW_LINE>}<NEW_LINE>final IStringExpression sqlExpression = Serv... | StringBuilder sql = new StringBuilder(m_sqlCount); |
1,422,402 | private void schemeSpecificPart(final UriParser parser) {<NEW_LINE>if (parser.isOpaque()) {<NEW_LINE>if (parser.getSsp() != null) {<NEW_LINE>this.authority = this.host = this.port = null;<NEW_LINE>this.path.setLength(0);<NEW_LINE>this.query.setLength(0);<NEW_LINE>// TODO encode or validate scheme specific part<NEW_LINE... | userInfo(parser.getUserInfo()); |
40,320 | protected void checkEventTimeWindows() {<NEW_LINE>int expectedWatermarks = upstreamWatermarks.size();<NEW_LINE>int arrived = 0;<NEW_LINE>int good = 0;<NEW_LINE>for (Iterator<TimeWindow> windowIterator = windowToTriggers.keySet().iterator(); windowIterator.hasNext(); ) {<NEW_LINE>TimeWindow pendingWindow = windowIterato... | double ratio = good * 1.0d / expectedWatermarks; |
1,315,750 | final DescribeFleetMetricResult executeDescribeFleetMetric(DescribeFleetMetricRequest describeFleetMetricRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeFleetMetricRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
128,766 | final PublishBatchResult executePublishBatch(PublishBatchRequest publishBatchRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(publishBatchRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,682,835 | public static String genSignature(HttpServletRequestEx requestEx) {<NEW_LINE>Hasher hasher = Hashing.sha256().newHasher();<NEW_LINE>hasher.putString(requestEx.getRequestURI(), StandardCharsets.UTF_8);<NEW_LINE>for (String paramName : paramNames) {<NEW_LINE>String paramValue = requestEx.getHeader(paramName);<NEW_LINE>if... | putString(paramName, StandardCharsets.UTF_8); |
1,036,672 | final GetInvitationsCountResult executeGetInvitationsCount(GetInvitationsCountRequest getInvitationsCountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getInvitationsCountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
311,247 | private int compareRowsByColumn(int row1, int row2, int column) {<NEW_LINE>Class type = getColumnClass(column);<NEW_LINE>Object o1 = getValueAt(row1, column);<NEW_LINE>Object o2 = getValueAt(row2, column);<NEW_LINE>// If both values are null, return 0.<NEW_LINE>if (o1 == null && o2 == null) {<NEW_LINE>return 0;<NEW_LIN... | result = s1.compareTo(s2); |
1,210,184 | public INDArray[] executeGraph(SameDiff sd, ExecutorConfiguration configuration) {<NEW_LINE>ByteBuffer buffer = convertToFlatBuffers(sd, configuration);<NEW_LINE>BytePointer bPtr = new BytePointer(buffer);<NEW_LINE>log.info("Buffer length: {}", buffer.limit());<NEW_LINE>NativeOps nativeOps = NativeOpsHolder.getInstance... | "Unknown variable received: [{}]", var.name()); |
1,382,829 | public UpdateItemEnhancedResponse<T> transformResponse(UpdateItemResponse response, TableSchema<T> tableSchema, OperationContext operationContext, DynamoDbEnhancedClientExtension extension) {<NEW_LINE>try {<NEW_LINE>T attributes = readAndTransformSingleItem(response.attributes(), tableSchema, operationContext, extensio... | itemCollectionMetrics()).build(); |
1,268,322 | private void formatTimeInterval(StringBuilder buf, TimeInterval timeInterval, SimpleDateFormat timeFormat, boolean local) {<NEW_LINE>if (isWeekdaySession) {<NEW_LINE>try {<NEW_LINE>for (int i = 0; i < weekdayOffsets.length; i++) {<NEW_LINE>buf.append(DayConverter.toString(weekdayOffsets[i]));<NEW_LINE>buf.append(", ");... | setTimeZone(endTime.getTimeZone()); |
355,399 | public CommandResult executeCommandInNode(List<String> command, boolean logOutput) {<NEW_LINE>CommandResult result = container.executeCommandInContainer(nodeAgentCtx, nodeAgentCtx.users().vespa(), command.toArray(new String[0]));<NEW_LINE>String cmdString = command.stream().map(s -> "'" + s + "'").collect(Collectors.jo... | (" ", "\"", "\"")); |
879,713 | final SetRepositoryPolicyResult executeSetRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setRepositoryPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "SetRepositoryPolicy"); |
1,025,592 | private void updateFileLinks(File old_save_path, File new_save_path) {<NEW_LINE>old_save_path = FileUtil.getCanonicalFileSafe(old_save_path);<NEW_LINE>new_save_path = FileUtil.getCanonicalFileSafe(new_save_path);<NEW_LINE>// System.out.println( "update_file_links: " + old_save_path + " -> " + new_save_path );<NEW_LINE... | from_indexes = new ArrayList<>(); |
423,484 | public double runDouble(Doubles values) {<NEW_LINE>// TODO(cl) - Can we get anything other than a DataPoint?<NEW_LINE>if (values instanceof DataPoint) {<NEW_LINE>long ts = ((DataPoint) values).timestamp();<NEW_LINE>// data point falls outside required range<NEW_LINE>if (ts < start || ts > end) {<NEW_LINE>return 0;<NEW_... | i], doubles[i]); |
439,955 | protected RenameJavaElementDescriptor createRefactoringDescriptor() {<NEW_LINE>final IField field = getField();<NEW_LINE>String project = null;<NEW_LINE>IJavaProject javaProject = field.getJavaProject();<NEW_LINE>if (javaProject != null) {<NEW_LINE>project = javaProject.getElementName();<NEW_LINE>}<NEW_LINE>int flags =... | getJavaElementName(getNewElementName()) }); |
1,222,753 | protected void startInner() {<NEW_LINE>// Configure the server.<NEW_LINE>this.workerPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(config.getNumRestServiceNettyWorkerThreads());<NEW_LINE>this.bootstrap = new ServerBootstrap(new NioServerSocketChannelFactory(Executors.newFixedThreadPool(config.getNumRestServic... | new InetSocketAddress(this.port)); |
1,251,317 | private static void copyFiles(Manifest manifest, JarFile in, JarOutputStream out, long timestamp) throws IOException {<NEW_LINE>byte[] buffer = new byte[4096];<NEW_LINE>int num;<NEW_LINE>Map<String, Attributes<MASK><NEW_LINE>List<String> names = new ArrayList<>(entries.keySet());<NEW_LINE>Collections.sort(names);<NEW_L... | > entries = manifest.getEntries(); |
1,136,295 | private static void initializeFunctionDataCallTarget(JSFunctionData functionData, JSBuiltin builtin, JSFunctionData.Target target, CallTarget callTarget) {<NEW_LINE>JSContext context = functionData.getContext();<NEW_LINE>NodeFactory factory = NodeFactory.getDefaultInstance();<NEW_LINE>FrameDescriptor frameDescriptor = ... | CallTarget constructTarget = functionData.getConstructTarget(); |
1,807,678 | private CreateReaderGroupEvent buildCreateRGEvent(String scope, String rgName, ReaderGroupConfig config, final long requestId, final long createTimestamp) {<NEW_LINE>Map<String, RGStreamCutRecord> startStreamCuts = config.getStartingStreamCuts().entrySet().stream().collect(Collectors.toMap(e -> e.getKey().getScopedName... | getValue()))))); |
1,446,335 | public static ColumnDef build(String name, String charset, String type, short pos, boolean signed, String[] enumValues, Long columnLength) {<NEW_LINE>name = name.intern();<NEW_LINE>if (charset != null)<NEW_LINE>charset = charset.intern();<NEW_LINE>switch(type) {<NEW_LINE>case "tinyint":<NEW_LINE>case "smallint":<NEW_LI... | create(name, type, pos); |
444,249 | public void testBMTEJBTimeoutMessageDrivenContext() throws Exception {<NEW_LINE>String deliveryID = "test09";<NEW_LINE>prepareTRA();<NEW_LINE>// construct a FVTMessage<NEW_LINE>FVTMessage message = new FVTMessage();<NEW_LINE>message.addTestResult("MDBTimedBMTBean", 49);<NEW_LINE>// Add a FVTXAResourceImpl for this deli... | System.out.println("Waiting for results ..."); |
1,129,524 | public static DescribeDBClusterPerformanceResponse unmarshall(DescribeDBClusterPerformanceResponse describeDBClusterPerformanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDBClusterPerformanceResponse.setRequestId(_ctx.stringValue("DescribeDBClusterPerformanceResponse.RequestId"));<NEW_LINE>describeDBClusterP... | = new ArrayList<String>(); |
1,699,530 | public boolean loadExisting() {<NEW_LINE>if (!nodes.loadExisting() || !edges.loadExisting())<NEW_LINE>return false;<NEW_LINE>// now load some properties from stored data<NEW_LINE>final int nodesVersion = <MASK><NEW_LINE>GHUtility.checkDAVersion("nodes", Constants.VERSION_NODE, nodesVersion);<NEW_LINE>nodeEntryBytes = n... | nodes.getHeader(0 * 4); |
814,054 | private JComponent buildWsdlContentTab() {<NEW_LINE>partTabs = new JTabbedPane();<NEW_LINE>partTabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);<NEW_LINE>rootNode = new <MASK><NEW_LINE>treeModel = new DefaultTreeModel(rootNode);<NEW_LINE>tree = new JTree(treeModel);<NEW_LINE>tree.setBorder(BorderFactory.createEmp... | DefaultMutableTreeNode(iface.getName()); |
751,697 | private void makeLastModifiedTag() {<NEW_LINE>String username = pageData.getAttribute(LAST_MODIFYING_USER);<NEW_LINE>String dateString = pageData.getAttribute(LAST_MODIFIED);<NEW_LINE>if (dateString == null)<NEW_LINE>dateString = "";<NEW_LINE>if (!dateString.isEmpty()) {<NEW_LINE>try {<NEW_LINE>Date date = WikiPageProp... | ("hh:mm:ss a").format(date); |
656,833 | List<RepositoryResource> createInstallList(SampleResource resource) {<NEW_LINE>Map<String, Integer> maxDistanceMap = new HashMap<>();<NEW_LINE>List<MissingRequirement> missingRequirements = new ArrayList<>();<NEW_LINE>boolean allDependenciesResolved = true;<NEW_LINE>if (resource.getRequireFeature() != null) {<NEW_LINE>... | installList = new ArrayList<>(); |
587,854 | public static RectangleLength2D_F64 boundBoxInside(int srcWidth, int srcHeight, PixelTransform<Point2D_F64> transform, Point2D_F64 work) {<NEW_LINE>List<Point2D_F64> points = computeBoundingPoints(srcWidth, srcHeight, transform, work);<NEW_LINE>Point2D_F64 center = new Point2D_F64();<NEW_LINE>UtilPoint2D_F64.mean(point... | dy - y0) + y0 - oy0; |
1,522,720 | private void writeKey(XMLStreamWriter writer, SubGraph ops, ExportConfig config) throws Exception {<NEW_LINE>Map<String, Class> keyTypes = new HashMap<>();<NEW_LINE>for (Node node : ops.getNodes()) {<NEW_LINE>if (node.getLabels().iterator().hasNext()) {<NEW_LINE>keyTypes.<MASK><NEW_LINE>}<NEW_LINE>updateKeyTypes(keyTyp... | put("labels", String.class); |
278,089 | final ListHarvestJobsResult executeListHarvestJobs(ListHarvestJobsRequest listHarvestJobsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listHarvestJobsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<ListHa... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
747,512 | private void postNewForecast() {<NEW_LINE>String newSagerCode = sagerWeatherCaster.getSagerCode();<NEW_LINE>if (!newSagerCode.equals(currentSagerCode)) {<NEW_LINE>logger.debug("Sager prediction changed to {}", newSagerCode);<NEW_LINE>currentSagerCode = newSagerCode;<NEW_LINE>updateChannelTimeStamp(GROUP_OUTPUT, CHANNEL... | CHANNEL_VELOCITY_BEAUFORT, sagerWeatherCaster.getPredictedBeaufort()); |
1,281,955 | public BatchDetachObject unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchDetachObject batchDetachObject = new BatchDetachObject();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = ori... | JsonToken token = context.getCurrentToken(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.