SlideShare ist ein Scribd-Unternehmen logo
1 von 4
Downloaden Sie, um offline zu lesen
FEATURE




                                                                                   Uncommon Java Bugs
                                                                                                                   Detecting them with FOSS tools



                                    by S.G. Ganesh




                                   A
                                              ny large Java source base can have insidious and      work schedules results in code that is often substandard
                                              subtle bugs. Every experienced Java programmer        and filled with bugs. So, because of practical problems,
                                              knows that finding and fixing these bugs can be         most code developed in the real world has bugs and it’s
                                              difficult and costly. Fortunately, there are a large   worthwhile using static analysis tools to find them and fix
                                   number of free open source Java tools available that can         them.
                                   be used to find and fix defects early in the development              In this article we’ll see an uncommon defect and intro-
                                   lifecycle. In this article, we’ll look at a few examples of      duce a tool that detects it. We do this for two reasons: to
                                   specific uncommon or unusual defects that can happen in           illustrate the kind of unusual problems that can happen
                                   code and see how different Java static analysis tools detect     in the code and to introduce a FOSS tool that’s suitable for
                                   them.                                                            detecting this kind of problem.

                                   Testing                                                          Jlint
                                      As software gets more complex and ubiquitous, it                   What does this program print?
                                   becomes more difficult to ensure high-quality code. One
                                   common method of finding bugs is testing. But testing            class LongVal {
                                   can’t cover all paths and possibilities or enforce good          public static void main(String[] s) {
                                   programming practices. Expert knowledge in the form of                     long l = 0x1l;
                                   manual code review by peers is one of the best ways to                          System.out.format(“%x”, l);
                                   ensure good code quality. Code review is often used as a         }
                                   mandatory process step for improving the code and for            }
                                   finding the problems early in the software lifecycle.
                                      Since testing and manual code review processes are                 When you run it, it prints 1, not 11 – why? Let’s use a
                                   resource-intensive, it would be helpful to use automated
                                   tools to review code. Static analysis tools help consid-               Benefits of Using FOSS Java Static Analysis Tools
                NEED               erably in detecting the problems early in the software
                HEAD               lifecycle and help enhance the quality of the code                        Using Java static analysis tools can significantly improve the quality
                                   significantly.                                                       of code. Although static analysis tools can’t cover all the paths or pos-
                SHOT
                                      There are many high-quality Java tools available in the           sibilities, it provides significant help in providing coverage in detecting
                                   open source domain. While it’s true that Java programs               problems early in code; such tools can also point out programming prob-
      S. G. Ganesh is a research   don’t suffer from traditional C/C++ problems like memory             lems and warn of violations of important and well-accepted program-
  engineer at Siemens (Corpo-      issues and major portability issues, Java software does suf-         ming rules and recommendations.
 rate Technology), Bangalore.      fer quality problems like reliability, efficiency, maintain-              Using static analysis tools has many attractive benefits. A few of the
  Prior to Siemens, he worked      ability, and security. A brief discussion on benefits of using       salient benefits of most of these tools are listed here. Most of the Java
         at Hewlett-Packard for    FOSS Java tools is given in the sidebar.                             FOSS tools:
   around five years. His areas        Before getting into the meat of the matter, let’s discuss         • Can cover code that’s not covered by testing or dynamic analysis
 of interest are programming       why bugs happen. First, it’s important to recognize that             • Find many unusual or uncommon bugs that are usually missed
languages and compilers. His       everyone makes mistakes, even experts. Second, compil-                  during testing or manual code review
  latest book is 60 Tips on Ob-    ers only check for syntax and semantic violations. Errors            • Work even on partial code – fully compilable source isn’t always
   ject Oriented Programming       in language or API use, which manifest themselves as                    needed
   (ISBN-13 978-0-07-065670-3)     bugs, aren’t detected by compilers: This is left to static           • Easily integrate with popular IDEs, so it’s comfortable to use them in
    published by Tata McGraw-      analysis tools and it’s important to use them to detect cod-            your favorite environment
                Hill, New Delhi.   ing problems. Third, programmers and engineers are un-               • Are usually easy-to-run –with just a button click from your IDE
                                   der constant pressure to “get-the-work-done” under tight             • Are absolutely free and high-quality
        sgganesh@gmail.com         schedules; working under “almost-impossible-to-meet”


   10       May 2008                                                                                                                                                 JDJ.SYS-CON.com
tool to detect the problem. The antic tool (that’s part of
JLint) finds it:

$antic –java LongVal.java
LongVal.java:3:26: May be ‘l’ is used instead of ‘1’ at the end of
integer constant


   The programmer, possibly by mistake, typed ‘l’ (English
letter l) instead of ‘1’ (number one)!

    long l = 0x1l;


    To avoid this problem, it’s best to use ‘L’ (upper case
letter L) as the suffix for long constants instead of ‘l’ (lower
case letter l).
    Antic is part of the Jlint tool that’s meant to find prob-        Figure 1 FindBugs detects the check-for-equality-to-NaN problem
lems related to C syntax. There are quite a few coding
problems that are common to languages that use C-like
syntax. The problem we saw now is just one such problem.
Jlint ferrets out Java inconsistencies and bugs. It’s not a
very sophisticated tool and if you don’t have experience
using static analysis tools, JLint is a good tool to start with.
Antic works on Java source files and Jlint works on Java
class file builds. It’s a command line tool and easy-to-use.
It’s available at http://jlint.sourceforge.net.
                                                                      Figure 2 Test.java program results in NullPointerException
