<awangdev>Count 1 in Binary_2.java
public int countOnes(int num) {
        if (num < 0) {
            return 0;
        }
        String bits = Integer.toBinaryString(num);
        char[] bitArray = bits.toCharArray();
        int sum = 0;
        for (int i = 0; i < bitArray.length; i++) {
            sum += Character.getNumericValue(bitArray[i]);
        }
        return sum;
    }
public int sample_funcname ( int var_0 ) {
  if ( var_0 < 0 ) {
    return 0 ;
  }
  String var_5 = Integer . toBinaryString ( var_0 ) ;
  char [ ] var_7 = var_5 . toCharArray ( ) ;
  int var_8 = 0 ;
  for ( int var_9 = 0 ;
  var_9 < var_7 . length ;
  var_9 ++ ) {
    var_8 += Character . getNumericValue ( var_7 [ var_9 ] ) ;
  }
  return var_8 ;
}
