idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
242,811 | public static AnomalyAlertingConfiguration toInnerForCreate(AnomalyAlertConfiguration alertConfiguration) {<NEW_LINE>AnomalyAlertingConfiguration innerAlertConfiguration = new AnomalyAlertingConfiguration();<NEW_LINE>innerAlertConfiguration.setName(alertConfiguration.getName());<NEW_LINE>innerAlertConfiguration.setDesc... | dimensions = AnomalyAlertConfigurationHelper.getDimensionsToSplitAlertRaw(alertConfiguration); |
1,212,436 | private Mono<Response<IotHubNameAvailabilityInfoInner>> checkNameAvailabilityWithResponseAsync(OperationInputs operationInputs) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));<NEW_LINE>}<... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
18,946 | private JXTitledPanel createImageBox(JPanel p, JDialog dialog, int width, int height, CFrame window) {<NEW_LINE>BufferedImage bi = new // TYPE_INT_ARGB is tinted red<NEW_LINE>BufferedImage(// TYPE_INT_ARGB is tinted red<NEW_LINE>window.getWidth(), // TYPE_INT_ARGB is tinted red<NEW_LINE>window.getHeight(), BufferedImag... | .getPredefinedCursor(Cursor.HAND_CURSOR)); |
1,598,631 | private void prepareDisasterMail(final SingularityDisastersData disastersData) {<NEW_LINE>final List<SingularityEmailDestination> emailDestination = configuration.getSmtpConfigurationOptional().get().getEmailConfiguration().get(SingularityEmailType.DISASTER_DETECTED);<NEW_LINE>if (emailDestination.isEmpty() || !emailDe... | Jade4J.render(disastersTemplate, templateProperties); |
872,026 | public final Block copyPositions(int[] positions, int offset, int length) {<NEW_LINE><MASK><NEW_LINE>int[] newOffsets = new int[length + 1];<NEW_LINE>boolean[] newValueIsNull = mayHaveNull() ? new boolean[length] : null;<NEW_LINE>// First traversal will populate newValueIsNull mask (if present) and<NEW_LINE>// newOffse... | checkArrayRange(positions, offset, length); |
28,700 | private RemotingCommand processReplyMessageRequest(final ChannelHandlerContext ctx, final RemotingCommand request, final SendMessageContext sendMessageContext, final SendMessageRequestHeader requestHeader) {<NEW_LINE>final RemotingCommand response = RemotingCommand.createResponseCommand(SendMessageResponseHeader.class)... | setPropertiesString(requestHeader.getProperties()); |
488,807 | public TFImportStatus merge(@NonNull TFImportStatus other) {<NEW_LINE>List<String> newModelPaths = new ArrayList<>(modelPaths);<NEW_LINE>newModelPaths.addAll(other.modelPaths);<NEW_LINE>List<String> newCantImportModelPaths = new ArrayList<>(cantImportModelPaths);<NEW_LINE><MASK><NEW_LINE>List<String> newReadErrorModelP... | newCantImportModelPaths.addAll(other.cantImportModelPaths); |
18,371 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "c0,sum0,sum1".split(",");<NEW_LINE>String epl = "@name('s0') select intPrimitive as c0, " + "sum(intPrimitive, group_by:()) as sum0, " + "sum(intPrimitive, group_by:(theString)) as sum1 " + " from SupportBean#keepall";<NEW_LINE>env.compileDeploy<M... | (epl).addListener("s0"); |
194,163 | public Integer doCall() {<NEW_LINE>if (name != null && !dev.jbang.catalog.Catalog.isValidName(name)) {<NEW_LINE>throw new IllegalArgumentException("Invalid catalog name, it should start with a letter followed by 0 or more letters, digits, underscores, hyphens or dots");<NEW_LINE>}<NEW_LINE>if (name == null) {<NEW_LINE>... | name = CatalogUtil.nameFromRef(urlOrFile); |
1,785,375 | private Binding notPartitionedBinding(Exchange exchange, Queue queue, String rk, RabbitCommonProperties extendedProperties) {<NEW_LINE>String routingKey = rk;<NEW_LINE>if (routingKey == null) {<NEW_LINE>routingKey = "#";<NEW_LINE>}<NEW_LINE>Map<String, Object> arguments = new HashMap<>(extendedProperties.getQueueBindin... | queue.getName(), binding); |
533,904 | public int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes) {<NEW_LINE>int result = ACCESS_ABSTAIN;<NEW_LINE>if (!(authentication instanceof OAuth2Authentication)) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>OAuth2Authentication oauth2Authentication = (OAuth2Authentication) a... | failure.getMessage(), failure); |
1,695,700 | public void visitInvokeDynamicInsn(String name, String desc, Handle bsm, Object... bsmArgs) {<NEW_LINE>InvokeDynamicInstruction insn = new InvokeDynamicInstruction();<NEW_LINE>insn.setBootstrapMethod(parseHandle(bsm));<NEW_LINE>switch(insn.getBootstrapMethod().getKind()) {<NEW_LINE>case GET_STATIC_FIELD:<NEW_LINE>case ... | .add(convertConstant(bsmArg)); |
1,226,202 | public static Iterator<Tree> preOrderIterator(Tree tree) {<NEW_LINE>return new Iterator<Tree>() {<NEW_LINE><NEW_LINE>Deque<Iterator<Tree>> <MASK><NEW_LINE><NEW_LINE>{<NEW_LINE>push(new FakeTree(tree));<NEW_LINE>}<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean hasNext() {<NEW_LINE>return stack.size() > 0;<NEW_LINE... | stack = new ArrayDeque<>(); |
414,921 | static WebAuthnPolicy toModel(MapWebAuthnPolicyEntity entity) {<NEW_LINE>if (entity == null)<NEW_LINE>return null;<NEW_LINE>WebAuthnPolicy model = new WebAuthnPolicy();<NEW_LINE>model.setRpEntityName(entity.getRpEntityName());<NEW_LINE>model.<MASK><NEW_LINE>model.setRpId(entity.getRpId());<NEW_LINE>model.setAttestation... | setSignatureAlgorithm(entity.getSignatureAlgorithms()); |
849,531 | static ASTNode findContainingNode(@Nonnull PsiFile file, @Nullable TextRange range) {<NEW_LINE>Language language = file.getLanguage();<NEW_LINE>if (range == null)<NEW_LINE>return null;<NEW_LINE>final <MASK><NEW_LINE>final PsiElement startElement = viewProvider.findElementAt(range.getStartOffset(), language);<NEW_LINE>f... | FileViewProvider viewProvider = file.getViewProvider(); |
893,449 | public void processReclassifiedEntityEvent(OMRSInstanceEvent instanceEvent) {<NEW_LINE>String methodName = "processReclassifiedEntityEvent";<NEW_LINE>EntityDetail entity = instanceEvent.getEntity();<NEW_LINE>String eventTypeName = instanceEvent.getInstanceEventType().getName();<NEW_LINE>logEvent(eventTypeName, entity);... | logExceptionToAudit(methodName, instanceEvent, e); |
1,826,712 | public void openCustomInventory(Inventory inventory, ServerPlayerEntity player, ScreenHandlerType<?> windowType) {<NEW_LINE>if (player.networkHandler == null)<NEW_LINE>return;<NEW_LINE>Preconditions.checkArgument(windowType != null, "Unknown windowType");<NEW_LINE>ScreenHandler container = new CraftContainer(inventory,... | BukkitEventFactory.callInventoryOpenEvent(player, container); |
1,674,282 | public static DescribeQosPoliciesResponse unmarshall(DescribeQosPoliciesResponse describeQosPoliciesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeQosPoliciesResponse.setRequestId(_ctx.stringValue("DescribeQosPoliciesResponse.RequestId"));<NEW_LINE>describeQosPoliciesResponse.setTotalCount(_ctx.integerValue("De... | ("DescribeQosPoliciesResponse.QosPolicies[" + i + "].QosPolicyId")); |
185,043 | public void report() {<NEW_LINE>for (Map.Entry<String, SortedSet<String>> e : map.entrySet()) {<NEW_LINE>Set<String> occursIn = e.getValue();<NEW_LINE>if (occursIn.size() == 1) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>XField field = definition.get(e.getKey());<NEW_LINE>if (field == null) {<NEW_LINE>continue;<NEW_LINE>}... | String className = field.getClassName(); |
664,051 | private boolean updateAttributes(Map<PsThreadColumns, String> threadMap) {<NEW_LINE>this.threadId = ParseUtil.parseIntOrDefault(threadMap.get(PsThreadColumns.TID), 0);<NEW_LINE>switch(threadMap.get(PsThreadColumns.STATE).charAt(0)) {<NEW_LINE>case 'R':<NEW_LINE>this.state = RUNNING;<NEW_LINE>break;<NEW_LINE>case 'I':<N... | (PsThreadColumns.PRI), 0); |
1,106,796 | public static DescribeConfigNameResponse unmarshall(DescribeConfigNameResponse describeConfigNameResponse, UnmarshallerContext context) {<NEW_LINE>describeConfigNameResponse.setRequestId(context.stringValue("DescribeConfigNameResponse.RequestId"));<NEW_LINE>describeConfigNameResponse.setHasConfig<MASK><NEW_LINE>describ... | (context.booleanValue("DescribeConfigNameResponse.HasConfig")); |
1,595,190 | private void paintVisibleColumns(PaintTarget target) throws PaintException {<NEW_LINE>target.startTag("visiblecolumns");<NEW_LINE>if (rowHeadersAreEnabled()) {<NEW_LINE>target.startTag("column");<NEW_LINE>target.addAttribute("cid", ROW_HEADER_COLUMN_KEY);<NEW_LINE>paintColumnWidth(target, ROW_HEADER_FAKE_PROPERTY_ID);<... | <?> sortables = getSortableContainerPropertyIds(); |
939,360 | public com.amazonaws.services.imagebuilder.model.ServiceQuotaExceededException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.imagebuilder.model.ServiceQuotaExceededException serviceQuotaExceededException = new com.amazonaws.services.<MASK><NEW_LINE>int origina... | imagebuilder.model.ServiceQuotaExceededException(null); |
666,989 | public AbstractCas next() throws AnalysisEngineProcessException {<NEW_LINE>BingResult result = i < results.size() ? results.get(i) : null;<NEW_LINE>i++;<NEW_LINE>JCas jcas = getEmptyJCas();<NEW_LINE>try {<NEW_LINE>jcas.createView("Question");<NEW_LINE>CasCopier qcopier = new CasCopier(questionView.getCas(), jcas.getVie... | String title = ri.getDocumentTitle(); |
152,474 | private void check() {<NEW_LINE>long size;<NEW_LINE>try {<NEW_LINE>size = retrieveFileSize();<NEW_LINE>} catch (final Exception e) {<NEW_LINE>Log.d(Config.LOGTAG, "io exception in http file size checker: " + e.getMessage());<NEW_LINE>retrieveFailed(e);<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final Message.<MASK><NEW_LINE>... | FileParams fileParams = message.getFileParams(); |
800,110 | public void exportFieldRadio(JRPrintElement element) throws IOException {<NEW_LINE>String fieldName = element.getPropertiesMap().getProperty(PDF_FIELD_NAME);<NEW_LINE>fieldName = fieldName == null || fieldName.trim().length() == 0 ? "FIELD_" + element.getUUID() : fieldName;<NEW_LINE>PdfRadioCheck radioField = pdfProduc... | (Boolean.valueOf(checked)); |
1,258,220 | public Integer[] calculateRange(String beginValue, String endValue) {<NEW_LINE>Integer[] targetPartition = null;<NEW_LINE>try {<NEW_LINE>long startTime = formatter.get().parse(beginValue).getTime();<NEW_LINE>long endTime = formatter.get().parse(endValue).getTime();<NEW_LINE>Calendar now = Calendar.getInstance();<NEW_LI... | i + 1] = begin + i; |
1,031,744 | protected void restoreDescendantState(UIComponent component, FacesContext context) {<NEW_LINE>String id = component.getId();<NEW_LINE>// reset the client id<NEW_LINE>component.setId(id);<NEW_LINE>Map<String, SavedState> saved = (Map<String, SavedState>) getStateHelper().get(PropertyKeys.saved);<NEW_LINE>if (component i... | setValue(state.getValue()); |
444,875 | public JwtClaims parseJwtWithValidation(ConvergedClientConfig clientConfig, String jwtString, JwtContext jwtContext, OidcClientRequest oidcClientRequest) throws JWTTokenValidationFailedException, IllegalStateException, Exception {<NEW_LINE>try {<NEW_LINE>JsonWebStructure jsonStruct = getJsonWebStructureFromJwtContext(j... | clientConfig.getSignatureAlgorithm(), oidcClientRequest); |
167,702 | protected void parseCreateField(ParseContext context, List<IndexableField> fields) throws IOException {<NEW_LINE>if (fieldType().indexOptions() == IndexOptions.NONE && !fieldType().stored() && !fieldType().hasDocValues()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Boolean value = context.parseExternalValue(Boolean.class);<... | .parser().text(); |
389,775 | private void propagateSleepSet(int depth, PrimitiveVS<Machine> choice) {<NEW_LINE>Message current = new Message();<NEW_LINE>for (GuardedValue<Machine> machine : choice.getGuardedValues()) {<NEW_LINE>current = current.merge(machine.getValue().sendBuffer.peek<MASK><NEW_LINE>}<NEW_LINE>DPORChoice choiceElement = (DPORChoi... | (machine.getGuard())); |
925,485 | private void initPortParameters(SerialPort port) {<NEW_LINE>initialized = false;<NEW_LINE>if (port != null) {<NEW_LINE>cbPort.setSelectedItem(port.getName());<NEW_LINE>cbBaudrate.setSelectedItem(String.valueOf(port.getBaudRate()));<NEW_LINE>cbParity.setSelectedIndex(port.getParity());<NEW_LINE>cbDataBits.setSelectedInd... | setSelected(port.isDSR()); |
1,445,726 | public void postInitialize(Python3Core core) {<NEW_LINE>super.postInitialize(core);<NEW_LINE>PythonContext context = core.getContext();<NEW_LINE>PythonModule mod = core.lookupBuiltinModule(__GRAALPYTHON__);<NEW_LINE><MASK><NEW_LINE>if (!ImageInfo.inImageBuildtimeCode()) {<NEW_LINE>mod.setAttribute("home", language.getH... | PythonLanguage language = context.getLanguage(); |
626,993 | public Support insertSupport(Inter inter1, Inter inter2, Class<? extends Support> supportClass) {<NEW_LINE>final boolean direct = inter1.getId<MASK><NEW_LINE>final Inter source = direct ? inter1 : inter2;<NEW_LINE>final Inter target = direct ? inter2 : inter1;<NEW_LINE>// Look for existing exclusion<NEW_LINE>Relation e... | () < inter2.getId(); |
926,494 | public Credentials parse(HttpResponse response) throws ClientException {<NEW_LINE>String jsonContent = new String(response.getHttpContent());<NEW_LINE>try {<NEW_LINE>JSONObject jsonObject = new JSONObject(jsonContent);<NEW_LINE>if (!jsonObject.has("StatusCode")) {<NEW_LINE>throw new <MASK><NEW_LINE>}<NEW_LINE>if (!"200... | ClientException("Invalid json " + jsonContent + " got from oss auth server."); |
330,991 | static RunnerApi.PTransform.Builder translateAppliedPTransform(AppliedPTransform<?, ?, ?> appliedPTransform, List<AppliedPTransform<?, ?, ?>> subtransforms, SdkComponents components) throws IOException {<NEW_LINE>RunnerApi.PTransform.Builder transformBuilder = RunnerApi.PTransform.newBuilder();<NEW_LINE>for (Map.Entry<... | (components.getExistingPTransformId(subtransform)); |
867,936 | public void saveSyncRecord(SyncRecord record) {<NEW_LINE>ContentValues values = new ContentValues();<NEW_LINE>if (record.getLocalPath() != null) {<NEW_LINE>values.put(KEY_SYNC_FILEPATH_ORI, encrypt(record.getLocalPath()));<NEW_LINE>}<NEW_LINE>if (record.getNewPath() != null) {<NEW_LINE>values.put(KEY_SYNC_FILEPATH_NEW,... | (record.getNewPath())); |
639,513 | public FilterRegistrationBean webStatFilterRegistrationBean(DruidStatProperties properties) {<NEW_LINE>DruidStatProperties.WebStatFilter config = properties.getWebStatFilter();<NEW_LINE>FilterRegistrationBean registrationBean = new FilterRegistrationBean();<NEW_LINE>WebStatFilter filter = new WebStatFilter();<NEW_LINE>... | "principalSessionName", config.getPrincipalSessionName()); |
1,246,511 | public void addProcedure(String schemaNameArg, String procedureNameArg, NormalProcedureConfig config) {<NEW_LINE>String schemaName = SQLUtils.normalize(schemaNameArg);<NEW_LINE>String procedureName = SQLUtils.normalize(procedureNameArg);<NEW_LINE>SchemaHandler schemaHandler = schemaMap.get(schemaName);<NEW_LINE>if (sch... | c.setTargetName(getPrototype()); |
1,399,575 | public EurekaHttpResponse<InstanceInfo> sendHeartBeat(String appName, String id, InstanceInfo info, InstanceStatus overriddenStatus) {<NEW_LINE>String urlPath = "apps/" + appName + '/' + id;<NEW_LINE>Response response = null;<NEW_LINE>try {<NEW_LINE>WebTarget webResource = jerseyClient.target(serviceUrl).path(urlPath).... | .readEntity(InstanceInfo.class)); |
1,592,686 | public MCostDetail process() {<NEW_LINE>CLogger logger = CLogger.getCLogger(LastPOPriceCostingMethod.class);<NEW_LINE>boolean isReturnTrx = costDetail.getQty().signum() < 0;<NEW_LINE>int precision = accountSchema.getCostingPrecision();<NEW_LINE>BigDecimal price = costDetail.getAmt();<NEW_LINE>if (costDetail.getQty().si... | add(costDetail.getAmt()); |
235,781 | public boolean apply(Game game, Ability source) {<NEW_LINE>game.getStack().stream().filter(Objects::nonNull).forEachOrdered(stackObject -> {<NEW_LINE>if (!game.getOpponents(source.getControllerId()).contains(stackObject.getControllerId())) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Player player = game.getPlayer(stackObjec... | getId(), source, game); |
408,639 | public boolean isHidden(Context context, String schema, String element, String qualifier) throws SQLException {<NEW_LINE>boolean hidden = false;<NEW_LINE>// for schema.element, just check schema->elementSet<NEW_LINE>if (!isInitialized()) {<NEW_LINE>init();<NEW_LINE>}<NEW_LINE>if (qualifier == null) {<NEW_LINE>Set<Strin... | = !authorizeService.isAdmin(context); |
1,414,986 | public static boolean loadInvisibleProject(IPath javaFile, IPath rootPath, boolean forceUpdateLibPath, IProgressMonitor monitor) throws CoreException {<NEW_LINE>if (!ProjectUtils.getVisibleProjects(rootPath).isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String packageName = getPackageName(javaFile, rootPath);... | invisibleProjectName = ProjectUtils.getWorkspaceInvisibleProjectName(rootPath); |
1,495,644 | public void readVirtualized(VirtualizationInput in) throws IOException {<NEW_LINE>super.readVirtualized(in);<NEW_LINE>int flags = in.readIntCompressed();<NEW_LINE>text = (String) in.readJRObject();<NEW_LINE>if ((flags & SERIALIZATION_FLAG_HAS_VALUE) != 0) {<NEW_LINE>value = in.readJRObject();<NEW_LINE>} else {<NEW_LINE... | (short) in.readIntCompressed(); |
1,819,098 | public void onActivityResult(int requestCode, int resultCode, Intent data) {<NEW_LINE>super.onActivityResult(requestCode, resultCode, data);<NEW_LINE>if (requestCode == RICH_TEXT_REQUEST && resultCode == RESULT_OK) {<NEW_LINE>String description = data.getStringExtra(TAG_RICH_TEXT);<NEW_LINE>if (!TextUtils.isEmpty(descr... | Toast.LENGTH_SHORT).show(); |
1,213,368 | public void marshall(PlaybackConfiguration playbackConfiguration, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (playbackConfiguration == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(playbackConfiguration... | playbackConfiguration.getConfigurationAliases(), CONFIGURATIONALIASES_BINDING); |
1,638,681 | public static void attestSgxEnclaveAsync1() {<NEW_LINE>BinaryData runtimeData = BinaryData.fromBytes(SampleCollateral.getRunTimeData());<NEW_LINE>BinaryData inittimeData = null;<NEW_LINE>BinaryData openEnclaveReport = BinaryData.fromBytes(SampleCollateral.getOpenEnclaveReport());<NEW_LINE>BinaryData sgxQuote = BinaryDa... | JSON)), Context.NONE); |
1,522,564 | private TransformationStep computeVirtualIncomingPoolMemberTransformation(PoolMember member, boolean translateAddress, boolean translatePort) {<NEW_LINE>TransformationStep addressTranslation = translateAddress ? new AssignIpAddressFromPool(TransformationType.DEST_NAT, IpField.DESTINATION, ImmutableRangeSet.of(Range.sin... | member.getPort()) : null; |
201,479 | protected void constructorsForVariables(CodeWriter writer, EntityType model) throws IOException {<NEW_LINE>super.constructorsForVariables(writer, model);<NEW_LINE>String localName = writer.getRawName(model);<NEW_LINE>String genericName = <MASK><NEW_LINE>if (!localName.equals(genericName)) {<NEW_LINE>writer.suppressWarn... | writer.getGenericName(true, model); |
1,294,228 | /* Generate a new B_n by a standard double sum.<NEW_LINE>* @param n The index of the Bernoulli number.<NEW_LINE>* @return The Bernoulli number at n.<NEW_LINE>*/<NEW_LINE>private Rational doubleSum(int n) {<NEW_LINE>Rational resul = Rational.ZERO;<NEW_LINE>for (int k = 0; k <= n; k++) {<NEW_LINE>Rational jsum = Rational... | .valueOf(j + 1)); |
1,765,420 | public void read(org.apache.thrift.protocol.TProtocol prot, TTransaction struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;<NEW_LINE>java.util.BitSet incoming = iprot.readBitSet(6);<NEW_LINE>if (incoming.get(0)) {<NE... | .skippedNewCount = iprot.readI64(); |
720,871 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player controller = game.getPlayer(source.getControllerId());<NEW_LINE>if (controller == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (!controller.chooseUse(Outcome.PutCardInPlay, "Put a planeswalker card from your hand onto the battlefield?", source, ... | TargetCardInHand target = new TargetCardInHand(filter); |
690,425 | protected JavaType _fromParamType(ClassStack context, ParameterizedType ptype, TypeBindings parentBindings) {<NEW_LINE>// Assumption here is we'll always get Class, not one of other Types<NEW_LINE>Class<?> rawType = (Class<?>) ptype.getRawType();<NEW_LINE>// 29-Oct-2015, tatu: For performance reasons, let's streamline ... | TypeBindings.create(rawType, pt); |
418,076 | public void handleEvent(Event event) {<NEW_LINE><MASK><NEW_LINE>if (StringUtil.isEmpty(name)) {<NEW_LINE>MessageDialog.openWarning(dialog, "Required Name", "Name is required.");<NEW_LINE>nameTxt.setFocus();<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (groupList.contains(name)) {<NEW_LINE>MessageDialog.openWarning(dialog, "... | String name = nameTxt.getText(); |
458,036 | public LineItemFields unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>LineItemFields lineItemFields = new LineItemFields();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<... | String currentParentElement = context.getCurrentParentElement(); |
301,193 | public static TruthSensitivityTranche findTranche(final List<VariantDatum> data, final SelectionMetric metric, final double trancheThreshold, final VariantRecalibratorArgumentCollection.Mode model) {<NEW_LINE>logger.info(String.format(" TruthSensitivityTranche threshold %.2f => selection metric threshold %.3f", tranch... | metricThreshold = metric.getThreshold(trancheThreshold); |
595,304 | private void storeAsBinary(MySQLTimeVal timeVal) {<NEW_LINE>int scale = fieldType.getScale();<NEW_LINE>byte[] bytes = packedBinary;<NEW_LINE>long sec = timeVal.getSeconds();<NEW_LINE>long nano = timeVal.getNano();<NEW_LINE>// to store seconds value<NEW_LINE>int i0 = (int) sec;<NEW_LINE>bytes[3] = (byte) (i0 & 0xFF);<NE... | (byte) (i1 & 0xFF); |
1,452,204 | void genAttribute(String name, AttrProp attr) {<NEW_LINE>String constName = Common.constName(attr.getDtdName());<NEW_LINE>gen("this.createAttribute(");<NEW_LINE>if (name != null)<NEW_LINE>gen(name, ", ");<NEW_LINE>gen("\"", attr.getDtdName(), "\", ");<NEW_LINE>gen("\"", <MASK><NEW_LINE>cr();<NEW_LINE>gentab(4);<NEW_LIN... | attr.getName(), "\", "); |
930,130 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wo wo = null;<NEW_LINE... | ), o.getId()); |
1,245,652 | public boolean retrieveMessages(@NonNull Context context, long showNotificationAfterMs, MessageRetrievalStrategy... strategies) {<NEW_LINE>if (shouldIgnoreFetch()) {<NEW_LINE>Log.i(TAG, "Skipping retrieval -- app is in the foreground.");<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (!ACTIVE_LOCK.tryAcquire()) {<NEW_LIN... | .toMillis(60), WAKE_LOCK_TAG); |
1,613,714 | private void notifySectionItemRangeInserted(int sectionIndex, int fromPosition, int number, boolean updateSelectionState) {<NEW_LINE>if (sections == null) {<NEW_LINE>buildSectionIndex();<NEW_LINE>notifyAllSectionsDataSetChanged();<NEW_LINE>} else {<NEW_LINE>buildSectionIndex();<NEW_LINE>Section section = this.sections.... | fromPosition + " exceeds sectionIndex numberOfItems: " + section.numberOfItems); |
1,534,571 | public void doFilter(ServletRequest sRequest, ServletResponse sResponse, FilterChain chain) throws IOException, ServletException {<NEW_LINE>HttpServletRequest request = (HttpServletRequest) sRequest;<NEW_LINE>HttpServletResponse response = (HttpServletResponse) sResponse;<NEW_LINE>HttpSession session = request.getSessi... | String) session.getAttribute(SESSION_ATTR); |
1,441,658 | final CloseInstancePublicPortsResult executeCloseInstancePublicPorts(CloseInstancePublicPortsRequest closeInstancePublicPortsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(closeInstancePublicPortsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | addHandlerContext(HandlerContextKey.ADVANCED_CONFIG, advancedConfig); |
431,091 | final ListBudgetsForResourceResult executeListBudgetsForResource(ListBudgetsForResourceRequest listBudgetsForResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listBudgetsForResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "ListBudgetsForResource"); |
1,715,270 | public Long sumSeriousLateUnitForDayWithMonth(String year, String month, String unit) throws Exception {<NEW_LINE>EntityManager em = this.entityManagerContainer().get(StatisticDingdingUnitForDay.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<Long> query = cb.createQuery(Long.class... | StatisticDingdingUnitForDay_.o2Unit), unit)); |
1,653,046 | private void applyComponentChanges(Module context, EntityData.Prefab prefabData, PrefabData result) {<NEW_LINE>for (String removedComponent : prefabData.getRemovedComponentList()) {<NEW_LINE>ComponentMetadata<?> metadata = componentLibrary.resolve(removedComponent, context);<NEW_LINE>if (metadata != null) {<NEW_LINE>re... | removeComponent(metadata.getType()); |
20,262 | private static void parseEJBsAnnotation(final AnnotationModelHelper helper, TypeElement typeElement, final List<EjbRef> resultEjbRefs, final List<EjbLocalRef> resultEjbLocalRefs) {<NEW_LINE>Map<String, ? extends AnnotationMirror> annByType = helper.getAnnotationsByType(typeElement.getAnnotationMirrors());<NEW_LINE>// N... | Object arrayMemberValue = arrayMember.getValue(); |
842,198 | private static void search(File root, final List<String> exts, List<FileMeta> items) {<NEW_LINE>if (root.isFile() && endWith(root.getName(), exts)) {<NEW_LINE>final FileMeta e = new FileMeta(root.getPath());<NEW_LINE>e.setTitle(root.getName());<NEW_LINE>items.add(e);<NEW_LINE>LOG.d("find-root", root.getPath());<NEW_LIN... | "find-add-folder", file.getPath()); |
735,123 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_viewpagertab2);<NEW_LINE>setSupportActionBar((Toolbar) findViewById(R.id.toolbar));<NEW_LINE>ViewCompat.setElevation(findViewById(R.id.header), getResources().getDimension(R.dimen.... | = new NavigationAdapter(getSupportFragmentManager()); |
238,585 | public static void main(String[] args) {<NEW_LINE>// Instantiate a client that will be used to call the service.<NEW_LINE>TextAnalyticsClient client = new TextAnalyticsClientBuilder().credential(new AzureKeyCredential("{key}")).endpoint("{endpoint}").buildClient();<NEW_LINE>// The text that needs be analyzed.<NEW_LINE>... | ), scores.getNegative()); |
1,844,167 | // shares lots of code with inot; candidate for refactoring<NEW_LINE>@Override<NEW_LINE>public MappeableContainer not(final int firstOfRange, final int lastOfRange) {<NEW_LINE>// TODO: may need to convert to a RunContainer<NEW_LINE>// TODO: this can be optimized for performance<NEW_LINE>if (firstOfRange >= lastOfRange)... | ] = content.get(i); |
1,316,046 | public static DescribeDevicesResponse unmarshall(DescribeDevicesResponse describeDevicesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDevicesResponse.setRequestId(_ctx.stringValue("DescribeDevicesResponse.RequestId"));<NEW_LINE>describeDevicesResponse.setMessage(_ctx.stringValue("DescribeDevicesResponse.Messag... | ("DescribeDevicesResponse.Data.Records[" + i + "].Longitude")); |
318,309 | private static String replaceOld(final String aInput, final String aOldPattern, final String aNewPattern) {<NEW_LINE><MASK><NEW_LINE>// startIdx and idxOld delimit various chunks of aInput; these<NEW_LINE>// chunks always end where aOldPattern begins<NEW_LINE>int startIdx = 0;<NEW_LINE>int idxOld = 0;<NEW_LINE>while ((... | final StringBuilder result = new StringBuilder(); |
1,399,018 | public static int mixColors(int startColor, int endColor, float fraction) {<NEW_LINE>// taken from ArgbEvaluator.evaluate<NEW_LINE>int startA = (startColor >> 24) & 0xff;<NEW_LINE>int startR = (startColor >> 16) & 0xff;<NEW_LINE>int startG = (startColor >> 8) & 0xff;<NEW_LINE>int startB = startColor & 0xff;<NEW_LINE>in... | (endB - startB)))); |
1,770,645 | final BatchRevokePermissionsResult executeBatchRevokePermissions(BatchRevokePermissionsRequest batchRevokePermissionsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchRevokePermissionsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_... | awsRequestMetrics.startEvent(Field.RequestMarshallTime); |
1,507,513 | public void marshall(ConnectorProfile connectorProfile, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (connectorProfile == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(connectorProfile.getConnectorProfile... | connectorProfile.getConnectorProfileName(), CONNECTORPROFILENAME_BINDING); |
723,323 | public boolean action(Request request, Response response) {<NEW_LINE>if (request.getNettyRequest() instanceof FullHttpRequest) {<NEW_LINE>InputBlacklistRequest inputData = getRequestBody(request.getNettyRequest(), InputBlacklistRequest.class);<NEW_LINE>if (inputData != null && !StringUtil.isNullOrEmpty(inputData.getUse... | fromCode(byteBuf.readByte()); |
1,718,241 | private static void sortAndAddMapEntriesToList(@NonNull final Multimap<IPair<String, AttributeId>, AttributeValueId> groupNameToAttributeValueIds, @NonNull final Builder<DimensionSpecGroup> list) {<NEW_LINE>final Collection<Entry<IPair<String, AttributeId>, Collection<AttributeValueId>>> //<NEW_LINE>entrySet = groupNam... | groupNameTrl = TranslatableStrings.constant(groupName); |
1,240,431 | protected void doInAfterTrace(SpanEventRecorder recorder, Object target, Object[] args, Object result, Throwable throwable) {<NEW_LINE>try {<NEW_LINE>if (result instanceof Future && ((Future) result).isCompleted()) {<NEW_LINE>Option value = ((Future) result).value();<NEW_LINE>if (value == null) {<NEW_LINE>return;<NEW_L... | StatusCode status = response.status(); |
822,416 | private void transferFile() {<NEW_LINE>dumpParams();<NEW_LINE>// source includes /mnt/sdcard/ which would be prefixed again by the file transfer service, therefore we need to delete it<NEW_LINE>String source = path;<NEW_LINE>int sdcardPathPos = path.indexOf("/mnt/sdcard/");<NEW_LINE>if (sdcardPathPos == 0)<NEW_LINE>// ... | putExtra(FileTransferService.Source, source); |
1,609,528 | public Point locate() {<NEW_LINE>AppThread.exec(contextItem.statusCode, () -> {<NEW_LINE>validate(false);<NEW_LINE>node.eval(SCROLL_INTO_VIEW);<NEW_LINE>return null;<NEW_LINE>});<NEW_LINE>return AppThread.exec(contextItem.statusCode, () -> {<NEW_LINE>validate(true);<NEW_LINE>JSObject obj = (JSObject) node.call("getBoun... | ("left").toString()); |
466,242 | private static void traverse(Object value, Function<DslProperty<?>, Object> dslPropertyValueProvider, String path, Generators generators, Category category) {<NEW_LINE>Object v = value;<NEW_LINE>if (v instanceof DslProperty) {<NEW_LINE>v = dslPropertyValueProvider.apply((DslProperty<?>) v);<NEW_LINE>}<NEW_LINE>if (v in... | path, new RandomStringGenerator(10)); |
1,530,728 | private static String convert(String strNum, int srcRadix, int destRadix) {<NEW_LINE>if (srcRadix == destRadix) {<NEW_LINE>return strNum;<NEW_LINE>}<NEW_LINE>int len = strNum.length();<NEW_LINE>if (len == 0) {<NEW_LINE>return strNum;<NEW_LINE>}<NEW_LINE>// if (srcRadix <= Character.MAX_RADIX && destRadix <= Character.M... | bi0 = BigInteger.valueOf(0); |
590,771 | private static void create(SharedLibrary EGL) {<NEW_LINE>try {<NEW_LINE>create((FunctionProvider) new SharedLibrary.Delegate(EGL) {<NEW_LINE><NEW_LINE>private final long eglGetProcAddress = library.getFunctionAddress("eglGetProcAddress");<NEW_LINE><NEW_LINE>{<NEW_LINE>if (eglGetProcAddress == NULL) {<NEW_LINE>throw new... | ("Failed to locate address for EGL function " + memASCII(functionName)); |
1,430,296 | final UpdatePipelineResult executeUpdatePipeline(UpdatePipelineRequest updatePipelineRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePipelineRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,302,541 | public static LayerDrawable buildLayerDrawable(final InsetsBuilder insetsBuilder, final int layersInitialCapacity, final int insetsInitialCapacity) {<NEW_LINE>// Set initial capacities to the maximum of layers and insets to avoid dynamic reallocation<NEW_LINE>final List<Drawable> layers = new ArrayList<>(layersInitialC... | (index, temp[1]); |
1,159,134 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>return srcSequence.minp(null, option, ctx);<NEW_LINE>} else if (param.isLeaf()) {<NEW_LINE>Expression exp = param.getLeafExpression();<NEW_LINE>return srcSequence.minp(exp, option, ctx);<NEW_LINE>} else {<NEW_LINE>if (param.getSubSize() != 2)... | param1 = param.getSub(1); |
355,684 | protected BuildActionResult executeBuild(Build build, DaemonClientConnection connection, BuildCancellationToken cancellationToken, BuildEventConsumer buildEventConsumer) throws DaemonInitialConnectException {<NEW_LINE>Object result;<NEW_LINE>try {<NEW_LINE>LOGGER.debug("Connected to daemon {}. Dispatching request {}.",... | result, connection.getDaemon()); |
1,851,104 | private void removeInput(int index, int oldCount) {<NEW_LINE>// force an Entry column of each row.input to 'x', then remove it<NEW_LINE>// _0001000<NEW_LINE>final var b = (1 << (oldCount - 1 - index));<NEW_LINE>final var changed = new boolean[columns.size()];<NEW_LINE>// loop rows by index to avoid java.util.Concurrent... | var dc = r.dcMask(); |
1,093,935 | public boolean eIsSet(int featureID) {<NEW_LINE>switch(featureID) {<NEW_LINE>case IArchimatePackage.DIAGRAM_MODEL__NAME:<NEW_LINE>return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);<NEW_LINE>case IArchimatePackage.DIAGRAM_MODEL__ID:<NEW_LINE>return ID_EDEFAULT == null ? id != null : !ID_EDEFAULT.... | : !DOCUMENTATION_EDEFAULT.equals(documentation); |
567,447 | public void paintBackgroundGrid(Graphics2D g2) {<NEW_LINE>Rectangle visible = g2.getClipBounds();<NEW_LINE>final double x0 = visible.x - 3;<NEW_LINE>final double x1 = visible.x + visible.width + 4;<NEW_LINE>final double y0 = visible.y - 3;<NEW_LINE>final double y1 = visible.y + visible.height + 4;<NEW_LINE>final float ... | g2.setColor(FinPointFigure.GRID_MINOR_LINE_COLOR); |
955,061 | public static void main(String[] args) {<NEW_LINE>WriteDataOptions options = PipelineOptionsFactory.fromArgs(args).withValidation().as(WriteDataOptions.class);<NEW_LINE>Pipeline p = Pipeline.create(options);<NEW_LINE>CloudBigtableTableConfiguration bigtableTableConfig = new CloudBigtableTableConfiguration.Builder().wit... | ("C"), timestamp, b); |
283,892 | static void attachBaseContext() {<NEW_LINE>Log.i(Consts.TAG, "ARouter start attachBaseContext");<NEW_LINE>try {<NEW_LINE>Class<?> mMainThreadClass = Class.forName("android.app.ActivityThread");<NEW_LINE>// Get current main thread.<NEW_LINE>Method getMainThread = mMainThreadClass.getDeclaredMethod("currentActivityThread... | mInstrumentationField = mMainThreadClass.getDeclaredField("mInstrumentation"); |
1,834,826 | public void assertBasePricingIsValid(final I_M_PriceList priceList) {<NEW_LINE>final IPriceListDAO priceListsRepo = Services.get(IPriceListDAO.class);<NEW_LINE>// final PriceListVersionId basePriceListVersionId = priceListsRepo.getBasePriceListVersionIdForPricingCalculationOrNull(plv);<NEW_LINE>// if (basePriceListVers... | AdempiereException("@PriceListAndBasePriceListCountryMismatchError@").markAsUserValidationError(); |
445,202 | public AuthenticationResponse createAuthenticationResponse(String providerName, OpenIdTokenResponse tokenResponse, OpenIdClaims openIdClaims, @Nullable State state) {<NEW_LINE>// get the current OIDC provider<NEW_LINE>Oidc.Provider <MASK><NEW_LINE>// get username and groups declared from OIDC system<NEW_LINE>String oid... | provider = oidc.getProvider(providerName); |
845,517 | protected Map receiveRequest(DHTTransportUDPContact originator, Map data) {<NEW_LINE>int type = ((Long) data.get("type")).intValue();<NEW_LINE>if (type >= 0 && type < MESSAGE_STATS.length) {<NEW_LINE>MESSAGE_STATS[type]++;<NEW_LINE>}<NEW_LINE>Map response = new HashMap();<NEW_LINE>switch(type) {<NEW_LINE>case RT_BIND_R... | "type", new Long(RT_QUERY_REPLY)); |
1,618,214 | public void propertyChange(PropertyChangeEvent e) {<NEW_LINE>log.finer("Property change event on local service: " + e.getPropertyName());<NEW_LINE>// Prevent recursion<NEW_LINE>if (e.getPropertyName().equals(EVENTED_STATE_VARIABLES))<NEW_LINE>return;<NEW_LINE>String[] variableNames = ModelUtil.fromCommaSeparatedList(e.... | + Arrays.toString(variableNames)); |
55,297 | protected void writeAuditSuppressCriteriaList(JsonWriter writer, List<AuditSuppressCriteria> list) {<NEW_LINE>if (list.isEmpty())<NEW_LINE>return;<NEW_LINE>writer.writeStartArray("dcmAuditSuppressCriteria");<NEW_LINE>for (AuditSuppressCriteria suppressCriteria : list) {<NEW_LINE>writer.writeStartObject();<NEW_LINE>writ... | "dcmParticipantObjectDataLifeCycle", suppressCriteria.getParticipantObjectDataLifeCycle()); |
221,528 | public Void visit(SqlCall call) {<NEW_LINE>// ignore window aggregates and ranking functions (associated with OVER<NEW_LINE>// operator)<NEW_LINE>if (call.getOperator().getKind() == SqlKind.OVER) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (call.getOperator().getKind() == SqlKind.FILTER) {<NEW_LINE>// the WHERE in a... | forEach(this.orderList::add); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.