Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Automatic code inspection.

Slides:



Advertisements
Similar presentations
Top 10 User Mistakes with Static Analysis Sate IV March 2012.
Advertisements

Test process essentials Riitta Viitamäki,
Eiffel: Analysis, Design and Programming Bertrand Meyer (Nadia Polikarpova) Chair of Software Engineering.
By Rohen Shah – rxs07u.  Introduction  Different methodologies used  Different types of testing tools  Most commonly used testing tools  Summary.
SOFTWARE TESTING. Software Testing Principles Types of software tests Test planning Test Development Test Execution and Reporting Test tools and Methods.
An Analysis and Survey of the Development of Mutation Testing by Yue Jia and Mark Harmon A Quick Summary For SWE6673.
Coding Standards for Java An Introduction. Why Coding Standards are Important? Coding Standards lead to greater consistency within your code and the code.
FIT FIT1002 Computer Programming Unit 19 Testing and Debugging.
Engineering Secure Software. The Power of Source Code  White box testing Testers have intimate knowledge of the specifications, design, Often done by.
Reverse Engineering © SERG Code Cloning: Detection, Classification, and Refactoring.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
Static Code Analysis to Find Bugs Wright.edu CS7140 Spring 2013 (Slides collected from many sources)
Cpeg421-08S/final-review1 Course Review Tom St. John.
Turning Eclipse Against Itself: Finding Errors in Eclipse Sources Benjamin Livshits Stanford University.
JArchitect Benefits by CoderGears
23 October 2002Emmanuel Ormancey1 Spam Filtering at CERN Emmanuel Ormancey - 23 October 2002.
Continous architecture analysis in 3D. 2 Stefan Rinderle Kontinuierliche Architekturanalyse in 3D ○ Bachelor an der HS Karlsruhe ○ Master "Software Engineering"
Estimation Wrap-up CSE 403, Spring 2008, Alverson Spolsky.
Development Testing – Is It Worth It? Arthur Hicken September 2012.
Software Testing. Definition To test a program is to try to make it fail.
1 Yolanda Gil Information Sciences InstituteJanuary 10, 2010 Requirements for caBIG Infrastructure to Support Semantic Workflows Yolanda.
(1) Automated Quality Assurance Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation Slightly adapted by Anders Børjesson.
EMI INFSO-RI Metrics review Claudio (SA1), Lars, Duarte, Eamonn and Maria (SA2)
CS 360 Lecture 3.  The software process is a structured set of activities required to develop a software system.  Fundamental Assumption:  Good software.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Concordia University Department of Computer Science and Software Engineering Click to edit Master title style COMPILER DESIGN Review Joey Paquet,
Cross Language Clone Analysis Team 2 October 27, 2010.
Joey Paquet, Lecture 12 Review. Joey Paquet, Course Review Compiler architecture –Lexical analysis, syntactic analysis, semantic.
637 – Introduction (Ch 1) Introduction to Software Testing Chapter 1 Jeff Offutt Information & Software Engineering SWE 437 Software Testing
Refactoring1 Improving the structure of existing code.
May 31, May 31, 2016May 31, 2016May 31, 2016 Azusa, CA Sheldon X. Liang Ph. D. Computer Science at Azusa Pacific University Azusa Pacific University,
Static Analysis James Walden Northern Kentucky University.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
Software Debugging, Testing, and Verification Presented by Chris Hundersmarck November 10, 2004 Dr. Bi’s SE516.
Application of Design Heuristics in the Designing and Implementation of Object Oriented Informational Systems.
1© Nokia Siemens Networks Presentation / Author / Date For internal use T Better Code Faster - Next Generation Java Continuous Integration Environment.
CS5103 Software Engineering Lecture 02 More on Software Process Models.
Demo of Scalable Pluggable Types Michael Ernst MIT Dagstuhl Seminar “Scalable Program Analysis” April 17, 2008.
Cross Language Clone Analysis Team 2 February 3, 2011.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
May08-21 Model-Based Software Development Kevin Korslund Daniel De Graaf Cory Kleinheksel Benjamin Miller Client – Rockwell Collins Faculty Advisor – Dr.
Cross Language Clone Analysis Team 2 February 3, 2011.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Lecture #20: Profiling NetBeans Profiler 6.0.
Data Mining What is to be done before we get to Data Mining?
Part 1 The Basics of Information Systems. Purpose of Information Systems Information systems ◦ Collects, stores and organizes information ◦ Retrieves.
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Tools Fest: MS Project.
Findbugs Tin Bui-Huy September, Content What is bug? What is bug? What is Findbugs? What is Findbugs? How to use Findbugs? How to use Findbugs?
STATIC CODE ANALYSIS. OUTLINE  INTRODUCTION  BACKGROUND o REGULAR EXPRESSIONS o SYNTAX TREES o CONTROL FLOW GRAPHS  TOOLS AND THEIR WORKING  ERROR.
Computer Scientist, Software and Systems Division, ITL
Verification and Validation
Introduction to Parsing (adapted from CS 164 at Berkeley)
Chapter 8 – Software Testing
runtime verification Brief Overview Grigore Rosu
Integration by Substitution
Definition of Ready.
: Clone Refactoring Davood Mazinanian Nikolaos Tsantalis Raphael Stein
Lecture 15 (Notes by P. N. Hilfinger and R. Bodik)
LL and Recursive-Descent Parsing Hal Perkins Autumn 2011
CSE 403 Lecture 13 Black/White-Box Testing Reading:
Capability Maturity Model
CS5103 Software Engineering
Helping you make your code better
LL and Recursive-Descent Parsing Hal Perkins Autumn 2009
LL and Recursive-Descent Parsing Hal Perkins Winter 2008
White Box testing & Inspections
Automatically Diagnosing and Repairing Error Handling Bugs in C
Java Code Review with CheckStyle
Presentation transcript:

Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Automatic code inspection

