Program: 91867
Project: 91867
Buggy source:
/** 
 * Sets the pattern of the characters to insert between the columns. The pattern shall contain exactly one occurrence of the   {@code "[ ]"} pair of bracket, with exactly one characterbetween them. This character will be repeated as many time as needed for columns alignment. <p>The formatting pattern can optionally be followed by a regular expression to be used at parsing time. If omitted, the parsing pattern will be inferred from the formatting pattern. If specified, then the  {@link #parse(CharSequence,ParsePosition) parse} method will invokethe  {@link Matcher#find()} method for determining the column boundaries.</p><p>The characters listed below have special meaning in the pattern. Other characters are appended <cite>as-is</cite> between the columns.</p> <table class="sis"> <caption>Reserved characters</caption> <tr><th>Character(s)</th> <th>Meaning</th></tr> <tr><td> {@code '?'}</td>  <td>Omit the column separator for trailing null values.</td></tr> <tr><td>  {@code "[ ]"}</td><td>Repeat the character between bracket as needed.</td></tr> <tr><td>  {@code '/'}</td>  <td>Separate the formatting pattern from the parsing pattern.</td></tr> <tr><td>  {@code '\\'}</td> <td>Escape any of the characters listed in this table.</td></tr> </table> <div class="section">Restrictions</div> <ul> <li>If present,   {@code '?'} shall be the first character in the pattern.</li><li>The repeated character (specified inside the pair of brackets) is mandatory.</li> <li>In the current implementation, the repeated character must be in the {@linkplain Character#isBmpCodePoint(int) Basic Multilanguage Plane}.</li> <li>If   {@code '/'} is present, anything on its right side shall be compliantwith the  {@link Pattern} syntax.</li></ul> <div class="note"><b>Example:</b> The  {@code "?……[…] "} pattern means <cite>"If the next value is non-null, then insert the{@code "……"} string, repeat the {@code '…'} character as many time as needed (may be zero),then insert a space"</cite>. </div>
 * @param pattern The pattern of the new column separator.
 * @throws IllegalArgumentException If the given pattern is illegal.
 */
public void setColumnSeparatorPattern(final String pattern) throws IllegalArgumentException {
  ArgumentChecks.ensureNonEmpty("String_Node_Str",pattern);
  final int length=pattern.length();
  final StringBuilder buffer=new StringBuilder(length);
  boolean escape=false;
  boolean trim=false;
  String prefix=null;
  String regex=null;
  int separatorIndex=-1;
  scan:   for (int i=0; i < length; i++) {
    final char c=pattern.charAt(i);
switch (c) {
case '\uFFFF':
{
        prefix=null;
        break scan;
      }
case '\\':
{
      if (i != separatorIndex) {
        if (escape)         break;
        escape=true;
      }
      continue;
    }
case '?':
{
    if (i != 0) {
      prefix=null;
      break scan;
    }
    trim=true;
    continue;
  }
case '[':
{
  if (escape)   break;
  if (i != separatorIndex) {
    if (separatorIndex >= 0) {
      prefix=null;
      break scan;
    }
    separatorIndex=i + 1;
  }
  continue;
}
case ']':
{
if (escape) break;
switch (i - separatorIndex) {
case 0:
  continue;
case 1:
prefix=buffer.toString();
buffer.setLength(0);
continue;
default :
prefix=null;
break scan;
}
}
case '/':
{
if (escape) break;
regex=pattern.substring(i + 1);
break scan;
}
}
if (i != separatorIndex) {
buffer.append(c);
}
}
if (prefix == null) {
throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalFormatPatternForClass_2,getValueType(),pattern));
}
if (regex != null) {
parsePattern=Pattern.compile(regex);
isParsePatternDefined=true;
}
 else {
parsePattern=null;
isParsePatternDefined=false;
}
omitTrailingNulls=trim;
beforeFill=prefix;
columnSeparator=buffer.toString();
fillCharacter=pattern.charAt(separatorIndex);
}

