protected String indentString(int nSpaces){
  String spaces="                        ";
  if (nSpaces <= spaces.length())   return spaces.substring(0,nSpaces);
 else {
    StringBuilder buf=new StringBuilder();
    for (int i=0; i < nSpaces; i++)     buf.append(" ");
    return buf.toString();
  }
}

protected String indentString ( int nSpaces ) { String spaces = "                        " ; if ( nSpaces <= spaces . length ( ) ) return spaces . substring ( 0 , nSpaces ) ; else { StringBuilder buf = new StringBuilder ( ) ; for ( int i = 0 ; i < nSpaces ; i ++ ) buf . append ( " " ) ; return buf . toString ( ) ; } }
creates a string with a given amount of empty spaces . useful for indenting the text of a diagnostic message .
