Buggy code:
public class League { private String leagueName ; private int rounds ; private ArrayList < Team > teams ; private String gameName ; private String chosenTeam ; private ArrayList < String > offersMade = new ArrayList < String > ( ) ; private String lastResult ; private ArrayList < Update > LastResultDetailed = new ArrayList < Update > ( ) ; public League ( String name , int rounds , String gameName , String chosenTeam ) { } public void add ( Team team ) { } public Team getByName ( String teamname ) { } public Team getTeamByName ( String name ) { } public static void setCustomLineUp ( Team team , String [ ] players ) { } public static League readResources ( String fileName ) { } public Round nextRound ( String fileName , int ronde ) { try { int roundNr = 0 ; DocumentBuilderFactory dbf = DocumentBuilderFactory . newInstance ( ) ; DocumentBuilder db = dbf . newDocumentBuilder ( ) ; Document doc = db . parse ( new File ( fileName ) ) ; doc . getDocumentElement ( ) . normalize ( ) ; NodeList roundsList = doc . getElementsByTagName ( "round" ) ; NodeList matchList = doc . getElementsByTagName ( "fixture" ) ; Node rNode ; ArrayList < Round > rondes = new ArrayList < Round > ( ) ; Round r ; int c = 0 ; String at = "" ; String ht = "" ; Element rElement ; Node fNode ; Element fElement ; for ( int i = 0 ; i < ( roundsList . getLength ( ) ) ; i ++ ) { rNode = roundsList . item ( i ) ; rElement = ( ( Element ) ( rNode ) ) ; roundNr = Integer . parseInt ( rElement . getElementsByTagName ( "id" ) . item ( 0 ) . getTextContent ( ) ) ; r = new Round ( ) ; for ( int m = c ; m < ( c + 10 ) ; m ++ ) { fNode = matchList . item ( m ) ; fElement = ( ( Element ) ( fNode ) ) ; ht = fElement . getElementsByTagName ( "homeTeam" ) . item ( 0 ) . getTextContent ( ) ; at = fElement . getElementsByTagName ( "awayTeam" ) . item ( 0 ) . getTextContent ( ) ; Match ma = new Match ( this . getByName ( ht ) , this . getByName ( at ) ) ; r . addMatch ( ma ) ; } c += 10 ; rondes . add ( r ) ; } System . out . println ( ( "League<seq2seq4repair_space>round<seq2seq4repair_space>method,<seq2seq4repair_space>ronde:<seq2seq4repair_space>" + ronde ) ) ; <START_BUG> ronde = 39 - ronde ; <END_BUG> System . out . println ( ( "League<seq2seq4repair_space>round<seq2seq4repair_space>method,<seq2seq4repair_space>real<seq2seq4repair_space>ronde:<seq2seq4repair_space>" + ronde ) ) ; return rondes . get ( ronde ) ; } catch ( SAXException ex ) { Logger . getLogger ( League . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } catch ( IOException ex ) { Logger . getLogger ( League . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } catch ( ParserConfigurationException ex ) { Logger . getLogger ( League . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } return new Round ( ) ; } public String toString ( ) { } public String getLeagueName ( ) { } public void setLeagueName ( String leaguename ) { } public int getRounds ( ) { } public void setRounds ( int rounds ) { } public ArrayList < Team > getTeams ( ) { } public void setTeams ( ArrayList < Team > teams ) { } public String getGameName ( ) { } public void setGameName ( String gameName ) { } public String getChosenTeam ( ) { } public void setChosenTeam ( String chosenTeam ) { } public ArrayList < String > getOffersMade ( ) { } public void setOffersmade ( ArrayList < String > s ) { } public void addOffersMade ( String offerFormat ) { } public void writeToXML ( String filePath ) { } public static boolean acceptOffer ( int bod , Player x ) { } public static boolean acceptOffer2 ( int bod , Player x ) { } public String generateOffer ( ) { } public Team chosenTeam ( ) { } public Team getTeamByString ( String s ) { } public boolean Transfer ( String soortTransactie , String offerFormat ) { } public boolean TransferOffer ( String soortTransactie , String offerFormat ) { } public void processResult ( Team t1 , Team t2 , int h , int a ) { } public void addToLastResultDetailed ( Update u ) { } public String getLastResult ( ) { } public void setLastResult ( String lastResult ) { } public ArrayList < Update > getLastResultDetailed ( ) { } public void setLastResultDetailed ( ArrayList < Update > LastResultDetailed ) { } }

Fix:
ronde = 38 - ronde ;