idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
442,007 | private void enterRoom() {<NEW_LINE>mTRTCCloud = TRTCCloud.sharedInstance(getApplicationContext());<NEW_LINE>mTRTCCloud.setListener(new TRTCCloudImplListener(ScreenAnchorActivity.this));<NEW_LINE>final TRTCCloudDef.TRTCParams screenParams = new TRTCCloudDef.TRTCParams();<NEW_LINE>screenParams.sdkAppId = GenerateTestUse... | roomId = Integer.parseInt(mRoomId); |
512,835 | public static void convert(GrayU16 input, GrayF64 output) {<NEW_LINE>if (input.isSubimage() || output.isSubimage()) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, input.height, y -> {<NEW_LINE>for (int y = 0; y < input.height; y++) {<NEW_LINE>int indexSrc = input.getIndex(0, y);<NEW_LINE>int indexDst = outpu... | data[indexSrc++] & 0xFFFF); |
1,668,823 | private void validateUserForAssetUpdate(String userId, EntityDetail originalAssetEntity, InstanceProperties updatedAssetProperties, InstanceStatus newInstanceStatus, String methodName) throws UserNotAuthorizedException {<NEW_LINE>Asset originalAsset = this.getAssetBeanFromEntity(originalAssetEntity, methodName);<NEW_LI... | setUpdatedBy(originalAssetEntity.getUpdatedBy()); |
1,685,636 | private Object initItem(Class clazz, String[] fieldDef, int startIndex) throws Exception {<NEW_LINE>HashMap<String, Field> cache = mFieldCache.get(clazz);<NEW_LINE>if (cache == null) {<NEW_LINE>cache = new HashMap<>();<NEW_LINE>Class c = clazz;<NEW_LINE>while (c != null) {<NEW_LINE>for (Field f : c.getDeclaredFields())... | unflattenFromString(fieldData[1])); |
1,613,180 | private boolean modifyLanguage(DomainFile df, DBHandle dbh) throws IOException, ImproperUseException {<NEW_LINE>// TODO: Check for address map and overlay entries which could break from<NEW_LINE>// changing the memory model !!<NEW_LINE>Table table = dbh.getTable(TABLE_NAME);<NEW_LINE>if (table == null) {<NEW_LINE>Msg.s... | ), null, "Script Error", "Old program file! Language fix is not appropriate."); |
226,795 | protected void paintCell(final Graphics2D g2d, final C c, final Rectangle rect, final int columnIndex, final TableColumn column, final TableColumn draggedColumn, final TableColumnModel columnModel) {<NEW_LINE>// Table reference<NEW_LINE>final JTable table = c.getTable();<NEW_LINE>// Complex check for the cases when tra... | = (JComponent) getHeaderRenderer(columnIndex); |
949,186 | static byte[] convert1bppTo8bpp(byte[] data) {<NEW_LINE>final byte[] result = new <MASK><NEW_LINE>for (int i = 0; i < data.length; i++) {<NEW_LINE>result[(i * 8) + 0] = (byte) ((data[i] >> 7) & 0x01);<NEW_LINE>result[(i * 8) + 1] = (byte) ((data[i] >> 6) & 0x01);<NEW_LINE>result[(i * 8) + 2] = (byte) ((data[i] >> 5) & ... | byte[data.length * 8]; |
1,363,495 | private float minScale() {<NEW_LINE>int viewHeight = getHeightInternal() - getPaddingBottom() + getPaddingTop();<NEW_LINE>int viewWidth = getWidthInternal() <MASK><NEW_LINE>switch(minimumScaleType) {<NEW_LINE>case ScaleType.CENTER_CROP:<NEW_LINE>case ScaleType.START:<NEW_LINE>return Math.max(viewWidth / (float) sWidth(... | - getPaddingLeft() + getPaddingRight(); |
90,224 | public void start() {<NEW_LINE>if (current != null) {<NEW_LINE>current.show();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String imageURL = "https://upload.wikimedia.org/wikipedia/commons/f/f5/Steve_Jobs_Headshot_2010-CROP2.jpg";<NEW_LINE>Form hi = new Form("Hi World", new BorderLayout());<NEW_LINE>ImageViewer viewer = new I... | 300, -1, 0x0)); |
98,215 | public boolean write(OutputStream outputStream, ProgressReporter progressReporter) throws SerializerException {<NEW_LINE>if (this.emfJsonSerializer == null) {<NEW_LINE>this.emfJsonSerializer = new EmfJsonSerializer(outputStream, includeHidden, SERIALIZE_EMPTY_LISTS);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (mode == Mode.... | this.emfJsonSerializer.print("{"); |
1,268,373 | public void tryUOWManagerLookup(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>final UOWManager uowm = (UOWManager) new <MASK><NEW_LINE>if (!(uowm instanceof UOWManager)) {<NEW_LINE>throw new Exception("Lookup of java:comp/websphere/UOWManager failed");<NEW_LINE>}<NEW_LINE>final l... | InitialContext().lookup("java:comp/websphere/UOWManager"); |
338,247 | public void updateCronTrigger(String schedulerObjectName, String triggerName, String groupName, int misfireInstruction, String cronExpression, String timeZone) throws Exception {<NEW_LINE>if (schedulerObjectName == null) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>ObjectName on = ObjectName.getInstance(schedulerObjectName);<... | throw new IllegalArgumentException("Cannot find quartz scheduler with ObjectName: " + schedulerObjectName); |
371,645 | public static GetStackResponse unmarshall(GetStackResponse getStackResponse, UnmarshallerContext _ctx) {<NEW_LINE>getStackResponse.setRequestId(_ctx.stringValue("GetStackResponse.RequestId"));<NEW_LINE>List<StackInfoItem> stackInfo = new ArrayList<StackInfoItem>();<NEW_LINE>for (int i = 0; i < _ctx.lengthValue("GetStac... | ("GetStackResponse.StackInfo[" + i + "].ExtInfo.Info")); |
452,720 | public void onCreate() {<NEW_LINE>super.onCreate();<NEW_LINE>setting = OldMainActivity.Setting;<NEW_LINE>layout_functionbar = OldMainActivity.CURRENT_ACTIVITY.get().findViewById(R.id.layout_functions);<NEW_LINE>buttonUser = layout_functionbar.findViewById(R.id.main_button_user);<NEW_LINE>buttonPlugin = layout_functionb... | findViewById(R.id.functionbar_username); |
1,234,383 | final CreatePolicyResult executeCreatePolicy(CreatePolicyRequest createPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | endClientExecution(awsRequestMetrics, request, response); |
1,785,724 | public RowsMatch matches(StatisticsProvider<C> evaluator) {<NEW_LINE>ColumnStatistics<C> leftStat = (ColumnStatistics<C>) left.accept(evaluator, null);<NEW_LINE>if (IsPredicate.isNullOrEmpty(leftStat)) {<NEW_LINE>return RowsMatch.SOME;<NEW_LINE>}<NEW_LINE>ColumnStatistics<C> rightStat = (ColumnStatistics<C>) right.acce... | >) rightStat, leftScale - rightScale); |
132,543 | private void registerInner(@Nullable final Object bus) {<NEW_LINE>if (bus == null)<NEW_LINE>return;<NEW_LINE>Class<?> aClass = bus.getClass();<NEW_LINE>String className = aClass.getName();<NEW_LINE>boolean isNeedRecordTags = false;<NEW_LINE>synchronized (mClassName_BusesMap) {<NEW_LINE>Set<Object> buses = mClassName_Bu... | buses = new CopyOnWriteArraySet<>(); |
1,188,508 | static /* package */<NEW_LINE>String loadFromKeyValueCache(final String key, final long maxAgeMilliseconds) {<NEW_LINE>synchronized (MUTEX_IO) {<NEW_LINE>File file = getKeyValueCacheFile(key);<NEW_LINE>if (file == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Date now = new Date();<NEW_LINE>long oldestAcceptableAge... | int) f.length()]; |
137,348 | private void updateFailedShardsCache(final ClusterState state) {<NEW_LINE>RoutingNode localRoutingNode = state.getRoutingNodes().node(state.nodes().getLocalNodeId());<NEW_LINE>if (localRoutingNode == null) {<NEW_LINE>failedShardsCache.clear();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>DiscoveryNode masterNode = state<MASK><... | .nodes().getMasterNode(); |
944,173 | public void onCreate() {<NEW_LINE>super.onCreate();<NEW_LINE>this.layout_log = OldMainActivity.CURRENT_ACTIVITY.get().findViewById(R.id.layout_log);<NEW_LINE>this.scrollView = new ScrollView(mContext);<NEW_LINE>this.scrollView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.Lay... | .getPxFromSp(mContext, 3)); |
83,914 | public void mousePressed(MouseEvent e) {<NEW_LINE>ZonePoint zp = getPoint(e);<NEW_LINE>if (SwingUtilities.isLeftMouseButton(e)) {<NEW_LINE>if (rectangle == null) {<NEW_LINE>originPoint = zp;<NEW_LINE>rectangle = createRect(originPoint, originPoint);<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>if (rectangle.width == 0 ||... | rectangle = createRect(originPoint, zp); |
503,257 | public void initialise() throws Exception {<NEW_LINE>setLayout(new BorderLayout());<NEW_LINE>ExplanationPreferencesPanelPluginLoader loader = new ExplanationPreferencesPanelPluginLoader(getEditorKit());<NEW_LINE>Set<PreferencesPanelPlugin> plugins = new TreeSet<>((o1, o2) -> {<NEW_LINE>String s1 = o1.getLabel();<NEW_LI... | PreferencesPanel panel = plugin.newInstance(); |
788,678 | private void fillAddressValues(String streetAddress, String extendedStreetAddress, String postalCodeAddress, String localityAddress, String poBoxAddress, String regionAddress, String countryAddress) {<NEW_LINE>mAddressStreetView.setText(streetAddress);<NEW_LINE>mAddressExtendedStreetView.setText(extendedStreetAddress);... | ) && TextUtils.isEmpty(countryAddress); |
567,211 | private boolean doSubscribe(BackOffExecution backOffExecution) {<NEW_LINE>CompletableFuture<MASK><NEW_LINE>CompletableFuture<Void> containerUnsubscribeFuture = this.unsubscribeFuture;<NEW_LINE>State state = this.state.get();<NEW_LINE>// someone has called stop while we were in here.<NEW_LINE>if (!state.isPrepareListeni... | <Void> containerListenFuture = this.listenFuture; |
460,394 | private void updateDownloadNotification(String url, int totalBytes, int currentBytes) {<NEW_LINE>Context context = RhodesActivity.getContext();<NEW_LINE>RemoteViews expandedView = new RemoteViews(context.getPackageName(), R.layout.status_bar_ongoing_event_progress_bar);<NEW_LINE>StringBuilder newUrl = new StringBuilder... | , 0, intent, 0)); |
21,584 | private void createAvoidRoadsFilesItems() {<NEW_LINE>List<File> avoidRoadsFiles = avoidRoadsHelper.collectAvoidRoadsFiles();<NEW_LINE>if (!Algorithms.isEmpty(avoidRoadsFiles)) {<NEW_LINE>items.add(new SubtitleDividerItem(app));<NEW_LINE>items.add(new TitleItem(getString(R.string.files_with_route_restrictions)));<NEW_LI... | getInflater(getContext(), nightMode); |
1,060,357 | public int largestRectangleArea(int[] heights) {<NEW_LINE>int res = 0, n = heights.length;<NEW_LINE>Deque<Integer> stk = new ArrayDeque<>();<NEW_LINE>int[] left = new int[n];<NEW_LINE>int[] right = new int[n];<NEW_LINE>Arrays.fill(right, n);<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>while (!stk.isEmpty() && heigh... | stk.pop()] = i; |
1,465,491 | final UpdateResourceResult executeUpdateResource(UpdateResourceRequest updateResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | false), new UpdateResourceResultJsonUnmarshaller()); |
1,056,779 | // for Java 7, the type of elements of JComboBox needs to be specified to avoid the warning and it's not supported in Java 6<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>private void buildGUI() {<NEW_LINE>JPanel dirPanel = new JPanel();<NEW_LINE>dirPanel.setLayout(new BoxLayout(dirPanel, BoxLayout.X_AXIS));<NEW_LIN... | getContentPane().add(titledPanel); |
77,604 | private static void raw(CCEXTradeServiceRaw tradeService) throws IOException {<NEW_LINE>CurrencyPair pair = new CurrencyPair("DASH", "BTC");<NEW_LINE>LimitOrder limitOrder = new LimitOrder.Builder(OrderType.BID, pair).limitPrice(new BigDecimal("0.00001000")).originalAmount(new BigDecimal("100")).build();<NEW_LINE>try {... | println(tradeService.getCCEXOpenOrders()); |
509,261 | private static boolean verify(JReleaserContext context, Keyring keyring, FilePair filePair) throws SigningException {<NEW_LINE>context.getLogger().setPrefix("verify");<NEW_LINE>try {<NEW_LINE>context.getLogger().debug("{}", context.relativizeToBasedir(filePair.signatureFile));<NEW_LINE>InputStream sigInputStream = PGPU... | Object obj = pgpObjFactory.nextObject(); |
849,280 | public static ScenarioSetup initRestartProcessInstanceBatch() {<NEW_LINE>return new ScenarioSetup() {<NEW_LINE><NEW_LINE>public void execute(ProcessEngine engine, String scenarioName) {<NEW_LINE>List<String> <MASK><NEW_LINE>String processDefinitionId = null;<NEW_LINE>for (int i = 0; i < 10; i++) {<NEW_LINE>ProcessInsta... | processInstanceIds = new ArrayList<>(); |
1,819,436 | final SendActivationCodeResult executeSendActivationCode(SendActivationCodeRequest sendActivationCodeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(sendActivationCodeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetri... | (super.beforeMarshalling(sendActivationCodeRequest)); |
350,785 | public static ListCasesResponse unmarshall(ListCasesResponse listCasesResponse, UnmarshallerContext _ctx) {<NEW_LINE>listCasesResponse.setRequestId(_ctx.stringValue("ListCasesResponse.RequestId"));<NEW_LINE>listCasesResponse.setMessage(_ctx.stringValue("ListCasesResponse.Message"));<NEW_LINE>listCasesResponse.setHttpSt... | ("ListCasesResponse.Data.List[" + i + "].FailureReason")); |
1,528,766 | private static void tryAssertion18(RegressionEnvironment env, String stmtText, String outputLimit, AtomicInteger milestone) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>env.compileDeploy(stmtText).addListener("s0");<NEW_LINE>String[] fields = new String[] { "symbol", "sum(price)" };<NEW_LINE>ResultAssertTestResult expected =... | , { "YAH", 87d } }); |
1,493,474 | public CreateAppResult createApp(CreateAppRequest createAppRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createAppRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMet... | CreateAppRequestMarshaller().marshall(createAppRequest); |
1,394,881 | public ApiResponse handleApiView(String name, JSONObject params) throws ApiException {<NEW_LINE>if (VIEW_PARAMS.equals(name)) {<NEW_LINE>ApiResponseList result = new ApiResponseList("Parameters");<NEW_LINE>if (params.containsKey(VIEW_PARAMS_PARAM_SITE)) {<NEW_LINE>String paramSite = params.getString(VIEW_PARAMS_PARAM_S... | site = ApiUtils.getAuthority(paramSite); |
1,311,077 | protected void init() {<NEW_LINE>myErrorText = new ErrorText(getErrorTextAlignment());<NEW_LINE>myErrorText.setVisible(false);<NEW_LINE>final ComponentAdapter resizeListener = new ComponentAdapter() {<NEW_LINE><NEW_LINE>private int myHeight;<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void componentResized(ComponentEv... | width, myActualSize.height + height); |
34,645 | public void validateStatement(String contextName, StatementSpecCompiled spec, StatementCompileTimeServices compileTimeServices) throws ExprValidationException {<NEW_LINE>StatementSpecCompiledAnalyzerResult <MASK><NEW_LINE>List<FilterSpecCompiled> filters = streamAnalysis.getFilters();<NEW_LINE>// Category validation<NE... | streamAnalysis = StatementSpecCompiledAnalyzer.analyzeFilters(spec); |
211,739 | private void loadNode37() throws IOException, SAXException {<NEW_LINE>DataTypeDescriptionTypeNode node = new DataTypeDescriptionTypeNode(this.context, Identifiers.OpcUa_XmlSchema_BuildInfo, new QualifiedName(0, "BuildInfo"), new LocalizedText("en", "BuildInfo"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.v... | DataValue(new Variant(o)); |
343,291 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>MageObject mageObject = game.getObject(source);<NEW_LINE>if (controller == null || mageObject == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Permanent faceDownCreature = game.getPerma... | getName(), cards, game); |
792,888 | public void doXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject(NAME);<NEW_LINE>builder.field(<MASK><NEW_LINE>builder.startArray(FIELDS_FIELD.getPreferredName());<NEW_LINE>for (Map.Entry<String, Float> fieldEntry : this.fieldsAndBoosts.entrySet()) {<NEW_LINE>builder.valu... | QUERY_FIELD.getPreferredName(), value); |
648,620 | public void startElement(String tag, Map<String, String> h) {<NEW_LINE>switch(tag) {<NEW_LINE>case "hyphen-char":<NEW_LINE>String hh = h.get("value");<NEW_LINE>if (hh != null && hh.length() == 1) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>break;<NEW_LINE>case "classes":<NEW_LINE>currElement = ELEM_CLASSES;<NEW_LINE>break;<N... | hyphenChar = hh.charAt(0); |
224,130 | protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>String resourceName = ServletRequestUtils.getStringParameter(request, "resource", null);<NEW_LINE>String <MASK><NEW_LINE>String redirectUrl;<NEW_LINE>if (refere... | referer = request.getHeader("Referer"); |
757,042 | default URI absoluteUri() {<NEW_LINE>try {<NEW_LINE>// Use raw string representation and URL to avoid re-encoding chars like '%'<NEW_LINE>URI partialUri = new URL(isSecure() ? "https" : "http", localAddress(), localPort(), path().absolute().toRawString()).toURI();<NEW_LINE>StringBuilder sb = new StringBuilder(partialUr... | ).append(query()); |
620,200 | public Result processWorkPackage(@NonNull final I_C_Queue_WorkPackage workpackage, final String localTrxName) {<NEW_LINE>trxManager.assertTrxNameNull(localTrxName);<NEW_LINE>final Properties ctx = InterfaceWrapperHelper.getCtx(workpackage);<NEW_LINE>final int adClientId = workpackage.getAD_Client_ID();<NEW_LINE>Check.a... | Loggables.addLog("Scheduled another workpackage for {} remaining recompute records", countRemaining); |
31,009 | public SelectResourceConfigResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SelectResourceConfigResult selectResourceConfigResult = new SelectResourceConfigResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | JsonToken token = context.getCurrentToken(); |
1,448,383 | private void convertGroupsToInternalRep(List<LDAPObject> ldapGroups, Map<String, LDAPObject> ldapGroupsMap, List<GroupTreeResolver.Group> ldapGroupsRep) {<NEW_LINE>String groupsRdnAttr = config.getGroupNameLdapAttribute();<NEW_LINE>for (LDAPObject ldapGroup : ldapGroups) {<NEW_LINE>String groupName = ldapGroup.getAttri... | .Group(groupName, subgroupNames)); |
1,299,131 | static RemoteMessage remoteMessageFromReadableMap(ReadableMap readableMap) {<NEW_LINE>RemoteMessage.Builder builder = new RemoteMessage.Builder(readableMap.getString(KEY_TO));<NEW_LINE>if (readableMap.hasKey(KEY_TTL)) {<NEW_LINE>builder.setTtl(readableMap.getInt(KEY_TTL));<NEW_LINE>}<NEW_LINE>if (readableMap.hasKey(KEY... | messageData = readableMap.getMap(KEY_DATA); |
883,660 | public J.Identifier visitIdentifier(J.Identifier identifier, ExecutionContext ctx) {<NEW_LINE>J.Identifier i = super.visitIdentifier(identifier, ctx);<NEW_LINE>i = i.withMarkers(i.getMarkers().removeByType(LastRead.class));<NEW_LINE>Map<String, UUID> variableIds = getCursor().getNearestMessage("variables");<NEW_LINE>if... | get(identifier.getSimpleName()); |
208,624 | private void createProtocolFinder(PortUnification pu) throws PropertyVetoException {<NEW_LINE>while (!(parser.getEventType() == END_ELEMENT && parser.getLocalName().equals("port-unification"))) {<NEW_LINE>try {<NEW_LINE>if (parser.next() == START_ELEMENT && parser.getLocalName().equals("protocol-finder") && pu != null)... | pu.createChild(ProtocolFinder.class); |
1,605,387 | public static String format(double number, int width) {<NEW_LINE>Preconditions.checkArgument(number >= 0, "Non-negative numbers cannot be formatted by this method");<NEW_LINE>var integerDigits = (int) Math.max(0, Math.log10(number) + 1);<NEW_LINE>var fractionalDigits = width - integerDigits - 1;<NEW_LINE>var minFractio... | ((long) number, width); |
524,743 | public static void writeTsFile(String path) {<NEW_LINE>try {<NEW_LINE>File f = FSFactoryProducer.getFSFactory().getFile(path);<NEW_LINE>Files.delete(f.toPath());<NEW_LINE>Schema schema = new Schema();<NEW_LINE>schema.extendTemplate(DEFAULT_TEMPLATE, new MeasurementSchema("sensor_1", TSDataType.FLOAT, TSEncoding.RLE));<... | .INT32, TSEncoding.TS_2DIFF)); |
577,181 | private boolean arePrefsChanged(String mimeType) {<NEW_LINE>boolean isChanged = false;<NEW_LINE>Preferences prefs = selector.getPreferences(mimeType);<NEW_LINE>Preferences savedPrefs = MimeLookup.getLookup(mimeType).lookup(Preferences.class);<NEW_LINE>HashSet<String> hashSet = new HashSet<String>();<NEW_LINE>try {<NEW_... | savedPrefs.get(key, null); |
1,102,588 | public Future<ResultString> deployDirectory() {<NEW_LINE>JFileChooser chooser = new JFileChooser();<NEW_LINE>chooser.setDialogTitle(NbBundle.getMessage(Hk2ItemNode.class, "LBL_ChooseButton"));<NEW_LINE>chooser.setDialogType(JFileChooser.CUSTOM_DIALOG);<NEW_LINE>chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY... | (Hk2ItemNode.class, "LBL_ChooseButton")); |
868,677 | public static URI parseURI(String connectionString, URI defaultURI) {<NEW_LINE>final URI uri = parseMaybeWithScheme(connectionString, <MASK><NEW_LINE>// Repack the connection string with provided default elements - where missing from the original string - and reparse into a URI.<NEW_LINE>final String scheme = uri.getSc... | defaultURI.getScheme() + "://"); |
1,559,067 | private List<HintDeclaration> computeExcerptProjectionHints(TypeSystem typeSystem) {<NEW_LINE>TypeHintCreatingProcessor excerptProjectionProcessor = TypeProcessor.namedProcessor("RestMvcConfigurationProcessor - ExcerptProjection").<MASK><NEW_LINE>return typeSystem.findTypesAnnotated(REPOSITORY_REST_RESOURCE, true).stre... | skipFieldInspection().use(typeSystem); |
1,623,663 | public Map<Map.Entry<Client, PaxosValue>, PaxosResponse> apply(Set<Map.Entry<Client, PaxosValue>> request) {<NEW_LINE>SetMultimap<Client, PaxosValue> requestAsMultimap = ImmutableSetMultimap.copyOf(request);<NEW_LINE>for (WithDedicatedExecutor<BatchPaxosLearner> remoteLearner : remoteLearners) {<NEW_LINE>try {<NEW_LINE... | service().learn(requestAsMultimap); |
1,385,821 | public WxOutMsg eventClick(WxInMsg msg) {<NEW_LINE>String eventKey = msg.getEventKey();<NEW_LINE>log.debug("eventKey: " + eventKey);<NEW_LINE>log.debug("extKey: " + msg.getExtkey());<NEW_LINE>Wx_reply reply = wxReplyService.fetch(Cnd.where("type", "=", "keyword").and("wxid", "=", msg.getExtkey()).and("keyword", "=", ev... | .getContent()), ","); |
1,835,247 | public IStatus runInWorkspace(IProgressMonitor monitor) {<NEW_LINE>IStatus status = Status.OK_STATUS;<NEW_LINE>SubMonitor subMonitor = SubMonitor.convert(monitor, addedRootPaths.size() + removedRootPaths.size());<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>IProject[] projects = getWorkspaceRoot().getProjects();<NEW_LINE>fo... | long start = System.currentTimeMillis(); |
725,520 | @ApiOperation("Removes a token for a user")<NEW_LINE>@AuditEvent(type = AuditEventTypes.USER_ACCESS_TOKEN_DELETE)<NEW_LINE>public void revokeToken(@ApiParam(name = "userId", required = true) @PathParam("userId") String userId, @ApiParam(name = "idOrToken", required = true) @PathParam("idOrToken") String idOrToken) {<NE... | (accessTokenService.load(idOrToken)); |
1,657,720 | public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {<NEW_LINE>super.onViewCreated(view, savedInstanceState);<NEW_LINE>callback = (DiaryViewerCallback) getTargetFragment();<NEW_LINE>diaryId = getArguments()<MASK><NEW_LINE>// Init the object<NEW_LINE>if (diaryId != -1) {<NEW_LINE>if (isEditMode) {<... | .getLong("diaryId", -1L); |
93,012 | final GlobalSignOutResult executeGlobalSignOut(GlobalSignOutRequest globalSignOutRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(globalSignOutRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "GlobalSignOut"); |
88,955 | public RetMessage syncBatchDeleteShards(@PathVariable String clusterName, @RequestBody List<String> shardNames) {<NEW_LINE>logger.info("[deleteShard] Delete Shards {} - {}", clusterName, shardNames);<NEW_LINE>try {<NEW_LINE>ClusterTbl clusterTbl = clusterService.find(clusterName);<NEW_LINE>if (clusterTbl == null) {<NEW... | shardService.deleteShards(clusterTbl, shardNames); |
1,364,224 | public void onReceive(Context context, Intent intent) {<NEW_LINE>String action = intent.getAction();<NEW_LINE>Log.d(TAG, "intent: " + intent);<NEW_LINE>if (Intent.ACTION_POWER_CONNECTED.equals(action)) {<NEW_LINE>Intent cmd <MASK><NEW_LINE>cmd.setClass(context, UploadService.class);<NEW_LINE>context.startService(cmd);<... | = new Intent(UploadService.INTENT_POWER_CONNECTED); |
654,299 | public boolean schemaExists(Client voltClient) {<NEW_LINE>final String testString = "Test";<NEW_LINE>boolean schemaExists = false;<NEW_LINE>try {<NEW_LINE>ClientResponse response = voltClient.callProcedure("Get", testString.getBytes(UTF8), testString);<NEW_LINE>if (response.getStatus() == ClientResponse.SUCCESS) {<NEW_... | logger.error("Got unexpected Exception while calling schemaExists()", pce); |
633,159 | public static void fmlInit() {<NEW_LINE>CustomRotationHelper.INSTANCE.registerHandlerForAll(BlockButton.class, VanillaRotationHandlers::rotateButton);<NEW_LINE>CustomRotationHelper.INSTANCE.registerHandlerForAll(BlockTripWireHook.class, VanillaRotationHandlers::rotateTripWireHook);<NEW_LINE>CustomRotationHelper.INSTANC... | BlockTrapDoor.class, VanillaRotationHandlers::rotateTrapDoor); |
1,816,522 | private static List<SpecModelValidationError> validateReturnType(SpecMethodModel<DelegateMethod, Void> delegateMethod, Class<? extends Annotation> delegateMethodAnnotation, DelegateMethodDescription delegateMethodDescription) {<NEW_LINE>final List<SpecModelValidationError> <MASK><NEW_LINE>// When using Kotlin, we get i... | validationErrors = new ArrayList<>(); |
515,649 | public static Map<String, Object> evaluateParameterDefaultValues(JasperReportsContext jasperReportsContext, JasperReport report, Map<String, Object> initialParameters) throws JRException {<NEW_LINE>Map<String, Object> valuesMap = initialParameters == null ? new HashMap<>() : new HashMap<>(initialParameters);<NEW_LINE>v... | parameterValues = new HashMap<>(); |
1,084,940 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null || !controller.chooseUse(Outcome.PutCreatureInPlay, "Put an Angel, Demon, or Dragon creature card from your hand onto the battlefield tapped and attacking?", source, g... | TargetCardInHand target = new TargetCardInHand(filter); |
1,655,176 | private void initView() {<NEW_LINE>mNetworkList = findViewById(R.id.network_list);<NEW_LINE>LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());<NEW_LINE>mNetworkList.setLayoutManager(layoutManager);<NEW_LINE>mNetworkListAdapter = new NetworkListAdapter(getContext());<NEW_LINE>mNetworkList.setAdap... | bundle.putSerializable(KEY_RECORD, record); |
681,939 | public CompletableSource.Subscriber wrapCompletableSubscriberAndCancellable(final CompletableSource.Subscriber subscriber, final ContextMap context) {<NEW_LINE>if (subscriber instanceof ContextPreservingCompletableSubscriber) {<NEW_LINE><MASK><NEW_LINE>if (s.saved == context) {<NEW_LINE>return subscriber instanceof Con... | final ContextPreservingCompletableSubscriber s = (ContextPreservingCompletableSubscriber) subscriber; |
568,542 | private Case createCaseWithDataSources(String workingDirectory, String caseOutputPath, String caseName, CaseType caseType, List<String> dataSourcePaths) throws CaseActionException, NoCurrentCaseException, IllegalStateException, IllegalArgumentException {<NEW_LINE>Case openCase = null;<NEW_LINE>String uniqueCaseName = S... | caseName, TimeStampUtils.createTimeStamp()); |
1,806,628 | public void onResume() {<NEW_LINE>super.onResume();<NEW_LINE>tileFileSystemMaxQueueSize.setText(Configuration.getInstance().getTileFileSystemMaxQueueSize() + "");<NEW_LINE>tileFileSystemThreads.setText(Configuration.getInstance().getTileFileSystemThreads() + "");<NEW_LINE>tileDownloadMaxQueueSize.setText(Configuration.... | ).getTileDownloadMaxQueueSize() + ""); |
740,411 | final CreatePlacementResult executeCreatePlacement(CreatePlacementRequest createPlacementRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createPlacementRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | false), new CreatePlacementResultJsonUnmarshaller()); |
1,083,469 | private int addStructuredMap(JsonParser parser, FlatRecordWriter flatRecordWriter, String mapTypeName, HollowMapWriteRecord mapRec) throws IOException {<NEW_LINE>JsonToken token = parser.nextToken();<NEW_LINE>mapRec.reset();<NEW_LINE>HollowMapSchema schema = (HollowMapSchema) hollowSchemas.get(mapTypeName);<NEW_LINE>wh... | token, schema.getKeyType()); |
703,491 | public BatchGetRecordResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchGetRecordResult batchGetRecordResult = new BatchGetRecordResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>Jso... | int originalDepth = context.getCurrentDepth(); |
405,471 | final DescribePortfolioResult executeDescribePortfolio(DescribePortfolioRequest describePortfolioRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describePortfolioRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.st... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
440,165 | public void initLineMask(LineData[] lines) {<NEW_LINE>if (myLineMask == null) {<NEW_LINE>myLineMask = new int[myLinesArray != null ? Math.max(lines.length, myLinesArray.length) : lines.length];<NEW_LINE>Arrays.fill(myLineMask, 0);<NEW_LINE>if (myLinesArray != null) {<NEW_LINE>for (int i = 0; i < myLinesArray.length; i+... | lines[i].getHits(); |
751,080 | private Mono<Response<Void>> verifyDomainOwnershipWithResponseAsync(String resourceGroupName, String certificateOrderName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>return Mono.error(new IllegalArgumentE... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,121,504 | public void queue(@Nonnull final Runnable runnable, final boolean urgent, final boolean anyModality) {<NEW_LINE>synchronized (myLock) {<NEW_LINE>if (myAlarm.isDisposed())<NEW_LINE>return;<NEW_LINE>final boolean wasRaised = myRaised;<NEW_LINE>myRaised = true;<NEW_LINE>myIsEmpty = false;<NEW_LINE>if (!wasRaised) {<NEW_LI... | BackgroundTaskUtil.runUnderDisposeAwareIndicator(myAlarm, runnable); |
275,023 | public GetCellReadinessSummaryResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetCellReadinessSummaryResult getCellReadinessSummaryResult = new GetCellReadinessSummaryResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurren... | class).unmarshall(context)); |
1,258,053 | public Variable emitIntegerTestMove(Value leftVal, Value right, Value trueValue, Value falseValue) {<NEW_LINE>Logger.traceBuildLIR(Logger.BACKEND.SPIRV, "emitIntegerTestMove: " + leftVal + " " + "&" + right + " ? " + trueValue + " : " + falseValue);<NEW_LINE>assert leftVal.getPlatformKind() == right.getPlatformKind() &... | getPlatformKind()).isInteger(); |
1,665,490 | public ListFacesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListFacesResult listFacesResult = new ListFacesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
1,461,389 | public void marshall(License license, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (license == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(license.getLicenseArn(), LICENSEARN_BINDING);<NEW_LINE>protocol... | license.getHomeRegion(), HOMEREGION_BINDING); |
108,753 | public void emitCode(PTXCompilationResultBuilder crb, PTXAssembler asm) {<NEW_LINE>if (rhs instanceof PTXLIROp) {<NEW_LINE>((PTXLIROp) rhs).emit(crb, asm, (Variable) lhs);<NEW_LINE>} else if (lhsKind.isVector() && rhsKind.isVector()) {<NEW_LINE>Variable rhsVar = (Variable) rhs;<NEW_LINE>Variable lhsVar = (Variable) lhs... | asm.emit(CONVERT + DOT); |
567,355 | public DescribeDatastoreResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeDatastoreResult describeDatastoreResult = new DescribeDatastoreResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | JsonToken token = context.getCurrentToken(); |
838,600 | private void generateRootMessageGroovyClass(StringBuilder sb) {<NEW_LINE>sb.append(String.format("\npublic class %s {", Message.class.getSimpleName()));<NEW_LINE>sb.append(String.format("\n%sMessageProperites props", whiteSpace(4)));<NEW_LINE>sb.append(String.format("\n%sdef headers = [:]", whiteSpace(4)));<NEW_LINE>sb... | "\n%sString serviceId = 'ApiMediator'", whiteSpace(4))); |
1,581,944 | public static void main(String[] args) {<NEW_LINE>if (args.length < 2) {<NEW_LINE>System.out.println("Please specify a bucket name and key name");<NEW_LINE>System.exit(1);<NEW_LINE>}<NEW_LINE>// snippet-start:[s3.java.getobjecttags.main]<NEW_LINE>String bucketName = args[0];<NEW_LINE>String keyName = args[1];<NEW_LINE>... | println(tag.getValue()); |
437,612 | public IndexMetaDataGenerations withAddedSnapshot(SnapshotId snapshotId, Map<IndexId, String> newLookup, Map<String, String> newIdentifiers) {<NEW_LINE>final Map<SnapshotId, Map<IndexId, String>> updatedIndexMetaLookup = new HashMap<>(this.lookup);<NEW_LINE>final Map<String, String> updatedIndexMetaIdentifiers = new Ha... | assert existing == null : "unexpected existing index generation mappings " + existing; |
1,615,557 | public void writeLayout(DataOutputStream dos) throws IOException {<NEW_LINE>dos.writeInt(LAYOUT_SIGNATURE);<NEW_LINE>dos.writeInt(LAYOUT_VERSION);<NEW_LINE>dos.writeInt(LAYOUT_KEYS);<NEW_LINE>dos.writeInt(keypad.length * 20 + 4);<NEW_LINE>dos.writeInt(keypad.length);<NEW_LINE>for (int i = 0; i < keypad.length; i++) {<N... | (snapOffsets[i].y); |
1,368,458 | static Future<RouterBuilder> create(Vertx vertx, String url, OpenAPILoaderOptions options) {<NEW_LINE>ContextInternal ctx = (ContextInternal) vertx.getOrCreateContext();<NEW_LINE>Promise<RouterBuilder> promise = ctx.promise();<NEW_LINE><MASK><NEW_LINE>OpenAPIHolderImpl loader = new OpenAPIHolderImpl(vertx, httpClient, ... | HttpClient httpClient = vertx.createHttpClient(); |
373,444 | private EPerson createEPersonFromRestObject(Context context, EPersonRest epersonRest) throws AuthorizeException {<NEW_LINE>EPerson eperson = null;<NEW_LINE>try {<NEW_LINE><MASK><NEW_LINE>// this should be probably moved to the converter (a merge method?)<NEW_LINE>eperson.setCanLogIn(epersonRest.isCanLogIn());<NEW_LINE>... | eperson = es.create(context); |
1,737,015 | public Object read(final InputStream is) {<NEW_LINE>final ART1 result = new ART1();<NEW_LINE>final EncogReadHelper in = new EncogReadHelper(is);<NEW_LINE>EncogFileSection section;<NEW_LINE>while ((section = in.readNextSection()) != null) {<NEW_LINE>if (section.getSectionName().equals("ART1") && section.getSubSectionNam... | (params, ART.PROPERTY_A1)); |
1,144,062 | public void onConfigurationChanged(Options options) {<NEW_LINE>if (topBar == null)<NEW_LINE>return;<NEW_LINE>Options withDefault = options.copy().withDefaultOptions(defaultOptions);<NEW_LINE>if (currentRightButtons != null && !currentRightButtons.isEmpty())<NEW_LINE>topBarController.applyRightButtons(currentRightButton... | .borderColor.get(DEFAULT_BORDER_COLOR)); |
1,709,569 | public BuildRule createBuildRule(BuildRuleCreationContextWithTargetGraph context, BuildTarget buildTarget, BuildRuleParams params, JavaAnnotationProcessorDescriptionArg args) {<NEW_LINE>if (!args.getProcessorClass().isPresent() && args.getProcessorClasses().isEmpty()) {<NEW_LINE>throw new HumanReadableException(String.... | getProjectFilesystem(), params, properties); |
41,839 | void remove(CompletableDisposable inner) {<NEW_LINE>for (; ; ) {<NEW_LINE>CompletableDisposable[] a = observers.get();<NEW_LINE>int n = a.length;<NEW_LINE>if (n == 0) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int j = -1;<NEW_LINE>for (int i = 0; i < n; i++) {<NEW_LINE>if (a[i] == inner) {<NEW_LINE>j = i;<NEW_LINE>break;<N... | j, n - j - 1); |
819,066 | protected void halt(final AbstractRunningQuery q) {<NEW_LINE>boolean interrupted = false;<NEW_LINE>lock.lock();<NEW_LINE>try {<NEW_LINE>// notify listener(s)<NEW_LINE>try {<NEW_LINE>fireEvent(q);<NEW_LINE>} catch (Throwable t) {<NEW_LINE>if (InnerCause.isInnerCause(t, InterruptedException.class)) {<NEW_LINE>// Defer im... | .currentThread().interrupt(); |
393,530 | public static void toJSON(OutputWriter jsonWriter, JobConfig jobConfig) {<NEW_LINE>if (!jobConfig.errors().isEmpty()) {<NEW_LINE>jsonWriter.addChild("errors", errorWriter -> {<NEW_LINE>HashMap<String, String> errorMapping = new HashMap<>();<NEW_LINE>errorMapping.put("runType", "run_instance_count");<NEW_LINE>new ErrorG... | , jobConfig.getTabs())); |
7,085 | public GetAdminAccountResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetAdminAccountResult getAdminAccountResult = new GetAdminAccountResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE... | int originalDepth = context.getCurrentDepth(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.