Buggy code:
@ Data @ EqualsAndHashCode ( callSuper = false ) @ NoArgsConstructor public class ContextActivities extends JSONBase { private List < Activity > parent ; private List < Activity > grouping ; private List < Activity > other ; private List < Activity > category ; public ContextActivities ( JsonNode jsonNode ) throws URISyntaxException { } @ Override public ObjectNode toJSONNode ( TCAPIVersion version ) { ObjectMapper mapper = Mapper . getInstance ( ) ; ObjectNode node = mapper . createObjectNode ( ) ; if ( ( ( this . parent ) != null ) && ( ( this . parent . size ( ) ) > 0 ) ) { if ( ( version . equals ( V095 ) ) && ( ( this . getParent ( ) . size ( ) ) > 1 ) ) { throw new com . rusticisoftware . tincan . exceptions . IncompatibleTCAPIVersion ( ( ( "Version<seq2seq4repair_space>" + ( V095 . toString ( ) ) ) + "<seq2seq4repair_space>doesn't<seq2seq4repair_space>support<seq2seq4repair_space>lists<seq2seq4repair_space>of<seq2seq4repair_space>activities<seq2seq4repair_space>(parent)" ) ) ; } if ( version . equals ( V095 ) ) { node . put ( "parent" , this . getParent ( ) . get ( 0 ) . toJSONNode ( version ) ) ; } else { ArrayNode parent = mapper . createArrayNode ( ) ; node . put ( "parent" , parent ) ; for ( Activity element : this . getParent ( ) ) { parent . add ( element . toJSONNode ( version ) ) ; } } } if ( ( ( this . grouping ) != null ) && ( ( this . grouping . size ( ) ) > 0 ) ) { if ( ( version . equals ( V095 ) ) && ( ( this . getGrouping ( ) . size ( ) ) > 1 ) ) { throw new com . rusticisoftware . tincan . exceptions . IncompatibleTCAPIVersion ( ( ( "Version<seq2seq4repair_space>" + ( V095 . toString ( ) ) ) + "<seq2seq4repair_space>doesn't<seq2seq4repair_space>support<seq2seq4repair_space>lists<seq2seq4repair_space>of<seq2seq4repair_space>activities<seq2seq4repair_space>(grouping)" ) ) ; } if ( version . equals ( V095 ) ) { node . put ( "grouping" , this . getGrouping ( ) . get ( 0 ) . toJSONNode ( version ) ) ; } else { ArrayNode grouping = mapper . createArrayNode ( ) ; node . put ( "grouping" , grouping ) ; for ( Activity element : this . getGrouping ( ) ) { grouping . add ( element . toJSONNode ( version ) ) ; } } } if ( ( ( this . other ) != null ) && ( ( this . other . size ( ) ) > 0 ) ) { if ( ( version . equals ( V095 ) ) && ( ( this . getOther ( ) . size ( ) ) > 1 ) ) { throw new com . rusticisoftware . tincan . exceptions . IncompatibleTCAPIVersion ( ( ( "Version<seq2seq4repair_space>" + ( V095 . toString ( ) ) ) + "<seq2seq4repair_space>doesn't<seq2seq4repair_space>support<seq2seq4repair_space>lists<seq2seq4repair_space>of<seq2seq4repair_space>activities<seq2seq4repair_space>(other)" ) ) ; } if ( version . equals ( V095 ) ) { node . put ( "other" , this . getGrouping ( ) . get ( 0 ) . toJSONNode ( version ) ) ; } else { ArrayNode other = mapper . createArrayNode ( ) ; node . put ( "other" , other ) ; for ( Activity element : this . getOther ( ) ) { other . add ( element . toJSONNode ( version ) ) ; } } } if ( ( ( this . category ) != null ) && ( ( this . category . size ( ) ) > 0 ) ) { <START_BUG> if ( ( version . ordinal ( ) ) <= ( V100 . ordinal ( ) ) ) { <END_BUG> ArrayNode category = mapper . createArrayNode ( ) ; node . put ( "category" , category ) ; for ( Activity element : this . getCategory ( ) ) { category . add ( element . toJSONNode ( version ) ) ; } } } return node ; } }

Fix:
if ( ( version . ordinal ( ) ) >= ( V100 . ordinal ( ) ) ) {