CodeQL for Java¶
Experiment and learn how to write effective and efficient queries for CodeQL databases generated from Java codebases.
实验并学习如何为由Java代码库生成的CodeQL数据库编写有效和高效的查询。
-
Basic query for Java code: Learn to write and run a simple CodeQL query using LGTM.
Java代码的基本查询。学习使用LGTM编写和运行一个简单的CodeQL查询。
-
CodeQL library for Java: When analyzing Java code, you can use the large collection of classes in the CodeQL library for Java.
Java的CodeQL库。当分析Java代码时,你可以使用CodeQL库中的大量类集合来分析Java代码。
-
Analyzing data flow in Java: You can use CodeQL to track the flow of data through a Java program to its use.
分析Java中的数据流。你可以使用CodeQL来跟踪数据通过Java程序的流向和使用情况。
-
Java types: You can use CodeQL to find out information about data types used in Java code. This allows you to write queries to identify specific type-related issues.
Java类型。你可以使用CodeQL找出Java代码中使用的数据类型信息。这允许您编写查询,以确定特定的类型相关问题。
-
Overflow-prone comparisons in Java: You can use CodeQL to check for comparisons in Java code where one side of the comparison is prone to overflow.
Java中容易溢出的比较。你可以使用CodeQL来检查Java代码中的比较,如果比较的一方容易溢出。
-
Navigating the call graph: CodeQL has classes for identifying code that calls other code, and code that can be called from elsewhere. This allows you to find, for example, methods that are never used.
导航调用图。CodeQL有一些类用于识别调用其他代码的代码,以及可以从其他地方调用的代码。例如,这允许你找到从未使用过的方法。
-
Annotations in Java: CodeQL databases of Java projects contain information about all annotations attached to program elements.
Java中的注释。CodeQL的Java项目数据库包含了所有附加在程序元素上的注释信息。
-
Javadoc: You can use CodeQL to find errors in Javadoc comments in Java code.
Javadoc: 您可以使用CodeQL来查找Java代码中Javadoc注释的错误。
-
Working with source locations: You can use the location of entities within Java code to look for potential errors. Locations allow you to deduce the presence, or absence, of white space which, in some cases, may indicate a problem.
使用源代码的位置。您可以使用Java代码中实体的位置来查找潜在的错误。位置允许您推断出是否存在空白,在某些情况下,这可能表明一个问题。
-
Abstract syntax tree classes for working with Java programs: CodeQL has a large selection of classes for representing the abstract syntax tree of Java programs.
用于处理Java程序的抽象语法树类。CodeQL有大量的类用于表示Java程序的抽象语法树。