idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,438,762 | private static void readOnlyTransaction(PrintWriter pw) {<NEW_LINE>// ReadOnlyTransaction must be closed by calling close() on it to release resources held by it.<NEW_LINE>// We use a try-with-resource block to automatically do so.<NEW_LINE>try (ReadOnlyTransaction transaction = SpannerClient.getDatabaseClient().readOn... | , queryResultSet.getString(2)); |
306,295 | static <T> int binarySearch(FST<T> fst, FST.Arc<T> arc, int targetLabel) throws IOException {<NEW_LINE>assert arc.nodeFlags() == FST.ARCS_FOR_BINARY_SEARCH : "Arc is not encoded as packed array for binary search (nodeFlags=" <MASK><NEW_LINE>BytesReader in = fst.getBytesReader();<NEW_LINE>int low = arc.arcIdx();<NEW_LIN... | + arc.nodeFlags() + ")"; |
457,662 | static <T> Keyframe<T> newInstance(JSONObject json, LottieComposition composition, float scale, AnimatableValue.Factory<T> valueFactory) {<NEW_LINE>PointF cp1 = null;<NEW_LINE>PointF cp2 = null;<NEW_LINE>float startFrame = 0;<NEW_LINE>T startValue = null;<NEW_LINE>T endValue = null;<NEW_LINE>Interpolator interpolator =... | JsonUtils.pointFromJsonObject(cp2Json, scale); |
652,210 | private void loadFromDB() throws Exception {<NEW_LINE>Query query = new Query(HugeType.VERTEX);<NEW_LINE>query.capacity(this.verticesCapacityHalf * 2L);<NEW_LINE>query.limit(Query.NO_LIMIT);<NEW_LINE>Iterator<Vertex> vertices = this.graph.vertices(query);<NEW_LINE>// switch concurrent loading here<NEW_LINE>boolean conc... | this.addEdge(false, edge); |
1,818,754 | protected void internalTransform(Body b, String phaseName, Map<String, String> options) {<NEW_LINE>if (!b.getMethod().isSynchronized() || b.getMethod().isStatic()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>Iterator<Unit> it = b.getUnits().snapshotIterator();<NEW_LINE>while (it.hasNext()) {<NEW_LINE>Unit u = it.next();<NEW... | .getThisLocal()), tail); |
1,441,224 | public void aggregate(int length, AggregationResultHolder aggregationResultHolder, Map<ExpressionContext, BlockValSet> blockValSetMap) {<NEW_LINE>double min = Double.POSITIVE_INFINITY;<NEW_LINE>double max = Double.NEGATIVE_INFINITY;<NEW_LINE>BlockValSet blockValSet = blockValSetMap.get(_expression);<NEW_LINE>if (blockV... | setAggregationResult(aggregationResultHolder, min, max); |
1,838,543 | private void appendStringify(Writer writer, HollowDataAccess dataAccess, String type, int ordinal, int indentation) throws IOException {<NEW_LINE>if (excludeObjectTypes.contains(type)) {<NEW_LINE>writer.append("null");<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>HollowTypeDataAccess typeDataAccess = dataAccess.getTypeDataAcce... | HollowMapTypeDataAccess) typeDataAccess, ordinal, indentation); |
1,842,334 | void init(Consumer<BytecodeTransformer> bytecodeTransformerConsumer, List<Predicate<BeanInfo>> additionalUnusedBeanExclusions) {<NEW_LINE>long start = System.nanoTime();<NEW_LINE>// Collect dependency resolution errors<NEW_LINE>List<Throwable> errors = new ArrayList<>();<NEW_LINE>for (BeanInfo bean : beans) {<NEW_LINE>... | collect(Collectors.toSet()); |
1,369,986 | protected void scoreDisparity(final int disparityRange, final boolean leftToRight) {<NEW_LINE>final int[] scores = leftToRight ? scoreLtoR : scoreRtoL;<NEW_LINE>final byte[] dataLeft = patchTemplate.data;<NEW_LINE>final byte[] dataRight = patchCompare.data;<NEW_LINE>for (int d = 0; d < disparityRange; d++) {<NEW_LINE>i... | ? disparityRange - d - 1 : d; |
229,097 | public List<IN> classifyGibbs(List<IN> document, Triple<int[][][], int[], double[][][]> documentDataAndLabels) throws ClassNotFoundException, SecurityException, NoSuchMethodException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {<NEW_LINE>// log.info("Testing usin... | = new FactoredSequenceListener(cliqueTree, prior); |
1,332,839 | protected void activate(Map<String, Object> config) {<NEW_LINE>List<Map<String, Object>> loginConfigs = NestingUtils.nest(WebserviceSecurity.LOGIN_CONFIG_ELEMENT_NAME, config);<NEW_LINE>if (loginConfigs != null && !loginConfigs.isEmpty())<NEW_LINE>this.loginConfig = new LoginConfigImpl(loginConfigs.get(0));<NEW_LINE>Li... | add(new SecurityRoleImpl(securityRoleConfig)); |
805,570 | public void encrypt(ByteBuf outBuf, List<ByteBuf> plainBufs) throws GeneralSecurityException {<NEW_LINE>checkArgument(outBuf.nioBufferCount() == 1);<NEW_LINE>// Copy plaintext buffers into outBuf for in-place encryption on single direct buffer.<NEW_LINE>ByteBuf plainBuf = outBuf.slice(outBuf.writerIndex(), outBuf.writa... | encrypt(out, plain, counter); |
110,080 | private void moveExportToOwnCloud() throws Exporter.ExporterException {<NEW_LINE>Log.i(TAG, "Copying exported file to ownCloud");<NEW_LINE>SharedPreferences mPrefs = mContext.getSharedPreferences(mContext.getString(R.string.owncloud_pref), Context.MODE_PRIVATE);<NEW_LINE>Boolean mOC_sync = mPrefs.getBoolean(mContext.ge... | exportedFilePath)).execute(mClient); |
1,683,130 | private String slicesQuantSql() {<NEW_LINE>QuantizedColumn[] extras = getExtraQuantizedColumns();<NEW_LINE>StringBuilder level2 = new StringBuilder().append("select " + "quantum_ts, min(ts) over win1 start_ts, max(ts + dur) over win1 end_ts, depth, " + "substr(group_concat(name) over win1, 0, 101) label, id");<NEW_LINE... | (" group by depth, label, i").append(" window win3 as (partition by depth, label, i)"); |
1,735,394 | private void waitingLoop() {<NEW_LINE>try {<NEW_LINE>while (true) {<NEW_LINE>// underlying work-queue is shutting down, quit the loop.<NEW_LINE>if (super.isShuttingDown()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// peek the first item from the delay queue<NEW_LINE>WaitForEntry<T> entry = delayQueue.peek();<NEW_LINE>// d... | delayQueue, this.waitingEntryByData, waitForEntry); |
1,801,569 | protected String toExcelName(String name) {<NEW_LINE>if (name.isEmpty()) {<NEW_LINE>// this is actually invalid, but let's leave it to POI to throw an exception<NEW_LINE>return name;<NEW_LINE>}<NEW_LINE>char[] chars = name.toCharArray();<NEW_LINE>StringBuilder escaped = null;<NEW_LINE>// TODO? always prepend "_" to avo... | ? name : escaped.toString(); |
1,052,480 | final DescribeProtectionGroupResult executeDescribeProtectionGroup(DescribeProtectionGroupRequest describeProtectionGroupRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeProtectionGroupRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();... | addHandlerContext(HandlerContextKey.CLIENT_ENDPOINT, endpoint); |
1,718,822 | private void addVirtualMyMusicFolder() {<NEW_LINE>DbidTypeAndIdent myAlbums = new <MASK><NEW_LINE>VirtualFolderDbId myMusicFolder = new VirtualFolderDbId(Messages.getString("Audio.Like.MyAlbum"), myAlbums, "");<NEW_LINE>if (PMS.getConfiguration().displayAudioLikesInRootFolder()) {<NEW_LINE>if (!getChildren().contains(m... | DbidTypeAndIdent(DbidMediaType.TYPE_MYMUSIC_ALBUM, null); |
1,465,903 | protected void createActions() {<NEW_LINE>super.createActions();<NEW_LINE>// content assist proposal action<NEW_LINE>IAction a = new // $NON-NLS-1$<NEW_LINE>TextOperationAction(// $NON-NLS-1$<NEW_LINE>TLAEditorMessages.getResourceBundle(), // $NON-NLS-1$<NEW_LINE>"ContentAssistProposal.", // $NON-NLS-1$<NEW_LINE>this, ... | getSourceViewer(), getSourceViewerConfiguration()); |
1,319,681 | public void onLoaded(com.ansca.corona.CoronaRuntime runtime) {<NEW_LINE>com.naef.jnlua.NamedJavaFunction[] luaFunctions;<NEW_LINE>// Fetch the Lua state from the runtime.<NEW_LINE>com.naef.jnlua.LuaState luaState = runtime.getLuaState();<NEW_LINE>// Add a module named "myTests" to Lua having the following functions.<NE... | (), new AsyncCallLuaFunction() }; |
1,200,513 | private void mountHomeDir(AppEntry entry) {<NEW_LINE>String home = entry.getBasePath();<NEW_LINE>if (home.length() > 5) {<NEW_LINE>// TODO: may be located deeper inside jar, not root ?<NEW_LINE>logger.error("Unhandled home directory: " + home);<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>int homeJarID = Integer.parseInt(home);<... | "Failed mounting " + home + ".jar:" + ex); |
1,270,941 | private void injectManFileManager() {<NEW_LINE>// Override javac's JavaFileManager<NEW_LINE>_fileManager = getContext().get(JavaFileManager.class);<NEW_LINE>_manFileManager = new ManifoldJavaFileManager(getHost(), _fileManager, getContext(), true);<NEW_LINE>getContext().put(JavaFileManager.class, (JavaFileManager) null... | , "preferSource").set(true); |
854,023 | public void initSubDevices() {<NEW_LINE>ModelFactory factory = ModelFactory.eINSTANCE;<NEW_LINE>AccelerometerDirection x = factory.createAccelerometerDirection();<NEW_LINE>x.setDirection(AccelerometerCoordinate.X);<NEW_LINE>x.setUid(getUid());<NEW_LINE>String subIdX = "x";<NEW_LINE>logger.debug("{} addSubDevice {}", Lo... | "{} addSubDevice {}", LoggerConstants.TFINIT, subIdTemperature); |
637,653 | void startEdit() {<NEW_LINE>// If we do not reset this, it could false the endEdit behavior in case no key was pressed.<NEW_LINE>lastKeyPressed = null;<NEW_LINE>editing = true;<NEW_LINE>handle.getGridView().addEventFilter(KeyEvent.KEY_PRESSED, enterKeyPressed);<NEW_LINE>handle.getCellsViewSkin().getVBar().valueProperty... | ), spreadsheetCellEditor.getMaxHeight()); |
1,134,720 | public int compareTo(SyncError other) {<NEW_LINE>if (!getClass().equals(other.getClass())) {<NEW_LINE>return getClass().getName().compareTo(other.getClass().getName());<NEW_LINE>}<NEW_LINE>int lastComparison = 0;<NEW_LINE>lastComparison = java.lang.Boolean.compare(isSetErrorCode(), other.isSetErrorCode());<NEW_LINE>if ... | this.errorCode, other.errorCode); |
1,820,929 | private Pair<Integer, List<String>> processList(LinkedList<MultiDataSet> tempList, int partitionIdx, int countBefore, boolean finalExport) throws Exception {<NEW_LINE>// Go through the list. If we have enough examples: remove the DataSet objects, merge and export them. Otherwise: do nothing<NEW_LINE>int numExamples = 0... | Pair<>(countAfter, exportPaths); |
398,716 | public HtmlResponse delete(final EditForm form) {<NEW_LINE>verifyCrudMode(form.crudMode, CrudMode.DETAILS);<NEW_LINE>validate(form, messages -> {<NEW_LINE>}, this::asDetailsHtml);<NEW_LINE>verifyToken(this::asDetailsHtml);<NEW_LINE>final String id = form.id;<NEW_LINE>boostDocumentRuleService.getBoostDocumentRule(id).if... | -> messages.addSuccessCrudDeleteCrudTable(GLOBAL)); |
1,213,530 | public BatchDetectSyntaxResult batchDetectSyntax(BatchDetectSyntaxRequest batchDetectSyntaxRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(batchDetectSyntaxRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAws... | BatchDetectSyntaxRequestMarshaller().marshall(batchDetectSyntaxRequest); |
1,259,242 | public void run(RegressionEnvironment env) {<NEW_LINE>ConditionHandlerFactoryContext conditionHandlerFactoryContext = SupportConditionHandlerFactory.getFactoryContexts().get(0);<NEW_LINE>assertEquals(conditionHandlerFactoryContext.getRuntimeURI(), env.runtimeURI());<NEW_LINE>handler = SupportConditionHandlerFactory.get... | new Object[] { "A" }); |
1,166,066 | public void visit(BLangAnnotationAttachment annAttachmentNode) {<NEW_LINE>if (annAttachmentNode.expr == null && annAttachmentNode.annotationSymbol.attachedType != null) {<NEW_LINE>BType attachedType = Types.getReferredType(annAttachmentNode.annotationSymbol.attachedType);<NEW_LINE>if (attachedType.tag != TypeTags.FINIT... | ) attachedType).eType : attachedType); |
1,259,930 | final DeleteBotLocaleResult executeDeleteBotLocale(DeleteBotLocaleRequest deleteBotLocaleRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteBotLocaleRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(F... | (super.beforeMarshalling(deleteBotLocaleRequest)); |
1,092,686 | private StringBuilder replace(String wmlTemplateString, int offset, StringBuilder strB, java.util.Map<String, ?> mappings) {<NEW_LINE>int startKey = wmlTemplateString.indexOf("${", offset);<NEW_LINE>if (startKey == -1)<NEW_LINE>return strB.append(wmlTemplateString.substring(offset));<NEW_LINE>else {<NEW_LINE>strB.appen... | .substring(offset, startKey)); |
1,117,893 | public static void printGemmFailureDetails(INDArray a, INDArray b, INDArray c, boolean transposeA, boolean transposeB, double alpha, double beta, RealMatrix expected, INDArray actual, INDArray onCopies) {<NEW_LINE>System.out.println("\nFactory: " + Nd4j.factory().getClass() + "\n");<NEW_LINE>System.out.println("Op: gem... | System.out.println("\nb:"); |
276,211 | public void handleError(String location, Request req, Response resp) throws ServletException, IOException {<NEW_LINE>try {<NEW_LINE>log("handleError: " + location);<NEW_LINE>String filter_path = req.getFilterPath();<NEW_LINE>String servlet_path = req.getServletPath();<NEW_LINE>String path_info = req.getPathInfo();<NEW_... | setRequestURI(uri.getRawPath()); |
505,853 | private void populateTraceTnSlowCountAndPointPartialPart2() throws Exception {<NEW_LINE>if (!columnExists("trace_tn_slow_point", "partial")) {<NEW_LINE>// previously failed mid-upgrade prior to updating schema version<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>PreparedStatement deleteCountPS = session.prepare("delete from tr... | (row, boundStatement, i++); |
737,290 | private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String name, 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."));<NEW_LINE>}<NEW_LINE>if (this.c... | error(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); |
1,760,056 | public static QueryMqSofamqMessageByTopicResponse unmarshall(QueryMqSofamqMessageByTopicResponse queryMqSofamqMessageByTopicResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryMqSofamqMessageByTopicResponse.setRequestId(_ctx.stringValue("QueryMqSofamqMessageByTopicResponse.RequestId"));<NEW_LINE>queryMqSofamqMessageByT... | ("QueryMqSofamqMessageByTopicResponse.Data.Content[" + i + "].StoreTimestamp")); |
1,270,667 | public boolean isActive(FeatureState featureState, FeatureUser user) {<NEW_LINE>HttpServletRequest request = HttpServletRequestHolder.get();<NEW_LINE>if (request == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>String triggerParamsString = featureState.getParameter(PARAM_URL_PARAMS);<NEW_LINE>if (Strings.isBlank(t... | actualParams = new HashMap<>(); |
50,780 | private void render(ListItem item, Object data) {<NEW_LINE>Listcell listcell = null;<NEW_LINE>int colIndex = 0;<NEW_LINE>int rowIndex = item.getIndex();<NEW_LINE>WListbox table = null;<NEW_LINE>if (item.getListbox() instanceof WListbox) {<NEW_LINE>table = (WListbox) item.getListbox();<NEW_LINE>}<NEW_LINE>int colorCode ... | colorCode = table.getColorCode(rowIndex); |
1,686,475 | final DeleteVolumeResult executeDeleteVolume(DeleteVolumeRequest deleteVolumeRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteVolumeRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | false), new DeleteVolumeResultJsonUnmarshaller()); |
1,321,216 | public ModelAndView renderAdminPage() {<NEW_LINE>log.debug("renderAdminPage()");<NEW_LINE>final List<ModuleType<MASK><NEW_LINE>final Set<Resource> resources = new HashSet<>();<NEW_LINE>final Set<AdminSidebarItem> adminSidebarItems = new HashSet<>();<NEW_LINE>moduleTypes.forEach(moduleType -> {<NEW_LINE>resources.addAll... | > moduleTypes = moduleTypeHystrixClient.getAllModuleTypes(); |
1,404,877 | static // / @brief Print the solution.<NEW_LINE>void printSolution(DataModel data, RoutingModel routing, RoutingIndexManager manager, Assignment solution) {<NEW_LINE>// Solution cost.<NEW_LINE>logger.info("Objective : " + solution.objectiveValue());<NEW_LINE>// Inspect solution.<NEW_LINE>long maxRouteDistance = 0;<NEW_... | (routing.nextVar(index)); |
724,496 | private void commandLea(Instruction instruction, int flags) {<NEW_LINE>if ((flags & Flags.NO_REGISTER_USAGE) == 0) {<NEW_LINE>assert info.usedRegisters.size() >= 1 : info.usedRegisters.size();<NEW_LINE>assert instruction.getOp0Kind() == OpKind.REGISTER : instruction.getOp0Kind();<NEW_LINE>int reg = instruction.getOp0Re... | info.usedRegisters.get(i); |
1,451,135 | public BatchDeleteDocumentResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchDeleteDocumentResult batchDeleteDocumentResult = new BatchDeleteDocumentResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>J... | String currentParentElement = context.getCurrentParentElement(); |
265,765 | public static List<String> tokenizeIntoList(CharSequence chars, final boolean includeSeparators, final boolean skipLastEmptyLine) {<NEW_LINE>if (chars == null || chars.length() == 0) {<NEW_LINE>return Collections.emptyList();<NEW_LINE>}<NEW_LINE>LineTokenizer tokenizer = new LineTokenizer(chars);<NEW_LINE>List<String> ... | getLineSeparatorLength()).toString(); |
301,196 | private TypeSpec newDefaultClientClassSpec(final State state, final ClassName defaultClientClass, final ClassName defaultBlockingClientClass) {<NEW_LINE>final TypeSpec.Builder typeSpecBuilder = classBuilder(defaultClientClass).addModifiers(PRIVATE, STATIC, FINAL).addSuperinterface(state.clientClass).addField(GrpcClient... | (closeGracefully, closeAsyncGracefully, factory)); |
189,540 | private void parseAndSetLoginOptions(String options) {<NEW_LINE>Matcher m = OPTION_PATTERN.matcher(options);<NEW_LINE>if (!m.find()) {<NEW_LINE>loginOptionsMulti = Collections.emptyMap();<NEW_LINE>}<NEW_LINE>Map<String, List<String>> optsMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);<NEW_LINE>do {<NEW_LINE>String ... | pos = p.indexOf('='); |
740,854 | public Object parse(XMLEventReader xmlEventReader) throws ParsingException {<NEW_LINE>// Get the startelement<NEW_LINE>StartElement startElement = StaxParserUtil.getNextStartElement(xmlEventReader);<NEW_LINE>StaxParserUtil.validate(startElement, SAML11Constants.REQUEST);<NEW_LINE>SAML11RequestType request = parseRequir... | (StaxParserUtil.getElementText(xmlEventReader)); |
213,967 | public void autoPopupParameterInfo(@Nonnull final Editor editor, @Nullable final Object highlightedMethod) {<NEW_LINE>if (DumbService.isDumb(myProject))<NEW_LINE>return;<NEW_LINE>if (PowerSaveMode.isEnabled())<NEW_LINE>return;<NEW_LINE>ApplicationManager.getApplication().assertIsDispatchThread();<NEW_LINE>final CodeIns... | (request), settings.PARAMETER_INFO_DELAY); |
1,762,827 | final ListTypeRegistrationsResult executeListTypeRegistrations(ListTypeRegistrationsRequest listTypeRegistrationsRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(listTypeRegistrationsRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>... | HandlerContextKey.ENDPOINT_OVERRIDDEN, isEndpointOverridden()); |
395,726 | public final void writeMember(String key, Object value, @Shared("keyInfo") @Cached KeyInfoNode keyInfo, @Cached ImportValueNode castValueNode, @Cached(value = "createCachedInterop()", uncached = "getUncachedWrite()") WriteElementNode writeNode) throws UnknownIdentifierException, UnsupportedMessageException {<NEW_LINE>J... | importedValue = castValueNode.executeWithTarget(value); |
487,794 | public void onStart() {<NEW_LINE>super.onStart();<NEW_LINE>binding.setSubmitToken(resetPasswordViewModel.getSubmitToken());<NEW_LINE>resetPasswordViewModel.getProgress().observe(this, this::showProgress);<NEW_LINE>resetPasswordViewModel.getError().observe(this, this::showError);<NEW_LINE>resetPasswordViewModel.getSucce... | observe(this, this::onSuccess); |
747,666 | private void assembleAudit(AuditEvent event) {<NEW_LINE>auditBuffer.append(event.queryId).append("\t");<NEW_LINE>auditBuffer.append(longToTimeString(event.timestamp)).append("\t");<NEW_LINE>auditBuffer.append(event.clientIp).append("\t");<NEW_LINE>auditBuffer.append(event.user).append("\t");<NEW_LINE>auditBuffer.append... | .cpuTimeMs).append("\t"); |
1,565,580 | private static void tryAssertion56(RegressionEnvironment env, String stmtText, String outputLimit, AtomicInteger milestone) {<NEW_LINE>sendTimer(env, 0);<NEW_LINE>env.compileDeploy(stmtText).addListener("s0");<NEW_LINE>String[] fields = new String[] { "symbol", "sum(price)" };<NEW_LINE>ResultAssertTestResult expected =... | ResultAssertTestResult(CATEGORY, outputLimit, fields); |
769,703 | public int debugFlushCommand(CommandContext<S> context) {<NEW_LINE>CommandSource source = commandSourceInterface.apply(context.getSource());<NEW_LINE>// parse arguments<NEW_LINE>Optional<String> worldName = getOptionalArgument(context, "world", String.class);<NEW_LINE>final World world;<NEW_LINE>if (worldName.isPresent... | (TextColor.RED, "There was an unexpected exception trying to save the world. Please check the console for more details...")); |
799,899 | private void drawShadow(Canvas canvas, int index, float progressEndAngle, Shader shader) {<NEW_LINE>if (mProgresses[index] > 0) {<NEW_LINE>int layerId = canvas.saveLayer(mRectF.left, mRectF.top, mRectF.right, mRectF.top + mRectF.height() / 2, null, Canvas.ALL_SAVE_FLAG);<NEW_LINE>mPaint.setStyle(Paint.Style.FILL);<NEW_... | 2f, ARC_ANGLE, false, mPaint); |
1,621,718 | public void onClick(View v) {<NEW_LINE>Comment comment = new Comment.Builder().setAttachmentImageUrl("https://raw.githubusercontent.com/wiki/sromku/android-simple-facebook/images/publish_feed.png").build();<NEW_LINE>SimpleFacebook.getInstance().publish("977576802258070_977578808924536", comment, new OnPublishListener()... | setText(throwable.getMessage()); |
265,025 | public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidKeySpecException, IllegalBlockSizeException, BadPaddingException {<NEW_LINE>String plainText = "How you doing Mike?";<NEW_LINE>encrypt(plainText, getRandomKey(CIPHER, 128));<NEW_LINE>encrypt(plain... | logger.error("Unable to generate key", e); |
1,680,116 | private void listThreads() {<NEW_LINE>final Set<Thread> threads = Thread<MASK><NEW_LINE>final Map<String, Thread> sorted = Maps.newTreeMap();<NEW_LINE>for (final Thread t : threads) {<NEW_LINE>final ThreadGroup tg = t.getThreadGroup();<NEW_LINE>if (t.isAlive() && (tg == null || !tg.getName().equals("system"))) {<NEW_LI... | .getAllStackTraces().keySet(); |
1,040,508 | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {<NEW_LINE>isSessionBean = in.readBoolean();<NEW_LINE>isStatelessSessionBean = in.readBoolean();<NEW_LINE>// Use thread context classloader to load home/remote/primarykey classes<NEW_LINE>// See EJB2.0 spec section 18.4.4<NEW_LINE>... | loadClass(in.readUTF()); |
362,686 | private void selectBestModel(List<AssociatedPair> pairs, DogArray_I32 inliersIdx, int fitModelF, int fitRotation) {<NEW_LINE>// Use whichever inlier set is larger as it's more likely to be correct<NEW_LINE>if (inliersRotationIdx.size > inliersIdx.size) {<NEW_LINE>inliersIdx.setTo(inliersRotationIdx);<NEW_LINE>}<NEW_LIN... | Math.max(1, fitRotation); |
866,993 | public static BeanEmbeddedMeta create(BeanDescriptorMap owner, DeployBeanPropertyAssocOne<?> prop) {<NEW_LINE>// we can get a BeanDescriptor for an Embedded bean<NEW_LINE>// and know that it is NOT recursive, as Embedded beans are<NEW_LINE>// only allow to hold simple scalar types...<NEW_LINE>BeanDescriptor<?> targetDe... | (column, sourceProperties[i]); |
978,409 | private void drawHexagon(Canvas c, float x, float y, Paint fillPaint, Paint strokePaint) {<NEW_LINE>final float MULTIPLIER = 0.6f;<NEW_LINE>final float SIDE_MULTIPLIER = 1.4f;<NEW_LINE>Path path = new Path();<NEW_LINE>// Top-left<NEW_LINE>path.moveTo(x - SAT_RADIUS * MULTIPLIER, y - SAT_RADIUS);<NEW_LINE>// Left<NEW_LI... | SAT_RADIUS * MULTIPLIER, y + SAT_RADIUS); |
603,300 | public static UserIdentity fromDelimitedKey(final SessionLabel sessionLabel, final String key) throws PwmUnrecoverableException {<NEW_LINE>JavaHelper.requireNonEmpty(key);<NEW_LINE>try {<NEW_LINE>return JsonFactory.get().deserialize(key, UserIdentity.class);<NEW_LINE>} catch (final Exception e) {<NEW_LINE>LOGGER.trace(... | + "' from delimited UserIdentity: " + e.getMessage(); |
99,339 | private void paintAvailableColumns(PaintTarget target) throws PaintException {<NEW_LINE>if (columnCollapsingAllowed) {<NEW_LINE>final HashSet<Object> collapsedCols = new HashSet<Object>();<NEW_LINE>for (Object colId : visibleColumns) {<NEW_LINE>if (isColumnCollapsed(colId)) {<NEW_LINE>collapsedCols.add(colId);<NEW_LINE... | ] = columnIdMap.key(colId); |
1,701,078 | protected boolean matchesSafely(final Iterable<String> inputUrls) {<NEW_LINE>final Set<String> urisToMatch = Sets.newHashSet(this.expectedUris);<NEW_LINE>for (String inputUrl : inputUrls) {<NEW_LINE>final List<String> matchedUrls = urisToMatch.stream().filter(inputUrl::endsWith).<MASK><NEW_LINE>if (matchedUrls.size() =... | collect(Collectors.toList()); |
1,465,141 | public static void markFieldsAsImmutable(BLangClassDefinition classDef, SymbolEnv pkgEnv, BObjectType objectType, Types types, BLangAnonymousModelHelper anonymousModelHelper, SymbolTable symbolTable, Names names, Location pos) {<NEW_LINE>SymbolEnv typeDefEnv = SymbolEnv.createClassEnv(classDef, objectType.tsymbol.scope... | setBType(typeField.type = immutableFieldType); |
706,161 | public OCacheEntry loadPageForWrite(long fileId, final long pageIndex, final boolean checkPinnedPages, final int pageCount, final boolean verifyChecksum) throws IOException {<NEW_LINE>assert pageCount > 0;<NEW_LINE>fileId = checkFileIdCompatibility(fileId, storageId);<NEW_LINE>if (deletedFiles.contains(fileId)) {<NEW_L... | pageIndex, checkPinnedPages, writeCache, verifyChecksum); |
348,384 | public void marshall(EquipmentDetection equipmentDetection, AwsJsonWriter jsonWriter) throws Exception {<NEW_LINE>jsonWriter.beginObject();<NEW_LINE>if (equipmentDetection.getBoundingBox() != null) {<NEW_LINE><MASK><NEW_LINE>jsonWriter.name("BoundingBox");<NEW_LINE>BoundingBoxJsonMarshaller.getInstance().marshall(bound... | BoundingBox boundingBox = equipmentDetection.getBoundingBox(); |
1,520,316 | public void write(org.apache.thrift.protocol.TProtocol oprot, getActiveTservers_result struct) throws org.apache.thrift.TException {<NEW_LINE>struct.validate();<NEW_LINE>oprot.writeStructBegin(STRUCT_DESC);<NEW_LINE>if (struct.success != null) {<NEW_LINE>oprot.writeFieldBegin(SUCCESS_FIELD_DESC);<NEW_LINE>{<NEW_LINE>op... | struct.tnase.write(oprot); |
1,206,377 | public DescribeAgentStatusResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DescribeAgentStatusResult describeAgentStatusResult = new DescribeAgentStatusResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>J... | String currentParentElement = context.getCurrentParentElement(); |
1,248,986 | public int calcScanParallelism(double io, SplitInfo splitInfo) {<NEW_LINE>if (lowConcurrencyQuery) {<NEW_LINE>return 1;<NEW_LINE>}<NEW_LINE>ParamManager paramManager = session.getClientContext().getParamManager();<NEW_LINE>int parallelsim = -1;<NEW_LINE>if (paramManager.getBoolean(ConnectionParams.MPP_PARALLELISM_AUTO_... | (ConnectionParams.MPP_QUERY_IO_PER_PARTITION)) + 1; |
501,897 | void buildIndexCreationInfo() throws Exception {<NEW_LINE>Set<String> varLengthDictionaryColumns = new HashSet<>(_config.getVarLengthDictionaryColumns());<NEW_LINE>for (FieldSpec fieldSpec : _dataSchema.getAllFieldSpecs()) {<NEW_LINE>// Ignore virtual columns<NEW_LINE>if (fieldSpec.isVirtualColumn()) {<NEW_LINE>continu... | String columnName = fieldSpec.getName(); |
745,474 | public void onIEBlockPlacedBy(BlockPlaceContext context, BlockState state) {<NEW_LINE><MASK><NEW_LINE>BlockPos pos = context.getClickedPos();<NEW_LINE>BlockEntity tile = world.getBlockEntity(pos);<NEW_LINE>Player placer = context.getPlayer();<NEW_LINE>Direction side = context.getClickedFace();<NEW_LINE>float hitX = (fl... | Level world = context.getLevel(); |
720,107 | public void execute(AdminCommandContext adminCommandContext) {<NEW_LINE>ActionReport actionReport = adminCommandContext.getActionReport();<NEW_LINE>Node node = nodes.getNode(name);<NEW_LINE>if (node == null) {<NEW_LINE><MASK><NEW_LINE>actionReport.setActionExitCode(ActionReport.ExitCode.FAILURE);<NEW_LINE>return;<NEW_L... | actionReport.setMessage("No node with given name: " + name); |
876,647 | public void writeExternal(Element macro) throws WriteExternalException {<NEW_LINE>macro.setAttribute(ATTRIBUTE_NAME, myName);<NEW_LINE>final <MASK><NEW_LINE>for (ActionDescriptor action : actions) {<NEW_LINE>Element actionNode = null;<NEW_LINE>if (action instanceof TypedDescriptor) {<NEW_LINE>actionNode = new Element(E... | ActionDescriptor[] actions = getActions(); |
497,421 | public void createPartControl(Composite parent) {<NEW_LINE>Server server = ServerManager.getInstance().getServer(serverId);<NEW_LINE>this.setPartName("Connections[" + server.getName() + "][" + date + "]");<NEW_LINE>GridLayout layout = new GridLayout(1, true);<NEW_LINE>layout.marginHeight = 5;<NEW_LINE>layout.marginWidt... | (new double[] {}); |
307,501 | private // Displays requested register or registers<NEW_LINE>void displayRegistersPostMortem(Program program) {<NEW_LINE>// Display requested register contents<NEW_LINE>for (String reg : registerDisplayList) {<NEW_LINE>if (FloatingPointRegisterFile.getRegister(reg) != null) {<NEW_LINE>// TODO: do something for double v... | out.print(reg + "\t"); |
1,090,995 | private static void write(Argument arg) throws Exception {<NEW_LINE>try {<NEW_LINE>Document document = DocumentHelper.createDocument();<NEW_LINE>Element persistence = document.addElement("persistence", "http://java.sun.com/xml/ns/persistence");<NEW_LINE>persistence.addAttribute(QName.get("schemaLocation", "xsi", "http:... | OutputFormat format = OutputFormat.createPrettyPrint(); |
345,118 | private void loadNode1262() {<NEW_LINE>PropertyTypeNode node = new PropertyTypeNode(this.context, Identifiers.OperationLimitsType_MaxNodesPerHistoryUpdateData, new QualifiedName(0, "MaxNodesPerHistoryUpdateData"), new LocalizedText("en", "MaxNodesPerHistoryUpdateData"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UI... | (1), 0.0, false); |
25,947 | public void report(String type, String content) {<NEW_LINE>try {<NEW_LINE>Config config = getConfig();<NEW_LINE>if (!config.allowReports)<NEW_LINE>return;<NEW_LINE>URL url = new URL("https://www.google-analytics.com/collect");<NEW_LINE>HttpURLConnection conn = (HttpURLConnection) url.openConnection();<NEW_LINE>conn.set... | conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); |
1,130,637 | private static void backslashreplace_internal(int start, int end, String object, StringBuilder replacement) {<NEW_LINE>for (Iterator<Integer> iter = new StringSubsequenceIterator(object, start, end, 1); iter.hasNext(); ) {<NEW_LINE><MASK><NEW_LINE>replacement.append('\\');<NEW_LINE>if (c >= 0x00010000) {<NEW_LINE>repla... | int c = iter.next(); |
183,511 | public Request<DetachPolicyRequest> marshall(DetachPolicyRequest detachPolicyRequest) {<NEW_LINE>if (detachPolicyRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DetachPolicyRequest)");<NEW_LINE>}<NEW_LINE>Request<DetachPolicyRequest> request = new DefaultRequest<DetachPo... | request.addHeader("Content-Type", "application/x-amz-json-1.0"); |
1,428,957 | private void appendWindowsInformation(FSAttributes attrs, List<String> infoList) {<NEW_LINE>if (attrs.hasWindowsFileAttributes()) {<NEW_LINE>WindowsFileAttributes windowsFileAttributes = attrs.getWindowsFileAttributes();<NEW_LINE>infoList.add("Archive: " + windowsFileAttributes.isArchive());<NEW_LINE>infoList.add("C... | "Encrypted: " + windowsFileAttributes.isEncrypted()); |
619,089 | public void firePublisherQueueNow(Map<String, Object> dataMap) {<NEW_LINE>try {<NEW_LINE>Scheduler sched = QuartzUtils.getScheduler();<NEW_LINE>JobDetail job = sched.getJobDetail("PublishQueueJob", "dotcms_jobs");<NEW_LINE>if (job == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>job.<MASK><NEW_LINE>Calendar calendar = C... | setJobDataMap(new JobDataMap(dataMap)); |
860,905 | protected void ended(GENASubscription subscription, CancelReason reason, UpnpResponse response) {<NEW_LINE>final Service service = subscription.getService();<NEW_LINE>if (service != null) {<NEW_LINE>final <MASK><NEW_LINE>final Device device = service.getDevice();<NEW_LINE>if (device != null) {<NEW_LINE>final Device dev... | ServiceId serviceId = service.getServiceId(); |
1,477,498 | public String describe(ObjectName bean) throws Exception {<NEW_LINE>MBeanInfo mbinfo = mserver.getMBeanInfo(bean);<NEW_LINE>StringBuilder sb = new StringBuilder();<NEW_LINE>sb.append(bean);<NEW_LINE>sb.append('\n');<NEW_LINE>sb.append(mbinfo.getClassName());<NEW_LINE>sb.append('\n');<NEW_LINE>sb.append(" - " + mbinfo.g... | " - " + oi.getDescription()); |
688,910 | protected void serializeFromStream() {<NEW_LINE>super.serializeFromStream();<NEW_LINE>try {<NEW_LINE>className = document.field("className");<NEW_LINE>final List<ODocument> inds = document.field("indexDefinitions");<NEW_LINE>final List<String> indClasses = document.field("indClasses");<NEW_LINE>indexDefinitions.clear()... | (indClasses.get(i)); |
399,120 | public int initSessionAndInputs(String modelPath, boolean isTrainMode) {<NEW_LINE>if (modelPath == null) {<NEW_LINE>logger.severe(Common.addTag("session init failed"));<NEW_LINE>return -1;<NEW_LINE>}<NEW_LINE>int ret = -1;<NEW_LINE>Optional<LiteSession> optTrainSession = SessionUtil.initSession(modelPath);<NEW_LINE>if ... | int inputSize = inputIdTensor.elementsNum(); |
1,160,071 | protected Object nodes(Predicate<RedisClusterNode> predicate, ClusterConnectionProvider.Intent intent, boolean dynamic) {<NEW_LINE>NodeSelectionSupport<RedisCommands<K, V>, ?> selection = null;<NEW_LINE>if (connection instanceof StatefulRedisClusterConnectionImpl) {<NEW_LINE>StatefulRedisClusterConnectionImpl<K, V> imp... | predicate, intent, StatefulRedisConnection::sync); |
1,842,460 | private int findPLV(int M_PriceList_ID) {<NEW_LINE>final int p_WindowNo = getWindowNo();<NEW_LINE>Timestamp priceDate = null;<NEW_LINE>// Sales Order Date<NEW_LINE>String dateStr = Env.getContext(Env.getCtx(), p_WindowNo, "DateOrdered");<NEW_LINE>if (dateStr != null && dateStr.length() > 0) {<NEW_LINE>priceDate = Env.g... | DB.close(rs, pstmt); |
1,001,663 | public ManifestIdentifier identify(Config config) {<NEW_LINE>final String manifestPath = config.manifest();<NEW_LINE>if (manifestPath.equals(Config.NONE)) {<NEW_LINE>return new ManifestIdentifier((String) null, null, null, null, null);<NEW_LINE>}<NEW_LINE>// Try to locate the manifest file as a classpath resource; fall... | resolve(config.resourceDir()); |
592,526 | public static ListStoresResponse unmarshall(ListStoresResponse listStoresResponse, UnmarshallerContext _ctx) {<NEW_LINE>listStoresResponse.setRequestId(_ctx.stringValue("ListStoresResponse.RequestId"));<NEW_LINE>listStoresResponse.setMessage(_ctx.stringValue("ListStoresResponse.Message"));<NEW_LINE>listStoresResponse.s... | ("ListStoresResponse.Stores[" + i + "].Status")); |
678,613 | private static String toHexString(BigInteger value) {<NEW_LINE>int signum = value.signum();<NEW_LINE>// obvious shortcut<NEW_LINE>if (signum == 0) {<NEW_LINE>return "0";<NEW_LINE>}<NEW_LINE>// we want to work in absolute numeric value (negative sign is added afterward)<NEW_LINE>byte[] input = value.abs().toByteArray();... | b = input[i] & 0xFF; |
942,209 | public boolean createCollector(int type, long timeout) {<NEW_LINE>IntervalCollector <MASK><NEW_LINE>if (collector == null) {<NEW_LINE>switch(type) {<NEW_LINE>case COLLECT_TYPE_WIFI:<NEW_LINE>{<NEW_LINE>collector = new WifiCollector(COLLECT_TYPE_WIFI, this.context, timeout);<NEW_LINE>break;<NEW_LINE>}<NEW_LINE>case COLL... | collector = this.getCollector(type); |
927,486 | static final Map<Integer, PSPathogenTaxonScore> computeNormalizedScores(final Map<Integer, PSPathogenTaxonScore> taxIdsToScores, final PSTree tree, boolean notNormalizedByKingdom) {<NEW_LINE>// Get sum of all scores assigned under each superkingdom or the root node<NEW_LINE>final Map<Integer, Double> normalizationSums ... | .getValue().getSelfScore(); |
341,561 | private void buildCIDToGIDMap(Map<Integer, Integer> cidToGid) throws IOException {<NEW_LINE>ByteArrayOutputStream out = new ByteArrayOutputStream();<NEW_LINE>int cidMax = Collections.<MASK><NEW_LINE>for (int i = 0; i <= cidMax; i++) {<NEW_LINE>int gid;<NEW_LINE>if (cidToGid.containsKey(i)) {<NEW_LINE>gid = cidToGid.get... | max(cidToGid.keySet()); |
435,671 | public Mono<Layout> createLayout(String pageId, Layout layout) {<NEW_LINE>if (pageId == null) {<NEW_LINE>return Mono.error(new AppsmithException(AppsmithError.INVALID_PARAMETER, FieldName.PAGE_ID));<NEW_LINE>}<NEW_LINE>// fetch the unpublished page<NEW_LINE>Mono<PageDTO> pageMono = newPageService.findPageById(pageId, M... | (Mono.just(layout)); |
1,019,951 | private CrossGammaParameterSensitivity combineSensitivities(CurrencyParameterSensitivity baseDeltaSingle, CrossGammaParameterSensitivities blockCrossGamma) {<NEW_LINE>double[][] valuesTotal = new double[baseDeltaSingle.getParameterCount()][];<NEW_LINE>List<Pair<MarketDataName<?>, List<? extends ParameterMetadata>>> ord... | , DoubleMatrix.ofUnsafe(valuesTotal)); |
28,737 | public boolean onPrepareOptionsMenu(Menu menu) {<NEW_LINE>MenuItem closeIssue = menu.findItem(R.id.closeIssue);<NEW_LINE>MenuItem lockIssue = menu.findItem(R.id.lockIssue);<NEW_LINE>MenuItem milestone = menu.findItem(R.id.milestone);<NEW_LINE>MenuItem labels = menu.findItem(R.id.labels);<NEW_LINE>MenuItem assignees = m... | = getPresenter().isOwner(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.