Improving Software Quality with Static Analysis and Annotations for Software Defect Detection
|
|
|
- Shonda Whitney Spencer
- 10 years ago
- Views:
Transcription
1 Improving Software Quality with Static Analysis and Annotations for Software Defect Detection William Pugh Professor, Univ. of Maryland TS-2007
2 About Me Professor at Univ. of Maryland since 1988, doing research in programming languages, algorithms, software engineering Technical Lead on JSR-133 (Memory model), JSR-305 (Annotations for Software Defect Detection) Founder of the FindBugs project Open source static analysis tool for defect detection in the Java Programming Language Technical advisory board of 2
3 Static Analysis Analyzes your program without executing it Doesn t depend on having good test cases or even any test cases Generally, doesn t know what your software is supposed to do Looks for violations of reasonable programming Shouldn t throw NPE Shouldn t allow SQL injection Not a replacement for testing Very good at finding problems on untested paths But many defects can t be found with static analysis 4 3
4 Common Wisdom about Bugs and Static Analysis Programmers are smart Smart people don t make dumb mistakes We have good techniques (e.g., unit testing, pair programming, code inspections) for finding bugs early So, bugs remaining in production code must be subtle, and finding them must require sophisticated static analysis techniques I tried lint and it sucked: lots of warnings, few real issues 4
5 Can You Find The Bug? 5
6 Can You Find The Bug? if (listeners == null) listeners.remove(listener); JDK1.6.0, b105, sun.awt.x11.xmselection lines
7 Can You Find The Bug? if (listeners == null) listeners.remove(listener); JDK1.6.0, b105, sun.awt.x11.xmselection lines
8 Can You Find The Bug? if (listeners == null) listeners.remove(listener); JDK1.6.0, b105, sun.awt.x11.xmselection lines
9 Why Do Bugs Occur? Nobody is perfect Common types of errors: Misunderstood language features, API methods Typos (using wrong boolean operator, forgetting parentheses or brackets, etc.) Misunderstood class or method invariants Everyone makes syntax errors, but the compiler catches them What about bugs one step removed from a syntax error?
10 Who Uses Static Analysis? Lots and lots of projects and companies Among many others, Glassfish and Google use FindBugs Many companies are weird about letting you say they use your open source tool Lots of open source tools: PMD, CheckStyle, etc. IDEs include some: Eclipse, IntelliJ, Netbeans Commercial tools available from Fortify Software, KlocWork, Coverity, Parasoft, SureLogic Static analysis used even more widely/intensely for C/C++ More bugs to find Bugs a lot scarier Free tools not as good 7
11 FindBugs I'm mostly going to be talking about FindBugs I know it best Some things will be specific to FindBugs What we classify as a "correctness" issue Which potential null pointer issues we report But most of the concepts apply to other tools 8
12 Bug Categories Selected categories for today's discussion Correctness - the code seems to be clearly doing something the developer did not intend Bad practice - the code violates good practice 9
13 Bug Patterns Some big, broad and common patterns Dereferencing a null pointer An impossible checked cast Methods whose return value should not be ignored Lots of small, specific bug patterns, that together find lots of bugs Every Programming Puzzler Every chapter in Effective Java Many postings to 10
14 Analysis Techniques Whatever you need to find the bugs Local pattern matching If you invoke String.toLowerCase(), don t ignore the return value Intraprocedural dataflow analysis Null pointer, type cast errors Interprocedural method summaries This method always dereferences its parameter Context sensitive interprocedural analysis Interprocedural flow of untrusted data SQL injection, cross site scripting 11
15 Categories, ranking, use cases Every tool has categories, rules/patterns, priorities You can generally customize what you want to look at Sometimes, you want to do a code audit of a newly written module with 1,000 lines of code and sometimes you want to scan 1,000,000 lines of code that has been in production for a year Different use cases require different tunings, different tools 12
16 Correctness issues Stuff you really want to look at In FindBugs, we reserve the Correctness category for issues we are most confident are wrong code does something the developer didn t intend Many of the other categories reflect correctness issues But correctness issues are the things we think you should look at when scanning that million line code base low false positive rate, few low impact bugs 13
17 ... Students are good bug generators Student came to office hours, was having trouble with his constructor: /** Construct a WebSpider */ public WebSpider() { WebSpider w = new WebSpider(); } A second student had the same bug Wrote a detector, found 3 other students with same bug 14
18 Infinite recursive loop... Students are good bug generators Student came to office hours, was having trouble with his constructor: /** Construct a WebSpider */ public WebSpider() { WebSpider w = new WebSpider(); } A second student had the same bug Wrote a detector, found 3 other students with same bug 14
19 Double Check Against JDK1.6.0-b13 Found 5 infinite recursive loops Including one written by Joshua Bloch public String foundtype() { } return this.foundtype(); Smart people make dumb mistakes 27 across all versions of JDK, 40+ in Google s Java code Embrace and fix your dumb mistakes 15
20 Finding Null Pointer Bugs with FindBugs FindBugs looks for a statement or branch that, if executed, guarantees a null pointer exception Either a null pointer exception could be thrown, or the program contains a statement/branch that can t be executed Could look for exceptions that only occur on a path e.g., if the condition on line 29 is true and the condition on line 38 is false, then a NPE will be thrown but would need to worry about whether that path is feasible 16
21 Null Pointer Bugs Found by FindBugs JDK1.6.0-b statements/branches that, if executed, guarantee NPE We judge at least 54 of them to be serious bugs that could generate a NPE on valid input Most of the others were deemed to be unreachable branches or statements, or reachable only with erroneous input Only one case where the analysis was wrong 17
22 Examples of null pointer bugs simple ones //com.sun.corba.se.impl.naming.cosnaming.namingcontextimpl if (name!= null name.length > 0) //com.sun.xml.internal.ws.wsdl.parser.runtimewsdlparser if (part == null part.equals("")) // sun.awt.x11.scrollpanepeer if (g!= null) paintscrollbars(g,colors); g.dispose(); 18
23 Redundant Check For Null Also known as a reverse null dereference error Checking a value to see if it is null When it can't possibly be null // java.awt.image.loopupop, lines public final WritableRaster filter( Raster src, WritableRaster dst) { int dstlength = dst.getnumbands(); // Create a new destination Raster, // if needed if (dst == null) dst = createcompatibledestraster(src); 19
24 Redundant Check For Null Is it a bug or a redundant check? Check the JavaDoc for the method Performs a lookup operation on a Raster. If the destination Raster is null, a new Raster will be created. Is this case, a bug particularly look for those cases where we know it can't be null because there would have been a NPE if it were null 20
25 Bad Method Invocation Methods whose return value shouldn't be ignored Strings are immutable, so functions like trim() and tolowercase() return new String Dumb/useless methods Invoking tostring or equals on an array Lots of specific rules about particular API methods Hard to memorize, easy to get wrong 21
26 Examples of bad method calls // com.sun.rowset.cachedrowsetimpl if (type == Types.DECIMAL type == Types.NUMERIC) ((java.math.bigdecimal)x).setscale(scale); // com.sun.xml.internal.txw2.output.xmlwriter try {... } catch (IOException e) { new SAXException("Server side Exception:" + e); } 22
27 Type Analysis Impossible checked casts Useless calls equals takes an Object as a parameter but comparing a String to StringBuffer with equals(...) is pointless, and almost certainly not what was intended Map<K,V>.get also takes an Object as a parameter supplying an object with the wrong type as a parameter to get doesn't generate a compile time error just a get that always returns null 23
28 Lots of Little Bug Patterns checking if d == Double.NaN Bit shifting an int by a value greater than 31 bits Every Puzzler this year more than half for most years 24
29 When Bad Code Isn't A Bug Static analysis tools will sometimes find ugly, nasty code that can't cause your application to misbehave Cleaning this up is a good thing makes the code easier to understand and maintain But for ugly code already in production sometimes you just don't want to touch it We've found more cases like this than we expected 25
30 When Bad Code Isn't A Bug bad code that does what it was intended to do // com.sun.jndi.dns.dnsname, lines if (n instanceof CompositeName) { // force ClassCastException n = (DnsName) n; } // sun.jdbc.odbc.jdbcodbcobject, lines if ((b[offset] < 32) (b[offset] > 128)) { asciiline += "."; } 26
31 When Bad Code Isn't A Bug Code that shouldn't go wrong // com.sun.corba.se.impl.dynamicany.dynanycompleximpl String expectedmembername = null; try { expectedmembername = expectedtypecode.member_name(i); } catch (BadKind badkind) { // impossible } catch (Bounds bounds) { // impossible } if (!(expectedmembername.equals(membername)... )) { 27
32 When Bad Code Isn't A Bug When you are already doomed // com.sun.org.apache.xml.internal.security.encryption.xmlciper // lines if (null == element) { //complain } String algorithm = element.getattributens(...); 28
33 Overall Correctness Results From FindBugs Evaluating Static Analysis Defect Warnings On Production Software, ACM 2007 Workshop on Program Analysis for Software Tools and Engineering JDK1.6.0-b correctness warnings we judge that at least 213 of these are serious issues that should be fixed Google's Java codebase over a 6 month period, using various versions of FindBugs 1,127 warnings 807 filed as bugs 518 fixed in code 29
34 Results on openjpa nightly build 39 correctness issues 35 of which I marked as must/should fix 2 doomed casts 1 uninitialized reads 6 null pointer issues 26 comparing Boolean objects using == feel free to argue with me on this one 30
35 Bad Practice A class that defines an equals method but inherits hashcode from Object Violates contract that any two equal objects have the same hash code equals method doesn't handle null argument Serializable class without a serialversionuid Exception caught and ignored Broken out from the correctness category 31
36 Fixing hashcode What if you want to define equals, but don't think your objects will ever get put into a HashMap? Suggestion: public int hashcode() { assert false : "hashcode method not designed"; return 42; } 32
37 Use of Unhashable Classes FindBugs previously reported all classes that defined equals but not hashcode as a correctness problem but some developers didn t care Now reported as bad practice but separately report use of such a class in a HashMap/HashTable as a correctness warning 33
38 Integrating Static Analysis Want to make it part of your development process Just like running unit tests Have to tune the tool to report what you are interested in Different situations have different needs Need a workflow for issues Almost all tools will report some issues that, after reviewing, you decide not to fix Need to have a way to manage such issues 34
39 Running Static Analysis "We've got it in our IDE, so we're done, right?" no, it really needs to also be done automatically as part of your build process Are you scanning 2 million lines of code? You probably don't want 20,000 issues to examine 35
40 Defect/Issue Workflow How do issues get reviewed/audited? Can you do team auditing and assign issues? Once you've reviewed an issue, does the system remember your evaluation when it analyzes that code again? even if it is now reported on a different line number? Can you identify new issues since last build? since last release to customer/production? 36
41 Learning from mistakes With FindBugs, we've always started from bugs We need API experts to feed us API-specific bugs Swing, EJB, J2ME, localization, Hibernate,... When you get bit by a bug writing a test case is good considering whether it can be generalized into a bug pattern is better You'd be surprised at the number of times you make a mistake so stupid no one else could possible make the same mistake but they do 37
42 JSR-305: Annotations for Software Defect Detection William Pugh Professor Status Report Univ. of Maryland 38
43 Why annotations? Static analysis can do a lot can even analyze interprocedural paths Why do we need annotations? they express design decisions that may be implicit, or described in documentation, but not easily available to tools 39
44 Where is the bug? class Foo { int value; public boolean equals(object obj) { if (this.getclass()!= obj.getclass()) return false; Foo that = (Foo) obj; return this.value == that.value; }... } 40
45 Where is the bug? if (spec!= null) ffragments.add(spec); if (iscomplete(spec)) fpreferences.add(spec); 41
46 Where is the bug? if (spec!= null) ffragments.add(spec); if (iscomplete(spec)) fpreferences.add(spec); boolean iscomplete(annotationpreference spec) { return spec.getcolorpreferencekey()!= null && spec.getcolorpreferencevalue()!= null && spec.gettextpreferencekey()!= null && spec.getoverviewrulerpreferencekey()!= null; } 41
47 Finding the bug Many bugs can only be identified, or only localized, if you know something about what the code is supposed to do Annotations are well suited to this... 42
48 JSR-305 At least two tools already have defined their own annotations: FindBugs and IntelliJ No one wants to have to apply two sets of annotations to their code come up with a common set of annotations that can be understood by multiple tools 43
49 JSR-305 target JSR-305 is intended to be compatible with JSE 5.0+ Java Hope to have usable drafts and preliminary tool support out by the end of the summer 44
50 JSR-308 Annotations on Java Types Designed to allow annotations to occur in many more places than they can occur now String> a =... Targets JSE 7.0 Will add value to JSR-305, but JSR-305 cannot depend upon JSR
51 Nullness Nullness is a great motivating example Most method parameters are expected to always be nonnull some research papers support this Not always documented in JavaDoc 46
52 Documenting nullness Want to document parameters, return values, fields that should always be nonnull And which should not be presumed nonnull argument to equals(object) Should warn if null passed where nonnull value required Should warn if argument to equals is immediately dereferenced 47
53 Only two cases? What about Map.get(...)? Return nulls if key not found even if all values in Map are nonnull So the return value can t But lots of places where you know that the value will be nonnull you know key is in table you know value is nonnull 48
54 more examples Object.equals(Object obj) must handle a null value for obj Method.invoke(Object obj, Obj.. args) obj should be null if method is a static method, nonnull if an instance method ConcurrentHashMap.get(K k) k must not be null 49
55 3 cases? May need to have 3 cases @UnknownNullness same as no annotation Names in flux, might use Nullable for one of these (but which one?) 50
56 @Nonnull Should not be null For fields, should be interpreted as should be nonnull after object is initialized Tools will try to generate a warning if they see a possibly null value being used where a nonnull value is required same as if they see a dereference of a possibly null value 51
57 @CheckForNull Code should always worry that this value might be null e.g., argument to equals 52
58 @UnknownNullness Same as no annotation Needed because we are going to introduce default and inherited annotations Need to be able to get back to unannotated state Null under some circumstances might vary in subtypes 53
59 @CheckForNull requires work If you mark a return value you will likely have to go make a bunch of changes kind of like const in C++ My experience has been that there are lots of methods that could return null but that in a particular calling context, you might know that it can t 54
60 Nullness annotations Tools that try to prove absence of NPE might the same This 3-way logic might reappear for some other annotations 55
61 Type Qualifiers Many of the JSR-305 annotations will be type qualifiers: additional type constraints on top of the existing Java type system 56
62 @Untainted Needed for security analysis Information derived directly from web form parameters is tainted can be arbitrary content Strings used to form SQL queries or HTML responses must be untainted otherwise get SQL Injection or XSS 57
63 @Syntax Used to indicate String values with particular RegEx Java SQL ) Allows for error checking and used by IDE s in refactoring 58
64 @Pattern Provides a regular expression that describes the legal String \\d+ ) 59
65 @Nonnegative and friends Fairly clear motivation Where do @Prime 60
66 Three-way logic again If we do we also similar to check for similar to unknown nullness 61
67 User defined type qualifiers In (too many) places, Java APIs use integer values or Strings where enumerations would have been better except that they weren t around at the time Lots of potential errors, uncaught by compiler 62
68 Example in java.sql.connection createstatement(int resultsettype, int resultsetconcurrency, int resultsetholdability) Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability. resultsettype: one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE resultsetconcurrency: one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE resultsetholdability: one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or 63
69 The fix ResultSetType ResultSetConcurrency ResultSetHoldability {} Annotate static constants and method 64
70 User defined Type Qualifiers JSR-305 won t Rather JSR-305 will define the metaannotations that allow any developer to define their own type qualifier annotations which they can apply and will be interpreted by defect detection tools 65
71 Other ideas Validators Subtypes exclusive type qualifiers (e.g., it can't be both A and B) 66
72 CreditCardNumber { class Validator implements TypeQualifierValidator<CreditCardNumber> { public boolean forconstantvalue(creditcardnumber annotation, Object v) { if (v instanceof String) { String s = (String) v; if (java.util.regex.pattern.matches("[0-9]{16}", s) } && LuhnVerification.checkNumber(s)) return true; return false; }}} 67
73 Default and Inherited Annotations
74 Most parameters are nonnull Most references parameters are intended to be non-null many return values and fields as well Adding annotation to a majority of parameters won t sell Treating all non-annotated parameters as nonnull also won t sell 69
75 Default annotations Can mark a method, class or package as having nonnull parameters by default If a parameter doesn t have a nullness annotation climb outwards, looking at method, class, outer class, and then package, to find a default annotation Can mark a package as nonnull parameters by default, and change that on a class or parameter basis as needed 70
76 Inherited Annotations We want to inherit annotations Object obj) int E Object clone() 71
77 Do defaults apply to most JSR-305 annotations? Case for default and inherited nullness annotations is very compelling Should it be general mechanism? 72
78 Thread/Concurrency Annotations Annotations to denote how locks are used to guard against data races Annotations about which threads should invoke which methods See annotations from Java Concurrency In Practice as a starting point 73
79 What is wrong with this code? Properties getprops(file file) throws... { Properties props = new Properties(); props.load(new FileInputStream(file)); return props; } 74
80 What is wrong with this code? Properties getprops(file file) throws... { Properties props = new Properties(); props.load(new FileInputStream(file)); return props; } Doesn t close file 74
81 Resource this method will not close the this method will close the Usable only in constructors: constructed object decorates the parameter, and will close it when the constructed object is closed 75
82 Miscellaneous 76
83 @CheckReturnValue Indicates a method that should always be invoked as a function, not a procedure. Example: String.toLowerCase() BigInteger.add(BigInteger val) Anywhere you have an immutable object and methods that might be thought of a a mutating method return the new value 77
84 @InjectionAnnotation Static analyzers get confused if there is a field or method that is accessed via reflection/ injection, and they don t understand it Many frameworks have their own annotations for injection on an tells static analysis tools denotes an injection annotation 78
85 Wrap up Static analysis is effective at finding bad code Is bad code found by static analysis an important problem? Getting static analysis into the software development process can t be taken for granted Annotations will be helpful If we can get developers to use them 79
ABSTRACT TO FIND BUGS. Department of Computer Science. can be found using simple analysis techniques. We have found that simple static
ABSTRACT Title of dissertation: SIMPLE AND EFFECTIVE STATIC ANALYSIS TO FIND BUGS David H. Hovemeyer, Doctor of Philosophy, 2005 Dissertation directed by: Professor William W. Pugh Department of Computer
Writing new FindBugs detectors
Writing new FindBugs detectors Why? You may find bug patterns in your own code How? Inspect bytecode There are many ways to implement a FindBugs detector Often, simple techniques (e.g., sequential scan)
Java Interview Questions and Answers
1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java
No no-argument constructor. No default constructor found
Every software developer deals with bugs. The really tough bugs aren t detected by the compiler. Nasty bugs manifest themselves only when executed at runtime. Here is a list of the top ten difficult and
CS 111 Classes I 1. Software Organization View to this point:
CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects
First Java Programs. V. Paúl Pauca. CSC 111D Fall, 2015. Department of Computer Science Wake Forest University. Introduction to Computer Science
First Java Programs V. Paúl Pauca Department of Computer Science Wake Forest University CSC 111D Fall, 2015 Hello World revisited / 8/23/15 The f i r s t o b l i g a t o r y Java program @author Paul Pauca
To Java SE 8, and Beyond (Plan B)
11-12-13 To Java SE 8, and Beyond (Plan B) Francisco Morero Peyrona EMEA Java Community Leader 8 9...2012 2020? Priorities for the Java Platforms Grow Developer Base Grow Adoption
Licensed for viewing only. Printing is prohibited. For hard copies, please purchase from www.agileskills.org
Unit Test 301 CHAPTER 12Unit Test Unit test Suppose that you are writing a CourseCatalog class to record the information of some courses: class CourseCatalog { CourseCatalog() { void add(course course)
Java Application Developer Certificate Program Competencies
Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle
CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions
CS 2112 Spring 2014 Assignment 3 Data Structures and Web Filtering Due: March 4, 2014 11:59 PM Implementing spam blacklists and web filters requires matching candidate domain names and URLs very rapidly
Software security specification and verification
Software security specification and verification Erik Poll Security of Systems (SoS) group Radboud University Nijmegen Software (in)security specification and verification/detection Erik Poll Security
Crash Course in Java
Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J. Johns also: Java in a Nutshell Java Network Programming and Distributed Computing Netprog 2002 Java Intro 1 What is
Evaluation of AgitarOne
Carnegie Mellon University, School of Computer Science Master of Software Engineering Evaluation of AgitarOne Analysis of Software Artifacts Final Project Report April 24, 2007 Edited for public release
Introduction to Static Analysis for Assurance
Introduction to Static Analysis for Assurance John Rushby Computer Science Laboratory SRI International Menlo Park CA USA John Rushby Static Analysis for Assurance: 1 Overview What is static analysis?
Data Flow Static Code Analysis Best Practices
Data Flow Static Code Analysis Best Practices Introduction This paper examines why and how to add flow analysis to your existing testing strategies. After introducing the general concept and benefits of
TOOL EVALUATION REPORT: FORTIFY
TOOL EVALUATION REPORT: FORTIFY Derek D Souza, Yoon Phil Kim, Tim Kral, Tejas Ranade, Somesh Sasalatti ABOUT THE TOOL Background The tool that we have evaluated is the Fortify Source Code Analyzer (Fortify
Java Programming Language
Lecture 1 Part II Java Programming Language Additional Features and Constructs Topics in Quantitative Finance: Numerical Solutions of Partial Differential Equations Instructor: Iraj Kani Subclasses and
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007
Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007 The Java Type System By now, you have seen a fair amount of Java. Time to study in more depth the foundations of the language,
Coding in Industry. David Berry Director of Engineering Qualcomm Cambridge Ltd
Coding in Industry David Berry Director of Engineering Qualcomm Cambridge Ltd Agenda Potted history Basic Tools of the Trade Test Driven Development Code Quality Performance Open Source 2 Potted History
Software Engineering Techniques
Software Engineering Techniques Low level design issues for programming-in-the-large. Software Quality Design by contract Pre- and post conditions Class invariants Ten do Ten do nots Another type of summary
CSE 308. Coding Conventions. Reference
CSE 308 Coding Conventions Reference Java Coding Conventions googlestyleguide.googlecode.com/svn/trunk/javaguide.html Java Naming Conventions www.ibm.com/developerworks/library/ws-tipnamingconv.html 2
Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner
1 vk» Java 7 Recipes (,\['«** - < g!p#«josh Juneau Carl Dea Freddy Guime John O'Conner Contents J Contents at a Glance About the Authors About the Technical Reviewers Acknowledgments Introduction iv xvi
The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0
The following applies to all exams: Once exam vouchers are purchased you have up to one year from the date of purchase to use it. Each voucher is valid for one exam and may only be used at an Authorized
D06 PROGRAMMING with JAVA
Cicles Formatius de Grau Superior Desenvolupament d Aplicacions Informàtiques D06 PROGRAMMING with JAVA Ch13 Inheritance PowerPoint presentation, created by Angel A. Juan - ajuanp(@)gmail.com, for accompanying
Java SE 7 Programming
Java SE 7 Programming The second of two courses that cover the Java Standard Edition 7 (Java SE 7) Platform, this course covers the core Application Programming Interfaces (API) you will use to design
Source Code Review Using Static Analysis Tools
Source Code Review Using Static Analysis Tools July-August 05 Author: Stavros Moiras Supervisor(s): Stefan Lüders Aimilios Tsouvelekakis CERN openlab Summer Student Report 05 Abstract Many teams at CERN,
<Insert Picture Here> What's New in NetBeans IDE 7.2
Slide 1 What's New in NetBeans IDE 7.2 The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated
Towards Checking the Usefulness of Verification Tools
Towards Checking the Usefulness of Verification Tools Willem Visser and Jaco Geldenhuys Computer Science Division Department of Mathematical Sciences University of Stellenbosch, South Africa {wvisser,jaco}@cs.sun.ac.za
CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages. Nicki Dell Spring 2014
CSE 373: Data Structure & Algorithms Lecture 25: Programming Languages Nicki Dell Spring 2014 What is a Programming Language? A set of symbols and associated tools that translate (if necessary) collections
SQL and Java. Database Systems Lecture 19 Natasha Alechina
Database Systems Lecture 19 Natasha Alechina In this Lecture SQL in Java SQL from within other Languages SQL, Java, and JDBC For More Information Sun Java tutorial: http://java.sun.com/docs/books/tutorial/jdbc
e ag u g an L g ter lvin v E ram Neal G g ro va P Ja
Evolving the Java Programming Language Neal Gafter Overview The Challenge of Evolving a Language Design Principles Design Goals JDK7 and JDK8 Challenge: Evolving a Language What is it like trying to extend
Java Memory Model: Content
Java Memory Model: Content Memory Models Double Checked Locking Problem Java Memory Model: Happens Before Relation Volatile: in depth 16 March 2012 1 Java Memory Model JMM specifies guarantees given by
Application-only Call Graph Construction
Application-only Call Graph Construction Karim Ali and Ondřej Lhoták David R. Cheriton School of Computer Science, University of Waterloo Abstract. Since call graphs are an essential starting point for
Ontology Model-based Static Analysis on Java Programs
Ontology Model-based Static Analysis on Java Programs Lian Yu 1, Jun Zhou, Yue Yi, Ping Li, Qianxiang Wang School of Software and Microelectronics, Peking University, Beijing, 102600, PRC Abstract 1 Typical
Java on Guice Guice 1.0 User's Guide
http://code.google.com/p/google-guice/ Java on Guice Guice 1.0 User's Guide Guice (pronounced "juice") is an ultra-lightweight, next-generation dependency injection container for Java 5 and later. Introduction
AP Computer Science Java Subset
APPENDIX A AP Computer Science Java Subset The AP Java subset is intended to outline the features of Java that may appear on the AP Computer Science A Exam. The AP Java subset is NOT intended as an overall
Will Dormann: Sure. Fuzz testing is a way of testing an application in a way that you want to actually break the program.
The Power of Fuzz Testing to Reduce Security Vulnerabilities Transcript Part 1: Why Fuzz Testing? Julia Allen: Welcome to CERT's podcast series: Security for Business Leaders. The CERT program is part
Designing with Exceptions. CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219
Designing with Exceptions CSE219, Computer Science III Stony Brook University http://www.cs.stonybrook.edu/~cse219 Testing vs. Debugging Testing Coding Does the code work properly YES NO 2 Debugging Testing
The C Programming Language course syllabus associate level
TECHNOLOGIES The C Programming Language course syllabus associate level Course description The course fully covers the basics of programming in the C programming language and demonstrates fundamental programming
CHAPTER 5 INTELLIGENT TECHNIQUES TO PREVENT SQL INJECTION ATTACKS
66 CHAPTER 5 INTELLIGENT TECHNIQUES TO PREVENT SQL INJECTION ATTACKS 5.1 INTRODUCTION In this research work, two new techniques have been proposed for addressing the problem of SQL injection attacks, one
Java SE 8 Programming
Oracle University Contact Us: 1.800.529.0165 Java SE 8 Programming Duration: 5 Days What you will learn This Java SE 8 Programming training covers the core language features and Application Programming
DIPLOMADO DE JAVA - OCA
DIPLOMADO DE JAVA - OCA TABLA DE CONTENIDO INTRODUCCION... 3 ESTRUCTURA DEL DIPLOMADO... 4 Nivel I:... 4 Fundamentals of the Java Programming Language Java SE 7... 4 Introducing the Java Technology...
Using JML to protect Java code against SQL injection. Johan Janssen 0213888 [email protected] June 26, 2007
Using JML to protect Java code against SQL injection Johan Janssen 0213888 [email protected] June 26, 2007 1 Abstract There are a lot of potential solutions against SQL injection. The problem is that
Business Application
137 Germain CRT Validation Rules for Siebel CRM 7.7,7.8,8.0,8.1,8.2 Validation Rule Name Validation Rule Description Business Application Siebel Repository Level Improve CPU Improve Memory GS-SBL-REP-JDBC-1001
Monitoring Java enviroment / applications
Monitoring Java enviroment / applications Uroš Majcen [email protected] Java is Everywhere You Can Expect More. Java in Mars Rover With the help of Java Technology, and the Jet Propulsion Laboratory (JPL),
APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION
1 APPROACHES TO SOFTWARE TESTING PROGRAM VERIFICATION AND VALIDATION Validation: Are we building the right product? Does program meet expectations of user? Verification: Are we building the product right?
Chapter 13 - Inheritance
Goals Chapter 13 - Inheritance To learn about inheritance To understand how to inherit and override superclass methods To be able to invoke superclass constructors To learn about protected and package
So with no further ado, welcome back to the podcast series, Robert. Glad to have you today.
Raising the Bar: Mainstreaming CERT C Secure Coding Rules Transcript Part 1: How the Specification Came to be and Its Structure Julia Allen: Welcome to CERT's Podcast Series: Security for Business Leaders.
Java (12 Weeks) Introduction to Java Programming Language
Java (12 Weeks) Topic Lecture No. Introduction to Java Programming Language 1 An Introduction to Java o Java as a Programming Platform, The Java "White Paper" Buzzwords, Java and the Internet, A Short
PROBLEM SOLVING SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON
PROBLEM SOLVING WITH SEVENTH EDITION WALTER SAVITCH UNIVERSITY OF CALIFORNIA, SAN DIEGO CONTRIBUTOR KENRICK MOCK UNIVERSITY OF ALASKA, ANCHORAGE PEARSON Addison Wesley Boston San Francisco New York London
COSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005. Question Out of Mark A Total 16. B-1 7 B-2 4 B-3 4 B-4 4 B Total 19
Term Test #2 COSC 1020 3.0 Introduction to Computer Science I Section A, Summer 2005 Family Name: Given Name(s): Student Number: Question Out of Mark A Total 16 B-1 7 B-2 4 B-3 4 B-4 4 B Total 19 C-1 4
UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger
UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS 61B Fall 2014 P. N. Hilfinger Unit Testing with JUnit 1 The Basics JUnit is a testing framework
A Test Suite for Basic CWE Effectiveness. Paul E. Black. [email protected]. http://samate.nist.gov/
A Test Suite for Basic CWE Effectiveness Paul E. Black [email protected] http://samate.nist.gov/ Static Analysis Tool Exposition (SATE V) News l We choose test cases by end of May l Tool output uploaded
Comp 411 Principles of Programming Languages Lecture 34 Semantics of OO Languages. Corky Cartwright Swarat Chaudhuri November 30, 20111
Comp 411 Principles of Programming Languages Lecture 34 Semantics of OO Languages Corky Cartwright Swarat Chaudhuri November 30, 20111 Overview I In OO languages, data values (except for designated non-oo
Tutorial: Getting Started
9 Tutorial: Getting Started INFRASTRUCTURE A MAKEFILE PLAIN HELLO WORLD APERIODIC HELLO WORLD PERIODIC HELLO WORLD WATCH THOSE REAL-TIME PRIORITIES THEY ARE SERIOUS SUMMARY Getting started with a new platform
The Rules 1. One level of indentation per method 2. Don t use the ELSE keyword 3. Wrap all primitives and Strings
Object Calisthenics 9 steps to better software design today, by Jeff Bay http://www.xpteam.com/jeff/writings/objectcalisthenics.rtf http://www.pragprog.com/titles/twa/thoughtworks-anthology We ve all seen
Static Code Analysis Procedures in the Development Cycle
Static Code Analysis Procedures in the Development Cycle Tools, Technology, and Process in Engineering at Microsoft Mooly Beeri Microsoft Haifa R&D Center Agenda Static code analysis tools PREfix and PREfast
Integrated Error-Detection Techniques: Find More Bugs in Java Applications
Integrated Error-Detection Techniques: Find More Bugs in Java Applications Software verification techniques such as pattern-based static code analysis, runtime error detection, unit testing, and flow analysis
Fundamentals of Java Programming
Fundamentals of Java Programming This document is exclusive property of Cisco Systems, Inc. Permission is granted to print and copy this document for non-commercial distribution and exclusive use by instructors
Lecture 7: Class design for security
Lecture topics Class design for security Visibility of classes, fields, and methods Implications of using inner classes Mutability Design for sending objects across JVMs (serialization) Visibility modifiers
http://algs4.cs.princeton.edu dictionary find definition word definition book index find relevant pages term list of page numbers
ROBERT SEDGEWICK KEVI WAYE F O U R T H E D I T I O ROBERT SEDGEWICK KEVI WAYE ROBERT SEDGEWICK KEVI WAYE Symbol tables Symbol table applications Key-value pair abstraction. Insert a value with specified.
Java SE 7 Programming
Oracle University Contact Us: 1.800.529.0165 Java SE 7 Programming Duration: 5 Days What you will learn This Java SE 7 Programming training explores the core Application Programming Interfaces (API) you'll
Java SE 7 Programming
Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 4108 4709 Java SE 7 Programming Duration: 5 Days What you will learn This Java Programming training covers the core Application Programming
Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)
Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies) Duration of Course: 6 Months Fees: Rs. 25,000/- (including Service Tax) Eligibility: B.E./B.Tech., M.Sc.(IT/ computer
Detecting Pattern-Match Failures in Haskell. Neil Mitchell and Colin Runciman York University www.cs.york.ac.uk/~ndm/catch
Detecting Pattern-Match Failures in Haskell Neil Mitchell and Colin Runciman York University www.cs.york.ac.uk/~ndm/catch Does this code crash? risers [] = [] risers [x] = [[x]] risers (x:y:etc) = if x
Programming Languages CIS 443
Course Objectives Programming Languages CIS 443 0.1 Lexical analysis Syntax Semantics Functional programming Variable lifetime and scoping Parameter passing Object-oriented programming Continuations Exception
core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt
core. 2008 AGI-Information Management Consultants May be used for personal purporses only or by libraries associated to dandelon.com network. Volume I - Fundamentals Seventh Edition CAY S. HORSTMANN GARY
16.1 DataFlavor. 16.1.1 DataFlavor Methods. Variables
In this chapter: DataFlavor Transferable Interface ClipboardOwner Interface Clipboard StringSelection UnsupportedFlavorException Reading and Writing the Clipboard 16 Data Transfer One feature that was
Evaluation. Copy. Evaluation Copy. Chapter 7: Using JDBC with Spring. 1) A Simpler Approach... 7-2. 2) The JdbcTemplate. Class...
Chapter 7: Using JDBC with Spring 1) A Simpler Approach... 7-2 2) The JdbcTemplate Class... 7-3 3) Exception Translation... 7-7 4) Updating with the JdbcTemplate... 7-9 5) Queries Using the JdbcTemplate...
How to create/avoid memory leak in Java and.net? Venkat Subramaniam [email protected] http://www.durasoftcorp.com
How to create/avoid memory leak in Java and.net? Venkat Subramaniam [email protected] http://www.durasoftcorp.com Abstract Java and.net provide run time environment for managed code, and Automatic
cs2010: algorithms and data structures
cs2010: algorithms and data structures Lecture 11: Symbol Table ADT. Vasileios Koutavas 28 Oct 2015 School of Computer Science and Statistics Trinity College Dublin Algorithms ROBERT SEDGEWICK KEVIN WAYNE
Problem 1. CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class
CS 61b Summer 2005 Homework #2 Due July 5th at the beginning of class This homework is to be done individually. You may, of course, ask your fellow classmates for help if you have trouble editing files,
Everyday Lessons from Rakudo Architecture. Jonathan Worthington
Everyday Lessons from Rakudo Architecture Jonathan Worthington What do I do? I teach our advanced C#, Git and software architecture courses Sometimes a mentor at various companies in Sweden Core developer
The FDA Forensics Lab, New Tools and Capabilities
U. S. Department of Health and Human Services The FDA Forensics Lab, New Tools and Capabilities Symposium on Static Code Analysis and Complex Medical Devices University of Minnesota July 23, 2009 Static
Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program
Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2015 The third
Object Oriented Software Design II
Object Oriented Software Design II Introduction to C++ Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa February 20, 2012 G. Lipari (Scuola Superiore Sant Anna) C++ Intro February
CPLEX Tutorial Handout
CPLEX Tutorial Handout What Is ILOG CPLEX? ILOG CPLEX is a tool for solving linear optimization problems, commonly referred to as Linear Programming (LP) problems, of the form: Maximize (or Minimize) c
Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program
Free Java textbook available online "Thinking in Java" by Bruce Eckel, 4th edition, 2006, ISBN 0131872486, Pearson Education Introduction to the Java programming language CS 4354 Summer II 2014 Jill Seaman
Practical Online Filesystem Checking and Repair
Practical Online Filesystem Checking and Repair Daniel Phillips Samsung Research America (Silicon Valley) [email protected] 1 2013 SAMSUNG Electronics Co. Why we want online checking: Fsck
Iron Chef: John Henry Challenge
Iron Chef: John Henry Challenge Brian Chess Pravir Chandra Black Hat 3/27/2008 Amsterdam Sean Fay Jacob West Concept We love Iron Chef. We can t cook. Concept Compare tools and manual code review in head-tohead
Introduction to Programming System Design. CSCI 455x (4 Units)
Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,
Source Code Security Analysis Tool Functional Specification Version 1.0
Special Publication 500-268 Source Code Security Analysis Tool Functional Specification Version 1.0 Paul E. Black Michael Kass Michael Koo Software Diagnostics and Conformance Testing Division Information
Capabilities of a Java Test Execution Framework by Erick Griffin
Capabilities of a Java Test Execution Framework by Erick Griffin Here we discuss key properties and capabilities of a Java Test Execution Framework for writing and executing discrete Java tests for testing
Real World Software Assurance Test Suite: STONESOUP
Real World Software Assurance Test Suite: STONESOUP Charles Oliveira/SAMATE Guest Researcher at Software and Systems Division, IT Laboratory NIST Outline - Introduction STONESOUP
Visualizing Information Flow through C Programs
Visualizing Information Flow through C Programs Joe Hurd, Aaron Tomb and David Burke Galois, Inc. {joe,atomb,davidb}@galois.com Systems Software Verification Workshop 7 October 2010 Joe Hurd, Aaron Tomb
WA2099 Introduction to Java using RAD 8.0 EVALUATION ONLY. Student Labs. Web Age Solutions Inc.
WA2099 Introduction to Java using RAD 8.0 Student Labs Web Age Solutions Inc. 1 Table of Contents Lab 1 - The HelloWorld Class...3 Lab 2 - Refining The HelloWorld Class...20 Lab 3 - The Arithmetic Class...25
Object Oriented Software Design
Object Oriented Software Design Introduction to Java - II Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 28, 2010 G. Lipari (Scuola Superiore Sant Anna) Introduction
Web development... the server side (of the force)
Web development... the server side (of the force) Fabien POULARD Document under license Creative Commons Attribution Share Alike 2.5 http://www.creativecommons.org/learnmore Web development... the server
Secure Software Programming and Vulnerability Analysis
Secure Software Programming and Vulnerability Analysis Christopher Kruegel [email protected] http://www.auto.tuwien.ac.at/~chris Testing and Source Code Auditing Secure Software Programming 2 Overview
Pattern Insight Clone Detection
Pattern Insight Clone Detection TM The fastest, most effective way to discover all similar code segments What is Clone Detection? Pattern Insight Clone Detection is a powerful pattern discovery technology
Dart a modern web language
Dart a modern web language or why web programmers need more structure Kasper Lund & Lars Bak Software engineers, Google Inc. Object-oriented language experience: 26 + 12 years The Web Is Fantastic The
