idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,253,475 | public boolean onCallApi(int page, @Nullable String parameter) {<NEW_LINE>if (page == 1) {<NEW_LINE>lastPage = Integer.MAX_VALUE;<NEW_LINE>sendToView(view -> view.<MASK><NEW_LINE>}<NEW_LINE>setCurrentPage(page);<NEW_LINE>if (page > lastPage || lastPage == 0 || parameter == null) {<NEW_LINE>sendToView(SearchUsersMvp.Vie... | getLoadMore().reset()); |
813,721 | public static void sanityCheckGoals(List<String> goals, boolean skipHardGoalCheck, KafkaCruiseControlConfig config) {<NEW_LINE>if (goals != null && !goals.isEmpty() && !skipHardGoalCheck && !(goals.size() == 1 && goals.get(0).equals(PreferredLeaderElectionGoal.class.getSimpleName()))) {<NEW_LINE>sanityCheckNonExistingG... | String> hardGoals = hardGoals(config); |
270,034 | private void installBackgroundImage() {<NEW_LINE>final String currentSpec = PropertiesComponent.getInstance().getValue(IdeBackgroundUtil.FRAME_PROP);<NEW_LINE>final String oldCurrentSpec = PropertiesComponent.getInstance().getValue("old.mt." + IdeBackgroundUtil.FRAME_PROP);<NEW_LINE>if (!MTConfig.getInstance().isUseMat... | throw new IllegalArgumentException("Can't load background: " + path); |
894,091 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] <MASK><NEW_LINE>String epl = "@Name('s0') select a.theString as c0, b.theString as c1 from pattern [a=SupportBean(intPrimitive=0) and b=SupportBean(intPrimitive=1)]";<NEW_LINE>env.compileDeploy(epl).addListener("s0");<NEW_LINE>env.milestone(0);<NEW_LINE>sen... | fields = "c0,c1".split(","); |
663,227 | protected Control createControl(Composite editPlaceholder) {<NEW_LINE><MASK><NEW_LINE>valueController.getEditPlaceholder();<NEW_LINE>boolean inline = valueController.getEditType() == IValueController.EditType.INLINE;<NEW_LINE>timeEditor = new CustomTimeEditor(editPlaceholder, SWT.MULTI, true, inline);<NEW_LINE>textMode... | Object value = valueController.getValue(); |
1,758,911 | /*<NEW_LINE>* For tenant update<NEW_LINE>*/<NEW_LINE>// TODO: should be /tenant/{tenantName}<NEW_LINE>@PUT<NEW_LINE>@Path("/tenants")<NEW_LINE>@Authenticate(AccessType.UPDATE)<NEW_LINE>@Consumes(MediaType.APPLICATION_JSON)<NEW_LINE>@Produces(MediaType.APPLICATION_JSON)<NEW_LINE>@ApiOperation(value = "Update a tenant")<... | addMeteredGlobalValue(ControllerMeter.CONTROLLER_TABLE_TENANT_UPDATE_ERROR, 1L); |
131,006 | public void turnSwitch(OnOffValue state) {<NEW_LINE>if (state == OnOffValue.UNDEF) {<NEW_LINE>logger.warn("got undef state, nothing to be done");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (getHouseCode() != null && getReceiverCode() != null) {<NEW_LINE>short switchTo = state == OnOffValue.ON ? BrickletRemoteSwitch.SWITCH... | ), getReceiverCode(), switchTo); |
798,696 | private void applyJavaConvention(Project project) {<NEW_LINE>JavaPluginExtension java = project.getExtensions().getByType(JavaPluginExtension.class);<NEW_LINE>java.setSourceCompatibility(JavaVersion.VERSION_1_8);<NEW_LINE>java.setTargetCompatibility(JavaVersion.VERSION_1_8);<NEW_LINE>project.getTasks().withType(JavaCom... | getOptions().getCompilerArgs()); |
1,733,204 | public static DescribeVsDomainPvUvDataResponse unmarshall(DescribeVsDomainPvUvDataResponse describeVsDomainPvUvDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeVsDomainPvUvDataResponse.setRequestId(_ctx.stringValue("DescribeVsDomainPvUvDataResponse.RequestId"));<NEW_LINE>describeVsDomainPvUvDataResponse.setDo... | ("DescribeVsDomainPvUvDataResponse.PvUvDataInfos[" + i + "].UV")); |
768,563 | public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {<NEW_LINE>if (!shortSyntax)<NEW_LINE>return super.visitField(access, name, desc, signature, value);<NEW_LINE>List<Attribute> attrs = new ArrayList<>();<NEW_LINE>return new FieldVisitor(Opcodes.ASM7) {<NEW_LINE><NEW_LIN... | annotations = new ArrayList<>(); |
1,511,226 | public ExcludedRule unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ExcludedRule excludedRule = new ExcludedRule();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE... | String currentParentElement = context.getCurrentParentElement(); |
129,741 | private ListenableFuture<TbAlarmResult> createNewAlarm(TbContext ctx, TbMsg msg, Alarm msgAlarm) {<NEW_LINE>ListenableFuture<JsonNode> asyncDetails;<NEW_LINE>boolean buildDetails = !config.isUseMessageAlarmData() || config.isOverwriteAlarmDetails();<NEW_LINE>if (buildDetails) {<NEW_LINE>ctx.logJsEvalRequest();<NEW_LINE... | buildAlarmDetails(ctx, msg, null); |
258,060 | public static void prepareAnalyticsMetadataProperties(AnalyticsMetadata bean) {<NEW_LINE>Map<String, String> additionalProperties = bean.getAdditionalProperties();<NEW_LINE>if (additionalProperties == null) {<NEW_LINE><MASK><NEW_LINE>bean.setAdditionalProperties(additionalProperties);<NEW_LINE>}<NEW_LINE>if (bean.getSo... | additionalProperties = new HashMap<>(); |
847,505 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String factoryName, String pipelineName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NE... | error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); |
242,814 | public static void main(String[] args) throws Exception {<NEW_LINE>dataLocalPath = DownloaderUtility.MODELIMPORT.Download();<NEW_LINE>final String SIMPLE_MLP = new File(dataLocalPath, "keras/simple_mlp.h5").getAbsolutePath();<NEW_LINE>// Keras Sequential models correspond to DL4J MultiLayerNetworks. We enforce loading ... | assert firstConf.getNIn() == 100; |
1,515,032 | final DeleteBotAliasResult executeDeleteBotAlias(DeleteBotAliasRequest deleteBotAliasRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBotAliasRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
173,530 | private boolean initOpenVRCompositor(boolean set) {<NEW_LINE>if (set && vrSystem != null) {<NEW_LINE>vrCompositor = new VR_IVRCompositor_FnTable(JOpenVRLibrary.VR_GetGenericInterface(JOpenVRLibrary.IVRCompositor_Version, hmdErrorStore));<NEW_LINE>if (hmdErrorStore.get(0) == 0) {<NEW_LINE>logger.info("OpenVR Compositor ... | texType[0].write(); |
413,985 | public Component createComponent() {<NEW_LINE>JScrollPane customizerScrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);<NEW_LINE>customizerScrollPane.setBorder(BorderFactory.createEmptyBorder());<NEW_LINE>customizerScrollPane.setViewportBorder(BorderFactor... | (UIManager.getFont("Label.font")); |
350,618 | void fillElementControlHeader(ElementControlHeader elementControlHeader, InstanceAuditHeader header) {<NEW_LINE>if (header != null) {<NEW_LINE>elementControlHeader.setElementSourceServer(serverName);<NEW_LINE>elementControlHeader.setElementOriginCategory(this.getElementOriginCategory(header.getInstanceProvenanceType())... | setElementCreateTime(header.getCreateTime()); |
1,047,194 | protected void processConfiguration(ContainerUnloader container, Workspace workspace) {<NEW_LINE>// Configuration<NEW_LINE>GraphController graphController = Lookup.getDefault().lookup(GraphController.class);<NEW_LINE>Configuration configuration = new Configuration();<NEW_LINE>configuration.setTimeRepresentation(contain... | configuration.setEdgeWeightType(TimestampDoubleMap.class); |
1,305,294 | public void process(JCas jcas) throws AnalysisEngineProcessException {<NEW_LINE>JCas resultView, passagesView, pickedPassagesView, questionView;<NEW_LINE>try {<NEW_LINE>resultView = jcas.getView("Result");<NEW_LINE>passagesView = jcas.getView("Passages");<NEW_LINE>jcas.createView("PickedPassages");<NEW_LINE>questionVie... | setDocumentText(passagesView.getDocumentText()); |
451,099 | public String toStringEntries() {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>try (ReadOptions readOptions = new ReadOptions().setTotalOrderSeek(true);<NEW_LINE>RocksIterator inodeIter = db().newIterator(mInodesColumn.get(), readOptions)) {<NEW_LINE>inodeIter.seekToFirst();<NEW_LINE>while (inodeIter.isVal... | ) + ": " + inode + "\n"); |
1,671,392 | private static void testArithmetic() {<NEW_LINE>int a = 6;<NEW_LINE>int b = 3;<NEW_LINE>int c = -1;<NEW_LINE>assertTrue(a * b == 18);<NEW_LINE>assertTrue(a / b == 2);<NEW_LINE>assertTrue(a % b == 0);<NEW_LINE><MASK><NEW_LINE>assertTrue(a - b == 3);<NEW_LINE>assertTrue(a << 1 == 12);<NEW_LINE>assertTrue(c >> 16 == -1);<... | assertTrue(a + b == 9); |
406,453 | private void resize(double inc) {<NEW_LINE>final int cols = widths.size(), rows = heights.size();<NEW_LINE>if (LOG.isDebuggingFine()) {<NEW_LINE>LOG.debugFine("Resize by " + inc + "x" + (inc / ratio));<NEW_LINE>if (LOG.isDebuggingFinest()) {<NEW_LINE>logSizes();<NEW_LINE>}<NEW_LINE>}<NEW_LINE>// TODO: if the last row o... | (y).add(null); |
1,306,217 | public void onItemFrameInteract(final PlayerInteractEntityEvent event) {<NEW_LINE>final User user = ess.getUser(event.getPlayer());<NEW_LINE>if (!(event.getRightClicked() instanceof ItemFrame)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (prot.getSettingBool(AntiBuildConfig.disable_build) && !user.canBuild() && !user.isA... | .ITEM_FRAME.toString())); |
1,379,199 | public ListenableFuture<Map<String, Object>> run(final Object command) {<NEW_LINE>if (!processing.get()) {<NEW_LINE>SettableFuture<Map<String, Object>> die = SettableFuture.create();<NEW_LINE>die.setException(new WatchmanException("connection closing down"));<NEW_LINE>return die;<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LI... | CountDownLatch latch = new CountDownLatch(1); |
140,145 | private static void parseConst(AnnotationsBuilder builder, int index, ParsedString line) {<NEW_LINE>// const is already taken.<NEW_LINE>if (!line.takeSomeWhitespace()) {<NEW_LINE>builder.diagnostics.put(index, "Expected whitespace after const and before type declaration");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>boolean i... | diagnostics.put(index, "Unexpected non-whitespace characters outside of comment after semicolon"); |
243,810 | static List<String> choose(final List<String> userDefinedJvmOptions) throws InterruptedException, IOException {<NEW_LINE>final List<String> ergonomicChoices = new ArrayList<>();<NEW_LINE>final Map<String, JvmOption> <MASK><NEW_LINE>final long heapSize = JvmOption.extractMaxHeapSize(finalJvmOptions);<NEW_LINE>final long... | finalJvmOptions = JvmOption.findFinalOptions(userDefinedJvmOptions); |
1,363,899 | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {<NEW_LINE>super.<MASK><NEW_LINE>if (requestCode == REQUEST_STORAGE_PERMISSION && permissions.length == 1) {<NEW_LINE>if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {<NEW_LINE>invalidateOptions... | onRequestPermissionsResult(requestCode, permissions, grantResults); |
830,841 | private void retryDownedHosts() {<NEW_LINE>// we only check the ring if we have nodes in the cluster to query<NEW_LINE>// and auto discovery is on. Otherwise we risk removing hosts from the ring with no way to re-add them<NEW_LINE>boolean checkRing = connectionManager.getHosts().size() > 0 && autoDiscoverHosts ? true :... | cassandraHost.getName() + " - It does no longer exist in the ring."); |
831,257 | private void exportTask(Task t, net.sf.mpxj.Task mpxjParentTask, int outlineLevel, int ordinalNum, Map<Integer, net.sf.mpxj.Task> id2mpxjTask, Map<CustomPropertyDefinition, FieldType> customProperty_fieldType) {<NEW_LINE>final net.sf.mpxj.Task mpxjTask = mpxjParentTask == null ? myOutputProject.addTask<MASK><NEW_LINE>m... | () : mpxjParentTask.addTask(); |
160,551 | protected void initializeComponents() {<NEW_LINE>super.initializeComponents();<NEW_LINE>JPanel contentPanel = getContentPanel();<NEW_LINE>{<NEW_LINE>JLabel label = new JLabel("Value:");<NEW_LINE>contentPanel.add(label, new GridBagConstraints(0, 1, 1, 1, 0, 0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets... | , new Float(0.1f))); |
236,592 | private static org.jreleaser.model.Snap convertSnap(Snap packager) {<NEW_LINE>org.jreleaser.model.Snap t = new org.jreleaser.model.Snap();<NEW_LINE>convertPackager(packager, t);<NEW_LINE>t.setPackageName(tr<MASK><NEW_LINE>t.setTemplateDirectory(tr(packager.getTemplateDirectory()));<NEW_LINE>t.setSkipTemplates(tr(packag... | (packager.getPackageName())); |
752,331 | public static int createTopicIfNotExists(String topic, short replicationFactor, double partitionToBrokerRatio, int minPartitionNum, Properties topicConfig, AdminClient adminClient) throws ExecutionException, InterruptedException {<NEW_LINE>try {<NEW_LINE>if (adminClient.listTopics().names().get().contains(topic)) {<NEW... | brokerCount = Utils.getBrokerCount(adminClient); |
1,784,180 | public void run(final FlowTrigger chain, Map data) {<NEW_LINE>final VmInstanceSpec spec = (VmInstanceSpec) data.get(VmInstanceConstant.Params.VmInstanceSpec.toString());<NEW_LINE>StopVmOnHypervisorMsg msg = new StopVmOnHypervisorMsg();<NEW_LINE>msg.setVmInventory(spec.getVmInventory());<NEW_LINE>if (spec.getMessage() i... | ext.beforeStopVmOnHypervisor(spec, msg); |
1,821,331 | public void menuSelected(MenuEvent event) {<NEW_LINE>Set<JMenuItem> unseen = new HashSet<>(itemMap.values());<NEW_LINE>for (final Editor editor : base.getEditors()) {<NEW_LINE><MASK><NEW_LINE>JMenuItem item = itemMap.get(sketch);<NEW_LINE>if (item != null) {<NEW_LINE>unseen.remove(item);<NEW_LINE>} else {<NEW_LINE>// i... | Sketch sketch = editor.getSketch(); |
777,802 | private void initCombos() {<NEW_LINE>BugzillaRepository repository = issue.getRepository();<NEW_LINE>BugzillaConfiguration bc = repository.getConfiguration();<NEW_LINE>if (bc == null || !bc.isValid()) {<NEW_LINE>// XXX nice error msg?<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>productCombo.setModel(toComboModel(bc.getProduct... | Bundle.LBL_Tried()))); |
675,460 | final ListSafetyRulesResult executeListSafetyRules(ListSafetyRulesRequest listSafetyRulesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listSafetyRulesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
731,634 | public void commit() throws IllegalArgumentException {<NEW_LINE>Structure struct = (Structure) composite;<NEW_LINE>String fieldName = null;<NEW_LINE>String comment = null;<NEW_LINE>if (component != null) {<NEW_LINE>fieldName = component.getFieldName();<NEW_LINE>comment = component.getComment();<NEW_LINE>}<NEW_LINE>// w... | , -1, fieldName, comment); |
1,708,725 | public boolean applyNetworkACL(final long aclId) throws ResourceUnavailableException {<NEW_LINE>boolean handled = true;<NEW_LINE>boolean aclApplyStatus = true;<NEW_LINE>final List<NetworkACLItemVO> <MASK><NEW_LINE>// Find all networks using this ACL and apply the ACL<NEW_LINE>final List<NetworkVO> networks = _networkDa... | rules = _networkACLItemDao.listByACL(aclId); |
1,355,855 | public static ListUmengAppkeysResponse unmarshall(ListUmengAppkeysResponse listUmengAppkeysResponse, UnmarshallerContext _ctx) {<NEW_LINE>listUmengAppkeysResponse.setCode(_ctx.stringValue("ListUmengAppkeysResponse.code"));<NEW_LINE>listUmengAppkeysResponse.setMessage<MASK><NEW_LINE>listUmengAppkeysResponse.setRequestId... | (_ctx.stringValue("ListUmengAppkeysResponse.message")); |
649,613 | public OAuthConsent readConsent(String providerId, String username, String clientId, String resource) throws OAuthStoreException {<NEW_LINE>try {<NEW_LINE>DBCollection col = getConsentCollection();<NEW_LINE>DBObject dbo = col.findOne(createConsentKeyHelper(providerId, username, clientId, resource));<NEW_LINE>if (dbo ==... | out.println("CustomStoreSample readConsent Did not find username " + username); |
653,441 | public void bindView(View view, Context context, Cursor cursor) {<NEW_LINE>int id = cursor.getInt(cursor.getColumnIndex(ClientAuthContentProvider.V3ClientAuth._ID));<NEW_LINE>final String where = ClientAuthContentProvider.V3ClientAuth._ID + "=" + id;<NEW_LINE>TextView domain = view.<MASK><NEW_LINE>String url = cursor.g... | findViewById(R.id.cookie_onion); |
999,600 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>ExpressionFactory factory = ExpressionFactory.newInstance();<NEW_LINE>ELContextImpl context = new ELContextImpl(factory);<NEW_LINE>PrintWriter pw = response.getWriter();<NEW_LINE>ELResolver elR... | LambdaExpression) elp.eval("e->e>2"); |
182,835 | private void dynInit() {<NEW_LINE>SmjReportLogic logic = new SmjReportLogic();<NEW_LINE>data = logic.getDataReport(m_AD_PInstance_ID, trxName);<NEW_LINE>generalTitle = logic.getGeneralTitle(reportId, trxName);<NEW_LINE>clientName = logic.getOrgName(trxName);<NEW_LINE>// if (clientName.equals("") || clientName.length()<... | Properties prop = Env.getCtx(); |
974,164 | public void addRecurrentEventsByWeeks(Event event, int periodicity, int endType, int repetitionsNumber, LocalDate endDate, Map<Integer, Boolean> daysCheckedMap) {<NEW_LINE>List<DayOfWeek> dayOfWeekList = daysCheckedMap.keySet().stream().sorted().map(DayOfWeek::of).collect(Collectors.toList());<NEW_LINE>Duration duratio... | iteration, dateTime) -> iteration >= repetitionsNumber; |
940,977 | public static double[] flattenDoubleArray(Object doubleArray) {<NEW_LINE>if (doubleArray instanceof double[])<NEW_LINE>return (double[]) doubleArray;<NEW_LINE>LinkedList<Object> stack = new LinkedList<>();<NEW_LINE>stack.push(doubleArray);<NEW_LINE>int[] shape = arrayShape(doubleArray);<NEW_LINE>int length = ArrayUtil.... | count++] = arr[i]; |
1,391,436 | public void subscribe(Subscriber<? super ReadableBodyPart> subscriber) {<NEW_LINE>Objects.requireNonNull(subscriber);<NEW_LINE>if (!halfInit(UPSTREAM_INIT)) {<NEW_LINE>Multi.<ReadableBodyPart>error(new IllegalStateException("Only one Subscriber allowed")).subscribe(subscriber);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>this... | 0 ? v : Long.MAX_VALUE); |
1,370,261 | protected static void generateOClass(Class<?> iClass, ODatabaseDocument database) {<NEW_LINE>boolean reloadSchema = false;<NEW_LINE>for (Class<?> currentClass = iClass; currentClass != Object.class; ) {<NEW_LINE><MASK><NEW_LINE>currentClass = currentClass.getSuperclass();<NEW_LINE>if (currentClass == null || currentCla... | String iClassName = currentClass.getSimpleName(); |
1,621,410 | private void buildRow(Table table, boolean fullId, boolean detailed, DiscoveryNodes discoveryNodes, TaskInfo taskInfo) {<NEW_LINE>table.startRow();<NEW_LINE>String nodeId = taskInfo.getTaskId().getNodeId();<NEW_LINE>DiscoveryNode node = discoveryNodes.get(nodeId);<NEW_LINE>table.addCell(taskInfo.getId());<NEW_LINE>tabl... | "-" : node.getHostAddress()); |
324,593 | public double skewness() {<NEW_LINE>double mean = mean();<NEW_LINE>double numer = 0, denom = 0;<NEW_LINE>for (int i = 0; i < used; i++) {<NEW_LINE>numer += pow(values<MASK><NEW_LINE>denom += pow(values[i] - mean, 2);<NEW_LINE>}<NEW_LINE>// All the zero's we arent storing<NEW_LINE>numer += pow(-mean, 3) * (length - used... | [i] - mean, 3); |
600,519 | public static void vertical3(Kernel1D_F64 kernel, GrayF64 src, GrayF64 dst) {<NEW_LINE>final double[] dataSrc = src.data;<NEW_LINE>final double[] dataDst = dst.data;<NEW_LINE>final double k1 = kernel.data[0];<NEW_LINE>final double k2 = kernel.data[1];<NEW_LINE>final double k3 = kernel.data[2];<NEW_LINE>final int radius... | (dataSrc[indexSrc]) * k2; |
1,009,927 | public static <T> T castToEnum(Object obj, Class<T> clazz, ParserConfig mapping) {<NEW_LINE>try {<NEW_LINE>if (obj instanceof String) {<NEW_LINE>String name = (String) obj;<NEW_LINE>if (name.length() == 0) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (mapping == null) {<NEW_LINE>mapping = ParserConfig.getGlobalInstan... | ] values = clazz.getEnumConstants(); |
1,629,322 | public AsyncRestQueryResult query(String uuid) {<NEW_LINE>AsyncRestQueryResult result = new AsyncRestQueryResult();<NEW_LINE>result.setUuid(uuid);<NEW_LINE>APIEvent evt = results.get(uuid);<NEW_LINE>if (evt != null) {<NEW_LINE>result.setState(AsyncRestState.done);<NEW_LINE>result.setResult(evt);<NEW_LINE>return result;... | setState(vo.getState()); |
1,397,257 | public Cursor newCursor() {<NEW_LINE>return new Cursor() {<NEW_LINE><NEW_LINE>final String[] row = new String[header.size()];<NEW_LINE><NEW_LINE>{<NEW_LINE>clear();<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void submit() {<NEW_LINE>addRow(row);<NEW_LINE>clear();<NEW_LINE>}<NEW_LINE><NEW_LINE>private void ... | (colByName(name), value); |
560,220 | private boolean noticeContainsPointInView(ParserNotice notice, Point p) {<NEW_LINE>try {<NEW_LINE>int start;<NEW_LINE>int end;<NEW_LINE>if (notice.getKnowsOffsetAndLength()) {<NEW_LINE>start = notice.getOffset();<NEW_LINE>end = start + notice.getLength() - 1;<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>Element root = do... | Document doc = textArea.getDocument(); |
1,748,459 | public void marshall(StartRxNormInferenceJobRequest startRxNormInferenceJobRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (startRxNormInferenceJobRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.mar... | startRxNormInferenceJobRequest.getDataAccessRoleArn(), DATAACCESSROLEARN_BINDING); |
1,691,743 | public Iterator<Object> ipaddresses() throws DataUnavailableException, CorruptDataException {<NEW_LINE>ArrayList<Object> addresses = new ArrayList<Object>();<NEW_LINE>U8Pointer ip = ptr.ipAddressesEA();<NEW_LINE>if (ip.isNull()) {<NEW_LINE>throw new DataUnavailableException("IP addresses not available");<NEW_LINE>}<NEW... | at(0).intValue(); |
335,613 | public static ListUsersResponse unmarshall(ListUsersResponse listUsersResponse, UnmarshallerContext _ctx) {<NEW_LINE>listUsersResponse.setRequestId(_ctx.stringValue("ListUsersResponse.RequestId"));<NEW_LINE>listUsersResponse.setTotalCount<MASK><NEW_LINE>listUsersResponse.setErrorCode(_ctx.stringValue("ListUsersResponse... | (_ctx.longValue("ListUsersResponse.TotalCount")); |
1,728,647 | final UpdateEmailIdentityPolicyResult executeUpdateEmailIdentityPolicy(UpdateEmailIdentityPolicyRequest updateEmailIdentityPolicyRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateEmailIdentityPolicyRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
921,847 | public Request<ForgetDeviceRequest> marshall(ForgetDeviceRequest forgetDeviceRequest) {<NEW_LINE>if (forgetDeviceRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ForgetDeviceRequest)");<NEW_LINE>}<NEW_LINE>Request<ForgetDeviceRequest> request = new DefaultRequest<ForgetDe... | request.addHeader("Content-Type", "application/x-amz-json-1.1"); |
1,258,645 | public Map<K, ValueHolder<V>> bulkCompute(Set<? extends K> keys, Function<Iterable<? extends Map.Entry<? extends K, ? extends V>>, Iterable<? extends Map.Entry<? extends K, ? extends V>>> remappingFunction) throws StoreAccessException {<NEW_LINE>// we are not expecting failures and these two maps are only used in case ... | = new HashMap<>(1); |
148,113 | final DeleteModelBiasJobDefinitionResult executeDeleteModelBiasJobDefinition(DeleteModelBiasJobDefinitionRequest deleteModelBiasJobDefinitionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteModelBiasJobDefinitionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContex... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
1,041,977 | private static JSONArray storeProperties(Map<String, V8Object.Property> properties, V8Object.Array array) {<NEW_LINE>JSONArray arrObj = new JSONArray();<NEW_LINE>if (properties != null) {<NEW_LINE>for (Map.Entry<String, V8Object.Property> entry : properties.entrySet()) {<NEW_LINE>String propName = entry.getKey();<NEW_L... | REF, prop.getReference()); |
746,788 | public DataStream removeBackingIndex(Index index) {<NEW_LINE>int backingIndexPosition = indices.indexOf(index);<NEW_LINE>if (backingIndexPosition == -1) {<NEW_LINE>throw new IllegalArgumentException(String.format(Locale.ROOT, "index [%s] is not part of data stream [%s]", index.getName(), name));<NEW_LINE>}<NEW_LINE>if ... | = new ArrayList<>(indices); |
355,169 | private void captureFullSpeedHrInitialize(String channel, int samples, double timeGap, List<String> args) {<NEW_LINE>timeGap = (int) (timeGap * 8) / 8;<NEW_LINE>if (timeGap < 0.5)<NEW_LINE>timeGap = (int) (0.5 * 8) / 8;<NEW_LINE>if (samples > this.MAX_SAMPLES) {<NEW_LINE>Log.v(TAG, "Sample limit exceeded. 10,000 max");... | analogInputSources.get(channel).CHOSA; |
377,668 | private JSONObject addThreadStopInfo(ThreadReference thread, long stopThreadId, DebuggerStopReason stopReason) {<NEW_LINE>JSONObject threadJson = new JSONObject();<NEW_LINE>long threadId = thread.uniqueID();<NEW_LINE><MASK><NEW_LINE>boolean stackFrameValid = false;<NEW_LINE>threadJson.put("id", threadId);<NEW_LINE>thre... | String threadName = thread.name(); |
684,134 | static String innerSort(String line) {<NEW_LINE>MultiMap<String, String> mm = split(line);<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>// class<NEW_LINE>List<String> vals = mm.remove("class");<NEW_LINE>assert (null != vals && 1 == vals.size());<NEW_LINE>sb.append("class=").append(vals.iterator().next());<... | >(mm.keySet()); |
722,679 | public void createEntryInSequencePerOrganizationForDatasource(MongockTemplate mongoTemplate) {<NEW_LINE>Map<String, Long> maxDatasourceCount = new HashMap<>();<NEW_LINE>mongoTemplate.find(query(where("name").regex("^Untitled Datasource \\d+$")), Datasource.class).forEach(datasource -> {<NEW_LINE>long count = 1;<NEW_LIN... | sequence.setNextNumber(val + 1); |
667,083 | void readImplementations(SubType type) {<NEW_LINE>this.interfaces.addAll(this.validationClassNode.interfaces);<NEW_LINE>this.interfaces.addAll(type.getInterfaces());<NEW_LINE>AnnotationNode implementsAnnotation = Annotations.getInvisible(this.validationClassNode, Implements.class);<NEW_LINE>if (implementsAnnotation == ... | interfaces = Annotations.getValue(implementsAnnotation); |
1,004,044 | public void replaceDependencies(final Set<ModuleDependency> newDeps) throws CyclicDependencyException {<NEW_LINE>Set<ModuleDependency> addedDeps = new HashSet<ModuleDependency>(newDeps);<NEW_LINE>try {<NEW_LINE>SortedSet<ModuleDependency> currentDeps = getDirectDependencies();<NEW_LINE>addedDeps.removeAll(currentDeps);... | Level.INFO, null, x); |
371,171 | public Map<String, LinkedList<BinaryMapDataObject>> cacheAllCountries() throws IOException {<NEW_LINE>quadTree = new QuadTree<String>(new QuadRect(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE), 8, 0.55f);<NEW_LINE>final ResultMatcher<BinaryMapDataObject> resultMatcher = new ResultMatcher<BinaryMapDataObject>() {<NEW_LINE... | maxy = object.getPoint31YTile(0); |
158,438 | private Map toMap(JSONObject jsonObject) throws JSONException {<NEW_LINE>Map parentBean = new HashMap();<NEW_LINE><MASK><NEW_LINE>while (i.hasNext()) {<NEW_LINE>String key = (String) i.next();<NEW_LINE>Object value = jsonObject.get(key);<NEW_LINE>if (value instanceof JSONObject) {<NEW_LINE>Map subBean = toMap((JSONObje... | Iterator i = jsonObject.keys(); |
1,118,442 | private void deleteAllContracts(OrganizationBean organizationBean) throws StorageException {<NEW_LINE>Query query;<NEW_LINE>if (isMySql()) {<NEW_LINE>String sql = "DELETE c " + " FROM contracts c " + " JOIN api_versions " + " ON c.apiv_id = api_versions.id " + " JOIN apis " + " ON api_versions.ap... | "orgId", organizationBean.getId()); |
1,646,747 | public String visit(ASTNode.SubQuery node) {<NEW_LINE>ZQLMetadata.InventoryMetadata inventory = ZQLMetadata.findInventoryMetadata(node.getTarget().getEntity());<NEW_LINE>ZQLContext.pushQueryTargetInventoryName(inventory.fullInventoryName());<NEW_LINE>String fieldName = node.getTarget().getFields() == null || node.getTa... | String entityAlias = inventory.simpleInventoryName(); |
1,030,404 | public boolean apply(Game game, Ability source) {<NEW_LINE>Set<UUID> lands = new HashSet<>();<NEW_LINE>for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {<NEW_LINE>Player player = game.getPlayer(playerId);<NEW_LINE>if (player != null) {<NEW_LINE>for (SubType landName : Arrays.strea... | outcome, target, source, game); |
1,537,532 | public static void assertValuesMayConvert(EventBean eventBean, String[] propertyNames, ValueWithExistsFlag[] expected, Function<Object, Object> optionalValueConversion) {<NEW_LINE>SupportEventTypeAssertionUtil.assertConsistency(eventBean);<NEW_LINE>Object[] receivedValues <MASK><NEW_LINE>Object[] expectedValues = new O... | = new Object[propertyNames.length]; |
219,719 | public static void runSample() {<NEW_LINE><MASK><NEW_LINE>System.out.println(" Starting Event Hubs Sender Sample");<NEW_LINE>System.out.println("================================================================");<NEW_LINE>if (AZURE_EVENT_HUBS_CONNECTION_STRING.isEmpty() || (AZURE_EVENT_HUBS_NAMESPACE.isEmpty() && AZURE... | System.out.println("\n================================================================"); |
1,676,646 | public void beforeLayout(RecyclerView.Recycler recycler, RecyclerView.State state, LayoutManagerHelper helper) {<NEW_LINE>super.beforeLayout(recycler, state, helper);<NEW_LINE>int availableWidth;<NEW_LINE>if (helper.getOrientation() == VERTICAL) {<NEW_LINE>availableWidth = helper.getContentWidth() - helper.getPaddingLe... | - getHorizontalMargin() - getHorizontalPadding(); |
1,524,021 | protected List<String> statsDisplay(Player player, float skillValue, boolean hasEndurance, boolean isLucky) {<NEW_LINE>List<String> messages = new ArrayList<>();<NEW_LINE>if (canDodge) {<NEW_LINE>messages.add(getStatMessage(SubSkillType.ACROBATICS_DODGE, dodgeChance) + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bon... | RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.ACROBATICS_ROLL); |
685,854 | private JPanel createQuickListsPanel() {<NEW_LINE>myQuickListsList = new JBList(myQuickListsModel);<NEW_LINE>myQuickListsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);<NEW_LINE>myQuickListsList.setCellRenderer(new MyQuickListCellRenderer());<NEW_LINE>myQuickListsList.addListSelectionListener(new ListSelect... | final QuickList quickList = (QuickList) selectedValue; |
1,129,503 | private void createPanelWidgets() {<NEW_LINE>int gridy = -1;<NEW_LINE>addGridBagComponent(this, createTopSpacer(), 0, ++gridy, fullGridWidth, 1, 0, 0, java.awt.GridBagConstraints.WEST, java.awt.GridBagConstraints.NONE, topSpacerInsets, 0, 0);<NEW_LINE>clientTable = new DisplayTable(categories);<NEW_LINE>clientTable.get... | NONE, labelInsets, 0, 0); |
387,098 | public static void main(String[] args) {<NEW_LINE>Exercise27_QueueWith2Stacks<String> <MASK><NEW_LINE>StdOut.println("IsEmpty: " + exercise27_queueWith2Stacks.isEmpty() + " Expected: true");<NEW_LINE>StdOut.println("Size: " + exercise27_queueWith2Stacks.size() + " Expected: 0");<NEW_LINE>exercise27_queueWith2Stacks.enq... | exercise27_queueWith2Stacks = new Exercise27_QueueWith2Stacks<>(); |
365,793 | private void writeCoeffAbsLevel(MEncoder encoder, BlockType blockType, int numDecodAbsLevelGt1, int numDecodAbsLevelEq1, int absLev) {<NEW_LINE>int incB0 = ((numDecodAbsLevelGt1 != 0) ? 0 : Math.min(4, 1 + numDecodAbsLevelEq1));<NEW_LINE>int incBN = 5 + Math.min(<MASK><NEW_LINE>if (absLev == 0) {<NEW_LINE>encoder.encod... | 4 - blockType.coeffAbsLevelAdjust, numDecodAbsLevelGt1); |
430,022 | public static DocumentFilter createDocumentFilterFromMQuery(@NonNull final MQuery mquery, @NonNull final ITranslatableString caption) {<NEW_LINE>final ArrayList<DocumentFilterParam> parameters = new ArrayList<>();<NEW_LINE>for (int restrictionIdx = 0, restrictionsCount = mquery.getRestrictionCount(); restrictionIdx < r... | setParameters(parameters).build(); |
941,819 | static ObjectIntHashMap<IRI> initMap() {<NEW_LINE>ObjectIntHashMap<IRI> predicates = new ObjectIntHashMap<>();<NEW_LINE>AtomicInteger nextId = new AtomicInteger(1);<NEW_LINE>List<OWLRDFVocabulary> ORDERED_URIS = Arrays.asList(RDF_TYPE, RDFS_LABEL, OWL_DEPRECATED, RDFS_COMMENT, RDFS_IS_DEFINED_BY, RDF_FIRST, RDF_REST, O... | , nextId.getAndIncrement())); |
1,852,031 | public Optional<FieldValueBuilder> fieldValue(final Object value) {<NEW_LINE>if (null != value) {<NEW_LINE>if (value instanceof String) {<NEW_LINE>return Optional.of(HiddenFieldType.builder().value(((String) value)));<NEW_LINE>}<NEW_LINE>if (value instanceof Boolean) {<NEW_LINE>return Optional.of(BoolHiddenFieldType.bu... | value((Long) value)); |
1,459,477 | private static void writeEntry(String name, Set<String> written, ZipOutputStream zos, File f) throws IOException, FileNotFoundException {<NEW_LINE>if (!written.add(name)) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int idx = name.lastIndexOf('/', name.length() - 2);<NEW_LINE>if (idx != -1) {<NEW_LINE>writeEntry(name.substri... | InputStream zis = new FileInputStream(f); |
10,511 | public void onAdded(WindowBasedTextGUI textGUI, Window window, List<Window> allWindows) {<NEW_LINE>WindowDecorationRenderer decorationRenderer = getWindowDecorationRenderer(window);<NEW_LINE>TerminalSize expectedDecoratedSize = decorationRenderer.getDecoratedSize(window, window.getPreferredSize());<NEW_LINE>window.setD... | expectedDecoratedSize.getRows()) / 2; |
738,581 | public // Feature SIB0112b.mp.1<NEW_LINE>void restore(final List<DataSlice> dataSlices) throws SevereMessageStoreException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "restore", dataSlices);<NEW_LINE>super.restore(dataSlices);<NEW_LINE>key = new AIStreamKey(getMe... | getAnycastInputHandler(sourceMEId, gatheringUuid, true); |
1,736,948 | public void translate(final ITranslationEnvironment environment, final IInstruction instruction, final List<ReilInstruction> instructions) throws InternalTranslationException {<NEW_LINE>TranslationHelpers.checkTranslationArguments(environment, instruction, instructions, "blelrl");<NEW_LINE>Long baseOffset = instruction... | , OperandSize.BYTE, jumpOperand)); |
898,200 | public Span start() {<NEW_LINE>Baggage baggage = null;<NEW_LINE>io.opentelemetry.api.trace.SpanBuilder builder = tracer().spanBuilder(spanName);<NEW_LINE>if (ignoreActiveSpan && parentSpan == null && parentSpanContext == null) {<NEW_LINE>builder.setNoParent();<NEW_LINE>} else if (parentSpan != null) {<NEW_LINE>builder.... | builder.setAttribute(key, value); |
558,615 | private static void removeUndefinedHsrpTrackReferences(Configuration c, Warnings w) {<NEW_LINE>for (Interface i : c.getAllInterfaces().values()) {<NEW_LINE>boolean groupsModified = false;<NEW_LINE>ImmutableMap.Builder<Integer, HsrpGroup> newGroups = ImmutableMap.builder();<NEW_LINE>for (Entry<Integer, HsrpGroup> groupB... | newGroups.put(id, group); |
739,958 | public Request<UpdateHostedZoneCommentRequest> marshall(UpdateHostedZoneCommentRequest updateHostedZoneCommentRequest) {<NEW_LINE>if (updateHostedZoneCommentRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<UpdateHostedZoneCommentRequest> r... | getComment()).endElement(); |
1,283,154 | private synchronized void initRand() {<NEW_LINE>// set up alias table<NEW_LINE>q = new double[p.length];<NEW_LINE>for (int i = 0; i < p.length; i++) {<NEW_LINE>q[i] = p[i] * p.length;<NEW_LINE>}<NEW_LINE>// initialize a with indices<NEW_LINE>a = new int[p.length];<NEW_LINE>for (int i = 0; i < p.length; i++) {<NEW_LINE>... | k = HL[head - 1]; |
1,743,076 | public void windowStateChanged(WindowEvent evt) {<NEW_LINE>if (!Constants.AUTO_ICONIFY) {<NEW_LINE>modeView.getController().userChangedFrameStateMode(modeView, evt.getNewState());<NEW_LINE>} else {<NEW_LINE>// All the timestamping is a a workaround beause of buggy GNOME<NEW_LINE>// and of its kind who iconify the windo... | Component comp = modeView.getComponent(); |
261,749 | protected IGenericClient newClientWithBaseUrl(CommandLine theCommandLine, String theBaseUrl, String theBasicAuthOptionName, String theBearerTokenOptionName) throws ParseException {<NEW_LINE>myFhirCtx.getRestfulClientFactory().setSocketTimeout<MASK><NEW_LINE>IGenericClient retVal = myFhirCtx.newRestfulGenericClient(theB... | ((int) DateUtils.MILLIS_PER_HOUR); |
170,497 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.print("Enter number : ");<NEW_LINE>int num = sc.nextInt();<NEW_LINE>String str = String.valueOf(num);<NEW_LINE>len = str.length();<NEW_LINE>int[] arr = new int[300];<NEW_LINE>int[] str2 = new int[300];<NEW_LINE>in... | .print(str2[i]); |
228,679 | public CreateChangeSetResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>CreateChangeSetResult createChangeSetResult = new CreateChangeSetResult();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<NEW_LINE>targetDepth += 2;<NEW_LINE>whil... | int originalDepth = context.getCurrentDepth(); |
1,803,368 | final GetApplicationResult executeGetApplication(GetApplicationRequest getApplicationRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getApplicationRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<GetApplicationRequest> request = nu... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.