15,874 research outputs found

    Private API Access and Functional Mocking in Automated Unit Test Generation

    Get PDF
    Not all object oriented code is easily testable: Dependency objects might be difficult or even impossible to instantiate, and object-oriented encapsulation makes testing potentially simple code difficult if it cannot easily be accessed. When this happens, then developers can resort to mock objects that simulate the complex dependencies, or circumvent object-oriented encapsulation and access private APIs directly through the use of, for example, Java reflection. Can automated unit test generation benefit from these techniques as well? In this paper we investigate this question by extending the EvoSuite unit test generation tool with the ability to directly access private APIs and to create mock objects using the popular Mockito framework. However, care needs to be taken that this does not impact the usefulness of the generated tests: For example, a test accessing a private field could later fail if that field is renamed, even if that renaming is part of a semantics-preserving refactoring. Such a failure would not be revealing a true regression bug, but is a false positive, which wastes the developer's time for investigating and fixing the test. Our experiments on the SF110 and Defects4J benchmarks confirm the anticipated improvements in terms of code coverage and bug finding, but also confirm the existence of false positives. However, by ensuring the test generator only uses mocking and reflection if there is no other way to reach some part of the code, their number remains small

    Effect of folic acid supplementation in pregnancy on preeclampsia: The folic acid clinical trial study

    Get PDF
    Copyright Ā© 2013 Shi Wu Wen et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.Preeclampsia (PE) is hypertension with proteinuria that develops during pregnancy and affects at least 5% of pregnancies. The Effect of Folic Acid Supplementation in Pregnancy on Preeclampsia: the Folic Acid Clinical Trial (FACT) aims to recruit 3,656 high risk women to evaluate a new prevention strategy for PE: supplementation of folic acid throughout pregnancy. Pregnant women with increased risk of developing PE presenting to a trial participating center between 80/7 and 166/7 weeks of gestation are randomized in a 1: 1 ratio to folic acid 4.0 mg or placebo after written consent is obtained. Intent-to-treat population will be analyzed. The FACT study was funded by the Canadian Institutes of Health Research in 2009, and regulatory approval from Health Canada was obtained in 2010. A web-based randomization system and electronic data collection system provide the platform for participating centers to randomize their eligible participants and enter data in real time. To date we have twenty participating Canadian centers, of which eighteen are actively recruiting, and seven participating Australian centers, of which two are actively recruiting. Recruitment in Argentina, UK, Netherlands, Brazil, West Indies, and United States is expected to begin by the second or third quarter of 2013. This trial is registered with NCT01355159. Ā© 2013 Shi Wu Wen et al.The Canadian Institutes of Healt

    A position sensitive phoswich hard X-ray detector system

    Get PDF
    A prototype position sensitive phoswich hard X-ray detector, designed for eventual astronomical usage, was tested in the laboratory. The scintillation crystal geometry was designed on the basis of a Monte Carlo simulation of the internal optics and includes a 3mm thick NaI(T1) primary X-ray detector which is actively shielded by a 20 mm thick CsI(T1) scintillation crystal. This phoswich arrangement is viewed by a number two inch photomultipliers. Measured values of the positional and spectral resolution of incident X-ray photons are compared with calculation

    The Urban Political Ecology of Post-industrial Scottish Towns: Examining Greengairs and Ravenscraig

    Get PDF
    Urban ecological politics is shaped by both moments of concerted action and more silent perceptions and responses. Instead of only being evident in situations of organised protest, the politics of urban ecology is also manifested, in material and symbolic terms, in the daily life of the residents. The fragmentation of urban political ecology turns out to be an important element in the affirmation of post-political forms of urban governance. Those issues were the object of fieldwork research carried out in Greengairs and Ravenscraig, two towns in North Lanarkshire, near Glasgow, with the goal of unravelling the understanding and the coping mechanisms of environmentally deprived residents. The towns are permeated by a widespread, often dissimulated, political ecology that is nonetheless always present. Empirical results demonstrate that a more comprehensive handling of the political ecology of the urban is crucial in order to halt the sources of marginalisation and ecological degradation

    Applying unsupervised learning to resolve evolutionary histories and explore the galaxy-halo connection in IllustrisTNG

    Get PDF
    We examine the effectiveness of identifying distinct evolutionary histories in IllustrisTNG-100 galaxies using unsupervised machine learning with Gaussian Mixture Models. We focus on how clustering compressed metallicity histories and star formation histories produces subpopulations of galaxies with distinct evolutionary properties (for both halo mass assembly and merger histories). By contrast, clustering with photometric colours fail to resolve such histories. We identify several populations of interest that reflect a variety of evolutionary scenarios supported by the literature. Notably, we identify a population of galaxies inhabiting the upper-red sequence, M* >Ā 1010MāŠ™ that has a significantly higher ex-situ merger mass fraction present at fixed masses, and a star formation history that has yet to fully quench, in contrast to an overlapping, satellite-dominated population along the red sequence, which is distinctly quiescent. Extending the clustering to study four clusters instead of three further divides quiescent galaxies, while star forming ones are mostly contained in a single cluster, demonstrating a variety of supported pathways to quenching. In addition to these populations, we identify a handful of populations from our other clusters that are readily applicable to observational surveys, including a population related to post starburst (PSB) galaxies, allowing for possible extensions of this work in an observational context, and to corroborate results within the IllustrisTNG ecosystem.PostprintPeer reviewe
    • ā€¦
    corecore