code: private static int parseInt(String str, int defaultValue) {
          
          if (str == null)
              return defaultValue;
          
          return Integer.parseInt(str);
  
      }
docs: Parse the given string as an integer, returning the provided default
  value if the string is null.
  
  @param str
  The string to parse as an integer.
  
  @param defaultValue
  The value to return if <code>str</code> is null.
  
  @return
  The parsed value, or the provided default value if <code>str</code>
  is null.