dataesr/scientific-paragraphs-categorization huggingface dataset:
Updated API Block Extractor The Updated API Block Extractor identifies the relevant block of code containing the updated API call. This block is extracted and used as the source of the update patch. In order to prevent false positives due to irrelevant code blocks, we use the following rules to identify a valid updated API block: (1) A valid updated block contains the updated API call in the if branch and the old API call in the else branch or vice versa. (2) A valid updated block will have an Android version check as the if condition. These classification rules are implemented in two components: 3. 2. 1 Version Statement Normalization. One of the important criteria for a valid updated block is the presence of an if statement that checks for the Android version. However, this check may take different forms in different projects (e.
API Update Semantic Patch Creation Using the normalized update block as an input, this component creates a Coccinelle4J semantic patch that can be used to update a normalized target file. This component will replace variables and expressions with metavariables. Metavariables will bind to program elements in the input code passed into Coccinelle4J. The patch works by detecting the location of the old API call and then adding the new code which consists of a surrounding if block, the updated API call, and new variables introduced by the new API. To increase the robustness of the system, for APIs that return a value, two different update rules are created. One rule is for cases where the return value is assigned into a variable, while the other is for cases where the return value is not used.
EXPERIMENTS 4. 1 Dataset To assess the performance of CocciEvolve for practical usage, we use a dataset of real-world Android projects retrieved from public Github repositories. For this purpose, we use AUSearch  [1] , a tool for searching Github repositories, to find Android API usage. For the update semantic patch creation, we use the existing after-update examples provided in the AppEvolve replication package. For each API, only a single after-update example is used. We obtained a total of 112 target source files from Github for the 10 most commonly used APIs that were used in the original evaluation of AppEvolve. These target files are disjoint from the target files used by AppEvolve and thus are used to evaluate AppEvolve's generalizability in updating other target files. Detailed statistics for this dataset can be seen in Table  1.
Experimental Settings Our experiments are done by comparing the performance of Coc-ciEvolve against AppEvolve based on the number of applicable 1 https://sites. google. com/view/cocci-evolve/ The target files for the experiments are the public Android project dataset that have been collected from Github through the use of AUSearch  [1]. CocciEvolve is applied to every target file using the relevant API update patch that was created. For experiments involving AppEvolve, we need to configure each target project as an Eclipse project and create an additional XML file that contains the deprecated API description and their locations in the file. Due to this limitation, our experiments on AppEvolve are focused on first instance of each API call for each target project.
Results In our experiments, CocciEvolve attains a better performance compared to AppEvolve. For most APIs, CocciEvolve achieves a near perfect result. We ask a software engineer with three years experience in Android, who was not part of this project, to validate the correctness of the update by verifying that there are no semantic changes in the update. Our experimental results are also included in our replication package. In most cases, AppEvolve does not produce any code update. Thung et al. [19]  note that AppEvolve requires some manual code refactoring and modifications to be able to perform the automated update. Table  2  shows the statistics of our evaluation. Based on the experiments result, we can see that CocciEvolve mainly failed for two APIs: getAllNetworkInfo() and requestAu-dioFocus(.
RELATED WORK There are many studies on API deprecation  [2, 7, 9, 11, 12, 17, 18, [20] [21] [22] [23]. Kapur et al. [7]  discovered that APIs can be removed from a library without warning. Zhou and Walker  [23]  proposed a tool to mark deprecated API usages in StackOverflow posts. Some studies propose approaches  [9, 11, 18, [20] [21] [22]  to detect API compatibility issues. Brito et al. [2]  showed that not all APIs are annotated with replacement messages. Sawant et al. [17]  found 12 reasons for deprecation. Li et al. [12]  characterized Android APIs and found inconsistencies between their annotation and documentation. Unlike these studies, our work aims to automatically update usages of deprecated Android APIs. There are many studies on program transformations inference  [3, 5, 13, 15, 16].
LASE  [13]  creates edit scripts by finding common changes from a set of change examples. REFAZER  [15]  employs a programming-by-example methodology to infer transformations from a set of change examples. REVISAR  [16]  finds common Java edit patterns from code repositories by clustering the edit patterns. Jiang et al. [5]  proposed GenPat, which builds source code hypergraphs to infer transformations. Fazzini et al. [3]  proposed AppEvolve to transform app with Android deprecated-API usages into ones that are backward compatible. Our work shares the same goal. However, while AppEvolve learns from a before-and after-update example, our approach requires only one after-update example.
CONCLUSION AND FUTURE WORK In this work, we propose CocciEvolve, which can learn an Android API update from a single after-update example. CocciEvolve performs code normalization to standardize the code and writes the update in the Semantic Patch Language (SmPL) to make the transformation transparent and readable to developers. Our experiments on 112 target files on 10 deprecated Android APIs show that Coc-ciEvolve successfully updates usages in 96 target files. On the other hand, AppEvolve can only update deprecated-API usages in 20 of these target files. For future work, we plan to perform code slicing to find code relevant to the API update, including code beyond method boundaries. We also plan to perform code denormalization to restore the original coding style.
NuSTAR We reduced the NuSTAR data as standard with the NuSTAR Data Analysis Software (v1. 8. 0; part of the HEASOFT distribution) and NuSTAR caldb v20171204. The unfiltered event files were cleaned with NUPIPELINE. We used the standard depth correction, which significantly reduces the internal background at high energies, and periods of earth-occultation and passages through the South Atlantic Anomaly were also excluded. To be conservative, source products were extracted from circular regions of radius 30 ′′ , owing to the presence of another faint source to the south (see  Bachetti et al. 2013) , and the background was estimated from a larger, blank area on the same detector, free of contaminating point sources (the exact size of the background region used varies between epochs, depending on the position angle of the observation and the proximity of the source to the edge of the detector).
XMM-Newton For the XMM-Newton observations, data reduction was carried out with the XMM-Newton Science Analysis System (SAS v16. 1. 0). Here we focus on the data taken by the EPIC CCD detectors -EPIC-pn and EPIC-MOS  (Strüder et al. 2001; Turner et al. 2001 ) -for our continuum analysis; the high-resolution data from the RGS  (den Herder et al. 2001 ) will be presented in a separate work  (Pinto et al. 2020 ). The raw observation data files were processed as standard using EPCHAIN and EMCHAIN. Source products were extracted from circular regions of radius ∼30 ′′ , and, as before, the background was estimated from larger areas on the same CCD free from contaminating point sources (again, the exact size of the background region used varies from epoch to epoch, depending on the position angle of the observation and, for the EPIC-pn detector, the position of the read-out streak relative to other nearby sources).
SPECTRAL ANALYSIS Our focus on this work is on broadband spectroscopy of NGC 1313 X-1. All of the datasets analysed are rebinned to have a signalto-noise (S/N) ratio of at least 5 per energy bin, using a combination of SPECGROUP in the XMM-Newton SAS and custom software, and we fit the data using χ 2 minimisation. The XMM-Newton EPIC datasets are analysed over the 0. 3-10. 0 keV range, the Chandra MEG and HEG gratings data over the 0. 6-6. 0 and 0. 8-8. 0 keV ranges, respectively, and the NuSTAR FPMA/B data provide coverage up to ∼25-35 keV, depending on the dataset (above which the S/N drops below 5). We perform spectral analysis with XSPEC v12. 10. 0  (Arnaud 1996)  throughout, and quote parameter uncertainties at the 90% confidence level for one interesting parameter (∆χ 2 = 2. 7). We allow multiplicative constants to float between the datasets from a given epoch to account for cross-calibration uncertainties between the different detectors, with FPMA fixed at unity as one of the detectors common to all epochs; these constants are within ∼10% of unity, as expected  (Madsen et al.
3-10. 0 keV lightcurve observed with the EPIC-pn detector over the two XMM-Newton exposures, and the middle panel shows the 3-30 keV lightcurve observed with the NuSTAR FPMA detector. The bottom panel also shows a hardness ratio computed between the 0. 3-2. 0 and 2. 0-10. 0 keV bands, based on the EPIC-pn count rates. Clear spectral variability is seen towards the beginning of these observations, after which the spectrum appears to stabilize (even if some flux variability is still observed). For our spectral analysis we therefore split these data into two sub-epochs, which we refer to as XN4a and XN4b, as indicated by the horizontal arrows. standard online pipeline  (Evans et al. 2009 ). These epochs cover a range of fluxes, and also the period of enhanced variability seen more recently by Swift (commencing MJD ∼ 57400).
The two broadband observations performed in quick succession in 2012 are considered to be a single epoch (XN1) in this work, as they both exhibit the same spectrum and there is negligible variability within either of the observations  (Bachetti et al. 2013). Epoch XN4 coincidentally caught the end of a relatively large flare (see Figure  1 ), with NGC 1313 X-1 showing strong flux and spectral evolution across the simultaneous XMM-Newton+NuSTAR exposure (see Figure  2 ). We therefore split the data from this epoch into higher and lower flux periods, which we refer to as epochs XN4a and XN4b respectively. The XN4a spectrum is extracted from the first 45 ks of the simultaneous exposure (OBSIDs 0803990101 and 30302016002; this is the point at which the highenergy (E > 3 keV) flux/spectral variability stabilises), while the XN4b spectrum is extracted from the remaining data from these OBSIDs, combined with the second XMM-Newton exposure (OB-SID 0803990201), which exhibited similar flux and spectral shape.
None of the other new observations considered here show notable spectral variability within any of the individual exposures. The two XMM-Newton observations taken during epoch XN5 show consistent spectra, and so are combined. However, the two XMM-Newton observations taken during epoch XN6 do show clearly different The Unusual Spectral Variability of NGC 1313 X-1 5 Figure  3. Left: The broadband spectral evolution displayed by NGC 1313 X-1. For clarity, we only show the EPIC-pn data for XMM-Newton and the MEG data for Chandra (where relevant), and the FPMA data for NuSTAR. Given the large number of datasets shown, we show the soft and hard X-ray coverage from each epoch in the same colour. The XMM-Newton data span the ∼0. 3-10. 0 keV range, the Chandra data shown span the ∼0. 6-6. 0 keV range, and the NuSTAR data span the ∼3-35 keV range.
Despite the strong variations at lower energies (below ∼10 keV), the higher energy data (above ∼10 keV) are relatively stable. Right: A zoom in on the high-energy (>10 keV) data from NuSTAR (again, FPMA only for clarity), further demonstrating the relative lack of variability observed at these energies in comparison to the lower energy data. All the data have been unfolded through a simple model that is constant with energy, and have been further rebinned for visual purposes. spectra, and so in this case we only consider the XMM-Newton data from the exposure taken simultaneously with NuSTAR. We also note that, owing to the spread of the full Chandra dataset, for epochs XN5 and XN6 there are also short Chandra observations contemporaneous with the XMM-Newton and NuSTAR data, but in these cases we only consider the higher S/N XMM-Newton data for the soft X-ray coverage.
Broadband Spectral Variability The nine broadband spectra extracted are shown in Figure  3. The spectral variability exhibited by NGC 1313 X-1 shows remarkable similarity to the behaviour seen from Holmberg IX X-1  (Walton et al. 2014 (Walton et al. , 2017;; Luangtip et al. 2016) , another wellstudied ULX; the variability is strong at lower energies (below ∼10 keV), with the spectrum becoming more centrally peaked at higher fluxes, but the higher energy data (above ∼10 keV) appears to remain extremely similar for all of the spectra compiled to date. To illustrate this, we model the NuSTAR data above 10 keV with a simple powerlaw model. The photon indices are all consistent within their 90% confidence limits (fitting all of the datasets together we find Γ = 3. 2 ± 0. 1), and the 10-40 keV fluxes only vary by at most a factor of ∼1.
Data/model ratios for the nine broadband spectra extracted of NGC 1313 X-1 fit with the model assuming a non-magnetic accretor. Green and blue show data from the NuSTAR FPMA and FPMB detectors, respectively, while black and red show data from the EPIC-pn and EPIC-MOS detectors, respectively, for the XN epochs and from the MEG and HEG gratings, respectively, for the CN epochs. As with Figure  3 , the data have been further rebinned for display purposes. The data/model ratios for the model assuming a magnetic accretor are extremely similar to those shown here. are expected to be important for the thicker inner regions of such a flow, which modifies the radial temperature profile -typically parameterised as T (r) ∝ r -p -of this region of the flow away from that expected for a thin disc; a standard thin disc should have p = 0.
2009 ) to avoid incorrectly extrapolating the powerlaw emission down to arbitrarily low energies. This component is applied to the DISKPBB component, the hotter of the two components associated with the disc, as black hole coronae are expected to be compact and centrally located (e. g. Reis & Miller 2013). We apply this model to all of the 9 broadband datasets of NGC 1313 X-1 considered in this work simultaneously, similar to our analysis of Holmberg IX X-1  (Walton et al. 2017). Following that work, and given the similarities between the multi-epoch spectra at the highest and lowest energies, we assume a common absorption column (see also  Miller et al. 2013 ) and a common photon index for the high energy continuum across all epochs. The global fit to the data is reasonably good, with χ 2 = 12544 for 11559 degrees of freedom (DoF); we give the best-fit parameters in Table 2, and show the data/model ratios for the various datasets in Figure  4.
(2018c) , as NGC 300 ULX1 had not been discovered to be a ULX pulsar at that time; note that for this source we take the continuum parameters from the model that includes the cyclotron resonant scattering feature presented in  Walton et al. (2018a). In the magnetised case, this component provides the bulk of the high-energy (E > 10 keV) emission observed by NuSTAR and explains the high-energy excess seen even with complex disc models; the treatment of this emission is the only difference between the non-magnetic and magnetic accretion models used here. As with the non-magnetic case, we apply this model to all 9 broadband datasets considered in this work simultaneously, again assuming a common absorption column for all epochs (the shape of the accretion column is fixed in the model, and so is also common for all epochs).
DISCUSSION We have presented a multi-epoch spectral analysis of all of the broadband datasets available for the bright (LX ∼ 10 40 erg s -1 ) ULX NGC 1313 X-1. These datasets combine observations taken with XMM-Newton and Chandra in coordination with NuSTAR, and span a period of ∼5 years. The first of these epochs, XN1, corresponds to the data presented by  Bachetti et al. (2013). From these observations we extracted 9 broadband spectra, covering the ∼0. 5-30 keV energy range, which probe the spectral variability exhibited on timescales of ∼days to ∼years (see Section 3). Several of these The Unusual Spectral Variability of NGC 1313 X-1 9 are broadly similar to epoch XN1 (epochs XN3, CN1, XN5, CN2), but others probe higher fluxes and show clear differences in their spectra (epochs XN2, XN4a,b, XN6; see Figure  3 ).
Evolution of the Thermal Components With this picture in mind, and with a fairly extensive, broadband dataset now available for NGC 1313 X-1, we consider the behaviour of the two thermal components in each of our models in detail. In particular, we investigate how the DISKBB and DISKPBB components evolve in the luminosity-temperature plane. To compute the luminosity, we calculate the intrinsic fluxes (i. e. absorption corrected, and in the case of the DISKPBB component for the black hole model, corrected for the photons lost to the powerlaw tail) for each of the thermal components individually, computed over a broad enough band to be considered bolometric (0. 001-100 keV). The results for each component are shown in Figure  6  for both of the models considered. We do not find any clear relationship between L and T for the lower temperature DISKBB component.
Nevertheless, each of the two groups of observations are broadly consistent with following their own distinct L ∝ T 4 relationship, which would be expected for blackbody radiation with a constant emitting area. Although the qualitative results regarding e. g. temperature do depend on the choice of model, and the global uncertainties are larger in the black hole model because the shape of the high-energy continuum is free to vary in this case, qualitatively this behaviour appears to be largely model independent, as it is seen for both of the models considered. We have also performed a series of other tests related to the models used, including allowing the neutral absorption column to vary between epochs (following  Middleton et al. 2015a) , replacing the cooler DISKBB component with a single-temperature blackbody and linking p across all of the datasets in the magnetic model, and allowing for different photon indices for the two groups of observations in the non-magnetic model.
They are distributed on a continuum, powerlaw-like spectrum in the sigma vs spin period plot, so that they form a 'noise' level to which we can compare credible candidates. The higher-significance candidates (exceeding the previously described noise level) have very low periods, none of which are consistent between observations or even between different segments of the same dataset. These are all found to be aliases of the orbital occultation data gaps (there is currently no way in PRESTO to correct for these missing data).
Figure2. Lightcurves from the observations that form epoch XN4 (2 ks time bins). The top panel shows the 0. 3-10. 0 keV lightcurve observed with the EPIC-pn detector over the two XMM-Newton exposures, and the middle panel shows the 3-30 keV lightcurve observed with the NuSTAR FPMA detector. The bottom panel also shows a hardness ratio computed between the 0. 3-2. 0 and 2. 0-10. 0 keV bands, based on the EPIC-pn count rates. Clear spectral variability is seen towards the beginning of these observations, after which the spectrum appears to stabilize (even if some flux variability is still observed). For our spectral analysis we therefore split these data into two sub-epochs, which we refer to as XN4a and XN4b, as indicated by the horizontal arrows.
ACKNOWLEDGEMENTS The authors would like to thank the reviewer for their positive and thorough feedback, which helped to improve the final version of this manuscript. DJW and MJM acknowledge support from an  STFC   Ernest Rutherford Fellowship. CP and FF acknowledge support from  ESA Research Fellowships. HPE acknowledges support under  NASA  contract  NNG08FD60C. TPR was funded as part of the  STFC  consolidated grant  ST/K000861/1. NW acknowledges CNES support for this work. CRC and MN acknowledge support from the  Smithsonian Astrophysical Observatory (SAO)  contract  SV3-73016  to MIT, which is in turn supported by  NASA  under contract  NAS8-03060  for the Chandra X-ray Center. This research has made use of data obtained with NuSTAR, a project led by  Caltech , funded by  NASA  and managed by  NASA/JPL , and has utilized the NUSTARDAS software package, jointly developed by the  ASDC (Italy)  and  Caltech (USA).
Cross-correlation (CC) is a similarity metric often chosen The associate editor coordinating the review of this manuscript and approving it for publication was Yizhang Jiang. for single modality image registration  [8] -  [10]. These two metrics and the corresponding modified ones are usually used for traditional registration. Based on these metrics, Symmetric normalization (SyN)  [11] , FAIR  [12] , and Elastix  [13]  gain the best registration results among traditional methods. However, they are time-consuming due to the process of iteration, and sometimes they cannot handle complex shape changes, which means that the quality of registration results cannot be guaranteed. Recently, with the development of various deep learning techniques, convolutional network-based registration was intensively investigated.
The emerging of the spatial transformer network (STN) proposed by Jaderberg et al. [18]  made the unsupervised learning-based registration possible. Some researchers used STN as one of their modules for medical image registration. For example, de Vos et al. [19]  employed ConvNet to establish 2-dimensional (2D) control points that are used by STN to warp moving images, but only 2D images can be fed into their network and registration results are not good when deformation is relatively large. Wu et al. [20]  proposed a method that extracts features from moving and fixed images by implementing a stacked auto-encoder network and performs registration with Demons  [21]  and HAM-MER  [22]  on three datasets, but this method is not fully automatic. In the work of de Vos et al. [23] , the authors presented a method of processing the fixed and moving images separately to get two features of the same size, which were then concatenated as the input of another network to generate the DVF for the following registration task.
Their method demonstrated that multi-resolution registration task could be handled. Recently, Balakrishnan et al. [24]  used a UNet-like  [25]  model named VoxelMorph to predict the deformation field and get better performance than SyN. The unsupervised methods mentioned above are able to achieve good registration quality, but most of them need to use tools such as FreeSurfer  [26]  and FSL  [27]  to achieve rigid registration for obtaining pre-aligned data to train their networks. Such preprocessing requirements limit the superiority of the end-to-end registration. In this work, we proposed an Affine and Deformable Medical Image Registration (ADMIR) method to realize end-to-end unsupervised learning-based image registration. It includes two sub-networks, one focuses on affine registration, and the other is responsible for deformable registration.