The following issues were found

platforms/winpack_dldt/2020.1/patch.config.py
6 issues
Undefined variable 'applyPatch'
Error

Line: 1 Column: 1

              applyPatch('20200313-ngraph-disable-tests-examples.patch', 'ngraph')
applyPatch('20200313-dldt-disable-unused-targets.patch')
applyPatch('20200313-dldt-fix-binaries-location.patch')
applyPatch('20200318-dldt-pdb.patch')
applyPatch('20200319-dldt-fix-msvs2019-v16.5.0.patch')

            

Reported by Pylint.

Undefined variable 'applyPatch'
Error

Line: 2 Column: 1

              applyPatch('20200313-ngraph-disable-tests-examples.patch', 'ngraph')
applyPatch('20200313-dldt-disable-unused-targets.patch')
applyPatch('20200313-dldt-fix-binaries-location.patch')
applyPatch('20200318-dldt-pdb.patch')
applyPatch('20200319-dldt-fix-msvs2019-v16.5.0.patch')

            

Reported by Pylint.

Undefined variable 'applyPatch'
Error

Line: 3 Column: 1

              applyPatch('20200313-ngraph-disable-tests-examples.patch', 'ngraph')
applyPatch('20200313-dldt-disable-unused-targets.patch')
applyPatch('20200313-dldt-fix-binaries-location.patch')
applyPatch('20200318-dldt-pdb.patch')
applyPatch('20200319-dldt-fix-msvs2019-v16.5.0.patch')

            

Reported by Pylint.

Undefined variable 'applyPatch'
Error

Line: 4 Column: 1

              applyPatch('20200313-ngraph-disable-tests-examples.patch', 'ngraph')
applyPatch('20200313-dldt-disable-unused-targets.patch')
applyPatch('20200313-dldt-fix-binaries-location.patch')
applyPatch('20200318-dldt-pdb.patch')
applyPatch('20200319-dldt-fix-msvs2019-v16.5.0.patch')

            

Reported by Pylint.

Undefined variable 'applyPatch'
Error

Line: 5 Column: 1

              applyPatch('20200313-dldt-disable-unused-targets.patch')
applyPatch('20200313-dldt-fix-binaries-location.patch')
applyPatch('20200318-dldt-pdb.patch')
applyPatch('20200319-dldt-fix-msvs2019-v16.5.0.patch')

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              applyPatch('20200313-ngraph-disable-tests-examples.patch', 'ngraph')
applyPatch('20200313-dldt-disable-unused-targets.patch')
applyPatch('20200313-dldt-fix-binaries-location.patch')
applyPatch('20200318-dldt-pdb.patch')
applyPatch('20200319-dldt-fix-msvs2019-v16.5.0.patch')

            

Reported by Pylint.

samples/python/tutorial_code/features2D/feature_detection/SURF_detection_Demo.py
6 issues
Unable to import 'cv2'
Error

Line: 2 Column: 1

              from __future__ import print_function
import cv2 as cv
import numpy as np
import argparse

parser = argparse.ArgumentParser(description='Code for Feature Detection tutorial.')
parser.add_argument('--input', help='Path to input image.', default='box.png')
args = parser.parse_args()


            

Reported by Pylint.

Module name "SURF_detection_Demo" doesn't conform to snake_case naming style
Error

Line: 1 Column: 1

              from __future__ import print_function
import cv2 as cv
import numpy as np
import argparse

parser = argparse.ArgumentParser(description='Code for Feature Detection tutorial.')
parser.add_argument('--input', help='Path to input image.', default='box.png')
args = parser.parse_args()


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from __future__ import print_function
import cv2 as cv
import numpy as np
import argparse

parser = argparse.ArgumentParser(description='Code for Feature Detection tutorial.')
parser.add_argument('--input', help='Path to input image.', default='box.png')
args = parser.parse_args()


            

Reported by Pylint.

standard import "import argparse" should be placed before "import cv2 as cv"
Error

