idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
123,709 | final DeleteCommentResult executeDeleteComment(DeleteCommentRequest deleteCommentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteCommentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(deleteCommentRequest)); |
1,479,031 | protected int diffModuleDef(JCModuleDecl oldT, JCModuleDecl newT, int[] bounds) {<NEW_LINE>int localPointer = bounds[0];<NEW_LINE>int[] qualBounds = getBounds(oldT.qualId);<NEW_LINE>if (oldT.getModuleType() == newT.getModuleType()) {<NEW_LINE>copyTo(localPointer, qualBounds[0]);<NEW_LINE>} else {<NEW_LINE>if (oldT.getM... | 0).getStartPosition() - 1; |
168,539 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next(... | "rsrq", parser.nextInt()); |
1,105,331 | public boolean fromXmlNode(final I_AD_MigrationStep step, final Element stepNode) {<NEW_LINE>step.setSeqNo(Integer.parseInt(stepNode.getAttribute(NODE_SeqNo)));<NEW_LINE>step.setStepType(stepNode.getAttribute(NODE_StepType));<NEW_LINE>step.setStatusCode(X_AD_MigrationStep.STATUSCODE_Unapplied);<NEW_LINE>final Node comm... | poNode.getAttribute(NODE_AD_Table_ID))); |
1,569,197 | public void deleteAs2KeysId(Integer id) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'id' when calling deleteAs2KeysId");<NEW_LINE>}<NEW_LINE>// create ... | localVarAuthNames = new String[] {}; |
561,756 | private void checkInstalledPluginDependencies(PluginDescriptor pluginDescriptor) {<NEW_LINE>final Set<PluginId> notInstalled = new HashSet<>();<NEW_LINE>final Set<PluginId> disabledIds = new HashSet<>();<NEW_LINE>final PluginId[] dependentPluginIds = pluginDescriptor.getDependentPluginIds();<NEW_LINE>final PluginId[] o... | ) > 1 ? "s " : " "); |
1,364,974 | final CancelExportTaskResult executeCancelExportTask(CancelExportTaskRequest cancelExportTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cancelExportTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,673,922 | private void scheduleOnce() {<NEW_LINE>try {<NEW_LINE>taskScheduler.checkIfShutdown();<NEW_LINE>} catch (IllegalStateException e) {<NEW_LINE>logger.warn("Shutting down due to taskScheduler being shutdown");<NEW_LINE>shutdown();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// check if next scheduling iteration is... | boolean qModified = taskQueue.reset(); |
1,097,448 | public synchronized void sttEventReceived(STTEvent sttEvent) {<NEW_LINE>if (sttEvent instanceof SpeechRecognitionEvent) {<NEW_LINE>if (!isSTTServerAborting) {<NEW_LINE>SpeechRecognitionEvent sre = (SpeechRecognitionEvent) sttEvent;<NEW_LINE>String question = sre.getTranscript();<NEW_LINE>try {<NEW_LINE>toggleProcessing... | String msg = e.getMessage(); |
1,319,387 | public ScheduleTime lastScheduleTime(Instant currentScheduleTime) {<NEW_LINE>// estimate interval (doesn't have to be exact value)<NEW_LINE>Instant next = next(currentScheduleTime);<NEW_LINE>Instant nextNext = next(next);<NEW_LINE>long estimatedInterval = nextNext.getEpochSecond<MASK><NEW_LINE>// get an aligned time th... | () - next.getEpochSecond(); |
909,403 | public void update() {<NEW_LINE>super.update();<NEW_LINE>BuildingItem toRemove = null;<NEW_LINE>for (BuildingItem i : buildersInAction) {<NEW_LINE>i.update();<NEW_LINE>if (i.isDone) {<NEW_LINE>toRemove = i;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (toRemove != null) {<NEW_LINE>buildersInAction.remove(toRemove);<NEW_LINE>}<NEW... | .convert(direction, 0.5)); |
1,798,172 | public static void main(String[] args) {<NEW_LINE>MeterRegistry registry = SampleConfig.myMonitoringSystem();<NEW_LINE>LongTaskTimer timer = registry.more().longTaskTimer("longTaskTimer");<NEW_LINE>RandomEngine r = new MersenneTwister64(0);<NEW_LINE>Normal incomingRequests = new Normal(0, 1, r);<NEW_LINE>Normal duratio... | ())).subscribe(); |
1,358,840 | private Object convertParameterizedType(Message<?> message, Type conversionHint) {<NEW_LINE>ObjectMapper objectMapper = this.getObjectMapper();<NEW_LINE>Object payload = message.getPayload();<NEW_LINE>try {<NEW_LINE>JavaType type = this.typeCache.get(conversionHint);<NEW_LINE>if (type == null) {<NEW_LINE>conversionHint... | value, typeToUse.getContentType()); |
1,641,721 | public CompletableFuture<Void> removeLedgerMetadata(long ledgerId, Version version) {<NEW_LINE>Optional<Long> existingVersion = Optional.empty();<NEW_LINE>if (Version.NEW == version) {<NEW_LINE>log.error("Request to delete ledger {} metadata with version set to the initial one", ledgerId);<NEW_LINE>return FutureUtil.fa... | (new BKException.BKMetadataVersionException()); |
1,259,561 | protected void onAttachedToWindow() {<NEW_LINE>super.onAttachedToWindow();<NEW_LINE><MASK><NEW_LINE>emailView.setText(editor.email);<NEW_LINE>emailWatcher = new TextWatcher() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void beforeTextChanged(CharSequence s, int start, int count, int after) {<NEW_LINE>}<NEW_LINE><NEW... | nameView.setText(editor.name); |
1,785,223 | private void fillAnalysisUser(UserConfig userConfig, AnalysisUser analysisUser, Map<String, WallProvider> blackListMap, ProblemReporter problemReporter) {<NEW_LINE>String tenant = analysisUser.getTenant();<NEW_LINE>String dbGroup = analysisUser.getDbGroup();<NEW_LINE>String blacklistStr = analysisUser.getBlacklist();<N... | getTenant(), wallProvider, dbGroup); |
604,416 | void connectStopsToStreetNetwork() {<NEW_LINE>EncodingManager em = graph.getEncodingManager();<NEW_LINE>FlagEncoder footEncoder = em.getEncoder("foot");<NEW_LINE>final EdgeFilter filter = new DefaultSnapFilter(new FastestWeighting(footEncoder), em.getBooleanEncodedValue(Subnetwork.key("foot")));<NEW_LINE>for (Stop stop... | stopNode, locationSnap.getClosestNode()); |
1,335,874 | private HttpRequest createRequest(ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpRequest nettyRequest) {<NEW_LINE>// Attempt to map the netty method<NEW_LINE>HttpMethod method;<NEW_LINE>if (nettyRequest.method().equals(HEAD)) {<NEW_LINE>method = HttpMethod.GET;<NEW_LINE>} else {<NEW_LINE>try {<NEW_LINE>meth... | method, decoder.path()); |
800,218 | // Print method header and return the ERROR_RETURN string.<NEW_LINE>private String generateCPPMethodheader(BNFProduction p, Token t) {<NEW_LINE>StringBuffer sig = new StringBuffer();<NEW_LINE>String ret, params;<NEW_LINE>String method_name = p.getLhs();<NEW_LINE>boolean void_ret = false;<NEW_LINE>boolean ptr_ret = fals... | ().get(i)); |
508,669 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = new String[] { "a0", "b0", "a1", "b1" };<NEW_LINE>String epl <MASK><NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>sendSupportBean(env, "E1", 1);<NEW_LINE>env.assertPropsNew("s0", fields, new Object[] { "E1", 1, "E1", 1 });<NEW_LINE>se... | = "@name('create') create window MyWindowJSN#keepall as select theString as a, intPrimitive as b from SupportBean;\n" + "on SupportMarketDataBean delete from MyWindowJSN where symbol = a;\n" + "insert into MyWindowJSN select theString as a, intPrimitive as b from SupportBean;\n" + "@name('s0') select irstream s0.a as a... |
804,747 | private synchronized void initOptions(boolean firstTime) {<NEW_LINE>long start = 0;<NEW_LINE>if (LOG.isLoggable(Level.FINE)) {<NEW_LINE>start = System.currentTimeMillis();<NEW_LINE>// NOI18N<NEW_LINE>Object[] objects = new Object[] { firstTime ? "" : "re", wmRoot != null ? FileUtil.toFile(wmRoot) : "<null>" };<NEW_LINE... | ParserServletContext(wmRoot, this, false); |
565,641 | public boolean enterCaseNode(CaseNode caseNode) {<NEW_LINE>List<Statement> nodes = caseNode.getStatements();<NEW_LINE>if (nodes.size() == 1) {<NEW_LINE>Statement node = nodes.get(0);<NEW_LINE>if (node instanceof BlockStatement) {<NEW_LINE>return super.enterCaseNode(caseNode);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (nodes.si... | (FormatToken.Kind.INDENTATION_DEC)); |
1,558,447 | public void testMessageOrder_B_SecOff(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>JMSProducer producer1 = jmsContextQueue.createProducer();<NEW_LINE>JMSProducer producer2 = jmsContextQueueNew.createProducer();<NEW_LINE>JMSConsumer jmsConsumer = jmsContextQueue.createConsumer(jm... | producer2.send(jmsQueue, msg); |
5,302 | public void actionPerformed(ActionEvent e) {<NEW_LINE>if (e.getSource() == addButton) {<NEW_LINE>Configuration config;<NEW_LINE>try {<NEW_LINE>config = new Configuration(null);<NEW_LINE>} catch (IOException e1) {<NEW_LINE>throw new RuntimeException(e1);<NEW_LINE>}<NEW_LINE>File initialDir;<NEW_LINE>File ruleFile;<NEW_L... | throw new IllegalArgumentException("Don't know how to handle " + e); |
1,844,167 | // shares lots of code with inot; candidate for refactoring<NEW_LINE>@Override<NEW_LINE>public MappeableContainer not(final int firstOfRange, final int lastOfRange) {<NEW_LINE>// TODO: may need to convert to a RunContainer<NEW_LINE>// TODO: this can be optimized for performance<NEW_LINE>if (firstOfRange >= lastOfRange)... | MappeableArrayContainer answer = new MappeableArrayContainer(newCardinality); |
857,905 | public RunOutcome run(@Nonnull StepExecutionDetails<ReindexJobParameters, ReindexChunkRange> theStepExecutionDetails, @Nonnull IJobDataSink<ReindexChunkIds> theDataSink) throws JobExecutionFailedException {<NEW_LINE>ReindexChunkRange data = theStepExecutionDetails.getData();<NEW_LINE><MASK><NEW_LINE>Date end = data.get... | Date start = data.getStart(); |
1,312,489 | private AnnotationValuePb.Builder handleEndAnnotationFieldNode(AnnotationPb.Builder currentAnnotation, AnnotationValuePb.Builder currentAnnotationValue, Iterable<AnnotationPb> nestedAnnotations) {<NEW_LINE>checkState("anno_field".equals(xmlStreamReader.getLocalName()), "not an " + "anno_field node");<NEW_LINE>checkStat... | addAnnotationValue(currentAnnotationValue.build()); |
932,327 | static <T> T readProtobuf(final ChannelBuffer buf, final Parser<T> parser) {<NEW_LINE>final int length = HBaseRpc.readProtoBufVarint(buf);<NEW_LINE><MASK><NEW_LINE>final byte[] payload;<NEW_LINE>final int offset;<NEW_LINE>if (buf.hasArray()) {<NEW_LINE>// Zero copy.<NEW_LINE>payload = buf.array();<NEW_LINE>offset = buf... | HBaseRpc.checkArrayLength(buf, length); |
1,317,586 | private Set<String> reLoadAllDbs() {<NEW_LINE>Map<String, String> allDbs = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);<NEW_LINE>Connection connection = null;<NEW_LINE>Statement statement = null;<NEW_LINE>String sql = PolarPrivUtil.getLoadAllDbsSql();<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>connection = metaDbDataSourc... | return this.dbNameAppNameMap.keySet(); |
1,677,679 | public final StartEPLExpressionRuleContext startEPLExpressionRule() throws RecognitionException {<NEW_LINE>StartEPLExpressionRuleContext _localctx = new StartEPLExpressionRuleContext(_ctx, getState());<NEW_LINE>enterRule(_localctx, 0, RULE_startEPLExpressionRule);<NEW_LINE>int _la;<NEW_LINE>try {<NEW_LINE>enterOuterAlt... | _errHandler.reportError(this, re); |
1,609,650 | public VolumeSpecification unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VolumeSpecification volumeSpecification = new VolumeSpecification();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | class).unmarshall(context)); |
1,303,152 | final ListOTAUpdatesResult executeListOTAUpdates(ListOTAUpdatesRequest listOTAUpdatesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listOTAUpdatesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
325,277 | public CookieNames unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>CookieNames cookieNames = new CookieNames();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_LINE>whil... | ().unmarshall(context)); |
87,350 | public void dump(PrintStream out, StringBuilder indent, Set<ModelInterfaceType> dumped) {<NEW_LINE>ModelType type = getType();<NEW_LINE>if (type instanceof ModelInterfaceType) {<NEW_LINE>ModelInterfaceType interfaceType = (ModelInterfaceType) type;<NEW_LINE>out.append(indent).print(this);<NEW_LINE>if (!dumped.add(inter... | (indent).println(attr); |
710,445 | public void resolve(ResolveContext resolveContext, List<? extends ResolutionAwareRepository> repositories, GlobalDependencyResolutionRules metadataHandler, Spec<? super DependencyMetadata> edgeFilter, DependencyGraphVisitor graphVisitor, DependencyArtifactsVisitor artifactsVisitor, AttributesSchemaInternal consumerSche... | edgeFilter, consumerSchema, moduleExclusions, buildOperationExecutor); |
1,365,479 | protected View.OnClickListener generateOnClickListener(@NonNull final BaseActivity activity, @Nullable final Integer textColor, @Nullable final Float textSize, final boolean showLinkButtons) {<NEW_LINE>return (button) -> {<NEW_LINE>final ScrollView scrollView = new ScrollView(activity);<NEW_LINE>final View view = mSpoi... | AlertDialog alert = builder.create(); |
125,609 | private static DenseVectorSummarizer merge(DenseVectorSummarizer left, DenseVectorSummarizer right) {<NEW_LINE>if (right.count == 0) {<NEW_LINE>return left;<NEW_LINE>}<NEW_LINE>if (left.count == 0) {<NEW_LINE>left.count = right.count;<NEW_LINE>left.sum = right.sum.clone();<NEW_LINE>left.squareSum = right.squareSum.clon... | = right.outerProduct.clone(); |
977,569 | ParseResult open(File file, long fileID) {<NEW_LINE>if (file == null) {<NEW_LINE>return ParseResult.ERROR;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>pstFile = new PSTFile(file);<NEW_LINE>} catch (PSTException ex) {<NEW_LINE>// This is the message thrown from the PSTFile constructor if it<NEW_LINE>// detects that the file is e... | + ": Failed to create internal java-libpst PST file to parse:\n" + ex.getMessage(); |
737,202 | public FusekiServer start() {<NEW_LINE>try {<NEW_LINE>FusekiModuleStep.serverBeforeStarting(this);<NEW_LINE>server.start();<NEW_LINE>FusekiModuleStep.serverAfterStarting(this);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>if (ex.getCause() instanceof java.security.UnrecoverableKeyException)<NEW_LINE>// Unbundle for cle... | ex.getMessage(), ex); |
976,538 | private Object jpql(Statement statement, Runtime runtime) throws Exception {<NEW_LINE>Object data = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>Class<? extends JpaObject> cls = this.clazz(business, stateme... | entityManagerContainer().beginTransaction(cls); |
134,488 | private static ResourceConfig createResourceConfig(final WebConfig config) throws ServletException {<NEW_LINE>final ServletContext servletContext = config.getServletContext();<NEW_LINE>// check if ResourceConfig has already been created, if so use it<NEW_LINE>ResourceConfig resourceConfig = Utils.retrieve(config.getSer... | (initParams).addProperties(contextParams); |
1,562,647 | public void writeTo(DexFile file, AnnotatedOutput out) {<NEW_LINE>boolean annotates = out.annotates();<NEW_LINE>TypeIdsSection typeIds = file.getTypeIds();<NEW_LINE>int <MASK><NEW_LINE>int superIdx = (superclass == null) ? -1 : typeIds.indexOf(superclass);<NEW_LINE>int interOff = OffsettedItem.getAbsoluteOffsetOr0(inte... | classIdx = typeIds.indexOf(thisClass); |
1,174,312 | private static void addMavenCoordinates(File modifiedJsonFile, JsonArray jsonArray, Map<String, LibertyFeature> features) throws IOException {<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < jsonArray.size(); i++) {<NEW_LINE>JsonObject jsonObject = jsonArray.getJsonObject(i);<NEW_LINE>JsonObjectBuilder jsonObjectBuilder =... | JsonArrayBuilder jsonArrayBuilder = Json.createArrayBuilder(); |
632,848 | public void onError(Exception e) {<NEW_LINE>byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;<NEW_LINE>org.apache.thrift.TBase msg;<NEW_LINE>getBlobReplication_result result = new getBlobReplication_result();<NEW_LINE>if (e instanceof KeyNotFoundException) {<NEW_LINE>result.knf = (KeyNotFoundException) e;<N... | .thrift.protocol.TMessageType.EXCEPTION; |
1,714,186 | public void buildModel() {<NEW_LINE>model = new Model("NQueen");<NEW_LINE>vars = new IntVar[n];<NEW_LINE>IntVar[] diag1 = new IntVar[n];<NEW_LINE>IntVar[] diag2 = new IntVar[n];<NEW_LINE>IntVar[] dualvars = new IntVar[n];<NEW_LINE>IntVar[] dualdiag1 = new IntVar[n];<NEW_LINE>IntVar[] dualdiag2 = new IntVar[n];<NEW_LINE... | , -n, n, false); |
758,333 | String model(CalciteConnectionImpl connection) {<NEW_LINE>String model = connection.config().model();<NEW_LINE>if (model != null) {<NEW_LINE>return model;<NEW_LINE>}<NEW_LINE>SchemaFactory schemaFactory = connection.config().schemaFactory(SchemaFactory.class, null);<NEW_LINE>final Properties info = connection.getProper... | .config().schemaType(); |
883,270 | public boolean refresh(TypeElement typeElement) {<NEW_LINE>Map<String, ? extends AnnotationMirror> annByType = getHelper().getAnnotationsByType(typeElement.getAnnotationMirrors());<NEW_LINE>// NOI18N<NEW_LINE>AnnotationMirror annotationMirror = annByType.get("javax.annotation.security.DeclareRoles");<NEW_LINE>if (annot... | (String) arrayMember.getValue(); |
1,038,285 | private QueryResult prepareAndRun(SearchJob searchJob, Query query) {<NEW_LINE>final QueryBackend<? extends <MASK><NEW_LINE>LOG.debug("[{}] Using {} to generate query", query.id(), backend);<NEW_LINE>// with all the results done, we can execute the current query and eventually complete our own result<NEW_LINE>// if any... | GeneratedQueryContext> backend = getQueryBackend(query); |
754,050 | public GradientValue_F32 compute(int x, int y) {<NEW_LINE>float a00, a01, a02, a10, a12, a20, a21, a22;<NEW_LINE>if (x >= 1 && y >= 1 && x < input.width - 1 && y < input.height - 1) {<NEW_LINE>int s = input.stride;<NEW_LINE>int tl = input.startIndex + input.stride * (y - 1) + x - 1;<NEW_LINE>a00 = input.data[tl];<NEW_L... | data[tl + 2 * s]; |
1,791,237 | private EntityData.Entity serializeEntityFull(EntityRef entityRef, FieldSerializeCheck<Component> fieldCheck) {<NEW_LINE>EntityData.Entity.Builder entity = EntityData.Entity.newBuilder();<NEW_LINE>if (!ignoringEntityId) {<NEW_LINE>entity.setId(entityRef.getId());<NEW_LINE>}<NEW_LINE>entity.setAlwaysRelevant(entityRef.i... | setOwner(owner.getId()); |
43,858 | final UploadLayerPartResult executeUploadLayerPart(UploadLayerPartRequest uploadLayerPartRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(uploadLayerPartRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<Upload... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,323,614 | protected int executeInsert(DriverState state, String sql, SupplyValueFunction func, Enumeration<Object[]> generator) throws SQLException {<NEW_LINE>Objects.requireNonNull(generator);<NEW_LINE>final Connection conn = state.getConnection();<NEW_LINE>int rows = 0;<NEW_LINE>if ("table".equals(INSERT_MODE)) {<NEW_LINE>sql ... | ).replaceFirst("--", ""); |
374,711 | public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {<NEW_LINE>detachAndScrapAttachedViews(recycler);<NEW_LINE>int widthUsed = 0;<NEW_LINE>int heightUsed = 0;<NEW_LINE>int lineHeight = 0;<NEW_LINE>int itemsCountOneLine = 0;<NEW_LINE>for (int i = 0; i < getItemCount(); i++) {<NEW_LINE>... | widthUsed + width, heightUsed + height); |
1,437,772 | public boolean add(Session session) {<NEW_LINE><MASK><NEW_LINE>try (Span span = tracer.getCurrentContext().createSpan("MSET sessionUriKey <sessionUri> capabilitiesKey <capabilities> ")) {<NEW_LINE>Map<String, EventAttributeValue> attributeMap = new HashMap<>();<NEW_LINE>SESSION_ID.accept(span, session.getId());<NEW_LIN... | Require.nonNull("Session to add", session); |
622,574 | public static APIRecoverDataVolumeEvent __example__() {<NEW_LINE>APIRecoverDataVolumeEvent event = new APIRecoverDataVolumeEvent();<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.m... | ("/zstack_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-%s/%s.qcow2", volumeUuid, volumeUuid)); |
1,026,027 | private <T> String batchUpload(String batchName, List<T> models) throws WeixinException {<NEW_LINE>StringWriter writer = new StringWriter();<NEW_LINE>try {<NEW_LINE>JSONObject csvObj = JSON.parseObject(weixinBundle().getString(batchName));<NEW_LINE>JSONArray columns = csvObj.getJSONArray("column");<NEW_LINE>writer.writ... | LinkedHashMap<String, Object>(); |
727,756 | public void executeNonQueryPlan(ExecutNonQueryReq request, AsyncMethodCallback<TSStatus> resultHandler) {<NEW_LINE>if (member.getCharacter() != NodeCharacter.LEADER) {<NEW_LINE>// forward the plan to the leader<NEW_LINE>AsyncClient client = member.getAsyncClient(member.getLeader());<NEW_LINE>if (client != null) {<NEW_L... | resultHandler.onComplete(StatusUtils.NO_LEADER); |
581,751 | public void visit(BLangTypeInit typeInitExpr) {<NEW_LINE>typeInitExpr.<MASK><NEW_LINE>BLangNode parent = typeInitExpr.initInvocation.parent;<NEW_LINE>if (parent != null && parent.getKind() == NodeKind.OBJECT_CTOR_EXPRESSION) {<NEW_LINE>BLangObjectConstructorExpression oce = (BLangObjectConstructorExpression) parent;<NE... | initInvocation = rewriteExpr(typeInitExpr.initInvocation); |
287,763 | public static SnapshotInfo readFrom(final StreamInput in) throws IOException {<NEW_LINE>final Snapshot snapshot;<NEW_LINE>if (in.getVersion().onOrAfter(GetSnapshotsRequest.PAGINATED_GET_SNAPSHOTS_VERSION)) {<NEW_LINE>snapshot = new Snapshot(in);<NEW_LINE>} else {<NEW_LINE>snapshot = new Snapshot(UNKNOWN_REPO_NAME, new ... | > userMetadata = in.readMap(); |
1,073,194 | @Produces({ "application/json" })<NEW_LINE>public Response filterAuthenticatedUsers(@QueryParam("searchTerm") String searchTerm, @QueryParam("selectedPage") Integer selectedPage, @QueryParam("itemsPerPage") Integer itemsPerPage, @QueryParam("sortKey") String sortKey) {<NEW_LINE>User authUser;<NEW_LINE>try {<NEW_LINE>au... | searchTerm, itemsPerPage, selectedPage, sortKey); |
251,569 | private static AuthnRequest parseRequest(AbstractSaml2AuthenticationRequest request) {<NEW_LINE>if (request == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>String samlRequest = request.getSamlRequest();<NEW_LINE>if (!StringUtils.hasText(samlRequest)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (request.getBindi... | getBytes(StandardCharsets.UTF_8))); |
450,418 | public void validatePeriods(final I_C_Flatrate_Term term) {<NEW_LINE>if (term.getStartDate() != null && !term.isProcessed()) {<NEW_LINE>Services.get(IFlatrateBL<MASK><NEW_LINE>setMasterEndDate(term);<NEW_LINE>}<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(term);<NEW_LINE>final String trxName = Interfac... | .class).updateNoticeDateAndEndDate(term); |
1,586,331 | public void propertyChanged(int property) {<NEW_LINE>String type = "unknown";<NEW_LINE>if (property == SpeedManagerListener.PR_ASN) {<NEW_LINE>type = "ASN change";<NEW_LINE>mon.readFromPersistentMap();<NEW_LINE>mon.updateFromCOConfigManager();<NEW_LINE>SMSearchLogger.log("ASN change.");<NEW_LINE>} else if (property == ... | " download - persistent limit: " + pmEst.getString()); |
501,982 | protected void writeIndexGen(final RepositoryData repositoryData, final long repositoryStateId) throws IOException {<NEW_LINE>// can not write to a read only repository<NEW_LINE>assert isReadOnly() == false;<NEW_LINE>final long currentGen = latestIndexBlobId();<NEW_LINE>if (repositoryStateId != SnapshotsInProgress.UNDE... | writeAtomic(INDEX_LATEST_BLOB, genBytes, false); |
1,692,551 | protected IStatus run(IProgressMonitor monitor) {<NEW_LINE>MultiStatus errors = new MultiStatus(GitPlugin.PLUGIN_ID, <MASK><NEW_LINE>try {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>monitor.beginTask("", IProgressMonitor.UNKNOWN);<NEW_LINE>while (true) {<NEW_LINE>if (monitor.isCanceled()) {<NEW_LINE>throw new OperationCanceledEx... | 1, Messages.GitIndexRefreshJob_ErrorMsg, null); |
162,399 | public static ExchangeMetaData adaptToExchangeMetaData(ExchangeMetaData originalMetaData, Map<String, KrakenAssetPair> krakenPairs, Map<String, KrakenAsset> krakenAssets) {<NEW_LINE>Map<CurrencyPair, CurrencyPairMetaData> pairs = new HashMap<>();<NEW_LINE>// add assets before pairs to Utils!<NEW_LINE>KrakenUtils.setKra... | currencies = new HashMap<>(); |
117,543 | protected void assertValidFindBy(FindBy findBy) {<NEW_LINE>if (findBy.how() != null) {<NEW_LINE>if (findBy.using() == null) {<NEW_LINE>throw new IllegalArgumentException("If you set the 'how' property, you must also set 'using'");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>Set<String> finders = new HashSet<>();<NEW_LINE>if (!"".eq... | "xpath: " + findBy.xpath()); |
488,410 | protected boolean loadFromCatalog(String basePhysicalIRI, ZipFile z) throws IOException {<NEW_LINE>ZipEntry yaml = z.stream().filter(e -> CATALOG_PATTERN.matcher(e.getName()).matches()).findFirst().orElse(null);<NEW_LINE>if (yaml == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Document doc = Docume... | (z.getInputStream(yaml)); |
1,555,702 | public void run() {<NEW_LINE>resultStatus = ExecutionStatus.RUNNING;<NEW_LINE>currentResultStatus = ExecutionStatus.RUNNING;<NEW_LINE>try {<NEW_LINE>// 1. init amClient<NEW_LINE>initAMClient();<NEW_LINE>checkEnd();<NEW_LINE>LOG.info("init amClient.");<NEW_LINE>// 2. get version from master<NEW_LINE>getCurrentJobVersion... | stopExecution(currentResultStatus == ExecutionStatus.SUCCEED); |
1,379,444 | public void delete(Set<String> declarationNames) throws InvokerException {<NEW_LINE>Map<Identifier, GlobalVariable> queuedGlobalVars = new HashMap<>();<NEW_LINE>Map<Identifier, String> queuedModuleDclns = new HashMap<>();<NEW_LINE>for (String declarationName : declarationNames) {<NEW_LINE><MASK><NEW_LINE>if (globalVars... | Identifier identifier = new Identifier(declarationName); |
1,372,410 | public void reduce(Text key, Iterator<Text> values, OutputCollector<Text, Text> output, Reporter reporter) throws IOException {<NEW_LINE><MASK><NEW_LINE>reporter.setStatus("starting " + field + " ::host = " + hostName);<NEW_LINE>// sum long values<NEW_LINE>if (field.startsWith("l:")) {<NEW_LINE>long lSum = 0;<NEW_LINE>... | String field = key.toString(); |
214,365 | public void processNewResult(Object newResult) {<NEW_LINE>Database db = ResultUtil.findDatabase(newResult);<NEW_LINE>SetDBIDs positiveIDs = DBIDUtil.ensureSet(DatabaseUtil.getObjectsByLabelMatch(db, positiveClassName));<NEW_LINE>if (positiveIDs.size() == 0) {<NEW_LINE>LOG.warning("Computing a P/R-G curve failed - no ob... | outResults = OutlierResult.getOutlierResults(newResult); |
951,662 | public EncryptionConfiguration unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EncryptionConfiguration encryptionConfiguration = new EncryptionConfiguration();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | JsonToken token = context.getCurrentToken(); |
1,353,784 | public S3TagList requestRoomS3Tags(Long roomId, String xSdsAuthToken) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'roomId' is set<NEW_LINE>if (roomId == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'roomId' when calling request... | HashMap<String, Object>(); |
161,565 | protected void onDraw(Canvas canvas) {<NEW_LINE>if (mChecked) {<NEW_LINE>mPaint.setStyle(Paint.Style.FILL);<NEW_LINE>mPaint.setColor(mUncheckedBackgroundColor);<NEW_LINE>mPaint.setAlpha(255);<NEW_LINE>canvas.drawRoundRect(mOutline, mOutline.height() / 2, mOutline.height() / 2, mPaint);<NEW_LINE>mPaint.setStyle(Paint.St... | height() / 2, mPaint); |
1,167,216 | protected void masterOperation(final UpdateSettingsRequest request, final ClusterState state, final ActionListener<AcknowledgedResponse> listener) {<NEW_LINE>final Index[] concreteIndices = indexNameExpressionResolver.concreteIndices(state, request);<NEW_LINE>UpdateSettingsClusterStateUpdateRequest clusterStateUpdateRe... | (response.isAcknowledged())); |
1,308,368 | public void onMapReady(@NonNull final MapboxMap mapboxMap) {<NEW_LINE>MultipleHeatmapStylingActivity.this.mapboxMap = mapboxMap;<NEW_LINE>mapboxMap.setStyle(Style.LIGHT, new Style.OnStyleLoaded() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onStyleLoaded(@NonNull final Style style) {<NEW_LINE>CameraPosition came... | heatmapIntensity(listOfHeatmapIntensityStops[index])); |
155,746 | private void paintZoomIndicator(Graphics2D graphics) {<NEW_LINE>if (mZoom != 0) {<NEW_LINE>int width = getWidth() / 4;<NEW_LINE>int x = (getWidth() / 2) - (width / 2);<NEW_LINE>// Draw the outer window<NEW_LINE>graphics.drawRect(x, getHeight() - 12, width, 10);<NEW_LINE><MASK><NEW_LINE>int windowOffset = 0;<NEW_LINE>if... | int zoomWidth = width / getZoomMultiplier(); |
1,165,292 | public void process() {<NEW_LINE>JMeterContext context = getThreadContext();<NEW_LINE><MASK><NEW_LINE>List<String> jsonResponses = extractJsonResponse(context, vars);<NEW_LINE>String[] refNames = getRefNames().split(SEPARATOR);<NEW_LINE>String[] jsonPathExpressions = getJsonPathExpressions().split(SEPARATOR);<NEW_LINE>... | JMeterVariables vars = context.getVariables(); |
1,418,637 | private void drawStabilityInfo() {<NEW_LINE>String at;<NEW_LINE>// // at M=<NEW_LINE>at = trans.get("RocketInfo.at") + UnitGroup.UNITS_COEFFICIENT.getDefaultUnit().toStringUnit(Application.getPreferences().getDefaultMach());<NEW_LINE>if (!Double.isNaN(aoa)) {<NEW_LINE>at += " " + ALPHA + "=" + UnitGroup.UNITS_ANGLE.get... | Rectangle2D cpTextRect = cpText.getVisualBounds(); |
938,415 | public static <T> T injectBean(Class<T> beanClass, String beanName, HttpServletRequest request, boolean skipConvertError) {<NEW_LINE>Object bean = createInstance(beanClass);<NEW_LINE>String modelNameAndDot = StrKit.notBlank(beanName) ? beanName + "." : null;<NEW_LINE>TypeConverter converter = TypeConverter.me();<NEW_LI... | != null ? modelNameAndDot + attrName : attrName; |
1,625,087 | public User login() throws UnauthenticatedException {<NEW_LINE>String username = "";<NEW_LINE>if (mConf.isSet(PropertyKey.SECURITY_LOGIN_USERNAME)) {<NEW_LINE>username = mConf.getString(PropertyKey.SECURITY_LOGIN_USERNAME);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// Use the class loader of User.class to construct the LoginC... | UnauthenticatedException(msg.toString()); |
157,509 | protected Answer execute(GetHostStatsCommand cmd) {<NEW_LINE>VmwareContext context = getServiceContext();<NEW_LINE>VmwareHypervisorHost hyperHost = getHyperHost(context);<NEW_LINE>HostStatsEntry hostStats = new HostStatsEntry(cmd.getHostId(), 0, 0, 0, "host", <MASK><NEW_LINE>Answer answer = new GetHostStatsAnswer(cmd, ... | 0, 0, 0, 0); |
983,150 | public void call(final Stream stream, final AlertCondition.CheckResult result) throws AlarmCallbackException {<NEW_LINE>final Map<String, Object> event = Maps.newHashMap();<NEW_LINE>event.put("stream", stream);<NEW_LINE>event.put("check_result", result);<NEW_LINE>final byte[] body;<NEW_LINE>try {<NEW_LINE>body = object... | throw new AlarmCallbackException("Unable to serialize alarm", e); |
1,573,875 | private Object doSendAndReceiveAsync(Destination reqDestination, jakarta.jms.Message jmsRequest, Session session, int priority) throws JMSException {<NEW_LINE>String correlation = null;<NEW_LINE>MessageProducer messageProducer = null;<NEW_LINE>try {<NEW_LINE>messageProducer = session.createProducer(reqDestination);<NEW... | this.replies.remove(correlation); |
495,761 | private Interface initRoutingInterface(Interface_idContext id) {<NEW_LINE>Map<String, Interface> interfaces;<NEW_LINE>InterfaceId interfaceId = new InterfaceId(id);<NEW_LINE>if (interfaceId.getNode() != null) {<NEW_LINE>String nodeDeviceName = interfaceId.getNode();<NEW_LINE>NodeDevice nodeDevice = _configuration.getNo... | String unitFullName = name + "." + unit; |
879,249 | public Pack read(DataInputX din) throws IOException {<NEW_LINE>this.gxid = din.readLong();<NEW_LINE>this.txid = din.readLong();<NEW_LINE>this.caller = din.readLong();<NEW_LINE>this.timestamp = din.readLong();<NEW_LINE>this.elapsed = (int) din.readDecimal();<NEW_LINE>this.spanType = din.readByte();<NEW_LINE>this.name = ... | (ListValue) din.readValue(); |
136,198 | public void layout() {<NEW_LINE>BitmapFont font = style.font;<NEW_LINE>Drawable selectedDrawable = style.selection;<NEW_LINE>itemHeight = font.getCapHeight() - font.getDescent() * 2;<NEW_LINE>itemHeight += selectedDrawable.getTopHeight() + selectedDrawable.getBottomHeight();<NEW_LINE>prefWidth = 0;<NEW_LINE>Pool<GlyphL... | items.get(i))); |
246,613 | int insertVertex_(int path, int before, Point point) {<NEW_LINE>int prev = before != -1 ? getPrevVertex(before) : getLastVertex(path);<NEW_LINE>int next = prev != -1 ? getNextVertex(prev) : -1;<NEW_LINE>int vertex = newVertex_(point == null ? m_point_count : -1);<NEW_LINE>int vindex = getVertexIndex(vertex);<NEW_LINE>i... | m_vertices.setPointByVal(vindex, point); |
467,170 | private List<AllocCandidate> extractAllocCandidates(@NonNull final I_M_HU hu, @NonNull final IAllocationRequest request) {<NEW_LINE>final IHUStorageFactory huStorageFactory = request.getHUContext().getHUStorageFactory();<NEW_LINE>final ArrayList<AllocCandidate> candidates = new ArrayList<>();<NEW_LINE>final List<I_M_HU... | (currentQty).build()); |
581,940 | private void loadInstanceIdByZK() {<NEW_LINE>int execCount = 1;<NEW_LINE>while (true) {<NEW_LINE>if (execCount > this.retryCount) {<NEW_LINE>throw new RuntimeException("instanceId allocate error when using zk, reason: no available instanceId found");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>List<String> nodeList = client.get... | "instanceId allocate error when using zk, reason:" + e.getMessage()); |
1,648,304 | private JPanel makeButtonPanel() {<NEW_LINE>JPanel buttonPanel = new JPanel();<NEW_LINE>buttonPanel.setLayout(new GridLayout(2, 2));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>addParameterButton = new JButton(JMeterUtils.getResString("add_parameter"));<NEW_LINE>// $NON-NLS-1$<NEW_LINE>addUserButton = new JButton(JMeterUtils.getR... | (JMeterUtils.getResString("delete_user")); |
585,091 | public NType resolve(Scope outer) throws Exception {<NEW_LINE>resolveList(defaults, outer);<NEW_LINE>resolveList(decoratorList, outer);<NEW_LINE>Scope funcTable = getTable();<NEW_LINE>NBinding selfBinding = funcTable.lookup("__self__");<NEW_LINE>if (selfBinding != null && !selfBinding.getType().isClassType()) {<NEW_LIN... | toType = resolveExpr(body, funcTable); |
125,375 | private void updateViews(@NonNull PullRequest pullRequest) {<NEW_LINE>setTitle(String.format("#%s"<MASK><NEW_LINE>if (getSupportActionBar() != null) {<NEW_LINE>getSupportActionBar().setSubtitle(pullRequest.getRepoId());<NEW_LINE>}<NEW_LINE>date.setText(SpannableBuilder.builder().append(getPresenter().getMergeBy(pullReq... | , pullRequest.getNumber())); |
1,759,887 | public void partitionBackupGc(List<Integer> readyPartitionBackupIds) throws IOException {<NEW_LINE>if (readyPartitionBackupIds.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int[] partitionBackupIds;<NEW_LINE>try (JnaResponse jnaResponse = GraphLibrary.INSTANCE.getBackupList(this.bePointer)) {<NEW_LINE>if (!jnaRespo... | String errMsg = jnaResponse.getErrMsg(); |
273,278 | Converter<JWT, Mono<JWTClaimsSet>> processor() {<NEW_LINE>JWKSecurityContextJWKSet jwkSource = new JWKSecurityContextJWKSet();<NEW_LINE>JWSKeySelector<JWKSecurityContext> jwsKeySelector = new JWSVerificationKeySelector<>(this.jwsAlgorithm, jwkSource);<NEW_LINE>DefaultJWTProcessor<JWKSecurityContext> jwtProcessor = new ... | this.jwtProcessorCustomizer.accept(jwtProcessor); |
1,076,830 | static Stream<Map.Entry<ConfigKeyImpl, ConfigNode>> flattenNodes(ConfigKeyImpl key, ConfigNode node) {<NEW_LINE>switch(node.nodeType()) {<NEW_LINE>case OBJECT:<NEW_LINE>return ((ConfigNode.ObjectNode) node).entrySet().stream().map(e -> flattenNodes(key.child(e.getKey()), e.getValue())).reduce(Stream.of(new AbstractMap.... | node)), Stream::concat); |
1,691,220 | 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"); |
568,866 | public static void execute(ManagerService service) {<NEW_LINE><MASK><NEW_LINE>// write header<NEW_LINE>buffer = HEADER.write(buffer, service, true);<NEW_LINE>// write fields<NEW_LINE>for (FieldPacket field : FIELDS) {<NEW_LINE>buffer = field.write(buffer, service, true);<NEW_LINE>}<NEW_LINE>// write eof<NEW_LINE>buffer... | ByteBuffer buffer = service.allocate(); |
840,836 | public void testSearchBase() throws Exception {<NEW_LINE>// check for valid user and group<NEW_LINE>String returnUser = servlet.checkPassword(USER_DN, "password");<NEW_LINE><MASK><NEW_LINE>assertTrue("Expected '" + USER_DN + "' to be valid user.", servlet.isValidUser(USER_DN));<NEW_LINE>List<String> groups = servlet.ge... | assertNotNull("Should find user on checkPassword using " + USER_DN, returnUser); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.