FindBugs
        What does this program print?

class NaNTest {
public static void main(String[] s) {
        double d = getVal();
        if(d == Double.NaN)
System.out.println(“d is NaN”);
    }                                                                 Figure 3 The DeadLock.java program results in a “deadlock condition”
          private static double getVal() {
              return Double.NaN;
          }                                                          PMD
}                                                                       What’s wrong with the program in Listing 1? If you
                                                                     try to run it (as shown in Figure 2) you’ll get a NullPointer-
   You might be surprised to find that it doesn’t print any-         Exception!
thing! What went wrong? The FindBugs tool detects the                   What could have gone wrong? PMD detects it and warns
problem and warns us about it (see Figure 1).                        of the problem:
   The bug is that the condition (NaN == NaN) evaluates
to false! In the condition (d == Double.NaN), this code              $ pmd Test.java text design
checks to see if a floating-point value is equal to the spe-         Test.java:3     Overridable method ‘foo’ called during object con-
cial “Not A Number” value. The IEEE 754 floating-point               struction
standard provides the special semantics of NaN: no value
is equal to NaN, including NaN itself. So, the check (d ==              The bug in this program is that the constructor of
Double.NaN) always evaluates to false. The correct check             the Base class calls an overridden method. Construc-
to use is the condition check Double.isNaN(x).                       tors don’t support runtime polymorphism since derived
   The FindBugs tool detects this problem and aptly                  objects aren’t constructed when the base class constructor
names it “Doomed test for equality to NaN”.                          executes. The virtual method foo is called from the base
   The FindBugs tool is excellent. It detects correctness            class constructor. Since foo is overridden, the overridden
problems, multithreading issues, performance problems,               foo calls the toString method from I, which isn’t initial-
and bad practices. It has less false positives and warns             ized yet (note that i gets initialized only after the Derived
of only critical or important problems that are likely               constructor has completed executing). Because of this, the
to be actual defects in code. So, if you’re pressed for time         program terminates with a NullPointerException. For this
and want to look at only important problems, this tool               reason, it’s not a recommended programming practice to
will suit you. It runs on Java class/jar files, so no Java           call overridable methods from constructors.
source files are needed to use it. And it runs in a nice                The PMD tool checks for problems like possible bugs,
standalone GUI. You can download it at http://findbugs.              design rule violations, duplicates, sub-optimal or dead
sourceforge.net/.                                                    code, suggestions for migration to newer JDK versions,


JDJ.SYS-CON.com                                                                                                                              May 2008   11
FEATURE

                                 J2EE, JavaBeans, JSP, and JUnit rules. It works on Java                Acquiring multiple locks is not a recommended program-
                                 source files and can be used from command lines. Plug-              ming practice. However, it’s often required in practice, so
                                 ins for popular IDEs like Eclipse, JBuilder, and JCreator           when we need to acquire multiple locks, we should ensure
                                 are also available. You can download it from http://pmd.            that we acquire them in the same order in the code.
                                 sourceforge.net/.                                                      Alternatively, we can consider using non-blocking locks
                                                                                                     when we attempt to acquire multiple locks. The tryLock meth-
                                 QJ-Pro                                                              od in the java.util.concurrent.locks.Lock interface provides
                                     What’s wrong with the program in Listing 2?                     this ability. It’s also recommended to release locks quickly and
                                     It’s likely that the program will hang after running success-   not hold the locks for a long time; so, it’s not recommended to
                                 fully for few times as shown in Figure 3; in other words, this      use sleep/wait methods after acquiring a lock; consider using
                                 program can lead to a “deadlocked condition” (the program           the wait/notify mechanism instead to avoid deadlocks be-
                                 actually hint at this: the name of the class is Deadlock!).         cause of holding a lock for a long time waiting for a condition
                                     The QJ-Pro tool detects it as shown in Figure 4.                to occur.
                                     The bug in this code is that the code acquires two locks in        The QJ-Pro tool checks for problems like conformance to
                                 opposite order; and after that a sleep/wait method is called        coding standards, coding best practices, misuse of features,
                                 – this condition will usually result in a deadlock.                 and APIs. It gives lots of violations by default, so you’d have to
                                     Locks are the basic Java synchronization mechanism. Using       spend some time selecting the list of rules you want to run for
                                 locks ensures exclusive ownership for a thread while executing      your project. It works on Java source files and is easy-to-use in
                                 a critical section. Incorrect use of synchronization can lead to    its standalone GUI version (shown in Figure 5). You can use its
                                 deadlocks.                                                          plug-ins with popular IDEs like Eclipse, JBuilder, JDeveloper
                                     A big problem with deadlocks (as with most multithreading       plug-ins or Ant. You can get QJ-Pro from http://qjpro.source-
                                 problems) is that deadlocks are “non-deterministic” – they          forge.net/.
                                 need not reproduce consistently, and so it’s difficult to detect,
                                 reproduce, and fix problems related to deadlocks.                    Other Tools
                                     Acquiring multiple locks is prone to deadlock, particularly        Other than the four tools covered here – Jlint, FindBugs,
                                 if not done in the same order or if the sleep()/wait() in the       PMD, and QJ-Pro – there are many other FOSS tools avail-
                                 Thread is called after acquiring locks. In this program, foo and    able. For example, CheckStyle checks for adherence to coding
                                 bar acquire locks in opposite order and call sleep(). Hence         standards such as Sun’s. You can get it from http://checkstyle.
                                 deadlock occurs.                                                    sourceforge.net/. JCSC (Java Coding Style Checker) checks for
                                                                                                     coding style adherence and for common bugs. You can get it at
                                                                                                     http://jcsc.sourceforge.net/. There are many more useful tools
                                                                                                     like Classycle, Condenser, DoctorJ, and JarAnalyzer. More in-
                                                                                                     formation and links on Java tools is provided in the Resource
                                                                                                     section.

                                                                                                     Conclusion
                                                                                                        We saw four specific static analysis tools that can be used to
                                                                                                     detect not-so-common defects in code. They are free, easy-to-
                                                                                                     integrate with IDEs, and easy-to-use. It’s highly recommended
                                                                                                     to use such tools to improve the quality of the software by
                                                                                                     detecting and fixing bugs early in the software lifecycle.
     Figure 4 QJ-Pro detects deadlock because of acquiring multiple locks
                                                                                                     Resources
                                                                                                     • If you’re interested in a list of the Java FOSS static analysis
                                                                                                       tools available, check http://java-source.net/open-source/
                                                                                                       code-analyzers.
                                                                                                     • “A Comparison of Bug Finding Tools for Java” by Nick
                                                                                                       Rutar, Christian B. Almazan, and Jeffrey S. Foster from
                                                                                                       the University of Maryland provides a detailed technical
                                                                                                       comparison of Bandera, ESC/Java, FindBugs, JLint and
                                                                                                       PMD tools. See http://www.cs.umd.edu/~jfoster/papers/
                                                                                                       issre04.pdf.
                                                                                                     • If you’re using Eclipse, it’s very convenient to use Java
                                                                                                       tools as plug-ins. The list of available plug-ins for Java is at
                                                                                                       http://www.eclipseplugincentral.com/Web_Links-index-
                                                                                                       req-viewcatlink-cid-14-orderby-rating.html.
                                                                                                     • The book Java Puzzlers: Traps, Pitfalls, and Corner Cases
                                                                                                       by Joshua Bloch and Neal Gafter covers many interesting
                                                                                                       bugs that can happen in code. Check the link http://www.
     Figure 5 QJ-Pro detects deadlock because of acquiring multiple locks                              javapuzzlers.com/.


