idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
126,397 | public boolean execute(Object object) throws ContractExeException {<NEW_LINE>TransactionResultCapsule ret = (TransactionResultCapsule) object;<NEW_LINE>if (Objects.isNull(ret)) {<NEW_LINE>throw new RuntimeException(ActuatorConstant.TX_RESULT_NULL);<NEW_LINE>}<NEW_LINE>long fee = calcFee();<NEW_LINE>AccountStore account... | ContractExeException(e.getMessage()); |
400,141 | List<MethodNode> generateAccessors() {<NEW_LINE>this.activities.clear();<NEW_LINE>List<MethodNode> methods = new ArrayList<MethodNode>();<NEW_LINE>try {<NEW_LINE>IActivity accessorActivity = this.activities.begin("Locate");<NEW_LINE>IActivity locateActivity = this.activities.begin("?");<NEW_LINE>for (AccessorInfo acces... | next(accessor.toString()); |
177,704 | public Long latestModificationRunByPipeline(final CaseInsensitiveString pipelineName, final Material material) {<NEW_LINE>final long materialId = findMaterialInstance(material).getId();<NEW_LINE>String key = cacheKeyForLatestPmrForPipelineKey(materialId, pipelineName.toLower());<NEW_LINE>Long modificationId = (Long) go... | createSQLQuery("SELECT MAX(pmr.toRevisionId) toRevisionId " + "FROM (SELECT torevisionid, pipelineid FROM pipelineMaterialRevisions WHERE materialid = :material_id) AS pmr\n" + "INNER JOIN pipelines p ON ( p.name = :pipeline_name AND p.id = pmr.pipelineId)"); |
1,297,624 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jScrollPane1 = new javax.swing.JScrollPane();<NEW_LINE>jEditorPane1 = new javax.swing.JEditorPane();<NEW_LINE>setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE)... | swing.GroupLayout(getContentPane()); |
236,813 | // DO NOT MODIFY THIS CODE, GENERATED AUTOMATICALLY<NEW_LINE>public static boolean isStatic0(com.sun.jdi.ReferenceType a) {<NEW_LINE>if (org.netbeans.modules.debugger.jpda.JDIExceptionReporter.isLoggable()) {<NEW_LINE>org.netbeans.modules.debugger.jpda.JDIExceptionReporter.logCallStart("com.sun.jdi.ReferenceType", "isS... | Mirror) a).virtualMachine(); |
1,561,889 | public void release(final Session<?> session, final BackgroundException failure) {<NEW_LINE>if (log.isInfoEnabled()) {<NEW_LINE>log.info(String.format("Release session %s to pool", session));<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>if (diagnostics.determine(failure) == FailureDiagnostics.Type.network) {<NEW_LINE>log.warn(St... | , e.getMessage())); |
301,089 | public void loadAd(@NonNull Context context, @NonNull List<Banner> banners) {<NEW_LINE>LOGGER.i(TAG, "Load ads for " + banners);<NEW_LINE>detach();<NEW_LINE>cancel();<NEW_LINE>mLoadingCompleted = false;<NEW_LINE>mFailedProviders.clear();<NEW_LINE>if (banners.size() == 0)<NEW_LINE>return;<NEW_LINE>for (Banner banner : b... | context, banner.getId()); |
736,467 | public KinesisAction unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>KinesisAction kinesisAction = new KinesisAction();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<... | JsonToken token = context.getCurrentToken(); |
25,105 | public PatternParameterConfigurator byType(CtTypeReference<?> type) {<NEW_LINE>ParameterInfo pi = getCurrentParameter();<NEW_LINE>// substitute all references (with same actual type arguments too) to that type<NEW_LINE>queryModel().filterChildren((CtTypeReference<?> typeRef) -> typeRef.equals(type)).forEach((CtTypeRefe... | (typeQName)).first(); |
1,325,550 | public static HistoricDecisionOutputInstanceDto fromHistoricDecisionOutputInstance(HistoricDecisionOutputInstance historicDecisionOutputInstance) {<NEW_LINE>HistoricDecisionOutputInstanceDto dto = new HistoricDecisionOutputInstanceDto();<NEW_LINE>dto.id = historicDecisionOutputInstance.getId();<NEW_LINE>dto.decisionIns... | .ruleOrder = historicDecisionOutputInstance.getRuleOrder(); |
1,136,243 | private final Condition matchByConflictingKeys(Context<?> ctx, Table<?> s) {<NEW_LINE>Condition or = null;<NEW_LINE>// [#7365] The ON CONFLICT (column list) clause can be emulated using MERGE by<NEW_LINE>// joining the MERGE's target and source tables on the conflict columns<NEW_LINE>// [#7409] The ON CONFLICT ON CONST... | , s.field(f)); |
1,646,287 | private void populateFields() {<NEW_LINE>if (caCert != null) {<NEW_LINE>jdnCrlIssuer.setDistinguishedName(X500NameUtils.x500PrincipalToX500Name(caCert.getSubjectX500Principal()));<NEW_LINE>}<NEW_LINE>if (crlOld == null) {<NEW_LINE>Date startDate = jdtEffectiveDate.getDateTime();<NEW_LINE>jdtNextUpdate.setDateTime<MASK>... | (jvpValidityPeriod.getValidityEnd(startDate)); |
333,088 | protected void assemble(Fields fields) {<NEW_LINE>// Keep a local cache of converted fields so as not to create redundant<NEW_LINE>// objects.<NEW_LINE>HashMap<Object, Object> converted = new HashMap<Object, Object>();<NEW_LINE>// Convert duration fields...<NEW_LINE>fields.eras = convertField(fields.eras, converted);<N... | convertField(fields.millisOfDay, converted); |
412,531 | public void upgradeOsIn(CloudName cloudName, Version version, Duration upgradeBudget, boolean force) {<NEW_LINE>if (version.isEmpty()) {<NEW_LINE>throw new IllegalArgumentException("Invalid version '" + version.toFullString() + "'");<NEW_LINE>}<NEW_LINE>if (!clouds().contains(cloudName)) {<NEW_LINE>throw new IllegalArg... | (targets.values())); |
1,654,889 | public static Stream<?> toStream(Object object) {<NEW_LINE>Preconditions.notNull(object, "Object must not be null");<NEW_LINE>if (object instanceof Stream) {<NEW_LINE>return (Stream<?>) object;<NEW_LINE>}<NEW_LINE>if (object instanceof DoubleStream) {<NEW_LINE>return ((DoubleStream) object).boxed();<NEW_LINE>}<NEW_LINE... | IntStream) object).boxed(); |
1,462,873 | public final void paint(Graphics g) {<NEW_LINE>super.paint(g);<NEW_LINE>Graphics2D g2 = (Graphics2D) g;<NEW_LINE>// Store non-transparent composite<NEW_LINE>Composite old = g2.getComposite();<NEW_LINE>g2.setColor(textColor);<NEW_LINE>// 40% transparency<NEW_LINE>g2.setComposite(AlphaComposite.getInstance(AlphaComposite... | 1, getHeight() - 1); |
1,512,555 | /*<NEW_LINE>* Build an array of directories to search<NEW_LINE>*/<NEW_LINE>private static String[] buildVariants(String root) {<NEW_LINE>if (nlSuffixes == null) {<NEW_LINE>// build list of suffixes for loading resource bundles<NEW_LINE>String nl = Locale.getDefault().toString();<NEW_LINE>ArrayList result = new ArrayLis... | nl.substring(0, lastSeparator); |
581,925 | public static JibContainerBuilder toJibContainerBuilder(Path projectRoot, Path buildFilePath, Build buildCommandOptions, CommonCliOptions commonCliOptions, ConsoleLogger logger) throws InvalidImageReferenceException, IOException {<NEW_LINE>BuildFileSpec buildFile = toBuildFileSpec(buildFilePath, buildCommandOptions.get... | setEnvironment(buildFile.getEnvironment()); |
590,459 | private CompletableFuture<List<Wo>> listFuture(String flag) {<NEW_LINE>return CompletableFuture.supplyAsync(() -> {<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>Business business = new Business(emc);<NEW_LINE>List<Rea... | copyTo(wo, true, "type"); |
1,107,869 | public Set<? extends Trigger> annotationProcessingEnabled() {<NEW_LINE>Set<Trigger> result = triggerCache;<NEW_LINE>if (result != null) {<NEW_LINE>return result;<NEW_LINE>}<NEW_LINE>result = EnumSet.noneOf(Trigger.class);<NEW_LINE>if (ap != null) {<NEW_LINE>for (Element e : XMLUtil.findSubElements(ap)) {<NEW_LINE>if (e... | (helper.getProjectDirectory())); |
935,313 | private static void tryAssertionMinMax(RegressionEnvironment env, boolean soda, AtomicInteger milestone) {<NEW_LINE>String[] fields = "maxb,maxu,minb,minu".split(",");<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>String eplDeclare = "@public create table varagg (" + "maxb max(int), maxu maxever(int), m... | compileDeploy(soda, eplDeclare, path); |
638,430 | Pair<String, List<SqlStatement.Type>> generateSelectForLevels(DataSource dataSource, RolapCube baseCube, WhichSelect whichSelect, List<TargetBase> targetGroup) {<NEW_LINE>String s = "while generating query to retrieve members of level(s) " + targets;<NEW_LINE>// Allow query to use optimization hints from the table defi... | chooseAggStar(constraint, evaluator, baseCube); |
413,123 | final RegisterInstancesWithLoadBalancerResult executeRegisterInstancesWithLoadBalancer(RegisterInstancesWithLoadBalancerRequest registerInstancesWithLoadBalancerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(registerInstancesWithLoadBalancerRequest);<NEW_LINE>AWSRequestMetrics awsRequest... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
730,779 | public boolean execute(CommandSender sender, String commandLabel, String[] args, CommandMessages commandMessages) {<NEW_LINE>if (!testPermission(sender, commandMessages.getPermissionMessage())) {<NEW_LINE>return true;<NEW_LINE>}<NEW_LINE>if (args.length < 2) {<NEW_LINE>sendUsageMessage(sender, commandMessages);<NEW_LIN... | (sender, args[0]); |
320,483 | public BatchDetectKeyPhrasesResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchDetectKeyPhrasesResult batchDetectKeyPhrasesResult = new BatchDetectKeyPhrasesResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | )).unmarshall(context)); |
407,913 | private void signUsingWallet() throws Exception {<NEW_LINE>WalletLoader loader = new WalletLoader();<NEW_LINE>loader.ensureDoesNotExist(walletID);<NEW_LINE>Service.CommandRequest.Builder builder = Service.CommandRequest.newBuilder();<NEW_LINE>Service.CommandRequest.SignTxRequest.Builder internalBuilder = Service.Comman... | setSignTx(internalBuilder.build()); |
1,732,954 | public RuleResult execute(Map<String, String> ruleParam, Map<String, String> resourceAttributes) {<NEW_LINE>logger.debug("========CheckAWSConfigEnabled started=========");<NEW_LINE>Map<String, Object> map = null;<NEW_LINE>AmazonConfigClient awsConfigClient = null;<NEW_LINE>String roleIdentifyingString = ruleParam.get(P... | logger.info(PacmanRuleConstants.MISSING_CONFIGURATION); |
1,240,141 | private Node findByKey(Node node, byte[] key, int depth) {<NEW_LINE>while (node != null) {<NEW_LINE>if (node.nodeType == NodeType.LEAF_NODE) {<NEW_LINE>LeafNode leafNode = (LeafNode) node;<NEW_LINE>byte[] leafNodeKeyBytes = leafNode.getKeyBytes();<NEW_LINE>if (depth == LeafNode.LEAF_NODE_KEY_LENGTH_IN_BYTES) {<NEW_LINE... | key, depth, LeafNode.LEAF_NODE_KEY_LENGTH_IN_BYTES); |
1,709,249 | public Request<ListTopicsDetectionJobsRequest> marshall(ListTopicsDetectionJobsRequest listTopicsDetectionJobsRequest) {<NEW_LINE>if (listTopicsDetectionJobsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListTopicsDetectionJobsRequest)");<NEW_LINE>}<NEW_LINE>Request<Lis... | jsonWriter = JsonUtils.getJsonWriter(stringWriter); |
119,675 | public CodeValidationResult validateCode(ConceptValidationOptions theOptions, IIdType theValueSetId, String theValueSetIdentifier, String theCodeSystemIdentifierToValidate, String theCodeToValidate, String theDisplayToValidate, IBaseDatatype theCodingToValidate, IBaseDatatype theCodeableConceptToValidate) {<NEW_LINE>Co... | (CommonCodeSystemsTerminologyService.getValueSetUrl(valueSet)); |
1,828,235 | public boolean updateSettings(final ZyGraphViewSettings settings) {<NEW_LINE>final boolean needsLayouting = settings.getLayoutSettings().getHierarchicalSettings().getMinimumLayerDistance() != Integer.valueOf(m_tfHierarchicMinLayerDistance.getText()) || settings.getLayoutSettings().getHierarchicalSettings().getMinimumNo... | parseInt(m_cbHierarchicEdgeRoutingStyle.getSelectedIndex()); |
979,242 | public <T extends Event> void unregisterEventReceiver(EventReceiver<T> eventReceiver, Class<T> eventClass, Class<? extends Component>... componentTypes) {<NEW_LINE>SetMultimap<Class<? extends Component>, EventSystemReplayImpl.EventHandlerInfo> eventHandlerMap = componentSpecificHandlers.get(eventClass);<NEW_LINE>if (ev... | eventHandlerMap.remove(c, testReceiver); |
1,182,637 | private boolean processComplementData() throws Exception {<NEW_LINE>if (!needComplementProcess()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (processInstance.getState() == ExecutionStatus.READY_STOP) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Date scheduleDate = processInstance.getScheduleTime();<NEW_LINE>if (sc... | ), complementListDate.toString()); |
81,105 | public com.amazonaws.services.opensearch.model.InternalException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.opensearch.model.InternalException internalException = new com.amazonaws.services.opensearch.model.InternalException(null);<NEW_LINE>int originalDept... | JsonToken token = context.getCurrentToken(); |
1,465,422 | private void sendPayerApprovalRequestEmail(@NonNull final PaymentReservation reservation, @NonNull final URL payerApproveUrl, @NonNull final MailTemplateId mailTemplateId) {<NEW_LINE>final MailTextBuilder mailTextBuilder = mailService.newMailTextBuilder(mailTemplateId);<NEW_LINE>mailTextBuilder.bpartnerContact(reservat... | -> mailService.send(email)); |
498,020 | private void updateAllocation(@Nullable final I_M_HU luHU, @Nullable final I_M_HU tuHU, @Nullable final I_M_HU cuHU, @Nullable final Quantity qtyCU, final boolean negateQtyCU, final IHUContext localHuContext) {<NEW_LINE>final List<I_M_HU> cuHUsToUse;<NEW_LINE>if (cuHU == null) {<NEW_LINE>Check.assumeNotNull(tuHU, "tuHU... | final IHUProductStorage singleProductStorage = getSingleProductStorage(currentCuHU); |
1,842,770 | private void handle(final APIUpdateCephBackupStorageMonMsg msg) {<NEW_LINE>final APIUpdateCephBackupStorageMonEvent evt = new APIUpdateCephBackupStorageMonEvent(msg.getId());<NEW_LINE>CephBackupStorageMonVO monvo = dbf.findByUuid(msg.getMonUuid(), CephBackupStorageMonVO.class);<NEW_LINE>if (msg.getHostname() != null) {... | setSshPort(msg.getSshPort()); |
888,464 | public static String suggest(String unknownField, Iterable<String> candidates) {<NEW_LINE>// TODO it'd be nice to combine this with BaseRestHandler's implementation.<NEW_LINE>LevenshteinDistance ld = new LevenshteinDistance();<NEW_LINE>final List<Tuple<Float, String>> scored = new ArrayList<>();<NEW_LINE>for (String ca... | ).collect(toList()); |
977,137 | public BuiltInScalarFunctionImplementation specialize(BoundVariables boundVariables, int arity, FunctionAndTypeManager functionAndTypeManager) {<NEW_LINE>Type keyType = boundVariables.getTypeVariable("K");<NEW_LINE>Type inputValueType1 = boundVariables.getTypeVariable("V1");<NEW_LINE>Type inputValueType2 = boundVariabl... | keyType))).getMethodHandle(); |
1,811,274 | private boolean incrementalBuildLoop() throws CoreException {<NEW_LINE>int compileLoop = 0;<NEW_LINE>float increment = 0.40f;<NEW_LINE>while (this.sourceFiles.size() > 0) {<NEW_LINE>// added to in acceptResult<NEW_LINE>if (++compileLoop > MaxCompileLoop) {<NEW_LINE>if (JavaBuilder.DEBUG)<NEW_LINE>// $NON-NLS-1$<NEW_LIN... | setProgressPerCompilationUnit(increment / allSourceFiles.length); |
321,357 | /* Build call for apisApiIdDocumentsDocumentIdDelete */<NEW_LINE>private com.squareup.okhttp.Call apisApiIdDocumentsDocumentIdDeleteCall(String apiId, String documentId, String ifMatch, String ifUnmodifiedSince, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListe... | localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); |
1,064,168 | private void load() {<NEW_LINE>// String pkg = Scaner.cutOutLast(LifeControl.class.getName(), ".");<NEW_LINE>// Set<String> classes = new Scaner(pkg).process();<NEW_LINE>Iterator<String> itr = classSet.iterator();<NEW_LINE>while (itr.hasNext()) {<NEW_LINE>try {<NEW_LINE>Class c = Class.forName(itr.next());<NEW_LINE>if ... | ] m = c.getDeclaredMethods(); |
42,815 | public void render(ShaderBannerTileEntity te, float partialTicks, PoseStack matrixStack, MultiBufferSource bufferIn, int combinedLightIn, int combinedOverlayIn) {<NEW_LINE>long time = te.getWorldNonnull().getGameTime();<NEW_LINE>matrixStack.pushPose();<NEW_LINE>// Check which of the two blocks we are so we can calculat... | ) (orientation * 360) / 16.0F; |
1,790,115 | static FlagGroup flagGroupFromStarlark(StarlarkInfo flagGroupStruct) throws EvalException {<NEW_LINE>checkRightProviderType(flagGroupStruct, "flag_group");<NEW_LINE>ImmutableList.Builder<Expandable> expandableBuilder = ImmutableList.builder();<NEW_LINE>ImmutableList<String> <MASK><NEW_LINE>for (String flag : flags) {<N... | flags = getStringListFromStarlarkProviderField(flagGroupStruct, "flags"); |
355,129 | public void write(ByteBuf output, Chunk chunk) throws Exception {<NEW_LINE>output.writeInt(chunk.getX());<NEW_LINE>output.writeInt(chunk.getZ());<NEW_LINE>output.writeBoolean(chunk.isFullChunk());<NEW_LINE>Type.VAR_INT.writePrimitive(output, chunk.getBitmask());<NEW_LINE>Type.NBT.write(output, chunk.getHeightMap());<NE... | ().toArray(EMPTY_COMPOUNDS)); |
696,700 | public void read(org.apache.thrift.protocol.TProtocol iprot, contiuneGetSummaries_result struct) throws org.apache.thrift.TException {<NEW_LINE>org.apache.thrift.protocol.TField schemeField;<NEW_LINE>iprot.readStructBegin();<NEW_LINE>while (true) {<NEW_LINE>schemeField = iprot.readFieldBegin();<NEW_LINE>if (schemeField... | struct.nssi = new NoSuchScanIDException(); |
662,098 | final ListIdentityProviderConfigsResult executeListIdentityProviderConfigs(ListIdentityProviderConfigsRequest listIdentityProviderConfigsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listIdentityProviderConfigsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | false), new ListIdentityProviderConfigsResultJsonUnmarshaller()); |
856,267 | protected void parseCreateField(ParseContext context) throws IOException {<NEW_LINE>final String value;<NEW_LINE>if (context.externalValueSet()) {<NEW_LINE>value = context.externalValue().toString();<NEW_LINE>} else {<NEW_LINE><MASK><NEW_LINE>if (parser.currentToken() == XContentParser.Token.VALUE_NULL) {<NEW_LINE>valu... | XContentParser parser = context.parser(); |
1,521,111 | public void unlinkPaymentsAndDeleteReferences(@NonNull final List<I_C_BankStatementLine> bankStatementLines) {<NEW_LINE>if (bankStatementLines.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>//<NEW_LINE>// Unlink payment from line<NEW_LINE>final ArrayList<BankStatementLineId> bankStatementLineIds = new ArrayList<>();... | ofRepoId(bankStatementLine.getC_BankStatementLine_ID()); |
248,262 | // visible for testing<NEW_LINE>static int[] parseJavaVersion(String v) {<NEW_LINE>final Matcher m = PAT_JAVA_VERSION.matcher(v);<NEW_LINE>if (!m.matches())<NEW_LINE>throw new IllegalArgumentException("Could not parse version: " + v);<NEW_LINE>final int[] ver = new int[5];<NEW_LINE>ver[0] = toInt(m.group("major"));<NEW... | (m.group("patch")); |
734,664 | private static <T> Class<? extends T> generateGroupedStateClass(Class<T> clazz, Map<String, Type> fieldTypes, DynamicClassLoader classLoader) {<NEW_LINE>ClassDefinition definition = new ClassDefinition(a(PUBLIC, FINAL), makeClassName("Grouped" + clazz.getSimpleName()), type(AbstractGroupedAccumulatorState.class), type(... | , type(long.class)); |
715,734 | public okhttp3.Call readNamespacedDeploymentStatusCall(String name, String namespace, String pretty, final ApiCallback _callback) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String localVarPath = "/apis/apps/v1/namespaces/{namespace}/deployments/{nam... | .parameterToPair("pretty", pretty)); |
1,081,469 | public boolean execute(String sql) throws SQLException {<NEW_LINE>if (isClosed())<NEW_LINE>throw TSDBError.createSQLException(TSDBErrorNumbers.ERROR_STATEMENT_CLOSED);<NEW_LINE>Request request = factory.generateQuery(sql);<NEW_LINE>CompletableFuture<Response> send = transport.send(request);<NEW_LINE>Response response;<... | ERROR_INVALID_WITH_EXECUTEQUERY, e.getMessage()); |
1,705,468 | static ActionRequestValidationException validateSeqNoBasedCASParams(DocWriteRequest request, ActionRequestValidationException validationException) {<NEW_LINE>final <MASK><NEW_LINE>final VersionType versionType = request.versionType();<NEW_LINE>if (versionType.validateVersionForWrites(version) == false) {<NEW_LINE>valid... | long version = request.version(); |
1,738,592 | public static void drawBoxShadow(View view, String value) {<NEW_LINE>if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.M) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Log.d("BoxShadowDrawable", "drawBoxShadow");<NEW_LINE>Drawable currentBg = view.getBackground();<NEW_LINE>if (currentBg != null) {<NEW_LINE... | Drawable bg = view.getBackground(); |
439,880 | private Dictionary loadDictionary(String locale, Settings nodeSettings, Environment env) throws Exception {<NEW_LINE>if (logger.isDebugEnabled()) {<NEW_LINE>logger.debug("Loading hunspell dictionary [{}]...", locale);<NEW_LINE>}<NEW_LINE>Path dicDir = hunspellDir.resolve(locale);<NEW_LINE>if (FileSystemUtils.isAccessib... | .ROOT, "Could not find hunspell dictionary [%s]", locale)); |
1,283,600 | final DescribeCertificatesResult executeDescribeCertificates(DescribeCertificatesRequest describeCertificatesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCertificatesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeCertificates"); |
468,475 | public void reparametrizeForUniformDistribution(int resolution) {<NEW_LINE>double curveLength = getLength(resolution * 100);<NEW_LINE>// -- get the length between each new point<NEW_LINE>double segmentDistance = curveLength / resolution;<NEW_LINE>double numSegments = mSegmentLengths.length;<NEW_LINE>List<Vector3> newPo... | ) - 2), controlPoint)); |
810,032 | public WorkerProcess build() {<NEW_LINE>final WorkerJvmMemoryStatus memoryStatus = shouldPublishJvmMemoryInfo ? new WorkerJvmMemoryStatus() : null;<NEW_LINE>final DefaultWorkerProcess workerProcess = new DefaultWorkerProcess(connectTimeoutSeconds, TimeUnit.SECONDS, memoryStatus);<NEW_LINE>ConnectionAcceptor acceptor = ... | (javaCommand.getMinHeapSize())); |
909,269 | public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>HttpSession sess = request.getSession(true);<NEW_LINE>sess.setMaxInactiveInterval(WebEnv.TIMEOUT);<NEW_LINE>ctx = getCtx();<NEW_LINE>if (sess.getAttribute("ctx") != null)<NEW_LINE>ctx = (Propertie... | .setWStore(allIDs[0]); |
950,187 | public static void perform(UiController uiController, View view, @MotionDir int direction, double amountInDP, Float startOffsetPercentX, Float startOffsetPercentY) throws ScrollEdgeException {<NEW_LINE>final int amountInPx = DeviceDisplay.convertDpiToPx(amountInDP);<NEW_LINE>final int safeScrollableRangePx = getViewSaf... | direction, remainder, startOffsetPercentX, startOffsetPercentY); |
947,601 | public static void doArt() {<NEW_LINE>if (artDone)<NEW_LINE>return;<NEW_LINE>artDone = true;<NEW_LINE>Logger.info(com.dotcms.util.AsciiArt.class, " ");<NEW_LINE>Logger.info(com.dotcms.<MASK><NEW_LINE>Logger.info(com.dotcms.util.AsciiArt.c... | util.AsciiArt.class, " "); |
945,132 | private void expirationCheck() {<NEW_LINE>if (expirationLock.tryLock()) {<NEW_LINE>try {<NEW_LINE>LOGGER.debug("Expiration check running");<NEW_LINE>final DaemonExpirationResult result = strategy.checkExpiration(this);<NEW_LINE>switch(result.getStatus()) {<NEW_LINE>case DO_NOT_EXPIRE:<NEW_LINE>break;<NEW_LINE>case QUIE... | LOGGER.error("Problem in daemon expiration check", t); |
1,408,553 | public int read(byte[] buffer, int offset, int length) throws IOException {<NEW_LINE>if (buf == null) {<NEW_LINE>throw new IOException("Stream is closed");<NEW_LINE>}<NEW_LINE>// Force buffer null check first!<NEW_LINE>if (offset > buffer.length || offset < 0) {<NEW_LINE>throw new TArrayIndexOutOfBoundsException("Offse... | buffer, newOffset, length - copiedBytes); |
1,011,939 | private static User loadFromCore(UserId userId, SharedPreferences securePrefs, UserManager userManager, KeyStoreCrypto keyStoreCrypto) throws ApiException, StoreException {<NEW_LINE>// Core UserManager (UserRepository & UserAddressRepository) have a memory cache.<NEW_LINE>// Core UserManager will only do a network call... | .getPrivate() ? 1 : 0; |
1,686,447 | private void dumpColor(PrintWriter out, String key, Color color) {<NEW_LINE>Color[] retBaseColor = new Color[1];<NEW_LINE>Color resolvedColor = resolveDerivedColor(key, color, retBaseColor);<NEW_LINE>if (resolvedColor != color && resolvedColor.getRGB() != color.getRGB()) {<NEW_LINE>if (!isIntelliJTheme) {<NEW_LINE>Syst... | print(function.toString()); |
1,528,112 | public static void main(String[] args) {<NEW_LINE>Exercise24_NonOverlappingIntervalSearch nonOverlappingIntervalSearch = new Exercise24_NonOverlappingIntervalSearch();<NEW_LINE>Interval interval1 = nonOverlappingIntervalSearch.new Interval(1, 1643, 2033);<NEW_LINE>Interval interval2 = nonOverlappingIntervalSearch.new I... | .findInterval(5531) + " Expected: -1"); |
1,637,918 | public Object evaluate(EditorAdaptor vim, Queue<String> command) {<NEW_LINE>if (command.isEmpty()) {<NEW_LINE>try {<NEW_LINE>new ListUserCommandsCommand().execute(vim);<NEW_LINE>} catch (CommandExecutionException e) {<NEW_LINE>vim.getUserInterfaceService().<MASK><NEW_LINE>}<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Str... | setErrorMessage(e.getMessage()); |
1,333,516 | public PropertiesKeyMapper init(String propertyMapName) {<NEW_LINE>InputStream is = checkNotNull(PropertiesKeyMapper.class.getClassLoader().getResourceAsStream(propertyMapName));<NEW_LINE>Scanner scanner = new Scanner(is);<NEW_LINE>while (scanner.hasNextLine()) {<NEW_LINE>String line = StringUtils.<MASK><NEW_LINE>if (l... | trimToEmpty(scanner.nextLine()); |
502,969 | void deletePoiWithDialog(final Entity entity) {<NEW_LINE>boolean nightMode = ((OsmandApplication) activity.getApplication()).getDaynightHelper().isNightModeForMapControls();<NEW_LINE>Context themedContext = UiUtilities.getThemedContext(activity, nightMode);<NEW_LINE>if (entity == null) {<NEW_LINE>Toast.makeText(themedC... | LinearLayout ll = new LinearLayout(themedContext); |
692,187 | public boolean isCaseSensitive() {<NEW_LINE>if (caseSensitive == null) {<NEW_LINE>try {<NEW_LINE>if (getConnection() instanceof JdbcConnection) {<NEW_LINE>String catalog = getConnection().getCatalog();<NEW_LINE>String sql = "SELECT CONVERT([sysname], DATABASEPROPERTYEX(N'" + escapeStringForDatabase(catalog) + "', 'Coll... | && !collation.contains("_CI_"); |
1,255,825 | private void removeBindings() {<NEW_LINE>priceCurrencyLabel.textProperty().unbind();<NEW_LINE>triggerPriceCurrencyLabel.textProperty().unbind();<NEW_LINE>triggerPriceDescriptionLabel.textProperty().unbind();<NEW_LINE>percentagePriceDescriptionLabel.textProperty().unbind();<NEW_LINE>volumeCurrencyLabel.textProperty().un... | .managedProperty().unbind(); |
520,162 | // TODO KHS need to consolidate duplicated functionality that came in from different branches<NEW_LINE>private static List<String> extractNamedParameterPartsAsString(FhirContext theCtx, IBaseParameters theParameters, String thePartName, String theParameterName) {<NEW_LINE>List<IBase> parameterReps = getParameterReps(th... | partNameValue = getNameValue(partValue, partParameterDef); |
668,825 | public LoadResult load(SourceLoader sourceLoader) {<NEW_LINE>if (myGroup == null) {<NEW_LINE>return LoadResult.FAIL;<NEW_LINE>}<NEW_LINE>if (myPass == 0) {<NEW_LINE>myGroup.setModuleScopeProvider<MASK><NEW_LINE>myPass = 1;<NEW_LINE>return LoadResult.CONTINUE;<NEW_LINE>}<NEW_LINE>new DefinitionResolveNameVisitor(Concret... | (sourceLoader.getModuleScopeProvider(myInTests)); |
65,327 | public void load() {<NEW_LINE>ExUtil.asyncRun(new Runnable() {<NEW_LINE><NEW_LINE>public void run() {<NEW_LINE>MapPack mpack = null;<NEW_LINE>TcpProxy tcp = TcpProxy.getTcpProxy(serverId);<NEW_LINE>try {<NEW_LINE>MapPack param = new MapPack();<NEW_LINE>param.put("objHash", objHash);<NEW_LINE>mpack = (MapPack) tcp.getSi... | lv = mpack.getList("serverStatus"); |
29,689 | public void methodReached(DependencyAgent agent, MethodDependency method) {<NEW_LINE>MethodReference ref = method.getReference();<NEW_LINE>MethodReference asyncRef = getAsyncReference(ref);<NEW_LINE>MethodDependency asyncMethod = agent.linkMethod(asyncRef);<NEW_LINE>method.addLocationListener(asyncMethod::addLocation);... | getName()), false)); |
271,013 | @ActionEvent(eventType = EventTypes.EVENT_GUEST_OS_UPDATE, eventDescription = "updating guest OS type", async = true)<NEW_LINE>public GuestOS updateGuestOs(final UpdateGuestOsCmd cmd) {<NEW_LINE>final Long id = cmd.getId();<NEW_LINE>final String displayName = cmd.getOsDisplayName();<NEW_LINE>// check if guest OS exists... | guestOs = _guestOSDao.createForUpdate(id); |
1,055,789 | private void mergeAt(int x, int y, OptimizationType opt) {<NEW_LINE>int w = 1;<NEW_LINE>while ((w < 4) && isUsed(x + w, y, false)) w++;<NEW_LINE>int h = 1;<NEW_LINE>while (h < 4) {<NEW_LINE>boolean ok = true;<NEW_LINE>for (int i = 0; i < w; i++) {<NEW_LINE>if (!isUsed(x + i, y + h, false)) {<NEW_LINE>ok = false;<NEW_LI... | 8, h * 8, opt); |
281,694 | private Event projectSupersetEvent(final String streamName, final List<Subscription> matchingSubscriptions, final Event event) {<NEW_LINE>if (LOG.isDebugEnabled()) {<NEW_LINE>LOG.debug("Enter EventProcessor#projectSupersetEvent {} event: {}", matchingSubscriptions, event);<NEW_LINE>}<NEW_LINE>Event projectedEvent = nu... | enrich(projectedEvent, streamName, matchingSubscriptions); |
811,577 | private ProcResult requestFragmentExecInfos() throws AnalysisException {<NEW_LINE>final CurrentQueryInfoProvider provider = new CurrentQueryInfoProvider();<NEW_LINE>final Collection<CurrentQueryInfoProvider.InstanceStatistics> instanceStatisticsCollection = provider.getInstanceStatistics(item);<NEW_LINE>final List<List... | setNames(TITLE_NAMES.asList()); |
756,361 | public static final void reportSuccess(final long numOfDistinctStates, final long actualDistance, final long numOfGenStates) throws IOException {<NEW_LINE>// Prevent div-by-zero when calculating collision probabilities when no states<NEW_LINE>// are generated.<NEW_LINE>if (numOfDistinctStates == numOfGenStates && numOf... | actualProb.doubleValue(), 2); |
1,645,530 | @Produces(APPLICATION_JSON_WITH_CHARSET)<NEW_LINE>public String post(@Context GraphManager manager, @PathParam("graph") String graph, CountRequest request) {<NEW_LINE>LOG.debug("Graph [{}] get count from '{}' with request {}", graph, request);<NEW_LINE>E.<MASK><NEW_LINE>Id sourceId = HugeVertex.getIdValue(request.sourc... | checkArgumentNotNull(request.source, "The source of request can't be null"); |
695,088 | protected <RESULT extends FileAuthentication> RESULT createEntity(Map<String, Object> source, Class<? extends RESULT> entityType) {<NEW_LINE>try {<NEW_LINE>final RESULT result = entityType.newInstance();<NEW_LINE>result.setCreatedBy(DfTypeUtil.toString(source.get("createdBy")));<NEW_LINE>result.setCreatedTime(DfTypeUti... | source.get("fileConfigId"))); |
410,789 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>context = this;<NEW_LINE>sharedPrefs = context.getSharedPreferences("com.klinker.android.twitter_world_preferences", 0);<NEW_LINE>settings = AppSettings.getInstance(this);<NEW_LINE>Utils.setUpTheme(context, settings)... | "listName", list.getName()); |
1,401,549 | public ResponseEntity<String> loginUserWithHttpInfo(String username, String password) throws RestClientException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Mi... | final HttpHeaders localVarHeaderParams = new HttpHeaders(); |
706,243 | private SerializedPage wrapSlice(Slice slice, int positionCount) {<NEW_LINE>int uncompressedSize = slice.length();<NEW_LINE>byte markers = PageCodecMarker.none();<NEW_LINE>if (compressor.isPresent()) {<NEW_LINE>int maxCompressedSize = compressor.get().maxCompressedLength(uncompressedSize);<NEW_LINE>compressionBuffer = ... | markers = CHECKSUMMED.set(markers); |
1,826,412 | public boolean onTouchEvent(@NonNull TextView textView, @NonNull Spannable buffer, @NonNull MotionEvent event) {<NEW_LINE>if (event.getAction() == MotionEvent.ACTION_UP) {<NEW_LINE>int x = (int) event.getX();<NEW_LINE>int y = (int) event.getY();<NEW_LINE>x -= textView.getTotalPaddingLeft();<NEW_LINE>y -= textView.getTo... | Layout layout = textView.getLayout(); |
641,856 | public void createParamEditLayout() {<NEW_LINE>if (paramEditComponentLayout == null) {<NEW_LINE>paramEditComponentLayout = uiComponents.create(HBoxLayout.class);<NEW_LINE>paramEditComponentLayout.setSpacing(true);<NEW_LINE>paramEditComponentLayout.setWidthFull();<NEW_LINE>}<NEW_LINE>paramEditComponent = condition.getPa... | setRequired(condition.getRequired()); |
1,546,785 | final DescribeIpv6PoolsResult executeDescribeIpv6Pools(DescribeIpv6PoolsRequest describeIpv6PoolsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeIpv6PoolsRequest);<NEW_LINE><MASK><NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_LINE>Request<DescribeIpv6PoolsReq... | AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics(); |
1,037,153 | private static void writeSpine(EpubBook book, EpubWriter epubWriter, XmlSerializer serializer) throws IllegalArgumentException, IllegalStateException, IOException {<NEW_LINE>serializer.startTag(NAMESPACE_OPF, OPFTags.spine);<NEW_LINE>Resource tocResource = book<MASK><NEW_LINE>String tocResourceId = tocResource.getId();... | .getSpine().getTocResource(); |
141,431 | public void delete(List<Integer> ids, int batchSize) throws DatabaseException {<NEW_LINE>if (ids == null) {<NEW_LINE>throw new IllegalArgumentException("Parameter ids must not be null.");<NEW_LINE>}<NEW_LINE>if (batchSize <= 0) {<NEW_LINE>throw new IllegalArgumentException("Parameter batchSize must be greater than zero... | .getPs().executeBatch(); |
1,636,274 | private void loadNode353() {<NEW_LINE>FiniteTransitionVariableTypeNode node = new FiniteTransitionVariableTypeNode(this.context, Identifiers.ExclusiveLimitAlarmType_LimitState_LastTransition, new QualifiedName(0, "LastTransition"), new LocalizedText("en", "LastTransition"), LocalizedText.NULL_VALUE, UInteger.valueOf(0)... | .expanded(), true)); |
1,404,982 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String id, Integer count, JsonElement jsonElement) throws Exception {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>Business business = null;<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().crea... | startTimeMonth_FIELDNAME, wi.getStartTimeMonthList()); |
871,154 | private void buildRss(List<Product> components, PrintWriter out) throws IOException {<NEW_LINE>out.println("<rss version=\"2.0\">");<NEW_LINE>out.println(" <channel>");<NEW_LINE>out.println(" <title><![CDATA[NetBeans Installer Components Feed]]></title>");<NEW_LINE>out.println(" <link>http://localhost/... | component.getVersion() + "</guid>"); |
1,356,673 | public void visit(PropertyShape propertyShape) {<NEW_LINE>printShape(propertyShape);<NEW_LINE>// Any nodeParam constraint?<NEW_LINE>Path path = propertyShape.getPath();<NEW_LINE>ShaclPaths.<MASK><NEW_LINE>int minCount = -1;<NEW_LINE>int maxCount = -1;<NEW_LINE>// Find min and max ready for printing.<NEW_LINE>for (Const... | write(out, path, prologue); |
1,054,404 | public static INDArray toArray(DataType dataType, Collection<? extends Writable> record) {<NEW_LINE>List<Writable> l;<NEW_LINE>if (record instanceof List) {<NEW_LINE>l <MASK><NEW_LINE>} else {<NEW_LINE>l = new ArrayList<>(record);<NEW_LINE>}<NEW_LINE>// Edge case: single NDArrayWritable<NEW_LINE>if (l.size() == 1 && l.... | = (List<Writable>) record; |
592,021 | public ODocument toNetworkStream() {<NEW_LINE>ODocument result = super.toNetworkStream();<NEW_LINE>result.setProperty("query", cfg.getQuery());<NEW_LINE>result.setProperty("updatable", cfg.isUpdatable());<NEW_LINE>List<Map<String, Object>> indexes = new ArrayList<>();<NEW_LINE>for (OViewConfig.OViewIndexConfig idx : cf... | indexDescriptor.put("properties", properties); |
1,361,335 | public Builder property(String name, @Sensitive Object value) {<NEW_LINE>Map<String, Object> contextProps = WebClient.<MASK><NEW_LINE>Map<String, Object> filterProps = CastUtils.cast((Map<?, ?>) contextProps.get(PROPERTY_KEY));<NEW_LINE>if (filterProps == null) {<NEW_LINE>filterProps = new HashMap<>();<NEW_LINE>context... | getConfig(webClient).getRequestContext(); |
566,824 | private boolean check(Clause c, HashMap<Variable, Constant> testing, Literal target) {<NEW_LINE>List<HashMap<Variable, Constant>> <MASK><NEW_LINE>extended_examples.add(testing);<NEW_LINE>for (Literal l : c.getLiterals()) {<NEW_LINE>if (l.getAtomicSentence().getSymbolicName().equals(target.getAtomicSentence().getSymboli... | extended_examples = new ArrayList<>(); |
332,560 | private HollowHistoricalStateKeyOrdinalMapping createKeyOrdinalMappingFromDelta() {<NEW_LINE>HollowHistoricalStateKeyOrdinalMapping keyOrdinalMapping = new HollowHistoricalStateKeyOrdinalMapping(keyIndex);<NEW_LINE>for (String keyType : keyIndex.getTypeKeyIndexes().keySet()) {<NEW_LINE>HollowHistoricalStateTypeKeyOrdin... | int removedOrdinal = removalIterator.next(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.