ABSTRACT
We present SQLInspect, a tool intended to assist developers who deal with SQL code embedded in Java applications. It is integrated into Eclipse as a plug-in that is able to extract SQL queries from Java code through static string analysis. It parses the extracted queries and performs various analyses on them. As a result, one can readily explore the source code which accesses a given part of the database, or which is responsible for the construction of a given SQL query. SQL-related metrics and common coding mistakes are also used to spot inefficiently or defectively performing SQL statements and to identify poorly designed classes, like those that construct many queries via complex control-flow paths. SQLInspect is a novel tool that relies on recent query extraction approaches. It currently supports Java applications working with JDBC and SQL code written for MySQL or Apache Impala. Check out the live demo of SQLInspect at http://perso.unamur.be/~cnagy/sqlinspect.
- David Anderson and Mark Hills. 2017. Supporting Analysis of SQL Queries in PHP AiR. In Proc. of the 17th IEEE Int. Work. Conf. on Source Code Analysis and Manipulation.Google ScholarCross Ref
- Aivar Annamaa, Andrey Breslav, Jevgeni Kabanov, and Varmo Vene. 2010. An Interactive Tool for Analyzing Embedded SQL Queries. In Proc. of the 8th Asian Conf. on Prog. Languages and Systems (APLAS2010). Springer-Verlag, 131--138. Google ScholarDigital Library
- Huib van den Brink, Rob van der Leek, and Joost Visser. 2007. Quality Assessment for Embedded SQL. In Proc. of the 7th Int. Working Conf. on Source Code Analysis and Manipulation (SCAM2007). IEEE, 163--170. Google ScholarDigital Library
- Aske Simon Christensen, Anders Møller, and Michael I. Schwartzbach. 2003. Precise Analysis of String Expressions. In Proc. of the 10th Int. Conf. on Static Analysis (SAS2003). Springer-Verlag, 1--18. Google ScholarDigital Library
- Bill Karwin. 2010. SQL Antipatterns: Avoiding the Pitfalls of Database Programming (Pragmatic Programmers). Pragmatic Bookshelf. Google ScholarDigital Library
- Mario Linares-Vásquez, Boyang Li, Christopher Vendome, and Denys Poshyvanyk. 2016. Documenting Database Usages and Schema Constraints in Database-centric Applications. In Proc. of the 25th Int. Symp. on Soft. Testing and Analysis. ACM, 12. Google ScholarDigital Library
- Loup Meurice, Csaba Nagy, and Anthony Cleve. 2016. Static Analysis of Dynamic Database Usage in Java Systems. In Proc. of the 28th Int. Conf. on Advanced Information Systems Engineering (CAiSE2016). Springer LNCS.Google ScholarCross Ref
- Csaba Nagy and Anthony Cleve. 2017. Static Code Smell Detection in SQL Queries Embedded in Java Code. In Proc. of the 17th IEEE Int. Working Conf. on Source Code Analysis and Manipulation (SCAM 2017). IEEE Comp. Soc.Google Scholar
- Csaba Nagy, Loup Meurice, and Anthony Cleve. 2015. Where Was This SQL Query Executed? A Static Concept Location Approach. In Proc. of the 22nd Int. Conf. on Software Analysis, Evolution, and Reeng. (SANER2015). IEEE Comp. Soc., 580--584.Google ScholarCross Ref
Recommendations
Java and relational databases (tutorial): SQLJ
SIGMOD '98: Proceedings of the 1998 ACM SIGMOD international conference on Management of dataThis Tutorial presents the latest developments in the area of Java and Relational Databases. The material is based on the SQLJ consortium effort whose goal is to leverage Java technology for SQL processing. The SQLJ effort is driven by major industry ...
Java and relational databases (tutorial): SQLJ
This Tutorial presents the latest developments in the area of Java and Relational Databases. The material is based on the SQLJ consortium effort whose goal is to leverage Java technology for SQL processing. The SQLJ effort is driven by major industry ...
Finding bugs in eclipse
OOPSLA '07: Companion to the 22nd ACM SIGPLAN conference on Object-oriented programming systems and applications companionThis will be a live demonstration of FindBugs, a static analysis bug finding tool, on the current development version of Eclipse 3.4. FindBugs reports issues such as null pointer dereferences, comparing incompatible types with equals, invalid method ...
Comments