You need to do some "homework" and understand that large integrated oil companies like XOM and CVX have both "upstream" ( crude production ) and "downstream" ( refining ) operations.

High crude prices obviously have significantly cut into XOM's "downstream" operations to the tune of -54% from a year ago levels because they do not produce all of the crude that they need to refine for their retail outlets. They have to pay the "market" rate for crude that they process into gasoline for all of their retail stations.

For example, due to the high price of crude, Chevron (CVX) lost $680 million in their U.S. downstream operations for Q2 when crude prices rose $38 per barrel vs breaking even during Q1 when crude only gained $6 per barrel for the quarter.

On the other side of the coin, you have to understand that XOM is drilling in Russia and Venezuela and is involved in revenue-sharing agreements with those countries. Invariably ( and this is what surprised analysts in the latest reporting period ) the higher the price that crude trades at, the less the share in the revenue stream with the Country they are partnered with.

Thus, analysts knew that XOM and CVX would be getting killed this past quarter on the "downstream" refining side of the equation, but were a bit surprised at not meeting estimates on the "upstream" portion; with revenues not as high as expected due to the profit-sharing agreements, along with some lower production volumes.

You need to have a much greater understanding of what makes an integrated oil company "tick", let alone trying to take a "commodity" based company and compare it to others in so far as earnings/stock price performance are concerned.

In other words, you are mistakenly trying to compare "apples" and "oranges" in a most convoluted fashion, without any basic understanding of where earnings come from at an integrated oil company.