12        May 2008                                                                                                                                       JDJ.SYS-CON.com
Listing 1                                                                                      synchronized(That.class) {


   class Base {                                                                                             Thread.currentThread().sleep(10);


       public Base() {                                                                            }


             foo();                                                         }


       }                                                        }


       public void foo() {                                              public static void bar() throws InterruptedException {


            System.out.println(“In Base’s foo “);                           synchronized(That.class) {


       }                                                                                          synchronized(This.class) {


   }                                                                                                        Thread.currentThread().sleep(10);


                                                                                        }


   class Derived extends Base {                                                     }


       public Derived() {                                           }


            i = new Integer(10);


       }                                                                public void run() {


       public void foo() {                                                  try {


            System.out.println(“In Derived’s foo “                                                foo();


   + i.toString());                                                                               bar();


       }                                                                    } catch (InterruptedException e) {


           private Integer i;                                                                     System.out.println(“Caught interrupted


   }                                                            exception”);


                                                                            }


   class Test {                                                         }


       public static void main(String [] s) {                   }


             new Derived().foo();


       }                                                        class DeadLock {


   }
                                                                        public static void main(String []s) {


                                                                            DoSynchronize pc = new DoSynchronize();


                                                                                            Thread t1 = new Thread(pc);
   Listing 2

   class This {}                                                                            Thread t2 = new Thread(pc);


   class That {}
                                                                                            t1.start();


                                                                                            t2.start();
   class DoSynchronize implements Runnable {

                                                                                }
       public static void foo() throws InterruptedException {


               synchronized(This.class) {                       }




JDJ.SYS-CON.com                                                                                                                            May 2008   13

Weitere ähnliche Inhalte

Was ist angesagt?

Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentJohn Blum
 
JUnit with_mocking
JUnit with_mockingJUnit with_mocking
JUnit with_mockingZeeshan Khan
 
Testers and developers think differently
Testers and developers think differentlyTesters and developers think differently
Testers and developers think differentlyNuthan Kumar
 
Test driven development
Test driven developmentTest driven development
Test driven developmentNascenia IT
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzerPVS-Studio
 
Testing Plug-in Architectures
Testing Plug-in ArchitecturesTesting Plug-in Architectures
Testing Plug-in ArchitecturesArie van Deursen
 
Test-Driven Development (TDD)
Test-Driven Development (TDD)Test-Driven Development (TDD)
Test-Driven Development (TDD)Brian Rasmussen
 
Quality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality MattersQuality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality MattersMarc Miquel
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team developmentAndrey Karpov
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team developmentPVS-Studio
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team developmentPVS-Studio
 
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012TEST Huddle
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp PhillyProduction Debugging at Code Camp Philly
Production Debugging at Code Camp PhillyBrian Lyttle
 
Engaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile ProjectsEngaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile ProjectsRavi Kumar
 
Konstantin Knizhnik: static analysis, a view from aside
Konstantin Knizhnik: static analysis, a view from asideKonstantin Knizhnik: static analysis, a view from aside
Konstantin Knizhnik: static analysis, a view from asidePVS-Studio
 
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...RootedCON
 

Was ist angesagt? (20)

Ready, Set, Refactor
Ready, Set, RefactorReady, Set, Refactor
Ready, Set, Refactor
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
JUnit with_mocking
JUnit with_mockingJUnit with_mocking
JUnit with_mocking
 
Testers and developers think differently
Testers and developers think differentlyTesters and developers think differently
Testers and developers think differently
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzer
 
Testing Plug-in Architectures
Testing Plug-in ArchitecturesTesting Plug-in Architectures
Testing Plug-in Architectures
 
Test-Driven Development (TDD)
Test-Driven Development (TDD)Test-Driven Development (TDD)
Test-Driven Development (TDD)
 
Quality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality MattersQuality Assurance 1: Why Quality Matters
Quality Assurance 1: Why Quality Matters
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAUTest Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team development
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team development
 
Regular use of static code analysis in team development
Regular use of static code analysis in team developmentRegular use of static code analysis in team development
Regular use of static code analysis in team development
 
Python and test
Python and testPython and test
Python and test
 
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
Peter Zimmerer - Evolve Design For Testability To The Next Level - EuroSTAR 2012
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp PhillyProduction Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
 
Engaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile ProjectsEngaging IV&V Testing Services for Agile Projects
Engaging IV&V Testing Services for Agile Projects
 
Konstantin Knizhnik: static analysis, a view from aside
Konstantin Knizhnik: static analysis, a view from asideKonstantin Knizhnik: static analysis, a view from aside
Konstantin Knizhnik: static analysis, a view from aside
 
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
Joxean Koret - Interactive Static Analysis Tools for Vulnerability Discovery ...
 

Andere mochten auch

ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании
ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании
ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании Дмитрий Выскорко
 
CityU academic transcript 2015
CityU academic transcript 2015CityU academic transcript 2015
CityU academic transcript 2015Wing Tsun Lee
 
Pak 1974-na-committe-ahmadiyya.vOL 5
Pak 1974-na-committe-ahmadiyya.vOL 5Pak 1974-na-committe-ahmadiyya.vOL 5
Pak 1974-na-committe-ahmadiyya.vOL 5muzaffertahir9
 
Q3 2013 ASSA ABLOY investors presentation 28 october
Q3 2013 ASSA ABLOY investors presentation 28 octoberQ3 2013 ASSA ABLOY investors presentation 28 october
Q3 2013 ASSA ABLOY investors presentation 28 octoberASSA ABLOY
 
Anger in the Light of J Krishnamurti Teachings
Anger in the Light of J Krishnamurti TeachingsAnger in the Light of J Krishnamurti Teachings
Anger in the Light of J Krishnamurti TeachingsSaumitra Das
 
Authorized and Exclusive Distributor for Ecuador
Authorized and Exclusive Distributor for EcuadorAuthorized and Exclusive Distributor for Ecuador
Authorized and Exclusive Distributor for EcuadorVivian Guevara
 
Aula 1 a obra de kant como síntese do nascente pensamento burguês
Aula 1   a obra de kant como síntese do nascente pensamento burguêsAula 1   a obra de kant como síntese do nascente pensamento burguês
Aula 1 a obra de kant como síntese do nascente pensamento burguêsLeandro Alano
 
365 产品介绍 产品推广app_20150721
365 产品介绍 产品推广app_20150721365 产品介绍 产品推广app_20150721
365 产品介绍 产品推广app_20150721Rui (Nash) Yang
 
Top 10 Tips from Millionaires
Top 10 Tips from MillionairesTop 10 Tips from Millionaires
Top 10 Tips from Millionairesmaemis
 
Working capital
Working capitalWorking capital
Working capitalNits Kedia
 
Q2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 julyQ2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 julyASSA ABLOY
 
Ppt 3 Minutes Of Fame
Ppt 3 Minutes Of FamePpt 3 Minutes Of Fame
Ppt 3 Minutes Of Fameguest437642
 
Yellow Slice Design Profile - 2016
Yellow Slice Design Profile - 2016Yellow Slice Design Profile - 2016
Yellow Slice Design Profile - 2016Yellow Slice
 
Yo mama jokes? | Yahoo Answers
Yo mama jokes? | Yahoo AnswersYo mama jokes? | Yahoo Answers
Yo mama jokes? | Yahoo Answerseconomicmystery85
 
Pengumuman sipencatar 2015
Pengumuman sipencatar 2015Pengumuman sipencatar 2015
Pengumuman sipencatar 2015raizin
 

Andere mochten auch (19)

ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании
ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании
ООО БАРРЕЛЬ НЕФТЬ ГРУПП - презентационный каталог компании
 
CityU academic transcript 2015
CityU academic transcript 2015CityU academic transcript 2015
CityU academic transcript 2015
 
Pak 1974-na-committe-ahmadiyya.vOL 5
Pak 1974-na-committe-ahmadiyya.vOL 5Pak 1974-na-committe-ahmadiyya.vOL 5
Pak 1974-na-committe-ahmadiyya.vOL 5
 
Q3 2013 ASSA ABLOY investors presentation 28 october
Q3 2013 ASSA ABLOY investors presentation 28 octoberQ3 2013 ASSA ABLOY investors presentation 28 october
Q3 2013 ASSA ABLOY investors presentation 28 october
 
Anger in the Light of J Krishnamurti Teachings
Anger in the Light of J Krishnamurti TeachingsAnger in the Light of J Krishnamurti Teachings
Anger in the Light of J Krishnamurti Teachings
 
Authorized and Exclusive Distributor for Ecuador
Authorized and Exclusive Distributor for EcuadorAuthorized and Exclusive Distributor for Ecuador
Authorized and Exclusive Distributor for Ecuador
 
Tap lenh co_ban
Tap lenh co_banTap lenh co_ban
Tap lenh co_ban
 
Aula 1 a obra de kant como síntese do nascente pensamento burguês
Aula 1   a obra de kant como síntese do nascente pensamento burguêsAula 1   a obra de kant como síntese do nascente pensamento burguês
Aula 1 a obra de kant como síntese do nascente pensamento burguês
 
365 产品介绍 产品推广app_20150721
365 产品介绍 产品推广app_20150721365 产品介绍 产品推广app_20150721
365 产品介绍 产品推广app_20150721
 
Phone list
Phone listPhone list
Phone list
 
Top 10 Tips from Millionaires
Top 10 Tips from MillionairesTop 10 Tips from Millionaires
Top 10 Tips from Millionaires
 
Working capital
Working capitalWorking capital
Working capital
 
Q2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 julyQ2 2013 ASSA ABLOY investors presentation 19 july
Q2 2013 ASSA ABLOY investors presentation 19 july
 
Thainara historia
Thainara historiaThainara historia
Thainara historia
 
Ppt 3 Minutes Of Fame
Ppt 3 Minutes Of FamePpt 3 Minutes Of Fame
Ppt 3 Minutes Of Fame
 
Yellow Slice Design Profile - 2016
Yellow Slice Design Profile - 2016Yellow Slice Design Profile - 2016
Yellow Slice Design Profile - 2016
 
Yo mama jokes? | Yahoo Answers
Yo mama jokes? | Yahoo AnswersYo mama jokes? | Yahoo Answers
Yo mama jokes? | Yahoo Answers
 
Pengumuman sipencatar 2015
Pengumuman sipencatar 2015Pengumuman sipencatar 2015
Pengumuman sipencatar 2015
 
Status report1
Status report1Status report1
Status report1
 

Ähnlich wie Jdj Foss Java Tools

Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsGanesh Samarthyam
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01Udeshg90
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).pptjerlinS1
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...jeyasrig
 
Top 10 static code analysis tool
Top 10 static code analysis toolTop 10 static code analysis tool
Top 10 static code analysis toolscmGalaxy Inc
 
debuggingSession.pptx
debuggingSession.pptxdebuggingSession.pptx
debuggingSession.pptxmarawanwael
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development EnvironmentsPhilip Johnson
 
An ideal static analyzer, or why ideals are unachievable
An ideal static analyzer, or why ideals are unachievableAn ideal static analyzer, or why ideals are unachievable
An ideal static analyzer, or why ideals are unachievablePVS-Studio
 
0136 ideal static_analyzer
0136 ideal static_analyzer0136 ideal static_analyzer
0136 ideal static_analyzerPVS-Studio
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmerLeylimYaln
 
MODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptxMODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptxVeerannaKotagi1
 
Debugging with NetBeans IDE
Debugging with NetBeans IDEDebugging with NetBeans IDE
Debugging with NetBeans IDEAndreas Ruppen
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about javakanchanmahajan23
 
Achieving quality with tools case study
Achieving quality with tools case studyAchieving quality with tools case study
Achieving quality with tools case studyEosSoftware
 
Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Mohamed Samy
 
Testing parallel programs
Testing parallel programsTesting parallel programs
Testing parallel programsPVS-Studio
 
National 5 Computing Science - Testing
National 5 Computing Science - TestingNational 5 Computing Science - Testing
National 5 Computing Science - TestingForrester High School
 

Ähnlich wie Jdj Foss Java Tools (20)

Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
 
javabasics_ programming development chapter01
javabasics_ programming development chapter01javabasics_ programming development chapter01
javabasics_ programming development chapter01
 
debugging (1).ppt
debugging (1).pptdebugging (1).ppt
debugging (1).ppt
 
An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...An important characteristic of a test suite that is computed by a dynamic ana...
An important characteristic of a test suite that is computed by a dynamic ana...
 
Top 10 static code analysis tool
Top 10 static code analysis toolTop 10 static code analysis tool
Top 10 static code analysis tool
 
debuggingSession.pptx
debuggingSession.pptxdebuggingSession.pptx
debuggingSession.pptx
 
Interactive Development Environments
Interactive Development EnvironmentsInteractive Development Environments
Interactive Development Environments
 
PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
 
An ideal static analyzer, or why ideals are unachievable
An ideal static analyzer, or why ideals are unachievableAn ideal static analyzer, or why ideals are unachievable
An ideal static analyzer, or why ideals are unachievable
 
0136 ideal static_analyzer
0136 ideal static_analyzer0136 ideal static_analyzer
0136 ideal static_analyzer
 
The pragmatic programmer
The pragmatic programmerThe pragmatic programmer
The pragmatic programmer
 
MODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptxMODULE_1_The History and Evolution of Java.pptx
MODULE_1_The History and Evolution of Java.pptx
 
Debugging with NetBeans IDE
Debugging with NetBeans IDEDebugging with NetBeans IDE
Debugging with NetBeans IDE
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
 
Achieving quality with tools case study
Achieving quality with tools case studyAchieving quality with tools case study
Achieving quality with tools case study
 
Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010Improving developer tester collaboration with microsoft visual studio 2010
Improving developer tester collaboration with microsoft visual studio 2010
 
Quick Intro to Clean Coding
Quick Intro to Clean CodingQuick Intro to Clean Coding
Quick Intro to Clean Coding
 
mydevops.pptx
mydevops.pptxmydevops.pptx
mydevops.pptx
 
Testing parallel programs
Testing parallel programsTesting parallel programs
Testing parallel programs
 
National 5 Computing Science - Testing
National 5 Computing Science - TestingNational 5 Computing Science - Testing
National 5 Computing Science - Testing
 

Mehr von Ganesh Samarthyam

Applying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeApplying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeGanesh Samarthyam
 
CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”Ganesh Samarthyam
 
Great Coding Skills Aren't Enough
Great Coding Skills Aren't EnoughGreat Coding Skills Aren't Enough
Great Coding Skills Aren't EnoughGanesh Samarthyam
 
College Project - Java Disassembler - Description
College Project - Java Disassembler - DescriptionCollege Project - Java Disassembler - Description
College Project - Java Disassembler - DescriptionGanesh Samarthyam
 
Coding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean CodeCoding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean CodeGanesh Samarthyam
 
Design Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesDesign Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesGanesh Samarthyam
 
Bangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief PresentationBangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief PresentationGanesh Samarthyam
 
Bangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterBangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterGanesh Samarthyam
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Ganesh Samarthyam
 
OO Design and Design Patterns in C++
OO Design and Design Patterns in C++ OO Design and Design Patterns in C++
OO Design and Design Patterns in C++ Ganesh Samarthyam
 
Bangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship DeckBangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship DeckGanesh Samarthyam
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageGanesh Samarthyam
 
Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Ganesh Samarthyam
 
Java Generics - Quiz Questions
Java Generics - Quiz QuestionsJava Generics - Quiz Questions
Java Generics - Quiz QuestionsGanesh Samarthyam
 
Software Architecture - Quiz Questions
Software Architecture - Quiz QuestionsSoftware Architecture - Quiz Questions
Software Architecture - Quiz QuestionsGanesh Samarthyam
 
Core Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quizCore Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quizGanesh Samarthyam
 

Mehr von Ganesh Samarthyam (20)

Wonders of the Sea
Wonders of the SeaWonders of the Sea
Wonders of the Sea
 
Animals - for kids
Animals - for kids Animals - for kids
Animals - for kids
 
Applying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeApplying Refactoring Tools in Practice
Applying Refactoring Tools in Practice
 
CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”CFP - 1st Workshop on “AI Meets Blockchain”
CFP - 1st Workshop on “AI Meets Blockchain”
 
Great Coding Skills Aren't Enough
Great Coding Skills Aren't EnoughGreat Coding Skills Aren't Enough
Great Coding Skills Aren't Enough
 
College Project - Java Disassembler - Description
College Project - Java Disassembler - DescriptionCollege Project - Java Disassembler - Description
College Project - Java Disassembler - Description
 
Coding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean CodeCoding Guidelines - Crafting Clean Code
Coding Guidelines - Crafting Clean Code
 
Design Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on ExamplesDesign Patterns - Compiler Case Study - Hands-on Examples
Design Patterns - Compiler Case Study - Hands-on Examples
 
Bangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief PresentationBangalore Container Conference 2017 - Brief Presentation
Bangalore Container Conference 2017 - Brief Presentation
 
Bangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - PosterBangalore Container Conference 2017 - Poster
Bangalore Container Conference 2017 - Poster
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)
 
