Buggy code:
@ XmlRootElement ( name = "processor-config" ) @ XmlAccessorType ( XmlAccessType . FIELD ) public class ProcessorConfig { @ XmlElement Properties properties ; @ XmlTransient SeatAllocationMethod method ; @ XmlAttribute ( name = "method" ) String methodName ; @ XmlElement Tally tally ; @ XmlElementWrapper ( name = "tally-filters" ) @ XmlAnyElement List < TallyFilter > filters ; @ XmlElementWrapper ( name = "result-decorators" ) @ XmlAnyElement List < ResultDecorator > decorators ; static JAXBContext jc ; static Marshaller marshaller ; static Unmarshaller unmarshaller ; @ XmlTransient private TieBreaker tieBreaker ; @ XmlAttribute ( name = "tie-breaker" ) String tieBreakerName ; public ProcessorConfig ( ) { } public void resolveReferences ( SeatAllocatorResolver resolver ) throws SeatAllocationException { } public Tally getTally ( ) { } public void setTally ( Tally tally ) { } public boolean addTallyFilter ( TallyFilter filter ) { } public List < TallyFilter > getTallyFilters ( ) { } public boolean removeTallyFilter ( TallyFilter filter ) { } public boolean addResultDecorator ( ResultDecorator decorator ) { } public List < ResultDecorator > getResultDecorator ( ) { } public boolean removeResultDecorator ( ResultDecorator decorator ) { } public TieBreaker getTieBreaker ( ) { } public void setTieBreaker ( TieBreaker tieBreaker ) { } public void setTieBreakerName ( String tieBreak ) { } public void setProperty ( String key , String value ) { } public String getProperty ( String key ) { } public Properties getProperties ( ) { } public void setMethod ( SeatAllocationMethod method ) { } public SeatAllocationMethod getMethod ( ) { } public String getMethodName ( ) { } public void setMethodName ( String methodName ) { } public void reset ( ) { } public void toXML ( OutputStream out ) throws JAXBException { } public static ProcessorConfig fromXML ( InputStream is ) throws JAXBException { } @ Override public String toString ( ) { StringBuilder str = new StringBuilder ( "ProcessorConfig:\n" ) ; str . append ( "\tMethod:<seq2seq4repair_space>" ) ; str . append ( method . toString ( ) ) ; str . append ( "\n" ) ; str . append ( "\tTally<seq2seq4repair_space>(effective:<seq2seq4repair_space>" ) ; str . append ( tally . getEffectiveVotes ( ) ) ; str . append ( ",<seq2seq4repair_space>potential:<seq2seq4repair_space>" ) ; str . append ( tally . getPotentialVotes ( ) ) ; str . append ( "):\n" ) ; for ( Candidate candidate : tally . getCandidates ( ) ) { str . append ( "\t\t" ) ; str . append ( candidate . toString ( ) ) ; str . append ( "\n" ) ; } str . append ( "\tTie<seq2seq4repair_space>breaker:<seq2seq4repair_space>" ) ; <START_BUG> str . append ( tieBreaker . getName ( ) ) ; <END_BUG> str . append ( "\n" ) ; Iterator < Object > i = properties . keySet ( ) . iterator ( ) ; str . append ( "\tProperties:\n" ) ; if ( i . hasNext ( ) ) while ( i . hasNext ( ) ) { Object k = i . next ( ) ; str . append ( "\t\t" ) ; str . append ( k ) ; str . append ( "<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; str . append ( properties . getProperty ( ( ( String ) ( k ) ) ) ) ; str . append ( "\n" ) ; } else str . append ( "\t\tnone\n" ) ; str . append ( "\tTally<seq2seq4repair_space>filters:\n" ) ; if ( ( filters . size ( ) ) > 0 ) for ( TallyFilter filter : filters ) { str . append ( "\t\t" ) ; str . append ( filter ) ; str . append ( "\n" ) ; } else str . append ( "\t\tnone\n" ) ; str . append ( "\tResult<seq2seq4repair_space>decorators:\n" ) ; if ( ( decorators . size ( ) ) > 0 ) for ( ResultDecorator decorator : decorators ) { str . append ( "\t\t" ) ; str . append ( decorator ) ; str . append ( "\n" ) ; } else str . append ( "\t\tnone\n" ) ; return str . toString ( ) ; } }

Fix:
str . append ( ( ( tieBreaker ) == null ? "none" : tieBreaker . getName ( ) ) ) ;