Line: 4 Column: 1

              from __future__ import print_function
import cv2 as cv
import numpy as np
import argparse

parser = argparse.ArgumentParser(description='Code for Feature Detection tutorial.')
parser.add_argument('--input', help='Path to input image.', default='box.png')
args = parser.parse_args()


            

Reported by Pylint.

Consider using sys.exit()
Error

Line: 13 Column: 5

              src = cv.imread(cv.samples.findFile(args.input), cv.IMREAD_GRAYSCALE)
if src is None:
    print('Could not open or find the image:', args.input)
    exit(0)

#-- Step 1: Detect the keypoints using SURF Detector
minHessian = 400
detector = cv.xfeatures2d_SURF.create(hessianThreshold=minHessian)
keypoints = detector.detect(src)

            

Reported by Pylint.

Constant name "minHessian" doesn't conform to UPPER_CASE naming style
Error

Line: 16 Column: 1

                  exit(0)

#-- Step 1: Detect the keypoints using SURF Detector
minHessian = 400
detector = cv.xfeatures2d_SURF.create(hessianThreshold=minHessian)
keypoints = detector.detect(src)

#-- Draw keypoints
img_keypoints = np.empty((src.shape[0], src.shape[1], 3), dtype=np.uint8)

            

Reported by Pylint.

modules/video/misc/java/test/BackgroundSubtractorMOGTest.java
6 issues
JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 7

              
public class BackgroundSubtractorMOGTest extends OpenCVTestCase {

    public void testApplyMatMat() {
        fail("Not yet implemented");
        /*
        BackgroundSubtractorMOG backGroundSubtract = new BackgroundSubtractorMOG();

        Point bottomRight = new Point(rgbLena.cols() / 2, rgbLena.rows() / 2);

            

Reported by PMD.

The String literal 'Not yet implemented' appears 5 times in this file; the first occurrence is on line 8
Error

Line: 8

              public class BackgroundSubtractorMOGTest extends OpenCVTestCase {

    public void testApplyMatMat() {
        fail("Not yet implemented");
        /*
        BackgroundSubtractorMOG backGroundSubtract = new BackgroundSubtractorMOG();

        Point bottomRight = new Point(rgbLena.cols() / 2, rgbLena.rows() / 2);
        Point topLeft = new Point(0, 0);

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 27

                      */
    }

    public void testApplyMatMatDouble() {
        fail("Not yet implemented");
    }

    public void testBackgroundSubtractorMOG() {
        fail("Not yet implemented");

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 31

                      fail("Not yet implemented");
    }

    public void testBackgroundSubtractorMOG() {
        fail("Not yet implemented");
    }

    public void testBackgroundSubtractorMOGIntIntDouble() {
        fail("Not yet implemented");

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 35

                      fail("Not yet implemented");
    }

    public void testBackgroundSubtractorMOGIntIntDouble() {
        fail("Not yet implemented");
    }

    public void testBackgroundSubtractorMOGIntIntDoubleDouble() {
        fail("Not yet implemented");

            

Reported by PMD.

JUnit 4 tests that execute tests should use the @Test annotation, JUnit 5 tests should use @Test, @RepeatedTest, @TestFactory, @TestTemplate or @ParameterizedTest
Design

Line: 39

                      fail("Not yet implemented");
    }

    public void testBackgroundSubtractorMOGIntIntDoubleDouble() {
        fail("Not yet implemented");
    }

}

            

Reported by PMD.

modules/python/test/test_watershed.py
6 issues
Unable to import 'cv2'
Error

Line: 11 Column: 1

              from __future__ import print_function

import numpy as np
import cv2 as cv

from tests_common import NewOpenCVTests

class watershed_test(NewOpenCVTests):
    def test_watershed(self):

            

Reported by Pylint.

Missing class docstring
Error

Line: 15 Column: 1

              
from tests_common import NewOpenCVTests

