idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,645,492 | public static void horizontal(Kernel1D_S32 kernel, ImageBorder_S32 input, GrayS32 output, int divisor) {<NEW_LINE>final int[] dataDst = output.data;<NEW_LINE>final int[] dataKer = kernel.data;<NEW_LINE>final int offset = kernel.getOffset();<NEW_LINE>final int kernelWidth = kernel.getWidth();<NEW_LINE>final int width = ... | int height = output.getHeight(); |
1,565,900 | public int deserialize(final byte[] stream, int offset) {<NEW_LINE>this.size = OIntegerSerializer.INSTANCE.deserializeLiteral(stream, offset);<NEW_LINE>int entriesSize = OIntegerSerializer.INSTANCE.deserializeLiteral(stream, offset);<NEW_LINE>offset += OIntegerSerializer.INT_SIZE;<NEW_LINE>for (int i = 0; i < entriesSi... | INSTANCE.deserialize(stream, offset); |
3,447 | private void parseDirectoryFiles(WsResource directory, ServerConfiguration configuration) throws ConfigParserException, ConfigValidationException {<NEW_LINE>if (directory != null) {<NEW_LINE>File[] defaultFiles = getChildXMLFiles(directory);<NEW_LINE>if (defaultFiles == null)<NEW_LINE>return;<NEW_LINE>Arrays.sort(defau... | parser.handleParseError(ex, null); |
1,593,707 | public double knightProbability(int n, int k, int row, int column) {<NEW_LINE>double[][][] dp = new double[k + 1][n][n];<NEW_LINE>int[] dirs = { -2, -1, 2, 1, -2, 1, 2, -1, -2 };<NEW_LINE>for (int l = 0; l <= k; ++l) {<NEW_LINE>for (int i = 0; i < n; ++i) {<NEW_LINE>for (int j = 0; j < n; ++j) {<NEW_LINE>if (l == 0) {<... | [x][y] / 8; |
1,287,741 | protected Broadcaster removeAtmosphereResource(AtmosphereResource r, boolean executeDone) {<NEW_LINE>if (destroyed.get()) {<NEW_LINE>logger.debug(DESTROYED, getID(), "removeAtmosphereResource(AtmosphereResource r)");<NEW_LINE>return this;<NEW_LINE>}<NEW_LINE>boolean removed = resources.remove(r);<NEW_LINE>if (removed) ... | ).removeAttribute(getID()); |
1,523,843 | private void extractTrackFromResultEntry(List<AudioTrack> tracks, Element element, Function<AudioTrackInfo, AudioTrack> trackFactory) {<NEW_LINE>Element durationElement = element.select("[class^=video-time]").first();<NEW_LINE>Element contentElement = element.<MASK><NEW_LINE>String videoId = element.attr("data-context-... | select(".yt-lockup-content").first(); |
1,175,178 | public synchronized static Counter registerOrRetrieveRESTUnmappedExceptionMetric(String fullyQualifiedClassName, String methodSignature) {<NEW_LINE>MetricRegistry baseMetricRegistry = sharedMetricRegistry.getOrCreate(MetricRegistry.Type.BASE.getName());<NEW_LINE>Metadata metadata = Metadata.builder().withType(MetricTyp... | = new Tag("method", methodSignature); |
76,765 | private void loadNode41() {<NEW_LINE>DataTypeEncodingTypeNode node = new DataTypeEncodingTypeNode(this.context, Identifiers.AddNodesItem_Encoding_DefaultXml, new QualifiedName(0, "Default XML"), new LocalizedText("en", "Default XML"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0)<MASK><NEW_LINE>nod... | , UByte.valueOf(0)); |
1,440,692 | public ListDatasetGroupsResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ListDatasetGroupsResult listDatasetGroupsResult = new ListDatasetGroupsResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LI... | )).unmarshall(context)); |
246,202 | private String validateTokenType(HttpServletRequest request, HttpServletResponse response) throws IOException, OidcServerException {<NEW_LINE>String queryString = request.getQueryString();<NEW_LINE>if (queryString == null) {<NEW_LINE>BrowserAndServerLogMessage updateMsg = new BrowserAndServerLogMessage(tc, "OAUTH_COVER... | tc, updateMsg.getServerErrorMessage()); |
1,534,950 | public static Observable<TwoDataBean<BookShelfBean, List<BookChapterBean>>> changeBookSource(SearchBookBean searchBook, BookShelfBean oldBook) {<NEW_LINE>BookShelfBean bookShelfBean = BookshelfHelp.getBookFromSearchBook(searchBook);<NEW_LINE>bookShelfBean.setSerialNumber(oldBook.getSerialNumber());<NEW_LINE>bookShelfBe... | setReplaceEnable(oldBook.getReplaceEnable()); |
1,705,796 | public void closePathWithBezier(Point2D controlPoint1, Point2D controlPoint2) {<NEW_LINE>_touch();<NEW_LINE>if (isEmptyImpl())<NEW_LINE>throw new GeometryException("Invalid call. This operation cannot be performed on an empty geometry.");<NEW_LINE>m_bPathStarted = false;<NEW_LINE>int pathIndex = m_paths.size() - 2;<NEW... | curveIndex + 1, controlPoint1.y); |
1,412,048 | public void encodeEnd(FacesContext context, UIComponent component) throws IOException {<NEW_LINE>Lifecycle lifecycle = (Lifecycle) component;<NEW_LINE>String clientId = lifecycle.getClientId(context);<NEW_LINE>ResponseWriter writer = context.getResponseWriter();<NEW_LINE><MASK><NEW_LINE>writer.writeAttribute("id", clie... | writer.startElement("table", lifecycle); |
231,361 | // DocumentListener implementation -----------------------------------------<NEW_LINE>public void changedUpdate(DocumentEvent e) {<NEW_LINE>File rootDirFile = FileUtil.toFile(((LocationItem) locationCB.getSelectedItem()).getFileObject());<NEW_LINE>if (rootDirFile != null) {<NEW_LINE>String documentName = documentNameTe... | changeUpdate(e, getPanel()); |
66,771 | private void sortRanges(int beforeChangedLine1, int beforeChangedLine2, int linesShift, @Nonnull List<Range> rangesBeforeChange, @Nonnull List<Range> changedRanges, @Nonnull List<Range> rangesAfterChange) {<NEW_LINE>int lastBefore = -1;<NEW_LINE>int firstAfter = myRanges.size();<NEW_LINE>for (int i = 0; i < myRanges.si... | lastChanged.getLine2() + linesShift); |
1,720,631 | public void serialize(DashboardLogEntryDTOGroup logEntryGroup, JsonGenerator jsonGenerator, SerializerProvider provider) throws IOException {<NEW_LINE>if (logEntryGroup.getLogEntryDTOS().size() > 1) {<NEW_LINE>if (logEntryGroup.getLogEntryDTOS() != null) {<NEW_LINE>jsonGenerator.writeStartObject();<NEW_LINE>DashboardLo... | getLogEntryDTOS().get(0); |
623,995 | private void initialize() {<NEW_LINE>setModal(true);<NEW_LINE>defaults().space(6);<NEW_LINE>add(contentTable = new Table(skin)).expand().fill();<NEW_LINE>row();<NEW_LINE>add(buttonTable = new Table(skin)).fillX();<NEW_LINE>contentTable.defaults().space(6);<NEW_LINE>buttonTable.<MASK><NEW_LINE>buttonTable.addListener(ne... | defaults().space(6); |
1,371,796 | public static void main(String[] args) {<NEW_LINE>final String USAGE = "\n" + "To run this example, supply the name of an S3 bucket and object to\n" + "download from it.\n" + "\n" + "Ex: GetObject <bucketname> <filename>\n";<NEW_LINE>if (args.length < 2) {<NEW_LINE>System.out.println(USAGE);<NEW_LINE>System.exit(1);<NE... | println(e.getMessage()); |
815,002 | private void analyzeScopeComplexity() {<NEW_LINE>CxxComplexityScope scope = complexityScopes.removeFirst();<NEW_LINE>final int maxComplexity = getMaxComplexity();<NEW_LINE>final int currentComplexity = scope.getComplexity();<NEW_LINE>if (scope.getComplexity() > maxComplexity) {<NEW_LINE><MASK><NEW_LINE>msg.append("The ... | var msg = new StringBuilder(256); |
202,391 | public DataStore attachHost(DataStore store, HostScope scope, StoragePoolInfo existingInfo) {<NEW_LINE>StoragePoolHostVO poolHost = storagePoolHostDao.findByPoolHost(store.getId(<MASK><NEW_LINE>if (poolHost == null) {<NEW_LINE>poolHost = new StoragePoolHostVO(store.getId(), scope.getScopeId(), existingInfo.getLocalPath... | ), scope.getScopeId()); |
1,688,808 | public static void loadPersonalRankData(final HugeGraph graph) {<NEW_LINE>SchemaManager schema = graph.schema();<NEW_LINE>schema.propertyKey("name").asText().ifNotExist().create();<NEW_LINE>schema.vertexLabel("person").properties("name").useCustomizeStringId()<MASK><NEW_LINE>schema.vertexLabel("movie").properties("name... | .ifNotExist().create(); |
1,797,817 | public NotationDependency parse(Map<String, Object> notation) {<NEW_LINE>Assert.isTrue(notation.containsKey(NAME_KEY), "Name must be specified!");<NEW_LINE>GolangPackage pkg = determinePackage(notation);<NEW_LINE>if (pkg instanceof ResolvableGolangPackage) {<NEW_LINE>String rootPathString = ResolvableGolangPackage.clas... | cast(pkg).getRootPathString(); |
632,199 | public final IngestModuleInfo addIngestModule(String displayName, String factoryClassName, IngestModuleType type, String version) throws TskCoreException {<NEW_LINE>CaseDbConnection connection = connections.getConnection();<NEW_LINE>ResultSet resultSet = null;<NEW_LINE>Statement statement = null;<NEW_LINE>String unique... | executeQuery("SELECT * FROM ingest_modules WHERE unique_name = '" + uniqueName + "'"); |
1,300,199 | public static double deltaECMC(double l1, double a1, double b1, double l2, double a2, double b2, double lightness, double chroma) {<NEW_LINE>// double C1 = Math.sqrt(Math.pow(a1,2) + Math.pow(b1,2));<NEW_LINE>double C1 = Math.sqrt(a1 * a1 + b1 * b1);<NEW_LINE>// double C2 = Math.sqrt(Math.pow(a2,2) + Math.pow(b2,2));<N... | 1 + 0.0131 * C1) + 0.638; |
1,685,465 | public ExportJobRequest 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>ExportJobRequest exportJobRequest = new ExportJobRequest();<NEW_LINE>re... | String name = reader.nextName(); |
866,771 | public static String createTable(AmazonDynamoDB client, String tableName) {<NEW_LINE>java.util.List<AttributeDefinition> attributeDefinitions = new ArrayList<AttributeDefinition>();<NEW_LINE>attributeDefinitions.add(new AttributeDefinition().withAttributeName("Id").withAttributeType("N"));<NEW_LINE>java.util.List<KeySc... | .getTable().getLatestStreamArn(); |
288,730 | protected WizardDescriptor.Panel[] initializePanels() {<NEW_LINE>WizardDescriptor.Panel[] panels = new WizardDescriptor.Panel[3];<NEW_LINE>repositoryStep = new RepositoryStep(RepositoryStep.IMPORT_HELP_ID);<NEW_LINE>repositoryStep.addChangeListener(ImportWizard.this);<NEW_LINE>File file = <MASK><NEW_LINE>importStep = n... | context.getRootFiles()[0]; |
1,394,412 | private static byte[] toBytesUnsigned(final BigInteger bigInt) {<NEW_LINE>// Copied from Apache Commons Codec 1.8<NEW_LINE>int bitlen = bigInt.bitLength();<NEW_LINE>// round bitlen<NEW_LINE>bitlen = ((bitlen + <MASK><NEW_LINE>final byte[] bigBytes = bigInt.toByteArray();<NEW_LINE>if (((bigInt.bitLength() % 8) != 0) && ... | 7) >> 3) << 3; |
488,792 | public void run() {<NEW_LINE>try {<NEW_LINE>while (true) {<NEW_LINE>Thread.sleep(delay);<NEW_LINE>val remapped = new AtomicBoolean(false);<NEW_LINE>val nodes = mesh.get().flatNodes();<NEW_LINE>for (val n : nodes) {<NEW_LINE>// we're skipping own node<NEW_LINE>if (transport.id().equals(n.getId()))<NEW_LINE>continue;<NEW... | ()), PropagationMode.ONLY_DOWN); |
1,734,982 | static StarRatingPreferences fromJSON(final JSONObject json) {<NEW_LINE>StarRatingPreferences srp = new StarRatingPreferences();<NEW_LINE>if (json != null) {<NEW_LINE>try {<NEW_LINE>srp.<MASK><NEW_LINE>srp.sessionLimit = json.optInt(KEY_SESSION_LIMIT, 5);<NEW_LINE>srp.sessionAmount = json.optInt(KEY_SESSION_AMOUNT, 0);... | appVersion = json.getString(KEY_APP_VERSION); |
1,396,050 | public static SslContext loadSslContext() throws SSLException {<NEW_LINE>String securityFileName = "security.toml";<NEW_LINE>String home = System.getProperty("user.home");<NEW_LINE>File f1 = new File("./" + securityFileName);<NEW_LINE>File f2 = new File(home + "/.seaweedfs/" + securityFileName);<NEW_LINE>File f3 = new ... | .exists() ? f3 : null; |
1,789,024 | protected int translate(final CharSequence input, final int index, final Writer out) throws IOException {<NEW_LINE>if (input.charAt(index) == '\\' && index + 1 < input.length() && input.charAt(index + 1) == 'u') {<NEW_LINE>// consume optional additional 'u' chars<NEW_LINE>int i = 2;<NEW_LINE>while (index + i < input.le... | .write((char) value); |
3,379 | private static Optional<Condition> filteredCondition(Condition condition, Set<TenantName> authorizedForTenantNames, boolean isOperator, FetchVector resolveVector) {<NEW_LINE>// If the condition is one of the conditions that we resolve on the server, e.g. email, we do not need to<NEW_LINE>// propagate it back to the use... | value() + ":"))); |
1,134,334 | public double extractFinalResult(Long2LongOpenHashMap intermediateResult) {<NEW_LINE>ObjectIterator<Long2LongMap.Entry> iterator = intermediateResult.long2LongEntrySet().fastIterator();<NEW_LINE>Long2LongMap.Entry first = iterator.next();<NEW_LINE>long maxFrequency = first.getLongValue();<NEW_LINE>switch(_multiModeRedu... | Entry next = iterator.next(); |
692,712 | public static DescribeEniMonitorDataResponse unmarshall(DescribeEniMonitorDataResponse describeEniMonitorDataResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeEniMonitorDataResponse.setRequestId(_ctx.stringValue("DescribeEniMonitorDataResponse.RequestId"));<NEW_LINE>describeEniMonitorDataResponse.setTotalCount(_ct... | = new ArrayList<EniMonitorData>(); |
730,324 | final CreateCustomRoutingListenerResult executeCreateCustomRoutingListener(CreateCustomRoutingListenerRequest createCustomRoutingListenerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(createCustomRoutingListenerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.get... | endClientExecution(awsRequestMetrics, request, response); |
1,056,810 | private StreamObserver<T> biStreamImperative(StreamObserver<T> responseObserver, ServerCallStreamObserver<T> serverCallStreamObserver, AtomicBoolean wasReady) {<NEW_LINE>return new StreamObserver<T>() {<NEW_LINE><NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>@Override<NEW_LINE>public void onNext(T request) {<NEW_LIN... | ]> message = toSpringMessage(request); |
1,342,277 | public void testHE054() {<NEW_LINE>try {<NEW_LINE>tm.begin();<NEW_LINE>tm.getTransaction().enlistResource(new XAResourceImpl().setPrepareAction(XAException.XA_RBROLLBACK));<NEW_LINE>tm.getTransaction().enlistResource(new XAResourceImpl().setRollbackAction(XAException.XA_HEURHAZ));<NEW_LINE>tm.getTransaction().enlistRes... | e.printStackTrace(System.out); |
1,549,234 | public void testSFTimerServiceBeforeCompletion() throws Exception {<NEW_LINE>// --------------------------------------------------------------------<NEW_LINE>// Execute the test by creating instance of the bean... append results<NEW_LINE>// - beforeCompletion may not be called directly....<NEW_LINE>// -----------------... | sf = SFHome.create("beforeCompletion"); |
889,190 | public void evaluate(Evaluation evaluation) {<NEW_LINE>DecisionResultCollector decision = new DecisionResultCollector() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>protected void onComplete(Result result) {<NEW_LINE>if (isGranted(result.getResults().iterator().next())) {<NEW_LINE>evaluation.grant();<NEW_LINE>} else {<NEW_L... | associatedPolicy, decision, authorization, decisionCache); |
1,407,737 | public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {<NEW_LINE>// Inflate the layout for this fragment<NEW_LINE>View view = inflater.inflate(R.<MASK><NEW_LINE>ButterKnife.bind(this, view);<NEW_LINE>mSearchCategoryAdapter = new SearchCategoryAdapter(getActivity(), new ArrayL... | layout.fragment_search_category, container, false); |
1,194,446 | final ListQueuesResult executeListQueues(ListQueuesRequest listQueuesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listQueuesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<... | awsRequestMetrics.endEvent(Field.RequestMarshallTime); |
801,659 | int run() {<NEW_LINE>final Map<String, String> configProps = options.getConfigFile().map(Ksql::loadProperties).orElseGet(Collections::emptyMap);<NEW_LINE>final Map<String, String> sessionVariables = options.getVariables();<NEW_LINE>try (KsqlRestClient restClient = buildClient(configProps)) {<NEW_LINE>try (Cli cli = cli... | getScriptFile().get()); |
1,701,326 | public void runActions(JREvaluationTime evaluationTime, byte evaluation) throws JRException {<NEW_LINE>if (log.isDebugEnabled()) {<NEW_LINE>log.debug(id + " running delayed actions on " + evaluationTime);<NEW_LINE>}<NEW_LINE>LinkedHashMap<FillPageKey, LinkedMap<Object, EvaluationBoundAction>> pagesMap = actionsMap.get(... | .entrySet().iterator(); |
526,210 | public void run(RegressionEnvironment env) {<NEW_LINE>String stmtTextSet = "@name('set') on SupportBean set var1OND = intPrimitive, var2OND = var1OND + 1, var3OND = var1OND + var2OND";<NEW_LINE>env.compileDeploy(stmtTextSet).addListener("set");<NEW_LINE>String[] fieldsVar = new String[] { "var1OND", "var2OND", "var3OND... | 90, 91, 181 } }); |
963,432 | static TBigInteger multiplyPAP(TBigInteger a, TBigInteger b) {<NEW_LINE>// PRE: a >= b<NEW_LINE>int aLen = a.numberLength;<NEW_LINE>int bLen = b.numberLength;<NEW_LINE>int resLength = aLen + bLen;<NEW_LINE>int resSign = (a.sign != b.sign) ? -1 : 1;<NEW_LINE>// A special case when both numbers don't exceed int<NEW_LINE>... | int[] bDigits = b.digits; |
81,786 | private void parseFallbackAsPlainText(final File binFile, final Map<String, Object> metaMap, final IOException ioExc) {<NEW_LINE>try {<NEW_LINE>// On error lets try a fallback operation<NEW_LINE>final String errorMessage = String.format("Error Reading Tika parsed Stream for file [%s] [%s] ", binFile.getAbsolutePath(), ... | put(FileAssetAPI.CONTENT_FIELD, content); |
275,307 | public void process(CommandProcess process) {<NEW_LINE>RowAffect affect = new RowAffect();<NEW_LINE>Instrumentation inst = process.session().getInstrumentation();<NEW_LINE>if (hashCode == null && classLoaderClass != null) {<NEW_LINE>List<ClassLoader> matchedClassLoaders = ClassLoaderUtils.getClassLoaderByClassName(inst... | (classLoaderClass).setMatchedClassLoaders(classLoaderVOList); |
237,909 | protected void render(TileEntityFluidTank tile, float partialTick, PoseStack matrix, MultiBufferSource renderer, int light, int overlayLight, ProfilerFiller profiler) {<NEW_LINE>FluidStack fluid = tile.fluidTank.getFluid();<NEW_LINE>float fluidScale = tile.prevScale;<NEW_LINE>VertexConsumer buffer = null;<NEW_LINE>if (... | ), overlayLight, FaceDisplay.FRONT); |
229,190 | public void sample(int iterations) throws IOException {<NEW_LINE>for (int iteration = 1; iteration <= iterations; iteration++) {<NEW_LINE>long iterationStart = System.currentTimeMillis();<NEW_LINE>// Loop over every document in the corpus<NEW_LINE>for (int doc = 0; doc < data.size(); doc++) {<NEW_LINE>FeatureSequence t... | data.get(doc).topicSequence; |
1,270,966 | private boolean isURLStart() {<NEW_LINE>// The 'h' in https?:// already matched - need to match the rest of it<NEW_LINE>boolean isStart = true;<NEW_LINE>int pos = position + 1;<NEW_LINE>// The 't' in http://<NEW_LINE>if (pos < buffer.length()) {<NEW_LINE>isStart &= buffer.get(pos) == (byte) 't' || buffer.get(pos) == (b... | (pos) == (byte) 'T'; |
407,588 | void changeLimitsExample() {<NEW_LINE>RateLimiterConfig config = RateLimiterConfig.custom().limitForPeriod(1).limitRefreshPeriod(Duration.ofSeconds(1)).timeoutDuration(Duration.ofSeconds(1)).build();<NEW_LINE>RateLimiterRegistry registry = RateLimiterRegistry.of(config);<NEW_LINE>RateLimiter limiter = registry.rateLimi... | println(flightsSupplier.get()); |
1,713,994 | final UpdateApiResult executeUpdateApi(UpdateApiRequest updateApiRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updateApiRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTime);<NEW_L... | endClientExecution(awsRequestMetrics, request, response); |
1,112,230 | public VirtualConnection sendRequestHeaders(InterChannelCallback callback, boolean bForce) throws MessageSentException {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {<NEW_LINE>Tr.entry(tc, "sendRequestHeaders(async)");<NEW_LINE>}<NEW_LINE>if (headersSent()) {<NEW_LINE>throw new MessageSent... | getLink().setAllowReconnect(true); |
1,686,504 | final GetRevisionResult executeGetRevision(GetRevisionRequest getRevisionRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(getRevisionRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExecuteTi... | addHandlerContext(HandlerContextKey.SERVICE_ID, "DataExchange"); |
1,468,828 | protected void contributeButtons(Composite parent) {<NEW_LINE>((GridLayout) parent<MASK><NEW_LINE>Button button = new Button(parent, SWT.NONE);<NEW_LINE>button.setText("&Import a theme...");<NEW_LINE>button.addSelectionListener(new SelectionAdapter() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void widgetSelected(Se... | .getLayout()).numColumns++; |
1,422,427 | public void marshall(Channel channel, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (channel == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(channel.getName(), NAME_BINDING);<NEW_LINE>protocolMarshaller.m... | e.getMessage(), e); |
528,241 | public void nextError() {<NEW_LINE>SingleDocument document = getCurrentDocument();<NEW_LINE>if (document == null || docType != DocumentType.WRITER || !documents.isEnoughHeapSpace()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>XComponent xComponent = document.getXComponent();<NEW_LINE>DocumentCursorTools docCursor = new Docu... | x, yFlat, document, docCursor); |
1,315,078 | static TBigInteger evenModPow(TBigInteger base, TBigInteger exponent, TBigInteger modulus) {<NEW_LINE>// PRE: (base > 0), (exponent > 0), (modulus > 0) and (modulus even)<NEW_LINE>// STEP 1: Obtain the factorization 'modulus'= q * 2^j.<NEW_LINE>int j = modulus.getLowestSetBit();<NEW_LINE>TBigInteger q = modulus.shiftRi... | (TBigInteger.getPowerOfTwo(j)); |
1,639,132 | final boolean update(final long[] delta) {<NEW_LINE>assert (<MASK><NEW_LINE>boolean okToUpdate = true;<NEW_LINE>for (int i = 0; i < delta.length && okToUpdate; i++) {<NEW_LINE>while (true) {<NEW_LINE>final long current = values[i].get();<NEW_LINE>final int updates = numUpdatesLeft(current);<NEW_LINE>if (updates == 0) {... | delta.length == values.length); |
1,326,141 | public ValidationErrors validate(final StandaloneCatalog catalog, final ValidationErrors errors) {<NEW_LINE>// Validation: check for nulls<NEW_LINE>if (planName == null) {<NEW_LINE>errors.add(new ValidationError("Invalid plan for recurring section", DefaultRecurring.class, ""));<NEW_LINE>}<NEW_LINE>if (phaseType == nul... | recurringPrice.validate(catalog, errors); |
1,727,633 | // ----- private methods -----<NEW_LINE>private void init() {<NEW_LINE>factories.put(NotEmptyQuery.class, new NotEmptyQueryFactory(this));<NEW_LINE>factories.put(FulltextQuery.class, new KeywordQueryFactory(this));<NEW_LINE>factories.put(SpatialQuery.class, new SpatialQueryFactory(this));<NEW_LINE>factories.put(GraphQu... | class, new TypeQueryFactory(this)); |
1,535,250 | public Request<AssignPrivateIpAddressesRequest> marshall(AssignPrivateIpAddressesRequest assignPrivateIpAddressesRequest) {<NEW_LINE>if (assignPrivateIpAddressesRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<AssignPrivateIpAddressesReque... | (assignPrivateIpAddressesRequest.getNetworkInterfaceId())); |
873,588 | private void loadNode183() {<NEW_LINE>StateTypeNode node = new StateTypeNode(this.context, Identifiers.ProgramStateMachineType_Suspended, new QualifiedName(0, "Suspended"), new LocalizedText("en", "Suspended"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.valueOf(0), UByte.valueOf(0));<NEW_LINE>node.addRefer... | .expanded(), false)); |
1,450,714 | private Prediction<T> innerPredictThreadPool(ExecutorService pool, ThreadLocal<PriorityQueue<OutputDoublePair<T>>> queuePool, DistanceType distType, Example<T> example) {<NEW_LINE>SparseVector vector = SparseVector.createSparseVector(example, featureIDMap, false);<NEW_LINE>List<Future<List<OutputDoublePair<T>>>> future... | * (vectors.length / numThreads); |
140,269 | public void processElement(ProcessContext c) {<NEW_LINE>PartitionQueryPair pair = c.element();<NEW_LINE>PartitionQueryRequest partitionQueryRequest = pair.getRequest();<NEW_LINE>String dbRoot = partitionQueryRequest.getParent();<NEW_LINE>StructuredQuery structuredQuery = partitionQueryRequest.getStructuredQuery();<NEW_... | curr = cursors.get(i); |
328,270 | private RestResultBean doDeleteChallengeData(final RestRequest restRequest, final String username) throws PwmUnrecoverableException {<NEW_LINE>final TargetUserIdentity targetUserIdentity = RestUtility.resolveRequestedUsername(restRequest, username);<NEW_LINE>try {<NEW_LINE>final ChaiUser chaiUser;<NEW_LINE>final String... | targetUserIdentity.getUserIdentity(), false); |
440,664 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String accountName, String applicationName, Context context) {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));... | error(new IllegalArgumentException("Parameter applicationName is required and cannot be null.")); |
1,169,765 | private void computeComponentsInformation(Graph graph, int kevinBaconId) {<NEW_LINE><MASK><NEW_LINE>int[] componentSizes = new int[connectedComponents.count()];<NEW_LINE>for (int vertex = 0; vertex < graph.vertices(); vertex++) {<NEW_LINE>componentSizes[connectedComponents.id(vertex)]++;<NEW_LINE>}<NEW_LINE>int largest... | ConnectedComponents connectedComponents = new ConnectedComponentsIterativeDFS(graph); |
1,397,596 | protected void putSub(byte[] big, int off, int stride, int[] block, int mbW, int mbH) {<NEW_LINE>int blOff = 0;<NEW_LINE>if (mbW == 1) {<NEW_LINE>big[off] = clipTo8Bit(block[blOff]);<NEW_LINE>big[off + 1] = clipTo8Bit(block[blOff + 1]);<NEW_LINE>big[off + stride] = clipTo8Bit(block[blOff + 2]);<NEW_LINE>big[off + strid... | (block[blOff + 1]); |
990,814 | private // ///////// Java Process ///////////////////////////////////<NEW_LINE>boolean buildJavaProcess(ProcessBuilder pb, List<String> cmdLine) {<NEW_LINE>final List<String> command = pb.command();<NEW_LINE>command.add(processOutgoingPath(getJavaExecutable()));<NEW_LINE>command.addAll(buildJVMArgs(cmdLine));<NEW_LINE>... | compileSystemProperties(buildSystemProperties(cmdLine))); |
1,583,615 | public MultiRegionKey unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>MultiRegionKey multiRegionKey = new MultiRegionKey();<NEW_LINE><MASK><NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.g... | int originalDepth = context.getCurrentDepth(); |
617,889 | protected void adjacentBorder(GrayS32 pixelToRegion) {<NEW_LINE>for (int y = 0; y < pixelToRegion.height - 1; y++) {<NEW_LINE><MASK><NEW_LINE>int indexImg = pixelToRegion.startIndex + pixelToRegion.stride * y + x;<NEW_LINE>checkAdjacentAround(x, y, indexImg, pixelToRegion);<NEW_LINE>if (connect.length == 8) {<NEW_LINE>... | int x = pixelToRegion.width - 1; |
366,632 | private void saveFile(File f) throws FileNotFoundException {<NEW_LINE>if (drawView.getWidth() == 0 || drawView.getHeight() == 0) {<NEW_LINE>// apparently on 4.x, the orientation change notification can occur<NEW_LINE>// sometime before the view is rendered. In that case, the view<NEW_LINE>// dimensions will not be know... | Canvas canvas = new Canvas(bitmap); |
19,357 | public void updateSize() {<NEW_LINE>int viewWidth = getWidth();<NEW_LINE>int viewHeight = getHeight();<NEW_LINE>if (viewWidth == 0 || viewHeight == 0 || mTermSession == null)<NEW_LINE>return;<NEW_LINE>// Set to 80 and 24 if you want to enable vttest.<NEW_LINE>int newColumns = Math.max(4, (int) (viewWidth / mRenderer.mF... | mTermSession.updateSize(newColumns, newRows); |
1,480,783 | public static GeneralPath filterPath(PathIterator it, BiPredicate<float[], float[]> method) {<NEW_LINE>GeneralPath newPath = new GeneralPath();<NEW_LINE>float[] prevCoords = new float[2];<NEW_LINE>float[] coords = new float[2];<NEW_LINE>float[] start = new float[2];<NEW_LINE>boolean shouldMoveNext = false;<NEW_LINE>whi... | 0], coords[1]); |
45,145 | public boolean interact(Direction side, Player player, InteractionHand hand, ItemStack heldItem, float hitX, float hitY, float hitZ) {<NEW_LINE>ColumnPos coords = CoresampleItem.getCoords(coresample);<NEW_LINE>if (player.isShiftKeyDown()) {<NEW_LINE>if (!level.isClientSide) {<NEW_LINE>ItemEntity entityitem = new ItemEn... | mapTagCompound.put("Decorations", nbttaglist); |
428,254 | public static void openURL(String url) {<NEW_LINE>try {<NEW_LINE>// Since Java6 this is a much easier method to open the browser<NEW_LINE>if (Desktop.isDesktopSupported()) {<NEW_LINE>Desktop desktop = Desktop.getDesktop();<NEW_LINE>desktop.browse(new URI(url));<NEW_LINE>} else // Only if desktop is not supported we try... | log.error("Error at opening the URL.", e); |
1,652,558 | public void annotate(Annotation annotation) {<NEW_LINE>if (verbose) {<NEW_LINE>log.info("Adding RegexNER annotations ... ");<NEW_LINE>}<NEW_LINE>if (!annotation.containsKey(CoreAnnotations.SentencesAnnotation.class))<NEW_LINE>throw new RuntimeException("Unable to find sentences in " + annotation);<NEW_LINE>List<CoreMap... | get(CoreAnnotations.NamedEntityTagAnnotation.class); |
1,017,488 | public CredentialValidationResult validate(Credential credential) {<NEW_LINE>if (!(credential instanceof YubikeyCredential)) {<NEW_LINE>return CredentialValidationResult.NOT_VALIDATED_RESULT;<NEW_LINE>}<NEW_LINE>YubikeyCredential yubikeyCredential = ((YubikeyCredential) credential);<NEW_LINE>try {<NEW_LINE>String oneTi... | "Yubico reported {0}", responseStatus.name()); |
499,720 | private void javaPropertiesToSystemOptions() {<NEW_LINE>// get the system options property<NEW_LINE>final String allSystemProps = System.getProperty(SYSTEM_OPTIONS_NAME);<NEW_LINE>if ((allSystemProps == null) || allSystemProps.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>final SystemOptionManager optionManager = g... | keyValue[0].trim(); |
1,512,702 | public void visit(ArrayType src, Node other) {<NEW_LINE>ArrayType dest = (ArrayType) other;<NEW_LINE>// The second component of this pair contains a list of ArrayBracketPairs from left to<NEW_LINE>// right. For example, if src contains String[][], then the list will contain the<NEW_LINE>// types String[] and String[][]... | getAnnotations(), 1, false); |
1,414,836 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>Bundle args = getArguments();<NEW_LINE>if (args != null && args.containsKey(REFERENCE_KEY)) {<NEW_LINE>mReference = args.getInt(REFERENCE_KEY);<NEW_LINE>}<NEW_LINE>if (args != null && args.containsKey(THEME_RES_ID_KE... | R.styleable.BetterPickersDialogFragment_bpDialogBackground, mDialogBackgroundResId); |
1,284,605 | private void mergeWith(DoubleExponentialHistogramBuckets other, boolean additive) {<NEW_LINE>if (other.counts.isEmpty()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// Find the common scale, and the extended window required to merge the two bucket sets<NEW_LINE>int commonScale = Math.min(this.scale, other.scale);<NEW_LINE>/... | getIndexEnd() >> deltaOther)); |
725,272 | public byte[] computeSignature(boolean forceRecompute) {<NEW_LINE>if (this.signature != null) {<NEW_LINE>if (!forceRecompute) {<NEW_LINE>return this.signature;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>MessageDigest digest;<NEW_LINE>try {<NEW_LINE>digest = MessageDigest.getInstance("SHA-1");<NEW_LINE>} catch (NoSuchAlgorithmExcep... | length, data.remaining()); |
689,029 | private void loadFiles(String configPath, String contextRoot) {<NEW_LINE>// config Server Files Path<NEW_LINE>String configServerFilesPath = contextRoot + configPath;<NEW_LINE>// get service files and put them in config dir<NEW_LINE>Map<String, Object> serviceFiles = getServiceConfigs(configServerFilesPath);<NEW_LINE>i... | Files.write(filePath, ba); |
307,649 | public Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> applyAsync(Function<AsyncExecutionInternal<R>, CompletableFuture<ExecutionResult<R>>> innerFn, Scheduler scheduler, FailsafeFuture<R> future) {<NEW_LINE>return execution -> innerFn.apply(execution).thenCompose(result -> {<NEW_LINE>if (res... | execution, result, scheduler, future); |
396,238 | public boolean apply(Game game, Ability source) {<NEW_LINE>Player targetedPlayer = game.getPlayer(source.getTargets().getFirstTarget());<NEW_LINE>if (targetedPlayer == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>// AI hint to discard/sacrifice before die<NEW_LINE>Outcome aiOutcome = (targetedPlayer.getLife() <= ... | = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND); |
11,485 | public void addBrokers(String name, Collection<Pair<String, Integer>> addresses) throws DdlException {<NEW_LINE>lock.lock();<NEW_LINE>try {<NEW_LINE>ArrayListMultimap<String, FsBroker> brokerAddrsMap = brokersMap.get(name);<NEW_LINE>if (brokerAddrsMap == null) {<NEW_LINE>brokerAddrsMap = ArrayListMultimap.create();<NEW... | ":" + pair.second + ") has already in brokers."); |
722,712 | public static void main(String... args) {<NEW_LINE>Params params = new Params();<NEW_LINE>CmdLineParser parser = new CmdLineParser(params);<NEW_LINE>try {<NEW_LINE>parser.parseArgument(args);<NEW_LINE>} catch (CmdLineException t) {<NEW_LINE>System.err.println(t.getMessage());<NEW_LINE>parser.printUsage(System.out);<NEW... | indexedBranches.add(params.branch); |
1,622,180 | private void assemble() throws Exception {<NEW_LINE>File tf1 = new File(folder, "T1");<NEW_LINE>File tf2 = new File(folder, "T2");<NEW_LINE>File outFile = null;<NEW_LINE>XDMUtils.mkdirs(getOutputFolder());<NEW_LINE>try {<NEW_LINE>assembleFinished = false;<NEW_LINE>ArrayList<Segment> list1 = new ArrayList<>();<NEW_LINE>... | + "_" + getOutputFileName(true)); |
239,326 | public GeminiOrderStatusResponse placeGeminiLimitOrder(LimitOrder limitOrder, GeminiOrderType GeminiOrderType) throws IOException {<NEW_LINE>String pair = GeminiUtils.toPairString(limitOrder.getCurrencyPair());<NEW_LINE>String type = limitOrder.getType().equals(Order.OrderType.BID) ? "buy" : "sell";<NEW_LINE><MASK><NEW... | String orderType = GeminiOrderType.toString(); |
737,851 | private void createTypeCastExprForRelationalExpr(BLangBinaryExpr binaryExpr, int lhsExprTypeTag, int rhsExprTypeTag) {<NEW_LINE>boolean <MASK><NEW_LINE>boolean isRhsIntegerType = TypeTags.isIntegerTypeTag(rhsExprTypeTag);<NEW_LINE>if ((isLhsIntegerType && isRhsIntegerType) || (lhsExprTypeTag == TypeTags.BYTE && rhsExpr... | isLhsIntegerType = TypeTags.isIntegerTypeTag(lhsExprTypeTag); |
1,693,261 | public void fillItemCategory(@Nonnull CreativeModeTab group, @Nonnull NonNullList<ItemStack> items) {<NEW_LINE>super.fillItemCategory(group, items);<NEW_LINE>if (allowdedIn(group)) {<NEW_LINE>ChemicalTankTier tier = Attribute.getTier(getBlock(), ChemicalTankTier.class);<NEW_LINE>if (tier == ChemicalTankTier.CREATIVE) {... | gasRegistry(), items, capacity); |
171,151 | protected static RollingFileAppender<ILoggingEvent> fileAppender(String name, LoggerContext context, LayoutWrappingEncoder<ILoggingEvent> encoder, TTLLLayout layout, CoreConfig.Log.Output.Type.File outputType) {<NEW_LINE>RollingFileAppender<ILoggingEvent> appender = new RollingFileAppender<>();<NEW_LINE>appender.setCon... | .toAbsolutePath().toString(); |
658,079 | public Change createChange(IProgressMonitor pm, INewNameQueries copyQueries) {<NEW_LINE>IFile[] file = getFiles();<NEW_LINE>IFolder[] folders = getFolders();<NEW_LINE>ICompilationUnit[] cus = getCus();<NEW_LINE>// $NON-NLS-1$<NEW_LINE>pm.beginTask("", cus.length + <MASK><NEW_LINE>NewNameProposer nameProposer = new NewN... | file.length + folders.length); |
646,017 | private static SourceGroup createFileSourceGroup(File file, Collection<? super URL> rootsList) {<NEW_LINE>Icon icon;<NEW_LINE>Icon openedIcon;<NEW_LINE>String displayName;<NEW_LINE>final URL url = FileUtil.urlForArchiveOrDir(file);<NEW_LINE>if (url == null) {<NEW_LINE>return null;<NEW_LINE>} else if ("jar".equals(url.g... | root = URLMapper.findFileObject(url); |
1,253,943 | public AddRemoveCount synchronizeSearchParamsToDatabase(ResourceIndexedSearchParams theParams, ResourceTable theEntity, ResourceIndexedSearchParams existingParams) {<NEW_LINE>AddRemoveCount retVal = new AddRemoveCount();<NEW_LINE>synchronize(theEntity, retVal, theParams.myStringParams, existingParams.myStringParams);<N... | theParams.myLinks, existingParams.myLinks); |
606,559 | private void parseTagkCustomRule() {<NEW_LINE>if (meta.getTags() == null || meta.getTags().isEmpty()) {<NEW_LINE>throw new IllegalStateException("Timeseries meta data was missing tags");<NEW_LINE>}<NEW_LINE>// first, find the tagk UIDMeta we're matching against<NEW_LINE>UIDMeta tagk = null;<NEW_LINE>for (UIDMeta tag : ... | getField() + "] for rule: " + rule); |
44,449 | public static GetHDMLastAliyunResourceSyncResultResponse unmarshall(GetHDMLastAliyunResourceSyncResultResponse getHDMLastAliyunResourceSyncResultResponse, UnmarshallerContext _ctx) {<NEW_LINE>getHDMLastAliyunResourceSyncResultResponse.setRequestId(_ctx.stringValue("GetHDMLastAliyunResourceSyncResultResponse.RequestId")... | ("GetHDMLastAliyunResourceSyncResultResponse.Data.SubResults[" + i + "].ErrMsg")); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.