machineIdForMasterClient = masterId;
<BUG>masterClient = new MasterClient( host, getHaServerPort( masterId ) );
}</BUG>
return masterClient;
}
<BUG>private int getHaServerPort( int machineId )
</BUG>
{
<BUG>String host = haServers.get( getMyMachineId() );
return Integer.parseInt( host.substring( host.indexOf( ":" ) + 1 ) );
</BUG>
}

machineIdForMasterClient = masterId;
Pair<String, Integer> host = getHaServer( masterId );
masterClient = new MasterClient( host.first(), host.other() );
}
return masterClient;
}
private Pair<String, Integer> getHaServer( int machineId )
{
String host = haServers.get( getMyMachineId() );
int pos = host.indexOf( ":" );
return new Pair<String, Integer>( host.substring( 0, pos ),
Integer.parseInt( host.substring( pos + 1 ) ) );
}
