CSE 403 Lecture 11. Static Code Analysis. Reading: IEEE Xplore, "Using Static Analysis to Find Bugs"

Similar documents
Ant. Originally ANT = Another Neat Tool. Created by James Duncan Davidson Now an Apache open-source project

CSE 390 Lecture 8. Large Program Management: Make; Ant

Software Building (Sestavování aplikací)

Introduction to Software Engineering: Tools and Environments. Session 9. Oded Lachish

... Fisheye Crucible Bamboo

Unit Tests. Unit Testing. What to Do in Unit Testing? Who Does it? 4 tests (test types) You! as a programmer

JAVA V Tools in JDK Java, winter semester ,2017 1

Software Engineering - Development Infrastructure 2. Kristjan Talvar Nortal

MAVEN SUCKS NO(W) REALLY

An Integrated Approach to Managing Windchill Customizations. Todd Baltes Lead PLM Technical Architect SRAM

gradle : Building Android Apps Mobel Meetup

Software Development. COMP220/COMP285 Seb Coope Ant: Structured Build

One suite that suits them all

Getting It Right COMS W4115. Prof. Stephen A. Edwards Spring 2007 Columbia University Department of Computer Science

Kevin Lee IBM Rational Software SCM23

S A M P L E C H A P T E R

Build Tools. Software Engineering SS A tool was needed. Agenda for today. Build tools. Software complexity. Build tools

Build Tools. Software Engineering SS 2007

Benefits of the Build

Package Management and Build Tools

Abstract. Avaya Solution & Interoperability Test Lab

Core XP Practices with Java and Eclipse: Part 1

Gant as Ant and Maven Replacement

COMP220/285 Lab sessions 1-3

An Introduction to Ant

Software Quality - Tips Techniques & Tools

Construction: version control and system building

Apache NetBeans 9.0 New and Noteworthy

Practical Java. Using ant, JUnit and log4j. LearningPatterns, Inc. Collaborative Education Services

Lukáš Asník. Software Development & Monitoring Tools (NSWI126)

JBoss Tattletale 1.1 Developer's Guide

Exceptions and Libraries

Java Programming. Manuel Oriol, March 22nd, 2007