class watershed_test(NewOpenCVTests):
    def test_watershed(self):

        img = self.get_sample('cv/inpaint/orig.png')
        markers = self.get_sample('cv/watershed/wshed_exp.png', 0)
        refSegments = self.get_sample('cv/watershed/wshed_segments.png')

            

Reported by Pylint.

Class name "watershed_test" doesn't conform to PascalCase naming style
Error

Line: 15 Column: 1

              
from tests_common import NewOpenCVTests

class watershed_test(NewOpenCVTests):
    def test_watershed(self):

        img = self.get_sample('cv/inpaint/orig.png')
        markers = self.get_sample('cv/watershed/wshed_exp.png', 0)
        refSegments = self.get_sample('cv/watershed/wshed_segments.png')

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 16 Column: 5

              from tests_common import NewOpenCVTests

class watershed_test(NewOpenCVTests):
    def test_watershed(self):

        img = self.get_sample('cv/inpaint/orig.png')
        markers = self.get_sample('cv/watershed/wshed_exp.png', 0)
        refSegments = self.get_sample('cv/watershed/wshed_segments.png')


            

Reported by Pylint.

Variable name "refSegments" doesn't conform to snake_case naming style
Error

Line: 20 Column: 9

              
        img = self.get_sample('cv/inpaint/orig.png')
        markers = self.get_sample('cv/watershed/wshed_exp.png', 0)
        refSegments = self.get_sample('cv/watershed/wshed_segments.png')

        if img is None or markers is None:
            self.assertEqual(0, 1, 'Missing test data')

        colors = np.int32( list(np.ndindex(3, 3, 3)) ) * 122

            

Reported by Pylint.

Variable name "refSegments" doesn't conform to snake_case naming style
Error

Line: 30 Column: 13

                      segments = colors[np.maximum(markers, 0)]

        if refSegments is None:
            refSegments = segments.copy()
            cv.imwrite(self.extraTestDataPath + '/cv/watershed/wshed_segments.png', refSegments)

        self.assertLess(cv.norm(segments - refSegments, cv.NORM_L1) / 255.0, 50)

if __name__ == '__main__':

            

Reported by Pylint.

modules/core/misc/java/src/java/core+MatOfPoint2f.java
6 issues
Overridable method 'fromArray' called during object construction
Error

Line: 35

              
    public MatOfPoint2f(Point...a) {
        super();
        fromArray(a);
    }

    public void alloc(int elemNumber) {
        if(elemNumber>0)
            super.create(elemNumber, 1, CvType.makeType(_depth, _channels));

            

Reported by PMD.

Found 'DD'-anomaly for variable 'buff' (lines '48'-'51').
Error

Line: 48

                          return;
        int num = a.length;
        alloc(num);
        float buff[] = new float[num * _channels];
        for(int i=0; i<num; i++) {
            Point p = a[i];
            buff[_channels*i+0] = (float) p.x;
            buff[_channels*i+1] = (float) p.y;
        }

            

Reported by PMD.

Found 'DD'-anomaly for variable 'buff' (lines '51'-'52').
Error

Line: 51

                      float buff[] = new float[num * _channels];
        for(int i=0; i<num; i++) {
            Point p = a[i];
            buff[_channels*i+0] = (float) p.x;
            buff[_channels*i+1] = (float) p.y;
        }
        put(0, 0, buff); //TODO: check ret val!
    }


            

Reported by PMD.

Found 'DD'-anomaly for variable 'buff' (lines '52'-'51').
Error

