idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
434,827 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player player = game.getPlayer(source.getControllerId());<NEW_LINE>if (player == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Target target = new TargetCardInHand(0, Integer.MAX_VALUE, StaticFilters.FILTER_CARD);<NEW_LINE>player.choose(outcome, target, so... | CardsImpl(target.getTargets()); |
312,972 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String partnerDestinationName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new Ill... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
269,824 | private IdentifierPool replenishIdentifierPool(SharedSessionContractImplementor session) throws HibernateException {<NEW_LINE>JdbcCoordinator coordinator = session.getJdbcCoordinator();<NEW_LINE>List<Serializable> identifiers = new ArrayList<>(this.fetchSize);<NEW_LINE>try (PreparedStatement statement = coordinator.get... | setInt(1, this.fetchSize); |
1,119,572 | // Upgrades the geometry to a feature geometry.<NEW_LINE>private static Geometry convertGeometry_(Geometry geometry, double tolerance) {<NEW_LINE>int gt = geometry.getType().value();<NEW_LINE>if (Geometry.isSegment(gt)) {<NEW_LINE>Polyline polyline = new <MASK><NEW_LINE>polyline.addSegment((Segment) geometry, true);<NE... | Polyline(geometry.getDescription()); |
1,421,445 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.fragment_citylist, container, false);<NEW_LINE>ButterKnife.bind(this, view);<NEW_LINE>// Hide keyboard<NEW_LINE>InputMethodManager imm = (InputMethodManager) mActiv... | findViewById(R.id.search_view); |
1,077,721 | private State produceBlock() {<NEW_LINE>State state = stateManager.getState();<NEW_LINE>if (!State.OK.equals(state)) {<NEW_LINE>return state;<NEW_LINE>}<NEW_LINE>synchronized (dposService.getBlockHandle().getLock()) {<NEW_LINE>long slot = dposSlot.getSlot(System.currentTimeMillis() + 50);<NEW_LINE>if (slot == 0) {<NEW_... | getMiners().get(pWitness); |
1,647,031 | public void marshall(FlowDefinition flowDefinition, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (flowDefinition == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(flowDefinition.getFlowArn(), FLOWARN_BINDI... | flowDefinition.getFlowName(), FLOWNAME_BINDING); |
1,557,754 | public void run() {<NEW_LINE>String dn;<NEW_LINE>File f = <MASK><NEW_LINE>if (f.exists()) {<NEW_LINE>FileObject fo = FileUtil.toFileObject(f);<NEW_LINE>Project p = FileOwnerQuery.getOwner(fo);<NEW_LINE>if (p != null) {<NEW_LINE>ProjectInformation pi = (ProjectInformation) ProjectUtils.getInformation(p);<NEW_LINE>if (pi... | new File((String) o); |
842,693 | private boolean checkConditionAndStartDragging(RecyclerView rv, MotionEvent e, boolean checkTouchSlop) {<NEW_LINE>if (mDraggingItemInfo != null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final int touchX = (int) (e.getX() + 0.5f);<NEW_LINE>final int touchY = (int) (e.getY() + 0.5f);<NEW_LINE>mLastTouchX = touchX;<NE... | Log.d(TAG, "dragging started"); |
767,283 | static HazelcastInstance embeddedHazelcastServer() {<NEW_LINE>Config config = new Config();<NEW_LINE>NetworkConfig networkConfig = config.getNetworkConfig();<NEW_LINE>networkConfig.setPort(0);<NEW_LINE>networkConfig.getJoin().getMulticastConfig().setEnabled(false);<NEW_LINE>MapAttributeConfig attributeConfig = new MapA... | ).setTypeClass(MapSession.class); |
633,744 | private void appendCardsStyle(AppDialogPresenter settingsPresenter) {<NEW_LINE>List<OptionItem> options = new ArrayList<>();<NEW_LINE>OptionItem animatedPreviewsOption = UiOptionItem.from(getContext().getString(R.string.card_animated_previews), option -> mMainUIData.enableCardAnimatedPreviews(option.isSelected()), mMai... | ), mMainUIData.isCardTextAutoScrollEnabled()); |
1,105,176 | private static boolean isImageDifferent(BufferedImage imgExpected, BufferedImage imgActual) {<NEW_LINE>DataBuffer dbExpected = imgExpected.getData().getDataBuffer();<NEW_LINE>DataBuffer dbActual = imgActual.getData().getDataBuffer();<NEW_LINE>if (dbExpected.getDataType() != dbActual.getDataType()) {<NEW_LINE>System.out... | ) dbActual).getData()); |
1,191,126 | public void marshall(DistributionConfiguration distributionConfiguration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (distributionConfiguration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(distribut... | distributionConfiguration.getDateCreated(), DATECREATED_BINDING); |
1,474,434 | final CreateVpcEndpointConnectionNotificationResult executeCreateVpcEndpointConnectionNotification(CreateVpcEndpointConnectionNotificationRequest createVpcEndpointConnectionNotificationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createVpcEndpointConnectionNotificationRequest);<NEW_LIN... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
532,765 | public static void createPngCanvasDataUrl(Diagram diagram, double scaling, DownloadPopupPanel receiver, DownloadType type) {<NEW_LINE>ThemeFactory.THEMES currentTheme = ThemeFactory.getActiveThemeEnum();<NEW_LINE>ThemeFactory.changeTheme(ThemeFactory.THEMES.LIGHT, null, false);<NEW_LINE>DrawCanvas pngCanvas = new DrawC... | receiver.onData(dataUrl, type); |
344,604 | private static Vector apply(CompLongDoubleVector v1, LongDummyVector v2, Binary op) {<NEW_LINE>LongDoubleVector[<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 Lo... | ] parts = v1.getPartitions(); |
1,826,332 | public static Query<Long> averagePlaytimePerRegularPlayer(long after, long before, Long threshold) {<NEW_LINE>return database -> {<NEW_LINE>// INNER JOIN limits the users to only those that are regular<NEW_LINE>String selectPlaytimePerPlayer = SELECT + "p." + SessionsTable.USER_UUID + "," + "SUM(p." + SessionsTable.SES... | statement.setDouble(12, 5.1); |
880,327 | private List<BasicData> loadIrisData() {<NEW_LINE>try {<NEW_LINE>final InputStream istream = this.getClass().getResourceAsStream("/iris.csv");<NEW_LINE>if (istream == null) {<NEW_LINE>System.out.println("Cannot access data set, make sure the resources are available.");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>final... | species = ds.encodeNumeric(4); |
187,057 | public void startUp(IngestJobContext context) throws IngestModuleException {<NEW_LINE>this.context = context;<NEW_LINE>// make sure this is Windows<NEW_LINE>// NON-NLS<NEW_LINE>String os = System.getProperty("os.name");<NEW_LINE>if (!os.startsWith("Windows")) {<NEW_LINE>// NON-NLS<NEW_LINE>String message = NbBundle.get... | log(Level.SEVERE, message); |
1,081,171 | protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset) {<NEW_LINE>List<AllDayEntryView> entryViews = getChildren().stream().filter(node -> node instanceof AllDayEntryView).map(node -> (AllDayEntryView) node).collect(Collectors.toList());<NEW_LINE>List<... | () + extraPadding.getBottom(); |
798,493 | public void sendCompleted(long[] startTicks, long[] endTicks) {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "sendCompleted", new Object[] { SIMPUtils.longArrayToString(startTicks), SIMPUtils.longArrayToString(endTicks) });<NEW_LINE>try {<NEW_LINE>// Check the AIStr... | SibTr.exit(tc, "sendCompleted"); |
214,760 | protected void copyTrackResultsIntoCurrentFrame(T image) {<NEW_LINE>descriptor.setImage(image);<NEW_LINE>// Compute the descriptor region size based in the input image size<NEW_LINE>int featureRadius = config.featureRadius.computeI(Math.max(width, height));<NEW_LINE>// Extract feature and track information from the cur... | currentFrame.descriptions.grow()); |
1,526,979 | public static void vertical5(Kernel1D_S32 kernel, GrayS16 src, GrayI16 dst) {<NEW_LINE>final short[] dataSrc = src.data;<NEW_LINE>final short[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k3 = kernel.data[2];<NEW_LINE>final int k4 = kernel.data[... | int imgWidth = dst.getWidth(); |
559,017 | private void scroll_to(int direction, MouseEvent e) {<NEW_LINE>if (direction == scrolling_direction) {<NEW_LINE>if (direction == 0) {<NEW_LINE>// We're moving inside the view<NEW_LINE>BCoord bc = toBufCoords(toViewCoord(e.getPoint()));<NEW_LINE>sel.track(<MASK><NEW_LINE>repaint(false);<NEW_LINE>}<NEW_LINE>return;<NEW_L... | new Coord(bc, firsta)); |
456,584 | public void onClick(View v) {<NEW_LINE>switch(v.getId()) {<NEW_LINE>case R.id.file_contact_list_option_permissions_layout:<NEW_LINE>if (requireActivity() instanceof FileContactListActivity) {<NEW_LINE>((FileContactListActivity) requireActivity()).changePermissions();<NEW_LINE>} else if (requireActivity() instanceof Fil... | requireActivity()).changePermissions(); |
436,334 | public Object clone() {<NEW_LINE>EjbJarProxy proxy;<NEW_LINE>if (ejbJar == null)<NEW_LINE>proxy = new EjbJarProxy(null, version);<NEW_LINE>else {<NEW_LINE>EjbJar clonedEjbJar = (EjbJar) ejbJar.clone();<NEW_LINE>proxy = new EjbJarProxy(clonedEjbJar, version);<NEW_LINE>if (EjbJar.VERSION_3_2.equals(version)) {<NEW_LINE>(... | ) clonedEjbJar)._setSchemaLocation("http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/j2ee/ejb-jar_3_0.xsd"); |
1,708,199 | private MForecastLine importForecast(X_I_Forecast ifl) {<NEW_LINE>MForecastLine fl = new MForecastLine(getCtx(), ifl.getM_ForecastLine_ID(), get_TrxName());<NEW_LINE>MForecast f = (MForecast) ifl.getM_Forecast();<NEW_LINE>if (fl == null || fl.get_ID() <= 0) {<NEW_LINE>fl = new MForecastLine(Env.getCtx(), 0, get_TrxName... | + ifl.getDatePromised())); |
1,672,161 | public void onMatch(RelOptRuleCall call) {<NEW_LINE>assert matches(call);<NEW_LINE>final Join join = call.rel(0);<NEW_LINE><MASK><NEW_LINE>final RelNode left = join.getLeft();<NEW_LINE>final int leftFieldCount = left.getRowType().getFieldCount();<NEW_LINE>final RelOptCluster cluster = join.getCluster();<NEW_LINE>final ... | RelNode right = join.getRight(); |
1,380,532 | private TextLine findLineFrom(int position) {<NEW_LINE>// Check boundary conditions<NEW_LINE>if (position == 0) {<NEW_LINE>return textLines[0];<NEW_LINE>} else if (position == textLines[length - 1].endOffset()) {<NEW_LINE>return textLines[length - 1];<NEW_LINE>}<NEW_LINE>TextLine foundTextLine = null;<NEW_LINE>int left... | textLines[middle].endOffsetWithNewLines(); |
31,963 | private void pushAddServerPopupAndStartLogBackAppender() {<NEW_LINE>AddServerPopup addServerPopup = nuiManager.pushScreen(AddServerPopup.ASSET_URI, AddServerPopup.class);<NEW_LINE>addServerPopup.removeTip();<NEW_LINE>ServerInfo serverInfo;<NEW_LINE>TelemetryConfig telemetryConfig = config.getTelemetryConfig();<NEW_LINE... | serverInfo.setOwner(TelemetryLogstashAppender.DEFAULT_LOGSTASH_OWNER); |
1,028,055 | public List<LogicalRouterPort> findLogicalRouterPortByGatewayServiceAndVlanId(final String logicalRouterUuid, final String gatewayServiceUuid, final long vlanId) throws NiciraNvpApiException {<NEW_LINE>final String uri = buildLogicalRouterElementUri(logicalRouterUuid, LPORT_PATH_SEGMENT);<NEW_LINE>final Map<String, <MA... | String> params = buildBasicParametersMap(WILDCARD_QUERY_PARAMETER); |
1,728,806 | static Controller newInstance(@NonNull Bundle bundle) {<NEW_LINE>final String <MASK><NEW_LINE>// noinspection ConstantConditions<NEW_LINE>Class cls = ClassUtils.classForName(className, false);<NEW_LINE>Constructor[] constructors = cls.getConstructors();<NEW_LINE>Constructor bundleConstructor = getBundleConstructor(cons... | className = bundle.getString(KEY_CLASS_NAME); |
807,159 | private PResult handleStringMetaData(final PStringMetaData stringMetaData) {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Handle PStringMetaData={}"<MASK><NEW_LINE>}<NEW_LINE>try {<NEW_LINE>final Header agentInfo = ServerContext.getAgentInfo();<NEW_LINE>final String agentId = agentInfo.getAgentId();<N... | , MessageFormatUtils.debugLog(stringMetaData)); |
22,747 | public static ListUsersResponse unmarshall(ListUsersResponse listUsersResponse, UnmarshallerContext _ctx) {<NEW_LINE>listUsersResponse.setRequestId<MASK><NEW_LINE>listUsersResponse.setCode(_ctx.integerValue("ListUsersResponse.Code"));<NEW_LINE>listUsersResponse.setErrorMsg(_ctx.stringValue("ListUsersResponse.ErrorMsg")... | (_ctx.stringValue("ListUsersResponse.RequestId")); |
1,000,029 | private HtmlPage makeHtml() throws Exception {<NEW_LINE>HtmlPage html = context.pageFactory.newPage();<NEW_LINE>String title = "Wiki Import";<NEW_LINE>if (wikiImportingTraverser.isUpdate())<NEW_LINE>title += " Update";<NEW_LINE>String localPathName = PathParser.render(path);<NEW_LINE>html.<MASK><NEW_LINE>html.setPageTi... | setTitle(title + ": " + localPathName); |
193,606 | public MethodOutcome validate(T theResource, IIdType theId, String theRawResource, EncodingEnum theEncoding, ValidationModeEnum theMode, String theProfile, RequestDetails theRequest) {<NEW_LINE>TransactionDetails transactionDetails = new TransactionDetails();<NEW_LINE>if (theRequest != null) {<NEW_LINE>ActionRequestDet... | setOperationOutcome(result.toOperationOutcome()); |
1,075,678 | private void addBasicTypeToExcel(RowData oneRowData, Row row, int rowIndex, int relativeRowIndex) {<NEW_LINE>if (oneRowData.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Map<Integer, Head> headMap = writeContext.currentWriteHolder().excelWriteHeadProperty().getHeadMap();<NEW_LINE>int dataIndex = 0;<NEW_LINE>int max... | = oneRowData.size() - dataIndex; |
1,317,190 | final RevokeCertificateResult executeRevokeCertificate(RevokeCertificateRequest revokeCertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(revokeCertificateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,728,022 | public static <E, R extends PagedResponse<E>> R performPagedQuery(Query<E> query, PagedQuery<?, ?> pagedQuery, Class<R> responseClass) {<NEW_LINE>if (pagedQuery.getDirection() == PagedQuery.SortDirection.DESC) {<NEW_LINE>query.orderBy().desc(pagedQuery.getSortBy().getSortField());<NEW_LINE>} else {<NEW_LINE>query.order... | setFirstRow(pagedQuery.getOffset()); |
285,238 | private static void sendProduct(RegressionEnvironment env, EventRepresentationChoice eventRepresentationEnum, String product, int size) {<NEW_LINE>if (eventRepresentationEnum.isObjectArrayEvent()) {<NEW_LINE>env.sendEventObjectArray(new Object[] { product, size }, "Product");<NEW_LINE>} else if (eventRepresentationEnum... | theEvent.put("product", product); |
1,833,963 | private void explodeBlock(BlockPos blockpos) {<NEW_LINE>BlockState blockstate = this.world.getBlockState(blockpos);<NEW_LINE>if (!this.world.isClientSide && blockstate.canDropFromExplosion(this.world, blockpos, this.explosion)) {<NEW_LINE>BlockEntity tileentity = blockstate.hasBlockEntity() ? this.world.getBlockEntity(... | 0, 0, 0, 0d); |
432,410 | public CholeskyDecompositionResult evaluate(DoubleMatrix matrix, double symmetryThreshold, double positivityThreshold) {<NEW_LINE>ArgChecker.notNull(matrix, "Matrix null");<NEW_LINE>int nbRow = matrix.rowCount();<NEW_LINE>int nbCol = matrix.columnCount();<NEW_LINE>ArgChecker.isTrue(nbRow == nbCol, "Matrix not square");... | / l[loopcol][loopcol]; |
696,139 | public com.amazonaws.services.appstream.model.InvalidRoleException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.appstream.model.InvalidRoleException invalidRoleException = new com.amazonaws.services.appstream.model.InvalidRoleException(null);<NEW_LINE>int ori... | String currentParentElement = context.getCurrentParentElement(); |
1,191,162 | public static ListInstancesResponse unmarshall(ListInstancesResponse listInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listInstancesResponse.setRequestId(_ctx.stringValue("ListInstancesResponse.RequestId"));<NEW_LINE>listInstancesResponse.setTotalCount(_ctx.longValue("ListInstancesResponse.TotalCount"));<NEW_... | + "].OwnerNameList[" + j + "]")); |
1,421,977 | public String reorderfields(String structureInode, String inodeList) {<NEW_LINE>Structure structure = StructureFactory.getStructureByInode(structureInode);<NEW_LINE>Company d = PublicCompanyFactory.getDefaultCompany();<NEW_LINE>try {<NEW_LINE>String[] params = inodeList.split(",");<NEW_LINE>for (String tempField : para... | field = FieldFactory.getFieldByInode(fieldInode); |
578,815 | private void buildDependencies(DefaultIdeaModule tapiModule, IdeaModule ideaModule) {<NEW_LINE>ideaModule.setOffline(offlineDependencyResolution);<NEW_LINE>Set<Dependency> resolved = ideaModule.resolveDependencies();<NEW_LINE>List<DefaultIdeaDependency> dependencies = new LinkedList<DefaultIdeaDependency>();<NEW_LINE>f... | (moduleDependency.getScope())); |
891,360 | static MongoAclPermission build(BsonDocument doc) throws ConfigurationException {<NEW_LINE>BsonValue _id = doc.get("_id");<NEW_LINE>var _roles = doc.get("roles");<NEW_LINE>if (_roles == null || !_roles.isArray() || _roles.asArray().isEmpty()) {<NEW_LINE>throw new ConfigurationException("Wrong permission: roles must be ... | ConfigurationException("Wrong permission: invalid predicate " + argPredicate, t); |
1,712,405 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, Integer page, Integer size, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>Wi wi = this.con... | (Review.class, p)); |
1,657,184 | public GetPredictiveScalingForecastResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>GetPredictiveScalingForecastResult getPredictiveScalingForecastResult = new GetPredictiveScalingForecastResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalD... | "iso8601").unmarshall(context)); |
1,180,481 | final ListEnabledProductsForImportResult executeListEnabledProductsForImport(ListEnabledProductsForImportRequest listEnabledProductsForImportRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listEnabledProductsForImportRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,689,126 | final CancelCertificateTransferResult executeCancelCertificateTransfer(CancelCertificateTransferRequest cancelCertificateTransferRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(cancelCertificateTransferRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | (super.beforeMarshalling(cancelCertificateTransferRequest)); |
1,380,205 | private static boolean createFields(GridTabVO gridTabVO) {<NEW_LINE>Optional<GridTabVO> <MASK><NEW_LINE>ArrayList<GridFieldVO> gridFieldVOList = new ArrayList<GridFieldVO>();<NEW_LINE>maybeGridTabVO.ifPresent(gridTabValueObject -> {<NEW_LINE>Optional<ASPUtil> maybeInstance = Optional.ofNullable(ASPUtil.getInstance(grid... | maybeGridTabVO = Optional.ofNullable(gridTabVO); |
1,820,475 | protected void map(SlicedSelectedSample selection, SlicedResult result) throws Exception {<NEW_LINE>DLPredictorService predictor = threadLocalPredictor.get();<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>List<Object> inputs = new ArrayList<>();<NEW_LINE>for (int i = 0; i < selection.length(); i++) {<NEW_L... | long end = System.currentTimeMillis(); |
567,369 | public void init(NDArray array) {<NEW_LINE>Number[] values = array.toArray();<NEW_LINE>// scalar case<NEW_LINE>if (values.length == 1) {<NEW_LINE>totalLength = 1;<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>long max = 0;<NEW_LINE>long negativeMax = 0;<NEW_LINE>for (Number n : values) {<NEW_LINE>long v = n.longValue();<NEW_LIN... | Math.max(size, negativeSize); |
1,782,107 | private BeanDefinitionBuilder queue(Element element, ParserContext parserContext, Element queueElement, String channel) {<NEW_LINE>BeanDefinitionBuilder builder;<NEW_LINE>builder = BeanDefinitionBuilder.genericBeanDefinition(QueueChannel.class);<NEW_LINE>boolean hasStoreRef = this.parseStoreRef(builder, queueElement, c... | error("The 'capacity' attribute is not allowed" + " when providing a 'message-store' to a custom MessageGroupStore.", element); |
698,139 | public StateMachineContext<S, E> read(Object contextObj) throws Exception {<NEW_LINE>M repositoryStateMachine = getRepository().findById(contextObj.toString()).orElse(null);<NEW_LINE>// use child contexts if we have those, otherwise fall back to child context refs.<NEW_LINE>if (repositoryStateMachine != null) {<NEW_LIN... | ), context.getId()); |
883,428 | public ListShardsResult listShards(ListShardsRequest listShardsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listShardsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsReque... | JsonUnmarshallerContext> unmarshaller = new ListShardsResultJsonUnmarshaller(); |
1,038,080 | private void filter() throws IOException {<NEW_LINE>this.writer = (LocalSnapshotWriter) this.storage.create(!this.filterBeforeCopyRemote);<NEW_LINE>if (this.writer == null) {<NEW_LINE>setError(RaftError.EIO, "Fail to create snapshot writer");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (this.filterBeforeCopyRemote) {<NEW_L... | this.writer.getPath()); |
46,442 | public void onCurrencyChange(final I_C_Payment payment) {<NEW_LINE>final int C_Invoice_ID = payment.getC_Invoice_ID();<NEW_LINE>final int C_Order_ID = payment.getC_Order_ID();<NEW_LINE>// Get Currency Info<NEW_LINE>final CurrencyId currencyId = CurrencyId.ofRepoIdOrNull(payment.getC_Currency_ID());<NEW_LINE>final Curre... | ofRepoId(payment.getAD_Client_ID()); |
1,556,739 | public void doCommand() throws Exception {<NEW_LINE>final Instant startTime = Instant.now();<NEW_LINE>final LocalDB localDB = cliEnvironment.getLocalDB();<NEW_LINE>final long localDBdiskSpace = FileSystemUtility.getFileDirectorySize(localDB.getFileLocation());<NEW_LINE>out("beginning LocalDBInfo");<NEW_LINE>out("LocalD... | .formatDiskSize(localDBdiskSpace) + ")"); |
1,166,977 | private void songChanged(String playerId, MPDSong newSong) {<NEW_LINE>String title = getTitle(newSong);<NEW_LINE>logger.<MASK><NEW_LINE>String[] itemNames = getItemNamesByPlayerAndPlayerCommand(playerId, PlayerCommandTypeMapping.TRACKINFO);<NEW_LINE>// move to utilities?<NEW_LINE>for (String itemName : itemNames) {<NEW... | debug("Current song {}: {}", playerId, title); |
429,081 | public AbstractRuntimeJobEntity copyJobInfo(AbstractRuntimeJobEntity copyToJob, AbstractRuntimeJobEntity copyFromJob) {<NEW_LINE>copyToJob.setDuedate(copyFromJob.getDuedate());<NEW_LINE>copyToJob.setEndDate(copyFromJob.getEndDate());<NEW_LINE>copyToJob.setExclusive(copyFromJob.isExclusive());<NEW_LINE>copyToJob.setExec... | setProcessInstanceId(copyFromJob.getProcessInstanceId()); |
678,818 | // Look for alwaysTrue eliminate alwaysFalse<NEW_LINE>@Override<NEW_LINE>public Pattern simplifyClone() {<NEW_LINE>IteratorSTL<DisjointPattern> iter;<NEW_LINE>for (iter = orlist.begin(); !iter.isEnd(); iter.increment()) {<NEW_LINE>// Look for alwaysTrue<NEW_LINE>if (iter.get().alwaysTrue()) {<NEW_LINE>return new Instru... | get().simplifyClone()); |
971,505 | public List<HuAssignment> retrieveLowLevelHUAssignmentsForModel(@NonNull final Object model) {<NEW_LINE>final List<I_M_HU_Assignment> huAssignmentRecords = retrieveOrderedHUAssignmentRecords(model);<NEW_LINE>final Set<Integer> alreadySeenHuIds = new HashSet<>();<NEW_LINE>final ImmutableList.Builder<HuAssignment> result... | alreadySeenHuIds, huAssignmentRecord.getM_LU_HU_ID()); |
1,443,762 | private BaseBottomSheetItem createShowOnMapItem() {<NEW_LINE>final Drawable showIcon = getActiveIcon(R.drawable.ic_action_view);<NEW_LINE>final Drawable hideIcon = getContentIcon(R.drawable.ic_action_hide);<NEW_LINE>boolean gpxFileSelected = isGpxFileSelected(app, gpxFile);<NEW_LINE>final BottomSheetItemWithCompoundBut... | showOnMapItem[0].isChecked(); |
408,138 | private void initializeAdapters(int openMode, TaskMonitor monitor) throws CancelledException, IOException, VersionException {<NEW_LINE>DBHandle handle = treeMgr.getDatabaseHandle();<NEW_LINE>VersionException versionExc = null;<NEW_LINE>try {<NEW_LINE>parentChildAdapter = ParentChildDBAdapter.getAdapter(handle, openMode... | getAdapter(this, openMode, monitor); |
1,816,661 | private void handleNumeric() {<NEW_LINE>double value, exponent;<NEW_LINE>char sign = '+';<NEW_LINE>boolean isFloat = false;<NEW_LINE>boolean neg = false;<NEW_LINE>value = 0.0;<NEW_LINE>exponent = 0;<NEW_LINE>// should we just make this negative, due to an unary minus?<NEW_LINE>if (!this.functionStack.isEmpty() && this.... | Math.pow(10, exponent); |
270,999 | public void dense_gauss_kernel(double sigma, GrayF64 x, GrayF64 y, GrayF64 k) {<NEW_LINE>InterleavedF64 xf = tmpFourier0, yf, xyf = tmpFourier2;<NEW_LINE>GrayF64 xy = tmpReal0;<NEW_LINE>double yy;<NEW_LINE>// find x in Fourier domain<NEW_LINE>fft.forward(x, xf);<NEW_LINE>double xx = imageDotProduct(x);<NEW_LINE>if (x !... | elementMultConjB(xf, yf, xyf); |
984,941 | final UpdateCACertificateResult executeUpdateCACertificate(UpdateCACertificateRequest updateCACertificateRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateCACertificateRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | false), new UpdateCACertificateResultJsonUnmarshaller()); |
1,466,741 | void read(XmlPullParser parser, TaskMonitor monitor) throws CancelledException {<NEW_LINE>RelocationTable relocTable = program.getRelocationTable();<NEW_LINE>AddressFactory factory = program.getAddressFactory();<NEW_LINE>XmlElement element = parser.next();<NEW_LINE>while (true) {<NEW_LINE>if (monitor.isCancelled()) {<N... | XmlProgramUtilities.parseAddress(factory, addrStr); |
434,385 | private Pair<KeyspaceMetadata, UserType> createOrUpdateUserType(KeyspaceMetadata ksm, String typeName, Map<String, CQL3Type.Raw> fields, final Collection<Mutation> mutations, final Collection<Event.SchemaChange> events) {<NEW_LINE>ColumnIdentifier ci = new ColumnIdentifier(typeName, true);<NEW_LINE>Optional<UserType> u... | fieldType(i).asCQL3Type(); |
434,993 | public TestRunnerSpawn createTestRunnerSpawn(TestRunnerAction action, ActionExecutionContext actionExecutionContext) throws ExecException, InterruptedException {<NEW_LINE>if (action.getExecutionSettings().getInputManifest() == null) {<NEW_LINE>String errorMessage = "cannot run local tests with --nobuild_runfile_manifes... | getTestProperties().getExecutionInfo()); |
1,163,976 | public CreateSchemaResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CreateSchemaResult createSchemaResult = new CreateSchemaResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth =... | JsonToken token = context.getCurrentToken(); |
1,356,392 | public static List<ZipExtraField> parse(byte[] data) throws ZipException {<NEW_LINE>List<ZipExtraField> v = new ArrayList<ZipExtraField>();<NEW_LINE>if (data == null) {<NEW_LINE>return v;<NEW_LINE>}<NEW_LINE>int start = 0;<NEW_LINE>while (start <= data.length - WORD) {<NEW_LINE>ZipShort headerId = new ZipShort(data, st... | data, start + WORD, length); |
892,516 | public ListTagsForResourceResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListTagsForResourceResult listTagsForResourceResult = new ListTagsForResourceResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>J... | String currentParentElement = context.getCurrentParentElement(); |
669,234 | public static List<RegressionExecution> executions() {<NEW_LINE>List<RegressionExecution> execs = new ArrayList<>();<NEW_LINE>execs.add(new EPLVariableOnSetSimple());<NEW_LINE>execs.add(new EPLVariableOnSetSimpleSceneTwo());<NEW_LINE>execs.add(new EPLVariableOnSetCompile());<NEW_LINE>execs.add(new EPLVariableOnSetObjec... | .add(new EPLVariableOnSetCoercion()); |
1,518,162 | private static void geraCodigoParaInspecaoDeAtribuicao(NoOperacaoAtribuicao atribuicao, PrintWriter saida, VisitanteASA visitor, int nivelEscopo) throws ExcecaoVisitaASA {<NEW_LINE>NoExpressao operandoEsquerdo = atribuicao.getOperandoEsquerdo();<NEW_LINE>if (operandoEsquerdo instanceof NoReferenciaVariavel) {<NEW_LINE>... | referenciaVetor, saida, visitor, nivelEscopo); |
589,787 | private Mono<PagedResponse<SqlManagedInstanceInner>> listByResourceGroupSinglePageAsync(String resourceGroupName, 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."));<NEW_LINE... | .nextLink(), null)); |
994,019 | public void begin(InterpretationContext ec, String localName, Attributes attributes) {<NEW_LINE>if ("substitutionProperty".equals(localName)) {<NEW_LINE>addWarn("[substitutionProperty] element has been deprecated. Please use the [property] element instead.");<NEW_LINE>}<NEW_LINE>String name = attributes.getValue(NAME_A... | value = RegularEscapeUtil.basicEscape(value); |
1,114,894 | void showTaxiInfo(@NonNull TaxiInfo info) {<NEW_LINE>UiUtils.hide(mError, mAltitudeChartFrame, mActionFrame, mTransitFrame);<NEW_LINE>ImageView logo = mTaxiFrame.<MASK><NEW_LINE>logo.setImageResource(info.getType().getIcon());<NEW_LINE>final List<TaxiInfo.Product> products = info.getProducts();<NEW_LINE>mTaxiInfo = inf... | findViewById(R.id.iv__logo); |
307,420 | public void shutdown() {<NEW_LINE>// normal termination.<NEW_LINE>shutdown = true;<NEW_LINE>lock.lock();<NEW_LINE>try {<NEW_LINE>while (!runningQueries.isEmpty()) {<NEW_LINE>try {<NEW_LINE>nothingRunning.await();<NEW_LINE>} catch (InterruptedException e) {<NEW_LINE>throw new RuntimeException(e);<NEW_LINE>}<NEW_LINE>}<N... | log.info("Terminating engineService: " + this); |
580,206 | public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {<NEW_LINE>if (((bitField0_ & 0x00000100) != 0)) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x00000200) != 0)) {<NEW_LINE>output.writeFloat(6, movingAverageDecay_);<NEW_LINE>}<NEW_LINE>if (((bitField0_ & 0x0000040... | output.writeBool(5, useMovingAverage_); |
1,622,656 | public void process(Matcher matcher) {<NEW_LINE>RuleStats ruleStats = (RuleStats) matcher.getTag();<NEW_LINE>int rematches = 0, remismatches = 0;<NEW_LINE>for (Integer i : ruleStats.positionMatches.values()) {<NEW_LINE>if (i > 0) {<NEW_LINE>rematches += i - 1;<NEW_LINE>} else if (i < 0) {<NEW_LINE>remismatches += -(i +... | ruleReport = ruleReports.get(matcher); |
313,192 | public long handle(Emulator<?> emulator) {<NEW_LINE>RegisterContext context = emulator.getContext();<NEW_LINE>UnidbgPointer object = context.getPointerArg(1);<NEW_LINE>int start = context.getIntArg(2);<NEW_LINE>int length = context.getIntArg(3);<NEW_LINE>Pointer buf = context.getPointerArg(4);<NEW_LINE>StringObject str... | value.getBytes(StandardCharsets.UTF_8); |
476,413 | public void edit(ConstructorCall c) throws CannotCompileException {<NEW_LINE>if (strategy != INST_REDEFINE && !c.getClassName().startsWith("java.lang")) {<NEW_LINE>final CtClass superclass;<NEW_LINE>try {<NEW_LINE>superclass = clazz.getSuperclass();<NEW_LINE>} catch (NotFoundException e) {<NEW_LINE>throw new RuntimeExc... | ()).append(".constructorCall($class, $args, $sig);"); |
1,360,886 | protected void initScene() {<NEW_LINE>ALight light1 = new DirectionalLight(0, 0, -1);<NEW_LINE>light1.setPower(.3f);<NEW_LINE>getCurrentCamera().setPosition(0, 0, 27);<NEW_LINE>Stack<Vector3> points = createWhirl(6, 6f, 0, 0, .05f);<NEW_LINE>Line3D whirl = new <MASK><NEW_LINE>Material material = new Material();<NEW_LIN... | Line3D(points, 1, 0xffffff00); |
1,576,800 | public static GetStatisticsByUuidResponse unmarshall(GetStatisticsByUuidResponse getStatisticsByUuidResponse, UnmarshallerContext context) {<NEW_LINE>getStatisticsByUuidResponse.setRequestId(context.stringValue("GetStatisticsByUuidResponse.requestId"));<NEW_LINE>getStatisticsByUuidResponse.setCode<MASK><NEW_LINE>getSta... | (context.stringValue("GetStatisticsByUuidResponse.Code")); |
1,335,378 | public Object calculate(Context ctx) {<NEW_LINE>Object result1 = null;<NEW_LINE>Object result2 = null;<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>if (param == null) {<NEW_LINE>throw new RQException("lg" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>result1 = p... | sub2 = param.getSub(1); |
239,634 | public void changeDelimiter(String newDelimiter) {<NEW_LINE>if (CommonUtils.isEmpty(newDelimiter)) {<NEW_LINE>this.delimiters = this.origDelimiters;<NEW_LINE>this.buffer = this.origBuffer;<NEW_LINE>} else {<NEW_LINE>for (char[] delim : delimiters) {<NEW_LINE>String delimStr = String.valueOf(delim);<NEW_LINE>if (newDeli... | length()).trim(); |
849,878 | final UpgradeAppliedSchemaResult executeUpgradeAppliedSchema(UpgradeAppliedSchemaRequest upgradeAppliedSchemaRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(upgradeAppliedSchemaRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,659,707 | public EVCacheItemMetaData metaDebug(String key) {<NEW_LINE>final CountDownLatch latch = new CountDownLatch(1);<NEW_LINE>final EVCacheItemMetaData rv = new EVCacheItemMetaData();<NEW_LINE>if (opFact instanceof EVCacheAsciiOperationFactory) {<NEW_LINE>final Operation op = ((EVCacheAsciiOperationFactory) opFact).metaDebu... | "; Message : " + status.getMessage()); |
1,784,226 | public void uploadMetricData() {<NEW_LINE>if (test) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>MetricInfo workerMetricInfo = MetricUtils.metricAccurateCal ? JStormMetrics.computeAllMetrics<MASK><NEW_LINE>WorkerUploadMetrics upload = new WorkerUploadMetrics();... | () : JStormMetrics.approximateComputeAllMetrics(); |
353,380 | public List<Javadoc> visitText(String node) {<NEW_LINE>List<Javadoc> <MASK><NEW_LINE>if (!node.isEmpty() && Character.isWhitespace(node.charAt(0)) && !Character.isWhitespace(source.charAt(cursor))) {<NEW_LINE>char[] charArray = node.toCharArray();<NEW_LINE>int i = 0;<NEW_LINE>for (; i < charArray.length && Character.is... | texts = new ArrayList<>(); |
1,242,198 | public void updateView(Map<String, FrameRange> frameRangeMap) {<NEW_LINE>createNewAnimationTable();<NEW_LINE>animationsList.clear();<NEW_LINE>for (Map.Entry<String, FrameRange> entry : frameRangeMap.entrySet()) {<NEW_LINE>String animationName = entry.getKey();<NEW_LINE>FrameRange range = entry.getValue();<NEW_LINE>VisT... | width(120).left(); |
669,055 | private void updateAudioManagerReference(GuildImpl guild) {<NEW_LINE>JDAImpl api = getController().getJDA();<NEW_LINE>AbstractCacheView<AudioManager> managerView = api.getAudioManagersView();<NEW_LINE>try (UnlockHook hook = managerView.writeLock()) {<NEW_LINE>TLongObjectMap<AudioManager> audioManagerMap = managerView.g... | .getConnectedChannel().getIdLong(); |
421,192 | private void buildHeader(MimeMessage message) throws MessagingException {<NEW_LINE>message.addSentDate(sentDate, hideTimeZone);<NEW_LINE>Address from = new Address(identity.getEmail(), identity.getName());<NEW_LINE>message.setFrom(from);<NEW_LINE>setRecipients(message, "To", to);<NEW_LINE>setRecipients(message, "CC", c... | messageId = messageIdGenerator.generateMessageId(message); |
1,597,274 | public void print(StringBuilder toStringBuilder) {<NEW_LINE>toStringBuilder.append("\n JspGroupDescriptor");<NEW_LINE>toStringBuilder.append("\n");<NEW_LINE>super.print(toStringBuilder);<NEW_LINE>toStringBuilder.append("\n DisplayName:").append(this.getDisplayName());<NEW_LINE>toStringBuilder.append("\n PageEncoding:")... | ("\n includeCoda: ").append(includeCodas); |
231,711 | public void run(String[] argv) throws IOException, SAXException {<NEW_LINE>argv = init(argv, 1, 1, null);<NEW_LINE>// right kind of database?<NEW_LINE>if (!(database instanceof AbstractBlockingDatabase)) {<NEW_LINE>System.out.println("ERR: Only blocking databases are supported.");<NEW_LINE>System.exit(2);<NEW_LINE>}<NE... | ArrayList(sizes.values()); |
552,069 | public void waitUntilThreadsStop() {<NEW_LINE>int i = 0;<NEW_LINE>int waitPeriod = 1000;<NEW_LINE>int activeVertxThreadCount = 0;<NEW_LINE>while ((activeVertxThreadCount = getActiveVertxThreadCount()) > 0) {<NEW_LINE>try {<NEW_LINE>if (i > 3) {<NEW_LINE>logger.warn("Waiting for active vertx threads count({}) decrease t... | .currentThread().interrupt(); |
1,795,442 | public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>OsmandApplication app = getMyApplication();<NEW_LINE>if (app != null) {<NEW_LINE>nightMode = app.getDaynightHelper().isNightModeForMapControls();<NEW_LINE>portrait = AndroidUiHelper.isOrientationPortrai... | mapControlsContainer.setVisibility(View.GONE); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.