idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
829,656 | public void trigger(DelegateExecution execution, String triggerName, Object triggerData) {<NEW_LINE>CommandContext commandContext = Context.getCommandContext();<NEW_LINE>ExecutionEntityManager executionEntityManager = commandContext.getExecutionEntityManager();<NEW_LINE>ExecutionEntity executionEntity = (ExecutionEntit... | startEvent.getId() + ")"); |
451,112 | final DeleteBackupVaultLockConfigurationResult executeDeleteBackupVaultLockConfiguration(DeleteBackupVaultLockConfigurationRequest deleteBackupVaultLockConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBackupVaultLockConfigurationRequest);<NEW_LINE>AWSRequestMetrics awsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DeleteBackupVaultLockConfiguration"); |
1,623,782 | protected void paintIcon(Component c, Graphics2D g, int width, int height, double scaling) {<NEW_LINE>final Color color;<NEW_LINE>if (UIManager.getBoolean("nb.dark.theme")) {<NEW_LINE>// Foreground brightness level taken from the combobox dropdown on Darcula.<NEW_LINE>color = disabled ? new Color(90, 90, 90, 255) : new... | 86, 86, 86, 255); |
1,648,826 | public void refresh() {<NEW_LINE>if (credentials == null || profileFile.lastModified() > profileFileLastModified) {<NEW_LINE>profileFileLastModified = profileFile.lastModified();<NEW_LINE>Map<String, String> profileProperties = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (IOException e) {<NEW_LINE>LogUtils.lo... | profileProperties = profileLoader.loadProfile(profileFile); |
352,657 | public PropertyNamingStrategy create() {<NEW_LINE>if (String.class.isInstance(value)) {<NEW_LINE>final String val = value.toString();<NEW_LINE>switch(val) {<NEW_LINE>case PropertyNamingStrategy.IDENTITY:<NEW_LINE>return propertyName -> propertyName;<NEW_LINE>case PropertyNamingStrategy.LOWER_CASE_WITH_DASHES:<NEW_LINE>... | throw new IllegalArgumentException(val + " unknown as PropertyNamingStrategy"); |
1,128,964 | protected VirtualizerStore store(JRVirtualizationContext context, boolean create) {<NEW_LINE>VirtualizerStore store;<NEW_LINE>synchronized (contextStores) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (store != null || !create) {<NEW_LINE>if (log.isTraceEnabled()) {<NEW_LINE>log.trace("found " + store + " for " + context);<... | store = contextStores.get(context); |
870,380 | private Image badgeIcon(Image origImg) {<NEW_LINE>Image badge = null;<NEW_LINE>switch(serverInstance.getServerState()) {<NEW_LINE>case RUNNING:<NEW_LINE>if (isDebug()) {<NEW_LINE>badge = ImageUtilities.loadImage(DEBUGGING_ICON);<NEW_LINE>} else if (isProfile()) {<NEW_LINE>badge = ImageUtilities.loadImage(PROFILING_ICON... | badge = ImageUtilities.loadImage(WAITING_ICON); |
799,581 | public boolean removeNodeFromConfiguration(final String nodeLeftName, final String databaseName, final boolean removeOnlyDynamicServers, final boolean statusOffline) {<NEW_LINE>ODistributedServerLog.debug(this, nodeName, null, ODistributedServerLog.DIRECTION.NONE, <MASK><NEW_LINE>final OModifiableDistributedConfigurati... | "Removing server '%s' from database configuration '%s' (removeOnlyDynamicServers=%s)...", nodeLeftName, databaseName, removeOnlyDynamicServers); |
61,555 | private void updateShadowBitmap() {<NEW_LINE>if (useOutline() || !mDrawShadow)<NEW_LINE>return;<NEW_LINE>final int width = getWidth(), height = getHeight();<NEW_LINE>if (width <= 0 || height <= 0)<NEW_LINE>return;<NEW_LINE>final int contentLeft = getPaddingLeft(), contentTop = getPaddingTop(), contentRight = width - ge... | 0, 0, 0, 0); |
1,060,006 | private void selectPreferred() {<NEW_LINE>// As sorted and filtered, pick the first matching offer<NEW_LINE>// NB. It should never be one or the other. Always both or none.<NEW_LINE>RowObjectFilterModel<DebuggerMappingOffer> model = offerTableFilterPanel.getTableFilterModel();<NEW_LINE><MASK><NEW_LINE>if (preferredLang... | int count = model.getRowCount(); |
12,980 | public EdgeLabel readEdgeLabel(HugeGraph graph, BinaryBackendEntry entry) {<NEW_LINE>E.checkNotNull(entry, "entry");<NEW_LINE>this.entry = entry;<NEW_LINE>Id id = entry.id().origin();<NEW_LINE>String name = readString(HugeKeys.NAME);<NEW_LINE>EdgeLabel edgeLabel = new EdgeLabel(graph, id, name);<NEW_LINE>edgeLabel.sour... | (readIds(HugeKeys.INDEX_LABELS)); |
134,341 | private PluginOperationResult executeUpdate() throws Exception {<NEW_LINE>List<String> updateablePlugins = findUpdateCandidates();<NEW_LINE>List<String> erroneousPlugins = Lists.newArrayList();<NEW_LINE>List<String<MASK><NEW_LINE>// update only a specific plugin if it is updatable and provided<NEW_LINE>String forcePlug... | > delayedPlugins = Lists.newArrayList(); |
1,584,946 | private static InputStream spawnGrep(Artifact input, PathFragment outputExecPath, boolean inMemoryOutput, ActionExecutionMetadata resourceOwner, ActionExecutionContext actionExecutionContext, Artifact grepIncludes, GrepIncludesFileType fileType) throws ExecException, InterruptedException {<NEW_LINE>ActionInput output =... | FileOutErr grepOutErr = originalOutErr.childOutErr(); |
55,522 | private PreviewPreset readXML(Document document) {<NEW_LINE>// For retrieving property class if it is not in the xml (old serialization)<NEW_LINE>DefaultPreset // For retrieving property class if it is not in the xml (old serialization)<NEW_LINE>defaultPreset = new DefaultPreset();<NEW_LINE><MASK><NEW_LINE>Map<String, ... | Element presetE = document.getDocumentElement(); |
1,525,732 | public DataFlow update(@Nonnull String urn, @Nonnull DataFlowUpdateInput input, @Nonnull QueryContext context) throws Exception {<NEW_LINE>if (isAuthorized(urn, input, context)) {<NEW_LINE>final CorpuserUrn actor = CorpuserUrn.createFromString(context.getAuthentication().getActor().toUrnStr());<NEW_LINE>final Collectio... | UrnUtils.getUrn(urn))); |
407,084 | public double[] analyse(double[] aFrame) {<NEW_LINE>if (aFrame.length != frameLength)<NEW_LINE>throw new IllegalArgumentException("Expected frame of length " + frameLength + ", got " + aFrame.length);<NEW_LINE>double[] real = new double[fftSize];<NEW_LINE>double[] imag = new double[fftSize];<NEW_LINE>System.arraycopy(a... | real = MathUtils.log(real); |
270,226 | protected DataverseRole findRoleOrDie(String id) throws WrappedResponse {<NEW_LINE>DataverseRole role;<NEW_LINE>if (id.equals(ALIAS_KEY)) {<NEW_LINE>String alias = getRequestParameter<MASK><NEW_LINE>try {<NEW_LINE>return em.createNamedQuery("DataverseRole.findDataverseRoleByAlias", DataverseRole.class).setParameter("al... | (ALIAS_KEY.substring(1)); |
500,707 | private boolean needToQuote(String identifier) {<NEW_LINE>assert identifier != null;<NEW_LINE>// No need to quote if it's already quoted<NEW_LINE>if (alreadyQuoted(identifier)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>int length = identifier.length();<NEW_LINE>for (int i = 0; i < length; i++) {<NEW_LINE>if (charNee... | forName("org.netbeans.modules.db.api.sql.SQLKeywords", false, systemLoader); |
182,060 | public synchronized Map<String, Object> asMap(boolean withDetails) {<NEW_LINE>E.checkState(this.type != null, "Task type can't be null");<NEW_LINE>E.checkState(this.name != null, "Task name can't be null");<NEW_LINE>Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put(Hidden.unHide(P.ID), this.id);<NEW_LINE>map.... | .INPUT), this.input); |
1,426,532 | public static byte[] rotate90(byte[] data, int imageWidth, int imageHeight) {<NEW_LINE>// Rotate the Y luma<NEW_LINE>int i = 0;<NEW_LINE>for (int x = 0; x < imageWidth; x++) {<NEW_LINE>for (int y = imageHeight - 1; y >= 0; y--) {<NEW_LINE>preAllocatedBufferRotate[i++] = data[y * imageWidth + x];<NEW_LINE>}<NEW_LINE>}<N... | x + (imageWidth / 2)]; |
1,522,230 | public final <T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> InsertResultStep<Record14<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>> returningResult(SelectField<T1> field1, SelectField<T2> field2, SelectField<T3> field3, SelectField<T4> field4, SelectField<T5> field5, SelectField<T6> field... | , field12, field13, field14 }); |
651,156 | private SkeletonPiece generateConditionExpression(DataType dataType, Table tableChoice) {<NEW_LINE>SkeletonPiece sp = new SkeletonPiece();<NEW_LINE>String dataTypeStringified = dataType.name();<NEW_LINE>int randomCondition = Utils.getRandomInteger(2);<NEW_LINE>if (randomCondition == 0) {<NEW_LINE>sp.setToken(tokenize("... | , tableChoice).getToken()); |
1,652,400 | public Map<Object, Long> removeFromAggregatedState(RamAccounting ramAccounting, Map<Object, Long> previousAggState, Input[] stateToRemove) {<NEW_LINE>Object value = stateToRemove[0].value();<NEW_LINE>if (value == null) {<NEW_LINE>return previousAggState;<NEW_LINE>}<NEW_LINE>Long <MASK><NEW_LINE>if (numTimesValueSeen ==... | numTimesValueSeen = previousAggState.get(value); |
277,852 | public SnowflakeDestinationProperties unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SnowflakeDestinationProperties snowflakeDestinationProperties = new SnowflakeDestinationProperties();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCu... | class).unmarshall(context)); |
1,122,685 | private boolean tryUpdateUserAndRoleMap(String prefix, Map<String, BasicAuthorizerUser> userMap, byte[] oldUserMapValue, byte[] newUserMapValue, Map<String, BasicAuthorizerRole> roleMap, byte[] oldRoleMapValue, byte[] newRoleMapValue) {<NEW_LINE>try {<NEW_LINE>List<MetadataCASUpdate> updates = new ArrayList<>();<NEW_LI... | new BasicAuthorizerUserMapBundle(userMap, newUserMapValue)); |
691,889 | public List<Canal> listByIds(Long... identities) {<NEW_LINE>List<Canal> canals = new ArrayList<Canal>();<NEW_LINE>try {<NEW_LINE>List<CanalDO> canalDos = null;<NEW_LINE>if (identities.length < 1) {<NEW_LINE>canalDos = canalDao.listAll();<NEW_LINE>if (canalDos.isEmpty()) {<NEW_LINE>logger.debug("DEBUG ## couldn't query ... | canalDos = canalDao.listByMultiId(identities); |
1,579,096 | public static void savePoseListCsv(List<Se3_F64> list, RotationType type, OutputStream output) {<NEW_LINE>PrintStream out = new PrintStream(output);<NEW_LINE>out.println("# 6-DOF pose");<NEW_LINE>out.println("# x, y, z, (rotation)");<NEW_LINE>out.println(<MASK><NEW_LINE>out.println("count=" + list.size());<NEW_LINE>for... | "rotation=" + type.name()); |
589,866 | public Map<String, Object> props() {<NEW_LINE>Map<String, Object> props = super.props();<NEW_LINE>props.put(Constants.KEY_DISTRIBUTION_EXECUTABLE, executable);<NEW_LINE>props.putAll(java.getResolvedExtraProperties());<NEW_LINE>safePut(Constants.KEY_DISTRIBUTION_JAVA_GROUP_ID, java.getGroupId(), props, true);<NEW_LINE>s... | getArtifactId(), props, true); |
669,240 | public static boolean showBuildActionWarning(Project project, CustomizerPresenter presenter) {<NEW_LINE>String text = NbBundle.getMessage(DeployOnSaveUtils.class, "LBL_ProjectBuiltAutomatically");<NEW_LINE>String projectProperties = NbBundle.getMessage(DeployOnSaveUtils.class, "BTN_ProjectProperties");<NEW_LINE>String ... | (project).getDisplayName()); |
210,285 | public void receiveFileInfo(List<String> phase1FileNames, List<Long> phase1FileSizes, List<String> phase1ExistingFileNames, List<Long> phase1ExistingFileSizes, int totalTranslogOps, ActionListener<Void> listener) {<NEW_LINE>final String action = PeerRecoveryTargetService.Actions.FILES_INFO;<NEW_LINE>final <MASK><NEW_LI... | long requestSeqNo = requestSeqNoGenerator.getAndIncrement(); |
461,541 | private void loadNode1080() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.SecurityTokenRequestType_EnumStrings, new QualifiedName(0, "EnumStrings"), new LocalizedText("en", "EnumStrings"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueO... | .expanded(), true)); |
1,445,651 | public void uploadPictureOrVoiceClip(String path) {<NEW_LINE>if (path == null)<NEW_LINE>return;<NEW_LINE>File file;<NEW_LINE>if (path.startsWith("content:")) {<NEW_LINE>file = getFileFromContentUri(this, Uri.parse(path));<NEW_LINE>} else if (isVoiceClip(path)) {<NEW_LINE>file = buildVoiceClipFile(this, outputFileName);... | setName(file.getName()); |
603,203 | public void init(Map<String, Object> parameters) throws Exception {<NEW_LINE>dataSource = null;<NEW_LINE>tableName = null;<NEW_LINE>geomColumn = null;<NEW_LINE>String value = (String) parameters.get("table_name");<NEW_LINE>if (Helper.isEmpty(value))<NEW_LINE>throw new InternalServerException(IsochronesErrorCodes.UNKNOW... | , parameters.get("db_name")); |
1,417,410 | public void addFilter(SerializeFilter filter) {<NEW_LINE>if (filter == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (filter instanceof PropertyPreFilter) {<NEW_LINE>this.getPropertyPreFilters().add((PropertyPreFilter) filter);<NEW_LINE>}<NEW_LINE>if (filter instanceof NameFilter) {<NEW_LINE>this.getNameFilters().add... | .add((ValueFilter) filter); |
36,365 | protected void handleMetadata() throws Docx4JException {<NEW_LINE>// docProps/app.xml (Extended Properties)<NEW_LINE>if (pkg.getDocPropsExtendedPart() != null && pkg.getDocPropsExtendedPart().getContents() != null) {<NEW_LINE>pkg.getDocPropsExtendedPart().getContents().setCompany(null);<NEW_LINE>pkg.getDocPropsExtended... | getContents().setCategory(null); |
1,791,725 | private Object createCglibProxyForFactoryBean(Object factoryBean, ConfigurableBeanFactory beanFactory, String beanName) {<NEW_LINE>Enhancer enhancer = new Enhancer();<NEW_LINE>enhancer.setSuperclass(factoryBean.getClass());<NEW_LINE><MASK><NEW_LINE>enhancer.setCallbackType(MethodInterceptor.class);<NEW_LINE>// Ideally ... | enhancer.setNamingPolicy(SpringNamingPolicy.INSTANCE); |
929,653 | public void run() {<NEW_LINE>while (!shouldTerminate.get()) {<NEW_LINE>if (iterator.hasNext())<NEW_LINE>isRunning.set(true);<NEW_LINE>else<NEW_LINE>ThreadUtils.uncheckedSleep(50);<NEW_LINE>while (!shouldTerminate.get() && iterator.hasNext()) {<NEW_LINE>int cnt = 0;<NEW_LINE>if (buffer.size() < fetchSize) {<NEW_LINE>whi... | .writeLock().unlock(); |
1,772,534 | public Builder mergeFrom(com.didiglobal.booster.aapt2.Resources.StyledString other) {<NEW_LINE>if (other == com.didiglobal.booster.aapt2.Resources.StyledString.getDefaultInstance())<NEW_LINE>return this;<NEW_LINE>if (!other.getValue().isEmpty()) {<NEW_LINE>value_ = other.value_;<NEW_LINE>onChanged();<NEW_LINE>}<NEW_LIN... | span_.addAll(other.span_); |
1,680,235 | protected void addAllProductOptionsToModel(Map<String, Object> newModelVars, Product product) {<NEW_LINE>List<ProductOptionXref> productOptionXrefs = ListUtils.emptyIfNull(product.getProductOptionXrefs());<NEW_LINE>List<ProductOptionDTO> dtos = new ArrayList<>();<NEW_LINE>for (ProductOptionXref optionXref : productOpti... | value.getId(), priceAdjustmentValue); |
329,323 | private void generateLicensePom(File outputDir, String artifactId, String version, String name, boolean isWebsphereLiberty) throws MavenRepoGeneratorException {<NEW_LINE>String groupId = Constants.WEBSPHERE_LIBERTY_FEATURES_GROUP_ID;<NEW_LINE>MavenCoordinates coordinates = new <MASK><NEW_LINE>Model model = new Model();... | MavenCoordinates(groupId, artifactId, version); |
479,072 | private void handle(APILogInByUserMsg msg) {<NEW_LINE>APILogInReply reply = new APILogInReply();<NEW_LINE>String accountUuid;<NEW_LINE>if (msg.getAccountUuid() != null) {<NEW_LINE>accountUuid = msg.getAccountUuid();<NEW_LINE>} else {<NEW_LINE>SimpleQuery<AccountVO> accountq = dbf.createQuery(AccountVO.class);<NEW_LINE>... | (IdentityErrors.AUTHENTICATION_ERROR, "wrong account or username or password")); |
1,802,628 | public ModelList read(JsonReader in) throws IOException {<NEW_LINE>JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();<NEW_LINE>validateJsonObject(jsonObj);<NEW_LINE>// store additional fields in the deserialized instance<NEW_LINE>ModelList instance = thisAdapter.fromJsonTree(jsonObj);<NEW_LINE>for (Map.Ent... | getValue().getAsBoolean()); |
329,194 | private void saveState() {<NEW_LINE>if (length < 0)<NEW_LINE>return;<NEW_LINE>StringBuffer sb = new StringBuffer();<NEW_LINE>sb.append(this.length + "\n");<NEW_LINE>sb.append(downloaded + "\n");<NEW_LINE>sb.append(chunks.size() + "\n");<NEW_LINE>for (int i = 0; i < chunks.size(); i++) {<NEW_LINE>Segment seg = chunks.ge... | = new File(folder, "state.txt"); |
1,559,345 | public Response<Void> deleteByIdWithResponse(String id, Context context) {<NEW_LINE>String resourceUri = Utils.getValueFromIdByParameterName(id, "/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}/suppressions/{name}", "resourceUri");<NEW_LINE>if (resourceUri == null) {<NEW_LINE>throw logger.... | resourceUri, recommendationId, name, context); |
1,633,891 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>String gameKey = request.getParameter("gameKey");<NEW_LINE>// 1. Create or fetch a Game object from the datastore<NEW_LINE><MASK><NEW_LINE>Game game = null;<NEW_LINE>String userId = UserServiceFac... | Objectify ofy = ObjectifyService.ofy(); |
1,133,999 | public int processors(int delta) {<NEW_LINE>if (shutDown || delta == 0) {<NEW_LINE>return processors.length;<NEW_LINE>}<NEW_LINE>synchronized (this) {<NEW_LINE>if (shutDown) {<NEW_LINE>return processors.length;<NEW_LINE>}<NEW_LINE>int requestedNumber = processors.length + delta;<NEW_LINE>if (delta > 0) {<NEW_LINE>reque... | Arrays.copyOf(processors, requestedNumber); |
1,602,308 | public void testObservableRxInvoker_get2WithClass(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>final String threadName = "jaxrs21Thread";<NEW_LINE>ThreadFactory jaxrs21ThreadFactory = Executors.defaultThr... | Builder builder = t.request(); |
160,335 | private void importFQNs(boolean handleInitComponents, boolean handleVariables, String... eventHandlers) {<NEW_LINE>List<int[]> list = new ArrayList();<NEW_LINE>if (handleInitComponents) {<NEW_LINE>SimpleSection initComponentsSection = formEditor.getInitComponentSection();<NEW_LINE>// NOI18N<NEW_LINE>int[] span = formEd... | .size()][]); |
463,345 | public static AsyncServerResponse create(Object o, @Nullable Duration timeout) {<NEW_LINE>Assert.notNull(o, "Argument to async must not be null");<NEW_LINE>if (o instanceof CompletableFuture) {<NEW_LINE>CompletableFuture<ServerResponse> futureResponse = (CompletableFuture<ServerResponse>) o;<NEW_LINE>return new Default... | >) futureAdapter.fromPublisher(publisher); |
842,803 | public void reportStats(SimpleStats.Data stats, long now, String metricPrefix, String tagName, String tagValue, List<DataPointSet> dataPointSets) {<NEW_LINE>DataPointSet dps;<NEW_LINE>dps = newDataPointSet(metricPrefix, "min", now, stats.min);<NEW_LINE><MASK><NEW_LINE>dataPointSets.add(dps);<NEW_LINE>dps = newDataPoint... | dps.addTag(tagName, tagValue); |
729,761 | public List<Classification> convertClassifications(List<org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Classification> classificationsFromEntity) {<NEW_LINE>if (classificationsFromEntity == null || classificationsFromEntity.isEmpty()) {<NEW_LINE>return new ArrayL... | (classificationEntity.getProperties())); |
1,811,028 | private void doCommitSecondaryKeys(Iterator<ByteString> keys, long commitTs, int commitBackOfferMS) throws TiBatchWriteException {<NEW_LINE>try {<NEW_LINE>int taskBufferSize = writeThreadPerTask * 2;<NEW_LINE>int totalSize = 0, cnt = 0;<NEW_LINE>ExecutorCompletionService<Void> completionService = new ExecutorCompletion... | throw new TiBatchWriteException("Current thread interrupted.", e); |
222,407 | final ListSchemaExtensionsResult executeListSchemaExtensions(ListSchemaExtensionsRequest listSchemaExtensionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSchemaExtensionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | invoke(request, responseHandler, executionContext); |
1,161,161 | public IGuiElement deserialize0(BuildCraftJsonGui gui, IGuiPosition parent, JsonGuiInfo info, JsonGuiElement json) {<NEW_LINE>FunctionContext ctx = createContext(json);<NEW_LINE>if (!json.properties.containsKey("size[0]")) {<NEW_LINE>json.properties.put("size[0]", "18");<NEW_LINE>}<NEW_LINE>if (!json.properties.contain... | get(source, FullStatement.class); |
1,675,171 | // Delete all old shard gen blobs that aren't referenced any longer as a result from moving to updated repository data<NEW_LINE>private void cleanupOldShardGens(RepositoryData existingRepositoryData, RepositoryData updatedRepositoryData, FinalizeSnapshotContext finalizeSnapshotContext) {<NEW_LINE>final Set<String> toDe... | .buildAsString().length(); |
110,592 | public byte[] doInTransform(Instrumentor instrumentor, ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_LINE>final InstrumentClass target = instrumentor.getInstrumentClass(loader, className, classfileBuffer);<... | target.getDeclaredMethod("subscribeOrReturn", "reactor.core.CoreSubscriber"); |
457,591 | private Collection<Snapshot> loadSnapshots() {<NEW_LINE>// Ensure log directories are created.<NEW_LINE>storage.directory().mkdirs();<NEW_LINE>List<Snapshot> snapshots = new ArrayList<>();<NEW_LINE>// Iterate through all files in the log directory.<NEW_LINE>for (File file : storage.directory().listFiles(File::isFile)) ... | (file, SnapshotDescriptor.BYTES)); |
49,994 | private void excludeSelected(boolean recurse) {<NEW_LINE>final ArrayList<PackageSet> selected = getSelectedSets(recurse);<NEW_LINE>if (selected == null || selected.isEmpty())<NEW_LINE>return;<NEW_LINE>for (PackageSet set : selected) {<NEW_LINE>if (myCurrentScope == null) {<NEW_LINE>myCurrentScope = new ComplementPackag... | )) : new ComplementPackageSet(set); |
1,383,081 | private void addCallBack() {<NEW_LINE>mCamera.setPreviewCallback(new Camera.PreviewCallback() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onPreviewFrame(byte[] data, Camera camera) {<NEW_LINE>Camera.Size size = camera<MASK><NEW_LINE>data = rotateYUV420Degree90(data, size.width, size.height);<NEW_LINE>try {<NEW_... | .getParameters().getPreviewSize(); |
1,085,174 | public void process(MarvinImage a_imageIn, MarvinImage a_imageOut, MarvinAttributes a_attributesOut, MarvinImageMask a_mask, boolean a_previewMode) {<NEW_LINE>width = a_imageIn.getWidth();<NEW_LINE>height = a_imageIn.getHeight();<NEW_LINE>mat1 = new double[width][height];<NEW_LINE>mat2 = new double[width][height];<NEW_... | matg = denoise(matg, iter); |
1,393,007 | public ModelConfVO save(ModelConfVO confVO) {<NEW_LINE>ModelConfPO conf = new ModelConfPO();<NEW_LINE>BeanUtils.copyProperties(confVO, conf);<NEW_LINE>if (conf.getId() == null) {<NEW_LINE>conf.setCreateTime(new Date());<NEW_LINE>conf.setUpdateDate(new Date());<NEW_LINE>modelConfMapper.insert(conf);<NEW_LINE>confVO.<MAS... | setId(conf.getId()); |
715,267 | public void paintComponent(Graphics g) {<NEW_LINE>super.paintComponent(g);<NEW_LINE>Transaction.runVoid(() -> {<NEW_LINE>g.setColor(holeColor);<NEW_LINE>for (Polygon o : obstacles) {<NEW_LINE>g.fillPolygon(o);<NEW_LINE>for (int i = 0; i < o.npoints; i++) g.drawImage(coneImg, o.xpoints[i] - 14, o.ypoints[i] - 53, null);... | pos.y - 73, null); |
606,243 | private void storeGeneratedSchema(SmallRyeOpenApiConfig openApiConfig, OutputTargetBuildItem out, byte[] schemaDocument, Format format) throws IOException {<NEW_LINE>Path directory = openApiConfig.storeSchemaDirectory.get();<NEW_LINE>Path outputDirectory = out.getOutputDirectory();<NEW_LINE>if (!directory.isAbsolute() ... | " saved: " + file.toString()); |
393,311 | public void updateConfiguration(Configuration config) {<NEW_LINE>// re-map filesystem schemes to match Amazon Elastic MapReduce<NEW_LINE>config.set("fs.s3.impl", PrestoS3FileSystem.class.getName());<NEW_LINE>config.set("fs.s3a.impl", PrestoS3FileSystem.class.getName());<NEW_LINE>config.set("fs.s3n.impl", PrestoS3FileSy... | S3_CONNECT_TIMEOUT, connectTimeout.toString()); |
544,481 | final DescribePatchPropertiesResult executeDescribePatchProperties(DescribePatchPropertiesRequest describePatchPropertiesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePatchPropertiesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
971,634 | public void runInternal() {<NEW_LINE>ScheduledExecutorContainerCollector collector = (ScheduledExecutorContainerCollector) this.collector;<NEW_LINE>SerializationService serializationService = nodeEngine.getSerializationService();<NEW_LINE>List<ScheduledExecutorMergeTypes> mergingEntries;<NEW_LINE>Map<Integer, Collectio... | partitionId, name, mergingEntries, mergePolicy); |
1,250,939 | public WebResponse invokeRsProtectedResource(String testcase, WebConversation wc, String tokenValue, TestSettings settings, List<validationData> expectations) throws Exception {<NEW_LINE>String thisMethod = "invokeRsProtectedResource";<NEW_LINE>msgUtils.printMethodName(thisMethod);<NEW_LINE>String where = settings.getW... | String, String[]>(); |
653,159 | protected void groupDigits(int groupSize, char comma) {<NEW_LINE>// Work out how many commas (or whatever) it takes to group the whole-number part.<NEW_LINE>int commasNeeded = (lenWhole - 1) / groupSize;<NEW_LINE>if (commasNeeded > 0) {<NEW_LINE>// Index *just after* the current last digit of the whole part of the numb... | int from = start + lenSign + lenWhole; |
56,147 | final GetSessionResult executeGetSession(GetSessionRequest getSessionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getSessionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
306,545 | public static HalCaseDefinition fromCaseDefinition(CaseDefinition caseDefinition, ProcessEngine processEngine) {<NEW_LINE>HalCaseDefinition halCaseDefinition = new HalCaseDefinition();<NEW_LINE>halCaseDefinition.id = caseDefinition.getId();<NEW_LINE>halCaseDefinition<MASK><NEW_LINE>halCaseDefinition.category = caseDefi... | .key = caseDefinition.getKey(); |
136,324 | public void selectionChanged(@Nonnull final FileEditorManagerEvent event) {<NEW_LINE>final <MASK><NEW_LINE>final VirtualFile newFile = event.getNewFile();<NEW_LINE>if (Comparing.equal(oldFile, newFile) && Comparing.equal(getFile(), newFile)) {<NEW_LINE>Runnable runnable = () -> {<NEW_LINE>final FileEditor oldEditor = e... | VirtualFile oldFile = event.getOldFile(); |
382,147 | private static Vector apply(CompLongLongVector v1, LongLongVector v2, Binary op) {<NEW_LINE>LongLongVector[] parts = v1.getPartitions();<NEW_LINE>Storage[] resParts = StorageSwitch.applyComp(v1, v2, op);<NEW_LINE>if (!op.isKeepStorage()) {<NEW_LINE>for (int i = 0; i < parts.length; i++) {<NEW_LINE>if (parts[i].getStora... | getStorage().getValues()); |
1,730,807 | public boolean visit(ConditionalExpression node) {<NEW_LINE>boolean chainsMatter = (this.options.alignment_for_conditional_expression_chain & Alignment.SPLIT_MASK) != Alignment.M_NO_ALIGNMENT;<NEW_LINE>boolean isNextInChain = node.getParent() instanceof ConditionalExpression && node == ((ConditionalExpression) node.get... | .getExpression(), TokenNameQUESTION)); |
1,484,611 | protected String doIt() throws Exception {<NEW_LINE>X_AD_Package_Imp_Proc packageToImport = new X_AD_Package_Imp_Proc(getCtx(), getRecord_ID(), get_TrxName());<NEW_LINE>// clear cache of previous runs<NEW_LINE>IDFinder.clearIDCache();<NEW_LINE>// Create Target directory if required<NEW_LINE><MASK><NEW_LINE>if (packageD... | String packageDirectory = packageToImport.getAD_Package_Dir(); |
657,310 | // This exposes onCreateWindow to JS with a similar API to Android:<NEW_LINE>// If the end-developer sets the 'onCreateWindow' property of the WebViewProxy<NEW_LINE>// to a callback function, then it gets executed when a new window is created<NEW_LINE>// by the WebView (generally, when a link is clicked that has a non-... | proxy.getProperty(TiC.PROPERTY_ON_CREATE_WINDOW); |
360,093 | public boolean commitTransaction(@Nonnull Document document) {<NEW_LINE>ApplicationManager.getApplication().assertIsWriteThread();<NEW_LINE>final DocumentChangeTransaction documentChangeTransaction = removeTransaction(document);<NEW_LINE>if (documentChangeTransaction == null)<NEW_LINE>return false;<NEW_LINE>final PsiFi... | -> doCommitTransaction(document1, documentChangeTransaction)); |
1,327,848 | private List<Wo> list(Business business, Wi wi, List<Identity> identityList) throws Exception {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>if (StringUtils.isBlank(wi.getKey()) && (ListTools.isEmpty(wi.getUnitList()) || ListTools.isEmpty(identityList))) {<NEW_LINE>return wos;<NEW_LINE>}<NEW_LINE>EntityManager e... | ), identity.getOrderNumber()); |
1,077,188 | static List<Mat> applySortedIndsToElements(List<Mat> mats, Mat sortedInds) {<NEW_LINE>int nChannels = mats.get(0).channels();<NEW_LINE>int nRows = mats.get(0).rows();<NEW_LINE>int nCols = mats.get(0).cols();<NEW_LINE>int nImages = mats.size();<NEW_LINE>assert sortedInds.cols() == nImages;<NEW_LINE>assert sortedInds.row... | , opencv_core.CV_32FC(nChannels)); |
3,519 | public static OkHttpClient.Builder newBuilder() {<NEW_LINE>Log.d(TAG, "Creating new instance of HTTP client");<NEW_LINE>System.setProperty("http.maxConnections", String.valueOf(MAX_CONNECTIONS));<NEW_LINE>OkHttpClient.Builder builder = new OkHttpClient.Builder();<NEW_LINE>builder.interceptors().add(new BasicAuthorizati... | ProxyConfig config = UserPreferences.getProxyConfig(); |
443,279 | private long writeOpentsdb(RecordReceiver lineReceiver, JniConnection conn, int batchSize) {<NEW_LINE>long recordIndex = 1;<NEW_LINE>try {<NEW_LINE>Record record;<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>while ((record = lineReceiver.getFromReader()) != null) {<NEW_LINE>if (batchSize == 1) {<NEW_LINE>S... | 0, sb.length()); |
1,781,489 | private void updateVolumeAfterMigration(Answer answer, DataObject srcData, DataObject destData) {<NEW_LINE>VolumeVO destinationVO = volDao.findById(destData.getId());<NEW_LINE>if (!(answer instanceof MigrateVolumeAnswer)) {<NEW_LINE>// OfflineVmwareMigration: reset states and such<NEW_LINE>VolumeVO sourceVO = volDao.fi... | setState(Volume.State.Ready); |
1,423,326 | private void insertRoxygenSkeletonSetRefClass(TokenCursor cursor) {<NEW_LINE>final Position startPos = cursor.currentPosition();<NEW_LINE>String call = extractCall(cursor);<NEW_LINE>if (call == null)<NEW_LINE>return;<NEW_LINE>server_.getSetRefClassCall(call, new ServerRequestCallback<SetRefClassCall>() {<NEW_LINE><NEW_... | ), "field", "reference class", startPos); |
37,895 | protected LoadContext.Query buildJpqlQuery(String script, Map<String, Object> params) {<NEW_LINE>Matcher matcher = COMMON_PARAM_PATTERN.matcher(script);<NEW_LINE>boolean result = matcher.find();<NEW_LINE>if (result) {<NEW_LINE>Map<String, Object> queryParams = new HashMap<>();<NEW_LINE>StringBuffer queryString = new St... | appendReplacement(queryString, ":" + paramKey); |
357,741 | public final void singleDeclaration() throws RecognitionException, TokenStreamException {<NEW_LINE>returnAST = null;<NEW_LINE>ASTPair currentAST = new ASTPair();<NEW_LINE>AST singleDeclaration_AST = null;<NEW_LINE>AST sd_AST = null;<NEW_LINE>singleDeclarationNoInit();<NEW_LINE>sd_AST = (AST) returnAST;<NEW_LINE>if (inp... | singleDeclaration_AST = (AST) currentAST.root; |
222,945 | private IntBuffer expand(int prevNumRows, int multiple) {<NEW_LINE>final int newNumRows = validatedNumRows(prevNumRows, multiple);<NEW_LINE>final int bbSize = (int) computeBBsize(newNumRows);<NEW_LINE>final ValueToDictId valueToDictId = _valueToDict;<NEW_LINE>List<IntBuffer> oldList = valueToDictId.getIBufList();<NEW_L... | info("Allocating {} bytes for: {}", bbSize, _allocationContext); |
580,289 | private void simulateTransactions(HttpServletRequest request, HttpServletResponse response, int batchSize, int resources) throws Exception {<NEW_LINE>final ExtendedTransactionManager tm = TransactionManagerFactory.getTransactionManager();<NEW_LINE>System.out.println("FAILOVERSERVLET: Starting simulateTransactions");<NE... | (new XAResourceImpl(), recoveryId); |
59,944 | private void saveSpecies(final EncogWriteHelper out, final Species species) {<NEW_LINE>out.addColumn("s");<NEW_LINE>out.addColumn(species.getAge());<NEW_LINE>out.<MASK><NEW_LINE>out.addColumn(species.getGensNoImprovement());<NEW_LINE>out.writeLine();<NEW_LINE>for (final Genome genome : species.getMembers()) {<NEW_LINE>... | addColumn(species.getBestScore()); |
1,365,299 | public void validate(SqlValidator validator, SqlValidatorScope scope) {<NEW_LINE>SqlValidatorTable table0 = validator.getCatalogReader().getTable(tableNames());<NEW_LINE>if (table0 == null) {<NEW_LINE>super.validate(validator, scope);<NEW_LINE>// should have failed with "Object not found"<NEW_LINE>assert false;<NEW_LIN... | super.validate(validator, scope); |
192,798 | /* Match a file suffix defined by this regular expression:<NEW_LINE>/(\.[A-Za-z~][A-Za-z0-9~]*)*$/<NEW_LINE>Returns empty string if not found. */<NEW_LINE>private static String match_suffix(String str) {<NEW_LINE>String match = "";<NEW_LINE>boolean read_alpha = false;<NEW_LINE>while (str.length() > 0) {<NEW_LINE>if (re... | 1, str.length()); |
388,415 | private void sweep() {<NEW_LINE>if (!incomingMessages.isEmpty()) {<NEW_LINE>final long start = ClockUtil.nanoRealtime();<NEW_LINE>final long oldestAllowed = start - TimeUnit.MILLISECONDS.toNanos(exchangeLifetime);<NEW_LINE>// Notice that ConcurrentHashMap guarantees the correctness for this iteration.<NEW_LINE>for (Map... | remove(entry.getKey()); |
1,289,455 | ActionResult<Wo> execute(String id, String path0) throws Exception {<NEW_LINE>Callable<ActionResult<Wo>> callable = new Callable<ActionResult<Wo>>() {<NEW_LINE><NEW_LINE>public ActionResult<Wo> call() throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_... | result = new ActionResult<>(); |
244,844 | public void initVariableTypes() {<NEW_LINE>if (variableTypes == null) {<NEW_LINE>variableTypes = new DefaultVariableTypes();<NEW_LINE>if (customPreVariableTypes != null) {<NEW_LINE>for (VariableType customVariableType : customPreVariableTypes) {<NEW_LINE>variableTypes.addType(customVariableType);<NEW_LINE>}<NEW_LINE>}<... | (getMaxLengthString() + 1)); |
1,853,226 | public void whenEventTypeRepartitionedTheNewSubscriptionShouldHaveUpdatedPartition() throws Exception {<NEW_LINE>final EventType eventType = NakadiTestUtils.createBusinessEventTypeWithPartitions(1);<NEW_LINE>NakadiTestUtils.publishBusinessEventWithUserDefinedPartition(eventType.getName(), 1, x -> "{\"foo\":\"bar\"}", p... | x + "\"}", p -> "1"); |
711,283 | public static DescribeDataLimitSetResponse unmarshall(DescribeDataLimitSetResponse describeDataLimitSetResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDataLimitSetResponse.setRequestId(_ctx.stringValue("DescribeDataLimitSetResponse.RequestId"));<NEW_LINE>DataLimitSet dataLimitSet = new DataLimitSet();<NEW_LINE>d... | ("DescribeDataLimitSetResponse.DataLimitSet.DataLimitList[" + i + "].LogStoreDay")); |
967,144 | private Object createFeature(ConfigurationSetting item) throws IOException {<NEW_LINE>Feature feature;<NEW_LINE>if (item.getContentType() != null && item.getContentType().equals(FEATURE_FLAG_CONTENT_TYPE)) {<NEW_LINE>try {<NEW_LINE>String key = item.getKey().trim().substring(FEATURE_FLAG_PREFIX.length());<NEW_LINE>Feat... | ), item.getContentType()); |
1,558,755 | private void handle(ByteBuffer dataBuffer) {<NEW_LINE>boolean hasRemaining = true;<NEW_LINE>int offset = 0;<NEW_LINE>while (hasRemaining) {<NEW_LINE>ProtoHandlerResult result = proto.handle(dataBuffer, offset, isSupportCompress);<NEW_LINE>switch(result.getCode()) {<NEW_LINE>case PART_OF_BIG_PACKET:<NEW_LINE>if (!result... | dataBuffer, result.getOffset()); |
426,827 | public GraphQLProjectionInfo make(String query) {<NEW_LINE>Parser parser = new Parser();<NEW_LINE>Document parsedDocument;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new InvalidEntityBodyException("Can't parse query: " + query);<NEW_LINE>}<NEW_LINE>// resolve fragment definitions<NEW... | parsedDocument = parser.parseDocument(query); |
1,037,309 | final DescribeImagesResult executeDescribeImages(DescribeImagesRequest describeImagesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeImagesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
619,840 | public ModelsMap postProcessModels(ModelsMap objs) {<NEW_LINE>List<ModelMap> models = objs.getModels();<NEW_LINE>// add x-index to properties<NEW_LINE>ProcessUtils.addIndexToProperties(models);<NEW_LINE>// add x-data-type to store powershell type<NEW_LINE>for (ModelMap _model : models) {<NEW_LINE>CodegenModel model = _... | ("x-powershell-data-type", getPSDataType(cp)); |
747,652 | private void tileHorizontallyAndVertically(Canvas canvas) {<NEW_LINE>Bitmap bitmap = m_bitmap;<NEW_LINE>int imageHeight = bitmap.getHeight();<NEW_LINE>int imageWidth = bitmap.getWidth();<NEW_LINE>int canvasHeight = canvas.getHeight();<NEW_LINE>int canvasWidth = canvas.getWidth();<NEW_LINE>for (int y = 0; y < canvasHeig... | Math.min(remainingWidth, imageWidth); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.