Program: 18445
Project: 18445
Buggy source:
/** 
 * Need to be almost exactly as <code>bindClassPropertyIdMapping</code>.
 */
private void bindClassPropertyMapping(SearchableProperty searchableProp,ClassPropertyMapping classPropertyMapping,AnnotatedElement annotatedElement,Class<?> clazz,Type type) throws MappingException {
  bindConverter(classPropertyMapping,searchableProp.propertyConverter());
  if (!searchableProp.type().equals(Object.class)) {
    classPropertyMapping.setClassName(searchableProp.type().getName());
  }
 else {
    classPropertyMapping.setClassName(AnnotationsBindingUtils.getCollectionParameterClassName(clazz,type));
  }
  if (StringUtils.hasLength(searchableProp.converter())) {
    classPropertyMapping.setManagedIdConverterName(searchableProp.converter());
  }
 else {
    classPropertyMapping.setManagedIdConverter(getConverter(clazz,type));
  }
  classPropertyMapping.setBoost(searchableProp.boost());
  classPropertyMapping.setManagedId(AnnotationsBindingUtils.convert(searchableProp.managedId()));
  classPropertyMapping.setManagedIdIndex(AnnotationsBindingUtils.convert(searchableProp.managedIdIndex()));
  classPropertyMapping.setOverrideByName(searchableProp.override());
  SearchableMetaData metaData=annotatedElement.getAnnotation(SearchableMetaData.class);
  SearchableMetaDatas metaDatas=annotatedElement.getAnnotation(SearchableMetaDatas.class);
  boolean hasMetaDataAnnotations=metaData != null || metaDatas != null;
  if (StringUtils.hasLength(searchableProp.name()) || !hasMetaDataAnnotations) {
    ClassPropertyMetaDataMapping mdMapping=new ClassPropertyMetaDataMapping();
    String name=searchableProp.name();
    if (!StringUtils.hasLength(name)) {
      name=classPropertyMapping.getName();
    }
    mdMapping.setName(valueLookup.lookupMetaDataName(name));
    mdMapping.setPath(new StaticPropertyPath(mdMapping.getName()));
    mdMapping.setBoost(classPropertyMapping.getBoost());
    bindConverter(mdMapping,searchableProp.converter(),clazz,type);
    mdMapping.setAccessor(classPropertyMapping.getAccessor());
    mdMapping.setObjClass(classPropertyMapping.getObjClass());
    mdMapping.setPropertyName(classPropertyMapping.getPropertyName());
    mdMapping.setStore(AnnotationsBindingUtils.convert(searchableProp.store()));
    mdMapping.setIndex(AnnotationsBindingUtils.convert(searchableProp.index()));
    mdMapping.setTermVector(AnnotationsBindingUtils.convert(searchableProp.termVector()));
    mdMapping.setReverse(AnnotationsBindingUtils.convert(searchableProp.reverse()));
    handleFormat(mdMapping,name,searchableProp.format());
    mdMapping.setInternal(false);
    if (StringUtils.hasLength(searchableProp.analyzer())) {
      mdMapping.setAnalyzer(searchableProp.analyzer());
    }
    mdMapping.setExcludeFromAll(searchableProp.excludeFromAll());
    classPropertyMapping.addMapping(mdMapping);
  }
  if (metaData != null) {
    bindMetaData(metaData,classPropertyMapping,clazz,type);
  }
  if (metaDatas != null) {
    for (    SearchableMetaData searchableMetaData : metaDatas.value()) {
      bindMetaData(searchableMetaData,classPropertyMapping,clazz,type);
    }
  }
}

Fixed version (ground truth):
/** 
 * Need to be almost exactly as <code>bindClassPropertyIdMapping</code>.
 */
private void bindClassPropertyMapping(SearchableProperty searchableProp,ClassPropertyMapping classPropertyMapping,AnnotatedElement annotatedElement,Class<?> clazz,Type type) throws MappingException {
  bindConverter(classPropertyMapping,searchableProp.propertyConverter());
  if (!searchableProp.type().equals(Object.class)) {
    classPropertyMapping.setClassName(searchableProp.type().getName());
  }
 else {
    classPropertyMapping.setClassName(AnnotationsBindingUtils.getCollectionParameterClassName(clazz,type));
  }
  if (StringUtils.hasLength(searchableProp.converter())) {
    classPropertyMapping.setManagedIdConverterName(searchableProp.converter());
  }
 else {
    classPropertyMapping.setManagedIdConverter(getConverter(clazz,type));
  }
  classPropertyMapping.setBoost(searchableProp.boost());
  classPropertyMapping.setManagedId(AnnotationsBindingUtils.convert(searchableProp.managedId()));
  classPropertyMapping.setManagedIdIndex(AnnotationsBindingUtils.convert(searchableProp.managedIdIndex()));
  classPropertyMapping.setOverrideByName(searchableProp.override());
  SearchableMetaData metaData=annotatedElement.getAnnotation(SearchableMetaData.class);
  SearchableMetaDatas metaDatas=annotatedElement.getAnnotation(SearchableMetaDatas.class);
  boolean hasMetaDataAnnotations=metaData != null || metaDatas != null;
  if (StringUtils.hasLength(searchableProp.name()) || !hasMetaDataAnnotations) {
    ClassPropertyMetaDataMapping mdMapping=new ClassPropertyMetaDataMapping();
    String name=searchableProp.name();
    if (!StringUtils.hasLength(name)) {
      name=classPropertyMapping.getName();
    }
    mdMapping.setName(valueLookup.lookupMetaDataName(name));
    mdMapping.setPath(new StaticPropertyPath(mdMapping.getName()));
    mdMapping.setBoost(classPropertyMapping.getBoost());
    bindConverter(mdMapping,searchableProp.converter(),clazz,type);
    mdMapping.setAccessor(classPropertyMapping.getAccessor());
    mdMapping.setPropertyName(classPropertyMapping.getPropertyName());
    mdMapping.setStore(AnnotationsBindingUtils.convert(searchableProp.store()));
    mdMapping.setIndex(AnnotationsBindingUtils.convert(searchableProp.index()));
    mdMapping.setTermVector(AnnotationsBindingUtils.convert(searchableProp.termVector()));
    mdMapping.setReverse(AnnotationsBindingUtils.convert(searchableProp.reverse()));
    handleFormat(mdMapping,name,searchableProp.format());
    mdMapping.setInternal(false);
    if (StringUtils.hasLength(searchableProp.analyzer())) {
      mdMapping.setAnalyzer(searchableProp.analyzer());
    }
    mdMapping.setExcludeFromAll(searchableProp.excludeFromAll());
    classPropertyMapping.addMapping(mdMapping);
  }
  if (metaData != null) {
    bindMetaData(metaData,classPropertyMapping,clazz,type);
  }
  if (metaDatas != null) {
    for (    SearchableMetaData searchableMetaData : metaDatas.value()) {
      bindMetaData(searchableMetaData,classPropertyMapping,clazz,type);
    }
  }
}