idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
165,503 | public Void visitClass(ClassTree node, Void p) {<NEW_LINE>final SourcePositions sourcePositions = wc.getTrees().getSourcePositions();<NEW_LINE>final <MASK><NEW_LINE>List<Tree> members = new LinkedList<Tree>();<NEW_LINE>ClassTree classTree = node;<NEW_LINE>for (Tree member : node.getMembers()) {<NEW_LINE>int s = (int) s... | TreeMaker make = wc.getTreeMaker(); |
498,837 | public void performInstrospect(HttpServletRequest req, HttpServletResponse resp, StringBuffer sb) {<NEW_LINE>sb.append("\n\nPreparing Introspect Data:");<NEW_LINE>String clientId = req.getParameter("clientId");<NEW_LINE>String clientSecret = req.getParameter("clientSecret");<NEW_LINE>sb.append("\n***clientID:" + client... | hashTable = getProperties(runAsSubject, sb); |
1,803,713 | public void updateSuperset() throws IOException {<NEW_LINE>StructureReader reader = null;<NEW_LINE>if ((structureBytes.length > 2) && (structureBytes[0] == SUPERSET_ID[0]) && (structureBytes[1] == SUPERSET_ID[1])) {<NEW_LINE>// creating a reader using an input stream treats it as a superset input i.e. text<NEW_LINE><MA... | InputStream in = new ByteArrayInputStream(structureBytes); |
1,755,992 | final AddAttachmentsToSetResult executeAddAttachmentsToSet(AddAttachmentsToSetRequest addAttachmentsToSetRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(addAttachmentsToSetRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequest... | invoke(request, responseHandler, executionContext); |
776,536 | public void addPeer(String ip_address, int tcp_port, int udp_port, boolean use_crypto, Map user_data) {<NEW_LINE>final byte type = use_crypto ? PeerItemFactory.HANDSHAKE_TYPE_CRYPTO : PeerItemFactory.HANDSHAKE_TYPE_PLAIN;<NEW_LINE>final PeerItem peer_item = PeerItemFactory.createPeerItem(ip_address, tcp_port, PeerItem.... | = TCPNetworkManager.TCP_OUTGOING_ENABLED && tcp_port > 0; |
248,043 | public AggregationMultiFunctionMethodDesc validateAggregationMethod(ExprValidationContext validationContext, String aggMethodName, ExprNode[] params) throws ExprValidationException {<NEW_LINE>aggMethodName = aggMethodName.toLowerCase(Locale.ENGLISH);<NEW_LINE>if (aggMethodName.equals("countevents") || aggMethodName.equ... | handleMethodFirstLast(params, methodType, validationContext); |
166,419 | public void updateRouteArticlePointsFilter() {<NEW_LINE>if (!app.getPoiTypes().isInit()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PoiUIFilter routeArticlePointsFilter = app.getPoiFilters().getFilterById(PoiUIFilter.STD_PREFIX + ROUTE_ARTICLE_POINT);<NEW_LINE>if (routeArticlePointsFilter != null) {<NEW_LINE>Set<String> se... | ).searchPoiSubTypesByPrefix(MapPoiTypes.CATEGORY); |
5,940 | static void mainProgram() {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>while (true) {<NEW_LINE>int N = sc.nextInt();<NEW_LINE><MASK><NEW_LINE>if (N == 0 && K == 0)<NEW_LINE>break;<NEW_LINE>gallery = new int[N][2];<NEW_LINE>dp = new Integer[K + 1][N][2];<NEW_LINE>int sum = 0;<NEW_LINE>for (int i = 0; i < N; ... | int K = sc.nextInt(); |
1,094,628 | public void updateProgress() {<NEW_LINE>if (mTimeBarView != null && mTimeTextView != null && !mReleased) {<NEW_LINE>final long durationMs = mVideoPlayer.getDuration();<NEW_LINE>if (durationMs > 0) {<NEW_LINE>final long currentPositionMs = mVideoPlayer.getCurrentPosition();<NEW_LINE>mTimeBarView.setDuration(durationMs);... | setBufferedPosition(mVideoPlayer.getBufferedPosition()); |
503,661 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_media_player);<NEW_LINE>mVideoPath = getIntent().getStringExtra("videoPath");<NEW_LINE>boolean isLiveStreaming = getIntent().getIntExtra("liveStreaming", 1) == 1;<NEW_LINE>Button p... | findViewById(R.id.SurfaceView); |
342,200 | public static void initDrawer(NavigationView navView, @NonNull RepositoriesFragment.RepositoriesType type) {<NEW_LINE>if (navView == null)<NEW_LINE>return;<NEW_LINE>if (RepositoriesFragment.RepositoriesType.OWNED.equals(type)) {<NEW_LINE>// do nothing<NEW_LINE>} else if (RepositoriesFragment.RepositoriesType.PUBLIC.equ... | .nav_type_chooser).setVisible(false); |
54,696 | public List<FieldChange> cleanup(BibEntry entry) {<NEW_LINE>// Query entries for their timestamp field entries<NEW_LINE>if (entry.getField(timeStampField).isPresent()) {<NEW_LINE>Optional<String> formattedTimeStamp = formatTimeStamp(entry.getField(timeStampField).get());<NEW_LINE>if (formattedTimeStamp.isEmpty()) {<NEW... | changeList = new ArrayList<>(); |
889,804 | private static DescribeModelResponse createModelResponse(ModelManager modelManager, String modelName, Model model) {<NEW_LINE>DescribeModelResponse resp = new DescribeModelResponse();<NEW_LINE>resp.setModelName(modelName);<NEW_LINE>resp.setModelUrl(model.getModelUrl());<NEW_LINE>resp.setBatchSize(model.getBatchSize());... | boolean isRunning = worker.isRunning(); |
41,510 | final ListVirtualMachinesResult executeListVirtualMachines(ListVirtualMachinesRequest listVirtualMachinesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listVirtualMachinesRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<ListVirtua... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
907,428 | public void run() {<NEW_LINE>try {<NEW_LINE>final JSONObject result = actFmInvoker.authenticate(email, firstName, lastName, provider, secret);<NEW_LINE>final String token = actFmInvoker.getToken();<NEW_LINE>if (result.optBoolean("new")) {<NEW_LINE>// Report new user statistic<NEW_LINE>StatisticsService.reportEvent(Stat... | dismissDialog(ActFmLoginActivity.this, progressDialog); |
903,135 | private void putValidatedConfig(DataFrameAnalyticsConfig config, TimeValue masterNodeTimeout, ActionListener<PutDataFrameAnalyticsAction.Response> listener) {<NEW_LINE>DataFrameAnalyticsConfig preparedForPutConfig = new DataFrameAnalyticsConfig.Builder(config, maxModelMemoryLimitSupplier.get()).setCreateTime(Instant.no... | "index", "create_index").build(); |
308,729 | Future<ReconciliationState> kafkaPersistentClaimDeletion() {<NEW_LINE>Promise<ReconciliationState> resultPromise = Promise.promise();<NEW_LINE>Future<List<PersistentVolumeClaim>> futurePvcs = pvcOperations.listAsync(namespace, kafkaCluster.getSelectorLabels());<NEW_LINE>futurePvcs.onComplete(res -> {<NEW_LINE>if (res.s... | fail(res.cause()); |
903,232 | public static void addSelectedInstancesToDeploymentGroup(HandlerContext handlerCtx) {<NEW_LINE>String[] instances = (String[]) handlerCtx.getInputValue("instances");<NEW_LINE>String[] selected = (String[]) handlerCtx.getInputValue("selected");<NEW_LINE>String deploymentGroup = (String) handlerCtx.getInputValue("deploym... | attributes.put("instance", selectedInstance); |
663,562 | public ActivityListItem unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ActivityListItem activityListItem = new ActivityListItem();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = origina... | "unixTimestamp").unmarshall(context)); |
1,104,828 | void showScanOrCopyLayout() {<NEW_LINE>scanOrCopyIsShown = true;<NEW_LINE><MASK><NEW_LINE>confirmContainer.setVisibility(View.GONE);<NEW_LINE>scrollContainer2FA.setVisibility(View.GONE);<NEW_LINE>scrollContainerVerify.setVisibility(View.VISIBLE);<NEW_LINE>scrollContainerVerify.setBackgroundColor(ContextCompat.getColor(... | qrSeedContainer.setVisibility(View.VISIBLE); |
224,737 | private void createDropAllData(PrintWriter pw, Collection<TableDefinition> tableDefinitions, DaoGenConfig config) {<NEW_LINE>pw.println(" /** Delete all table data */");<NEW_LINE>pw.println(" public void dropAllData() {");<NEW_LINE>pw.println(" String[] sqls = new String[" + <MASK><NEW_LINE>int count = 0;<... | tableDefinitions.size() + "];"); |
1,731,864 | private boolean compareNumber(Number valueObj, String value1, String value2) {<NEW_LINE>BigDecimal valueObjB = null;<NEW_LINE>BigDecimal value1B = null;<NEW_LINE>BigDecimal value2B = null;<NEW_LINE>try {<NEW_LINE>if (valueObj instanceof BigDecimal)<NEW_LINE>valueObjB = (BigDecimal) valueObj;<NEW_LINE>else if (valueObj ... | valueObjB.compareTo(value1B) <= 0; |
1,789,566 | protected Answer execute(final CheckRouterCommand cmd) {<NEW_LINE>final String command = String.format("%s%s", "/opt/cloud/bin/", VRScripts.RVR_CHECK);<NEW_LINE>if (s_logger.isDebugEnabled()) {<NEW_LINE>s_logger.debug("Executing resource CheckRouterCommand: " + s_gson.toJson(cmd));<NEW_LINE>s_logger.debug("Run command ... | "CheckRouter failed due to " + result.second()); |
235,831 | static Request multiSearch(MultiSearchRequest multiSearchRequest) throws IOException {<NEW_LINE>Request request = new <MASK><NEW_LINE>Params params = new Params(request);<NEW_LINE>params.putParam(RestSearchAction.TYPED_KEYS_PARAM, "true");<NEW_LINE>params.putParam(RestSearchAction.TOTAL_HIT_AS_INT_PARAM, "true");<NEW_L... | Request(HttpPost.METHOD_NAME, "/_msearch"); |
442,271 | private static void generics(LexerfulGrammarBuilder b) {<NEW_LINE>b.rule(cliGenericDeclaration).is("generic", "<", cliGenericParameterList, ">", b.optional(cliConstraintClauseList), declaration);<NEW_LINE>b.rule(cliGenericParameterList).is(cliGenericParameter, b.zeroOrMore(",", cliGenericParameter));<NEW_LINE>b.rule(cl... | .zeroOrMore(",", cliConstraintItem)); |
1,374,846 | private void loadNode805() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.ConditionType_ConditionClassId, new QualifiedName(0, "ConditionClassId"), new LocalizedText("en", "ConditionClassId"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), new DataValue(Variant.NU... | .expanded(), true)); |
1,545,186 | public List<Article> query(String title, Logger logger) {<NEW_LINE>for (String titleForm : cookedTitles(title)) {<NEW_LINE>List<Article> fuzzyLookupEntities;<NEW_LINE>List<Article> crossWikiEntities;<NEW_LINE>while (true) {<NEW_LINE>try {<NEW_LINE>fuzzyLookupEntities = queryFuzzyLookup(titleForm, logger);<NEW_LINE>cros... | fuzzyLookupUrl + " or " + crossWikiLookupUrl + " label lookup query (temporarily?) failed, retrying in a moment..."); |
602,246 | private void initEditing(Bundle savedInstanceState) {<NEW_LINE>mStateInsert = false;<NEW_LINE>findViewById(android.R.id.button2).setOnClickListener(this);<NEW_LINE>findViewById(android.R.id.button3).setOnClickListener(this);<NEW_LINE>setTitle(R.string.activity_edit_list_title);<NEW_LINE>if (savedInstanceState == null) ... | }, null, null, null); |
524,519 | public Function<Object, Object> updater(PropertyBean bean) {<NEW_LINE>if (myComponent == null)<NEW_LINE>return null;<NEW_LINE>String name = bean.propertyName.trim();<NEW_LINE>try {<NEW_LINE>try {<NEW_LINE>Method getter;<NEW_LINE>try {<NEW_LINE>getter = myComponent.getClass().getMethod("get" + StringUtil.capitalize(name... | + StringUtil.capitalize(name)); |
1,681,933 | static FetchStats fromBencoded(Map<String, Object> map) {<NEW_LINE>Key k = typedGet(map, "k", byte[].class).map(Key::new).orElseThrow(() -> new IllegalArgumentException("missing key in serialized form"));<NEW_LINE>return new FetchStats(k, fs -> {<NEW_LINE>fs.recentSources = typedGet(map, "sources", List.class).map((Lis... | fetchCount = i.intValue()); |
100,661 | // ///////////////////////////////////////////////////<NEW_LINE>// ///////////// API Implementation///////////////////<NEW_LINE>// ///////////////////////////////////////////////////<NEW_LINE>@Override<NEW_LINE>public void execute() {<NEW_LINE>if (StringUtils.isEmpty(getCsr()) && getDomains().isEmpty()) {<NEW_LINE>thro... | ServerApiException(ApiErrorCode.PARAM_ERROR, "Please provide the domains or the CSR, none of them are provided"); |
1,061,521 | final CreateBatchPredictionJobResult executeCreateBatchPredictionJob(CreateBatchPredictionJobRequest createBatchPredictionJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBatchPredictionJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
357,738 | private TemplateLiteralExpressionTree parseTemplateLiteral(ParseTree operand) {<NEW_LINE>SourcePosition start = operand == null ? getTreeStartLocation() : operand.location.start;<NEW_LINE>Token token = nextToken();<NEW_LINE>if (!(token instanceof TemplateLiteralToken)) {<NEW_LINE>reportError(token, "Unexpected template... | (templateToken.location, templateToken)); |
1,699,165 | void assembleMessageParameters() {<NEW_LINE>mAid = SecureUtils.calculateK4(mAppKey.getKey());<NEW_LINE>final ByteBuffer paramsBuffer;<NEW_LINE>LOG.info("Level: " + mLevel);<NEW_LINE>if (mTransitionSteps == null || mTransitionResolution == null || mDelay == null) {<NEW_LINE>paramsBuffer = ByteBuffer.allocate(GENERIC_LEV... | LOG.info("Transition steps: " + mTransitionSteps); |
52,462 | private static Converter<org.springframework.data.redis.connection.RedisZSetCommands.Range, Range.Boundary<?>> rangeToBoundaryArgumentConverter(boolean upper, boolean convertNumberToBytes) {<NEW_LINE>return (source) -> {<NEW_LINE>Boundary sourceBoundary = upper ? source.getMax() : source.getMin();<NEW_LINE>if (sourceBo... | boolean inclusive = sourceBoundary.isIncluding(); |
525,493 | public StreamInfo<Object, Object> decode(List<Object> parts, State state) {<NEW_LINE>Map<String, Object> map = IntStream.range(0, parts.size()).filter(i -> i % 2 == 0).mapToObj(i -> parts.subList(i, i + 2)).filter(p -> p.get(1) != null).collect(Collectors.toMap(e -> (String) e.get(0), e -> e.get(1)));<NEW_LINE>StreamIn... | Object> last = createStreamInfoEntry(lastEntry); |
1,620,156 | public void undoCommand() {<NEW_LINE>if (getUndoCommand() == null) {<NEW_LINE>throw new IllegalStateException("Can't undo command");<NEW_LINE>}<NEW_LINE>List<CommandInfo> processedCommands = new ArrayList<>();<NEW_LINE>synchronized (commands) {<NEW_LINE>CommandInfo lastCommand = commands.get(commands.size() - 1);<NEW_L... | reflector.undoCommand(cmd.command); |
43,543 | public void run() {<NEW_LINE>// Ensure no listener is left watching for events<NEW_LINE>EventManager.get().clear();<NEW_LINE>// Clear<NEW_LINE>editorPropertiesPanel.removeAll();<NEW_LINE>influencerBox.removeAllItems();<NEW_LINE>controllerPropertiesPanel.removeAll();<NEW_LINE>// Editor props<NEW_LINE>addRow(editorProper... | .billboardBatch), 1, 1); |
1,321,733 | public void marshall(SendDataPoint _sendDataPoint, Request<?> request, String _prefix) {<NEW_LINE>String prefix;<NEW_LINE>if (_sendDataPoint.getTimestamp() != null) {<NEW_LINE>prefix = _prefix + "Timestamp";<NEW_LINE>java.util.Date timestamp = _sendDataPoint.getTimestamp();<NEW_LINE>request.addParameter(prefix, StringU... | Long complaints = _sendDataPoint.getComplaints(); |
1,689,064 | public void close() throws IOException {<NEW_LINE>if (mClosed.getAndSet(true)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mLocalOutputStream.close();<NEW_LINE>try (BufferedInputStream in = new BufferedInputStream(new FileInputStream(mFile))) {<NEW_LINE>ObjectMetadata objMeta = new ObjectMetadata();<NEW_LINE>objMeta.setCont... | mBucketName, mKey, in, objMeta); |
944,643 | private void loadNode917() {<NEW_LINE>BaseDataVariableTypeNode node = new BaseDataVariableTypeNode(this.context, Identifiers.ServerType_ServerDiagnostics_ServerDiagnosticsSummary_SecurityRejectedRequestsCount, new QualifiedName(0, "SecurityRejectedRequestsCount"), new LocalizedText("en", "SecurityRejectedRequestsCount"... | this.nodeManager.addNode(node); |
371,089 | final DisassociateFromMasterAccountResult executeDisassociateFromMasterAccount(DisassociateFromMasterAccountRequest disassociateFromMasterAccountRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(disassociateFromMasterAccountRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionC... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
91,457 | synchronized public void readMetadata(@NonNull BackupFiles.BackupFile backupFile) throws IOException {<NEW_LINE>String metadata = FileUtils.getFileContent(backupFile.getMetadataFile());<NEW_LINE>if (TextUtils.isEmpty(metadata)) {<NEW_LINE>throw new IOException("Empty JSON string for path " + backupFile.getBackupPath())... | packageName = rootObject.getString("package_name"); |
1,116,709 | public BreakStatement breakStatement() {<NEW_LINE>Token position = consume(BREAK);<NEW_LINE>String target = null;<NEW_LINE>switch(la(false)) {<NEW_LINE>case CR:<NEW_LINE>case NL:<NEW_LINE>case CRNL:<NEW_LINE>case PARAGRAPH_SEPARATOR:<NEW_LINE>case LINE_SEPARATOR:<NEW_LINE>case SEMICOLON:<NEW_LINE>case RIGHT_BRACE:<NEW_... | (false).getText()); |
1,613,863 | public synchronized boolean deserialize(ByteBuffer buffer) {<NEW_LINE>long newLastLogIndex = buffer.getLong();<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Partition table: lastMetaLogIndex {}, newLastLogIndex {}", lastMetaLogIndex, newLastLogIndex);<NEW_LINE>}<NEW_LINE>// judge whether the partition ... | int size = buffer.getInt(); |
1,102,905 | public RoleModel addRealmRole(RealmModel realm, String id, String name) {<NEW_LINE>if (getRealmRole(realm, name) != null) {<NEW_LINE>throw new ModelDuplicateException("Role with the same name exists: " + name + " for realm " + realm.getName());<NEW_LINE>}<NEW_LINE>LOG.tracef("addRealmRole(%s, %s, %s)%s", realm, id, nam... | (realm).apply(entity); |
111,041 | public Object visit(Object context, StrictEqualityOperatorExpression expr, boolean strict) {<NEW_LINE>LabelNode returnTrue = new LabelNode();<NEW_LINE>LabelNode returnFalse = new LabelNode();<NEW_LINE>LabelNode end = new LabelNode();<NEW_LINE>aload(Arities.EXECUTION_CONTEXT);<NEW_LINE>// context<NEW_LINE>expr.getLhs().... | .class, Object.class)); |
152,889 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>if (additionalProperties.containsKey(CLASS_PREFIX)) {<NEW_LINE>setClassPrefix((String) additionalProperties.get(CLASS_PREFIX));<NEW_LINE>}<NEW_LINE>additionalProperties.put(CLASS_PREFIX, classPrefix);<NEW_LINE>if (additionalProperties.containsKey(API_VE... | additionalProperties.get(API_VERSION))); |
1,063,245 | private boolean matches(String word, String pattern) {<NEW_LINE>// word -> p<NEW_LINE>Map<Character, Character> map1 = new HashMap<>();<NEW_LINE>// p -> word<NEW_LINE>Map<Character, Character> map2 = new HashMap<>();<NEW_LINE>for (int i = 0; i < pattern.length(); i++) {<NEW_LINE>if (!map1.containsKey(word.charAt(i))) {... | , word.charAt(i)); |
413,968 | private Map<String, Object> toNotation(Pair<String, String> nameAndValue) {<NEW_LINE>String name = nameAndValue.getLeft();<NEW_LINE><MASK><NEW_LINE>Map<String, Object> ret = new HashMap<>();<NEW_LINE>ret.put(NAME_KEY, name);<NEW_LINE>if (value.startsWith(BRANCH_KEYWORD)) {<NEW_LINE>ret.put(BRANCH_KEY, value.substring(B... | String value = nameAndValue.getRight(); |
1,046,826 | final DeleteModelResult executeDeleteModel(DeleteModelRequest deleteModelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteModelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | endClientExecution(awsRequestMetrics, request, response); |
1,385,867 | public static IRubyObject f_gcd(ThreadContext context, IRubyObject x, IRubyObject y) {<NEW_LINE>if (x instanceof RubyFixnum && y instanceof RubyFixnum && isLongMinValue((RubyFixnum) x)) {<NEW_LINE>return RubyFixnum.newFixnum(context.runtime, i_gcd(((RubyFixnum) x).getLongValue(), ((RubyFixnum) y).getLongValue()));<NEW_... | y = f_negate(context, y); |
1,405,774 | private void predictLumaTM(VPXMacroblock above, VPXMacroblock left, int aboveLeft) {<NEW_LINE>Subblock[] leftYSb;<NEW_LINE>Subblock[] aboveYSb = new Subblock[4];<NEW_LINE>leftYSb = new Subblock[4];<NEW_LINE>for (int col = 0; col < 4; col++) aboveYSb[col] = above.ySubblocks[3][col];<NEW_LINE>for (int row = 0; row < 4; r... | .val = new short[16]; |
805,808 | private void mark(NSMutableAttributedString text, PatternSyntaxException e) {<NEW_LINE>if (null == e) {<NEW_LINE>text.removeAttributeInRange(NSAttributedString.ForegroundColorAttributeName, NSRange.NSMakeRange(new NSUInteger(0), text.length()));<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// The approximate index in the patte... | int index = e.getIndex(); |
322,411 | public TicketAndCheckInResult registerSponsorScan(String eventShortName, String ticketUid, String notes, SponsorScan.LeadStatus leadStatus, String username) {<NEW_LINE>int userId = userRepository.<MASK><NEW_LINE>Optional<EventAndOrganizationId> maybeEvent = eventRepository.findOptionalEventAndOrganizationIdByShortName(... | getByUsername(username).getId(); |
1,730,054 | public static WebDoc createPage(Properties ctx, HttpServletRequest request, int AD_Record_ID, int AD_Table_ID) {<NEW_LINE>// WebDoc doc = WebDoc.createPopup (Msg.translate(ctx, "AD_Attachment_ID"));<NEW_LINE>WebDoc doc = null;<NEW_LINE>String TableName = null;<NEW_LINE>int AD_Window_ID = 0;<NEW_LINE>int PO_Window_ID = ... | PO_Window_ID = rs.getInt(3); |
426,972 | public static void main(String[] args) throws Exception {<NEW_LINE>final Logger logger = LoggerFactory.getLogger(App.class);<NEW_LINE>// Printing the information about the bindings for SLF4J:<NEW_LINE>Configuration config = getConnectorConfiguration(args);<NEW_LINE>final <MASK><NEW_LINE>System.out.println("Logger Bindi... | StaticLoggerBinder binder = StaticLoggerBinder.getSingleton(); |
1,291,121 | public String changePass(@RequestParam String email, @RequestParam(required = false) String newpassword, @RequestParam(required = false) String token, HttpServletRequest req, Model model) {<NEW_LINE>boolean approvedDomain = utils.isEmailDomainApproved(email);<NEW_LINE>boolean validCaptcha = HttpUtils.isValidCaptcha(req... | .addAttribute("verified", !error); |
26,100 | // use String to build PushPayload instance<NEW_LINE>public static void testSendPush_fromJSON() {<NEW_LINE>ClientConfig clientConfig = ClientConfig.getInstance();<NEW_LINE>JPushClient jpushClient = new JPushClient(MASTER_SECRET, APP_KEY, null, clientConfig);<NEW_LINE>Gson gson = new GsonBuilder().registerTypeAdapter(Pl... | "HTTP Status: " + e.getStatus()); |
567,041 | public SOAPMessage invoke(SOAPMessage request) {<NEW_LINE>SOAPMessage response = null;<NEW_LINE>try {<NEW_LINE>System.out.println("Incoming Client Request as a SOAPMessage:");<NEW_LINE>request.writeTo(System.out);<NEW_LINE>String hdrText = request.getSOAPHeader().getTextContent();<NEW_LINE>System.out.println("Incoming ... | Source src = new StreamSource(respMsg); |
1,111,000 | private DaemonOperationResult executeAdd() throws Exception {<NEW_LINE>// Check all folders<NEW_LINE>for (String watchRoot : options.getWatchRoots()) {<NEW_LINE>File watchRootFolder = new File(watchRoot);<NEW_LINE>File watchRootAppFolder = new File(watchRootFolder, Config.DIR_APPLICATION);<NEW_LINE>if (!watchRootFolder... | throw new Exception("Given argument is not an existing folder, or a valid Syncany folder: " + watchRoot); |
1,370,510 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fieldsOut = "theString,total".split(",");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>env.compileDeploy("@public create table MyTableR1D(pk string primary key, total sum(int))", path);<NEW_LINE>env.compileDeploy("@name('into') into table M... | , path).addListener("s0"); |
976,767 | private void notifyDataSetChanged() {<NEW_LINE>View parentLayout = findViewById(R.id.content_frame);<NEW_LINE>String frameworkUpdateVersion = mRepoLoader.getFrameworkUpdateVersion();<NEW_LINE>boolean moduleUpdateAvailable = mRepoLoader.hasModuleUpdates();<NEW_LINE>Fragment currentFragment = getSupportFragmentManager().... | Snackbar.LENGTH_LONG).show(); |
1,173,928 | private static void expandDataFileRules(Path file) throws IOException {<NEW_LINE>boolean modified = false;<NEW_LINE>StringBuilder builder = new StringBuilder();<NEW_LINE>try (InputStream stream = Files.newInputStream(file);<NEW_LINE>InputStreamReader reader = new InputStreamReader(stream, StandardCharsets.UTF_8);<NEW_L... | (line).append("\n"); |
407,913 | private void signUsingWallet() throws Exception {<NEW_LINE>WalletLoader loader = new WalletLoader();<NEW_LINE>loader.ensureDoesNotExist(walletID);<NEW_LINE>Service.CommandRequest.Builder builder = Service.CommandRequest.newBuilder();<NEW_LINE>Service.CommandRequest.SignTxRequest.Builder internalBuilder = Service<MASK><... | .CommandRequest.SignTxRequest.newBuilder(); |
267,282 | public List<LocationLink> handle(CancelChecker cancelToken, DefinitionParams params) {<NEW_LINE>try {<NEW_LINE>TextDocument doc = server.getTextDocumentService().getLatestSnapshot(params.getTextDocument().getUri());<NEW_LINE>if (doc != null) {<NEW_LINE>int offset = doc.toOffset(params.getPosition());<NEW_LINE>int start... | (start, end - start)); |
1,811,670 | public static void checkTagSharing(boolean start_of_day) {<NEW_LINE>UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();<NEW_LINE>if (uiFunctions != null) {<NEW_LINE>TagManager tm = TagManagerFactory.getTagManager();<NEW_LINE>if (start_of_day) {<NEW_LINE>if (COConfigurationManager.getBooleanParameter("tag.sha... | , MessageText.getString("MessageBoxWindow.nomoreprompting")); |
1,533,352 | private NodeValue calculate(NodeValue v) {<NEW_LINE>Node n = v.asNode();<NEW_LINE>if (!n.isLiteral())<NEW_LINE>throw new ExprEvalException("Not a literal: " + v);<NEW_LINE>if (n.getLiteralLanguage() != null && !n.getLiteralLanguage().equals(""))<NEW_LINE>throw new ExprEvalException("Can't make a digest of an RDF term w... | String x = n.getLiteralLexicalForm(); |
680,087 | public Dimension render(Graphics2D graphics) {<NEW_LINE>if (client.isMenuOpen()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>final MenuEntry[] menuEntries = client.getMenuEntries();<NEW_LINE>final int last = menuEntries.length - 1;<NEW_LINE>if (last < 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>final... | final MenuEntry menuEntry = menuEntries[last]; |
1,011,945 | public void onPurchasesUpdated(BillingResult result, @Nullable List<Purchase> purchases) {<NEW_LINE>log("onPurchasesUpdated(" + result + ", " + purchases + ")");<NEW_LINE>String message;<NEW_LINE>switch(result.getResponseCode()) {<NEW_LINE>case OK:<NEW_LINE>if (purchases != null) {<NEW_LINE>for (Purchase p : purchases)... | (R.string.donation_error_already_owned)); |
249,699 | private DdlJob handleRecycleBin(LogicalTruncateTable logicalTruncateTable, ExecutionContext executionContext) {<NEW_LINE>RecycleBin recycleBin = RecycleBinManager.instance.getByAppName(executionContext.getAppName());<NEW_LINE>String tmpBinName = recycleBin.genName();<NEW_LINE>String tableName = logicalTruncateTable.get... | tableSyncTask = truncateWithRecycleBinJob.getTaskByLabel(CREATE_TABLE_SYNC_TASK); |
1,309,091 | protected List<Attachment> downloadCssAndImages(String endpoint, HttpRequest request) throws MalformedURLException, IOException {<NEW_LINE>HtmlPage htmlPage = client.getPage(endpoint);<NEW_LINE>String xPathExpression = "//*[name() = 'img' or name() = 'link' and @type = 'text/css']";<NEW_LINE>List<?> resultList = htmlPa... | ) : htmlElement.getAttribute("src"); |
489,574 | public void fillBeats(double start) {<NEW_LINE>double prevBeat = 0, nextBeat, currentInterval, beats;<NEW_LINE>ListIterator<Event> list = events.listIterator();<NEW_LINE>if (list.hasNext()) {<NEW_LINE>prevBeat = list.next().keyDown;<NEW_LINE>// alt. to fill from 0:<NEW_LINE>// prevBeat = Math.mod(list.next().keyDown, b... | - prevBeat) / beatInterval - 0.01); |
1,296,841 | private String workWithProperties(HttpServletResponse res, HttpServletRequest req, String operation, String uid) throws IOException {<NEW_LINE>String message = null;<NEW_LINE>if (OP_RMV_PROPERTY.equalsIgnoreCase(operation)) {<NEW_LINE>getFf4j().getPropertiesStore().deleteProperty(uid);<NEW_LINE>LOGGER.info("Property '"... | message = renderMsgProperty(uid, "DELETED"); |
1,608,364 | private void handleDeleteAllSelected() {<NEW_LINE>final DcContext dcContext = DcHelper.getContext(getActivity());<NEW_LINE>int conversationsCount = getListAdapter().getBatchSelections().size();<NEW_LINE>AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());<NEW_LINE>alert.setMessage(getActivity().getResour... | .one_moment), true, false); |
823,142 | private Prediction<MultiLabel> generatePrediction(FloatNdArray predictions, ImmutableOutputInfo<MultiLabel> outputIDInfo, int numUsed, Example<MultiLabel> example) {<NEW_LINE>long[] shape = predictions.shape().asArray();<NEW_LINE>if (shape.length != 1) {<NEW_LINE>throw new IllegalArgumentException("Failed to get scalar... | ("More than Integer.MAX_VALUE predictions. Found " + shape[0]); |
306,294 | private boolean onShardLimitBreached(long nodeTotalBytes, long nodeLimit, long requestStartTime, OperationTracker operationTracker, BooleanSupplier increaseShardLimitSupplier) {<NEW_LINE>// Secondary Parameters (i.e. LastSuccessfulRequestDuration and Throughput) is taken into consideration when<NEW_LINE>// the current ... | operationTracker.getStatsTracker(), primaryAndCoordinatingThroughputDegradationLimits); |
994,392 | public FieldInitializers build() throws AttrLookupException {<NEW_LINE>Map<ResourceType, Collection<FieldInitializer>> initializers = new EnumMap<>(ResourceType.class);<NEW_LINE>Map<ResourceType, Integer> typeIdMap = chooseTypeIds();<NEW_LINE>Map<String, Integer> attrAssignments = assignAttrIds(typeIdMap.get(ResourceTy... | ResourceType type = fieldEntries.getKey(); |
117,725 | protected boolean tx(Config config, int transactionLevel, IAtom atom) {<NEW_LINE>Connection conn = config.getThreadLocalConnection();<NEW_LINE>if (conn != null) {<NEW_LINE>// Nested transaction support<NEW_LINE>try {<NEW_LINE>if (conn.getTransactionIsolation() < transactionLevel)<NEW_LINE>conn.setTransactionIsolation(t... | ) t : new ActiveRecordException(t); |
1,123,736 | private void openNewObject() {<NEW_LINE>IWorkbenchWindow workbenchWindow = UIUtils.getActiveWorkbenchWindow();<NEW_LINE>try {<NEW_LINE>final DBNDatabaseNode newChild = DBWorkbench.getPlatform().getNavigatorModel().findNode(newObject);<NEW_LINE>if (newChild != null) {<NEW_LINE>DatabaseNavigatorView view = UIUtils.findVi... | ) & DBEObjectMaker.FEATURE_EDITOR_ON_CREATE) != 0; |
1,380,499 | public void start() {<NEW_LINE>if (current != null) {<NEW_LINE>current.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Form f = new Form("custom tabs", new BorderLayout());<NEW_LINE>Tabs outerTabs = new Tabs();<NEW_LINE>Tabs tabs = new Tabs();<NEW_LINE>tabs.addTab("inner1", new Label("content1"));<NEW_LINE>tabs.addTab(<MA... | "inner2", new Label("content2")); |
963,252 | final CreateBusinessReportScheduleResult executeCreateBusinessReportSchedule(CreateBusinessReportScheduleRequest createBusinessReportScheduleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createBusinessReportScheduleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "CreateBusinessReportSchedule"); |
1,176,128 | public void saveProcessInfoOnly(final ProcessInfo pi) {<NEW_LINE>//<NEW_LINE>// Create/Load the AD_PInstance<NEW_LINE>final I_AD_PInstance adPInstance;<NEW_LINE>if (pi.getPinstanceId() == null) {<NEW_LINE>adPInstance = newInstanceOutOfTrx(I_AD_PInstance.class);<NEW_LINE>setValue(adPInstance, I_AD_PInstance.COLUMNNAME_A... | setAD_Table_ID(pi.getTable_ID()); |
627,187 | static void cleanup() {<NEW_LINE>String tempFolder = getTempDir().getAbsolutePath();<NEW_LINE>File dir = new File(tempFolder);<NEW_LINE>File[] nativeLibFiles = dir.listFiles(new FilenameFilter() {<NEW_LINE><NEW_LINE>private final String searchPattern = "sqlite-" + getVersion();<NEW_LINE><NEW_LINE>public boolean accept(... | nativeLibFile.getAbsolutePath() + ".lck"); |
1,636,080 | private void outholder(XmlAppendable out, MetaData md, FilterHolder holder) throws IOException {<NEW_LINE>if (LOG.isDebugEnabled())<NEW_LINE>out.openTag("filter", Collections.singletonMap("source", holder.getSource().toString()));<NEW_LINE>else<NEW_LINE>out.openTag("filter");<NEW_LINE>String n = holder.getName();<NEW_L... | isAsyncSupported() ? "true" : "false"); |
373,225 | private void provider(Clinician provider, String orgId) throws IOException {<NEW_LINE>// Id,ORGANIZATION,NAME,GENDER,SPECIALITY,ADDRESS,CITY,STATE,ZIP,UTILIZATION<NEW_LINE>StringBuilder s = new StringBuilder();<NEW_LINE>s.append(provider.getResourceID()).append(',');<NEW_LINE>s.append(orgId).append(',');<NEW_LINE>for (... | s.toString(), providers); |
588,081 | public static ProcessedAndroidData processBinaryDataFrom(AndroidDataContext dataContext, RuleErrorConsumer errorConsumer, StampedAndroidManifest manifest, boolean conditionalKeepRules, Map<String, String> manifestValues, AndroidResources resources, AndroidAssets assets, ResourceDependencies resourceDeps, AssetDependenc... | dataBindingContext.supplyLayoutInfo(builder::setDataBindingInfoZip); |
837,427 | public static Rectangle toBoundingBox(final String geohash) {<NEW_LINE>// bottom left is the coordinate<NEW_LINE>Point bottomLeft = toPoint(geohash);<NEW_LINE>int len = Math.min(12, geohash.length());<NEW_LINE>long ghLong = longEncode(geohash, len);<NEW_LINE>// shift away the level<NEW_LINE>ghLong >>>= 4;<NEW_LINE>// d... | + 1)) << 4 | len; |
1,646,787 | final DeleteAutoScalingGroupResult executeDeleteAutoScalingGroup(DeleteAutoScalingGroupRequest deleteAutoScalingGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteAutoScalingGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | invoke(request, responseHandler, executionContext); |
166,811 | private static boolean mayBeGlobalAlias(Ref alias) {<NEW_LINE>// Note: alias.scope is the closest scope in which the aliasing assignment occurred.<NEW_LINE>// So for "if (true) { var alias = aliasedVar; }", the alias.scope would be the IF block<NEW_LINE>// scope.<NEW_LINE>if (alias.scope.isGlobal()) {<NEW_LINE>return t... | String aliasVarName = aliasLhsNode.getString(); |
274,305 | private void applyDashPatternIfNeeded(Matrix parentMatrix) {<NEW_LINE>L.beginSection("StrokeContent#applyDashPattern");<NEW_LINE>if (dashPatternAnimations.isEmpty()) {<NEW_LINE>L.endSection("StrokeContent#applyDashPattern");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>float scale = Utils.getScale(parentMatrix);<NEW_LINE>for (... | : dashPatternOffsetAnimation.getValue() * scale; |
1,664,033 | private void addDataSourceDetails() {<NEW_LINE>String dataSourceName = dataSourceNames.size() > 1 ? "" : dataSourceNames.iterator().next();<NEW_LINE>if (!dataSourceName.isEmpty()) {<NEW_LINE>javax.swing.JLabel dataSourceDetailsLabel = new javax.swing.JLabel();<NEW_LINE>org.openide.awt.Mnemonics.setLocalizedText(dataSou... | dataSourceNameLabel, Bundle.OccurrencePanel_dataSourceNameLabel_text()); |
1,701,579 | private void encodeColumn(FacesContext context, int columns, ResponseWriter writer, String[] columnClasses, UIComponent child, int colMod) throws IOException {<NEW_LINE>String columnClass = (colMod < columnClasses.length) ? PanelGrid.CELL_CLASS + " " + columnClasses[colMod].trim() : PanelGrid.CELL_CLASS;<NEW_LINE>if (!... | .getClientId(context), null); |
1,845,799 | public void start() {<NEW_LINE>registerMetrics();<NEW_LINE>_srcKafkaTopicObserver.start();<NEW_LINE>_destKafkaTopicObserver.start();<NEW_LINE><MASK><NEW_LINE>maybeCreateZkPath(_blacklistedTopicsZPath);<NEW_LINE>// Report current status every one minutes.<NEW_LINE>LOGGER.info("Trying to schedule auto topic whitelisting ... | LOGGER.info("Creating zkpath={} for blacklisted topics", _blacklistedTopicsZPath); |
217,590 | public MegaOffline findbyPathAndName(String path, String name) {<NEW_LINE>String selectQuery = "SELECT * FROM " + TABLE_OFFLINE + " WHERE " + KEY_OFF_PATH + " = '" + encrypt(path) + "'" + "AND " + KEY_OFF_NAME + " = '" + encrypt(name) + "'";<NEW_LINE>MegaOffline mOffline = null;<NEW_LINE>try (Cursor cursor = db.rawQuer... | while (cursor.moveToNext()); |
1,279,727 | public void applyInline(double[] data, int off, int len) {<NEW_LINE>assert off == 0;<NEW_LINE>assert len == data.length;<NEW_LINE>// Compute LPC coefficients and residual<NEW_LINE>LpCoeffs coeffs = <MASK><NEW_LINE>// double gain = coeffs.getGain();<NEW_LINE>double[] residual = ArrayUtils.subarray(new FIRFilter(coeffs.g... | LpcAnalyser.calcLPC(data, p); |
603,906 | public void exitExtended_access_list_tail(Extended_access_list_tailContext ctx) {<NEW_LINE>LineAction action = toLineAction(ctx.ala);<NEW_LINE>AccessListAddressSpecifier srcAddressSpecifier = toAccessListAddressSpecifier(ctx.srcipr);<NEW_LINE>AccessListAddressSpecifier dstAddressSpecifier = toAccessListAddressSpecifier... | num) : _currentIpv4Acl.getNextSeq(); |
138,678 | private void initInfo(int record_id, String value) {<NEW_LINE>if (!(record_id == 0) && value != null && value.length() > 0) {<NEW_LINE>log.severe("Received both a record_id and a value: " + record_id + " - " + value);<NEW_LINE>}<NEW_LINE>// Set values<NEW_LINE>if (// A record is defined<NEW_LINE>!(record_id == 0)) {<NE... | p_WindowNo, p_TabNo, "C_Payment_ID", true); |
370,753 | private Node createHistoryView(History history) {<NEW_LINE>byte[] data = history.peek();<NEW_LINE>boolean isClass = ClassUtil.isClass(data);<NEW_LINE>String type = isClass ? "class" : "file";<NEW_LINE>BorderPane pane = new BorderPane();<NEW_LINE>// Content<NEW_LINE>int count = history.size() - 1;<NEW_LINE>String sub = ... | .sha256Hex(data)))); |
346,103 | public static void main(String[] args) throws IOException {<NEW_LINE>List<PainlessContextInfo> contexts = ContextGeneratorCommon.getContextInfos();<NEW_LINE>Path rootDir = resetRootDir();<NEW_LINE>ContextGeneratorCommon.PainlessInfos infos;<NEW_LINE>JavaClassFilesystemResolver jdksrc = getJdkSrc();<NEW_LINE>if (jdksrc ... | builder = XContentFactory.jsonBuilder(jsonStream); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.