Race Conditions Demo

repos/buschmais-spring-petclinic_fail -> starten mit mvn jqassistant:server


In [3]:
import pandas as pd
import py2neo
graph = py2neo.Graph()

In [4]:
query="""
MATCH (c:Class)-[:DECLARES]->(f:Field)<-[:WRITES]-(m:Method)
WHERE f.static = true AND NOT HAS(f.final)
RETURN c.name, f.name, m.name
"""
pd.DataFrame(graph.data(query))


Out[4]:
c.name f.name m.name
0 OwnerController ownersCounter processFindForm
1 OwnerController ownersCounter processFindForm

In [5]:
query="""
MATCH (s:Subdomain)<-[:BELONGS_TO]-(c:Class)-[:DECLARES]->(f:Field)<-[w:WRITES]-(m:Method)
WHERE f.static = true AND NOT HAS(f.final)
RETURN s.name, c.name, f.name, w.lineNumber, m.name
"""
pd.DataFrame(graph.data(query))


Out[5]:
c.name f.name m.name s.name w.lineNumber
0 OwnerController ownersCounter processFindForm Owner 112
1 OwnerController ownersCounter processFindForm Owner 109

andere Abfragen


In [10]:
query="""
MATCH (e:Entity)<-[:CONTAINS]-(p:Package)
WHERE p.name <> "model"
RETURN e.name, p.name
"""
pd.DataFrame(graph.data(query))


Out[10]:
e.name p.name
0 Vet repository