Index. Symbols. /**, symbol, 73 >> symbol, 21

S A M P L E C H A P T E R

CSE 403 Lecture 16. Continuous Integration; Integration Testing. Reading:

System Testing. Contents. Steven J Zeil. April 9, 2013

JAVA V Annotations Java, winter semester ,2016 1

The Intel VTune Performance Analyzer: Insights into Converting a GUI from Windows* to Eclipse*

I Got My Mojo Workin'

The Major Mutation Framework

AppFactory User Guide

Quality-Driven Build Scripts for Java Applications. Duy (uu-eee) B. Vo Graduate Student San José State University Department of Computer Science

Construction: version control and system building

Index. Bitwise operations, 131. Cloud, 88, 101

Beginner s guide to continuous integration

GWT in Action by Robert Hanson and Adam Tacy

JDO Tools Guide (v5.1)

Continuous Integration & Code Quality MINDS-ON NUNO 11 APRIL 2017

MEDIA COMPUTATION DRJAVA. Lecture 11.3 November 7, 2008

B O NU S C H A P T E R

ECLIPSE JAVA DOCUMENTATION

Ant: The Definitive Guide

JSR 168 Portlet Spec

Hello Gradle. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

5.2.1 Ant, indispensable Ant

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Build automation. CSE260, Computer Science B: Honors Stony Brook University

Ibis RMI User s Guide

JPA Tools Guide (v5.0)

What is Maven? Apache Maven is a software project management and comprehension tool (build, test, packaging, reporting, site, deploy).

Oracle Developer Depot Technical Review

Getting Started with the Cisco Multicast Manager SDK

The Fénix Framework Detailed Tutorial

Hello Maven. TestNG, Eclipse, IntelliJ IDEA. Óbuda University, Java Enterprise Edition John von Neumann Faculty of Informatics Lab 2.

Simplified Build Management with Maven

Directory structure and development environment set up

Selenium Testing Tools Cookbook

CSE 421 Course Overview and Introduction to Java

The Checker Framework Manual

Build Automation Kurt Christensen

Analysis Tool Project

SpringSource Tool Suite 2.7.1

Class 1 Introduction to Selenium, Software Test Life Cycle.

Ant Tasks User s Guide

JUnit Howto. Blaine Simpson

This checklist tells you how to create accounts and obtain permissions needed by Hive contributors. See the Hive website for additional information.

Ibis Communication Library User s Guide

Restructuring AZDBLab

Hackveda Appsec Labs Java Programming Course and Internship Program Description:

Module Road Map. 7. Version Control with Subversion Introduction Terminology

Java Error Applet Tag Missing Code Parameter Jnlp

Deployment Tools and Techniques

02/03/15. Compile, execute, debugging THE ECLIPSE PLATFORM. Blanks'distribu.on' Ques+ons'with'no'answer' 10" 9" 8" No."of"students"vs."no.

Introduction to Eclipse

JBoss IDE Quick Start Guide

Text Processing. with Java 6

CSE 374 Programming Concepts & Tools

COMP 4905 Honours Project Report

Week 11 Tuesday. CS 400 Programming III

Why Java is practical for modern operating systems. JNode.org

BEAWebLogic. Server. Beehive Integration in BEA WebLogic Server

Project Overview. CSE 403, Spring 2003 Software Engineering.

Project Overview. Readings and References. Opportunity. Initial project motivation. References. CSE 403, Spring 2003 Software Engineering

JVM Survival Guide. Hadi Hariri

Content. Development Tools 2(57)

We d like to hear your suggestions for improving our indexes. Send to

MAVEN INTERVIEW QUESTIONS

CIS* Programming

Jakarta Struts: An MVC Framework

Transcription:

CSE 403 Lecture 11 Static Code Analysis Reading: IEEE Xplore, "Using Static Analysis to Find Bugs" slides created by Marty Stepp http://www.cs.washington.edu/403/

FindBugs FindBugs: Java static analysis tool that focuses on bugs and usage errors in code. null pointers useless/dead code unclosed I/O streams infinite loops infinite recursion FindBugs has been run on the actual JDK 1.6 source, the Eclipse source, and many errors. What kind of bugs and problems were found? 2

Checkstyle Checkstyle: A static analysis tool that focuses on Java coding style and standards. whitespace and indentation variable names Javadoc commenting code complexity number of statements per method levels of nested ifs/loops lines, methods, fields, etc. per class proper usage import statements regular expressions exceptions I/O thread usage,... 3

Automated Build Systems Fairly essential, used on most large programming projects. Why? Why not Makefiles or shell scripts instead? What are these tools aiming to do? What other tools integrate well with them? What features would you want from an automated build tool? 4

Ant Ant ("another neat tool"): A Java build management tool. developed by Apache to help build their Tomcat web server expanded into a general tool Ant is a commonly used build tool for Java programs giving many more build options than the old "Make" utility. built for Java, so it understands Java concepts like: classpath, javac,.class files, JARs, JUnit, etc. 5

An Ant Build File Similar to Make, but Ant uses build.xml instead of Makefile: <project> <target name="name"> tasks </target> <target name="name"> tasks </target> </project> A task can be a command such as: <javac /> <mkdir /> <delete /> More: http://ant.apache.org/manual/tasksoverview.html 6

Ant build.xml Example <project> <target name="clean"> <delete dir="build"/> </target> <target name="compile"> <mkdir dir="build/classes"/> <javac srcdir="src" destdir="build/classes"/> </target> </project> 7

Ant Task Integration To integrate other tools with Ant, download custom Ant tasks for those tools. JUnit Ant task Checkstyle Ant task FindBugs Ant task... Search for these, and instructions for adding them, on Google 8

JUnit Ant Task Example <project> <property name="src" value="./src" /> <property name="lib" value="./lib" /> <property name="classes" value="./classes" /> <property name="test.class.name" value="com.xyz.mytestsuite" /> <path id="test.classpath"> <pathelement location="${classes}" /> <pathelement location="/path/to/junit.jar" /> <fileset dir="${lib}"> <include name="**/*.jar"/> </fileset> </path> <!-- Define the Ant task for running JUnit: --> <target name="test"> <junit fork="yes" haltonfailure="yes"> <test name="${test.class.name}" /> <formatter type="plain" usefile="false" /> <classpath refid="test.classpath" /> </junit> </target> on command line: ant test 9

Ant and Eclipse Ant integrates nicely with Eclipse. You can set up a "Build", "Run", or "Debug" task that uses Ant. Eclipse can create an Ant build file for you from an existing project that builds its code. Eclipse also has an Ant build file editor: 10

Maven Maven: A project management, comprehension, and build tool. A successor / replacement for Ant. Made by Apache, makers of Ant. Differences from Ant: more powerful; higher level of abstraction great for generating reports and visualizations can run integration tests and continuous integration (seen later) can handle deployment of an app or site 11

Maven and Eclipse Since Maven is newer, tool support (e.g. Eclipse integration) was slower to arrive, but it is generally mature now 12