test_class.file: src/com/aestel/chemistry/openEye/fp/SparseFingerprintTest.java
test_class.identifier: SparseFingerprintTest
test_case.body: @Test
     public void testFold()
     {  assertFold(new int [] {0},    "80");
        assertFold(new int [] {102},  "00000000000000000000000002");
        assertFold(new int [] {103},  "00000000000000000000000001");
        assertFold(new int [] {104},  "0000000000000000000000000080");
        assertFold(new int [] {511},  "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001");
        assertFold(new int [] {512},  "00000000000000000000000001");
        assertFold(new int [] {513},  "0000000000000000000000000080");
        assertFold(new int [] {920},  "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001");
        assertFold(new int [] {921},  "000000000000000000000000000000000000000000000040");
        assertFold(new int [] {922},  "000000000000000000000000000000000000000000000020");
        assertFold(new int [] {1247}, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001");
        assertFold(new int [] {1248}, "000000000000000000000000000000000000000000000000000000000000000000000002");
        assertFold(new int [] {1249}, "000000000000000000000000000000000000000000000000000000000000000000000001");
        assertFold(new int [] {1472}, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002");
        assertFold(new int [] {1473}, "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001");
        assertFold(new int [] {1474}, "00000000000000000000000000000000000000000000000000000000000000000020");
     }
test_case.class_method_signature: SparseFingerprintTest.testFold()
test_case.full_signature: @Test public void testFold()
test_case.identifier: testFold
test_case.invocations: assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold assertFold
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFold()
focal_class.declarator: bits
focal_class.modifier: private final
focal_class.original_string: private final int[] bits;
focal_class.type: int[]
focal_class.var_name: bits
focal_class.file: src/com/aestel/chemistry/openEye/fp/SparseFingerprint.java
focal_class.identifier: SparseFingerprint
focal_class.interfaces: implements Fingerprint
focal_class.class_method_signature: SparseFingerprint.SparseFingerprint(int[] inBits)
focal_class.full_signature: public  SparseFingerprint(int[] inBits)
focal_class.identifier: SparseFingerprint
focal_class.modifiers: public
focal_class.parameters: (int[] inBits)
focal_class.signature:  SparseFingerprint(int[] inBits)
focal_class.class_method_signature: SparseFingerprint.tanimoto(Fingerprint other)
focal_class.full_signature: @Override public double tanimoto(Fingerprint other)
focal_class.identifier: tanimoto
focal_class.modifiers: @Override public
focal_class.parameters: (Fingerprint other)
focal_class.return: double
focal_class.signature: double tanimoto(Fingerprint other)
focal_class.class_method_signature: SparseFingerprint.getBinString()
focal_class.full_signature: @Override public String getBinString()
focal_class.identifier: getBinString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getBinString()
focal_class.class_method_signature: SparseFingerprint.getBits()
focal_class.full_signature: @Override public int[] getBits()
focal_class.identifier: getBits
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int[]
focal_class.signature: int[] getBits()
focal_class.class_method_signature: SparseFingerprint.getHexString()
focal_class.full_signature: @Override public String getHexString()
focal_class.identifier: getHexString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHexString()
focal_class.class_method_signature: SparseFingerprint.getNBits()
focal_class.full_signature: @Override public int getNBits()
focal_class.identifier: getNBits
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNBits()
focal_class.class_method_signature: SparseFingerprint.fold(int newSize)
focal_class.full_signature: @Override public Fingerprint fold(int newSize)
focal_class.identifier: fold
focal_class.modifiers: @Override public
focal_class.parameters: (int newSize)
focal_class.return: Fingerprint
focal_class.signature: Fingerprint fold(int newSize)
focal_method.body: @Override
     public Fingerprint fold(int newSize)
     {  IntArrayList newBits = new IntArrayList(bits.length);
        int firstShift = newSize  * 8 / 10;
        int secondShift = newSize * 64 / 100;
        int minFoldArea = newSize * 52 / 100;
        int sizeFoldArea= newSize - minFoldArea;
        for(int bit : bits)
        {  // do not fold onto first 20% of fingerprint because we assume these to
           // be the most frequent bits and therefore we assume these to be close
           // to saturated ( firstShift is size * 20%)
           if( bit >= newSize ) bit = bit - firstShift;
           // fold only once onto second 20% of newSize so that these do not get
           // too saturated
           if( bit >= newSize ) bit = bit - secondShift;
           // fold into area from minFoldArea to newSize
           if( bit >= newSize ) bit = minFoldArea + bit % sizeFoldArea;
           newBits.add(bit);
        }
        return new SparseFingerprint(newBits.toArray());
     }
focal_method.class_method_signature: SparseFingerprint.fold(int newSize)
focal_method.full_signature: @Override public Fingerprint fold(int newSize)
focal_method.identifier: fold
focal_method.invocations: add toArray
focal_method.modifiers: @Override public
focal_method.parameters: (int newSize)
focal_method.return: Fingerprint
focal_method.signature: Fingerprint fold(int newSize)