Line: 52

                      for(int i=0; i<num; i++) {
            Point p = a[i];
            buff[_channels*i+0] = (float) p.x;
            buff[_channels*i+1] = (float) p.y;
        }
        put(0, 0, buff); //TODO: check ret val!
    }

    public Point[] toArray() {

            

Reported by PMD.

Found 'DD'-anomaly for variable 'ap' (lines '59'-'65').
Error

Line: 59

              
    public Point[] toArray() {
        int num = (int) total();
        Point[] ap = new Point[num];
        if(num == 0)
            return ap;
        float buff[] = new float[num * _channels];
        get(0, 0, buff); //TODO: check ret val!
        for(int i=0; i<num; i++)

            

Reported by PMD.

Found 'DD'-anomaly for variable 'ap' (lines '65'-'65').
Error

Line: 65

                      float buff[] = new float[num * _channels];
        get(0, 0, buff); //TODO: check ret val!
        for(int i=0; i<num; i++)
            ap[i] = new Point(buff[i*_channels], buff[i*_channels+1]);
        return ap;
    }

    public void fromList(List<Point> lp) {
        Point ap[] = lp.toArray(new Point[0]);

            

Reported by PMD.

modules/core/misc/java/src/java/core+MatOfPoint.java
6 issues
Overridable method 'fromArray' called during object construction
Error

Line: 35

              
    public MatOfPoint(Point...a) {
        super();
        fromArray(a);
    }

    public void alloc(int elemNumber) {
        if(elemNumber>0)
            super.create(elemNumber, 1, CvType.makeType(_depth, _channels));

            

Reported by PMD.

Found 'DD'-anomaly for variable 'buff' (lines '48'-'51').
Error

Line: 48

                          return;
        int num = a.length;
        alloc(num);
        int buff[] = new int[num * _channels];
        for(int i=0; i<num; i++) {
            Point p = a[i];
            buff[_channels*i+0] = (int) p.x;
            buff[_channels*i+1] = (int) p.y;
        }

            

Reported by PMD.

Found 'DD'-anomaly for variable 'buff' (lines '51'-'52').
Error

Line: 51

                      int buff[] = new int[num * _channels];
        for(int i=0; i<num; i++) {
            Point p = a[i];
            buff[_channels*i+0] = (int) p.x;
            buff[_channels*i+1] = (int) p.y;
        }
        put(0, 0, buff); //TODO: check ret val!
    }


            

Reported by PMD.

Found 'DD'-anomaly for variable 'buff' (lines '52'-'51').
Error

Line: 52

                      for(int i=0; i<num; i++) {
            Point p = a[i];
            buff[_channels*i+0] = (int) p.x;
            buff[_channels*i+1] = (int) p.y;
        }
        put(0, 0, buff); //TODO: check ret val!
    }

    public Point[] toArray() {

            

Reported by PMD.

Found 'DD'-anomaly for variable 'ap' (lines '59'-'65').
Error

Line: 59

              
    public Point[] toArray() {
        int num = (int) total();
        Point[] ap = new Point[num];
        if(num == 0)
            return ap;
        int buff[] = new int[num * _channels];
        get(0, 0, buff); //TODO: check ret val!
        for(int i=0; i<num; i++)

            

Reported by PMD.

Found 'DD'-anomaly for variable 'ap' (lines '65'-'65').
Error

Line: 65

                      int buff[] = new int[num * _channels];
        get(0, 0, buff); //TODO: check ret val!
        for(int i=0; i<num; i++)
            ap[i] = new Point(buff[i*_channels], buff[i*_channels+1]);
        return ap;
    }

    public void fromList(List<Point> lp) {
        Point ap[] = lp.toArray(new Point[0]);

            

Reported by PMD.

modules/python/test/test_features2d.py
6 issues
Unable to import 'cv2'
Error

Line: 5 Column: 1

              from __future__ import print_function

import numpy as np
import cv2 as cv

from tests_common import NewOpenCVTests

class Features2D_Tests(NewOpenCVTests):


            

Reported by Pylint.

Unused numpy imported as np
Error

Line: 4 Column: 1

              #!/usr/bin/env python
from __future__ import print_function

import numpy as np
import cv2 as cv

from tests_common import NewOpenCVTests

class Features2D_Tests(NewOpenCVTests):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
from __future__ import print_function

import numpy as np
import cv2 as cv

from tests_common import NewOpenCVTests

class Features2D_Tests(NewOpenCVTests):

            

Reported by Pylint.

Class name "Features2D_Tests" doesn't conform to PascalCase naming style
Error

Line: 9 Column: 1

              
from tests_common import NewOpenCVTests

class Features2D_Tests(NewOpenCVTests):

    def test_issue_13406(self):
        self.assertEqual(True, hasattr(cv, 'drawKeypoints'))
        self.assertEqual(True, hasattr(cv, 'DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS'))
        self.assertEqual(True, hasattr(cv, 'DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS'))

            

Reported by Pylint.

Missing class docstring
Error

Line: 9 Column: 1

              
from tests_common import NewOpenCVTests

class Features2D_Tests(NewOpenCVTests):

    def test_issue_13406(self):
        self.assertEqual(True, hasattr(cv, 'drawKeypoints'))
        self.assertEqual(True, hasattr(cv, 'DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS'))
        self.assertEqual(True, hasattr(cv, 'DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS'))

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 11 Column: 5

              
class Features2D_Tests(NewOpenCVTests):

    def test_issue_13406(self):
        self.assertEqual(True, hasattr(cv, 'drawKeypoints'))
        self.assertEqual(True, hasattr(cv, 'DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS'))
        self.assertEqual(True, hasattr(cv, 'DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS'))



            

Reported by Pylint.

modules/python/package/setup.py
6 issues
Unused import sys
Error

Line: 2 Column: 1

              import os
import sys
import platform
import setuptools

SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__))

def main():
    os.chdir(SCRIPT_DIR)

            

Reported by Pylint.

Unused import platform
Error

Line: 3 Column: 1

              import os
import sys
import platform
import setuptools

SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__))

