34 research outputs found

    Magic Literals in Pharo

    Get PDF
    International audienceLiterals are constant values (numbers, strings, etc.) used in the source code. Magic literals are the ones used without a clear explanation of their meaning. Presence of such literals harms source code readability, decreases its modularity, and encourages code duplication. Identifying magic literals is not straightforward. A literal can be considered self-explanatory in one context and magic in another. We need a heuristic to help developers spot magic literals. In this article, we study and characterize the literals in Pharo. We implemented a heuristic to detect magic literals and integrated it as a code critic rule for System Browser and Critics Browser in Pharo 7. We run our heuristic on 112,500 Pharo methods which reported 23,292 magic literals spread across 8,986 methods. We manually validated our approach on a random subset of 100 methods and found that 62% of the reported literals in those methods are indeed magic

    Exposing Test Analysis Results with DrTests

    Get PDF
    International audienceTests are getting the cornerstone of continuous development process and software evolution. Tests are the new gold. To improve test quality, a plethora of analyses is proposed such as test smells, mutation testing, test coverage. The problem is that each analysis often needs a particular way to expose its results to the developer. There is a need for an architecture supporting test running and analysis in a modular and extensible way. In this article we present an extensi-ble plugin-based architecture to run and report test results. DrTests is a new test browser that implements such plugin-based architecture. DrTests supports the execution of rotten tests, comments to tests, coverage and profiling tests

    Rotten Green Tests A First Analysis

    Get PDF
    Unit tests are a tenant of agile programming methodologies, and are widely used to improve code quality and prevent code regression. A passing (green) test is usually taken as a robust sign that the code under test is valid. However, we have noticed that some green tests contain assertions that are never executed; these tests pass not because they assert properties that are true, but because they assert nothing at all. We call such tests Rotten Green Tests. Rotten Green Tests represent a worst case: they report that the code under test is valid, but in fact do nothing to test that validity, beyond checking that the code does not crash. We describe an approach to identify rotten green tests by combining simple static and dynamic analyses. Our approach takes into account test helper methods, inherited helpers, and trait compositions, and has been implemented in a tool called DrTest. We have applied DrTest to several test suites in Pharo 7.0, and identified many rotten tests, including some that have been " sleeping " in Pharo for at least 5 years

    Recommendations for Evolving Relational Databases: Technical Report

    Get PDF
    This report contains technical details that could not be included in the article "Recommendations for Evolving Legacy Databases" submitted to the 32nd International Conference on Advanced Information Systems Engineering (CAISE'20)

    Recommendations for Evolving Relational Databases

    Get PDF
    International audienceRelational databases play a central role in many information systems. Their schemas contain structural and behavioral entity descriptions. Databases must continuously be adapted to new requirements of a world in constant change while: (1) relational database management systems (RDBMS) do not allow inconsistencies in the schema; (2) stored procedure bodies are not meta-described in RDBMS such as PostgreSQL that consider their bodies as plain text. As a consequence , evaluating the impact of an evolution of the database schema is cumbersome , being essentially manual. We present a semi-automatic approach based on recommendations that can be compiled into a SQL patch fulfilling RDBMS constraints. To support recommendations, we designed a meta-model for relational databases easing computation of change impact. We performed an experiment to validate the approach by reproducing a real evolution on a database. The results of our experiment show that our approach can set the database in the same state as the one produced by the manual evolution in 75% less time

    CodeCritics Applied to Database Schema: Challenges and First Results

    Get PDF
    Relational databases (DB) play a critical role in many information systems. For different reasons, their schemas gather not only tables and columns but also views, triggers or stored functions (i.e., fragments of code describing treatments). As for any other code-related artefact, software quality in a DB schema helps avoiding future bugs. However, few tools exist to analyse DB quality and prevent the introduction of technical debt. Moreover, these tools suffer from limitations like the difficulty to deal with some entities (e.g., functions) or dependencies between entities. This paper presents research issues related to assessing the software quality of a DB schema by adapting existing source code analysis research to database schemas. We present preliminary results that have been validated through the implementation of DBCritics, a prototype tool to perform static analysis on the SQL source code of a database schema. DBCritics addresses the limitations of existing DB quality tools based on an internal representation considering all entities of the database and their relationships

    CodeCritics applied to database schema: Challenges and first results

    Get PDF
    International audience—Relational databases (DB) play a critical role in many information systems. For different reasons, their schemas gather not only tables and columns but also views, triggers or stored functions (i.e., fragments of code describing treatments). As for any other code-related artefact, software quality in a DB schema helps avoiding future bugs. However, few tools exist to analyse DB quality and prevent the introduction of technical debt. Moreover, these tools suffer from limitations like the difficulty to deal with some entities (e.g., functions) or dependencies between entities. This paper presents research issues related to assessing the software quality of a DB schema by adapting existing source code analysis research to database schemas. We present preliminary results that have been validated through the implementation of DBCritics, a prototype tool to perform static analysis on the SQL source code of a database schema. DBCritics addresses the limitations of existing DB quality tools based on an internal representation considering all entities of the database and their relationships

    Software Engineering Issues in RDBMS, a Preliminary Survey

    No full text
    International audienceRelational database management systems (RDBMS) come with many features. Tables and columns but also views, triggers or stored procedures. Some database architects (DBAs) feel a lack of tools to help them during the implementation and the evolution of the database. In this paper, we conducted a preliminary survey in the PostgreSQL community to get an idea of the usage they make of some of the PostgreSQL features and to gather feedbacks of the issues they face using these features. The results of this survey suggest that these features are fairly well used by DBAs and that DBAs using them encounter implementation issues

    Software Engineering Issues in RDBMS, a Preliminary Survey

    No full text
    International audienceRelational database management systems (RDBMS) come with many features. Tables and columns but also views, triggers or stored procedures. Some database architects (DBAs) feel a lack of tools to help them during the implementation and the evolution of the database. In this paper, we conducted a preliminary survey in the PostgreSQL community to get an idea of the usage they make of some of the PostgreSQL features and to gather feedbacks of the issues they face using these features. The results of this survey suggest that these features are fairly well used by DBAs and that DBAs using them encounter implementation issues
    corecore