idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,518,875 | PagedFlux<QueueItem> listQueuesWithOptionalTimeout(String marker, QueuesSegmentOptions options, Duration timeout, Context context) {<NEW_LINE>final String prefix = (options != null) ? options.getPrefix() : null;<NEW_LINE>final Integer maxResultsPerPage = (options != null) ? options.getMaxResultsPerPage() : null;<NEW_LI... | (marker, pageSize), retriever); |
1,145,053 | public RelRoot expandView(RelDataType rowType, String queryString, List<String> schemaPath, List<String> viewPath) {<NEW_LINE>if (planner == null) {<NEW_LINE>ready();<NEW_LINE>}<NEW_LINE>SqlParser parser = SqlParser.create(queryString, parserConfig);<NEW_LINE>SqlNode sqlNode;<NEW_LINE>try {<NEW_LINE>sqlNode = parser.pa... | convertQuery(sqlNode, true, false); |
960,258 | public void handleMessage(final Message msg) {<NEW_LINE>if (shouldStop())<NEW_LINE>return;<NEW_LINE>OrbotMainActivity oma = ref.get();<NEW_LINE><MASK><NEW_LINE>switch(msg.what) {<NEW_LINE>case MESSAGE_TRAFFIC_COUNT:<NEW_LINE>long lastWritten = data.getLong("lastWritten");<NEW_LINE>long lastRead = data.getLong("lastRead... | Bundle data = msg.getData(); |
1,505,926 | public Result<List<ThreadPoolInstanceInfo>> listInstance(@PathVariable("itemId") String itemId, @PathVariable("tpId") String tpId) {<NEW_LINE>List<Lease<InstanceInfo>> leases = baseInstanceRegistry.listInstance(itemId);<NEW_LINE>Lease<InstanceInfo> first = CollUtil.getFirst(leases);<NEW_LINE>if (first == null) {<NEW_LI... | , Constants.IDENTIFY_SLICER_SYMBOL, false)); |
207,273 | public static ListVpnCertificateAssociationsResponse unmarshall(ListVpnCertificateAssociationsResponse listVpnCertificateAssociationsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listVpnCertificateAssociationsResponse.setRequestId(_ctx.stringValue("ListVpnCertificateAssociationsResponse.RequestId"));<NEW_LINE>listVpnC... | ("ListVpnCertificateAssociationsResponse.VpnCertificateRelations[" + i + "].CertificateId")); |
12,043 | private void runAssertionInsertConsume(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create window MyVDW.test:vdw() as SupportBean", path);<NEW_LINE>SupportVirtualDW window = (SupportVirtualDW) getFromContext(env, "/virtualdw/MyVDW");<NEW_LINE>Supp... | new SupportBean("E1", 200)); |
161,456 | public static void rgbToGray_Weighted(InterleavedF32 rgb, GrayF32 gray) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0,rgb.height,row->{<NEW_LINE>for (int row = 0; row < rgb.height; row++) {<NEW_LINE>int indexRgb = rgb.startIndex + row * rgb.stride;<NEW_LINE>int indedGra = gray.startIndex + row * gray.stride;... | = rgb.data[indexRgb++]; |
1,623,499 | public void createContents(Composite page) {<NEW_LINE>Composite field = new Composite(page, SWT.NONE);<NEW_LINE>int cols = label == null ? 1 : 2;<NEW_LINE>GridLayout layout = GridLayoutFactory.fillDefaults().numColumns(cols).create();<NEW_LINE>field.setLayout(layout);<NEW_LINE>searchBox = new Text(field, SWT.SINGLE | S... | setContentProvider(ArrayContentProvider.getInstance()); |
612,581 | public void loadChats() {<NEW_LINE>log.fine("#" + m_vo.TabNo);<NEW_LINE>if (!canHaveAttachment())<NEW_LINE>return;<NEW_LINE>String sql = "SELECT CM_Chat_ID, Record_ID FROM CM_Chat " + "WHERE AD_Table_ID=?";<NEW_LINE>try {<NEW_LINE>if (m_Chats == null)<NEW_LINE>m_Chats = new HashMap<Integer, Integer>();<NEW_LINE>else<NE... | ResultSet rs = pstmt.executeQuery(); |
1,416,634 | public void deleteNode(String userName, AbstractAppConnNode node) throws ExternalOperationFailedException {<NEW_LINE>NodeInfo nodeInfo = nodeInfoMapper.getWorkflowNodeByType(node.getNodeType());<NEW_LINE>AppConn appConn = AppConnManager.getAppConnManager().getAppConn(nodeInfo.getAppConnName());<NEW_LINE>DevelopmentInte... | setName(node.getName()); |
283,011 | public static Map<String, Object> asMap(Set<AttributeStatementType> attributeStatementTypes) {<NEW_LINE>Map<String, Object> attrMap = new HashMap<>();<NEW_LINE>if (attributeStatementTypes != null && !attributeStatementTypes.isEmpty()) {<NEW_LINE>attrMap = new HashMap<>();<NEW_LINE>for (StatementAbstractType statement :... | attrMap.put(attributeName, values); |
1,847,684 | public BufferedImage read(final int imageIndex, final ImageReadParam param) throws IOException {<NEW_LINE>// Test if we have sips before dumping to be fail-fast<NEW_LINE>if (SIPS_EXISTS_AND_EXECUTES) {<NEW_LINE>File tempFile = dumpToFile(input);<NEW_LINE>if (convertToPNG(tempFile)) {<NEW_LINE>ImageInputStream stream = ... | reader.read(imageIndex, param); |
1,529,002 | static Bag[] of(int n, int k) {<NEW_LINE>if (n < 0) {<NEW_LINE>throw new IllegalArgumentException("Invalid sample size: " + n);<NEW_LINE>}<NEW_LINE>if (k < 0) {<NEW_LINE>throw new IllegalArgumentException("Invalid number of bootstrap: " + k);<NEW_LINE>}<NEW_LINE>Bag[] bags = new Bag[k];<NEW_LINE>for (int j = 0; j < k; ... | ] train = new int[n]; |
289,599 | public JMethod overrideAnnotatedMethod(ExecutableElement executableElement, GeneratedClassHolder holder) {<NEW_LINE>TypeMirror annotatedClass = holder.getAnnotatedElement().asType();<NEW_LINE>DeclaredType baseClass = (DeclaredType) executableElement.getEnclosingElement().asType();<NEW_LINE>Types typeUtils = environment... | methodTypes = new LinkedHashMap<>(); |
341,664 | public Session unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>Session session = new Session();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token... | class).unmarshall(context)); |
583,071 | public Result runFullConsistencyCheck(DatabaseLayout databaseLayout, Config config, ProgressMonitorFactory progressFactory, LogProvider logProvider, FileSystemAbstraction fileSystem, boolean verbose, Path reportDir, ConsistencyFlags consistencyFlags) throws ConsistencyCheckIncompleteException {<NEW_LINE>Log log = logPr... | log.error("Failure during shutdown of the page cache", e); |
1,782,661 | private void init() {<NEW_LINE>setBorder(BorderFactory.createTitledBorder("Resolve Conflict"));<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>headerLabel = new GDHtmlLabel(" ");<NEW_LINE>headerLabel.setHorizontalAlignment(SwingConstants.CENTER);<NEW_LINE>add(headerLabel, BorderLayout.NORTH);<NEW_LINE>rowComps = new ... | .getPreferredSize().getHeight(); |
514,146 | public com.amazonaws.services.quicksight.model.QuickSightUserNotFoundException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.quicksight.model.QuickSightUserNotFoundException quickSightUserNotFoundException = new com.amazonaws.services.<MASK><NEW_LINE>int origi... | quicksight.model.QuickSightUserNotFoundException(null); |
1,526,627 | public boolean installSnapshot(SnapshotEntry snapshot) {<NEW_LINE>long commitIndex = state.commitIndex();<NEW_LINE>if (commitIndex > snapshot.index()) {<NEW_LINE>logger.info("Ignored stale " + snapshot + ", commit index at: " + commitIndex);<NEW_LINE>return false;<NEW_LINE>} else if (commitIndex == snapshot.index()) {<... | ), snapshot.groupMembers()); |
1,750,502 | public final void actionPerformed(final ActionEvent evt) {<NEW_LINE>// Possibly delegate to getDelegateAction()<NEW_LINE>Action dAction = getDelegateAction();<NEW_LINE>if (dAction != null) {<NEW_LINE>if (!(dAction instanceof AbstractEditorAction)) {<NEW_LINE>checkTogglePreferencesValue();<NEW_LINE>}<NEW_LINE>dAction.ac... | ), getValue(NAME) }); |
1,048,600 | public Role copyRole(String predefinedRoleName) {<NEW_LINE>checkNotNullArgument(predefinedRoleName, "Null access role id");<NEW_LINE>checkUpdatePermission(Role.class);<NEW_LINE>if (serverConfig.getRolesStorageMode() != MIXED) {<NEW_LINE>throw new IllegalStateException("Unable to copy predefined role. Mixed mode for rol... | throw new IllegalStateException("Unable to find specified role with name: " + predefinedRoleName); |
404,897 | private static CloudHealthcare createClient() throws IOException {<NEW_LINE>// Use Application Default Credentials (ADC) to authenticate the requests<NEW_LINE>// For more information see https://cloud.google.com/docs/authentication/production<NEW_LINE>GoogleCredentials credential = GoogleCredentials.getApplicationDefau... | .singleton(CloudHealthcareScopes.CLOUD_PLATFORM)); |
964,140 | final CreateWebhookResult executeCreateWebhook(CreateWebhookRequest createWebhookRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createWebhookRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | invoke(request, responseHandler, executionContext); |
1,486,698 | // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .<NEW_LINE>static public void fromNativeImage(Image img, PImage out) {<NEW_LINE>out.format = RGB;<NEW_LINE>out.pixels = null;<NEW_LINE>if (img instanceof BufferedImage) {<NEW_LINE>BufferedImage bi = (BufferedImage) img;<NEW_LINE>out.width = bi.g... | height = img.getHeight(null); |
1,844,513 | private List<TargetWindowAndColumn> retrieveRows(final ResultSet rs) throws SQLException {<NEW_LINE>final ImmutableTranslatableString name = retrieveTranslatableString(rs, "target_window_name", "target_window_name_trls");<NEW_LINE>final AdWindowId targetWindowId = AdWindowId.ofRepoId(rs.getInt("target_window_id"));<NEW... | ("target_columnsql")).build(); |
944,609 | public void print(PrintOutput output, PrintOptions options) throws PrinterException {<NEW_LINE>if (images.isEmpty()) {<NEW_LINE>log.warn("Nothing to print");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PrinterJob job = PrinterJob.getPrinterJob();<NEW_LINE>job.setPrintService(output.getPrintService());<NEW_LINE>PageFormat page... | output, pxlOpts, job, attributes); |
1,657,960 | private boolean suggest(ApplicationId applicationId, ClusterSpec.Id clusterId, NodeList clusterNodes) {<NEW_LINE>Application application = applications().get(applicationId).orElse(Application.empty(applicationId));<NEW_LINE>Optional<Cluster> cluster = application.cluster(clusterId);<NEW_LINE>if (cluster.isEmpty())<NEW_... | cluster.get(), clusterNodes); |
1,756,199 | public Task<Void> then(@Nullable Void aVoid) throws Exception {<NEW_LINE>// Waited for data collection permission, so this is safe.<NEW_LINE>final boolean dataCollectionToken = true;<NEW_LINE>final JSONObject settingsJson = settingsSpiCall.invoke(settingsRequest, dataCollectionToken);<NEW_LINE>if (settingsJson != null)... | fetchedSettings = settingsJsonParser.parseSettingsJson(settingsJson); |
643,856 | // Uses Manhattan distance conversion<NEW_LINE>EuclideanValues polarToEuclidean(float r, float rDeviation, float theta, float thetaDeviation) {<NEW_LINE>// calculate variance (deviation^2)<NEW_LINE>final double thetaVariance = Math.pow(thetaDeviation, 2.0);<NEW_LINE>final double rVariance = Math.pow(rDeviation, 2.0);<N... | Math.pow(varianceX, 0.5); |
656,346 | public static DocumentFragment nullResultParagraph(String sdtParent, String message) {<NEW_LINE>try {<NEW_LINE>org.docx4j.wml.ObjectFactory factory = Context.getWmlObjectFactory();<NEW_LINE>org.docx4j.wml.<MASK><NEW_LINE>org.docx4j.wml.Text text = factory.createText();<NEW_LINE>text.setValue(message);<NEW_LINE>run.getC... | R run = factory.createR(); |
110,433 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE><MASK><NEW_LINE>donutProgress = (DonutProgress) findViewById(R.id.donut_progress);<NEW_LINE>timer = new Timer();<NEW_LINE>timer.schedule(new TimerTask() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<... | setContentView(R.layout.activity_my_vector); |
1,491,431 | public int[] topKFrequent(int[] nums, int k) {<NEW_LINE>Map<Integer, Integer> map = new HashMap<>();<NEW_LINE>for (int i : nums) {<NEW_LINE>map.put(i, map.getOrDefault(i, 0) + 1);<NEW_LINE>}<NEW_LINE>TreeMap<Integer, List<Integer>> treeMap = new TreeMap<>((a, b) -> b - a);<NEW_LINE>for (int key : map.keySet()) {<NEW_LI... | , new ArrayList<>()); |
249,578 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>{<NEW_LINE>builder.field("snapshot_uuid", getSnapshotId().getUUID());<NEW_LINE>builder.field("index_uuid", getIndexId().getId());<NEW_LINE>builder.startObject("shard");<NEW_LINE>{<NEW_... | "id", shardRouting.shardId()); |
576,499 | static Node createTabPane(int numOfTabs, int prefWidth, int prefHeight, String firstTabText, boolean floating, boolean disableFirst, Side side) {<NEW_LINE>TabPane tabPane = new TabPane();<NEW_LINE>tabPane.setSide(side);<NEW_LINE>if (floating)<NEW_LINE>tabPane.getStyleClass().add("floating");<NEW_LINE>for (int i = 1; i ... | : "Tab " + i + " Content")); |
1,041,413 | protected JFreeChart createChart(CategoryDataset dataset, String title, MUOM uom) {<NEW_LINE>JFreeChart chart = ChartFactory.createBarChart3D(title, " ", " ", dataset, PlotOrientation.<MASK><NEW_LINE>if (uom == null || uom.isHour()) {<NEW_LINE>chart = // X-Axis label<NEW_LINE>ChartFactory.// X-Axis label<NEW_LINE>creat... | VERTICAL, true, true, false); |
356,787 | public void remove(TomcatModule tmId) {<NEW_LINE>// remove context from server.xml<NEW_LINE>Server server = tm.getRoot();<NEW_LINE>if (server != null && removeContextFromServer(server, tmId.getPath())) {<NEW_LINE>File f = null;<NEW_LINE>try {<NEW_LINE>f = tm.getTomcatProperties().getServerXml();<NEW_LINE>server.write(f... | )), StateType.FAILED)); |
1,667,895 | protected boolean canUserEvaluate() {<NEW_LINE>if (!Config.getBooleanProperty("ENABLE_SCRIPTING", false)) {<NEW_LINE>Logger.warn(this.getClass(), "Scripting called and ENABLE_SCRIPTING set to false");<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>ica = new InternalContextAdapterImpl(ctx);<NEW_LINE>String fi... | getRoleAPI().loadRoleByKey("Scripting Developer"); |
1,232,018 | private void renderLeg(HumanoidModel<? extends LivingEntity> baseModel, @Nonnull PoseStack matrix, @Nonnull MultiBufferSource renderer, int light, int overlayLight, boolean hasEffect, boolean left) {<NEW_LINE>if (left && !baseModel.leftLeg.visible || !left && !baseModel.rightLeg.visible) {<NEW_LINE>// If the model isn'... | 0.1375, -0.75, -0.0625); |
1,629,982 | private void buildLeftToolBarBox() {<NEW_LINE>leftToolBarBox.getChildren().clear();<NEW_LINE>if (getSkinnable().isShowSourceTrayButton()) {<NEW_LINE>leftToolBarBox.getChildren().add(trayButton);<NEW_LINE>}<NEW_LINE>if (getSkinnable().isShowAddCalendarButton()) {<NEW_LINE>leftToolBarBox.getChildren().add(addCalendarButt... | new Separator(Orientation.VERTICAL)); |
452,661 | private void checkCosting(final I_C_AcctSchema acctSchema) {<NEW_LINE>// Create Cost Type<NEW_LINE>if (acctSchema.getM_CostType_ID() <= 0) {<NEW_LINE>final I_M_CostType costType = InterfaceWrapperHelper.newInstance(I_M_CostType.class);<NEW_LINE>costType.setAD_Org_ID(Env.CTXVALUE_AD_Org_ID_Any);<NEW_LINE>costType.setNam... | setM_CostType_ID(costType.getM_CostType_ID()); |
628,388 | public Response test(@QueryParam("clients") @DefaultValue("50") int clients) {<NEW_LINE>Client c = ClientBuilder.newClient();<NEW_LINE>WebTarget target = c.target(URI);<NEW_LINE>final CountDownLatch latch = new CountDownLatch(clients);<NEW_LINE>final AtomicInteger successCount = new AtomicInteger(0);<NEW_LINE>final Ato... | ) + "\n").build(); |
1,415,978 | private ToolTipAction createVHDLExportAction() {<NEW_LINE>return new ToolTipAction(Lang.get("menu_exportVHDL")) {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed(ActionEvent actionEvent) {<NEW_LINE>// check model for errors<NEW_LINE>try {<NEW_LINE>new ModelCreator(circuitComponent.getCircuit(), librar... | "exportDirectory", file.getParentFile()); |
950,452 | public static void main(String[] args) {<NEW_LINE>// Run this example twice - once with collectStats = true, and then again with collectStats = false<NEW_LINE>boolean collectStats = true;<NEW_LINE>File statsFile = new File("UIStorageExampleStats.dl4j");<NEW_LINE>if (collectStats) {<NEW_LINE>// First run: Collect traini... | ), new ScoreIterationListener(10)); |
419,949 | public void init() {<NEW_LINE>session.getContext().setClient(client);<NEW_LINE>eventStore = session.getProvider(EventStoreProvider.class);<NEW_LINE>account = session.getProvider(AccountProvider.class).setRealm(realm).setUriInfo(session.getContext().getUri()).setHttpHeaders(headers);<NEW_LINE>AuthenticationManager.AuthR... | String) session.getAttribute("state_checker"); |
1,136,881 | public SService convertToSObject(Service input) {<NEW_LINE>if (input == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>SService result = new SService();<NEW_LINE>result.<MASK><NEW_LINE>result.setUuid(input.getUuid());<NEW_LINE>result.setRid(input.getRid());<NEW_LINE>result.setName(input.getName());<NEW_LINE>result.s... | setOid(input.getOid()); |
1,729,847 | public void refreshPredefinedLogFiles(RunConfigurationBase configurationBase) {<NEW_LINE>List<LogFileOptions> items = myModel.getItems();<NEW_LINE>List<LogFileOptions> newItems = new ArrayList<LogFileOptions>();<NEW_LINE>boolean changed = false;<NEW_LINE>for (LogFileOptions item : items) {<NEW_LINE>final PredefinedLogF... | myLog2Predefined.put(options, predefined); |
732,021 | public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback) throws InstanceNotFoundException {<NEW_LINE>if (System.getSecurityManager() == null) {<NEW_LINE>first.addNotificationListener(name, listener, filter, handback);<NEW_LINE>} else {<NEW_LINE>final ObjectNa... | f_name, f_listener, f_filter, f_handback); |
771,625 | public Map<String, Object> toMap() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {<NEW_LINE>final Map<String, Object> map = new HashMap<>();<NEW_LINE>map.put("active", this.getActive());<NEW_LINE>map.put("actualCompanyId", this.getActualCompanyId());<NEW_LINE>map.put("birthday", this.g... | "lastLoginDate", this.getLastLoginDate()); |
968,666 | protected final void doBracketMatching() {<NEW_LINE>// We always need to repaint the "matched bracket" highlight if it<NEW_LINE>// exists.<NEW_LINE>if (match != null) {<NEW_LINE>repaint(match);<NEW_LINE>if (dotRect != null) {<NEW_LINE>repaint(dotRect);<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// If a matching bracket is found, g... | null ? -1 : bracketInfo.x; |
794,267 | public int encryptData(byte[] buff, int start, int len) throws ZipException {<NEW_LINE>if (finished) {<NEW_LINE>// A non 16 byte block has already been passed to encrypter<NEW_LINE>// non 16 byte block should be the last block of compressed data in AES encryption<NEW_LINE>// any more encryption will lead to corruption ... | k] ^ counterBlock[k]); |
186,784 | private static LineSegment outerTangent(Coordinate c1, double r1, Coordinate c2, double r2) {<NEW_LINE>if (r1 > r2) {<NEW_LINE>LineSegment seg = outerTangent(c2, r2, c1, r1);<NEW_LINE>return new LineSegment(seg.p1, seg.p0);<NEW_LINE>}<NEW_LINE>double x1 = c1.getX();<NEW_LINE>double y1 = c1.getY();<NEW_LINE>double x2 = ... | r2 * Math.sin(aa); |
1,224,568 | public static void assertEquals(Object[] actual, Object[] expected, String message) {<NEW_LINE>if (Arrays.equals(actual, expected)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if ((actual == null && expected != null) || (actual != null && expected == null)) {<NEW_LINE>if (message != null) {<NEW_LINE>fail(message);<NEW_LINE>... | " != " + expected.length, message); |
491,155 | /*<NEW_LINE>* @see com.sitewhere.microservice.api.event.IDeviceEventManagement#<NEW_LINE>* listDeviceStateChangesForIndex(com.sitewhere.spi.device.event.<NEW_LINE>* DeviceEventIndex, java.util.List,<NEW_LINE>* com.sitewhere.spi.search.IDateRangeSearchCriteria)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public ISearchResul... | QueryParams queryParams = QueryParams.builder(); |
1,462,080 | public static // SimpleSearcher are *exactly* the same as SearchCollection (e.g., via automated regression scripts).<NEW_LINE>void main(String[] args) throws Exception {<NEW_LINE>Args searchArgs = new Args();<NEW_LINE>CmdLineParser parser = new CmdLineParser(searchArgs, ParserProperties.defaults().withUsageWidth(100));... | ("title"), 1000, t); |
624,790 | private JPanel createTechnologyExtractorTasksPanel() {<NEW_LINE>JPanel jsonPathActionPanel = new JPanel();<NEW_LINE>jsonPathActionPanel.setLayout(new BoxLayout(jsonPathActionPanel, BoxLayout.X_AXIS));<NEW_LINE>Border margin = new EmptyBorder(5, 5, 0, 5);<NEW_LINE>jsonPathActionPanel.setBorder(margin);<NEW_LINE>// $NON-... | new BorderLayout(0, 5)); |
434,050 | public byte[] parse(PulsarFederationSinkContext context, ProfileEvent event) throws IOException {<NEW_LINE>String uid = event.getUid();<NEW_LINE>PulsarIdConfig idConfig = context.getIdConfig(uid);<NEW_LINE>if (idConfig == null) {<NEW_LINE>context.addSendResultMetric(event, context.getTaskName(), <MASK><NEW_LINE>LOG.err... | false, System.currentTimeMillis()); |
577,079 | public void handleEvent(Event arg0) {<NEW_LINE>try {<NEW_LINE>boolean bShow = btnDetails.getSelection();<NEW_LINE>if (bShow) {<NEW_LINE>Shell detailsShell = new Shell(display, SWT.BORDER | SWT.ON_TOP);<NEW_LINE>Utils.setShellIcon(detailsShell);<NEW_LINE>detailsShell.setLayout(new FillLayout());<NEW_LINE>StyledText text... | y - detailsHeight, detailsWidth, detailsHeight); |
565,445 | public void beginXpGain(PrimarySkillType skill, float xp, XPGainReason xpGainReason, XPGainSource xpGainSource) {<NEW_LINE>if (xp <= 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (SkillTools.isChildSkill(skill)) {<NEW_LINE>Set<PrimarySkillType> parentSkills = FamilyTree.getParents(skill);<NEW_LINE>float splitXp <MASK><N... | = xp / parentSkills.size(); |
1,038,302 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String processId, JsonElement jsonElement) throws Exception {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = new Wo();<NEW_LINE>Work work = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().creat... | get(processId, Process.class); |
223,533 | protected boolean isSignatureEncrypted(List<WSSecurityEngineResult> results) {<NEW_LINE>boolean foundPrimarySignature = false;<NEW_LINE>for (int i = results.size() - 1; i >= 0; i--) {<NEW_LINE>WSSecurityEngineResult result = results.get(i);<NEW_LINE>Integer actInt = (Integer) <MASK><NEW_LINE>if (actInt.intValue() == WS... | result.get(WSSecurityEngineResult.TAG_ACTION); |
1,249,901 | public ValidationResult validateCode(ValidationOptions theOptions, String theSystem, String theCode, String theDisplay, ValueSet theVs) {<NEW_LINE>IValidationSupport.CodeValidationResult outcome;<NEW_LINE>if (isNotBlank(theVs.getUrl())) {<NEW_LINE>outcome = myValidationSupport.validateCode(new ValidationSupportContext(... | theDisplay, theVs.getUrl()); |
1,476,633 | public static void main(String[] args) throws Exception {<NEW_LINE>// Connect to the sever<NEW_LINE>ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost", PORT).usePlaintext().build();<NEW_LINE>ReactorChatGrpc.ReactorChatStub <MASK><NEW_LINE>CountDownLatch done = new CountDownLatch(1);<NEW_LINE>ConsoleR... | stub = ReactorChatGrpc.newReactorStub(channel); |
79,428 | // B.3 pg 62<NEW_LINE>public ECPoint twice() {<NEW_LINE>if (this.isInfinity()) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>ECCurve curve = this.getCurve();<NEW_LINE>SecP256K1FieldElement Y1 = (SecP256K1FieldElement) this.y;<NEW_LINE>if (Y1.isZero()) {<NEW_LINE>return curve.getInfinity();<NEW_LINE>}<NEW_LINE>SecP256K1Fi... | M, Y3.x, tt0); |
326,343 | public static ArrayList<IGeoPoint> pointsAsRect(GeoPoint center, double lengthInMeters, double widthInMeters) {<NEW_LINE>ArrayList<IGeoPoint> points = new ArrayList<IGeoPoint>(4);<NEW_LINE>GeoPoint east = center.destinationPoint(lengthInMeters * 0.5, 90.0f);<NEW_LINE>GeoPoint south = center.destinationPoint(widthInMete... | .getLatitude(), westLon)); |
954,149 | public static DescribeResourceCoverageTotalResponse unmarshall(DescribeResourceCoverageTotalResponse describeResourceCoverageTotalResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeResourceCoverageTotalResponse.setRequestId(_ctx.stringValue("DescribeResourceCoverageTotalResponse.RequestId"));<NEW_LINE>describeResou... | (_ctx.floatValue("DescribeResourceCoverageTotalResponse.Data.TotalCoverage.DeductQuantity")); |
1,814,762 | protected void parseURI(String requestURI, HttpServletRequest request, HttpServletResponse response) throws IOException {<NEW_LINE>// Split a task URI without allocating a list and unnecessary strings<NEW_LINE>// Example: /v1/task/async/{taskId}/results/{bufferId}/{token}<NEW_LINE>TaskId taskId = null;<NEW_LINE>Output... | , format("Unexpected URI for task result request in async mode: %s", requestURI)); |
1,579,821 | public boolean isStable(SystemInfoService infoService, TabletScheduler tabletScheduler, String clusterName) {<NEW_LINE>List<Long> aliveBeIdsInCluster = <MASK><NEW_LINE>for (Partition partition : idToPartition.values()) {<NEW_LINE>long visibleVersion = partition.getVisibleVersion();<NEW_LINE>ReplicaAllocation replicaAll... | infoService.getClusterBackendIds(clusterName, true); |
149,966 | public Host persist(final Host site, boolean publish) {<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>site.setBoolProperty(Contentlet.IS_TEST_MODE, true);<NEW_LINE>site.setBoolProperty(Contentlet.DISABLE_WORKFLOW, true);<NEW_LINE>final Host newSite = APILocator.getHostAPI().save(site, user, false);<NEW_LINE>if (publish) {<NE... | site.setIndexPolicy(IndexPolicy.WAIT_FOR); |
1,765,677 | final DeleteParameterResult executeDeleteParameter(DeleteParameterRequest deleteParameterRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteParameterRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<Delete... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
477,131 | public static SidedPlane constructNormalizedThreePointSidedPlane(final Vector insidePoint, final Vector point1, final Vector point2, final Vector point3) {<NEW_LINE>SidedPlane rval = null;<NEW_LINE>try {<NEW_LINE>final Vector planeNormal = new Vector(point1.x - point2.x, point1.y - point2.y, point1.z - point2.z, point2... | point1.z - point2.z); |
1,422,573 | public BlobHierarchyListSegment deserialize(JsonParser p, DeserializationContext ctxt) throws IOException {<NEW_LINE>ArrayList<BlobItemInternal> blobItems = new ArrayList<>();<NEW_LINE>ArrayList<BlobPrefix> blobPrefixes = new ArrayList<>();<NEW_LINE>JsonDeserializer<Object> blobItemDeserializer = ctxt.findRootValueDese... | .deserialize(p, ctxt)); |
1,182,486 | private static void printStatisticRow(float F, int A8, DateStruct scratchDate) {<NEW_LINE>int K1 = (int) (F * A8);<NEW_LINE>int I5 = K1 / 365;<NEW_LINE>K1 = K1 - (I5 * 365);<NEW_LINE>int I6 = K1 / 30;<NEW_LINE>int I7 = K1 - (I6 * 30);<NEW_LINE><MASK><NEW_LINE>int K6 = scratchDate.month - I6;<NEW_LINE>int K7 = scratchDa... | int K5 = scratchDate.year - I5; |
303,043 | public okhttp3.Call readFlowSchemaStatusCall(String name, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/flowcontrol.apiserver.k8s.io/v1beta1/flowschemas/{name}/status".replaceAll(... | localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); |
1,847,283 | private void initiateView() {<NEW_LINE>LayoutInflater.from(mContext).inflate(R.layout.search_view, this, true);<NEW_LINE>mSearchLayout = findViewById(R.id.search_layout);<NEW_LINE>mSearchTopBar = mSearchLayout.findViewById(R.id.search_top_bar);<NEW_LINE>mSuggestionsListView = mSearchLayout.findViewById(R.id.suggestion_... | findViewById(R.id.action_empty_btn); |
714,068 | final GetNetworkResourcesResult executeGetNetworkResources(GetNetworkResourcesRequest getNetworkResourcesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getNetworkResourcesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
281,662 | public void draw(Canvas canvas) {<NEW_LINE>if (_minkoWebViewRenderer == null) {<NEW_LINE>super.draw(canvas);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Returns canvas attached to OpenGL texture to draw on<NEW_LINE>Canvas glAttachedCanvas = _minkoWebViewRenderer.onDrawViewBegin();<NEW_LINE>if (glAttachedCanvas != null) {<N... | glAttachedCanvas.scale(xScale, xScale); |
1,289,750 | public void prepareCustomSecretsFromBundles(final String namespaceName, final String clusterName) {<NEW_LINE>final Map<String, String> additionalSecretLabels = Map.of(Labels.STRIMZI_CLUSTER_LABEL, clusterName, Labels.STRIMZI_KIND_LABEL, "Kafka");<NEW_LINE>try {<NEW_LINE>LOGGER.info("Deploy Certificate authority ({}-{})... | this.systemTestCa.getPrivateKey()); |
378,769 | static ProcStat parse(String path, byte[] buffer) throws ParseException {<NEW_LINE>ProcStatReader reader <MASK><NEW_LINE>try {<NEW_LINE>reader.reset();<NEW_LINE>reader.skipLeftBrace();<NEW_LINE>CharBuffer comm = reader.readToSymbol(')', CharBuffer.allocate(16));<NEW_LINE>reader.skipSpaces();<NEW_LINE>CharBuffer state =... | = new ProcStatReader(path, buffer); |
1,034,233 | static // power of a number x<NEW_LINE>void power(int x, int n) {<NEW_LINE>// printing value "1" for power = 0<NEW_LINE>if (n == 0) {<NEW_LINE><MASK><NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int[] res = new int[MAX];<NEW_LINE>int res_size = 0;<NEW_LINE>int temp = x;<NEW_LINE>// Initialize result<NEW_LINE>while (temp != 0) ... | System.out.print("1"); |
321,670 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.advanceTime(0);<NEW_LINE>env.compileDeploy("@public create context Ctx " + "context C0 initiated by SupportBean as criteria terminated by SupportBean(theString='x'), " + "context C1 start @now end (*,*,*,*,*,*... | { criteriaA, s0, 1L }); |
1,651,257 | public DescribeDefaultAuthorizerResult describeDefaultAuthorizer(DescribeDefaultAuthorizerRequest describeDefaultAuthorizerRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeDefaultAuthorizerRequest);<NEW_LINE>AWSRequestMetrics aws... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
283,756 | public // Matrix is in row-major form and compatible with SkMatrix.<NEW_LINE>void transform(float[] matrix) {<NEW_LINE>checkState(matrix.length == 9);<NEW_LINE>// The tricky part of this implementation is to preserve the value of<NEW_LINE>// rawX and rawY. So we apply the transformation to the first point<NEW_LINE>// ... | , originY.get())); |
632,369 | public float[] eval(float[] input) throws IOException {<NEW_LINE>// This involves linear interpolation based on a set of sample points.<NEW_LINE>// Theoretically it's not that difficult ... see section 3.9.1 of the PDF Reference.<NEW_LINE>float[] sizeValues = getSize().toFloatArray();<NEW_LINE>int bitsPerSample = getBi... | ), decodeValues.getMax()); |
1,750,313 | public void onStyleLoaded(@NonNull Style style) {<NEW_LINE>FingerDrawQueryActivity.this.mapboxMap = mapboxMap;<NEW_LINE>if (showSearchDataLocations) {<NEW_LINE>new LoadGeoJson(FingerDrawQueryActivity.this).execute();<NEW_LINE>} else {<NEW_LINE>setUpExample(null);<NEW_LINE>}<NEW_LINE>findViewById(R.id.clear_map_for_new_... | new Feature[] {})); |
1,078,184 | static IRubyObject optimized_escape_html(Ruby runtime, RubyString str) {<NEW_LINE>int i, len, beg = 0;<NEW_LINE>RubyString dest = null;<NEW_LINE>byte[] cstrBytes;<NEW_LINE>len = str.size();<NEW_LINE>ByteList byteList = str.getByteList();<NEW_LINE>cstrBytes = byteList.unsafeBytes();<NEW_LINE>int cstr = byteList.begin();... | cstr + beg, len - beg); |
1,409,025 | protected Item internalUpdate(FolderId parentFolderId, ConflictResolutionMode conflictResolutionMode, MessageDisposition messageDisposition, SendInvitationsOrCancellationsMode sendInvitationsOrCancellationsMode) throws ServiceResponseException, Exception {<NEW_LINE>this.throwIfThisIsNew();<NEW_LINE>this.throwIfThisIsAt... | .getAttachments().save(); |
518,630 | public static ModifyIpStatusResponse unmarshall(ModifyIpStatusResponse modifyIpStatusResponse, UnmarshallerContext _ctx) {<NEW_LINE>modifyIpStatusResponse.setRequestId<MASK><NEW_LINE>modifyIpStatusResponse.setCode(_ctx.stringValue("ModifyIpStatusResponse.Code"));<NEW_LINE>modifyIpStatusResponse.setMessage(_ctx.stringVa... | (_ctx.stringValue("ModifyIpStatusResponse.RequestId")); |
282,678 | public StartFlowResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>StartFlowResult startFlowResult = new StartFlowResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken... | String currentParentElement = context.getCurrentParentElement(); |
273,777 | private void insertChild(int parentChunkNum, int newChildChunkNum) {<NEW_LINE>if (parentChunkNum == 0) {<NEW_LINE>putInt((long) newChildChunkNum * CHUNK_SIZE + LargeBlock.PARENT_OFFSET, parentChunkNum);<NEW_LINE>putInt(FREE_BLOCK_OFFSET, newChildChunkNum);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int numChunks = getBlockHe... | .CHILD_TABLE_OFFSET + (firstDifference * INT_SIZE); |
744,072 | private void backConnectionErr(ErrorPacket errPkg, @Nullable MySQLResponseService responseService, boolean syncFinished) {<NEW_LINE>ShardingService shardingService = session.getShardingService();<NEW_LINE>String errMsg = "errNo:" + errPkg.getErrNo() + " " + new String(errPkg.getMessage());<NEW_LINE>if (responseService ... | getTargetMap().remove(rNode); |
513,893 | public void run(RegressionEnvironment env) {<NEW_LINE>String epl = "@name('s0') select * from SupportBeanNumeric where bigdec in (10, 20d) or bigint in (0x02, 3)";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>sendBigNumEvent(env, 0, 9);<NEW_LINE>env.assertListenerNotInvoked("s0");<NEW_LINE>sendBigNumEven... | sendBigNumEvent(env, 99, 0); |
563,959 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>if (additionalProperties.containsKey("modelNamePrefix")) {<NEW_LINE>supportingFiles.clear();<NEW_LINE>supportingFiles.add(new SupportingFile("helpers-header.mustache", sourceFolder <MASK><NEW_LINE>supportingFiles.add(new SupportingFile("helpers-body.mus... | + MODEL_DIR, modelNamePrefix + "Helpers.h")); |
827,635 | // Worker<NEW_LINE>public static void main(String[] args) {<NEW_LINE>Splash.getSplash();<NEW_LINE>// Adempiere.startup(true); // needs to be here for UI<NEW_LINE>// Adempiere.startupEnvironment(false);<NEW_LINE>Adempiere.startup(true);<NEW_LINE>Ini.setProperty(Ini.P_UID, "SuperUser");<NEW_LINE>Ini.<MASK><NEW_LINE>Ini.s... | setProperty(Ini.P_PWD, "System"); |
223,203 | public void update(final AnActionEvent event) {<NEW_LINE>super.update(event);<NEW_LINE>try {<NEW_LINE>final <MASK><NEW_LINE>Optional<Project> projectFromEvent = project(event);<NEW_LINE>if (!projectFromEvent.isPresent()) {<NEW_LINE>presentation.setEnabled(false);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>projectFromEvent.if... | Presentation presentation = event.getPresentation(); |
585,309 | public void loadExtraBiomes(String mcver) {<NEW_LINE>int cnt = 0;<NEW_LINE>BiomeMap.loadWellKnownByVersion(mcver);<NEW_LINE>Registry<Biome> biomeRegistry = getFabricServer().getBiomeRegistry();<NEW_LINE>Biome[] list = getFabricServer().getBiomeList(biomeRegistry);<NEW_LINE>for (int i = 0; i < list.length; i++) {<NEW_LI... | i, id, tmp, hum); |
1,555,038 | final Result prepare(ShardId shardId, UpdateRequest request, boolean canUseIfSeqNo, GetResult getResult, LongSupplier nowInMillis) {<NEW_LINE>if (getResult.isExists() == false) {<NEW_LINE>// If the document didn't exist, execute the update request as an upsert<NEW_LINE>return prepareUpsert(<MASK><NEW_LINE>}<NEW_LINE>//... | shardId, request, getResult, nowInMillis); |
90,087 | /* -- looks like a failed attempt at micro-optimization --<NEW_LINE><NEW_LINE>public L experimentalClassOf(Datum<L,F> example) {<NEW_LINE>if(example instanceof RVFDatum<?, ?>) {<NEW_LINE>throw new UnsupportedOperationException();<NEW_LINE>}<NEW_LINE><NEW_LINE>int labelCount = weights[0].length;<NEW_LINE>//System.out.pr... | L> scores = scoresOf(example); |
1,076,459 | private void drawPoint(Canvas canvas, int x, int y, RotatedTileBox tb, AidlMapPointWrapper point, Bitmap image, boolean selected) {<NEW_LINE>if (image == null) {<NEW_LINE>image = placeholder;<NEW_LINE>}<NEW_LINE>if (selected) {<NEW_LINE>Bitmap bg = isStale(point) ? bigIconBgSelectedStale : bigIconBgSelected;<NEW_LINE>d... | , smallIconSize / 2), bitmapPaint); |
265,751 | @RequestMapping(value = "/ruleChain", method = RequestMethod.POST)<NEW_LINE>@ResponseBody<NEW_LINE>public RuleChain saveRuleChain(@ApiParam(value = "A JSON value representing the rule chain.") @RequestBody RuleChain ruleChain) throws ThingsboardException {<NEW_LINE>try {<NEW_LINE>boolean created = ruleChain.getId() == ... | ADDED : ActionType.UPDATED, e); |
353,507 | public ProjectionAttributeStateSet appendProjectionAttributeState(ProjectionContext projCtx, ProjectionAttributeStateSet projOutputSet, CdmAttributeContext attrCtx) {<NEW_LINE>// Create new attribute context for the operation<NEW_LINE>AttributeContextParameters attrCtxOpFKParam = new AttributeContextParameters();<NEW_L... | ).getResOpt(), attrCtxFKParam); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.