def main():
    os.chdir(SCRIPT_DIR)

            

Reported by Pylint.

TODO
Error

Line: 12 Column: 3

                  os.chdir(SCRIPT_DIR)

    package_name = 'opencv'
    package_version = os.environ.get('OPENCV_VERSION', '4.5.3')  # TODO

    long_description = 'Open Source Computer Vision Library Python bindings'  # TODO

    setuptools.setup(
        name=package_name,

            

Reported by Pylint.

TODO
Error

Line: 14 Column: 3

                  package_name = 'opencv'
    package_version = os.environ.get('OPENCV_VERSION', '4.5.3')  # TODO

    long_description = 'Open Source Computer Vision Library Python bindings'  # TODO

    setuptools.setup(
        name=package_name,
        version=package_version,
        url='https://github.com/opencv/opencv',

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import os
import sys
import platform
import setuptools

SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__))

def main():
    os.chdir(SCRIPT_DIR)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 8 Column: 1

              
SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__))

def main():
    os.chdir(SCRIPT_DIR)

    package_name = 'opencv'
    package_version = os.environ.get('OPENCV_VERSION', '4.5.3')  # TODO


            

Reported by Pylint.

modules/python/test/test_algorithm_rw.py
6 issues
Unable to import 'cv2'
Error

Line: 5 Column: 1

              """Algorithm serialization test."""
import tempfile
import os
import cv2 as cv
from tests_common import NewOpenCVTests


class algorithm_rw_test(NewOpenCVTests):
    def test_algorithm_rw(self):

            

Reported by Pylint.

Class name "algorithm_rw_test" doesn't conform to PascalCase naming style
Error

Line: 9 Column: 1

              from tests_common import NewOpenCVTests


class algorithm_rw_test(NewOpenCVTests):
    def test_algorithm_rw(self):
        fd, fname = tempfile.mkstemp(prefix="opencv_python_algorithm_", suffix=".yml")
        os.close(fd)

        # some arbitrary non-default parameters

            

Reported by Pylint.

Missing class docstring
Error

Line: 9 Column: 1

              from tests_common import NewOpenCVTests


class algorithm_rw_test(NewOpenCVTests):
    def test_algorithm_rw(self):
        fd, fname = tempfile.mkstemp(prefix="opencv_python_algorithm_", suffix=".yml")
        os.close(fd)

        # some arbitrary non-default parameters

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 10 Column: 5

              

