test_class.declarator: message = "272"
test_class.modifier: static final
test_class.original_string: static final String message = "272";
test_class.type: String
test_class.var_name: message
test_class.declarator: correctIdx = new int[]{9754050, 11917035, 12238481, 14522717, 5947587, 1548765, 7212604, 12309647, 16066215, 1232510, 10694178, 14271239, 4784036, 15510045, 304956, 5224878}
test_class.modifier: static final
test_class.original_string: static final int[] correctIdx = new int[]{9754050, 11917035, 12238481, 14522717, 5947587, 1548765, 7212604, 12309647, 16066215, 1232510, 10694178, 14271239, 4784036, 15510045, 304956, 5224878};
test_class.type: int[]
test_class.var_name: correctIdx
test_class.declarator: correctHash = "C2D594EBD6B591BEBA5D99DDC3C05ADDA1173C0E"
test_class.modifier: static final
test_class.original_string: static final String correctHash = "C2D594EBD6B591BEBA5D99DDC3C05ADDA1173C0E";
test_class.type: String
test_class.var_name: correctHash
test_class.file: ml/streaminer/src/test/java/org/streaminer/stream/avg/TEWMATest.java
test_class.identifier: TEWMATest
test_case.body: @Test
      public void testIndexes() throws NoSuchAlgorithmException {
          TEWMA tewma = new TEWMA(16, 24, 1, 1);
          int[] indexes = tewma.indexes(message);
          
          System.out.println("Indexes:");
          for (int i=0; i<indexes.length; i++) {
              assertEquals(correctIdx[i], indexes[i]);
              System.out.println(indexes[i]);
          }
      }
test_case.class_method_signature: TEWMATest.testIndexes()
test_case.full_signature: @Test public void testIndexes()
test_case.identifier: testIndexes
test_case.invocations: indexes println assertEquals println
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testIndexes()
focal_class.declarator: hexArray = "0123456789ABCDEF".toCharArray()
focal_class.modifier: private static final
focal_class.original_string: private static final char[] hexArray = "0123456789ABCDEF".toCharArray();
focal_class.type: char[]
focal_class.var_name: hexArray
focal_class.declarator: sha1
focal_class.modifier: private
focal_class.original_string: private MessageDigest sha1;
focal_class.type: MessageDigest
focal_class.var_name: sha1
focal_class.declarator: beta
focal_class.modifier: private
focal_class.original_string: private double beta;
focal_class.type: double
focal_class.var_name: beta
focal_class.declarator: logBeta
focal_class.modifier: private
focal_class.original_string: private double logBeta;
focal_class.type: double
focal_class.var_name: logBeta
focal_class.declarator: nhash
focal_class.modifier: private
focal_class.original_string: private int nhash;
focal_class.type: int
focal_class.var_name: nhash
focal_class.declarator: shash
focal_class.modifier: private
focal_class.original_string: private int shash;
focal_class.type: int
focal_class.var_name: shash
focal_class.declarator: w
focal_class.modifier: private
focal_class.original_string: private double w;
focal_class.type: double
focal_class.var_name: w
focal_class.declarator: digest
focal_class.modifier: private
focal_class.original_string: private int digest;
focal_class.type: int
focal_class.var_name: digest
focal_class.declarator: counters
focal_class.modifier: private
focal_class.original_string: private double[] counters;
focal_class.type: double[]
focal_class.var_name: counters
focal_class.declarator: timers
focal_class.modifier: private
focal_class.original_string: private long[] timers;
focal_class.type: long[]
focal_class.var_name: timers
focal_class.file: ml/streaminer/src/main/java/org/streaminer/stream/avg/TEWMA.java
focal_class.identifier: TEWMA
focal_class.class_method_signature: TEWMA.TEWMA(int nhash, int shash, double beta, double w)
focal_class.full_signature: public  TEWMA(int nhash, int shash, double beta, double w)
focal_class.identifier: TEWMA
focal_class.modifiers: public
focal_class.parameters: (int nhash, int shash, double beta, double w)
focal_class.signature:  TEWMA(int nhash, int shash, double beta, double w)
focal_class.class_method_signature: TEWMA.add(Object item, double quantity, long timestamp)
focal_class.full_signature: public double add(Object item, double quantity, long timestamp)
focal_class.identifier: add
focal_class.modifiers: public
focal_class.parameters: (Object item, double quantity, long timestamp)
focal_class.return: double
focal_class.signature: double add(Object item, double quantity, long timestamp)
focal_class.class_method_signature: TEWMA.check(Object item, long timestamp)
focal_class.full_signature: public double check(Object item, long timestamp)
focal_class.identifier: check
focal_class.modifiers: public
focal_class.parameters: (Object item, long timestamp)
focal_class.return: double
focal_class.signature: double check(Object item, long timestamp)
focal_class.class_method_signature: TEWMA.getMinCounter(int[] idx, long timestamp)
focal_class.full_signature: protected double getMinCounter(int[] idx, long timestamp)
focal_class.identifier: getMinCounter
focal_class.modifiers: protected
focal_class.parameters: (int[] idx, long timestamp)
focal_class.return: double
focal_class.signature: double getMinCounter(int[] idx, long timestamp)
focal_class.class_method_signature: TEWMA.indexes(Object o)
focal_class.full_signature: protected int[] indexes(Object o)
focal_class.identifier: indexes
focal_class.modifiers: protected
focal_class.parameters: (Object o)
focal_class.return: int[]
focal_class.signature: int[] indexes(Object o)
focal_class.class_method_signature: TEWMA.bytesToHex(byte[] bytes)
focal_class.full_signature: protected String bytesToHex(byte[] bytes)
focal_class.identifier: bytesToHex
focal_class.modifiers: protected
focal_class.parameters: (byte[] bytes)
focal_class.return: String
focal_class.signature: String bytesToHex(byte[] bytes)
focal_class.class_method_signature: TEWMA.toSHA1(Object o)
focal_class.full_signature: protected byte[] toSHA1(Object o)
focal_class.identifier: toSHA1
focal_class.modifiers: protected
focal_class.parameters: (Object o)
focal_class.return: byte[]
focal_class.signature: byte[] toSHA1(Object o)
focal_class.class_method_signature: TEWMA.toSHA1(byte[] in)
focal_class.full_signature: protected byte[] toSHA1(byte[] in)
focal_class.identifier: toSHA1
focal_class.modifiers: protected
focal_class.parameters: (byte[] in)
focal_class.return: byte[]
focal_class.signature: byte[] toSHA1(byte[] in)
focal_method.body: protected int[] indexes(Object o) {
          int[] indexes = new int[nhash];
          byte[] msgDigest = toSHA1(o);
          int numBytes = shash/8;
          
          int k = 0;
          for (int i=0; i<nhash; i++) {
              byte[] bytes = new byte[numBytes];
              for (int j=numBytes-1; j>=0; j--, k++) {
                  if (k >= msgDigest.length) {
                      msgDigest = toSHA1(msgDigest);
                      k = 0;
                  }
                  
                  bytes[j] = msgDigest[k];
              }
              
              String hex = bytesToHex(bytes);
              indexes[i] = Integer.parseInt(hex, 16);
          }
          
          return indexes;
      }
focal_method.class_method_signature: TEWMA.indexes(Object o)
focal_method.full_signature: protected int[] indexes(Object o)
focal_method.identifier: indexes
focal_method.invocations: toSHA1 toSHA1 bytesToHex parseInt
focal_method.modifiers: protected
focal_method.parameters: (Object o)
focal_method.return: int[]
focal_method.signature: int[] indexes(Object o)