idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
886,212 | private static Object foreignOrdinaryToPrimitive(Object obj, TruffleString hint) {<NEW_LINE>InteropLibrary interop = InteropLibrary.getFactory().getUncached(obj);<NEW_LINE>TruffleString[] methodNames;<NEW_LINE>if (Strings.equals(Strings.HINT_STRING, hint)) {<NEW_LINE>methodNames = new TruffleString[] { Strings.TO_STRIN... | Strings.VALUE_OF, Strings.TO_STRING }; |
1,015,093 | public static void replaceWithAssignment(@NotNull Project project, @NotNull PsiElement element) {<NEW_LINE>if (element instanceof GoShortVarDeclaration) {<NEW_LINE>PsiElement parent = element.getParent();<NEW_LINE>if (parent instanceof GoSimpleStatement) {<NEW_LINE>String left = GoPsiImplUtil.joinPsiElementText(((GoSho... | (project, left, right)); |
131,840 | public InetAddress test(NetworkAdminNetworkInterfaceAddress address, boolean ipv6, boolean upnp_map, NetworkAdminProgressListener listener) throws NetworkAdminException {<NEW_LINE>InetAddress bind_ip = address == null ? null : address.getAddress();<NEW_LINE>NetworkAdminProtocolTester tester;<NEW_LINE>if (type == PT_HTT... | type != PT_UDP, port, true); |
1,268,093 | private static String debugString(@Nullable ClientSession session) {<NEW_LINE>if (session == null) {<NEW_LINE>return "null";<NEW_LINE>}<NEW_LINE>String debugString = String.format("[%s@%s ", ClassUtils.getShortName(session.getClass()), Integer.toHexString(session.hashCode()));<NEW_LINE>try {<NEW_LINE>if (session.getSer... | "clusterTime = %s", session.getClusterTime()); |
1,665,341 | private Object resolveValue(RegisteredBean registeredBean, Field field) {<NEW_LINE>String beanName = registeredBean.getBeanName();<NEW_LINE>Class<?<MASK><NEW_LINE>ConfigurableBeanFactory beanFactory = registeredBean.getBeanFactory();<NEW_LINE>DependencyDescriptor descriptor = new DependencyDescriptor(field, this.requir... | > beanClass = registeredBean.getBeanClass(); |
85,601 | public DescribeClientVpnTargetNetworksResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeClientVpnTargetNetworksResult describeClientVpnTargetNetworksResult = new DescribeClientVpnTargetNetworksResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth... | new ArrayList<TargetNetwork>()); |
1,308,393 | private static synchronized void loadLib(Config config) {<NEW_LINE>if (isLoaded)<NEW_LINE>return;<NEW_LINE>if (System.getenv("ROBOVM_DISABLE_COMPRESSION") != null) {<NEW_LINE>isLoaded = true;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String archProp = System.<MASK><NEW_LINE>String arch;<NEW_LINE>if (archProp.matches("amd64|... | getProperty("os.arch").toLowerCase(); |
1,073,968 | public void executeUpgrade() throws DotDataException {<NEW_LINE>DotConnect dc = new DotConnect();<NEW_LINE>// Inserts into Inode Table the reference of the Vanity URL Content Type<NEW_LINE>dc.setSQL(INSERT_INODE_QUERY);<NEW_LINE>dc.addParam(DEFAULT_VANITY_URL_STRUCTURE_INODE);<NEW_LINE>dc.addParam("system");<NEW_LINE>d... | (field.get("values")); |
203,410 | public static String exeWholeCmd(String cmd) {<NEW_LINE>// Common apache exec doesn't support piple operation.<NEW_LINE>// It's the shell (e.g. bash) that interprets the pipe and does special processing when you type that<NEW_LINE>// commandline into the shell.<NEW_LINE>// But we could use a ByteArrayInputStream to fee... | cmds = cmd.split("\\|"); |
574,051 | public UpdateContinuousBackupsResult updateContinuousBackups(UpdateContinuousBackupsRequest updateContinuousBackupsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateContinuousBackupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMet... | new JsonResponseHandler<UpdateContinuousBackupsResult>(unmarshaller); |
149,511 | private void dragEntity(boolean isShiftKeyDown, GridElement mainElement) {<NEW_LINE>DESELECT_MULTISEL = false;<NEW_LINE>Point newp = getNewCoordinate();<NEW_LINE>Point oldp = getOldCoordinate();<NEW_LINE>int diffx = newp.x - oldp.x;<NEW_LINE>int diffy = newp.y - oldp.y;<NEW_LINE>List<GridElement> elementsToMove = selec... | diffx, diffy, POINT_BEFORE_MOVE, elementsToMove); |
791,787 | public DisassociateIdentityProviderConfigResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DisassociateIdentityProviderConfigResult disassociateIdentityProviderConfigResult = new DisassociateIdentityProviderConfigResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MA... | String currentParentElement = context.getCurrentParentElement(); |
923,518 | private CompletableFuture<UaObjectNode> createObjectNodeFromBaseAttributes(NodeId nodeId, List<DataValue> baseAttributeValues) {<NEW_LINE>Set<AttributeId> remainingAttributes = Sets.difference(AttributeId.OBJECT_ATTRIBUTES, AttributeId.BASE_ATTRIBUTES);<NEW_LINE>CompletableFuture<ReadResponse> attributesFuture = readAt... | node.getNodeId(), node); |
320,391 | public List<Statement> simplify() {<NEW_LINE>if (_simplified != null) {<NEW_LINE>return _simplified;<NEW_LINE>}<NEW_LINE>ImmutableList.Builder<Statement> simpleTrueStatementsBuilder = ImmutableList.builder();<NEW_LINE>ImmutableList.Builder<Statement> simpleFalseStatementsBuilder = ImmutableList.builder();<NEW_LINE>Bool... | _simplified = ImmutableList.of(simple); |
1,180,453 | private int persistHydrant(FireHydrant indexToPersist, SegmentIdWithShardSpec identifier) {<NEW_LINE>if (indexToPersist.hasSwapped()) {<NEW_LINE>throw new ISE("Segment[%s] hydrant[%s] already swapped. This cannot happen.", identifier, indexToPersist);<NEW_LINE>}<NEW_LINE>log.debug("Segment[%s], persisting Hydrant[%s]",... | .getIndex().size(); |
604,801 | private void init() {<NEW_LINE>if (isInEditMode())<NEW_LINE>return;<NEW_LINE>final float dis = Tool.dp2px(10);<NEW_LINE>final float vDis = Tool.dp2px(30);<NEW_LINE>_gestureDetector = new GestureDetector(getContext(), new GestureDetector.SimpleOnGestureListener() {<NEW_LINE><NEW_LINE>public boolean onFling(MotionEvent e... | ) - e1.getX()); |
559,808 | protected boolean maybeLaunchCryptoJob(ByteBuf dataBuf, byte[] userMetadata, ByteBuffer encryptionKey, BlobId targetBlobId) {<NEW_LINE>//<NEW_LINE>// Three cases to handle:<NEW_LINE>// 1) rawMode false and encryptionKey not null => decrypt buffer<NEW_LINE>// 2) rawMode true and encryptionKey is null => encrypt buffer (... | logger.trace("Submitting decrypt job for blob {}", targetBlobId); |
1,332,508 | final DescribeBrokerResult executeDescribeBroker(DescribeBrokerRequest describeBrokerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeBrokerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | endClientExecution(awsRequestMetrics, request, response); |
497,182 | protected String checkUserAndPassword(String user, @Sensitive String password) throws WSSecurityException {<NEW_LINE>// System.out.println("gkuo:debug:Id:" + user + ":password:" + password );<NEW_LINE>String authnPrincipal = null;<NEW_LINE>try {<NEW_LINE>UserRegistryService userRegistryService = securityService.getUser... | error(tc, "check_password_failed", user); |
1,695,208 | public void call(FullAccessIntArrPointer dst, int stride, ReadOnlyIntArrPointer above, ReadOnlyIntArrPointer left) {<NEW_LINE>dst = dst.shallowCopy();<NEW_LINE>PositionableIntArrPointer pLeft = PositionableIntArrPointer.makePositionable(left);<NEW_LINE>final short I = pLeft.getAndInc();<NEW_LINE>final short J = pLeft.g... | avg2(J, K))); |
1,444,350 | private void takeTransientSnapshotInternal(final long lowerBoundSnapshotPosition, final ActorFuture<TransientSnapshot> future) {<NEW_LINE>if (!isDbOpened()) {<NEW_LINE>final String error = String.format("Expected to take snapshot for last processed position %d, but database was closed.", lowerBoundSnapshotPosition);<NE... | exportedPosition = exporterPositionSupplier.applyAsLong(db); |
231,403 | public NetSocket sendFile(String filename, long offset, long length, final Handler<AsyncResult<Void>> resultHandler) {<NEW_LINE>File f = vertx.resolveFile(filename);<NEW_LINE>if (f.isDirectory()) {<NEW_LINE>throw new IllegalArgumentException("filename must point to a file and not to a directory");<NEW_LINE>}<NEW_LINE>R... | log.error("Failed to send file", e); |
444,252 | final UpdateDeviceInstanceResult executeUpdateDeviceInstance(UpdateDeviceInstanceRequest updateDeviceInstanceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateDeviceInstanceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,374,433 | final ListAccessPoliciesResult executeListAccessPolicies(ListAccessPoliciesRequest listAccessPoliciesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listAccessPoliciesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | (super.beforeMarshalling(listAccessPoliciesRequest)); |
1,483,090 | public static JsonObject toJson(final Vulnerability vulnerability) {<NEW_LINE>final JsonObjectBuilder vulnerabilityBuilder = Json.createObjectBuilder();<NEW_LINE>vulnerabilityBuilder.add("uuid", vulnerability.getUuid().toString());<NEW_LINE>JsonUtil.add(vulnerabilityBuilder, "vulnId", vulnerability.getVulnId());<NEW_LI... | "recommendation", vulnerability.getRecommendation()); |
781,308 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.group_edit);<NEW_LINE>setTitle(R.string.add_group_title);<NEW_LINE>ImageButton iconButton = (ImageButton) findViewById(R.id.icon_button);<NEW_LINE>iconButton.setOnClickListener(new View.OnC... | findViewById(R.id.group_name); |
1,220,092 | public static Map<String, Object> transform(final Metadata metadata, final Contentlet contentlet, final Field field) {<NEW_LINE>DotPreconditions.checkNotNull(metadata, IllegalArgumentException.class, "File can't be null");<NEW_LINE>final Map<String, Object> map = new HashMap<>();<NEW_LINE>final Identifier identifier = ... | String assetName = metadata.getName(); |
976,865 | public void print(ActionRequest request, ActionResponse response) {<NEW_LINE>try {<NEW_LINE>ManufOrder manufOrder = request.getContext().asType(ManufOrder.class);<NEW_LINE>ManufOrderPrintService manufOrderPrintService = Beans.get(ManufOrderPrintService.class);<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>List<Integ... | , fileLink).map()); |
39,032 | public void onClick(View v) {<NEW_LINE><MASK><NEW_LINE>Bundle b = new Bundle();<NEW_LINE>Time t = new Time();<NEW_LINE>t.setToNow();<NEW_LINE>b.putLong(RecurrencePickerDialogFragment.BUNDLE_START_TIME_MILLIS, t.toMillis(false));<NEW_LINE>b.putString(RecurrencePickerDialogFragment.BUNDLE_TIME_ZONE, t.timezone);<NEW_LINE... | FragmentManager fm = mActivity.getSupportFragmentManager(); |
494,925 | public final String methodCallName(AST _t) throws RecognitionException {<NEW_LINE>String s;<NEW_LINE>AST methodCallName_AST_in = (_t == ASTNULL<MASK><NEW_LINE>AST constant = null;<NEW_LINE>AST id = null;<NEW_LINE>AST function = null;<NEW_LINE>AST unary = null;<NEW_LINE>AST empty_array = null;<NEW_LINE>if (_t == null)<N... | ) ? null : (AST) _t; |
532,071 | private void createParametersGroup(Composite parent) {<NEW_LINE>Group composite = UIUtils.createControlGroup(parent, "Function parameters", 2, GridData.FILL_BOTH, SWT.DEFAULT);<NEW_LINE>parametersTable = new Table(composite, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);<NEW_LINE>final Gri... | (DBSProcedureParameter) item.getData(); |
401,719 | public void load(ScreenData screenData, Element element, @Nullable ScreenData hostScreenData) {<NEW_LINE>Preconditions.checkNotNullArgument(screenData, "screenData is null");<NEW_LINE>Preconditions.checkNotNullArgument(element, "element is null");<NEW_LINE>DataContext hostDataContext = null;<NEW_LINE>if (hostScreenData... | loadCollectionContainer(screenData, el, hostScreenData); |
913,104 | public void computeEnabled() {<NEW_LINE>boolean viewing = minimizedExpr.isFocusOwner() || karnaughMap.isFocusOwner();<NEW_LINE>setEnabled(LogisimMenuBar.CUT, false);<NEW_LINE><MASK><NEW_LINE>setEnabled(LogisimMenuBar.PASTE, false);<NEW_LINE>setEnabled(LogisimMenuBar.DELETE, false);<NEW_LINE>setEnabled(LogisimMenuBar.DU... | setEnabled(LogisimMenuBar.COPY, viewing); |
71,136 | public WebAsyncTaskInfo createAndRunAsyncTask(String taskName, WebAsyncTaskProcessor<?> runnable) {<NEW_LINE>int taskId = TASK_ID.incrementAndGet();<NEW_LINE>WebAsyncTaskInfo asyncTask = getAsyncTask(String.valueOf(taskId), taskName, true);<NEW_LINE>AbstractJob job = new AbstractJob(taskName) {<NEW_LINE><NEW_LINE>@Over... | setExtendedResult(runnable.getExtendedResults()); |
1,510,412 | protected ResultSet<O> retrieveEqual(final Equal<O, A> equal, final QueryOptions queryOptions, final InvertedRadixTree<StoredResultSet<O>> tree) {<NEW_LINE>return new ResultSet<O>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Iterator<O> iterator() {<NEW_LINE>ResultSet<O> rs = tree.getValueForExactKey(equal.getValue... | () : rs.iterator(); |
1,598,989 | public void init(FMLInitializationEvent evt) {<NEW_LINE>channels = NetworkRegistry.INSTANCE.newChannel(DefaultProps.NET_CHANNEL_NAME + "-ENERGY", new ChannelHandler(), new PacketHandler());<NEW_LINE>NetworkRegistry.INSTANCE.registerGuiHandler(instance, new EnergyGuiHandler());<NEW_LINE>StatementManager.registerTriggerP... | addCoolant(FluidRegistry.WATER, 0.0023f); |
903,944 | public DatetimeRange unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DatetimeRange datetimeRange = new DatetimeRange();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_... | String currentParentElement = context.getCurrentParentElement(); |
1,507,395 | public static RefasterRule<?, ?> create(String qualifiedTemplateClass, Iterable<UTypeVar> typeVariables, Collection<? extends Template<?>> beforeTemplates, Collection<? extends Template<?>> afterTemplates, ImmutableClassToInstanceMap<Annotation> annotations) {<NEW_LINE>checkState(!beforeTemplates.isEmpty(), "No @Before... | "@AfterTemplate of %s defines arguments that are not present in all @BeforeTemplate" + " methods: %s", qualifiedTemplateClass, missingArguments); |
626,450 | protected Constraint mapToConstraint(AccessConstraint accessConstraint, Group group) {<NEW_LINE>Constraint constraint = metadata.create(Constraint.class);<NEW_LINE>constraint.setPredefined(true);<NEW_LINE>constraint.setEntityName(accessConstraint.getEntityType());<NEW_LINE>if (accessConstraint instanceof JpqlAccessCons... | (accessConstraint.getOperation())); |
768,991 | protected void configure() {<NEW_LINE>bind(EmployeeService.class).to(EmployeeServiceImpl.class);<NEW_LINE>bind(TimesheetService.class).to(TimesheetServiceImpl.class);<NEW_LINE>bind(TimesheetLineService.class).to(TimesheetLineServiceImpl.class);<NEW_LINE>bind(TimesheetTimerService.class).to(TimesheetTimerServiceImpl.cla... | ).to(BankOrderServiceHRImpl.class); |
574,420 | public ServiceRegistration<?> registerEJBMBean(String appName, String moduleName, String beanName, EJBType type) {<NEW_LINE>String serverName = locationAdmin.getServerName();<NEW_LINE>ObjectName objectName = J2EEManagementObjectNameFactory.createEJBObjectName(getJ2EEType(type), <MASK><NEW_LINE>switch(type) {<NEW_LINE>c... | beanName, moduleName, appName, serverName); |
979,004 | final UpdateNodegroupVersionResult executeUpdateNodegroupVersion(UpdateNodegroupVersionRequest updateNodegroupVersionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateNodegroupVersionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
114,336 | public long readLong(Object receiver, int byteOffset) {<NEW_LINE>byte b1 = readByte(receiver, byteOffset);<NEW_LINE>byte b2 = readByte(receiver, byteOffset + 1);<NEW_LINE>byte b3 = <MASK><NEW_LINE>byte b4 = readByte(receiver, byteOffset + 3);<NEW_LINE>byte b5 = readByte(receiver, byteOffset + 4);<NEW_LINE>byte b6 = rea... | readByte(receiver, byteOffset + 2); |
818,047 | private static RelationshipGroupRecord readRelationshipGroupRecord(long id, ReadableChannel channel) throws IOException {<NEW_LINE>byte flags = channel.get();<NEW_LINE>boolean inUse = bitFlag(flags, Record.IN_USE.byteValue());<NEW_LINE>boolean requireSecondaryUnit = bitFlag(flags, Record.REQUIRE_SECONDARY_UNIT);<NEW_LI... | setSecondaryUnitIdOnLoad(channel.getLong()); |
689,075 | public static GetPatentPlanListResponse unmarshall(GetPatentPlanListResponse getPatentPlanListResponse, UnmarshallerContext _ctx) {<NEW_LINE>getPatentPlanListResponse.setRequestId(_ctx.stringValue("GetPatentPlanListResponse.RequestId"));<NEW_LINE>getPatentPlanListResponse.setPageNum(_ctx.integerValue("GetPatentPlanList... | ("GetPatentPlanListResponse.Data[" + i + "].SoldCount")); |
481,595 | public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {<NEW_LINE>if (hostId != null && jsonResponse != null) {<NEW_LINE>jsonResponse = jsonResponse.replace("\"hostId\":0", "\"hostId\":" + hostId);<NEW_LINE>... | setPodId(config.getPodId()); |
1,781,340 | protected void writeToTransaction(PortfolioTransaction transaction) {<NEW_LINE>transaction.clearUnits();<NEW_LINE>if (fees != 0)<NEW_LINE>transaction.addUnit(new //<NEW_LINE>//<NEW_LINE>Transaction.Unit(Transaction.Unit.Type.FEE, Money.of(getTransactionCurrencyCode(), fees)));<NEW_LINE>if (taxes != 0)<NEW_LINE>transact... | ).equals(getSecurityCurrencyCode()); |
1,181,373 | public static <T> ProcessorMetaSupplier metaSupplier(@Nonnull String updateQuery, @Nonnull SupplierEx<? extends CommonDataSource> dataSourceSupplier, @Nonnull BiConsumerEx<? super PreparedStatement, ? super T> bindFn, boolean exactlyOnce, int batchLimit) {<NEW_LINE>checkSerializable(dataSourceSupplier, "newConnectionFn... | collect(Collectors.toList()); |
1,331,934 | private TIntLongHashMap readPoiNameIndex(Collator instance, String query, SearchRequest<Amenity> req) throws IOException {<NEW_LINE>TIntLongHashMap offsets = new TIntLongHashMap();<NEW_LINE>List<TIntArrayList> listOffsets = null;<NEW_LINE>List<TIntLongHashMap> listOfSepOffsets = new ArrayList<TIntLongHashMap>();<NEW_LI... | .get(i) + offset); |
331,007 | private void generateListItems() {<NEW_LINE>if (allItems == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>List<TranslationItem> downloaded = new ArrayList<>();<NEW_LINE>List<TranslationItem> notDownloaded = new ArrayList<>();<NEW_LINE>for (int i = 0, allItemsSize = allItems.size(); i < allItemsSize; i++) {<NEW_LINE>Tran... | item = allItems.get(i); |
953,218 | private String extractText(@NonNull final JavaVMOption<?> option, final int column) {<NEW_LINE>final OptionValue<?> ov = option.getValue();<NEW_LINE>if (option instanceof UserPropertyNode) {<NEW_LINE>Map.Entry<String, String> entry = (ov != null ? ((OptionValue.StringPair) ov).getValue() : null);<NEW_LINE>if (entry == ... | Object o = ov.getValue(); |
479,315 | private void headerClicked(int row, MouseEvent event) {<NEW_LINE>TableViewSelectionModel<ObservableList<SpreadsheetCell>> sm = handle.getGridView().getSelectionModel();<NEW_LINE>int focusedRow = sm.getFocusedIndex();<NEW_LINE>int rowCount = handle.getCellsViewSkin().getItemCount();<NEW_LINE>ObservableList<TableColumn<O... | firstColumn = columns.get(0); |
504,380 | public static List<Token> analyzeSyntaxFile(String gcsUri) throws Exception {<NEW_LINE>// [START language_syntax_gcs]<NEW_LINE>// Instantiate the Language client com.google.cloud.language.v1.LanguageServiceClient<NEW_LINE>try (LanguageServiceClient language = LanguageServiceClient.create()) {<NEW_LINE>Document doc = Do... | getPartOfSpeech().getTag()); |
1,069,852 | public void createBindings() {<NEW_LINE>LengthConverter lengthConverter = new LengthConverter();<NEW_LINE>IntegerConverter intConverter = new IntegerConverter();<NEW_LINE>DoubleConverter doubleConverter = new DoubleConverter(Configuration.get().getLengthDisplayFormat());<NEW_LINE>MutableLocationProxy location = new Mut... | "firstPocket", textFieldFirstPocket, "text", intConverter); |
779,821 | // endregion DigitalTwinSnippets<NEW_LINE>// region RelationshipSnippets<NEW_LINE>@Override<NEW_LINE>public void createRelationship() {<NEW_LINE>// BEGIN: com.azure.digitaltwins.core.DigitalTwinsAsyncClient.createOrReplaceRelationship#String-String-Object-Class#BasicRelationship<NEW_LINE>BasicRelationship buildingToFlo... | .println("Created relationship: " + createRelationshipString)); |
506,069 | private static boolean loadBTraceScript(String filePath, boolean traceToStdOut) {<NEW_LINE>try {<NEW_LINE>String scriptName = "";<NEW_LINE>String scriptParent = "";<NEW_LINE>File traceScript = new File(filePath);<NEW_LINE>scriptName = traceScript.getName();<NEW_LINE>scriptParent = traceScript.getParent();<NEW_LINE>if (... | String traceOutput = clientSettings.getOutputFile(); |
632,635 | public <T> QueryTaskFuture<Void> eval(final QueryEnvironment<T> env, final QueryExpressionContext<T> context, QueryExpression expression, final List<Argument> args, final Callback<T> callback) {<NEW_LINE>final QueryTaskFuture<ThreadSafeMutableSet<T>> toSetFuture = QueryUtil.evalAll(env, context, args.get<MASK><NEW_LINE... | (0).getExpression()); |
271,575 | public void marshall(Application application, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (application == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(application.getName(), NAME_BINDING);<NEW_LINE>prot... | application.getArn(), ARN_BINDING); |
1,636,950 | default Function6<T1, T2, T3, T4, T5, T6, R> memoized() {<NEW_LINE>if (isMemoized()) {<NEW_LINE>return this;<NEW_LINE>} else {<NEW_LINE>final Map<Tuple6<T1, T2, T3, T4, T5, T6>, R> cache = new HashMap<>();<NEW_LINE>return (Function6<T1, T2, T3, T4, T5, T6, R> & Memoized) (t1, t2, t3, t4, t5, t6) -> {<NEW_LINE>final Tup... | cache.put(key, value); |
1,708,027 | public CreateSipRuleResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateSipRuleResult createSipRuleResult = new CreateSipRuleResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | ().unmarshall(context)); |
52,261 | public static void exec(final JProgram program) {<NEW_LINE>final MakeCallsStatic.CreateStaticImplsVisitor staticImplCreator = new MakeCallsStatic.CreateStaticImplsVisitor(program);<NEW_LINE>// 1. create the static implementations. Also process reference only types so that the mapping<NEW_LINE>// between a method and it... | staticImplCreator.getOrCreateStaticImpl(program, method); |
1,633,972 | protected CompletableFuture<Schema> tables(CompletableFuture<Map<String, Class<?>>> sqlTypeMapping, Dbms dbms, Schema schema, ProgressMeasure progressListener) {<NEW_LINE>requireNonNulls(sqlTypeMapping, dbms, schema, progressListener);<NEW_LINE>// If the wrapped task has already been cancelled, there is no point in goi... | .tables().count(); |
365,874 | public Set<Flow> bddLoopDetection(NetworkSnapshot snapshot) {<NEW_LINE>BDDPacket pkt = new BDDPacket();<NEW_LINE>// TODO add ignoreFilters parameter<NEW_LINE>boolean ignoreFilters = false;<NEW_LINE>BDDReachabilityAnalysisFactory bddReachabilityAnalysisFactory = getBddReachabilityAnalysisFactory(snapshot, pkt, ignoreFil... | setIngressVrf(loc.getVrf()); |
1,035,244 | private void println(CharSequence text, OutputListener listener, boolean important, Color color) {<NEW_LINE>if (color == null) {<NEW_LINE>// If color isn't overriden, use default colors.<NEW_LINE>if (listener != null) {<NEW_LINE>if (important)<NEW_LINE>color = typeColorMap.get(IOColors.OutputType.HYPERLINK_IMPORTANT);<... | get(IOColors.OutputType.HYPERLINK); |
69,158 | private void init() {<NEW_LINE>exceptionUnmarshallers.add(new SubscriptionLimitExceededExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new InvalidParameterExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add(new BatchEntryIdsNotDistinctExceptionUnmarshaller());<NEW_LINE>exceptionUnmarshallers.add... | .add(new VerificationExceptionUnmarshaller()); |
1,367,050 | @Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Creates a new policy condition", response = PolicyCondition.class, code = 201)<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 401, message = "Unauthorized"), @ApiResponse(code = 404, message = "The... | getObjectByUuid(Policy.class, uuid); |
109,189 | public AsyncCallFuture<VolumeApiResult> createVolumeFromSnapshot(VolumeInfo volume, DataStore store, SnapshotInfo snapshot) {<NEW_LINE>AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<VolumeApiResult>();<NEW_LINE>try {<NEW_LINE>DataObject volumeOnStore = store.create(volume);<NEW_LINE>volumeOnStore.process... | volumeOnStore, future, snapshot, null); |
562,494 | public UpdateFirewallPolicyChangeProtectionResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateFirewallPolicyChangeProtectionResult updateFirewallPolicyChangeProtectionResult = new UpdateFirewallPolicyChangeProtectionResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_... | class).unmarshall(context)); |
1,801,478 | private CharSequence generateEnumValues(final List<Token> tokens, final Token encodingToken) {<NEW_LINE>final StringBuilder sb = new StringBuilder();<NEW_LINE>final Encoding encoding = encodingToken.encoding();<NEW_LINE>sb.append(" enum Value\n" + " {\n");<NEW_LINE>for (final Token token : tokens) {<NEW_LINE>fina... | applicableNullValue().toString()); |
381,656 | public AnalyzedAlterTableOpenClose analyze(AlterTableOpenClose<Expression> node, ParamTypeHints paramTypeHints, CoordinatorTxnCtx txnCtx) {<NEW_LINE>var exprAnalyzerWithFieldsAsStrings = new ExpressionAnalyzer(txnCtx, nodeCtx, paramTypeHints, FieldProvider.FIELDS_AS_LITERAL, null);<NEW_LINE>var exprCtx = new Expression... | table, node.openTable()); |
492,092 | public void updateASI() {<NEW_LINE>final Object sourceModel = getSourceModel();<NEW_LINE>final IAttributeSetInstanceAware asiAware = attributeSetInstanceAwareFactoryService.createOrNull(sourceModel);<NEW_LINE>if (asiAware == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (asiAware.getM_Product_ID() <= 0) {<NEW_LINE>re... | ofRepoId(asi.getM_AttributeSetInstance_ID()); |
849,071 | private void doBatch(final File workflowTaskDataFile, final MarshalUtils marshalUtils, final String systemUserId) throws IOException {<NEW_LINE>final MutableInt totalInsertAffected = new MutableInt(0);<NEW_LINE>final MutableInt totalUpdateAffected = new MutableInt(0);<NEW_LINE>Logger.info(this, "Doing Workflow Task upd... | "-- total updates: " + totalUpdateAffected.intValue()); |
974,721 | static <T> InstanceHandle<T> beanInstanceHandle(InjectableBean<T> bean, CreationalContextImpl<T> parentContext, boolean resetCurrentInjectionPoint, Consumer<T> destroyLogic) {<NEW_LINE>if (bean != null) {<NEW_LINE>if (parentContext == null && Dependent.class.equals(bean.getScope())) {<NEW_LINE>parentContext = new Creat... | InjectionPointProvider.set(CurrentInjectionPointProvider.EMPTY); |
1,684,268 | static void fillPanels(TemplateWizard wizard, AbstractWizard aw, List<WizardDescriptor.Panel<WizardDescriptor>> panels, List<String> steps) {<NEW_LINE>int cnt = steps.size();<NEW_LINE>if (cnt == 0) {<NEW_LINE>cnt = 1;<NEW_LINE>}<NEW_LINE>for (int i = 0; i < cnt; i++) {<NEW_LINE>if (steps.size() > i) {<NEW_LINE>final St... | = new HTMLPanel(i, aw); |
1,025,560 | private Plugin updateMavenCompilerPlugin(final Plugin oldPlugin) {<NEW_LINE>Configuration currenConfig = oldPlugin.getConfiguration();<NEW_LINE>Configuration newConfiguration = createConfiguration();<NEW_LINE>boolean isCompilerArgsElementPresent = false;<NEW_LINE>if (currenConfig != null) {<NEW_LINE>for (POMExtensibili... | setElementText(childElement.getElementText()); |
732,143 | // GROOVY end<NEW_LINE>SourceTypeBinding buildType(SourceTypeBinding enclosingType, PackageBinding packageBinding, AccessRestriction accessRestriction) {<NEW_LINE>// provide the typeDeclaration with needed scopes<NEW_LINE>this.referenceContext.scope = this;<NEW_LINE>this.referenceContext.staticInitializerScope = new Me... | this.referenceContext.name, '$'); |
463,139 | public void createView(CreateViewStmt stmt) throws DdlException {<NEW_LINE>String dbName = stmt.getDbName();<NEW_LINE>String tableName = stmt.getTable();<NEW_LINE>// check if db exists<NEW_LINE>Database db = <MASK><NEW_LINE>// check if table exists in db<NEW_LINE>if (db.getTable(tableName).isPresent()) {<NEW_LINE>if (s... | getInternalCatalog().getDbOrDdlException(dbName); |
48,162 | public static DescribePatternPerformanceResponse unmarshall(DescribePatternPerformanceResponse describePatternPerformanceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describePatternPerformanceResponse.setRequestId(_ctx.stringValue("DescribePatternPerformanceResponse.RequestId"));<NEW_LINE>describePatternPerformanceRe... | = new ArrayList<SeriesItem>(); |
1,192,846 | private ImmutablePair<Boolean, Boolean> calculateIsInsertionOrDeletion(final Build37ExtendedIlluminaManifestRecord extendedIlluminaManifestRecord, final ReferenceSequenceFile refFile, final String fivePrimeSeq, final String indelSeq, final String threePrimeSeq) {<NEW_LINE>// Do Illumina's strange left shift http://gith... | & (insertionContextInfo.right >= 1); |
63,388 | public com.amazonaws.services.cognitoidentity.model.InvalidIdentityPoolConfigurationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.cognitoidentity.model.InvalidIdentityPoolConfigurationException invalidIdentityPoolConfigurationException = new com.amaz... | cognitoidentity.model.InvalidIdentityPoolConfigurationException(null); |
401,075 | public void bindViewHolder(FlexibleAdapter adapter, ViewHolder viewHolder, int position, List<Object> payloads) {<NEW_LINE>Context context = viewHolder.itemView.getContext();<NEW_LINE>viewHolder.accountColorIndicator.setBackgroundColor(getAccountColorIndicator());<NEW_LINE>viewHolder.accountColorIndicatorBack.setBackgr... | .ic_notif_custom) : null, null); |
135,369 | private void initFields() {<NEW_LINE>String address = instance.getProperty(PayaraModule.DEBUG_PORT);<NEW_LINE>SpinnerNumberModel addressModel = (SpinnerNumberModel) addressValue.getModel();<NEW_LINE>javaPlatforms = JavaUtils.findSupportedPlatforms(this.instance);<NEW_LINE>((JavaPlatformsComboBox) javaComboBox).updateMo... | getProperty(PayaraModule.USE_SHARED_MEM_ATTR))); |
11,923 | private void javafy_ref(ValueBox vb) {<NEW_LINE>Ref r = (Ref) vb.getValue();<NEW_LINE>if (r instanceof StaticFieldRef) {<NEW_LINE>SootFieldRef fieldRef = ((StaticFieldRef) r).getFieldRef();<NEW_LINE>// addPackage(fieldRef.declaringClass().getJavaPackageName());<NEW_LINE>String className = fieldRef.declaringClass().toSt... | , className.lastIndexOf('.')); |
1,364,328 | public static void main(String[] args) {<NEW_LINE>IJThemesManager themesManager = new IJThemesManager();<NEW_LINE>themesManager.loadBundledThemes();<NEW_LINE>String toPath = "../flatlaf-intellij-themes/src/main/java" + IJThemesPanel.THEMES_PACKAGE + "..";<NEW_LINE>StringBuilder allInfos = new StringBuilder();<NEW_LINE>... | ).replace("${allInfos}", allInfos); |
1,782,556 | static CodeReferenceMap analyze(Collection<Type> types) {<NEW_LINE>types.stream().filter(Type::isExported).forEach(ClassHierarchyAnalyzer::markTypeLive);<NEW_LINE>// Go over the entry points to start the traversal.<NEW_LINE>types.stream().flatMap(t -> t.getMembers().stream()).filter(Member::isExported).forEach<MASK><NE... | (m -> onMemberReference(m)); |
1,212,268 | TileShape[] calculate_tree_shapes(DrillItem p_drill_item) {<NEW_LINE>if (this.board == null) {<NEW_LINE>return new TileShape[0];<NEW_LINE>}<NEW_LINE>TileShape[] result = new TileShape[p_drill_item.tile_shape_count()];<NEW_LINE>for (int i = 0; i < result.length; ++i) {<NEW_LINE>Shape <MASK><NEW_LINE>if (curr_shape == nu... | curr_shape = p_drill_item.get_shape(i); |
1,097,110 | public void removeExpired(RealmModel realm) {<NEW_LINE>int expiredOffline = Time.currentTime() - realm.getOfflineSessionIdleTimeout() - SessionTimeoutHelper.PERIODIC_CLEANER_IDLE_TIMEOUT_WINDOW_SECONDS;<NEW_LINE>// prefer client session timeout if set<NEW_LINE>int expiredClientOffline = expiredOffline;<NEW_LINE>if (rea... | cs, realm.getName()); |
214,608 | protected MutablePropertyValues parseCommonContainerProperties(Element containerEle, ParserContext parserContext) {<NEW_LINE>MutablePropertyValues properties = new MutablePropertyValues();<NEW_LINE>String destinationType = containerEle.getAttribute(DESTINATION_TYPE_ATTRIBUTE);<NEW_LINE>boolean pubSubDomain = false;<NEW... | properties.add("pubSubDomain", pubSubDomain); |
137,745 | private Multimap<TopicRepository, String> deleteEventTypeWithSubscriptions(final String eventType) {<NEW_LINE>try {<NEW_LINE>return transactionTemplate.execute(action -> {<NEW_LINE>eventTypeRepository.listEventTypesWithRowLock(Set.of(eventType), EventTypeRepository.RowLockMode.UPDATE);<NEW_LINE>final List<Subscription>... | throw new InconsistentStateException("Subscription to be deleted is not found", e); |
518,041 | public static void recordMP3(AudioSegment audioSegment, Path path, UserPreferences userPreferences) throws IOException {<NEW_LINE>if (audioSegment.hasAudio()) {<NEW_LINE>OutputStream outputStream = new FileOutputStream(path.toFile());<NEW_LINE>// Write ID3 metadata<NEW_LINE>Map<AudioMetadata, String> metadataMap = Audi... | convert(audioSegment.getAudioBuffers()); |
941,512 | private JPanel buildHeaderPanel() {<NEW_LINE>JPanel headerPanel = new JPanel(new GridBagLayout());<NEW_LINE>GridBagConstraints gbc = new GridBagConstraints();<NEW_LINE>gbc.gridx = 0;<NEW_LINE>// gbc.insets = new Insets(PAD, PAD, PAD, PAD);<NEW_LINE>JButton[] navButtons = buildNavigationButtons();<NEW_LINE>for (JButton ... | PAD, PAD, PAD, PAD); |
880,568 | public Boolean hasUserPermissionToObject(final User user, final PermissionName permissionName, final SecurableModel securableModel) {<NEW_LINE>if (user == null) {<NEW_LINE>throw new IllegalArgumentException("User can not be null.");<NEW_LINE>}<NEW_LINE>if (permissionName == null) {<NEW_LINE>throw new IllegalArgumentExc... | securableModel.getId() + "] based on the ACL security settings."); |
600,641 | private void printEnumValuesJSCode(TypeElement enumElement) {<NEW_LINE>boolean isStringEnum = <MASK><NEW_LINE>String enumFullName = getRootRelativeName(enumElement);<NEW_LINE>String addItemJS;<NEW_LINE>if (isStringEnum) {<NEW_LINE>String specialMembersList = ENUM_SPECIAL_MEMBERS.stream().map(member -> getStringLiteralQ... | context.hasAnnotationType(enumElement, ANNOTATION_STRING_ENUM); |
1,205,173 | public MutableHttpResponse<JsonError> processResponse(@NonNull ErrorContext errorContext, @NonNull MutableHttpResponse<?> response) {<NEW_LINE>if (errorContext.getRequest().getMethod() == HttpMethod.HEAD) {<NEW_LINE>return (MutableHttpResponse<JsonError>) response;<NEW_LINE>}<NEW_LINE>JsonError error;<NEW_LINE>if (!err... | ).ifPresent(error::path); |
855,534 | public void execute(BulkRotateParameters parameters) throws TaskException {<NEW_LINE>int currentStep = 0;<NEW_LINE>for (PdfRotationInput input : parameters.getInputSet()) {<NEW_LINE>currentStep++;<NEW_LINE>LOG.debug("Opening {}", input.source);<NEW_LINE>try {<NEW_LINE>documentHandler = input.source.open(documentLoader)... | getOutput().accept(outputWriter); |
966,259 | private void outputsChanged(VariableListEvent event) {<NEW_LINE>final var type = event.getType();<NEW_LINE>if (type == VariableListEvent.ALL_REPLACED && !outputData.isEmpty()) {<NEW_LINE>outputData.clear();<NEW_LINE>fireModelChanged(OutputExpressionsEvent.ALL_VARIABLES_REPLACED);<NEW_LINE>} else if (type == VariableLis... | outputData.put(newName, toMove); |
1,322,249 | public Void execute(CommandContext commandContext) {<NEW_LINE>if (deploymentId == null) {<NEW_LINE>throw new FlowableIllegalArgumentException("deploymentId is null");<NEW_LINE>}<NEW_LINE>// Update all entities<NEW_LINE>ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfig... | String oldTenantId = deployment.getTenantId(); |
752,331 | public static int createTopicIfNotExists(String topic, short replicationFactor, double partitionToBrokerRatio, int minPartitionNum, Properties topicConfig, AdminClient adminClient) throws ExecutionException, InterruptedException {<NEW_LINE>try {<NEW_LINE>if (adminClient.listTopics().names().get().contains(topic)) {<NEW... | (brokerCount * partitionToBrokerRatio), minPartitionNum); |
977,379 | public static String extractJwtTokenFromResponse(Object response, String tokenString) throws Exception {<NEW_LINE>String thisMethod = "extractJwtTokenFromResponse";<NEW_LINE>try {<NEW_LINE>String fullResponse = WebResponseUtils.getResponseText(response);<NEW_LINE>String[] responseLines = fullResponse.split(System.getPr... | ) + tokenString.length()); |
921,729 | public void showTooltip(JComponent component, Point screenLocation) {<NEW_LINE>if (component == null || !component.isShowing()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Dimension size;<NEW_LINE>Point location = new Point();<NEW_LINE>GraphicsConfiguration gc;<NEW_LINE>gc = component.getGraphicsConfiguration();<NEW_LINE>Re... | getDefaultToolkit().getScreenInsets(gc); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.