idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
181,373 | public void importResourceStream(InputStream is) throws IOException {<NEW_LINE>EditableResources r = new EditableResources();<NEW_LINE>r.openFile(is);<NEW_LINE>checkDuplicateResourcesLoop(r, loadedResources.getThemeResourceNames(), r.getThemeResourceNames(), "Rename Theme", "Theme ");<NEW_LINE>// load all the themes so... | getL10NResourceNames(), "Rename Localization", "Localization "); |
1,003,708 | public static <T, V, R extends Collection<V>> R flatCollect(Iterable<T> iterable, Function<? super T, ? extends Iterable<V>> function, R target, int batchSize, ForkJoinPool executor, boolean allowReorderedResult) {<NEW_LINE>int <MASK><NEW_LINE>int taskSize = size / FJIterate.DEFAULT_PARALLEL_TASK_COUNT;<NEW_LINE>FlatCo... | size = Iterate.sizeOf(iterable); |
854,622 | public static ClientAuthenticationCodec.ResponseParameters decodeResponse(ClientMessage clientMessage) {<NEW_LINE>ClientMessage.ForwardFrameIterator iterator = clientMessage.frameIterator();<NEW_LINE>ResponseParameters response = new ResponseParameters();<NEW_LINE>ClientMessage.Frame initialFrame = iterator.next();<NEW... | decodeBoolean(initialFrame.content, RESPONSE_FAILOVER_SUPPORTED_FIELD_OFFSET); |
440,294 | final ListTrackerConsumersResult executeListTrackerConsumers(ListTrackerConsumersRequest listTrackerConsumersRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTrackerConsumersRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRe... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
245,290 | private void connectAutomatically() {<NEW_LINE>DetectOpenOfficeInstallation officeInstallation = new DetectOpenOfficeInstallation(preferencesService, dialogService);<NEW_LINE>if (officeInstallation.isExecutablePathDefined()) {<NEW_LINE>connect();<NEW_LINE>} else {<NEW_LINE>Task<List<Path>> taskConnectIfInstalled = new ... | .lang("Autodetecting paths..."), taskConnectIfInstalled); |
856,005 | private static Map<String, String> createCDCEthnicityLookup() {<NEW_LINE>Map<String, String> result = new HashMap<String, String>();<NEW_LINE>// non-hispanic<NEW_LINE>result.put("white", "2186-5");<NEW_LINE>// hispanic<NEW_LINE><MASK><NEW_LINE>// non-hispanic<NEW_LINE>result.put("black", "2186-5");<NEW_LINE>// non-hisp... | result.put("hispanic", "2135-2"); |
1,742,129 | public static void downloadToolboxConfig(String subreddit) {<NEW_LINE>WikiManager manager = new WikiManager(Authentication.reddit);<NEW_LINE>Gson gson = new Gson();<NEW_LINE>try {<NEW_LINE>String data = manager.get(subreddit, "toolbox").getContent();<NEW_LINE>ToolboxConfig result = gson.fromJson(data, ToolboxConfig.cla... | toolboxConfigs.put(subreddit, result); |
66,685 | public static <A extends AbstractValue<A>, S extends Store<S>, T extends ForwardTransferFunction<A, S>> A expressionDataflow(TreePath exprPath, Context context, T transfer) {<NEW_LINE>Tree leaf = exprPath.getLeaf();<NEW_LINE>Preconditions.checkArgument(leaf instanceof ExpressionTree, "Leaf of exprPath must be of type E... | getClass().getName()); |
157,368 | private void addBindCall(SootClass sootClass) {<NEW_LINE><MASK><NEW_LINE>SootMethod clinit = getOrCreateStaticInitializer(sootClass);<NEW_LINE>Body body = clinit.retrieveActiveBody();<NEW_LINE>String internalName = sootClass.getName().replace('.', '/');<NEW_LINE>ClassConstant c = ClassConstant.v(internalName);<NEW_LINE... | Jimple j = Jimple.v(); |
1,207,191 | public static void carry(int[] z) {<NEW_LINE>int z0 = z[0], z1 = z[1], z2 = z[2], z3 = z[3], z4 = z[4];<NEW_LINE>int z5 = z[5], z6 = z[6], z7 = z[7], z8 = z[8], z9 = z[9];<NEW_LINE>z2 += (z1 >> 26);<NEW_LINE>z1 &= M26;<NEW_LINE>z4 += (z3 >> 26);<NEW_LINE>z3 &= M26;<NEW_LINE><MASK><NEW_LINE>z6 &= M26;<NEW_LINE>z9 += (z8... | z7 += (z6 >> 26); |
161,757 | public void generateStoreSaveValueIfNecessary(Scope scope, CodeStream codeStream) {<NEW_LINE>// push receiver<NEW_LINE>codeStream.aload_0();<NEW_LINE>// push the 2 parameters of "setResult(Object, Class)"<NEW_LINE>if (this.expression == null || this.expression.resolvedType == TypeBinding.VOID) {<NEW_LINE>// expressionT... | OPC_invokevirtual, this.setResultMethod, null); |
728,104 | public void marshall(CreateLicenseConfigurationRequest createLicenseConfigurationRequest, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (createLicenseConfigurationRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarsh... | createLicenseConfigurationRequest.getName(), NAME_BINDING); |
685,471 | public JSONObject detail(HttpServletRequest request) throws Exception {<NEW_LINE>String namespaceId = WebUtils.optional(request, CommonParams.NAMESPACE_ID, Constants.DEFAULT_NAMESPACE_ID);<NEW_LINE>String serviceName = WebUtils.required(request, CommonParams.SERVICE_NAME);<NEW_LINE>String cluster = WebUtils.optional(re... | serviceManager.getService(namespaceId, serviceName); |
1,006,905 | private AbstractMessageListenerContainer createContainer() {<NEW_LINE>if (this.containerType == null) {<NEW_LINE>this.containerType = DefaultMessageListenerContainer.class;<NEW_LINE>}<NEW_LINE>AbstractMessageListenerContainer container = BeanUtils.instantiateClass(this.containerType);<NEW_LINE>container.setBeanName(thi... | this.maxMessagesPerTask, dmlc::setMaxMessagesPerTask); |
722,134 | public void run() {<NEW_LINE>//<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>int no = 0;<NEW_LINE>dataSql = getSQL();<NEW_LINE>// Row<NEW_LINE>int row = 0;<NEW_LINE>// Delete Row<NEW_LINE>detail.setRowCount(row);<NEW_LINE>try {<NEW_LINE>m_pstmt = getStatement(dataSql);<NEW_LINE>log.fine("Start query - " +... | (), "SearchRows_EnterQuery"), false); |
715,962 | public void userGetWalletSummary(String currency, final Response.Listener<List<Transaction>> responseListener, final Response.ErrorListener errorListener) {<NEW_LINE>Object postBody = null;<NEW_LINE>// create path and map variables<NEW_LINE>String path = <MASK><NEW_LINE>// query params<NEW_LINE>List<Pair> queryParams =... | "/user/walletSummary".replaceAll("\\{format\\}", "json"); |
1,068,000 | protected Object[] extractArgsContribution(Object args) {<NEW_LINE>if (args instanceof Object[]) {<NEW_LINE>Object[] arr = (Object[]) args;<NEW_LINE>if (arr.length == 2 && arr[0] instanceof IPointcut && arr[1] instanceof Closure) {<NEW_LINE>return arr;<NEW_LINE>}<NEW_LINE>} else if (args instanceof Collection) {<NEW_LI... | ] arr = new Object[2]; |
1,343,251 | private void removeMemberOfUnitDuty(Business business, Identity identity) throws Exception {<NEW_LINE>EntityManager em = business.entityManagerContainer().get(UnitDuty.class);<NEW_LINE>CriteriaBuilder cb = em.getCriteriaBuilder();<NEW_LINE>CriteriaQuery<UnitDuty> cq = cb.createQuery(UnitDuty.class);<NEW_LINE>Root<UnitD... | cq.from(UnitDuty.class); |
31,064 | public void processChangedPassword(User user) throws ClassNotFoundException, InstantiationException, IllegalAccessException, MessagingException, IOException, AxelorException, JSONException {<NEW_LINE>Preconditions.checkNotNull(user, I18n.get("User cannot be null."));<NEW_LINE>try {<NEW_LINE>if (!user.getSendEmailUponPa... | AppBaseService.class).getAppBase(); |
1,614,459 | private Root prepareSearchExpression(List<String> entityTypes, XPathNode node, Root inputRootDO) {<NEW_LINE>String searchEntityTypeTemplate = "@xsi:type='%ENTITYTYPE%'";<NEW_LINE>String leftBracket = "(";<NEW_LINE>String rightBracket = ")";<NEW_LINE>String and = " and ";<NEW_LINE>String or = " or ";<NEW_LINE>String Exp... | SearchControl) ctrlMap.get(DO_SEARCH_CONTROL); |
587,965 | private static List<DomainMatcher> convertOldSkipNameOption(String skipNames) {<NEW_LINE>if (skipNames == null || skipNames.isEmpty()) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>ArrayList<DomainMatcher> excludedDomains = new ArrayList<>();<NEW_LINE>String[] names = skipNames.split(";");<NEW_LINE>for... | ).replace("*", ".*?"); |
1,265,092 | private static String createMessage(MethodTree tree, ImmutableList<MemberWithIndex> overloads, Map<MemberWithIndex, Integer> groups, LineMap lineMap, MemberWithIndex current) {<NEW_LINE>String ungroupedLines = overloads.stream().filter(o -> !groups.get(o).equals(groups.get(current))).map(t -> lineMap.getLineNumber(getS... | .collect(joining(", ")); |
1,284,438 | public boolean registerMonitor(Object monitor) {<NEW_LINE>// Process the annotated object, build a configuration, and create probe<NEW_LINE>// listeners that represent each call site of the monitor.<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {<NEW_LINE>Tr.debug(this, tc, "monitor = " + mo... | >> effectedClasses = processNewListeners(listeners); |
901,533 | public AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails awsOpenSearchServiceDomainNodeToNodeEncryptionOptionsDetails = new AwsOpenSearchServiceDomainNodeToNodeEncryptionOption... | int originalDepth = context.getCurrentDepth(); |
1,714,499 | private void visualizeData() {<NEW_LINE>if (currentMax < luxValue) {<NEW_LINE>currentMax = luxValue;<NEW_LINE>statMax.setText(String.format(Locale.getDefault(), PSLabSensor.LUXMETER_DATA_FORMAT, luxValue));<NEW_LINE>}<NEW_LINE>if (currentMin > luxValue) {<NEW_LINE>currentMin = luxValue;<NEW_LINE>statMin.setText(String.... | ((float) timeElapsed, luxValue); |
1,455,560 | public void onViewCreate(View view, ViewGroup parent, Snapshot after) {<NEW_LINE>if (isCatalystInstanceDestroyed) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Scheduler strongScheduler = mScheduler.get();<NEW_LINE>if (strongScheduler != null) {<NEW_LINE>strongScheduler.triggerUI();<NEW_LINE>}<NEW_LINE>if (!mStates.containsKe... | getId(), ViewState.Inactive); |
561,384 | public void handleRequest(InputStream inputStream, OutputStream outputStream, Context context) throws IOException {<NEW_LINE>BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));<NEW_LINE>JSONObject responseJson = new JSONObject();<NEW_LINE>AmazonDynamoDB client = AmazonDynamoDBClientBuilder.d... | responseJson.put("headers", headerJson); |
1,341,853 | public Matrix<T> identity() throws Exception {<NEW_LINE>if (this.rows != this.cols)<NEW_LINE>throw new Exception("Matrix should be a square");<NEW_LINE>final T element = this.get(0, 0);<NEW_LINE>final T zero;<NEW_LINE>final T one;<NEW_LINE>if (element instanceof BigDecimal) {<NEW_LINE>zero = (T) BigDecimal.ZERO;<NEW_LI... | (T) new Float(1); |
1,542,507 | public static Statistics<? extends Serializable> deserialize(InputStream inputStream, TSDataType dataType) throws IOException {<NEW_LINE>Statistics<? extends Serializable> statistics = Statistics.getStatsByType(dataType);<NEW_LINE>statistics.setCount((int) ReadWriteIOUtils.readLong(inputStream));<NEW_LINE>statistics.se... | minValue = ReadWriteIOUtils.readInt(inputStream); |
105,319 | private void allocArrays(final int size) {<NEW_LINE>if (mHashes == EMPTY_IMMUTABLE_INTS) {<NEW_LINE>throw new UnsupportedOperationException("ArrayMap is immutable");<NEW_LINE>}<NEW_LINE>if (size == (BASE_SIZE * 2)) {<NEW_LINE>synchronized (ArrayMap.class) {<NEW_LINE>if (mTwiceBaseCache != null) {<NEW_LINE>final Object[... | mHashes + " now have " + mTwiceBaseCacheSize + " entries"); |
195,545 | final ImportClientVpnClientCertificateRevocationListResult executeImportClientVpnClientCertificateRevocationList(ImportClientVpnClientCertificateRevocationListRequest importClientVpnClientCertificateRevocationListRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(importClientVpnClientCertifi... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,667,908 | private ModelSource tryOrphanResolution(URI locationURI, ModelSource modelSource) {<NEW_LINE>logger.entering("CatalogModelImpl", "getModelSource", locationURI);<NEW_LINE>if (catalogFileObject == null) {<NEW_LINE>try {<NEW_LINE>if (locationURI.isAbsolute()) {<NEW_LINE>// may be a local file URI so try creating a file<NE... | fo = FileUtil.toFileObject(file); |
1,101,329 | public String rankTeams(String[] votes) {<NEW_LINE>Map<Character, int[]> counter = new HashMap<>();<NEW_LINE>int n = votes[0].length();<NEW_LINE>for (String vote : votes) {<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>char v = vote.charAt(i);<NEW_LINE>counter.computeIfAbsent(v, k -> new int[26])[i]++;<NEW_LINE>}<NEW... | ] v1 = a.getValue(); |
1,690,812 | protected Publisher createPublisher() throws JMSException {<NEW_LINE>try {<NEW_LINE>Logger logger = connection.getLogger();<NEW_LINE>PublisherQosHolder holder = new PublisherQosHolder(QosPolicies.newPublisherQos());<NEW_LINE>DomainParticipant participant = connection.getParticipant();<NEW_LINE>participant.get_default_p... | ExceptionHelper.notify(connection, e); |
1,461,005 | public PresentableForm generateForm(final ForgottenPasswordStateMachine forgottenPasswordStateMachine) {<NEW_LINE>final PwmRequestContext pwmRequestContext = forgottenPasswordStateMachine.getRequestContext();<NEW_LINE>final LinkedHashSet<IdentityVerificationMethod> remainingAvailableOptionalMethods = new LinkedHashSet<... | , pwmRequestContext.getDomainConfig())); |
699,680 | protected void preprocess() {<NEW_LINE>DistanceQuery<O> distanceQuery = new QueryBuilder<>(relation, distance).distanceQuery();<NEW_LINE>storage = DataStoreUtil.makeStorage(relation.getDBIDs(), DataStoreFactory.HINT_STATIC, KNNList.class);<NEW_LINE>MeanVariance ksize = new MeanVariance();<NEW_LINE>if (LOG.isVerbose()) ... | "Processing partitions", partitions, LOG) : null; |
239,102 | private static void readProperties(File fileToRead, String fileName) {<NEW_LINE>InputStream propsInputStream = null;<NEW_LINE>try {<NEW_LINE>Logger.info(Config.class, "Loading dotCMS [" + fileName + "] Properties...");<NEW_LINE>if (props == null) {<NEW_LINE>props = new PropertiesConfiguration();<NEW_LINE>}<NEW_LINE>pro... | (getBooleanProperty(DOTCMS_USEWATCHERMODE, true)); |
297,623 | public int colorMultiplier(ItemStack stack, int tintIndex) {<NEW_LINE>FacadeInstance states = ItemPluggableFacade.getStates(stack);<NEW_LINE>FacadePhasedState state = states.getCurrentStateForStack();<NEW_LINE>int colour = -1;<NEW_LINE>ResourceLocation id = state.stateInfo.state.getBlock().getRegistryName();<NEW_LINE>i... | stateInfo.state, null, null); |
1,636,779 | protected void validateResourceIdAndUrlIdForNonConditionalOperation(IBaseResource theResource, String theResourceId, String theUrlId, String theMatchUrl) {<NEW_LINE>if (isBlank(theMatchUrl)) {<NEW_LINE>if (isBlank(theUrlId)) {<NEW_LINE>String msg = getContext().getLocalizer().getMessage(BaseOutcomeReturningMethodBindin... | .code(1450) + msg); |
1,161,228 | private static String stripUserInfoFromInvalidURI(String urlString) {<NEW_LINE>if (looksLikePlainFilePath(urlString) && !urlString.startsWith("//")) {<NEW_LINE>// NOI18N<NEW_LINE>return urlString;<NEW_LINE>}<NEW_LINE>String schemeName <MASK><NEW_LINE>String schemeSpecific = (schemeName != null) ? urlString.substring(sc... | = getSchemeName(urlString, -1); |
885,406 | public void onBtnNextClick() {<NEW_LINE>Slide slide = currentSlide();<NEW_LINE>// Check if we are allowed to advance to the next slide.<NEW_LINE>switch(slide) {<NEW_LINE>case STORAGE:<NEW_LINE>// As the storage permission is a prerequisite to run syncthing, refuse to continue without it.<NEW_LINE>Boolean storagePermiss... | mBackButton.setVisibility(View.VISIBLE); |
325,662 | public void informConsumersOfRollback() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(this, tc, "informConsumersOfRollback", new Object[] { Boolean.valueOf(strictRedeliveryOrdering) });<NEW_LINE>if (strictRedeliveryOrdering) {<NEW_LINE>// Take a copy of the set of cons... | ".informConsumersOfRollback", CommsConstants.TRANSACTION_INFORMCONSUMERSOFROLLBACK_01, this); |
449,166 | private PrivacyController createPrivacyController() {<NEW_LINE>final Optional<BigInteger<MASK><NEW_LINE>if (privacyParameters.isPrivacyPluginEnabled()) {<NEW_LINE>return new PluginPrivacyController(blockchainQueries.getBlockchain(), privacyParameters, chainId, createPrivateTransactionSimulator(), createPrivateNonceProv... | > chainId = protocolSchedule.getChainId(); |
1,711,942 | private DatabaseInfo parse0(String jdbcUrl) {<NEW_LINE>// jdbc:mysql://1.2.3.4:5678/test_db<NEW_LINE>StringMaker maker = new StringMaker(jdbcUrl);<NEW_LINE>maker.after(URL_PREFIX);<NEW_LINE>// 1.2.3.4:5678 In case of replication driver could have multiple values<NEW_LINE>// We have to consider mm db too.<NEW_LINE>Strin... | before('?').value(); |
330,697 | public void run() {<NEW_LINE>MavenEmbedder online = EmbedderFactory.getOnlineEmbedder();<NEW_LINE>AggregateProgressHandle hndl = AggregateProgressFactory.createHandle(DownloadAction_downloading(art.getId()), new ProgressContributor[] { AggregateProgressFactory.createProgressContributor("") }, <MASK><NEW_LINE>ProgressTr... | ProgressTransferListener.cancellable(), null); |
150,253 | public static void main(String[] args) {<NEW_LINE>// snippet-start:[kinesis.java2.stream_example.setup]<NEW_LINE>Region region = Region.US_EAST_1;<NEW_LINE>KinesisAsyncClient client = KinesisAsyncClient.builder().region(region).build();<NEW_LINE>SubscribeToShardRequest request = SubscribeToShardRequest.builder().consum... | MySubscriber::new).build(); |
1,056,519 | private static void complementInsertAndDelete(final SplitHunk hunk) {<NEW_LINE>final List<BeforeAfter<List<String>>> steps = hunk.getPatchSteps();<NEW_LINE>final BeforeAfter<List<String>> first = steps.get(0);<NEW_LINE>final BeforeAfter<List<String>> last = steps.get(steps.size() - 1);<NEW_LINE>final boolean complement... | > contextBefore = hunk.getContextBefore(); |
299,110 | public static ValueDerivatives impliedVolatilityFromBlackApproximatedAdjoint(double forward, double strike, double timeToExpiry, double blackVolatility) {<NEW_LINE>ArgChecker.isTrue(strike > 0, "strike must be strictly positive");<NEW_LINE>ArgChecker.isTrue(forward > 0, "strike must be strictly positive");<NEW_LINE>dou... | Math.log(forward / strike); |
1,345,313 | public String update(Request req, Response res) {<NEW_LINE>User user = userService.findUserByName(currentUserLoginName().toString());<NEW_LINE>HttpLocalizedOperationResult result = new HttpLocalizedOperationResult();<NEW_LINE>Map map = readRequestBodyAsJSON(req);<NEW_LINE>String checkinAliases = null;<NEW_LINE>if (map.... | emailMe, email, checkinAliases, result); |
885,172 | public List<SecurityGroupVH> fetchNetworkSecurityGroupDetails(SubscriptionVH subscription, Map<String, Map<String, String>> tagMap) {<NEW_LINE>List<SecurityGroupVH> securityGroupsList = new ArrayList<>();<NEW_LINE>Azure azure = azureCredentialProvider.getClient(subscription.getTenant(), subscription.getSubscriptionId()... | setId(securityGroup.id()); |
1,612,141 | public static EntityTopicOperator fromCrd(Reconciliation reconciliation, Kafka kafkaAssembly) {<NEW_LINE>if (kafkaAssembly.getSpec().getEntityOperator() != null && kafkaAssembly.getSpec().getEntityOperator().getTopicOperator() != null) {<NEW_LINE>EntityTopicOperatorSpec topicOperatorSpec = kafkaAssembly.getSpec().getEn... | getOrDefault(ClusterOperatorConfig.STRIMZI_DEFAULT_TOPIC_OPERATOR_IMAGE, "quay.io/strimzi/operator:latest"); |
1,114,952 | public void onCreate(long id, DataObject obj) {<NEW_LINE>boolean available = obj.isNull("unavailable") || !obj.getBoolean("unavailable");<NEW_LINE>log.trace("Received guild create for id: {} available: {}", id, available);<NEW_LINE>if (available && unavailableGuilds.contains(id) && !setupNodes.containsKey(id)) {<NEW_LI... | , GuildSetupNode.Type.AVAILABLE)); |
1,765,118 | private SOAPMessage invokeService2(String portNum, String clntType) throws Exception {<NEW_LINE>String wsdlLocation = "http://localhost:" + portNum + "/untoken/SOAPService2?wsdl";<NEW_LINE>StringReader reqMsg = new StringReader("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Head... | requestContext.put("ws-security.password", "security"); |
549,576 | public int compare(Object actual, Object expected) {<NEW_LINE>if (actual instanceof Tuple && expected instanceof Tuple) {<NEW_LINE>return compareTuples((Tuple<MASK><NEW_LINE>}<NEW_LINE>// this comparator is not transitive, `expected` is usually a Node and `actual` is usually a Map, or primitive<NEW_LINE>if ((actualPars... | ) actual, (Tuple) expected); |
1,630,448 | public void processOpts() {<NEW_LINE>super.processOpts();<NEW_LINE>if (additionalProperties.containsKey(NULLABLE_FIELDS)) {<NEW_LINE>nullableFields = convertPropertyToBooleanAndWriteBack(NULLABLE_FIELDS);<NEW_LINE>} else {<NEW_LINE>// not set, use to be passed to template<NEW_LINE>additionalProperties.put(NULLABLE_FIEL... | ("apilib.mustache", libFolder, "api.dart")); |
1,398,114 | public static void validateBatch(Trainer trainer, Batch batch) {<NEW_LINE>Preconditions.checkArgument(trainer.getManager().getEngine() == batch.getManager().getEngine(), "The data must be on the same engine as the trainer. You may need to change one of your NDManagers.");<NEW_LINE>Batch[] splits = batch.split(trainer.g... | , new ConcurrentHashMap<>()); |
893,703 | public static void run(String imagePath) {<NEW_LINE>try {<NEW_LINE>SleuthkitCase sk = SleuthkitCase.newCase(imagePath + ".db");<NEW_LINE>// initialize the case with an image<NEW_LINE>String timezone = "";<NEW_LINE>AddImageProcess process = sk.makeAddImageProcess(timezone, true, false, "");<NEW_LINE>ArrayList<String> pa... | = new ArrayList<String>(); |
1,704,988 | /*<NEW_LINE>* This is already tested in testDynamicDisableWithNoContextInfo<NEW_LINE>*<NEW_LINE>* @Test<NEW_LINE>*<NEW_LINE>* @Mode(TestMode.FULL)<NEW_LINE>* public void testSlowReqDynamicPatternRemove() throws Exception {<NEW_LINE>* //Step 1 - Update server configuration - ContextInfo = false , Threshold = 2s<NEW_LINE... | server.waitForStringInLogUsingMark("TRAS0112W", 30000); |
1,291,957 | public void processSessionEvent(@Nonnull SessionEvent event, @Nonnull XDebugSession session) {<NEW_LINE>myRefresh = event == SessionEvent.SETTINGS_CHANGED;<NEW_LINE>if (event == SessionEvent.BEFORE_RESUME) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>XExecutionStack currentExecutionStack = ((XDebugSessionImpl) session).getCu... | (Arrays.asList(executionStacks)); |
1,109,974 | private void populateArgs(JSONObject headers) throws JSONException, UnsupportedEncodingException {<NEW_LINE>if (headers != null) {<NEW_LINE>// add headers. Handles headers with multiple values.<NEW_LINE>Iterator<String> headerKeys = headers.keys();<NEW_LINE>while (headerKeys.hasNext()) {<NEW_LINE><MASK><NEW_LINE>Object... | String headerKey = headerKeys.next(); |
333,587 | public void docStoreMapping(final DocMappingBuilder mapping, final String prefix) {<NEW_LINE>if (prefix != null && idProperty != null) {<NEW_LINE>// id property not included in the<NEW_LINE>idProperty.docStoreMapping(mapping, prefix);<NEW_LINE>}<NEW_LINE>if (inheritInfo != null) {<NEW_LINE>String discCol = inheritInfo.... | (discCol, DocPropertyType.INTEGER)); |
1,339,273 | private static Triple<RexNode, RexNode, RexNode> computeCompensationPredicates(RexBuilder rexBuilder, RexSimplify simplify, EquivalenceClasses sourceEC, Triple<RexNode, RexNode, RexNode> sourcePreds, EquivalenceClasses targetEC, Triple<RexNode, RexNode, RexNode> targetPreds, BiMap<RelTableRef, RelTableRef> sourceToTarg... | ), sourceEC.getEquivalenceClassesMap()); |
876,558 | protected void drawCheckIcon(JComponent c, Graphics2D g, AbstractButton b, Rectangle iconRect, boolean selected, boolean enabled) {<NEW_LINE>Graphics2D g2 = (Graphics2D) g.create();<NEW_LINE>try {<NEW_LINE>ButtonModel bm = b.getModel();<NEW_LINE>String iconName = isIndeterminate(b) ? "checkBoxIndeterminate" : "checkBox... | scale(15)), false); |
846,838 | // rb_str_encode<NEW_LINE>public static ByteList rbByteEncode(ThreadContext context, byte[] bytes, int start, int length, Encoding encoding, int cr, Encoding to, int ecflags, IRubyObject ecopt) {<NEW_LINE>byte[] sname, dname;<NEW_LINE>sname = encoding.getName();<NEW_LINE>dname = to.getName();<NEW_LINE>if (noDecorators(... | - fromPos.p) + " bytes left"); |
187,315 | public void onReceive(Context context, Intent intent) {<NEW_LINE>try {<NEW_LINE>if (shouldDirectlyPopulateFilters()) {<NEW_LINE>for (ResolveInfo filterExposerInfo : filterExposerList) {<NEW_LINE>String className = filterExposerInfo.activityInfo.name;<NEW_LINE>AstridFilterExposer filterExposer = null;<NEW_LINE>filterExp... | extras.getParcelableArray(AstridApiConstants.EXTRAS_RESPONSE); |
1,114,106 | public StatCounter merge(StatCounter o) {<NEW_LINE>if (o == null || o.count == 0) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (o == this) {<NEW_LINE>return merge(o.clone());<NEW_LINE>}<NEW_LINE>if (this.count == 0) {<NEW_LINE>count = o.count;<NEW_LINE>runningMean = o.runningMean;<NEW_LINE>runningMean = o.runningM2;<... | max(max, o.max); |
443,170 | public static Node createNodeByPath(Document doc, String path) {<NEW_LINE>int pos = path.lastIndexOf('/');<NEW_LINE>if (pos == 0) {<NEW_LINE>// root<NEW_LINE>Node root = doc.getDocumentElement();<NEW_LINE>if (root == null) {<NEW_LINE>root = createElement(doc, path.substring(1), null, null);<NEW_LINE>doc.appendChild(roo... | path.substring(pos + 1); |
383,843 | public static List<FragmentPagerModel> createProfilePagerList(Context context, final User user, @NonNull ArrayList<Fragment> fragments) {<NEW_LINE>List<FragmentPagerModel> list = new ArrayList<>();<NEW_LINE>list.add(new FragmentPagerModel(context.getString(R.string.info), getFragment(fragments, 0, () -> ProfileInfoFrag... | .create(user)))); |
708,527 | public MqttMessage processConnect(MqttConnectMessage msg, SessionContext sessionData) {<NEW_LINE>MqttFixedHeader fixedHeader = new MqttFixedHeader(MqttMessageType.CONNACK, false, MqttQoS.AT_LEAST_ONCE, false, 0);<NEW_LINE>String clientId = sessionData.getClientId();<NEW_LINE>if (StringUtils.isBlank(clientId)) {<NEW_LIN... | .payload().userName(); |
334,054 | private static void generatePrimitiveRequiredDecoder(final StringBuilder sb, final int level, final Token fieldToken, final String name, final Encoding encoding) throws IOException {<NEW_LINE>assert encoding.presence() == Encoding.Presence.REQUIRED;<NEW_LINE>final PrimitiveType primitiveType = encoding.primitiveType();... | final String rustPrimitiveType = rustTypeName(primitiveType); |
419,468 | public void test1XSFEnvEntry_Float() throws Exception {<NEW_LINE>// The test case looks for a environment variable named "envFloat".<NEW_LINE>Float tempFloat = fejb1.getFloatEnvVar("envFloat");<NEW_LINE>assertNotNull("Get environment float object was null.", tempFloat);<NEW_LINE>assertEquals("Test content of environmen... | tempFloat = fejb1.getFloatEnvVar("envFloat3"); |
680,587 | public static DatasetGraph dynamicDataset(Collection<Node> defaultGraphs, Collection<Node> namedGraphs, DatasetGraph dsg, boolean defaultUnionGraph) {<NEW_LINE>Graph dft;<NEW_LINE>if (defaultUnionGraph || defaultGraphs.contains(Quad.unionGraph)) {<NEW_LINE>if (defaultGraphs.contains(Quad.defaultGraphIRI))<NEW_LINE>dft ... | dsg2.addGraph(gn, g); |
921,531 | public static void takeSignature(IMethodResult result, String imgFormat, Bitmap bitmap, String filePath, int penColor, int bgColor) {<NEW_LINE>Logger.D(TAG, "takeSignature+");<NEW_LINE>try {<NEW_LINE>String outputFilePath;<NEW_LINE>if (imgFormat.equals("jpg")) {<NEW_LINE>outputFilePath = saveJpg(bitmap, filePath);<NEW_... | TAG, e.getMessage()); |
221,355 | protected void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>setContentView(R.layout.activity_edit_profile);<NEW_LINE>ButterKnife.bind(this);<NEW_LINE>firstNameInput = (TextInputEditText) firstNameWrapper.getEditText();<NEW_LINE>lastNameInput = (TextInputEditText) lastNameW... | getSupportActionBar().setDisplayHomeAsUpEnabled(true); |
896,886 | void updateBatchMaster(List<RedisMeta> futureMetaList, String clusterId, String shardId) throws ResourceNotFoundException {<NEW_LINE>List<RedisTbl> currentTblList = redisService.findRedisesByDcClusterShard(DcMetaSynchronizer.currentDcId, clusterId, shardId);<NEW_LINE>List<RedisTbl> <MASK><NEW_LINE>for (RedisMeta future... | futureTblList = new ArrayList<>(); |
59,078 | public final void pushLineSeparator() {<NEW_LINE>// see comment on isLineDelimiter(char) for the use of '\n' and '\r'<NEW_LINE>final int INCREMENT = 250;<NEW_LINE>// currentCharacter is at position currentPosition-1<NEW_LINE>// cr 000D<NEW_LINE>if (this.currentCharacter == '\r') {<NEW_LINE>int separatorPos = this.curre... | int separatorPos = this.currentPosition - 1; |
715,233 | public synchronized void unregisterInjectionProcessorProvider(InjectionProcessorProvider<?, ?> provider) throws InjectionException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>Tr.debug(tc, "unregisterInjectionProcessorProvider: " + provider.<MASK><NEW_LINE>if (!ivIsInitialized) {... | getAnnotationClass() + " = " + provider); |
1,351,029 | protected void mergeResults(@Nonnull ResultStack[] results) {<NEW_LINE>EnderInventory.View outputSlots = getInventory().getView(EnderInventory.Type.OUTPUT);<NEW_LINE>final int numOutputSlots = outputSlots.getSlots();<NEW_LINE>if (numOutputSlots > 0) {<NEW_LINE>NNList<ItemStack> outputStacks = new NNList<ItemStack>(numO... | result.item.setCount(0); |
1,083,084 | public BeanDefinition parse(Element element, ParserContext parserContext) {<NEW_LINE>this.headerWriters = new ManagedList<>();<NEW_LINE>BeanDefinitionBuilder builder = BeanDefinitionBuilder.rootBeanDefinition(HeaderWriterFilter.class);<NEW_LINE>boolean disabled = element != null && "true".equals(resolveAttribute(parser... | parseHstsElement(addIfNotPresent, element, parserContext); |
238,527 | private void handleSearchResult(SearchResult sr) {<NEW_LINE>final int hitCountTotal = sr.getTotalHitCount();<NEW_LINE>final int hitCount = sr.getHitCount();<NEW_LINE>if (log.isLoggable(Level.FINE)) {<NEW_LINE>log.log(Level.FINE, "Got SearchResult with " + hitCountTotal + " in total and " + hitCount + " hits in real for... | > newGroupingMap = sr.getGroupingList(); |
857,370 | public void deleteCol(final int col) {<NEW_LINE>try {<NEW_LINE>// process the file<NEW_LINE>// allocate buffers<NEW_LINE>final ByteBuffer readBuffer = ByteBuffer.allocate(EncogEGBFile.DOUBLE_SIZE * 1024);<NEW_LINE>final ByteBuffer writeBuffer = ByteBuffer.allocate(EncogEGBFile.DOUBLE_SIZE * 1024);<NEW_LINE>readBuffer.c... | double d = readBuffer.getDouble(); |
820,388 | private void presentBackground(boolean collapseAbove, boolean collapseBelow, boolean hasWallpaper) {<NEW_LINE>int marginDefault = getContext().getResources().getDimensionPixelOffset(R.dimen.conversation_update_vertical_margin);<NEW_LINE>int marginCollapsed = 0;<NEW_LINE>int paddingDefault = getContext().getResources().... | setBackgroundResource(R.drawable.conversation_update_wallpaper_background_top); |
550,909 | public void save(final OutputStream os, final Object obj) {<NEW_LINE>final EncogWriteHelper out = new EncogWriteHelper(os);<NEW_LINE>final BasicPNN pnn = (BasicPNN) obj;<NEW_LINE>out.addSection("PNN");<NEW_LINE>out.addSubSection("PARAMS");<NEW_LINE>out.addProperties(pnn.getProperties());<NEW_LINE>out.addSubSection("NET... | (pnn.getOutputMode())); |
415,260 | private void insertIntoDatabaseInTrx(final List<ImpDataLine> lines) {<NEW_LINE>final SqlAndParamsExtractor<ImpDataLine> sqlAndParamsExtractor = getInsertIntoImportTableSql();<NEW_LINE>final String sql = sqlAndParamsExtractor.getSql();<NEW_LINE>PreparedStatement pstmt = null;<NEW_LINE>final ResultSet rs = null;<NEW_LINE... | DB.setParameters(pstmt, params); |
1,553,060 | private void handle(SetZoneVisibilityMsg msg) {<NEW_LINE>EventQueue.invokeLater(() -> {<NEW_LINE>var zoneGUID = GUID.<MASK><NEW_LINE>boolean visible = msg.getIsVisible();<NEW_LINE>var zone = MapTool.getCampaign().getZone(zoneGUID);<NEW_LINE>zone.setVisible(visible);<NEW_LINE>ZoneRenderer currentRenderer = MapTool.getFr... | valueOf(msg.getZoneGuid()); |
857,843 | private JPanel createLegendPane() {<NEW_LINE>JPanel legendPanel = new JPanel();<NEW_LINE>legendPanel.setLayout(new FlowLayout(FlowLayout<MASK><NEW_LINE>legendPanel.setBorder(// $NON-NLS-1$<NEW_LINE>BorderFactory.// $NON-NLS-1$<NEW_LINE>createTitledBorder(JMeterUtils.getResString("aggregate_graph_legend")));<NEW_LINE>//... | .LEFT, 0, 0)); |
1,510,953 | /*<NEW_LINE>* (non-Javadoc)<NEW_LINE>*<NEW_LINE>* @see com.springsource.sts.frameworks.ui.internal.swt.ProjectSelector#<NEW_LINE>* createProjectArea()<NEW_LINE>*/<NEW_LINE>public Composite createProjectArea() {<NEW_LINE>Collection<IProject> availableProjects = getProjects();<NEW_LINE>if (availableProjects == null || av... | SWT.DROP_DOWN | SWT.READ_ONLY); |
1,156,483 | public void fillPrice(SaleOrderLine saleOrderLine, SaleOrder saleOrder) throws AxelorException {<NEW_LINE>fillTaxInformation(saleOrderLine, saleOrder);<NEW_LINE>saleOrderLine.setCompanyCostPrice(this.getCompanyCostPrice(saleOrder, saleOrderLine));<NEW_LINE>BigDecimal exTaxPrice;<NEW_LINE>BigDecimal inTaxPrice;<NEW_LINE... | .getTaxLine(), inTaxPrice)); |
943,117 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Business business = new Business(emc);<NEW_LI... | emc.beginTransaction(Meeting.class); |
388,551 | public void run(RegressionEnvironment env) {<NEW_LINE>String[] fields = "a".split(",");<NEW_LINE>String text = "@Hint('iterate_only') @name('s0') select * from SupportRecogBean#lastevent " + "match_recognize (" + " measures A.theString as a" + " all matches " + " pattern (A) " + " define A as prev(A.value, 2) = val... | new SupportRecogBean("E4", 4)); |
446,914 | public void read(org.apache.thrift.protocol.TProtocol iprot, MapFileInfo 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.type == org.apa... | .estimatedSize = iprot.readI64(); |
328,748 | public static ObjectMapper config() {<NEW_LINE>final ObjectMapper m = new ObjectMapper(new YAMLFactory());<NEW_LINE>m.addMixIn(ClusterDiscoveryModule.class, TypeNameMixin.class);<NEW_LINE>m.addMixIn(RpcProtocolModule.class, TypeNameMixin.class);<NEW_LINE>m.addMixIn(ConsumerModule.Builder.class, TypeNameMixin.class);<NE... | RequestCondition.class, TypeNameMixin.class); |
972,626 | final DescribeReservedNodesResult executeDescribeReservedNodes(DescribeReservedNodesRequest describeReservedNodesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeReservedNodesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
1,548,168 | public View onCreateViewWithToolbar(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {<NEW_LINE>View view = inflater.inflate(R.layout.scene_history, container, false);<NEW_LINE>View content = ViewUtils.$$(view, R.id.content);<NEW_LINE>mRecyclerView = (EasyRecyclerView) ViewUt... | .R.attr.colorPrimary)); |
558,869 | 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>PlayerList players = game.getState().getPlayersInRange(controller.getId(), game);<NEW_LINE>if (players == null) {<NEW_LIN... | players.size()))); |
543,472 | private boolean generatePng(File pngsDir, UploadedPresentation pres, int page, File pageFile) throws InterruptedException {<NEW_LINE>String source = pageFile.getAbsolutePath();<NEW_LINE>String dest;<NEW_LINE>if (SupportedFileTypes.isImageFile(pres.getFileType())) {<NEW_LINE>// Need to create a PDF as intermediate step.... | NuProcess process = convertImgToSvg.start(); |
1,514,905 | public String publish(HttpServletRequest request, HttpServletResponse response) throws Exception {<NEW_LINE>if (versionJudgement.allMemberIsNewVersion()) {<NEW_LINE>throw new IllegalStateException("old raft protocol already stop");<NEW_LINE>}<NEW_LINE>response.setHeader("Content-Type", "application/json; charset=" + ge... | (), SwitchDomain.class)); |
855,772 | public SharedImagePermissions unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>SharedImagePermissions sharedImagePermissions = new SharedImagePermissions();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>i... | class).unmarshall(context)); |
1,396,779 | public void actionPerformed(ActionEvent e) {<NEW_LINE>// Confirm Panel<NEW_LINE>String cmd = e.getActionCommand();<NEW_LINE>if (cmd.equals(ConfirmPanel.A_OK)) {<NEW_LINE>m_frame.setCursor(Cursor<MASK><NEW_LINE>// System.out.println("Row ...ID " + row);<NEW_LINE>int[] rows = p_table.getSelectedRows();<NEW_LINE>for (int ... | .getPredefinedCursor(Cursor.WAIT_CURSOR)); |
1,070,592 | public EqualsBuilder append(Object lhs, Object rhs) {<NEW_LINE>if (!isEquals) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (lhs == rhs) {<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>if (lhs == null || rhs == null) {<NEW_LINE>setEquals(false);<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>Class<?> lhsClass = lhs.getClass();... | , (float[]) rhs); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.