SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Achieving Quality with
 Development Tools
Agenda

●   Bugs in Software
●   Why do bugs occur?
●   Product Quality
●   Kind of Tests
●   Bug Finding Techniques
●   Static Analysis
●   Static Analysis Challenges
●   Static Analysis Philosophy
●   Our Accuracy Goal
●   Bugs vs Style
●   Tools used for efficient development and achieve quality
Bugs in software

• Programmers are smart

• We have good techniques (e.g., unit testing, pair

programming, code inspections) for finding bugs early

So, most bugs remaining in production code must be
subtle, and require sophisticated techniques to find.

• Right?
Why do bugs occur?


●   Everybody makes dumb mistakes.

●   Java (and similar languages) have very large standard
    libraries.

●   Many possibilities for confusion and misuse.

●   Many possibilities for latent bugs (e.g., hashcode/equals).

●   Programmers play fast and loose with threads.
Product Quality


Lots of obvious bugs find their way into production software

● Testing and code inspections will not find every bug.

● Very hard to get high test coverage for a large system

● Limits to frequency, completeness of code inspections

● Techniques to find more bugs automatically are valuable

Quality is the responsibility of everyone on the team.
What kind of tests do we follow to achieve
                 Quality?
Bug Finding Techniques
● Code Inspections
  - Effective but have to be applied manually.

● Dynamic Techniques (Testing, Assertions)
  - Examine runtime behaviour and examine paths that are
  actually executed(advantages and disadvantages).

● Static Techniques
  - Explore abstractions of all possible behaviours.
  - Strongest formal proof of correctness (prohibitively
  difficult).
  - Partial verification demonstrates that some property holds
  for all executions.
  - Unsound techniques can identify “probable” bugs will miss
  some real bugs and may give inaccurate warnings.
Static Analysis


Let the computer figure out where (some of) the bugs
are.

  • Tools on static analysis to find bugs- Checkstyle,
  PMD, FindBugs, ESC/Java, Cqual, apart from other
  tools, papers, techniques etc,.

We think it should be!
Static Analysis Challenges


● Fundamental limits to static analysis

● Nontrivial properties of programs are undecidable

● Be consistently conservative: could choose to

● Never miss a real bug (but report some false positives)

● Never report a false positive (but miss some real bugs)

● Both false positives and false negatives are possible
Static Analysis philosophy


Two approaches to devising a static analysis to find bugs:

1. Given an analysis technique, figure out what bugs it
could find

2. Given a bug, figure out an analysis that could be used to find
occurrences of similar bugs
Accuracy Goal


Our goal is that at least 70% of high and medium priority
warnings should be real bugs.

• We manually classified warnings produced by tool for
several real applications and libraries.

• In general, we came close to achieving our goal.
Bugs vs Style
It is important to distinguish bug checkers from style
checkers-

●   Style checkers warn about dubious or dangerous coding
    idioms: however, instances of those idioms may not be
    particularly likely to be a bug

●   Bug checkers warn about code idioms that are likely to be
    actual bugs.

●   Style checkers are useful for enforcing consistent coding
    standards and help prevent certain kinds of bugs.
Style checker
By following a coding standard, we ensure that the source code
is predictable in its semantics and understood in the same
manner across the development team.

We make a clear distinction between standards related to style
and standards related to best practices.

Examples of style standards are where to place braces and how
to use whitespace.

Examples of best practices are when to use interfaces and how
to implement an equals method.
Tools used for fixing Bugs and
                   following Style

● Eclipse
● PMD
● FindBugs
● EclEmma
PMD
●   Syntactic checks on program source code

●   No dataflow component

●   Mainly detects violations of stylistic conventions
    – May be symptomatic of deeper problems

●   Contains a number of rule sets that define detectors for
    different style violations
    – Also tool for detecting suspected cut-and-paste code

●   Extensible – either using Java or XPath

●   Documentation contains details for using and extending
    rulesets
