diff --git a/python/tools/recorded-call-graph-metrics/ql/BytecodeExpr.qll b/python/tools/recorded-call-graph-metrics/ql/BytecodeExpr.qll index 3ab57d6dd40..225d3cc6036 100644 --- a/python/tools/recorded-call-graph-metrics/ql/BytecodeExpr.qll +++ b/python/tools/recorded-call-graph-metrics/ql/BytecodeExpr.qll @@ -1,32 +1,27 @@ import python -abstract class XMLBytecodeExpr extends XMLElement { -} +abstract class XMLBytecodeExpr extends XMLElement { } class XMLBytecodeVariableName extends XMLBytecodeExpr { - XMLBytecodeVariableName() { this.hasName("BytecodeVariableName") } + XMLBytecodeVariableName() { this.hasName("BytecodeVariableName") } - string get_name_data() { result = this.getAChild("name").getTextValue() } + string get_name_data() { result = this.getAChild("name").getTextValue() } } class XMLBytecodeAttribute extends XMLBytecodeExpr { - XMLBytecodeAttribute() { this.hasName("BytecodeAttribute") } + XMLBytecodeAttribute() { this.hasName("BytecodeAttribute") } - string get_attr_name_data() { result = this.getAChild("attr_name").getTextValue() } + string get_attr_name_data() { result = this.getAChild("attr_name").getTextValue() } - XMLBytecodeExpr get_object_data() { - result.getParent() = this.getAChild("object") - } + XMLBytecodeExpr get_object_data() { result.getParent() = this.getAChild("object") } } class XMLBytecodeCall extends XMLBytecodeExpr { - XMLBytecodeCall() { this.hasName("BytecodeCall") } + XMLBytecodeCall() { this.hasName("BytecodeCall") } - XMLBytecodeExpr get_function_data() { - result.getParent() = this.getAChild("function") - } + XMLBytecodeExpr get_function_data() { result.getParent() = this.getAChild("function") } } class XMLBytecodeUnknown extends XMLBytecodeExpr { - XMLBytecodeUnknown() { this.hasName("BytecodeUnknown") } + XMLBytecodeUnknown() { this.hasName("BytecodeUnknown") } } diff --git a/python/tools/recorded-call-graph-metrics/ql/Metrics.ql b/python/tools/recorded-call-graph-metrics/ql/Metrics.ql index 0b49c19ec7a..c09c82f8924 100644 --- a/python/tools/recorded-call-graph-metrics/ql/Metrics.ql +++ b/python/tools/recorded-call-graph-metrics/ql/Metrics.ql @@ -1,6 +1,5 @@ import RecordedCalls - from string text, float number, float ratio, int i where exists(int all_rcs | all_rcs = count(XMLRecordedCall rc) and ratio = number / all_rcs | diff --git a/python/tools/recorded-call-graph-metrics/ql/UnidentifiedRecordedCalls.ql b/python/tools/recorded-call-graph-metrics/ql/UnidentifiedRecordedCalls.ql index 80d46aa8586..ca0f4d64ff1 100644 --- a/python/tools/recorded-call-graph-metrics/ql/UnidentifiedRecordedCalls.ql +++ b/python/tools/recorded-call-graph-metrics/ql/UnidentifiedRecordedCalls.ql @@ -2,4 +2,5 @@ import RecordedCalls from UnidentifiedRecordedCall rc, XMLCall xml_call select "Could not uniquely identify this recorded call (either call or callee was not uniquely identified)", - rc, rc.getXMLCall().get_filename_data(), rc.getXMLCall().get_linenum_data(), rc.getXMLCall().get_inst_index_data() + rc, rc.getXMLCall().get_filename_data(), rc.getXMLCall().get_linenum_data(), + rc.getXMLCall().get_inst_index_data()