Program: 177661
Project: 177661
Buggy source:
/** 
 * Extracts declared non-<code>transient</code> fields of a given Entity. Makes  property bindings for fields using their annotations and checks for their getter-and setters (finds them automatically) if they are non-public fields.
 * @return fields of this class.
 */
@SuppressWarnings("String_Node_Str") private List<Field> extractFields(){
  this.fields.clear();
  for (  java.lang.reflect.Field f : this.clazz.getDeclaredFields()) {
    if (!Modifier.isTransient(f.getModifiers())) {
      Class<?> fieldType=f.getType();
      boolean isList=false;
      if (fieldType.equals(EntityList.class)) {
        OneToMany otm=f.getAnnotation(OneToMany.class);
        ManyToMany mtm=f.getAnnotation(ManyToMany.class);
        if (otm != null) {
          fieldType=otm.toType();
        }
 else         if (mtm != null) {
          fieldType=mtm.toType();
        }
 else {
          throw new UnannotatedCollectionFieldException(f.getName(),this.clazz.getName());
        }
        isList=true;
      }
      Field newF=new Field(fieldType,f);
      if (isList)       newF.setList(true);
      int accessibility=f.getModifiers();
      if (!(Modifier.isPublic(accessibility))) {
        Method setter=this.findSetterFor(this.clazz,f.getName());
        if (setter == null)         throw new NotDeclaredSetterException(f.getName(),this.clazz.getName());
 else         newF.setSetterMethod(setter);
        Method getter=this.findGetterFor(this.clazz,f.getName());
        if (getter == null)         throw new NotDeclaredGetterException(f.getName(),this.clazz.getName());
 else         newF.setGetterMethod(getter);
      }
      PrimaryKey pk=f.getAnnotation(PrimaryKey.class);
      if (pk != null) {
        newF.setPrimaryKey(true);
        if (!isSupportedForPrimaryKeyField(f.getType())) {
          throw new UnsupportedPrimaryKeyFieldTypeException(f.getType().getName(),clazz.getName());
        }
        newF.setAutoIncrement(pk.autoIncrement());
        if (newF.getIndex() == null) {
          newF.setIndex(new FieldIndexHolder(null,true,IndexType.HASH,true));
        }
      }
      if (f.isAnnotationPresent(Index.class)) {
        Index ann=f.getAnnotation(Index.class);
        newF.setIndex(new FieldIndexHolder(ann.name(),ann.unique(),ann.type(),false));
        newF.setNullable(false);
      }
      if (f.isAnnotationPresent(NotNull.class)) {
        newF.setNullable(false);
      }
      if (f.isAnnotationPresent(OneToOne.class)) {
        newF.setForeignKey(true);
        if (newF.getIndex() == null)         newF.setIndex(new FieldIndexHolder(null,true));
      }
      if (f.isAnnotationPresent(ManyToOne.class)) {
        newF.setForeignKey(true);
        if (newF.getIndex() == null)         newF.setIndex(new FieldIndexHolder(null,false));
      }
      newF.setRawField(f);
      fields.add(newF);
    }
  }
  return this.fields;
}

Fixed version (ground truth):
/** 
 * Extracts declared non-<code>transient</code> fields of a given Entity. Makes  property bindings for fields using their annotations and checks for their getter-and setters (finds them automatically) if they are non-public fields.
 * @return fields of this class.
 */
@SuppressWarnings("String_Node_Str") private List<Field> extractFields(){
  this.fields.clear();
  int modifiers;
  for (  java.lang.reflect.Field f : this.clazz.getDeclaredFields()) {
    modifiers=f.getModifiers();
    if (!Modifier.isTransient(modifiers) && !Modifier.isVolatile(modifiers)) {
      Class<?> fieldType=f.getType();
      boolean isList=false;
      if (fieldType.equals(EntityList.class)) {
        OneToMany otm=f.getAnnotation(OneToMany.class);
        ManyToMany mtm=f.getAnnotation(ManyToMany.class);
        if (otm != null) {
          fieldType=otm.toType();
        }
 else         if (mtm != null) {
          fieldType=mtm.toType();
        }
 else {
          throw new UnannotatedCollectionFieldException(f.getName(),this.clazz.getName());
        }
        isList=true;
      }
      Field newF=new Field(fieldType,f);
      if (isList)       newF.setList(true);
      modifiers=f.getModifiers();
      if (!(Modifier.isPublic(modifiers))) {
        Method setter=this.findSetterFor(this.clazz,f.getName());
        if (setter == null)         throw new NotDeclaredSetterException(f.getName(),this.clazz.getName());
 else         newF.setSetterMethod(setter);
        Method getter=this.findGetterFor(this.clazz,f.getName());
        if (getter == null)         throw new NotDeclaredGetterException(f.getName(),this.clazz.getName());
 else         newF.setGetterMethod(getter);
      }
      PrimaryKey pk=f.getAnnotation(PrimaryKey.class);
      if (pk != null) {
        newF.setPrimaryKey(true);
        if (!isSupportedForPrimaryKeyField(f.getType())) {
          throw new UnsupportedPrimaryKeyFieldTypeException(f.getType().getName(),clazz.getName());
        }
        newF.setAutoIncrement(pk.autoIncrement());
        if (newF.getIndex() == null) {
          newF.setIndex(new FieldIndexHolder(null,true,IndexType.HASH,true));
        }
      }
      if (f.isAnnotationPresent(Index.class)) {
        Index ann=f.getAnnotation(Index.class);
        newF.setIndex(new FieldIndexHolder(ann.name(),ann.unique(),ann.type(),false));
        newF.setNullable(false);
      }
      if (f.isAnnotationPresent(NotNull.class)) {
        newF.setNullable(false);
      }
      if (f.isAnnotationPresent(OneToOne.class)) {
        newF.setForeignKey(true);
        if (newF.getIndex() == null)         newF.setIndex(new FieldIndexHolder(null,true));
      }
      if (f.isAnnotationPresent(ManyToOne.class)) {
        newF.setForeignKey(true);
        if (newF.getIndex() == null)         newF.setIndex(new FieldIndexHolder(null,false));
      }
      newF.setRawField(f);
      fields.add(newF);
    }
  }
  return this.fields;
}