idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,253,681 | public static <T extends ImageBase<T>> T meanB(T input, @Nullable T output, int radiusX, int radiusY, @Nullable ImageBorder<T> border, @Nullable ImageBase storage, @Nullable GrowArray workVert) {<NEW_LINE>if (input instanceof GrayU8) {<NEW_LINE>return (T) BlurImageOps.meanB((GrayU8) input, (GrayU8) output, radiusX, rad... | , (ImageGray) storage, workVert); |
760,729 | public static DescribeTemplateResponse unmarshall(DescribeTemplateResponse describeTemplateResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeTemplateResponse.setRequestId(_ctx.stringValue("DescribeTemplateResponse.RequestId"));<NEW_LINE>describeTemplateResponse.setId(_ctx.stringValue("DescribeTemplateResponse.Id")... | (_ctx.stringValue("DescribeTemplateResponse.JpgOverwrite")); |
938,243 | private void incrementalSearch() {<NEW_LINE>if (getActualTextComponent() == null || getActualTextComponent().getCaret() == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String incrementalSearchText = incSearchTextField.getText();<NEW_LINE>boolean empty <MASK><NEW_LINE>// Enable/disable the pre/next buttons<NEW_LINE>find... | = incrementalSearchText.length() <= 0; |
457,849 | public ArrayBuilder<T> addNonNulls(T... elements) {<NEW_LINE>if (elements == null)<NEW_LINE>return this;<NEW_LINE>if (array == null) {<NEW_LINE>array = elements;<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>int nonNulls = 0;<NEW_LINE>for (T element : elements) {<NEW_LINE>if (element != null)<NEW_LINE>nonNulls++;<NEW_LINE>... | newArray, 0, array.length); |
1,375,262 | private void addGoalsNotIncludedInTargetCriteria(List<ExecutionResult> results) {<NEW_LINE>List<Properties.Criterion> requiredCriteria = new ArrayList<>(Arrays.asList(Properties.Criterion.OUTPUT, Properties.Criterion.INPUT, Properties.Criterion.METHOD, Properties.Criterion.METHODNOEXCEPTION, Properties.Criterion.EXCEPT... | results = getUpdatedResults(requiredCriteria, results); |
402,058 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player opponent = game.getPlayer(targetPointer.getFirst(game, source));<NEW_LINE>if (opponent == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>opponent.revealCards(CardUtil.getSourceName(game, source), opponent.getHand(), game);<NEW_LINE>Player controller ... | target.getFirstTarget(), game); |
1,067,193 | public void gatherInformation(MajorCompactionRequest request) throws IOException {<NEW_LINE>super.gatherInformation(request);<NEW_LINE>Predicate<SummarizerConfiguration> summarizerPredicate = conf -> conf.getClassName().equals(DeletesSummarizer.class.getName()) && conf.getOptions().isEmpty();<NEW_LINE>long total = 0;<N... | ratio = deletes / (double) nonDeletes; |
827,266 | protected boolean doEval(TreeLogger logger, DeferredBindingQuery query) throws UnableToCompleteException {<NEW_LINE>TypeOracle typeOracle = query.getTypeOracle();<NEW_LINE>String testType = query.getTestType();<NEW_LINE>JClassType <MASK><NEW_LINE>if (fromType == null) {<NEW_LINE>CompilationProblemReporter.logErrorTrace... | fromType = typeOracle.findType(testType); |
1,433,139 | protected CacheResult do_REMOVE_ALL(Set<? extends K> keys) {<NEW_LINE>try {<NEW_LINE>byte[][] newKeys = keys.stream().map((k) -> buildKey(k)).toArray((len) -> new byte[keys.size()][]);<NEW_LINE>RedisFuture<Long> <MASK><NEW_LINE>CacheResult result = new CacheResult(future.handle((v, ex) -> {<NEW_LINE>if (ex != null) {<N... | future = keyAsyncCommands.del(newKeys); |
1,309,914 | final CreateWorkerConfigurationResult executeCreateWorkerConfiguration(CreateWorkerConfigurationRequest createWorkerConfigurationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createWorkerConfigurationRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,537,093 | private void export() {<NEW_LINE>if (out.getFluidAmount() <= 0)<NEW_LINE>return;<NEW_LINE>IBlockState state = worldObj.getBlockState(getPos());<NEW_LINE>if (state == null || state.getBlock() != BuildCraftFactory.energyHeaterBlock)<NEW_LINE>return;<NEW_LINE>EnumFacing curFace = state.getValue(BlockBuildCraftBase.FACING_... | getOpposite(), stack, true); |
879,713 | final SetRepositoryPolicyResult executeSetRepositoryPolicy(SetRepositoryPolicyRequest setRepositoryPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(setRepositoryPolicyRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<SetReposit... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
257,161 | public Rect addImage(File file, String rootPath) {<NEW_LINE>BufferedImage image;<NEW_LINE>try {<NEW_LINE>image = ImageIO.read(file);<NEW_LINE>} catch (IOException ex) {<NEW_LINE>throw new RuntimeException("Error reading image: " + file, ex);<NEW_LINE>}<NEW_LINE>if (image == null)<NEW_LINE>throw new RuntimeException("Un... | "Path '" + name + "' does not start with root: " + rootPath); |
1,170,271 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String flag) throws Exception {<NEW_LINE>logger.print("{} delete query flag:{}.", effectivePerson.getDistinguishedName(), flag);<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = ne... | ), query.getId()); |
1,388,115 | protected ReturnCode generateServerEnv(boolean generatePassword) {<NEW_LINE>BufferedWriter bw = null;<NEW_LINE>File serverEnv = getConfigFile("server.env");<NEW_LINE>try {<NEW_LINE>char[] keystorePass = PasswordGenerator.generateRandom();<NEW_LINE>String serverEnvContents = FileUtils.readFile(serverEnv);<NEW_LINE>Strin... | toWrite += System.getProperty("line.separator"); |
1,193,653 | public void testTimeout(Map<String, String> param, StringBuilder ret) {<NEW_LINE>String serverIP = param.get("serverIP");<NEW_LINE>String serverPort = param.get("serverPort");<NEW_LINE>String timeout = param.get("timeout");<NEW_LINE>long longTimeout = 0L;<NEW_LINE>String res = null;<NEW_LINE>ClientBuilder cb = ClientBu... | = "[Timeout Error]:" + expected.toString(); |
618,090 | public //<NEW_LINE>void onSurfaceCreated(GL10 glUnused, EGLConfig config) {<NEW_LINE>String vShaderStr = "#version 300 es \n" + "layout(location = 0) in vec4 a_color; \n" + "layout(location = 1) in vec4 a_position; \n" + "out vec4 v_color; \n" + "void main() ... | + "{ \n" + " v_color = a_color; \n" + " gl_Position = a_position; \n" + "}"; |
1,196,397 | private static EnumActionResult rotateTorch(World world, BlockPos pos, IBlockState state, EnumFacing sideWrenched) {<NEW_LINE>if (state.getBlock() instanceof BlockTorch) {<NEW_LINE>Predicate<EnumFacing> tester = toTry -> {<NEW_LINE>BlockPos offsetPos = pos.offset(toTry.getOpposite());<NEW_LINE>IBlockState offsetState =... | BlockTorch.FACING, ROTATE_TORCH, tester); |
1,216,880 | private static boolean putPlayableDuration(ContentResolver resolver, WritableMap image, Uri photoUri, boolean isVideo, boolean includePlayableDuration) {<NEW_LINE>image.putNull("playableDuration");<NEW_LINE>if (!includePlayableDuration || !isVideo) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>boolean success = true;<NEW... | photoUri.toString(), e); |
855,913 | private boolean assertConsistentWithClusterState(ClusterState state) {<NEW_LINE>final SnapshotsInProgress snapshotsInProgress = state.custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY);<NEW_LINE>if (snapshotsInProgress.entries().isEmpty() == false) {<NEW_LINE>synchronized (endingSnapshots) {<NEW_LINE>final Set... | collect(Collectors.toSet()); |
1,686,405 | public void addActionProvider(AnnotatedActions actionProvider, Map<String, Object> properties) {<NEW_LINE>Collection<ModuleInformation> moduleInformations = helper.parseAnnotations(actionProvider);<NEW_LINE>String configName = getConfigNameFromService(properties);<NEW_LINE>for (ModuleInformation mi : moduleInformations... | mi.getUID(), moduleInformation); |
495,172 | // Speech synthesis bookmark event.<NEW_LINE>public static void synthesisBookmarkEventAsync() throws InterruptedException, ExecutionException {<NEW_LINE>// Creates an instance of a speech config with specified<NEW_LINE>// subscription key and service region. Replace with your own subscription key<NEW_LINE>// and servic... | = new SpeechSynthesizer(config, null); |
1,361,428 | private boolean sendEmail(SendMessageEntity message, String receiver, Sender sender) {<NEW_LINE>String title = message.getTitle().replaceAll(",", " ");<NEW_LINE>String content = message.getContent(<MASK><NEW_LINE>String urlPrefix = sender.getUrl();<NEW_LINE>String urlPars = m_senderConfigManager.queryParString(sender);... | ).replaceAll(",", " "); |
945,016 | public void menuWillBeShown(MenuItem menu, Object targets) {<NEW_LINE>menu.removeAllChildItems();<NEW_LINE>boolean enabled = false;<NEW_LINE>Object[] rows;<NEW_LINE>if (targets instanceof Object[]) {<NEW_LINE>rows = (Object[]) targets;<NEW_LINE>} else {<NEW_LINE>rows <MASK><NEW_LINE>}<NEW_LINE>if (rows.length > 0 && ro... | = new Object[] { targets }; |
477,384 | public <T extends Statement> ConfiguredStatement<T> inject(final ConfiguredStatement<T> statement) {<NEW_LINE>if (!(statement.getStatement() instanceof DropStatement)) {<NEW_LINE>return statement;<NEW_LINE>}<NEW_LINE>final DropStatement dropStatement = <MASK><NEW_LINE>if (!dropStatement.isDeleteTopic()) {<NEW_LINE>retu... | (DropStatement) statement.getStatement(); |
1,636,400 | private Collection<SubstitutableColumnNameToken> generateSQLTokens(final Collection<ColumnSegment> columnSegments, final Map<String, String> columnExpressionTableNames) {<NEW_LINE>Collection<SubstitutableColumnNameToken> result = new LinkedHashSet<>();<NEW_LINE>for (ColumnSegment each : columnSegments) {<NEW_LINE>Strin... | getIdentifier().getValue()); |
736,817 | public static Exception writeGpx(Writer output, GPXFile file, IProgress progress) {<NEW_LINE>if (progress != null) {<NEW_LINE>progress.<MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>XmlSerializer serializer = PlatformUtil.newSerializer();<NEW_LINE>serializer.setOutput(output);<NEW_LINE>// $NON-NLS-1$<NEW_LINE>serializer.set... | startWork(file.getItemsToWriteSize()); |
1,590,354 | private void fillTrackedCollection(Collection<Object> dest, ORecordElement parent, Collection<Object> source) {<NEW_LINE>for (Object cur : source) {<NEW_LINE>if (cur instanceof ODocument) {<NEW_LINE>((ODocument) cur).addOwner((ORecordElement) dest);<NEW_LINE>((<MASK><NEW_LINE>((ODocument) cur).clearTrackData();<NEW_LIN... | ODocument) cur).convertAllMultiValuesToTrackedVersions(); |
1,204,301 | static void bulkWrite(BigtableOptions options) throws IOException, GeneralSecurityException {<NEW_LINE>BigtableTableAdminSettings adminSettings = BigtableTableAdminSettings.newBuilder().setProjectId(options.getProject()).setInstanceId(options.getBigtableInstanceId()).build();<NEW_LINE>BigtableTableAdminClient adminClie... | * MB_PER_SEC / newTableIds.size(); |
1,516,697 | public void caseTableSwitchStmt(TableSwitchStmt stmt) {<NEW_LINE>p.openBlock();<NEW_LINE>String varName = printValueAssignment(stmt.getKey(), "key");<NEW_LINE>int lowIndex = stmt.getLowIndex();<NEW_LINE>p.println("int lowIndex=" + lowIndex + ";");<NEW_LINE>int highIndex = stmt.getHighIndex();<NEW_LINE>p.println("int hi... | println("targets.add(" + nameOfJumpTarget + ")"); |
252,511 | public static Map<String, String> updatePartitionMetadataWithFileNamesAndSizes(PartitionUpdate partitionUpdate, Map<String, String> metadata) {<NEW_LINE>ImmutableMap.Builder<String, String> partitionMetadata = ImmutableMap.builder();<NEW_LINE>List<FileWriteInfo> fileWriteInfos = new ArrayList<>(partitionUpdate.getFileW... | , fileSizes.size())); |
972,848 | public void invoke(List<PdfObject> operands, PdfContentStreamHandler handler, PdfDictionary resources) {<NEW_LINE>PdfName dictionaryName = (PdfName) operands.get(0);<NEW_LINE>PdfDictionary extGState = <MASK><NEW_LINE>if (extGState == null) {<NEW_LINE>throw new IllegalArgumentException(MessageLocalization.getComposedMes... | resources.getAsDict(PdfName.EXTGSTATE); |
356,739 | public void createLayers(@NonNull OsmandMapTileView mapView) {<NEW_LINE>// first create to make accessible<NEW_LINE>mapTextLayer = new MapTextLayer(app);<NEW_LINE>// 5.95 all labels<NEW_LINE>mapView.addLayer(mapTextLayer, 5.95f);<NEW_LINE>// 8. context menu layer<NEW_LINE>contextMenuLayer = new ContextMenuLayer(app);<N... | mapView.addLayer(gpxLayer, 0.9f); |
936,736 | public GetterDetails analyze(Class<?> getterType) {<NEW_LINE>Objects.requireNonNull(getterType, "getterType");<NEW_LINE>if (!getterType.isInterface()) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>Method[] methods = getterType.getDeclaredMethods();<NEW_LINE>if (methods.length != 1) {<NEW_LINE>throw new IllegalArgumen... | IllegalArgumentException("getterType " + getterType + "is not an interface"); |
409,417 | public Long sumQywxWorkDayUnitForDayWithMonth(String year, String month, String unit) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer(<MASK><NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> query = cb.createQuery(Long.class);<NEW_LINE>Root<StatisticQywxUnitF... | ).get(StatisticQywxUnitForDay.class); |
1,644,533 | public static DescribeJobLogResponse unmarshall(DescribeJobLogResponse describeJobLogResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeJobLogResponse.setRequestId(_ctx.stringValue("DescribeJobLogResponse.RequestId"));<NEW_LINE>describeJobLogResponse.setCode(_ctx.integerValue("DescribeJobLogResponse.Code"));<NEW_LI... | (_ctx.stringValue("DescribeJobLogResponse.ErrMsg")); |
729,240 | /* (non-Javadoc)<NEW_LINE>* @see org.saiku.web.service.ISessionService#login(javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.String)<NEW_LINE>*/<NEW_LINE>public Map<String, Object> login(HttpServletRequest req, String username, String password) {<NEW_LINE>pah.startAudit("Saiku", "Login", this.getClas... | authenticate(req, username, password); |
1,815,121 | protected Object deserializeWithUnwrapped(JsonParser p, DeserializationContext ctxt, Object builder, TokenBuffer tokens) throws IOException {<NEW_LINE>final Class<?> activeView = _needViewProcesing ? ctxt.getActiveView() : null;<NEW_LINE>for (JsonToken t = p.currentToken(); t == JsonToken.FIELD_NAME; t = p.nextToken())... | p, ctxt, builder, tokens); |
1,136,455 | public static <R> List<R> processIntersectingRetrievals(List<IndexCall<R>> retrievals, final int limit) {<NEW_LINE>Preconditions.checkArgument(!retrievals.isEmpty());<NEW_LINE>Preconditions.checkArgument(limit >= 0, "Invalid limit: %s", limit);<NEW_LINE>List<R> results;<NEW_LINE>// TODO: smarter limit estimation<NEW_LI... | = (Set<R>) subResult; |
1,308,514 | private int load_lob_contents() throws IOException {<NEW_LINE>if (_lob_loaded == LOB_STATE.EMPTY) {<NEW_LINE>load_lob_save_point();<NEW_LINE>}<NEW_LINE>if (_lob_loaded == LOB_STATE.READ) {<NEW_LINE>long raw_size = _current_value_save_point.length();<NEW_LINE>if (raw_size < 0 || raw_size > Integer.MAX_VALUE) {<NEW_LINE>... | assert (_lob_loaded == LOB_STATE.FINISHED); |
1,019,647 | public void executeAdsPolicy() {<NEW_LINE>// [START pred_ads_policy]<NEW_LINE>FirebaseRemoteConfig config = FirebaseRemoteConfig.getInstance();<NEW_LINE>String adPolicy = config.getString("ads_policy");<NEW_LINE>boolean will_not_spend = config.getBoolean("will_not_spend");<NEW_LINE>AdView mAdView = findViewById(R.id.ad... | ("ads_policy_set", new Bundle()); |
1,079,309 | public void addFile(DocumentsStorageProvider.Document document) {<NEW_LINE>if (document == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>OCFile file = document.getFile();<NEW_LINE>final int iconRes = MimeTypeUtil.getFileTypeIconId(file.getMimeType(), file.getFileName());<NEW_LINE>final String mimeType = file.isFolder() ... | add(Document.COLUMN_MIME_TYPE, mimeType); |
392,902 | private void addHttpHandlers(ChannelHandlerContext ctx) {<NEW_LINE>final Channel ch = ctx.channel();<NEW_LINE>final ChannelPipeline p = ctx.pipeline();<NEW_LINE>final long idleTimeoutMillis = config.idleTimeoutMillis();<NEW_LINE>final long maxConnectionAgeMillis = config.maxConnectionAgeMillis();<NEW_LINE>final int max... | , ch, SCHEME_HTTPS, encoder)); |
694,071 | private EvaluationResult evaluateFeelExpression(final Expression expression, final EvaluationContext context, final FeelExpression feelExpression) {<NEW_LINE>final var parsedExpression = feelExpression.getParsedExpression();<NEW_LINE>final var feelContext = new FeelVariableContext(context);<NEW_LINE>final Either<Failur... | Val) result, messagePackTransformer::toMessagePack); |
1,688,437 | private void encodeResponseAsString(CharBuf buf, Response<Object> response, boolean encodeAddress) {<NEW_LINE>buf.addChar(PROTOCOL_MESSAGE_TYPE_RESPONSE);<NEW_LINE>buf.addChar(PROTOCOL_SEPARATOR);<NEW_LINE>buf.add(response.id());<NEW_LINE>buf.addChar(PROTOCOL_SEPARATOR);<NEW_LINE>buf.add(response.address());<NEW_LINE>b... | Object body = response.body(); |
1,564,872 | protected void processObject(XMLElement e) {<NEW_LINE>imbricatedObjects++;<NEW_LINE>String type = e.getAttribute("type");<NEW_LINE>String data = e.getAttribute("data");<NEW_LINE>if (data != null) {<NEW_LINE>processSrc(e.getName(), data);<NEW_LINE>data = PathUtil.resolveRelativeReference(base, data);<NEW_LINE>}<NEW_LINE... | allowedProperties.add(ITEM_PROPERTIES.SVG); |
815,434 | private int findMinGroupIndex(int minGroupIndex, TextRegion<?> region, int removeStartOffset, int removeEndOffset) {<NEW_LINE>BlockCompare bc = BlockCompare.get(removeStartOffset, removeEndOffset, region.startOffset(<MASK><NEW_LINE>TextSyncGroup<?> group = region.textSync().group();<NEW_LINE>boolean scanChildren = fals... | ), region.endOffset()); |
1,421,432 | public static // for n = 0, 1 . . . N - 1 and m = 0, 1. . . n<NEW_LINE>List<ArrayList<Double>> hetAltDepthDistribution(final int N) {<NEW_LINE>final List<ArrayList<Double>> table = new ArrayList<>();<NEW_LINE>for (int n = 0; n < N; n++) {<NEW_LINE>final ArrayList<Double> <MASK><NEW_LINE>// add the 0th element, then ele... | nthRow = new ArrayList<>(); |
741,972 | final DBCluster executeFailoverDBCluster(FailoverDBClusterRequest failoverDBClusterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(failoverDBClusterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field... | DBCluster>(new DBClusterStaxUnmarshaller()); |
205,488 | // private final PLogger logger = PLoggerFactory.getLogger(getClass());<NEW_LINE>@Override<NEW_LINE>public byte[] doInTransform(Instrumentor instrumentor, ClassLoader classLoader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) throws InstrumentException {<NEW_... | ExecutorExecuteInterceptor.class, AgentSdkAsyncConstants.AGENT_SDK_ASYNC_SCOPE); |
1,836,141 | public void handle(InputStream in, OutputStream out) throws IOException {<NEW_LINE>Map<String, Object> req = (Map) JSONValue.parse(in);<NEW_LINE>// logger.debug("request: {}", req);<NEW_LINE>String method = (String) req.get(HTTP_METHOD);<NEW_LINE>String path = (String) req.get(PATH);<NEW_LINE>Map<String, List<String>> ... | (JsonUtils.toJsonBytes(res)); |
1,211,926 | static Workspace loadUncached(@NotNull Project project) {<NEW_LINE>if (project.isDisposed()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final VirtualFile workspaceFile = findWorkspaceFile(project);<NEW_LINE>if (workspaceFile == null)<NEW_LINE>return null;<NEW_LINE>final VirtualFile root = workspaceFile.getParent();<NE... | = "../READONLY/" + root.getName(); |
1,103,707 | public String generateSqoopJob(SqoopParameters sqoopParameters, SqoopTaskExecutionContext sqoopTaskExecutionContext) {<NEW_LINE>String sqoopScripts = "";<NEW_LINE>if (SqoopJobType.TEMPLATE.getDescp().equals(sqoopParameters.getJobType())) {<NEW_LINE>createSqoopJobGenerator(sqoopParameters.getSourceType(), sqoopParameter... | ).replaceAll("\\r\\n", "\n"); |
1,309,099 | private PublicKey createECPublicKey() {<NEW_LINE>String crv = (String) jwk.getOtherClaims().get(ECPublicJWK.CRV);<NEW_LINE>BigInteger x = new BigInteger(1, Base64Url.decode((String) jwk.getOtherClaims().get(ECPublicJWK.X)));<NEW_LINE>BigInteger y = new BigInteger(1, Base64Url.decode((String) jwk.getOtherClaims().get(EC... | ), spec.getN()); |
1,530,102 | public static DescribeBackupPlansResponse unmarshall(DescribeBackupPlansResponse describeBackupPlansResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBackupPlansResponse.setRequestId(_ctx.stringValue("DescribeBackupPlansResponse.RequestId"));<NEW_LINE>describeBackupPlansResponse.setSuccess(_ctx.booleanValue("Descr... | = new ArrayList<BackupPlan>(); |
321,803 | private void addProducer(AfterBeanDiscovery event, RequiredProducer required) {<NEW_LINE>String name = required.internal.name();<NEW_LINE>Type type = required.type;<NEW_LINE>InjectionProvider.InjectionType<?> found = findInjectionProvider(type).orElseThrow(() -> <MASK><NEW_LINE>event.addBean(new QualifiedBean<>(VaultCd... | new DeploymentException("Could not find valid injection provider for type " + type)); |
1,790,396 | protected void openImage(boolean reopen, String name, BufferedImage buffered) {<NEW_LINE>synchronized (lockStartingProcess) {<NEW_LINE>if (startingProcess) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>startingProcess = true;<NEW_LINE>}<NEW_LINE>synchronized (inputStreams) {<NEW_LINE>if (inputStreams.size() !=... | System.out.println("Ignoring image request. Detected spamming"); |
565,313 | private CompletableFuture<List<Wo>> searchScript(final Wi wi, final List<String> appIdList, final List<String> designerIdList) {<NEW_LINE>CompletableFuture<List<Wo>> cf = CompletableFuture.supplyAsync(() -> {<NEW_LINE>List<Wo> resWos = new ArrayList<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainer... | setAppName(appInfo.getAppName()); |
43,699 | private void scanWithPredicate(Predicate predicate, BiConsumer consumer) {<NEW_LINE>// needed for optimization where key and value are not an instance of Data type<NEW_LINE>final boolean areKeyValueObjectType = !queryCacheConfig.isSerializeKeys() && InMemoryFormat.OBJECT == queryCacheConfig.getInMemoryFormat();<NEW_LIN... | = new CachedQueryEntry(ss, extractors); |
785,349 | static SwitchModel createSwitchModel(ObservableValue input1, ObservableValue input2, ObservableValue output1, ObservableValue output2) throws NodeException {<NEW_LINE>if (input1 instanceof CommonBusValue) {<NEW_LINE>if (input2 instanceof CommonBusValue) {<NEW_LINE>final CommonBusValue in1 = (CommonBusValue) input1;<NEW... | return new UniDirectionalSwitch(input2, output1); |
1,464,188 | public static void addToCalendar(@NonNull final Activity activity, @NonNull final Geocache cache) {<NEW_LINE>final Date hiddenDate = cache.getHiddenDate();<NEW_LINE>if (hiddenDate == null) {<NEW_LINE>// This should not happen, because menu entries to add caches to the calendar are enabled<NEW_LINE>// only if the cache ... | = new CalendarEntry(cache, hiddenDate); |
975,327 | public double calc(String left, String right) {<NEW_LINE>if (left.length() == 0 || right.length() == 0) {<NEW_LINE>return 0.0;<NEW_LINE>}<NEW_LINE>int lenL = left.length() + 1;<NEW_LINE>int lenR = right.length() + 1;<NEW_LINE>// make the shorter string "right"<NEW_LINE>if (lenL < lenR) {<NEW_LINE>String t = right;<NEW_... | new int[2][lenR]; |
1,720,134 | public // Used to show a Crouton dialog after saved (or tried to) a note<NEW_LINE>void onActivityResult(int requestCode, final int resultCode, Intent intent) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, intent);<NEW_LINE>switch(requestCode) {<NEW_LINE>case REQUEST_CODE_CATEGORY:<NEW_LINE>// Dialog retarde... | string.category_saved, ONStyle.CONFIRM); |
943,028 | public AirbyteConnectionStatus check(final JsonNode config) {<NEW_LINE>try {<NEW_LINE>final String datasetId = BigQueryUtils.getDatasetId(config);<NEW_LINE>final String datasetLocation = BigQueryUtils.getDatasetLocation(config);<NEW_LINE><MASK><NEW_LINE>final UploadingMethod uploadingMethod = BigQueryUtils.getLoadingMe... | final BigQuery bigquery = getBigQuery(config); |
406,580 | public void apply(ImmutableImage image) throws IOException {<NEW_LINE>ImmutableImage copy;<NEW_LINE>if (image.getType() == BufferedImage.TYPE_INT_ARGB || image.getType() == BufferedImage.TYPE_INT_RGB) {<NEW_LINE>copy = image;<NEW_LINE>} else {<NEW_LINE>copy = <MASK><NEW_LINE>}<NEW_LINE>DaisyFilter daisy = new DaisyFilt... | image.copy(BufferedImage.TYPE_INT_ARGB); |
1,076,773 | private void initializeLongRegisterClientTaskFactories() {<NEW_LINE>factories.put(LongRegisterDecrementAndGetCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new LongRegisterDecrementAndGetMessageTask(cm, node, con));<NEW_LINE>factories.put(LongRegisterGetAndAddCodec.REQUEST_MESSAGE_TYPE, (cm, con) -> new LongRegisterGetAndAdd... | (cm, node, con)); |
1,429,036 | private void termCategorizationFVT(Term term, Category category) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException, GlossaryAuthorFVTCheckedException {<NEW_LINE>String relType = TERM_CATEGORIZATION;<NEW_LINE>ResolvableType resolvableType = ResolvableType.forClassWithGenerics(SubjectA... | userId, guid, type, relType); |
979,150 | public File runFilter(final File file, final Map<String, String[]> parameters) {<NEW_LINE>final int qualityParam = parameters.get(getPrefix() + "q") != null ? Integer.parseInt(parameters.get(getPrefix() + "q")[0]) : 85;<NEW_LINE>Float quality = new Float(qualityParam);<NEW_LINE>quality = quality / 100;<NEW_LINE>final F... | writeParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); |
519,550 | private double interpolateNoise2d(int blockX, int blockZ, double[] noises, int noiseDepth) {<NEW_LINE>int idxX = blockX / 4;<NEW_LINE>int idxZ = blockZ / 4;<NEW_LINE>double noise00 = noises[(idxX) * noiseDepth + idxZ];<NEW_LINE>double noise01 = noises[(idxX) * noiseDepth + idxZ + 1];<NEW_LINE>double noise10 = noises[(i... | relX / 4, noise01, noise11); |
808,344 | private void checkNetworkReady() {<NEW_LINE>int i = 0;<NEW_LINE>boolean isReady = false;<NEW_LINE>while (i < 30) {<NEW_LINE>String ipAddr = NetworkHelper.getLocalIP();<NEW_LINE>if (StringHelper.isEmpty(ipAddr) || "127.0.0.1".equals(ipAddr)) {<NEW_LINE>ThreadHelper.suspend(1000);<NEW_LINE>i++;<NEW_LINE>log.warn(this, "W... | log.warn(this, "Micro-Service Computing Platform starts fail as network is not ready."); |
525,909 | public DeleteDashboardResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteDashboardResult deleteDashboardResult = new DeleteDashboardResult();<NEW_LINE>deleteDashboardResult.setStatus(context.getHttpResponse().getStatusCode());<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW... | class).unmarshall(context)); |
256,707 | public static AccessTokenResponse invokeAccessCodeToToken(KeycloakDeployment deployment, String code, String redirectUri, String sessionId) throws IOException, HttpFailure {<NEW_LINE>List<NameValuePair> formparams = new ArrayList<>();<NEW_LINE>redirectUri = stripOauthParametersFromRedirect(redirectUri);<NEW_LINE>formpa... | setClientCredentials(deployment, post, formparams); |
452,198 | void validate() throws ConfigurationException {<NEW_LINE>if (null == project) {<NEW_LINE>throw new ConfigurationException("project is required");<NEW_LINE>}<NEW_LINE>if (null == nodesUrl && properties.containsKey(URL)) {<NEW_LINE>try {<NEW_LINE>nodesUrl = new URL(properties.getProperty(URL));<NEW_LINE>} catch (Malforme... | e.getMessage(), e); |
1,336,444 | public INDArray exec(Op op, OpContext oc) {<NEW_LINE>checkForCompression(op);<NEW_LINE>if (op instanceof TransformOp) {<NEW_LINE>TransformOp t = (TransformOp) op;<NEW_LINE>invoke(t, oc);<NEW_LINE>} else if (op instanceof ReduceOp) {<NEW_LINE>ReduceOp acc = (ReduceOp) op;<NEW_LINE>invoke(acc, oc, acc.dimensions().toIntV... | ((CustomOp) op, oc); |
1,488,414 | public void monitor(ProcessTypes type, final Process process, final String completionMessage, final Mode mode, final Streams whichStreams) {<NEW_LINE>ProcessHolder newHolder = new ProcessHolder(process);<NEW_LINE>ProcessHolder previousHolder = processes.put(type, newHolder);<NEW_LINE>closeHolder(previousHolder);<NEW_LI... | .Type.ERROR, newHolder)); |
1,353,057 | protected BigDecimal computeDurationInHours(LeaveRequest leave, Employee employee, LocalDateTime fromDateT, LocalDateTime toDateT) throws AxelorException {<NEW_LINE>BigDecimal duration = BigDecimal.ZERO;<NEW_LINE>WeeklyPlanning weeklyPlanning = getWeeklyPlanning(leave, employee);<NEW_LINE>EventsPlanning <MASK><NEW_LINE... | holidayPlanning = getPublicHolidayEventsPlanning(leave, employee); |
1,232,351 | public void run() {<NEW_LINE>editor = base.getActiveEditor();<NEW_LINE>Sketch sketch = editor.getSketch();<NEW_LINE>if (sketch.isModified()) {<NEW_LINE>Messages.showWarning("Save", "Please save the sketch before archiving.");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>File location = sketch.getFolder();<NEW_LINE>String name ... | while (newbie.exists()); |
965,815 | public Request<StopInstancesRequest> marshall(StopInstancesRequest stopInstancesRequest) {<NEW_LINE>if (stopInstancesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<StopInstancesRequest> request = new DefaultRequest<StopInstancesReques... | (stopInstancesRequest.isForce())); |
673,628 | public boolean deleteRole(String roleId) throws DotDataException, DotStateException, DotSecurityException, SystemException, PortalException {<NEW_LINE>RoleAPI roleAPI = APILocator.getRoleAPI();<NEW_LINE>Role role = roleAPI.loadRoleById(roleId);<NEW_LINE>User user = getAdminUser();<NEW_LINE>String date = DateUtil.getCur... | "; RoleID: " + role.getId()); |
798,036 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000001) == 0x00000001)) {<NEW_LINE>com.google.protobuf.GeneratedMessageV3.writeString(output, 1, runId_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000002) == 0x00000002)) {<NEW_LINE>com.googl... | , headers_.get(i)); |
1,422,685 | public int updateAndIncrIfMatch(Entity<?> en, final Object obj, FieldFilter fieldFilter, String fieldName) {<NEW_LINE>final EntityOperator opt = _opt(en);<NEW_LINE>if (null == opt)<NEW_LINE>return 0;<NEW_LINE>if (fieldName == null)<NEW_LINE>fieldName = "version";<NEW_LINE>if (fieldFilter == null)<NEW_LINE>fieldFilter =... | setLocked("^" + fieldName + "$"); |
1,606,069 | protected void drawLeftPen(Graphics2D grx, JRPen topPen, JRPen leftPen, JRPen bottomPen, JRPrintElement element, int offsetX, int offsetY) {<NEW_LINE>Stroke leftStroke = JRPenUtil.getStroke(leftPen, BasicStroke.CAP_BUTT);<NEW_LINE>int height = element.getHeight();<NEW_LINE>float topOffset = topPen.getLineWidth() / 2;<N... | bottomOffset) / 3) / height); |
400,000 | public static Node createPathObjectIcon(PathObject pathObject, int width, int height) {<NEW_LINE>var color = ColorToolsFX.getDisplayedColor(pathObject);<NEW_LINE><MASK><NEW_LINE>var roiNucleus = PathObjectTools.getROI(pathObject, true);<NEW_LINE>if (roi == null)<NEW_LINE>roi = roiNucleus;<NEW_LINE>if (roi == null)<NEW_... | var roi = pathObject.getROI(); |
640,478 | public long offer(final DirectBufferVector[] vectors, final ReservedValueSupplier reservedValueSupplier) {<NEW_LINE>final int length = DirectBufferVector.validateAndComputeLength(vectors);<NEW_LINE>long newPosition = CLOSED;<NEW_LINE>if (!isClosed) {<NEW_LINE>final long limit = positionLimit.getVolatile();<NEW_LINE><MA... | final int termCount = activeTermCount(logMetaDataBuffer); |
1,725,272 | public Router socketHandler(Handler<SockJSSocket> sockHandler) {<NEW_LINE>router.route("/").useNormalizedPath(false).handler(rc -> {<NEW_LINE>if (LOG.isTraceEnabled())<NEW_LINE>LOG.trace("Returning welcome response");<NEW_LINE>rc.response().putHeader(HttpHeaders.CONTENT_TYPE, "text/plain; charset=UTF-8").end("Welcome t... | router, sessions, options, sockHandler); |
1,163,395 | private void saveL10N(DataOutputStream output, Hashtable l10n) throws IOException {<NEW_LINE>List keys = new ArrayList();<NEW_LINE>for (Object locale : l10n.keySet()) {<NEW_LINE>Hashtable current = (Hashtable) l10n.get(locale);<NEW_LINE>for (Object key : current.keySet()) {<NEW_LINE>if (!keys.contains(key)) {<NEW_LINE>... | .writeUTF((String) locale); |
914,185 | public void first() {<NEW_LINE>System.out.println("ENTER THE NUMBER OF PROCESSES");<NEW_LINE>int size = s.nextInt();<NEW_LINE>System.out.println("ENTER THE SIZES OF PROCESSES");<NEW_LINE>int[] s1 = new int[size];<NEW_LINE>for (int i = 0; i < size; i++) {<NEW_LINE>int a = s.nextInt();<NEW_LINE>s1[i] = a;<NEW_LINE>}<NEW_... | [j] -= s1[i]; |
69,818 | public void performJobUnit(final JobUnitContext context) {<NEW_LINE>final BasicNetwork network = (BasicNetwork) context.getJobUnit();<NEW_LINE>BufferedMLDataSet buffer = null;<NEW_LINE>MLDataSet useTraining = this.training;<NEW_LINE>if (this.training instanceof BufferedMLDataSet) {<NEW_LINE>buffer = (BufferedMLDataSet)... | networkHidden1Count = network.getLayerNeuronCount(1); |
1,342,443 | public void resourceChanged(IResourceChangeEvent event) {<NEW_LINE>if (event.getSource() instanceof IProject) {<NEW_LINE>cleanClassClache((IProject) event.getSource());<NEW_LINE>} else if (event.getResource() instanceof IProject) {<NEW_LINE>cleanClassClache((IProject) event.getResource());<NEW_LINE>} else if (event.get... | .add((IProject) resource); |
274,076 | private void checkCluster(int clusterId, OIndex index, List<String> fields) {<NEW_LINE>long totRecordsForCluster = database.countClusterElements(clusterId);<NEW_LINE>String clusterName = database.getClusterNameById(clusterId);<NEW_LINE>int totSteps = 5;<NEW_LINE>message("Checking cluster " + clusterName + " for index ... | long currentStep = count * totSteps / totRecordsForCluster; |
1,642,935 | ReferenceBinding resolve() {<NEW_LINE>if ((this.tagBits & TagBits.HasUnresolvedTypeVariables) == 0)<NEW_LINE>return this;<NEW_LINE>// can be recursive so only want to call once<NEW_LINE>this.tagBits &= ~TagBits.HasUnresolvedTypeVariables;<NEW_LINE>// still part of parameterized type ref<NEW_LINE>ReferenceBinding resolv... | ], this.environment, true); |
355,908 | public PCollection<KV<K, Iterable<KV<Instant, WindowedValue<KV<K, V>>>>>> expand(PCollection<KV<K, V>> input) {<NEW_LINE>WindowingStrategy<?, ?> inputWindowingStrategy = input.getWindowingStrategy();<NEW_LINE>// A KvCoder is required since this goes through GBK. Further, WindowedValueCoder<NEW_LINE>// is not registered... | > keyCoder = kvCoder.getKeyCoder(); |
320,571 | public NinjaRule parseNinjaRule() throws GenericParsingException {<NEW_LINE>parseExpected(NinjaToken.RULE);<NEW_LINE>String name = asString(parseExpected(NinjaToken.IDENTIFIER));<NEW_LINE>parseAndIgnoreWhitespace();<NEW_LINE>ImmutableSortedMap.Builder<NinjaRuleVariable, NinjaVariableValue> variablesBuilder = ImmutableS... | (parseExpected(NinjaToken.IDENTIFIER)); |
1,372,093 | private SqlNode createOrderNode(OrderOperator operator) {<NEW_LINE>SqlNode sqlNode;<NEW_LINE>if (functionColumnMap.containsKey(operator.getColumn())) {<NEW_LINE>sqlNode = functionColumnMap.get(operator.getColumn());<NEW_LINE>} else {<NEW_LINE>if (operator.getColumn() == null) {<NEW_LINE>sqlNode = SqlLiteral.createNull(... | { sqlNode }, SqlParserPos.ZERO); |
718,879 | public static BatchCreateModelResponse unmarshall(BatchCreateModelResponse batchCreateModelResponse, UnmarshallerContext _ctx) {<NEW_LINE>batchCreateModelResponse.setRequestId(_ctx.stringValue("BatchCreateModelResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>List<ModelItem> items = new ArrayList<ModelIt... | ("BatchCreateModelResponse.Data.Items[" + i + "].ModuleId")); |
811,963 | //<NEW_LINE>void calcRangeTicks() {<NEW_LINE>double dx = actual_maxx - actual_minx;<NEW_LINE>double dy = actual_maxy - actual_miny;<NEW_LINE>int sw = getWidth();<NEW_LINE>int sh = getHeight();<NEW_LINE>double border = 1.09345;<NEW_LINE>if (Math.abs(last_minx - actual_minx) + Math.abs(last_maxx - actual_maxx) > 0.1 * (a... | Math.floor(ty / mTickY); |
641,119 | public ActionRequestValidationException validate(ActionRequestValidationException validationException) {<NEW_LINE>if (maxPageSearchSize != null && (maxPageSearchSize < 10 || maxPageSearchSize > MultiBucketConsumerService.DEFAULT_MAX_BUCKETS)) {<NEW_LINE>validationException = addValidationError("pivot.max_page_search_si... | addAll(groups.getUsedNames()); |
1,336,213 | protected void read(JsonElement element) {<NEW_LINE>if (!element.isJsonPrimitive()) {<NEW_LINE>throw new ConfigValidationException(this, "Expected a JSON primitive, but found: " + element);<NEW_LINE>}<NEW_LINE>JsonPrimitive primitive = element.getAsJsonPrimitive();<NEW_LINE>if (!primitive.isString()) {<NEW_LINE>throw n... | .getDeclaringClass().getEnumConstants(); |
1,686,234 | public Expression rewriteLambdaExpression(LambdaExpression node, Context context, ExpressionTreeRewriter<Context> treeRewriter) {<NEW_LINE>// Use linked hash set to guarantee deterministic iteration order<NEW_LINE>LinkedHashSet<VariableReferenceExpression> referencedVariables = new LinkedHashSet<>();<NEW_LINE>Expressio... | addAll(node.getArguments()); |
1,033,617 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplCreateClass = "@public create inlined_class \"\"\"\n" + " public class MyFromClauseMethod {\n" + " public static MyBean[] getBeans() {\n" + " return new MyBean[] {new MyBean(1), new MyBean(2)};... | new SupportBean("E1", 10)); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.