dataesr/scientific-paragraphs-categorization huggingface dataset:
c on the state of the Jolie program. We instead use the notation a and b. c to indicate the passing of paths as parameters of Tquery operators. We now describe the diagnostic algorithm and how we use the Tquery operators to implement it. In Listing 2, at Line 1 we find the Jolie code of a request to an external service, provided by the HospitalIT infrastructure. The service offers the functionality getPatientPseudoID which, given some identifying patientData (acquired earlier), provides a pseudoanonymised identifier-needed to treat sensitive health data-saved in variable pseudoID. At Line 2 we retrieve in the variable credentials the keys to access the physiological sensors of the patient to obtain the biometric data (Listing 1, Lines 1-5) from the SmartWatch of the patient, by invoking the functionality getMotionAndTemperature and storing the result in tmp.
THE TQUERY FORMALISATION In this section, we report the formalisation of Tquery. Besides providing a general, mathematical reference, the formalisation guides the implementation of our Jolie framework, presented in 'Implementation'. Tquery is inspired by MQuery  (Botoeva et al. , 2018) , a sound variant of the MongoDB Aggregation Framework  (MongoDB Inc. , 2018a) ; the most popular query language for NoSQL data handling. In our formal development, we favour a theory-to-practice strategy to avoid inconsistent or counter-intuitive query behaviours, which is one of the significant drawbacks of the MongoDB Aggregation Framework implementation  (Botoeva et al. , 2018). Moreover, we consider the formalisation as a blueprint for implementors and thus we strive for a balance between abstraction and technical involvement: (i) we adopt constructive semantics definitions rather than declarative ones, since the former are more amenable to imperative implementations, and (ii) we define our semantics on trees rather than on sets (as done in  Botoeva et al.
IMPLEMENTATION We now present Jolie/Tquery, our implementation of Tquery as a Jolie microservice. Specifically, we chose to release Jolie/Tquery as a library that users can include and invoke locally in their Jolie projects-as an npm package (https://www. npmjs. com/package/@jolie/ tquery. ). However, thanks to Jolie's module system, users can also expose Jolie/Tquery as an independent service, e. g. , as a RESTful service  (Montesi, 2016)  as well as a publish/subscribe MQTT worker  (Gabbrielli et al. , 2018)  (as briefly detailed in 'The implementation of Jolie/Tquery'). In this section, first, we describe the main components of Jolie/Tquery, specified through the abstractions provided by the Jolie language (which follow the typical partition of microservice components  (Giallorenzo et al.
The experimental results show that Jolie/Tquery performs consistently faster than MongoDB (all configurations). Since in the test cases with MongoDB we record the request-to-response delay of the database, the higher execution times of these cases correspond to both the overhead of the communication and the possible bottlenecks due to establishing connections to it. We notice a slight decrease in the relative distance between Jolie/Tquery and MongoDB at the increase of batch and data-tier sizes (in particular, the fourth and fifth tiers and the 15and 20-sized batches). Our intuition of the phenomenon is that, on the given machine, when exceeding those thresholds, the Jolie execution runtime and the Jolie/Tquery engine undergo overhead due to resource contention. As expected, the default configuration of MongoDB is the one that performs the worst.
05), corresponding to a distance of ∼124 Mpc. The data used in our work have been reduced using the MUSE pipeline (v1. 2. 1,  Weilbacher et al. 2014 ) and the Reflex environment  (Freudling et al. 2013). Tasks performed by the pipeline include standard reduction such as subtracting bias, flat fielding, galactic extinction corrections, and flux/wavelength calibrations. For removal of the sky background, we use either an offset pointing to an empty region or blank sky regions within the science frames themselves (for smaller targets) and use the Zurich Atmosphere Purge package  (ZAP, Soto et al. 2016)  to perform this task. To reconstruct the final data product we applied a geometrical transformation of the individual slices to align them in a datacube. For more information on this procedure, we refer to  Galbany et al.
This process was conducted through visual inspection of each object and its corresponding segmentation map. This map is defined as the selection of all pixels belonging to the flagged object of interest, and this was done as a combination of two steps. First, we searched for Gaia matches within the field of view of the MUSE datacube with a 1 radial search around the cube centre using the astroquery package  (Ginsburg et al. 2019 ). We then selected as foreground stars all objects with good parallax (π) measurements (i. e. π > 2π err with π err being the error on the parallax). With the final list of foreground stars, we built individual circular masks centred on each and with a radius containing 95% of the flux measured within a 3 radius. As the final object map, we then selected all connected spaxels with a S /N > 3 that belong to the target object and do not overlap with the circular masks defined in the previous step.
2018 , z = 0. 17) and DES-SN program  (Smith et al. 2020 , z = 0. 36) samples 2. As we show in Fig. 2 , the AMUSING subsample spans similar stellar mass ranges as the samples from SDSS and has more massive galaxies on average than the sample from DES-SN program. This latter difference could be naturally explained by different cosmic epochs probed by the two samples. Our 2 We computed stellar masses using both their published catalog photometry and magphys and find negligible differences to their published values (smaller than 0. 05 dex). 2018 ) (in orange). We show as lines with shaded regions the expected relation between stellar mass and SFR (commonly referred to as the main sequence) for the population of star-forming galaxies at different redshifts (adapted from  Speagle et al. 2014). We show in the upper panel the stellar mass distributions and in the right panel the SFR distributions for the three samples.
MAGPHYS magphys  (da Cunha et al. 2008 ) uses stellar templates constructed from the stellar libraries by  Bruzual & Charlot (2003)  and the dust absorption model follows  Charlot & Fall (2000). The adopted IMF is that defined by  Chabrier (2003). In this code, the star-formation histories are derived from an exponentially declining model and superimposed random bursts. Stellar metallicities are uniformly sampled between 0. 02 and 2 times solar metallicity. Although there is no freedom to change the underlying templates, the code compares the data to the entire library and builds the probability distributions for each physical parameter (e. g. stellar mass, SFR, dust, among others). Moreover, while this constraint limits our ability to compare directly with other codes, we use a set of libraries that are commonly used in the community and can serve as a standard reference.
CIGALE cigale is a code that was used to build optical-to-infrared SED models with and without AGN contributions, and can also be used to estimate the physical parameters of galaxies with no AGN contribution and limited wavelength coverage, as is our case  Burgarella et al. (2005) ,  Noll et al. (2009) ,  Boquien et al. (2019). This code allows us a few degrees of freedom, and we try to match the set of available templates to those prescribed by magphys. The major difference is that we cannot replicate the same star-formation histories, and we use an exponentially delayed τ model (SFR(t) ∝ t × exp (-t/τ) /τ) with τ having the same values between 0. 1 and 2 Gyr as described in Sect. 4. 1.
Results and discussion The goal of our work is to study the impact of observational strategies on the derived stellar masses of galaxies. To test this, we applied our artificial redshifting code (argas) to 166 galaxies from the AMUSING survey and simulated observations at seven different redshifts z = 0. 1, 0. 3, 0. 5, 0. 8, 1. 0, 1. 5, and 2. 0. At each redshift, we compute the photometric data in the four griz bands from DECam and use the SED fitting codes described in Sect. 4 to get the best stellar mass of the galaxy. For each code, we use the stellar mass computed at the original redshift of the galaxy (z ∼ 0. 03) -using the same filters and templates -as a frame of reference.
This is an important aspect that needs to be considered when estimating stellar masses for a singular dataset (i. e. observed with the same photometric bands) across an extensive redshift range, as is the case of large surveys such as DES. Given our defined set of filters and our choice of stellar population templates, we find that the LePhare (excluding emission lines) code is the overall best code in estimating stellar masses for galaxies at z ≤ 0. 5. Interestingly, zpeg performs better for galaxies 0. 5 < z ≤ 1. This is likely due to a combination of the nebular emission prescription included in the templates used and the filters where the emission lines are expected to fall. We find that LePhare (with no added emission lines) gives the best overall results for z < 1 of all used codes, but it still underestimates the stellar masses at z 0.
We also show all the posterior distributions for the fitted parameters in We find that the parameter that changes the most when applying our stellar mass corrections is ∆ M. In our LePharecorrected model, the best-fit parameter value decreases by ∼2%, while when we apply our average correction, the difference with respect to the fiducial model is ∼6%. As ∆ M is the parameter that is linked to the host stellar mass (Eq. (  3 )), it is expected to   2014 ) in blue. The contour levels correspond, from inside out, to 68%, 95%, and 99% of the posterior distribution. We show as stars (same colours as contours) the best-fit value for each configuration. Vertical and horizontal lines indicate the best-fit value of each parameter for the three different setups. There is no significant difference on the constraints when using the mass-corrected dataset with respect to the fiducial model.
Acknowledgements. This work was supported by  Fundação para a Ciência e a Tecnologia (FCT)  through the research grant  UIDB/00099/2020  and the  CRISP  project  PTDC/FIS-AST-31546/2017. L. G. acknowledges financial support from the  Spanish Ministry of Science, Innovation and Universities (MICIU)  under the  2019 Ramón y Cajal program   RYC2019-027683  and from the  Spanish MICIU  project  HOSTFLOWS PID2020-115253GA-I00. CRA was supported by grants from  VILLUM FONDEN  (project numbers  16599  and  25501 ). J. D. L. acknowledges support from a  UK Research and Innovation Future Leaders Fellowship  ( MR/T020784/1 ). Computations were performed at the cluster " Baltasar-Sete-Sóis ", supported by the  H2020 ERC Grant  " Matter and strong field gravity: New frontiers in Einstein's theory " grant agreement no.
The Android operating system is frequently updated, with each version bringing a new set of APIs. New versions may involve API deprecation; Android apps using deprecated APIs need to be updated to ensure the apps' compatibility with old and new versions of Android. Updating deprecated APIs is a time-consuming endeavor. Hence, automating the updates of Android APIs can be beneficial for developers. CocciEvolve is the state-of-the-art approach for this automation. However, it has several limitations, including its inability to resolve out-ofmethod-boundary variables and the low code readability of its update due to the addition of temporary variables. In an attempt to further improve the performance of automated Android API update, we propose an approach named AndroEvolve, which addresses the limitations of CocciEvolve through the addition of data flow analysis and variable name denormalization.
To help developers, several studies have proposed automatic approaches for updating Android API usages  [5] ,  [7]. AppEvolve is a recent approach  [5]. It uses both before-and after-update code examples to learn the update automatically. However, while it is able to provide an applicable update for some examples, it was found to have several weaknesses and a replication study by Thung et al. [21]  demonstrated that AppEvolve works correctly only when the target file to be updated has a very similar syntax to the code example. More recently, Haryono et al. [7]  presented a new tool for automatic Android API update called CocciEvolve built on Coccinelle4J  [11]. CocciEvolve shows better performance than AppEvolve on 112 target files. The main improvements that CocciEvolve provides are: generated update-scripts in the Semantic Patch Language (SmPL)  [11] , updates generated by using only a single after-update example, and its capability to update multiple instances of deprecated API invocations within a single file.
However, the code example used in CocciEvolve must be in the form of an if statement containing the updated API in the "then" statement and the old API in the "else" statement, or vice versa. A sample of such an after-update code example can be seen in Figure  1. if (android. os. Build. VERSION. SDK_INT >= android. os. Build. VERSION_CODES. M) { minutes = picker. getMinute(); } else { minutes = picker. getCurrentMinute(); } Fig. 1 : An example of after-update code for getCurrentMinute() API The major problem of CocciEvolve is its inability to resolve all the values used as API arguments. These values in API method invocations in a method body can be expressions in various forms, such as literal expressions, name expressions, field access expressions, method invocations, and object creations.
When the expressions refer to a variable defined outside of the method boundary, CocciEvolve fails to resolve the variable or produce a working update. Another problem in CocciEvolve is about the readability of its update results. During the update process, CocciEvolve introduces temporary variables that refer to other variables in the target file. The temporary variables are used to ease the transformation process in CocciEvolve, but they clutter the update results. In this work, we propose AndroEvolve, an improved automated Android API usages update tool that addresses the limitations of CocciEvolve, with two new features: data flow analysis and variable name denormalization. During the update-script creation, data flow analysis is used to resolve the values used as API arguments, including all variables that are defined outside of the current method containing deprecated API invocations to be updated.
To evaluate the performance of AndroEvolve, we have conducted an experiment using a dataset of 360 target files containing 20 different Android APIs. We have compared the performance of AndroEvolve against CocciEvolve by counting the number of successful updates produced by each tool. AndroEvolve has produced 26. 9% more successful updates. For readability, we have compared the update results of AndroEvolve and CocciEvolve through both an automated measurement by using a popular readability scoring tool  [20]  and a manual measurement by asking the opinions of two experienced Android engineers. The measurements highlight that AndroEvolve produces updates that are about 50% and 83% more readable than CocciEvolve with respect to the automated and manual measurements respectively. The main contributions of our work are as follows: 1) We propose AndroEvolve, a tool that addresses the limitations of CocciEvolve.
AndroEvolve adds data flow analysis to resolve out-of-method variables and introduces variable name denormalization to increase update readability. 2) We evaluate AndroEvolve on a dataset containing 360 target files involving 20 Android APIs and show that it outperforms CocciEvolve in terms of both update success rate and the readability of the updates. The rest of this paper is organized as follows. Section II provides preliminaries on CocciEvolve, data flow analysis, and code readability. Section III provides the motivating examples that show the problems present in CocciEvolve. Section IV discusses our approach in creating AndroEvolve as the upgraded version of CocciEvolve. Section V provides the details on the experiments and its results. Section VI discusses the limitations of our work.
II. PRELIMINARIES CocciEvolve  [7]  is the state-of-the-art tool on automatic Android API usage update. It distinguishes itself by only requiring a single after-update example, providing a readable update-script, and introducing code normalization that tolerates some syntactic differences during code updates. Firstly, using only a single after-update example, Coc-ciEvolve becomes applicable to more cases than its predecessor AppEvolve  [5]  that requires both before-and afterupdate example. Secondly, a readable update-script is achieved through the use of Coccinelle4J  [10]. Coccinelle4J is a program matching and transformation tool for Java language, ported from Coccinelle  [11] ,  [14]. Coccinelle4J describes its transformation using a patch written in Semantic Patch Language (SmPL), which has similar syntax with diff.
Having a patch that describes the program transformation helps the developers to better understand the updates and transformations applied. Finally, by doing a normalization on both the afterupdate example and the target file, CocciEvolve minimizes the syntactic differences that may cause a failed update. Syntactic differences occur when the after-update and the target file API invocation arguments are expressed in different syntax. This was one of the main limitations of AppEvolve, as shown in a replication study by Thung et al. [21]. Data flow analysis, such as def-use analysis, is an analysis of the data within the code based on the control flow paths taken by the program. For each given expression at a point inside a program, data flow analysis can determine the value of the expression.
This variable and its definition is a new argument that is not yet defined in the deprecated API invocation, thus they are not present in the target file. Since CocciEvolve only performs an intra-procedural analysis of update examples and only considers line 74-75 for the update script creation, the variables related to the request object (line 41, 110-133) cannot be resolved, hence creating a non-working update. Our proposed solution is the addition of data flow analysis as a variable value resolver. We use data flow analysis on the after-update example's code to find the definitions of the variables used in the API invocation's arguments in a file scope. To further improve the functionality of this data flow analysis across files and Java classes, we also copy method and class definitions.
If a variable's value is resolved as a method invocation or an object creation, its method or class definition is needed to create a working update. AndroEvolve copies such definitions into the updated file, allowing the uses of those method invocations or object creations. Temporary variables in update results. Temporary variables are used in CocciEvolve to ease the process of code update. However, these variables remain in the updated code, affecting its readability. Furthermore, these variables only refer to other variables that are already in the actual target file. Consider the sample updated code in Figure  3 , there exist two temporary variables, parameterVariable0 (line 2) and classNameVariable (line 3). These variables refer to other parameters of the setTimeH method, and can be removed and replaced by their definitions.
IV. APPROACH A. AndroEvolve Overview The workflow of AndroEvolve is comprised of two main functionalities, update-script creation, and update-script application. Figure  4  provides a graphical description of this workflow. Update script creation takes as input the API update mapping and the after-update example of the API to create the update script. The API update mapping defines the mapping between the deprecated API and the updated API. Within the update script creation process, several components are at work. First, data flow analysis is used to resolve any out-ofmethod variables used by the updated API arguments in the after-update example. This data flow analysis also locates the definitions of any method invocations or object creations used as API arguments. Following the data flow analysis, source file normalization is done on the code block containing the API invocation.
Variable normalization introduces temporary variables as replacements for the API invocation arguments to facilitate the update process. Finally, an update script is created based on this modified example code. This update script, along with the API update mapping and the target file, is the input for the update application process. Within the update application process, there are also several steps that are applied. First, source file normalization is also used in the target file to ease the update process. The update script is then applied to the normalized code. After the update is done, we copy the methods and class definitions that are used by the method invocation or object creations that are used in the updated API arguments. Finally, we apply variable name denormalization to remove temporary variables introduced by the variable normalization and replace their usage with the original expressions used as the API arguments.
e. , a variable locally defined or passed in via a method parameter). Suppose that CocciEvolve is given an after-update example as shown in the first example in Figure  5. Part of the code containing the API invocation and its argument is first normalized, resulting in the normalized first example code (line 30-44). Slice of the normalized code that is used to create the update script is the part contained within the if statement, shown in line 40-42. Using this normalized code slice, CocciEvolve will produce an incorrect update, as shown in Figure  6. This update script is incorrect since based on the code slice, newParametervariable0 is only resolved to the bound variable, attributes (line 40). This is because CocciEvolve cannot resolve the correct value of the expression used as the API invocation argument and only uses the bound variable found within the slice, which is attributes.
Due to this reason, CocciEvolve can generate a correct update script for the second example (as shown in Figure  7 ), but not for the first example. 5  This problem severely limits the coding styles that are acceptable as examples for CocciEvolve, which subsequently limits its effectiveness. This problem also prevents Coc-ciEvolve from being able to produce a working update script for examples which contain free variables. To alleviate this problem, AndroEvolve uses Data Flow Analysis (DFA) to resolve the values of expressions used as arguments in an API method invocation. This resolver should handle all possible forms of Java expressions. This data flow analysis is built to gather and predict a set of possible values @bottomupper_classname@ expression exp0, exp1; identifier iden0, classIden; @@.
) method is a public method that can be referenced directly, no object or class is used in its invocation, thus resulting in no scope to resolve. Next, we resolve the arguments of the method invocation. The first argument, 3 is an integer literal expression, thus no replacement is needed. However, the second argument, amplitude is a name expression, so we need to resolve its definition. Resolving this argument results in its definition which is duration / frequency (line 45). Since this definition still contains expressions in the form of name expression, we further resolve their values recursively. From this process, we found the literal expressions of 9 (line 43) for duration and 3 This data flow analysis is built for AndroEvolve as an upgrade from CocciEvolve. Therefore, the DFA is run as a preprocessing step before the update script creation.