title: How I can configure Sonarqube to not require test coverage for cosmetic changes?
body: <ul>
  <li>SonarQube 7.7 (build 23042)</li>
  <li>SonarJava 5.13.1 (build 18282)</li>
  <li>Git 1.9 (build 1725)</li>
  </ul>
  
  <p>Analysis: <a href="https://sonarqube.itextsupport.com/dashboard?branch=tech-debt-5-artem&amp;id=com.itextpdf%3Aroot" rel="nofollow noreferrer">https://sonarqube.itextsupport.com/dashboard?branch=tech-debt-5-artem&amp;id=com.itextpdf%3Aroot</a></p>
  
  <p>Steps to reproduce:</p>
  
  <ul>
  <li>Clone <a href="https://github.com/itext/itext7" rel="nofollow noreferrer">https://github.com/itext/itext7</a></li>
  <li>Apply patch:
  (summary: mostly changes in whitespace and comments)
  (redacted to fit in character limit)</li>
  </ul>
  
  <pre><code>From 5e92cd1bd5cfe73e1a29fcf45081c59b5e19deed Mon Sep 17 00:00:00 2001
  From: Artem Bobko &lt;artem.bobko@duallab.com&gt;
  Date: Wed, 28 Aug 2019 20:15:42 +0300
  Subject: [PATCH] Fix inline comments in barcodes, forms and io
  
  ---
   .../com/itextpdf/barcodes/BarcodeEANSUPP.java |   3 +-
   .../com/itextpdf/barcodes/BarcodePostnet.java |  15 +-
   .../com/itextpdf/barcodes/qrcode/QRCode.java  |   3 +-
   .../itextpdf/forms/fields/PdfFormField.java   |   9 +-
   .../com/itextpdf/forms/xfdf/AnnotObject.java  |   4 +-
   .../forms/xfdf/XfdfObjectFactory.java         |   8 +-
   .../itextpdf/forms/xfdf/XfdfObjectUtils.java  |   3 +-
   .../forms/FormFieldFlatteningTest.java        |   9 +-
   .../com/itextpdf/forms/PdfFormFieldTest.java  |   6 +-
   .../com/itextpdf/io/font/FontEncoding.java    |   3 +-
   .../io/font/FontProgramDescriptorFactory.java |   6 +-
   .../itextpdf/io/font/FontProgramFactory.java  |   6 +-
   .../com/itextpdf/io/font/otf/GlyphLine.java   |   3 +-
   .../itextpdf/io/font/otf/GposLookupType4.java |   3 +-
   .../itextpdf/io/font/otf/GposLookupType5.java |   3 +-
   .../itextpdf/io/font/otf/GposLookupType6.java |   3 +-
   .../itextpdf/io/font/otf/GsubLookupType4.java |   3 +-
   .../itextpdf/io/font/otf/OpenTypeFeature.java |   3 +-
   .../io/font/otf/OpenTypeFontTableReader.java  |   4 +-
   .../io/font/otf/OpenTypeGdefTableReader.java  |   9 +-
   .../com/itextpdf/io/image/BmpImageHelper.java |   3 +-
   .../com/itextpdf/io/image/PngImageHelper.java |  13 +-
   .../source/ByteBufferRandomAccessSource.java  |   3 +-
   .../com/itextpdf/io/source/ByteUtils.java     |   6 +-
   .../com/itextpdf/io/source/PdfTokenizer.java  |   3 +-
   31 files changed, 342 insertions(+), 185 deletions(-)
  
  diff --git a/barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEANSUPP.java b/barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEANSUPP.java
  index 56df187db1..e5d1a465b4 100644
  --- a/barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEANSUPP.java
  +++ b/barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEANSUPP.java
  @@ -70,7 +70,8 @@ public class BarcodeEANSUPP extends Barcode1D {
        */
       public BarcodeEANSUPP(Barcode1D ean, Barcode1D supp) {
           super(ean.document);
  -        n = 8; // horizontal distance between the two barcodes
  +        // horizontal distance between the two barcodes
  +        n = 8;
           this.ean = ean;
           this.supp = supp;
       }
  diff --git a/barcodes/src/main/java/com/itextpdf/barcodes/BarcodePostnet.java b/barcodes/src/main/java/com/itextpdf/barcodes/BarcodePostnet.java
  index 63c49dfc8c..2c0c3697ba 100644
  --- a/barcodes/src/main/java/com/itextpdf/barcodes/BarcodePostnet.java
  +++ b/barcodes/src/main/java/com/itextpdf/barcodes/BarcodePostnet.java
  @@ -75,11 +75,16 @@ public class BarcodePostnet extends Barcode1D {
  
       public BarcodePostnet(PdfDocument document) {
           super(document);
  -        n = 72f / 22f; // distance between bars
  -        x = 0.02f * 72f; // bar width
  -        barHeight = 0.125f * 72f; // height of the tall bars
  -        size = 0.05f * 72f; // height of the short bars
  -        codeType = TYPE_POSTNET; // type of code
  +        // distance between bars
  +        n = 72f / 22f;
  +        // bar width
  +        x = 0.02f * 72f;
  +        // height of the tall bars
  +        barHeight = 0.125f * 72f;
  +        // height of the short bars
  +        size = 0.05f * 72f;
  +        // type of code
  +        codeType = TYPE_POSTNET;
       }
  
       /** Creates the bars for Postnet.
  diff --git a/barcodes/src/main/java/com/itextpdf/barcodes/qrcode/QRCode.java b/barcodes/src/main/java/com/itextpdf/barcodes/qrcode/QRCode.java
  index 64a91a00b5..2126a809d1 100644
  --- a/barcodes/src/main/java/com/itextpdf/barcodes/qrcode/QRCode.java
  +++ b/barcodes/src/main/java/com/itextpdf/barcodes/qrcode/QRCode.java
  @@ -190,8 +190,9 @@ final class QRCode {
                           // ByteMatrix stuff.
                           matrix != null &amp;&amp;
                           matrixWidth == matrix.getWidth() &amp;&amp;
  +                        // Must be square.
                           // See 7.3.1 of JISX0510:2004 (p.5).
  -                        matrix.getWidth() == matrix.getHeight(); // Must be square.
  +                        matrix.getWidth() == matrix.getHeight();
       }
  
       /**
  diff --git a/forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java b/forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java
  index fb1fcc75d5..2b6dc59a5f 100644
  --- a/forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java
  +++ b/forms/src/main/java/com/itextpdf/forms/fields/PdfFormField.java
  @@ -2336,9 +2336,11 @@ public class PdfFormField extends PdfObjectWrapper&lt;PdfDictionary&gt; {
       }
  
       private String getRadioButtonValue(String value) {
  -        assert value != null; //Otherwise something wrong with getValueAsString().
  +        //Otherwise something wrong with getValueAsString().
  +        assert value != null;
           if ("".equals(value)) {
  -            value = "Yes"; //let it as default value
  +            //let it as default value
  +            value = "Yes";
               for (String state: getAppearanceStates()) {
                   if (!"Off".equals(state)) {
                       value = state;
  @@ -3521,7 +3523,8 @@ public class PdfFormField extends PdfObjectWrapper&lt;PdfDictionary&gt; {
                   }
               }
           }
  -        sb.deleteCharAt(sb.length() - 1); // last '\n'
  +        // last '\n'
  +        sb.deleteCharAt(sb.length() - 1);
           return sb.toString();
       }
  
  diff --git a/forms/src/main/java/com/itextpdf/forms/xfdf/AnnotObject.java b/forms/src/main/java/com/itextpdf/forms/xfdf/AnnotObject.java
  index c3f58a0dc2..b82458e4a1 100644
  --- a/forms/src/main/java/com/itextpdf/forms/xfdf/AnnotObject.java
  +++ b/forms/src/main/java/com/itextpdf/forms/xfdf/AnnotObject.java
  @@ -77,7 +77,7 @@ public class AnnotObject {
        * Content model: text string.
        * For more details see paragraph 6.5.4 in Xfdf document specification.
        */
  -    private PdfString contents;//basically text string
  +    private PdfString contents;
  
       /**
        * Represents contents-richtext tag in Xfdf document structure. Is a child of caret, circle, fileattachment, freetext,
  @@ -116,7 +116,7 @@ public class AnnotObject {
        * Content model: Base64 encoded string.
        * For more details see paragraph 6.5.1 in Xfdf document specification.
        */
  -    private String appearance;//should be Base64String
  +    private String appearance;
  
       /**
        * Represents the defaultappearance element, a child of the caret and freetext elements.
  diff --git a/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectFactory.java b/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectFactory.java
  index 6fd2755d15..5e32a63990 100644
  --- a/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectFactory.java
  +++ b/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectFactory.java
  @@ -284,18 +284,20 @@ public class XfdfObjectFactory {
           for (int temp = 0; temp &lt; children.getLength(); temp++) {
               Node node = children.item(temp);
               if (node.getNodeType() == Node.TEXT_NODE) {
  -                annotObject.setContents(new PdfString(node.getNodeValue()));//getTextContent?
  +                // getTextContent?
  +                annotObject.setContents(new PdfString(node.getNodeValue()));
               }
           }
       }
  
       private void visitContentsRichTextSubelement(Node parentNode, AnnotObject annotObject) {
  -        //no attributes, inside a text string or rich text string
  +        // no attributes, inside a text string or rich text string
           NodeList children = parentNode.getChildNodes();
           for (int temp = 0; temp &lt; children.getLength(); temp++) {
               Node node = children.item(temp);
               if (node.getNodeType() == Node.TEXT_NODE) {
  -                annotObject.setContentsRichText(new PdfString(node.getNodeValue()));//getTextContent?
  +                // getTextContent?
  +                annotObject.setContentsRichText(new PdfString(node.getNodeValue()));
               }
           }
       }
  diff --git a/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectUtils.java b/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectUtils.java
  index 2414a41448..948181e2d4 100644
  --- a/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectUtils.java
  +++ b/forms/src/main/java/com/itextpdf/forms/xfdf/XfdfObjectUtils.java
  @@ -164,7 +164,8 @@ final class XfdfObjectUtils {
  
           for(String flag : flagsList) {
               if (flagMap.containsKey(flag)) {
  -                result += (int) flagMap.get(flag);//implicit cast  for autoporting
  +                //implicit cast  for autoporting
  +                result += (int) flagMap.get(flag);
               }
           }
           return result;
  diff --git a/forms/src/test/java/com/itextpdf/forms/FormFieldFlatteningTest.java b/forms/src/test/java/com/itextpdf/forms/FormFieldFlatteningTest.java
  index 63b11be770..e038315ea3 100644
  --- a/forms/src/test/java/com/itextpdf/forms/FormFieldFlatteningTest.java
  +++ b/forms/src/test/java/com/itextpdf/forms/FormFieldFlatteningTest.java
  @@ -219,11 +219,14 @@ public class FormFieldFlatteningTest extends ExtendedITextTest {
  
                   Integer justification = field.getJustification();
                   if (null == justification || 0 == (int) justification) {
  -                    field.setBackgroundColor(new DeviceRgb(255, 200, 200)); // reddish
  +                    // reddish
  +                    field.setBackgroundColor(new DeviceRgb(255, 200, 200));
                   } else if (1 == (int) justification) {
  -                    field.setBackgroundColor(new DeviceRgb(200, 255, 200)); // greenish
  +                    // greenish
  +                    field.setBackgroundColor(new DeviceRgb(200, 255, 200));
                   } else if (2 == (int) justification) {
  -                    field.setBackgroundColor(new DeviceRgb(200, 200, 255)); // blueish
  +                    // blueish
  +                    field.setBackgroundColor(new DeviceRgb(200, 200, 255));
                   }
  
                   field.setValue(newValue);
  diff --git a/forms/src/test/java/com/itextpdf/forms/PdfFormFieldTest.java b/forms/src/test/java/com/itextpdf/forms/PdfFormFieldTest.java
  index 2e0021fdcb..a92a278f32 100644
  --- a/forms/src/test/java/com/itextpdf/forms/PdfFormFieldTest.java
  +++ b/forms/src/test/java/com/itextpdf/forms/PdfFormFieldTest.java
  @@ -178,7 +178,8 @@ public class PdfFormFieldTest extends ExtendedITextTest {
           PdfDocument pdfDoc = new PdfDocument(new PdfReader(filename));
           PdfAcroForm form = PdfAcroForm.getAcroForm(pdfDoc, true);
           Map&lt;String, PdfFormField&gt; formFields = form.getFormFields();
  -        String fieldName = "\u5E10\u53F71"; // 帐号1: account number 1
  +        // 帐号1: account number 1
  +        String fieldName = "\u5E10\u53F71";
           Assert.assertEquals(fieldName, formFields.keySet().toArray(new String[1])[0]);
       }
  
  @@ -187,7 +188,8 @@ public class PdfFormFieldTest extends ExtendedITextTest {
           String filename = sourceFolder + "unicodeFormFieldFile.pdf";
           PdfDocument pdfDoc = new PdfDocument(new PdfReader(filename));
           PdfAcroForm form = PdfAcroForm.getAcroForm(pdfDoc, true);
  -        String fieldName = "\u5E10\u53F71"; // 帐号1: account number 1
  +        // 帐号1: account number 1
  +        String fieldName = "\u5E10\u53F71";
           Assert.assertNotNull(form.getField(fieldName));
       }
  diff --git a/io/src/main/java/com/itextpdf/io/font/FontEncoding.java b/io/src/main/java/com/itextpdf/io/font/FontEncoding.java
  index 556bd5f59b..769aff2b30 100644
  --- a/io/src/main/java/com/itextpdf/io/font/FontEncoding.java
  +++ b/io/src/main/java/com/itextpdf/io/font/FontEncoding.java
  @@ -290,7 +290,8 @@ public class FontEncoding implements Serializable {
       }
  
       protected void fillNamedEncoding() {
  -        PdfEncodings.convertToBytes(" ", baseEncoding); // check if the encoding exists
  +        // check if the encoding exists
  +        PdfEncodings.convertToBytes(" ", baseEncoding);
           boolean stdEncoding = PdfEncodings.WINANSI.equals(baseEncoding) || PdfEncodings.MACROMAN.equals(baseEncoding);
           if (!stdEncoding &amp;&amp; differences == null) {
               differences = new String[256];
  diff --git a/io/src/main/java/com/itextpdf/io/font/FontProgramDescriptorFactory.java b/io/src/main/java/com/itextpdf/io/font/FontProgramDescriptorFactory.java
  index 1e15c15851..6b6988fa78 100644
  --- a/io/src/main/java/com/itextpdf/io/font/FontProgramDescriptorFactory.java
  +++ b/io/src/main/java/com/itextpdf/io/font/FontProgramDescriptorFactory.java
  @@ -141,8 +141,10 @@ public final class FontProgramDescriptorFactory {
               String ttcName;
               int ttcIndex;
               try {
  -                ttcName = baseName.substring(0, ttcSplit + 4); // count(.ttc) = 4
  -                ttcIndex = Integer.parseInt(baseName.substring(ttcSplit + 5)); // count(.ttc,) = 5)
  +                // count(.ttc) = 4
  +                ttcName = baseName.substring(0, ttcSplit + 4);
  +                // count(.ttc,) = 5)
  +                ttcIndex = Integer.parseInt(baseName.substring(ttcSplit + 5));
               } catch (NumberFormatException nfe) {
                   throw new IOException(nfe.getMessage(), nfe);
               }
  diff --git a/io/src/main/java/com/itextpdf/io/font/FontProgramFactory.java b/io/src/main/java/com/itextpdf/io/font/FontProgramFactory.java
  index 6d8ee80796..501fb7489f 100644
  --- a/io/src/main/java/com/itextpdf/io/font/FontProgramFactory.java
  +++ b/io/src/main/java/com/itextpdf/io/font/FontProgramFactory.java
  @@ -231,8 +231,10 @@ public final class FontProgramFactory {
                   int ttcSplit = baseName.toLowerCase().indexOf(".ttc,");
                   if (ttcSplit &gt; 0) {
                       try {
  -                        String ttcName = baseName.substring(0, ttcSplit + 4); // count(.ttc) = 4
  -                        int ttcIndex = Integer.parseInt(baseName.substring(ttcSplit + 5)); // count(.ttc,) = 5)
  +                        // count(.ttc) = 4
  +                        String ttcName = baseName.substring(0, ttcSplit + 4);
  +                        // count(.ttc,) = 5)
  +                        int ttcIndex = Integer.parseInt(baseName.substring(ttcSplit + 5));
                           fontBuilt = new TrueTypeFont(ttcName, ttcIndex);
                       } catch (NumberFormatException nfe) {
                           throw new IOException(nfe.getMessage(), nfe);
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/GlyphLine.java b/io/src/main/java/com/itextpdf/io/font/otf/GlyphLine.java
  index 23a3f0de6f..08a7176e34 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/GlyphLine.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/GlyphLine.java
  @@ -293,7 +293,8 @@ public class GlyphLine implements Serializable {
       }
  
       public void substituteOneToMany(OpenTypeFontTableReader tableReader, int[] substGlyphIds) {
  -        int substCode = substGlyphIds[0]; //sequence length shall be at least 1
  +        //sequence length shall be at least 1
  +        int substCode = substGlyphIds[0];
           Glyph glyph = tableReader.getGlyph(substCode);
           glyphs.set(idx, glyph);
  
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType4.java b/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType4.java
  index 37102c865c..917a90f448 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType4.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType4.java
  @@ -124,7 +124,8 @@ public class GposLookupType4 extends OpenTableLookup {
       protected void readSubTable(int subTableLocation) throws java.io.IOException {
           openReader.rf.seek(subTableLocation);
  
  -        openReader.rf.readUnsignedShort(); //skip format, always 1
  +        // skip format, always 1
  +        openReader.rf.readUnsignedShort();
           int markCoverageLocation = openReader.rf.readUnsignedShort() + subTableLocation;
           int baseCoverageLocation = openReader.rf.readUnsignedShort() + subTableLocation;
           int classCount = openReader.rf.readUnsignedShort();
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType5.java b/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType5.java
  index aec6d2eae4..298982e196 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType5.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType5.java
  @@ -126,7 +126,8 @@ public class GposLookupType5 extends OpenTableLookup {
       protected void readSubTable(int subTableLocation) throws java.io.IOException {
           openReader.rf.seek(subTableLocation);
  
  -        openReader.rf.readUnsignedShort(); //skip format, always 1
  +        // skip format, always 1
  +        openReader.rf.readUnsignedShort();
           int markCoverageLocation = openReader.rf.readUnsignedShort() + subTableLocation;
           int ligatureCoverageLocation = openReader.rf.readUnsignedShort() + subTableLocation;
           int classCount = openReader.rf.readUnsignedShort();
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType6.java b/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType6.java
  index 1e210082ad..af9c53fe55 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType6.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/GposLookupType6.java
  @@ -128,7 +128,8 @@ public class GposLookupType6 extends OpenTableLookup {
       protected void readSubTable(int subTableLocation) throws java.io.IOException {
           openReader.rf.seek(subTableLocation);
  
  -        openReader.rf.readUnsignedShort(); //skip format, always 1
  +        // skip format, always 1
  +        openReader.rf.readUnsignedShort();
           int markCoverageLocation = openReader.rf.readUnsignedShort() + subTableLocation;
           int baseCoverageLocation = openReader.rf.readUnsignedShort() + subTableLocation;
           int classCount = openReader.rf.readUnsignedShort();
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/GsubLookupType4.java b/io/src/main/java/com/itextpdf/io/font/otf/GsubLookupType4.java
  index 2acf98c3b7..b543081aed 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/GsubLookupType4.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/GsubLookupType4.java
  @@ -104,7 +104,8 @@ public class GsubLookupType4 extends OpenTableLookup {
       @Override
       protected void readSubTable(int subTableLocation) throws java.io.IOException {
           openReader.rf.seek(subTableLocation);
  -        openReader.rf.readShort(); //subformat - always 1
  +        // subformat - always 1
  +        openReader.rf.readShort();
           int coverage = openReader.rf.readUnsignedShort() + subTableLocation;
           int ligSetCount = openReader.rf.readUnsignedShort();
           int[] ligatureSet = new int[ligSetCount];
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFeature.java b/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFeature.java
  index d88e4f8180..fa7edb936d 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFeature.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFeature.java
  @@ -58,7 +58,8 @@ public class OpenTypeFeature implements Serializable {
           openTypeReader.rf.seek(locationFeatureTable);
           TagAndLocation[] tagsLocs = openTypeReader.readTagAndLocations(locationFeatureTable);
           for (TagAndLocation tagLoc : tagsLocs) {
  -            openTypeReader.rf.seek(tagLoc.location + 2); //+2 don't use FeatureParams
  +            // +2 don't use FeatureParams
  +            openTypeReader.rf.seek(tagLoc.location + 2L);
               int lookupCount = openTypeReader.rf.readUnsignedShort();
               FeatureRecord rec = new FeatureRecord();
               rec.tag = tagLoc.tag;
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFontTableReader.java b/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFontTableReader.java
  index d0f889778f..e59d5c98f1 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFontTableReader.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeFontTableReader.java
  @@ -233,7 +233,9 @@ public abstract class OpenTypeFontTableReader implements Serializable {
       final void startReadingTable() throws FontReadingException {
           try {
               rf.seek(tableLocation);
  -            /*int version =*/ rf.readInt(); //version not used
  +            /*int version =*/
  +            // version not used
  +            rf.readInt();
               int scriptListOffset = rf.readUnsignedShort();
               int featureListOffset = rf.readUnsignedShort();
               int lookupListOffset = rf.readUnsignedShort();
  diff --git a/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeGdefTableReader.java b/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeGdefTableReader.java
  index 02a301cfac..e3f82eed9f 100644
  --- a/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeGdefTableReader.java
  +++ b/io/src/main/java/com/itextpdf/io/font/otf/OpenTypeGdefTableReader.java
  @@ -67,10 +67,13 @@ public class OpenTypeGdefTableReader implements Serializable{
       public void readTable() throws java.io.IOException {
           if (tableLocation &gt; 0) {
               rf.seek(tableLocation);
  -            rf.readUnsignedInt(); //version, we only support 0x00010000
  +            // version, we only support 0x00010000
  +            rf.readUnsignedInt();
               int glyphClassDefOffset = rf.readUnsignedShort();
  -            rf.readUnsignedShort(); //skip Attachment Point List Table
  -            rf.readUnsignedShort(); //skip Ligature Caret List Table
  +            // skip Attachment Point List Table
  +            rf.readUnsignedShort();
  +            // skip Ligature Caret List Table
  +            rf.readUnsignedShort();
               int markAttachClassDefOffset = rf.readUnsignedShort();
               if (glyphClassDefOffset &gt; 0) {
                   glyphClass = OtfClass.create(rf, glyphClassDefOffset + tableLocation);
  diff --git a/io/src/main/java/com/itextpdf/io/image/BmpImageHelper.java b/io/src/main/java/com/itextpdf/io/image/BmpImageHelper.java
  index 273e0f6916..52d68e9676 100644
  --- a/io/src/main/java/com/itextpdf/io/image/BmpImageHelper.java
  +++ b/io/src/main/java/com/itextpdf/io/image/BmpImageHelper.java
  @@ -552,7 +552,8 @@ final class BmpImageHelper {
       }
  
       private static boolean getImage(BmpParameters bmp) throws java.io.IOException {
  -        byte bdata[]; // buffer for byte data
  +        // buffer for byte data
  +        byte[] bdata;
           // if (sampleModel.getDataType() == DataBuffer.TYPE_BYTE)
           //     bdata = (byte[])((DataBufferByte)tile.getDataBuffer()).getData();
           // else if (sampleModel.getDataType() == DataBuffer.TYPE_USHORT)
  diff --git a/io/src/main/java/com/itextpdf/io/image/PngImageHelper.java b/io/src/main/java/com/itextpdf/io/image/PngImageHelper.java
  index 730e43d9b9..cbdfb012ac 100644
  --- a/io/src/main/java/com/itextpdf/io/image/PngImageHelper.java
  +++ b/io/src/main/java/com/itextpdf/io/image/PngImageHelper.java
  @@ -91,7 +91,8 @@ class PngImageHelper {
           int transGreen = -1;
           int transBlue = -1;
           int inputBands;
  -        int bytesPerPixel; // number of bytes per input pixel
  +        // number of bytes per input pixel
  +        int bytesPerPixel;
           byte[] colorTable;
           float gamma = 1f;
           boolean hasCHRM = false;
  @@ -329,7 +330,7 @@ class PngImageHelper {
                       float XC = YC * png.xB / png.yB;
                       float ZC = YC * ((1 - png.xB) / png.yB - 1);
                       float XW = XA + XB + XC;
  -                    float YW = 1;//YA+YB+YC;
  +                    float YW = 1;
                       float ZW = ZA + ZB + ZC;
                       float[] wpa = new float[3];
                       wpa[0] = XW;
  @@ -679,10 +680,12 @@ class PngImageHelper {
                   dstX = xOffset;
                   for (srcX = 0; srcX &lt; width; srcX++) {
                       int idx = outPixel[srcX];
  -                    if (idx &lt; png.trans.length)
  +                    if (idx &lt; png.trans.length) {
                           v[0] = png.trans[idx];
  -                    else
  -                        v[0] = 255; // Patrick Valsecchi
  +                    } else {
  +                        // Patrick Valsecchi
  +                        v[0] = 255;
  +                    }
                       setPixel(png.smask, v, 0, 1, dstX, y, 8, yStride);
                       dstX += step;
                   }
  diff --git a/io/src/main/java/com/itextpdf/io/source/ByteBufferRandomAccessSource.java b/io/src/main/java/com/itextpdf/io/source/ByteBufferRandomAccessSource.java
  index 7873b6a5bb..66be3002cd 100644
  --- a/io/src/main/java/com/itextpdf/io/source/ByteBufferRandomAccessSource.java
  +++ b/io/src/main/java/com/itextpdf/io/source/ByteBufferRandomAccessSource.java
  @@ -102,7 +102,8 @@ class ByteBufferRandomAccessSource implements IRandomAccessSource, Serializable
               byte b = byteBuffer.get((int) position);
               return b &amp; 0xff;
           } catch (BufferUnderflowException e) {
  -            return -1; // EOF
  +            // EOF
  +            return -1;
           }
       }
  
  diff --git a/io/src/main/java/com/itextpdf/io/source/ByteUtils.java b/io/src/main/java/com/itextpdf/io/source/ByteUtils.java
  index c67a0978bb..d899b267bc 100644
  --- a/io/src/main/java/com/itextpdf/io/source/ByteUtils.java
  +++ b/io/src/main/java/com/itextpdf/io/source/ByteUtils.java
  @@ -212,7 +212,8 @@ public final class ByteUtils {
               }
               int fracLen = 0;
               if (v % 100 != 0) {
  -                fracLen = 2;                             //fracLen include '.'
  +                //fracLen include '.'
  +                fracLen = 2;
                   if (v % 10 != 0) {
                       fracLen++;
                   } else {
  @@ -222,7 +223,8 @@ public final class ByteUtils {
                   v /= 100;
               }
               buf = buffer != null ? buffer : new ByteBuffer(intLen + fracLen + (negative ? 1 : 0));
  -            for (int i = 0; i &lt; fracLen - 1; i++) {     //-1 because fracLen include '.'
  +            //-1 because fracLen include '.'
  +            for (int i = 0; i &lt; fracLen - 1; i++) {
                   buf.prepend(bytes[v % 10]);
                   v /= 10;
               }
  diff --git a/io/src/main/java/com/itextpdf/io/source/PdfTokenizer.java b/io/src/main/java/com/itextpdf/io/source/PdfTokenizer.java
  index 598cf9c68e..83bafc71fd 100644
  --- a/io/src/main/java/com/itextpdf/io/source/PdfTokenizer.java
  +++ b/io/src/main/java/com/itextpdf/io/source/PdfTokenizer.java
  @@ -257,7 +257,8 @@ public class PdfTokenizer implements Closeable, Serializable {
               String str = readString(arrLength);
               int idx = str.lastIndexOf("startxref");
               if (idx &gt;= 0) return pos + idx;
  -            pos = pos - arrLength + 9;                  // 9 = "startxref".length()
  +            // 9 = "startxref".length()
  +            pos = pos - arrLength + 9;
           }
           throw new IOException(IOException.PdfStartxrefNotFound, this);
       }
  -- 
  2.20.1
  
  </code></pre>
  
  <ul>
  <li>Run a SonarQube analysis</li>
  </ul>
  
  <p>Actual result:</p>
  
  <ul>
  <li>whitespace changes are detected as new lines to cover</li>
  <li>comment changes are detected as new lines to cover</li>
  <li>119 lines detected as new code to cover</li>
  <li>code coverage on new code is too low</li>
  <li>Quality Gate fails</li>
  </ul>
  
  <p>Expected result:</p>
  
  <ul>
  <li>Only 2 lines (in <code>OpenTypeFeature.java</code> and <code>BmpImageHelper.java</code>) have new lines to cover.</li>
  <li>Both lines are covered by tests, so there should be 100% coverage on new code.</li>
  <li>For calculation of coverage on new code, SonarQube ignores changes to whitespace</li>
  <li>For calculation of coverage on new code, SonarQube ignores changes to comments</li>
  <li>Quality Gate passes</li>
  </ul>
  
  <p><strong>Question</strong></p>
  
  <p>How do I make sure that SonarQube does not see changes in whitespace&amp;comments as "new code" that needs to be covered by tests? Writing tests that cover the code is not in scope for the current task.</p>