idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,524,508 | final DBClusterSnapshotAttributesResult executeModifyDBClusterSnapshotAttribute(ModifyDBClusterSnapshotAttributeRequest modifyDBClusterSnapshotAttributeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(modifyDBClusterSnapshotAttributeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = ... | (super.beforeMarshalling(modifyDBClusterSnapshotAttributeRequest)); |
413,298 | public void updateQtyTU(final I_C_Invoice_Line_Alloc invoiceLineAlloc) {<NEW_LINE>final IProductBL productBL = <MASK><NEW_LINE>//<NEW_LINE>// Get Invoice Line<NEW_LINE>if (invoiceLineAlloc.getC_InvoiceLine_ID() <= 0) {<NEW_LINE>// shouldn't happen, but it's not really our business<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>f... | Services.get(IProductBL.class); |
136,614 | public void testDeliveryDelayForDifferentDelaysTopicClassicApi(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>TopicConnection con = jmsTCFBindings.createTopicConnection();<NEW_LINE>con.start();<NEW_LINE>Topic topic = (Topic) new InitialContext().lookup("java:comp/env/eis/topic");<... | ).getTimeInMillis() + delay); |
310,353 | public boolean preload(SourceLoader sourceLoader) {<NEW_LINE>SourceLibrary library = sourceLoader.getLibrary();<NEW_LINE>ModulePath modulePath = getModulePath();<NEW_LINE>ChildGroup group = null;<NEW_LINE>try (InputStream inputStream = getInputStream()) {<NEW_LINE>if (inputStream == null) {<NEW_LINE>return false;<NEW_L... | modulePath, null, false, false); |
1,471,801 | private double f(int state, Double[] dp, int[] history) {<NEW_LINE>if (dp[state] != null) {<NEW_LINE>return dp[state];<NEW_LINE>}<NEW_LINE>if (state == 0) {<NEW_LINE>return 0;<NEW_LINE>}<NEW_LINE>int p1, p2;<NEW_LINE>// Seek to find active bit position (p1)<NEW_LINE>for (p1 = 0; p1 < n; p1++) {<NEW_LINE>if ((state & (1... | p1) ^ (1 << p2); |
1,028,057 | public List<Map<String, String>> entries() {<NEW_LINE>if (raw.isEmpty())<NEW_LINE>return emptyList();<NEW_LINE>List<String> headers = raw.get(0);<NEW_LINE>List<Map<String, String>> headersAndRows = new ArrayList<>();<NEW_LINE>for (int i = 1; i < raw.size(); i++) {<NEW_LINE>List<String> row = raw.get(i);<NEW_LINE>Linked... | key = headers.get(j); |
990,386 | final ListTagsForResourceResult executeListTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTagsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
315,280 | public TransferResult<V, S> visitFieldAccess(FieldAccessNode n, TransferInput<V, S> p) {<NEW_LINE>TransferResult<V, S> result = super.visitFieldAccess(n, p);<NEW_LINE>assert !result.containsTwoStores();<NEW_LINE>S store = result.getRegularStore();<NEW_LINE>if (store.isFieldInitialized(n.getElement()) && n.getReceiver()... | inv, oldResultValue.getUnderlyingType()); |
237,906 | public com.amazonaws.services.lexruntime.model.UnsupportedMediaTypeException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.lexruntime.model.UnsupportedMediaTypeException unsupportedMediaTypeException = new com.amazonaws.services.lexruntime.model.UnsupportedMed... | int originalDepth = context.getCurrentDepth(); |
992,443 | public Flux<CommandResponse<GroupCommand, String>> xGroup(Publisher<GroupCommand> commands) {<NEW_LINE>return connection.execute(cmd -> Flux.from(commands).concatMap(command -> {<NEW_LINE>Assert.notNull(command.getKey(), "Key must not be null!");<NEW_LINE>Assert.notNull(command.getGroupName(), "GroupName must not be nu... | getReadOffset().getOffset()); |
609,958 | public void translate(ProxySession session, ServerPlayerActionAckPacket packet) {<NEW_LINE>if (!packet.isSuccessful()) {<NEW_LINE>log.info(TextFormat.GRAY + "(debug) Player action not successful: " + packet.getAction().name());<NEW_LINE>// return;<NEW_LINE>}<NEW_LINE>LevelEventPacket levelEventPacket = new LevelEventPa... | levelEventPacket.setType(LevelEventType.BLOCK_STOP_BREAK); |
670,575 | public double modifiedDurationFromYield(ResolvedFixedCouponBond bond, LocalDate settlementDate, double yield) {<NEW_LINE>ImmutableList<FixedCouponBondPaymentPeriod> payments = bond.getPeriodicPayments();<NEW_LINE>int nCoupon = payments.size() - couponIndex(payments, settlementDate);<NEW_LINE>FixedCouponBondYieldConvent... | LocalDate maturityDate = bond.getUnadjustedEndDate(); |
612,134 | MethodTree generateFormMethod(TreeMaker maker, WorkingCopy copy) {<NEW_LINE>// NOI18N<NEW_LINE>String mvMapClass = "javax.ws.rs.core.MultivaluedMap";<NEW_LINE>TypeElement mvMapEl = copy.getElements().getTypeElement(mvMapClass);<NEW_LINE>// NOI18N<NEW_LINE>String mvType = mvMapEl == null ? mvMapClass : "MultivaluedMap";... | getTreeMaker().QualIdent(mvMapEl); |
1,089,698 | protected Control createDialogArea(Composite parent) {<NEW_LINE>Composite compositeTop = (Composite) super.createDialogArea(parent);<NEW_LINE>String titleMsg;<NEW_LINE>if (confirmPassword)<NEW_LINE>titleMsg = Messages.passwordChangeTitle;<NEW_LINE>else if (passwordChange)<NEW_LINE>titleMsg = Messages.messageLoginChange... | Composite(compositeTop, SWT.NONE); |
1,056,278 | public void fetchEnd(DBCSession session, DBCResultSet resultSet) throws DBCException {<NEW_LINE>WebSession webSession = contextInfo.getProcessor().getWebSession();<NEW_LINE>DBSEntity entity = dataContainer instanceof DBSEntity ? (DBSEntity) dataContainer : null;<NEW_LINE>try {<NEW_LINE>DBExecUtils.bindAttributes(sessio... | , row[i], dataFormat); |
1,225,034 | public Object call(Job<Object> job, Map<String, Object> parameters) {<NEW_LINE>this.checkAndCollectParameters(parameters);<NEW_LINE>// Read configuration<NEW_LINE>try {<NEW_LINE>this.initializeConfig((ComputerJob) job);<NEW_LINE>} catch (Exception e) {<NEW_LINE>throw new HugeException("Failed to initialize computer con... | configs.putAll(this.commonConfig); |
163,571 | public static void renderWires(TilePipeHolder pipe, double x, double y, double z, BufferBuilder bb) {<NEW_LINE>int combinedLight = pipe.getWorld().getCombinedLight(pipe.getPipePos(), 0);<NEW_LINE>int skyLight = combinedLight >> 16 & 0xFFFF;<NEW_LINE>int blockLight = combinedLight & 0xFFFF;<NEW_LINE>RenderHelper.disable... | EnumDyeColor color = betweenColor.getValue(); |
1,066,698 | public List<CompilationUnit> compile(FrontendOptions options, Problems problems) {<NEW_LINE>try {<NEW_LINE>// Temporary workaround to turn Kotlin compiler dep into a soft runtime dependency.<NEW_LINE>// TODO(b/217287994): Remove after a regular dependency is allowed.<NEW_LINE>Class<?> <MASK><NEW_LINE>Constructor<?> par... | kotlinParser = Class.forName("com.google.j2cl.transpiler.frontend.kotlin.KotlinParser"); |
1,033,518 | private void updateTraceAttributeNamePartitionKeyPart2() throws Exception {<NEW_LINE>if (!tableExists("trace_attribute_name_temp")) {<NEW_LINE>// previously failed mid-upgrade prior to updating schema version<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>dropTableIfExists("trace_attribute_name");<NEW_LINE>session.createTableWit... | getCentralStorageConfig(session).getTraceTTL(); |
1,181,741 | private static void checkTableSequences(Properties ctx, SvrProcess sp) {<NEW_LINE>String trxName = null;<NEW_LINE>if (sp != null)<NEW_LINE>trxName = sp.get_TrxName();<NEW_LINE>String sql = "SELECT TableName " + "FROM AD_Table t " + "WHERE IsActive='Y' AND IsView='N'" + " AND NOT EXISTS (SELECT * FROM AD_Sequence s " + ... | tableName = rs.getString(1); |
511,030 | public boolean onCreateOptionsMenu(Menu menu) {<NEW_LINE>MenuItem menuItem;<NEW_LINE>if (mFlash) {<NEW_LINE>menuItem = menu.add(Menu.NONE, R.id.menu_flash, 0, R.string.flash_on);<NEW_LINE>} else {<NEW_LINE>menuItem = menu.add(Menu.NONE, R.id.menu_flash, 0, R.string.flash_off);<NEW_LINE>}<NEW_LINE>MenuItemCompat.setShow... | setShowAsAction(menuItem, MenuItem.SHOW_AS_ACTION_NEVER); |
1,197,281 | static void onModification(MQTTClient thisClient, final SecurityContext securityContext, final ErrorBuffer errorBuffer, final ModificationQueue modificationQueue) throws FrameworkException {<NEW_LINE>if (modificationQueue.isPropertyModified(thisClient, StructrApp.key(MQTTClient.class, "mainBrokerURL")) || modificationQ... | class, "isConnected"), true)); |
393,839 | public void read(org.apache.thrift.protocol.TProtocol iprot, TCMResult struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField.type == org.apach... | skip(iprot, schemeField.type); |
1,802,163 | public boolean apply(Game game, Ability source, Ability abilityToModify) {<NEW_LINE>Player controller = game.<MASK><NEW_LINE>if (controller != null) {<NEW_LINE>Mana mana = abilityToModify.getManaCostsToPay().getMana();<NEW_LINE>int reduceMax = mana.getGeneric();<NEW_LINE>if (reduceMax > 2) {<NEW_LINE>reduceMax = 2;<NEW... | getPlayer(abilityToModify.getControllerId()); |
1,509,794 | public <A, R> StreamStage<KeyedWindowResult<K, R>> buildStream(@Nonnull AggregateOperation<A, ? extends R> aggrOp) {<NEW_LINE>List<Transform> upstreamTransforms = toList(upstreamStages, s -> s.transform);<NEW_LINE>FunctionAdapter fnAdapter = ADAPT_TO_JET_EVENT;<NEW_LINE>// Casts in this expression are a workaround for ... | , fnAdapter.adaptAggregateOperation(aggrOp)); |
321,716 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.println("Enter n and m:");<NEW_LINE>// 1st line of input<NEW_LINE>int n = sc.nextInt(), m = sc.nextInt();<NEW_LINE>int[] A = new int[m], B = new int[m], arr = new int[n];<NEW_LINE><MASK><NEW_LINE>// 2nd Line of in... | System.out.println("Enter elements of array:"); |
1,400,885 | public String replace(Parameters parameters) {<NEW_LINE>int origin = 0;<NEW_LINE>int bound;<NEW_LINE>if (b == null) {<NEW_LINE>// Only bound<NEW_LINE>String valueA = a.replace(parameters);<NEW_LINE>if (!Item.checkReq(isRequired, valueA)) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>bound = parseInt(valueA, Integer.MAX_V... | (origin, bound + 1)); |
1,396,965 | protected void verifyAudience(List<AudienceRestriction> audienceRestrictions) throws SamlException {<NEW_LINE>// Need fix it to use metadata's entityId<NEW_LINE>String audienceUrl = // "/ibm/saml20/"<NEW_LINE>RequestUtil.// "/ibm/saml20/"<NEW_LINE>getEntityUrl(// "/ibm/saml20/"<NEW_LINE>this.context.getHttpServletReque... | Tr.debug(tc, "Invalid audience"); |
1,354,985 | protected void addCategorySiteMapEntries(Category parentCategory, int currentDepth, CategorySiteMapGeneratorConfiguration categorySMGC, SiteMapBuilder siteMapBuilder) {<NEW_LINE>// If we've reached beyond the ending depth, don't proceed<NEW_LINE>if (currentDepth > categorySMGC.getEndingDepth()) {<NEW_LINE>return;<NEW_L... | categories.size() == rowLimit); |
1,419,549 | public void writeCrosstab(JRCrosstab crosstab) throws IOException {<NEW_LINE>writer.startElement(JRCrosstabFactory.ELEMENT_crosstab, getNamespace());<NEW_LINE>writer.addAttribute(JRCrosstabFactory.ATTRIBUTE_isRepeatColumnHeaders, crosstab.isRepeatColumnHeaders(), true);<NEW_LINE>writer.addAttribute(JRCrosstabFactory.AT... | JRCrosstabCell cell = it.next(); |
1,762,208 | public void actionPerformed(ActionEvent arg0) {<NEW_LINE>String oldPath = assertion.getPath();<NEW_LINE>String oldContent = assertion.getExpectedContent();<NEW_LINE>boolean oldAllowWildcards = assertion.isAllowWildcards();<NEW_LINE>setAssertionParameters(pathArea.getText().trim(), contentArea.getText(), allowWildcardsC... | .getTestStep()), "Response"); |
654,833 | private static void doBucketLifecycleOperations() {<NEW_LINE>final String ruleId0 = "delete obsoleted files";<NEW_LINE>final String matchPrefix0 = "obsoleted/";<NEW_LINE>final String ruleId1 = "delete temporary files";<NEW_LINE>final String matchPrefix1 = "temporary/";<NEW_LINE>SetBucketLifecycleRequest request = new S... | System.out.println("Getting bucket lifecycle:"); |
535,782 | public void configure(Parameterization config) {<NEW_LINE>//<NEW_LINE>//<NEW_LINE>new IntParameter(MINPTS_ID).//<NEW_LINE>addConstraint(CommonConstraints.GREATER_EQUAL_ONE_INT).grab(config, x -> minPts = x);<NEW_LINE>//<NEW_LINE>//<NEW_LINE>new IntParameter(MAXLEVEL_ID).//<NEW_LINE>addConstraint(CommonConstraints.GREAT... | config, x -> minDim = x); |
1,734,532 | public void updated(Dictionary config) throws ConfigurationException {<NEW_LINE>if (config != null) {<NEW_LINE>ip = (String) config.get("ip");<NEW_LINE>if (StringUtils.isBlank(ip)) {<NEW_LINE>ip = discoveryGatewayIp();<NEW_LINE>}<NEW_LINE>String portString = (String) config.get("port");<NEW_LINE>if (portString != null ... | maxRequestsPerConnection = Integer.parseInt(maxRequestsPerConnectionString); |
158,583 | public Either<WebDriverException, ActiveSession> apply(CreateSessionRequest sessionRequest) {<NEW_LINE>if (currentSession != null) {<NEW_LINE>return Either.left(new RetrySessionRequestException("Slot is busy. Try another slot."));<NEW_LINE>}<NEW_LINE>if (!test(sessionRequest.getDesiredCapabilities())) {<NEW_LINE>return... | ActiveSession session = possibleSession.right(); |
1,338,594 | public void execute() throws MojoExecutionException, MojoFailureException {<NEW_LINE>Bundlers bundlers = Bundlers.createBundlersInstance();<NEW_LINE>getLog().info("Available bundlers:");<NEW_LINE>getLog().info("-------------------");<NEW_LINE>Map<String, ? super Object> dummyParams = new HashMap<>();<NEW_LINE>bundlers.... | getValueType().getName()); |
1,219,138 | // willBeDeleted().<NEW_LINE>// --------------------------------------------------------------------------<NEW_LINE>// extends ManagedObject.<NEW_LINE>// --------------------------------------------------------------------------<NEW_LINE>void reserveSpaceInStore(ObjectManagerByteArrayOutputStream byteArrayOutputStream)... | + owningToken.objectStore.getAddSpaceOverhead(); |
989,240 | protected void updateTable(boolean pack) {<NEW_LINE>ServerStatus status = gitblit.getStatus();<NEW_LINE>header.setText(Translation.get("gb.status"));<NEW_LINE>version.setText(Constants.NAME + (status.isGO ? " GO v" : " WAR v") + status.version);<NEW_LINE><MASK><NEW_LINE>bootDate.setText(status.bootDate.toString() + " (... | releaseDate.setText(status.releaseDate); |
1,783,885 | public AutoCloseable start() throws IOException, InterruptedException {<NEW_LINE>File bootstrapScript = File.createTempFile("bootstrap_beam_venv", ".py");<NEW_LINE>bootstrapScript.deleteOnExit();<NEW_LINE>try (FileOutputStream fout = new FileOutputStream(bootstrapScript.getAbsolutePath())) {<NEW_LINE>ByteStreams.copy(g... | "Python boostrap failed with error " + result + ", " + lastNonEmptyLine); |
548,114 | private void initColumnsData() {<NEW_LINE>// Width of the first column fits to width<NEW_LINE>columnWidths = new int[columnCount - 1];<NEW_LINE>columnNames = new String[columnCount];<NEW_LINE>columnToolTips = new String[columnCount];<NEW_LINE>columnRenderers = new TableCellRenderer[columnCount];<NEW_LINE>columnNames[0]... | 5] = Bundle.ReferencesBrowserControllerUI_RetainedSizeColumnDescr(); |
863,600 | protected final void handleMessage(Object m1) throws InterruptedException, SuspendExecution {<NEW_LINE>if (m1 instanceof RequestMessage) {<NEW_LINE>final RequestMessage req = (RequestMessage) m1;<NEW_LINE>try {<NEW_LINE>if (req instanceof GetChildMessage) {<NEW_LINE>reply(req, getChild(((<MASK><NEW_LINE>} else if (req ... | GetChildMessage) req).name)); |
1,644,741 | final DescribeTransitGatewayAttachmentsResult executeDescribeTransitGatewayAttachments(DescribeTransitGatewayAttachmentsRequest describeTransitGatewayAttachmentsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeTransitGatewayAttachmentsRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | addHandlerContext(HandlerContextKey.SERVICE_ID, "EC2"); |
875,737 | public CreateFunctionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateFunctionResult createFunctionResult = new CreateFunctionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | ().unmarshall(context)); |
1,188,807 | private I_C_OrderLine createPurchaseOrderLine(final I_C_OrderLine salesOrderLine) {<NEW_LINE>final I_M_AttributeSetInstance poASI;<NEW_LINE>if (salesOrderLine.getM_AttributeSetInstance_ID() > 0) {<NEW_LINE>final I_M_AttributeSetInstance soASI = salesOrderLine.getM_AttributeSetInstance();<NEW_LINE>poASI = attributeDAO.c... | purchaseOrderLine = orderLineBL.createOrderLine(purchaseOrder); |
211,711 | private void updateDependencyResolutionContext(List<Map<String, String>> bomDependencies) {<NEW_LINE>URI[] uris = Grape.getInstance().resolve(null, bomDependencies.toArray(new Map<?, ?>[0]));<NEW_LINE>DefaultModelBuilder modelBuilder = new DefaultModelBuilderFactory().newInstance();<NEW_LINE>for (URI uri : uris) {<NEW_... | addDependencyManagement(new MavenModelDependencyManagement(model)); |
1,068,249 | public static String formatDateTime(Date time, TimeZone tz) {<NEW_LINE>Calendar cal = Calendar.getInstance(tz, Locale.ENGLISH);<NEW_LINE>cal.setTime(time);<NEW_LINE>int offset = cal.get(Calendar.ZONE_OFFSET);<NEW_LINE>offset += cal.get(Calendar.DST_OFFSET);<NEW_LINE>// DateFormat is operating on GMT so adjust for time ... | Math.abs(offset % 60); |
750,256 | public static <L1, L2, L3, L4, T> LazyEither5<L1, L2, L3, L4, ReactiveSeq<T>> sequence(ReactiveSeq<? extends LazyEither5<L1, L2, L3, L4, T>> stream) {<NEW_LINE>LazyEither5<L1, L2, L3, L4, ReactiveSeq<T>> identity = <MASK><NEW_LINE>BiFunction<LazyEither5<L1, L2, L3, L4, ReactiveSeq<T>>, LazyEither5<L1, L2, L3, L4, T>, L... | right(ReactiveSeq.empty()); |
325,514 | private boolean tryToSyncSchema() {<NEW_LINE>schemaFilePos = readSyncSchemaPos(getSchemaPosFile());<NEW_LINE>// start to sync file data and get digest of this file.<NEW_LINE>try (FileInputStream fis = new FileInputStream(getSchemaLogFile());<NEW_LINE>ByteArrayOutputStream bos = new ByteArrayOutputStream(SyncConstant.DA... | = new byte[SyncConstant.DATA_CHUNK_SIZE]; |
1,404,965 | public Set instantiate() throws IOException {<NEW_LINE>Set result = new HashSet();<NEW_LINE>String displayName = (String) wizard.getProperty(PROP_DISPLAY_NAME);<NEW_LINE>WildflyPluginUtils.Version version = WildflyPluginUtils.<MASK><NEW_LINE>String url = WildflyDeploymentFactory.URI_PREFIX;<NEW_LINE>if (version != null... | getServerVersion(new File(installLocation)); |
679,856 | public void startGame() {<NEW_LINE>// Initialize values<NEW_LINE>int cpuRemoves = 0;<NEW_LINE>int matchesLeft = MATCH_COUNT_START;<NEW_LINE>int playerRemoves = 0;<NEW_LINE>// Flip coin and decide who goes first.<NEW_LINE>CoinSide coinSide = flipCoin();<NEW_LINE>if (coinSide == CoinSide.HEADS) {<NEW_LINE>System.out.prin... | out.println(Messages.TAILS); |
544,550 | public void run(RegressionEnvironment env) {<NEW_LINE>AtomicInteger milestone = new AtomicInteger();<NEW_LINE><MASK><NEW_LINE>UUID uuid = UUID.fromString("b7dc7f66-4f6d-4f03-14d7-83da210dfba6");<NEW_LINE>runAssertion(env, MyLocalVMTypeUUID.class, UUID.class, uuid.toString(), uuid, valueOfOne, milestone);<NEW_LINE>Offse... | JsonValue valueOfOne = new JsonNumber("1"); |
1,622,334 | public static byte[] generateUniverseKey(UUID universeUUID, UUID configUUID, String algorithm, int keySize, ObjectNode authConfig) throws Exception {<NEW_LINE>LOG.debug("generateUniverseKey called : {}, {}", algorithm, keySize);<NEW_LINE>// we can also use transit/random/<keySize> to generate random key<NEW_LINE>// but... | hcVaultSecretEngine.encryptString(engineKey, keyBytes); |
1,019,529 | public ServiceResponse serviceImpl(Query post, HttpServletResponse response, Authorization rights, JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>Path settings = Paths.get(DAO.data_dir.getPath(), "settings");<NEW_LINE>String fileName = post.get("file", "accounting");<NEW_LINE>Path filePath = IO.resol... | "\n" + e.getMessage()); |
1,301,169 | private Mono<Response<Flux<ByteBuffer>>> cancelWithResponseAsync(String resourceGroupName, String registryName, String runId, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
1,145,002 | @Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Deletes a service", code = 204)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 403, message = "Access to the specified service is forbidden"), @A... | Status.NO_CONTENT).build(); |
855,875 | private Map<String, List<String>> discoverModulesIn(Path path) {<NEW_LINE>Map<String, List<String>> mapModuleClasses = new HashMap<String, List<String>>();<NEW_LINE>try (DirectoryStream<Path> stream = Files.newDirectoryStream(path)) {<NEW_LINE>for (Path entry : stream) {<NEW_LINE>BasicFileAttributes attrs;<NEW_LINE>try... | readAttributes(entry, BasicFileAttributes.class); |
1,329,276 | public static ToolPredicate deserialize(JsonObject json) {<NEW_LINE>// item<NEW_LINE>Item item = null;<NEW_LINE>if (json.has("item")) {<NEW_LINE>item = RecipeHelper.deserializeItem(GsonHelper.getAsString(json, "item"), "item", Item.class);<NEW_LINE>}<NEW_LINE>// tag<NEW_LINE>Tag<Item> tag = null;<NEW_LINE>if (json.has(... | > materials = Collections.emptyList(); |
1,752,529 | private Iterator<OIdentifiable> query(String className, OWhereClause oWhereClause, OCommandContext ctx) {<NEW_LINE>final ODatabaseDocument database = getDatabase();<NEW_LINE>OClass schemaClass = database.getMetadata().getSchema().getClass(className);<NEW_LINE>database.checkSecurity(ORule.ResourceGeneric.CLASS, ORole.PE... | setRecordingMetrics(ctx.isRecordingMetrics()); |
1,695,929 | // ----- static methods -----<NEW_LINE>public static PropertyMap javaTypeToDatabaseType(SecurityContext securityContext, GraphObject wrapped, Map<String, Object> source) throws FrameworkException {<NEW_LINE>final PropertyMap resultMap = new PropertyMap();<NEW_LINE>final GraphObject entity = unwrap(wrapped);<NEW_LINE>if... | propertyKey.typeName() + "."); |
489,774 | public void marshall(DescribeEvaluationsRequest describeEvaluationsRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (describeEvaluationsRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(descri... | describeEvaluationsRequest.getGE(), GE_BINDING); |
1,809,323 | public void preVisit(ExploreNode exploreNode) {<NEW_LINE>if (skipNode(exploreNode)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final ExploreNode parent = stack.peek();<NEW_LINE>if (exploreNode == this.rootModule) {<NEW_LINE>assert parent == null;<NEW_LINE>final ModuleNode mn = (ModuleNode) exploreNode;<NEW_LINE>this.writer... | getName().toString()); |
954,330 | protected void onCreate(@Nullable Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>Bundle extra = getIntent().getExtras();<NEW_LINE>String prelayout = extra.getString(Utils.KEY);<NEW_LINE>setTitle(layout_name = prelayout);<NEW_LINE>Context ctx = getApplicationContext();<NEW_LINE>int id... | Log.v(TAG, " --------------------------------------------------------------------"); |
147,010 | private void initInfo(int record_id, String value, String whereClause) {<NEW_LINE>//<NEW_LINE>if (!(record_id == 0) && value != null && value.length() > 0) {<NEW_LINE>log.severe(<MASK><NEW_LINE>}<NEW_LINE>// Set Value and boolean criteria (if any)<NEW_LINE>if (!(record_id == 0)) {<NEW_LINE>fieldID = record_id;<NEW_LINE... | "Received both a record_id and a value: " + record_id + " - " + value); |
1,594,508 | public int copyLinesFrom(final MProject project) {<NEW_LINE>if (isProcessed() || project == null)<NEW_LINE>return 0;<NEW_LINE>int count = 0;<NEW_LINE>final List<MProjectLine> fromLines = project.getLines();<NEW_LINE>for (final MProjectLine fromLine : fromLines) {<NEW_LINE>final MProjectLine line = new MProjectLine(getC... | 0, project.get_TrxName()); |
360,137 | private static ImmutableList<InstantInterval> removeGaps(@NonNull final List<AnnotatedPoint> annotatedPointList) {<NEW_LINE>final List<InstantInterval> result = new ArrayList<>();<NEW_LINE>// iterate over the annotatedPointList<NEW_LINE>boolean isInterval = false;<NEW_LINE>boolean isGap = false;<NEW_LINE>Instant interv... | (intervalStart, point.value)); |
1,802,151 | public static void addTermToTarget(Urn labelUrn, Urn targetUrn, String subResource, Urn actor, EntityService entityService) throws URISyntaxException {<NEW_LINE>if (subResource == null || subResource.equals("")) {<NEW_LINE>com.linkedin.common.GlossaryTerms terms = (com.linkedin.common.GlossaryTerms) getAspectFromEntity... | , entityService, new EditableSchemaMetadata()); |
1,269,125 | public void addArgs(List<String> args) throws Exception {<NEW_LINE>ArgumentWriter writer = new ArgumentWriter(instance);<NEW_LINE>writer.writeIfSet("-a", BIT_LISTEN_ADDRESS);<NEW_LINE><MASK><NEW_LINE>writer.writeIfSet("-NOBITS", NOBITS);<NEW_LINE>writer.writeIfSet("-z", VERBOSE_TRANSPORT_LOGGING);<NEW_LINE>writer.write... | writer.writeIfSet("-o", IOR_FILE); |
1,003,970 | public double evaluate(int[] designations, DataSet dataSet, int clusterID) {<NEW_LINE>int N = 0;<NEW_LINE>double sum = 0;<NEW_LINE>List<Vec> X = dataSet.getDataVectors();<NEW_LINE>List<Double> cache = dm.getAccelerationCache(X);<NEW_LINE>if (// special case, can compute in O(N) isntead<NEW_LINE>dm instanceof EuclideanD... | return sum / (N * 2); |
1,638,461 | public JdbcCustomConversions jdbcCustomConversions() {<NEW_LINE>System.out.println("HHHHHHHHHHHHHHHHHHHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAALLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOO");<NEW_LINE>System.out.println("HHHHHHHHHHHHHHHHHHHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAALLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOO");<NEW... | System.out.println("HHHHHHHHHHHHHHHHHHHHHHHHAAAAAAAAAAAAAAAAAAAAAAAAAALLLLLLLLLLLLLLLLLLLLLLLLLLLLLOOOOOOOOOOOOOOOOOOO"); |
1,135,104 | private void initTable(Composite control) {<NEW_LINE>if (tv == null) {<NEW_LINE>tv = TableViewFactory.createTableViewSWT(TagDiscovery.class, TABLE_TAGDISCOVERY, TABLE_TAGDISCOVERY, new TableColumnCore[0], ColumnTagName.COLUMN_ID, SWT.MULTI | SWT.FULL_SELECTION | SWT.VIRTUAL);<NEW_LINE>SWTSkinObjectTextbox soFilter = (S... | soFilter.getBubbleTextBox(), this); |
1,124,667 | private void processILeappFs(Content dataSource, Case currentCase, DataSourceIngestModuleProgress statusHelper, String directoryToProcess) {<NEW_LINE>statusHelper.progress(NbBundle.getMessage(this.getClass(), "ILeappAnalyzerIngestModule.processing.filesystem"));<NEW_LINE>// NON-NLS<NEW_LINE>String currentTime = new Sim... | buildiLeappCommand(moduleOutputPath, directoryToProcess, "fs"); |
1,834,204 | private void checkDuplicate(Collection<? extends Dom> beans) {<NEW_LINE>if (beans == null || beans.size() <= 1) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>WeakHashMap keyBeanMap = new WeakHashMap();<NEW_LINE>ArrayList<String> keys = new ArrayList<String>(beans.size());<NEW_LINE>for (Dom b : beans) {<NEW_LINE>String key = b... | , Class<ConfigBeanProxy>>(); |
1,387,743 | public void testCriteriaQuery_String(TestExecutionContext testExecCtx, TestExecutionResources testExecResources, Object managedComponentObject) throws Throwable {<NEW_LINE>final String testName = getTestName();<NEW_LINE>// Verify parameters<NEW_LINE>if (testExecCtx == null || testExecResources == null) {<NEW_LINE>Asser... | + testProps.get(key)); |
500,956 | public static I_C_Invoice_Candidate createIcAndSetCommonFields(@NonNull final I_C_Flatrate_Term term) {<NEW_LINE>// Services<NEW_LINE>final DimensionService dimensionService = SpringContextHolder.instance.getBean(DimensionService.class);<NEW_LINE>final IOrderDAO orderDAO = Services.get(IOrderDAO.class);<NEW_LINE>final ... | , orderLineDimension.withActivityId(activityId)); |
1,709,679 | public void start(Stage stage) {<NEW_LINE>stage.setTitle("ColorPicker");<NEW_LINE>EventHandler<ActionEvent> actionEventHandler = t -> {<NEW_LINE>ColorPicker cp = (ColorPicker) t.getTarget();<NEW_LINE>Color c = cp.getValue();<NEW_LINE>System.out.println("New Color's RGB = " + c.getRed() + " " + c.getGreen() + " " + c.ge... | add(buttonColorPicker, 2, 2); |
1,517,235 | public static double[] placement3DToMatrix(IfcAxis2Placement3D ifcAxis2Placement3D) {<NEW_LINE>if (ifcAxis2Placement3D.getAxis() != null && ifcAxis2Placement3D.getRefDirection() != null) {<NEW_LINE>double[] cross = Vector.crossProduct(new double[] { ifcAxis2Placement3D.getAxis().getDirectionRatios().get(0), ifcAxis2Pla... | .get(2), 1 }; |
1,440,575 | // Ask by finding all the rdf:_N + rdf:type<NEW_LINE>private QueryIterator execEvaluatedCalc(Binding binding, Node containerNode, Node predicate, Node member, ExecutionContext execCxt) {<NEW_LINE>Graph graph = execCxt.getActiveGraph();<NEW_LINE>if (!containerNode.isVariable()) {<NEW_LINE>// Container a ground term.<NEW... | findContainingContainers(graph, typeNode, member); |
309,555 | public void draw(TextureRegion region, float x, float y, float width, float height) {<NEW_LINE>if (!drawing)<NEW_LINE>throw new IllegalStateException("PolygonSpriteBatch.begin must be called before draw.");<NEW_LINE>final short[] triangles = this.triangles;<NEW_LINE>final float[] vertices = this.vertices;<NEW_LINE>Text... | triangleIndex++] = (short) startVertex; |
524,059 | String buildUnloadStatement(UnloadConfig unloadConfig, boolean maskCredentials) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(String.format("UNLOAD ('%s') TO '%s'\n", escapeParam(unloadConfig.query), escapeParam(unloadConfig.toWithPrefixDir)));<NEW_LINE>// credentials<NEW_LINE>appendCredentialsP... | sb, "BZIP2", unloadConfig.bzip2); |
626,766 | public License sign(License licenseSpec) throws IOException {<NEW_LINE>XContentBuilder contentBuilder = XContentFactory.contentBuilder(XContentType.JSON);<NEW_LINE>final Map<String, String> licenseSpecViewMode = Collections.singletonMap(License.LICENSE_SPEC_VIEW_MODE, "true");<NEW_LINE>licenseSpec.toXContent(contentBui... | publicKeyBytes = Files.readAllBytes(publicKeyPath); |
1,634,031 | public PwGroup search(Database db, String qStr) {<NEW_LINE>PwDatabase pm = db.pm;<NEW_LINE>PwGroup group;<NEW_LINE>if (pm instanceof PwDatabaseV3) {<NEW_LINE>group = new PwGroupV3();<NEW_LINE>} else if (pm instanceof PwDatabaseV4) {<NEW_LINE>group = new PwGroupV4();<NEW_LINE>} else {<NEW_LINE>Log.d("SearchDbHelper", "T... | getString(R.string.search_results); |
11,934 | protected void fillIntent(Activity activity, Intent intent) {<NEW_LINE>super.fillIntent(activity, intent);<NEW_LINE>boolean modal = false;<NEW_LINE>if (hasProperty(TiC.PROPERTY_MODAL)) {<NEW_LINE>modal = TiConvert.toBoolean(getProperty(TiC.PROPERTY_MODAL), false);<NEW_LINE>if (modal) {<NEW_LINE>intent.setClass(activity... | setClass(activity, TiTranslucentActivity.class); |
955,611 | public Object clusterOverview(HttpServletRequest request, HttpServletResponse response) {<NEW_LINE>if (!Env.getCurrentEnv().isMaster()) {<NEW_LINE>return redirectToMaster(request, response);<NEW_LINE>}<NEW_LINE>Map<String, Object> resultMap = Maps.newHashMap();<NEW_LINE>Env env = Env.getCurrentEnv();<NEW_LINE>SystemInf... | ("tblCount", getTblCount(env)); |
28,583 | private void loadNode442() throws IOException, SAXException {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.CertificateGroupFolderType_AdditionalGroup_Placeholder_TrustList_OpenWithMasks_InputArguments, new QualifiedName(0, "InputArguments"), new LocalizedText("en", "InputArguments"), ... | .expanded(), false)); |
26,362 | public void commit(TableMetadata base, TableMetadata metadata) {<NEW_LINE>UpdateTableRequest.Builder requestBuilder;<NEW_LINE>List<MetadataUpdate> baseChanges;<NEW_LINE>Consumer<ErrorResponse> errorHandler;<NEW_LINE>switch(updateType) {<NEW_LINE>case CREATE:<NEW_LINE>Preconditions.checkState(base == null, "Invalid base... | .format("Update type %s is not supported", updateType)); |
1,600,183 | public void changeIconSize(final NodeModel node, final Quantity<LengthUnit> iconSize) {<NEW_LINE>final IActor actor = new IActor() {<NEW_LINE><NEW_LINE>private Quantity<LengthUnit> oldIconSize;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void act() {<NEW_LINE>oldIconSize = node.getSharedData().getIcons().getIconSize()... | actor, node.getMap()); |
625,196 | protected static Member[] expandMultiPositionSlicerMembers(Member[] members, Evaluator evaluator) {<NEW_LINE>Map<Hierarchy, <MASK><NEW_LINE>if (evaluator instanceof RolapEvaluator) {<NEW_LINE>// get the slicer members from the evaluator<NEW_LINE>mapOfSlicerMembers = ((RolapEvaluator) evaluator).getSlicerMembersByHierar... | Set<Member>> mapOfSlicerMembers = null; |
1,705,939 | public static DescribeDatabaseResourceUsageResponse unmarshall(DescribeDatabaseResourceUsageResponse describeDatabaseResourceUsageResponse, UnmarshallerContext context) {<NEW_LINE>describeDatabaseResourceUsageResponse.setRequestId<MASK><NEW_LINE>List<MonitorData> monitorDatas = new ArrayList<MonitorData>();<NEW_LINE>fo... | (context.stringValue("DescribeDatabaseResourceUsageResponse.RequestId")); |
237,523 | synchronized Document runKBP(Properties props) {<NEW_LINE>if (haveRunKBP) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>// Run prerequisites<NEW_LINE>coref(props);<NEW_LINE>Supplier<Annotator> entityMention = (props == EMPTY_PROPS || props == SINGLE_SENTENCE_DOCUMENT) ? defaultEntityMentions : getOrCreate(STANFORD_ENTITY... | -> backend.kbp(props)); |
191,003 | List<PaddingVector> createMissingMacByteVectors(CipherSuite suite, ProtocolVersion version) {<NEW_LINE>List<PaddingVector> vectorList = new LinkedList<>();<NEW_LINE>int macSize = AlgorithmResolver.getMacAlgorithm(<MASK><NEW_LINE>byte[] padding = createPaddingBytes(DEFAULT_CIPHERTEXT_LENGTH - macSize);<NEW_LINE>// Missi... | version, suite).getSize(); |
352,838 | static CommandResult createReply(Packet packet, JDWPContext context) {<NEW_LINE>PacketStream input = new PacketStream(packet);<NEW_LINE>PacketStream reply = new PacketStream().replyPacket().id(packet.id);<NEW_LINE>long refTypeId = input.readLong();<NEW_LINE>KlassRef klass = verifyRefType(refTypeId, reply, context);<NEW... | writeString(method.getSignatureAsString()); |
416,071 | /* ======<NEW_LINE>* EXTRAS<NEW_LINE>* ====== */<NEW_LINE>@Override<NEW_LINE>public void onBackPressed() {<NEW_LINE>// If Drawer is open, back key closes it<NEW_LINE>if (mDrawer.isDrawerOpen(GravityCompat.START)) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// If ActionMode is active, back key closes it<NEW_L... | mDrawer.closeDrawer(GravityCompat.START); |
1,664,709 | public void marshall(AutoMLCandidate autoMLCandidate, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (autoMLCandidate == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(autoMLCandidate.getCandidateName(), CAN... | autoMLCandidate.getObjectiveStatus(), OBJECTIVESTATUS_BINDING); |
658,898 | private VirtualMachine connect(int port) throws IOException {<NEW_LINE>VirtualMachineManager manager = Bootstrap.virtualMachineManager();<NEW_LINE>// Find appropiate connector<NEW_LINE>List<AttachingConnector<MASK><NEW_LINE>AttachingConnector chosenConnector = null;<NEW_LINE>for (AttachingConnector c : connectors) {<NE... | > connectors = manager.attachingConnectors(); |
1,662,981 | public void initRemoteProxy() {<NEW_LINE>// reading the proxy host name<NEW_LINE>final String host = this.getConfig("remoteProxyHost", "").trim();<NEW_LINE>// reading the proxy host port<NEW_LINE>int port;<NEW_LINE>try {<NEW_LINE>port = Integer.parseInt(this<MASK><NEW_LINE>} catch (final NumberFormatException e) {<NEW_... | .getConfig("remoteProxyPort", "3128")); |
1,227,834 | private Query newTermQuery(IndexReader reader, Term term) throws IOException {<NEW_LINE>if (ignoreTF) {<NEW_LINE>return new <MASK><NEW_LINE>} else {<NEW_LINE>// we build an artificial TermStates that will give an overall df and ttf<NEW_LINE>// equal to 1<NEW_LINE>TermStates context = new TermStates(reader.getContext())... | ConstantScoreQuery(new TermQuery(term)); |
372,340 | public static ByteBuffer generateAuthenticateMessage(NtlmState ntlmState) {<NEW_LINE>// Allocate memory for blocks from given fixed offset<NEW_LINE>int blocksCursor = BLOCKS_OFFSET;<NEW_LINE>ByteBuffer buf = new ByteBuffer(4096);<NEW_LINE>// Signature: "NTLMSSP\0"<NEW_LINE>buf.writeString(NTLMSSP, RdpConstants.CHARSET_... | buf, ntlmState.encryptedRandomSessionKey, blocksCursor); |
814,101 | public List<? extends Token> tokenize(String pattern) {<NEW_LINE>// split pattern into chunks: sea (raw input) and islands (<ID>, <expr>)<NEW_LINE>List<Chunk> chunks = split(pattern);<NEW_LINE>// create token stream from text and tags<NEW_LINE>List<Token> tokens = new ArrayList<Token>();<NEW_LINE>for (Chunk chunk : chu... | ttype, tagChunk.getLabel()); |
307,516 | public boolean verifySignature(byte[] message, BigInteger r, BigInteger s) {<NEW_LINE>BigInteger n = key.getParameters().getN();<NEW_LINE>BigInteger e = calculateE(n, message);<NEW_LINE>// r in the range [1,n-1]<NEW_LINE>if (r.compareTo(ONE) < 0 || r.compareTo(n) >= 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// s ... | .getParameters().getG(); |
301,013 | public void removeMemberFromGroup(String groupDn, String memberAttrName, String value) {<NEW_LINE>BasicAttribute attr = new BasicAttribute(memberAttrName, value);<NEW_LINE>ModificationItem item = new ModificationItem(DirContext.REMOVE_ATTRIBUTE, attr);<NEW_LINE>try {<NEW_LINE>this.operationManager.modifyAttributesNamin... | debugf("Group %s does not contain the member %s", groupDn, value); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.