idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
168,010 | private Mono<Response<List<PrivateEndpointConnectionInner>>> listPrivateEndpointConnectionsWithResponseAsync(String resourceGroupName, String resourceName) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and can... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
1,674,353 | final SyncResourceResult executeSyncResource(SyncResourceRequest syncResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(syncResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | addHandlerContext(HandlerContextKey.SERVICE_ID, "Service Catalog AppRegistry"); |
770,640 | private Map<String, Object> simpleTypeToAvro(FieldInfo fieldInfo, SimpleTypeInfo typeInfo) {<NEW_LINE>Map<String, Object> field = new HashMap<String, Object>();<NEW_LINE>// Field name<NEW_LINE>String name = SchemaUtils.toCamelCase(fieldInfo.getFieldName());<NEW_LINE>field.put("name", name);<NEW_LINE>// Field default va... | getPrimitiveType().getAvroType() }; |
1,636,137 | public List<JoinCpuLoadBo> decodeValues(Buffer valueBuffer, ApplicationStatDecodingContext decodingContext) {<NEW_LINE>final String id = decodingContext.getApplicationId();<NEW_LINE>final long baseTimestamp = decodingContext.getBaseTimestamp();<NEW_LINE>final long timestampDelta = decodingContext.getTimestampDelta();<N... | decodeTimestamps(initialTimestamp, valueBuffer, numValues); |
1,043,633 | public static SearchProjectsByRegionResponse unmarshall(SearchProjectsByRegionResponse searchProjectsByRegionResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchProjectsByRegionResponse.setRequestId(_ctx.stringValue("SearchProjectsByRegionResponse.RequestId"));<NEW_LINE>searchProjectsByRegionResponse.setCode(_ctx.inte... | ("SearchProjectsByRegionResponse.Data[" + i + "].AoneId")); |
849,236 | private void initValues(@NonNull Context context, boolean editMode) {<NEW_LINE>mBorderWidth = context.getResources().getDimension(R.dimen.cpb_default_stroke_width);<NEW_LINE>mSweepSpeed = 1f;<NEW_LINE>mRotationSpeed = 1f;<NEW_LINE>if (editMode) {<NEW_LINE>mColors = new int[] { Color.BLUE };<NEW_LINE>mMinSweepAngle = 20... | getInteger(R.integer.cpb_default_max_sweep_angle); |
216,343 | public static <T> T newInstance(Class parent, Class<T> type, String[] args) {<NEW_LINE>if (!parent.isAssignableFrom(type)) {<NEW_LINE>throw new DataProcessingException("Not a valid " + parent.getSimpleName() + " class: '" + type.getSimpleName() + "' (" + type.getName() + ')');<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>Constru... | getName() + ')', e); |
830,729 | public void updateRoute(RotatedTileBox tb, TransportRouteResult route) {<NEW_LINE>if (tb.getMapDensity() != getMapDensity() || this.route != route) {<NEW_LINE>this.route = route;<NEW_LINE>List<Location> locations;<NEW_LINE>Map<<MASK><NEW_LINE>if (route == null) {<NEW_LINE>locations = Collections.emptyList();<NEW_LINE>s... | Integer, GeometryWayStyle<?>> styleMap; |
692,031 | public static KeyPair generateKeyPair(KeyPairType keyPairType, int keySize, Provider provider) throws CryptoException {<NEW_LINE>try {<NEW_LINE>// Get a key pair generator<NEW_LINE>KeyPairGenerator keyPairGen = null;<NEW_LINE>if (provider != null) {<NEW_LINE>keyPairGen = KeyPairGenerator.getInstance(keyPairType.jce(), ... | "NoGenerateKeypair.exception.message"), keyPairType), ex); |
1,771,154 | public synchronized int read(byte[] b, int off, int len) throws IOException {<NEW_LINE>if (in == null) {<NEW_LINE>throw new IOException("Stream Closed");<NEW_LINE>}<NEW_LINE>while (slack == null) {<NEW_LINE>// might read too much<NEW_LINE>char[<MASK><NEW_LINE>int n = in.read(buf);<NEW_LINE>if (n == -1) {<NEW_LINE>retur... | ] buf = new char[len]; |
289,828 | // -------------------------------------------------------------------------<NEW_LINE>// XXX: QueryPart API<NEW_LINE>// -------------------------------------------------------------------------<NEW_LINE>@Override<NEW_LINE>public final void accept(Context<?> ctx) {<NEW_LINE>switch(ctx.family()) {<NEW_LINE>case CUBRID:<N... | .visit(inline("")); |
1,278,053 | public int[] sortEvenOdd(int[] nums) {<NEW_LINE>List<Integer> odds = new ArrayList<>();<NEW_LINE>List<Integer> evens = new ArrayList<>();<NEW_LINE>for (int i = 0; i < nums.length; i++) {<NEW_LINE>if (i % 2 == 0) {<NEW_LINE>evens.add(nums[i]);<NEW_LINE>} else {<NEW_LINE>odds.add(nums[i]);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>... | = evens.get(j++); |
151,622 | public void resize(int newSize, double defaultValue) {<NEW_LINE>if (m_bLockedInSize)<NEW_LINE>throw new GeometryException("invalid call. Attribute Stream is locked and cannot be resized.");<NEW_LINE>if (newSize <= m_size) {<NEW_LINE>if ((newSize * 5) / 4 < m_buffer.length) {<NEW_LINE>// decrease when the 25%<NEW_LINE>/... | 0, newBuffer, 0, newSize); |
1,445,147 | private static List<LaunchableGradleTask> tasks(DefaultGradleProject owner, TaskContainerInternal tasks, String projectOptions) {<NEW_LINE>if ("omit_all_tasks".equals(projectOptions)) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>} else if ("skip_task_graph_realization".equals(projectOptions)) {<NEW_LINE>return t... | t).setProject(owner)); |
500,733 | public final // JPA2.g:366:1: arithmetic_factor : ( ( '+' | '-' ) )? arithmetic_primary ;<NEW_LINE>JPA2Parser.arithmetic_factor_return arithmetic_factor() throws RecognitionException {<NEW_LINE>JPA2Parser.arithmetic_factor_return retval = new JPA2Parser.arithmetic_factor_return();<NEW_LINE>retval.start = input.LT(1);<N... | LT(-1), re); |
1,626,053 | public static boolean showEclipseReferenceResolver(@NonNull EclipseProjectReference ref, @NonNull Map<String, String> resolvedEntries) {<NEW_LINE>File workspace = ref.getEclipseWorkspaceLocation();<NEW_LINE>if (workspace != null && !workspace.exists() && resolvedEntries.get(workspace.getPath()) != null) {<NEW_LINE>ref.... | p.eclipseProjectTextField.getText()); |
984,517 | void twoComponentGenotypeLikelihoodByRead(final GenotypeAlleleCounts genotypeAlleleCounts, final double[] likelihoodByRead, final double[] readLikelihoodComponentsByAlleleCount, final int readCount) {<NEW_LINE>final int allele0 = genotypeAlleleCounts.alleleIndexAt(0);<NEW_LINE>final int freq0 = genotypeAlleleCounts.all... | + 1) * allele0 + freq0); |
1,678,564 | protected void componentShowing() {<NEW_LINE>// NOI18N<NEW_LINE>Log.getLogger().entering("QueryBuilder", "componentShowing");<NEW_LINE>String command = getSqlCommand();<NEW_LINE>if (_queryModel == null)<NEW_LINE>_queryModel = new QueryModel(quoter);<NEW_LINE>Log.getLogger().finest(" * command=" + command);<NEW_LINE>//... | getLogger().finest("QBShowing command is null"); |
1,398,484 | private void hydrateDeploymentNode(DeploymentNode deploymentNode, DeploymentNode parent) {<NEW_LINE>deploymentNode.setParent(parent);<NEW_LINE>addElementToInternalStructures(deploymentNode);<NEW_LINE>deploymentNode.getChildren().forEach(child -> hydrateDeploymentNode(child, deploymentNode));<NEW_LINE>for (SoftwareSyste... | , softwareSystemInstance.getSoftwareSystemId())); |
1,367,066 | private List<Fact> createFacts_BankFee(@NonNull final AcctSchema as, @NonNull final DocLine_BankStatement line) {<NEW_LINE>final BigDecimal bankFeeAmt = line.getBankFeeAmt();<NEW_LINE>if (bankFeeAmt.signum() == 0) {<NEW_LINE>return ImmutableList.of();<NEW_LINE>}<NEW_LINE>final Fact fact = new Fact(this, as, PostingType... | (AccountType.PayBankFee, as)); |
1,600,380 | public void marshall(RegisterCACertificateRequest registerCACertificateRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (registerCACertificateRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(... | e.getMessage(), e); |
1,156,749 | public void channelActive(ChannelHandlerContext ctx) throws Exception {<NEW_LINE>Promise<X509Certificate> unusedPromise = ctx.channel().attr(CLIENT_CERTIFICATE_PROMISE_KEY).get().addListener((Promise<X509Certificate> promise) -> {<NEW_LINE>if (promise.isSuccess()) {<NEW_LINE>sslClientCertificateHash = getCertificateHas... | ChannelFuture unusedFuture = ctx.close(); |
1,574,809 | private static JsonObject serializeBase(JavaResource resource) {<NEW_LINE>JsonObject root = Json.object();<NEW_LINE>ResourceKind kind = resource.getKind();<NEW_LINE>switch(kind) {<NEW_LINE>case CLASS:<NEW_LINE>Path clazz = ((ClassResource) resource).getPath();<NEW_LINE>root.add("kind", "class");<NEW_LINE>root.add("sour... | root.add("kind", "instrumentation"); |
477,142 | public static InputStream openForReading(Form form, ScopedFile file) throws IOException {<NEW_LINE>switch(file.getScope()) {<NEW_LINE>case Asset:<NEW_LINE>return form.openAsset(file.getFileName());<NEW_LINE>case App:<NEW_LINE>if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {<NEW_LINE>return new FileInputStream(n... | = getContentUriForPath(parts[0]); |
238,801 | public <G extends FulfillmentGroupItem> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {<NEW_LINE>CreateResponse<G> createResponse = context.createOrRetrieveCopyInstance(this);<NEW_LINE>if (createResponse.isAlreadyPopulated()) {<NEW_LINE>return createRes... | null : new Money(totalItemTaxableAmount)); |
269,425 | public S3DestinationConfig unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>S3DestinationConfig s3DestinationConfig = new S3DestinationConfig();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDep... | JsonToken token = context.getCurrentToken(); |
1,027,797 | private Optional<PaymentAllocationBuilder> preparePaymentAllocationBuilder(@NonNull final PaymentAllocationCriteria paymentAllocationCriteria) {<NEW_LINE>final boolean paymentAllocationItemsMissing = CollectionUtils.<MASK><NEW_LINE>if (paymentAllocationItemsMissing) {<NEW_LINE>return Optional.empty();<NEW_LINE>}<NEW_LI... | isEmpty(paymentAllocationCriteria.getPaymentAllocationPayableItems()); |
1,641,774 | public static void generateDependencyList(JavaCodeWriter writer, ValidateResult validatorResult, JspCoreContext context, boolean isTrackDependencies) {<NEW_LINE>writer.println("private static String[] _jspx_dependants;");<NEW_LINE>if (validatorResult.getDependencyList().size() > 0 || isTrackDependencies) {<NEW_LINE>wri... | (String) itr.next(); |
1,455,816 | public void initialize() throws IOException {<NEW_LINE>if (this.compliance == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this.releaseInHex = Integer.toHexString(Integer.parseInt(this.compliance)).toUpperCase();<NEW_LINE>// $NON-NLS-1$ //$NON-NLS-2$<NEW_LINE>Path filePath = this.jdkHome.toPath().resolve("lib").resolve... | fs = FileSystems.getFileSystem(uri); |
1,495,857 | protected void readConfig(IPath configPath) throws ErrorException {<NEW_LINE>try {<NEW_LINE>String xmlFile = configPath.toString();<NEW_LINE>File configFile = new File(xmlFile);<NEW_LINE>DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();<NEW_LINE>DocumentBuilder dBuilder;<NEW_LINE>dBuilder = dbFac... | configPath.toOSString() + "'"); |
982,452 | public AttributeType putAttributeType(String label, AttributeType.ValueType valueType) {<NEW_LINE>if (valueType == null)<NEW_LINE>throw exception(TypeDBException.of(ATTRIBUTE_VALUE_TYPE_MISSING, label));<NEW_LINE>if (!valueType.isWritable())<NEW_LINE>throw exception(TypeDBException.of(UNSUPPORTED_OPERATION));<NEW_LINE>... | AttributeTypeImpl.Double(graphMgr, label); |
1,266,788 | public void updateScene(final DependencyGraphScene scene) {<NEW_LINE>assert SwingUtilities.isEventDispatchThread();<NEW_LINE>// add all nodes and edges now<NEW_LINE>GraphNode rootNode = cache.get(root.getDependencyConflictId());<NEW_LINE>// root needs to go first..<NEW_LINE>scene.addNode(rootNode);<NEW_LINE>for (GraphN... | scene.setEdgeTarget(ed, grNode); |
229,345 | private void decompileJar(String jarFilePath, String outputDir) throws IOException {<NEW_LINE>DecompilationOptions decompilationOptions = new DecompilationOptions();<NEW_LINE>decompilationOptions.setSettings(DecompilerSettings.javaDefaults());<NEW_LINE>decompilationOptions.setFullDecompilation(true);<NEW_LINE>final Fil... | JarTypeLoader(jar), oldTypeLoader)); |
1,430,195 | public void allocateUnassigned(RoutingAllocation allocation) {<NEW_LINE>final RoutingNodes routingNodes = allocation.routingNodes();<NEW_LINE>final RoutingNodes.UnassignedShards.UnassignedIterator unassignedIterator = routingNodes.unassigned().iterator();<NEW_LINE>while (unassignedIterator.hasNext()) {<NEW_LINE>final S... | ), allocation.changes()); |
458,868 | private long streamMessagesForRecording() {<NEW_LINE>try (ExclusivePublication publication = aeron.addExclusivePublication(CHANNEL, STREAM_ID)) {<NEW_LINE>final IdleStrategy idleStrategy = YieldingIdleStrategy.INSTANCE;<NEW_LINE>while (!publication.isConnected()) {<NEW_LINE>idleStrategy.idle();<NEW_LINE>}<NEW_LINE>fina... | = (NUMBER_OF_MESSAGES / durationMs) * 1000L; |
1,157,647 | public InputRowListPlusRawValues transform(@Nullable final InputRowListPlusRawValues row) {<NEW_LINE>if (row == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final InputRowListPlusRawValues inputRowListPlusRawValues;<NEW_LINE>if (transforms.isEmpty() || row.getInputRows() == null) {<NEW_LINE>inputRowListPlusRawValu... | (inputVals.get(i)); |
739,064 | public Map<String, BlobContainer> children() throws IOException {<NEW_LINE>try (AmazonS3Reference clientReference = blobStore.clientReference()) {<NEW_LINE>return executeListing(clientReference, listObjectsRequest(keyPath)).stream().flatMap(listing -> {<NEW_LINE>assert listing.getObjectSummaries().stream().noneMatch(s ... | buildAsString() + ']', e); |
327,221 | public Object parseContent(Object object, JSONObject exJson) throws Exception {<NEW_LINE>object = JSONObject.toJSON(object);<NEW_LINE>if (object instanceof JSONObject) {<NEW_LINE>JSONObject jsonObject = (JSONObject) object;<NEW_LINE>if ("innerFun".equals(jsonObject.getString("__innerType__"))) {<NEW_LINE>String name = ... | = nameJson == null ? exJson : nameJson; |
1,154,769 | public void run() {<NEW_LINE>// Call the API so we can get the updated coordinates.<NEW_LINE>call = service.loadLocation();<NEW_LINE>call.enqueue(new Callback<IssModel>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onResponse(Call<IssModel> call, Response<IssModel> response) {<NEW_LINE>// We only need the latit... | e(throwable.getMessage()); |
180,113 | public <A> void createUnidirectional(DeployBeanDescriptor<?> targetDesc, Class<A> targetType, BeanTable beanTable, DeployTableJoin oneToManyJoin) {<NEW_LINE>// create the 'shadow' unidirectional property<NEW_LINE>// which is put on the target descriptor<NEW_LINE>DeployBeanPropertyAssocOne<A> unidirectional = new Deploy... | setName(beanTable.getBaseTable()); |
375,918 | protected Optional<ABCAnalysisLine> createABCAnalysisLine(ABCAnalysis abcAnalysis, Product product) throws AxelorException {<NEW_LINE>ABCAnalysisLine abcAnalysisLine = null;<NEW_LINE>List<StockLocation> stockLocationList = stockLocationService.getAllLocationAndSubLocation(abcAnalysis.getStockLocation(), false);<NEW_LIN... | productQty = productQty.add(convertedQty); |
510,728 | protected void createGetMethod(String url) {<NEW_LINE>URI uri = URI.create(url);<NEW_LINE>String authority = uri.getAuthority();<NEW_LINE>if ((uri.getUserInfo() == null) && authority != null) {<NEW_LINE>int <MASK><NEW_LINE>if (userInfoIndex != -1) {<NEW_LINE>String userInfo = authority.substring(0, userInfoIndex);<NEW_... | userInfoIndex = authority.lastIndexOf("@"); |
1,839,912 | protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>List<DataSourceInfoGroup> dataSourceGroups = new ArrayList<>();<NEW_LINE>List<DataSourceInfo> dataSources = new ArrayList<>();<NEW_LINE>List<ApplicationResource> privateResources = getConta... | getViewName(), "dataSourceGroups", dataSourceGroups); |
878,060 | public AuthStatus secureResponse(MessageInfo messageInfo, Subject serviceSubject) throws AuthException {<NEW_LINE>AuthStatus[] status = new AuthStatus[module.length];<NEW_LINE>for (int i = 0; i < module.length; i++) {<NEW_LINE>if (module[i] == null) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>if (isLoggable(FINE)) {<NEW_L... | secureResponseSuccessValues, SEND_FAILURE, status, i); |
1,005,285 | private void init() {<NEW_LINE>// Retrieve entire file and re-populate the list.<NEW_LINE>File snapshotFile = new File(filename);<NEW_LINE>if (!snapshotFile.exists()) {<NEW_LINE>snapshotFile.getParentFile().mkdirs();<NEW_LINE>logger.info("Snapshot status file do not exist on system. Bypassing initilization phase.");<NE... | = new MaxSizeHashMap<>(capacity); |
15,726 | public static DescribeAccountsResponse unmarshall(DescribeAccountsResponse describeAccountsResponse, UnmarshallerContext context) {<NEW_LINE>describeAccountsResponse.setRequestId(context.stringValue("DescribeAccountsResponse.RequestId"));<NEW_LINE>describeAccountsResponse.setPageSize(context.integerValue("DescribeAccou... | ("DescribeAccountsResponse.Items[" + i + "].ActiveStatus")); |
1,406,916 | public void loadMapTileAsync(final MapTileRequestState pState) {<NEW_LINE>synchronized (mQueueLockObject) {<NEW_LINE>if (DEBUG_TILE_PROVIDERS) {<NEW_LINE>ClientLog.d(LOG_TAG, "MapTileModuleProviderBase.loadMaptileAsync() on provider: " + getName() + " for tile: " + pState.getMapTile());<NEW_LINE>if (mPending.containsKe... | ClientLog.d(LOG_TAG, "MapTileModuleProviderBase.loadMaptileAsync() adding tile to request queue for modular provider."); |
698,445 | public String transformMarkdown(String source) {<NEW_LINE>List<String> <MASK><NEW_LINE>String state = "root";<NEW_LINE>boolean prevLineIsEmpty = true;<NEW_LINE>for (String line : source.split("\n")) {<NEW_LINE>switch(state) {<NEW_LINE>case "root":<NEW_LINE>if (match(fourspacesOrTab, line) && prevLineIsEmpty) {<NEW_LINE... | output = new ArrayList<>(); |
874,337 | public void parseSelectFields(JoinInfo joinInfo) {<NEW_LINE>String sideTableName = joinInfo.getSideTableName();<NEW_LINE>String nonSideTableName = joinInfo.getNonSideTable();<NEW_LINE>List<String> fields = Lists.newArrayList();<NEW_LINE>int sideTableFieldIndex = 0;<NEW_LINE>for (int i = 0; i < outFieldInfoList.size(); ... | fieldInfo = outFieldInfoList.get(i); |
1,368,463 | private void handleUpdatedFeedStatus(Feed feed) {<NEW_LINE>if (feed != null) {<NEW_LINE>if (DownloadService.isDownloadingFile(feed.getDownload_url())) {<NEW_LINE>viewBinding.subscribeButton.setEnabled(false);<NEW_LINE>viewBinding.subscribeButton.setText(R.string.subscribing_label);<NEW_LINE>} else if (feedInFeedlist(fe... | editor.putBoolean(PREF_LAST_AUTO_DOWNLOAD, autoDownload); |
972,221 | final DeleteUserResult executeDeleteUser(DeleteUserRequest deleteUserRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteUserRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
126,968 | public static IRubyObject doAcceptNonblock(RubySocket sock, ThreadContext context, boolean ex) {<NEW_LINE>try {<NEW_LINE>Channel channel = sock.getChannel();<NEW_LINE>if (channel instanceof SelectableChannel) {<NEW_LINE>SelectableChannel selectable = (SelectableChannel) channel;<NEW_LINE>synchronized (selectable.blocki... | throw context.runtime.newErrnoENOPROTOOPTError(); |
499,533 | public ListRootsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListRootsResult listRootsResult = new ListRootsResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = conte... | int originalDepth = context.getCurrentDepth(); |
1,476,605 | public JComponent prepareRenderingComponent(JXMonthView monthView, Calendar calendar, CalendarState dayState) {<NEW_LINE>JComponent c = super.<MASK><NEW_LINE>int px = monthView.getBoxPaddingX();<NEW_LINE>int py = monthView.getBoxPaddingY();<NEW_LINE>// scale borders<NEW_LINE>Border border = null;<NEW_LINE>if (dayState ... | prepareRenderingComponent(monthView, calendar, dayState); |
127,200 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject sourceObject = source.getSourceObject(game);<NEW_LINE>Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));<NEW_LINE>if (controller != null && sourceObject ... | getId(), Boolean.TRUE); |
1,348,123 | public PersistenceResponse addEntity(EntityForm entityForm, String[] customCriteria, List<SectionCrumb> sectionCrumb) throws ServiceException {<NEW_LINE>PersistencePackageRequest ppr = getRequestForEntityForm(entityForm, customCriteria, sectionCrumb);<NEW_LINE>// If the entity form has dynamic forms inside of it, we ne... | String propertyName = info.getPropertyName(); |
1,815,288 | public com.amazonaws.services.polly.model.InvalidS3KeyException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.polly.model.InvalidS3KeyException invalidS3KeyException = new com.amazonaws.services.<MASK><NEW_LINE>int originalDepth = context.getCurrentDepth();<NE... | polly.model.InvalidS3KeyException(null); |
1,410,638 | private void initQRCodeReaderView() {<NEW_LINE>View content = getLayoutInflater().inflate(R.<MASK><NEW_LINE>qrCodeReaderView = (QRCodeReaderView) content.findViewById(R.id.qrdecoderview);<NEW_LINE>resultTextView = (TextView) content.findViewById(R.id.result_text_view);<NEW_LINE>flashlightCheckBox = (CheckBox) content.f... | layout.content_decoder, mainLayout, true); |
539,759 | public DashEncryption unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DashEncryption dashEncryption = new DashEncryption();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth +... | JsonToken token = context.getCurrentToken(); |
903,264 | public static void main(String[] args) {<NEW_LINE>JetInstance instance1 = Jet.newJetInstance();<NEW_LINE>JetInstance instance2 = Jet.newJetInstance();<NEW_LINE>Pipeline p = Pipeline.create();<NEW_LINE>p.readFrom(Sources.<Integer, Integer>mapJournal("source", START_FROM_OLDEST)).withoutTimestamps().writeTo(Sinks.list("s... | (instance1.getJob(jobName)); |
1,075,398 | protected void init(double[] x, double[] y) {<NEW_LINE>if (x.length != y.length) {<NEW_LINE>// Arrays must have the same length<NEW_LINE>// TODO log something<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (x.length < 2) {<NEW_LINE>// Spline edges must have at least two points<NEW_LINE>// TODO log something<NEW_LINE>return;<N... | ] - y[i - 1]; |
1,486,266 | private void calculatePathsBetweenVerticesAsync(V v1, V v2) {<NEW_LINE>if (v1.equals(v2)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>CallbackAccumulator<List<V>> accumulator = new CallbackAccumulator<>(path -> {<NEW_LINE>Collection<E> edges = pathToEdgesAsync(path);<NEW_LINE>SystemUtilities.runSwingLater(() -> setInHoverPa... | -> setStatusTextSwing("Path computation halted by user or timeout.\n" + "Paths shown in graph are not complete!")); |
876,201 | private static Map<String, List<String>> createRequestHeaders(String host, int port, ClientEndpointConfig clientEndpointConfiguration) {<NEW_LINE>Map<String, List<String>> headers = new HashMap<>();<NEW_LINE>List<Extension> extensions = clientEndpointConfiguration.getExtensions();<NEW_LINE>List<String> subProtocols = c... | .get(Constants.AUTHORIZATION_HEADER_NAME)); |
566,412 | private X509TrustManager trustManager(SSLSocketFactory sslSocketFactory) throws Exception {<NEW_LINE>Class <MASK><NEW_LINE>Class sslSocketClass = Class.forName("com.android.org.conscrypt.OpenSSLSocketImpl");<NEW_LINE>Object context = readFieldOrNull(sslSocketFactory, sslParametersClass, "sslParameters");<NEW_LINE>if (c... | sslParametersClass = Class.forName("com.android.org.conscrypt.SSLParametersImpl"); |
1,211,895 | public Object tryMovingDispatch(ProceedingJoinPoint joinpoint, String clusterId, ForwardInfo forwardInfo) throws Throwable {<NEW_LINE>String targetMethodName = joinpoint.getSignature().getName();<NEW_LINE>logger.<MASK><NEW_LINE>if (forwardInfo != null && forwardInfo.getType() == ForwardType.MOVING) {<NEW_LINE>logger.in... | info("[tryMovingDispatch]{}, {}", targetMethodName, clusterId); |
1,478,951 | protected void exportBottomPen(JRPen leftPen, JRPen bottomPen, JRPen rightPen, JRPrintElement element) {<NEW_LINE>if (bottomPen.getLineWidth() > 0f) {<NEW_LINE>float leftOffset <MASK><NEW_LINE>float rightOffset = rightPen.getLineWidth() / 2;<NEW_LINE>int lcOffsetX = getOffsetX();<NEW_LINE>int lcOffsetY = getOffsetY();<... | = leftPen.getLineWidth() / 2; |
1,015,522 | static Bundle jsonFromGoogleUser(@NonNull GoogleSignInAccount acct) {<NEW_LINE>Bundle auth = new Bundle();<NEW_LINE>auth.putString("accessToken", null);<NEW_LINE>auth.putString("accessTokenExpirationDate", null);<NEW_LINE>auth.putString("refreshToken", null);<NEW_LINE>auth.putString("idToken", acct.getIdToken());<NEW_L... | "email", acct.getEmail()); |
609,560 | public static RoaringBitmap or(final RoaringBitmap x1, final RoaringBitmap x2) {<NEW_LINE>final RoaringBitmap answer = new RoaringBitmap();<NEW_LINE>int pos1 = 0, pos2 = 0;<NEW_LINE>final int length1 = x1.highLowContainer.size(), length2 = x2.highLowContainer.size();<NEW_LINE>main: if (pos1 < length1 && pos2 < length2)... | appendCopy(x2.highLowContainer, pos2); |
727,572 | private void processFeatureRange(FeatureRange range, PredicateOptions options) {<NEW_LINE>range.clearPartitions();<NEW_LINE>int arity = options.getArity();<NEW_LINE>RangePruner rangePruner = new RangePruner(range, options, arity);<NEW_LINE>long from = rangePruner.getFrom();<NEW_LINE><MASK><NEW_LINE>if (from < 0) {<NEW_... | long to = rangePruner.getTo(); |
882,696 | private void process(int groupOrd, int facetOrd) throws IOException {<NEW_LINE>if (facetOrd < startFacetOrd || facetOrd >= endFacetOrd) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int segmentGroupedFacetsIndex = groupOrd * (facetFieldNumTerms + 1) + facetOrd;<NEW_LINE>if (segmentGroupedFacetHits.exists(segmentGroupedFacetsI... | (groupFieldTermsIndex.lookupOrd(groupOrd)); |
1,344,892 | public Expr apply(Expr expr, Analyzer analyzer, ExprRewriter.ClauseType clauseType) throws AnalysisException {<NEW_LINE>if (!(expr instanceof CompoundPredicate))<NEW_LINE>return expr;<NEW_LINE>CompoundPredicate cp = (CompoundPredicate) expr;<NEW_LINE>List<Expr> children = cp.getChildren();<NEW_LINE>if (children.size() ... | ) leftChild).getValue()); |
463,883 | void startGatheringIteratedModel(final IStandaloneElementTag firstTag, final ProcessorExecutionVars processorExecutionVars, final String iterVariableName, final String iterStatusVariableName, final Object iteratedObject) {<NEW_LINE>SkipBody gatheredSkipBody = this.skipBodyByLevel[this.modelLevel];<NEW_LINE>gatheredSkip... | firstTag.getElementDefinition().elementName); |
1,518,822 | public void started(Container moduleContainer) {<NEW_LINE>if (c_logger.isTraceDebugEnabled()) {<NEW_LINE>c_logger.traceDebug("started");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>WebAppConfiguration webConfig = (WebAppConfiguration) moduleContainer.adapt(WebAppConfig.class);<NEW_LINE>String name = webConfig.getModuleName();<N... | null, e.getLocalizedMessage()); |
1,431,354 | final CreateClassificationJobResult executeCreateClassificationJob(CreateClassificationJobRequest createClassificationJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createClassificationJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | false), new CreateClassificationJobResultJsonUnmarshaller()); |
4,795 | public long handle(Emulator<?> emulator) {<NEW_LINE><MASK><NEW_LINE>long handle = context.getLongArg(0);<NEW_LINE>Pointer symbol = context.getPointerArg(1);<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("__dyld_dlsym handle=0x" + Long.toHexString(handle) + ", symbol=" + symbol.getString(0));<NEW_LINE>}<NEW_LI... | RegisterContext context = emulator.getContext(); |
906,528 | public static void createIcebergTable(Database db, CreateTableStmt stmt) throws DdlException {<NEW_LINE>String tableName = stmt.getTableName();<NEW_LINE>Map<String, String<MASK><NEW_LINE>// validate iceberg table properties<NEW_LINE>validateProperties(properties, true);<NEW_LINE>IcebergProperty icebergProperty = new Ic... | > properties = stmt.getProperties(); |
1,220,259 | public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws Throwable {<NEW_LINE>blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run(BlackboxTestStage stage) throws Throwable {<NEW_LINE>final String onComple... | onCompleteStackElement = env.findCallerMethodInStackTrace(onCompleteMethod); |
458,807 | protected RestTemplate createRestTemplate() {<NEW_LINE>ClientHttpRequestFactory requestFactory = ClientHttpRequestFactorySelector.getRequestFactory();<NEW_LINE>RestTemplate restTemplate = new RestTemplate(requestFactory);<NEW_LINE>List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>(2);<NEW... | .add(new FormHttpMessageConverter()); |
1,705,793 | final BatchStartResult executeBatchStart(BatchStartRequest batchStartRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchStartRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
1,481,034 | public static void loadSources() throws IOException, ParserException {<NEW_LINE>loadWebSource();<NEW_LINE>if (familyCalendars.getCalendars().isEmpty()) {<NEW_LINE>totalWorkProperty.set(10);<NEW_LINE>createWebCalendar("https://www.nasa.gov/templateimages/redesign/calendar/iCal/nasa_calendar.ics", "NASA", Calendar.Style.... | Calendar.Style.STYLE5, familyCalendars); |
1,734,406 | private int nextToken(boolean returnEOLs) throws IOException {<NEW_LINE>int lineno = lineNumber();<NEW_LINE>// Check to see whether the previous call to nextToken() left an<NEW_LINE>// EOL on the stream<NEW_LINE>if (curToken() == StreamTokenizer.TT_EOL) {<NEW_LINE>state.setStartOfLine(true);<NEW_LINE>} else if (!state.... | while (val == StreamTokenizer.TT_EOL); |
1,520,150 | public void onApplicationReady(ApplicationReadyEvent event) {<NEW_LINE>ServiceInstance serviceInstance = DataWorkCloudApplication.getServiceInstance();<NEW_LINE>LinkisECMApplication.setECMServiceInstance(serviceInstance);<NEW_LINE>ECMContext context = event.getApplicationContext(<MASK><NEW_LINE>LinkisECMApplication.set... | ).getBean(ECMContext.class); |
98,373 | private void recalcWidth(Date date, String prefix) {<NEW_LINE>try {<NEW_LINE>if (recalculatingWidths) {<NEW_LINE>// seen recursion here with width and format flipping, guard against it<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>recalculatingWidths = true;<NEW_LINE>String suffix = showTime && !multiline ? " hh:mm a" : "";<NEW... | date_str = temp.format(date); |
1,841,982 | public ContainsPiiEntitiesResult containsPiiEntities(ContainsPiiEntitiesRequest containsPiiEntitiesRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(containsPiiEntitiesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,161,375 | private void logService(BluetoothGattService service, boolean included) {<NEW_LINE>Timber.d("Service %s%s", BluetoothGattUuid.prettyPrint(service.getUuid()), included ? " (included)" : "");<NEW_LINE>for (BluetoothGattCharacteristic characteristic : service.getCharacteristics()) {<NEW_LINE>Timber.d("|- characteristic %s... | value), byteToString(value)); |
355,480 | public String payrollMovement(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value) {<NEW_LINE>if (isCalloutActive() || value == null)<NEW_LINE>return "";<NEW_LINE>// get value<NEW_LINE>int HR_Movement_ID = ((<MASK><NEW_LINE>if (HR_Movement_ID == 0)<NEW_LINE>return "";<NEW_LINE>// Get amount from ... | Integer) value).intValue(); |
547,361 | public void putFloat(long t, float v) {<NEW_LINE>if (writeCurArrayIndex == -1) {<NEW_LINE>if (capacity >= CAPACITY_THRESHOLD) {<NEW_LINE>((LinkedList<long[]>) timeRet).addFirst(new long[capacity]);<NEW_LINE>((LinkedList<float[]>) floatRet).<MASK><NEW_LINE>writeCurListIndex++;<NEW_LINE>writeCurArrayIndex = capacity - 1;... | addFirst(new float[capacity]); |
214,947 | public UpdateRepositoryResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>UpdateRepositoryResult updateRepositoryResult = new UpdateRepositoryResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | JsonToken token = context.getCurrentToken(); |
1,122,994 | <R extends Collection<E>, E, T1, T2, T3, T4, T5, T6> ManyInvocationSpec<E> fromMany(ConnectionFunction6<T1, T2, T3, T4, T5, T6, R> function, PipelineFunction6<T1, T2, T3, T4, T5, T6, R> pipelineFunction, T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6) {<NEW_LINE>Assert.notNull(function, "ConnectionFunction must not be null!"... | Assert.notNull(pipelineFunction, "PipelineFunction must not be null!"); |
1,153,987 | public void updateTaskPartitionList(int workerId, int workerNumPerProcess, List<Integer> processPartitionList) {<NEW_LINE>int index = workerNumPerProcess * workerId;<NEW_LINE>Map<Integer, List<Integer>> taskPartitionList = this.processTaskPartitionList.computeIfAbsent(workerId, k -> Maps.newHashMap());<NEW_LINE>LinkedL... | index + workerNumPerProcess - 1, partitionList); |
308,783 | public void run() {<NEW_LINE>while (!Tray.this.appIsReady) {<NEW_LINE>Tray.this.ti.setImage(Tray.this<MASK><NEW_LINE>if (OS.isMacArchitecture)<NEW_LINE>setDockIcon(Tray.this.progressIcons[this.ic]);<NEW_LINE>this.ic++;<NEW_LINE>if (this.ic >= 4)<NEW_LINE>this.ic = 0;<NEW_LINE>try {<NEW_LINE>Thread.sleep(80);<NEW_LINE>}... | .progressIcons[this.ic]); |
1,604,051 | public static <T> Flux<IDocumentQueryExecutionComponent<T>> createAsync(BiFunction<String, PipelinedDocumentQueryParams<T>, Flux<IDocumentQueryExecutionComponent<T>>> createSourceComponentFunction, int skipCount, String continuationToken, PipelinedDocumentQueryParams<T> documentQueryParams) {<NEW_LINE>OffsetContinuatio... | = new OffsetContinuationToken(skipCount, null); |
1,648,208 | public String typeOf() {<NEW_LINE>List<? extends Expression> operands = children();<NEW_LINE>switch(getOperator()) {<NEW_LINE>case PRE_INCREMENT:<NEW_LINE>case PRE_DECREMENT:<NEW_LINE>case TO_NUMBER:<NEW_LINE>case NEGATION:<NEW_LINE>case INVERSE:<NEW_LINE>case MULTIPLICATION:<NEW_LINE>case DIVISION:<NEW_LINE>case MODUL... | ) - 1).typeOf(); |
772,402 | public void initialise() throws Exception {<NEW_LINE>panel = new JPanel();<NEW_LINE>propertySelectorPanel = createPropertySelectorPanel();<NEW_LINE>propertySelectorPanel.addSelectionListener(selListener);<NEW_LINE>propertySelectorPanel.setBorder(ComponentFactory.createTitledBorder("Restricted property"));<NEW_LINE>fill... | F>> types = createTypes(); |
1,743,397 | private static Vector apply(CompIntFloatVector v1, IntDummyVector v2, Binary op) {<NEW_LINE>IntFloatVector[<MASK><NEW_LINE>Storage[] resParts = StorageSwitch.applyComp(v1, v2, op);<NEW_LINE>if (!op.isKeepStorage()) {<NEW_LINE>for (int i = 0; i < parts.length; i++) {<NEW_LINE>if (parts[i].getStorage() instanceof IntFloa... | ] parts = v1.getPartitions(); |
1,834,496 | public static void main(String[] args) {<NEW_LINE>TokenCredential tokenCredential = new DefaultAzureCredentialBuilder().build();<NEW_LINE>LogsQueryClient logsQueryClient = new LogsQueryClientBuilder().credential(tokenCredential).httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BODY_AND_HEADERS)).build... | collect(Collectors.toSet()); |
579,741 | private void checkThatRecordIsIndexed(ODocument doc, OIndex index, List<String> fields) {<NEW_LINE>Object[] vals = new Object[fields.size()];<NEW_LINE><MASK><NEW_LINE>for (int i = 0; i < vals.length; i++) {<NEW_LINE>vals[i] = doc.field(fields.get(i));<NEW_LINE>}<NEW_LINE>Object indexKey = index.getDefinition().createVa... | ORID docId = doc.getIdentity(); |
404,661 | void closeInternals(boolean waitForCloseCompletion) {<NEW_LINE>if (!this.getIsClosed()) {<NEW_LINE>if (this.sendLink != null && this.sendLink.getLocalState() != EndpointState.CLOSED) {<NEW_LINE>try {<NEW_LINE>this.parent.underlyingFactory.scheduleOnReactorThread(new DispatchHandler() {<NEW_LINE><NEW_LINE>@Override<NEW_... | completeFuture(this.closeFuture, null); |
182,830 | public static Iterable<SegmentId> iterateAllPossibleParsings(String segmentId) {<NEW_LINE>List<String> splits = DELIMITER_SPLITTER.splitToList(segmentId);<NEW_LINE>String probableDataSource = tryExtractMostProbableDataSource(segmentId);<NEW_LINE>// Iterate parsings with the most probably data source first to allow the ... | Iterables.concat(probableParsings, otherPossibleParsings); |
1,309,769 | public ShenyuAdminResult syncData() {<NEW_LINE>List<AppAuthDO> appAuthDOList = appAuthMapper.selectAll();<NEW_LINE>if (CollectionUtils.isEmpty(appAuthDOList)) {<NEW_LINE>return ShenyuAdminResult.success();<NEW_LINE>}<NEW_LINE>Set<String> idSet = appAuthDOList.stream().map(BaseDO::getId).collect(Collectors.toSet());<NEW... | pathMap = this.prepareAuthPathData(idSet); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.