Buggy code:
@ SuppressWarnings ( "unchecked" ) public class OrientEdge extends OrientElement implements Edge { private static final long serialVersionUID = 1L ; protected OIdentifiable vOut ; protected OIdentifiable vIn ; protected String label ; public OrientEdge ( ) { } protected OrientEdge ( final OrientBaseGraph rawGraph , final OIdentifiable rawEdge ) { } protected OrientEdge ( final OrientBaseGraph rawGraph , final OIdentifiable rawEdge , String iLabel ) { } protected OrientEdge ( final OrientBaseGraph rawGraph , final String iLabel , final Object ... fields ) { } protected OrientEdge ( final OrientBaseGraph rawGraph , final OIdentifiable out , final OIdentifiable in ) { } protected OrientEdge ( final OrientBaseGraph rawGraph , final OIdentifiable out , final OIdentifiable in , final String iLabel ) { } public static OIdentifiable getConnection ( final ODocument iEdgeRecord , final Direction iDirection ) { } public static boolean isLabeled ( final String iEdgeLabel , final String [ ] iLabels ) { } public static String getRecordLabel ( final OIdentifiable iEdge ) { } private static void removeLightweightConnection ( final ODocument iVertex , final String iFieldName , final OIdentifiable iVertexToRemove ) { } public OrientEdgeType getType ( ) { } @ Override public OrientVertex getVertex ( final Direction direction ) { } public OIdentifiable getOutVertex ( ) { } public OIdentifiable getInVertex ( ) { } @ Override public String getLabel ( ) { if ( ( label ) != null ) <START_BUG> return label ; <END_BUG> else if ( ( rawElement ) != null ) { if ( ( ( settings ) != null ) && ( settings . isUseClassForEdgeLabel ( ) ) ) { final String clsName = getRecord ( ) . getClassName ( ) ; if ( ( ! ( CLASS_NAME . equals ( clsName ) ) ) && ( ! ( "OGraphEdge" . equals ( clsName ) ) ) ) return OrientBaseGraph . decodeClassName ( clsName ) ; } setCurrentGraphInThreadLocal ( ) ; final ODocument doc = rawElement . getRecord ( ) ; if ( doc == null ) return null ; final String label = doc . field ( LABEL_FIELD_NAME ) ; if ( label != null ) return OrientBaseGraph . decodeClassName ( label ) ; } return null ; } @ Override public boolean equals ( final Object object ) { } @ Override public Object getId ( ) { } @ Override public < T > T getProperty ( final String key ) { } public boolean isLightweight ( ) { } @ Override public Set < String > getPropertyKeys ( ) { } @ Override public void setProperty ( final String key , final Object value ) { } @ Override public < T > T removeProperty ( String key ) { } @ Override public void remove ( ) { } public final String getBaseClassName ( ) { } @ Override public String getElementType ( ) { } public String toString ( ) { } @ Override public ODocument getRecord ( ) { } public void convertToDocument ( ) { } public String getClassName ( final String iLabel ) { } @ Override public void writeExternal ( final ObjectOutput out ) throws IOException { } @ Override public void readExternal ( final ObjectInput in ) throws IOException , ClassNotFoundException { } protected boolean isLabeled ( final String [ ] iLabels ) { } protected ODocument createDocument ( final String iLabel ) { } protected boolean dropEdgeFromVertex ( final OIdentifiable iEdge , final ODocument iVertex , final String iFieldName , final Object iFieldValue ) { } }

Fix:
return OrientBaseGraph . decodeClassName ( label ) ;