FindBugs
● Static Analysis tool that is based on the notion of bug patterns
  – Code idioms that are likely to be errors
  – i.e. does not follow the usual correct practice of language or
  API usage

● Similar to automated code inspection

● One of its aims is to raise awareness of the large number of
  easily detectable bugs that are not caught by traditional QA
  approaches.

 ● Open Source, contains detectors for bug patterns
– implemented using BCEL (bytecodeanalysis and instrumentation
library) and the Visitor design pattern
– Each detector visits each class of the application to be analysed
FindBugs
● Rough categories of detectors
  – Class Structure and Inheritance Hierarchy
  – Ignore code

● Linear Code Scan
  – Scan bytecodeof methods of analysed class and use
  heuristics to approximate control flow

● Control Sensitive
  – Use accurate control flow graph

● Dataflow
  – Most
How accurate is FindBugs?
Example
if ( out == null   ){

try {

out.close() ;

} catch (IOException e) {

}

}

As I said we are human beings and could make mistakes
like the example above.
What can FindBugs do?

●   Correctness bugs

    Null Pointer Dereference
    Return value ignored

●   Multithreaded correctness bugs

    Inconsistent synchronization
    Unconditional wait

●   Malicious code vulnerabilities

    Mutable static
    Returning a reference to an internal array
EclEmma

●   EclEmma is a free java tool that calculates the percentage of
    code accessed by tests. It can be used to identify which parts
    of the java program are lacking test coverage.

●   Our goal is to acheive > 80% of coverage
Conclusion


●  PMD and FindBugs helps find out bugs and follow coding
standard during the development stage.

●   EclEmma is used for measuring the code coverage.

●   The number of bugs found in the test environment or
    production becomes lesser by using these tools.

Mais conteúdo relacionado

Mais procurados

Random testing
Random testingRandom testing
Random testingCan KAYA
 
Testing strategies for legacy code
Testing strategies for legacy codeTesting strategies for legacy code
Testing strategies for legacy codeAlex Soto
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review ProcessDr. Syed Hassan Amin
 
Random testing & prototyping
Random testing & prototypingRandom testing & prototyping
Random testing & prototypingVipul Rastogi
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...dcieslak
 
Random testing
Random testingRandom testing
Random testingLocaweb
 
DevSecOps: Securing Applications with DevOps
DevSecOps: Securing Applications with DevOpsDevSecOps: Securing Applications with DevOps
DevSecOps: Securing Applications with DevOpsWouter de Kort
 
Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage" Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage" Rapita Systems Ltd
 
White box & Black box testing
White box & Black box testingWhite box & Black box testing
White box & Black box testingNitishMhaske1
 
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
 
Learn Bug Reporting Techniques
Learn Bug Reporting TechniquesLearn Bug Reporting Techniques
Learn Bug Reporting TechniquesQA InfoTech
 
Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...
Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...
Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...Virtual Forge
 
White box testing
White box testing White box testing
White box testing Mani Kanth
 
Quality Software With Unit Test
Quality Software With Unit TestQuality Software With Unit Test
Quality Software With Unit Testalice yang
 
Statistical debuging for programs written in dynamic programming language ruby
Statistical debuging for programs written in dynamic programming language   rubyStatistical debuging for programs written in dynamic programming language   ruby
Statistical debuging for programs written in dynamic programming language rubyAdeel Akhter
 

Mais procurados (20)

Random testing
Random testingRandom testing
Random testing
 
Testing strategies for legacy code
Testing strategies for legacy codeTesting strategies for legacy code
Testing strategies for legacy code
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review Process
 
Random testing & prototyping
Random testing & prototypingRandom testing & prototyping
Random testing & prototyping
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
 
Testing ppt
Testing pptTesting ppt
Testing ppt
 
Random testing
Random testingRandom testing
Random testing
 
Static Code Analysis
Static Code AnalysisStatic Code Analysis
Static Code Analysis
 
