private void clear(){
  if (startFound) {
    if (index1 != -1) {
      if (index1 < 0 || index1 >= parameters.length) {
        if (required) {
          invalidParameters=true;
        }
      }
 else       if (toEnd) {
        output.append(buildRange(parameters,index1,index2));
      }
 else {
        output.append(parameters[index1]);
      }
      buffer=new StringBuilder();
    }
 else {
      dumpBuffer();
    }
  }
  reset();
}

private void clear ( ) { if ( startFound ) { if ( index1 != - 1 ) { if ( index1 < 0 || index1 >= parameters . length ) { if ( required ) { invalidParameters = true ; } } else if ( toEnd ) { output . append ( buildRange ( parameters , index1 , index2 ) ) ; } else { output . append ( parameters [ index1 ] ) ; } buffer = new StringBuilder ( ) ; } else { dumpBuffer ( ) ; } } reset ( ) ; }
checks if a match to replace has been found and appens the appropriate parameter or the buffer if nothing has been found .