class algorithm_rw_test(NewOpenCVTests):
    def test_algorithm_rw(self):
        fd, fname = tempfile.mkstemp(prefix="opencv_python_algorithm_", suffix=".yml")
        os.close(fd)

        # some arbitrary non-default parameters
        gold = cv.AKAZE_create(descriptor_size=1, descriptor_channels=2, nOctaves=3, threshold=4.0)

            

Reported by Pylint.

Variable name "fd" doesn't conform to snake_case naming style
Error

Line: 11 Column: 9

              
class algorithm_rw_test(NewOpenCVTests):
    def test_algorithm_rw(self):
        fd, fname = tempfile.mkstemp(prefix="opencv_python_algorithm_", suffix=".yml")
        os.close(fd)

        # some arbitrary non-default parameters
        gold = cv.AKAZE_create(descriptor_size=1, descriptor_channels=2, nOctaves=3, threshold=4.0)
        gold.write(cv.FileStorage(fname, cv.FILE_STORAGE_WRITE), "AKAZE")

            

Reported by Pylint.

Variable name "fs" doesn't conform to snake_case naming style
Error

Line: 18 Column: 9

                      gold = cv.AKAZE_create(descriptor_size=1, descriptor_channels=2, nOctaves=3, threshold=4.0)
        gold.write(cv.FileStorage(fname, cv.FILE_STORAGE_WRITE), "AKAZE")

        fs = cv.FileStorage(fname, cv.FILE_STORAGE_READ)
        algorithm = cv.AKAZE_create()
        algorithm.read(fs.getNode("AKAZE"))

        self.assertEqual(algorithm.getDescriptorSize(), 1)
        self.assertEqual(algorithm.getDescriptorChannels(), 2)

            

Reported by Pylint.

modules/core/misc/java/src/java/core+MatOfInt4.java
6 issues
Avoid throwing raw exception types.
Design

Line: 55

                  public int[] toArray() {
        int num = checkVector(_channels, _depth);
        if(num < 0)
            throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
        int[] a = new int[num * _channels];
        if(num == 0)
            return a;
        get(0, 0, a); //TODO: check ret val!
        return a;

            

Reported by PMD.

Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty()
Design

Line: 64

                  }

    public void fromList(List<Integer> lb) {
        if(lb==null || lb.size()==0)
            return;
        Integer ab[] = lb.toArray(new Integer[0]);
        int a[] = new int[ab.length];
        for(int i=0; i<ab.length; i++)
            a[i] = ab[i];

            

Reported by PMD.

Found 'DD'-anomaly for variable 'a' (lines '67'-'69').
Error

Line: 67

                      if(lb==null || lb.size()==0)
            return;
        Integer ab[] = lb.toArray(new Integer[0]);
        int a[] = new int[ab.length];
        for(int i=0; i<ab.length; i++)
            a[i] = ab[i];
        fromArray(a);
    }


            

Reported by PMD.

Found 'DD'-anomaly for variable 'a' (lines '69'-'69').
Error

Line: 69

                      Integer ab[] = lb.toArray(new Integer[0]);
        int a[] = new int[ab.length];
        for(int i=0; i<ab.length; i++)
            a[i] = ab[i];
        fromArray(a);
    }

    public List<Integer> toList() {
        int[] a = toArray();

            

Reported by PMD.

Found 'DD'-anomaly for variable 'ab' (lines '75'-'77').
Error

Line: 75

              
    public List<Integer> toList() {
        int[] a = toArray();
        Integer ab[] = new Integer[a.length];
        for(int i=0; i<a.length; i++)
            ab[i] = a[i];
        return Arrays.asList(ab);
    }
}

            

Reported by PMD.

Found 'DD'-anomaly for variable 'ab' (lines '77'-'77').
Error

Line: 77

                      int[] a = toArray();
        Integer ab[] = new Integer[a.length];
        for(int i=0; i<a.length; i++)
            ab[i] = a[i];
        return Arrays.asList(ab);
    }
}

            

Reported by PMD.