Context

Race Conditions are bad because...

Idea

There are some heuristics...

Analysis

With jQAssistant, race conditions can be identified by...


In [1]:
import pandas as pd
import py2neo

graph = py2neo.Graph()

query="""
// Race Conditions
MATCH (c:Class)-[:DECLARES]->(f:Field)<-[w:WRITES]-(m:Method)
WHERE 
    EXISTS(f.static) AND NOT EXISTS(f.final)
RETURN 
    c.name as InClass, 
    m.name as theMethod, 
    w.lineNumber as writesInLine, 
    f.name as toStaticField
"""

pd.DataFrame(graph.data(query))


Out[1]:
InClass theMethod toStaticField writesInLine
0 BrokenSingleton getInstance INSTANCE 11
1 OwnerController processFindForm ownersIndexes 110
2 OwnerController processFindForm ownersIndexes 110

Conclusion

Next steps are to remove...