OO Design and Design Patterns in C++
OO Design and Design Patterns in C++ OO Design and Design Patterns in C++
OO Design and Design Patterns in C++
 
Bangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship DeckBangalore Container Conference 2017 - Sponsorship Deck
Bangalore Container Conference 2017 - Sponsorship Deck
 
Let's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming LanguageLet's Go: Introduction to Google's Go Programming Language
Let's Go: Introduction to Google's Go Programming Language
 
Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction Google's Go Programming Language - Introduction
Google's Go Programming Language - Introduction
 
Java Generics - Quiz Questions
Java Generics - Quiz QuestionsJava Generics - Quiz Questions
Java Generics - Quiz Questions
 
Java Generics - by Example
Java Generics - by ExampleJava Generics - by Example
Java Generics - by Example
 
Software Architecture - Quiz Questions
Software Architecture - Quiz QuestionsSoftware Architecture - Quiz Questions
Software Architecture - Quiz Questions
 
Docker by Example - Quiz
Docker by Example - QuizDocker by Example - Quiz
Docker by Example - Quiz
 
Core Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quizCore Java: Best practices and bytecodes quiz
Core Java: Best practices and bytecodes quiz
 

Kürzlich hochgeladen

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Kürzlich hochgeladen (20)

Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Jdj Foss Java Tools

  • 1. FEATURE Uncommon Java Bugs Detecting them with FOSS tools by S.G. Ganesh A ny large Java source base can have insidious and work schedules results in code that is often substandard subtle bugs. Every experienced Java programmer and filled with bugs. So, because of practical problems, knows that finding and fixing these bugs can be most code developed in the real world has bugs and it’s difficult and costly. Fortunately, there are a large worthwhile using static analysis tools to find them and fix number of free open source Java tools available that can them. be used to find and fix defects early in the development In this article we’ll see an uncommon defect and intro- lifecycle. In this article, we’ll look at a few examples of duce a tool that detects it. We do this for two reasons: to specific uncommon or unusual defects that can happen in illustrate the kind of unusual problems that can happen code and see how different Java static analysis tools detect in the code and to introduce a FOSS tool that’s suitable for them. detecting this kind of problem. Testing Jlint As software gets more complex and ubiquitous, it What does this program print? becomes more difficult to ensure high-quality code. One common method of finding bugs is testing. But testing class LongVal { can’t cover all paths and possibilities or enforce good public static void main(String[] s) { programming practices. Expert knowledge in the form of long l = 0x1l; manual code review by peers is one of the best ways to System.out.format(“%x”, l); ensure good code quality. Code review is often used as a } mandatory process step for improving the code and for } finding the problems early in the software lifecycle. Since testing and manual code review processes are When you run it, it prints 1, not 11 – why? Let’s use a resource-intensive, it would be helpful to use automated tools to review code. Static analysis tools help consid- Benefits of Using FOSS Java Static Analysis Tools NEED erably in detecting the problems early in the software HEAD lifecycle and help enhance the quality of the code Using Java static analysis tools can significantly improve the quality significantly. of code. Although static analysis tools can’t cover all the paths or pos- SHOT There are many high-quality Java tools available in the sibilities, it provides significant help in providing coverage in detecting open source domain. While it’s true that Java programs problems early in code; such tools can also point out programming prob- S. G. Ganesh is a research don’t suffer from traditional C/C++ problems like memory lems and warn of violations of important and well-accepted program- engineer at Siemens (Corpo- issues and major portability issues, Java software does suf- ming rules and recommendations. rate Technology), Bangalore. fer quality problems like reliability, efficiency, maintain- Using static analysis tools has many attractive benefits. A few of the Prior to Siemens, he worked ability, and security. A brief discussion on benefits of using salient benefits of most of these tools are listed here. Most of the Java at Hewlett-Packard for FOSS Java tools is given in the sidebar. FOSS tools: around five years. His areas Before getting into the meat of the matter, let’s discuss • Can cover code that’s not covered by testing or dynamic analysis of interest are programming why bugs happen. First, it’s important to recognize that • Find many unusual or uncommon bugs that are usually missed languages and compilers. His everyone makes mistakes, even experts. Second, compil- during testing or manual code review latest book is 60 Tips on Ob- ers only check for syntax and semantic violations. Errors • Work even on partial code – fully compilable source isn’t always ject Oriented Programming in language or API use, which manifest themselves as needed (ISBN-13 978-0-07-065670-3) bugs, aren’t detected by compilers: This is left to static • Easily integrate with popular IDEs, so it’s comfortable to use them in published by Tata McGraw- analysis tools and it’s important to use them to detect cod- your favorite environment Hill, New Delhi. ing problems. Third, programmers and engineers are un- • Are usually easy-to-run –with just a button click from your IDE der constant pressure to “get-the-work-done” under tight • Are absolutely free and high-quality sgganesh@gmail.com schedules; working under “almost-impossible-to-meet” 10 May 2008 JDJ.SYS-CON.com
  • 2. tool to detect the problem. The antic tool (that’s part of JLint) finds it: $antic –java LongVal.java LongVal.java:3:26: May be ‘l’ is used instead of ‘1’ at the end of integer constant The programmer, possibly by mistake, typed ‘l’ (English letter l) instead of ‘1’ (number one)! long l = 0x1l; To avoid this problem, it’s best to use ‘L’ (upper case letter L) as the suffix for long constants instead of ‘l’ (lower case letter l). Antic is part of the Jlint tool that’s meant to find prob- Figure 1 FindBugs detects the check-for-equality-to-NaN problem lems related to C syntax. There are quite a few coding problems that are common to languages that use C-like syntax. The problem we saw now is just one such problem. Jlint ferrets out Java inconsistencies and bugs. It’s not a very sophisticated tool and if you don’t have experience using static analysis tools, JLint is a good tool to start with. Antic works on Java source files and Jlint works on Java class file builds. It’s a command line tool and easy-to-use. It’s available at http://jlint.sourceforge.net. Figure 2 Test.java program results in NullPointerException FindBugs What does this program print? class NaNTest { public static void main(String[] s) { double d = getVal(); if(d == Double.NaN) System.out.println(“d is NaN”); } Figure 3 The DeadLock.java program results in a “deadlock condition” private static double getVal() { return Double.NaN; } PMD } What’s wrong with the program in Listing 1? If you try to run it (as shown in Figure 2) you’ll get a NullPointer- You might be surprised to find that it doesn’t print any- Exception! thing! What went wrong? The FindBugs tool detects the What could have gone wrong? PMD detects it and warns problem and warns us about it (see Figure 1). of the problem: The bug is that the condition (NaN == NaN) evaluates to false! In the condition (d == Double.NaN), this code $ pmd Test.java text design checks to see if a floating-point value is equal to the spe- Test.java:3 Overridable method ‘foo’ called during object con- cial “Not A Number” value. The IEEE 754 floating-point struction standard provides the special semantics of NaN: no value is equal to NaN, including NaN itself. So, the check (d == The bug in this program is that the constructor of Double.NaN) always evaluates to false. The correct check the Base class calls an overridden method. Construc- to use is the condition check Double.isNaN(x). tors don’t support runtime polymorphism since derived The FindBugs tool detects this problem and aptly objects aren’t constructed when the base class constructor names it “Doomed test for equality to NaN”. executes. The virtual method foo is called from the base The FindBugs tool is excellent. It detects correctness class constructor. Since foo is overridden, the overridden problems, multithreading issues, performance problems, foo calls the toString method from I, which isn’t initial- and bad practices. It has less false positives and warns ized yet (note that i gets initialized only after the Derived of only critical or important problems that are likely constructor has completed executing). Because of this, the to be actual defects in code. So, if you’re pressed for time program terminates with a NullPointerException. For this and want to look at only important problems, this tool reason, it’s not a recommended programming practice to will suit you. It runs on Java class/jar files, so no Java call overridable methods from constructors. source files are needed to use it. And it runs in a nice The PMD tool checks for problems like possible bugs, standalone GUI. You can download it at http://findbugs. design rule violations, duplicates, sub-optimal or dead sourceforge.net/. code, suggestions for migration to newer JDK versions, JDJ.SYS-CON.com May 2008 11
  • 3. FEATURE J2EE, JavaBeans, JSP, and JUnit rules. It works on Java Acquiring multiple locks is not a recommended program- source files and can be used from command lines. Plug- ming practice. However, it’s often required in practice, so ins for popular IDEs like Eclipse, JBuilder, and JCreator when we need to acquire multiple locks, we should ensure are also available. You can download it from http://pmd. that we acquire them in the same order in the code. sourceforge.net/. Alternatively, we can consider using non-blocking locks when we attempt to acquire multiple locks. The tryLock meth- QJ-Pro od in the java.util.concurrent.locks.Lock interface provides What’s wrong with the program in Listing 2? this ability. It’s also recommended to release locks quickly and It’s likely that the program will hang after running success- not hold the locks for a long time; so, it’s not recommended to fully for few times as shown in Figure 3; in other words, this use sleep/wait methods after acquiring a lock; consider using program can lead to a “deadlocked condition” (the program the wait/notify mechanism instead to avoid deadlocks be- actually hint at this: the name of the class is Deadlock!). cause of holding a lock for a long time waiting for a condition The QJ-Pro tool detects it as shown in Figure 4. to occur. The bug in this code is that the code acquires two locks in The QJ-Pro tool checks for problems like conformance to opposite order; and after that a sleep/wait method is called coding standards, coding best practices, misuse of features, – this condition will usually result in a deadlock. and APIs. It gives lots of violations by default, so you’d have to Locks are the basic Java synchronization mechanism. Using spend some time selecting the list of rules you want to run for locks ensures exclusive ownership for a thread while executing your project. It works on Java source files and is easy-to-use in a critical section. Incorrect use of synchronization can lead to its standalone GUI version (shown in Figure 5). You can use its deadlocks. plug-ins with popular IDEs like Eclipse, JBuilder, JDeveloper A big problem with deadlocks (as with most multithreading plug-ins or Ant. You can get QJ-Pro from http://qjpro.source- problems) is that deadlocks are “non-deterministic” – they forge.net/. need not reproduce consistently, and so it’s difficult to detect, reproduce, and fix problems related to deadlocks. Other Tools Acquiring multiple locks is prone to deadlock, particularly Other than the four tools covered here – Jlint, FindBugs, if not done in the same order or if the sleep()/wait() in the PMD, and QJ-Pro – there are many other FOSS tools avail- Thread is called after acquiring locks. In this program, foo and able. For example, CheckStyle checks for adherence to coding bar acquire locks in opposite order and call sleep(). Hence standards such as Sun’s. You can get it from http://checkstyle. deadlock occurs. sourceforge.net/. JCSC (Java Coding Style Checker) checks for coding style adherence and for common bugs. You can get it at http://jcsc.sourceforge.net/. There are many more useful tools like Classycle, Condenser, DoctorJ, and JarAnalyzer. More in- formation and links on Java tools is provided in the Resource section. Conclusion We saw four specific static analysis tools that can be used to detect not-so-common defects in code. They are free, easy-to- integrate with IDEs, and easy-to-use. It’s highly recommended to use such tools to improve the quality of the software by detecting and fixing bugs early in the software lifecycle. Figure 4 QJ-Pro detects deadlock because of acquiring multiple locks Resources • If you’re interested in a list of the Java FOSS static analysis tools available, check http://java-source.net/open-source/ code-analyzers. • “A Comparison of Bug Finding Tools for Java” by Nick Rutar, Christian B. Almazan, and Jeffrey S. Foster from the University of Maryland provides a detailed technical comparison of Bandera, ESC/Java, FindBugs, JLint and PMD tools. See http://www.cs.umd.edu/~jfoster/papers/ issre04.pdf. • If you’re using Eclipse, it’s very convenient to use Java tools as plug-ins. The list of available plug-ins for Java is at http://www.eclipseplugincentral.com/Web_Links-index- req-viewcatlink-cid-14-orderby-rating.html. • The book Java Puzzlers: Traps, Pitfalls, and Corner Cases by Joshua Bloch and Neal Gafter covers many interesting bugs that can happen in code. Check the link http://www. Figure 5 QJ-Pro detects deadlock because of acquiring multiple locks javapuzzlers.com/. 12 May 2008 JDJ.SYS-CON.com
  • 4. Listing 1 synchronized(That.class) { class Base { Thread.currentThread().sleep(10); public Base() { } foo(); } } } public void foo() { public static void bar() throws InterruptedException { System.out.println(“In Base’s foo “); synchronized(That.class) { } synchronized(This.class) { } Thread.currentThread().sleep(10); } class Derived extends Base { } public Derived() { } i = new Integer(10); } public void run() { public void foo() { try { System.out.println(“In Derived’s foo “ foo(); + i.toString()); bar(); } } catch (InterruptedException e) { private Integer i; System.out.println(“Caught interrupted } exception”); } class Test { } public static void main(String [] s) { } new Derived().foo(); } class DeadLock { } public static void main(String []s) { DoSynchronize pc = new DoSynchronize(); Thread t1 = new Thread(pc); Listing 2 class This {} Thread t2 = new Thread(pc); class That {} t1.start(); t2.start(); class DoSynchronize implements Runnable { } public static void foo() throws InterruptedException { synchronized(This.class) { } JDJ.SYS-CON.com May 2008 13