idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
557,664 | private PO createOrLoadPO(final Properties ctx, final String tableName, final int recordId, final String trxName) {<NEW_LINE>final POInfo poInfo = POInfo.getPOInfo(tableName);<NEW_LINE>if (recordId > 0 && !poInfo.isSingleKeyColumnName()) {<NEW_LINE>log.<MASK><NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final Class<?> cla... | warn("Cannot retrieve by ID a multi-key record: table={}, recordId={}", tableName, recordId); |
481,066 | public Object convertDirectly(Object entityInstance) {<NEW_LINE>Neo4jPersistentEntity<?> sourceEntity = context.getRequiredPersistentEntity(entityInstance.getClass());<NEW_LINE>PersistentPropertyAccessor<Object> sourceAccessor = sourceEntity.getPropertyAccessor(entityInstance);<NEW_LINE>Neo4jPersistentEntity<?> targetE... | Assert.notNull(targetEntity, "Target entity could not be created for a DTO"); |
1,766,111 | private void appendCommon(final ResourceModel resourceModel, final ResourceSchema resourceSchema) {<NEW_LINE>// Set the entityType only when it is a UNSTRUCTURED_DATA base resource to avoid<NEW_LINE>// modifying all existing resources, which by default are STRUCTURED_DATA base.<NEW_LINE>if (ResourceEntityType.UNSTRUCTU... | > valueClass = resourceModel.getValueClass(); |
440,583 | public int compareTo(CursorResponseMessage other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetHeader(), other.isSetHeader());<NEW_LI... | this.cursorId, other.cursorId); |
903,792 | private static Pair<String, Integer> findScriptName(int start, CommonTokenStream tokens) {<NEW_LINE>String lastIdent = null;<NEW_LINE>int lastIdentIndex = 0;<NEW_LINE>for (int i = start; i < tokens.size(); i++) {<NEW_LINE>if (tokens.get(i).getType() == IDENT) {<NEW_LINE>lastIdent = tokens.get(i).getText();<NEW_LINE>las... | , Integer>(lastIdent, lastIdentIndex); |
700,527 | public synchronized void initRef() {<NEW_LINE>if (initialized.get()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>interfaceClass = (Class) Class.forName(interfaceClass.getName(), true, Thread.currentThread().getContextClassLoader());<NEW_LINE>} catch (ClassNotFoundException e) {<NEW_LINE>throw new MotanFramewo... | , interfaceClass.getName())); |
254,511 | protected boolean processSquare(GrayF32 square, Result result, double edgeInside, double edgeOutside) {<NEW_LINE>int off = (square.width - binaryInner.width) / 2;<NEW_LINE>square.subimage(off, off, off + binaryInner.width, off + binaryInner.width, grayNoBorder);<NEW_LINE>// convert input image into binary number<NEW_LI... | wordIdx] ^ data[wordIdx]); |
1,458,962 | private Component layouts() {<NEW_LINE>TabbedLayout tabbedLayout = TabbedLayout.create();<NEW_LINE>VerticalLayout fold = VerticalLayout.create();<NEW_LINE>fold.add(Label.create("Some label"));<NEW_LINE>fold.add(Button.create(LocalizeValue.localizeTODO("Some &Button"), (e) -> Alerts.okError("Clicked!").showAsync()));<NE... | (centerBtn).add(dockLayout); |
1,671,591 | public static ExampleMarketDataBuilder ofResource(String resourceRoot, ClassLoader classLoader) {<NEW_LINE>// classpath resources are forward-slash separated<NEW_LINE>String qualifiedRoot = resourceRoot;<NEW_LINE>qualifiedRoot = qualifiedRoot.startsWith("/") ? qualifiedRoot.substring(1) : qualifiedRoot;<NEW_LINE>qualif... | DirectoryMarketDataBuilder(file.toPath()); |
326,455 | final GetSnapshotLimitsResult executeGetSnapshotLimits(GetSnapshotLimitsRequest getSnapshotLimitsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSnapshotLimitsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,850,688 | public void populatePlaces(LatLng curLatLng, LatLng searchLatLng) {<NEW_LINE>final Observable<MapController.ExplorePlacesInfo> nearbyPlacesInfoObservable;<NEW_LINE>if (curLatLng == null) {<NEW_LINE>checkPermissionsAndPerformAction();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (searchLatLng.equals(lastFocusLocation) || las... | updateMapMarkers(explorePlacesInfo, isCurrentLocationMarkerVisible()); |
186,655 | public void mouseDragged(MouseEvent e) {<NEW_LINE>if (myLastPoint.isNull() || myPressPoint.isNull())<NEW_LINE>return;<NEW_LINE>PointerInfo info = MouseInfo.getPointerInfo();<NEW_LINE>if (info == null)<NEW_LINE>return;<NEW_LINE>final Point newPoint = info.getLocation();<NEW_LINE>Point p = myLastPoint.get();<NEW_LINE>fin... | uiWindow.getUserData(IdeFrame.KEY); |
39,570 | public SipAddress unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SipAddress sipAddress = new SipAddress();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE><MA... | JsonToken token = context.getCurrentToken(); |
978,025 | private static Dependency loadDependencyFromManifest(JarFile jarFile, String path) throws IOException {<NEW_LINE>Manifest manifest = jarFile.getManifest();<NEW_LINE>if (manifest != null) {<NEW_LINE><MASK><NEW_LINE>String name = attributes.getValue("implementation-title");<NEW_LINE>String version = attributes.getValue("... | Attributes attributes = manifest.getMainAttributes(); |
1,423,123 | protected TaskManager createTaskManagerImpl(TaskConfiguration taskConfig) {<NEW_LINE>MapWriterConfiguration configuration = new MapWriterConfiguration();<NEW_LINE>configuration.addOutputFile(getStringArgument(taskConfig, PARAM_OUTFILE, Constants.DEFAULT_PARAM_OUTFILE));<NEW_LINE>// must be set before loading tag mappin... | , PARAM_SIMPLIFICATION_FACTOR, Constants.DEFAULT_SIMPLIFICATION_FACTOR)); |
1,712,664 | public static ImmutableMap<Path, SourcePath> parseExportedHeaders(BuildTarget buildTarget, ActionGraphBuilder graphBuilder, ProjectFilesystem projectFilesystem, Optional<CxxPlatform> cxxPlatform, CxxLibraryDescription.CommonArg args) {<NEW_LINE>ImmutableMap.Builder<String, SourcePath> headers = ImmutableMap.builder();<... | args.getExportedPlatformHeaders()))); |
1,764,693 | String implIsValid() {<NEW_LINE>// test whether the selected folder on selected filesystem already exists<NEW_LINE>DataFolder lF = getLocationDataFolder();<NEW_LINE>if (lF == null)<NEW_LINE>// NOI18N<NEW_LINE>return NbBundle.<MASK><NEW_LINE>// target filesystem should be writable<NEW_LINE>if (!lF.getPrimaryFile().canWr... | getMessage(TemplateWizard2.class, "MSG_fs_or_folder_does_not_exist"); |
1,443,537 | public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) {<NEW_LINE>int action = event.getActionMasked();<NEW_LINE>if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_DOWN) {<NEW_LINE>int x = (int) event.getX();<NEW_LINE>int y = (int) event.getY();<NEW_LINE>x -= widget.getTotalP... | getSpanEnd(link[0])); |
602,579 | public List<ImageUrl> parseImages(String html, Chapter chapter) {<NEW_LINE>List<ImageUrl> list = new LinkedList<>();<NEW_LINE>String packed = StringUtils.match("eval(.*?)\\n", html, 1);<NEW_LINE>if (packed != null) {<NEW_LINE>String result = DecryptionUtils.evalDecrypt(packed);<NEW_LINE>String jsonString = StringUtils.... | parseLong(comicChapter + "000" + i); |
305,963 | public static LibDivideS16 libdivide_s16_gen(@NativeType("int16_t") short denom, @NativeType("struct libdivide_s16_t") LibDivideS16 __result) {<NEW_LINE>if (denom == 0) {<NEW_LINE>throw new IllegalArgumentException("divider must be != 0");<NEW_LINE>}<NEW_LINE>int magic, more;<NEW_LINE>int absD = denom < 0 ? -denom : de... | .magic((short) magic); |
350,331 | String formatSlackMessage(JsonObject kgResponse, String query) {<NEW_LINE>JsonObject attachmentJson = new JsonObject();<NEW_LINE>JsonObject responseJson = new JsonObject();<NEW_LINE>responseJson.addProperty("response_type", "in_channel");<NEW_LINE>responseJson.addProperty("text", String.format("Query: %s", query));<NEW... | ("description").getAsString()); |
590,418 | private boolean handleDataChange() throws Exception {<NEW_LINE>StateWrapper currentWrapper = stateRef.get();<NEW_LINE>StateWrapper notifyWrapper = notifyRef.get();<NEW_LINE>StateWrapper newWrapper = readCurrentContext();<NEW_LINE>traceLogWrappers(currentWrapper, notifyWrapper, newWrapper);<NEW_LINE>if (currentWrapper.v... | (notifyWrapper.version) : 0); |
1,125,418 | public PointSensitivityBuilder presentValueSensitivityRates(IborCapletFloorletPeriod period, RatesProvider ratesProvider, IborCapletFloorletVolatilities volatilities) {<NEW_LINE>validate(volatilities);<NEW_LINE>Currency currency = period.getCurrency();<NEW_LINE>if (ratesProvider.getValuationDate().isAfter(period.getPay... | double strike = period.getStrike(); |
1,383,407 | private void addEntryInternal(LedgerDescriptor handle, ByteBuf entry, boolean ackBeforeSync, WriteCallback cb, Object ctx, byte[] masterKey) throws IOException, BookieException, InterruptedException {<NEW_LINE>long ledgerId = handle.getLedgerId();<NEW_LINE>long entryId = handle.addEntry(entry);<NEW_LINE>bookieStats.get... | entry, ackBeforeSync, cb, ctx); |
1,715,175 | private synchronized LdapContext connect() {<NEW_LINE>LOGGER.log(Level.INFO, "Connecting to LDAP server {0} ", this);<NEW_LINE>if (errorTimestamp > 0 && errorTimestamp + interval > System.currentTimeMillis()) {<NEW_LINE>LOGGER.log(Level.WARNING, "LDAP server {0} is down", this.url);<NEW_LINE>close();<NEW_LINE>return nu... | .get(Context.PROVIDER_URL)); |
764,525 | private Dependency createDependency(Dependency parent, String source, final String name, String version, String repo) {<NEW_LINE>final Dependency dependency = new Dependency(parent.getActualFile(), true);<NEW_LINE>dependency.setEcosystem(DEPENDENCY_ECOSYSTEM);<NEW_LINE>dependency.setName(name);<NEW_LINE>dependency.setV... | withName(dependency.getName()); |
610,431 | /* (non-Javadoc)<NEW_LINE>* @see javax.jms.StreamMessage#writeBytes(byte[])<NEW_LINE>*/<NEW_LINE>public void writeBytes(byte[] x) throws JMSException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "writeBytes", x);<NEW_LINE>checkBodyWriteable("writeBytes");<NE... | c, 0, x.length); |
1,574,652 | private GetRouterMonitorResultsAnswer parseLinesForHealthChecks(GetRouterMonitorResultsCommand cmd, String executionResult) {<NEW_LINE>List<String> <MASK><NEW_LINE>StringBuilder monitorResults = new StringBuilder();<NEW_LINE>String[] lines = executionResult.trim().split("\n");<NEW_LINE>boolean readingFailedChecks = fal... | failingChecks = new ArrayList<>(); |
1,077,540 | //<NEW_LINE>ModelChange(timings = ModelValidator.TYPE_BEFORE_CHANGE, ifColumnsChanged = { I_M_ShipmentSchedule.COLUMNNAME_QtyTU_Calculated, I_M_ShipmentSchedule.COLUMNNAME_QtyTU_Override, I_M_ShipmentSchedule.COLUMNNAME_QtyOrdered_TU, I_M_ShipmentSchedule.COLUMNNAME_M_HU_PI_Item_Product_Calculated_ID, I_M_ShipmentSched... | getC_OrderLine(), I_C_OrderLine.class); |
1,704,574 | public void paintChart(Graphics g) {<NEW_LINE>synchronized (ChartModelBase.STATIC_MUTEX) {<NEW_LINE>// GanttGraphicArea.super.paintComponent(g);<NEW_LINE>ChartModel model = myChartModel;<NEW_LINE>model.setBottomUnitWidth(getViewState().getBottomUnitWidth());<NEW_LINE>var rowHeight = Math.max(model.calculateRowHeight(),... | getViewState().getTopTimeUnit()); |
1,235,485 | public void onMethodInitialized(ForestMethod method, LogHandler annotation) {<NEW_LINE>MetaRequest metaRequest = method.getMetaRequest();<NEW_LINE>if (metaRequest == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>LogConfiguration logConfiguration = metaRequest.getLogConfiguration();<NEW_LINE>if (logConfig... | ForestConfiguration configuration = method.getConfiguration(); |
528,319 | public final Object invoke(Object proxy, Method method, Object[] args) throws Throwable {<NEW_LINE>String methodName = method.getName();<NEW_LINE>Class<?>[] parameterTypes = method.getParameterTypes();<NEW_LINE>boolean sslEngineVariant = (parameterTypes.length > 0) && SSLEngine.class.equals(parameterTypes[parameterType... | (SSLEngine) args[1]); |
1,582,542 | protected void initParameters() throws UnsupportedEncodingException {<NEW_LINE>super.initParameters();<NEW_LINE><MASK><NEW_LINE>_concurrentInterBrokerPartitionMovements = ParameterUtils.concurrentMovements(_request, true, false);<NEW_LINE>_maxInterBrokerPartitionMovements = ParameterUtils.maxPartitionMovements(_request... | _dryRun = ParameterUtils.getDryRun(_request); |
941,143 | private void doPeerMasterAdjust() {<NEW_LINE>SequenceCommandChain sequenceCommandChain = new SequenceCommandChain(true);<NEW_LINE>peerMasterChanged.forEach((gid, nodeModified) -> {<NEW_LINE>Endpoint peerMaster = nodeModified.getNewNode();<NEW_LINE>logOperation(PEER_CHANGE, currentMaster, gid, nodeModified);<NEW_LINE>se... | gid, peerMaster, scheduled))); |
1,483,143 | private static void compareMethods(String contextPrefix, IBinaryMethod expectedMethod, IBinaryMethod actualMethod) {<NEW_LINE>// $NON-NLS-1$<NEW_LINE>contextPrefix = contextPrefix + "." + safeString(expectedMethod.getSelector());<NEW_LINE>compareAnnotations(contextPrefix, expectedMethod.getAnnotations(), actualMethod.g... | ), actualMethod.getDefaultValue()); |
119,464 | @Produces(MediaType.TEXT_PLAIN)<NEW_LINE>@ApiOperation(value = "<b>Simple check</b> feature toggle", response = Boolean.class)<NEW_LINE>@ApiResponses({ @ApiResponse(code = 200, message = "if feature is flipped"), @ApiResponse(code = 400, message = "Invalid parameter"), @ApiResponse(code = 404, message = "feature has no... | entity(errMsg).build(); |
530,872 | public Pair<Boolean, byte[]> execute(byte[] data) {<NEW_LINE>byte[] h = new byte[32];<NEW_LINE>byte[] v = new byte[32];<NEW_LINE>byte[] r = new byte[32];<NEW_LINE>byte[<MASK><NEW_LINE>DataWord out = null;<NEW_LINE>try {<NEW_LINE>System.arraycopy(data, 0, h, 0, 32);<NEW_LINE>System.arraycopy(data, 32, v, 0, 32);<NEW_LIN... | ] s = new byte[32]; |
572,634 | private void play(final Intent intent, final Promise promise) {<NEW_LINE>Activity currentActivity = getCurrentActivity();<NEW_LINE>if (currentActivity == null) {<NEW_LINE>promise.reject(E_ACTIVITY_DOES_NOT_EXIST, "Activity doesn't exist");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Store the promise to resolve/reject when... | currentActivity, REQ_RESOLVE_SERVICE_MISSING).show(); |
1,391,924 | protected void configure() {<NEW_LINE>bind(ManufOrderRepository.class).to(ManufOrderManagementRepository.class);<NEW_LINE>bind(OperationOrderRepository.class).to(OperationOrderManagementRepository.class);<NEW_LINE>bind(ProductionOrderService.class).to(ProductionOrderServiceImpl.class);<NEW_LINE>bind(BillOfMaterialServi... | ).to(StockRulesServiceProductionImpl.class); |
1,076,683 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static java.util.List<com.sun.jdi.InterfaceType> subinterfaces0(com.sun.jdi.InterfaceType a) {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCall... | .util.Collections.emptyList(); |
202,325 | final RegisterTargetWithMaintenanceWindowResult executeRegisterTargetWithMaintenanceWindow(RegisterTargetWithMaintenanceWindowRequest registerTargetWithMaintenanceWindowRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerTargetWithMaintenanceWindowRequest);<NEW_LINE>AWSRequestMetrics ... | endClientExecution(awsRequestMetrics, request, response); |
746,978 | final ListUserTagsResult executeListUserTags(ListUserTagsRequest listUserTagsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listUserTagsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListUserTags"); |
1,154,103 | private void tryProvisionGroups(List<CorpGroupSnapshot> corpGroups) {<NEW_LINE>log.debug(String.format("Attempting to provision groups with urns %s", corpGroups.stream().map(CorpGroupSnapshot::getUrn).collect(Collectors.toList())));<NEW_LINE>// 1. Check if this user already exists.<NEW_LINE>try {<NEW_LINE>final Set<Urn... | get(extractedGroup.getUrn()); |
1,507,054 | public static ListNodesResponse unmarshall(ListNodesResponse listNodesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listNodesResponse.setRequestId(_ctx.stringValue("ListNodesResponse.RequestId"));<NEW_LINE>listNodesResponse.setTotalCount(_ctx.integerValue("ListNodesResponse.TotalCount"));<NEW_LINE>listNodesResponse.se... | ("ListNodesResponse.Nodes[" + i + "].TotalResources.Cpu")); |
414,762 | static BeanDefinitionBuilder configure(Element element, boolean expectReply, ParserContext parserContext) {<NEW_LINE>BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(FileWritingMessageHandlerFactoryBean.class);<NEW_LINE>String directory = element.getAttribute("directory");<NEW_LINE>String dir... | setValueIfAttributeDefined(builder, element, "auto-create-directory"); |
1,398,378 | public void unregister(URL url) {<NEW_LINE>super.unregister(url);<NEW_LINE>removeFailedRegistered(url);<NEW_LINE>removeFailedUnregistered(url);<NEW_LINE>try {<NEW_LINE>// Sending a cancellation request to the server side<NEW_LINE>doUnregister(url);<NEW_LINE>} catch (Exception e) {<NEW_LINE>Throwable t = e;<NEW_LINE>// ... | t.getMessage(), t); |
646,929 | final DescribeAuditTaskResult executeDescribeAuditTask(DescribeAuditTaskRequest describeAuditTaskRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAuditTaskRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeAuditTask"); |
547,983 | public static ClientMessage encodeRequest(java.lang.String name, long startSequence, int minSize, int maxSize, @Nullable com.hazelcast.internal.serialization.Data predicate, @Nullable com.hazelcast.internal.serialization.Data projection) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE... | initialFrame.content, REQUEST_MAX_SIZE_FIELD_OFFSET, maxSize); |
643,085 | final AssumeRoleResult executeAssumeRole(AssumeRoleRequest assumeRoleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(assumeRoleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,244,917 | private static void startApi(CommandLineArgs args, Server server) {<NEW_LINE>// Get database properties and ensure that the version is compatible.<NEW_LINE>DatabaseProperties dbProperties = new DatabaseProperties();<NEW_LINE>server.loadFromDatabase(dbProperties);<NEW_LINE>if (args.getLanguages().length > 0) {<NEW_LINE>... | update()).start(); |
773,603 | protected void parse() {<NEW_LINE>showTabNames = getBoolean(SHOW_TEXT_ICONS, true);<NEW_LINE>processImages = getInt(PROCESS_IMAGES, 0);<NEW_LINE>// No default<NEW_LINE>configLocale = getString(LOCALE, null);<NEW_LINE>locale = getString(LOCALE, DEFAULT_LOCALE);<NEW_LINE>useSystemsLocaleForFormat = getBoolean(USE_SYSTEMS... | brkPanelViewOption = getInt(BRK_PANEL_VIEW_OPTION, 0); |
1,399,739 | public static <T extends TokenId> StringBuilder appendTokenList(StringBuilder sb, TokenList<T> tokenList, int currentIndex, int startIndex, int endIndex, boolean appendEmbedded, int indent, boolean dumpTokenText) {<NEW_LINE>if (sb == null) {<NEW_LINE>sb = new StringBuilder(200);<NEW_LINE>}<NEW_LINE>TokenHierarchy<?> to... | ArrayUtilities.appendSpaces(sb, indent); |
908,160 | private void checkAuthWithoutAuthInfo(String command) throws DdlException {<NEW_LINE>Database db = Catalog.getCurrentCatalog().getDbOrDdlException(dbId);<NEW_LINE>// check auth<NEW_LINE>try {<NEW_LINE>Set<MASK><NEW_LINE>if (tableNames.isEmpty()) {<NEW_LINE>// forward compatibility<NEW_LINE>if (!Catalog.getCurrentCatalo... | <String> tableNames = getTableNames(); |
1,755,264 | private static IntFloatVector deserializeIntFloatVector(ByteBuf in, long dim) {<NEW_LINE>int storageType = deserializeInt(in);<NEW_LINE>switch(storageType) {<NEW_LINE>case DENSE_STORAGE_TYPE:<NEW_LINE>return VFactory.denseFloatVector(deserializeFloats(in));<NEW_LINE>case SPARSE_STORAGE_TYPE:<NEW_LINE>int len = deserial... | throw new UnsupportedOperationException("Unsupport storage type " + storageType); |
275,573 | public BeamSqlTable buildBeamSqlTable(Table tableDefinition) {<NEW_LINE><MASK><NEW_LINE>try {<NEW_LINE>RowJson.RowJsonDeserializer deserializer = RowJson.RowJsonDeserializer.forSchema(getSchemaIOProvider().configurationSchema()).withNullBehavior(RowJson.RowJsonDeserializer.NullBehavior.ACCEPT_MISSING_OR_NULL);<NEW_LINE... | JSONObject tableProperties = tableDefinition.getProperties(); |
729,919 | private void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {<NEW_LINE>// check for switch or exit request<NEW_LINE>if (requiresSwitchUser(request)) {<NEW_LINE>// if set, attempt switch and store original<NEW_LINE>try {<NEW_LINE>Authentication ... | .format("Set SecurityContextHolder to %s", targetUser)); |
243,372 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_viewpagertab);<NEW_LINE>setSupportActionBar((Toolbar) findViewById<MASK><NEW_LINE>mHeaderView = findViewById(R.id.header);<NEW_LINE>ViewCompat.setElevation(mHeaderView, getResource... | (R.id.toolbar)); |
1,459,379 | static PCollection<DomainNameInfo> readFromCloudSql(Pipeline pipeline) {<NEW_LINE>Read<Object[], KV<String, String>> read = RegistryJpaIO.read("select d.repoId, r.emailAddress from Domain d join Registrar r on" + " d.currentSponsorClientId = r.clientIdentifier where r.type = 'REAL' and" + <MASK><NEW_LINE>return pipelin... | " d.deletionTime > now()", false, Spec11Pipeline::parseRow); |
793,183 | private void paintAxisXBottom(final Graphics g2d) {<NEW_LINE>final Chart2D chart = this.getAccessor().getChart();<NEW_LINE>int tmp = 0;<NEW_LINE>final FontMetrics fontdim = g2d.getFontMetrics();<NEW_LINE>final int fontheight = fontdim.getHeight();<NEW_LINE>final int xAxisStart = chart.getXChartStart();<NEW_LINE>final i... | setColor(chart.getGridColor()); |
631,359 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String circuitName, String peeringName, String connectionName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is r... | error(new IllegalArgumentException("Parameter peeringName is required and cannot be null.")); |
1,313,427 | private static void buildCountryCodesList() {<NEW_LINE>if (null == mCountryCodes) {<NEW_LINE>Locale applicationLocale = VectorLocale.INSTANCE.getApplicationLocale();<NEW_LINE>// retrieve the ISO country code<NEW_LINE>String[<MASK><NEW_LINE>List<Pair<String, String>> countryCodes = new ArrayList<>();<NEW_LINE>// retriev... | ] isoCountryCodes = Locale.getISOCountries(); |
49,022 | final ListDataSourcesResult executeListDataSources(ListDataSourcesRequest listDataSourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDataSourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
1,209,954 | ProcessResult process(String className, ClassNode classNode) {<NEW_LINE>if (!MixinEnvironment.getCompatibilityLevel().supports(LanguageFeatures.METHODS_IN_INTERFACES) || !this.accessorMixins.containsKey(className)) {<NEW_LINE>return ProcessResult.NONE;<NEW_LINE>}<NEW_LINE>MixinInfo mixin = this.accessorMixins.get(class... | methodNode.getVisibleAnnotation(Invoker.class); |
244,478 | private STNode parseTemplateContentAsXML() {<NEW_LINE>// Separate out the interpolated expressions to a queue. Then merge the string content using '${}'.<NEW_LINE>// These '&{}' are used to represent the interpolated locations. XML parser will replace '&{}' with<NEW_LINE>// the actual interpolated expression, while bui... | from(xmlStringBuilder.toString()); |
1,383,287 | final DescribeAssetResult executeDescribeAsset(DescribeAssetRequest describeAssetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeAssetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,800,632 | void removeListener(AllocationListener l) {<NEW_LINE>CompilerAsserts.neverPartOfCompilation();<NEW_LINE>boolean hasListeners = true;<NEW_LINE>synchronized (this) {<NEW_LINE>final int len = listeners.length;<NEW_LINE>if (len == 1) {<NEW_LINE>if (listeners[0] == l) {<NEW_LINE>listeners = null;<NEW_LINE>hasListeners = fal... | copyOfRange(listeners, 1, len); |
1,526,750 | private File fetchFile(OrderType orderType, EbicsUser user, EbicsProduct product, Date start, Date end, String fileFormat) throws AxelorException {<NEW_LINE>EbicsSession session = new EbicsSession(user);<NEW_LINE>File file = null;<NEW_LINE>try {<NEW_LINE>boolean test = isTest(user);<NEW_LINE>if (test) {<NEW_LINE>sessio... | FileTransfer transferManager = new FileTransfer(session); |
1,542,590 | public void visit(CurrencyConverter converter, CalculationLineItem.ValuationAtStart item) {<NEW_LINE>Money valuation = item.getValue();<NEW_LINE>SecurityPosition position = item.getSecurityPosition().orElseThrow(IllegalArgumentException::new);<NEW_LINE>long amount = converter.convert(item.getDateTime(<MASK><NEW_LINE>Tr... | ), valuation).getAmount(); |
157,826 | public void execute(DiagramHandler handler) {<NEW_LINE>super.execute(handler);<NEW_LINE>GridElement gridElement = Main.getInstance().getEditedGridElement();<NEW_LINE>// select grid element if nothing is selected<NEW_LINE>if (gridElement == null) {<NEW_LINE>SelectorOld selector = CurrentGui.getInstance().getGui().getCur... | getTextComponent().setCaretPosition(_newCaret); |
1,587,313 | public static TlsConfig extractTlsConfig(PinotConfiguration pinotConfig, String namespace, TlsConfig defaultConfig) {<NEW_LINE>TlsConfig tlsConfig = new TlsConfig(defaultConfig);<NEW_LINE>tlsConfig.setClientAuthEnabled(pinotConfig.getProperty(key(namespace, CLIENT_AUTH_ENABLED)<MASK><NEW_LINE>tlsConfig.setKeyStoreType(... | , defaultConfig.isClientAuthEnabled())); |
1,413,298 | public void fillProcessQueueInfo(final ProcessQueueInfo info) {<NEW_LINE>try {<NEW_LINE>this.treeMapLock.readLock().lockInterruptibly();<NEW_LINE>if (!this.msgTreeMap.isEmpty()) {<NEW_LINE>info.setCachedMsgMinOffset(this.msgTreeMap.firstKey());<NEW_LINE>info.setCachedMsgMaxOffset(<MASK><NEW_LINE>info.setCachedMsgCount(... | this.msgTreeMap.lastKey()); |
680,692 | public void basicCancel(final String consumerTag) throws IOException {<NEW_LINE>final Consumer originalConsumer = _consumers.get(consumerTag);<NEW_LINE>if (originalConsumer == null) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Method m = new Basic.Cancel(consumerTag, false);<NEW_LINE>BlockingRpcContinua... | LOGGER.warn("Tried to cancel consumer with unknown tag {}", consumerTag); |
348,358 | public void multiSet(final List<HippyStorageKeyValue> keyValues, final Callback<Void> callback) {<NEW_LINE>execute(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>try {<NEW_LINE>SQLiteDatabase database = mSQLiteHelper.getDatabase();<NEW_LINE>if (database == null) {<NEW_LINE>callback.... | + mSQLiteHelper.getTableName() + " VALUES (?, ?);"; |
54,455 | private void printSession(RestSession session) {<NEW_LINE>ln(" session id: %s", session.getId());<NEW_LINE>ln(" attempt id: %s", session.getLastAttempt().transform(a -> String.valueOf(a.getId())).or(""));<NEW_LINE>ln(" uuid: %s", session.getSessionUuid());<NEW_LINE>ln(" project: %s", session.getProject().getName())... | )).or("")); |
1,353,322 | public void initDriverSettings(JDBCSession session, JDBCDataSource dataSource, JDBCDatabaseMetaData metaData) {<NEW_LINE>super.initDriverSettings(session, dataSource, metaData);<NEW_LINE>DBPDriver driver = dataSource<MASK><NEW_LINE>String delimitersString = CommonUtils.toString(driver.getDriverParameter(GenericConstant... | .getContainer().getDriver(); |
1,352,841 | public void generateStringPoolHeaders(CodeWriter writer, IncludeManager includes) {<NEW_LINE>includes.includeClass("java.lang.String");<NEW_LINE>String stringClassName = context.getNames().forClassInstance(ValueType.object("java.lang.String"));<NEW_LINE>writer.print("int32_t stringHeader = TEAVM_PACK_CLASS(&" + stringC... | writeIntValue(writer, RuntimeObject.GC_MARKED); |
663,359 | final ListCustomDataIdentifiersResult executeListCustomDataIdentifiers(ListCustomDataIdentifiersRequest listCustomDataIdentifiersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listCustomDataIdentifiersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListCustomDataIdentifiers"); |
1,407,547 | final UpdateEndpointGroupResult executeUpdateEndpointGroup(UpdateEndpointGroupRequest updateEndpointGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateEndpointGroupRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<UpdateEndp... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,351,657 | private void readPatchContent(SinglePatch patch) throws IOException, PatchException {<NEW_LINE>String base = readPatchLine();<NEW_LINE>if (base == null || !base.startsWith("--- "))<NEW_LINE>throw new PatchException("Invalid unified diff header: " + base);<NEW_LINE>String modified = readPatchLine();<NEW_LINE>if (modifie... | c = line.charAt(0); |
142,755 | public static String doSub(String value, Map<String, String> varMap) {<NEW_LINE>try {<NEW_LINE>Matcher matcher = pattern.matcher(value);<NEW_LINE>boolean result = matcher.find();<NEW_LINE>if (result) {<NEW_LINE>StringBuffer sb = new StringBuffer(value.length() * 2);<NEW_LINE>do {<NEW_LINE>String key = matcher.group(1);... | replacement = System.getProperty(key); |
370,147 | boolean sendSignal(final long controlSessionId, final long correlationId, final long recordingId, final long subscriptionId, final long position, final RecordingSignal recordingSignal, final Publication controlPublication) {<NEW_LINE>final int messageLength = MESSAGE_HEADER_LENGTH + RecordingSignalEventEncoder.BLOCK_LE... | MutableDirectBuffer buffer = bufferClaim.buffer(); |
322,241 | private static Map<String, AnnotationValue<?, ?>> asValue(Annotation annotation) {<NEW_LINE>Map<String, AnnotationValue<?, ?>> annotationValues = new HashMap<String, AnnotationValue<?, ?>>();<NEW_LINE>for (Method property : annotation.annotationType().getDeclaredMethods()) {<NEW_LINE>try {<NEW_LINE>annotationValues.put... | cause).constantName())); |
23,662 | public static long parseDuration(String str) throws IllegalArgumentException {<NEW_LINE>if (str == null)<NEW_LINE>return 0;<NEW_LINE>// Check for ISO_8601 format<NEW_LINE>if (str.startsWith("P")) {<NEW_LINE>// A common mistake is when the minutes format is intended but the month format is specified<NEW_LINE>// e.g. one... | str.substring(index + 1); |
671,198 | public Description matchVariable(VariableTree tree, VisitorState state) {<NEW_LINE>if (shouldSkip(state))<NEW_LINE>return Description.NO_MATCH;<NEW_LINE>Symbol identifier = <MASK><NEW_LINE>// Check if this is the flag definition and remove it.<NEW_LINE>if (identifier != null && identifier.isEnum() && identifier.equals(... | FindIdentifiers.findIdent(xpFlagName, state); |
1,746,648 | private void doRequest(HttpServletRequest request, HttpServletResponse response, boolean head) throws IOException {<NEW_LINE>Resource resource;<NEW_LINE>try {<NEW_LINE>resource = <MASK><NEW_LINE>} catch (RedirectException ex) {<NEW_LINE>logger.log(FINE, "Redirecting client to: " + ex.location);<NEW_LINE>response.setHea... | new Resource(getFile(request)); |
514,498 | public static Distribution of(List<String> unquineName) {<NEW_LINE>MetadataManager metadataManager = MetaClusterCurrent.wrapper(MetadataManager.class);<NEW_LINE>List<ShardingTable> shardingTables = new ArrayList<>();<NEW_LINE>List<GlobalTable> globalTables = new ArrayList<>();<NEW_LINE>List<NormalTable> normalTables = ... | .add((ShardingTable) t); |
1,735,141 | public RFuture<Map<StreamMessageId, Map<K, V>>> readAsync(StreamReadArgs args) {<NEW_LINE>StreamReadParams rp = ((StreamReadSource) args).getParams();<NEW_LINE>List<Object> params = new ArrayList<Object>();<NEW_LINE>if (rp.getCount() > 0) {<NEW_LINE>params.add("COUNT");<NEW_LINE>params.add(rp.getCount());<NEW_LINE>}<NE... | XREAD_BLOCKING_SINGLE, params.toArray()); |
1,242,692 | public void apply(double[] x) {<NEW_LINE>int i;<NEW_LINE>double[] lpfOutTmp;<NEW_LINE>// lpfOutTmp = SignalProcUtils.filter(Hd.getDenumeratorCoefficients(), filterNumerator, x);<NEW_LINE>lpfOutTmp = Hd.apply(x);<NEW_LINE>lpfOutTmp = SignalProcUtils.decimate(lpfOutTmp, 2.0);<NEW_LINE>// lpfOutTmp = SignalProcUtils.filte... | 1.5 * filterLengthMinusOne + 0.5) - 1; |
1,087,969 | private void createServerHello(ClientHello clientHello, DTLSFlight flight) throws HandshakeException {<NEW_LINE>ProtocolVersion serverVersion = negotiateProtocolVersion(clientHello.getProtocolVersion());<NEW_LINE>// store client and server random<NEW_LINE>clientRandom = clientHello.getRandom();<NEW_LINE>DTLSSession ses... | () : SessionId.emptySessionId(); |
638,699 | public static void main(String[] args) throws IOException {<NEW_LINE>// Parse the arguments<NEW_LINE>Properties props = StringUtils.argsToProperties(args);<NEW_LINE>ArgumentParser.fillOptions(new Class[] { ArgumentParser.class, SplitTrainingSet.class }, props);<NEW_LINE>if (SPLIT_NAMES.length != SPLIT_WEIGHTS.length) {... | treebank.size() + " trees"); |
1,766,951 | protected static String[] processLocalArgs(String[] cliArgs) throws IOException, ParseException {<NEW_LINE>CommandLineParser cliParser = new GnuParser();<NEW_LINE>Options cliOptions = constructCommandLineOptions();<NEW_LINE>CommandLine cmd = cliParser.<MASK><NEW_LINE>// Options here has to be up front<NEW_LINE>if (cmd.... | parse(cliOptions, cliArgs, true); |
1,417,442 | public int writeHeaderType(DebugContext context, HeaderTypeEntry headerTypeEntry, byte[] buffer, int p) {<NEW_LINE>int pos = p;<NEW_LINE>String name = headerTypeEntry.getTypeName();<NEW_LINE>byte size = (byte) headerTypeEntry.getSize();<NEW_LINE>log(context, " [0x%08x] header type %s", pos, name);<NEW_LINE>setIndirect... | context, " [0x%08x] byte_size 0x%x", pos, size); |
1,043,409 | private void printMonitors(final PrintStream out, final SAObject javaFrame, Object waitingToLockMonitor, boolean objectWaitFrame) throws IllegalAccessException, InvocationTargetException {<NEW_LINE>if (objectWaitFrame) {<NEW_LINE>// NOI18N<NEW_LINE>SAObject <MASK><NEW_LINE>// NOI18N<NEW_LINE>Boolean isEmpty = (Boolean)... | stackValueCollection = javaFrame.invokeSA("getLocals"); |
1,577,289 | final TestAlarmResult executeTestAlarm(TestAlarmRequest testAlarmRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(testAlarmRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
603,250 | public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'param' is set<NEW_LINE>if (param == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>// verify the required parameter 'param2' is set<NE... | throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData"); |
487,323 | private void removeNode(Node<K, V> node) {<NEW_LINE>if (node.previous != null) {<NEW_LINE>node.previous.next = node.next;<NEW_LINE>} else {<NEW_LINE>// node was head<NEW_LINE>head = node.next;<NEW_LINE>}<NEW_LINE>if (node.next != null) {<NEW_LINE>node.next.previous = node.previous;<NEW_LINE>} else {<NEW_LINE>// node wa... | .nextSibling.previousSibling = node.previousSibling; |
1,025,564 | public Vector<Object> processIncoming(Document soapDocument, PropertyExpansionContext context) throws WSSecurityException {<NEW_LINE>Element header = WSSecurityUtil.findWsseSecurityHeaderBlock(soapDocument, soapDocument.getDocumentElement(), false);<NEW_LINE>if (header == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LI... | ? null : decryptCrypto.getCrypto(); |
713,847 | public List<PluginSummaryBean> listPlugins() throws StorageException {<NEW_LINE>beginTx();<NEW_LINE>try {<NEW_LINE>EntityManager entityManager = getActiveEntityManager();<NEW_LINE>String sql = "SELECT p.id, p.artifact_id, p.group_id, p.version, p.classifier, p.type, p.name, p.description, p.created_by, p.created_on" + ... | (Date) row[9]); |
199,196 | public static Map<String, TopicWorkload> retrieveTopicInRate(long timeInMs, long windowInMs, String c3Host, int c3Port, String kafkaCluster, List<String> topics) throws IOException {<NEW_LINE>Map<String, TopicWorkload> workloads = new HashMap<>();<NEW_LINE>if (c3Port == 0) {<NEW_LINE>return workloads;<NEW_LINE>}<NEW_LI... | kafkaCluster, topics.size()); |
909,214 | public static void collectStreamsFrom(final InfoItemsCollector collector, final JsonObject json, final String baseUrl, final boolean sepia) throws ParsingException {<NEW_LINE>final JsonArray contents;<NEW_LINE>try {<NEW_LINE>contents = (JsonArray) JsonUtils.getValue(json, "data");<NEW_LINE>} catch (final Exception e) {... | throw new ParsingException("Unable to extract list info", e); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.