Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8075311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:56:56+00:00 2026-06-05T14:56:56+00:00

I just wrote some simple sample code to make sure that I had EclEmma

  • 0

I just wrote some simple sample code to make sure that I had EclEmma installed correctly. I’m not getting 100% coverage, and I don’t understand why. The highlighting implies that it has to do with the class name. Here’s my code, with corresponding JUnit tests, the way EclEmma highlighted it:

Arithmetic class

Tests for Arithmetic class

The coverage results show that three instructions in Arithmetic aren’t getting hit, even though both actual methods seem to be completely covered:

Coverage information

I’ve read the EclEmma documentation about basic block coverage, but I’m still confused. I’m not sure which basic blocks are being missed. At first, I thought EclEmma might just be ignoring the bytecode for classes, but ArithmeticTest seems to be handled just fine.

I have two closely related questions:

  1. Does this indicate a problem with the way I installed/configured EclEmma?
  2. Is it normal/acceptable for fully covered code to have a high-but-not-quite-100% EMMA coverage rating, and if so, how does that work?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T14:56:59+00:00Added an answer on June 5, 2026 at 2:56 pm

    Your code implies a default constructor, which can’t be properly tagged by Emma, because it doesn’t have a block of text.

    Since it is not properly tagged within the block of text, Emma can’t associate the coverage logging with the text file, and it looks like some code isn’t covered; because, you ran some bytecode, but the line logging couldn’t be registered. Later when the reporting element reads the line logging, they can’t find the line numbers for the default constructor, and it highlights the error in the only place that sort of makes sense, the class declaration line.

    The default constructor looks like

    public Arithmetic() {
      super();
    }
    

    Where the super is the implied first instruction which will construct Object. While you may omit its presence, the compiler will add it in for you. That’s where your get “3 lines” instead of one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How do you guys write comments on some simple code that you use just
I just wrote some code to test the behavior of std::equal, and came away
I have some very simple sample code like this: $.ajax({ url: 'demo2.htm', success: function(loadeddata){
I just wrote some new utility methods within a non-page class for an existing
Hey i'm just trying to write some code in DrScheme: ((function (x) (* x
i just join phonegap, i want a built test application. i write some code
I just wrote a very simple perl tk script to read a huge text
We have some code that must access low level windows XP os calls which
I'm doing IPC between Java and some C code by just creating an external
I wrote some code to connect the application to it's database, then I created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.