Buggy code:
public OClass getSuperClass ( ) { } public OClass setSuperClass ( final OClass superClass ) { } void setSuperClassInternal ( final OClass superClass ) { } public String getName ( ) { } public OClass setName ( final String name ) { } public long getSize ( ) { } public String getShortName ( ) { } public OClass setShortName ( String shortName ) { } public String getStreamableName ( ) { } public Collection < OProperty > declaredProperties ( ) { } public Map < String , OProperty > propertiesMap ( ) { } public Collection < OProperty > properties ( ) { } public Collection < OProperty > getIndexedProperties ( ) { } public OProperty getProperty ( String propertyName ) { } public OProperty createProperty ( final String iPropertyName , final OType iType ) { } public OProperty createProperty ( final String iPropertyName , final OType iType , final OClass iLinkedClass ) { } public OProperty createProperty ( final String iPropertyName , final OType iType , final OType iLinkedType ) { } public boolean existsProperty ( String propertyName ) { } public void dropProperty ( final String propertyName ) { } @ Override public void fromStream ( ) { } @ Override @ OBeforeSerialization public ODocument toStream ( ) { } public Class < ? > getJavaClass ( ) { } @ Override public int getClusterForNewInstance ( final ODocument doc ) { } public int getDefaultClusterId ( ) { } public void setDefaultClusterId ( final int defaultClusterId ) { } public int [ ] getClusterIds ( ) { } public int [ ] getPolymorphicClusterIds ( ) { } private void setPolymorphicClusterIds ( final int [ ] iClusterIds ) { } public void renameProperty ( final String iOldName , final String iNewName ) { } public OClass addClusterId ( final int clusterId ) { } @ Override public OClass addCluster ( final String clusterNameOrId ) { } public OClass removeClusterId ( final int clusterId ) { } public Collection < OClass > getBaseClasses ( ) { } public Collection < OClass > getAllBaseClasses ( ) { } OClass removeBaseClassInternal ( final OClass baseClass ) { } public float getOverSize ( ) { } public OClass setOverSize ( final float overSize ) { } @ Override public float getClassOverSize ( ) { } public boolean isAbstract ( ) { } public OClass setAbstract ( boolean isAbstract ) { } public boolean isStrictMode ( ) { } public OClass setStrictMode ( final boolean isStrict ) { } @ Override public String toString ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } public int compareTo ( final OClass o ) { } public long count ( ) { } public long count ( final boolean isPolymorphic ) { } public void truncate ( ) throws IOException { } public boolean isSubClassOf ( final String iClassName ) { } public boolean isSubClassOf ( final OClass clazz ) { } public boolean isSuperClassOf ( final OClass clazz ) { } public Object get ( final ATTRIBUTES iAttribute ) { } public OClass set ( final ATTRIBUTES attribute , final Object iValue ) { } public OPropertyImpl addPropertyInternal ( final String name , final OType type , final OType linkedType , final OClass linkedClass ) { if ( ( name == null ) || ( ( name . length ( ) ) == 0 ) ) throw new OSchemaException ( "Found<seq2seq4repair_space>property<seq2seq4repair_space>name<seq2seq4repair_space>null" ) ; <START_BUG> final Character wrongCharacter = OSchemaShared . checkNameIfValid ( name ) ; <END_BUG> if ( wrongCharacter != null ) throw new OSchemaException ( ( ( "Invalid<seq2seq4repair_space>property<seq2seq4repair_space>name<seq2seq4repair_space>found.<seq2seq4repair_space>Character<seq2seq4repair_space>'" + wrongCharacter ) + "'<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>in<seq2seq4repair_space>property<seq2seq4repair_space>name" ) ) ; final String lowerName = name . toLowerCase ( ) ; acquireSchemaWriteLock ( ) ; try { checkEmbedded ( ) ; if ( properties . containsKey ( lowerName ) ) throw new OSchemaException ( ( ( ( ( "Class<seq2seq4repair_space>" + ( this . name ) ) + "<seq2seq4repair_space>already<seq2seq4repair_space>has<seq2seq4repair_space>property<seq2seq4repair_space>'" ) + name ) + "'" ) ) ; OGlobalProperty global = owner . findOrCreateGlobalProperty ( name , type ) ; final OPropertyImpl prop = new OPropertyImpl ( this , global ) ; properties . put ( lowerName , prop ) ; if ( linkedType != null ) prop . setLinkedTypeInternal ( linkedType ) ; else if ( linkedClass != null ) prop . setLinkedClassInternal ( linkedClass ) ; return prop ; } finally { releaseSchemaWriteLock ( ) ; } } public OIndex < ? > createIndex ( final String iName , final INDEX_TYPE iType , final String ... fields ) { } public OIndex < ? > createIndex ( final String iName , final String iType , final String ... fields ) { } public OIndex < ? > createIndex ( final String iName , final INDEX_TYPE iType , final OProgressListener iProgressListener , final String ... fields ) { } public OIndex < ? > createIndex ( String iName , String iType , OProgressListener iProgressListener , ODocument metadata , String ... fields ) { } public OIndex < ? > createIndex ( final String name , String type , final OProgressListener progressListener , ODocument metadata , String algorithm , final String ... fields ) { } public boolean areIndexed ( final String ... fields ) { } public boolean areIndexed ( final Collection < String > fields ) { } public Set < OIndex < ? > > getInvolvedIndexes ( final String ... fields ) { } public Set < OIndex < ? > > getInvolvedIndexes ( final Collection < String > fields ) { } public Set < OIndex < ? > > getClassInvolvedIndexes ( final Collection < String > fields ) { } public Set < OIndex < ? > > getClassInvolvedIndexes ( final String ... fields ) { } public OIndex < ? > getClassIndex ( final String name ) { } public Set < OIndex < ? > > getClassIndexes ( ) { }

Fix:
final Character wrongCharacter = OSchemaShared . checkFieldNameIfValid ( name ) ;