Program: 15660
Project: 15660
Buggy source:
/** 
 * @param settingValue The value of the ..._format setting, like "iso nz".
 * @param parsingStart The index of the char in the {@code settingValue} that directly after the prefix that hasindicated the exact formatter class (like "iso" or "xs") 
 * @param factory 
 */
public ISOLikeTemplateDateFormat(String settingValue,int parsingStart,int dateType,TimeZone timeZone,ISOLikeTemplateDateFormatFactory factory) throws ParseException, UnknownDateTypeFormattingUnsupportedException {
  this.factory=factory;
  if (dateType == TemplateDateModel.UNKNOWN) {
    throw new UnknownDateTypeFormattingUnsupportedException();
  }
  this.dateType=dateType;
  final int ln=settingValue.length();
  boolean afterSeparator=false;
  int i=parsingStart;
  int accuracy=DateUtil.ACCURACY_MILLISECONDS;
  Boolean showZoneOffset=null;
  boolean useUTC=false;
  while (i < ln) {
    final char c=settingValue.charAt(i++);
    if (c == '_' || c == ' ') {
      afterSeparator=true;
    }
 else {
      if (!afterSeparator) {
        throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str",i);
      }
switch (c) {
case 'h':
case 'm':
case 's':
        if (accuracy != DateUtil.ACCURACY_MILLISECONDS) {
          throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str",i);
        }
switch (c) {
case 'h':
        if (isXSMode()) {
          throw new java.text.ParseException(XS_LESS_THAN_SECONDS_ACCURACY_ERROR_MESSAGE,i);
        }
      accuracy=DateUtil.ACCURACY_HOURS;
    break;
case 'm':
  if (i < ln && settingValue.charAt(i) == 's') {
    i++;
    accuracy=DateUtil.ACCURACY_MILLISECONDS_FORCED;
  }
 else {
    if (isXSMode()) {
      throw new java.text.ParseException(XS_LESS_THAN_SECONDS_ACCURACY_ERROR_MESSAGE,i);
    }
    accuracy=DateUtil.ACCURACY_MINUTES;
  }
break;
case 's':
accuracy=DateUtil.ACCURACY_SECONDS;
break;
}
break;
case 'n':
case 'f':
if (showZoneOffset != null) {
throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str"+ "String_Node_Str",i);
}
switch (c) {
case 'n':
if (i < ln && settingValue.charAt(i) == 'z') {
i++;
showZoneOffset=Boolean.FALSE;
}
 else {
throw new java.text.ParseException("String_Node_Str",i);
}
break;
case 'f':
if (i < ln && settingValue.charAt(i) == 'z') {
i++;
showZoneOffset=Boolean.TRUE;
}
 else {
throw new java.text.ParseException("String_Node_Str",i);
}
break;
}
break;
case 'u':
if (useUTC) {
throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str",i);
}
useUTC=true;
break;
default :
throw new java.text.ParseException("String_Node_Str" + StringUtil.jQuote(String.valueOf(c)) + "String_Node_Str",i);
}
afterSeparator=false;
}
}
this.accuracy=accuracy;
this.showZoneOffset=showZoneOffset;
this.useUTC=useUTC;
this.timeZone=timeZone;
}

Fixed version (ground truth):
/** 
 * @param settingValue The value of the ..._format setting, like "iso nz".
 * @param parsingStart The index of the char in the {@code settingValue} that directly after the prefix that hasindicated the exact formatter class (like "iso" or "xs") 
 * @param factory 
 */
public ISOLikeTemplateDateFormat(String settingValue,int parsingStart,int dateType,boolean zonelessInput,TimeZone timeZone,ISOLikeTemplateDateFormatFactory factory) throws ParseException, UnknownDateTypeFormattingUnsupportedException {
  this.factory=factory;
  if (dateType == TemplateDateModel.UNKNOWN) {
    throw new UnknownDateTypeFormattingUnsupportedException();
  }
  this.dateType=dateType;
  this.zonelessInput=zonelessInput;
  final int ln=settingValue.length();
  boolean afterSeparator=false;
  int i=parsingStart;
  int accuracy=DateUtil.ACCURACY_MILLISECONDS;
  Boolean showZoneOffset=null;
  boolean useUTC=false;
  while (i < ln) {
    final char c=settingValue.charAt(i++);
    if (c == '_' || c == ' ') {
      afterSeparator=true;
    }
 else {
      if (!afterSeparator) {
        throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str",i);
      }
switch (c) {
case 'h':
case 'm':
case 's':
        if (accuracy != DateUtil.ACCURACY_MILLISECONDS) {
          throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str",i);
        }
switch (c) {
case 'h':
        if (isXSMode()) {
          throw new java.text.ParseException(XS_LESS_THAN_SECONDS_ACCURACY_ERROR_MESSAGE,i);
        }
      accuracy=DateUtil.ACCURACY_HOURS;
    break;
case 'm':
  if (i < ln && settingValue.charAt(i) == 's') {
    i++;
    accuracy=DateUtil.ACCURACY_MILLISECONDS_FORCED;
  }
 else {
    if (isXSMode()) {
      throw new java.text.ParseException(XS_LESS_THAN_SECONDS_ACCURACY_ERROR_MESSAGE,i);
    }
    accuracy=DateUtil.ACCURACY_MINUTES;
  }
break;
case 's':
accuracy=DateUtil.ACCURACY_SECONDS;
break;
}
break;
case 'n':
case 'f':
if (showZoneOffset != null) {
throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str"+ "String_Node_Str",i);
}
switch (c) {
case 'n':
if (i < ln && settingValue.charAt(i) == 'z') {
i++;
showZoneOffset=Boolean.FALSE;
}
 else {
throw new java.text.ParseException("String_Node_Str",i);
}
break;
case 'f':
if (i < ln && settingValue.charAt(i) == 'z') {
i++;
showZoneOffset=Boolean.TRUE;
}
 else {
throw new java.text.ParseException("String_Node_Str",i);
}
break;
}
break;
case 'u':
if (useUTC) {
throw new java.text.ParseException("String_Node_Str" + c + "String_Node_Str",i);
}
useUTC=true;
break;
default :
throw new java.text.ParseException("String_Node_Str" + StringUtil.jQuote(String.valueOf(c)) + "String_Node_Str",i);
}
afterSeparator=false;
}
}
this.accuracy=accuracy;
this.showZoneOffset=showZoneOffset;
this.useUTC=useUTC;
this.timeZone=timeZone;
}