What happen when 2 transactions with one doublespending the other reachs the same block? Let’s have 2 transactions. The second one is duplicating Input of the first one.
Both have very high fees so they are selected by miner to be included in the same block but before passing validation (because it makes no sense to validate transactions if they aren’t included in the block after because the fee is too low).

Which is the transaction is going to be rejected by not being included in the block ? The first one with a slightly lower fee than the second or as it’s the same block, the second one ?

And where is the code in Bitcoin core handling this ? I mean which source files and lines ?
Which is the transaction is going to be rejected ? The first one with a slightly lower fee than the second or as it’s the same block, the second one ?


Generally speaking, miners will choose the transaction that has the highest fee, but they are not obliged to.  In fact they don't need to mine any of your transactions if they don't want to.


  Both have very high fees so they are selected by miner to be included in the same block.


No, the miner must choose 1 or zero not both, otherwise the block they create will be invalid if it contains a double-spend.  Invalid blocks will waste the miners time and money as they will be rejected by the network.


  And where is the code in Bitcoin core handling this ?


Sorry, can't help with specific location.