Software Engineering, lecture : Automatic code inspection 2 2 Automation of code reviewing Possible bugs Code convention violations Dead code Duplicated code Suboptimal code According to a report released by The Standish Group automated code inspection reduced the number of people needed for manual code reviews by 50%.

Software Engineering, lecture : Automatic code inspection 3 3 Main concept Syntactical matching of rules violation Violation of rule R 1 Violation of rule R 2 Rule – is description of set of ASTs that can be reason for the one of the mentioned above problems.

Software Engineering, lecture : Automatic code inspection 4 4 How it works For expressing some rules representation of AST should contain whitespaces, tabulations, EOLs, comments Rules represented via Java code or XML XQuery Input program Parser AST Tree traverser Warning list R1R1 R2R2 RnRn

Software Engineering, lecture : Automatic code inspection 5 5 Existing tools - Checkstyle - PMD - FindBugs - JCSC (Java Coding Standard Checker)

Software Engineering, lecture : Automatic code inspection 6 6 Why PMD? Support user rules creation via both Java code and XML XQuery Standard rules cover wide range of rule types Stable version Support plug-ins for various IDE

Software Engineering, lecture : Automatic code inspection 7 7 What does ‘PMD’ mean? Pretty Much Done Project Mess Detector Project Monitoring Directives Project Meets Deadline Programming Mistake Detector Pounds Mistakes Dead PMD Meaning Discovery (recursion, hooray!) Programs of Mass Destruction A 'Chaotic Metal' rock band name “Pretty Marry Dies”

Software Engineering, lecture : Automatic code inspection 8 8 Application of the PMD Select standard rules Write project specific rules Select rules parameters Source code Changing Warnings Source code Comments Source code New source code PMD Bug fixing Warnings comments writing

Software Engineering, lecture : Automatic code inspection 9 9 Future development: automatic bug fixing Program transformation via rewriting rules. For example StrategoXT. Violation of rule R 1 Violation of rule R 2 Fixed subtree R’ 1 Fixed subtree R’ 2

Software Engineering, lecture : Automatic code inspection Future development: integration with a prover requires i > 5; int f(int i){ if (i < 2) //UnconditionalIfStatement return i +1; else return i -1; }

Software Engineering, lecture : Automatic code inspection Future development: empirics for filtering warnings Goal:  Decrease warnings number  Remove false warnings Problems:  Fuzzy warning criteria  Context depending warnings

Software Engineering, lecture : Automatic code inspection Pros and cons Pros  Don’t require any additional efforts.  Users don’t need have any specific knowledge. It’s enough that user understand notion of the AST. Cons  Not sound. It’s possible that many from the found warnings are not real errors.  Not complete. It can miss many real errors.