1. A computerized apparatus for detecting an optimization opportunity in a concurrent computer program, the computerized apparatus having a processor, the computerized apparatus comprising: a trace analyzer configured to analyze a trace of an execution of the concurrent computer program to determine the optimization opportunity, said trace analyzer comprising: a critical section identifier configured to identify an execution of a critical section of the concurrent computer program; a data access identifier configured to identify an access to a data object during the execution of the critical section and a thread identifier of a thread performing the data access; a temporally-adjacent accesses identifier configured to determine whether two data accesses are temporally-adjacent to each other; a relation determination module configured to determine a relation between a first data object and a second data object based on temporally-adjacent accesses identified by said data access identifier and said temporally-adjacent accesses identifier.