idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,407,012 | protected static KodoUnderFileSystem creatInstance(AlluxioURI uri, UnderFileSystemConfiguration conf) {<NEW_LINE>String bucketName = UnderFileSystemUtils.getBucketName(uri);<NEW_LINE>Preconditions.checkArgument(conf.isSet(PropertyKey.KODO_ACCESS_KEY), "Property %s is required to connect to Kodo", PropertyKey.KODO_ACCES... | conf.getString(PropertyKey.KODO_ENDPOINT); |
1,724,234 | private QuoteFeedData internalGetQuotes(Security security, String feedURL, boolean collectRawResponse, boolean isPreview) {<NEW_LINE>if (feedURL == null || feedURL.length() == 0) {<NEW_LINE>return QuoteFeedData.withError(new IOException(MessageFormat.format(Messages.MsgMissingFeedURL, security.getName())));<NEW_LINE>}<... | variableURL = Factory.fromString(feedURL); |
616,370 | private void authenticate(final String username, final String password) {<NEW_LINE>// https://helpcenter.veeam.com/docs/backup/rest/http_authentication.html?ver=95u4<NEW_LINE>final HttpPost request = new HttpPost(apiURI.toString() + "/sessionMngr/?v=v1_4");<NEW_LINE>request.setHeader(HttpHeaders.AUTHORIZATION, "Basic "... | getFirstHeader(SESSION_HEADER).getValue(); |
430,133 | public void channelRead0(ChannelHandlerContext ctx, FullHttpRequest req) throws Exception {<NEW_LINE>if (HttpUtil.is100ContinueExpected(req)) {<NEW_LINE>ctx.write(new DefaultFullHttpResponse(HTTP_1_1, CONTINUE, ctx.alloc().buffer(0)));<NEW_LINE>}<NEW_LINE>boolean keepAlive = HttpUtil.isKeepAlive(req);<NEW_LINE>ByteBuf ... | HelloWorldHttp2Handler.RESPONSE_BYTES.duplicate()); |
921,715 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("ftp_mput" + mm.getMessage("function.missingParam"));<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (size < 3) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw... | int size = param.getSubSize(); |
1,374,530 | public static DeleteAlbumsResponse unmarshall(DeleteAlbumsResponse deleteAlbumsResponse, UnmarshallerContext context) {<NEW_LINE>deleteAlbumsResponse.setRequestId(context.stringValue("DeleteAlbumsResponse.RequestId"));<NEW_LINE>deleteAlbumsResponse.setCode(context.stringValue("DeleteAlbumsResponse.Code"));<NEW_LINE>del... | ("DeleteAlbumsResponse.Results[" + i + "].Code")); |
813,518 | public NaiveBayesTrainBatchOp linkFrom(BatchOperator<?>... inputs) {<NEW_LINE>BatchOperator<?> in = checkAndGetFirst(inputs);<NEW_LINE>String labelColName = getLabelCol();<NEW_LINE>TypeInformation<?> labelType = in.getColTypes()[TableUtil.findColIndexWithAssertAndHint(in.getColNames(), labelColName)];<NEW_LINE>String[]... | () : new String[0]; |
725,942 | public static java.sql.Date toSqlDate(Object value) {<NEW_LINE>if (value == null) {<NEW_LINE>return null;<NEW_LINE>} else if (value instanceof java.sql.Date) {<NEW_LINE>return (java.sql.Date) value;<NEW_LINE>} else if (value instanceof java.util.Date) {<NEW_LINE>return new java.sql.Date(((java.util.Date) value).getTime... | toString().trim()); |
183,229 | public void compile(File inFile, File outFile) throws IOException {<NEW_LINE>Reader reader = new BufferedReader(new FileReader(inFile));<NEW_LINE>OutputStream output = new BufferedOutputStream(new FileOutputStream(outFile));<NEW_LINE>try {<NEW_LINE>TileSet.Builder builder = TileSet.newBuilder();<NEW_LINE><MASK><NEW_LIN... | TextFormat.merge(reader, builder); |
111,540 | public static DescribeGtmRecoveryPlanAvailableConfigResponse unmarshall(DescribeGtmRecoveryPlanAvailableConfigResponse describeGtmRecoveryPlanAvailableConfigResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeGtmRecoveryPlanAvailableConfigResponse.setRequestId(_ctx.stringValue("DescribeGtmRecoveryPlanAvailableConfig... | = new ArrayList<AddrPool>(); |
363,239 | private JPanel makeButtonPanel() {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>showDetail = new JButton(JMeterUtils.getResString("detail"));<NEW_LINE>showDetail.setActionCommand(DETAIL);<NEW_LINE>showDetail.setEnabled(true);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>add = new JButton(JMeterUtils.getResString("add"));<NEW_LINE>add.setActio... | (JMeterUtils.getResString("add_from_clipboard")); |
1,410,551 | void frameMessage(final MessageData message, final ByteBuf buf) {<NEW_LINE>final int frameSize <MASK><NEW_LINE>final int pad = padding16(frameSize);<NEW_LINE>final byte id = (byte) message.getCode();<NEW_LINE>// Generate the header data.<NEW_LINE>final byte[] h = new byte[LENGTH_HEADER_DATA];<NEW_LINE>h[0] = (byte) ((f... | = message.getSize() + LENGTH_MESSAGE_ID; |
762,335 | public void zoomToRegion(Position min, Position max, double bufferFactor) {<NEW_LINE>if (min == null || max == null)<NEW_LINE>return;<NEW_LINE>// prevent divide by zero<NEW_LINE>if (this.ySize == 0) {<NEW_LINE>this.ySize = 1;<NEW_LINE>}<NEW_LINE>// Figure out offset compared to the current center.<NEW_LINE>Position reg... | double _scaleFactor = _scaleFactorBase * this.zoomMultiplier; |
1,524,755 | public Object visitTryFinally(TryFinally node) throws Exception {<NEW_LINE>Label start = new Label();<NEW_LINE>Label end = new Label();<NEW_LINE>Label handlerStart = new Label();<NEW_LINE>Label finallyEnd = new Label();<NEW_LINE>Object ret;<NEW_LINE>ExceptionHandler inFinally = new ExceptionHandler(node);<NEW_LINE>// D... | (p(Throwable.class)); |
295,622 | public Builder mergeFrom(io.prometheus.client.Metrics.MetricFamily other) {<NEW_LINE>if (other == io.prometheus.client.Metrics.MetricFamily.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (other.hasName()) {<NEW_LINE>bitField0_ |= 0x00000001;<NEW_LINE>name_ = other.name_;<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LI... | bitField0_ = (bitField0_ & ~0x00000008); |
1,695,618 | public void testBuildApacheConfiguredValidatorFactory(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>if (validatorFactory == null) {<NEW_LINE>throw new IllegalStateException("Injection of ValidatorFactory never occurred.");<NEW_LINE>}<NEW_LINE>boolean isFeature11 = Boolean.parseBo... | (request.getParameter("isFeature11")); |
1,785,768 | public StreamEvent find(StateEvent matchingEvent, IndexedEventHolder indexedEventHolder, StreamEventCloner storeEventCloner) {<NEW_LINE>Collection<StreamEvent> leftStreamEvents = leftCollectionExecutor.findEvents(matchingEvent, indexedEventHolder);<NEW_LINE>if (leftStreamEvents == null) {<NEW_LINE>return exhaustiveColl... | find(matchingEvent, indexedEventHolder, storeEventCloner); |
676,278 | public void paintBorder(ActionButton button, Graphics g, Dimension size, int state) {<NEW_LINE>if (state == ActionButtonComponent.NORMAL && !button.isBackgroundSet())<NEW_LINE>return;<NEW_LINE>Rectangle rect = new Rectangle(button.getSize());<NEW_LINE>JBInsets.removeFrom(rect, button.getInsets());<NEW_LINE>Graphics2D g... | RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
1,658,149 | Node<K, V> findNode(K key) {<NEW_LINE>java.lang.Comparable<K> object = comparator == null ? toComparable((K) key) : null;<NEW_LINE>K keyK = (K) key;<NEW_LINE>Node<K, V> node = root;<NEW_LINE>while (node != null) {<NEW_LINE>K[] keys = node.keys;<NEW_LINE>int left_idx = node.left_idx;<NEW_LINE>int result = cmp(object<MAS... | , keyK, keys[left_idx]); |
198,395 | public void deleteById(String id) {<NEW_LINE>String workspaceName = Utils.getValueFromIdByName(id, "workspaces");<NEW_LINE>if (workspaceName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id)));<NEW... | format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); |
429,193 | public Void visitCreateMapExpression(final CreateMapExpression exp, final Context context) {<NEW_LINE>final ImmutableMap<Expression, Expression> map = exp.getMap();<NEW_LINE>if (map.isEmpty()) {<NEW_LINE>throw new KsqlException("Map constructor cannot be empty. Please supply at least one key " + "value pair (see https:... | ("Cannot construct a map with all NULL values " + "(see https://github.com/confluentinc/ksql/issues/4239). As a workaround, you may " + "cast a NULL value to the desired type.")); |
528,556 | public void sendCustomEventsAsync() {<NEW_LINE>// BEGIN: com.azure.messaging.eventgrid.EventGridPublisherAsyncClient#CreateCustomEventClient<NEW_LINE>// Create a client to send events of custom event<NEW_LINE>EventGridPublisherAsyncClient<BinaryData> customEventPublisherClient = // make sure it accepts custom events<NE... | (customEvent)).block(); |
1,746,648 | private void doRequest(HttpServletRequest request, HttpServletResponse response, boolean head) throws IOException {<NEW_LINE>Resource resource;<NEW_LINE>try {<NEW_LINE>resource = new Resource(getFile(request));<NEW_LINE>} catch (RedirectException ex) {<NEW_LINE>logger.log(FINE, "Redirecting client to: " + ex.location);... | , resource.length - 1)); |
266,007 | private void checkTableInUsed(final ShardingRule shardingRule, final DropTableStatement sqlStatement, final RouteContext routeContext) {<NEW_LINE>Collection<String> inUsedTable = new LinkedList<>();<NEW_LINE>Set<String> dropTables = sqlStatement.getTables().stream().map(each -> each.getTableName().getIdentifier().getVa... | throw new ShardingSphereException("Actual Tables: [%s] are in use.", inUsedTable); |
1,444,253 | protected void addPattern(String classWildcard) {<NEW_LINE>Matcher <MASK><NEW_LINE>StringBuilder patternStr = new StringBuilder();<NEW_LINE>int prevIndex = 0;<NEW_LINE>while (matcher.find()) {<NEW_LINE>int matchStart = matcher.start();<NEW_LINE>int matchEnd = matcher.end();<NEW_LINE>if (matchStart > prevIndex) {<NEW_LI... | matcher = WILDCARD_PATTERN.matcher(classWildcard); |
456,470 | JarFile createBootProxyJar() throws IOException {<NEW_LINE>File dataFile = bundleContext.getDataFile("boot-proxy.jar");<NEW_LINE>// Create the file if it doesn't already exist<NEW_LINE>if (!dataFile.exists()) {<NEW_LINE>dataFile.createNewFile();<NEW_LINE>}<NEW_LINE>// Generate a manifest<NEW_LINE>Manifest manifest = cr... | = new JarOutputStream(fileOutputStream, manifest); |
570,801 | /*<NEW_LINE>switch (b) {<NEW_LINE>default: {<NEW_LINE><MASK><NEW_LINE>if (b < 3) {<NEW_LINE>System.out.println("one");<NEW_LINE>} else {<NEW_LINE>System.out.println("two");<NEW_LINE>}<NEW_LINE>}<NEW_LINE>}<NEW_LINE>this(2);<NEW_LINE><NEW_LINE>->><NEW_LINE><NEW_LINE>int footmp;<NEW_LINE>switch (b) {<NEW_LINE>default: {<... | System.out.println("Hello world"); |
282,797 | public MarketoConnectorProfileProperties unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MarketoConnectorProfileProperties marketoConnectorProfileProperties = new MarketoConnectorProfileProperties();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | int originalDepth = context.getCurrentDepth(); |
533,642 | final GetRolePolicyResult executeGetRolePolicy(GetRolePolicyRequest getRolePolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRolePolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,605,753 | public Mono<Void> logoutAllSessions(String email) {<NEW_LINE>// This pattern string comes from calling `ReactiveRedisSessionRepository.getSessionKey("*")` private method.<NEW_LINE>return redisOperations.keys("spring:session:sessions:*").flatMap(key -> // The values are maps, containing various pieces of session related... | , error)).then(); |
301,701 | public void delete(E entity, EntityProxy<E> proxy) {<NEW_LINE>context.getStateListener().preDelete(entity, proxy);<NEW_LINE>proxy.unlink();<NEW_LINE>if (cacheable) {<NEW_LINE>cache.invalidate(entityClass, proxy.key());<NEW_LINE>}<NEW_LINE>// if cascade delete and the property is not loaded (load it)<NEW_LINE>for (Attri... | .get().value(); |
1,133,680 | public RuleResult execute(Map<String, String> ruleParam, Map<String, String> resourceAttributes) {<NEW_LINE>logger.debug("========CheckAWSCloudTrailConfig started=========");<NEW_LINE>Annotation annotation = null;<NEW_LINE>String <MASK><NEW_LINE>String severity = ruleParam.get(PacmanRuleConstants.SEVERITY);<NEW_LINE>St... | cloudTrailInput = ruleParam.get("inputCloudTrailName"); |
349,930 | public EnableUserResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>EnableUserResult enableUserResult = new EnableUserResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = c... | int originalDepth = context.getCurrentDepth(); |
1,489,167 | protected void buildBodyDeclarations(org.eclipse.jdt.internal.compiler.ast.TypeDeclaration expression, AnonymousClassDeclaration anonymousClassDeclaration) {<NEW_LINE>// add body declaration in the lexical order<NEW_LINE>org.eclipse.jdt.internal.compiler.ast.TypeDeclaration[] members = expression.memberTypes;<NEW_LINE>... | getFlags() | ASTNode.MALFORMED); |
1,854,957 | public void unmarkAsToBeDeleted(Transaction transaction) throws SIResourceException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "unmarkAsToBeDeleted", transaction);<NEW_LINE>toBeDeleted = Boolean.FALSE;<NEW_LINE>try {<NEW_LINE>this.requestUpdate(transaction);<NEW... | exit(tc, "unmarkAsToBeDeleted", e); |
383,244 | public com.amazonaws.services.lexmodelbuilding.model.ResourceInUseException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.lexmodelbuilding.model.ResourceInUseException resourceInUseException = new com.amazonaws.services.lexmodelbuilding.model.ResourceInUseExce... | JsonToken token = context.getCurrentToken(); |
1,375,298 | private void decodeFlags(Position position, int flags) {<NEW_LINE>position.setValid(BitUtil.to(flags, 2) > 0);<NEW_LINE>if (BitUtil.check(flags, 1)) {<NEW_LINE>position.set(Position.KEY_APPROXIMATE, true);<NEW_LINE>}<NEW_LINE>if (BitUtil.check(flags, 2)) {<NEW_LINE>position.set(Position.KEY_ALARM, Position.ALARM_FAULT)... | Position.KEY_ALARM, Position.ALARM_FALL_DOWN); |
1,185,060 | protected boolean timerJobForPlanItemInstanceExists(CommandContext commandContext, PlanItemInstanceEntity planItemInstance) {<NEW_LINE>// For the same plan item, only one timer job can ever be active at any given time.<NEW_LINE>// Since the DefaultJobManager creates a new timer job on repeat, we need to make sure<NEW_L... | ), planItemInstance.getId()); |
804,286 | public void prepareExpressions() throws UserException {<NEW_LINE>List<Expr> selectList = Expr.cloneList(queryStmt.getBaseTblResultExprs());<NEW_LINE>// check type compatibility<NEW_LINE>int numCols = targetColumns.size();<NEW_LINE>for (int i = 0; i < numCols; ++i) {<NEW_LINE>Column col = targetColumns.get(i);<NEW_LINE>... | DefaultValueType defaultValueType = col.getDefaultValueType(); |
1,278,546 | private String performReplacement(ReplacementProperty replacementProperty, String content) {<NEW_LINE>String evaluationContent = content;<NEW_LINE>if (evaluationContent == null || evaluationContent.isEmpty() || replacementProperty.isForceValueEvaluation()) {<NEW_LINE>evaluationContent = replacementProperty.getValue();<... | ()).orElse(evaluationContent); |
1,355,588 | private void formulateFolders() {<NEW_LINE>systemDir = addHomeDir(systemDir);<NEW_LINE>schemaDir = addHomeDir(schemaDir);<NEW_LINE>syncDir = addHomeDir(syncDir);<NEW_LINE>tracingDir = addHomeDir(tracingDir);<NEW_LINE>walDir = addHomeDir(walDir);<NEW_LINE>indexRootFolder = addHomeDir(indexRootFolder);<NEW_LINE>extDir = ... | = hdfsDir + File.separatorChar + queryDir; |
252,034 | public void buildClassParameters(Collection<? extends Abstract.FieldParameter> absParameters, Concrete.ClassDefinition classDef, List<Concrete.ClassElement> elements) {<NEW_LINE>for (Abstract.FieldParameter absParameter : absParameters) {<NEW_LINE>Concrete.Parameter parameter = buildParameter(absParameter, false, false... | , parameter.getData())); |
364,482 | default void load(Path path) throws IOException {<NEW_LINE>JsonObject json = Json.parse(FileUtils.readFileToString(path.toFile(), StandardCharsets.UTF_8)).asObject();<NEW_LINE>for (FieldWrapper field : getConfigFields()) {<NEW_LINE>String name = field.key();<NEW_LINE>if (name == null)<NEW_LINE>continue;<NEW_LINE>final ... | set(value.asInt()); |
1,793,543 | void put(String userId, DateTime returnedTokenRefillTime) {<NEW_LINE>tokensMap.computeIfPresent(userId, (user, availableTokens) -> {<NEW_LINE>DateTime now = clock.nowUtc();<NEW_LINE>int currentTokenCount = availableTokens.value();<NEW_LINE><MASK><NEW_LINE>int newTokenCount;<NEW_LINE>// Check if quota is unlimited.<NEW_... | DateTime refillTime = availableTokens.timestamp(); |
848,632 | public ExprNode validate(ExprValidationContext validationContext) throws ExprValidationException {<NEW_LINE>if (validationContext.getContextDescriptor() == null) {<NEW_LINE>throw new ExprValidationException("Context property '" + propertyName + "' cannot be used in the expression as provided");<NEW_LINE>}<NEW_LINE>Even... | .getContextPropertyRegistry().getContextEventType(); |
1,600,229 | public void visit(ClassDeclaration node) {<NEW_LINE><MASK><NEW_LINE>if (includeWSBeforePHPDoc) {<NEW_LINE>formatTokens.add(new FormatToken(FormatToken.Kind.WHITESPACE_BEFORE_CLASS, ts.offset()));<NEW_LINE>} else {<NEW_LINE>includeWSBeforePHPDoc = true;<NEW_LINE>}<NEW_LINE>scan(node.getAttributes());<NEW_LINE>while (ts.... | addAllUntilOffset(node.getStartOffset()); |
10,472 | public ReleaseStaticIpResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ReleaseStaticIpResult releaseStaticIpResult = new ReleaseStaticIpResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | JsonToken token = context.getCurrentToken(); |
682,784 | private void checkSubFieldAndWriteData(String[] subFields, int index, Property parentProp, String dataCell, int forSelectUse, List<String> dataList) throws ClassNotFoundException {<NEW_LINE>if (index < subFields.length) {<NEW_LINE>if (parentProp.getTarget() != null) {<NEW_LINE>Mapper mapper = advancedImportService.getM... | childProp, dataCell, forSelectUse, dataList); |
1,549,267 | final DeleteAccessResult executeDeleteAccess(DeleteAccessRequest deleteAccessRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAccessRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | invoke(request, responseHandler, executionContext); |
148,061 | protected ShapeImpl applyTransition(ShapeImpl shape, Transition transition, boolean append) {<NEW_LINE>if (transition instanceof AddPropertyTransition) {<NEW_LINE>Property property = ((AddPropertyTransition) transition).getProperty();<NEW_LINE>ShapeImpl newShape;<NEW_LINE>if (append) {<NEW_LINE>Property newProperty = p... | shape, oldProperty, newProperty, append); |
545,862 | private boolean processStructMembers(XmlTreeNode root, Structure struct, boolean firstPass, boolean isVariableLength) {<NEW_LINE>boolean processedAll = true;<NEW_LINE>Iterator<XmlTreeNode> iter = root.getChildren("MEMBER");<NEW_LINE>while (iter.hasNext()) {<NEW_LINE>XmlTreeNode child = iter.next();<NEW_LINE>XmlElement ... | " of structure " + struct.getDisplayName()); |
76,346 | public void createTable(ObjectPath tablePath, CatalogBaseTable table, boolean ignoreIfExists) throws TableAlreadyExistException, DatabaseNotExistException, CatalogException {<NEW_LINE>tablePath = new ObjectPath(tablePath.getDatabaseName().toUpperCase(), tablePath.getObjectName().toUpperCase());<NEW_LINE>boolean tableEx... | executeSql(sbd.toString()); |
933,735 | public boolean validateMenuItem(final NSMenuItem item) {<NEW_LINE>final Selector action = item.action();<NEW_LINE>if (action.equals(Foundation.selector("paste:"))) {<NEW_LINE>final List<PathPasteboard<MASK><NEW_LINE>if (pasteboards.size() == 1) {<NEW_LINE>for (PathPasteboard pasteboard : pasteboards) {<NEW_LINE>if (pas... | > pasteboards = PathPasteboardFactory.allPasteboards(); |
1,104,836 | public void channelRead(final ChannelHandlerContext ctx, final Object msg) {<NEW_LINE>if (msg instanceof MySQLHandshakePacket) {<NEW_LINE>MySQLHandshakePacket handshake = (MySQLHandshakePacket) msg;<NEW_LINE>MySQLHandshakeResponse41Packet handshakeResponsePacket = new MySQLHandshakeResponse41Packet(1, MAX_PACKET_SIZE, ... | channel().writeAndFlush(handshakeResponsePacket); |
282,830 | <ToModelType> QueryInsertExecutorResult executeInsert(@NonNull final QueryInsertExecutor<ToModelType, T> queryInserter) {<NEW_LINE>Check.assume(!queryInserter.<MASK><NEW_LINE>final List<Object> sqlParams = new ArrayList<>();<NEW_LINE>final boolean collectSqlParamsFromSelectClause = unions == null || unions.isEmpty();<N... | isEmpty(), "At least one column to be inserted needs to be specified: {}", queryInserter); |
1,474,262 | public Object aroundReadFrom(ReaderInterceptorContext ric) throws IOException, WebApplicationException {<NEW_LINE><MASK><NEW_LINE>// ric.setInputStream(new FilterInputStream(ric.getInputStream()) {<NEW_LINE>//<NEW_LINE>// final ByteArrayOutputStream baos = new ByteArrayOutputStream();<NEW_LINE>//<NEW_LINE>// @Override<... | System.out.println("MyClientReaderInterceptor"); |
782,900 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see AAA.summary.Refiner#refineP2Set(soot.jimple.spark.pag.VarNode, soot.jimple.spark.sets.PointsToSetInternal)<NEW_LINE>*/<NEW_LINE>protected boolean refineP2Set(VarNode v, PointsToSetInternal badLocs, HeuristicType heuristic) {<NEW_LINE>// logger.debug(""+badLocs);<NE... | (v, EMPTY_CALLSTACK), badLocs); |
1,432,643 | public void init(ClassProperties properties) {<NEW_LINE>String platform = properties.getProperty("platform");<NEW_LINE>List<String> preloads = properties.get("platform.preload");<NEW_LINE>List<String> resources = properties.get("platform.preloadresource");<NEW_LINE>// Only apply this at load time since we don't want to... | equals("cudart") ? "64_110" : "64_11"; |
80,313 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, String workId) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>String executorSeed = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<... | add(task.getPerson()); |
516,707 | private ReferenceBinding[] processClassNames(LookupEnvironment environment) {<NEW_LINE>// check for .class file presence in case of apt processing<NEW_LINE>int length = this.classNames.length;<NEW_LINE>ReferenceBinding[] referenceBindings = new ReferenceBinding[length];<NEW_LINE>ModuleBinding[] modules = new ModuleBind... | .bind("configure.invalidModuleName", m)); |
198,395 | public void deleteById(String id) {<NEW_LINE>String workspaceName = Utils.getValueFromIdByName(id, "workspaces");<NEW_LINE>if (workspaceName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id)));<NEW... | Utils.getValueFromIdByName(id, "resourceGroups"); |
375,364 | public V put(final K key, final V value) {<NEW_LINE>int hash = hash(key);<NEW_LINE>MapEntry<K, V>[] table = this.entries;<NEW_LINE>while (true) {<NEW_LINE>int index = hash & (table.length - 1);<NEW_LINE>MapEntry<K, V> tombstone = null;<NEW_LINE>for (int i = index; i < table.length; i++) {<NEW_LINE>MapEntry<K, V> entry ... | >(key, value, hash); |
1,755,944 | private double euclideanDistance(Location loc1, Location loc2) {<NEW_LINE>double lat1 = Double.parseDouble(loc1.getLat());<NEW_LINE>double lon1 = Double.parseDouble(loc1.getLon());<NEW_LINE>double lat2 = Double.parseDouble(loc2.getLat());<NEW_LINE>double lon2 = Double.parseDouble(loc2.getLon());<NEW_LINE>// Radius of t... | Math.sin(lonDistance / 2); |
123,521 | private float collideWithSegment(Vector3f sCenter, Vector3f sVelocity, float velocitySquared, Vector3f l1, Vector3f l2, float t, Vector3f store) {<NEW_LINE>Vector3f edge = temp1.set(l2).subtractLocal(l1);<NEW_LINE>Vector3f base = temp2.set(l1).subtractLocal(sCenter);<NEW_LINE><MASK><NEW_LINE>float baseSquared = base.le... | float edgeSquared = edge.lengthSquared(); |
438,164 | public void show() {<NEW_LINE>wizard.setTitle(MessageText.getString("exportTorrentWizard.torrentfile.title"));<NEW_LINE>Composite rootPanel = wizard.getPanel();<NEW_LINE>GridLayout layout = new GridLayout();<NEW_LINE>layout.numColumns = 1;<NEW_LINE>rootPanel.setLayout(layout);<NEW_LINE>Composite panel = new <MASK><NEW_... | Composite(rootPanel, SWT.NULL); |
915,515 | public OutlierResult run(Relation<O> relation) {<NEW_LINE>QueryBuilder<O> qb = new QueryBuilder<>(relation, distance);<NEW_LINE>KNNSearcher<DBIDRef> knnQuery = qb.kNNByDBID(kplus);<NEW_LINE>DistanceQuery<O<MASK><NEW_LINE>// track the maximum value for normalization<NEW_LINE>DoubleMinMax ldofminmax = new DoubleMinMax();... | > distFunc = qb.distanceQuery(); |
1,752,307 | private void integrateInertiaSurface() {<NEW_LINE>double x, r1, r2;<NEW_LINE>final double l = length / DIVISIONS;<NEW_LINE>r1 = getRadius(0);<NEW_LINE>// System.out.println(r1);<NEW_LINE>x = 0;<NEW_LINE>longitudinalInertia = 0;<NEW_LINE>rotationalInertia = 0;<NEW_LINE>double surface = 0;<NEW_LINE>for (int n = 1; n <= D... | = (r1 + r2) / 2; |
1,720,105 | public void performIterationsClassifyEarlyStop(final LearningMethod train, final ClassificationAlgorithm model, final List<BasicData> validationData, final int tolerate) {<NEW_LINE>int iterationNumber = 0;<NEW_LINE>boolean done = false;<NEW_LINE>double bestError = Double.POSITIVE_INFINITY;<NEW_LINE>int badIterations = ... | ", " + train.getStatus()); |
1,782,970 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>notificationsViewModel = new ViewModelProvider(this, new ViewModelProvider.NewInstanceFactory()).get(NotificationsViewModel.class);<NEW_LINE>View root = inflater.inflate(R.layout.fragment_notifications,... | findViewById(R.id.rv_fragment_notifications); |
1,604,291 | private static StreamingHttpResponse newErrorResponse(final Throwable cause, final HttpServiceContext ctx, final StreamingHttpRequest request, final StreamingHttpResponseFactory responseFactory) {<NEW_LINE>final HttpResponseStatus status;<NEW_LINE>if (cause instanceof RejectedExecutionException) {<NEW_LINE>status = SER... | version(), status, cause); |
492,766 | public Answer execute(final SecurityGroupRulesCmd command, final LibvirtComputingResource libvirtComputingResource) {<NEW_LINE>String vif = null;<NEW_LINE>String brname = null;<NEW_LINE>try {<NEW_LINE>final LibvirtUtilitiesHelper libvirtUtilitiesHelper = libvirtComputingResource.getLibvirtUtilitiesHelper();<NEW_LINE>fi... | get(0).getBrName(); |
760,436 | public void onCompletion(Void result, Exception exception) {<NEW_LINE>callbackTracker.markOperationEnd();<NEW_LINE>if (exception == null) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>logger.trace("Forwarding {} to the IdConverter/Router", restMethod);<NEW_LINE>String receivedId = getRequestPath(restRequest).getOperationOr... | RestMethod restMethod = restRequest.getRestMethod(); |
62,121 | public static int serializeDouble(ByteBuf buf, double[] arr, int start, int end, int numBits) {<NEW_LINE>long startTime = System.currentTimeMillis();<NEW_LINE>if (numBits < 2 || numBits > 32 || (numBits & (numBits - 1)) != 0) {<NEW_LINE>numBits = 8;<NEW_LINE>LOG.error("Compression bits should be in {2,4,8,16,32}");<NEW... | 2, numBits - 1) - 1; |
586,469 | public static AuthResult authenticateIdentityCookie(KeycloakSession session, RealmModel realm, boolean checkActive) {<NEW_LINE>Cookie cookie = CookieHelper.getCookie(session.getContext().getRequestHeaders().getCookies(), KEYCLOAK_IDENTITY_COOKIE);<NEW_LINE>if (cookie == null || "".equals(cookie.getValue())) {<NEW_LINE>... | String tokenString = cookie.getValue(); |
413,406 | public void marshall(ParameterDefinition parameterDefinition, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (parameterDefinition == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(parameterDefinition.getAllo... | parameterDefinition.getMaxValue(), MAXVALUE_BINDING); |
206,127 | public Response<Void> deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw logger.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not val... | Utils.getValueFromIdByName(id, "videoAnalyzers"); |
1,663,497 | public void start() {<NEW_LINE>// Create the client object<NEW_LINE>ProcessorService service = new ProcessorServiceImpl();<NEW_LINE>// Register the handler<NEW_LINE>new ServiceBinder(vertx).setAddress("vertx.processor").register(ProcessorService.class, service);<NEW_LINE>Router <MASK><NEW_LINE>// Allow events for the d... | router = Router.router(vertx); |
1,304,068 | public static void zdemo7(int rows, int columns, boolean print) {<NEW_LINE>// for reliable benchmarks, call this method twice: once with small dummy parameters to "warm up" the jitter, then with your real work-load<NEW_LINE>System.out.println("\n\n");<NEW_LINE>System.out.println("now initializing... ");<NEW_LINE>final ... | .stop().display(); |
835,615 | protected Object validateUnion(DataElement element, UnionDataSchema schema, Object object) {<NEW_LINE>if (object == Data.NULL) {<NEW_LINE>if (schema.getTypeByMemberKey(DataSchemaConstants.NULL_TYPE) == null) {<NEW_LINE>addMessage(element, "null is not a member type of union %1$s", schema);<NEW_LINE>}<NEW_LINE>} else if... | validate(element, memberSchema, object); |
824,270 | protected void persistSendingMessage(EntityManager em, SendingMessage message, MessagePersistingContext context) throws FileStorageException {<NEW_LINE>boolean useFileStorage = config.isFileStorageUsed();<NEW_LINE>if (useFileStorage) {<NEW_LINE>byte<MASK><NEW_LINE>FileDescriptor contentTextFile = createBodyFileDescript... | [] bodyBytes = bodyTextToBytes(message); |
872,237 | // @Override<NEW_LINE>@Override<NEW_LINE>public void init(int WindowNo, FormFrame frame) {<NEW_LINE>if (s_instance != null) {<NEW_LINE><MASK><NEW_LINE>throw new AdempiereException("@de.metas.callcenter.FrontPanelAlreadyOpened@");<NEW_LINE>}<NEW_LINE>//<NEW_LINE>int checkIntervalSec = Services.get(ISysConfigBL.class).ge... | AEnv.showWindow(s_instance.m_frame); |
759,672 | public void decodeSelectionRowKeys(FacesContext context, DataTable table) {<NEW_LINE>Set<String> rowKeys = null;<NEW_LINE>ValueExpression selectionVE = table.getValueExpression(DataTableBase.PropertyKeys.selection.name());<NEW_LINE>if (selectionVE != null) {<NEW_LINE>Object selection = selectionVE.getValue(context.getE... | (table.getRowKey(selection)); |
636,997 | public ProviderResourceGroupRoles deleteProviderResourceGroupRoles(String tenantDomain, String provDomain, String provService, String resourceGroup, String auditRef) {<NEW_LINE>WebTarget target = base.path("/domain/{tenantDomain}/provDomain/{provDomain}/provService/{provService}/resourceGroup/{resourceGroup}").resolveT... | int code = response.getStatus(); |
692,669 | public void createIndex(String index, String type, String mapping, Integer shards, Integer replicas, String alias) {<NEW_LINE>RestHighLevelClient client = EsClientHolder.getClient();<NEW_LINE>boolean acknowledged = false;<NEW_LINE>CreateIndexRequest request = new CreateIndexRequest(index);<NEW_LINE>if (StringUtils.hasT... | alias(new Alias(alias)); |
1,285,475 | protected Collection<MonitoringDoc> doCollect(final MonitoringDoc.Node node, final long interval, final ClusterState clusterState) {<NEW_LINE>NodesStatsRequest request = new NodesStatsRequest("_local");<NEW_LINE>request.indices(FLAGS);<NEW_LINE>request.addMetrics(NodesStatsRequest.Metric.OS.metricName(), NodesStatsRequ... | request.timeout(getCollectionTimeout()); |
1,303,300 | public static double floatToDoubleUpper(float f) {<NEW_LINE>if (Float.isNaN(f)) {<NEW_LINE>return Double.NaN;<NEW_LINE>}<NEW_LINE>if (Float.isInfinite(f)) {<NEW_LINE>return f > 0 ? Double.POSITIVE_INFINITY : Double.longBitsToDouble(0xc7efffffffffffffL);<NEW_LINE>}<NEW_LINE>long bits = Double.doubleToRawLongBits((double... | ) Math.nextUp(f)); |
853,249 | public static HoodieTableMetaClient initTableAndGetMetaClient(Configuration hadoopConf, String basePath, Properties props) throws IOException {<NEW_LINE>LOG.info("Initializing " + basePath + " as hoodie table " + basePath);<NEW_LINE>Path basePathDir = new Path(basePath);<NEW_LINE>final FileSystem fs = FSUtils.getFs(bas... | Path(basePath, HoodieTableMetaClient.TEMPFOLDER_NAME); |
1,625,356 | public SwordContext doAuth(AuthCredentials authCredentials) throws SwordAuthException, SwordError, DSpaceSwordException {<NEW_LINE>// if there is no supplied username, then we should request a retry<NEW_LINE>if (authCredentials.getUsername() == null) {<NEW_LINE>throw new SwordAuthException(true);<NEW_LINE>}<NEW_LINE>//... | sc = auth.authenticate(authCredentials); |
1,177,563 | public JwtTokenForTest validateJWSToken(Page response) throws Exception {<NEW_LINE>String thisMethod = "validateJWSToken";<NEW_LINE>String jwtTokenString = BuilderHelpers.<MASK><NEW_LINE>Log.info(thisClass, thisMethod, "");<NEW_LINE>if (jwtTokenString == null) {<NEW_LINE>fail("Test failed to find the JWT in the builder... | extractJwtTokenFromResponse(response, JWTBuilderConstants.BUILT_JWT_TOKEN); |
1,278,571 | private void parseQueryCacheInternal(BeanDefinitionBuilder builder, Node node, String nodeName, String textContent) {<NEW_LINE>if ("predicate".equals(nodeName)) {<NEW_LINE>BeanDefinitionBuilder predicateBuilder = getPredicate(node, textContent);<NEW_LINE>builder.addPropertyValue("predicateConfig", predicateBuilder.getB... | builder.addPropertyValue("populate", textContent); |
834,706 | static byte[] decode_base64(String s, int maxolen) throws IllegalArgumentException {<NEW_LINE>StringBuilder rs = new StringBuilder();<NEW_LINE>int off = 0, slen = s.length(), olen = 0;<NEW_LINE>byte[] ret;<NEW_LINE>byte c1, c2, c3, c4, o;<NEW_LINE>if (maxolen <= 0)<NEW_LINE>throw new IllegalArgumentException("Invalid m... | s.charAt(off++)); |
1,377,890 | protected void sync() {<NEW_LINE>inSync = true;<NEW_LINE>WSDLComponent secBinding = null;<NEW_LINE>WSDLComponent topSecBinding = SecurityPolicyModelHelper.getSecurityBindingTypeElement(comp);<NEW_LINE>WSDLComponent protTokenKind = SecurityTokensModelHelper.getTokenElement(topSecBinding, ProtectionToken.class);<NEW_LINE... | , SecurityPolicyModelHelper.isEncryptSignature(bootPolicy)); |
1,140,847 | public void secureMessageEncrypt(String message, ReadableArray privateKey, ReadableArray publicKey, Callback successCallback, Callback errorCallback) {<NEW_LINE>if (privateKey == null || privateKey.size() == 0) {<NEW_LINE>errorCallback.invoke(privateKeyRequired);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (publicKey == nu... | = new SecureMessage(pvtKey, pubKey); |
1,169,950 | private void save(ServerIntFloatRow row, PSMatrixSaveContext saveContext, MatrixPartitionMeta meta, DataOutputStream out) throws IOException {<NEW_LINE>int startCol = <MASK><NEW_LINE>IntFloatVector vector = ServerRowUtils.getVector(row);<NEW_LINE>IntFloatElement element = new IntFloatElement();<NEW_LINE>if (vector.isDe... | (int) meta.getStartCol(); |
1,822,884 | public cn.wildfirechat.proto.WFCMessage.SetGroupManagerRequest buildPartial() {<NEW_LINE>cn.wildfirechat.proto.WFCMessage.SetGroupManagerRequest result = new cn.wildfirechat.proto.WFCMessage.SetGroupManagerRequest(this);<NEW_LINE>int from_bitField0_ = bitField0_;<NEW_LINE>int to_bitField0_ = 0;<NEW_LINE>if (((from_bitF... | bitField0_ = (bitField0_ & ~0x00000004); |
615,091 | public static BigDecimal convertBase(SetGetModel model, String DateName, String SourceAmtName, String AmtName, String changedColumnName) {<NEW_LINE>// If Currency changed, reset rate<NEW_LINE>if (changedColumnName != null && "C_Currency_ID".equalsIgnoreCase(changedColumnName)) {<NEW_LINE>model.set_AttrValue("CurrencyRa... | model.getCtx(), C_Currency_ID_To); |
1,423,785 | public void mutate() {<NEW_LINE>Mutation mutation = getMutation();<NEW_LINE>try {<NEW_LINE>context.getZooReaderWriter().mutateOrCreate(context.getZooKeeperRoot() + RootTable.ZROOT_TABLET, new byte[0], currVal -> {<NEW_LINE>// Earlier, it was checked that root tablet metadata did not exists. However the<NEW_LINE>// earl... | String json = rtm.toJson(); |
1,714,478 | public I_C_Print_Package createResponse(final I_C_Print_Package printPackage) {<NEW_LINE>final Properties envCtxToUse = InterfaceWrapperHelper.getCtx(printPackage);<NEW_LINE>// create/update information for Druck-Clients<NEW_LINE>final IPrintClientsBL printClientsBL = Services.get(IPrintClientsBL.class);<NEW_LINE>print... | , printClientsBL.getHostKeyOrNull(envCtxToUse)); |
339,683 | public ApiResponse<RegistrationInformationSubuser> registrationRegisterAccountSubuserWithHttpInfo(String userid) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'userid' is set<NEW_LINE>if (userid == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// create path and ... | throw new ApiException(400, "Missing the required parameter 'userid' when calling registrationRegisterAccountSubuser"); |
253,562 | public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws RestClientException {<NEW_LINE>Object postBody = null;<NEW_LINE>// verify the required parameter 'petId' is set<NEW_LINE>if (petId == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the requi... | LinkedMultiValueMap<String, String>(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.