code: public int getIntProperty( String key , int defaultValue )
      {
          String value = SystemTools.replaceSystemProperties(settings.getProperty(key));
          if (value == null)
              return defaultValue;
          try
          {
              return Integer.parseInt(value);
          }
          catch (Exception e)
          {
              return defaultValue;
          }
      }
docs: Get a property by name
  @param key the property name