idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
420,452 | protected HttpsRequestMessage parseMessageContent() {<NEW_LINE>HttpsRequestMessage message = new HttpsRequestMessage();<NEW_LINE>String request = parseStringTill((<MASK><NEW_LINE>String[] split = request.replaceAll("\r", " ").split(" ");<NEW_LINE>if (split.length != 3) {<NEW_LINE>throw new ParserException("Could not pa... | byte) 0x0A).trim(); |
919,027 | public Stream<SimilaritySummaryResult> overlap(@Name(value = "data", defaultValue = "null") List<Map<String, Object>> data, @Name(value = "config", defaultValue = "{}") Map<String, Object> config) {<NEW_LINE>ProcedureConfiguration configuration = ProcedureConfiguration.create(config);<NEW_LINE>CategoricalInput[] inputs... | configuration.get("writeRelationshipType", "NARROWER_THAN"); |
1,665,761 | synchronized public long write(JournalEntryType type, ComponentId componentId, ByteBuffer buffer) {<NEW_LINE>// Check buffer set right.<NEW_LINE>if (LOGGING) {<NEW_LINE>log("write@%-3d >> %s %s %s", position, type.name(), componentId == null ? "<null>" : componentId.label(), buffer == null ? "<null>" <MASK><NEW_LINE>}<... | : ByteBufferLib.details(buffer)); |
1,118,958 | public LongObjectHashMap<Long> measureGroupingOnSortedNumericDocValues() throws Exception {<NEW_LINE>var weight = searcher.createWeight(new MatchAllDocsQuery(<MASK><NEW_LINE>var leaf = searcher.getTopReaderContext().leaves().get(0);<NEW_LINE>var scorer = weight.scorer(leaf);<NEW_LINE>var docValues = DocValues.getSorted... | ), ScoreMode.COMPLETE_NO_SCORES, 1.0f); |
970,070 | public static void main(String[] arg) throws Exception {<NEW_LINE>// Change the value of bucket to the S3 bucket that contains your image file.<NEW_LINE>// Change the value of photo to your image file name.<NEW_LINE>String photo = "input.png";<NEW_LINE>String bucket = "bucket";<NEW_LINE>int height = 0;<NEW_LINE>int wid... | AmazonRekognition amazonRekognition = AmazonRekognitionClientBuilder.defaultClient(); |
1,287,632 | public static WritableComparable convertToWritableComparable(Object value, FieldSpec.DataType dataType) {<NEW_LINE>if (value instanceof Number) {<NEW_LINE>Number numberValue = (Number) value;<NEW_LINE>switch(dataType) {<NEW_LINE>case INT:<NEW_LINE>return new IntWritable(numberValue.intValue());<NEW_LINE>case LONG:<NEW_... | (Double.parseDouble(stringValue)); |
1,806,545 | public ColumnDraft addNodeColumn(String key, Class typeClass, boolean dynamic) {<NEW_LINE>key = key.toLowerCase().trim();<NEW_LINE>ColumnDraft column = nodeColumns.get(key);<NEW_LINE><MASK><NEW_LINE>if (column == null) {<NEW_LINE>int index = nodeColumns.size();<NEW_LINE>column = new ColumnDraftImpl(key, index, dynamic,... | typeClass = AttributeUtils.getStandardizedType(typeClass); |
237,953 | public static DescribeSavingsPlansCoverageTotalResponse unmarshall(DescribeSavingsPlansCoverageTotalResponse describeSavingsPlansCoverageTotalResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeSavingsPlansCoverageTotalResponse.setRequestId(_ctx.stringValue("DescribeSavingsPlansCoverageTotalResponse.RequestId"));<NE... | (_ctx.floatValue("DescribeSavingsPlansCoverageTotalResponse.Data.TotalCoverage.DeductAmount")); |
1,231,018 | private static JWTClaimsSet convert(JwtClaimsSet claims) {<NEW_LINE>JWTClaimsSet.Builder builder = new JWTClaimsSet.Builder();<NEW_LINE>// NOTE: The value of the 'iss' claim is a String or URL (StringOrURI).<NEW_LINE>Object issuer = claims.getClaim(JwtClaimNames.ISS);<NEW_LINE>if (issuer != null) {<NEW_LINE>builder.iss... | customClaims.forEach(builder::claim); |
1,131,987 | private org.python.types.Int validateValueType(org.python.Object value) {<NEW_LINE>if (value instanceof org.python.types.Int) {<NEW_LINE>return (org<MASK><NEW_LINE>} else if (value == null || value instanceof org.python.types.NoneType) {<NEW_LINE>return null;<NEW_LINE>} else {<NEW_LINE>org.python.Object index_object = ... | .python.types.Int) value; |
831,874 | private String renderTemplate(String configurationId, Map<String, Object> sidecarContext) throws RenderTemplateException {<NEW_LINE>Writer writer = new StringWriter();<NEW_LINE>String template;<NEW_LINE>final Map<String, Object> context = new HashMap<>();<NEW_LINE>context.put("sidecar", sidecarContext);<NEW_LINE>final ... | e.getMessage(), e); |
1,541,500 | public void log(Level logLevel, byte[] message, String remoteIP, String remotePort, String localIP, String localPort) {<NEW_LINE>if (!isEnabled(logLevel) || null == message) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>// [date] [level] [clientIP:port/serverIP:port] message<NEW_LINE>StringBuilder sb = new Stri... | length + message.length + 2); |
624,565 | private void registerImportErasePrefs() {<NEW_LINE>ArrayList<Preference> <MASK><NEW_LINE>preferences.add(findPreference("local_blacklist"));<NEW_LINE>preferences.add(findPreference("local_whitelist"));<NEW_LINE>preferences.add(findPreference("local_ipblacklist"));<NEW_LINE>preferences.add(findPreference("local_forwardi... | preferences = new ArrayList<>(); |
1,480,609 | @SuppressLint("WrongConstant")<NEW_LINE>public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>mProgressBar = view.findViewById(R.id.top_progress_bar);<NEW_LINE>mContinueButton = view.findViewById(R.id.button_continue);<NEW_LINE>mContinueButton.setOnClickListener(this);<NEW_LINE>S... | SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(bodyText); |
441,533 | public <T extends E> Indexed<T> append(T entry) {<NEW_LINE>// Store the entry index.<NEW_LINE>final long index = getNextIndex();<NEW_LINE>// Serialize the entry.<NEW_LINE>int position = buffer.position();<NEW_LINE>if (position + Integer.BYTES + Integer.BYTES > buffer.limit()) {<NEW_LINE>throw new BufferOverflowExceptio... | long checksum = crc32.getValue(); |
240,908 | private void fillContextMenu(IMenuManager manager) {<NEW_LINE>for (RunStateAction a : actions.getRunStateActions()) {<NEW_LINE>addVisible(manager, a);<NEW_LINE>}<NEW_LINE>addVisible(manager, actions.getOpenBrowserAction());<NEW_LINE>addVisible(manager, actions.getOpenNgrokAdminUi());<NEW_LINE>addVisible(manager, action... | .add(new Separator()); |
1,202,493 | private void addResourceRequest(Priority priority, String resourceName, Resource capability) {<NEW_LINE>Map<String, Map<Resource, ResourceRequest>> remoteRequests = this.remoteRequestsTable.get(priority);<NEW_LINE>if (remoteRequests == null) {<NEW_LINE>remoteRequests = new HashMap<String, Map<Resource, ResourceRequest>... | reqMap = remoteRequests.get(resourceName); |
5,176 | public void onSuccess(String[] returnValue) {<NEW_LINE>if (responseOffset == 0) {<NEW_LINE>keys = returnValue;<NEW_LINE>} else {<NEW_LINE>String[] k = new String[<MASK><NEW_LINE>Util.mergeArrays(keys, returnValue, k);<NEW_LINE>keys = k;<NEW_LINE>}<NEW_LINE>newRefreshRate();<NEW_LINE>cache.put("keyIndex", keys);<NEW_LIN... | keys.length + returnValue.length]; |
633,123 | DanglingChainMergeHelper generateCigarAgainstUpwardsReferencePath(final MultiDeBruijnVertex vertex, final int pruneFactor, final int minDanglingBranchLength, final boolean recoverAll, final SmithWatermanAligner aligner, final SWParameters danglingHeadSWParameters) {<NEW_LINE>// find the highest common descendant path b... | altBases = getBasesForPath(altPath, true); |
1,663,910 | private void updateUIAndNote(boolean doRefresh) {<NEW_LINE>if (mNoteId == null) {<NEW_LINE>showErrorToastAndFinish();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (doRefresh) {<NEW_LINE>setProgressVisible(true);<NEW_LINE>// here start the service and wait for it<NEW_LINE>NotificationsUpdateServiceStarter.startService(this, ... | note = NotificationsTable.getNoteById(mNoteId); |
238,879 | private void loadNode420() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_DefaultUserTokenGroup_TrustList_Write_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), LocalizedText.... | Object o = decoder.readVariantValue(); |
1,851,184 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>* @see javax.swing.text.DefaultCaret#paint(java.awt.Graphics)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void paint(Graphics g) {<NEW_LINE>JTextComponent comp = getComponent();<NEW_LINE>if (comp == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int dot = getDot();<NEW_LINE>Rectang... | , 1).charAt(0); |
753,428 | public void transformJson(HistoryJobEntity job, ObjectNode historicalData, CommandContext commandContext) {<NEW_LINE>HistoricCaseInstanceEntityManager historicCaseInstanceEntityManager = cmmnEngineConfiguration.getHistoricCaseInstanceEntityManager();<NEW_LINE>String id = getStringFromJson(historicalData, "id");<NEW_LIN... | (historicalData, CmmnAsyncHistoryConstants.FIELD_REFERENCE_TYPE)); |
1,108,775 | public void deserialize(DataInputStream input) throws IOException {<NEW_LINE>int featsFlag = StreamSerdeUtils.deserializeInt(input);<NEW_LINE>if (featsFlag > 0) {<NEW_LINE>feats = (IntFloatVector) StreamSerdeUtils.deserializeVector(input);<NEW_LINE>}<NEW_LINE>int neighborsFlag = StreamSerdeUtils.deserializeInt(input);<... | edgeTypes = StreamSerdeUtils.deserializeInts(input); |
21,061 | public void testAutoCompleteDependentFutures() throws Exception {<NEW_LINE>CountDownLatch beginLatch = new CountDownLatch(1);<NEW_LINE>CountDownLatch continueLatch = new CountDownLatch(1);<NEW_LINE>try {<NEW_LINE>BlockableSupplier<String> supplier = new BlockableSupplier<String<MASK><NEW_LINE>BlockableIncrementFunction... | >("testAutoCompleteDependentFutures", beginLatch, continueLatch); |
1,186,934 | private void createV1MutationQueue() {<NEW_LINE>ifTablesDontExist(new String[] { "mutation_queues", "mutations", "document_mutations" }, () -> {<NEW_LINE>// A table naming all the mutation queues in the system.<NEW_LINE>db.execSQL("CREATE TABLE mutation_queues (" + "uid TEXT PRIMARY KEY, " + "last_acknowledged_batch_id... | "uid TEXT, " + "batch_id INTEGER, " + "mutations BLOB, " + "PRIMARY KEY (uid, batch_id))"); |
727,557 | private static List<Caption> listCaptions(String videoId) throws IOException {<NEW_LINE>// Call the YouTube Data API's captions.list method to<NEW_LINE>// retrieve video caption tracks.<NEW_LINE>CaptionListResponse captionListResponse = youtube.captions().list("snippet", videoId).execute();<NEW_LINE>List<Caption> capti... | " - ID: " + caption.getId()); |
1,620,302 | private TornadoInstalledCode compileTask(SchedulableTask task) {<NEW_LINE>final CompilableTask executable = (CompilableTask) task;<NEW_LINE>final ResolvedJavaMethod resolvedMethod = TornadoCoreRuntime.getTornadoRuntime().resolveMethod(executable.getMethod());<NEW_LINE>final Sketch sketch = TornadoSketcher.lookup(resolv... | meta().getDeviceIndex()); |
1,237,817 | protected void configurePlot(Plot p, JRChartPlot jrPlot) {<NEW_LINE>RectangleInsets defaultPlotInsets = (RectangleInsets) <MASK><NEW_LINE>Paint defaultPlotOutlinePaint = (Paint) getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_OUTLINE_PAINT);<NEW_LINE>Stroke defaultPlotOutlineStroke = (Stroke) getDef... | getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_INSETS); |
1,732,889 | public EditorHighlighter createEditorHighlighter(@Nonnull VirtualFile vFile, @Nonnull EditorColorsScheme settings, @javax.annotation.Nullable Project project) {<NEW_LINE><MASK><NEW_LINE>if (fileType instanceof LanguageFileType) {<NEW_LINE>LanguageFileType substFileType = substituteFileType(((LanguageFileType) fileType)... | FileType fileType = vFile.getFileType(); |
497,854 | public ReviveModelResultRepresentation reviveProcessModelHistory(ModelHistory modelHistory, String userId, String newVersionComment) {<NEW_LINE>Model latestModel = modelRepository.<MASK><NEW_LINE>if (latestModel == null) {<NEW_LINE>throw new IllegalArgumentException("No process model found with id: " + modelHistory.get... | get(modelHistory.getModelId()); |
725,480 | protected void mergeLocations(RdbDeviceState original, IDeviceStateEventMergeRequest request) throws SiteWhereException {<NEW_LINE>if (request.getLocations().size() > 0) {<NEW_LINE>// Combine existing with new locations.<NEW_LINE>List<IDeviceLocation> all = new ArrayList<>();<NEW_LINE>List<RdbRecentLocationEvent> recen... | updated = new ArrayList<>(); |
1,187,025 | private Program doLoad(ByteProvider provider, String programName, DomainFolder programFolder, LoadSpec loadSpec, List<Option> options, MessageLog log, Object consumer, TaskMonitor monitor, Set<String> unprocessedLibraries) throws CancelledException, IOException {<NEW_LINE>LanguageCompilerSpecPair pair = loadSpec.getLan... | ExternalManager extMgr = program.getExternalManager(); |
937,427 | protected List findByUserId(String userId, int begin, int end, OrderByComparator obc) throws SystemException {<NEW_LINE>Session session = null;<NEW_LINE>try {<NEW_LINE>session = openSession();<NEW_LINE>StringBuffer query = new StringBuffer();<NEW_LINE>query.append("FROM PortletPreferences IN CLASS com.liferay.portal.ej... | (PortletPreferencesHBMUtil.model(portletPreferencesHBM)); |
1,024,443 | public Response keycloakInitiatedBrowserLogout(KeycloakSession session, UserSessionModel userSession, UriInfo uriInfo, RealmModel realm) {<NEW_LINE>String singleLogoutServiceUrl = getConfig().getSingleLogoutServiceUrl();<NEW_LINE>if (singleLogoutServiceUrl == null || singleLogoutServiceUrl.trim().equals(""))<NEW_LINE>r... | logoutRequest)).request(singleLogoutServiceUrl); |
883,795 | public void init(final NodeEngine nodeEngine, Properties properties) {<NEW_LINE>LockSupportService lockService = nodeEngine.getServiceOrNull(LockSupportService.SERVICE_NAME);<NEW_LINE>if (lockService != null) {<NEW_LINE>lockService.registerLockStoreConstructor(SERVICE_NAME, key -> {<NEW_LINE><MASK><NEW_LINE>final Multi... | String name = key.getObjectName(); |
901,787 | private void prepareWriteHeader(byte opCode, int payloadLength) {<NEW_LINE>//<NEW_LINE>// We need to prepare the frame header.<NEW_LINE>//<NEW_LINE>_writeBuffer.resize(_writeBufferSize, false);<NEW_LINE>_writeBuffer.limit(_writeBufferSize);<NEW_LINE>_writeBuffer.position(0);<NEW_LINE>//<NEW_LINE>// Set the opcode - thi... | .put((byte) payloadLength); |
1,495,253 | public boolean loadAll() {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>ListValue typeList = param.newList(ParamConstant.TYPE);<NEW_LINE>ListValue hashList = <MASK><NEW_LINE>for (Map.Entry<TextTypeEnum, Set<Integer>> e : typedHashes.entrySet()) {<NEW_LINE>String type = e.getKey().getTypeName();<NEW_LINE>Iterator<In... | param.newList(ParamConstant.HASH); |
1,525,935 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag, JsonElement jsonElement) throws Exception {<NEW_LINE>logger.debug(effectivePerson.getDistinguishedName());<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionR... | CacheManager.notify(Query.class); |
500,487 | public <AT> AT retrieveValue(final ResultSet rs, final String columnName, final Class<AT> returnType) throws SQLException {<NEW_LINE>final AT value;<NEW_LINE>if (returnType.isAssignableFrom(BigDecimal.class)) {<NEW_LINE>value = (AT) rs.getBigDecimal(columnName);<NEW_LINE>} else if (returnType.isAssignableFrom(Double.cl... | ts = rs.getTimestamp(columnName); |
1,346,376 | public static void removeAbilityBuff(@Nullable ItemStack itemStack) {<NEW_LINE>if (itemStack == null)<NEW_LINE>return;<NEW_LINE>if (!ItemUtils.canBeSuperAbilityDigBoosted(itemStack))<NEW_LINE>return;<NEW_LINE>// 1.13.2+ will have persistent metadata for this itemStack<NEW_LINE>ItemMetadataService itemMetadataService = ... | itemMeta.removeEnchant(Enchantment.DIG_SPEED); |
850,690 | static KeySpec pkcs1RsaKeySpec(byte[] bytes) {<NEW_LINE>try {<NEW_LINE>// fully qualified class names allow us to compile this without failure<NEW_LINE>sun.security.util.DerInputStream derReader = new sun.security.util.DerInputStream(bytes);<NEW_LINE>sun.security.util.DerValue[] seq = derReader.getSequence(0);<NEW_LINE... | seq[3].getBigInteger(); |
787,492 | public String processQuery(String entityName, List<String> valueProperties, String queryString, Sort sort) {<NEW_LINE>List<Sort.Order> orders = sort.getOrders();<NEW_LINE>if (orders.isEmpty()) {<NEW_LINE>return queryString;<NEW_LINE>}<NEW_LINE>Map<Sort.Direction, List<Sort.Order>> directions = orders.stream().collect(C... | () == Sort.Direction.ASC; |
1,184,164 | // Sleep invoke based on SLA<NEW_LINE>private long caclSleepTime(MockInfo info) {<NEW_LINE>double rMean = info.totalSleepTime.doubleValue() / info.callNum.get();<NEW_LINE>long sleepTime;<NEW_LINE>int n = ThreadLocalRandom.current().nextInt(1000);<NEW_LINE>long delta = (long) (rMean - info.mean + 1);<NEW_LINE>if (n < 90... | = delta > 0 ? 0 : sleepTime; |
768,567 | public static DescribeWebsiteScanResultDetailResponse unmarshall(DescribeWebsiteScanResultDetailResponse describeWebsiteScanResultDetailResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeWebsiteScanResultDetailResponse.setRequestId(_ctx.stringValue("DescribeWebsiteScanResultDetailResponse.RequestId"));<NEW_LINE>des... | = new ArrayList<ImageScanResult>(); |
34,392 | private Mono<PagedResponse<NetworkVirtualApplianceInner>> listSinglePageAsync(Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<NEW_LINE>if (this.client.getSubsc... | .nextLink(), null)); |
1,417,844 | private Archive requireStaticLibrary(BuildTarget baseTarget, ProjectFilesystem projectFilesystem, BuildRuleParams baseParams, ActionGraphBuilder graphBuilder, HaskellPlatformsProvider haskellPlatformsProvider, HaskellPlatform platform, HaskellLibraryDescriptionArg args, ImmutableSet<BuildRule> deps, Linker.LinkableDepT... | ))).isEmpty()); |
420,356 | public VirtualGatewayListenerTls unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>VirtualGatewayListenerTls virtualGatewayListenerTls = new VirtualGatewayListenerTls();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement()... | ().unmarshall(context)); |
1,637,918 | public Object evaluate(EditorAdaptor vim, Queue<String> command) {<NEW_LINE>if (command.isEmpty()) {<NEW_LINE>try {<NEW_LINE>new ListUserCommandsCommand().execute(vim);<NEW_LINE>} catch (CommandExecutionException e) {<NEW_LINE>vim.getUserInterfaceService().setErrorMessage(e.getMessage());<NEW_LINE>}<NEW_LINE>return nul... | += command.poll() + " "; |
1,612,591 | private void init() {<NEW_LINE>initFile(PhpUnitPreferences.isBootstrapEnabled(phpModule), PhpUnitPreferences.getBootstrapPath(phpModule), bootstrapCheckBox, bootstrapTextField);<NEW_LINE>bootstrapForCreateTestsCheckBox.setSelected(PhpUnitPreferences.isBootstrapForCreateTests(phpModule));<NEW_LINE>initFile(PhpUnitPrefer... | (phpModule), suiteCheckBox, suiteTextField); |
94,026 | public com.amazonaws.services.mediapackagevod.model.NotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.mediapackagevod.model.NotFoundException notFoundException = new com.amazonaws.services.mediapackagevod.model.NotFoundException(null);<NEW_LINE>i... | String currentParentElement = context.getCurrentParentElement(); |
1,305,676 | private void rescue(JMethod method) {<NEW_LINE>if (method == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (liveFieldsAndMethods.add(method)) {<NEW_LINE>membersToRescueIfTypeIsInstantiated.remove(method);<NEW_LINE>if (dependencyRecorder != null) {<NEW_LINE>curMethodStack.add(method);<NEW_LINE>dependencyRecorder.metho... | maybeRescueJavaScriptObjectPassingIntoJava(param.getType()); |
600,610 | public static RawTypeInstance loadRawTypeInstance(final SQLProvider provider, final INaviModule module, final Integer typeInstanceId) throws CouldntLoadDataException {<NEW_LINE>Preconditions.checkNotNull(provider, "Error: provider argument can not be null");<NEW_LINE>Preconditions.checkNotNull(module, "Error: module ar... | id = resultSet.getInt("id"); |
512,430 | private String md5String(String source, String salt, int iterator) {<NEW_LINE>StringBuilder token = new StringBuilder();<NEW_LINE>try {<NEW_LINE>MessageDigest <MASK><NEW_LINE>if (StringUtils.isNotEmpty(salt)) {<NEW_LINE>digest.update(salt.getBytes(StandardCharsets.UTF_8));<NEW_LINE>}<NEW_LINE>byte[] result = digest.dig... | digest = MessageDigest.getInstance("md5"); |
1,711,667 | private Iterable<String> queryStringIndex(final String key, final String prefix) throws DatastoreException {<NEW_LINE>List<ResultSetFuture> futures = queryClusters((cluster) -> {<NEW_LINE>BoundStatement boundStatement <MASK><NEW_LINE>boundStatement.setBytesUnsafe(0, serializeString(key));<NEW_LINE>boundStatement.setByt... | = new BoundStatement(cluster.psStringIndexPrefixQuery); |
1,326,496 | public Optional<RefundInvoiceCandidate> ofNullableRefundRecord(@Nullable final I_C_Invoice_Candidate refundRecord) {<NEW_LINE>final IUOMDAO uomDAO = Services.get(IUOMDAO.class);<NEW_LINE>final IProductDAO productDAO = Services.get(IProductDAO.class);<NEW_LINE>final IProductBL productBL = Services.get(IProductBL.class);... | getValueOverrideOrValue(refundRecord, I_C_Invoice_Candidate.COLUMNNAME_PriceActual); |
354,158 | public void start(Stage stage) {<NEW_LINE>this.stage = stage;<NEW_LINE>WorkspaceWindow workspaceWindow = new WorkspaceWindow();<NEW_LINE>workspaceWindow.readFromFile();<NEW_LINE>if (WorkspaceWindow.getWorkspace() == null) {<NEW_LINE>workspaceWindow.show(null);<NEW_LINE>}<NEW_LINE>if (WorkspaceWindow.getWorkspace() == n... | getMainToolBar().addToolBar(fileToolBar); |
1,248,556 | protected void makeKeepersOk(Long clusterDbId, Long shardDbId, Pair<String, Integer> newMaster) {<NEW_LINE>List<KeeperMeta> keepers = currentMetaManager.getSurviveKeepers(clusterDbId, shardDbId);<NEW_LINE>executionLog.info("[makeKeepersOk]" + keepers);<NEW_LINE>KeeperStateChangeJob job = new KeeperStateChangeJob(keeper... | "[makeKeepersOk]" + e.getMessage()); |
842,871 | private void logResponse(final ShenyuContext shenyuContext, final BodyWriter writer) {<NEW_LINE>if (StringUtils.isNotBlank(getHeaders().getFirst(HttpHeaders.CONTENT_LENGTH))) {<NEW_LINE>String size = StringUtils.defaultIfEmpty(getHeaders().getFirst(HttpHeaders.CONTENT_LENGTH), "0");<NEW_LINE>logInfo.setResponseContentL... | setRpcType(shenyuContext.getRpcType()); |
944,513 | private TypeDefPatch updateSubjectAreaDefinitionEntity() {<NEW_LINE>final String typeName = "SubjectAreaDefinition";<NEW_LINE>TypeDefPatch <MASK><NEW_LINE>typeDefPatch.setUpdatedBy(originatorName);<NEW_LINE>typeDefPatch.setUpdateTime(creationDate);<NEW_LINE>List<TypeDefAttribute> properties = new ArrayList<>();<NEW_LIN... | typeDefPatch = archiveBuilder.getPatchForType(typeName); |
216,559 | public Request<DeleteMessageRequest> marshall(DeleteMessageRequest deleteMessageRequest) {<NEW_LINE>if (deleteMessageRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteMessageRequest)");<NEW_LINE>}<NEW_LINE>Request<DeleteMessageRequest> request = new DefaultRequest<De... | , StringUtils.fromString(queueUrl)); |
817,315 | public static byte[] toByteArray(TbMsg msg) {<NEW_LINE>MsgProtos.TbMsgProto.Builder builder = MsgProtos.TbMsgProto.newBuilder();<NEW_LINE>builder.setId(msg.getId().toString());<NEW_LINE>builder.setTs(msg.getTs());<NEW_LINE>builder.setType(msg.getType());<NEW_LINE>builder.setEntityType(msg.getOriginator().getEntityType(... | getId().getLeastSignificantBits()); |
1,843,797 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>ImportModel model = bu... | throw new ExceptionAccessDenied(effectivePerson, query); |
647,213 | public JComponent createOptionsPanel() {<NEW_LINE>return OptionsComponent.create((component) -> {<NEW_LINE>component.addDropDown("PHPUnit version", PHP_UNIT_VERSION == null ? PhpUnitVersion.PHPUNIT80 : PHP_UNIT_VERSION, (version) -> PHP_UNIT_VERSION = (PhpUnitVersion) version);<NEW_LINE>component.addCheckbox("Promote d... | (isSelected) -> SUGGEST_TO_USE_ASSERTSAME = isSelected); |
421,227 | public Boolean visitBinary(BinaryTree node, Void p) {<NEW_LINE>int alignIndent = cs.alignMultilineBinaryOp() ? col : -1;<NEW_LINE>scan(node.getLeftOperand(), p);<NEW_LINE>if (cs.wrapAfterBinaryOps()) {<NEW_LINE>boolean containedNewLine = spaces(cs.spaceAroundBinaryOps() ? 1 : 0, false);<NEW_LINE>if (OPERATOR.equals(tok... | .token().length(); |
1,290,206 | public MultiPolygon toMultiPolygon() {<NEW_LINE>GeometryFactory geometryFactory = new GeometryFactory();<NEW_LINE>MultiPolygon emptyMultiPolygon = geometryFactory.createMultiPolygon(new Polygon[0]);<NEW_LINE>List<Polygon> polygons = new ArrayList<>();<NEW_LINE>for (Ring outerRing : outerRings) {<NEW_LINE>if (!outerRing... | new LinearRing[0]))); |
557,652 | private boolean matchProblem(Diagnostic problem, String expect) {<NEW_LINE>String[] <MASK><NEW_LINE>assertEquals(2, parts.length);<NEW_LINE>String badSnippet = parts[0];<NEW_LINE>String snippetBefore;<NEW_LINE>String snippetAfter;<NEW_LINE>String[] badParts = StringUtil.split(badSnippet, '^');<NEW_LINE>Assert.assertTru... | parts = expect.split("\\|"); |
894,726 | public CustomPluginFileDescription unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CustomPluginFileDescription customPluginFileDescription = new CustomPluginFileDescription();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | class).unmarshall(context)); |
1,431,546 | protected void checkExtendsImplements(ClassTree classTree) {<NEW_LINE>if (TypesUtils.isAnonymous(TreeUtils.typeOf(classTree))) {<NEW_LINE>// Don't check extends clause on anonymous classes.<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Set<AnnotationMirror> classBounds = atypeFactory.getTypeDeclarationBounds<MASK><NEW_LINE>Qual... | (TreeUtils.typeOf(classTree)); |
407,359 | // snippet-start:[pinpoint.java2.update_endpoint.main]<NEW_LINE>public static void updatePinpointEndpoint(PinpointClient pinpoint, String applicationId, String endPointId) {<NEW_LINE>try {<NEW_LINE>List<String> wangXiList = new ArrayList<String>();<NEW_LINE>wangXiList.add("cooking");<NEW_LINE>wangXiList.add("running");... | user(wangMajor).build(); |
1,451,021 | public void resize() {<NEW_LINE>if (((m_initialMovieHeight == -1 || m_initialMovieWidth == -1) && !m_isAudioOnly) || m_textureView == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Handler handler = new Handler(Looper.getMainLooper());<NEW_LINE>handler.post(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public vo... | currentParent = (View) getParent(); |
680,607 | public boolean optimize(int numIterations) {<NEW_LINE>int iterations;<NEW_LINE>double[] params = new double[maxable.getNumParameters()];<NEW_LINE>double[] gis = new double[maxable.getNumParameters()];<NEW_LINE>double[] old_params = new double[maxable.getNumParameters()];<NEW_LINE>double[] updates = new double[maxable.g... | plusEquals(params, updates, eta); |
1,560,198 | private void loadNode86() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.CertificateGroupFolderType_AdditionalGroup_Placeholder_TrustList_OpenWithMasks, new QualifiedName(0, "OpenWithMasks"), new LocalizedText("en", "OpenWithMasks"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.val... | .expanded(), true)); |
606,559 | private void parseTagkCustomRule() {<NEW_LINE>if (meta.getTags() == null || meta.getTags().isEmpty()) {<NEW_LINE>throw new IllegalStateException("Timeseries meta data was missing tags");<NEW_LINE>}<NEW_LINE>// first, find the tagk UIDMeta we're matching against<NEW_LINE>UIDMeta tagk = null;<NEW_LINE>for (UIDMeta tag : ... | getCustomField() + "] for rule: " + rule); |
22,492 | private String mergePathsRemoveDots(String basePath) {<NEW_LINE>int slash = basePath.lastIndexOf('/');<NEW_LINE>StringBuffer output = new StringBuffer();<NEW_LINE>if (slash != -1)<NEW_LINE>output.append(basePath.substring<MASK><NEW_LINE>if (base.dotsOK() && rel.dotsOK()) {<NEW_LINE>String relPath = rel.getRawPath();<NE... | (0, slash + 1)); |
487,708 | public org.apache.dubbo.remoting.ChannelHandler dispatch(org.apache.dubbo.remoting.ChannelHandler arg0, org.apache.dubbo.common.URL arg1) {<NEW_LINE>if (arg1 == null)<NEW_LINE>throw new IllegalArgumentException("url == null");<NEW_LINE>org.apache.dubbo.common.URL url = arg1;<NEW_LINE>String extName = url.getParameter("... | extension.dispatch(arg0, arg1); |
1,655,367 | public void addCurrencies() {<NEW_LINE>try {<NEW_LINE>InputStream is = mContext.getAssets().open("currency.json");<NEW_LINE>int size = is.available();<NEW_LINE>byte[] buffer = new byte[size];<NEW_LINE>is.read(buffer);<NEW_LINE>is.close();<NEW_LINE>s_ids_names = new String(buffer, "UTF-8");<NEW_LINE>} catch (IOException... | CurrencyConverterAdapter(CurrencyListViewActivity.this, currences_names); |
107,067 | public Clustering<Model> run(Relation<V> relation) {<NEW_LINE>final DBIDs ids = relation.getDBIDs();<NEW_LINE>final int size = ids.size();<NEW_LINE>// Domain of the database<NEW_LINE>this.domain = RelationUtil.computeMinMax(relation);<NEW_LINE>this.dim = domain[0].length;<NEW_LINE>this.offset = new double[dim];<NEW_LIN... | mergeClusterInformation(cellids, temporary, clusterids); |
592,569 | /*<NEW_LINE>Used to delete all data related to a filter criteria based on registryId, runId etc.<NEW_LINE>*/<NEW_LINE>@Action(name = "deleteAll")<NEW_LINE>@Nonnull<NEW_LINE>@WithSpan<NEW_LINE>public Task<RollbackResponse> deleteEntities(@ActionParam("registryId") @Optional String registryId, @ActionParam("dryRun") @Opt... | .getClass(), "deleteAll")); |
361,955 | protected void perform(RelOptRuleCall call, List<RexNode> leftFilters, List<RexNode> rightFilters, RelOptPredicateList relOptPredicateList) {<NEW_LINE>final LogicalSemiJoin logicalSemiJoin = (LogicalSemiJoin) call.rels[0];<NEW_LINE>final LogicalView leftView = (<MASK><NEW_LINE>final LogicalView rightView = (LogicalView... | LogicalView) call.rels[1]; |
1,140,102 | private void processMouseClickInLayout(RADComponent metacomp, MouseEvent e) {<NEW_LINE>if (formDesigner.getMenuEditLayer().isVisible()) {<NEW_LINE>if (!formDesigner.getMenuEditLayer().isMenuLayerComponent(metacomp)) {<NEW_LINE>formDesigner.getMenuEditLayer().hideMenuLayer();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>if (metacomp ... | processMouseClick(p, cont, contDelegate); |
1,678,684 | public void restoreState(Parcelable state, ClassLoader loader) {<NEW_LINE>if (state != null) {<NEW_LINE>Bundle bundle = (Bundle) state;<NEW_LINE>bundle.setClassLoader(loader);<NEW_LINE>mSavedState.clear();<NEW_LINE>mFragments.clear();<NEW_LINE>String lastMode = bundle.getString("mode", "");<NEW_LINE>if (!mode.equals(la... | mFragmentManager.getFragment(bundle, key); |
1,295,488 | public static void configure(LineReader reader, Reader r) throws IOException {<NEW_LINE>BufferedReader br;<NEW_LINE>if (r instanceof BufferedReader) {<NEW_LINE>br = (BufferedReader) r;<NEW_LINE>} else {<NEW_LINE>br = new BufferedReader(r);<NEW_LINE>}<NEW_LINE>reader.getVariables().putIfAbsent(LineReader.EDITING_MODE, "... | reader.setKeyMap(LineReader.MAIN); |
862,390 | public RelRoot optimizeRaQuery(String query, HeavyDBSchema schema) throws IOException {<NEW_LINE>ready();<NEW_LINE>RexBuilder builder <MASK><NEW_LINE>RelOptCluster cluster = RelOptCluster.create(new VolcanoPlanner(), builder);<NEW_LINE>CalciteCatalogReader catalogReader = createCatalogReader();<NEW_LINE>HeavyDBRelJsonR... | = new RexBuilder(getTypeFactory()); |
341,097 | private void applyMigration(final Function<String, ViewElementDefinition> currentElementSupplier, final Map<String, ViewMigration> newElementDefs, final MigrateElement migration) {<NEW_LINE>final ViewElementDefinition originalOldElement = currentElementSupplier.apply(migration.getOldGroup());<NEW_LINE>final ViewElement... | migration.getOldGroup(), oldElement); |
172,028 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see org.eclipse.draw2d.Label#paintFigure(org.eclipse.draw2d.Graphics)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void paint(Graphics graphics) {<NEW_LINE>int blue = getBackgroundColor().getBlue();<NEW_LINE>blue = (int) (blue - (blue * 0.20));<NEW_LINE>blue = blue >... | fillRoundRectangle(top, arcWidth, arcWidth); |
257,371 | public Condition createPredicateResourceId(@Nullable DbColumn theSourceJoinColumn, String theResourceName, List<List<IQueryParameterType>> theValues, SearchFilterParser.CompareOperation theOperation, RequestPartitionId theRequestPartitionId) {<NEW_LINE>Set<ResourcePersistentId> allOrPids = null;<NEW_LINE>SearchFilterPa... | resourceIds = ResourcePersistentId.toLongList(allOrPids); |
1,107,872 | static long readLongFast(ByteBuf buffer) {<NEW_LINE>int b = buffer.readByte();<NEW_LINE>long result = b & 0x7F;<NEW_LINE>if ((b & 0x80) != 0) {<NEW_LINE>b = buffer.readByte();<NEW_LINE>result |= (b & 0x7F) << 7;<NEW_LINE>if ((b & 0x80) != 0) {<NEW_LINE>b = buffer.readByte();<NEW_LINE>result |= (b & 0x7F) << 14;<NEW_LIN... | ) (b & 0x7F) << 28; |
452,346 | final DescribeProductAsAdminResult executeDescribeProductAsAdmin(DescribeProductAsAdminRequest describeProductAsAdminRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeProductAsAdminRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | (super.beforeMarshalling(describeProductAsAdminRequest)); |
1,338,723 | public static HashMap<String, Object> calculateLoanProvision(Properties ctx, int agreementId, Timestamp runningDate, String trxName) {<NEW_LINE>// Validate agreement<NEW_LINE>if (agreementId <= 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>HashMap<String, Object> returnValues = new HashMap<String, Object>();<NEW_LINE>... | MFMDunning.getById(ctx, dunningId); |
222,865 | final ListApplicationsResult executeListApplications(ListApplicationsRequest listApplicationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listApplicationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
405,451 | public void didRangeBeaconsInRegion(final Collection<Beacon> iBeacons, final Region region) {<NEW_LINE>threadPoolExecutor.execute(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>JSONObject data = new JSONObject();<NEW_LINE>JSONArray beaconData = new JSONArray();<NEW_LINE>for (Beacon beac... | data.put("eventType", "didRangeBeaconsInRegion"); |
763,925 | private void init() {<NEW_LINE>// WARNING: called from ctor so must not be overridden (i.e. must be private or final)<NEW_LINE>this.setLayout(new BorderLayout());<NEW_LINE>// MAIN PANEL<NEW_LINE>JPanel mainPanel = new JPanel();<NEW_LINE>Border margin = new EmptyBorder(10, 10, 5, 10);<NEW_LINE>Border margin2 = new Empty... | 10, 10, 5, 10); |
1,523,843 | private void extractTrackFromResultEntry(List<AudioTrack> tracks, Element element, Function<AudioTrackInfo, AudioTrack> trackFactory) {<NEW_LINE>Element durationElement = element.<MASK><NEW_LINE>Element contentElement = element.select(".yt-lockup-content").first();<NEW_LINE>String videoId = element.attr("data-context-i... | select("[class^=video-time]").first(); |
1,541,736 | private JPanel createStatusPanel() {<NEW_LINE>JLabel startLabel = new GLabel("Start:", SwingConstants.RIGHT);<NEW_LINE>JLabel endLabel = new GLabel("End:", SwingConstants.RIGHT);<NEW_LINE>JLabel offsetLabel = new GLabel("Offset:", SwingConstants.RIGHT);<NEW_LINE>JLabel insertionLabel = new GLabel("Insertion:", SwingCon... | new PairLayout(0, 5)); |
642,083 | private static byte[] fixupHeadZeros(byte[] array, int size) {<NEW_LINE><MASK><NEW_LINE>if (padding == 0) {<NEW_LINE>return array;<NEW_LINE>}<NEW_LINE>if (padding < 0) {<NEW_LINE>// There is one zero byte at the beginning, added by BigInteger to make there be a sign<NEW_LINE>// bit when converting to bytes.<NEW_LINE>ve... | int padding = size - array.length; |
944,919 | private void sendRequest(KeycloakDeployment deployment) {<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.trace(<MASK><NEW_LINE>}<NEW_LINE>HttpGet getMethod = new HttpGet(deployment.getJwksUrl());<NEW_LINE>try {<NEW_LINE>JSONWebKeySet jwks = HttpAdapterUtils.sendJsonHttpRequest(deployment, getMethod, JSONWebKeySet.cl... | "Going to send request to retrieve new set of realm public keys for client " + deployment.getResourceName()); |
1,834,424 | public Value nodeSetProperty(long node, int propertyKey, Value value) throws EntityNotFoundException, ConstraintValidationException {<NEW_LINE>assert value != NO_VALUE;<NEW_LINE>acquireExclusiveNodeLock(node);<NEW_LINE>ktx.assertOpen();<NEW_LINE>singleNode(node);<NEW_LINE>long[] labels = acquireSharedNodeLabelLocks();<... | hasRelatedSchema(labels, propertyKey, NODE); |
1,775,931 | protected AsyncNodeSelection<K, V> nodes(Predicate<RedisClusterNode> predicate, ClusterConnectionProvider.Intent intent, boolean dynamic) {<NEW_LINE>NodeSelectionSupport<RedisAsyncCommands<<MASK><NEW_LINE>StatefulRedisClusterConnectionImpl<K, V> impl = (StatefulRedisClusterConnectionImpl<K, V>) getConnection();<NEW_LIN... | K, V>, ?> selection; |
1,155,322 | final DBInstance executeCreateDBInstance(CreateDBInstanceRequest createDBInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createDBInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<CreateDBInsta... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.