Program: 39340
Project: 39340
Buggy source:
private void parseField(final XMLStreamReader reader,final String pluginIdentifier,final CtClass ctClass,final String tag,final List<String> fields) throws XMLStreamException {
  FieldsTag modelTag=FieldsTag.valueOf(tag.toUpperCase(Locale.ENGLISH));
  if (!getBooleanAttribute(reader,"String_Node_Str",true)) {
    return;
  }
  if (getStringAttribute(reader,"String_Node_Str") != null) {
    return;
  }
switch (modelTag) {
case PRIORITY:
case INTEGER:
    createField(ctClass,getStringAttribute(reader,"String_Node_Str"),Integer.class.getCanonicalName());
  fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case STRING:
case TEXT:
case ENUM:
case DICTIONARY:
case PASSWORD:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),String.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case DECIMAL:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),BigDecimal.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case DATETIME:
case DATE:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),Date.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case BOOLEAN:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),Boolean.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case BELONGSTO:
createBelongsField(ctClass,pluginIdentifier,reader);
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case HASMANY:
case TREE:
createHasManyField(ctClass,pluginIdentifier,reader);
break;
default :
break;
}
while (reader.hasNext() && reader.next() > 0) {
if (isTagEnded(reader,tag)) {
break;
}
}
}

Fixed version (ground truth):
private void parseField(final XMLStreamReader reader,final String pluginIdentifier,final CtClass ctClass,final String tag,final List<String> fields) throws XMLStreamException {
  FieldsTag modelTag=FieldsTag.valueOf(tag.toUpperCase(Locale.ENGLISH));
  if (!getBooleanAttribute(reader,"String_Node_Str",true)) {
    return;
  }
  if (getStringAttribute(reader,"String_Node_Str") != null) {
    return;
  }
switch (modelTag) {
case PRIORITY:
case INTEGER:
    createField(ctClass,getStringAttribute(reader,"String_Node_Str"),Integer.class.getCanonicalName());
  fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case STRING:
case TEXT:
case ENUM:
case DICTIONARY:
case PASSWORD:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),String.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case DECIMAL:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),BigDecimal.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case DATETIME:
case DATE:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),Date.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case BOOLEAN:
createField(ctClass,getStringAttribute(reader,"String_Node_Str"),Boolean.class.getCanonicalName());
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case BELONGSTO:
createBelongsField(ctClass,pluginIdentifier,reader);
fields.add(getStringAttribute(reader,"String_Node_Str"));
break;
case HASMANY:
case TREE:
createHasManyField(ctClass,reader);
break;
default :
break;
}
while (reader.hasNext() && reader.next() > 0) {
if (isTagEnded(reader,tag)) {
break;
}
}
}