idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
332,738 | private void importData(Task importRoot, Task root, Map<CustomPropertyDefinition, CustomPropertyDefinition> customPropertyMapping, Map<Task, Task> original2imported) {<NEW_LINE>Task[] nested = importRoot.getManager().getTaskHierarchy().getNestedTasks(importRoot);<NEW_LINE>for (Task task : nested) {<NEW_LINE>TaskBuilder... | e.printStackTrace(System.err); |
202,660 | public static Version maintain(GameRepository repository, Version version) {<NEW_LINE>if (version.getInheritsFrom() != null)<NEW_LINE>throw new IllegalArgumentException("MaintainTask requires independent game version");<NEW_LINE>String mainClass = version.resolve(null).getMainClass();<NEW_LINE>if (mainClass != null && ... | , unique(version), false); |
1,416,074 | private static int packTime(long millis) {<NEW_LINE>Calendar calendar = Calendar.getInstance();<NEW_LINE>calendar.clear();<NEW_LINE>calendar.setTimeInMillis(millis);<NEW_LINE>int year = calendar.get(Calendar.YEAR);<NEW_LINE>int month = calendar.get(Calendar.MONTH);<NEW_LINE>int day = <MASK><NEW_LINE>int hour = calendar... | calendar.get(Calendar.DATE); |
1,692,005 | public void encode() {<NEW_LINE>this.reset();<NEW_LINE>this.putEntityUniqueId(this.entityUniqueId);<NEW_LINE>this.putEntityRuntimeId(this.entityRuntimeId);<NEW_LINE>this.putVarInt(this.playerGamemode);<NEW_LINE>this.putVector3f(this.x, this.y, this.z);<NEW_LINE>this.putLFloat(this.yaw);<NEW_LINE>this.putLFloat(this.pit... | this.putLFloat(this.lightningLevel); |
1,728,138 | protected void onSaveInstanceState(Bundle outState) {<NEW_LINE>super.onSaveInstanceState(outState);<NEW_LINE>outState.putInt(getString(R.string.frag_prev_mid), initalMiddleFragment);<NEW_LINE>outState.putInt(getString(R.string.frag_prev_bottom), initalBottomFragment);<NEW_LINE>outState.putInt(getString(R.string.frag_pr... | outState.putBoolean("exitWithoutChanges", exitWithoutChanges); |
1,340,248 | public static void grayToBuffered(GrayF32 src, DataBufferByte buffer, WritableRaster dst) {<NEW_LINE>final float[] srcData = src.data;<NEW_LINE>final byte[] dstData = buffer.getData();<NEW_LINE>final int numBands = dst.getNumBands();<NEW_LINE>if (numBands == 3) {<NEW_LINE>// CONCURRENT_BELOW BoofConcurrency.loopFor(0, ... | = y * src.width * numBands; |
343,068 | public void navigate(final String url) {<NEW_LINE>RepeatingCommand navigateCommand = new RepeatingCommand() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean execute() {<NEW_LINE>if (getIFrame() != null && getWindow() != null) {<NEW_LINE>// if this is the same page but without an anchor qualification<NEW_LINE>// t... | getWindow().replaceLocationHref(url); |
473,624 | public void mapPartition(Iterable<Row> values, Collector<Tuple2<Integer, Row>> out) {<NEW_LINE>int parallel = getIterationRuntimeContext().getNumberOfParallelSubtasks();<NEW_LINE>int nextSuperStep = getIterationRuntimeContext().getSuperstepNumber();<NEW_LINE>int start = (nextSuperStep - 1) * parallel, end = nextSuperSt... | = new ArrayList<>(numTreesCurLoop); |
1,510,525 | public static void directInlineCacheCall(CompilationResultBuilder crb, AMD64MacroAssembler masm, InvokeTarget callTarget, MarkId markId, long nonOopBits, LIRFrameState info) {<NEW_LINE>masm.alignBeforeCall(true, INLINE_CACHE_MOV_SIZE);<NEW_LINE>// The mark for an invocation that uses an inline cache must be placed at t... | before, after, callTarget, info); |
531,251 | public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {<NEW_LINE>switch(position) {<NEW_LINE>case 0:<NEW_LINE>((OscilloscopeActivity) getActivity()).setRightYAxisScale(16, -16);<NEW_LINE>break;<NEW_LINE>case 1:<NEW_LINE>((OscilloscopeActivity) getActivity()).setRightYAxisScale(8, -8);<NEW_... | .setRightYAxisScale(2, -2); |
1,082,846 | protected void onPostExecute(Object result) {<NEW_LINE>if (result instanceof StatusLine) {<NEW_LINE>notificationManager.cancel(Util.NOTIFY_UPDATE);<NEW_LINE>StatusLine status = (StatusLine) result;<NEW_LINE>if (status.getStatusCode() == 204) {<NEW_LINE>// No Content<NEW_LINE>String none = mContext.getString(R.string.ti... | Toast.LENGTH_LONG).show(); |
1,306,244 | public void addRangeToSqlBuilder(final SqlBuilder sqlBuilder, final String valueExpression, final Func1<T, T> valueConverter) {<NEW_LINE>final boolean hasSpecial = specialNumber != null && includeSpecialNumber != null;<NEW_LINE>final boolean hasMinMax = minRangeValue != null || maxRangeValue != null;<NEW_LINE>if (value... | OR : SqlBuilder.WhereType.AND); |
987,974 | /* Initilizes the view.<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public void addNotify() {<NEW_LINE>super.addNotify();<NEW_LINE>// run under mutex<NEW_LINE>ExplorerManager <MASK><NEW_LINE>if (em != manager) {<NEW_LINE>if (manager != null) {<NEW_LINE>manager.removeVetoableChangeListener(wlvc);<NEW_LINE>manager.removeProp... | em = ExplorerManager.find(this); |
660,720 | private void filterCardsType(int modifiers, String actionCommand) {<NEW_LINE>// ALT or CTRL button was pushed<NEW_LINE>if ((modifiers & ActionEvent.ALT_MASK) == ActionEvent.ALT_MASK || (modifiers & ActionEvent.CTRL_MASK) == ActionEvent.CTRL_MASK) {<NEW_LINE>boolean invert = (modifiers & ActionEvent.ALT_MASK) == ActionE... | .getActionCommand(), actionCommand)); |
1,236,207 | public SourceForBinaryQueryImplementation2.Result findSourceRoots2(URL binaryRoot) {<NEW_LINE>SourceForBinaryQueryImplementation2.Result res = this.cache.get(binaryRoot);<NEW_LINE>if (res != null) {<NEW_LINE>return res;<NEW_LINE>}<NEW_LINE>final <MASK><NEW_LINE>final Collection<JavaPlatform> candidates = new ArrayDeque... | JavaPlatformManager jpm = JavaPlatformManager.getDefault(); |
307,276 | public void write(org.apache.thrift.protocol.TProtocol oprot, knnQueryBatch_args struct) throws org.apache.thrift.TException {<NEW_LINE>struct.validate();<NEW_LINE>oprot.writeStructBegin(STRUCT_DESC);<NEW_LINE>oprot.writeFieldBegin(K_FIELD_DESC);<NEW_LINE>oprot.writeI32(struct.k);<NEW_LINE>oprot.writeFieldEnd();<NEW_LI... | .queryObj.size())); |
1,403,752 | public ListBillingGroupsResult listBillingGroups(ListBillingGroupsRequest listBillingGroupsRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listBillingGroupsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAws... | invoke(request, responseHandler, executionContext); |
596,993 | protected <T> T doOperation(RequestMessage request, ResponseParser<T> parser, String bucketName, String key, boolean keepResponseOpen, List<RequestHandler> requestHandlers, List<ResponseHandler> reponseHandlers) throws OSSException, ClientException {<NEW_LINE>final WebServiceRequest originalRequest = request.getOrigina... | ), bucketName, key, originalRequest); |
1,400,977 | public SwaggerEntity swaggerJson() {<NEW_LINE>this.DEFINITION_MAP.clear();<NEW_LINE>List<ApiInfo> infos = requestMagicDynamicRegistry.mappings();<NEW_LINE>SwaggerEntity swaggerEntity = new SwaggerEntity();<NEW_LINE>swaggerEntity.setInfo(info);<NEW_LINE>swaggerEntity.setBasePath(this.basePath);<NEW_LINE>for (ApiInfo inf... | BaseDefinition baseDefinition = info.getRequestBodyDefinition(); |
1,031,567 | public World[] updates(@QueryParam("queries") String queriesParam) throws InterruptedException, ExecutionException {<NEW_LINE><MASK><NEW_LINE>final World[] worlds = new World[queries];<NEW_LINE>Callable<World[]> callable = () -> {<NEW_LINE>Session session = emf.createEntityManager().unwrap(Session.class);<NEW_LINE>sess... | final int queries = getQueries(queriesParam); |
1,673,088 | private String validateAndCreateMethod() {<NEW_LINE>String methodName = getMethodName();<NEW_LINE>if (!PsiNameHelper.getInstance(myProject).isIdentifier(methodName)) {<NEW_LINE>return RefactoringMessageUtil.getIncorrectIdentifierMessage(methodName);<NEW_LINE>}<NEW_LINE>final PsiElementFactory factory = JavaPsiFacade.ge... | parameterName, parameterType.getPresentableText()); |
230,649 | void parallelizeWithParentSequence(LayoutInterval interval, int endIndex, int dimension) {<NEW_LINE>LayoutInterval parent = interval.getParent();<NEW_LINE>assert parent.isParallel();<NEW_LINE>LayoutInterval parParent = parent;<NEW_LINE>while (!parParent.getParent().isSequential()) {<NEW_LINE>parParent = parParent.getPa... | interval, parent.getGroupAlignment()); |
1,260,954 | public void aggregate(int length, AggregationResultHolder aggregationResultHolder, Map<ExpressionContext, BlockValSet> blockValSetMap) {<NEW_LINE>BlockValSet <MASK><NEW_LINE>switch(blockValSet.getValueType().getStoredType()) {<NEW_LINE>case INT:<NEW_LINE>{<NEW_LINE>int[] values = blockValSet.getIntValuesSV();<NEW_LINE>... | blockValSet = blockValSetMap.get(_expression); |
1,423,883 | public boolean start() {<NEW_LINE>InfluxDbIO.Read spec = source.spec;<NEW_LINE>try (InfluxDB influxDB = getConnection(spec.dataSourceConfiguration(), spec.disableCertificateValidation())) {<NEW_LINE>final String db = spec.database();<NEW_LINE>influxDB.setDatabase(spec.database());<NEW_LINE>influxDB.setRetentionPolicy(s... | .getValues().iterator(); |
454,071 | public Request<DeleteCallAnalyticsJobRequest> marshall(DeleteCallAnalyticsJobRequest deleteCallAnalyticsJobRequest) {<NEW_LINE>if (deleteCallAnalyticsJobRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DeleteCallAnalyticsJobRequest)");<NEW_LINE>}<NEW_LINE>Request<DeleteCa... | setContent(new StringInputStream(snippet)); |
1,660,028 | public <T> Mono<T> init() {<NEW_LINE>return this.containerManager.validateControlContainer().flatMap(dummy -> this.containerManager.getOrCreateConfigItem()).flatMap(dummy -> {<NEW_LINE>double loadFactor = this.calculateLoadFactor();<NEW_LINE>return this.calculateClientThroughputShare(loadFactor).flatMap(controller -> t... | , this.getClientAllocatedThroughput())); |
309,898 | public void marshall(Container container, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (container == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(container.getContainerArn(), CONTAINERARN_BINDING);<NEW_L... | e.getMessage(), e); |
1,084,446 | private void createBackup(@Nonnull ZipOutputStream output) throws IOException {<NEW_LINE>Validate.notNull(output, "The Output Stream cannot be null!");<NEW_LINE>for (File folder : new File("data-storage/Slimefun/stored-blocks/").listFiles()) {<NEW_LINE>addDirectory(output, folder, "stored-blocks/" + folder.getName());<... | ZipEntry entry = new ZipEntry("stored-chunks/chunks.sfc"); |
1,586,873 | private void vpcTiersCanBeMigrated(List<? extends Network> tiersInVpc, Account account, Map<String, String> networkToOffering, boolean resume) {<NEW_LINE>for (Network network : tiersInVpc) {<NEW_LINE>String networkOfferingUuid = networkToOffering.get(network.getUuid());<NEW_LINE>// offering uuid can be a tier where the... | ), newNtwkOff.getTrafficType()); |
1,738,349 | public void drawCounterClassic(InstancePainter painter) {<NEW_LINE>final var g = painter.getGraphics();<NEW_LINE>final var bds = painter.getBounds();<NEW_LINE>final var state = (RegisterData) painter.getData();<NEW_LINE>final var widthVal = painter.getAttributeValue(StdAttr.WIDTH);<NEW_LINE>final var width = widthVal =... | GraphicsUtil.H_CENTER, GraphicsUtil.V_TOP); |
479,276 | private static int merge(Candidate[] K, int k, int i, int[] equvalenceLines, boolean[] equivalence, int p) {<NEW_LINE>int r = 0;<NEW_LINE>Candidate c = K[0];<NEW_LINE>do {<NEW_LINE>int j = equvalenceLines[p];<NEW_LINE>int s = binarySearch(<MASK><NEW_LINE>if (s >= 0) {<NEW_LINE>// j was found in K[]<NEW_LINE>s = k + 1;<... | K, j, r, k); |
624,633 | private static void createTable(String tableName, long readCapacityUnits, long writeCapacityUnits, String partitionKeyName, String partitionKeyType, String sortKeyName, String sortKeyType) {<NEW_LINE>try {<NEW_LINE>System.out.println("Creating table " + tableName);<NEW_LINE>List<KeySchemaElement> keySchema <MASK><NEW_L... | = new ArrayList<KeySchemaElement>(); |
276,403 | public void sync(String trackingUrl, float position, float length) {<NEW_LINE>Log.d(TAG, String.format("Start history updating: %s, position: %s, length: %s", trackingUrl, position, length));<NEW_LINE>HashMap<String, String> headers = mManager.getHeaders();<NEW_LINE>String authorization = headers.get("Authorization");<... | OkHttpHelpers.doGetOkHttpRequest(fullTrackingUrl, testHeaders); |
1,477,768 | public static synchronized void foreachLiveWindow(int dataHandle, Consumer<CallbackData> callback) {<NEW_LINE>CallbackData cbdata = new CallbackData();<NEW_LINE>foreachComponents.clear();<NEW_LINE>foreachComponents.addAll(components.values());<NEW_LINE>for (Component comp : foreachComponents) {<NEW_LINE>if (comp.m_buil... | = comp.m_sendable.get(); |
1,600,138 | public com.amazonaws.services.computeoptimizer.model.LimitExceededException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.computeoptimizer.model.LimitExceededException limitExceededException = new com.amazonaws.services.computeoptimizer.model.LimitExceededExce... | int originalDepth = context.getCurrentDepth(); |
1,172,963 | public static NDVShardSketch buildNDVShardSketch(String schemaName, String tableName, String columnName) throws SQLException {<NEW_LINE>StatisticUtils.logDebug(schemaName, "build ndv sketch start:" + tableName + "," + columnName);<NEW_LINE>String shardKey = buildSketchKey(schemaName, tableName, columnName);<NEW_LINE>//... | shardPart = buildShardParts(schemaName, tableName); |
790,608 | public int[][] highFive(int[][] items) {<NEW_LINE>TreeMap<Integer, PriorityQueue<Integer>> treeMap = new TreeMap<>();<NEW_LINE>for (int[] studentToScores : items) {<NEW_LINE>if (treeMap.containsKey(studentToScores[0])) {<NEW_LINE>PriorityQueue<Integer> maxHeap = treeMap.get(studentToScores[0]);<NEW_LINE>maxHeap.offer(s... | ][1] = sum / 5; |
159,763 | private void handlePurchase(final Purchase purchase) {<NEW_LINE>if (!verifyValidSignature(purchase.getOriginalJson(), purchase.getSignature())) {<NEW_LINE>LOG.info("Got a purchase: " + purchase + ", but signature is bad. Skipping...");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (purchase.getPurchaseState() == Purchase.Pur... | purchase.getPurchaseState() + ". Skipping..."); |
529,350 | public GetDomainStatisticsReportResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>GetDomainStatisticsReportResult getDomainStatisticsReportResult = new GetDomainStatisticsReportResult();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int t... | int originalDepth = context.getCurrentDepth(); |
977,940 | public void readTitledBorder(org.w3c.dom.Node element) throws IOException {<NEW_LINE>if (!XML_TITLED_BORDER.equals(element.getNodeName()))<NEW_LINE>// NOI18N<NEW_LINE>throw new IOException("Invalid format: missing \"" + XML_TITLED_BORDER + "\" element.");<NEW_LINE>try {<NEW_LINE>org.w3c.dom.NamedNodeMap attributes = el... | ATTR_BORDER, "border", borderSupport, element); |
643,149 | private int applyValuesToMapField(ArgSpec argSpec, LookBehind lookBehind, boolean alreadyUnquoted, Range arity, Stack<String> args, Set<ArgSpec> initialized, String argDescription) throws Exception {<NEW_LINE>Class<?>[] classes = argSpec.auxiliaryTypes();<NEW_LINE>if (classes.length < 2) {<NEW_LINE>throw new ParameterE... | length + " types configured.", argSpec, null); |
1,374,826 | public Request<ListBotsRequest> marshall(ListBotsRequest listBotsRequest) {<NEW_LINE>if (listBotsRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(ListBotsRequest)");<NEW_LINE>}<NEW_LINE>Request<ListBotsRequest> request = new DefaultRequest<ListBotsRequest>(listBotsRequest... | request.addHeader("Content-Type", "application/x-amz-json-1.1"); |
739,379 | private static void addVersionConstructorOverload(ClassOrInterfaceDeclaration clazz, ConstructorDeclaration creatorCtor, String versionType, Expression v1Constant) {<NEW_LINE>int nextCtorPosition = clazz.getMembers().indexOf(creatorCtor) + 1;<NEW_LINE>ConstructorDeclaration versionCtor = creatorCtor.clone();<NEW_LINE>v... | .ifPresent(AnnotationExpr::remove)); |
1,569,144 | public static int deserializeInt(final JsonReader reader) throws IOException {<NEW_LINE>if (reader.last() == '"') {<NEW_LINE>final int position = reader.getCurrentIndex();<NEW_LINE>final char[] buf = reader.readSimpleQuote();<NEW_LINE>try {<NEW_LINE>return parseNumberGeneric(buf, reader.getCurrentIndex() - position - 1... | final byte ch = buf[start]; |
1,166,983 | protected void registerStatesAndModels() {<NEW_LINE>registerFluidBlockStates(MekanismFluids.FLUIDS.getAllFluids());<NEW_LINE>ResourceLocation basicCube = modLoc("block/basic_cube");<NEW_LINE>for (Map.Entry<IResource, BlockRegistryObject<?, ?>> entry : MekanismBlocks.PROCESSED_RESOURCE_BLOCKS.entrySet()) {<NEW_LINE>Stri... | ).getBlock(), file); |
77,394 | public void generate(int genType) {<NEW_LINE>String targetOutputDir = "";<NEW_LINE>for (TableMeta tableMeta : tableMetaList) {<NEW_LINE>data.set("tableMeta", tableMeta);<NEW_LINE>String lowerCaseModelName = StrKit.firstCharToLowerCase(tableMeta.modelName);<NEW_LINE>data.set("lowerCaseModelName", lowerCaseModelName);<NE... | .separator + tableMeta.name + "_edit.html"; |
593,555 | public static String formatSummary(StreamSummary<String> topk) {<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>List<Counter<String>> counters = topk.topK(topk.getCapacity());<NEW_LINE>String itemHeader = "item";<NEW_LINE>String countHeader = "count";<NEW_LINE>String errorHeader = "error";<NEW_LINE>int maxIt... | int maxCountLen = countHeader.length(); |
301,407 | public OSSAsyncTask<PutBucketLifecycleResult> putBucketLifecycle(PutBucketLifecycleRequest request, OSSCompletedCallback<PutBucketLifecycleRequest, PutBucketLifecycleResult> completedCallback) {<NEW_LINE>RequestMessage requestMessage = new RequestMessage();<NEW_LINE>Map<String, String> query = new LinkedHashMap<String,... | parser = new ResponseParsers.PutBucketLifecycleResponseParser(); |
1,583,173 | public int compareTo(getTabletStats_result other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.<MASK><NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());<NEW_LINE>if (lastCom... | getClass().getName()); |
388,701 | public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {<NEW_LINE>builder.startObject();<NEW_LINE>builder.field(NUM_PAGES.getPreferredName(), numPages);<NEW_LINE>builder.field(NUM_INPUT_DOCUMENTS.getPreferredName(), numInputDocuments);<NEW_LINE>builder.field(NUM_OUTPUT_DOCUMENTS.ge... | NUM_INVOCATIONS.getPreferredName(), numInvocations); |
549,099 | public String conjugateEnglish(String lemma, boolean negated) {<NEW_LINE>String[] data = ENGLISH_TENSES.<MASK><NEW_LINE>if (data != null) {<NEW_LINE>String conjugated = data[negated ? column + 12 : column];<NEW_LINE>if (!"".equals(conjugated)) {<NEW_LINE>// case: we found a match<NEW_LINE>return conjugated;<NEW_LINE>} ... | get().get(lemma); |
1,746,793 | public static // todo have the submatrices be from different shaped inputs<NEW_LINE>void checkSubImage(Object testClass, String function, boolean checkEquals, Object... inputParam) {<NEW_LINE>try {<NEW_LINE>ImageBase[] larger = new ImageBase[inputParam.length];<NEW_LINE>ImageBase[] subImg = new ImageBase[inputParam.len... | getClass(), function, paramDesc); |
1,367,642 | public static void ycbcrToRgb_U8(Planar<GrayU8> yuv, Planar<GrayU8> rgb) {<NEW_LINE>GrayU8 Y = yuv.getBand(0);<NEW_LINE>GrayU8 U = yuv.getBand(1);<NEW_LINE>GrayU8 V = yuv.getBand(2);<NEW_LINE>GrayU8 R = rgb.getBand(0);<NEW_LINE>GrayU8 G = rgb.getBand(1);<NEW_LINE>GrayU8 B = rgb.getBand(2);<NEW_LINE>// CONCURRENT_BELOW ... | [indexRgb] = (byte) g; |
567,216 | public void stopOpt(SourceRequest request, String operator) {<NEW_LINE>StreamSourceEntity existEntity = sourceMapper.selectByIdForUpdate(request.getId());<NEW_LINE>SourceState curState = SourceState.<MASK><NEW_LINE>SourceState nextState = SourceState.TO_BE_ISSUED_FROZEN;<NEW_LINE>if (!SourceState.isAllowedTransition(cu... | forCode(existEntity.getStatus()); |
1,653,337 | private void initPolarDbXComponents() {<NEW_LINE>// Set private protocol port first(or we will fail to connect metaDB with Xproto).<NEW_LINE>XConnectionManager.getInstance().setMetaDbPort(this.system.getMetaDbXprotoPort());<NEW_LINE>XConnectionManager.getInstance().setStorageDbPort(this.system.getStorageDbXprotoPort())... | this.system.getEnablePrimaryZoneMaintain()); |
423,184 | private synchronized V _put(K key, V value, MODE m) {<NEW_LINE>LinkedEntry<K, V>[] tab = table;<NEW_LINE>int index = hash(key) % tab.length;<NEW_LINE>for (LinkedEntry<K, V> e = tab[index]; e != null; e = e.next) {<NEW_LINE>if (CompareUtil.equals(e.key, key)) {<NEW_LINE>V old = e.value;<NEW_LINE>e.value = value;<NEW_LIN... | header, header.link_next, e); |
182,239 | // http auth credential, either for proxy or target host<NEW_LINE>protected void populateHttpCredential(HttpHost host, AuthScheme authScheme, String user, String password) {<NEW_LINE>UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(user, password);<NEW_LINE>AuthCache authCache = httpClientConte... | .setCredentialsProvider(new BasicCredentialsProvider()); |
56,196 | private CompiledCondition generateExpiryCompiledCondition() {<NEW_LINE>MetaStreamEvent tableMetaStreamEvent = new MetaStreamEvent();<NEW_LINE>tableMetaStreamEvent.setEventType(MetaStreamEvent.EventType.TABLE);<NEW_LINE>TableDefinition matchingTableDefinition = TableDefinition.id(cacheTable.<MASK><NEW_LINE>for (Attribut... | getTableDefinition().getId()); |
1,204,015 | public int createAttempt(final long jobId, final Path logPath) throws IOException {<NEW_LINE>final LocalDateTime now = LocalDateTime.ofInstant(timeSupplier.get(), ZoneOffset.UTC);<NEW_LINE>return jobDatabase.transaction(ctx -> {<NEW_LINE>final Job job = getJob(ctx, jobId);<NEW_LINE>if (job.isJobInTerminalState()) {<NEW... | ), job.getScope()); |
384,361 | public void addSendResultMetric(ProfileEvent currentRecord, String topic, boolean result, long sendTime) {<NEW_LINE>Map<String, String> dimensions = new HashMap<>();<NEW_LINE>dimensions.put(SortMetricItem.KEY_CLUSTER_ID, this.getClusterId());<NEW_LINE>dimensions.put(SortMetricItem.KEY_TASK_NAME, this.getTaskName());<NE... | metricItem.sendFailSize.addAndGet(size); |
1,773,888 | public static GeoCodingResult geocode(final String street, final String house, String postalCode, final String city, final String state, final String country) throws FrameworkException {<NEW_LINE>final String language = Settings.GeocodingLanguage.getValue();<NEW_LINE>final String cacheKey = cacheKey(street, house, post... | city, state, country, language); |
1,620,878 | public boolean apply(Game game, Ability source) {<NEW_LINE>boolean applied = false;<NEW_LINE>for (UUID playerId : targetPointer.getTargets(game, source)) {<NEW_LINE>Player player = game.getPlayer(playerId);<NEW_LINE>if (player != null) {<NEW_LINE>// filter can be static, so it's important to copy here<NEW_LINE>FilterPe... | Sacrifice, target, source, game); |
1,466,148 | public ConnectionRequest fetchAsProperties(final OnComplete<Response<PropertyBusinessObject>> callback, final Class type) {<NEW_LINE>final Connection request = createRequest(true);<NEW_LINE>request.addResponseListener(new ActionListener<NetworkEvent>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void actionPerformed... | (PropertyBusinessObject) type.newInstance(); |
566,324 | public static DescribeRenewalPriceResponse unmarshall(DescribeRenewalPriceResponse describeRenewalPriceResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeRenewalPriceResponse.setRequestId(_ctx.stringValue("DescribeRenewalPriceResponse.RequestId"));<NEW_LINE>PriceInfo priceInfo = new PriceInfo();<NEW_LINE>priceInfo.... | ("DescribeRenewalPriceResponse.PriceInfo.RuleIds[" + i + "]")); |
120,303 | private void writeScnToFile() throws IOException {<NEW_LINE>long scn = _scn.longValue();<NEW_LINE>File dir = _staticConfig.getScnDir();<NEW_LINE>if (!dir.exists() && !dir.mkdirs()) {<NEW_LINE>throw new IOException("unable to create SCN file parent:" + dir.getAbsolutePath());<NEW_LINE>}<NEW_LINE>// delete the temp file ... | Date().toString()); |
1,792,786 | public ConstantPropagationStore leastUpperBound(ConstantPropagationStore other) {<NEW_LINE>Map<Node, Constant> newContents = new LinkedHashMap<>(contents.size() + <MASK><NEW_LINE>// go through all of the information of the other class<NEW_LINE>for (Map.Entry<Node, Constant> e : other.contents.entrySet()) {<NEW_LINE>Nod... | other.contents.size()); |
307,284 | public ModifyTrafficMirrorFilterNetworkServicesResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>ModifyTrafficMirrorFilterNetworkServicesResult modifyTrafficMirrorFilterNetworkServicesResult = new ModifyTrafficMirrorFilterNetworkServicesResult();<NEW_LINE>int originalDepth = context.getCurr... | ().unmarshall(context)); |
517,127 | public void addData(InputStream dataStream, String baseURI, RDFFormat format, boolean verifyData, AdminListener listener) throws IOException, AccessDeniedException {<NEW_LINE>try {<NEW_LINE>Parser parser = null;<NEW_LINE>Map noParams = new HashMap();<NEW_LINE>if (format.equals(RDFFormat.TURTLE)) {<NEW_LINE>parser = new... | parser.setDatatypeHandling(Parser.DT_IGNORE); |
316,767 | public void handle(Element element) {<NEW_LINE>handleCommonBeanAttributes(element, builder, parserContext);<NEW_LINE><MASK><NEW_LINE>if (attributes != null) {<NEW_LINE>Node instanceRefNode = attributes.getNamedItem("instance-ref");<NEW_LINE>if (instanceRefNode == null) {<NEW_LINE>throw new IllegalStateException("'insta... | NamedNodeMap attributes = element.getAttributes(); |
322,524 | public static void main(String[] args) {<NEW_LINE>// Apache SIS j.u.l logging redirection.<NEW_LINE>SLF4JBridgeHandler.removeHandlersForRootLogger();<NEW_LINE>SLF4JBridgeHandler.install();<NEW_LINE>LOGGER.info("Arguments Received: {}", Arrays.asList(args));<NEW_LINE>ArgsConfig argsConfig = new ArgsConfig();<NEW_LINE>JC... | dataset = DatasetOperations.setup(argsConfig); |
1,439,475 | public static String parseTree(String s, Vector children) {<NEW_LINE>children.clear();<NEW_LINE>String root;<NEW_LINE>if ((s != null) && (s.length() > 0) && s.startsWith("{") && s.endsWith("}")) {<NEW_LINE>int end = s.indexOf('{', 1);<NEW_LINE>if (end == -1) {<NEW_LINE>end = s.indexOf('}', 1);<NEW_LINE>return s.substri... | (0, match + 1)); |
1,231,523 | public void onEnd(AttributesBuilder attributes, Context context, REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error) {<NEW_LINE>set(attributes, SemanticAttributes.HTTP_REQUEST_CONTENT_LENGTH, getter.requestContentLength(request, response));<NEW_LINE>set(attributes, SemanticAttributes.HTTP_REQUEST_C... | responseHeader(request, response, name); |
114,766 | public int connect(String address, String username, String password) {<NEW_LINE>int result = CONNECT_ERROR;<NEW_LINE>String camIP = "";<NEW_LINE>try {<NEW_LINE>camIP = getURL(address);<NEW_LINE>nvt = new OnvifDevice(camIP, username, password);<NEW_LINE>nvt.getSoap().setLogging(false);<NEW_LINE>nvt.getDevices().getCapab... | get(0).getToken(); |
925,477 | public void sendMetaKey(MetaKeyBean meta) {<NEW_LINE>RemotePointer pointer = canvas.getPointer();<NEW_LINE>int x = pointer.getX();<NEW_LINE>int y = pointer.getY();<NEW_LINE>if (meta.isMouseClick()) {<NEW_LINE>GeneralUtils.debugLog(debugLogging, TAG, "event is a mouse click");<NEW_LINE>int button = meta.getMouseButtons(... | meta.getMetaFlags() | onScreenMetaState); |
371,181 | static FileObject copyBuildScript(@NonNull final Project project) throws IOException {<NEW_LINE>final <MASK><NEW_LINE>FileObject rpBuildScript = projDir.getFileObject(BUILD_SCRIPT_PATH);<NEW_LINE>if (rpBuildScript != null && !isBuildScriptUpToDate(project)) {<NEW_LINE>// try to close the file just in case the file is a... | FileObject projDir = project.getProjectDirectory(); |
666,421 | public Schema create(SchemaPlus parentSchema, String name, Map<String, Object> operand) {<NEW_LINE>final ObjectMapper mapper = new ObjectMapper();<NEW_LINE>mapper.configure(JsonParser.Feature.ALLOW_SINGLE_QUOTES, true);<NEW_LINE>try {<NEW_LINE>final Map<String, Integer> coordinates = mapper.readValue((String) operand.g... | client = connect(coordinates, userConfig); |
627,693 | public Params map(Params value) throws Exception {<NEW_LINE>long corpusRowCnt = value.getLong("corpusRowCnt");<NEW_LINE>long corpusWordCnt = value.getLong("corpusWordCnt");<NEW_LINE>int batchSize;<NEW_LINE>if (corpusRowCnt < 10000) {<NEW_LINE>batchSize = (int) (corpusRowCnt / 2 + corpusRowCnt % 2);<NEW_LINE>} else if (... | value.getIntegerOrDefault("negative", 5); |
842,962 | private DeviceCredentials saveOrUpdate(TenantId tenantId, DeviceCredentials deviceCredentials) {<NEW_LINE>if (deviceCredentials.getCredentialsType() == null) {<NEW_LINE>throw new DataValidationException("Device credentials type should be specified");<NEW_LINE>}<NEW_LINE>formatCredentials(deviceCredentials);<NEW_LINE>lo... | (t).orElse(null); |
1,233,541 | public void process(ICStream ics, float[] data, FilterBank filterBank, SampleFrequency sf) {<NEW_LINE>final ICSInfo info = ics.getInfo();<NEW_LINE>if (!info.isEightShortFrame()) {<NEW_LINE>final int samples = frameLength << 1;<NEW_LINE>final float[] _in = new float[2048];<NEW_LINE>final float[] out = new float[2048];<N... | ics, out, sf, true); |
663,176 | protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {<NEW_LINE>Parser parser = new Parser(PATTERN, (String) msg);<NEW_LINE>if (!parser.matches()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>DeviceSession deviceSession = getDeviceSession(channel, remoteAddress, parser.next(... | setLongitude(parser.nextDouble()); |
1,337,405 | public static SearchAudiencesResponse unmarshall(SearchAudiencesResponse searchAudiencesResponse, UnmarshallerContext _ctx) {<NEW_LINE>searchAudiencesResponse.setRequestId(_ctx.stringValue("SearchAudiencesResponse.RequestId"));<NEW_LINE>searchAudiencesResponse.setErrorDesc(_ctx.stringValue("SearchAudiencesResponse.Erro... | (_ctx.integerValue("SearchAudiencesResponse.Data.PageSize")); |
924,269 | private void modifyForSoundVibrationAndLight(Builder mBuilder, boolean notify, boolean quietHours, SharedPreferences preferences) {<NEW_LINE>final Resources resources = mXmppConnectionService.getResources();<NEW_LINE>final String ringtone = preferences.getString("notification_ringtone", resources.getString(R.string.not... | mBuilder.setCategory(Notification.CATEGORY_MESSAGE); |
1,450,809 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {<NEW_LINE>tvX.setText(String.valueOf(seekBarX.getProgress()));<NEW_LINE>tvY.setText(String.valueOf(seekBarY.getProgress()));<NEW_LINE>ArrayList<BarEntry> values = new ArrayList<>();<NEW_LINE>for (int i = 0; i < seekBarX.getProgress(); i++) ... | .getData().notifyDataChanged(); |
1,042,593 | public void process(double[] input, double[] output) {<NEW_LINE>H.data = input;<NEW_LINE>int outputIdx = 0;<NEW_LINE>for (int viewIdx = 0; viewIdx < cameras1.size(); viewIdx++) {<NEW_LINE>DMatrixRMaj P = cameras1.get(viewIdx);<NEW_LINE>for (int pointIdx = 0; pointIdx < scene1.size(); pointIdx++) {<NEW_LINE>Point4D_F64 ... | renderPixel(P, a, pixel1); |
464,862 | public Settings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>AwsJsonReader reader = context.getReader();<NEW_LINE>if (!reader.isContainer()) {<NEW_LINE>reader.skipValue();<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Settings settings = new Settings();<NEW_LINE>reader.beginObject();<NEW_LINE>whi... | ().unmarshall(context)); |
1,434,218 | // Get frequency element in collection<NEW_LINE>private static void testCount() {<NEW_LINE>Collection<String> collection = Lists.newArrayList(<MASK><NEW_LINE>Iterable<String> iterable = collection;<NEW_LINE>MutableCollection<String> collectionGS = FastList.newListWith("a1", "a2", "a3", "a1");<NEW_LINE>// Get frequency ... | "a1", "a2", "a3", "a1"); |
1,379,738 | public String loginUser(String username, String password) throws ApiException {<NEW_LINE>Object localVarPostBody = null;<NEW_LINE>// verify the required parameter 'username' is set<NEW_LINE>if (username == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");<... | throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser"); |
1,252,239 | private boolean updateBytes(UserStatisticsVO userStats, long newCurrentBytesSent, long newCurrentBytesReceived) {<NEW_LINE>long oldNetBytesSent = userStats.getNetBytesSent();<NEW_LINE>long oldNetBytesReceived = userStats.getNetBytesReceived();<NEW_LINE>long oldCurrentBytesSent = userStats.getCurrentBytesSent();<NEW_LIN... | + toHumanReadableSize(newCurrentBytesReceived) + "."); |
1,757,200 | private void addNewNode() {<NEW_LINE>if (gridTab.getRecord_ID() > 0) {<NEW_LINE>String name = (String) gridTab.getValue("Name");<NEW_LINE>String description = (String) gridTab.getValue("Description");<NEW_LINE>boolean summary = gridTab.getValueAsBoolean("IsSummary");<NEW_LINE>// Menu - Action<NEW_LINE>String imageIndic... | getTree().renderItemByPath(path); |
88,031 | public MappedStatement injectMappedStatement(Class<?> mapperClass, Class<?> modelClass, TableInfo tableInfo) {<NEW_LINE>String sql;<NEW_LINE>SqlMethod sqlMethod = SqlMethod.LOGIC_DELETE_BY_MAP;<NEW_LINE>if (tableInfo.isWithLogicDelete()) {<NEW_LINE>sql = String.format(sqlMethod.getSql(), tableInfo.getTableName(), sqlLo... | configuration, sql, Map.class); |
533,760 | private static void writeUsersAndRoles(OutputWriter viewWriter, List<AdminUser> users, List<AdminRole> roles) {<NEW_LINE>List<String> userErrors = new ArrayList<>();<NEW_LINE>users.stream().map(user -> user.errors().getAllOn(AdminUser.ADMIN)).filter(Objects::nonNull).forEach(userErrors::addAll);<NEW_LINE>List<String> r... | errorsWriter.addChildList("users", userErrors); |
1,100,807 | public static void main(String[] args) {<NEW_LINE>final String USAGE = "\n" + "Usage:\n" + " CreateDatasetExportJob <name, datasetArn, ingestionMode, roleArn, s3BucketPath>\n\n" + "Where:\n" + " jobName - The name for the dataset export job.\n" + " datasetArn - The Amazon Resource Name (ARN) of the dataset tha... | ingestionMode, roleArn, s3BucketPath, kmsKeyArn); |
1,311,720 | public boolean configure(final FeatureContext context) {<NEW_LINE>final Configuration config = context.getConfiguration();<NEW_LINE>final String jsonFeature = getValue(config.getProperties(), config.getRuntimeType(), JSON_FEATURE, ST_JSON_FEATURE, String.class);<NEW_LINE>// Do not register our JSON feature if another o... | .getRuntimeType()), ST_JSON_FEATURE); |
1,203,149 | public DeleteFlowResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DeleteFlowResult deleteFlowResult = new DeleteFlowResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentT... | String currentParentElement = context.getCurrentParentElement(); |
780,460 | public static void main(String[] args) throws Exception {<NEW_LINE>AmazonDynamoDB client = AmazonDynamoDBClientBuilder.standard().withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("http://localhost:8000", "us-west-2")).build();<NEW_LINE>DynamoDB dynamoDB = new DynamoDB(client);<NEW_LINE>Table table =... | .withMap("info", infoMap)); |
686,436 | private InputStreamGroupIterator copyFilesFromSharedVolume(String containerId, String folderName) {<NEW_LINE>Map<String, File> streams = new HashMap<>();<NEW_LINE>Optional<String> oWorkDir = client.pods().withName(containerId).get().getSpec().getContainers().get(0).getEnv().stream().filter(env -> env.getName().equals("... | f.getName(), f); |
1,030,452 | public CaseDefinitionResponse createCaseDefinitionResponse(CaseDefinition caseDefinition, RestUrlBuilder urlBuilder) {<NEW_LINE>CaseDefinitionResponse response = new CaseDefinitionResponse();<NEW_LINE>response.setUrl(urlBuilder.buildUrl(CmmnRestUrls.URL_CASE_DEFINITION, caseDefinition.getId()));<NEW_LINE>response.setId... | setStartFormDefined(caseDefinition.hasStartFormKey()); |
990,737 | private Whitespace countWhiteSpaceBeforeRightBrace(CodeStyle.BracePlacement placement, int currentLine, int addLine, int indent, List<FormatToken> formatTokens, int currentIndex, CharSequence oldText, int lastBracedBlockIndent) {<NEW_LINE>int lines;<NEW_LINE>int spaces;<NEW_LINE>Whitespace result;<NEW_LINE>if (placemen... | result = countWhiteSpaceForPreserveExistingBracePlacement(oldText, lastBracedBlockIndent); |
348,898 | public static DescribeAppEnvsResponse unmarshall(DescribeAppEnvsResponse describeAppEnvsResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeAppEnvsResponse.setRequestId(_ctx.stringValue("DescribeAppEnvsResponse.RequestId"));<NEW_LINE>describeAppEnvsResponse.setCode(_ctx.stringValue("DescribeAppEnvsResponse.Code"));<... | ("DescribeAppEnvsResponse.AppEnvs[" + i + "].StorageBase")); |
232,374 | public Object strPropFromVars(List<Object> parameters, String lastParam, String props, Map<String, String> map, List<String> oldKeys, List<String> oldKeysNormalized, VariableResolver resolver) throws ParserException {<NEW_LINE>Object retval = null;<NEW_LINE>String delim = ";";<NEW_LINE>int minParams = 1;<NEW_LINE>int m... | .class, String.class }); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.