idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
762,784 | private void scheduleNextNotificationIfRepeating(Bundle bundle) {<NEW_LINE>String repeatType = bundle.getString("repeatType");<NEW_LINE>long repeatTime = (long) bundle.getDouble("repeatTime");<NEW_LINE>if (repeatType != null) {<NEW_LINE>long fireDate = (long) bundle.getDouble("fireDate");<NEW_LINE>boolean validRepeatTy... | w(LOG_TAG, "repeatType specified as time but no repeatTime " + "has been mentioned"); |
377,468 | private static AST ExplodeProcedure(AST.Procedure ast) throws PcalTranslateException {<NEW_LINE>int i = 0;<NEW_LINE>AST.Procedure newast = new AST.Procedure();<NEW_LINE>newast.setOrigin(ast.getOrigin());<NEW_LINE>newast.col = ast.col;<NEW_LINE>newast.line = ast.line;<NEW_LINE>newast.name = ast.name;<NEW_LINE>// Added b... | body.elementAt(0) : null; |
58,994 | // Display header<NEW_LINE>private static void header(Comparable[] array) {<NEW_LINE>StdDraw.setPenColor(StdDraw.BLACK);<NEW_LINE>StdDraw.text(array.length <MASK><NEW_LINE>for (int i = 0; i < array.length; i++) {<NEW_LINE>StdDraw.text(i, -2, String.valueOf(i));<NEW_LINE>}<NEW_LINE>StdDraw.text(-2.50, -2, "i");<NEW_LINE... | / 2.0, -2.7, "array[ ]"); |
954,888 | public void visitCode() {<NEW_LINE>int sidx = isStatic ? 0 : 1;<NEW_LINE>int arrVarIdx = newLocal(Type.getType("[Ljava/lang/Object;"));<NEW_LINE>AsmUtil.PUSH(mv, paramTypes.length);<NEW_LINE>mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/Object");<NEW_LINE>mv.visitVarInsn(Opcodes.ASTORE, arrVarIdx);<NEW_LINE>for (int i... | "java/lang/Byte", "valueOf", "(B)Ljava/lang/Byte;", false); |
959,900 | public ChangesRequiringRestart compareArray(List<? extends Node> from, List<? extends Node> to, String name, String comment, CompareFunc func) {<NEW_LINE>if (!from.equals(to)) {<NEW_LINE>int commonElements = Math.min(from.size(), to.size());<NEW_LINE>for (int i = 0; i < commonElements; ++i) {<NEW_LINE>ChangesRequiringR... | Integer.toString(i) + "]"; |
505,924 | private void init(Drawable[] icons, int iconsCount, float size) {<NEW_LINE>_icons = icons;<NEW_LINE>_iconsCount = iconsCount;<NEW_LINE>_iconSize = size;<NEW_LINE>_iconSizeDiv2 = Math.round(_iconSize / 2f);<NEW_LINE>_iconSizeDiv4 = Math.round(_iconSize / 4f);<NEW_LINE>_padding = _iconSize / 25f;<NEW_LINE>float b <MASK><... | = _iconSize / 2f + 2 * _padding; |
1,475,207 | public boolean onCreateOptionsMenu(Menu menu) {<NEW_LINE>logDebug("onCreateOptionsMenu");<NEW_LINE>// Inflate the menu items for use in the action bar<NEW_LINE>MenuInflater inflater = getMenuInflater();<NEW_LINE>inflater.inflate(R.menu.file_explorer_action, menu);<NEW_LINE>searchMenuItem = menu.<MASK><NEW_LINE>createFo... | findItem(R.id.cab_menu_search); |
802,396 | private void initialize() {<NEW_LINE>locationTF.setPreferredSize(new Dimension(360, 30));<NEW_LINE>locationTF.setText(System.getProperty("user.home"));<NEW_LINE>locationTF.setEditable(false);<NEW_LINE>browseBtn.setText(FontUtils.elegantIconHtml("n", <MASK><NEW_LINE>browseBtn.setFont(StyleConstants.FONT_BUTTON_LARG... | MessageUtils.getLocalizedMessage("button.browse"))); |
1,132,106 | // insertString<NEW_LINE>@Override<NEW_LINE>public void remove(int offset, int length) throws BadLocationException {<NEW_LINE>log.finest("Offset=" + offset + ",Length=" + length);<NEW_LINE>// begin of string<NEW_LINE>if (offset == 0 || length == 0) {<NEW_LINE>// empty the field<NEW_LINE>// if the length is 0 or greater... | super.remove(offset, length); |
948,110 | public BatchError unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>BatchError batchError = new BatchError();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>JsonToken token = context.getCurrentToken();<NEW_LINE>if (tok... | String currentParentElement = context.getCurrentParentElement(); |
767,149 | public void close() throws IOException {<NEW_LINE>ParallelIndexIOConfig ioConfig = parallelIndexIOConfig();<NEW_LINE>ParallelIndexTuningConfig tuningConfig = tuningConfig();<NEW_LINE>ParallelIndexSupervisorTask indexTask = parallelIndexSupervisorTask(ioConfig, tuningConfig);<NEW_LINE>ObjectMapper mapper = new ObjectMap... | "Druid write task has been sent, and the response is {}", response.toString()); |
1,373,575 | private void initRetraceUI() {<NEW_LINE>poligonyzerBox = new VisSelectBox<>("white");<NEW_LINE>Array<String> types = new Array<>();<NEW_LINE>types.add("BAYAZIT");<NEW_LINE>types.add("EWJORDAN");<NEW_LINE>poligonyzerBox.setItems(types);<NEW_LINE>Validators.FloatValidator floatValidator = new Validators.FloatValidator();... | row().padTop(5); |
406,484 | public OResultSet executeSimple(OCommandContext ctx) {<NEW_LINE>ODatabase database = ctx.getDatabase();<NEW_LINE>final OFunction f = database.getMetadata().getFunctionLibrary().createFunction(name.getStringValue());<NEW_LINE>f.setCode(code);<NEW_LINE>f.setIdempotent(Boolean.TRUE.equals(idempotent));<NEW_LINE>if (parame... | "functionName", name.getStringValue()); |
308,545 | public void close() throws IOException {<NEW_LINE>if (mClosed) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>mTemporaryOutputStream.close();<NEW_LINE>if (!mUfs.renameFile(mTemporaryPath, mPermanentPath)) {<NEW_LINE>if (!mUfs.deleteFile(mTemporaryPath)) {<NEW_LINE>LOG.error("Failed to delete temporary file {}", mTemporaryPath)... | .getMessage(mTemporaryPath, mPermanentPath)); |
1,470,488 | public void writeExternal(final ObjectOutput out) throws IOException {<NEW_LINE>final int version = CURRENT_VERSION;<NEW_LINE>LongPacker.packLong(out, version);<NEW_LINE>// hasName?<NEW_LINE>out.writeBoolean(name != null ? true : false);<NEW_LINE>// the name<NEW_LINE>if (name != null) {<NEW_LINE>out.writeUTF(name);<NEW... | LongPacker.packLong(out, indexSegmentBranchingFactor); |
1,630,055 | public Request<DistributeDatasetEntriesRequest> marshall(DistributeDatasetEntriesRequest distributeDatasetEntriesRequest) {<NEW_LINE>if (distributeDatasetEntriesRequest == null) {<NEW_LINE>throw new AmazonClientException("Invalid argument passed to marshall(DistributeDatasetEntriesRequest)");<NEW_LINE>}<NEW_LINE>Reques... | request.addHeader("X-Amz-Target", target); |
592,100 | public void writeHeader(final VariantContextWriter vcfWriter, final Set<VCFHeaderLine> defaultToolHeaderLines) {<NEW_LINE>final Set<VCFHeaderLine> headerInfo = new HashSet<>();<NEW_LINE>headerInfo.add(new VCFHeaderLine("MutectVersion", MUTECT_VERSION));<NEW_LINE>headerInfo.add(new VCFHeaderLine(FilterMutectCalls.FILTER... | .getFormatLine(GATKVCFConstants.HAPLOTYPE_CALLER_PHASING_ID_KEY)); |
1,366,897 | private boolean tryImplicitReceiver(final Expression origin, final Expression message, final Expression arguments, final MethodCallerMultiAdapter adapter, final boolean safe, final boolean spreadSafe) {<NEW_LINE>Object implicitReceiver = origin.getNodeMetaData(StaticTypesMarker.IMPLICIT_RECEIVER);<NEW_LINE>if (implicit... | ) origin).isSpreadSafe()); |
1,756,622 | public void layoutContainer(Container parent) {<NEW_LINE>JComponent filter = filterPanel;<NEW_LINE>if (filter != null && !filter.isVisible())<NEW_LINE>filter = null;<NEW_LINE>JComponent search = searchPanel;<NEW_LINE>if (search != null && !search.isVisible())<NEW_LINE>search = null;<NEW_LINE>int bottomOffset = /* hasBo... | width, size.height - bottomOffset); |
1,419,524 | public void queryDatabase(DatastoreMetricQuery query, QueryCallback queryCallback) throws DatastoreException {<NEW_LINE>GenOrmQueryResultSet<? extends MetricIdResults> idQuery = getMetricIdsForQuery(query);<NEW_LINE>try {<NEW_LINE>while (idQuery.next()) {<NEW_LINE>MetricIdResults result = idQuery.getRecord();<NEW_LINE>... | DataPoint record = resultSet.getRecord(); |
1,311,845 | private void loadNode91() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.ServerConfigurationType_CertificateGroups_DefaultApplicationGroup_TrustList_GetPosition, new QualifiedName(0, "GetPosition"), new LocalizedText("en", "GetPosition"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UIntege... | this.nodeManager.addNode(node); |
1,734,896 | private boolean checkUID(Context context) {<NEW_LINE><MASK><NEW_LINE>final PackageManager pm = context.getPackageManager();<NEW_LINE>List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);<NEW_LINE>int launcherUid = 0;<NEW_LINE>int twitterUid = 0;<NEW_LINE>for (ApplicationInfo packag... | int callingUid = Binder.getCallingUid(); |
1,636,952 | public static Request fromXContent(final XContentParser parser, TimeValue timeout) throws IOException {<NEW_LINE>Map<String, Object> content = parser.map();<NEW_LINE>// dest.index is not required for _preview, so we just supply our own<NEW_LINE>Map<String, String> tempDestination = new HashMap<>();<NEW_LINE>tempDestina... | Map<String, String>) providedDestination; |
216,915 | public int numDecodings2(String s) {<NEW_LINE>int length = s.length();<NEW_LINE>int[] dp = new int[length + 1];<NEW_LINE>dp[length] = 1;<NEW_LINE>if (s.charAt(length - 1) != '0') {<NEW_LINE>dp[length - 1] = 1;<NEW_LINE>}<NEW_LINE>for (int i = length - 2; i >= 0; i--) {<NEW_LINE>if (s.charAt(i) == '0') {<NEW_LINE>contin... | ans1 = dp[i + 1]; |
1,629,703 | private void wado() throws Exception {<NEW_LINE>ImagingDocumentSourcePortType port = port();<NEW_LINE>if (rendered) {<NEW_LINE>RetrieveRenderedImagingDocumentSetResponseType retrieveRenderedImagingDocumentSetResponseType = port.imagingDocumentSourceRetrieveRenderedImagingDocumentSet(createRetrieveRenderedImagingDocumen... | > renderedDocumentResponse = retrieveRenderedImagingDocumentSetResponseType.getRenderedDocumentResponse(); |
1,750,911 | public String resolveUserIdForEmailAddress(String emailAddress) {<NEW_LINE>if (StringUtils.isEmpty(emailAddress)) {<NEW_LINE>LOGGER.fine("Email address was empty");<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>if (StringUtils.isEmpty(authToken)) {<NEW_LINE>LOGGER.fine("Auth token was empty");<NEW_LINE>return null;<NEW_LIN... | .getStatusLine().getStatusCode(); |
1,147,364 | public boolean tryAdvance(Consumer<? super Object> action) {<NEW_LINE>if (entries.length == 0) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>final OHashTable.Entry<Object, Object> bucketEntry = entries[nextEntriesIndex];<NEW_LINE>nextEntriesIndex++;<NEW_LINE>if (nextEntriesIndex >= entries.length) {<NEW_LINE>entries = h... | .length - 1].key); |
338,035 | public void runNotSupportedTest() {<NEW_LINE>String key = "not supported";<NEW_LINE>CMEntity bean = null;<NEW_LINE>try {<NEW_LINE>InitialContext initCtx = new InitialContext();<NEW_LINE>Object o = initCtx.lookup("CMEntity");<NEW_LINE>// d163474<NEW_LINE>CMEntityHome home = (CMEntityHome) PortableRemoteObject.narrow(o, ... | throw new EJBException("Exception ", e); |
479,930 | static <T extends HasGeometry> Pair<T> worstCombination(List<T> items) {<NEW_LINE>// TODO reduce allocations by not using Optional<NEW_LINE>Optional<T<MASK><NEW_LINE>Optional<T> e2 = Optional.empty();<NEW_LINE>{<NEW_LINE>Optional<Double> maxArea = Optional.empty();<NEW_LINE>for (int i = 0; i < items.size(); i++) {<NEW_... | > e1 = Optional.empty(); |
487,896 | private boolean isEmpty(ChunkCache chunkCache) {<NEW_LINE>if (!chunkCache.isEmpty()) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>if (Baritone.settings().renderCachedChunks.value && !Minecraft.getMinecraft().isSingleplayer()) {<NEW_LINE>Baritone baritone = (Baritone) BaritoneAPI.getProvider().getPrimaryBaritone();<NEW_... | Object) this).getPosition(); |
1,813,119 | static Tuple2<double[], String> toArimaInfo(SarimaModel model, ArrayList<double[]> forecast) {<NEW_LINE>ArimaInfo arimaInfo = new ArimaInfo();<NEW_LINE>arimaInfo.forecast = forecast.get(0);<NEW_LINE>arimaInfo.stdError = forecast.get(1);<NEW_LINE>arimaInfo.lower = forecast.get(2);<NEW_LINE>arimaInfo.upper = forecast.get... | .p = model.arima.p; |
1,260,641 | private void calculatePoly() {<NEW_LINE>// common denominator<NEW_LINE>double denom = pow2(1 - 3.4641 * ar);<NEW_LINE>poly[5] = (-1.58025 * (-0.728769 + ar) * (-0.192105 + ar)) / denom;<NEW_LINE>poly[4] = (12.8395 * (-0.725688 + ar) * (-0.19292 + ar)) / denom;<NEW_LINE>poly[3] = (-39.5062 * (-0.72074 + ar) * (-0.194245... | -0.198476 + ar)) / denom; |
1,311,691 | private List<EditorData> createEditorData(EditorAccess access) throws UnableToCompleteException {<NEW_LINE>TreeLogger subLogger = logger.branch(TreeLogger.DEBUG, "Examining " + access.toString());<NEW_LINE>List<EditorData> toReturn = new ArrayList<EditorData>();<NEW_LINE>// Are we looking at a view that implements IsEd... | subLogger, access.getEditorType()); |
1,699,167 | static void test_sparc() {<NEW_LINE>// G1 register<NEW_LINE>Long g1 = 0x1230L;<NEW_LINE>// G2 register<NEW_LINE>Long g2 = 0x6789L;<NEW_LINE>// G3 register<NEW_LINE>Long g3 = 0x5555L;<NEW_LINE><MASK><NEW_LINE>// Initialize emulator in Sparc mode<NEW_LINE>Unicorn u = new Unicorn(Unicorn.UC_ARCH_SPARC, Unicorn.UC_MODE_32 ... | System.out.print("Emulate SPARC code\n"); |
951,593 | public boolean onBlockActivated(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull EntityPlayer entityPlayer, @Nonnull EnumHand hand, @Nonnull EnumFacing side, float hitX, float hitY, float hitZ) {<NEW_LINE>if (shouldWrench(world, pos, entityPlayer, side) && ToolUtil.breakBlockWithTool(th... | ) te).toggleIoModeForFace(side); |
279,325 | private void dynInit() {<NEW_LINE>// Load Roles<NEW_LINE>String sql = MRole.getDefault().addAccessSQL("SELECT AD_Role_ID, Name FROM AD_Role ORDER BY 2", "AD_Role", MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);<NEW_LINE>roleField = new Listbox(DB.getKeyNamePairs(sql, false));<NEW_LINE>roleField.setMold("select");<NEW_LINE>// L... | (Env.getCtx())); |
1,768,088 | private static void putBuildXMLSourceFile(AntProjectHelper helper, String antPath) {<NEW_LINE>Element data = Util.getPrimaryConfigurationData(helper);<NEW_LINE>Document doc = data.getOwnerDocument();<NEW_LINE>// NOI18N<NEW_LINE>Element viewEl = XMLUtil.findElement(data, "view", FreeformProjectType.NS_GENERAL);<NEW_LINE... | appendChildElement(itemsEl, fileEl, viewItemElementsOrder); |
651,619 | public void run(String... args) {<NEW_LINE>CommandLineOptions options = new CommandLineOptions(args);<NEW_LINE>if (options.help()) {<NEW_LINE>out.println(options.helpText());<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>FileSource fileSource = options.filesRoot();<NEW_LINE>fileSource.createIfNecessary();<NEW_LINE>FileSource fi... | .httpsSettings().enabled(); |
1,127,401 | void read(WizardDescriptor settings) {<NEW_LINE>File projectLocation = (File) settings.getProperty("projdir");<NEW_LINE>if (projectLocation == null || projectLocation.getParentFile() == null || !projectLocation.getParentFile().isDirectory()) {<NEW_LINE>projectLocation = ProjectChooser.getProjectsFolder();<NEW_LINE>} el... | = new File(projectLocation, projectName); |
1,287,586 | public boolean installExtendedImage() throws Exception {<NEW_LINE>Log.<MASK><NEW_LINE>String jarName = null;<NEW_LINE>// Find the extended image under the autoFVT/publish/images location<NEW_LINE>LocalFile imagesDirectory = new LocalFile("publish/images");<NEW_LINE>RemoteFile[] imageFiles = imagesDirectory.list(false);... | info(c, "installExtendedImage", "Looking for extended image to install..."); |
1,283,835 | public void bind() throws SQLException {<NEW_LINE>BeanDescriptor<?> desc = persistRequest.descriptor();<NEW_LINE>EntityBean bean = persistRequest.entityBean();<NEW_LINE>Object idValue = desc.getId(bean);<NEW_LINE>boolean withId = !isNullOrZero(idValue);<NEW_LINE>// check to see if we are going to use generated keys<NEW... | withId, persistRequest.isPublish()); |
1,281,493 | public void onPrepareOptionsMenu(Menu menu) {<NEW_LINE>boolean editMode = editMode();<NEW_LINE>boolean oneSelected = getSelectedCount() == 1;<NEW_LINE>menu.setGroupVisible(R.id.general_album_items, !editMode);<NEW_LINE>menu.setGroupVisible(<MASK><NEW_LINE>menu.setGroupVisible(R.id.one_selected_items, oneSelected);<NEW_... | R.id.edit_mode_items, editMode); |
544,063 | public PutAutoScalingPolicyResult unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>PutAutoScalingPolicyResult putAutoScalingPolicyResult = new PutAutoScalingPolicyResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentEleme... | JsonToken token = context.getCurrentToken(); |
1,585,564 | final DescribeCasesResult executeDescribeCases(DescribeCasesRequest describeCasesRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeCasesRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | endClientExecution(awsRequestMetrics, request, response); |
1,764,702 | public boolean startLazyMode() {<NEW_LINE>if (!hasPost) {<NEW_LINE>Toast.makeText(activity, R.string.no_posts_no_lazy_mode, Toast.LENGTH_SHORT).show();<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Utils.setTitleWithCustomFontToMenuItem(activity.typeface, lazyModeItem, getString(R.string.action_stop_lazy_mode));<NEW_LINE>... | addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); |
654,252 | public void run() {<NEW_LINE>try {<NEW_LINE>logger.debug("command: {}, working dir: {}", argList, workingDir);<NEW_LINE><MASK><NEW_LINE>if (environment != null) {<NEW_LINE>pb.environment().putAll(environment);<NEW_LINE>environment = pb.environment();<NEW_LINE>}<NEW_LINE>logger.trace("env PATH: {}", pb.environment().get... | ProcessBuilder pb = new ProcessBuilder(args); |
405,220 | public <T> Evaluator<T> create(QueryMetadata metadata, List<? extends Expression<?>> sources, Expression<T> projection) {<NEW_LINE>final CollQuerySerializer serializer = new CollQuerySerializer(templates);<NEW_LINE>serializer.append("return ");<NEW_LINE>if (projection instanceof FactoryExpression<?>) {<NEW_LINE>seriali... | constants = getConstants(metadata, constantToLabel); |
1,534,517 | private InputStream openResource(Context context) throws IOException {<NEW_LINE>if (BuildConfig.DEBUG)<NEW_LINE>Log.v(TAG, "Trying to open resources in a package");<NEW_LINE>PackageInfo pi = getPackageInfo(context);<NEW_LINE>if (pi == null) {<NEW_LINE>if (BuildConfig.DEBUG)<NEW_LINE><MASK><NEW_LINE>throw new IOExceptio... | Log.v(TAG, "No package found"); |
1,295,756 | final UntagResourceResult executeUntagResource(UntagResourceRequest untagResourceRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(untagResourceRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(untagResourceRequest)); |
1,385,213 | public void encodeMessage(byte[] data) {<NEW_LINE>super.encodeMessage(data);<NEW_LINE>subType = SubType.fromByte(super.subType);<NEW_LINE>sensorId = (data[4] & 0xFF) << 8 | (data[5] & 0xFF);<NEW_LINE>count = data[6];<NEW_LINE>// Current = Field / 10<NEW_LINE>channel1Amps = ((data[7] & 0xFF) << 8 | (data[<MASK><NEW_LINE... | 8] & 0xFF)) / 10.0; |
215,859 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>Linklist list = new Linklist();<NEW_LINE>boolean flag = true;<NEW_LINE>int valu;<NEW_LINE>int posi = 0;<NEW_LINE>while (flag) {<NEW_LINE>System.out.println();<NEW_LINE>System.out.println("1. Add item to the list at start");<... | System.out.println("7. Update node at position"); |
1,854,636 | @ApiImplicitParams({ @ApiImplicitParam(name = "objHash", value = "object type", required = true, dataType = "int", paramType = "path"), @ApiImplicitParam(name = "serverId", value = "server id", dataType = "int", paramType = "query") })<NEW_LINE>@ApiResponses(value = { @ApiResponse(code = 200, message = "OK - Json Data"... | getInstance().getServerIfNullDefault(serverId); |
1,325,915 | public static List<RatesCurveGroupDefinition> parseCurveGroupDefinitions(CharSource groupsCharSource) {<NEW_LINE>Map<CurveName, Set<GroupAndReference>> curveGroups = new LinkedHashMap<>();<NEW_LINE>CsvFile csv = CsvFile.of(groupsCharSource, true);<NEW_LINE>for (CsvRow row : csv.rows()) {<NEW_LINE>String <MASK><NEW_LINE... | curveGroupStr = row.getField(GROUPS_NAME); |
1,399,287 | private DruidScanResponse parseResponse(ArrayNode responses) {<NEW_LINE>String segmentId = "empty";<NEW_LINE>ArrayList<ObjectNode> events = new ArrayList<>();<NEW_LINE>ArrayList<String> columns = new ArrayList<>();<NEW_LINE>if (responses.size() > 0) {<NEW_LINE>ObjectNode firstNode = (ObjectNode) responses.get(0);<NEW_L... | ArrayNode) firstNode.get("columns"); |
24,156 | public void createContents(final Composite page) {<NEW_LINE>final ExpandableComposite comp = new ExpandableComposite(page, SWT.NONE);<NEW_LINE>GridDataFactory.fillDefaults().grab(true, false).applyTo(comp);<NEW_LINE>comp.setText(title);<NEW_LINE>comp<MASK><NEW_LINE>comp.addExpansionListener(new IExpansionListener() {<N... | .setLayout(new FillLayout()); |
1,289,870 | public static void makeSendVerificationEmailRequest(String email, final AccountVerificationEmailHandler handler) {<NEW_LINE>byte[] data = email.getBytes(StandardCharsets.UTF_8);<NEW_LINE>String encodedEmail = Base64.encodeToString(data, Base64.NO_WRAP);<NEW_LINE>new OkHttpClient().newBuilder().readTimeout(3000, TimeUni... | .url().toString(); |
13,081 | public static void main(String[] args) {<NEW_LINE>// Configures debug server port.<NEW_LINE>int debugServerPort = args.length != 0 ? Integer.parseInt(args[0]) : DEFAULT_PORT;<NEW_LINE>try {<NEW_LINE>ServerSocket serverSocket = new ServerSocket(debugServerPort);<NEW_LINE>PrintStream out = System.out;<NEW_LINE>out.printl... | Socket clientSocket = serverSocket.accept(); |
1,648,922 | public void run(RegressionEnvironment env) {<NEW_LINE>RegressionPath path = new RegressionPath();<NEW_LINE>runAssertion(env, BEAN_TYPE.getSimpleName(), FBEAN, new MyIMEvent(new String[] { "v1", "v2" }, Collections.singletonMap("k1", "v1")), path);<NEW_LINE>runAssertion(env, MAP_TYPENAME, FMAP, twoEntryMap("indexed", ne... | .singletonMap("k1", "v1")); |
284,239 | public FTPInfo[] loadFTP(String appName) throws Exception {<NEW_LINE>Section ftps = configFile.listElement("RAQSOFT/" + appName + "/FTP");<NEW_LINE>if (ftps == null || ftps.size() == 0)<NEW_LINE>return null;<NEW_LINE>FTPInfo[] ftpInfos = new FTPInfo[ftps.size()];<NEW_LINE>for (int i = 0; i < ftpInfos.length; i++) {<NEW... | (selected).booleanValue()); |
1,448,639 | public boolean substituteVariableAccess(VariableAccessElement variableAccess) {<NEW_LINE>String targetClassName = variableAccess<MASK><NEW_LINE>String variableName = variableAccess.getVariableName();<NEW_LINE>if (variableAccess.getVariable().getModifiers().contains(Modifier.STATIC) && isMappedType(targetClassName) && t... | .getTargetElement().toString(); |
928,908 | public void draw(DrawHandler drawHandler, DrawingInfo drawingInfo) {<NEW_LINE>double width = drawingInfo.getSymmetricWidth(getFirstLifeline(), getLastLifeline(), tick);<NEW_LINE>double height = TextSplitter.getSplitStringHeight(textLines, width - ROUND_PART_WIDTH * 2, drawHandler) + VERTICAL_BORDER_PADDING * 2;<NEW_LIN... | AlignHorizontal.CENTER, AlignVertical.CENTER); |
419,771 | public void reloadAllModelsOfType(final String modelType) {<NEW_LINE>synchronized (resourceSet) {<NEW_LINE>// Make a copy to avoid ConcurrentModificationException<NEW_LINE>List<Resource> resourceListCopy = new ArrayList<Resource<MASK><NEW_LINE>for (Resource resource : resourceListCopy) {<NEW_LINE>if (resource != null &... | >(resourceSet.getResources()); |
1,096,294 | protected void createHUDocumentsFromTypedModel(final HUDocumentsCollector documentsCollector, final I_DD_Order ddOrder) {<NEW_LINE>final IWarehouseDAO warehouseDAO = Services.get(IWarehouseDAO.class);<NEW_LINE>final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class);<NEW_LINE>final IHUDocumentFa... | getTargetCapacities().add(targetCapacity); |
964,189 | public int longestValidParentheses(String s) {<NEW_LINE>int left = 0;<NEW_LINE>int right = 0;<NEW_LINE>int maxLength = 0;<NEW_LINE>for (int i = 0; i < s.length(); i++) {<NEW_LINE>if (s.charAt(i) == '(') {<NEW_LINE>left++;<NEW_LINE>} else {<NEW_LINE>right++;<NEW_LINE>}<NEW_LINE>if (left == right) {<NEW_LINE>maxLength = ... | max(maxLength, 2 * left); |
669,767 | public final void startDragNDropOverlay(@NonNull View view, @NonNull Item item, @NonNull Action action) {<NEW_LINE>_dragging = true;<NEW_LINE>_dragExceedThreshold = false;<NEW_LINE>_overlayIconScale = 0.0f;<NEW_LINE>_dragView = view;<NEW_LINE>_dragItem = item;<NEW_LINE>_dragAction = action;<NEW_LINE>_dragLocationStart.... | (DropTargetListener) dropTarget.getKey(); |
480,775 | private void run() {<NEW_LINE>try {<NEW_LINE>MDC.put(MDC_KEY_JOB_ID, String.valueOf(ddlContext.getJobId()));<NEW_LINE>LOGGER.info(String.format("start run() DDL JOB: [%s], schemaName:[%s]", ddlContext.getJobId(), ddlContext.getSchemaName()));<NEW_LINE>// Start the job state machine.<NEW_LINE>if (ddlContext.getState() =... | LocalDateTime endTs = LocalDateTime.now(); |
917,443 | public DvbSubSourceSettings unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>DvbSubSourceSettings dvbSubSourceSettings = new DvbSubSourceSettings();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targe... | class).unmarshall(context)); |
1,839,135 | public void marshall(DatasetGroup datasetGroup, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (datasetGroup == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(datasetGroup.getName(), NAME_BINDING);<NEW_LINE>... | datasetGroup.getKmsKeyArn(), KMSKEYARN_BINDING); |
441,040 | public void onClick(View v) {<NEW_LINE>List<FloatingMenuItem> items = new ArrayList<>();<NEW_LINE>FloatingMenuItem selected = null;<NEW_LINE>for (ThemeHelper.PrimaryColor color : themeHelper.getColors()) {<NEW_LINE>FloatingMenuItem floatingMenuItem = new FloatingMenuItem(new ColorsAdapterItem(color, color.color500), co... | getColorsMenu(items, selected, toolbar); |
1,404,387 | private void showProgressNotification(int progressPercent, PendingIntent pendingIntent, String message, String subText, String contentText) {<NEW_LINE>mNotification = null;<NEW_LINE>mBuilder = new NotificationCompat.Builder(this, notificationChannelId);<NEW_LINE>mBuilder.setSmallIcon(R.drawable.ic_stat_camera_sync).set... | channel.setSound(null, null); |
218,118 | public void performAction() throws ActionException {<NEW_LINE>if (filterData != null) {<NEW_LINE>CommandTarget target = getCommandTarget(UUID.fromString<MASK><NEW_LINE>if (target != null) {<NEW_LINE>JasperDesignCache cache = JasperDesignCache.getInstance(getJasperReportsContext(), getReportContext());<NEW_LINE>JasperDe... | (filterData.getTableUuid())); |
269,258 | public InternalServicePluginConfiguration convertFromSObject(SInternalServicePluginConfiguration input, InternalServicePluginConfiguration result, DatabaseSession session) throws BimserverDatabaseException {<NEW_LINE>if (input == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>result.setName(input.getName());<NEW_LIN... | setEnabled(input.getEnabled()); |
636,439 | public static Map<String, String> queryPartitionToMountMap() {<NEW_LINE>// Create map to correlate disk name with block device mount point for<NEW_LINE>// later use in partition info<NEW_LINE>Map<String, String> <MASK><NEW_LINE>// First, run iostat -er to enumerate disks by name.<NEW_LINE>List<String> mountNames = Exec... | deviceMap = new HashMap<>(); |
252,889 | private // don't work so that we can leverage the remaining code.<NEW_LINE>void patchUpEclipseEvaluationEngine() {<NEW_LINE>// We don't have access to any preferences service. Replace it with a mock<NEW_LINE>// object that returns default values for everything.<NEW_LINE>EclipseShim.hotReplaceMethod("org.eclipse.core.ru... | "org.eclipse.jdt.internal.debug.eval.ast.engine.EvaluationSourceGenerator", "getSource", "java.lang.ClassCastException", "return \"\";"); |
474,665 | /*<NEW_LINE>* close the connection<NEW_LINE>*/<NEW_LINE>void closeConnection(Connection con) {<NEW_LINE>if (com.ibm.websphere.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_WAS.isLoggable(Level.FINE)) {<NEW_LINE>LoggingUtil.SESSION_LOGGER_WAS.entering(methodClassName, methodNames<MASK><NEW_LINE>... | [CLOSE_CONNECTION], "closing " + con); |
4,475 | public void store(Configuration cfg) {<NEW_LINE>cfg.putValue(FtpConnectionProvider.HOST, getHostName());<NEW_LINE>cfg.putValue(FtpConnectionProvider.PORT, getPort());<NEW_LINE>cfg.putValue(FtpConnectionProvider.ENCRYPTION, getEncryption());<NEW_LINE>cfg.putValue(FtpConnectionProvider.ONLY_LOGIN_ENCRYPTED, String.valueO... | FtpConnectionProvider.KEEP_ALIVE_INTERVAL, getKeepAliveInterval()); |
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... | [] { OAuth20Constants.TOKEN_TYPE }); |
1,749,966 | private static AliasesParser createParser(AliasesProvider provider) {<NEW_LINE><MASK><NEW_LINE>// Register standard conditions<NEW_LINE>parser.registerCondition("minecraft version", (str) -> {<NEW_LINE>// For example: 1.12 or newer<NEW_LINE>int orNewer = str.indexOf("or newer");<NEW_LINE>if (orNewer != -1) {<NEW_LINE>@... | AliasesParser parser = new AliasesParser(provider); |
1,810,564 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {<NEW_LINE>int width = MeasureSpec.getSize(widthMeasureSpec);<NEW_LINE>int height = MeasureSpec.getSize(heightMeasureSpec);<NEW_LINE>setMeasuredDimension(width, height);<NEW_LINE><MASK><NEW_LINE>int count = getChildCount();<NEW_LINE>for (int i = 0; i... | DeviceProfile grid = mActivity.getDeviceProfile(); |
1,583,493 | public void marshall(PostgreSQLSettings postgreSQLSettings, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (postgreSQLSettings == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMarshaller.marshall(postgreSQLSettings.getAfterCon... | postgreSQLSettings.getExecuteTimeout(), EXECUTETIMEOUT_BINDING); |
1,272,087 | protected <T> ClusterInvoker<T> doCreateInvoker(DynamicDirectory<T> directory, Cluster cluster, Registry registry, Class<T> type) {<NEW_LINE>directory.setRegistry(registry);<NEW_LINE>directory.setProtocol(protocol);<NEW_LINE>// all attributes of REFER_KEY<NEW_LINE>Map<String, String> parameters = new HashMap<>(director... | register(directory.getRegisteredConsumerUrl()); |
1,490,522 | private void updateFavPointBox() {<NEW_LINE>// Favorite counts<NEW_LINE>final int favCount = cache.getFavoritePoints();<NEW_LINE>if (favCount >= 0 && !cache.isEventCache()) {<NEW_LINE>favoriteLine.left.setVisibility(View.VISIBLE);<NEW_LINE>final int findsCount = cache.getFindsCount();<NEW_LINE>if (findsCount > 0) {<NEW... | addToFavpoint.setVisibility(View.GONE); |
509,035 | private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(String resourceGroupName, String galleryName, 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>}<... | this.client.mergeContext(context); |
96,838 | private Object generateRandomValue(final Field field, final RandomizationContext context) {<NEW_LINE>Class<?> fieldType = field.getType();<NEW_LINE>Type fieldGenericType = field.getGenericType();<NEW_LINE>if (isArrayType(fieldType)) {<NEW_LINE>return arrayPopulator.getRandomArray(fieldType, context);<NEW_LINE>} else if... | collectionPopulator.getRandomCollection(field, context); |
752,448 | private void loadNode9() {<NEW_LINE>UaMethodNode node = new UaMethodNode(this.context, Identifiers.ServerConfiguration_CertificateGroups_DefaultApplicationGroup_TrustList_GetPosition, new QualifiedName(0, "GetPosition"), new LocalizedText("en", "GetPosition"), LocalizedText.NULL_VALUE, UInteger.valueOf(0), UInteger.val... | .expanded(), true)); |
91,509 | protected void processActions() throws IncorrectOperationException {<NEW_LINE>Application app = ApplicationManager.getApplication();<NEW_LINE>app.runWriteAction(new Runnable() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void run() {<NEW_LINE>Document doc = FileDocumentManager.getInstance().getDocument(myPsiFile.getV... | ), action.getSuffix()); |
1,606,184 | public ApiResponse<Void> usersChangeSubUserPasswordWithHttpInfo(String id, String password) throws ApiException {<NEW_LINE>Object localVarPostBody = password;<NEW_LINE>// verify the required parameter 'id' is set<NEW_LINE>if (id == null) {<NEW_LINE>throw new ApiException(400, "Missing the required parameter 'id' when c... | HashMap<String, Object>(); |
1,081,304 | public void clusterChanged(ClusterChangedEvent event) {<NEW_LINE>if (event.localNodeMaster() && refreshAndRescheduleRunnable.get() == null) {<NEW_LINE>LOGGER.trace("elected as master, scheduling cluster info update tasks");<NEW_LINE>executeRefresh(event.state(), "became master");<NEW_LINE>final RefreshAndRescheduleRunn... | newMaxUsages = ImmutableOpenMap.builder(leastAvailableSpaceUsages); |
636,620 | private void sendBatchLogs(List<ByteBuffer> logList, int firstLogPos) throws TException, InterruptedException {<NEW_LINE>if (logger.isInfoEnabled()) {<NEW_LINE>logger.info("{} send logs from {} num {} for {}", raftMember.getThisNode(), logs.get(firstLogPos).getCurrLogIndex(), logList.size(), node);<NEW_LINE>}<NEW_LINE>... | request = prepareRequest(logList, firstLogPos); |
480,113 | public void removePoint(int pathIndex, int pointIndex) {<NEW_LINE>int pathCount = getPathCount();<NEW_LINE>if (pathIndex < 0)<NEW_LINE>pathIndex = pathCount - 1;<NEW_LINE>if (pathIndex >= pathCount || pointIndex >= getPathSize(pathIndex))<NEW_LINE>throw new GeometryException("index out of bounds");<NEW_LINE>_verifyAllS... | comp = VertexDescription.getComponentCount(semantics); |
300,426 | private BaseBottomSheetItem createTitleItem() {<NEW_LINE>LayoutInflater themedInflater = UiUtilities.getInflater(requireContext(), nightMode);<NEW_LINE>View view = themedInflater.inflate(R.layout.settings_group_title, null);<NEW_LINE>checkBox = view.findViewById(R.id.check_box);<NEW_LINE>selectedSize = view.<MASK><NEW_... | findViewById(R.id.selected_size); |
1,454,781 | protected Geometry convertGeometryFromBinaryFormat(DBCSession session, byte[] object) throws DBCException {<NEW_LINE>try (ByteArrayInputStream is = new ByteArrayInputStream(object)) {<NEW_LINE>int srid = 0;<NEW_LINE>if (leadingSRID) {<NEW_LINE>// Read SRID with little endian order (the least significant bytes come firs... | |= is.read() << 8; |
487,989 | public void removeGhostWidgets(SQLiteDatabase db) {<NEW_LINE>// Get all existing widget ids.<NEW_LINE>final AppWidgetHost host = newLauncherWidgetHost();<NEW_LINE>final int[] allWidgets;<NEW_LINE>try {<NEW_LINE>// Although the method was defined in O, it has existed since the beginning of time,<NEW_LINE>// so it might ... | e(TAG, "getAppWidgetIds not supported", e); |
1,446,142 | public static void main(String[] args) {<NEW_LINE>OkHttpClient http = new OkHttpClient();<NEW_LINE>PokemonGo api = new PokemonGo(http);<NEW_LINE>try {<NEW_LINE>HashProvider hasher = ExampleConstants.getHashProvider();<NEW_LINE>api.login(new PtcCredentialProvider(http, ExampleConstants.LOGIN, ExampleConstants.PASSWORD),... | candies = new HashMap<>(); |
1,008,714 | public void create(ModuleDefineHolder moduleDefineHolder, Stream stream, Class<? extends Record> recordClass) throws StorageException {<NEW_LINE>final StorageBuilderFactory storageBuilderFactory = moduleDefineHolder.find(StorageModule.NAME).provider(<MASK><NEW_LINE>final Class<? extends StorageBuilder> builder = storag... | ).getService(StorageBuilderFactory.class); |
826,012 | public void updateStepReferences(String stepId, String replacementStepId) throws DotDataException, DotSecurityException {<NEW_LINE>DotConnect dc = new DotConnect();<NEW_LINE>try {<NEW_LINE>// Replace references and clear cache for workflow actions<NEW_LINE>dc.setSQL("select step_id from workflow_action where next_step_... | > actionStepIds = dc.loadResults(); |
1,757,316 | public CompletableFuture<QueryResponse> onQuery(final QueryRequest request) {<NEW_LINE>raft.checkThread();<NEW_LINE>logRequest(request);<NEW_LINE>// If this server has not yet applied entries up to the client's session ID, forward the<NEW_LINE>// query to the leader. This ensures that a follower does not tell the clien... | "Unknown session {}", request.session()); |
461,459 | private static SqlNode buildInCondition(List<String> columns, AtomicInteger paramIndex) {<NEW_LINE>// IN condition<NEW_LINE>final SqlIdentifier[] columnNodes = new SqlIdentifier[columns.size()];<NEW_LINE>SqlNode condition = null;<NEW_LINE>if (columns.size() == 1) {<NEW_LINE>final SqlNode[] paramNodes = new SqlNode[colu... | ROW, paramRowArray, SqlParserPos.ZERO); |
78,109 | /*<NEW_LINE>* Helper method to create a jar and placed it to the specified directory which is relative from /publish/servers/ directory.<NEW_LINE>* this method supports adding jar file.<NEW_LINE>*/<NEW_LINE>public static void createJarAllPackages(LibertyServer server, String dir, String jarName, boolean addJarResources... | "/" + dir, true, true); |
1,176,459 | public Vector ifilter(double threshold) {<NEW_LINE>if (storage.isDense()) {<NEW_LINE>double[] values = ((LongDoubleVectorStorage) storage).getValues();<NEW_LINE>for (int i = 0; i < values.length; i++) {<NEW_LINE>if (Math.abs(values[i]) <= threshold) {<NEW_LINE>values[i] = 0;<NEW_LINE>}<NEW_LINE>}<NEW_LINE>} else if (st... | LongDoubleVectorStorage) storage).entryIterator(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.