Thanks for helping out.

I'm just an amateur programmer, so you'll have to forgive if these are half-assed questions!
Just above the part where I set those two ints, I have two ifs that must be true for the code to proceed:
Code:
if(!GC.getBuildingInfo((BuildingTypes)iI).isRequiredInputBonus((BonusTypes)iJ))
{
continue;
}
if(!GC.getBuildingInfo((BuildingTypes)iI).isAndRequiredInputBonus((BonusTypes)iJ))
{
continue;
}
Is this what you meant? I guess I don't fully understand how looping works... but it seems to me you're saying that iJ is only one loop. Would iK be a second loop (over the same resources, basically)?
I'm just a professional programmer, so I sometimes forget that what is obvious to me may not be obvious to others. I also sometimes gloss over things that are important because they are so obvious to me. I also tend use the term "resources" when in the code they are called "bonuses".
The problem is that it is checking the same bonus in both statements. You will only get to run the rest of the statements after this in the loop if neither of the two
continue statements happens. That is, it will only run the rest if one specific bonus causes both isRequiredInputBonus() and isAndRequiredInputBonus() to return true. If that doesn't happen it will hit a
continue and go back to the start of the loop, increment iJ to the next value, and try again.
How often do you list the same bonus for both of those in the XML for one building? Hopefully never.
You need to check each of the two (the regular required bonus and the "and" required bonus) individually to find out what they are. This is done most easily via two separate loops over the bonus types, although you can do it in one. Then proceed with the checks to see if the city has access to the two required bonus types. Alternatively you can also merge the check to see if the city has the required bonus with the check to see if the bonus is required, then you can store a true/false value for each of the two (which is what I was previously suggesting). Then, in either case, if the building has everything it needs you do what the rest of the loop was doing (I didn't look at the rest - it may require some tweaks there too).
This may not be incredibly clear either...
As an aside, this could be made to use half as much memory if the "and" required bonus was stored in the list that already exists for the reqular one - two bonuses would be set to true in the one list, instead of two lists that have one set to true in each. It isn't any more difficult to program the checks, although you can't program it to bail out of the loop once you've found the requirement(s) unless you also store a count. This is the advantage to using an XML tag that can takes multiple sub-tags instead of two separate top-level (inside the building definition) tags, like the "BuildingClassNeededs" or "ProductionTraits" type tags. Doing this would probably break the existing XML file entries, though.