idx int32 46 1.86M | input stringlengths 321 6.6k | target stringlengths 9 1.24k |
|---|---|---|
1,702,813 | public static void expandTemplate(@Nonnull String key, @Nonnull CustomTemplateCallback callback, @Nonnull Editor editor, @Nonnull PostfixTemplateProvider provider, @Nonnull PostfixTemplate postfixTemplate) {<NEW_LINE>ApplicationManager.getApplication().assertIsDispatchThread();<NEW_LINE>FeatureUsageTracker.getInstance(... | .getContext().getContainingFile(); |
403,724 | public static byte[] shiftLeft(byte[] byteArray, int shiftBitCount) {<NEW_LINE>// Code taken from the Apache 2 licensed library<NEW_LINE>// https://github.com/patrickfav/bytes-java/blob/master/src/main/java/at/favre/lib/bytes/Util.java<NEW_LINE>final int shiftMod = shiftBitCount % 8;<NEW_LINE>final byte carryMask = (by... | int offsetBytes = (shiftBitCount / 8); |
1,346,273 | private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents<NEW_LINE>void initComponents() {<NEW_LINE>customizer = new javax.swing.JPanel();<NEW_LINE>resizingCheckBox = new javax.swing.JCheckBox();<NEW_LINE>reorderingCheckBox = new javax.swing.JCheckBox();<NEW_LINE>FormListener for... | , 0, 0, 0)); |
121,567 | protected DBTraceInstruction doCreate(Range<Long> lifespan, Address address, InstructionPrototype prototype, ProcessorContextView context) throws CodeUnitInsertionException, AddressOverflowException {<NEW_LINE>Address endAddress = address.addNoWrap(prototype.getLength() - 1);<NEW_LINE>AddressRangeImpl createdRange <MAS... | = new AddressRangeImpl(address, endAddress); |
126,197 | public static void main(String[] args) {<NEW_LINE>Scanner sc = new Scanner(System.in);<NEW_LINE>System.out.println("Input :");<NEW_LINE>System.out.println("Enter the row size");<NEW_LINE>int row = sc.nextInt();<NEW_LINE>System.out.println("Enter the column size");<NEW_LINE>int colmn = sc.nextInt();<NEW_LINE>int[][] spa... | System.out.println("rows columns values"); |
104,034 | private void initInputMethodHandling() {<NEW_LINE>if (Platform.isSupported(ConditionalFeature.INPUT_METHOD)) {<NEW_LINE>setOnInputMethodTextChanged<MASK><NEW_LINE>// Both of these have to be set for input composition to work !<NEW_LINE>setInputMethodRequests(new InputMethodRequests() {<NEW_LINE><NEW_LINE>@Override<NEW_... | (event -> handleInputMethodEvent(event)); |
561,647 | private Video createPinnedPlaylist(Video video) {<NEW_LINE>if (video == null || !video.hasPlaylist()) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>Video section = new Video();<NEW_LINE>section.itemType = video.itemType;<NEW_LINE>section.playlistId = video.playlistId;<NEW_LINE>section.playlistParams = video.playlistParam... | : isUserPlaylistItem ? null : video.title; |
242,721 | public UpdatePlaceIndexResult updatePlaceIndex(UpdatePlaceIndexRequest updatePlaceIndexRequest) throws AmazonServiceException, AmazonClientException {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(updatePlaceIndexRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsReque... | awsRequestMetrics.endEvent(Field.ClientExecuteTime); |
146,074 | protected QuantileResult expectedShortfall(double level, DoubleArray sample) {<NEW_LINE>ArgChecker.isTrue(level > 0, "Quantile should be above 0.");<NEW_LINE>ArgChecker.isTrue(level < 1, "Quantile should be below 1.");<NEW_LINE>int sampleSize = sampleCorrection(sample.size());<NEW_LINE>double fractionalIndex = level * ... | weights[i] += 0.5 * interval; |
896,154 | public void write(AwtImage image, ImageMetadata metadata, OutputStream out) throws IOException {<NEW_LINE>if (image.awt().getType() == BufferedImage.TYPE_INT_ARGB) {<NEW_LINE>ImageInfo imi = new ImageInfo(image.width, image.height, 8, true);<NEW_LINE>ar.com.hjg.pngj.PngWriter writer = new ar.com.hjg.pngj.PngWriter(out,... | )[j] = sample & 0xFF; |
640,995 | final DescribeModelPackagingJobResult executeDescribeModelPackagingJob(DescribeModelPackagingJobRequest describeModelPackagingJobRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(describeModelPackagingJobRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequest... | addHandlerContext(HandlerContextKey.OPERATION_NAME, "DescribeModelPackagingJob"); |
1,830,183 | public Request<DeleteAnalysisSchemeRequest> marshall(DeleteAnalysisSchemeRequest deleteAnalysisSchemeRequest) {<NEW_LINE>if (deleteAnalysisSchemeRequest == null) {<NEW_LINE>throw new SdkClientException("Invalid argument passed to marshall(...)");<NEW_LINE>}<NEW_LINE>Request<DeleteAnalysisSchemeRequest> request = new De... | (deleteAnalysisSchemeRequest.getDomainName())); |
113,193 | private void readField(BytesRef type, FieldInfo fieldInfo, StoredFieldVisitor visitor) throws IOException {<NEW_LINE>readLine();<NEW_LINE>assert StringHelper.startsWith(scratch.get(), VALUE);<NEW_LINE>if (type == TYPE_STRING) {<NEW_LINE>byte[] bytes = new byte[scratch.length() - VALUE.length];<NEW_LINE>System.arraycopy... | (scratchUTF16.toString())); |
1,194,816 | private static CurveNode curveFraCurveNode(String conventionStr, String timeStr, String label, QuoteId quoteId, double spread, CurveNodeDate date, CurveNodeDateOrder order) {<NEW_LINE>Matcher matcher = FRA_TIME_REGEX.matcher(timeStr.toUpperCase(Locale.ENGLISH));<NEW_LINE>if (!matcher.matches()) {<NEW_LINE>throw new Ill... | .group(1) + "M"); |
301,318 | protected void filterFeeds() {<NEW_LINE>final String repository;<NEW_LINE>if (repositorySelector.getSelectedIndex() > -1) {<NEW_LINE>repository = repositorySelector.getSelectedItem().toString();<NEW_LINE>} else {<NEW_LINE>repository = ALL;<NEW_LINE>}<NEW_LINE>final String author;<NEW_LINE>if (authorSelector.getSelected... | (repositoryIndex).equalsIgnoreCase(repository); |
1,013,780 | ActionResult<List<Wo>> execute(EffectivePerson effectivePerson, String workId, JsonElement jsonElement) throws Exception {<NEW_LINE>ActionResult<List<Wo>> result = new ActionResult<>();<NEW_LINE>List<Wo> wos = new ArrayList<>();<NEW_LINE>Wi wi = this.convertToWrapIn(jsonElement, Wi.class);<NEW_LINE>Work work = null;<NE... | effectivePerson, work, WoWorkControl.class); |
657,273 | void applyChanges() {<NEW_LINE>if (!initialized)<NEW_LINE>return;<NEW_LINE>String antHome = tfAntHome.getText().trim();<NEW_LINE>AntSettings.<MASK><NEW_LINE>if (AntSettings.getAutoCloseTabs() != cbReuseOutput.isSelected()) {<NEW_LINE>AntSettings.setAutoCloseTabs(cbReuseOutput.isSelected());<NEW_LINE>}<NEW_LINE>if (AntS... | setAntHome(new File(antHome)); |
888,540 | protected void handleMultiformPost(final HttpServletRequest req, final HttpServletResponse resp, final Map<String, Object> params, final Session session) throws ServletException, IOException {<NEW_LINE>// Looks like a duplicate, but this is a move away from the regular<NEW_LINE>// multiform post + redirect<NEW_LINE>// ... | this.writeJSON(resp, ret); |
1,689,448 | public void showDownloadControls(boolean needToShow) {<NEW_LINE>// 2 modes:<NEW_LINE>// - only message;<NEW_LINE>// - message + download controls and buttons<NEW_LINE>this.panelGlobal.setVisible(true);<NEW_LINE>// stop button only for loading mode<NEW_LINE>this.buttonStop.setVisible(!needToShow);<NEW_LINE>this.tabsList... | this.panelCommands.setVisible(needToShow); |
1,403,110 | public void run(RegressionEnvironment env) {<NEW_LINE>MyUnmatchedListener listener = new MyUnmatchedListener();<NEW_LINE>env.eventService().setUnmatchedListener(listener);<NEW_LINE>// create insert into<NEW_LINE>env.compileDeploy("@name('s0') insert into MyEvent select theString from SupportBean");<NEW_LINE>// no state... | getReceived().size()); |
983,137 | private ArrayList<LogChannel> collectChannels(long startingTxId, LogPosition minimalLogPosition, long minimalVersion, ClosedTransactionMetadata lastClosedTransaction) throws IOException {<NEW_LINE>var highestLogPosition = lastClosedTransaction.getLogPosition();<NEW_LINE>var highestTxId = lastClosedTransaction.getTransa... | var highestLogVersion = highestLogPosition.getLogVersion(); |
1,281,737 | private void filterData() {<NEW_LINE>if (filter != null) {<NEW_LINE>invokeInEDT(new Callable<Void>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public Void call() {<NEW_LINE>assert SwingUtilities.isEventDispatchThread();<NEW_LINE>final int oldSize = included.size();<NEW_LINE>final List<T> <MASK><NEW_LINE>for (T item : lis... | newIncluded = new ArrayList<>(); |
107,387 | public static boolean canAddTo(JMeterTreeNode parentNode, JMeterTreeNode[] nodes) {<NEW_LINE>if (parentNode == null || foundClass(nodes, new Class[] { TestPlan.class })) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>TestElement parent = parentNode.getTestElement();<NEW_LINE>// Force TestFragment to only be pastable unde... | Sampler.class, Controller.class); |
1,449,326 | public void onBlockPlace(BlockPlaceEvent event) {<NEW_LINE>if (event instanceof BlockMultiPlaceEvent)<NEW_LINE>return;<NEW_LINE>BlockState previousState = event.getBlockReplacedState();<NEW_LINE>// Some blocks, like tall grass and fire, get replaced<NEW_LINE>if (previousState.getType() != Material.AIR && previousState.... | , event.getBlock())); |
332,334 | void parseShape(Object3D parent, Element shape) throws XPathExpressionException {<NEW_LINE>Node node;<NEW_LINE>NodeList nodes;<NEW_LINE>XPathExpression expr;<NEW_LINE>XPath xpath = xPathfactory.newXPath();<NEW_LINE>expr = xpath.compile(".//*[@DEF]");<NEW_LINE>nodes = (NodeList) expr.evaluate(shape, XPathConstants.NODES... | expr = xpath.compile(".//*[@solid]"); |
1,513,071 | public static void deleteLocalInstructionComment(final SQLProvider provider, final INaviCodeNode codeNode, final INaviInstruction instruction, final Integer commentId, final Integer userId) throws CouldntDeleteException {<NEW_LINE>Preconditions.checkNotNull(codeNode, "IE02432: codeNode argument can not be null");<NEW_L... | Preconditions.checkNotNull(userId, "IE02436: userId argument can not be null"); |
1,290,331 | public ServiceRegistry unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>ServiceRegistry serviceRegistry = new ServiceRegistry();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentElement();<NEW_LINE>int targetDepth = originalDep... | class).unmarshall(context)); |
377,226 | private <T> void processProviders(Class<T> interfaceClass) {<NEW_LINE>Object providersFromJerseyConfig = clientBuilder.getConfiguration().getProperty(interfaceClass.getName() + CONFIG_PROVIDERS);<NEW_LINE>if (providersFromJerseyConfig instanceof String && !((String) providersFromJerseyConfig).isEmpty()) {<NEW_LINE>Stri... | USER : registerProvider.priority()); |
1,716,556 | private static Intent createActivityChooserIntent(Context context, Intent intent, Uri uri) {<NEW_LINE>final PackageManager pm = context.getPackageManager();<NEW_LINE>final List<ResolveInfo> activities = pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);<NEW_LINE>final ArrayList<Intent> chooserIntents ... | Intent.createChooser(lastIntent, null); |
283,636 | public void addDpdkPort(String bridgeName, String port, String vlan, DpdkHelper.VHostUserMode vHostUserMode, String dpdkOvsPath) {<NEW_LINE>String type = vHostUserMode == DpdkHelper.VHostUserMode.SERVER ? dpdkPortVhostUserType : dpdkPortVhostUserClientType;<NEW_LINE>StringBuilder stringBuilder = new StringBuilder();<NE... | String cmd = stringBuilder.toString(); |
577,392 | public RemediationActionWithOrder unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>RemediationActionWithOrder remediationActionWithOrder = new RemediationActionWithOrder();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LI... | String currentParentElement = context.getCurrentParentElement(); |
1,218,449 | private void showProfilerSnapshot(ActionEvent e) {<NEW_LINE>File tempFile = null;<NEW_LINE>try {<NEW_LINE>// NOI18N<NEW_LINE>tempFile = File.createTempFile("selfsampler", ".npss");<NEW_LINE><MASK><NEW_LINE>try (OutputStream os = new FileOutputStream(tempFile)) {<NEW_LINE>os.write(slownData.getNpsContent());<NEW_LINE>}<... | tempFile = FileUtil.normalizeFile(tempFile); |
801,743 | private Class<?> resolveGenericType(Node argument, String typeImage) {<NEW_LINE>List<ASTTypeParameter> types = new ArrayList<>();<NEW_LINE>// first search only within the same method<NEW_LINE>ASTClassOrInterfaceBodyDeclaration firstParentOfType = argument.getFirstParentOfType(ASTClassOrInterfaceBodyDeclaration.class);<... | .findDescendantsOfType(ASTTypeParameter.class)); |
1,468,812 | // ===<NEW_LINE>// Methods for: InitializingBean<NEW_LINE>// ===<NEW_LINE>@Override<NEW_LINE>public void afterPropertiesSet() {<NEW_LINE>Map<String, CustomConverter> contextCustomConvertersWithId = getApplicationContext().getBeansOfType(CustomConverter.class);<NEW_LINE>Map<String, BeanMappingBuilder> contextBeanMapping... | addAll(contextBeanMappingBuilders.values()); |
1,686,441 | private void initKnownContainers(Map<IJavaProject, Map<IPath, IClasspathContainer>> perProjectContainers, IProgressMonitor monitor) throws JavaModelException {<NEW_LINE>Iterator<Entry<IJavaProject, Map<IPath, IClasspathContainer>>> entriesIterator = perProjectContainers.entrySet().iterator();<NEW_LINE>List<SetContainer... | .entrySet().iterator(); |
26,625 | public boolean onTouch(View v, MotionEvent event) {<NEW_LINE>resetNoTouchTimer(getActionBar().isShowing() && mHudVisible == false);<NEW_LINE>mGesDetect.onTouchEvent(event);<NEW_LINE>// Pass the touch event to the native layer for camera control.<NEW_LINE>// Single touch to rotate the camera around the device.<NEW_LINE>... | getX(0) / mScreenSize.x; |
587,882 | public VpcPeeringConnectionStateReason unmarshall(StaxUnmarshallerContext context) throws Exception {<NEW_LINE>VpcPeeringConnectionStateReason vpcPeeringConnectionStateReason = new VpcPeeringConnectionStateReason();<NEW_LINE><MASK><NEW_LINE>int targetDepth = originalDepth + 1;<NEW_LINE>if (context.isStartOfDocument())<... | int originalDepth = context.getCurrentDepth(); |
399,232 | public static synchronized Note buildFromBase64EncodedData(String noteId, String base64FullNoteData) {<NEW_LINE>Note note = null;<NEW_LINE>if (base64FullNoteData == null) {<NEW_LINE>return null;<NEW_LINE>}<NEW_LINE>byte[] b64DecodedPayload = Base64.decode(base64FullNoteData, Base64.DEFAULT);<NEW_LINE>// Decompress the ... | JSONObject jsonObject = new JSONObject(out); |
1,033,604 | private WebfluxRouteElement[] extractAcceptTypes(MethodInvocation routerInvocation, TextDocument doc) {<NEW_LINE>WebfluxAcceptTypeFinder typeFinder = new WebfluxAcceptTypeFinder(doc);<NEW_LINE>List<?> arguments = routerInvocation.arguments();<NEW_LINE>for (Object argument : arguments) {<NEW_LINE>if (argument != null &&... | ) argument).accept(typeFinder); |
123,301 | public File prepareDownloadFile(Response response) throws IOException {<NEW_LINE>String filename = null;<NEW_LINE>String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition");<NEW_LINE>if (contentDisposition != null && !"".equals(contentDisposition)) {<NEW_LINE>// Get filename from the Con... | pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); |
191,498 | public void closeAllConsumersForReceiveExclusive() {<NEW_LINE>if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())<NEW_LINE>SibTr.entry(tc, "closeAllConsumersForReceiveExclusive");<NEW_LINE>Iterator<DispatchableKey> itr = null;<NEW_LINE>Iterator<DispatchableKey> clonedItr = null;<NEW_LINE>// The consumerPoi... | ), consumerKey.isSpecific()); |
922,158 | public void check(Field field, String value, JpaObject jpa, CheckPersist checkPersist, CheckPersistType checkPersistType) throws Exception {<NEW_LINE>if (Objects.equals(checkPersistType, CheckPersistType.all) || Objects.equals(checkPersistType, CheckPersistType.baseOnly)) {<NEW_LINE>this.allowEmpty(field, value, jpa, c... | value, jpa, checkPersist, checkPersistType); |
1,850,960 | protected void addGuiElements() {<NEW_LINE>super.addGuiElements();<NEW_LINE>addRenderableWidget(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75)).warning(WarningType.NOT_ENOUGH_ENERGY, tile.getWarningCheck(RecipeError.NOT_ENOUGH_ENERGY)).warning(WarningType.NOT_ENOUGH_ENERGY_REDUCED_RATE, tile.getWar... | (), tile::getActive)); |
404,616 | private void calculateConfig(ImageReader imageReader, DecodeFormat format, boolean isHardwareConfigAllowed, boolean isExifOrientationRequired, BitmapFactory.Options optionsWithScaling, int targetWidth, int targetHeight) {<NEW_LINE>if (hardwareConfigState.setHardwareConfigIfAllowed(targetWidth, targetHeight, optionsWith... | "Cannot determine whether the image has alpha or not from header" + ", format " + format, e); |
1,658,149 | Node<K, V> findNode(K key) {<NEW_LINE>java.lang.Comparable<K> object = comparator == null ? toComparable((K) key) : null;<NEW_LINE>K keyK = (K) key;<NEW_LINE>Node<K, V> node = root;<NEW_LINE>while (node != null) {<NEW_LINE><MASK><NEW_LINE>int left_idx = node.left_idx;<NEW_LINE>int result = cmp(object, keyK, keys[left_i... | K[] keys = node.keys; |
262,127 | public Future<T> parse(DataEmitter emitter) {<NEW_LINE>final String charset = emitter.charset();<NEW_LINE>return new ByteBufferListParser().parse(emitter).thenConvert(result -> {<NEW_LINE>JsonParser parser = new JsonParser();<NEW_LINE>ByteBufferListInputStream bis = new ByteBufferListInputStream(result);<NEW_LINE>Input... | = new InputStreamReader(bis, forcedCharset); |
1,682,522 | public static NamedComponentReference<? extends GlobalSimpleType> populateSimpleType(final Datatype d, final SchemaModel sm, final SchemaComponent st, SchemaGenerator.PrimitiveCart pc) {<NEW_LINE>NamedComponentReference ref = null;<NEW_LINE>if (!d.hasFacets()) {<NEW_LINE>if (d instanceof UnionType) {<NEW_LINE>Union u =... | createPrimitiveType(m, u, pc); |
975,426 | public com.amazonaws.services.forecast.model.ResourceAlreadyExistsException unmarshallFromContext(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>com.amazonaws.services.forecast.model.ResourceAlreadyExistsException resourceAlreadyExistsException = new com.amazonaws.services.forecast.model.ResourceAlreadyEx... | String currentParentElement = context.getCurrentParentElement(); |
718,486 | final DeletePartnerResult executeDeletePartner(DeletePartnerRequest deletePartnerRequest) {<NEW_LINE>ExecutionContext executionContext = createExecutionContext(deletePartnerRequest);<NEW_LINE>AWSRequestMetrics awsRequestMetrics = executionContext.getAwsRequestMetrics();<NEW_LINE>awsRequestMetrics.startEvent(Field.Clien... | (super.beforeMarshalling(deletePartnerRequest)); |
183,768 | private List<FacetResult> facetsWithSearch() throws IOException {<NEW_LINE>DirectoryReader indexReader = DirectoryReader.open(indexDir);<NEW_LINE>IndexSearcher searcher = new IndexSearcher(indexReader);<NEW_LINE><MASK><NEW_LINE>FacetsCollector fc = new FacetsCollector();<NEW_LINE>// MatchAllDocsQuery is for "browsing" ... | TaxonomyReader taxoReader = new DirectoryTaxonomyReader(taxoDir); |
1,754,214 | public ParameterSpecification create(ParameterSpecificationContext context) {<NEW_LINE>SimpleParameterSpecification simpleParameter = context.getSimpleParameter();<NEW_LINE>SimpleParameterSpecification validSimpleParameter = null;<NEW_LINE>ContentSpecification validContentEncoding = null;<NEW_LINE>if (simpleParameter !... | CollectionFormat.MULTI).build(); |
390,588 | private void saveAsyncImpl(@Nonnull UIAccess uiAccess) {<NEW_LINE>ApplicationEx application = (ApplicationEx) getApplication();<NEW_LINE>if (application.isDoNotSave()) {<NEW_LINE>// no need to save<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>if (!mySavingInProgress.compareAndSet(false, true)) {<NEW_LINE>return;<NEW_LINE>}<NEW... | .TOPIC).saved(this); |
1,644,212 | private void decodeAnnotation() {<NEW_LINE>this.readOffset = 0;<NEW_LINE>int utf8Offset = this.constantPoolOffsets[u2At(0)] - this.structOffset;<NEW_LINE>this.typename = utf8At(utf8Offset + 3, u2At(utf8Offset + 1));<NEW_LINE>int numberOfPairs = u2At(2);<NEW_LINE>// u2 type_index + u2 num_member_value_pair<NEW_LINE>this... | .NoMembers : new ElementValuePairInfo[numberOfPairs]; |
67,226 | private static void checkCompatibleTypes(SerializedColumnHeader expected, SerializedColumnHeader other, int tableIdx, int columnIdx) {<NEW_LINE>DType dtype = expected.getType();<NEW_LINE>if (!dtype.equals(other.getType())) {<NEW_LINE>throw new IllegalArgumentException("Type mismatch at table " + tableIdx + "column " + ... | ] otherChildren = other.getChildren(); |
1,385,134 | public void removeUpdate(javax.swing.event.DocumentEvent p0) {<NEW_LINE>Element root = rootRef.get();<NEW_LINE>int elem = root.getElementCount();<NEW_LINE>int delta = lines - elem;<NEW_LINE>lines = elem;<NEW_LINE><MASK><NEW_LINE>if (doc == null) {<NEW_LINE>return;<NEW_LINE>}<NEW_LINE>int lineNumber = NbDocument.findLin... | StyledDocument doc = support.getDocument(); |
599,670 | protected String doIt() throws Exception {<NEW_LINE>log.info("M_MatchPO_ID=" + p_M_MatchPO_ID);<NEW_LINE>MMatchPO po = new MMatchPO(getCtx(), p_M_MatchPO_ID, get_TrxName());<NEW_LINE>if (po.get_ID() == 0)<NEW_LINE>throw new AdempiereUserError("@NotFound@ @M_MatchPO_ID@ " + p_M_MatchPO_ID);<NEW_LINE>//<NEW_LINE>MOrderLi... | getC_OrderLine_ID(), get_TrxName()); |
660,454 | public boolean onTouchEvent(TextView widget, Spannable buffer, MotionEvent event) {<NEW_LINE><MASK><NEW_LINE>if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_DOWN) {<NEW_LINE>int x = (int) event.getX();<NEW_LINE>int y = (int) event.getY();<NEW_LINE>x -= widget.getTotalPaddingLeft();<NEW_LINE>y -= wid... | int action = event.getAction(); |
1,470,190 | public ConfigValidationResult validateConfig(BaseConfig oldConfig, AuthConfig newConfig, BaseConfig newBaseConfig) {<NEW_LINE>List<String> errors = new ArrayList<>();<NEW_LINE>List<String> warnings = new ArrayList<>();<NEW_LINE>if (authType != AuthType.NONE && users.isEmpty()) {<NEW_LINE>errors.add("You've enabled secu... | add(user.getUsername()); |
1,834,114 | public static QueryDomainListResponse unmarshall(QueryDomainListResponse queryDomainListResponse, UnmarshallerContext _ctx) {<NEW_LINE>queryDomainListResponse.setRequestId(_ctx.stringValue("QueryDomainListResponse.RequestId"));<NEW_LINE>queryDomainListResponse.setTotalItemNum(_ctx.integerValue("QueryDomainListResponse.... | (_ctx.integerValue("QueryDomainListResponse.TotalPageNum")); |
8,706 | public Future<Void> streamToFileSystem(String filename) {<NEW_LINE>synchronized (this) {<NEW_LINE>if (pipe != null) {<NEW_LINE>return context.failedFuture("Already streaming");<NEW_LINE>}<NEW_LINE>pipe = pipe().endOnComplete(true);<NEW_LINE>}<NEW_LINE>FileSystem fs = context.owner().fileSystem();<NEW_LINE>Future<AsyncF... | (filename, new OpenOptions()); |
461,861 | public static boolean isOutputSoapEncoded(BindingOperation bindingOperation) {<NEW_LINE>if (bindingOperation == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE><MASK><NEW_LINE>if (bindingOutput == null) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>SOAPBody soapBody = WsdlUtils.getExtensiblityElement(bindingOutput.ge... | BindingOutput bindingOutput = bindingOperation.getBindingOutput(); |
880,089 | public void onLoad(final LicenseManager licenseManager) {<NEW_LINE>// read configuration..<NEW_LINE>checkString("paypal.mode", Settings.getOrCreateStringSetting("paypal", "mode").getValue(), "paypal.mode not set, please set to either sandbox or live.");<NEW_LINE>checkString("paypal.username", Settings.getOrCreateString... | ).getValue(), "paypal.redirect not set in structr.conf."); |
1,230,259 | public static GetSimilarPhotosResponse unmarshall(GetSimilarPhotosResponse getSimilarPhotosResponse, UnmarshallerContext context) {<NEW_LINE>getSimilarPhotosResponse.setRequestId(context.stringValue("GetSimilarPhotosResponse.RequestId"));<NEW_LINE>getSimilarPhotosResponse.setCode(context.stringValue("GetSimilarPhotosRe... | ("GetSimilarPhotosResponse.Photos[" + i + "].Like")); |
1,004,806 | public CodecDocument openDocumentInner(final String fileName, String password) {<NEW_LINE><MASK><NEW_LINE>Map<String, String> notes = null;<NEW_LINE>if (AppState.get().isShowFooterNotesInText) {<NEW_LINE>notes = getNotes(fileName);<NEW_LINE>LOG.d("footer-notes-extracted");<NEW_LINE>}<NEW_LINE>if ((BookCSS.get().isAutoH... | LOG.d(TAG, fileName); |
862,286 | protected void openTorrent(String text, String newReferrer) {<NEW_LINE>if (newReferrer != null && newReferrer.length() > 0) {<NEW_LINE>if (!referrers.contains(newReferrer)) {<NEW_LINE>referrers.add(newReferrer);<NEW_LINE>COConfigurationManager.setParameter("url_open_referrers", referrers);<NEW_LINE>COConfigurationManag... | COConfigurationManager.setParameter(CONFIG_REFERRER_DEFAULT, newReferrer); |
1,106,830 | public void addTab(String tabName, GridTab gTab, Component tabElement) {<NEW_LINE>int index = getTabCount();<NEW_LINE>tabNames.add(tabName);<NEW_LINE>gTabs.add(gTab);<NEW_LINE>components.add(tabElement);<NEW_LINE>try {<NEW_LINE>log.fine(tabName + " GridTab.Icon:" + gTab.getIcon() + " tabElement:" + tabElement + " GridT... | s_disabledIcon = Env.getImageIcon("Cancel10.gif"); |
291,182 | public static DescribeDnsGtmInstancesResponse unmarshall(DescribeDnsGtmInstancesResponse describeDnsGtmInstancesResponse, UnmarshallerContext _ctx) {<NEW_LINE>describeDnsGtmInstancesResponse.setRequestId(_ctx.stringValue("DescribeDnsGtmInstancesResponse.RequestId"));<NEW_LINE>describeDnsGtmInstancesResponse.setPageSize... | + "].Config.AlertConfig[" + j + "].EmailNotice")); |
401,999 | protected GroupInfo<MetaPropertyPath> groupItems(int propertyIndex, @Nullable GroupInfo parent, List<GroupInfo> children, E item, LinkedMap<MetaPropertyPath, Object> groupValues) {<NEW_LINE>MetaPropertyPath property = (MetaPropertyPath) groupProperties[propertyIndex++];<NEW_LINE>Object itemValue = getValueByProperty(it... | parents.put(groupInfo, parent); |
369,535 | private void printThreadSummary(ImageProcess ip) {<NEW_LINE>// Prints a summary list of native thread IDs<NEW_LINE>int count = 0;<NEW_LINE>Iterator<?<MASK><NEW_LINE>while (itThread.hasNext()) {<NEW_LINE>Object next = itThread.next();<NEW_LINE>if (next instanceof CorruptData) {<NEW_LINE>continue;<NEW_LINE>}<NEW_LINE>Ima... | > itThread = ip.getThreads(); |
1,071,902 | private ResponseSpec createUserRequestCreation(User user) throws WebClientResponseException {<NEW_LINE>Object postBody = user;<NEW_LINE>// verify the required parameter 'user' is set<NEW_LINE>if (user == null) {<NEW_LINE>throw new WebClientResponseException("Missing the required parameter 'user' when calling createUser... | ), null, null, null); |
348,331 | private void addHighlightElements(String query, int parent, String code, int index) {<NEW_LINE>NodeList<Element> els = DomUtils.querySelectorAll(Document.get().getBody(), query);<NEW_LINE>// guard against queries that might select an excessive number<NEW_LINE>// of UI elements<NEW_LINE>int n = Math.min(HIGHLIGHT_ELEMEN... | styles().staticHighlightEl()); |
855,443 | protected Integer run(IPersistentMap map) {<NEW_LINE>ESeq vals = ERT.NIL;<NEW_LINE>int initial_count = sizeRef.get();<NEW_LINE>EObject key = matcher.getTupleKey(keypos1);<NEW_LINE>if (key == null) {<NEW_LINE>vals = matcher.matching_values_bag(vals, (Map<EObject, IPersistentCollection>) map);<NEW_LINE>} else {<NEW_LINE>... | map.assoc(key, set); |
205,465 | public static String renderResponseContent(String requestBody, String requestResourcePath, HttpServletRequest request, Response response) {<NEW_LINE>if (response.getContent().contains(TemplateEngine.DEFAULT_EXPRESSION_PREFIX)) {<NEW_LINE>log.debug("Response contains dynamic EL expression, rendering it...");<NEW_LINE>Te... | list(request.getParameterNames()); |
809,210 | public void write(Node node, EntityMetadata entityMetadata, String persistenceUnit, ConsistencyLevel consistencyLevel, CassandraDataHandler cdHandler) {<NEW_LINE>// Index in Inverted Index table if applicable<NEW_LINE>boolean invertedIndexingApplicable = <MASK><NEW_LINE>if (invertedIndexingApplicable) {<NEW_LINE>String... | CassandraIndexHelper.isInvertedIndexingApplicable(entityMetadata, useSecondryIndex); |
1,310,120 | /*<NEW_LINE>* @see<NEW_LINE>* com.sitewhere.commands.spi.ICommandExecutionEncoder#encodeSystemCommand(com.<NEW_LINE>* sitewhere.spi.device.command.ISystemCommand,<NEW_LINE>* com.sitewhere.spi.device.IDeviceNestingContext, java.util.List)<NEW_LINE>*/<NEW_LINE>@Override<NEW_LINE>public byte[] encodeSystemCommand(ISystemC... | encodeSendDeviceStreamData(builder.build()); |
1,203,427 | private void fireProgressEvent(int state, int progress, String messageKey, RepositoryResource installResource) throws InstallException {<NEW_LINE>String resourceName = null;<NEW_LINE>if (installResource instanceof EsaResource) {<NEW_LINE>EsaResource esar = ((EsaResource) installResource);<NEW_LINE>if (esar.getVisibilit... | .getLogMessage(messageKey, resourceName)); |
1,578,725 | public <REPLY extends OFStatsReply> ListenableFuture<List<REPLY>> writeStatsRequest(OFStatsRequest<REPLY> request) {<NEW_LINE>if (!isConnected()) {<NEW_LINE>return Futures.immediateFailedFuture(<MASK><NEW_LINE>}<NEW_LINE>final DeliverableListenableFuture<List<REPLY>> future = new DeliverableListenableFuture<List<REPLY>... | new SwitchDisconnectedException(getDatapathId())); |
999,600 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<NEW_LINE>ExpressionFactory factory = ExpressionFactory.newInstance();<NEW_LINE>ELContextImpl context = new ELContextImpl(factory);<NEW_LINE>PrintWriter pw = response.getWriter();<NEW_LINE>ELResolver elR... | "Exception caught: " + e.getMessage()); |
260,075 | private void routeWithMultipleTables(final RouteContext routeContext, final ShardingRule shardingRule) throws ShardingSphereConfigurationException {<NEW_LINE>List<RouteMapper> tableMappers = new ArrayList<>(logicTables.size());<NEW_LINE>Set<String> availableDatasourceNames = Collections.emptySet();<NEW_LINE>boolean fir... | tableRule = shardingRule.getTableRule(each); |
287,676 | public String createStreamInfo(InlongStreamInfo streamInfo) {<NEW_LINE>String path = HTTP_PATH + "/stream/save";<NEW_LINE>final String stream = GsonUtil.toJson(streamInfo);<NEW_LINE>final RequestBody streamBody = RequestBody.create(MediaType.parse("application/json"), stream);<NEW_LINE>final String url = formatUrl(path... | .getMessage()), e); |
724,042 | private void handlePutAndGetOps(AbstractConstantPoolInfoJava poolRef, Record res, String op) {<NEW_LINE>int name_and_type_index = ((ConstantPoolFieldReferenceInfo) poolRef).getNameAndTypeIndex();<NEW_LINE>ConstantPoolNameAndTypeInfo fieldNameAndType <MASK><NEW_LINE>int name_index = fieldNameAndType.getNameIndex();<NEW_... | = (ConstantPoolNameAndTypeInfo) constantPool[name_and_type_index]; |
942,555 | public void deleteDatasetTags(DeleteDatasetTags request, StreamObserver<DeleteDatasetTags.Response> responseObserver) {<NEW_LINE>try {<NEW_LINE>// Request Parameter Validation<NEW_LINE>String errorMessage = null;<NEW_LINE>if (request.getId().isEmpty() && request.getTagsList().isEmpty() && !request.getDeleteAll()) {<NEW... | extraField = new HashMap<>(); |
1,651,258 | public Consumer<Assembler.CodeAnnotation> newConsumer(CompilationResult compilationResult) {<NEW_LINE>return new Consumer<>() {<NEW_LINE><NEW_LINE>@Override<NEW_LINE>public void accept(Assembler.CodeAnnotation annotation) {<NEW_LINE>if (annotation instanceof SingleInstructionAnnotation) {<NEW_LINE>compilationResult.add... | (AArch64MacroAssembler.AdrpLdrMacroInstruction) annotation)); |
1,554,547 | protected void addSupportingTokens(List<WSEncryptionPart> sigs) throws WSSecurityException {<NEW_LINE>Collection<AssertionInfo> sgndSuppTokens = PolicyUtils.<MASK><NEW_LINE>List<SupportingToken> sigSuppTokList = this.handleSupportingTokens(sgndSuppTokens, false);<NEW_LINE>Collection<AssertionInfo> endSuppTokens = Polic... | getAllAssertionsByLocalname(aim, SPConstants.SIGNED_SUPPORTING_TOKENS); |
916,248 | private Set<HuId> createCUsBatch(final HUEditorRow.HUEditorRowHierarchy huEditorRowHierarchy, final int maxCUsAllowedPerBatch) {<NEW_LINE>final Set<HuId> splitCUIDs = new HashSet<>();<NEW_LINE>final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class);<NEW_LINE>final HUEditorRow cuRow = huEditorRo... | getMinimumOfThree(tuCapacity, maxCUsAllowedPerBatch, initialQtyCU); |
1,581,361 | public void destroy() {<NEW_LINE>// destory executor-server<NEW_LINE>stopRpcProvider();<NEW_LINE>// destory jobThreadRepository<NEW_LINE>if (jobThreadRepository.size() > 0) {<NEW_LINE>for (Map.Entry<Integer, JobThread> item : jobThreadRepository.entrySet()) {<NEW_LINE>removeJobThread(item.getKey(), "web container destr... | .getInstance().toStop(); |
385,720 | private static void putRotatedQuad(ByteBuffer texCoordsBuffer, Rect r, float xs, float ys) {<NEW_LINE>float x0 = r.x;<NEW_LINE>float y0 = r.y;<NEW_LINE>float x1 <MASK><NEW_LINE>float y1 = r.y + r.height;<NEW_LINE>float w2 = r.width * 0.5f;<NEW_LINE>float h2 = r.height * 0.5f;<NEW_LINE>putTexCoord(texCoordsBuffer, x0 * ... | = r.x + r.width; |
1,635,516 | public boolean verifySplitBrainMergeMemberListVersion(SplitBrainJoinMessage joinMessage) {<NEW_LINE>Address caller = joinMessage.getAddress();<NEW_LINE>int callerMemberListVersion = joinMessage.getMemberListVersion();<NEW_LINE>clusterServiceLock.lock();<NEW_LINE>try {<NEW_LINE>if (!clusterService.isMaster()) {<NEW_LINE... | callerMemberListVersion + " from " + caller + " because this node is not master"); |
1,108,775 | public void deserialize(DataInputStream input) throws IOException {<NEW_LINE>int featsFlag = StreamSerdeUtils.deserializeInt(input);<NEW_LINE>if (featsFlag > 0) {<NEW_LINE>feats = (IntFloatVector) StreamSerdeUtils.deserializeVector(input);<NEW_LINE>}<NEW_LINE>int neighborsFlag = StreamSerdeUtils.deserializeInt(input);<... | weightsFlag = StreamSerdeUtils.deserializeInt(input); |
381,349 | private void sendNodeStatsReport() {<NEW_LINE>final boolean isMiningEnabled;<NEW_LINE>if (miningCoordinator instanceof CliqueMiningCoordinator) {<NEW_LINE>isMiningEnabled = ((CliqueMiningCoordinator) miningCoordinator).isSigner();<NEW_LINE>} else {<NEW_LINE>isMiningEnabled = miningCoordinator.isMining();<NEW_LINE>}<NEW... | getBlockchain().getChainHeadBlock()); |
86,029 | protected void registerDefaultRecipes() {<NEW_LINE>registerRecipe(30, new ItemStack[] { SlimefunItems.WHEAT_ORGANIC_FOOD }, new ItemStack[] { new SlimefunItemStack(SlimefunItems.<MASK><NEW_LINE>registerRecipe(30, new ItemStack[] { SlimefunItems.CARROT_ORGANIC_FOOD }, new ItemStack[] { new SlimefunItemStack(SlimefunItem... | WHEAT_FERTILIZER, OrganicFertilizer.OUTPUT) }); |
1,618,682 | public AddOnLibrary importFromFile(File file) throws IOException {<NEW_LINE>var diiBuilder = AddOnLibraryDto.newBuilder();<NEW_LINE>try (var zip = new ZipFile(file)) {<NEW_LINE>ZipEntry entry = zip.getEntry(LIBRARY_INFO_FILE);<NEW_LINE>if (entry == null) {<NEW_LINE>throw new IOException(I18N.getText("library.error.addO... | getInputStream(mtsPropsZipEntry)), mtsPropBuilder); |
548,620 | public Map<String, Boolean> toLegacyMapFormat() {<NEW_LINE>Map<String, Boolean> legacyFormat = new HashMap<>();<NEW_LINE>legacyFormat.put(Const.InstructorPermissions.CAN_MODIFY_COURSE, canModifyCourse);<NEW_LINE>legacyFormat.put(Const.InstructorPermissions.CAN_MODIFY_INSTRUCTOR, canModifyInstructor);<NEW_LINE>legacyFor... | Const.InstructorPermissions.CAN_VIEW_STUDENT_IN_SECTIONS, canViewStudentInSections); |
1,082,515 | void analyze(Locals locals) {<NEW_LINE>captured = locals.getVariable(location, variable);<NEW_LINE>if (expected == null) {<NEW_LINE>if (captured.clazz == def.class) {<NEW_LINE>// dynamic implementation<NEW_LINE>defPointer = "D" <MASK><NEW_LINE>} else {<NEW_LINE>// typed implementation<NEW_LINE>defPointer = "S" + Painle... | + variable + "." + call + ",1"; |
1,613,840 | protected boolean isEnabledForContext(SymbolTreeActionContext context) {<NEW_LINE>TreePath[] selectionPaths = context.getSelectedSymbolTreePaths();<NEW_LINE>if (selectionPaths.length != 1) {<NEW_LINE>return false;<NEW_LINE>}<NEW_LINE>Object object = selectionPaths[0].getLastPathComponent();<NEW_LINE>if (object instance... | Symbol symbol = symbolNode.getSymbol(); |
1,701,875 | public void densify(List<String> featureList) {<NEW_LINE>// Ensure we have enough space.<NEW_LINE>if (featureList.size() > featureNames.length) {<NEW_LINE><MASK><NEW_LINE>}<NEW_LINE>int insertedCount = 0;<NEW_LINE>int curPos = 0;<NEW_LINE>for (String curName : featureList) {<NEW_LINE>// If we've reached the end of our ... | growArray(featureList.size()); |
462,617 | private void mergeCategory(String categoryName, DiskIndex onDisk, int[] positions, OutputStream stream) throws IOException {<NEW_LINE>Map<String, Object> wordsToDocs = this.categoryTables.get(categoryName);<NEW_LINE>if (wordsToDocs == null) {<NEW_LINE>wordsToDocs = new HashMap<String, Object>(3);<NEW_LINE>}<NEW_LINE>Ma... | wordsToDocs.put(oldWord, list); |
536,429 | public static DetectRibFractureResponse unmarshall(DetectRibFractureResponse detectRibFractureResponse, UnmarshallerContext _ctx) {<NEW_LINE>detectRibFractureResponse.setRequestId(_ctx.stringValue("DetectRibFractureResponse.RequestId"));<NEW_LINE>Data data = new Data();<NEW_LINE>data.setResultURL(_ctx.stringValue("Dete... | ("DetectRibFractureResponse.Data.Detections[" + i + "].FractureId")); |
894,726 | public CustomPluginFileDescription unmarshall(JsonUnmarshallerContext context) throws Exception {<NEW_LINE>CustomPluginFileDescription customPluginFileDescription = new CustomPluginFileDescription();<NEW_LINE>int originalDepth = context.getCurrentDepth();<NEW_LINE>String currentParentElement = context.getCurrentParentE... | JsonToken token = context.getCurrentToken(); |
1,598,739 | /* package */<NEW_LINE>Optional<IPair<StockQtyAndUOMQty, Money>> sumupQtyInvoicedAndNetAmtInvoiced(final I_C_Invoice_Candidate ic) {<NEW_LINE>if (ic.getC_Currency_ID() <= 0 || ic.getC_UOM_ID() <= 0) {<NEW_LINE>// if those two columns are not yet set, then for sure nothing is invoiced yet either<NEW_LINE>return Optional... | ).multiply(qtyInvoicedInUOM, priceActual); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.