idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,016,639 | static String toJSONString(Object object, JSONWriter.Feature... features) {<NEW_LINE>JSONWriter.Context writeContext = new JSONWriter.Context(JSONFactory.defaultObjectWriterProvider, features);<NEW_LINE>boolean pretty = (writeContext.features & JSONWriter.Feature.PrettyFormat.mask) != 0;<NEW_LINE>JSONWriterUTF16 jsonWr... | getObjectWriter(valueClass, valueClass, fieldBased); |
462,427 | private void planDistribution(SubPlan plan, NodeSelector nodeSelector) {<NEW_LINE>// plan the execution on the active nodes<NEW_LINE>List<PlanFragment> planFragmentList = new ArrayList<>();<NEW_LINE>StageExecutionPlan <MASK><NEW_LINE>// if query was canceled, skip creating scheduler<NEW_LINE>if (stateMachine.isDone()) ... | outputStageExecutionPlan = getStagePlan(plan, planFragmentList); |
1,727,835 | // auto-generated, see spoon.generating.ReplacementVisitorGenerator<NEW_LINE>@java.lang.Override<NEW_LINE>public <T> void visitCtNewClass(final spoon.reflect.code.CtNewClass<T> newClass) {<NEW_LINE>replaceInListIfExist(newClass.getAnnotations(), new spoon.support.visitor.replace.ReplacementVisitor.CtElementAnnotationsR... | .ReplacementVisitor.CtAbstractInvocationExecutableReplaceListener(newClass)); |
1,376,400 | public void okResponse(byte[] data, @NotNull AbstractService service) {<NEW_LINE>TraceManager.TraceObject traceObject = TraceManager.serviceTrace(service, "get-ok-packet");<NEW_LINE><MASK><NEW_LINE>this.netOutBytes += data.length;<NEW_LINE>boolean executeResponse = ((MySQLResponseService) service).syncAndExecute();<NEW... | TraceManager.finishSpan(service, traceObject); |
94,082 | public void loadOptions(Options options) {<NEW_LINE>super.loadOptions(options);<NEW_LINE>conditionalJumpEdgeColor = options.getColor(EDGE_COLOR_CONDITIONAL_JUMP_KEY, conditionalJumpEdgeColor);<NEW_LINE>unconditionalJumpEdgeColor = options.getColor(EDGE_UNCONDITIONAL_JUMP_COLOR_KEY, unconditionalJumpEdgeColor);<NEW_LINE... | options.getEnum(RELAYOUT_OPTIONS_KEY, relayoutOption); |
150,077 | public void run() {<NEW_LINE>if (!factory.canAddTestStepToTestCase(testCase)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int ix = testStepList.getTestStepList().getSelectedIndex();<NEW_LINE>String name;<NEW_LINE>if (factory.promptForName()) {<NEW_LINE>name = UISupport.prompt("Specify name for new step", ix == -1 ? "Add Ste... | getClass().getSimpleName()); |
534,875 | public static IQueryParameterAnd<?> parseQueryParams(ISearchParamRegistry theSearchParamRegistry, FhirContext theContext, RuntimeSearchParam theParamDef, String theUnqualifiedParamName, List<QualifiedParamList> theParameters) {<NEW_LINE>RestSearchParameterTypeEnum paramType = theParamDef.getParamType();<NEW_LINE>if (pa... | theContext, paramType, theUnqualifiedParamName, theParameters); |
598,509 | public String toStringk() {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append("(");<NEW_LINE>sb.append(this.id);<NEW_LINE>List<Config> l = getOrigins(true);<NEW_LINE>if (l.size() > 0) {<NEW_LINE>sb.append(" ->");<NEW_LINE>boolean first = true;<NEW_LINE>for (Config c : l) {<NEW_LINE>if (c.inState == nu... | append(",x:" + this.x); |
785,587 | public CRFModel loadModel(InputStream is) throws Exception {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>try (ObjectInputStream ois = new ObjectInputStream(new GZIPInputStream(is))) {<NEW_LINE>ois.readUTF();<NEW_LINE>this.status = (float[][]) ois.readObject();<NEW_LINE>int[][] template = (int[][]) ois.re... | .currentTimeMillis() - start)); |
794,602 | public void deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = <MASK><NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));<N... | Utils.getValueFromIdByName(id, "resourceGroups"); |
417,251 | private // TODO only be considered finished when that list is exhausted<NEW_LINE>String generateSamples() {<NEW_LINE>String output = "";<NEW_LINE>tabs = 2;<NEW_LINE>ArrayDeque<Action> actions = new ArrayDeque<>();<NEW_LINE>actions.add(Objects<MASK><NEW_LINE>while (!actions.isEmpty()) {<NEW_LINE>Action action = actions.... | .requireNonNull(selectNextSample())); |
128,374 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.<MASK><NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>com.google.protobuf.GeneratedMessa... | writeString(output, 1, key_); |
1,215,168 | public XContentBuilder toXContent(XContentBuilder builder, Params builderParams) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>String contentType = options == null ? null : options.get(CONTENT_TYPE_OPTION);<NEW_LINE>if (type == ScriptType.INLINE) {<NEW_LINE>if (contentType != null && builder.contentType... | SOURCE_PARSE_FIELD.getPreferredName(), stream); |
1,615,153 | private boolean resolveGenericsType(final GenericsType genericsType) {<NEW_LINE>if (genericsType.isResolved())<NEW_LINE>return true;<NEW_LINE>currentClass.setUsingGenerics(true);<NEW_LINE>ClassNode type = genericsType.getType();<NEW_LINE>// save name before redirect<NEW_LINE>GenericsTypeName name = new GenericsTypeName... | type.setRedirect(ClassHelper.OBJECT_TYPE); |
1,368,705 | public static <T> T fromAttribute(BlackboardAttribute attr, Class<T> clazz) throws InvalidJsonException {<NEW_LINE>BlackboardAttribute.Type attrType = attr.getAttributeType();<NEW_LINE>if (attrType.getValueType() != BlackboardAttribute.TSK_BLACKBOARD_ATTRIBUTE_VALUE_TYPE.JSON) {<NEW_LINE>throw new IllegalArgumentExcept... | ).fromJson(json, clazz); |
511,097 | protected void check() {<NEW_LINE>if (display.isDisposed())<NEW_LINE>return;<NEW_LINE>shell = ShellFactory.createMainShell(SWT.DIALOG_TRIM);<NEW_LINE>Utils.setShellIcon(shell);<NEW_LINE>shell.setText(MessageText.getString("dialog.associations.title"));<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numC... | true, checkBox.getSelection()); |
917,364 | private IBaseOperationOutcome createOperationOutcome(Throwable theException, FhirContext ctx) throws ServletException {<NEW_LINE>IBaseOperationOutcome oo = null;<NEW_LINE>if (theException instanceof BaseServerResponseException) {<NEW_LINE>oo = ((BaseServerResponseException) theException).getOperationOutcome();<NEW_LINE... | "error", next, null, PROCESSING); |
1,135,802 | public EnvironmentInfoDescription unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>EnvironmentInfoDescription environmentInfoDescription = new EnvironmentInfoDescription();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth... | int originalDepth = context.getCurrentDepth(); |
788,355 | private void computeHold(TrackEntry entry) {<NEW_LINE>TrackEntry to = entry.mixingTo;<NEW_LINE>Object[] timelines = entry.animation.timelines.items;<NEW_LINE>int timelinesCount = entry.animation.timelines.size;<NEW_LINE>int[] timelineMode = entry.timelineMode.setSize(timelinesCount);<NEW_LINE>entry.timelineHoldMix.clea... | ] ids = timeline.getPropertyIds(); |
87,072 | public void update() {<NEW_LINE>MinecraftServer server = mod.getServer();<NEW_LINE>if (server == null) {<NEW_LINE>this.online = false;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ServerPlayerEntity player = server.getPlayerList().getPlayerByUUID(uuid);<NEW_LINE>if (player == null) {<NEW_LINE>this.online = false;<NEW_LINE>retu... | .sneaking = player.isSneaking(); |
938,100 | final DeleteConfigurationSetEventDestinationResult executeDeleteConfigurationSetEventDestination(DeleteConfigurationSetEventDestinationRequest deleteConfigurationSetEventDestinationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteConfigurationSetEventDestinationRequest);<NEW_LINE>AWS... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
14,679 | public static void main(String[] args) {<NEW_LINE>String url;<NEW_LINE>if (args.length == 0)<NEW_LINE>url = "jdbc:virtuoso://localhost:1111";<NEW_LINE>else<NEW_LINE>url = args[0];<NEW_LINE>Node foo1 = Node.createURI("http://example.org/#foo1");<NEW_LINE>Node <MASK><NEW_LINE>Node baz1 = Node.createURI("http://example.or... | bar1 = Node.createURI("http://example.org/#bar1"); |
1,712,006 | public JsonObject toJsonObject(AbstractProcessInstanceModificationCommand command) {<NEW_LINE>JsonObject json = JsonUtil.createObject();<NEW_LINE>if (command instanceof ActivityAfterInstantiationCmd) {<NEW_LINE>JsonUtil.addField(json, START_AFTER, ((ActivityAfterInstantiationCmd) command).getTargetElementId());<NEW_LIN... | ) command).getActivityInstanceId()); |
368,560 | private boolean pingSessionBackup(@Nonnull final String sessionId) throws InterruptedException {<NEW_LINE>final String <MASK><NEW_LINE>final Future<Boolean> touchResultFuture = _storage.add(key, 1, BYTE_1);<NEW_LINE>try {<NEW_LINE>final boolean touchResult = touchResultFuture.get(200, TimeUnit.MILLISECONDS);<NEW_LINE>i... | key = _sessionIdFormat.createBackupKey(sessionId); |
947,823 | final SetIpAddressTypeResult executeSetIpAddressType(SetIpAddressTypeRequest setIpAddressTypeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setIpAddressTypeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
885,718 | FunctionTypeBuilder inferKind(@Nullable JSDocInfo info) {<NEW_LINE>if (info != null) {<NEW_LINE>if (!NodeUtil.isMethodDeclaration(errorRoot)) {<NEW_LINE>isConstructor = info.isConstructor();<NEW_LINE>isInterface = info.isInterface();<NEW_LINE>isRecord = info.usesImplicitMatch();<NEW_LINE>makesStructs = info.makesStruct... | && !info.makesUnrestricted()); |
1,014,092 | public static void floydWarshallAlgorithm(int v, int[][] graph) {<NEW_LINE>// answer matrix where we will be storing minimum cost between two pair of<NEW_LINE>// vertices.<NEW_LINE>int[][] answerMatrix = new int[v][v];<NEW_LINE>// just copy down values of graph into ans matrix.<NEW_LINE>for (int i = 0; i < v; i++) {<NE... | + answerMatrix[k][j]; |
1,311,555 | public DoubleArray strike(double forward) {<NEW_LINE>int nbDelta = delta.size();<NEW_LINE>double[] strike = new double[2 * nbDelta + 1];<NEW_LINE>strike[nbDelta] = forward * Math.exp(volatility.get(nbDelta) * volatility.get(nbDelta) * expiry / 2.0);<NEW_LINE>for (int loopdelta = 0; loopdelta < nbDelta; loopdelta++) {<N... | (2 * nbDelta - loopdelta)); |
1,743,615 | private Callback buildCallback(final String email) {<NEW_LINE>return new Callback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onFailure(@NonNull Call call, @NonNull final IOException error) {<NEW_LINE>Activity activity = getActivity();<NEW_LINE>if (activity != null) {<NEW_LINE>activity.runOnUiThread(new Runna... | error.getMessage(), error); |
1,400,175 | public static void doGenerateChangeLog(String changeLogFile, Database originalDatabase, CatalogAndSchema[] schemas, String snapshotTypes, String author, String context, String dataDir, DiffOutputControl diffOutputControl) throws IOException, ParserConfigurationException, LiquibaseException {<NEW_LINE>CompareControl.Sch... | CompareControl.SchemaComparison(schema, schema); |
49,807 | public void toXML(XMLWriter generatedXML) {<NEW_LINE>generatedXML.writeElement(null, "activelock", XMLWriter.OPENING);<NEW_LINE>generatedXML.writeElement(null, "locktype", XMLWriter.OPENING);<NEW_LINE>generatedXML.writeElement(null, type, XMLWriter.NO_CONTENT);<NEW_LINE>generatedXML.writeElement(null, "locktype", XMLWr... | null, "lockscope", XMLWriter.OPENING); |
1,592,581 | public synchronized void open(HugeConfig config) {<NEW_LINE>LOG.debug("Store open: {}", this.store);<NEW_LINE>E.checkNotNull(config, "config");<NEW_LINE>String graphStore = config.get(CoreOptions.STORE_GRAPH);<NEW_LINE>this.isGraphStore = this.store.equals(graphStore);<NEW_LINE>this.dataPath = config.get(RocksDBOptions... | debug("Store {} has been opened before", this.store); |
1,523,000 | public static void openFile(SheimiFragmentActivity activity, File file) {<NEW_LINE>Uri uri = FileProvider.getUriForFile(activity, PROVIDER_AUTHORITY, file);<NEW_LINE>String mimeType = FsUtils.getMimeType(uri.toString());<NEW_LINE>Intent intent = new Intent(Intent.ACTION_EDIT);<NEW_LINE>intent.setDataAndType(uri, mimeTy... | intent.setAction(Intent.ACTION_VIEW); |
1,148,458 | public synchronized boolean checkValid(String clientId, String username, byte[] password) {<NEW_LINE>// Check Username / Password in DB using sqlQuery<NEW_LINE>if (username == null || password == null) {<NEW_LINE>LOG.info("username or password was null");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>ResultSet r = null;<N... | foundPwq = r.getString(1); |
188,760 | final UpdateLensReviewResult executeUpdateLensReview(UpdateLensReviewRequest updateLensReviewRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateLensReviewRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "UpdateLensReview"); |
1,095,770 | private HttpRequest.Builder createUsersWithListInputRequestBuilder(List<User> body) throws ApiException {<NEW_LINE>// verify the required parameter 'body' is set<NEW_LINE>if (body == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");<NEW_LINE>}<N... | Builder localVarRequestBuilder = HttpRequest.newBuilder(); |
1,607,468 | public void execute(Template tmpl, Template.Context ctx, Writer out) {<NEW_LINE>// won't return null<NEW_LINE>Object value = tmpl.getSectionValue(ctx, _name, _line);<NEW_LINE>Iterator<?> iter = _comp.collector.toIterator(value);<NEW_LINE>if (iter != null) {<NEW_LINE>if (!iter.hasNext()) {<NEW_LINE>executeSegs(tmpl, ctx... | executeSegs(tmpl, ctx, out); |
706,431 | public static void main(String[] args) {<NEW_LINE>try {<NEW_LINE>System.out.println("\"Hello World\" Jersey Example App on Netty container.");<NEW_LINE>ResourceConfig resourceConfig = new ResourceConfig(HelloWorldResource.class);<NEW_LINE>final Channel server = NettyHttpContainerProvider.<MASK><NEW_LINE>Runtime.getRunt... | createHttp2Server(BASE_URI, resourceConfig, null); |
364,138 | public Response build() {<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>URI redirectUri = uriBuilder.build();<NEW_LINE>builder.append("<HTML>");<NEW_LINE>builder.append(" <HEAD>");<NEW_LINE>builder.append(" <TITLE>OIDC Form_Post Response</TITLE>");<NEW_LINE>builder.append(" </HEAD>");<NEW_LINE>bui... | redirectUri.toString() + "\">"); |
112,119 | private static void planRecursive(List<StmtClassForgeableFactory> additionalForgeables, EventType eventType, StatementRawInfo raw, SerdeEventTypeCompileTimeRegistry registry, SerdeCompileTimeResolver resolver, StateMgmtSettingsProvider stateMgmtSettingsProvider) {<NEW_LINE>if (!registry.isTargetHA()) {<NEW_LINE>return;... | getUnderlyingMapType(), raw, resolver); |
1,014,452 | private void storePackageVersion(Context base) {<NEW_LINE>File file = new File(base.getFilesDir(), "storage/version_meta");<NEW_LINE>DataOutputStream out = null;<NEW_LINE>try {<NEW_LINE>if (!file.getParentFile().exists()) {<NEW_LINE>file<MASK><NEW_LINE>}<NEW_LINE>FileOutputStream fos = new FileOutputStream(file);<NEW_L... | .getParentFile().mkdirs(); |
1,253,923 | private ThreadBlockDispatcher suggestThreadSchedulingToLevelZeroDriver(DeviceThreadScheduling threadScheduling, LevelZeroKernel levelZeroKernel, ZeKernelHandle kernel, TaskMetaData meta) {<NEW_LINE>// Prepare kernel for launch<NEW_LINE>// A) Suggest scheduling parameters to level-zero<NEW_LINE>int[] groupSizeX = new in... | ThreadBlockDispatcher(groupSizeX, groupSizeY, groupSizeZ); |
443,174 | private static void displayCryptoException(Object originator, Component parent, String title, String message, CryptoException ce) {<NEW_LINE>String ce_msg = ce.getMessage();<NEW_LINE>if (ce_msg.contains("Install the JCE")) {<NEW_LINE>File javaHomeDir = new File(System.getProperty("java.home"));<NEW_LINE>File libSecurit... | title, message + ": " + ce_msg); |
76,623 | final GetResourcePoliciesResult executeGetResourcePolicies(GetResourcePoliciesRequest getResourcePoliciesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getResourcePoliciesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
401,977 | public static VectorCursorGranularizer create(final StorageAdapter storageAdapter, final VectorCursor cursor, final Granularity granularity, final Interval queryInterval) {<NEW_LINE>final DateTime minTime = storageAdapter.getMinTime();<NEW_LINE>final DateTime maxTime = storageAdapter.getMaxTime();<NEW_LINE>final Interv... | Iterables.size(bucketIterable) == 1; |
993,411 | final ListTrailsResult executeListTrails(ListTrailsRequest listTrailsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTrailsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,603,961 | public BytesRef join(BytesRef separator, BytesRefBuilder result, BytesRef preTag, BytesRef postTag) {<NEW_LINE>BytesRef[] toJoin = new BytesRef[this.candidates.length];<NEW_LINE>int len = separator.length * this.candidates.length - 1;<NEW_LINE>for (int i = 0; i < toJoin.length; i++) {<NEW_LINE>Candidate candidate = can... | len += toJoin[i].length; |
305,363 | private void tailResponse(final String method, final Response response, final ProgressHandler handler, final WebTarget resource) throws DockerException, InterruptedException {<NEW_LINE>final ExecutorService executor = Executors.newSingleThreadExecutor();<NEW_LINE>try {<NEW_LINE>final ProgressStream stream = <MASK><NEW_... | response.readEntity(ProgressStream.class); |
1,154,438 | private static List<IsochronesIntersection> computeIntersection(IsochronesIntersection isoIntersection, Integer intersectionIndex, List<IsochronesIntersection> intersections) {<NEW_LINE>List<IsochronesIntersection> result = new ArrayList<>();<NEW_LINE>for (int i = intersectionIndex + 1; i < intersections.size(); i++) {... | intersection(isoIntersection2.getGeometry()); |
412,825 | // endregion<NEW_LINE>// region documents<NEW_LINE>@SuppressWarnings("DuplicatedCode")<NEW_LINE>public IndexRequest<?> documentIndexRequest(IndexQuery query, IndexCoordinates indexCoordinates, @Nullable RefreshPolicy refreshPolicy) {<NEW_LINE>Assert.notNull(query, "query must not be null");<NEW_LINE>Assert.notNull(inde... | .refresh(refresh(refreshPolicy)); |
87,051 | public String key(Object object) {<NEW_LINE>if (object.getClass() == Execution.class) {<NEW_LINE>return ((Execution) object).getId();<NEW_LINE>} else if (object.getClass() == WorkerTask.class) {<NEW_LINE>return ((WorkerTask) object).getTaskRun().getId();<NEW_LINE>} else if (object.getClass() == WorkerTaskRunning.class)... | .getTaskRun().getId(); |
1,499,539 | public EndpointFilter unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EndpointFilter endpointFilter = new EndpointFilter();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | class).unmarshall(context)); |
1,139,296 | public static CompletableFuture<ExitInfo> registerReflectionPOJO(String wsAddress, String realm) {<NEW_LINE>Session wampSession = new Session();<NEW_LINE>wampSession.addOnJoinListener((session, details) -> {<NEW_LINE>final IPOJOService service = new IPOJOService() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Person g... | getReflectionServices().registerCallee(service); |
1,132,569 | public Statement replaceAssistStatement(RecoveredElement top, ASTNode assistParent, int start, int end, Statement stmt) {<NEW_LINE>if (top == null)<NEW_LINE>return null;<NEW_LINE>if (top instanceof RecoveredBlock) {<NEW_LINE>RecoveredBlock blk = (RecoveredBlock) top;<NEW_LINE>RecoveredStatement[] statements = blk.state... | assistParent, start, end, stmt); |
1,592,955 | public void init(Configuration conf, ParameterServerId[] psIds) {<NEW_LINE>int serverNum = conf.getInt(AngelConf.ANGEL_PS_NUMBER, AngelConf.DEFAULT_ANGEL_PS_NUMBER);<NEW_LINE>maxInflightRPCNumPerServer.set(conf.getInt(AngelConf.ANGEL_MATRIXTRANSFER_MAX_REQUESTNUM_PERSERVER, AngelConf.DEFAULT_ANGEL_MATRIXTRANSFER_MAX_RE... | "maxInflightRPCNum = " + maxInflightRPCNum.get()); |
1,050,285 | private int poll(final ChannelAndTransport channelAndTransport) {<NEW_LINE>int bytesReceived = 0;<NEW_LINE>final InetSocketAddress srcAddress = <MASK><NEW_LINE>if (null != srcAddress) {<NEW_LINE>final int length = byteBuffer.position();<NEW_LINE>final ReceiveChannelEndpoint channelEndpoint = channelAndTransport.channel... | channelAndTransport.transport.receive(byteBuffer); |
25,383 | public static void removeDebugger(final AbstractSQLProvider provider, final INaviProject project, final DebuggerTemplate debugger) throws CouldntSaveDataException {<NEW_LINE>checkArguments(provider, project);<NEW_LINE><MASK><NEW_LINE>Preconditions.checkArgument(debugger.inSameDatabase(provider), "IE00525: Debugger is n... | Preconditions.checkNotNull(debugger, "IE00524: Debugger argument can not be null"); |
347,973 | final PutEmailIdentityFeedbackAttributesResult executePutEmailIdentityFeedbackAttributes(PutEmailIdentityFeedbackAttributesRequest putEmailIdentityFeedbackAttributesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putEmailIdentityFeedbackAttributesRequest);<NEW_LINE>AWSRequestMetrics awsRe... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
41,772 | public ChangeInfo implement() {<NEW_LINE>CancellableTask<WorkingCopy> task = new CancellableTask<WorkingCopy>() {<NEW_LINE><NEW_LINE>public void cancel() {<NEW_LINE>}<NEW_LINE><NEW_LINE>public void run(WorkingCopy workingCopy) throws Exception {<NEW_LINE>workingCopy.toPhase(JavaSource.Phase.RESOLVED);<NEW_LINE>TypeElem... | ExpressionTree>emptyList(), "{}"); |
406,530 | public Object deliverMessage(Object[] params) throws Throwable {<NEW_LINE>if (stuckThreadsStore != null) {<NEW_LINE>stuckThreadsStore.registerThread(Thread.<MASK><NEW_LINE>}<NEW_LINE>RequestTraceSpan span = null;<NEW_LINE>if (requestTracing != null && requestTracing.isRequestTracingEnabled()) {<NEW_LINE>span = new Requ... | currentThread().getId()); |
1,201,004 | private static void reflectiveMethodInvokeHook(Method method) {<NEW_LINE>serialClientOperationsLock.beginTrans(true);<NEW_LINE>try {<NEW_LINE>if (reflectMethods.containsKey(method)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ProfilerRuntimeCPU.suspendCurrentThreadTimer();<NEW_LINE>reflectMethods.put(method, null);<NEW_LINE... | > clazz = method.getDeclaringClass(); |
1,551,058 | // getLongId.<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>protected void processXML(Contentlet contentlet, InputStream inputStream) throws IOException, DotSecurityException, DotDataException {<NEW_LINE>// github issue #20364<NEW_LINE>if (!USE_XSTREAM_FOR_DESERIALIZATION) {<NEW_LINE>SecurityLogger.logInfo(ContentRe... | alias("content", Map.class); |
1,759,372 | public CompletableFuture<Void> onResponse(final FilterRequestContext requestContext, final FilterResponseContext responseContext) {<NEW_LINE>RestLiResponseData<?> responseData = responseContext.getResponseData();<NEW_LINE>if (responseData.getResponseEnvelope().isErrorResponse()) {<NEW_LINE>return CompletableFuture.comp... | ResourceMethod method = requestContext.getMethodType(); |
929,694 | public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new EPLOtherNullPrimitive());<NEW_LINE>execs<MASK><NEW_LINE>execs.add(new EPLOtherChainedStatic());<NEW_LINE>execs.add(new EPLOtherEscape());<NEW_LINE>execs.add(new EPLOtherReturnsMapI... | .add(new EPLOtherChainedInstance()); |
445,087 | public com.alipay.sofa.jraft.rpc.CliRequests.ChangePeersRequest buildPartial() {<NEW_LINE>com.alipay.sofa.jraft.rpc.CliRequests.ChangePeersRequest result = new com.alipay.sofa.jraft.<MASK><NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitField0_ & 0x00000001) == 0x000000... | rpc.CliRequests.ChangePeersRequest(this); |
1,057,594 | private void maybeProcessNonAnnouncedBlocks(final Block newBlock) {<NEW_LINE>final long localHeadBlockNumber = protocolContext.getBlockchain().getChainHeadBlockNumber();<NEW_LINE>if (newBlock.getHeader().getNumber() > localHeadBlockNumber) {<NEW_LINE>pendingBlocksManager.lowestAnnouncedBlock().map(ProcessableBlockHeade... | ().getNumber() + 1; |
1,160,188 | private void recordConfigJavadoc(TypeElement clazz) {<NEW_LINE>String className = clazz.getQualifiedName().toString();<NEW_LINE>if (!generatedJavaDocs.add(className))<NEW_LINE>return;<NEW_LINE>final Properties javadocProps = new Properties();<NEW_LINE>for (Element e : clazz.getEnclosedElements()) {<NEW_LINE>switch(e.ge... | processCtorConfigItem(ex, javadocProps, className); |
471,575 | private void unMap() throws IOException {<NEW_LINE>if (mapped == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// first writeDirectly all data<NEW_LINE>// mapped.force();<NEW_LINE>// need to dispose old direct buffer, see bug<NEW_LINE>// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4724038<NEW_LINE>boolean useSyst... | IOException("Timeout (" + GC_TIMEOUT_MS + " ms) reached while trying to GC mapped buffer"); |
312,837 | public IRubyObject named_captures(ThreadContext context) {<NEW_LINE>check();<NEW_LINE>final Ruby runtime = context.runtime;<NEW_LINE>RubyHash <MASK><NEW_LINE>if (pattern.numberOfNames() == 0)<NEW_LINE>return hash;<NEW_LINE>for (Iterator<NameEntry> i = pattern.namedBackrefIterator(); i.hasNext(); ) {<NEW_LINE>NameEntry ... | hash = RubyHash.newHash(runtime); |
924,410 | public io.kubernetes.client.proto.V1.ProjectedVolumeSource buildPartial() {<NEW_LINE>io.kubernetes.client.proto.V1.ProjectedVolumeSource result = new io.kubernetes.client.proto.V1.ProjectedVolumeSource(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (sourcesBuilder_ == null... | util.Collections.unmodifiableList(sources_); |
861,780 | public List<LabelValue> selectTargets(String[] targets) {<NEW_LINE>List<LabelValue> results = new ArrayList<>();<NEW_LINE>ExGroupsDao groupsDao = ExGroupsDao.get();<NEW_LINE>UsersDao usersDao = UsersDao.get();<NEW_LINE>List<Integer> groupids = new ArrayList<>();<NEW_LINE>List<Integer> userids = new ArrayList<>();<NEW_L... | users = usersDao.selectOnUserIds(userids); |
1,458,552 | LordnLog verify() throws IOException, GeneralSecurityException {<NEW_LINE>logger.atInfo().log("LORDN verify task %s: Sending request to URL %s", actionLogId, url);<NEW_LINE>HttpURLConnection connection = urlConnectionService.createConnection(url);<NEW_LINE>lordnRequestInitializer.initialize(connection, tld);<NEW_LINE>t... | log("LORDN verify task %s response: HTTP response code %d", actionLogId, responseCode); |
1,188,300 | private static void refreshLocal() {<NEW_LINE>// noinspection unchecked<NEW_LINE>Map<String, List<LocalFrameworkZip>>[] zipsArray = new Map[TYPE_COUNT];<NEW_LINE>for (int i = 0; i < TYPE_COUNT; i++) {<NEW_LINE>zipsArray[i<MASK><NEW_LINE>}<NEW_LINE>for (File dir : DownloadsUtil.getDownloadDirs(DownloadsUtil.DOWNLOAD_FRA... | ] = new TreeMap<>(); |
1,556,637 | private DeliveryOrder toDeliveryOrder(@NonNull final I_DerKurier_DeliveryOrder headerRecord) {<NEW_LINE>final IQueryBuilder<I_DerKurier_DeliveryOrderLine> commonQueryBuilder = Services.get(IQueryBL.class).createQueryBuilder(I_DerKurier_DeliveryOrderLine.class).addOnlyActiveRecordsFilter().addEqualsFilter(I_DerKurier_De... | deliveryPosition(deliveryPositionBuilder.build()); |
654,515 | public FlipperObject toFlipperObject(@Nullable RoundingParams roundingParams) {<NEW_LINE>if (roundingParams == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>FlipperObject.Builder <MASK><NEW_LINE>optionsJson.put("borderWidth", roundingParams.getBorderWidth());<NEW_LINE>optionsJson.put("cornersRadii", toSonarArray(ro... | optionsJson = new FlipperObject.Builder(); |
319,591 | private int componentSize(BytesStreamOutput scratchBuffer) throws IOException {<NEW_LINE>scratchBuffer.reset();<NEW_LINE>if (component.type == ShapeField.DecodedTriangle.TYPE.POINT) {<NEW_LINE>scratchBuffer.writeVLong((long) maxX - component.aX);<NEW_LINE>scratchBuffer.writeVLong((long) maxY - component.aY);<NEW_LINE>}... | long) maxX - component.cX); |
1,483,682 | public static BufferedImage applyClippingPath(final Shape clip, final BufferedImage image, final BufferedImage destination) {<NEW_LINE>notNull(clip, "clip");<NEW_LINE>notNull(image, "image");<NEW_LINE>isTrue(destination != null && destination != image, "destination may not be null or same instance as image");<NEW_LINE>... | Graphics2D g = destination.createGraphics(); |
918,765 | public static ListCommonGroupResponse unmarshall(ListCommonGroupResponse listCommonGroupResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCommonGroupResponse.setRequestId(_ctx.stringValue("ListCommonGroupResponse.RequestId"));<NEW_LINE>listCommonGroupResponse.setErrorMsg(_ctx.stringValue("ListCommonGroupResponse.Error... | ("ListCommonGroupResponse.Object[" + i + "].id")); |
362,675 | public static String toHumanReadableScript(List<Evolution> evolutionScript) {<NEW_LINE>// Construct the script<NEW_LINE>StringBuilder sql = new StringBuilder();<NEW_LINE>boolean containsDown = false;<NEW_LINE>for (Evolution evolution : evolutionScript) {<NEW_LINE>if (!evolution.applyUp) {<NEW_LINE>containsDown = true;<... | .toString().trim(); |
1,652,496 | private Mono<Response<Void>> deleteContinuousWebJobWithResponseAsync(String resourceGroupName, String name, String webJobName, 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.... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
119,602 | public static void renderBlockModel(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, boolean translateToOrigin, boolean relight) {<NEW_LINE>BufferBuilder wr = Tessellator.getInstance().getBuffer();<NEW_LINE>wr.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);<NEW_LINE>if (translateToOrigin) {<NE... | .getInstance().draw(); |
690,016 | private String coverage(RandomNumberGenerator rand, String personID, long start, long stop, String payerId, String type, UUID groupId, String groupName, String name, String planId) throws IOException {<NEW_LINE>StringBuilder s = new StringBuilder();<NEW_LINE>String coverageID = rand.randUUID().toString();<NEW_LINE>s.ap... | (personID).append(','); |
1,799,288 | public static AppDashboardData makeDashboardData(final PwmDomain pwmDomain, final ContextManager contextManager, final Locale locale, final Flag... flags) throws PwmUnrecoverableException {<NEW_LINE>final Instant startTime = Instant.now();<NEW_LINE>final AppDashboardDataBuilder builder = AppDashboardData.builder();<NEW... | -> TimeDuration.fromCurrent(startTime)); |
1,372,890 | protected void closureCheckingStopState(ATNConfig config, ATNConfigSet configs, Set<ATNConfig> closureBusy, boolean collectPredicates, boolean fullCtx, int depth, boolean treatEofAsEpsilon) {<NEW_LINE>if (debug)<NEW_LINE>System.out.println("closure(" + config.toString(parser, true) + ")");<NEW_LINE>if (config.state ins... | fullCtx, depth - 1, treatEofAsEpsilon); |
353,793 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "rotrv");<NEW_LINE>final Triple<IOperandTree, IOp... | String highRotateBits = environment.getNextVariableString(); |
558,081 | public DescribeProvisionedProductResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeProvisionedProductResult describeProvisionedProductResult = new DescribeProvisionedProductResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = conte... | ().unmarshall(context)); |
1,510,745 | public EventProcessorClient buildEventProcessorClient() {<NEW_LINE>Objects.requireNonNull(processError, "'processError' cannot be null");<NEW_LINE><MASK><NEW_LINE>Objects.requireNonNull(consumerGroup, "'consumerGroup' cannot be null");<NEW_LINE>if (processEvent == null && processEventBatch == null) {<NEW_LINE>throw LOG... | Objects.requireNonNull(checkpointStore, "'checkpointStore' cannot be null"); |
541,632 | public ObjectWrapper<?> createSubComponent(ObjectWrapper<?> component, ModuleOverrider moduleOverrider) {<NEW_LINE>ObjectWrapper<Object> builderWrapper;<NEW_LINE>try {<NEW_LINE>builderWrapper = new ObjectWrapper<>(method.invoke(component.getValue()));<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new RuntimeException... | getAllMethodsReturning(method.getReturnType()); |
258,162 | public boolean onDrag(float yDisplacement, float xDisplacement, MotionEvent event) {<NEW_LINE>if (mStartedOverview) {<NEW_LINE>if (!mReachedOverview) {<NEW_LINE>mStartDisplacement.set(xDisplacement, yDisplacement);<NEW_LINE>mStartY = event.getY();<NEW_LINE>} else {<NEW_LINE>mRecentsView.setTranslationX((xDisplacement -... | onDrag(yDisplacement, xDisplacement, event); |
1,556,976 | public static void main(String[] args) {<NEW_LINE>Label[] items1 = new Label[5];<NEW_LINE>Label[] items2 = new Label[5];<NEW_LINE>for (int i = 0; i < items1.length; i++) {<NEW_LINE>items1[i] = new Label();<NEW_LINE>items2[i] = new Label();<NEW_LINE>}<NEW_LINE>Labels labels1 = new Labels(items1);<NEW_LINE>Labels labels2... | items[1].phn = "B"; |
1,094,590 | public void compareJSONArray(String prefix, JSONArray expected, JSONArray actual, JSONCompareResult result) throws JSONException {<NEW_LINE>String arrayPrefix = prefix + "[]";<NEW_LINE>if (expected.length() < 1 || expected.length() > 2) {<NEW_LINE>result.fail(MessageFormat.format("{0}: invalid expectation: expected arr... | expected.get(1))); |
291,880 | public static boolean checkIfServletExistInWeb(Document webXml, String servletName, String servletClassName) {<NEW_LINE>XPathFactory factory = XPathFactory.newInstance();<NEW_LINE>XPath xPath = factory.newXPath();<NEW_LINE>xPath.setNamespaceContext(new WebXmlNameSpace());<NEW_LINE>NodeList nodeList = null;<NEW_LINE>try... | className, "checkIfServletExistInWeb", "failed to parse web.xml", exception); |
98,597 | /* (non-Javadoc)<NEW_LINE>* @see com.ibm.ws.sib.processor.runtime.ControlAdapter#runtimeEventOccurred(com.ibm.ws.sib.admin.RuntimeEvent)<NEW_LINE>*/<NEW_LINE>public synchronized void runtimeEventOccurred(RuntimeEvent event) {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "runtimeEventOccurred", new Object[... | SibTr.exit(tc, "runtimeEventOccurred"); |
1,279,330 | private void resizeUpdateCapacity() {<NEW_LINE>final int newCapacity = (int) (vectorStack.length * loadfactor);<NEW_LINE>// first, copy the stack of variables<NEW_LINE>final StoredDoubleVector[] tmp1 = new StoredDoubleVector[newCapacity];<NEW_LINE>System.arraycopy(vectorStack, 0, tmp1, 0, vectorStack.length);<NEW_LINE>... | tmp4, 0, indexStack.length); |
1,254,937 | protected boolean gradleBuildBundle() throws SketchException {<NEW_LINE>ProjectConnection connection = GradleConnector.newConnector().<MASK><NEW_LINE>boolean success = false;<NEW_LINE>BuildLauncher build = connection.newBuild();<NEW_LINE>build.setStandardOutput(System.out);<NEW_LINE>build.setStandardError(System.err);<... | forProjectDirectory(tmpFolder).connect(); |
650,604 | protected double multiThreadGradient(int[] docIDs, boolean calculateEmpirical) {<NEW_LINE>double objective = 0.0;<NEW_LINE>if (multiThreadGrad <= 1) {<NEW_LINE>return (calculateEmpirical ? expectedAndEmpiricalThreadProcessor : expectedThreadProcessor).process(new TaskPart(0, 0, docIDs.length, docIDs)).objective;<NEW_LI... | parallelE[i] = empty2D(); |
73,205 | public void onDraw(AnimatedDrawable2 animatedDrawable, FrameScheduler frameScheduler, int frameNumberToDraw, boolean frameDrawn, boolean isAnimationRunning, long animationStartTimeMs, long animationTimeMs, long lastFrameAnimationTimeMs, long actualRenderTimeStartMs, long actualRenderTimeEndMs, long startRenderTimeForNe... | .getAnimationBackend().getFrameCount(); |
451,375 | public JsonElement serialize(VersionSetting src, Type typeOfSrc, JsonSerializationContext context) {<NEW_LINE>if (src == null)<NEW_LINE>return JsonNull.INSTANCE;<NEW_LINE>JsonObject obj = new JsonObject();<NEW_LINE>obj.addProperty("usesGlobal", src.isUsesGlobal());<NEW_LINE>obj.addProperty("javaArgs", src.getJavaArgs()... | getNativesDirType().ordinal()); |
846,331 | public static void removeSupportingTokens(WSDLComponent c) {<NEW_LINE>if (c == null)<NEW_LINE>return;<NEW_LINE>WSDLModel model = c.getModel();<NEW_LINE>WSDLComponent p = c;<NEW_LINE>if ((c instanceof Binding) || (c instanceof BindingOperation) || (c instanceof BindingInput) || (c instanceof BindingOutput) || (c instanc... | p = PolicyModelHelper.getPolicyForElement(c); |
803,672 | public <T> List<T> build(ResultSet rs, Class<? extends Model> modelClass, Function<T, Boolean> func) throws SQLException, ReflectiveOperationException {<NEW_LINE>List<T> result = new ArrayList<T>();<NEW_LINE>ResultSetMetaData rsmd = rs.getMetaData();<NEW_LINE>int columnCount = rsmd.getColumnCount();<NEW_LINE>String[] l... | = new int[columnCount + 1]; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.