DevSecOps: Securing Applications with DevOps
DevSecOps: Securing Applications with DevOpsDevSecOps: Securing Applications with DevOps
DevSecOps: Securing Applications with DevOps
 
Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage" Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage"
 
White box & Black box testing
White box & Black box testingWhite box & Black box testing
White box & Black box testing
 
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 ...
 
Learn Bug Reporting Techniques
Learn Bug Reporting TechniquesLearn Bug Reporting Techniques
Learn Bug Reporting Techniques
 
Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...
Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...
Case Study: Automated Code Reviews In A Grown SAP Application Landscape At EW...
 
White box testing
White box testing White box testing
White box testing
 
White box testing
White box testingWhite box testing
White box testing
 
Quality Software With Unit Test
Quality Software With Unit TestQuality Software With Unit Test
Quality Software With Unit Test
 
Unit Testing Your Application
Unit Testing Your ApplicationUnit Testing Your Application
Unit Testing Your Application
 
Statistical debuging for programs written in dynamic programming language ruby
Statistical debuging for programs written in dynamic programming language   rubyStatistical debuging for programs written in dynamic programming language   ruby
Statistical debuging for programs written in dynamic programming language ruby
 
Debug me
Debug meDebug me
Debug me
 

Destaque

Simulation and its application
Simulation and its applicationSimulation and its application
Simulation and its applicationAlesh Dulal
 
OR Society workshop: Practical process improvement using Lean and 6 Sigma
OR Society workshop: Practical process improvement using Lean and 6 SigmaOR Society workshop: Practical process improvement using Lean and 6 Sigma
OR Society workshop: Practical process improvement using Lean and 6 SigmaImprovement Skills Consulting Ltd.
 
Industry 4.0 - Enabling operational excellence of packaging lines
Industry 4.0 - Enabling operational excellence of packaging linesIndustry 4.0 - Enabling operational excellence of packaging lines
Industry 4.0 - Enabling operational excellence of packaging linesStephane Potier
 
Heuristic Evaluation of iCalamityGuide Application
Heuristic Evaluation of iCalamityGuide ApplicationHeuristic Evaluation of iCalamityGuide Application
Heuristic Evaluation of iCalamityGuide ApplicationScott Abromowitz
 
Modelling and Simulation for Industry 4.0 SUCCESS CASES
Modelling and Simulation for Industry 4.0 SUCCESS CASESModelling and Simulation for Industry 4.0 SUCCESS CASES
Modelling and Simulation for Industry 4.0 SUCCESS CASESinLabFIB
 

Destaque (6)

Simulation and its application
Simulation and its applicationSimulation and its application
Simulation and its application
 
OR Society workshop: Practical process improvement using Lean and 6 Sigma
OR Society workshop: Practical process improvement using Lean and 6 SigmaOR Society workshop: Practical process improvement using Lean and 6 Sigma
OR Society workshop: Practical process improvement using Lean and 6 Sigma
 
Industry 4.0 - Enabling operational excellence of packaging lines
Industry 4.0 - Enabling operational excellence of packaging linesIndustry 4.0 - Enabling operational excellence of packaging lines
Industry 4.0 - Enabling operational excellence of packaging lines
 
Thesis presentation
Thesis presentationThesis presentation
Thesis presentation
 
Heuristic Evaluation of iCalamityGuide Application
Heuristic Evaluation of iCalamityGuide ApplicationHeuristic Evaluation of iCalamityGuide Application
Heuristic Evaluation of iCalamityGuide Application
 
Modelling and Simulation for Industry 4.0 SUCCESS CASES
Modelling and Simulation for Industry 4.0 SUCCESS CASESModelling and Simulation for Industry 4.0 SUCCESS CASES
Modelling and Simulation for Industry 4.0 SUCCESS CASES
 

Semelhante a Achieving quality with tools case study

Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality ToolsAnju ML
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Conceptswesovi
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionJosh Gough
 
