idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,363,233 | public double volatilityBetaNonZero(double forward, double strike, double timeToExpiry, double alpha, double beta, double rho, double nu) {<NEW_LINE>ArgChecker.isTrue(forward > 0.0d, "forward must be positive");<NEW_LINE>ArgChecker.isTrue(strike > 0.0d, "strike must be positive");<NEW_LINE>ArgChecker.isTrue(<MASK><NEW_... | rho < 1.0d - RHO_EPS, "rho must be below 1 and not too close to 1"); |
368,098 | // </editor-fold>//GEN-END:initComponents<NEW_LINE>private void btnBrowseActionPerformed(java.awt.event.ActionEvent evt) {<NEW_LINE>// GEN-FIRST:event_btnBrowseActionPerformed<NEW_LINE>File oldFile = new File(tfRootPath.getText());<NEW_LINE>// NOI18N<NEW_LINE>JFileChooser fileChooser = new AccessibleJFileChooser(NbBund... | (CreatePanel.class, "OK_Button")); |
512,428 | public MetricDimension unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MetricDimension metricDimension = new MetricDimension();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | JsonToken token = context.getCurrentToken(); |
325,877 | private void promptForMultipleChoicePlay(int page, int startSura, int startAyah, List<Integer> startingSuraList) {<NEW_LINE>ArrayAdapter<String> adapter = new ArrayAdapter<>(this, <MASK><NEW_LINE>for (Integer integer : startingSuraList) {<NEW_LINE>String suraName = quranDisplayData.getSuraName(this, integer, false);<NE... | android.R.layout.select_dialog_item); |
1,568,122 | private void upload(Set<TransferFile> forUpload, FileObject sources, FileObject[] filesToUpload, InputOutput remoteLog, RemoteClient remoteClient) {<NEW_LINE>TransferInfo transferInfo = null;<NEW_LINE>try {<NEW_LINE>if (forUpload.size() > 0) {<NEW_LINE>final boolean askSync = !remoteClient.listFiles(getRemoteRoot(remot... | ().getName())); |
1,515,439 | private void syncForPolarDbX() {<NEW_LINE>synchronized (OptimizerContext.getContext(schemaName)) {<NEW_LINE>GmsTableMetaManager oldSchemaManager = (GmsTableMetaManager) OptimizerContext.getContext(schemaName).getLatestSchemaManager();<NEW_LINE>TableMeta currentMeta = oldSchemaManager.getTableWithNull(primaryTableName);... | context.releaseLock(1L, ticket); |
1,577,706 | @Produces(APPLICATION_JSON)<NEW_LINE>@Path("/{subscriptionName}/retransmission")<NEW_LINE>@RolesAllowed({ Roles.ADMIN, Roles.TOPIC_OWNER, Roles.SUBSCRIPTION_OWNER })<NEW_LINE>@ApiOperation(value = "Update subscription offset", httpMethod = HttpMethod.PUT)<NEW_LINE>public Response retransmit(@PathParam("topicName") Stri... | , RequestUser.fromSecurityContext(securityContext)); |
539,460 | final GetDocumentResult executeGetDocument(GetDocumentRequest getDocumentRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDocumentRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,133,929 | private // to a corresponding instance node with path /{cluster}/instances/{hostname}-{sequenceNumber}<NEW_LINE>String createLiveInstanceNode() {<NEW_LINE>// make sure the live instance path exists<NEW_LINE>_zkclient.ensurePath(KeyBuilder.liveInstances(_cluster));<NEW_LINE>// default name in case of UnknownHostExceptio... | LOG.info("Getting live instance name as: {}", _liveInstanceName); |
1,438,255 | private void initializeFiles() {<NEW_LINE>File file;<NEW_LINE>while ((file = getFileToInitialize()) != null) {<NEW_LINE>// NOI18N<NEW_LINE>Git.STATUS_LOG.log(Level.FINEST, "GitFolderEventsHandler.initializeFiles: {0}", file.getAbsolutePath());<NEW_LINE>// select repository root for the file and finds it's .git folder<N... | log(Level.FINEST, "GitFolderEventsHandler.initializeFiles: finished"); |
1,723,167 | private static void writeGraph(final servletProperties prop, final HyperlinkGraph hlg, final int maxdepth) {<NEW_LINE>int c = 0;<NEW_LINE>for (HyperlinkEdge e : hlg) {<NEW_LINE>prop.putJSON("edges_" + c + "_source", e.source.getPath());<NEW_LINE>prop.putJSON("edges_" + c + "_target", e.target.type.equals(HyperlinkType.... | hlg.getDepth(e.target); |
1,609,486 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>setTheme(android.R.style.Theme_Translucent_NoTitleBar);<NEW_LINE>Window window = getWindow();<NEW_LINE>WindowManager.LayoutParams params = window.getAttributes();<NEW_LINE>params.flags &= ~WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;<NEW_LINE>params.f... | View decorView = window.getDecorView(); |
1,358,281 | public static void main(String[] args) throws Exception {<NEW_LINE>final ConfigBuilder configBuilder = new ConfigBuilder();<NEW_LINE>configBuilder.withWatchReconnectInterval(500);<NEW_LINE>configBuilder.withWatchReconnectLimit(5);<NEW_LINE>try (KubernetesClient client = new KubernetesClientBuilder().withConfig(configBu... | customResourceDefinitions().createOrReplace(prometheousRuleCrd); |
977,594 | public void appendColumns(final int count) {<NEW_LINE>// add the headers<NEW_LINE>final String[] newHeaders = new String[getHeaderCount() + count];<NEW_LINE>System.arraycopy(this.headers, 0, newHeaders, 0, getHeaderCount());<NEW_LINE>for (int i = 0; i < count; i++) {<NEW_LINE>newHeaders[i + getHeaderCount()] = "new";<N... | this.data.get(rowIndex); |
925,082 | static String asString(Object stringObject) {<NEW_LINE>checkNotNull(stringObject, "stringObject");<NEW_LINE>Instance instance = (Instance) stringObject;<NEW_LINE>List<ClassInstance.FieldValue> values = classInstanceValues(instance);<NEW_LINE>Integer count = fieldValue(values, "count");<NEW_LINE>checkNotNull(count, "cou... | offset = fieldValue(values, "offset"); |
1,332,948 | public static boolean addressIsAllowedToProduceNextBlock(final Address candidate, final ProtocolContext protocolContext, final BlockHeader parent) {<NEW_LINE>final ValidatorProvider validatorProvider = protocolContext.getConsensusContext(CliqueContext.class).getValidatorProvider();<NEW_LINE>if (!isSigner(candidate, pro... | ) -> new IllegalStateException("The block was on a orphaned chain.")); |
944,986 | static Bitmap decodeStream(InputStream stream, Request request) throws IOException {<NEW_LINE>MarkableInputStream markStream = new MarkableInputStream(stream);<NEW_LINE>stream = markStream;<NEW_LINE>// TODO fix this crap.<NEW_LINE>long mark = markStream.savePosition(65536);<NEW_LINE>final BitmapFactory.Options <MASK><N... | options = RequestHandler.createBitmapOptions(request); |
143,830 | public void marshall(AudioDescription audioDescription, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (audioDescription == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(audioDescription.getAudioChannelTagg... | audioDescription.getCustomLanguageCode(), CUSTOMLANGUAGECODE_BINDING); |
1,321,478 | public void visit(FileVisitor visitor) {<NEW_LINE>File zipFile = fileProvider.get();<NEW_LINE>if (!zipFile.exists()) {<NEW_LINE>throw new InvalidUserDataException(format("Cannot expand %s as it does not exist.", getDisplayName()));<NEW_LINE>}<NEW_LINE>if (!zipFile.isFile()) {<NEW_LINE>throw new InvalidUserDataException... | ZipEntry entry = sortedEntries.next(); |
1,599,299 | protected Outline parseOutline(final Element e, final boolean validate, final Locale locale) throws FeedException {<NEW_LINE>final Outline outline = super.<MASK><NEW_LINE>final Iterator<Attribute> iterator = outline.getAttributes().iterator();<NEW_LINE>while (iterator.hasNext()) {<NEW_LINE>final Attribute attribute = i... | parseOutline(e, validate, locale); |
337,651 | // MInOut<NEW_LINE>private void copyAdditionalCols(final Object order) {<NEW_LINE>final IPOService poService = <MASK><NEW_LINE>poService.copyValue(order, this, I_M_InOut.COLUMNNAME_C_Incoterms_ID);<NEW_LINE>poService.copyValue(order, this, I_M_InOut.COLUMNNAME_IncotermLocation);<NEW_LINE>poService.copyValue(order, this... | Services.get(IPOService.class); |
1,231,128 | void dispatchOnExitedRangeIfNeeded(WorkingRangeStatusHandler statusHandler) {<NEW_LINE>if (mWorkingRanges == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>for (String key : mWorkingRanges.keySet()) {<NEW_LINE>final RangeTuple rangeTuple = Preconditions.checkNotNull(mWorkingRanges.get(key));<NEW_LINE>for (int i = 0, size... | dispatchOnExitedRange(scopedContext, rangeTuple.mName); |
1,276,585 | private Polygon bufferPolylinePath_(Polyline polyline, int ipath, boolean bfilter) {<NEW_LINE>assert (m_distance != 0);<NEW_LINE>generateCircleTemplate_();<NEW_LINE>MultiPath input_multi_path = polyline;<NEW_LINE>MultiPathImpl mp_impl = (MultiPathImpl) (input_multi_path._getImpl());<NEW_LINE>if (mp_impl.getPathSize(ipa... | mp_impl.queryPathEnvelope2D(ipath, env2D); |
18,599 | public Long addImageAndMediaLegends(final WikidataItem wikidataItem, final String fileName, final Map<String, String> captions) {<NEW_LINE>final Snak_partial p18 = new Snak_partial("value", WikidataProperties.IMAGE.getPropertyName(), new ValueString(fileName.replace("File:", "")));<NEW_LINE>final List<Snak_partial> sna... | claim, COMMONS_APP_TAG).blockingSingle(); |
49,521 | private void createSessions(SessionSettings settings, boolean continueInitOnError) throws ConfigError {<NEW_LINE>Map<SessionID, Session> <MASK><NEW_LINE>for (Iterator<SessionID> i = settings.sectionIterator(); i.hasNext(); ) {<NEW_LINE>SessionID sessionID = i.next();<NEW_LINE>try {<NEW_LINE>String connectionType = null... | allSessions = new HashMap<>(); |
1,476,640 | void start() throws IOException {<NEW_LINE>if (compactedLogFile != null && compactedLogFile.exists()) {<NEW_LINE>File dir = compactedLogFile.getParentFile();<NEW_LINE><MASK><NEW_LINE>// create a hard link "x.log" for file "x.log.y.compacted"<NEW_LINE>this.newEntryLogFile = new File(dir, compactedFilename.substring(0, c... | String compactedFilename = compactedLogFile.getName(); |
1,418,370 | public void marshall(PutPlaybackConfigurationRequest putPlaybackConfigurationRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (putPlaybackConfigurationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.... | putPlaybackConfigurationRequest.getName(), NAME_BINDING); |
610,984 | public GpuDeviceInfo unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>GpuDeviceInfo gpuDeviceInfo = new GpuDeviceInfo();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 1;<NEW_L... | ().unmarshall(context)); |
1,684,059 | final ListDatastoresResult executeListDatastores(ListDatastoresRequest listDatastoresRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listDatastoresRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListDatastores"); |
1,267,596 | private void populateOptionItemsFromDatasource() {<NEW_LINE>if (StringUtils.isBlank(datasourceRT)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// build the options by running the datasource code (the list is set as a request attribute)<NEW_LINE>RequestDispatcherOptions opts = new RequestDispatcherOptions();<NEW_LINE>opts.se... | error("Failed to include the datasource at " + datasourceRT, e); |
132,439 | public AuthenticationMethod loadMethodFromSession(Session session, int contextId) throws DatabaseException {<NEW_LINE>HttpAuthenticationMethod method = createAuthenticationMethod(contextId);<NEW_LINE>List<String> hostnames = session.getContextDataStrings(contextId, RecordContext.TYPE_AUTH_METHOD_FIELD_1);<NEW_LINE>if (... | hostname = hostnames.get(0); |
1,078,325 | public void verifySessionRows(String[][] sessionsCells, boolean[] expectedSessionShownStatus) {<NEW_LINE>assertEquals(sessionsCells.length, expectedSessionShownStatus.length);<NEW_LINE>boolean[] actualSessionShownStatus <MASK><NEW_LINE>List<WebElement> ongoingSessionRows = getOngoingSessionsRows();<NEW_LINE>for (WebEle... | = new boolean[expectedSessionShownStatus.length]; |
1,058,305 | public PaintContext createContext(ColorModel cm, Rectangle deviceBounds, Rectangle2D userBounds, AffineTransform xform, RenderingHints hints) {<NEW_LINE>return new PaintContext() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void dispose() {<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public ColorModel getColorMo... | ).createCompatibleWritableRaster(w, h); |
516,483 | public LookupDeveloperIdentityResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LookupDeveloperIdentityResult lookupDeveloperIdentityResult = new LookupDeveloperIdentityResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurren... | class).unmarshall(context)); |
682,753 | public void loadlist(final String providedPath, final boolean back, final OpenMode providedOpenMode) {<NEW_LINE>if (mainFragmentViewModel == null) {<NEW_LINE>Log.w(getClass().getSimpleName(), "Viewmodel not available to load the data");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (getMainActivity() != null && getMainActivi... | loadPathInQ(actualPath, providedPath, providedOpenMode); |
1,121,600 | final GetDeviceMethodsResult executeGetDeviceMethods(GetDeviceMethodsRequest getDeviceMethodsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getDeviceMethodsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetDeviceMethodsRequest> ... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,630,388 | private void configure() {<NEW_LINE>try {<NEW_LINE>Files.createDirectories(configFile.getParent());<NEW_LINE>Files.createDirectories(confPathRepo);<NEW_LINE>Files.createDirectories(confPathData);<NEW_LINE>Files.createDirectories(confPathLogs);<NEW_LINE>} catch (IOException e) {<NEW_LINE>throw new UncheckedIOException(e... | info("Written config file:{} for {}", configFile, this); |
1,553,077 | public int findElement(int ordinal, Object... hashKey) {<NEW_LINE>sampler().recordGet();<NEW_LINE>recordStackTrace();<NEW_LINE>if (keyMatcher == null)<NEW_LINE>return -1;<NEW_LINE>if (!ordinalIsPresent(ordinal))<NEW_LINE>return ((HollowSetTypeDataAccess) dataAccess.getTypeDataAccess(getSchema().getName(), ordinal)).fin... | removedRecords.relativeBucketValue(ordinal, bucket); |
962,895 | private void createPrintPackage(final I_C_Print_Job_Instructions printjobInstructions) {<NEW_LINE>final IPrintPackageBL printPackageBL = Services.get(IPrintPackageBL.class);<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(printjobInstructions);<NEW_LINE>final I_C_Print_Package printPackage = InterfaceWrap... | setHostKey(printjobInstructions.getHostKey()); |
1,717,168 | public List<Execution> lockAndFetch(JdbcTaskRepositoryContext ctx, Instant now, int limit) {<NEW_LINE>final JdbcTaskRepository.UnresolvedFilter unresolvedFilter = new JdbcTaskRepository.UnresolvedFilter(ctx.taskResolver.getUnresolved());<NEW_LINE>String selectForUpdateQuery = " UPDATE " + ctx.tableName + " st1 SET pick... | .getName(), 50)); |
1,622,905 | public HttpHeaders filter(HttpHeaders input, ServerWebExchange exchange) {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug("Will instrument the HTTP request headers [" + exchange.getRequest().getHeaders() + "]");<NEW_LINE>}<NEW_LINE>ServerHttpClientRequest request = new ServerHttpClientRequest(exchange.getReque... | currentSpan = currentSpan(exchange, request); |
743,167 | public Object dateAdd(Object thisObj, Object dateObj, Object durationObj, Object optionsParam, @Cached("create(getContext())") ToTemporalDurationNode toTemporalDurationNode, @Cached("createKeys(getContext())") EnumerableOwnPropertyNamesNode namesNode) {<NEW_LINE>JSTemporalCalendarObject calendar = requireTemporalCalend... | getDay(), calendar, errorBranch); |
1,625,203 | private String wsImport(URL wsdlLocation) throws IOException {<NEW_LINE>File classesDir = new File(System.getProperty("java.io.tmpdir"));<NEW_LINE>// create a dumy file to have a unique temporary name for a directory<NEW_LINE>classesDir = File.createTempFile("jax-ws", "tester", classesDir);<NEW_LINE>if (!classesDir.del... | wsimportArgs[9] = modulesDir + "jakarta.xml.rpc-api.jar"; |
391,880 | final SendUsersMessagesResult executeSendUsersMessages(SendUsersMessagesRequest sendUsersMessagesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendUsersMessagesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | invoke(request, responseHandler, executionContext); |
1,377,222 | // Helpers<NEW_LINE>private void updateTitle() {<NEW_LINE>if (mUid == 0) {<NEW_LINE>// Get statistics<NEW_LINE>long count = 0;<NEW_LINE>long restricted = 0;<NEW_LINE>double persec = 0;<NEW_LINE>try {<NEW_LINE>@SuppressWarnings("rawtypes")<NEW_LINE>Map statistics = PrivacyService.getClient().getStatistics();<NEW_LINE>co... | mUid).getApplicationName())); |
1,259,975 | public static void vertical11(Kernel1D_S32 kernel, GrayS32 src, GrayS32 dst, int divisor, @Nullable GrowArray<DogArray_I32> workspaces) {<NEW_LINE>final int[] dataSrc = src.data;<NEW_LINE>final int[] dataDst = dst.data;<NEW_LINE>final int k1 = kernel.data[0];<NEW_LINE>final int k2 = kernel.data[1];<NEW_LINE>final int k... | (dataSrc[indexSrc]) * k1; |
1,053,896 | private static <L> MXCIFQuadTreeNode<Object> subdivide(MXCIFQuadTreeNodeLeaf<Object> leaf, MXCIFQuadTree<Object> tree) {<NEW_LINE>double w = (leaf.getBb().getMaxX() - leaf.getBb().getMinX()) / 2d;<NEW_LINE>double h = (leaf.getBb().getMaxY() - leaf.getBb().getMinY()) / 2d;<NEW_LINE>double minx = leaf.getBb().getMinX();<... | getBb().getMaxY()); |
345,815 | private void transferAssetAsync() throws EndorseException, SubmitException, CommitStatusException {<NEW_LINE>System.out.println("\n--> Async Submit Transaction: TransferAsset, updates existing asset owner");<NEW_LINE>SubmittedTransaction commit = contract.newProposal("TransferAsset").addArguments(assetId, "Saptha").bui... | Status status = commit.getStatus(); |
49,315 | private Node createBullet(Indent in) {<NEW_LINE>Node result;<NEW_LINE>switch(in.level) {<NEW_LINE>case 1:<NEW_LINE>{<NEW_LINE>Circle c = new Circle(2.5);<NEW_LINE>c.setFill(Color.BLACK);<NEW_LINE>c.setStroke(Color.BLACK);<NEW_LINE>result = c;<NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case 2:<NEW_LINE>{<NEW_LINE>Circle c = ne... | = new Label(" ", result); |
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... | bitFlag(flags, Record.USES_FIXED_REFERENCE_FORMAT); |
49,349 | public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {<NEW_LINE>if (evt instanceof SslHandshakeCompletionEvent) {<NEW_LINE>SslHandshakeCompletionEvent handshakeEvent = (SslHandshakeCompletionEvent) evt;<NEW_LINE>try {<NEW_LINE>if (handshakeEvent.isSuccess()) {<NEW_LINE>SslHandler sslHa... | throw new IllegalStateException("cannot find an SslHandler in the pipeline (required for " + "application-level protocol negotiation)"); |
342,286 | public boolean onInterceptTouchEvent(MotionEvent ev) {<NEW_LINE>final int actionMasked = ev.getAction() & MotionEvent.ACTION_MASK;<NEW_LINE>// initiate the dragStartLocation and flags<NEW_LINE>if (actionMasked == MotionEvent.ACTION_DOWN) {<NEW_LINE>this.dragStartLocation = new PointF(ev.getX(<MASK><NEW_LINE>resetTouchE... | ), ev.getY()); |
1,623,217 | protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {<NEW_LINE>builder.getRawBeanDefinition().setBeanClass(RedisClient.class);<NEW_LINE>if (helper.hasAttribute(element, HOST_ATTRIBUTE)) {<NEW_LINE>helper.addConstructorArgs(element, HOST_ATTRIBUTE, String.class, builder);<... | CONNECTION_TIMEOUT_ATTRIBUTE, int.class, builder); |
1,253,137 | protected void preLoad(BuildCraftJsonGui json) {<NEW_LINE>TypedKeyMap<String, Object> properties = json.properties;<NEW_LINE>FunctionContext context = json.context;<NEW_LINE>properties.put("filler.inventory", new InventorySlotHolder(container, container.tile.invResources));<NEW_LINE>properties.put("statement.container"... | "filler.is_locked", container.tile::isLocked); |
1,532,147 | private PsiMethod rebuildMethodFromString() {<NEW_LINE>PsiMethod result;<NEW_LINE>try {<NEW_LINE>final StringBuilder methodTextDeclaration = new StringBuilder();<NEW_LINE>methodTextDeclaration.append(getAllModifierProperties((LightModifierList) getModifierList()));<NEW_LINE>PsiType returnType = getReturnType();<NEW_LIN... | ()).append(','); |
49,101 | private void ensureExistence() {<NEW_LINE>if (sketch.getFolder().exists())<NEW_LINE>return;<NEW_LINE>Base.showWarning(tr("Sketch Disappeared"), tr("The sketch folder has disappeared.\n " + "Will attempt to re-save in the same location,\n" + "but anything besides the code will be lost."), null);<NEW_LINE>try {<NEW_LINE>... | .getFolder().mkdirs(); |
471,104 | public boolean applies(GameEvent event, Ability source, Game game) {<NEW_LINE>if (!super.applies(event, source, game)) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>boolean catched = false;<NEW_LINE>if (event.getTargetId().equals(source.getControllerId())) {<NEW_LINE>catched = true;<NEW_LINE>} else {<NEW_LINE>Permanent ... | .getName() : "null")); |
370,779 | public Object decode(List<Object> parts, State state) {<NEW_LINE>if (parts.get(0) instanceof List) {<NEW_LINE>Map<ClusterSlotRange, Set<String>> <MASK><NEW_LINE>List<List<Object>> rows = (List<List<Object>>) (Object) parts;<NEW_LINE>for (List<Object> row : rows) {<NEW_LINE>Iterator<Object> iterator = row.iterator();<NE... | result = new HashMap<>(); |
1,418,221 | private boolean sameCompoundModel(CompoundModelSpecification first, CompoundModelSpecification second, MultiValueMap<ModelKey, ModelKey> referenceKeyToEffectiveKey, HashMap<List<ModelKey>, Boolean> seen) {<NEW_LINE>if (first == second) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (first == null || second == null) {<N... | ), second.getDiscriminator()); |
437,162 | private void logNode(DefaultMutableTreeNode theTreeNode, String message) {<NEW_LINE>if (!LOGGER.isDebugEnabled()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) theTreeNode.getParent();<NEW_LINE>Node theNode = (Node) theTreeNode.getUserObject();<NEW_LINE>Node thePare... | (DefaultMutableTreeNode) children.nextElement(); |
1,379,239 | public TerminologyDataLocation unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>TerminologyDataLocation terminologyDataLocation = new TerminologyDataLocation();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken... | String currentParentElement = context.getCurrentParentElement(); |
1,024,111 | public void testCriteriaQuery_JavaUtilDate(TestExecutionContext testExecCtx, TestExecutionResources testExecResources, Object managedComponentObject) throws Throwable {<NEW_LINE>final String testName = getTestName();<NEW_LINE>// Verify parameters<NEW_LINE>if (testExecCtx == null || testExecResources == null) {<NEW_LINE... | ), findEntity.getEntity0018_id()); |
1,770,777 | public IRubyObject initialize(ThreadContext context, ProtocolFamily family) {<NEW_LINE>Ruby runtime = context.runtime;<NEW_LINE>try {<NEW_LINE>this.family = family;<NEW_LINE>DatagramChannel channel = DatagramChannel.open(family);<NEW_LINE>initSocket(newChannelFD(runtime, channel));<NEW_LINE>} catch (ConnectException e)... | SocketUtils.sockerr(runtime, "initialize: name or service not known"); |
1,592,148 | public static void partialReduceDoubleMin(double[] inputArray, double[] outputArray, int gidx) {<NEW_LINE>int <MASK><NEW_LINE>int localGroupSize = SPIRVOCLIntrinsics.get_local_size(0);<NEW_LINE>int groupID = SPIRVOCLIntrinsics.get_group_id(0);<NEW_LINE>double[] localArray = (double[]) NewArrayNode.newUninitializedArray... | localIdx = SPIRVOCLIntrinsics.get_local_id(0); |
1,405,442 | public static String printMethod(DexMethodData mth) {<NEW_LINE>SmaliCodeWriter codeWriter = new SmaliCodeWriter();<NEW_LINE>codeWriter.startLine(".method ");<NEW_LINE>codeWriter.add(AccessFlags.format(mth.getAccessFlags(), METHOD));<NEW_LINE><MASK><NEW_LINE>methodRef.load();<NEW_LINE>codeWriter.add(methodRef.getName())... | DexMethodRef methodRef = mth.getMethodRef(); |
1,428,387 | private static byte[] createCheckpointBytes(Path checkpointFile, Checkpoint checkpoint) throws IOException {<NEW_LINE>final ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(V3_FILE_SIZE) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public synchronized byte[] toByteArray() {<NEW_LINE>// don't clone<NEW_LINE... | : "checkpoint files have to be smaller than 512 bytes for atomic writes; size: " + indexOutput.getFilePointer(); |
994,255 | public void batchUpdateBlobs(BatchUpdateBlobsRequest request, StreamObserver<BatchUpdateBlobsResponse> responseObserver) {<NEW_LINE>try {<NEW_LINE>ImmutableList<UploadResult> uploadResults = storage.batchUpdateBlobs(request.getRequestsList().stream().map(blobRequest -> UploadDataSupplier.of(blobRequest.toString(), new ... | statusBuilder.setMessage(uploadResult.message); |
270,638 | private static void copyUniqueAttribute(FileObject source, FileObject dest, String attrName) throws IOException {<NEW_LINE>Object <MASK><NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileObject parent = dest.getParent();<NEW_LINE>if (parent == null || !(value instanceof String)) {<NEW_LINE>dest.set... | value = source.getAttribute(attrName); |
1,183,678 | public void close(TaskAttemptContext attempt) throws IOException {<NEW_LINE>log.debug(<MASK><NEW_LINE>if (simulate)<NEW_LINE>return;<NEW_LINE>try {<NEW_LINE>mtbw.close();<NEW_LINE>} catch (MutationsRejectedException e) {<NEW_LINE>if (!e.getSecurityErrorCodes().isEmpty()) {<NEW_LINE>HashMap<String, Set<SecurityErrorCode... | "mutations written: " + mutCount + ", values written: " + valCount); |
1,499,064 | public static NotificationHook fromInner(ClientLogger logger, HookInfo innerHook) {<NEW_LINE>if (innerHook instanceof EmailHookInfo) {<NEW_LINE>EmailHookInfo innerEmailHook = (EmailHookInfo) innerHook;<NEW_LINE>EmailNotificationHook emailHook = new EmailNotificationHook(innerEmailHook.getHookName(), innerEmailHook.<MAS... | getHookParameter().getToList()); |
675,508 | private static void validateTopicConfig(final String name, final KsqlConfig ksqlConfig, final KafkaTopicClient topicClient) {<NEW_LINE>final TopicDescription description = topicClient.describeTopic(name);<NEW_LINE>final int actualPartitionCount = description.partitions().size();<NEW_LINE>if (actualPartitionCount != INT... | "Expected: " + INTERNAL_TOPIC_PARTITION_COUNT + ", but was: " + actualPartitionCount); |
146,674 | protected Component createAppFoldersPane() {<NEW_LINE>if (!webConfig.getFoldersPaneEnabled())<NEW_LINE>return null;<NEW_LINE>List<AppFolder> appFolders = foldersService.loadAppFolders();<NEW_LINE>if (appFolders.isEmpty())<NEW_LINE>return null;<NEW_LINE><MASK><NEW_LINE>appFoldersTree.setCubaId("appFoldersTree");<NEW_LIN... | appFoldersTree = new CubaTree<>(); |
1,818,441 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | resourceName, certificateName, Context.NONE); |
955,762 | public void removeSubRecords(Class<? extends Model> klass, JsonContext jsonContext) throws ClassNotFoundException {<NEW_LINE>for (Property prop : Mapper.of(klass).getProperties()) {<NEW_LINE>if (prop.getTarget() == null || prop.isCollection()) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>String simpleModelName = StringUtil... | (EntityHelper.getEntity(obj)); |
45,242 | protected ECKeyGenerationParameters createKeyGenParamsJCE(java.security.spec.ECParameterSpec p, SecureRandom r) {<NEW_LINE>if (p instanceof ECNamedCurveSpec) {<NEW_LINE>String curveName = ((ECNamedCurveSpec) p).getName();<NEW_LINE>X9ECParameters x9 = <MASK><NEW_LINE>if (null != x9) {<NEW_LINE>return createKeyGenParamsJ... | ECUtils.getDomainParametersFromName(curveName, configuration); |
1,584,945 | public static void main(String[] args) {<NEW_LINE>Scanner s = new Scanner(System.in);<NEW_LINE>System.out.println("Of First Matrix");<NEW_LINE>System.out.println(" Enter number of rows ");<NEW_LINE>int rows_first = s.nextInt();<NEW_LINE><MASK><NEW_LINE>int columns_first = s.nextInt();<NEW_LINE>int[][] matrix1 = new int... | System.out.println(" Enter number of columns "); |
18,148 | public static DescribeVirtualBorderRoutersResponse unmarshall(DescribeVirtualBorderRoutersResponse describeVirtualBorderRoutersResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVirtualBorderRoutersResponse.setRequestId(_ctx.stringValue("DescribeVirtualBorderRoutersResponse.RequestId"));<NEW_LINE>describeVirtualBor... | ("DescribeVirtualBorderRoutersResponse.VirtualBorderRouterSet[" + i + "].RecoveryTime")); |
700,740 | public int onBackPressed() {<NEW_LINE>logDebug("onBackPressed");<NEW_LINE>cancelSearch();<NEW_LINE>int levelSearch = ((ManagerActivity) context).levelsSearch;<NEW_LINE>if (levelSearch >= 0) {<NEW_LINE>if (levelSearch > 0) {<NEW_LINE>MegaNode node = megaApi.getNodeByHandle(((ManagerActivity) context).getParentHandleSear... | parentNode = megaApi.getParentNode(node); |
1,278,637 | public void init() {<NEW_LINE>Panel topp = <MASK><NEW_LINE>string = new TextField("G%");<NEW_LINE>topp.add(string, BorderLayout.CENTER);<NEW_LINE>btn = new Button("Go7");<NEW_LINE>btn.addActionListener(this);<NEW_LINE>topp.add(btn, BorderLayout.EAST);<NEW_LINE>outp = new TextArea("", 20, 80, TextArea.SCROLLBARS_BOTH);<... | new Panel(new BorderLayout()); |
1,192,769 | public boolean permit(ReqContext context, String operation, Map topology_conf) {<NEW_LINE>if (!context.isImpersonating()) {<NEW_LINE>LOG.debug("Not an impersonation attempt.");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>String impersonatingPrincipal = context.realPrincipal().getName();<NEW_LINE>String impersonatingUser ... | = new HashSet<String>(); |
1,594,279 | private synchronized void updateAllNodes(AllNodes allNodes) {<NEW_LINE>if (includeCoordinator) {<NEW_LINE>currentWorkerCount = allNodes.getActiveNodes().size();<NEW_LINE>} else {<NEW_LINE>currentWorkerCount = Sets.difference(Sets.difference(allNodes.getActiveNodes(), allNodes.getActiveCoordinators()), allNodes.getActiv... | listener.set(null))); |
451,375 | public JsonElement serialize(VersionSetting src, Type typeOfSrc, JsonSerializationContext context) {<NEW_LINE>if (src == null)<NEW_LINE>return JsonNull.INSTANCE;<NEW_LINE>JsonObject obj = new JsonObject();<NEW_LINE>obj.addProperty("usesGlobal", src.isUsesGlobal());<NEW_LINE>obj.addProperty("javaArgs", src.getJavaArgs()... | "notCheckGame", src.isNotCheckGame()); |
842,473 | protected List<String> validateHandshake(BitToUserHandshake inbound) throws RpcException {<NEW_LINE>// logger.debug("Handling handshake from bit to user. {}", inbound);<NEW_LINE>List<String> serverAuthMechanisms = null;<NEW_LINE>if (inbound.hasServerInfos()) {<NEW_LINE>serverInfos = inbound.getServerInfos();<NEW_LINE>}... | copyOf(inbound.getAuthenticationMechanismsList()); |
1,009,349 | private void doInvoke(Request request) {<NEW_LINE>Params p = toParams(request.parameters());<NEW_LINE>// allow garbage collection of request parameters<NEW_LINE>request.discardParameters();<NEW_LINE>// Make sure that the owner understands the protocol.<NEW_LINE>Protocol protocol = net.getOwner().getProtocol(p.protocolN... | ).setLevel(p.traceLevel); |
1,620,082 | public void accept(String key, float[] value) {<NEW_LINE>if (allowedPredicate.test(key)) {<NEW_LINE>double score = rescoreFn.applyAsDouble(key, scoreFn.applyAsDouble(value));<NEW_LINE>// Only proceed if score can possibly exceed (cached) minimum score in the queue.<NEW_LINE>if (score > topScoreLowerBound) {<NEW_LINE>//... | <>(key, score)); |
1,685,146 | public static ClientMessage encodeRequest(java.lang.String name, java.util.Collection<com.hazelcast.internal.serialization.Data> keys, boolean replaceExistingValues) {<NEW_LINE>ClientMessage clientMessage = ClientMessage.createForEncode();<NEW_LINE>clientMessage.setRetryable(false);<NEW_LINE>clientMessage.setOperationN... | StringCodec.encode(clientMessage, name); |
1,370,416 | private Object convert(String arg, Class<?> ctorArgClass, String pluginString, Class<?> pluginClass) throws IOException, URISyntaxException {<NEW_LINE>if (ctorArgClass.equals(URI.class)) {<NEW_LINE>return makeURL(arg).toURI();<NEW_LINE>}<NEW_LINE>if (ctorArgClass.equals(URL.class)) {<NEW_LINE>return makeURL(arg);<NEW_L... | , arg, ctorArgClass, pluginString)); |
1,647,253 | private Object handleDateTime(Object value, MColumn column, MEXPFormatLine formatLine) throws ParseException {<NEW_LINE>String valueString = null;<NEW_LINE>// We are sure that value is not null<NEW_LINE>valueString = value.toString();<NEW_LINE>Object result = value;<NEW_LINE>if (DisplayType.Date == column.getAD_Referen... | result = Timestamp.valueOf(valueString); |
1,790,715 | public static void removeProjectNature(IProject project, String nature, IProgressMonitor monitor) throws CoreException {<NEW_LINE>if (project != null && nature != null) {<NEW_LINE>if (project.exists() && project.hasNature(nature)) {<NEW_LINE>// first remove all problem markers (including the<NEW_LINE>// inherited ones)... | ] oldNatures = desc.getNatureIds(); |
797,356 | protected void updateStructure(boolean fromRoot, @Nonnull Set<? extends VirtualFile> updatedFiles) {<NEW_LINE>if (fromRoot) {<NEW_LINE>updateAll(null);<NEW_LINE>} else {<NEW_LINE>long time = System.currentTimeMillis();<NEW_LINE>LOG.debug("found ", <MASK><NEW_LINE>TreeCollector<VirtualFile> collector = TreeCollector.Vir... | updatedFiles.size(), " changed files"); |
8,851 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.fragment_entry_list_view, container, false);<NEW_LINE>_progressBar = view.findViewById(R.id.progressBar);<NEW_LINE>_groupChip = view.findViewById(R.id.chip_group);<NEW_LINE>... | getMillisTillNextRotation(_adapter.getMostFrequentPeriod()); |
181,443 | public DeploymentReadyOption unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeploymentReadyOption deploymentReadyOption = new DeploymentReadyOption();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | int originalDepth = context.getCurrentDepth(); |
1,299,826 | private short calcChecksum(InetAddress srcAddr, InetAddress dstAddr, byte[] header, byte[] payload) {<NEW_LINE>byte[] data;<NEW_LINE>int destPos;<NEW_LINE>int totalLength <MASK><NEW_LINE>boolean lowerLayerIsIpV4 = srcAddr instanceof Inet4Address;<NEW_LINE>int pseudoHeaderSize = lowerLayerIsIpV4 ? IPV4_PSEUDO_HEADER_SIZ... | = payload.length + length(); |
506,215 | void refreshStorageBreakdown(@NonNull Context context) {<NEW_LINE>SignalExecutors.BOUNDED.execute(() -> {<NEW_LINE>MediaDatabase.StorageBreakdown breakdown = SignalDatabase.media().getStorageBreakdown();<NEW_LINE>StorageGraphView.StorageBreakdown latestStorageBreakdown = new StorageGraphView.StorageBreakdown(Arrays.asL... | breakdown.getAudioSize()))); |
1,150,105 | public void encodeColumnFooter(FacesContext context, DataTable table, UIColumn column) throws IOException {<NEW_LINE>if (!column.isRendered()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>ColumnMeta columnMeta = table.getColumnMeta().get(column.getColumnKey());<NEW_LINE><MASK><NEW_LINE>int responsivePriority = column.getResp... | ResponseWriter writer = context.getResponseWriter(); |
1,248,169 | public FunctionalIterator<Map<Identifier.Variable, Concept>> materialise(ConceptMap whenConcepts, TraversalEngine traversalEng, ConceptManager conceptMgr) {<NEW_LINE>Identifier.Variable relationTypeIdentifier = isa()<MASK><NEW_LINE>RelationType relationType = relationType(whenConcepts, conceptMgr);<NEW_LINE>FunctionalI... | .type().id(); |
1,544,090 | static JsonNode convertToTree(MatchResult result, boolean elevation, boolean pointsEncoded) {<NEW_LINE>ObjectNode root = JsonNodeFactory.instance.objectNode();<NEW_LINE>ObjectNode diary = root.putObject("diary");<NEW_LINE>ArrayNode entries = diary.putArray("entries");<NEW_LINE>ObjectNode route = entries.addObject();<NE... | getEdgeMatches().get(emIndex); |
1,224,053 | protected void startUp() {<NEW_LINE>long traceId = LoggerHelpers.traceEnterWithContext(log, this.objectId, "startUp");<NEW_LINE>try {<NEW_LINE>log.info("Attempting to start all event processors in {}", this.toString());<NEW_LINE>eventProcessorMap.entrySet().forEach(entry -> entry.getValue().startAsync());<NEW_LINE>even... | rebalancePeriodMillis, rebalancePeriodMillis, TimeUnit.MILLISECONDS); |
1,050,741 | private void configureLogLevelForPrefix(final String loggerPrefix, final Object levelValue) {<NEW_LINE>final LogLevel newLevel;<NEW_LINE>if (levelValue instanceof Boolean && !((boolean) levelValue)) {<NEW_LINE>// SnakeYAML converts OFF (without quotations) to a boolean false value, hence we need to handle that here...<... | debug("Setting log level '{}' for logger: '{}'", newLevel, loggerPrefix); |
1,851,104 | private void removeInput(int index, int oldCount) {<NEW_LINE>// force an Entry column of each row.input to 'x', then remove it<NEW_LINE>// _0001000<NEW_LINE>final var b = (1 << (oldCount - 1 - index));<NEW_LINE>final var changed = new boolean[columns.size()];<NEW_LINE>// loop rows by index to avoid java.util.Concurrent... | r = rows.get(i); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.