Fixed version (ground truth):
/** 
 * Sets the pattern of the characters to insert between the columns. The pattern shall contain exactly one occurrence of the   {@code "[ ]"} pair of bracket, with exactly one characterbetween them. This character will be repeated as many time as needed for columns alignment. <p>The formatting pattern can optionally be followed by a regular expression to be used at parsing time. If omitted, the parsing pattern will be inferred from the formatting pattern. If specified, then the  {@link #parse(CharSequence,ParsePosition) parse} method will invokethe  {@link Matcher#find()} method for determining the column boundaries.</p><p>The characters listed below have special meaning in the pattern. Other characters are appended <cite>as-is</cite> between the columns.</p> <table class="sis"> <caption>Reserved characters</caption> <tr><th>Character(s)</th> <th>Meaning</th></tr> <tr><td> {@code '?'}</td>  <td>Omit the column separator for trailing null values.</td></tr> <tr><td>  {@code "[ ]"}</td><td>Repeat the character between bracket as needed.</td></tr> <tr><td>  {@code '/'}</td>  <td>Separate the formatting pattern from the parsing pattern.</td></tr> <tr><td>  {@code '\\'}</td> <td>Escape any of the characters listed in this table.</td></tr> </table> <div class="section">Restrictions</div> <ul> <li>If present,   {@code '?'} shall be the first character in the pattern.</li><li>The repeated character (specified inside the pair of brackets) is mandatory.</li> <li>In the current implementation, the repeated character must be in the Basic Multilanguage Plane.</li> <li>If  {@code '/'} is present, anything on its right side shall be compliantwith the  {@link Pattern} syntax.</li></ul> <div class="note"><b>Example:</b> The  {@code "?……[…] "} pattern means <cite>"If the next value is non-null, then insert the{@code "……"} string, repeat the {@code '…'} character as many time as needed (may be zero),then insert a space"</cite>. </div>
 * @param pattern The pattern of the new column separator.
 * @throws IllegalArgumentException If the given pattern is illegal.
 */
public void setColumnSeparatorPattern(final String pattern) throws IllegalArgumentException {
  ArgumentChecks.ensureNonEmpty("String_Node_Str",pattern);
  final int length=pattern.length();
  final StringBuilder buffer=new StringBuilder(length);
  boolean escape=false;
  boolean trim=false;
  String prefix=null;
  String regex=null;
  int separatorIndex=-1;
  scan:   for (int i=0; i < length; i++) {
    final char c=pattern.charAt(i);
switch (c) {
case '\uFFFF':
{
        prefix=null;
        break scan;
      }
case '\\':
{
      if (i != separatorIndex) {
        if (escape)         break;
        escape=true;
      }
      continue;
    }
case '?':
{
    if (i != 0) {
      prefix=null;
      break scan;
    }
    trim=true;
    continue;
  }
case '[':
{
  if (escape)   break;
  if (i != separatorIndex) {
    if (separatorIndex >= 0) {
      prefix=null;
      break scan;
    }
    separatorIndex=i + 1;
  }
  continue;
}
case ']':
{
if (escape) break;
switch (i - separatorIndex) {
case 0:
  continue;
case 1:
prefix=buffer.toString();
buffer.setLength(0);
continue;
default :
prefix=null;
break scan;
}
}
case '/':
{
if (escape) break;
regex=pattern.substring(i + 1);
break scan;
}
}
if (i != separatorIndex) {
buffer.append(c);
}
}
if (prefix == null) {
throw new IllegalArgumentException(Errors.format(Errors.Keys.IllegalFormatPatternForClass_2,getValueType(),pattern));
}
if (regex != null) {
parsePattern=Pattern.compile(regex);
isParsePatternDefined=true;
}
 else {
parsePattern=null;
isParsePatternDefined=false;
}
omitTrailingNulls=trim;
beforeFill=prefix;
columnSeparator=buffer.toString();
fillCharacter=pattern.charAt(separatorIndex);
}