idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,646,902 | // ----- static methods -----<NEW_LINE>public static Object invokeMethod(final SecurityContext securityContext, final Method method, final Object entity, final Map<String, Object> propertySet, final EvaluationHints hints) throws FrameworkException {<NEW_LINE>try {<NEW_LINE>// new structure: first parameter is always se... | final AssertException e = (AssertException) cause; |
26,822 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE><MASK><NEW... | output.writeInt32(2, hostPort_); |
1,394,479 | protected void zkInit() throws Exception {<NEW_LINE>boolean isRMAWindow = isRMA();<NEW_LINE>bPartnerLabel.setText(Msg.getElement(Env.getCtx(), "C_BPartner_ID"));<NEW_LINE>orderLabel.setText(Msg.getElement(Env.getCtx(), "C_Order_ID", false));<NEW_LINE>invoiceLabel.setText(Msg.getElement(Env.getCtx(), "C_Invoice_ID", fal... | appendChild(locatorLabel.rightAlign()); |
190,578 | public Result detectBaseDirectory(final String patchFileName) {<NEW_LINE>String[] nameComponents = patchFileName.split("/");<NEW_LINE>String patchName = nameComponents[nameComponents.length - 1];<NEW_LINE>if (patchName.isEmpty()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final PsiFile[] psiFiles = FilenameIndex.getFi... | getPresentableUrl(), i + 1); |
639,840 | private BibEntry jsonItemToBibEntry(JSONObject item) throws ParseException {<NEW_LINE>try {<NEW_LINE>BibEntry entry = new BibEntry(StandardEntryType.Article);<NEW_LINE>entry.setField(StandardField.URL, item.optString("url"));<NEW_LINE>entry.setField(StandardField.TITLE, item.optString("title"));<NEW_LINE>entry.setField... | throw new ParseException("SemanticScholar API JSON format has changed", exception); |
1,767,724 | public void index(Record record) {<NEW_LINE>if (db == null)<NEW_LINE>init();<NEW_LINE>// is there a previous version of this record? if so, remove it<NEW_LINE>String id = getId(record);<NEW_LINE>if (!overwrite && file != null) {<NEW_LINE>Record old = findRecordById(id);<NEW_LINE>if (old != null) {<NEW_LINE>for (KeyFunc... | block = blocks.get(key); |
1,471,722 | public void marshall(Volume volume, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (volume == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(volume.getCreationTime(), CREATIONTIME_BINDING);<NEW_LINE>protocol... | volume.getOntapConfiguration(), ONTAPCONFIGURATION_BINDING); |
667,023 | private void updateIfChanged(List<String> newList) {<NEW_LINE>if (null == newList || newList.isEmpty()) {<NEW_LINE>LOGGER.warn("[update-serverlist] current serverlist from address server is empty!!!");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<String> newServerAddrList = new ArrayList<String>();<NEW_LINE>for (String se... | .fireEvent(new ServerlistChangeEvent()); |
550,199 | static void addHandlerAfterReactorCodecs(Connection context, String name, ChannelHandler handler) {<NEW_LINE>Objects.requireNonNull(name, "name");<NEW_LINE>Objects.requireNonNull(handler, "handler");<NEW_LINE>Channel channel = context.channel();<NEW_LINE>boolean exists = channel.pipeline().get(name) != null;<NEW_LINE>i... | pipeline().names()); |
174,458 | public static ListApplicationOrderCaseSKUResponse unmarshall(ListApplicationOrderCaseSKUResponse listApplicationOrderCaseSKUResponse, UnmarshallerContext _ctx) {<NEW_LINE>listApplicationOrderCaseSKUResponse.setRequestId(_ctx.stringValue("ListApplicationOrderCaseSKUResponse.RequestId"));<NEW_LINE>listApplicationOrderCas... | ("ListApplicationOrderCaseSKUResponse.ApplyOrderCaseSkus[" + i + "].ProductId")); |
1,728,585 | public PlatformInstance deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException {<NEW_LINE>ObjectCodec codec = jp.getCodec();<NEW_LINE>JsonNode json = codec.readTree(jp);<NEW_LINE>try {<NEW_LINE>if (json.has("uuid") && json.has("config_uuid") && json.has("address") && json.has("is_leader") && json.ha... | lastBackup = json.get("last_backup"); |
450,240 | public static APICreateDataVolumeEvent __example__() {<NEW_LINE>APICreateDataVolumeEvent event = new APICreateDataVolumeEvent();<NEW_LINE>String volumeUuid = uuid();<NEW_LINE>VolumeInventory vol = new VolumeInventory();<NEW_LINE>vol.setName("test-volume");<NEW_LINE>vol.setCreateDate(new Timestamp(org.zstack.header.mess... | vol.setVmInstanceUuid(uuid()); |
1,787,775 | public void marshall(TableInput tableInput, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (tableInput == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(tableInput.getName(), NAME_BINDING);<NEW_LINE>protocol... | tableInput.getTargetTable(), TARGETTABLE_BINDING); |
1,514,364 | Map<List<TableId>, Long> calculateUsage() {<NEW_LINE>// Bitset of tables that contain a file and total usage by all files that share that usage<NEW_LINE>Map<List<Integer>, Long> usage = new HashMap<>();<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.trace("fileSizes {}", fileSizes);<NEW_LINE>}<NEW_LINE>// For each f... | (entry.getValue())); |
1,143,191 | public DetectDominantLanguageResult detectDominantLanguage(DetectDominantLanguageRequest detectDominantLanguageRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(detectDominantLanguageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics ... | invoke(request, responseHandler, executionContext); |
376,748 | public int compareTo(HostedMethod other) {<NEW_LINE>if (this.equals(other)) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int result = Boolean.compare(this.compilationInfo.isDeoptTarget(), other.compilationInfo.isDeoptTarget());<NEW_LINE>if (result == 0) {<NEW_LINE>result = this.getDeclaringClass().compareTo(other.getDeclar... | getSignature().getParameterCount(false); |
1,649,208 | public InteractionResultHolder<ItemStack> use(@Nonnull Level world, Player player, @Nonnull InteractionHand hand) {<NEW_LINE>ItemStack <MASK><NEW_LINE>if (player.isShiftKeyDown()) {<NEW_LINE>if (!world.isClientSide()) {<NEW_LINE>MekanismContainerTypes.DICTIONARY.tryOpenGui((ServerPlayer) player, hand, stack);<NEW_LINE>... | stack = player.getItemInHand(hand); |
1,124,855 | public boolean sendHtmlMail(MailSenderInfo mailInfo) {<NEW_LINE>MyAuthenticator authenticator = null;<NEW_LINE>Properties pro = mailInfo.getProperties();<NEW_LINE>if (mailInfo.isValidate()) {<NEW_LINE>authenticator = new MyAuthenticator(mailInfo.getUserName(), mailInfo.getPassword());<NEW_LINE>}<NEW_LINE>Session sendMa... | ++] = new InternetAddress(e); |
1,618,989 | public void stateChanged(ChangeEvent e) {<NEW_LINE>JViewport viewport = (JViewport) e.getSource();<NEW_LINE>int tabPlacement = tabPane.getTabPlacement();<NEW_LINE>int tabCount = tabPane.getTabCount();<NEW_LINE>Rectangle vpRect = viewport.getBounds();<NEW_LINE>Dimension viewSize = viewport.getViewSize();<NEW_LINE>Rectan... | viewRect.y > viewRect.height); |
789,707 | private static void drawGem_36(Canvas canvas, RectF targetFrame, ResizingBehavior resizing) {<NEW_LINE>// Resize to Target Frame<NEW_LINE>canvas.save();<NEW_LINE>RectF resizedFrame = CacheForGem_36.resizedFrame;<NEW_LINE>HabiticaIcons.resizingBehaviorApply(resizing, CacheForGem_36.originalFrame, targetFrame, resizedFra... | resizedFrame.height() / 36f); |
661,517 | private File reconstructAssets(Version version) throws IOException {<NEW_LINE>File indexDir = new File(assetsDirectory, "indexes");<NEW_LINE>File objectDir = new File(assetsDirectory, "objects");<NEW_LINE>String assetVersion = version.getAssetIndexInfo().getId();<NEW_LINE>File indexFile = new File(indexDir, assetVersio... | (assetsDirectory, "virtual"), assetVersion); |
1,183,156 | public AcknowledgeAlarmActionRequest unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AcknowledgeAlarmActionRequest acknowledgeAlarmActionRequest = new AcknowledgeAlarmActionRequest();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | int originalDepth = context.getCurrentDepth(); |
866,861 | public static <T> T[] addAll(final T[] array1, @SuppressWarnings("unchecked") final T... array2) {<NEW_LINE>if (array1 == null) {<NEW_LINE>return clone(array2);<NEW_LINE>} else if (array2 == null) {<NEW_LINE>return clone(array1);<NEW_LINE>}<NEW_LINE>final Class<?> type1 = array1.getClass().getComponentType();<NEW_LINE>... | array1.length + array2.length); |
652,784 | public AnnotationMirror greatestLowerBound(AnnotationMirror a1, AnnotationMirror a2) {<NEW_LINE>if (!AnnotationUtils.areSameByName(getTopAnnotation(a1), getTopAnnotation(a2))) {<NEW_LINE>return null;<NEW_LINE>} else if (isSubtype(a1, a2)) {<NEW_LINE>return a1;<NEW_LINE>} else if (isSubtype(a2, a1)) {<NEW_LINE>return a2... | MethodSignature> a2Sigs = getListOfMethodSignatures(a2); |
155,678 | public CipherParameters decrypt(byte[] in, int inOff, int inLen, int keyLen) throws IllegalArgumentException {<NEW_LINE>if (!(key instanceof ECPrivateKeyParameters)) {<NEW_LINE>throw new IllegalArgumentException("Private key required for encryption");<NEW_LINE>}<NEW_LINE>ECPrivateKeyParameters ecPrivKey = (ECPrivateKey... | gTilde = curve.decodePoint(C); |
420,876 | public ObjectName register(JmxExporter jmxExporter, SessionConnector connector, String connectorId) {<NEW_LINE>try {<NEW_LINE>final ObjectName connectorName = getConnectorName(connector, connectorId);<NEW_LINE>ConnectorAdmin connectorAdmin;<NEW_LINE>if (connector instanceof AbstractSocketAcceptor) {<NEW_LINE>connectorA... | throw new QFJException("Failed to export connector MBean", e); |
711,053 | protected X9ECParameters createParameters() {<NEW_LINE>// p = 2^128 - 2^97 - 1<NEW_LINE>BigInteger p = fromHex("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF");<NEW_LINE>BigInteger a = fromHex("D6031998D1B3BBFEBF59CC9BBFF9AEE1");<NEW_LINE>BigInteger b = fromHex("5EEEFCA380D02919DC2C6558BB6D8A5D");<NEW_LINE>byte[] S = Hex.decode("00... | G, n, h, S); |
1,667,468 | final DeleteIdentitiesResult executeDeleteIdentities(DeleteIdentitiesRequest deleteIdentitiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteIdentitiesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | invoke(request, responseHandler, executionContext); |
670,915 | public <T> T query(String sql, StatementParameters parameters, final DalHints hints, final DalResultSetExtractor<T> extractor, final DalTaskContext dalTaskContext) throws SQLException {<NEW_LINE>ConnectionAction<T> action = new ConnectionAction<T>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public T execute() throws Exce... | hints)).extract(rs); |
305,772 | public void run() {<NEW_LINE>try {<NEW_LINE>// Actions have to be invoked in dispatch thread<NEW_LINE>// (see http://www.netbeans.org/issues/show_bug.cgi?id=35755)<NEW_LINE>EventQueue.invokeAndWait(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>if (SystemAction.class.isAssignableFrom(systemActionClass... | getName() + "\".", e); |
1,161,712 | public PushNotificationPreferences unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PushNotificationPreferences pushNotificationPreferences = new PushNotificationPreferences();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NE... | String currentParentElement = context.getCurrentParentElement(); |
1,771,650 | public Map<String, String> tableOptions() {<NEW_LINE>Map<String, String> map = super.tableOptions();<NEW_LINE>map.put("connector", "hive");<NEW_LINE>map.put("default-database", database);<NEW_LINE>if (null != hiveVersion) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (null != hadoopConfDir) {<NEW_LINE>map.put("hadoop-conf-d... | map.put("hive-version", hiveVersion); |
870,907 | public void testRxFlowableInvoker_postReceiveTimeout(Map<String, String> param, StringBuilder ret) {<NEW_LINE>long timeout = messageTimeout;<NEW_LINE>if (isZOS()) {<NEW_LINE>timeout = zTimeout;<NEW_LINE>}<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>Cl... | throw new RuntimeException("testRxFlowableInvoker_postReceiveTimeout: Response took too long. Waited " + timeout); |
161,454 | private Mono<Response<Flux<ByteBuffer>>> purgeWithResponseAsync(String location, String resourceGroupName, String accountName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.... | getSubscriptionId(), accept, context); |
146,455 | public okhttp3.Call readNamespacedHorizontalPodAutoscalerStatusCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/autoscaling/v2beta2/namespaces/{na... | HashMap<String, String>(); |
518,572 | private static Request prepareReindexRequest(ReindexRequest reindexRequest, boolean waitForCompletion) throws IOException {<NEW_LINE>String endpoint = new EndpointBuilder().addPathPart("_reindex").build();<NEW_LINE>Request request = new Request(HttpPost.METHOD_NAME, endpoint);<NEW_LINE>Params params = new Params().with... | getDestination().isRequireAlias()); |
302,600 | private static void computeAnnotations(File repository, File file, HgProgressSupport progress, AnnotationBar ab, String revision) {<NEW_LINE>List<String> list = null;<NEW_LINE>try {<NEW_LINE>list = HgCommand.doAnnotate(repository, file, revision, progress.getLogger());<NEW_LINE>} catch (HgException.HgCommandCanceledExc... | ] logs = new HgLogMessage[0]; |
320,986 | private static void defineConstructor(final Window window, final Scriptable prototype, final ScriptableObject constructor) {<NEW_LINE>constructor.setParentScope(window);<NEW_LINE>try {<NEW_LINE>ScriptableObject.defineProperty(prototype, "constructor", constructor, ScriptableObject.DONTENUM | ScriptableObject.PERMANENT ... | "prototype: " + prototype.getClassName()); |
1,202,272 | /* Sample generated code:<NEW_LINE>*<NEW_LINE>* @com.ibm.j9ddr.GeneratedFieldAccessor(offsetFieldName="_fifteenMinuteAverageOffset_", declaredType="double")<NEW_LINE>* public double fifteenMinuteAverage() throws CorruptDataException {<NEW_LINE>* return getDoubleAtOffset(J9PortSysInfoLoadData._fifteenMinuteAverageOf... | field.getName(), doubleFromVoid); |
653,219 | public void declareRelation(final String name, final int keysize, final int payloadsize) throws SpaceExceededException {<NEW_LINE>// try to get the relation from the relation-cache<NEW_LINE>final Index relation = this.relations.get(name);<NEW_LINE>if (relation != null)<NEW_LINE>return;<NEW_LINE>// try to find the relat... | relations.put(name, table); |
1,503,636 | public void run() {<NEW_LINE><MASK><NEW_LINE>final StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("%n------------------------------------------------------------%nGradle ");<NEW_LINE>sb.append(currentVersion.getVersion());<NEW_LINE>sb.append("%n------------------------------------------------------------%n%... | DefaultGradleVersion currentVersion = DefaultGradleVersion.current(); |
797,633 | public void reset(final BaseActivity activity, final RedditCommentListItem comment, final boolean updateOnly) {<NEW_LINE>if (!updateOnly) {<NEW_LINE>if (!comment.isComment()) {<NEW_LINE>throw new RuntimeException("Not a comment");<NEW_LINE>}<NEW_LINE>if (mComment != comment) {<NEW_LINE>if (mComment != null) {<NEW_LINE>... | setIndentation(comment.getIndent()); |
1,258,854 | public static ListAccelerateAreasResponse unmarshall(ListAccelerateAreasResponse listAccelerateAreasResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAccelerateAreasResponse.setRequestId(_ctx.stringValue("ListAccelerateAreasResponse.RequestId"));<NEW_LINE>List<AreasItem> areas = new ArrayList<AreasItem>();<NEW_LINE>fo... | + "].RegionList[" + j + "].RegionId")); |
1,319,932 | protected void installDefaults() {<NEW_LINE>super.installDefaults();<NEW_LINE>LookAndFeel.installProperty(comboBox, "opaque", false);<NEW_LINE>minimumWidth = UIManager.getInt("ComboBox.minimumWidth");<NEW_LINE>editorColumns = UIManager.getInt("ComboBox.editorColumns");<NEW_LINE>buttonStyle = UIManager.getString("ComboB... | isIntelliJTheme = UIManager.getBoolean("Component.isIntelliJTheme"); |
334,079 | public io.kubernetes.client.proto.V1beta1Extensions.FSGroupStrategyOptions buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1beta1Extensions.FSGroupStrategyOptions result = new io.kubernetes.client.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x... | proto.V1beta1Extensions.FSGroupStrategyOptions(this); |
340,780 | protected Panel<WizardDescriptor>[] initializePanels() {<NEW_LINE>selectUriStep = new SelectUriStep(repository, remotes, SelectUriStep.Mode.FETCH);<NEW_LINE>selectUriStep.addChangeListener(FetchWizard.this);<NEW_LINE>fetchBranchesStep = new FetchBranchesStep(repository, FetchBranchesStep.Mode.ACCEPT_NON_EMPTY_SELECTION... | Panel[] { selectUriStep, fetchBranchesStep }; |
896,976 | private static void parseArgs(final Map<String, ? super String> context, final String args) throws UnsupportedEncodingException {<NEW_LINE>if (args != null) {<NEW_LINE>for (String arg : args.substring(1).split("&")) {<NEW_LINE>String[] valueAndKey = arg.split("=");<NEW_LINE>if (valueAndKey.length != 2) {<NEW_LINE>conti... | key.substring(idx + 3); |
1,736,721 | boolean attach(Leaf leaf, Leaf at) {<NEW_LINE>Leaf attach = this;<NEW_LINE>int myIndex = (parent.parent == null) ? 0 : exactIndex(parent.parent.leaf.newStructure, this);<NEW_LINE>int atIndex = (at == this) ? 0 : exactIndex(newStructure, at) + 1;<NEW_LINE>while (leaf.oper != Oper.DELETE && attach.oper == Oper.DELETE && ... | = attach.newStructure.size(); |
781,441 | private Mono<PagedResponse<ServerCommunicationLinkInner>> listByServerSinglePageAsync(String resourceGroupName, String serverName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be n... | (), null, null)); |
613,555 | private void calculateConsumerFilterTime() {<NEW_LINE>// R3: Record consumer filter execution time<NEW_LINE>Long filterStartTime = (Long) RpcInvokeContext.getContext().get(RpcConstants.INTERNAL_KEY_CONSUMER_FILTER_START_TIME_NANO);<NEW_LINE>Long filterEndTime = (Long) RpcInvokeContext.getContext().get(RpcConstants.INTE... | ).get(RpcConstants.INTERNAL_KEY_CONSUMER_INVOKE_START_TIME_NANO); |
1,604,558 | private static ImmutableMap<AdWindowId, CustomizedWindowInfo> computeEffectiveCustomizedWindowInfos(@NonNull final List<CustomizedWindowInfo> list) {<NEW_LINE>final ImmutableMap<AdWindowId, CustomizedWindowInfo> customizedWindowsByCustomizedWindowId = Maps.uniqueIndex(list, CustomizedWindowInfo::getCustomizationWindowI... | group.get(groupSize - 1); |
557,792 | public void postPreDeleteEvent(final QualifiedName name, final MetacatRequestContext metacatRequestContext) {<NEW_LINE>if (name.isPartitionDefinition()) {<NEW_LINE>final PartitionsSaveRequestDto partitionsSaveRequestDto = new PartitionsSaveRequestDto();<NEW_LINE>partitionsSaveRequestDto.setPartitionIdsForDeletes(Lists.... | (name.getPartitionName())); |
1,831,153 | public void markupAsInsertion(org.docx4j.wml.SdtContentBlock cbLeft, javax.xml.transform.Result result, String author, java.util.Calendar date, RelationshipsPart docPartRelsLeft) {<NEW_LINE>Writer diffxResult = new StringWriter();<NEW_LINE>try {<NEW_LINE>// Now marshall it<NEW_LINE>JAXBContext jc = Context.jc;<NEW_LINE... | transformParameters.put("relsDiffIdentifier", relsDiffIdentifier); |
1,286,230 | private void initFieldsToRead(boolean[] orcReaderInclude, TypeDescription fieldType, String field) {<NEW_LINE>int fieldId = fieldType.getId();<NEW_LINE>// Include ID for top level field<NEW_LINE>orcReaderInclude[fieldId] = true;<NEW_LINE>TypeDescription.Category category = fieldType.getCategory();<NEW_LINE>if (category... | > childrenFieldNames = fieldType.getFieldNames(); |
994,093 | public com.amazonaws.services.elastictranscoder.model.ResourceInUseException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.elastictranscoder.model.ResourceInUseException resourceInUseException = new com.amazonaws.services.elastictranscoder.model.ResourceInUseE... | String currentParentElement = context.getCurrentParentElement(); |
1,327,408 | public Request<StartMetricStreamsRequest> marshall(StartMetricStreamsRequest startMetricStreamsRequest) {<NEW_LINE>if (startMetricStreamsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<StartMetricStreamsRequest> request = new DefaultReque... | <StartMetricStreamsRequest>(startMetricStreamsRequest, "AmazonCloudWatch"); |
1,156,675 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.ExtendableMessage<com.google.transit.realtime.GtfsRealtime.TripUpdate>.ExtensionWriter extensionWriter = newExtensionWriter();<NEW_LINE>if (((bitField0_ & 0x00000001) != 0)) {<N... | output.writeInt32(5, delay_); |
291,740 | public void run() {<NEW_LINE>// Guava Stopwatch is useful here, for a friendlier toString, but the versions of Guava<NEW_LINE>// are different in incompatible ways, so we avoid it here and use Duration instead, so<NEW_LINE>// there won't be conflicts.<NEW_LINE>long startTime;<NEW_LINE>Duration duration;<NEW_LINE>if (!R... | closed.size(), duration); |
31,614 | public JBPopup createPopup() {<NEW_LINE>AbstractPopup popup = new AbstractPopup().init(myProject, myComponent, myPreferredFocusedComponent, myRequestFocus, myFocusable, myMovable, myDimensionServiceKey, myResizable, myTitle, myCallback, myCancelOnClickOutside, myListeners, myUseDimServiceForXYLocation, myCommandButton,... | ApplicationManager.getApplication(), popup); |
199,346 | private static // parses the row to a trade<NEW_LINE>FxNdfTrade parseRow(CsvRow row, TradeInfo info) {<NEW_LINE>CurrencyAmount settlementNotional;<NEW_LINE>Currency settlementCurrency;<NEW_LINE>Currency nonDeliverableCurrency;<NEW_LINE>Optional<String> leg1NotionalOpt = row.findValue(LEG_1_NOTIONAL_FIELD);<NEW_LINE>Opt... | (FX_RATE_FIELD, LoaderUtils::parseDouble)); |
192,221 | public boolean test(PersistentTasksCustomMetadata.PersistentTask<?> persistentTask) {<NEW_LINE>// Persistent task being null means it has been removed from state, and is now complete<NEW_LINE>if (persistentTask == null) {<NEW_LINE>isCompleted = true;<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>SnapshotUpgradeTaskState sn... | ? "" : snapshotUpgradeTaskState.getReason(); |
1,271,273 | protected Map<String, List<Object>> autoGeneratePks(BigDecimal cursor, String autoColumnName, Integer updateCount) throws SQLException {<NEW_LINE>BigDecimal step = BigDecimal.ONE;<NEW_LINE>String resourceId = statementProxy.getConnectionProxy().getDataSourceProxy().getResourceId();<NEW_LINE>if (RESOURCE_ID_STEP_CACHE.c... | step = RESOURCE_ID_STEP_CACHE.get(resourceId); |
1,839,736 | public Object sendRpcRequest(RpcRequest rpcRequest) {<NEW_LINE>// build return value<NEW_LINE>CompletableFuture<RpcResponse<Object>> resultFuture = new CompletableFuture<>();<NEW_LINE>// get server address<NEW_LINE>InetSocketAddress inetSocketAddress = serviceDiscovery.lookupService(rpcRequest);<NEW_LINE>// get server... | "Send failed:", future.cause()); |
1,828,831 | public static QueryMetrics createFromCollection(Collection<QueryMetrics> queryMetricsCollection) {<NEW_LINE>long retrievedDocumentCount = 0;<NEW_LINE>long retrievedDocumentSize = 0;<NEW_LINE>long outputDocumentCount = 0;<NEW_LINE>long outputDocumentSize = 0;<NEW_LINE>long indexHitDocumentCount = 0;<NEW_LINE>Duration to... | = new ArrayList<QueryPreparationTimes>(); |
742,594 | public CdmObject copy(ResolveOptions resOpt, CdmObject host) {<NEW_LINE>if (resOpt == null) {<NEW_LINE>resOpt = new ResolveOptions(this, this.getCtx().getCorpus().getDefaultResolutionDirectives());<NEW_LINE>}<NEW_LINE>CdmArgumentDefinition copy;<NEW_LINE>if (host == null) {<NEW_LINE>copy = new CdmArgumentDefinition(thi... | setCtx(this.getCtx()); |
1,656,945 | public synchronized void drawGlyphVector(SunGraphics2D sg2d, GlyphVector glyphVector, float x, float y) {<NEW_LINE>OSXSurfaceData surfaceData = (OSXSurfaceData) sg2d.getSurfaceData();<NEW_LINE>Shape shape = glyphVector.getOutline(x, y);<NEW_LINE>// get final destination compositing bounds (after all transformations if ... | int) compositingBounds.getHeight()); |
1,460,147 | final DescribeScalingActivitiesResult executeDescribeScalingActivities(DescribeScalingActivitiesRequest describeScalingActivitiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeScalingActivitiesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,582,517 | public static IndexReader openIndex(String indexPath, String dirImpl) throws Exception {<NEW_LINE>final Path root = FileSystems.getDefault().getPath(Objects.requireNonNull(indexPath));<NEW_LINE>final List<DirectoryReader> readers = new ArrayList<>();<NEW_LINE>// find all valid index directories in this directory<NEW_LI... | dr = DirectoryReader.open(dir); |
678,130 | private Mono<Response<Flux<ByteBuffer>>> stopWithResponseAsync(String resourceGroupName, String factoryName, String triggerName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be nul... | this.client.mergeContext(context); |
1,585,464 | private void renderRailButton(GL2 gl, RailButton r, Surface which) {<NEW_LINE>if (which == Surface.OUTSIDE) {<NEW_LINE>// renderOther(gl, r);<NEW_LINE>final double or = r.getOuterDiameter() / 2.0;<NEW_LINE>final double ir = r.getInnerDiameter() / 2.0;<NEW_LINE>gl.glRotated(r.getAngleOffset() * 180 / Math.PI - 90, 1, 0,... | getFlangeHeight(), LOD, 1); |
1,003,307 | public void run() {<NEW_LINE>setTitleImage(Images.active);<NEW_LINE>CircularBufferDataProvider totalProvider = (CircularBufferDataProvider) totalTrace.getDataProvider();<NEW_LINE>CircularBufferDataProvider activeProvider = (CircularBufferDataProvider) activeTrace.getDataProvider();<NEW_LINE>totalProvider.clearTrace();<... | new Sample(time, activeV)); |
1,359,497 | public boolean eIsSet(int featureID) {<NEW_LINE>switch(featureID) {<NEW_LINE>case ModelPackage.MBRICKLET_SOLID_STATE_RELAY__LOGGER:<NEW_LINE>return LOGGER_EDEFAULT == null ? logger != null : !LOGGER_EDEFAULT.equals(logger);<NEW_LINE>case ModelPackage.MBRICKLET_SOLID_STATE_RELAY__UID:<NEW_LINE>return UID_EDEFAULT == nul... | : !DEVICE_TYPE_EDEFAULT.equals(deviceType); |
1,200,409 | protected String printAbscissae(int cell) {<NEW_LINE>// # of x digits<NEW_LINE>final int wn = Math.max(1, (int) Math.ceil(Math.log10(width)));<NEW_LINE>// # of y digits<NEW_LINE>final int hn = Math.max(1, (int) Math.ceil(Math.log10(height)));<NEW_LINE>final String margin = "%" + hn + "s ";<NEW_LINE>final String dFormat... | out.printf(margin, ""); |
1,177,703 | private void appendPrimaryKey(CQLTranslator translator, EmbeddableType compoEmbeddableType, Field[] fields, StringBuilder queryBuilder) {<NEW_LINE>for (Field f : fields) {<NEW_LINE>if (!ReflectUtils.isTransientOrStatic(f)) {<NEW_LINE>if (f.getType().isAnnotationPresent(Embeddable.class)) {<NEW_LINE>// compound partitio... | queryBuilder.append(translator.SPACE_STRING); |
506,418 | public <T, K> Flux<ClientResponsePayload<K>> streamingRequestStreamingResponse(Publisher<ClientRequestPayload<T>> payloads, RpcOptions options) {<NEW_LINE>Flux<ClientResponsePayload<K>> clientResponsePayloadFlux = Flux.from(payloads).switchOnFirst((signal, flux) -> {<NEW_LINE>final ClientRequestPayload<T> clientRequest... | protocolType = TProtocolType.fromProtocolId(protocol); |
453,449 | private NodeInfoVO transfer(NodeInfo nodeInfo, HttpServletRequest req) throws AppStandardErrorException {<NEW_LINE>NodeInfoVO nodeInfoVO = new NodeInfoVO();<NEW_LINE>BeanUtils.copyProperties(nodeInfo, nodeInfoVO);<NEW_LINE>nodeInfoVO.setTitle(nodeInfo.getName());<NEW_LINE>nodeInfoVO.setType(nodeInfo.getNodeType());<NEW... | nodeUiVOS = new ArrayList<>(); |
1,285,629 | protected Statement methodInvoker(FrameworkMethod method, Object test) {<NEW_LINE>DesugarRule desugarRule = Iterables.getOnlyElement(getTestClass().getAnnotatedFieldValues(test, Rule.class, DesugarRule.class));<NEW_LINE>// Compile source Java files before desugar transformation.<NEW_LINE>try {<NEW_LINE>desugarRule.comp... | > inputClassFileMajorVersions = desugarRule.getInputClassFileMajorVersionMap(); |
1,474,151 | public static DescribeColumnsResponse unmarshall(DescribeColumnsResponse describeColumnsResponse, UnmarshallerContext context) {<NEW_LINE>describeColumnsResponse.setRequestId(context.stringValue("DescribeColumnsResponse.RequestId"));<NEW_LINE>describeColumnsResponse.setPageSize(context.integerValue("DescribeColumnsResp... | ("DescribeColumnsResponse.Items[" + i + "].OdpsRiskLevelValue")); |
1,347,143 | public void initialize(WizardDescriptor wiz) {<NEW_LINE>this.wizardInfo = getWizardInfo();<NEW_LINE>this.helper = new ResourceConfigHelperHolder().getJMSHelper();<NEW_LINE>// this.wiz = wiz;<NEW_LINE>// NOI18N<NEW_LINE>wiz.putProperty("NewFileWizard_Title", NbBundle.getMessage(JMSWizard.class, "Templates/SunResources/J... | getData().setTargetFileObject(pkgLocation); |
944,747 | private I_C_Invoice_Rejection_Detail of(@NonNull final ImportedInvoiceResponse response) {<NEW_LINE>final I_C_Invoice_Rejection_Detail rejectionDetail = InterfaceWrapperHelper.newInstance(I_C_Invoice_Rejection_Detail.class);<NEW_LINE>rejectionDetail.setIsDone(false);<NEW_LINE>rejectionDetail.setInvoiceNumber(response.g... | ).setParameter("response", response); |
547,740 | public void gracefullyShutdownClientChannels() {<NEW_LINE>LOG.warn("Gracefully shutting down all client channels");<NEW_LINE>try {<NEW_LINE>// Mark all active connections to be closed after next response sent.<NEW_LINE>LOG.warn("Flagging CLOSE_AFTER_RESPONSE on " + channels.size() + " client channels.");<NEW_LINE>// Pi... | = new PromiseCombiner(ImmediateEventExecutor.INSTANCE); |
35,684 | @Consumes("application/json")<NEW_LINE>public Response addProvJson(String body, @PathParam("id") String idSupplied, @QueryParam("entityName") String entityName) {<NEW_LINE>if (!systemConfig.isProvCollectionEnabled()) {<NEW_LINE>return error(FORBIDDEN, BundleUtil.getStringFromBundle("api.prov.error.provDisabled"));<NEW_... | , BundleUtil.getStringFromBundle("api.prov.error.jsonUpdateNotAllowed")); |
725,607 | public OutputFormatterCallback<Target> createPostFactoStreamCallback(OutputStream out, QueryOptions options) {<NEW_LINE>return new OutputFormatterCallback<Target>() {<NEW_LINE><NEW_LINE>private Document doc;<NEW_LINE><NEW_LINE>private Element queryElem;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void start() {<NEW_LI... | DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); |
1,335,897 | public void putDocument(T attributes) throws SearchServiceException {<NEW_LINE>if (client == null) {<NEW_LINE>log.warning(ERROR_SEARCH_NOT_IMPLEMENTED);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (attributes == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<String, Object> searchableFields = createDocument(attributes).g... | client.commit(getCollectionName()); |
583,453 | protected IStatus run(DBRProgressMonitor dbrMonitor) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>if (resource instanceof IFolder) {<NEW_LINE>((IFolder) resource).delete(true, true, monitor);<NEW_LINE>} else if (resource instanceof IProject) {<NEW_LINE>// Delete project<NEW_LINE>DBWorkbench.getPlatform().getGlobalEventMan... | IProgressMonitor monitor = dbrMonitor.getNestedMonitor(); |
464,223 | private static void configureHttpPercentiles(MeterRegistry.Config config) {<NEW_LINE>String percentiles = System.getProperty(HTTP_PERCENTILES_PROPERTY);<NEW_LINE>if (null != percentiles) {<NEW_LINE>double[] finalPercentiles = Arrays.stream(percentiles.split(",")).map(String::trim).flatMapToDouble(p -> {<NEW_LINE>try {<... | (finalPercentiles, StargateMetricConstants.METRIC_HTTP_SERVER_REQUESTS)); |
771,017 | private void writeRemappedClass(URL classUrl, JarOutputStream jarStream, String targetPackage) throws IOException {<NEW_LINE>InputStream inputStream = classUrl.openStream();<NEW_LINE>String sourceInternalName = getClassInternalName(classUrl);<NEW_LINE>String targetInternalName = getTargetInternalName(sourceInternalName... | = new SimpleRemapper(sourceInternalName, targetInternalName); |
1,359,889 | public S3ResourceClassificationUpdate unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>S3ResourceClassificationUpdate s3ResourceClassificationUpdate = new S3ResourceClassificationUpdate();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu... | JsonToken token = context.getCurrentToken(); |
1,457,899 | static TableMetadata createTableMetadata() {<NEW_LINE>ImmutableList.Builder<ColumnMetadata> columnBuilder = ImmutableList.builder();<NEW_LINE>columnBuilder.add(new ColumnMetadata(COL_INTERFACE, Schema.INTERFACE, "Interface", true, false));<NEW_LINE>columnBuilder.add(new ColumnMetadata(COL_VRF, Schema.STRING, "VRF", tru... | , "Status of the OSPF session", false, true)); |
1,119,764 | public String refresh(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, String path, Long[] ids, HttpServletRequest request, ModelMap model) {<NEW_LINE>SysDept dept = sysDeptService.getEntity(admin.getDeptId());<NEW_LINE>if (ControllerUtils.verifyNotEmpty("deptId", admin.getDeptId(), model) || Controller... | e.getMessage(), e); |
1,121,962 | public void serialize(DataOutputStream output) throws IOException {<NEW_LINE>output.writeBoolean(useNewAPI);<NEW_LINE>if (useNewAPI) {<NEW_LINE>int size = splitsNewAPI.size();<NEW_LINE>output.writeInt(size);<NEW_LINE>output.writeInt(locations.length);<NEW_LINE>for (int i = 0; i < locations.length; i++) {<NEW_LINE>outpu... | (0).getClass()); |
841,462 | protected void saveSetAssociateResults(SetStruct set) {<NEW_LINE>// used to store the size of the structure from a previous iteration<NEW_LINE>int before = matches.size;<NEW_LINE>// Copy the results from being local to this set into the original input indexes<NEW_LINE>FastAccess<AssociatedIndex<MASK><NEW_LINE>matches.r... | > setMatches = _associator.getMatches(); |
833,092 | @Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@Operation(description = "Add the specified public key to the service.")<NEW_LINE>public void putPublicKeyEntry(@Parameter(description = "name of the domain", required = true) @PathParam("domain") String domain, @Parameter(des... | request, this.response, "putPublicKeyEntry"); |
804,568 | public void compress(int[] values, ByteBuffer bb) {<NEW_LINE>RunLength<MASK><NEW_LINE>int[] counts = rl.getCounts();<NEW_LINE>int[] keys = rl.getValues();<NEW_LINE>int esc = Math.max(1, (1 << (MathUtil.log2(counts.length) - 2)) - 1);<NEW_LINE>VLC vlc = buildCodes(counts, esc);<NEW_LINE>int[] codes = vlc.getCodes();<NEW... | .Integer rl = getValueStats(values); |
159,928 | // Binary Search<NEW_LINE>public static void main(String[] args) {<NEW_LINE>// Creating Scanner Object for taking Inputs from the USER<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>// Take the SIZE of the Array from the USER<NEW_LINE>System.out.print(" Enter SIZE of the Array: ");<NEW_LINE>int n = sc.nextInt()... | int target = sc.nextInt(); |
1,159,770 | public byte[] read_size_and_inflate() throws IOException {<NEW_LINE>final int size = read4BE();<NEW_LINE>final byte[] buf = new byte[size];<NEW_LINE>final java.util.zip.Inflater inflater = new java.util.zip.Inflater();<NEW_LINE>final java.util.zip.InflaterInputStream is = new java.util.zip.InflaterInputStream(this, inf... | int read_ahead = inflater.getRemaining(); |
236,792 | public JMenuBar createMenu(JPanel searchPanel, JPanel zoomPanel, JToggleButton mailButton) {<NEW_LINE>JMenuBar menu = new JMenuBar();<NEW_LINE>menuFactory = MenuFactorySwing.getInstance();<NEW_LINE>JMenu fileMenu = new JMenu(MenuConstants.FILE);<NEW_LINE>fileMenu.setMnemonic(KeyEvent.VK_F);<NEW_LINE>fileMenu.add(menuFa... | editCut = menuFactory.createCut()); |
733,227 | public void runHarvest(HarvestingClient harvestingClient) {<NEW_LINE>try {<NEW_LINE>DataverseRequest dataverseRequest = new DataverseRequest(session.getUser(), (HttpServletRequest) null);<NEW_LINE>harvesterService.doAsyncHarvest(dataverseRequest, harvestingClient);<NEW_LINE>} catch (Exception ex) {<NEW_LINE>String fail... | "{0}", harvestingClient.getName()); |
822,570 | public static void main(String... args) {<NEW_LINE>Map<String, Object> props = new HashMap<>();<NEW_LINE>props.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9092");<NEW_LINE>props.put(ProducerConfig.RETRIES_CONFIG, 0);<NEW_LINE>props.put(ProducerConfig.BATCH_SIZE_CONFIG, 16384);<NEW_LINE>props.put(ProducerCon... | KafkaTemplate<>(pf, true); |
1,398,380 | void persistChannelListener(final String groupId, final List<String> memberList) {<NEW_LINE>mScheduler.execute(() -> {<NEW_LINE>Connection connection = null;<NEW_LINE>PreparedStatement statement = null;<NEW_LINE>try {<NEW_LINE>connection = DBUtil.getConnection();<NEW_LINE>connection.setAutoCommit(false);<NEW_LINE>Strin... | printExecption(LOG, e, RDBS_Exception); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.