idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
727,493 | public void startTextPreview(OCFile file, boolean showPreview) {<NEW_LINE>Optional<User> optUser = getUser();<NEW_LINE>if (!optUser.isPresent()) {<NEW_LINE>// remnants of old unsafe system; do not crash, silently stop<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>User user = optUser.get();<NEW_LINE>if (showPreview) {<NEW_LINE>s... | previewIntent.putExtra(EXTRA_FILE, file); |
1,076,091 | private void meetingStarted(MeetingStarted message) {<NEW_LINE>Meeting m = getMeeting(message.meetingId);<NEW_LINE>if (m != null) {<NEW_LINE>if (m.getStartTime() == 0) {<NEW_LINE>long now = System.currentTimeMillis();<NEW_LINE>m.setStartTime(now);<NEW_LINE>Map<String, Object> logData = new HashMap<>();<NEW_LINE>logData... | "parentMeetingId", m.getParentMeetingId()); |
1,494,970 | public void generate(final File method, final File data) {<NEW_LINE>EncogProgramNode createNetworkFunction = null;<NEW_LINE>this.program.addComment("Code generated by Encog v" + Encog.getInstance().getProperties().get(Encog.ENCOG_VERSION));<NEW_LINE>this.program.addComment("Generation Date: " + new Date().toString());<... | this.program.addComment("http://www.heatonresearch.com/encog"); |
606,812 | protected IBinaryType createInfoFromClassFileInJar(Openable classFile) {<NEW_LINE>String filePath = (((ClassFile) classFile).getType().getFullyQualifiedName('$')).replace('.', '/') + SuffixConstants.SUFFIX_STRING_class;<NEW_LINE><MASK><NEW_LINE>IPath path = root.getPath();<NEW_LINE>// take the OS path for external jars... | IPackageFragmentRoot root = classFile.getPackageFragmentRoot(); |
273,854 | private PersistentStore<StoragePluginConfig> initPluginsSystemTable(DrillbitContext context, LogicalPlanPersistence lpPersistence) {<NEW_LINE>try {<NEW_LINE>PersistentStore<StoragePluginConfig> pluginSystemTable = context.getStoreProvider().getOrCreateStore(PersistentStoreConfig.newJacksonBuilder(lpPersistence.getMappe... | > storedPlugins = pluginSystemTable.getAll(); |
1,074,875 | private void logImpl(String message, Object... args) {<NEW_LINE>this.args = args;<NEW_LINE>// Evaluate any (rare) LazyArg instances early. This may throw exceptions from user code, but<NEW_LINE>// it seems reasonable to propagate them in this case (they would have been thrown if the<NEW_LINE>// argument was evaluated a... | [n]).evaluate(); |
30,030 | public static DescribeBizTypeImageLibResponse unmarshall(DescribeBizTypeImageLibResponse describeBizTypeImageLibResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeBizTypeImageLibResponse.setRequestId(_ctx.stringValue("DescribeBizTypeImageLibResponse.RequestId"));<NEW_LINE>Black black = new Black();<NEW_LINE>List<Wh... | = new ArrayList<WhiteSelectedItem7>(); |
1,799,333 | public void run() {<NEW_LINE>String title = "About";<NEW_LINE>StringBuilder aboutString = new StringBuilder();<NEW_LINE>aboutString.append(TermuxUtils.getAppInfoMarkdownString(TermuxAPIActivity.this, TermuxUtils.AppInfoMode.TERMUX_AND_PLUGIN_PACKAGE));<NEW_LINE>aboutString.append("\n\n").append(AndroidUtils.getDeviceIn... | TermuxConstants.TERMUX_APP.TERMUX_SETTINGS_ACTIVITY_NAME, title); |
1,825,406 | private void initTagSpinner(boolean isNovel) {<NEW_LINE>String[] titles = isNovel ? PixivSearchParamUtil.TAG_MATCH_NAME_NOVEL : PixivSearchParamUtil.TAG_MATCH_NAME;<NEW_LINE>String[] values = isNovel ? PixivSearchParamUtil.TAG_MATCH_VALUE_NOVEL : PixivSearchParamUtil.TAG_MATCH_VALUE;<NEW_LINE>ArrayAdapter<String> tagAd... | .setValue(values[position]); |
466,779 | public void deleteById(String id) {<NEW_LINE>String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");<NEW_LINE>if (resourceGroupName == null) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException(String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroup... | format("The resource ID '%s' is not valid. Missing path segment 'sqlPools'.", id))); |
1,110,358 | /* ------------------------------------------------------------------------ */<NEW_LINE>@SuppressWarnings("unchecked")<NEW_LINE>public static Permission extractPermission(String permText) {<NEW_LINE>StreamTokenizer tokens = new StreamTokenizer(new StringReader(permText));<NEW_LINE>String className = null;<NEW_LINE>Stri... | String.class, String.class); |
1,079,980 | private void validateStreamingTargetRel(Shape container, Shape target, Relationship rel, List<ValidationEvent> events) {<NEW_LINE>if (rel.getRelationshipType().getDirection() == RelationshipDirection.DIRECTED) {<NEW_LINE>switch(rel.getRelationshipType()) {<NEW_LINE>case INPUT:<NEW_LINE>break;<NEW_LINE>case OUTPUT:<NEW_... | container.getId()))); |
56,808 | final DefineIndexFieldResult executeDefineIndexField(DefineIndexFieldRequest defineIndexFieldRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(defineIndexFieldRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEv... | endClientExecution(awsRequestMetrics, request, response); |
1,471,914 | private void calculate() {<NEW_LINE>categories.put(CategoryType.INITIAL_VALUE, new Category(// $NON-NLS-1$<NEW_LINE>String.// $NON-NLS-1$<NEW_LINE>format(// $NON-NLS-1$<NEW_LINE>Messages.ColumnInitialValue, // $NON-NLS-1$<NEW_LINE>Values.Date.format(snapshotStart.getTime())), "", snapshotStart.getMonetaryAssets()));<NE... | .ColumnEarnings, "+", zero)); |
1,623,823 | public String longestPalindrome(String s) {<NEW_LINE>int strLength = s.length();<NEW_LINE>if (strLength < 2) {<NEW_LINE>return s;<NEW_LINE>}<NEW_LINE>int resultLength = 0;<NEW_LINE>String result = "";<NEW_LINE>for (int i = 0; i < s.length(); i++) {<NEW_LINE>// Odd length<NEW_LINE><MASK><NEW_LINE>while (left >= 0 && rig... | int left = i, right = i; |
1,302,728 | private <T> T deserializeManagementResponse(Message message, Class<T> deserializedType) {<NEW_LINE>if (!(message.getBody() instanceof AmqpValue)) {<NEW_LINE>throw LOGGER.logExceptionAsError(new IllegalArgumentException("Expected message.getBody() to be AmqpValue, but is: " + message.getBody()));<NEW_LINE>}<NEW_LINE>fin... | return (T) toPartitionProperties(amqpBody); |
239,083 | private static void enterMethod(JoinPoint joinPoint) {<NEW_LINE>if (!enabled)<NEW_LINE>return;<NEW_LINE>CodeSignature codeSignature = (CodeSignature) joinPoint.getSignature();<NEW_LINE>Class<?> cls = codeSignature.getDeclaringType();<NEW_LINE>String methodName = codeSignature.getName();<NEW_LINE>String[] parameterNames... | ] parameterValues = joinPoint.getArgs(); |
1,363,246 | public void createBindings() {<NEW_LINE>super.createBindings();<NEW_LINE>IntegerConverter intConverter = new IntegerConverter();<NEW_LINE>LengthConverter lengthConverter = new LengthConverter();<NEW_LINE>MutableLocationProxy scanStartLocation = new MutableLocationProxy();<NEW_LINE>bind(UpdateStrategy.READ_WRITE, feeder... | "lengthX", endX, "text", lengthConverter); |
483,084 | public TaskExecutionInformation findTaskExecutionInformation(String taskName, Map<String, String> taskDeploymentProperties, boolean addDatabaseCredentials, Map<String, String> previousTaskDeploymentProperties) {<NEW_LINE>Assert.hasText(taskName, "The provided taskName must not be null or empty.");<NEW_LINE>Assert.notNu... | getRegisteredAppName(), ApplicationType.task); |
1,099,264 | protected void returnStorageCapacityToHostByResourceUuid(String resUuid) {<NEW_LINE>String sql = "select href, rref" + " from LocalStorageHostRefVO href, LocalStorageResourceRefVO rref" + " where href.hostUuid = rref.hostUuid" + " and href.primaryStorageUuid = rref.primaryStorageUuid" + " and rref.resourceUuid = :resUu... | q.setParameter("resUuid", resUuid); |
556,647 | private Mono<PagedResponse<DataCollectionRuleResourceInner>> listSinglePageAsync() {<NEW_LINE>if (this.client.getEndpoint() == null) {<NEW_LINE>return Mono.<MASK><NEW_LINE>}<NEW_LINE>if (this.client.getSubscriptionId() == null) {<NEW_LINE>return Mono.error(new IllegalArgumentException("Parameter this.client.getSubscrip... | error(new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); |
1,733,220 | private LLVMValueRef buildLoadObjectFromUntrackedPointerFunction(boolean compressed) {<NEW_LINE>String funcName = compressed ? LOAD_COMPRESSED_OBJECT_FROM_UNTRACKED_POINTER_FUNCTION_NAME : LOAD_OBJECT_FROM_UNTRACKED_POINTER_FUNCTION_NAME;<NEW_LINE>LLVMValueRef func = builder.addFunction(funcName, builder.functionType(b... | , builder.rawPointerType())); |
139,482 | private static void runAssertionSingleMaxSimple(RegressionEnvironment env, SupportConditionHandlerFactory.SupportConditionHandler handler) {<NEW_LINE>String[] fields = new String[] { "a", "b" };<NEW_LINE>env.sendEventBean(new SupportBean_A("A1"));<NEW_LINE>env.sendEventBean(new SupportBean_A("A2"));<NEW_LINE>handler.ge... | handler.getContexts(), 2); |
215,820 | public void run() {<NEW_LINE><MASK><NEW_LINE>long totalMem = rt.totalMemory();<NEW_LINE>long maxMem = rt.maxMemory();<NEW_LINE>long freeMem = rt.freeMemory();<NEW_LINE>long usedMem = totalMem - freeMem;<NEW_LINE>double megs = 1024.0 * 1024;<NEW_LINE>MEM_TOTAL.put(U.time(), totalMem / megs);<NEW_LINE>MEM_USED.put(U.time... | Runtime rt = Runtime.getRuntime(); |
358,506 | public static void pack(File sourceDir, OutputStream os, NameMapper mapper, int compressionLevel) {<NEW_LINE>log.debug("Compressing '{}' into a stream.", sourceDir);<NEW_LINE>if (!sourceDir.exists()) {<NEW_LINE>throw new ZipException("Given file '" + sourceDir + "' doesn't exist!");<NEW_LINE>}<NEW_LINE>ZipOutputStream ... | ZipOutputStream(new BufferedOutputStream(os)); |
1,608,162 | protected DataViewComponent createComponent() {<NEW_LINE>final MasterViewSupport masterViewSupport = new MasterViewSupport(model);<NEW_LINE>DataViewComponent dvc = new DataViewComponent(masterViewSupport.getMasterView(), new DataViewComponent.MasterViewConfiguration(false));<NEW_LINE>final CpuViewSupport cpuViewSupport... | ? new PermGenViewSupport(model) : null; |
937,244 | private void initListener() {<NEW_LINE>ITUINotification notification = new ITUINotification() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void onNotifyEvent(String key, String subKey, Map<String, Object> param) {<NEW_LINE>if (TUIConstants.TUILogin.EVENT_LOGIN_STATE_CHANGED.equals(key) && TUIConstants.TUILogin.EVENT_... | (R.string.trtccalling_user_sig_expired)); |
917,599 | private CompletableFuture<Void> closeResources() {<NEW_LINE>List<CompletionStage<Void>> closeFutures = new ArrayList<>();<NEW_LINE>List<Closeable> closeableResources = new ArrayList<>(this.closeableResources);<NEW_LINE>for (Closeable closeableResource : closeableResources) {<NEW_LINE>if (closeableResource instanceof As... | this.closeableResources.remove(closeableResource); |
336,240 | private static JPanel createLinePanel(String name, JTextField lineTextField, JComboBox linePlacementCombo, JComboBox lineAlignmentCombo) {<NEW_LINE>JPanel panel = new JPanel();<NEW_LINE>panel.setBorder(IdeBorderFactory.createTitledBorder(name, true));<NEW_LINE>panel.setLayout(new GridBagLayout());<NEW_LINE>GridBagConst... | panel.add(lineTextField, gbConstraints); |
797,198 | protected void handleSplitBrainProtectionNode(Node node, SplitBrainProtectionConfig splitBrainProtectionConfig, String name) {<NEW_LINE>Node attrEnabled = getNamedItemNode(node, "enabled");<NEW_LINE>boolean enabled = attrEnabled != null && getBooleanValue(getTextContent(attrEnabled));<NEW_LINE>// probabilistic-split-br... | setProtectOn(splitBrainProtectionConfig.getProtectOn()); |
423,634 | private static SchemaKTable<?> buildTable(final PlanBuildContext buildContext, final DataSource dataSource, final Stacker contextStacker) {<NEW_LINE>final KeyFormat keyFormat = dataSource.getKsqlTopic().getKeyFormat();<NEW_LINE>if (keyFormat.isWindowed()) {<NEW_LINE>throw new IllegalArgumentException("windowed");<NEW_L... | ).getKeyFormat(), step); |
98,907 | public CreateNatGatewayResult unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>CreateNatGatewayResult createNatGatewayResult = new CreateNatGatewayResult();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument... | ().unmarshall(context)); |
1,410,837 | private Hover provideHover(LiveBean definedBean, ASTNode declarationNode, int offset, TextDocument doc, IJavaProject project, SpringProcessLiveData[] processLiveData) {<NEW_LINE>if (definedBean != null) {<NEW_LINE>StringBuilder hover = new StringBuilder();<NEW_LINE>for (SpringProcessLiveData liveData : processLiveData)... | project, declarationNode, liveData, definedBean); |
221,981 | private void addRepresentation(Response response, RestMethod restMethod, Representation representation) {<NEW_LINE>representation = resolveRepresentation(representation);<NEW_LINE>List<Long> status = null;<NEW_LINE>if (isWADL11) {<NEW_LINE>status = response.getStatus();<NEW_LINE>} else {<NEW_LINE>Node n = representatio... | getAttributes().getNamedItem("status"); |
831,995 | public void execute(Transaction transaction) throws UserException, BimserverLockConflictException, BimserverDatabaseException, IOException, QueryException {<NEW_LINE>PackageMetaData packageMetaData = transaction.getDatabaseSession().getMetaDataManager().getPackageMetaData(transaction.getProject().getSchema());<NEW_LINE... | eClass.getName() + "\""); |
1,320,570 | public void drawRegisterClassic(InstancePainter painter) {<NEW_LINE>Graphics g = painter.getGraphics();<NEW_LINE>Bounds bds = painter.getBounds();<NEW_LINE>RegisterData state = (RegisterData) painter.getData();<NEW_LINE>BitWidth widthVal = painter.getAttributeValue(StdAttr.WIDTH);<NEW_LINE>int width = widthVal == null ... | g.setColor(Color.GRAY); |
1,072,742 | public void onCreate(Bundle savedInstanceState) {<NEW_LINE>super.onCreate(savedInstanceState);<NEW_LINE>mContext = getActivity();<NEW_LINE>// Themes are 'pre-compiled' in themes-list: get all values<NEW_LINE>// and append them to our newly created PreferenceScreen<NEW_LINE>PreferenceScreen screen = getPreferenceManager... | getStringArray(R.array.theme_ids); |
1,723,647 | public static void init(PinotConfiguration uploaderConfig) {<NEW_LINE>PinotConfiguration httpsConfig = uploaderConfig.subset(HTTPS_PROTOCOL);<NEW_LINE>// NOTE: legacy https config for segment upload is deprecated. If you're relying on these settings, please consider<NEW_LINE>// moving to server-wide TLS configs instead... | .PREFIX_OF_SSL_SUBSET)).generate(); |
130,588 | public static void walkSubselectAndDeclaredDotExpr(StatementSpecRaw spec, ExprNodeSubselectDeclaredDotVisitor visitor) throws ExprValidationException {<NEW_LINE>// Look for expressions with sub-selects in select expression list and filter expression<NEW_LINE>// Recursively compile the statement within the statement.<NE... | getHavingClause().accept(visitor); |
1,415,191 | public boolean isPyFileInLanguageHome(TruffleFile path) {<NEW_LINE>assert !ImageInfo.inImageBuildtimeCode() : "language home won't be available during image build time";<NEW_LINE>String languageHome <MASK><NEW_LINE>// The language home may be 'null' if an embedder uses Python. In this case, IO must just be<NEW_LINE>// ... | = getLanguage().getHome(); |
1,705,550 | public void testAllOf_ExceptionalResult() throws Exception {<NEW_LINE>// Managed completable future with non-null result:<NEW_LINE>CompletableFuture<Object> cf1 = defaultManagedExecutor.supplyAsync(() -> {<NEW_LINE>System.out.println("> supply from testAllOf_ExceptionalResult");<NEW_LINE>System.out.println("< supply Ar... | assertTrue(cf1.isDone()); |
191,916 | public AutorouteEngine.AutorouteResult fanout(Pin p_pin, app.freerouting.interactive.Settings p_settings, int p_ripup_costs, Stoppable p_stoppable_thread, TimeLimit p_time_limit) {<NEW_LINE>if (p_pin.first_layer() != p_pin.last_layer() || p_pin.net_count() != 1) {<NEW_LINE>return AutorouteEngine.AutorouteResult.ALREADY... | AutorouteControl(this, pin_net_no, p_settings); |
100,550 | public static Instruction createDeclareQword(byte[] data, int index, int length) {<NEW_LINE>if (data == null)<NEW_LINE>throw new NullPointerException("data");<NEW_LINE>if (Integer.compareUnsigned(length - 1, 16 - 1) > 0 || (length & 7) != 0)<NEW_LINE>throw new IllegalArgumentException("length");<NEW_LINE>if (Long.compa... | instruction.setDeclareDataCount(length / 8); |
1,600,406 | public ModelRepresentation importNewVersion(String modelId, String fileName, InputStream modelStream) {<NEW_LINE>Model processModel = getModel(modelId);<NEW_LINE>String currentUserId = SecurityUtils.getCurrentUserId();<NEW_LINE>if (fileName != null && (fileName.endsWith(".bpmn") || fileName.endsWith(".bpmn20.xml"))) {<... | throw new BadRequestException("Invalid file name, only .bpmn and .bpmn20.xml files are supported not " + fileName); |
1,167,319 | public void after(Object target, Object[] args, Object result, Throwable throwable) {<NEW_LINE>if (isDebug) {<NEW_LINE>logger.afterInterceptor(target, args, result, throwable);<NEW_LINE>}<NEW_LINE>final String url = toUrl(args);<NEW_LINE>final <MASK><NEW_LINE>jdbcContext.parseJdbcUrl(PostgreSqlConstants.POSTGRESQL, url... | JdbcContext jdbcContext = traceContext.getJdbcContext(); |
761,894 | private void showConfirmLogoutDialog() {<NEW_LINE>MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(context);<NEW_LINE>DialogInterface.OnClickListener dialogClickListener = (dialog, which) -> {<NEW_LINE>switch(which) {<NEW_LINE>case DialogInterface.BUTTON_POSITIVE:<NEW_LINE>backToLoginForm();<NEW_LINE... | megaApi.localLogout(LoginFragment.this); |
1,115,786 | private FacetResult drillDown() throws IOException {<NEW_LINE>DirectoryReader <MASK><NEW_LINE>IndexSearcher searcher = new IndexSearcher(indexReader);<NEW_LINE>TaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir);<NEW_LINE>// Passing no baseQuery means we drill down on all<NEW_LINE>// documents ("browse onl... | indexReader = DirectoryReader.open(indexDir); |
226,283 | public Iterable<DirectedEdge> shortestPathInGridOnlyRightOrDown(double[][] matrix) {<NEW_LINE>EdgeWeightedDigraph edgeWeightedDigraph = new EdgeWeightedDigraph(matrix.length * matrix[0].length);<NEW_LINE>for (int row = 0; row < matrix.length; row++) {<NEW_LINE>for (int column = 0; column < matrix[0].length; column++) {... | .length * matrix.length - 1; |
613,608 | public Expression combine(Expression left, Expression right) {<NEW_LINE>if (!(left instanceof Call)) {<NEW_LINE>// regular and<NEW_LINE>return and().combine(left, right);<NEW_LINE>}<NEW_LINE>Call root = (Call) left;<NEW_LINE>if (root.operator() == Operators.OR) {<NEW_LINE>// change right-most child<NEW_LINE>// a.is(1)<... | collect(Collectors.toList()); |
429,871 | ActionResult<Wo> execute(EffectivePerson effectivePerson, String id, JsonElement jsonElement) throws Exception {<NEW_LINE>try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {<NEW_LINE>ActionResult<Wo> result = new ActionResult<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.... | Business business = new Business(emc); |
1,495,176 | public void releaseConnection(RouteResultsetNode rrn, boolean debug, final boolean needRollback) {<NEW_LINE>BackendConnection c = target.remove(rrn);<NEW_LINE>if (c != null) {<NEW_LINE>if (debug) {<NEW_LINE>// LOGGER.debug("release connection " + c);<NEW_LINE>String sql = rrn.getStatement();<NEW_LINE>if (sql != null) {... | sql.replaceAll("[\r\n]+", ""); |
981,728 | public void fill() throws JRException {<NEW_LINE>long start = System.currentTimeMillis();<NEW_LINE>Map<String, Object> params = new HashMap<String, Object>();<NEW_LINE>Document document = JRXmlUtils.parse(JRLoader.getLocationInputStream("data/northwind.xml"));<NEW_LINE>params.put(JRXPathQueryExecuterFactory.PARAMETER_X... | put(JRXPathQueryExecuterFactory.XML_DATE_PATTERN, "yyyy-MM-dd"); |
1,596,716 | public void exportDatabase(@ConsoleParameter(name = "options", description = "Export options") String iText) throws IOException {<NEW_LINE>checkForDatabase();<NEW_LINE>final List<String> items = OStringSerializerHelper.smartSplit(iText, ' ');<NEW_LINE>final String fileName = items.size() <= 1 || items.get(1).charAt(0) ... | g.shutdown(false, true); |
983,806 | public static void main(String[] args) {<NEW_LINE>Scanner scan = new Scanner(System.in);<NEW_LINE>System.out.print("Enter the target sum ");<NEW_LINE>int ts = scan.nextInt();<NEW_LINE>System.out.print("Enter the number of elements in the array ");<NEW_LINE>int n = scan.nextInt();<NEW_LINE>System.out.println("Enter all ... | arr, ts)) + "\n"); |
144,054 | public com.amazonaws.services.timestreamquery.model.ValidationException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.timestreamquery.model.ValidationException validationException = new com.amazonaws.services.timestreamquery.model.ValidationException(null);<NE... | int originalDepth = context.getCurrentDepth(); |
518,647 | public static void showHtmlDescriptionDialog(Context ctx, OsmandApplication app, String html, String title) {<NEW_LINE>final WebViewEx webView = new WebViewEx(ctx);<NEW_LINE>LinearLayout.LayoutParams llTextParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);<... | webView.setBackgroundColor(Color.TRANSPARENT); |
831,130 | void tryMinimizeSwitchCaseExits(Node n, Token exitType, @Nullable String labelName) {<NEW_LINE>checkState(NodeUtil.isSwitchCase(n));<NEW_LINE>checkState(n != n.getParent().getLastChild());<NEW_LINE>Node block = n.getLastChild();<NEW_LINE><MASK><NEW_LINE>if (maybeBreak == null || !maybeBreak.isBreak() || maybeBreak.hasC... | Node maybeBreak = block.getLastChild(); |
711,244 | private void showRemoteRotateMenu() {<NEW_LINE>PopupMenu popupMenu = new PopupMenu(this, mLLRemoteRotate, Gravity.TOP);<NEW_LINE>popupMenu.getMenuInflater().inflate(R.menu.<MASK><NEW_LINE>popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public boolean ... | renderparams_rotate, popupMenu.getMenu()); |
696,358 | // note: we are not calling this method during the project startup - it is called anyway by f.e the GitRootTracker<NEW_LINE>private void checkAndUpdateRepositoriesCollection(@Nullable VirtualFile checkedRoot) {<NEW_LINE>Map<VirtualFile, Repository> repositories;<NEW_LINE>try {<NEW_LINE>MODIFY_LOCK.lock();<NEW_LINE>try ... | .writeLock().lock(); |
863,318 | private void updateUi(Playable media) {<NEW_LINE>if (media == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>((MainActivity) getActivity()).setPlayerVisible(true);<NEW_LINE>txtvTitle.setText(media.getEpisodeTitle());<NEW_LINE>feedName.setText(media.getFeedTitle());<NEW_LINE>onPositionObserverUpdate(new PlaybackPositionEv... | (options).into(imgvCover); |
1,830,389 | public Outcome<VirtualMachine> migrateVmStorageThroughJobQueue(final String vmUuid, final Map<Long, Long> volumeToPool) {<NEW_LINE>Collection<Long> poolIds = volumeToPool.values();<NEW_LINE>Set<Long> uniquePoolIds = new HashSet<>(poolIds);<NEW_LINE>for (Long poolId : uniquePoolIds) {<NEW_LINE>StoragePoolVO pool = _stor... | VmWorkJobVO workJob = pendingWorkJob.first(); |
536,381 | static public ColorMode fromString(String context, String mode) {<NEW_LINE>try {<NEW_LINE>String[] elements = mode.split(",");<NEW_LINE>// determine the type of the color mode<NEW_LINE>int type = RGB;<NEW_LINE>if (elements[0].trim().equals("HSB")) {<NEW_LINE>type = HSB;<NEW_LINE>}<NEW_LINE>if (elements.length == 1) {<N... | [4].trim()); |
494,830 | protected void taskOperation(ForecastJobAction.Request request, JobTask task, ActionListener<ForecastJobAction.Response> listener) {<NEW_LINE>jobManager.getJob(task.getJobId(), ActionListener.wrap(job -> {<NEW_LINE>validate(job, request);<NEW_LINE>ForecastParams.<MASK><NEW_LINE>if (request.getDuration() != null) {<NEW_... | Builder paramsBuilder = ForecastParams.builder(); |
984,538 | private boolean upgradeOldExtRefAdapter(TaskMonitor monitor) throws IOException, CancelledException {<NEW_LINE>if (oldNameAdapter == null || oldExtRefAdapter == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>monitor.setMessage("Processing Old External Names...");<NEW_LINE>monitor.initialize(oldNameAdapter.getRecord... | rec.getBooleanValue(OldExtRefAdapter.USER_DEFINED_COL); |
1,356,796 | public static ListBaseRolesByRoleResponse unmarshall(ListBaseRolesByRoleResponse listBaseRolesByRoleResponse, UnmarshallerContext _ctx) {<NEW_LINE>listBaseRolesByRoleResponse.setCode(_ctx.stringValue("ListBaseRolesByRoleResponse.Code"));<NEW_LINE>listBaseRolesByRoleResponse.setMessage(_ctx.stringValue("ListBaseRolesByR... | ("ListBaseRolesByRoleResponse.Data[" + i + "].Description")); |
1,151,022 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>jPanel1 = new javax.swing.JPanel();<NEW_LINE>jLabel1 = new javax.swing.JLabel();<NEW_LINE>userAgentInput = new javax.swing.JTextField();<NEW_LINE>jLabel2 = new javax.swing.JLabel()... | javax.swing.WindowConstants.DISPOSE_ON_CLOSE); |
942,774 | private static // --------------//<NEW_LINE>ByteProcessor createBuffer(BufferedImage img) {<NEW_LINE>DataBuffer dataBuffer = img<MASK><NEW_LINE>ByteProcessor buf = new ByteProcessor(img.getWidth(), img.getHeight());<NEW_LINE>for (int y = 0, h = img.getHeight(); y < h; y++) {<NEW_LINE>for (int x = 0, w = img.getWidth();... | .getData().getDataBuffer(); |
1,304,307 | private BIROperand generateNamespaceRef(BXMLNSSymbol nsSymbol, Location pos) {<NEW_LINE>if (nsSymbol == null) {<NEW_LINE>return generateStringLiteral(null);<NEW_LINE>}<NEW_LINE>// global-level, object-level, record-level namespace declarations will not have<NEW_LINE>// any interpolated content. hence the namespace URI ... | int ownerTag = nsSymbol.owner.tag; |
1,078,900 | public static void parseDiffPatchInfo(String meta, ArrayList<ShareArkHotDiffPatchInfo> diffList) {<NEW_LINE>if (meta == null || diffList == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>String[] lines = meta.split("\n");<NEW_LINE>for (final String line : lines) {<NEW_LINE>if (line == null || line.length() <= 0) {<NEW_LI... | kv[2].trim(); |
1,292,093 | public Object calculate(Context ctx) {<NEW_LINE>if (param == null) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQException("memory" + mm.getMessage("function.missingParam"));<NEW_LINE>} else if (param.getSubSize() != 2) {<NEW_LINE>MessageManager mm = EngineMessage.get();<NEW_LINE>throw new RQ... | getLeafExpression().calculate(ctx); |
1,068,684 | private TreeNode createReferenceModel(Set<DependencyNode> nds, CheckNode trans) {<NEW_LINE>DefaultMutableTreeNode root = new DefaultMutableTreeNode(null, true);<NEW_LINE>ChangeListener list = new Listener();<NEW_LINE>List<CheckNode> s <MASK><NEW_LINE>// NOI18N<NEW_LINE>Icon icn = ImageUtilities.image2Icon(ImageUtilitie... | = new ArrayList<CheckNode>(); |
1,135,104 | private void initTable(Composite control) {<NEW_LINE>if (tv == null) {<NEW_LINE>tv = TableViewFactory.createTableViewSWT(TagDiscovery.class, TABLE_TAGDISCOVERY, TABLE_TAGDISCOVERY, new TableColumnCore[0], ColumnTagName.COLUMN_ID, SWT.MULTI | <MASK><NEW_LINE>SWTSkinObjectTextbox soFilter = (SWTSkinObjectTextbox) getSkin... | SWT.FULL_SELECTION | SWT.VIRTUAL); |
211,073 | protected void checkIfGraphIsEmpty(final RoutingContext ctx, boolean allowDirection, boolean reverseWaySearch, PriorityQueue<RouteSegment> graphSegments, RouteSegmentPoint pnt, TLongObjectHashMap<RouteSegment> visited, String msg) {<NEW_LINE>if (allowDirection && graphSegments.isEmpty()) {<NEW_LINE>if (pnt.others != nu... | RouteSegmentPoint next = pntIterator.next(); |
85,066 | public static ListAppCmsGroupsResponse unmarshall(ListAppCmsGroupsResponse listAppCmsGroupsResponse, UnmarshallerContext _ctx) {<NEW_LINE>listAppCmsGroupsResponse.setRequestId(_ctx.stringValue("ListAppCmsGroupsResponse.RequestId"));<NEW_LINE>listAppCmsGroupsResponse.setCode(_ctx.integerValue("ListAppCmsGroupsResponse.C... | (_ctx.integerValue("ListAppCmsGroupsResponse.PageNumber")); |
553,728 | protected void validate1(OBODoc doc, List<String> danglingReferences, Frame f, String tag, @Nullable OboFormatTag tagConstant, @Nullable Clause c) {<NEW_LINE>if (c != null) {<NEW_LINE>if (OboFormatTag.TYPEDEF_FRAMES.contains(tagConstant)) {<NEW_LINE>String error = checkRelation(c.getValue(String.class), tag, f.getId(),... | f.getId(), doc); |
1,002,760 | public <T> void visitCtParameter(CtParameter<T> parameter) {<NEW_LINE>elementPrinterHelper.writeComment(parameter);<NEW_LINE>elementPrinterHelper.writeAnnotations(parameter);<NEW_LINE>elementPrinterHelper.writeModifiers(parameter);<NEW_LINE>if (parameter.isVarArgs()) {<NEW_LINE>scan(((CtArrayTypeReference<T>) parameter... | writeIdentifier(parameter.getSimpleName()); |
629,607 | private static List<WindowHandler> createWindowHandlers() {<NEW_LINE>List<WindowHandler> windowHandlers = new ArrayList<WindowHandler>();<NEW_LINE>windowHandlers.add(new AcceptIncomingConnectionDialogHandler());<NEW_LINE>windowHandlers.add(new BlindTradingWarningDialogHandler());<NEW_LINE>windowHandlers.add(new ExitSes... | .add(new BidAskLastSizeDisplayUpdateDialogHandler()); |
1,248,922 | protected ByteBuffer control(EPID pid, int command, ByteBuffer cmd) throws Pausable {<NEW_LINE>if (command == CTRL_OP_GET_WINSIZE) {<NEW_LINE>ByteBuffer rep = ByteBuffer.allocate(8);<NEW_LINE>rep.<MASK><NEW_LINE>rep.putInt(80);<NEW_LINE>rep.putInt(25);<NEW_LINE>return rep;<NEW_LINE>} else if (command == CTRL_OP_GET_UNI... | order(ByteOrder.nativeOrder()); |
194,359 | boolean reusableFor(LockRequest request) {<NEW_LINE>if (taskLock.getType() == request.getType() && taskLock.getGranularity() == request.getGranularity()) {<NEW_LINE>switch(taskLock.getType()) {<NEW_LINE>case SHARED:<NEW_LINE>if (request instanceof TimeChunkLockRequest) {<NEW_LINE>return taskLock.getInterval().contains(... | equals(request.getGroupId()); |
1,090,070 | public GenericTableIndex configureObject(DBRProgressMonitor monitor, Object table, GenericTableIndex index, Map<String, Object> options) {<NEW_LINE>GenericTableBase tableBase = (GenericTableBase) table;<NEW_LINE>boolean supportUniqueIndexes = tableBase.supportUniqueIndexes();<NEW_LINE>Collection<DBSIndexType> tableInde... | (tableColumn.getName())); |
222,007 | public void drawFaster(byte[] screen, int width, int x1, int x2, int y) {<NEW_LINE>int pos1 = y * width + x1;<NEW_LINE>int pos2 = y * width + x2;<NEW_LINE>int row1 = pos1 / 8;<NEW_LINE>int col1 = pos1 % 8;<NEW_LINE>int row2 = pos2 / 8;<NEW_LINE>int col2 = pos2 % 8;<NEW_LINE>int mask = ~(<MASK><NEW_LINE>screen[row1] = (... | (1 << col1) - 1); |
479,453 | final DeleteObjectResult executeDeleteObject(DeleteObjectRequest deleteObjectRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteObjectRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.ClientExec... | HandlerContextKey.SIGNING_REGION, getSigningRegion()); |
161,422 | public static String toRedirectURL(final HttpServletRequest request, String location) {<NEW_LINE>if (!URIUtil.hasScheme(location)) {<NEW_LINE>StringBuilder url = new StringBuilder(128);<NEW_LINE>URIUtil.appendSchemeHostPort(url, request.getScheme(), request.getServerName(), request.getServerPort());<NEW_LINE>if (locati... | location = URIUtil.canonicalURI(location); |
470,610 | protected NioEventLoopGroup createEventLoopGroup(HttpClientConfiguration configuration, ThreadFactory threadFactory) {<NEW_LINE>OptionalInt numOfThreads = configuration.getNumOfThreads();<NEW_LINE>Optional<Class<? extends ThreadFactory><MASK><NEW_LINE>boolean hasThreads = numOfThreads.isPresent();<NEW_LINE>boolean hasF... | > threadFactoryType = configuration.getThreadFactory(); |
178,089 | public void prepare(Map stormConf) {<NEW_LINE>this.stormConf = stormConf;<NEW_LINE>int maxWorkers = Utils.getInt(stormConf.get(Config.STORM_MESSAGING_NETTY_CLIENT_WORKER_THREADS));<NEW_LINE>ThreadFactory bossFactory = new NettyRenameThreadFactory(MetricDef.NETTY_CLI + "boss");<NEW_LINE>ThreadFactory workerFactory = new... | .newCachedThreadPool(workerFactory), maxWorkers); |
860,278 | public ServiceResponse serviceImpl(Query call, HttpServletResponse response, Authorization rights, final JsonObjectWithDefault permissions) throws APIException {<NEW_LINE>JSONObject result = new JSONObject(true);<NEW_LINE>result.put("accepted", false);<NEW_LINE>result.put("message", "Error: Unable to reset Password");<... | getIdentity().getName()); |
572,546 | private void rollbackCurrentWritePosition() {<NEW_LINE>final <MASK><NEW_LINE>final int writePosIdx = _currentWritePosition.bufferIndex();<NEW_LINE>for (int i = 0; i < _buffers.length; ++i) {<NEW_LINE>final int realBufIdx = (tailIdx + i) % _buffers.length;<NEW_LINE>if (realBufIdx == tailIdx) {<NEW_LINE>if (realBufIdx ==... | int tailIdx = _tail.bufferIndex(); |
1,266,959 | final DeleteModelResult executeDeleteModel(DeleteModelRequest deleteModelRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deleteModelRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE><MASK><NEW_LINE>Request<DeleteModelRequest> reques... | awsRequestMetrics.startEvent(Field.ClientExecuteTime); |
1,447,165 | static Exception amqpResponseCodeToException(final int statusCode, final String statusDescription) {<NEW_LINE>final AmqpResponseCode amqpResponseCode = AmqpResponseCode.valueOf(statusCode);<NEW_LINE>if (amqpResponseCode == null) {<NEW_LINE>return new EventHubException(true, String.format(ClientConstants<MASK><NEW_LINE>... | .AMQP_REQUEST_FAILED_ERROR, statusCode, statusDescription)); |
1,682,359 | void openNextFile() throws NoMoreDataException, IOException {<NEW_LINE>close();<NEW_LINE>currPathType = null;<NEW_LINE>while (true) {<NEW_LINE>if (nextFile >= inputFiles.size()) {<NEW_LINE>// exhausted files, start a new round, unless forever set to false.<NEW_LINE>if (!forever) {<NEW_LINE>throw new NoMoreDataException... | currPathType = TrecDocParser.pathType(f); |
470,173 | public static GetQuotaHistoryInfoResponse unmarshall(GetQuotaHistoryInfoResponse getQuotaHistoryInfoResponse, UnmarshallerContext context) {<NEW_LINE>getQuotaHistoryInfoResponse.setRequestId(context.stringValue("GetQuotaHistoryInfoResponse.RequestId"));<NEW_LINE>getQuotaHistoryInfoResponse.setCode(context.integerValue(... | ("GetQuotaHistoryInfoResponse.Data[" + i + "].Point.CpuMinQuota.Max")); |
811,936 | final CompleteAttachmentUploadResult executeCompleteAttachmentUpload(CompleteAttachmentUploadRequest completeAttachmentUploadRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(completeAttachmentUploadRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetri... | (super.beforeMarshalling(completeAttachmentUploadRequest)); |
823,023 | private void visitVar(NodeTraversal t, Node n) {<NEW_LINE>// Handle var declarations in for-of loops separately from regular var declarations.<NEW_LINE>if (n.getParent().isForOf() || n.getParent().isForIn() || n.getParent().isForAwaitOf()) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>// TODO(nicksantos): Fix this so that the... | Node value = child.getSecondChild(); |
1,844,069 | public void marshall(UpdateReplicationGroupMemberAction updateReplicationGroupMemberAction, ProtocolMarshaller protocolMarshaller) {<NEW_LINE>if (updateReplicationGroupMemberAction == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>try {<NEW_LINE>protocolMa... | e.getMessage(), e); |
94,482 | protected URI parseValue(Object obj) throws ParameterException {<NEW_LINE>if (obj == null) {<NEW_LINE>throw new UnspecifiedParameterException(this);<NEW_LINE>}<NEW_LINE>if (obj instanceof URI) {<NEW_LINE>return (URI) obj;<NEW_LINE>}<NEW_LINE>if (obj instanceof URL) {<NEW_LINE>try {<NEW_LINE>return ((URL) obj).toURI();<... | URI u = new URI(str); |
279,159 | private void saveContainerStructures(ActionRequest req, Container currentContainer, Container container) throws DotDataException, DotSecurityException {<NEW_LINE>List<ContainerStructure> oldContainerStructures = APILocator.getContainerAPI().getContainerStructures(currentContainer);<NEW_LINE>List<ContainerStructure> csL... | structuresIds = structuresIdsStr.split("#"); |
408,845 | public Node visit(final ClassOrInterfaceDeclaration n, final A arg) {<NEW_LINE>final List<AnnotationExpr> annotations = n.getAnnotations();<NEW_LINE>if (annotations != null) {<NEW_LINE>for (int i = 0; i < annotations.size(); i++) {<NEW_LINE>annotations.set(i, (AnnotationExpr) annotations.get(i).accept(this, arg));<NEW_... | > extendz = n.getExtends(); |
322,811 | public final PreparedStatement prepareStatement(String sql, int type, int concurrency) throws SQLException {<NEW_LINE>if (tc.isEntryEnabled())<NEW_LINE>Tr.entry(tc, "prepareStatement", new Object[] { this, sql, AdapterUtil.getResultSetTypeString(type), AdapterUtil.getConcurrencyModeString(concurrency) });<NEW_LINE>Prep... | prepareStatement(sql, type, concurrency); |
62,347 | private AuthenticationResult handleFormLogin(HttpServletRequest req, HttpServletResponse res, WebRequest webRequest) {<NEW_LINE>AuthenticationResult authResult = null;<NEW_LINE>authResult = ssoAuthenticator.authenticate(webRequest);<NEW_LINE>if (authResult != null) {<NEW_LINE>authResult.setAuditCredType(AuditEvent.CRED... | FAILURE, e.getLocalizedMessage()); |
721,929 | public static UPBMessage fromString(String commandString) {<NEW_LINE>UPBMessage command = new UPBMessage();<NEW_LINE>String typeString = commandString.substring(0, 2);<NEW_LINE>Type type = Type.NONE;<NEW_LINE>if (typeMap.containsKey(typeString)) {<NEW_LINE>type = typeMap.get(typeString);<NEW_LINE>}<NEW_LINE>command.set... | = data[index++] & 0xFF; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.