Coding and testing in Software Engineering
Coding and testing in Software EngineeringCoding and testing in Software Engineering
Coding and testing in Software EngineeringAbhay Vijay
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applicationsnadeembtech
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
 
Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
Static code analysis
Static code analysisStatic code analysis
Static code analysisPrancer Io
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxssrpr
 
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
 
Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)1Arun_Pandey
 
Client Side Unit Testing
Client Side Unit TestingClient Side Unit Testing
Client Side Unit Testingcloud chen
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practicesjeetendra mandal
 

Semelhante a Achieving quality with tools case study (20)

Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality Tools
 
Software Testing Basic Concepts
Software Testing Basic ConceptsSoftware Testing Basic Concepts
Software Testing Basic Concepts
 
Software Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous InspectionSoftware Defect Prevention via Continuous Inspection
Software Defect Prevention via Continuous Inspection
 
Coding and testing in Software Engineering
Coding and testing in Software EngineeringCoding and testing in Software Engineering
Coding and testing in Software Engineering
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
PHP - Introduction to PHP Bugs - Debugging
PHP -  Introduction to  PHP Bugs - DebuggingPHP -  Introduction to  PHP Bugs - Debugging
PHP - Introduction to PHP Bugs - Debugging
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Coding - SDLC Model
Coding - SDLC ModelCoding - SDLC Model
Coding - SDLC Model
 
Static code analysis
Static code analysisStatic code analysis
Static code analysis
 
SOFTWARE TESTING.pptx
SOFTWARE TESTING.pptxSOFTWARE TESTING.pptx
SOFTWARE TESTING.pptx
 
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...
 
Static Code Analysis
Static Code AnalysisStatic Code Analysis
Static Code Analysis
 
Software coding and testing
Software coding and testingSoftware coding and testing
Software coding and testing
 
Debbuging
DebbugingDebbuging
Debbuging
 
Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)Sorfware engineering presentation (software testing)
Sorfware engineering presentation (software testing)
 
Client Side Unit Testing
Client Side Unit TestingClient Side Unit Testing
Client Side Unit Testing
 
Expert Code Review best practices
Expert Code Review best practicesExpert Code Review best practices
Expert Code Review best practices
 

Último

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
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
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
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
 

Último (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
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)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
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
 

