idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,089,625 | @RequestMapping(value = "/alarm/{alarmId}", method = RequestMethod.DELETE)<NEW_LINE>@ResponseBody<NEW_LINE>public Boolean deleteAlarm(@ApiParam(value = ALARM_ID_PARAM_DESCRIPTION) @PathVariable(ALARM_ID) String strAlarmId) throws ThingsboardException {<NEW_LINE>checkParameter(ALARM_ID, strAlarmId);<NEW_LINE>try {<NEW_L... | deleteAlarm(getTenantId(), alarmId); |
1,722,977 | public static void lsfAnalysis(BaselineAdaptationSet fileSet, LsfFileHeader lsfParams, boolean isForcedAnalysis) throws IOException {<NEW_LINE>System.err.println("Starting LSF analysis...");<NEW_LINE>boolean bAnalyze;<NEW_LINE>for (int i = 0; i < fileSet.items.length; i++) {<NEW_LINE>bAnalyze = true;<NEW_LINE>if (!isFo... | [i].lsfFile, lsfParams); |
1,302,192 | public Sequence execute(final StaticContext sctx, final QueryContext ctx, final Sequence[] args) {<NEW_LINE>if (args.length != 2 && args.length != 3) {<NEW_LINE>throw new QueryException(new QNm("No valid arguments specified!"));<NEW_LINE>}<NEW_LINE>final XmlDBNode doc = ((XmlDBNode) args[0]);<NEW_LINE>final XmlNodeRead... | Item next = it.next(); |
122,943 | private List<ThemeFile> scan(@NonNull Path rootPath) {<NEW_LINE>Assert.notNull(rootPath, "Root path must not be null");<NEW_LINE>// Check file type<NEW_LINE>if (!Files.isDirectory(rootPath)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>try (Stream<Path> pathStream = Files.list(rootPath)) {<NEW_LINE>Li... | themeFiles = new LinkedList<>(); |
1,016,115 | private void initFileDownload(Resource file) {<NEW_LINE>filename = properties.get(<MASK><NEW_LINE>if (StringUtils.isNotEmpty(filename)) {<NEW_LINE>Resource fileContent = file.getChild(JcrConstants.JCR_CONTENT);<NEW_LINE>if (fileContent != null) {<NEW_LINE>ValueMap valueMap = fileContent.adaptTo(ValueMap.class);<NEW_LIN... | DownloadResource.PN_FILE_NAME, String.class); |
100,606 | public void transferAnnotations() {<NEW_LINE>if (atypeFactory instanceof GenericAnnotatedTypeFactory<?, ?, ?, ?>) {<NEW_LINE>GenericAnnotatedTypeFactory<?, ?, ?, ?> genericAtf = (GenericAnnotatedTypeFactory<?, ?, ?, ?>) atypeFactory;<NEW_LINE>for (AnnotationMirror contractAnno : genericAtf.getContractAnnotations(this))... | asMethodDeclaration().getType()); |
1,081,257 | private void processCommonGet(boolean appPasswordRequest, OAuth20Provider provider, HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>String[] clientIdAndSecret = extractClientIdAndSecretFromAuthHeader(request, response);<NEW_LINE>if (clientIdAndSecret != null && clientIdAndSecret[0] != null) {<NEW_L... | AuditConstants.AUDIT_OUTCOME, AuditConstants.SUCCESS); |
1,335,180 | private static boolean isShardingColumn(TableStat.Column column) {<NEW_LINE>if (null == column) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String columnName = column.getName();<NEW_LINE>boolean isSharding = false;<NEW_LINE>String table = column.getTable();<NEW_LINE>if (null == table) {<NEW_LINE>return false;<NEW_LINE... | StringUtil.equalsIgnoreCase(partitionCol, columnName); |
1,110,914 | public LengthInfo readLength() throws IOException {<NEW_LINE>int accumulator = 0;<NEW_LINE>int byteVal = read();<NEW_LINE>if (byteVal == -1) {<NEW_LINE>throw new EOFException("expecting length");<NEW_LINE>}<NEW_LINE>if (// short form 8.6.4<NEW_LINE>(byteVal & 0x80) == 0) {<NEW_LINE>debugPrint("Len (Short form): " + (by... | + Hex.toHexString(lengthInt)); |
184,720 | private JPanel create() {<NEW_LINE>labelNameChoices = new GhidraComboBox<>();<NEW_LINE>labelNameChoices.setName("label.name.choices");<NEW_LINE>GhidraComboBox<NamespaceWrapper> comboBox = new GhidraComboBox<>();<NEW_LINE>comboBox.setEnterKeyForwarding(true);<NEW_LINE>namespaceChoices = comboBox;<NEW_LINE>primaryCheckBo... | new JPanel(new BorderLayout()); |
1,083,632 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String loadTestName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (thi... | )).readOnly())); |
1,347,981 | final ListVirtualMFADevicesResult executeListVirtualMFADevices(ListVirtualMFADevicesRequest listVirtualMFADevicesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listVirtualMFADevicesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
466,755 | private void generateMessageSubclasses(Task task) throws ParserConfigurationException, SAXException, IOException, TransformerFactoryConfigurationError, TransformerException {<NEW_LINE>logInfo(task.getName() + ": generating message subclasses");<NEW_LINE>String outputDirectory = task.getOutputBaseDirectory() + "/" + tas... | transformer = createTransformer(task, "MessageSubclass.xsl"); |
1,793,195 | public GlobalReplicationGroupMember unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>GlobalReplicationGroupMember globalReplicationGroupMember = new GlobalReplicationGroupMember();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (c... | ().unmarshall(context)); |
1,321,069 | public void validate() {<NEW_LINE>if (applicationRuleCollections() != null) {<NEW_LINE>applicationRuleCollections().forEach(e -> e.validate());<NEW_LINE>}<NEW_LINE>if (natRuleCollections() != null) {<NEW_LINE>natRuleCollections().forEach(e -> e.validate());<NEW_LINE>}<NEW_LINE>if (networkRuleCollections() != null) {<NE... | e -> e.validate()); |
1,078,832 | final CreateChannelModeratorResult executeCreateChannelModerator(CreateChannelModeratorRequest createChannelModeratorRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createChannelModeratorRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | endClientExecution(awsRequestMetrics, request, response); |
1,577,626 | public Box find(CssContext cssCtx, int absX, int absY, boolean findAnonymous) {<NEW_LINE>PaintingInfo pI = getPaintingInfo();<NEW_LINE>if (pI != null && !pI.getAggregateBounds().contains(absX, absY)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Box result = null;<NEW_LINE>for (int i = 0; i < getInlineChildCount(); i++) ... | null, this) ? this : null; |
37,272 | protected KeycloakUriBuilder parseHierarchicalUri(String uriTemplate, Matcher match) {<NEW_LINE>boolean scheme = match.group(2) != null;<NEW_LINE>if (scheme)<NEW_LINE>this.scheme = match.group(2);<NEW_LINE>String authority = match.group(4);<NEW_LINE>if (authority != null) {<NEW_LINE>this.authority = null;<NEW_LINE>Stri... | at = host.indexOf('@'); |
456,846 | public void updateConfiguration(WatchedUpdateResult watchedUpdateResult) {<NEW_LINE>Map<String, Object> adds = watchedUpdateResult.getAdded();<NEW_LINE>if (adds != null) {<NEW_LINE>for (String add : adds.keySet()) {<NEW_LINE>if (add.startsWith(CONFIG_CSE_PREFIX)) {<NEW_LINE>String key = CONFIG_SERVICECOMB_PREFIX + add.... | , adds.get(add)); |
1,136,351 | static <F, T> Spliterator<T> map(Spliterator<F> fromSpliterator, Function<? super F, ? extends T> function) {<NEW_LINE>checkNotNull(fromSpliterator);<NEW_LINE>checkNotNull(function);<NEW_LINE>return new Spliterator<T>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean tryAdvance(Consumer<? super T> action) {<NEW_... | function.apply(fromElement))); |
1,532,036 | public void dump(MotionScene scene, int... ids) {<NEW_LINE>Set<Integer> keys = mConstraints.keySet();<NEW_LINE>HashSet<Integer> set;<NEW_LINE>if (ids.length != 0) {<NEW_LINE>set = new HashSet<Integer>();<NEW_LINE>for (int id : ids) {<NEW_LINE>set.add(id);<NEW_LINE>}<NEW_LINE>} else {<NEW_LINE>set = new HashSet<>(keys);... | layout.dump(scene, stringBuilder); |
619,433 | private static void tightenJumpsToTerminal(List<Op03SimpleStatement> statements, BlockIdentifier switchBlock, Op03SimpleStatement following, Op03SimpleStatement followingTrans) {<NEW_LINE>List<Op03SimpleStatement> tsource = ListFactory.<MASK><NEW_LINE>boolean acted = false;<NEW_LINE>for (Op03SimpleStatement source : ts... | newList(followingTrans.getSources()); |
846,441 | final ListBulkDeploymentDetailedReportsResult executeListBulkDeploymentDetailedReports(ListBulkDeploymentDetailedReportsRequest listBulkDeploymentDetailedReportsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listBulkDeploymentDetailedReportsRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Greengrass"); |
527,192 | public RouteCalculationResult recalculatePartOfflineRoute(RouteCalculationResult res, RouteCalculationParams params) {<NEW_LINE>RouteCalculationResult rcr = params.previousToRecalculate;<NEW_LINE>List<Location> locs = new ArrayList<Location>(rcr.getRouteLocations());<NEW_LINE>try {<NEW_LINE>int[] startI = new int[] { 0... | endI, rcr.getRouteDirections()); |
367,892 | public BatchRemoveFacetFromObject unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchRemoveFacetFromObject batchRemoveFacetFromObject = new BatchRemoveFacetFromObject();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | int originalDepth = context.getCurrentDepth(); |
860,278 | public ServiceResponse serviceImpl(Query call, HttpServletResponse response, Authorization rights, final JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>JSONObject result = new JSONObject(true);<NEW_LINE><MASK><NEW_LINE>result.put("message", "Error: Unable to reset Password");<NEW_LINE>String newpass ... | result.put("accepted", false); |
814,720 | public static DescribeImageFromFamilyResponse unmarshall(DescribeImageFromFamilyResponse describeImageFromFamilyResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeImageFromFamilyResponse.setRequestId(_ctx.stringValue("DescribeImageFromFamilyResponse.RequestId"));<NEW_LINE>Image image = new Image();<NEW_LINE>image.s... | (_ctx.stringValue("DescribeImageFromFamilyResponse.Image.ImageVersion")); |
1,697,197 | final GetMinuteUsageResult executeGetMinuteUsage(GetMinuteUsageRequest getMinuteUsageRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getMinuteUsageRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | endClientExecution(awsRequestMetrics, request, response); |
1,402,354 | // computes all divisions in input string<NEW_LINE>public static String division(String input) {<NEW_LINE>double num1 = 0, num2 = 0, ans = 0;<NEW_LINE>int b = 0, t1 = 0, t2 = 0;<NEW_LINE>String anstring = "";<NEW_LINE>String temp = "";<NEW_LINE>int count = 0;<NEW_LINE>while (b < input.length()) {<NEW_LINE>if (input.cha... | input, (b - 1)); |
1,795,620 | public void sendNotificationMsgToEdgeService(TenantId tenantId, EdgeId edgeId, EntityId entityId, String body, EdgeEventType type, EdgeEventActionType action) {<NEW_LINE>if (!edgesEnabled) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (type == null) {<NEW_LINE>if (entityId != null) {<NEW_LINE>type = EdgeUtils.getEdgeEventT... | EdgeNotificationMsgProto msg = builder.build(); |
1,745,024 | public PlanBean createPlan(String organizationId, NewPlanBean bean) throws OrganizationNotFoundException, PlanAlreadyExistsException, NotAuthorizedException, InvalidNameException {<NEW_LINE>securityContext.checkPermissions(PermissionType.planEdit, organizationId);<NEW_LINE>FieldValidator.<MASK><NEW_LINE>PlanBean newPla... | validateName(bean.getName()); |
1,417,546 | public boolean filter(CompilationInfo info, ComputeImports state) {<NEW_LINE>Map<String, List<Element>> candidates = state.candidates;<NEW_LINE>List<Element> left = null;<NEW_LINE>List<Element> right = null;<NEW_LINE>boolean leftReadOnly = false;<NEW_LINE>boolean rightReadOnly = false;<NEW_LINE>if (this.left.hasSecond(... | this.left.first()); |
1,688,440 | public String parseLineText(String line) {<NEW_LINE>if (line.startsWith("#")) {<NEW_LINE>Pattern aName = Pattern.compile("^#[A-Za-z0-9_]+ =$");<NEW_LINE>Matcher mN = aName.matcher(line);<NEW_LINE>if (mN.find()) {<NEW_LINE>return line.substring(1).split(" ")[0];<NEW_LINE>}<NEW_LINE>return "";<NEW_LINE>}<NEW_LINE>Matcher... | ), mL.end()); |
59,218 | private static void downloadLicense(URL licenseURL) {<NEW_LINE>assert remote2local != null;<NEW_LINE>File downloadDir = new File(System.getProperty("mary.downloadDir", "."));<NEW_LINE>String filename = licenseURL.toString().replace('/', '_').replace(':', '_');<NEW_LINE>File licenseFile = new File(downloadDir, filename)... | IOUtils.copy(in, out); |
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... | (Token) it.next(); |
347,397 | public static <T, R1, R2, R3, R> IterableX<R> forEach4(Iterable<T> host, final Function<? super T, ? extends Iterable<R1>> iterable1, final BiFunction<? super T, ? super R1, ? extends Iterable<R2>> iterable2, final Function3<? super T, ? super R1, ? super R2, ? extends Iterable<R3>> iterable3, final Function4<? super T... | , ina, inb, in2)); |
1,474,135 | public static DescribeHardwareTerminalsResponse unmarshall(DescribeHardwareTerminalsResponse describeHardwareTerminalsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeHardwareTerminalsResponse.setRequestId(_ctx.stringValue("DescribeHardwareTerminalsResponse.RequestId"));<NEW_LINE>List<HardwareTerminal> hardwareTe... | = new ArrayList<HardwareTypeDetail>(); |
728,104 | public void marshall(CreateLicenseConfigurationRequest createLicenseConfigurationRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createLicenseConfigurationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarsh... | createLicenseConfigurationRequest.getDescription(), DESCRIPTION_BINDING); |
186,161 | private static RelationshipGroupRecord readRelationshipGroupExtendedRecord(long id, ReadableChannel channel) throws IOException {<NEW_LINE>byte flags = channel.get();<NEW_LINE>boolean inUse = bitFlag(flags, Record.IN_USE.byteValue());<NEW_LINE>boolean requireSecondaryUnit = bitFlag(flags, Record.REQUIRE_SECONDARY_UNIT)... | long next = channel.getLong(); |
196,174 | public void createPack(ReadableMap options, final Promise promise) throws JSONException {<NEW_LINE>final String name = ConvertUtils.getString("name", options, "");<NEW_LINE>final OfflineManager offlineManager = RCTMGLOfflineModule.getOfflineManager(mReactContext);<NEW_LINE>LatLngBounds latLngBounds = getBoundsFromOptio... | metadataStr = options.getString("metadata"); |
1,188,474 | public Mat run(Mat inputMat, ImageBlob imageBlob) {<NEW_LINE><MASK><NEW_LINE>int origin_h = inputMat.height();<NEW_LINE>imageBlob.getReshapeInfo().put("resize", new int[] { origin_w, origin_h });<NEW_LINE>int im_size_max = Math.max(origin_w, origin_h);<NEW_LINE>int im_size_min = Math.min(origin_w, origin_h);<NEW_LINE>f... | int origin_w = inputMat.width(); |
758,775 | public static void teleportSpawnItem(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull ItemStack stack) {<NEW_LINE>EntityItem entity = new EntityItem(world, pos.getX() + .5, pos.getY() + .5, pos.<MASK><NEW_LINE>entity.setDefaultPickupDelay();<NEW_LINE>double origX = entity.posX, origY = MathHelper.clamp(entity.posY... | getZ() + .5, stack); |
1,790,458 | public static TensorInfo constructFromJavaArray(Object obj) throws OrtException {<NEW_LINE>Class<?<MASK><NEW_LINE>// Check if it's an array or a scalar.<NEW_LINE>if (!objClass.isArray()) {<NEW_LINE>// Check if it's a valid non-array type<NEW_LINE>OnnxJavaType javaType = OnnxJavaType.mapFromClass(objClass);<NEW_LINE>if ... | > objClass = obj.getClass(); |
1,152,920 | final PutDomainPermissionsPolicyResult executePutDomainPermissionsPolicy(PutDomainPermissionsPolicyRequest putDomainPermissionsPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(putDomainPermissionsPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,678,663 | public void run() {<NEW_LINE>if (isCancelled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (delegate instanceof AbstractFuture) {<NEW_LINE>AbstractFuture<? extends V> other = (AbstractFuture<? extends V>) delegate;<NEW_LINE>value = other.value;<NEW_LINE>throwable = other.throwable;<NEW_LINE>// don't copy the mayInterrup... | forceSetException(exception.getCause()); |
1,452,875 | public void updateBlock(GlowBlock block) {<NEW_LINE>if (isNearWater(block) || GlowBiomeClimate.isRainy(block)) {<NEW_LINE>// set this block as fully wet<NEW_LINE>block.setData((byte) 7);<NEW_LINE>} else if (block.getData() > 0) {<NEW_LINE>// if this block is wet, it becomes less wet<NEW_LINE>block.// if this block is w... | .setRawData((byte) 0); |
1,520,832 | public Value unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Value value = new Value();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (token == null)<NEW_LINE... | String currentParentElement = context.getCurrentParentElement(); |
697,544 | private static TsMethodModel createDeserializationGenericFunctionConstructor(SymbolTable symbolTable, TsModel tsModel, TsBeanModel bean) {<NEW_LINE>final Symbol beanIdentifier = symbolTable.getSymbol(bean.getOrigin());<NEW_LINE>List<TsType.GenericVariableType> typeParameters = getTypeParameters(bean.getOrigin());<NEW_L... | TsType.GenericReferenceType(beanIdentifier, typeParameters); |
1,804,126 | public void run() {<NEW_LINE>PwDatabase pm = mDb.pm;<NEW_LINE>byte[] backupKey = new byte[pm.masterKey.length];<NEW_LINE>System.arraycopy(pm.masterKey, 0, backupKey, 0, backupKey.length);<NEW_LINE>// Set key<NEW_LINE>try {<NEW_LINE>InputStream is = <MASK><NEW_LINE>pm.setMasterKey(mPassword, is);<NEW_LINE>} catch (Inval... | UriUtil.getUriInputStream(ctx, mKeyfile); |
1,799,106 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>// taking input array<NEW_LINE>System.out.println("Enter size of array:");<NEW_LINE><MASK><NEW_LINE>float[] arr = new float[size];<NEW_LINE>System.out.println("Enter array elements:");<NEW_LINE>for (int i = 0; i < size; i++)... | int size = sc.nextInt(); |
1,348,812 | public static IdentityCookieToken createIdentityToken(KeycloakSession keycloakSession, RealmModel realm, UserModel user, UserSessionModel session, String issuer) {<NEW_LINE>IdentityCookieToken token = new IdentityCookieToken();<NEW_LINE>token.id(KeycloakModelUtils.generateId());<NEW_LINE>token.issuedNow();<NEW_LINE>tok... | getInstance().randomBytes()); |
561,072 | public AsyncDocumentClient build() {<NEW_LINE>ifThrowIllegalArgException(this.serviceEndpoint == null || StringUtils.isEmpty(this.serviceEndpoint<MASK><NEW_LINE>ifThrowIllegalArgException(this.masterKeyOrResourceToken == null && (permissionFeed == null || permissionFeed.isEmpty()) && this.credential == null && this.tok... | .toString()), "cannot buildAsyncClient client without service endpoint"); |
1,578,507 | public void doMentionToSpeaker(Annotation doc) {<NEW_LINE>List<CoreMap> quotes = doc.get(CoreAnnotations.QuotationsAnnotation.class);<NEW_LINE>List<List<Pair<Integer, Integer>>> skipChains = new ArrayList<>();<NEW_LINE>// Pairs are (pred_idx, paragraph_idx)<NEW_LINE>List<Pair<Integer, Integer>> currChain = new ArrayLis... | quote = quotes.get(quote_idx); |
513,228 | public void changeToSlave(int brokerId) {<NEW_LINE>log.info("Begin to change to slave brokerName={} brokerId={}", brokerConfig.getBrokerName(), brokerId);<NEW_LINE>// change the role<NEW_LINE>// TO DO check<NEW_LINE>brokerConfig.setBrokerId(brokerId == 0 ? 1 : brokerId);<NEW_LINE>messageStoreConfig.setBrokerRole(Broker... | registerBrokerAll(true, true, true); |
410,748 | private Suggestions prefixLookup(final List<NamedIndexReader> readers, final SuggesterPrefixQuery suggesterQuery) {<NEW_LINE>BooleanWrapper partialResult = new BooleanWrapper();<NEW_LINE>List<LookupResultItem> results = readers.parallelStream().flatMap(namedIndexReader -> {<NEW_LINE>SuggesterProjectData data = projectD... | .name, item.value)); |
634,066 | public void uploadFromFileCodeSnippets() {<NEW_LINE>// BEGIN: com.azure.storage.file.datalake.DataLakeFileClient.uploadFromFile#String<NEW_LINE>try {<NEW_LINE>client.uploadFromFile(filePath);<NEW_LINE>System.out.println("Upload from file succeeded");<NEW_LINE>} catch (UncheckedIOException ex) {<NEW_LINE>System.err.prin... | client.uploadFromFile(filePath, overwrite); |
1,013,620 | public void onClick(View arg0) {<NEW_LINE>if (Authentication.didOnline || submission.getComments() != null) {<NEW_LINE>holder.title.setAlpha(0.65f);<NEW_LINE>holder.leadImage.setAlpha(0.65f);<NEW_LINE>holder.thumbimage.setAlpha(0.65f);<NEW_LINE>Intent i2 = new <MASK><NEW_LINE>i2.putExtra(CommentsScreen.EXTRA_PAGE, hold... | Intent(context, CommentsScreen.class); |
1,387,724 | public void refreshStatisticsForEntity(String name) {<NEW_LINE>log.debug("Refreshing statistics for entity " + name);<NEW_LINE>MetaClass metaClass = metadata.getExtendedEntities().getOriginalOrThisMetaClass(metadata.getClassNN(name));<NEW_LINE>String storeName = metadata.getTools().getStoreName(metaClass);<NEW_LINE>if ... | (Long) q.getSingleResult(); |
356,053 | private void printBoxedOperators() {<NEW_LINE>PrimitiveType primitiveType = env.typeUtil().unboxedType(typeElement.asType());<NEW_LINE>if (primitiveType == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>char binaryName = env.typeUtil().getSignatureName(primitiveType).charAt(0);<NEW_LINE>String <MASK><NEW_LINE>String capN... | primitiveName = TypeUtil.getName(primitiveType); |
461,309 | public GetAlarmsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetAlarmsResult getAlarmsResult = new GetAlarmsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | )).unmarshall(context)); |
1,453,910 | public static void main(String[] args) {<NEW_LINE>// Vector dot product<NEW_LINE>double[] x = { 2.0, 3.0, 4.0 };<NEW_LINE>double[] y = { 3.0, 2.0, 5.5 };<NEW_LINE>StdOut.println("Dot: " + dot(x, y));<NEW_LINE>// Matrix-matrix product<NEW_LINE>double[][] a = { { 1, 2 } };<NEW_LINE>double[][] b = { { 2, 3, 4 }, { 2, 3, 4... | k = mult(i, j); |
65,015 | public void run(final SyncTaskChain chain) {<NEW_LINE>final ApplianceVmAsyncHttpCallReply reply = new ApplianceVmAsyncHttpCallReply();<NEW_LINE>if (msg.isCheckStatus() && getSelf().getStatus() != ApplianceVmStatus.Connected) {<NEW_LINE>reply.setError(operr("appliance vm[uuid:%s] is in status of %s that cannot make http... | , msg.getPath())); |
1,238,174 | private PartialPath parseIntoPath(IoTDBSqlParser.IntoPathContext intoPathContext) {<NEW_LINE>int levelLimitOfSourcePrefixPath;<NEW_LINE>if (queryOp.isGroupByLevel()) {<NEW_LINE>levelLimitOfSourcePrefixPath = Arrays.stream(queryOp.getSpecialClauseComponent().getLevels()).max().getAsInt();<NEW_LINE>} else {<NEW_LINE>leve... | i] = "${" + i + "}"; |
229,840 | public FieldComparator<?> newComparator(String fieldname, int numHits, boolean enableSkipping, boolean reversed) {<NEW_LINE>assert indexFieldData == null || fieldname.<MASK><NEW_LINE>final long lMissingValue = (Long) missingObject(missingValue, reversed);<NEW_LINE>// NOTE: it's important to pass null as a missing value... | equals(indexFieldData.getFieldName()); |
1,400,977 | public SwaggerEntity swaggerJson() {<NEW_LINE>this.DEFINITION_MAP.clear();<NEW_LINE>List<ApiInfo> infos = requestMagicDynamicRegistry.mappings();<NEW_LINE>SwaggerEntity swaggerEntity = new SwaggerEntity();<NEW_LINE>swaggerEntity.setInfo(info);<NEW_LINE>swaggerEntity.setBasePath(this.basePath);<NEW_LINE>for (ApiInfo inf... | >> parameters = parseParameters(info); |
847,251 | private void processModuleReferenceTable(ModuleReferenceTable mrt, SegmentTable st, ImportedNameTable imp, Program program, SegmentedAddressSpace space, MessageLog log, TaskMonitor monitor) throws IOException {<NEW_LINE>int thunkBodySize = 4;<NEW_LINE>ExternalManager externalManager = program.getExternalManager();<NEW_... | e.getMessage() + '\n'); |
783,625 | private boolean reloadFromDB(Transaction tx) throws DynamicNamespacePrefixConflict {<NEW_LINE>Node nsPrefDefNode;<NEW_LINE>ResourceIterator<Node> namespacePrefixDefinitionNodes = tx.findNodes<MASK><NEW_LINE>if (namespacePrefixDefinitionNodes.hasNext()) {<NEW_LINE>nsPrefDefNode = namespacePrefixDefinitionNodes.next();<N... | (Label.label("_NsPrefDef")); |
610,782 | public List<ScoredItem<Term>> rescoreStatistics(List<Histogram<Term>> histograms, List<ScoredItem<Term>> initialScores) {<NEW_LINE>int termCount = histograms.get(0).size();<NEW_LINE>// TODO: use a priority queue<NEW_LINE>List<ScoredItem<Term>> scores = new ArrayList<>();<NEW_LINE>for (ScoredItem<Term> si : initialScore... | sqrt(term.order()); |
1,750,968 | public static void planarToBuffered_U8(Planar<GrayU8> src, DataBufferInt buffer, WritableRaster dst) {<NEW_LINE>if (src.getNumBands() != dst.getNumBands())<NEW_LINE>throw new IllegalArgumentException("Unequal number of bands src = " + src.getNumBands() + " dst = " + dst.getNumBands());<NEW_LINE>final int[] dstData = bu... | c3 = band3[indexSrc] & 0xFF; |
216,340 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {<NEW_LINE>if ("GET".equals(request.getMethod())) {<NEW_LINE>// Process input<NEW_LINE>boolean compact = Boolean.valueOf<MASK><NEW_LINE>boolean yaml = true;<NEW_LINE>response.setContentType(MIME_TEXT_PLAI... | (request.getParameter(QUERY_COMPACT)); |
1,208,725 | protected Sheet createSheet() {<NEW_LINE><MASK><NEW_LINE>Sheet.Set sheetSet = sheet.get(Sheet.PROPERTIES);<NEW_LINE>if (sheetSet == null) {<NEW_LINE>sheetSet = Sheet.createPropertiesSet();<NEW_LINE>sheet.put(sheetSet);<NEW_LINE>}<NEW_LINE>if (filter != null && (filter.equals(FileTypesByExtension.RootFilter.TSK_DOCUMENT... | Sheet sheet = super.createSheet(); |
783,147 | public boolean replaceHeader(Chain expected, Chain replacement) {<NEW_LINE>long suffixHead = chain + OffHeapChainStorageEngine.this.totalChainHeaderSize;<NEW_LINE>long prefixTail;<NEW_LINE>Iterator<Element> expectedIt = expected.iterator();<NEW_LINE>do {<NEW_LINE>if (!compare(expectedIt.next(), suffixHead)) {<NEW_LINE>... | hasNext() && suffixHead != chain); |
440,591 | public ProcessStatus restResetSetting(final PwmRequest pwmRequest) throws IOException, PwmUnrecoverableException {<NEW_LINE>final ConfigManagerBean configManagerBean = getBean(pwmRequest);<NEW_LINE>final StoredConfigurationModifier modifier = StoredConfigurationModifier.<MASK><NEW_LINE>final UserIdentity loggedInUser =... | newModifier(configManagerBean.getStoredConfiguration()); |
189,765 | private void commandWait(Shell shell, Command cmd) throws Exception {<NEW_LINE>while (!cmd.isFinished()) {<NEW_LINE>synchronized (cmd) {<NEW_LINE>try {<NEW_LINE>if (!cmd.isFinished()) {<NEW_LINE>cmd.wait(mTimeout);<NEW_LINE>}<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>log.error(e.getMessage());<NEW_LINE>}<NEW... | "Waiting for a command to be executed in a shell that is not executing and not reading! \n\n Command: {}", cmd.getCommand()); |
464,435 | protected void encodeData(FacesContext context, Chart chart) throws IOException {<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE>BubbleChartModel model = (BubbleChartModel) chart.getModel();<NEW_LINE>List<BubbleChartSeries> data = model.getData();<NEW_LINE>writer.write(",data:[[");<NEW_LINE>for ... | (s.getY())); |
1,250,094 | public PropertySource<?> locate(Environment environment) {<NEW_LINE>if (!(environment instanceof ConfigurableEnvironment)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>ConfigurableEnvironment env = (ConfigurableEnvironment) environment;<NEW_LINE>String applicationName = this.properties.getName();<NEW_LINE>if (!StringUti... | ConfigStore configStore = configStoreIterator.next(); |
1,624,391 | private static Object parserValue(SqlNode oriValue, SqlSystemVar key, ServerConnection c) {<NEW_LINE>Object value = IGNORE_VALUE;<NEW_LINE>if (oriValue instanceof SqlCharStringLiteral) {<NEW_LINE>value = RelUtils.stringValue(oriValue);<NEW_LINE>} else if (oriValue instanceof SqlNumericLiteral) {<NEW_LINE>value = ((<MAS... | SqlNumericLiteral) oriValue).getValue(); |
82,737 | final GetArtifactUrlResult executeGetArtifactUrl(GetArtifactUrlRequest getArtifactUrlRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getArtifactUrlRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,798,202 | private Map<String, String> parseInfos(String content) throws Exception {<NEW_LINE>Map<String, String> infosMap = new HashMap<String, String>();<NEW_LINE>JsonObject project = new JsonObject(content).getJSONObject("project");<NEW_LINE>if (project == null) {<NEW_LINE>return infosMap;<NEW_LINE>}<NEW_LINE>Object owner = pr... | infosMap.put("owner", null); |
190,012 | static int queryChunkTermfreq(Set<String> keywords, String contentID) throws KeywordSearchModuleException, NoOpenCoreException {<NEW_LINE>SolrQuery q = new SolrQuery();<NEW_LINE>q.setShowDebugInfo(DEBUG);<NEW_LINE>final String filterQuery = Server.Schema.ID.toString() + ":" + KeywordSearchUtil.escapeLuceneQuery(content... | document = results.get(0); |
1,410,213 | private void chooseSnapshot() {<NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE>// NOI18N<NEW_LINE>chooser.putClientProperty("JFileChooser.packageIsTraversable", "always");<NEW_LINE>chooser.setDialogTitle(// NOI18N<NEW_LINE>NbBundle.// NOI18N<NEW_LINE>getMessage(// NOI18N<NEW_LINE>JavaPlatformSelector.clas... | (f.getName())); |
920,984 | public void runVTTask(VtTask task) {<NEW_LINE>Program destinationProgram = getDestinationProgram();<NEW_LINE>SystemUtilities.assertTrue(destinationProgram != null, "How did we run a task with no destination program?");<NEW_LINE>// Not sure why this check is needed, but previously, it was in each of the VT tasks.<NEW_LI... | WrapperTask wrappedTask = new WrapperTask(task); |
447,192 | private void configWithMetadata(ODocument metadata) {<NEW_LINE>if (metadata != null) {<NEW_LINE>if (metadata.containsField(CONFIG_IGNORE_CHARS)) {<NEW_LINE>ignoreChars = metadata.field(CONFIG_IGNORE_CHARS);<NEW_LINE>}<NEW_LINE>if (metadata.containsField(CONFIG_INDEX_RADIX)) {<NEW_LINE>indexRadix = metadata.field(CONFIG... | (metadata.field(CONFIG_STOP_WORDS)); |
562,690 | private void processRows(IncrementalIndex index, BitmapFactory bitmapFactory, List<IncrementalIndex.DimensionDesc> dimensions) {<NEW_LINE>int rowNum = 0;<NEW_LINE>for (IncrementalIndexRow row : index.getFacts().persistIterable()) {<NEW_LINE>final Object[] dims = row.getDims();<NEW_LINE>for (IncrementalIndex.DimensionDe... | indexer.processRowValsToUnsortedEncodedKeyComponent(null, true); |
549,484 | public void handleRequest(Transaction transaction, Request<JsonObject> request) throws Exception {<NEW_LINE>Notification notif = null;<NEW_LINE>try {<NEW_LINE>switch(request.getMethod()) {<NEW_LINE>case ProtocolElements.ICECANDIDATE_METHOD:<NEW_LINE>notif = iceCandidate(transaction, request);<NEW_LINE>break;<NEW_LINE>c... | log.debug("Enqueued notification {}", notif); |
1,518,217 | public void publish(final String topic) throws TubeClientException {<NEW_LINE>checkServiceStatus();<NEW_LINE>StringBuilder sBuilder = new StringBuilder(512);<NEW_LINE>try {<NEW_LINE>logger.info(sBuilder.append("[Publish begin 1] publish topic ").append(topic).append(", address = ").append(this.toString()).toString());<... | 0, sBuilder.length()); |
306,573 | public Object list(HttpServletRequest request) throws Exception {<NEW_LINE>String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID);<NEW_LINE>String serviceName = WebUtils.required(request, CommonParams.SERVICE_NAME);<NEW_LINE>NamingUtils.checkServiceNameFormat(serviceN... | agent = WebUtils.getUserAgent(request); |
1,225,618 | public Sql[] generateSql(CreateDatabaseChangeLogTableStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) {<NEW_LINE><MASK><NEW_LINE>database.setObjectQuotingStrategy(ObjectQuotingStrategy.LEGACY);<NEW_LINE>try {<NEW_LINE>return new Sql[] { new UnparsedSql("CREATE TABLE " + database.escapeTableN... | ObjectQuotingStrategy currentStrategy = database.getObjectQuotingStrategy(); |
66,295 | public Request<DeleteLogGroupRequest> marshall(DeleteLogGroupRequest deleteLogGroupRequest) {<NEW_LINE>if (deleteLogGroupRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteLogGroupRequest)");<NEW_LINE>}<NEW_LINE>Request<DeleteLogGroupRequest> request = new DefaultRequ... | .toString(content.length)); |
1,069,223 | public static void viewHelpAndSupportInNewStack(@NonNull Context context, @NonNull Origin origin, @Nullable SiteModel selectedSite, @Nullable List<String> extraSupportTags) {<NEW_LINE>Map<String, String> properties = new HashMap<>();<NEW_LINE>properties.put("origin", origin.name());<NEW_LINE>AnalyticsTracker.track(Stat... | mainActivityIntent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); |
1,760,426 | public static void main(String[] args) {<NEW_LINE>String a = "923456789";<NEW_LINE>String b = "12345";<NEW_LINE>EditDistance solver = new EditDistance(a, b, 100, 4, 2);<NEW_LINE>System.out.println(solver.editDistance());<NEW_LINE>System.out.println(micahEditDistance(a, b, 100, 4, 2));<NEW_LINE>a = "12345";<NEW_LINE>b =... | println(solver.editDistance()); |
1,086,815 | final ListPageReceiptsResult executeListPageReceipts(ListPageReceiptsRequest listPageReceiptsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listPageReceiptsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | false), new ListPageReceiptsResultJsonUnmarshaller()); |
1,242,408 | public static void addToString(SourceBuilder code, Datatype datatype, Map<Property, PropertyCodeGenerator> generatorsByProperty, boolean forPartial) {<NEW_LINE>// This code is to ensure entry order is preserved.<NEW_LINE>// Specifically this code is boiler plate from Collectors.toMap.<NEW_LINE>// Except with a LinkedHa... | code, datatype, generatorsByProperty, typename); |
824,227 | static InvocationFrames computeChildTheadInvocation(InvocationFrames parent) {<NEW_LINE>InvocationFrames childFrames = new InvocationFrames();<NEW_LINE>InvocationFrames parentFrames = parent;<NEW_LINE>if (parentFrames != null && !parentFrames.isEmpty() && !parentFrames.isStartup()) {<NEW_LINE>// Get current invocation<... | setContainer(parentFrame.getContainer()); |
1,594,147 | void updateTopologyHandler(String topologyName, Config updateConfig) throws TopologyRuntimeManagementException, PackingException, UpdateDryRunResponse {<NEW_LINE>assert !potentialStaleExecutionData;<NEW_LINE>String <MASK><NEW_LINE>String newContainerNumber = updateConfig.getStringValue(RUNTIME_MANAGER_CONTAINER_NUMBER_... | newParallelism = updateConfig.getStringValue(RUNTIME_MANAGER_COMPONENT_PARALLELISM_KEY); |
889,951 | private void init() {<NEW_LINE>setLayout(new MigLayout("insets 0 0 0 0", "[grow,fill]", "[grow,fill]"));<NEW_LINE>mMapViewer.setOverlayPainter(mMapPainter);<NEW_LINE>mMapService.addListener(this);<NEW_LINE>TileFactoryInfo info = new OSMTileFactoryInfo();<NEW_LINE>DefaultTileFactory tileFactory = new DefaultTileFactory(... | setZoom(view.getZoom()); |
1,806,018 | private void pin(Watch watch, EditorUI eui, Line line) throws IndexOutOfBoundsException {<NEW_LINE>// just to be sure<NEW_LINE>Annotation ann = watchToAnnotation.remove(watch);<NEW_LINE>if (ann != null)<NEW_LINE>ann.detach();<NEW_LINE>JComponent frame = watchToWindow.remove(watch);<NEW_LINE>StickyWindowSupport stickyWi... | = new StickyPanel(watch, eui); |
764,895 | public void deserialize(ByteBuffer buffer) throws IllegalPathException {<NEW_LINE>// adapt to old version based on version mark<NEW_LINE>int length = buffer.getInt();<NEW_LINE>boolean isOldVersion = true;<NEW_LINE>if (length == PLAN_SINCE_0_14) {<NEW_LINE>length = buffer.getInt();<NEW_LINE>isOldVersion = false;<NEW_LIN... | add(buffer.getLong()); |
370,357 | // This was extracted the method above, because otherwise it is difficult to test what terms are included in<NEW_LINE>// the query in case a CoveringQuery is used (it does not have a getter to retrieve the clauses)<NEW_LINE>Tuple<List<BytesRef>, Map<String, List<byte[]>>> extractTermsAndRanges(IndexReader indexReader) ... | reader.terms(info.name); |
1,101,175 | public RegisteredClient build() {<NEW_LINE>Assert.hasText(this.clientId, "clientId cannot be empty");<NEW_LINE>Assert.notEmpty(this.authorizationGrantTypes, "authorizationGrantTypes cannot be empty");<NEW_LINE>if (this.authorizationGrantTypes.contains(AuthorizationGrantType.AUTHORIZATION_CODE)) {<NEW_LINE>Assert.<MASK>... | notEmpty(this.redirectUris, "redirectUris cannot be empty"); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.