255 research outputs found

    Smart Contracts Software Metrics: a First Study

    Get PDF
    © 2018 The Author(s).Smart contracts (SC) are software codes which reside and run over a blockchain. The code can be written in different languages with the common purpose of implementing various kinds of transactions onto the hosting blockchain, They are ruled by the blockchain infrastructure and work in order to satisfy conditions typical of traditional contracts. The software code must satisfy constrains strongly context dependent which are quite different from traditional software code. In particular, since the bytecode is uploaded in the hosting blockchain, size, computational resources, interaction between different parts of software are all limited and even if the specific software languages implement more or less the same constructs of traditional languages there is not the same freedom as in normal software development. SC software is expected to reflect these constrains on SC software metrics which should display metric values characteristic of the domain and different from more traditional software metrics. We tested this hypothesis on the code of more than twelve thousands SC written in Solidity and uploaded on the Ethereum blockchain. We downloaded the SC from a public repository and computed the statistics of a set of software metrics related to SC and compared them to the metrics extracted from more traditional software projects. Our results show that generally Smart Contracts metrics have ranges more restricted than the corresponding metrics in traditional software systems. Some of the stylized facts, like power law in the tail of the distribution of some metrics, are only approximate but the lines of code follow a log normal distribution which reminds of the same behavior already found in traditional software systems.Submitted Versio

    Mitigating Health Data Poverty: Generative Approaches versus Resampling for Time-series Clinical Data

    Get PDF
    Several approaches have been developed to mitigate algorithmic bias stemming from health data poverty, where minority groups are underrepresented in training datasets. Augmenting the minority class using resampling (such as SMOTE) is a widely used approach due to the simplicity of the algorithms. However, these algorithms decrease data variability and may introduce correlations between samples, giving rise to generative approaches based on GAN. Generation of high-dimensional, time-series, authentic data that provide a wide distribution coverage of the real data, remains a challenging task for both resampling and GAN-based approaches. In this work we propose CA-GAN architecture that addresses some of the shortcomings of the current approaches, where we provide a detailed comparison with both SMOTE and WGAN-GP, using a high-dimensional, time-series, real dataset of 3343 hypotensive Caucasian and Black patients. We show that our approach is better at both generating authentic data of the minority class and remaining within the original distribution of the real data

    How do you propose your code changes? Empirical analysis of affect metrics of pull requests on GitHub

    Get PDF
    Software engineering methodologies rely on version control systems such as git to store source code artifacts and manage changes to the codebase. Pull requests include chunks of source code, history of changes, log messages around a proposed change of the mainstream codebase, and much discussion on whether to integrate such changes or not. A better understanding of what contributes to a pull request fate and latency will allow us to build predictive models of what is going to happen and when. Several factors can influence the acceptance of pull requests, many of which are related to the individual aspects of software developers. In this study, we aim to understand how the affect (e.g., sentiment, discrete emotions, and valence-arousal-dominance dimensions) expressed in the discussion of pull request issues influence the acceptance of pull requests. We conducted a mining study of large git software repositories and analyzed more than 150,000 issues with more than 1,000,000 comments in them. We built a model to understand whether the affect and the politeness have an impact on the chance of issues and pull requests to be merged - i.e., the code which fixes the issue is integrated in the codebase. We built two logistic classifiers, one without affect metrics and one with them. By comparing the two classifiers, we show that the affect metrics improve the prediction performance. Our results show that valence (expressed in comments received and posted by a reporter) and joy expressed in the comments written by a reporter are linked to a higher likelihood of issues to be merged. On the contrary, sadness, anger, and arousal expressed in the comments written by a reporter, and anger, arousal, and dominance expressed in the comments received by a reporter, are linked to a lower likelihood of a pull request to be merged

    Computing the Strategy to Commit to in Polymatrix Games

    Get PDF
    Leadership games provide a powerful paradigm to model many real-world settings. Most literature focuses on games with a single follower who acts optimistically, breaking ties in favour of the leader. Unfortunately, for real-world applications, this is unlikely. In this paper, we look for efficiently solvable games with multiple followers who play either optimistically or pessimistically, i.e., breaking ties in favour or against the leader. We study the computational complexity of finding or approximating an optimistic or pessimistic leader-follower equilibrium in specific classes of succinct games—polymatrix like—which are equivalent to 2-player Bayesian games with uncertainty over the follower, with interdependent or independent types. Furthermore, we provide an exact algorithm to find a pessimistic equilibrium for those game classes. Finally, we show that in general polymatrix games the computation is harder even when players are forced to play pure strategies

    An Organized Repository of Ethereum Smart Contracts’ Source Codes and Metrics

    Get PDF
    International audienceMany empirical software engineering studies show that there is a need for repositories where source codes are acquired, filtered and classified. During the last few years, Ethereum block explorer services have emerged as a popular project to explore and search for Ethereum blockchain data such as transactions, addresses, tokens, smart contracts’ source codes, prices and other activities taking place on the Ethereum blockchain. Despite the availability of this kind of service, retrieving specific information useful to empirical software engineering studies, such as the study of smart contracts’ software metrics, might require many subtasks, such as searching for specific transactions in a block, parsing files in HTML format, and filtering the smart contracts to remove duplicated code or unused smart contracts. In this paper, we afford this problem by creating Smart Corpus, a corpus of smart contracts in an organized, reasoned and up-to-date repository where Solidity source code and other metadata about Ethereum smart contracts can easily and systematically be retrieved. We present Smart Corpus’s design and its initial implementation, and we show how the data set of smart contracts’ source codes in a variety of programming languages can be queried and processed to get useful information on smart contracts and their software metrics. Smart Corpus aims to create a smart-contract repository where smart-contract data (source code, application binary interface (ABI) and byte code) are freely and immediately available and are classified based on the main software metrics identified in the scientific literature. Smart contracts’ source codes have been validated by EtherScan, and each contract comes with its own associated software metrics as computed by the freely available software PASO. Moreover, Smart Corpus can be easily extended as the number of new smart contracts increases day by day

    A User-Oriented Model for Oracles' Gas Price Prediction

    Get PDF
    International audienceThe Ethereum blockchain is a distributed database of transactions, where the Gas Oracles suggest the users the Gas price's categories to get a transaction recorded. The paper explores the idea that the Gas Oracles are based on a data-centered model which does not provide users with a reliable prediction. We present an empirical study to test the reliability of the existing Gas Oracles from both the points of view of the Gas price predictions and the existing categories. The study reveals that the Gas Oracles' predictions fail more often than advertised and shows that the Gas price categories do not correspond to the categories set by the users. Therefore we propose a user-oriented model for the Oracles' Gas price prediction, based on two Gas price categories actually corresponding to the users' interests and a new method to estimate the Gas price. The new method, performing the Poisson regression at smaller intervals of time, predicts the Gas price to pay with a lower margin of error when compared to the actual one. The predictions based on the user-oriented model thus provide the users with a more effective Gas price to set

    The number of emergency department visits for psychiatric emergencies is strongly associated with mean temperature and humidity variations. Results of a nine year survey

    Get PDF
    Several disorders, such as renal colics, stroke, atrial fibrillation and others, are epidemiologically associated with seasonality and microclimatic variations. Although evidence is still limited, an association between psychiatric emergencies and seasonality has also been previously described. In order to elucidate the possible association between weather and incidence of psychiatric emergencies in a country with temperate climate, we analyzed the influence of day by day climate changes on the number of visits for psychiatric emergencies in an urban emergency department (ED) of northern Italy. All ED visits for psychiatric emergencies were retrieved from the hospital database from 2002 to 2010. The total number of ED visits was 725,812 throughout the study period, 11,786 of which for emergency psychiatric problems. We found a strong seasonal distribution of emergency psychiatric visits, peaking in summer and at the beginning of spring. The linear regression analysis showed a strong positive association between number of daily emergency psychiatric visits and mean daily air temperature (R=0.82; P<0.001), and an inverse association with mean daily air humidity (R=-0.52; P<0.001). These findings suggest that psychiatric disorders follow a significant seasonal variation, so that it may be advisable to strengthen psychiatric emergency services during the hottest months
    • …
    corecore