Achieving quality with tools case study

  • 1. Achieving Quality with Development Tools
  • 2. Agenda ● Bugs in Software ● Why do bugs occur? ● Product Quality ● Kind of Tests ● Bug Finding Techniques ● Static Analysis ● Static Analysis Challenges ● Static Analysis Philosophy ● Our Accuracy Goal ● Bugs vs Style ● Tools used for efficient development and achieve quality
  • 3. Bugs in software • Programmers are smart • We have good techniques (e.g., unit testing, pair programming, code inspections) for finding bugs early So, most bugs remaining in production code must be subtle, and require sophisticated techniques to find. • Right?
  • 4. Why do bugs occur? ● Everybody makes dumb mistakes. ● Java (and similar languages) have very large standard libraries. ● Many possibilities for confusion and misuse. ● Many possibilities for latent bugs (e.g., hashcode/equals). ● Programmers play fast and loose with threads.
  • 5. Product Quality Lots of obvious bugs find their way into production software ● Testing and code inspections will not find every bug. ● Very hard to get high test coverage for a large system ● Limits to frequency, completeness of code inspections ● Techniques to find more bugs automatically are valuable Quality is the responsibility of everyone on the team.
  • 6. What kind of tests do we follow to achieve Quality?
  • 7. Bug Finding Techniques ● Code Inspections - Effective but have to be applied manually. ● Dynamic Techniques (Testing, Assertions) - Examine runtime behaviour and examine paths that are actually executed(advantages and disadvantages). ● Static Techniques - Explore abstractions of all possible behaviours. - Strongest formal proof of correctness (prohibitively difficult). - Partial verification demonstrates that some property holds for all executions. - Unsound techniques can identify “probable” bugs will miss some real bugs and may give inaccurate warnings.
  • 8. Static Analysis Let the computer figure out where (some of) the bugs are. • Tools on static analysis to find bugs- Checkstyle, PMD, FindBugs, ESC/Java, Cqual, apart from other tools, papers, techniques etc,. We think it should be!
  • 9. Static Analysis Challenges ● Fundamental limits to static analysis ● Nontrivial properties of programs are undecidable ● Be consistently conservative: could choose to ● Never miss a real bug (but report some false positives) ● Never report a false positive (but miss some real bugs) ● Both false positives and false negatives are possible
  • 10. Static Analysis philosophy Two approaches to devising a static analysis to find bugs: 1. Given an analysis technique, figure out what bugs it could find 2. Given a bug, figure out an analysis that could be used to find occurrences of similar bugs
  • 11. Accuracy Goal Our goal is that at least 70% of high and medium priority warnings should be real bugs. • We manually classified warnings produced by tool for several real applications and libraries. • In general, we came close to achieving our goal.
  • 12. Bugs vs Style It is important to distinguish bug checkers from style checkers- ● Style checkers warn about dubious or dangerous coding idioms: however, instances of those idioms may not be particularly likely to be a bug ● Bug checkers warn about code idioms that are likely to be actual bugs. ● Style checkers are useful for enforcing consistent coding standards and help prevent certain kinds of bugs.
  • 13. Style checker By following a coding standard, we ensure that the source code is predictable in its semantics and understood in the same manner across the development team. We make a clear distinction between standards related to style and standards related to best practices. Examples of style standards are where to place braces and how to use whitespace. Examples of best practices are when to use interfaces and how to implement an equals method.
  • 14. Tools used for fixing Bugs and following Style ● Eclipse ● PMD ● FindBugs ● EclEmma
  • 15. PMD ● Syntactic checks on program source code ● No dataflow component ● Mainly detects violations of stylistic conventions – May be symptomatic of deeper problems ● Contains a number of rule sets that define detectors for different style violations – Also tool for detecting suspected cut-and-paste code ● Extensible – either using Java or XPath ● Documentation contains details for using and extending rulesets
  • 16. FindBugs ● Static Analysis tool that is based on the notion of bug patterns – Code idioms that are likely to be errors – i.e. does not follow the usual correct practice of language or API usage ● Similar to automated code inspection ● One of its aims is to raise awareness of the large number of easily detectable bugs that are not caught by traditional QA approaches. ● Open Source, contains detectors for bug patterns – implemented using BCEL (bytecodeanalysis and instrumentation library) and the Visitor design pattern – Each detector visits each class of the application to be analysed
  • 17. FindBugs ● Rough categories of detectors – Class Structure and Inheritance Hierarchy – Ignore code ● Linear Code Scan – Scan bytecodeof methods of analysed class and use heuristics to approximate control flow ● Control Sensitive – Use accurate control flow graph ● Dataflow – Most
  • 18. How accurate is FindBugs?
  • 19. Example if ( out == null ){ try { out.close() ; } catch (IOException e) { } } As I said we are human beings and could make mistakes like the example above.
  • 20. What can FindBugs do? ● Correctness bugs Null Pointer Dereference Return value ignored ● Multithreaded correctness bugs Inconsistent synchronization Unconditional wait ● Malicious code vulnerabilities Mutable static Returning a reference to an internal array
  • 21. EclEmma ● EclEmma is a free java tool that calculates the percentage of code accessed by tests. It can be used to identify which parts of the java program are lacking test coverage. ● Our goal is to acheive > 80% of coverage
  • 22. Conclusion ● PMD and FindBugs helps find out bugs and follow coding standard during the development stage. ● EclEmma is used for measuring the code coverage. ● The number of bugs found in the test environment or production becomes lesser by using these tools.