idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
810,888 | public Kryo create() {<NEW_LINE>Kryo kryo = new Kryo();<NEW_LINE>kryo.setRegistrationRequired(false);<NEW_LINE>// register serializer<NEW_LINE>kryo.register(Arrays.asList("").getClass<MASK><NEW_LINE>kryo.register(GregorianCalendar.class, new GregorianCalendarSerializer());<NEW_LINE>kryo.register(InvocationHandler.class... | (), new ArraysAsListSerializer()); |
180,611 | protected Map<Region, AccountInfo> operate(final PasswordCallback callback, final Path file) throws BackgroundException {<NEW_LINE>final Map<Region, AccountInfo> <MASK><NEW_LINE>for (Region region : session.getClient().getRegions()) {<NEW_LINE>try {<NEW_LINE>final AccountInfo info = session.getClient().getAccountInfo(r... | accounts = new ConcurrentHashMap<>(); |
861,395 | public String toRemoteTableName(ConnectorIdentity identity, Connection connection, String remoteSchema, String tableName) {<NEW_LINE>requireNonNull(remoteSchema, "remoteSchema is null");<NEW_LINE>requireNonNull(tableName, "tableName is null");<NEW_LINE>verify(CharMatcher.forPredicate(Character::isUpperCase).matchesNone... | mapping = createTableMapping(connection, remoteSchema); |
250,357 | public Object submitToAuthServer(String testcase, WebClient webClient, Object startPage, TestSettings settings, List<validationData> expectations, String submit_type) throws Exception {<NEW_LINE>String thisMethod = "submitToAuthServer - webClient";<NEW_LINE>msgUtils.printMethodName(thisMethod);<NEW_LINE>Object thePage ... | printResponseParts(thePage, thisMethod, "Response1 from Authorization server: "); |
806,375 | public void write(@Nonnull Map<ByteArrayWrapper, byte[]> map) throws IOException {<NEW_LINE>Objects.requireNonNull(map);<NEW_LINE>int count = map.size();<NEW_LINE>dataOutput.writeInt(count);<NEW_LINE>for (Map.Entry<ByteArrayWrapper, byte[]> entry : map.entrySet()) {<NEW_LINE>byte[] key = entry.getKey().getData();<NEW_L... | getMessageDigest().digest()); |
899,088 | private int insertIntoTargets(@Nonnull ItemStack toInsert) {<NEW_LINE>if (Prep.isInvalid(toInsert)) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>final int totalToInsert = toInsert.getCount();<NEW_LINE>// when true, a sticky filter has claimed this item and so only sticky outputs are allowed to handle it. sticky outputs are... | insertItem(toInsert, filter))); |
1,010,510 | void sendTransactionData() {<NEW_LINE>ConcurrentHashMap<String, ConcurrentHashMap<String, <MASK><NEW_LINE>boolean hasData = false;<NEW_LINE>for (Map<String, TransactionData> entry : transactions.values()) {<NEW_LINE>for (TransactionData data : entry.values()) {<NEW_LINE>if (data.getCount().get() > 0) {<NEW_LINE>hasData... | TransactionData>> transactions = getAndResetTransactions(); |
1,745,813 | public Bytes compute(final Bytes input, @Nonnull final MessageFrame messageFrame) {<NEW_LINE>final byte[] result = new byte[LibEthPairings.EIP2537_PREALLOCATE_FOR_RESULT_BYTES];<NEW_LINE>final byte[] error = new byte[LibEthPairings.EIP2537_PREALLOCATE_FOR_ERROR_BYTES];<NEW_LINE>final IntByReference o_len = new IntByRef... | , err_len.getValue())); |
1,575,605 | public Map<Long, Long> loadScheduleOffsetCheckpoint() {<NEW_LINE>File file = new File(config.getScheduleOffsetCheckpointPath(), SCHEDULE_OFFSET_CHECKPOINT);<NEW_LINE>if (!file.exists()) {<NEW_LINE>return new HashMap<>(0);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final byte[] data = Files.toByteArray(file);<NEW_LINE>if (data ... | LOGGER.error("Load checkpoint file failed.", e); |
1,461,107 | protected IRubyObject fillCommon(ThreadContext context, int beg, long len, Block block) {<NEW_LINE>unpack();<NEW_LINE>modify();<NEW_LINE>// See [ruby-core:17483]<NEW_LINE>if (len <= 0)<NEW_LINE>return this;<NEW_LINE>if (len > Integer.MAX_VALUE - beg)<NEW_LINE>throw context.runtime.newArgumentError("argument too big");<... | (int) (beg + len); |
1,738,563 | public void offsetRateGraphAjax(HttpServletResponse response, HttpServletRequest request) {<NEW_LINE>HttpSession session = request.getSession();<NEW_LINE>String clusterAlias = session.getAttribute(KConstants.SessionAlias.CLUSTER_ALIAS).toString();<NEW_LINE>try {<NEW_LINE>String group = StrUtils.convertNull(request.getP... | params.put("group", group); |
63,811 | public static DescribeHaVipsResponse unmarshall(DescribeHaVipsResponse describeHaVipsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeHaVipsResponse.setRequestId(_ctx.stringValue("DescribeHaVipsResponse.RequestId"));<NEW_LINE>describeHaVipsResponse.setPageSize(_ctx.integerValue("DescribeHaVipsResponse.PageSize"))... | ("DescribeHaVipsResponse.HaVips[" + i + "].AssociatedInstanceType")); |
807,939 | private Color[][] createAllColors(int rows, int columns) {<NEW_LINE>Color[][] colors = <MASK><NEW_LINE>for (int row = 0; row < rows; row++) {<NEW_LINE>for (int col = 0; col < columns; col++) {<NEW_LINE>// Create the color grid by varying the saturation and value<NEW_LINE>if (row < (rows - 1)) {<NEW_LINE>// Calculate ne... | new Color[rows][columns]; |
1,593,825 | public static final List<INaviRawModule> loadRawModules(final AbstractSQLProvider provider) throws CouldntLoadDataException {<NEW_LINE>Preconditions.checkNotNull(provider, "IE00416: Provider argument can not be null");<NEW_LINE>final CConnection connection = provider.getConnection();<NEW_LINE>final List<INaviRawModule>... | = "SELECT id, name FROM " + CTableNames.RAW_MODULES_TABLE + " ORDER BY id"; |
956,393 | public static IRubyObject lutime(ThreadContext context, IRubyObject recv, IRubyObject[] args) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>long[] atimeval = null;<NEW_LINE>long[] mtimeval = null;<NEW_LINE>if (args[0] != context.nil || args[1] != context.nil) {<NEW_LINE>atimeval = extractTimespec(context, args[0]... | newFixnum(args.length - 2); |
814,462 | // Draws the image and text bounding box.<NEW_LINE>public void paintComponent(Graphics g) {<NEW_LINE>int height = image.getHeight(this);<NEW_LINE>int width = image.getWidth(this);<NEW_LINE>// Create a Java2D version of g.<NEW_LINE>Graphics2D g2d = (Graphics2D) g;<NEW_LINE>// Draw the image.<NEW_LINE>g2d.drawImage(image... | (0, 255, 0)); |
922,923 | public boolean scry(int value, Ability source, Game game) {<NEW_LINE>GameEvent event = new GameEvent(GameEvent.EventType.SCRY, getId(), source, getId(), value, true);<NEW_LINE>if (game.replaceEvent(event)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>game.informPlayers(getLogName() + " scries " + event.getAmount() + Ca... | cards, target, source, game); |
1,329,539 | final ListSecurityProfilesResult executeListSecurityProfiles(ListSecurityProfilesRequest listSecurityProfilesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSecurityProfilesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
595,724 | public void init(List<TransformFunction> arguments, Map<String, DataSource> dataSourceMap) {<NEW_LINE>// Check that there are more than 1 arguments<NEW_LINE>if (arguments.size() % 2 != 1 || arguments.size() < 3) {<NEW_LINE>throw new IllegalArgumentException("At least 3 odd number of arguments are required for CASE-WHEN... | boolean[_elseThenStatements.size()]; |
532,996 | private Attributes storeTo(ConfigurationChanges.ModifiedObject ldapObj, KeycloakClient client, Attributes attrs) {<NEW_LINE>attrs.put("objectclass", "dcmKeycloakClient");<NEW_LINE>attrs.put("dcmKeycloakClientID", client.getKeycloakClientID());<NEW_LINE>LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dcmURI", client.getKey... | client.getUserID(), null); |
467,365 | protected void append(E eventObject) {<NEW_LINE>if (!checkEntryConditions()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String key = discriminator.getDiscriminatingValue(eventObject);<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>final CyclicBuffer<E> cb = cbTracker.getOrCreate(key, now);<NEW_LINE>subAppend(cb, ... | new CyclicBuffer<E>(cb); |
1,637,072 | public void execute(@NonNull final MapActivity mapActivity) {<NEW_LINE>final LatLon latLon = mapActivity.getMapView()<MASK><NEW_LINE>final String title = getParams().get(KEY_NAME);<NEW_LINE>if (title == null || title.isEmpty()) {<NEW_LINE>progressDialog = createProgressDialog(mapActivity, new DialogOnClickListener() {<... | .getCurrentRotatedTileBox().getCenterLatLon(); |
769,004 | private void auditEventJMXMBean01(Object[] methodParams) {<NEW_LINE>Object[] varargs = (Object[]) methodParams[1];<NEW_LINE>ObjectName name = (ObjectName) varargs[0];<NEW_LINE>String className = (String) varargs[1];<NEW_LINE>ObjectName loader <MASK><NEW_LINE>String operationName = (String) varargs[3];<NEW_LINE>Object[]... | = (ObjectName) varargs[2]; |
1,132,976 | boolean cmpItems(VirtualFrame frame, PArray left, PArray right, @Cached PyObjectRichCompareBool.EqNode eqNode, @Cached("createComparison()") BinaryComparisonNode compareNode, @Cached("createIfTrueNode()") CoerceToBooleanNode coerceToBooleanNode, @Cached ArrayNodes.GetValueNode getLeft, @Cached ArrayNodes.GetValueNode g... | getLeft.execute(left, i); |
1,182,845 | public void shutdown(final String taskId, String reason) {<NEW_LINE>log.info("Shutdown [%s] because: [%s]", taskId, reason);<NEW_LINE>if (!lifecycleLock.awaitStarted(1, TimeUnit.SECONDS)) {<NEW_LINE>log.info("This TaskRunner is stopped or not yet started. Ignoring shutdown command for task: %s", taskId);<NEW_LINE>} els... | log.info("Can't shutdown! No worker running task %s", taskId); |
1,090,415 | private String expandRedirectUri(HttpServletRequest request, ClientRegistration clientRegistration, String action) {<NEW_LINE>Map<String, String> uriVariables = new HashMap<>();<NEW_LINE>uriVariables.put("registrationId", clientRegistration.getRegistrationId());<NEW_LINE>UriComponents uriComponents = UriComponentsBuild... | host == null ? "" : host); |
149,526 | protected static ExtractedInfo extractProvenanceInfo(Map<String, Provenance> map) {<NEW_LINE>Map<String, Provenance> configuredParameters = new HashMap<>(map);<NEW_LINE>String className = ObjectProvenance.checkAndExtractProvenance(configuredParameters, CLASS_NAME, StringProvenance.class, SimpleStringDataSourceProvenanc... | .class.getSimpleName())); |
1,413,255 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_like_a_medium);<NEW_LINE>Demo demo = getDemo();<NEW_LINE>Toolbar toolbar = (Toolbar) <MASK><NEW_LINE>toolbar.setTitle(demo.titleResId);<NEW_LINE>setSupportActionBar(toolbar);<NEW_L... | findViewById(R.id.toolbar); |
1,369,302 | public void process() {<NEW_LINE>JMeterContext context = getThreadContext();<NEW_LINE>Sampler sam = context.getCurrentSampler();<NEW_LINE>SampleResult res = context.getPreviousResult();<NEW_LINE>HTTPSamplerBase sampler;<NEW_LINE>HTTPSampleResult result;<NEW_LINE>if (!(sam instanceof HTTPSamplerBase) || !(res instanceof... | log.info("Can't apply HTML Link Parser when the previous" + " sampler run is not an HTTP Request."); |
419,772 | private Mono<Response<ApiManagementServiceNameAvailabilityResultInner>> checkNameAvailabilityWithResponseAsync(ApiManagementServiceCheckNameAvailabilityParameters parameters, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.clie... | ), parameters, accept, context); |
1,065,676 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String epl = "@public create window Win#keepall as (key string, value int);\n" + "@public create window WinSB#lastevent as SupportBean;\n" + "insert into WinSB select * from SupportBean;\n";<NEW_LINE>env.compileDe... | , { "k3", 3 } }); |
1,256,317 | public static boolean VRRenderModels_GetComponentStateForDevicePath(@NativeType("char const *") CharSequence pchRenderModelName, @NativeType("char const *") CharSequence pchComponentName, @NativeType("VRInputValueHandle_t") long devicePath, @NativeType("RenderModel_ControllerMode_State_t const *") RenderModelController... | stack.nASCII(pchRenderModelName, true); |
895,782 | public void readEntity(Cursor cursor, Message entity, int offset) {<NEW_LINE>entity.setId(cursor.isNull(offset + 0) ? null : cursor<MASK><NEW_LINE>entity.setEntityID(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));<NEW_LINE>entity.setDate(cursor.isNull(offset + 2) ? null : new java.util.Date(cursor.get... | .getLong(offset + 0)); |
576,057 | private // refactored to use a common method.<NEW_LINE>void loadOnlyEjbCreateMethod(List<CallbackInterceptor>[] metaArray, int numPostConstructFrameworkCallbacks) {<NEW_LINE>int sz = lcAnnotationClasses.length;<NEW_LINE>for (int i = 0; i < sz; i++) {<NEW_LINE>if (lcAnnotationClasses[i] != PostConstruct.class) {<NEW_LIN... | Level.FINE, "**##[ejbCreate] bean has 2.x style ejbCreate: " + meta); |
1,244,861 | public RemotingCommand queryBrokerTopicConfig(ChannelHandlerContext ctx, RemotingCommand request) throws RemotingCommandException {<NEW_LINE>final RemotingCommand response = RemotingCommand.createResponseCommand(QueryDataVersionResponseHeader.class);<NEW_LINE>final QueryDataVersionResponseHeader responseHeader = (Query... | ), System.currentTimeMillis()); |
1,728,233 | protected void testMetadata() {<NEW_LINE>try {<NEW_LINE>testWithFactory(testFactory -> {<NEW_LINE>// must auto-load modules to ensure all tested module dependencies are present...<NEW_LINE>BQRuntime runtime = testFactory.app().autoLoadModules().createRuntime();<NEW_LINE>BQModuleProvider provider = matchingProvider();<N... | ())).findFirst(); |
1,605,936 | protected Mono<Endpoints> convert(List<DetectedEndpoint> endpoints) {<NEW_LINE>if (endpoints.isEmpty()) {<NEW_LINE>return Mono.empty();<NEW_LINE>}<NEW_LINE>Map<String, List<DetectedEndpoint>> endpointsById = endpoints.stream().collect(groupingBy((e) -> e.getDefinition().getId()));<NEW_LINE>List<Endpoint> result = endpo... | (Endpoints.of(result)); |
1,325,495 | private void createDefaultNamespaces() throws Exception {<NEW_LINE>String serviceUri = String.format("bk://%s/", getRpcEndpoints().stream().map(endpoint -> NetUtils.endpointToString(endpoint)).collect(Collectors.joining(",")));<NEW_LINE>StorageClientSettings settings = StorageClientSettings.newBuilder().serviceUri(serv... | log.info("Namespace '{}' is not found.", namespaceName); |
1,537,037 | public void read(org.apache.thrift.protocol.TProtocol prot, grayUpgrade_args struct) throws org.apache.thrift.TException {<NEW_LINE>TTupleProtocol iprot = (TTupleProtocol) prot;<NEW_LINE>BitSet incoming = iprot.readBitSet(4);<NEW_LINE>if (incoming.get(0)) {<NEW_LINE>struct<MASK><NEW_LINE>struct.set_topologyName_isSet(t... | .topologyName = iprot.readString(); |
1,493,963 | private final DataType<?> parseDataTypeEnum() {<NEW_LINE>parse('(');<NEW_LINE>List<String> <MASK><NEW_LINE>int length = 0;<NEW_LINE>do {<NEW_LINE>String literal = parseStringLiteral();<NEW_LINE>length = Math.max(length, literal.length());<NEW_LINE>literals.add(literal);<NEW_LINE>} while (parseIf(','));<NEW_LINE>parse('... | literals = new ArrayList<>(); |
804,673 | public GetRateBasedRuleManagedKeysResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetRateBasedRuleManagedKeysResult getRateBasedRuleManagedKeysResult = new GetRateBasedRuleManagedKeysResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = c... | class).unmarshall(context)); |
1,380,316 | // From Main Presentation Part<NEW_LINE>public static List<Style> generateWordStylesFromPresentationPart(CTTextListStyle textStyles, String suffix, FontScheme fontScheme) {<NEW_LINE>List<Style> styles = new ArrayList<Style>();<NEW_LINE>if (textStyles == null)<NEW_LINE>return styles;<NEW_LINE>styles.add(TextStyles.conve... | + suffix, "DocDefaults", fontScheme)); |
1,271,941 | private MapUserSessionEntity createUserSessionEntityInstance(UserSessionModel userSession, boolean offline) {<NEW_LINE>MapUserSessionEntity entity = new MapUserSessionEntity(null, userSession.getRealm().getId());<NEW_LINE>entity.setAuthMethod(userSession.getAuthMethod());<NEW_LINE>entity.setBrokerSessionId(userSession.... | setLastSessionRefresh(userSession.getLastSessionRefresh()); |
1,537,613 | Pair<AggregatedAccountStorageStats, AggregatedAccountStorageStats> aggregateHostAccountStorageStatsWrappers(Map<String, HostAccountStorageStatsWrapper> statsWrappers) throws IOException {<NEW_LINE>Map<Long, Map<Short, Map<Short, ContainerStorageStats>>> combinedHostAccountStorageStatsMap = new HashMap<>();<NEW_LINE>Map... | selectedHostAccountStorageStatsMap = new HashMap<>(); |
214,234 | private void callInit(Object newInstance, Object self, VirtualFrame frame, boolean doCreateArgs, Object[] arguments, PKeyword[] keywords) {<NEW_LINE>Object newInstanceKlass = getInstanceClass(newInstance);<NEW_LINE>if (isSubType(newInstanceKlass, self)) {<NEW_LINE>Object initMethod = getInitNode().<MASK><NEW_LINE>if (h... | execute(frame, newInstanceKlass, newInstance); |
745,985 | <T> Mono<PagedResponse<T>> listRelationshipsNextPage(String nextLink, Class<T> clazz, Context context) {<NEW_LINE>if (context == null) {<NEW_LINE>context = Context.NONE;<NEW_LINE>}<NEW_LINE>return protocolLayer.getDigitalTwins().listRelationshipsNextSinglePageAsync(nextLink, null, context.addData(AZ_TRACING_NAMESPACE_K... | LOGGER.error("JsonProcessingException occurred while deserializing the list relationship response: ", e); |
21,054 | public int calculatePointOffsetDistance(Point point) {<NEW_LINE>int right = left + width;<NEW_LINE>int bottom = top + height;<NEW_LINE><MASK><NEW_LINE>int pointTop = point.getTop();<NEW_LINE>if (contains(point)) {<NEW_LINE>return max(top - pointTop, pointTop - bottom, left - pointLeft, pointLeft - right);<NEW_LINE>} el... | int pointLeft = point.getLeft(); |
615,581 | private void tryMergePreviousGap(final long thisSeek) throws IOException {<NEW_LINE>// this is called after a record has been removed. That may cause that a new<NEW_LINE>// empty record was surrounded by gaps. We merge with a previous gap, if this<NEW_LINE>// is also empty, but don't do that recursively<NEW_LINE>// If ... | .lastKey().longValue(); |
1,613,624 | private void collectConfigStatistics(@NotNull final Statistic statistic) {<NEW_LINE>final <MASK><NEW_LINE>statistic.setTcpListeners(listenerConfiguration.getTcpListeners().size());<NEW_LINE>statistic.setTlsListeners(listenerConfiguration.getTlsTcpListeners().size());<NEW_LINE>statistic.setWsListeners(listenerConfigurat... | ListenerConfigurationService listenerConfiguration = fullConfigurationService.listenerConfiguration(); |
876,219 | public void onClick(DialogInterface dialog, int selectedColor, Integer[] allColors) {<NEW_LINE>String hex = Utils.getHexString(selectedColor, false).toLowerCase();<NEW_LINE>int pos = _hlEditor.getSelectionStart();<NEW_LINE>switch(colorInsertType) {<NEW_LINE>case R.string.hexcode:<NEW_LINE>{<NEW_LINE>_hlEditor.getText(<... | ).insert(pos, hex); |
766,729 | public void reset(Library srcLib, Library destLib, int destHeader) throws IOException {<NEW_LINE>HeaderBlock dest = new HeaderBlock();<NEW_LINE>dest.sign = sign;<NEW_LINE>dest.commitTime = commitTime;<NEW_LINE>int outerSeq = destLib.getOuterTxSeq();<NEW_LINE>long innerSeq = destLib.getNextInnerTxSeq();<NEW_LINE>Zone zo... | destLib.writeDataBlock(destHeader, data); |
1,346,404 | public void jacobian(double X, double Y, double Z, double[] inputX, double[] inputY, boolean computeIntrinsic, @Nullable double[] calibX, @Nullable double[] calibY) {<NEW_LINE>Z = -Z;<NEW_LINE>double normX = X / Z;<NEW_LINE>double normY = Y / Z;<NEW_LINE>double n2 = normX * normX + normY * normY;<NEW_LINE>double n2_X =... | 1] = f * normY * n2; |
1,044,267 | public void dump(StringBuffer buf) {<NEW_LINE>buf.append("\n$$$\t");<NEW_LINE>buf.append(getDesc());<NEW_LINE>buf.append('\t');<NEW_LINE>if (_id != null) {<NEW_LINE>buf.append("id: ");<NEW_LINE>buf.append(_id);<NEW_LINE>buf.append('\n');<NEW_LINE>buf.append("Severity: ");<NEW_LINE><MASK><NEW_LINE>buf.append('\n');<NEW_... | LogEvent.dumpLevelAsString(buf, _severity); |
1,807,130 | public void marshall(DocumentVersionMetadata documentVersionMetadata, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (documentVersionMetadata == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(documentVersion... | documentVersionMetadata.getSignature(), SIGNATURE_BINDING); |
1,719,530 | CompletableFuture<Version> updateHistoryTimeSeriesChunkData(int historyChunk, VersionedMetadata<HistoryTimeSeries> updated, OperationContext context) {<NEW_LINE>Preconditions.checkNotNull(updated);<NEW_LINE>Preconditions.checkNotNull(updated.getObject());<NEW_LINE>final CompletableFuture<Version> result = new Completab... | HistoryTimeSeries> copy = updatedCopy(updated); |
1,689,762 | public void propagate(int evtmask) throws ContradictionException {<NEW_LINE>int lbSum = 0;<NEW_LINE>int ubPosSum = 0;<NEW_LINE>int ubNegSum = 0;<NEW_LINE>ISetIterator iter = set<MASK><NEW_LINE>while (iter.hasNext()) {<NEW_LINE>int j = iter.nextInt();<NEW_LINE>if (outOfScope(j)) {<NEW_LINE>set.remove(j, this);<NEW_LINE>... | .getUB().iterator(); |
1,741,929 | private SqlTree createNativeSqlTree(OrmQueryRequest<?> request, CQueryPredicates predicates) {<NEW_LINE>SpiQuery<?> query = request.query();<NEW_LINE>// parse named parameters returning the final sql to execute<NEW_LINE>String sql = predicates.parseBindParams(query.getNativeSql());<NEW_LINE>if (query.hasMaxRowsOrFirstR... | ArrayList<>(cols - 1); |
1,196,815 | private void updateFormat() {<NEW_LINE>fmt = new MediaFormat();<NEW_LINE>Format format = listFormat.getSelectedValue();<NEW_LINE>fmt.setFormat(format.getExt());<NEW_LINE>fmt.setDescription(format.getDesc());<NEW_LINE>fmt.setResolution(Format.getSize((String) cmbResolution.getSelectedItem()));<NEW_LINE>fmt.setVideo_code... | .setSamplerate(getCmbVal(cmbAsr)); |
977,333 | public static void init(String[] args) throws Exception {<NEW_LINE>parseArgs(args);<NEW_LINE><MASK><NEW_LINE>ObjectMapper mapper = new ObjectMapper();<NEW_LINE>PhysicalSourceConfig physicalSourceConfig = mapper.readValue(sourcesJson, PhysicalSourceConfig.class);<NEW_LINE>physicalSourceConfig.checkForNulls();<NEW_LINE>C... | File sourcesJson = new File(_sSourcesConfigFile); |
864,030 | public void eventHappened(MapEvent event) {<NEW_LINE>if (event.getType() == MapEvent.Type.MAP_NEW) {<NEW_LINE>infoField.setText("Ways: " + map.getWayCount() + ", Nodes: " + map.getNodeCount() + ", POIs: " + map.getPoiCount());<NEW_LINE>} else if (event.getType() == MapEvent.Type.MARKER_ADDED) {<NEW_LINE>List<MapNode> n... | km = Position.getTrackLengthKM(nodes); |
1,730,314 | public static DescribePhysicalConnectionsResponse unmarshall(DescribePhysicalConnectionsResponse describePhysicalConnectionsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePhysicalConnectionsResponse.setRequestId(_ctx.stringValue("DescribePhysicalConnectionsResponse.RequestId"));<NEW_LINE>describePhysicalConnect... | ("DescribePhysicalConnectionsResponse.PhysicalConnectionSet[" + i + "].PeerLocation")); |
455,050 | public void fetchRow(DBCSession session, DBCResultSet resultSet) throws DBCException {<NEW_LINE>Object[] row = new Object[bindings.length];<NEW_LINE>for (int i = 0; i < bindings.length; i++) {<NEW_LINE>DBDAttributeBinding binding = bindings[i];<NEW_LINE>try {<NEW_LINE>Object cellValue = binding.getValueHandler().fetchV... | ), rows.size()); |
1,051,953 | public DescribeStepResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeStepResult describeStepResult = new DescribeStepResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | JsonToken token = context.getCurrentToken(); |
1,655,387 | public static CreateBatchOperation create(URI serviceUri, Creator creator) {<NEW_LINE>CreateBatchOperation createBatchOperation = new CreateBatchOperation(serviceUri);<NEW_LINE>JobType jobType = new JobType();<NEW_LINE>jobType.setName(creator.getName());<NEW_LINE>jobType.setPriority(creator.getPriority());<NEW_LINE>for... | , inputMediaAsset), "application/atom+xml;type=feed", "http://schemas.microsoft.com/ado/2007/08/dataservices/related/InputMediaAssets"); |
1,794,213 | private boolean metaEqual(Schema schema1, Schema schema2, Map<IdentityPair<Schema, Schema>, Boolean> cache) {<NEW_LINE>if (schema1 == schema2) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (schema1 == null || schema2 == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Schema.Type type1 = schema1.getType();<NEW_LINE>... | schema2.getFields(), cache); |
14,146 | protected void compute() {<NEW_LINE>try {<NEW_LINE>try (BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()))) {<NEW_LINE>while (true) {<NEW_LINE>String line = reader.readLine();<NEW_LINE>if (line == null) {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>if (line.length() == 0 || line.charAt(0) == '#... | i = line.indexOf('#'); |
61,014 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_map_realtime);<NEW_LINE>Toolbar toolbar = <MASK><NEW_LINE>setSupportActionBar(toolbar);<NEW_LINE>ButterKnife.bind(this);<NEW_LINE>mHandler = new Handler(Looper.getMainLooper());<NE... | findViewById(R.id.toolbar); |
1,297,195 | protected OutputStream open(OutputStream out, ASN1EncodableVector recipientInfos, OutputEncryptor encryptor) throws CMSException {<NEW_LINE>try {<NEW_LINE>//<NEW_LINE>// ContentInfo<NEW_LINE>//<NEW_LINE>BERSequenceGenerator cGen = new BERSequenceGenerator(out);<NEW_LINE>cGen.addObject(CMSObjectIdentifiers.envelopedData... | write(encAlgId.getEncoded()); |
1,709,897 | 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 freePointer = getIntValue(FREE_POINTER_OFFSET); |
587,787 | private static void returnExceptVoidAndLuaValue(MethodSpec.Builder mb, final String call, TypeName returnType, boolean initGlobals) {<NEW_LINE>if (isBoolean(returnType)) {<NEW_LINE>mb.addCode("return ");<NEW_LINE>LuaValue_varargsOf(mb, getLuaBoolean(call), LuaValue, LuaValue);<NEW_LINE>} else if (isInt(returnType)) {<N... | addStatement("$T globals = $T.getGlobalsByLState(L)", Globals, Globals); |
1,210,008 | private JPanel buildPluginPathsPanel() {<NEW_LINE>// create the UP and DOWN arrows panel<NEW_LINE>upButton = ButtonPanelFactory.createButton(ButtonPanelFactory.ARROW_UP_TYPE);<NEW_LINE>upButton.setName("UpArrow");<NEW_LINE>upButton.addActionListener(e -> handleSelection(UP));<NEW_LINE>downButton = ButtonPanelFactory.cr... | new Dimension(250, 150)); |
892,815 | private PrintElement createBarcodeElement(MPrintFormatItem item, PrintData printData) {<NEW_LINE>// Get Data<NEW_LINE>Object obj = printData.getNode(new Integer(item.getAD_Column_ID()));<NEW_LINE>if (obj == null)<NEW_LINE>return null;<NEW_LINE>else if (obj instanceof PrintDataElement)<NEW_LINE>;<NEW_LINE>else {<NEW_LIN... | "Element not PrintDataElement " + obj.getClass()); |
266,071 | public void onRequest(boolean https, String address, String hostname, ArrayList<String> headers) {<NEW_LINE>ArrayList<HttpCookie> cookies = RequestParser.getCookiesFromHeaders(headers);<NEW_LINE>// got any cookie ?<NEW_LINE>if (cookies != null && cookies.size() > 0) {<NEW_LINE>String domain = cookies.get(0).getDomain()... | cookie.getName(), cookie); |
1,151,134 | public static WorkerReportRequest buildWorkerReportRequest(Worker worker) {<NEW_LINE>WorkerReportRequest.Builder builder = WorkerReportRequest.newBuilder();<NEW_LINE>builder.<MASK><NEW_LINE>if (!worker.isWorkerInitFinished()) {<NEW_LINE>return builder.build();<NEW_LINE>}<NEW_LINE>Map<TaskId, Task> tasks = worker.getTas... | setWorkerAttemptId(worker.getWorkerAttemptIdProto()); |
1,648,570 | public Object execute(VirtualFrame frame) {<NEW_LINE>JSDynamicObject functionObject = JSFrameUtil.getFunctionObject(frame);<NEW_LINE>JSDynamicObject promise = (JSDynamicObject) getPromise(functionObject);<NEW_LINE>Object resolution = resolutionNode.execute(frame);<NEW_LINE>AlreadyResolved alreadyResolved = (<MASK><NEW_... | AlreadyResolved) getAlreadyResolvedNode.getValue(functionObject); |
1,363,252 | public void init(List<Pair<Double, Integer>> dataScores) {<NEW_LINE>PriorityQueue<Pair<Integer, Pair<Double, Integer>>> q = new BinaryHeapPriorityQueue<>();<NEW_LINE>for (int i = 0; i < dataScores.size(); i++) {<NEW_LINE>q.add(new Pair<>(Integer.valueOf(i), dataScores.get(i)), -dataScores.get(i).first().doubleValue());... | int[sorted.size()]; |
750,360 | public void updateShadowNodeProp(ReactShadowNode nodeToUpdate, Object value) {<NEW_LINE>try {<NEW_LINE>if (mIndex == null) {<NEW_LINE>SHADOW_ARGS[0] = getValueOrDefault(<MASK><NEW_LINE>mSetter.invoke(nodeToUpdate, SHADOW_ARGS);<NEW_LINE>Arrays.fill(SHADOW_ARGS, null);<NEW_LINE>} else {<NEW_LINE>SHADOW_GROUP_ARGS[0] = m... | value, nodeToUpdate.getThemedContext()); |
1,713,281 | public synchronized void queryStarted(String id, OResultSet rs) {<NEW_LINE>if (this.activeQueries.size() > 1 && this.activeQueries.size() % 10 == 0) {<NEW_LINE>StringBuilder msg = new StringBuilder();<NEW_LINE>msg.append("This database instance has ");<NEW_LINE>msg.<MASK><NEW_LINE>msg.append(" open command/query result... | append(activeQueries.size()); |
1,515,754 | protected void selectBestRegionsFern(double totalP, double totalN) {<NEW_LINE>for (int i = 0; i < fernInfo.size; i++) {<NEW_LINE>TldRegionFernInfo <MASK><NEW_LINE>double probP = info.sumP / totalP;<NEW_LINE>double probN = info.sumN / totalN;<NEW_LINE>// only consider regions with a higher P likelihood<NEW_LINE>if (prob... | info = fernInfo.get(i); |
1,071,683 | final DeleteCustomRoutingEndpointGroupResult executeDeleteCustomRoutingEndpointGroup(DeleteCustomRoutingEndpointGroupRequest deleteCustomRoutingEndpointGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteCustomRoutingEndpointGroupRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
917,115 | public final boolean apply(Context context, Object object) {<NEW_LINE>if (object == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (object instanceof Map) {<NEW_LINE>Object fieldValue = fieldName == null ? object : ((Map<?, ?><MASK><NEW_LINE>if (fieldValue == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if... | ) object).get(fieldName); |
1,069,448 | public com.amazonaws.services.detective.model.InternalServerException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.detective.model.InternalServerException internalServerException = new com.amazonaws.services.detective.model.InternalServerException(null);<NEW_... | String currentParentElement = context.getCurrentParentElement(); |
1,542,695 | private void tryFlushEvents(List<ComplexEventChunk> outputEventChunks, ComplexEvent event, RateLimiterState state) {<NEW_LINE>if (event.getTimestamp() >= state.scheduledTime) {<NEW_LINE>ComplexEventChunk<ComplexEvent> outputEventChunk = new ComplexEventChunk<>();<NEW_LINE>for (Iterator<Map.Entry<String, LastEventHolder... | .getValue().lastEvent)); |
688,632 | protected void consumeLambdaExpression() {<NEW_LINE>// LambdaExpression ::= LambdaHeader LambdaBody<NEW_LINE>this.nestedType--;<NEW_LINE>// pop length for LambdaBody (always 1)<NEW_LINE>this.astLengthPtr--;<NEW_LINE>Statement body = (Statement) this.astStack[this.astPtr--];<NEW_LINE>if (body instanceof Block) {<NEW_LIN... | .lastCheckPoint = body.sourceEnd + 1; |
977,373 | public void applyProperties(Object arg) {<NEW_LINE>if (!(arg instanceof HashMap)) {<NEW_LINE>Log.w(TAG, "Cannot apply properties: invalid type for properties", Log.DEBUG_MODE);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HashMap props = (HashMap) arg;<NEW_LINE>if (modelListener == null) {<NEW_LINE>for (Object name : props.key... | value = props.get(key); |
100,421 | public Response generateInstallation(KeycloakSession session, RealmModel realm, ClientModel client, URI baseUri) {<NEW_LINE>ClientManager.InstallationAdapterConfig rep = new ClientManager.InstallationAdapterConfig();<NEW_LINE>rep.setAuthServerUrl(baseUri.toString());<NEW_LINE>rep.setRealm(realm.getName());<NEW_LINE>rep... | adapterConfig = getClientCredentialsAdapterConfig(session, client); |
301,649 | public static List<IndexItem> listLocalRecordedVoiceIndexes(OsmandApplication app) {<NEW_LINE>File voiceDirPath = <MASK><NEW_LINE>LocalIndexHelper localIndexHelper = new LocalIndexHelper(app);<NEW_LINE>List<LocalIndexInfo> localIndexes = new ArrayList<>();<NEW_LINE>List<IndexItem> recordedVoiceList = new ArrayList<>();... | app.getAppPath(IndexConstants.VOICE_INDEX_DIR); |
304,195 | final GetCSVHeaderResult executeGetCSVHeader(GetCSVHeaderRequest getCSVHeaderRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getCSVHeaderRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<GetCSVHeaderRequest> ... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,438,331 | public AnalyticsModelingOMASAPIResponse createArtifact(String serverName, String userId, String serverCapability, String serverCapabilityGUID, AnalyticsAsset artifact) {<NEW_LINE>String methodName = "createArtifact";<NEW_LINE>AnalyticsModelingOMASAPIResponse ret;<NEW_LINE>RESTCallToken token = restCallLogger.logRESTCal... | null, null, null, methodName); |
895,926 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.processor.impl.interfaces.UpstreamControl#sendNackMessage(com.ibm.ws.sib.trm.topology.Cellule, long, long, boolean, int, com.ibm.websphere.sib.Reliability, com.ibm.ws.sib.utils.SIBUuid12)<NEW_LINE>*/<NEW_LINE>public void sendNackMessage(SIBUuid8 meUuid, SIBUuid12 destUuid... | exit(tc, "sendNackMessage", e); |
1,583,277 | protected static GenericObjectPool<Engine> newPoolInstance() {<NEW_LINE>if (grobidEnginePool == null) {<NEW_LINE>// initialize grobidEnginePool<NEW_LINE>LOGGER.debug("synchronized newPoolInstance");<NEW_LINE>synchronized (grobidEnginePoolControl) {<NEW_LINE>if (grobidEnginePool == null) {<NEW_LINE>grobidEnginePool = ne... | setMaxActive(GrobidProperties.getMaxConcurrency()); |
405,750 | private IntermediateRepresentation readIntermediateRep(final InputStream inputStream) throws IOException {<NEW_LINE>final Map<String, ImmutableByteArray> exRefs = new HashMap<>();<NEW_LINE>final List<SerializedValue> serializedValues = new ArrayList<>();<NEW_LINE>final List<SerializedMetaValue> serializedMetaValues = n... | deserializeList(stringData, SerializedMetaValue.class); |
676,313 | public static List<ZabbixConfig> loadConfigs(String path, List<String> fileNames) throws ModuleStartException {<NEW_LINE>if (CollectionUtils.isEmpty(fileNames)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>File[] configs;<NEW_LINE>try {<NEW_LINE>configs = ResourceUtils.getPathFiles(path);<NEW_LINE>} c... | warn("Reading file {} failed", f, e); |
1,481,389 | public AnnotationDeclarationNode transform(AnnotationDeclarationNode annotationDeclarationNode) {<NEW_LINE>MetadataNode metadata = modifyNode(annotationDeclarationNode.metadata().orElse(null));<NEW_LINE>Token visibilityQualifier = modifyToken(annotationDeclarationNode.visibilityQualifier<MASK><NEW_LINE>Token constKeywo... | ().orElse(null)); |
1,724,452 | public void draw(Canvas canvas) {<NEW_LINE>super.draw(canvas);<NEW_LINE>// Do not draw any bars while we're capturing a screenshot.<NEW_LINE>if (capturing) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int width = getMeasuredWidth();<NEW_LINE>int height = getMeasuredHeight();<NEW_LINE>if (progressFraction > 0) {<NEW_LINE>// T... | width * progressFraction, halfStrokeWidth, progressPaint); |
1,420,066 | public static void loadLibraryFromJar(String path) throws Exception {<NEW_LINE>com.google.common.base.Preconditions.checkArgument(path.startsWith("/"), "absolute path must start with /");<NEW_LINE>String[] parts = path.split("/");<NEW_LINE>String filename = (parts.length > 0) ? parts[parts.length - 1] : null;<NEW_LINE>... | NativeUtils.class.getResourceAsStream(path); |
241,009 | ParsingStage doParse() {<NEW_LINE>int i = beginIdx;<NEW_LINE>for (; i < connectionUri.length(); i++) {<NEW_LINE>char c = connectionUri.charAt(i);<NEW_LINE>if (c == '/' || c == '?') {<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (beginIdx == i) {<NEW_LINE>throw new VertxException("Empty server mode", true);<NEW_LIN... | connectionUri, i + 1, configuration); |
735,723 | public void testRetryCountWrap_3(PrintWriter out, Long id) throws Exception {<NEW_LINE>// Wait for our task to start running<NEW_LINE>for (long start = System.nanoTime(); ((RetryCallable.getCallCount(id) < 5) && (System.nanoTime() - start < TIMEOUT_NS)); Thread.sleep(POLL_INTERVAL)) ;<NEW_LINE>if (RetryCallable.getCall... | Connection c = ds.getConnection(); |
453,304 | protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException {<NEW_LINE>// TODO: add support for other types.<NEW_LINE>if (wrappedKeyType != Cipher.SECRET_KEY) {<NEW_LINE>throw new InvalidKeyException("only SECRET_KEY supported");<NEW... | KeyParameter keyParameter = new KeyParameter(secret); |
1,108,775 | public void deserialize(DataInputStream input) throws IOException {<NEW_LINE>int featsFlag = StreamSerdeUtils.deserializeInt(input);<NEW_LINE>if (featsFlag > 0) {<NEW_LINE>feats = (IntFloatVector) StreamSerdeUtils.deserializeVector(input);<NEW_LINE>}<NEW_LINE>int neighborsFlag = StreamSerdeUtils.deserializeInt(input);<... | edgeFeaturesFlag = StreamSerdeUtils.deserializeInt(input); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.