Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- addImportIfMissing(CompilationUnit, Class<?>) - Static method in class io.codemodder.ast.ASTTransforms
-
Add an import in alphabetical order.
- addImportIfMissing(CompilationUnit, String) - Static method in class io.codemodder.ast.ASTTransforms
- addStatementAfterStatement(Statement, Statement) - Static method in class io.codemodder.ast.ASTTransforms
-
Adds an
Statement
after anotherStatement
. - addStatementAt(NodeWithStatements<N>, Statement, int) - Static method in class io.codemodder.ast.ASTTransforms
-
Adds a statement to a node at a given index.
- addStatementBeforeStatement(Statement, Statement) - Static method in class io.codemodder.ast.ASTTransforms
-
Adds an
Statement
before anotherStatement
. - addStaticImportIfMissing(CompilationUnit, String) - Static method in class io.codemodder.ast.ASTTransforms
- AGPL_3_0 - Static variable in class io.codemodder.DependencyLicenses
- ALL_COMMENTS - Static variable in interface io.codemodder.NodeCollector
-
A
NodeCollector
implementation that collects all comments from aCompilationUnit
. - ALL_FROM_TYPE - Static variable in interface io.codemodder.NodeCollector
-
A
NodeCollector
implementation that collects all nodes of a specified type. - ambiguousCodeShape - Static variable in interface io.codemodder.remediation.RemediationMessages
- any() - Static method in interface io.codemodder.IncludesExcludes
-
Return an
IncludesExcludes
that matches all files and lines. - APACHE_2_0 - Static variable in class io.codemodder.DependencyLicenses
- APPENDER_NAME - Static variable in class io.codemodder.LoggingConfigurator
- areChangesApplied() - Method in interface io.codemodder.javaparser.ChangesResult
-
Returns true if changes were applied.
- artifact() - Method in interface io.codemodder.DependencyGAV
-
The artifact of the dependency.
- artifact() - Method in class io.codemodder.DependencyGAV.Default
- asMethodCall() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return the wrapped node as a
MethodCallExpr
or blow up. - asNode() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return the wrapped node as a
Node
. - asNodeWithArguments() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return the wrapped node as a
NodeWithArguments
. - asObjectCreationExpr() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return the wrapped node as a
ObjectCreationExpr
or blow up. - asPath() - Method in interface io.codemodder.CodeDirectory
-
The filesystem directory path we are running against.
- ASTExpectations - Class in io.codemodder.javaparser
-
A utility for validating the shape of ASTs and filtering them to retrieve.
- ASTExpectations.ExpressionStatementExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering expression statements.
- ASTExpectations.FieldAccessExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering name expressions.
- ASTExpectations.LocalVariableDeclaratorExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering a single variable declaration.
- ASTExpectations.MethodCallExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering method call expressions.
- ASTExpectations.NameExpressionExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering name expressions.
- ASTExpectations.NodeExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering generic AST nodes.
- ASTExpectations.StringLiteralExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering string literals.
- ASTExpectations.VariableDeclarationExprExpectation - Class in io.codemodder.javaparser
-
A type for querying and filtering variable declaration(s).
- ASTs - Class in io.codemodder.ast
-
A static library for querying and returning patterns over AST nodes.
- ASTs.ReverseEvaluationOrder - Class in io.codemodder.ast
-
A
Node
iterator iterating over all the nodes that precedes a given node in the pre-order of its AST. - ASTTransforms - Class in io.codemodder.ast
B
- BOOLEAN - Enum constant in enum class io.codemodder.CodemodParameter.ParameterType
- BSD_2_CLAUSE - Static variable in class io.codemodder.DependencyLicenses
- BSD_3_CLAUSE - Static variable in class io.codemodder.DependencyLicenses
- build() - Method in class io.codemodder.remediation.FixCandidateSearcher.Builder
- build() - Method in class io.codemodder.remediation.SearcherStrategyRemediator.Builder
- build(String, String, String, SarifSchema210, CodeDirectory) - Method in interface io.codemodder.RuleSarifFactory
-
Builds
RuleSarif
s if it supportstoolName
. - Builder() - Constructor for class io.codemodder.remediation.FixCandidateSearcher.Builder
- Builder() - Constructor for class io.codemodder.remediation.SearcherStrategyRemediator.Builder
- buildFindingId(Result) - Static method in class io.codemodder.SarifFindingKeyUtil
-
Builds a finding ID for a SARIF finding based on the provided result.
C
- CallReplacer - Interface in io.codemodder.javaparser
- CallReplacer.CallReplacerBuilder - Interface in io.codemodder.javaparser
-
Builder for
CallReplacer
. - changes() - Method in interface io.codemodder.CodemodFileScanningResult
-
Returns the changes that were made to the file.
- changesApplied - Static variable in interface io.codemodder.javaparser.ChangesResult
- changesAppliedWith(List<DependencyGAV>) - Static method in interface io.codemodder.javaparser.ChangesResult
- ChangesResult - Interface in io.codemodder.javaparser
-
Represents the result of changes made during parsing.
- checkAndFix() - Method in class io.codemodder.remediation.sqlinjection.SQLParameterizer
-
Checks if
methodCall
is a query call that needs to be fixed and fixes if that's the case. - checkAndFix(Expression) - Static method in class io.codemodder.remediation.resourceleak.ResourceLeakFixer
-
Detects if an
Expression
that creates a resource type is fixable and tries to fix it. - checkAndFix(MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLParameterizerWithCleanup
- cleanup(MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLParameterizerWithCleanup
- CodeChanger - Interface in io.codemodder
-
The base of a codemod type.
- codeDirectory() - Method in interface io.codemodder.CodemodInvocationContext
-
The root directory where the project being transformed lives.
- CodeDirectory - Interface in io.codemodder
-
Holds a code directory (e.g., a repository root).
- Codemod - Annotation Interface in io.codemodder
-
Used to mark types providing codemod functionality and provide the necessary metadata.
- CodemodChange - Class in io.codemodder
-
Represents a change made to the code.
- CodemodExecutionPriority - Enum Class in io.codemodder
-
A description of how important it is that a codemod execute in the list of codemods being run.
- CodemodExecutor - Interface in io.codemodder
-
A type responsible for executing a codemod on a set of files.
- CodemodFileScanningResult - Interface in io.codemodder
-
Represents the result of scanning a file for changes.
- codemodId() - Method in interface io.codemodder.CodemodInvocationContext
-
The ID of the codemod changing the file.
- CodemodIdPair - Class in io.codemodder
-
A codemod and its ID.
- CodemodIdPair(String, CodeChanger) - Constructor for class io.codemodder.CodemodIdPair
- CodemodInvocationContext - Interface in io.codemodder
-
The context we provide to each codemod.
- CodemodLoader - Class in io.codemodder
-
This type is responsible for loading codemods and the surrounding subsystem.
- CodemodLoader(List<Class<? extends CodeChanger>>, CodemodRegulator, Path, List<String>, List<String>, List<Path>, Map<String, List<RuleSarif>>, List<ParameterArgument>, List<Path>, List<Path>, Path, Path) - Constructor for class io.codemodder.CodemodLoader
- CodemodPackageUpdateResult - Interface in io.codemodder
-
A
- CodemodParameter - Annotation Interface in io.codemodder
-
Describes a codemod parameter.
- CodemodParameter.ParameterType - Enum Class in io.codemodder
- CodemodProvider - Interface in io.codemodder
-
A type that helps provide functionality codemods.
- CodemodRegulator - Interface in io.codemodder
-
A type that is relied on to inform our in-flight analysis on whether codemods are allowed.
- CodemodRegulator.DefaultCodemodRegulator - Class in io.codemodder
- CodemodReporterStrategy - Interface in io.codemodder
-
A type responsible for reporting codemod changes.
- CodemodResources - Class in io.codemodder
-
A utility class for accessing a codemod's resources in it's "default location" the classpath.
- CodemodRunner - Interface in io.codemodder
-
Type responsible for running a codemod on a single file, performing the analysis and file changes.
- CodeTFProvider - Interface in io.codemodder
-
A type that plugins can implement to enrich or modify CodeTF results.
- collectNodes(CompilationUnit, Class<? extends Node>) - Method in interface io.codemodder.NodeCollector
-
Collects nodes of the specified type from the
CompilationUnit
. - column() - Method in record class io.codemodder.Position
-
Returns the value of the
column
record component. - combineResources(TryStmt) - Static method in class io.codemodder.ast.ASTTransforms
-
Given a
TryStmt
without any finally and catch clauses, and that is the first statement of a try with resources block, merge the two try statements into one. - compareTo(SourceDirectory) - Method in class io.codemodder.SourceDirectory.DefaultSourceDirectory
- CompositeJavaParserChanger - Class in io.codemodder
-
A type that allows composing multiple
JavaParserChanger
instances are under the same umbrella. - CompositeJavaParserChanger(CodemodReporterStrategy, JavaParserChanger...) - Constructor for class io.codemodder.CompositeJavaParserChanger
- CompositeJavaParserChanger(JavaParserChanger...) - Constructor for class io.codemodder.CompositeJavaParserChanger
- configure(LoggerContext) - Method in class io.codemodder.LoggingConfigurator
- content() - Method in interface io.codemodder.Line
- contents() - Method in interface io.codemodder.CodemodInvocationContext
-
The original contents of the file before this codemod
- create() - Static method in interface io.codemodder.EncodingDetector
- create() - Static method in interface io.codemodder.SarifParser
- create(DependencyGAV) - Method in interface io.codemodder.DependencyDescriptor
-
Creates a description for a dependency that a codemod wants to add to the project.
- create(List<DependencyGAV>, List<DependencyGAV>, List<CodeTFChangesetEntry>, Set<Path>) - Static method in interface io.codemodder.DependencyUpdateResult
- create(List<SourceDirectory>) - Method in interface io.codemodder.javaparser.JavaParserFactory
-
Create a JavaParser instance for the given project source directories.
- createDefault() - Static method in interface io.codemodder.FileCache
- createDefault() - Static method in interface io.codemodder.SourceDirectoryLister
- createDefault(int) - Static method in interface io.codemodder.FileCache
- createDefault(String, String, String) - Static method in interface io.codemodder.DependencyGAV
-
Create a new
DependencyGAV
with the given group, artifact, and version -- the bare minimum to describe a dependency for injection. - createDefault(String, String, String, String, String, String, Boolean) - Static method in interface io.codemodder.DependencyGAV
-
Create a new
DependencyGAV
with the given group, artifact, version, justification, license, and repository URL. - createDefault(Path, List<String>) - Static method in interface io.codemodder.SourceDirectory
- createMarkdownDescriptor() - Static method in interface io.codemodder.DependencyDescriptor
-
Create a descriptor that uses markdown.
D
- Default(List<PathMatcher>, List<PathMatcher>) - Constructor for class io.codemodder.IncludesExcludes.Default
- Default(Set<Integer>, Path) - Constructor for class io.codemodder.XPathStreamProcessChange.Default
- Default(Set<String>, Set<String>) - Constructor for class io.codemodder.IncludesExcludesPattern.Default
- DEFAULT - Static variable in interface io.codemodder.remediation.NodePositionMatcher
- DEFAULT - Static variable in interface io.codemodder.remediation.sqlinjection.HQLInjectionRemediator
- DefaultRuleSetting - Enum Class in io.codemodder
-
During analysis, this will be the default setting for every rule.
- DefaultSourceDirectoryLister() - Constructor for class io.codemodder.SourceDirectoryLister.DefaultSourceDirectoryLister
- defaultValue() - Element in annotation interface io.codemodder.CodemodParameter
-
The default value if the user didn't specify one.
- dependencies() - Method in interface io.codemodder.CodemodInvocationContext
-
The list of dependencies that were found at pom file
- DependencyDescriptor - Interface in io.codemodder
-
A type that describes a new dependency being added to a project.
- DependencyGAV - Interface in io.codemodder
-
Models a Java dependency we might want to add.
- DependencyGAV.Default - Class in io.codemodder
- DependencyLicenses - Class in io.codemodder
-
The license, if known, of a dependency.
- DependencyUpdateResult - Interface in io.codemodder
-
Represents the result of a dependency update operation.
- DESERIALIZATION - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- desiredCodemodIdOrder() - Method in class io.codemodder.CodemodRegulator.DefaultCodemodRegulator
- desiredCodemodIdOrder() - Method in interface io.codemodder.CodemodRegulator
- detect(Path) - Method in interface io.codemodder.EncodingDetector
-
Try to detect the encoding of a file.
- detectorRule() - Method in interface io.codemodder.FixOnlyCodeChanger
-
A description of the rule.
- DISABLED - Enum constant in enum class io.codemodder.DefaultRuleSetting
E
- Either<L,
R> - Class in io.codemodder -
An implementation of the Either monad.
- empty() - Static method in interface io.codemodder.CodemodReporterStrategy
-
A reporter strategy that does nothing, useful for tests or CLI situations where reporting isn't important.
- EMPTY - Static variable in interface io.codemodder.RuleSarif
-
A
RuleSarif
with no results. - EMPTY_UPDATE - Static variable in interface io.codemodder.DependencyUpdateResult
-
An update reporting no actions and no errors.
- EmptyRuleSarif() - Constructor for class io.codemodder.RuleSarif.EmptyRuleSarif
- ENABLED - Enum constant in enum class io.codemodder.DefaultRuleSetting
- EncodingDetector - Interface in io.codemodder
-
Detects the encoding of a file.
- end() - Method in record class io.codemodder.SourceCodeRegion
-
Returns the value of the
end
record component. - EPL_1_0 - Static variable in class io.codemodder.DependencyLicenses
- EPL_2_0 - Static variable in class io.codemodder.DependencyLicenses
- equals(Object) - Method in class io.codemodder.CodemodChange
- equals(Object) - Method in class io.codemodder.DependencyGAV.Default
- equals(Object) - Method in record class io.codemodder.Position
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.codemodder.remediation.FixCandidate
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.codemodder.SourceCodeRegion
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in class io.codemodder.SourceDirectory.DefaultSourceDirectory
- erroredFiles() - Method in interface io.codemodder.DependencyUpdateResult
-
The set of files that we attempted to update, but failed.
- EXACT_MATCH - Static variable in interface io.codemodder.RegionNodeMatcher
-
Return true if the
Node
andRegion
start and end at the same location. - execute(List<Path>) - Method in interface io.codemodder.CodemodExecutor
-
Execute the codemod on the given file paths.
- executionPriority() - Element in annotation interface io.codemodder.Codemod
-
How important it is that this codemod execute sooner in the list of codemods being run.
- expect(Node) - Static method in class io.codemodder.javaparser.ASTExpectations
-
The starting point for validating the shape of an AST and returning a subgraph.
- ExpressionStmtVariableDeclaration - Class in io.codemodder.ast
-
Holds the nodes in the AST that represents a local variable declaration statement.
F
- FileCache - Interface in io.codemodder
-
A cache for file contents.
- files() - Method in class io.codemodder.SourceDirectory.DefaultSourceDirectory
- files() - Method in interface io.codemodder.SourceDirectory
-
The full path of all the source code files within this directory.
- filesFailedToChange() - Method in interface io.codemodder.CodemodPackageUpdateResult
- filter(Predicate<L>, R) - Method in class io.codemodder.Either
-
If it contains the left value, applies the
Predicate
pred
and return anEither
containingorElse
if it fails. - findAllAssignments(LocalVariableDeclaration) - Static method in class io.codemodder.ast.ASTs
-
Finds all assignments of a local variable declaration
- findAllMethodCalls() - Method in interface io.codemodder.ast.LocalDeclaration
-
Finds all method calls for the variable/parameter in this declaration.
- findAllReferences() - Method in interface io.codemodder.ast.LocalDeclaration
-
Finds all references to this variable/parameter in its scope.
- findAllReferences(LocalVariableDeclaration) - Static method in class io.codemodder.ast.ASTs
-
Returns a
List
containing all the referenced oflocalDeclaration
in its scope. - findAndFix(MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLTableInjectionFilterTransform
- findBlockStatementFrom(Node) - Static method in class io.codemodder.ast.ASTs
-
Searches up the AST to find the
BlockStmt
given theNode
. - findEarliestLocalDeclarationOf(SimpleName) - Static method in class io.codemodder.ast.ASTs
-
Given a
SimpleName
name
, checks if there exists a local declaration whose name isname
. - findEarliestLocalDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Starting from the
Node
start
, checks if there exists a local variable declaration whose name isname
. - findEarliestLocalVariableDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Starting from the
Node
start
, checks if there exists a local variable declaration whose name isname
. - findFilesWithTrailingPath(String) - Method in interface io.codemodder.CodeDirectory
-
Find a file with the given trailing path.
- findMethodBodyFrom(Node) - Static method in class io.codemodder.ast.ASTs
-
Searches up the AST to find the method body from the given
Node
. - findMethodCallsWhichAreAssignedToType(CompilationUnit, int, Integer, String, List<String>) - Static method in class io.codemodder.ast.ASTs
-
This finds all methods that match the given location, with the given name, and is assigned to a variable of one of the given types.
- findNonCallableSimpleNameSource(SimpleName) - Static method in class io.codemodder.ast.ASTs
-
Tries to find the declaration that originates a
SimpleName
use that is a Simple Expression Name, Simple Type Name, or Type Parameter within the AST. - findNonCallableSimpleNameSource(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Tries to find a declaration of
name
that is in scope at the givenNode
start
within the AST. - findParentStatementFrom(Node) - Static method in class io.codemodder.ast.ASTs
-
Searches up the AST to find the
Statement
given theNode
. - findResourceInit(NameExpr) - Static method in class io.codemodder.remediation.resourceleak.ResourceLeakFixer
- findRootExpression(ObjectCreationExpr) - Static method in class io.codemodder.remediation.resourceleak.ResourceLeakFixer
- findScope() - Method in class io.codemodder.ast.ExpressionStmtVariableDeclaration
- findScope() - Method in class io.codemodder.ast.ForEachDeclaration
- findScope() - Method in class io.codemodder.ast.ForInitDeclaration
- findScope() - Method in class io.codemodder.ast.LocalVariableDeclaration
- findScope() - Method in class io.codemodder.ast.TryResourceDeclaration
- findThisDeclaration(ThisExpr) - Static method in class io.codemodder.ast.ASTs
-
Finds the
ClassOrInterfaceDeclaration
that is referenced by aThisExpr
. - findTypeFrom(Node) - Static method in class io.codemodder.ast.ASTs
-
Searches up the AST to find the
ClassOrInterfaceDeclaration
givenNode
. - fix(CompilationUnit, MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLTableInjectionFilterTransform
- fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.headerinjection.HeaderInjectionFixStrategy
- fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.javadeserialization.JavaDeserializationFixStrategy
- fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.jndiinjection.ReplaceLimitedLookupStrategy
- fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.missingsecureflag.MissingSecureFlagFixStrategy
- fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.ModularRemediationStrategy
- fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.reflectioninjection.ReflectionInjectionFixStrategy
- fix(CompilationUnit, Node) - Method in interface io.codemodder.remediation.RemediationStrategy
-
Apply a fix to the issue detected a given node.
- fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.sqlinjection.SQLInjectionFixComposer
-
Given a node, checks if it is a
MethodCallExpr
related to executing JDBC API SQL queries (i.e. - fix(CompilationUnit, Node) - Method in class io.codemodder.remediation.ssrf.SSRFFixStrategy
- fix(MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLTableInjectionFilterTransform
- fixableJdbcMethodNames() - Static method in class io.codemodder.remediation.sqlinjection.SQLParameterizer
-
Returns a set of fixable JDBC method names.
- FixCandidate<T> - Record Class in io.codemodder.remediation
-
The potential fix location.
- FixCandidate(Node, List<T>) - Constructor for record class io.codemodder.remediation.FixCandidate
-
Creates an instance of a
FixCandidate
record class. - fixCandidates() - Method in interface io.codemodder.remediation.FixCandidateSearchResults
-
The potential fix locations.
- FixCandidateSearcher<T> - Interface in io.codemodder.remediation
-
Searches for potential fix locations in the source code.
- FixCandidateSearcher.Builder<T> - Class in io.codemodder.remediation
-
Builder for
FixCandidateSearcher
. - FixCandidateSearchResults<T> - Interface in io.codemodder.remediation
-
The results of a fix candidate search.
- FixOnlyCodeChanger - Interface in io.codemodder
-
A codemod that only fixes issues and does not perform its own detection, instead relying on external analysis from other tools.
- flatMap(Function<L, Either<A, R>>) - Method in class io.codemodder.Either
-
Applies
func
to the right value if present and returns anEither
containing the result. - flatMapRight(Function<R, Either<L, A>>) - Method in class io.codemodder.Either
-
Applies
func
to the right value if present and returns anEither
containing the result. - flowsInto(LocalDeclaration) - Static method in class io.codemodder.remediation.resourceleak.ResourceLeakFixer
- ForEachDeclaration - Class in io.codemodder.ast
-
Holds the nodes in the AST that represents a variable declaration in an enhanced for statement .
- ForEachDeclaration(ForEachStmt, VariableDeclarationExpr, VariableDeclarator) - Constructor for class io.codemodder.ast.ForEachDeclaration
- ForInitDeclaration - Class in io.codemodder.ast
-
Holds the nodes in the AST that represents a variable declaration in a for statement init expression.
- ForInitDeclaration(ForStmt, VariableDeclarationExpr, VariableDeclarator) - Constructor for class io.codemodder.ast.ForInitDeclaration
- from(int) - Static method in class io.codemodder.CodemodChange
-
A
CodemodChange
convenience builder for weaves that don't require a new dependency. - from(int, FixedFinding) - Static method in class io.codemodder.CodemodChange
- from(int, DependencyGAV) - Static method in class io.codemodder.CodemodChange
-
A
CodemodChange
convenience builder for weaves that only requires one new dependency. - from(int, Parameter, String) - Static method in class io.codemodder.CodemodChange
- from(int, String) - Static method in class io.codemodder.CodemodChange
- from(int, String, FixedFinding) - Static method in class io.codemodder.CodemodChange
- from(int, String, List<FixedFinding>) - Static method in class io.codemodder.CodemodChange
- from(int, List<DependencyGAV>) - Static method in class io.codemodder.CodemodChange
-
Builds a weave.
- from(int, List<DependencyGAV>, FixedFinding) - Static method in class io.codemodder.CodemodChange
- from(int, List<DependencyGAV>, List<FixedFinding>) - Static method in class io.codemodder.CodemodChange
- from(Path) - Static method in interface io.codemodder.CodeDirectory
- from(List<CodemodChange>, List<UnfixedFinding>) - Static method in interface io.codemodder.CodemodFileScanningResult
-
Creates a new instance of
CodemodFileScanningResult
from the given values. - from(List<CodemodChange>, List<UnfixedFinding>, CodeTFAiMetadata) - Static method in interface io.codemodder.CodemodFileScanningResult
-
Creates a new instance of
CodemodFileScanningResult
from the given values, including AI usage metadata - from(List<CodeTFPackageAction>, List<CodeTFChangesetEntry>, Set<Path>) - Static method in interface io.codemodder.CodemodPackageUpdateResult
- from(Provider<JavaParser>) - Static method in interface io.codemodder.javaparser.JavaParserFacade
-
Return a simple implementation of the
JavaParserFacade
interface. - from(T) - Method in interface io.codemodder.SourceCodeRegionExtractor
-
Extract a region from a SARIF result.
- FROM_SARIF_FIRST_LOCATION - Static variable in interface io.codemodder.SourceCodeRegionExtractor
- FROM_SARIF_FIRST_THREADFLOW_EVENT - Static variable in interface io.codemodder.SourceCodeRegionExtractor
- fromAssignExpression(AssignExpr) - Static method in class io.codemodder.ast.LocalScope
-
Calculates the scope of a Assignment
AssignExpr
. - fromClasspath(Class<? extends CodeChanger>) - Static method in interface io.codemodder.CodemodReporterStrategy
-
A
CodemodReporterStrategy
that reports based on text from a predictable location on classpath. - fromClasspathDirectory(Class<? extends CodeChanger>, String) - Static method in interface io.codemodder.CodemodReporterStrategy
-
A
CodemodReporterStrategy
that reports based on text files in the classpath. - fromDescription(String) - Static method in enum class io.codemodder.DefaultRuleSetting
- fromExcludedLines(Set<Integer>) - Static method in interface io.codemodder.LineIncludesExcludes
- fromForDeclaration(ForStmt, VariableDeclarator) - Static method in class io.codemodder.ast.LocalScope
-
Calculates the scope of a local declaration in a
ForStmt
. - fromForEachDeclaration(ForEachStmt) - Static method in class io.codemodder.ast.LocalScope
-
Calculates the scope of a local declaration in a
ForEachStmt
. - fromIncludedLines(Set<Integer>) - Static method in interface io.codemodder.LineIncludesExcludes
- fromLocalDeclaration(ExpressionStmt, VariableDeclarator) - Static method in class io.codemodder.ast.LocalScope
-
Calculates the scope of a local declaration in a
ExpressionStmt
. - fromOptional(Optional<L>, R) - Static method in class io.codemodder.Either
- fromParameter(Parameter) - Static method in class io.codemodder.ast.LocalScope
-
Calculates the scope of a local declaration in a
Parameter
. - fromSarif(Region) - Static method in record class io.codemodder.SourceCodeRegion
-
Translate the SARIF model into the common model.
- fromTryResource(TryStmt, VariableDeclarator) - Static method in class io.codemodder.ast.LocalScope
-
Calculates the scope of a local declaration in a
TryStmt
. - fromVariableDeclarator(VariableDeclarator) - Static method in class io.codemodder.ast.LocalVariableDeclaration
-
For a given
VariableDeclarator
vd
, check if it is part of a local declaration and return its associatedLocalVariableDeclaration
object, if applicable.
G
- GenericRemediationMetadata - Enum Class in io.codemodder.remediation
-
Reporter strategies that are useful without mentioning specific APIs.
- get(Path) - Method in interface io.codemodder.FileCache
-
Get the string contents of a file.
- getAllDependencies(Path, Path) - Method in interface io.codemodder.ProjectProvider
-
Returns all dependencies found at given file
- getAnyMatcher() - Static method in interface io.codemodder.IncludesExcludesPattern
-
Returns an includes/excludes pattern that matches any files.
- getArguments() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Get the arguments for the call.
- getChange(Path, CodemodChange) - Method in interface io.codemodder.CodemodReporterStrategy
- getChanger() - Method in class io.codemodder.CodemodIdPair
- getClassResourceAsString(Class<?>, String) - Static method in class io.codemodder.CodemodResources
-
Returns a class resource as a
String
. - getCodemods() - Method in class io.codemodder.CodemodLoader
- getDeclaration() - Method in interface io.codemodder.ast.LocalDeclaration
-
The node where the declaration occurs.
- getDeclaration() - Method in class io.codemodder.ast.LocalVariableDeclaration
- getDeclaration() - Method in class io.codemodder.ast.ParameterDeclaration
- getDefaultValue() - Method in interface io.codemodder.Parameter
-
Get the default value of the codemod parameter.
- getDependencies() - Method in interface io.codemodder.remediation.SuccessOrReason
-
Returns the dependencies to be added from a successful fix.
- getDependenciesNeeded() - Method in class io.codemodder.CodemodChange
-
A list of the dependencies that are required to be added to the project in order to support this change.
- getDependenciesRequired() - Method in interface io.codemodder.javaparser.ChangesResult
- getDescription() - Method in interface io.codemodder.CodeChanger
-
A deep description of what this codemod's changes.
- getDescription() - Method in class io.codemodder.CodemodChange
-
A description of the change that is being made.
- getDescription() - Method in interface io.codemodder.CodemodReporterStrategy
- getDescription() - Method in enum class io.codemodder.DefaultRuleSetting
- getDescription() - Method in class io.codemodder.javaparser.JavaParserChanger
- getDescription() - Method in class io.codemodder.RawFileChanger
- getDriver() - Method in class io.codemodder.LazyLoadingRuleSarif
- getDriver() - Method in class io.codemodder.RuleSarif.EmptyRuleSarif
- getDriver() - Method in interface io.codemodder.RuleSarif
-
Returns the tool driver that produced this SARIF.
- getExpressions() - Method in class io.codemodder.ast.LocalScope
- getFixedFindings() - Method in class io.codemodder.CodemodChange
-
The fixed finding that was addressed by this change.
- getId() - Method in class io.codemodder.CodemodIdPair
- getIncludesExcludesForFile(File) - Method in class io.codemodder.IncludesExcludes.Default
- getIncludesExcludesForFile(File) - Method in interface io.codemodder.IncludesExcludes
-
Do we have any includes that match the file and line number?
- getIncludesExcludesForFile(File) - Method in class io.codemodder.IncludesExcludes.MatchesEverything
- getIncludesExcludesPattern() - Method in interface io.codemodder.CodeChanger
-
A list of paths patterns requested or rejected by the codemod.
- getIncludesExcludesPattern() - Method in class io.codemodder.CompositeJavaParserChanger
- getIncludesExcludesPattern() - Method in class io.codemodder.javaparser.JavaParserChanger
- getIndividualChangeDescription(Path, CodemodChange) - Method in interface io.codemodder.CodeChanger
-
A description of an individual change made by this codemod.
- getIndividualChangeDescription(Path, CodemodChange) - Method in class io.codemodder.javaparser.JavaParserChanger
- getIndividualChangeDescription(Path, CodemodChange) - Method in class io.codemodder.RawFileChanger
- getInjections() - Method in class io.codemodder.remediation.sqlinjection.QueryParameterizer
-
Returns the list of injections found.
- getJavaMatcher() - Static method in interface io.codemodder.IncludesExcludesPattern
-
Returns an includes/excludes pattern that matches any java files.
- getLabel() - Method in interface io.codemodder.Parameter
-
Get a description of the codemod parameter.
- getLastDataFlowRegion(Result) - Static method in class io.codemodder.Sarif
-
This method returns the last data flow location in the first code flow's first thread flow.
- getLeft() - Method in class io.codemodder.Either
-
Returns the left value, may be
null
- getLinearized() - Method in class io.codemodder.ast.LinearizedStringExpression
- getLinearizedQuery() - Method in class io.codemodder.remediation.sqlinjection.QueryParameterizer
- getLineNumberAt(CharSequence, int) - Static method in class io.codemodder.LineNumbers
-
Get the line number you'd expect from an IDE at the given character offset.
- getModules(Path, List<Path>, List<String>, List<String>, List<Class<? extends CodeChanger>>, List<RuleSarif>, List<Path>, List<Path>, Path, Path) - Method in interface io.codemodder.CodemodProvider
-
Return a set of Guice modules that allow dependency injection
- getName() - Method in interface io.codemodder.ast.LocalDeclaration
-
Returns the name used in this declaration as a String.
- getName() - Method in class io.codemodder.ast.LocalVariableDeclaration
-
Returns the name of the local variable in this declaration as a
String
. - getName() - Method in class io.codemodder.ast.ParameterDeclaration
- getName() - Method in interface io.codemodder.Parameter
-
Get the name of the variable.
- getParameters() - Method in class io.codemodder.CodemodChange
-
A list of the codemod parameters that are involved in this change.
- getQuestion() - Method in interface io.codemodder.Parameter
-
Get the question to ask the user for the value.
- getRange() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
This assumes a range is present, and explodes if it doesn't.
- getRange(Node) - Method in class io.codemodder.remediation.WithoutScopePositionMatcher
- getReason() - Method in interface io.codemodder.remediation.SuccessOrReason
-
Returns the reason for failure.
- getReferences() - Method in interface io.codemodder.CodeChanger
-
A list of references for further reading on the issues this codemod addresses or other supplementary information.
- getReferences() - Method in interface io.codemodder.CodemodReporterStrategy
- getReferences() - Method in class io.codemodder.javaparser.JavaParserChanger
- getReferences() - Method in class io.codemodder.RawFileChanger
- getRegionsFromResultsByRule(Path) - Method in class io.codemodder.LazyLoadingRuleSarif
- getRegionsFromResultsByRule(Path) - Method in class io.codemodder.RuleSarif.EmptyRuleSarif
- getRegionsFromResultsByRule(Path) - Method in interface io.codemodder.RuleSarif
-
Get all the regions for the SARIF with the matching rule ID
- getReplacementFor(String) - Method in class io.codemodder.RegexFileChanger
-
Given a snippet that matches the regex, return the replacement string.
- getResolvedExpressionsMap() - Method in class io.codemodder.ast.LinearizedStringExpression
- getResultsByLocationPath(Path) - Method in class io.codemodder.LazyLoadingRuleSarif
- getResultsByLocationPath(Path) - Method in class io.codemodder.RuleSarif.EmptyRuleSarif
- getResultsByLocationPath(Path) - Method in interface io.codemodder.RuleSarif
-
Get all the SARIF results with the matching path for the first location field
- getRight() - Method in class io.codemodder.Either
-
Returns the right value, may be
null
- getRoot() - Method in class io.codemodder.ast.LinearizedStringExpression
- getRoot() - Method in class io.codemodder.remediation.sqlinjection.QueryParameterizer
- getRootedMatcher(Path) - Method in class io.codemodder.IncludesExcludesPattern.Default
- getRootedMatcher(Path) - Method in interface io.codemodder.IncludesExcludesPattern
-
Returns an IncludesExcludes file matcher that matches files following the patterns specified patterns.
- getRule() - Method in class io.codemodder.LazyLoadingRuleSarif
- getRule() - Method in class io.codemodder.RuleSarif.EmptyRuleSarif
- getRule() - Method in interface io.codemodder.RuleSarif
-
Returns the string ID for the rule.
- getScope() - Method in interface io.codemodder.ast.LocalDeclaration
-
The scope of this declaration.
- getScope() - Method in class io.codemodder.ast.LocalVariableDeclaration
-
Returns the
LocalScope
of the local variable in this declaration. - getScope() - Method in class io.codemodder.ast.ParameterDeclaration
- getStatement() - Method in class io.codemodder.ast.ExpressionStmtVariableDeclaration
-
Returns the
ExpressionStmt
Node
that holds this local declaration. - getStatement() - Method in class io.codemodder.ast.ForEachDeclaration
-
Returns the
ForEachStmt
Node
that holds the declaration. - getStatement() - Method in class io.codemodder.ast.ForInitDeclaration
-
Returns the
ForStmt
Node
that holds the declaration. - getStatement() - Method in class io.codemodder.ast.LocalVariableDeclaration
-
Returns the
Statement
Node
that holds this local declaration. - getStatement() - Method in class io.codemodder.ast.TryResourceDeclaration
-
Returns the
TryStmt
Node
that holds the resource declaration. - getStatements() - Method in class io.codemodder.ast.LocalScope
- getSummary() - Method in interface io.codemodder.CodeChanger
-
The headline for this codemod's changes.
- getSummary() - Method in interface io.codemodder.CodemodReporterStrategy
- getSummary() - Method in class io.codemodder.javaparser.JavaParserChanger
- getSummary() - Method in class io.codemodder.RawFileChanger
- getType() - Method in interface io.codemodder.Parameter
-
Get the type of parameter, should be "string", "number", or "boolean".
- getValue(Path, int) - Method in interface io.codemodder.Parameter
-
Get the value of a given codemod parameter for the given path and line.
- getVariableDeclarationExpr() - Method in class io.codemodder.ast.LocalVariableDeclaration
-
Returns the
VariableDeclarationExpr
Node
that holds this local declaration. - getVariableDeclarator() - Method in class io.codemodder.ast.LocalVariableDeclaration
-
Returns the
VariableDeclarator
Node
that holds this local declaration. - GPL_2_0 - Static variable in class io.codemodder.DependencyLicenses
- GPL_3_0 - Static variable in class io.codemodder.DependencyLicenses
- group() - Method in class io.codemodder.DependencyGAV.Default
- group() - Method in interface io.codemodder.DependencyGAV
-
The group of the dependency.
H
- handle(XMLEventReader, XMLEventWriter, XMLEvent) - Method in interface io.codemodder.XPathStreamEventHandler
-
Handle an
XMLEvent
that matched an XPath expression. - hashCode() - Method in class io.codemodder.CodemodChange
- hashCode() - Method in class io.codemodder.DependencyGAV.Default
- hashCode() - Method in record class io.codemodder.Position
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.codemodder.remediation.FixCandidate
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.codemodder.SourceCodeRegion
-
Returns a hash code value for this object.
- hashCode() - Method in class io.codemodder.SourceDirectory.DefaultSourceDirectory
- hasNamedTarget(AssignExpr) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
AssignExpr
(assignExpr
) ->NameExpr
, where (expr
) is the left hand side of the assignment. - hasNext() - Method in class io.codemodder.ast.ASTs.ReverseEvaluationOrder
- hasNoTransitiveDependencies() - Method in class io.codemodder.DependencyGAV.Default
- hasNoTransitiveDependencies() - Method in interface io.codemodder.DependencyGAV
-
Whether this dependency has transitive dependencies.
- hasRange() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return true if the node has a range, meaning it was not added by us.
- HEADER_INJECTION - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- HeaderInjectionFixStrategy - Class in io.codemodder.remediation.headerinjection
-
Default strategy to harden header injection vulnerabilities.
- HeaderInjectionFixStrategy() - Constructor for class io.codemodder.remediation.headerinjection.HeaderInjectionFixStrategy
- HeaderInjectionRemediator<T> - Class in io.codemodder.remediation.headerinjection
-
Fixes header injection pointed by issues.
- HeaderInjectionRemediator() - Constructor for class io.codemodder.remediation.headerinjection.HeaderInjectionRemediator
- HIGH - Enum constant in enum class io.codemodder.CodemodExecutionPriority
- HIGH - Enum constant in enum class io.codemodder.Importance
- HQLInjectionRemediator - Interface in io.codemodder.remediation.sqlinjection
-
Remediates HQL injection vulnerabilities.
I
- id() - Element in annotation interface io.codemodder.Codemod
-
The codemod ID, which must follow this nomenclature:
- ifLeftOrElse(Consumer<? super L>, Consumer<? super R>) - Method in class io.codemodder.Either
- ifLeftOrElseGet(Function<? super L, A>, Function<? super R, A>) - Method in class io.codemodder.Either
- importance() - Element in annotation interface io.codemodder.Codemod
-
How important this codemod's changes are.
- Importance - Enum Class in io.codemodder
-
Represents the importance of a codemod.
- IncludesExcludes - Interface in io.codemodder
-
This is the main interaction point with types for detecting if a path should be included.
- IncludesExcludes.Default - Class in io.codemodder
- IncludesExcludes.MatchesEverything - Class in io.codemodder
-
Matches every file, indicates that the codemods should use their own filtering.
- IncludesExcludesPattern - Interface in io.codemodder
-
Holds includes and excludes patterns for files
- IncludesExcludesPattern.AnySingleton - Class in io.codemodder
-
An includes/excludes pattern that matches any files.
- IncludesExcludesPattern.Default - Class in io.codemodder
- IncludesExcludesPattern.JavaMatcherSingleton - Class in io.codemodder
-
An includes/excludes pattern that matches java files.
- initializingVariable() - Method in class io.codemodder.javaparser.ASTExpectations.MethodCallExpectation
-
Return an expectation that asserts the method call is initializing a variable value.
- injectedPackages() - Method in interface io.codemodder.DependencyUpdateResult
-
The list of dependencies that were successfully injected into the project.
- inScope(Node) - Method in class io.codemodder.ast.LocalScope
-
Returns true if and only if
n
is contained inscope
- io.codemodder - package io.codemodder
- io.codemodder.ast - package io.codemodder.ast
- io.codemodder.javaparser - package io.codemodder.javaparser
- io.codemodder.remediation - package io.codemodder.remediation
- io.codemodder.remediation.headerinjection - package io.codemodder.remediation.headerinjection
- io.codemodder.remediation.javadeserialization - package io.codemodder.remediation.javadeserialization
- io.codemodder.remediation.jndiinjection - package io.codemodder.remediation.jndiinjection
- io.codemodder.remediation.missingsecureflag - package io.codemodder.remediation.missingsecureflag
- io.codemodder.remediation.predictableseed - package io.codemodder.remediation.predictableseed
- io.codemodder.remediation.reflectioninjection - package io.codemodder.remediation.reflectioninjection
- io.codemodder.remediation.resourceleak - package io.codemodder.remediation.resourceleak
- io.codemodder.remediation.sqlinjection - package io.codemodder.remediation.sqlinjection
- io.codemodder.remediation.ssrf - package io.codemodder.remediation.ssrf
- io.codemodder.remediation.weakrandom - package io.codemodder.remediation.weakrandom
- io.codemodder.remediation.xss - package io.codemodder.remediation.xss
- io.codemodder.remediation.xxe - package io.codemodder.remediation.xxe
- isAllowed(String) - Method in class io.codemodder.CodemodRegulator.DefaultCodemodRegulator
- isAllowed(String) - Method in interface io.codemodder.CodemodRegulator
-
Taking into account the configuration, understand if this codemod is currently allowed.
- isArgumentOfMethodCall(Expression) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
MethodCallExpr
->Expression
(expr
), whereexpr
is an argument. - isArgumentOfObjectCreationExpression(Expression) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ObjectCreationExpr
->Expression
(expr
), whereexpr
is an argument. - isAssigned(Expression) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
AssignExpr
->Expression
(expr
), where (expr
) is the right hand side expression of the assignment. - isClassFieldDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ClassOrInterfaceDeclaration
(node
) ->FieldDeclaration
->VariableDeclarator
->SimpleName
- isClassTypeParameterOf(ClassOrInterfaceDeclaration, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ClassOrInterfaceDeclaration
(classDecl
) ->TypeParameter
->SimpleName
, withname
as theSimpleName
. - isConstructor() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return true if this is a constructor call.
- isConstructorArgument(Expression) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ObjectCreationExpr
->Expression
(expr
), where (expr
) is one of the constructor arguments. - isConstructorFormalParameterOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ConstructorDeclaration
(node
) ->Parameter
->SimpleName
- isConstructorForType(String) - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return true if this is a constructor call for the given type.
- isConstructorTypeParameterOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ConstructorDeclaration
(node
) ->TypeParameter
->SimpleName
- isEnumConstantOf(EnumDeclaration, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
EnumDeclaration
(enumDecl
) ->EnumConstantDeclaration
->SimpleName
, withname
as theSimpleName
. - isExceptionParameterOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
CatchClause
(node
) ->Parameter
->SimpleName
- isExpressionStmtDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ExpressionStmt
(node
) ->VariableDeclarationExpr
->VariableDeclarator
->SimpleName
(name
) - isExpressionStmtExpr(Expression) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ExpressionStmt
->Expression
(expr
). - isFieldDeclarationOf(BodyDeclaration<?>, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
FieldDeclaration
(bDecl
) ->VariableDeclarator
->SimpleName
, withname
as theSimpleName
. - isFinalOrNeverAssigned(VariableDeclarator, LocalScope) - Static method in class io.codemodder.ast.ASTs
-
Given a
SimpleName
name
and aVariableDeclarationExpr
with a declarator ofname
, verifies ifname
is final or never assigned. - isFinalOrNeverAssigned(LocalVariableDeclaration) - Static method in class io.codemodder.ast.ASTs
-
Given a
LocalVariableDeclaration
verifies if it is final or never assigned. - isFixable(Expression) - Static method in class io.codemodder.remediation.resourceleak.ResourceLeakFixer
-
Detects if a
Expression
detected by CodeQL that creates a leaking resource is fixable. - isForEachVariable(VariableDeclarator) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ForEachStmt
->VariableDeclarationExpr
->VariableDeclarator
(vd
) - isForEachVariableDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ForEachStmt
(node
) ->VariableDeclarationExpr
->VariableDeclarator
->SimpleName
(name
) - isForInitVariable(VariableDeclarator) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ForStmt
->VariableDeclarationExpr
->VariableDeclarator
(vd
) - isForVariableDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ForStmt
(node
) ->VariableDeclarationExpr
->VariableDeclarator
->SimpleName
- isInBlock(Statement) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
Statement
->Node.getParentNode()
() - isInitExpr(Expression) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
VariableDeclarator
->Expression
(expr
) - isInitializedToType(Node, String, List<String>) - Static method in class io.codemodder.ast.ASTs
-
Checks if a node is a MethodCallExpr that is the initialization of a declaration with one of the types in assignedToTypes.
- isLambdaExprParameterOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
LambdaExpr
(node
) ->Parameter
->SimpleName
- isLeft() - Method in class io.codemodder.Either
-
Returns
true
if the left value is present. - isLocalRecordDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
LocalRecordDeclarationStmt
(node
) ->RecordDeclaration
->SimpleName
- isLocalTypeDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
LocalClassDeclarationStmt
(node
) ->ClassOrInterfaceDeclaration
->SimpleName
- isLocalVariableDeclarator(VariableDeclarator) - Static method in class io.codemodder.ast.ASTs
-
Checks if
vd
is a local declaration. - isMethodCall() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return true if this is a method call.
- isMethodCallWithName(String) - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return true if this is a method call and it has the given name.
- isMethodCallWithNameIn(Collection<String>) - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return true if this is a method call and it has one of the given names.
- isMethodCallWithScope() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Return true if this is a method call with a scope.
- isMethodFormalParameterOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
MethodDeclaration
(node
) ->Parameter
->SimpleName
- isMethodTypeParameterOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
MethodDeclaration
(node
) ->TypeParameter
->SimpleName
- isNamedMemberOf(BodyDeclaration<?>, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
NodeWithSimpleName
(bDecl
) ->SimpleName
, withname
as theSimpleName
. - isNotInitializedAndAssignedAtMostOnce(LocalVariableDeclaration) - Static method in class io.codemodder.ast.ASTs
-
Checks if a local variable is not initialized and is assigned at most once.
- isOpenSource(String) - Static method in class io.codemodder.DependencyLicenses
- isParameterizationCandidate(MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLParameterizer
- isPatternExprDeclarationOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
PatternExpr
(node
) ->SimpleName
- isReference(NameExpr) - Method in interface io.codemodder.ast.LocalDeclaration
-
Verifies if a given
NameExpr
is a reference to this variable/parameter. - isResource(VariableDeclarator) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
TryStmt
->VariableDeclarationExpr
->VariableDeclarator
(vd
) - isResource(VariableDeclarationExpr) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
TryStmt
->VariableDeclarationExpr
(vde
) - isResourceOf(Node, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
TryStmt
(node
) ->VariableDeclarationExpr
->VariableDeclarator
->SimpleName
(name
) - isReturnExpr(Expression) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ReturnStmt
->VariableDeclarator
->Expression
(expr
) - isRight() - Method in class io.codemodder.Either
-
Returns
true
if the right value is present. - isScopeInMethodCall(Expression) - Static method in class io.codemodder.ast.ASTs
-
Given an
Expression
expr
, check ifexpr
is the scope of aMethodCallExpr
. - isSuccess() - Method in interface io.codemodder.remediation.SuccessOrReason
-
Checks if the result is a success.
- issues() - Method in record class io.codemodder.remediation.FixCandidate
-
Returns the value of the
issues
record component. - isSupportedJdbcMethodCall(MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLParameterizer
-
Returns true if this is a fixable JDBC method name.
- isVariableDeclarationExprOf(Expression, String) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
VariableDeclarationExpr
(node
) ->VariableDeclarator
->SimpleName
(name
). - isVariableOfField(VariableDeclarator) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
FieldDeclaration
->VariableDeclarator
(vd
. - isVariableOfLocalDeclarationStmt(VariableDeclarator) - Static method in class io.codemodder.ast.ASTs
-
Test for this pattern:
ExpressionStmt
->VariableDeclarationExpr
->VariableDeclarator
(vd
).
J
- JAVA_SECURITY_TOOLKIT - Static variable in interface io.codemodder.DependencyGAV
-
The pixee Java Security Toolkit is required by many weaves/visitors, so we'll expose it here.
- JAVA_SECURITY_TOOLKIT_GAV - Static variable in interface io.codemodder.DependencyGAV
- JAVA_SECURITY_TOOLKIT_VERSION - Static variable in interface io.codemodder.DependencyGAV
- JavaDeserializationFixStrategy - Class in io.codemodder.remediation.javadeserialization
-
Default strategy to hardens deserialization vulnerabilities.
- JavaDeserializationFixStrategy() - Constructor for class io.codemodder.remediation.javadeserialization.JavaDeserializationFixStrategy
- JavaDeserializationRemediator<T> - Class in io.codemodder.remediation.javadeserialization
-
Fixes issues of related to object deserialization
- JavaDeserializationRemediator() - Constructor for class io.codemodder.remediation.javadeserialization.JavaDeserializationRemediator
- JavaParseException - Exception in io.codemodder.javaparser
-
Exception that indicates a failure to parse a Java file.
- JavaParseException(String) - Constructor for exception io.codemodder.javaparser.JavaParseException
- JavaParserChanger - Class in io.codemodder.javaparser
-
Uses JavaParser to change Java source files.
- JavaParserChanger() - Constructor for class io.codemodder.javaparser.JavaParserChanger
- JavaParserChanger(CodemodReporterStrategy) - Constructor for class io.codemodder.javaparser.JavaParserChanger
- JavaParserCodemodRunner - Class in io.codemodder.javaparser
- JavaParserCodemodRunner(JavaParserFacade, JavaParserChanger, Path, EncodingDetector) - Constructor for class io.codemodder.javaparser.JavaParserCodemodRunner
- JavaParserCodemodRunner(JavaParserFacade, JavaParserChanger, Path, IncludesExcludes, EncodingDetector) - Constructor for class io.codemodder.javaparser.JavaParserCodemodRunner
- JavaParserFacade - Interface in io.codemodder.javaparser
-
Responsible for parsing Java files and maintaining the compilation units across different accesses.
- JavaParserFactory - Interface in io.codemodder.javaparser
-
Responsible for generating
JavaParser
instances. - JavaParserTransformer - Class in io.codemodder.javaparser
-
A utility for making it easy to transform JavaParser ASTs.
- JavaParserTransformer.ExpressionWrapper - Interface in io.codemodder.javaparser
- JNDI - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- JNDIInjectionRemediator<T> - Class in io.codemodder.remediation.jndiinjection
-
Remediates JNDI injection vulnerabilities.
- JNDIInjectionRemediator() - Constructor for class io.codemodder.remediation.jndiinjection.JNDIInjectionRemediator
-
Remediator with the default strategy.
- JNDIInjectionRemediator(RemediationStrategy) - Constructor for class io.codemodder.remediation.jndiinjection.JNDIInjectionRemediator
-
A remediator with a chosen strategy
- justification() - Method in class io.codemodder.DependencyGAV.Default
- justification() - Method in interface io.codemodder.DependencyGAV
-
The justification for adding this dependency.
L
- label() - Element in annotation interface io.codemodder.CodemodParameter
-
A description of the parameter.
- LazyLoadingRuleSarif - Class in io.codemodder
- LazyLoadingRuleSarif(Provider<RuleSarif>) - Constructor for class io.codemodder.LazyLoadingRuleSarif
- left(A) - Static method in class io.codemodder.Either
-
Returns an
Either
containingvalue
as a left value. - LGPL_2_1 - Static variable in class io.codemodder.DependencyLicenses
- LGPL_3_0 - Static variable in class io.codemodder.DependencyLicenses
- license() - Method in class io.codemodder.DependencyGAV.Default
- license() - Method in interface io.codemodder.DependencyGAV
-
The license for this dependency.
- line() - Method in class io.codemodder.PathMatcher
- line() - Method in record class io.codemodder.Position
-
Returns the value of the
line
record component. - Line - Interface in io.codemodder
-
Represents a line of code.
- LinearizedStringExpression - Class in io.codemodder.ast
-
Linearizes a string expression
- LinearizedStringExpression(Expression) - Constructor for class io.codemodder.ast.LinearizedStringExpression
- lineIncludesExcludes() - Method in interface io.codemodder.CodemodInvocationContext
-
The includes/excludes for the file being changed.
- LineIncludesExcludes - Interface in io.codemodder
-
For a given file, this type provides an API for callers to understand if certain line numbers are allowed.
- LineIncludesExcludes.ExcludeBasedLineIncludesExcludes - Class in io.codemodder
-
Given a set of lines to exclude, determine if we should allow changes to this line.
- LineIncludesExcludes.IncludeBasedLineIncludesExcludes - Class in io.codemodder
-
Given a set of lines to include, determine if we should allow changes to this line.
- LineIncludesExcludes.MatchesEverything - Class in io.codemodder
- lineNumber() - Method in class io.codemodder.CodemodChange
-
The line number associated with the change.
- LineNumbers - Class in io.codemodder
-
Utilities related to line numbers.
- lines() - Method in interface io.codemodder.CodemodInvocationContext
-
Convenience method for stream-wise processing lines of the file being changed with line numbers.
- linesAffected() - Method in class io.codemodder.XPathStreamProcessChange.Default
- linesAffected() - Method in interface io.codemodder.XPathStreamProcessChange
-
The lines that were affected by the change.
- listJavaSourceDirectories(List<File>) - Method in class io.codemodder.SourceDirectoryLister.DefaultSourceDirectoryLister
-
This method turns the list of source code roots into resolved Java source code directories, with all the Java source files.
- listJavaSourceDirectories(List<File>) - Method in interface io.codemodder.SourceDirectoryLister
-
Return a sorted list of Java source directories.
- LocalDeclaration - Interface in io.codemodder.ast
-
A local declaration.
- LocalScope - Class in io.codemodder.ast
-
Contains the expressions and statements that span the scope of a local declaration.
- LocalVariableDeclaration - Class in io.codemodder.ast
-
Holds the nodes in the AST that represents several types of local declaration of a variable.
- LocalVariableDeclaration() - Constructor for class io.codemodder.ast.LocalVariableDeclaration
- LocalVariableDeclaratorExpectation(Optional<VariableDeclarator>) - Constructor for class io.codemodder.javaparser.ASTExpectations.LocalVariableDeclaratorExpectation
- LoggingConfigurator - Class in io.codemodder
-
A configurator for the log levels that defaults to "quiet" mode.
- LoggingConfigurator() - Constructor for class io.codemodder.LoggingConfigurator
- LOW - Enum constant in enum class io.codemodder.CodemodExecutionPriority
- LOW - Enum constant in enum class io.codemodder.Importance
M
- manifestChanges() - Method in interface io.codemodder.CodemodPackageUpdateResult
- map(Function<L, A>) - Method in class io.codemodder.Either
-
Applies
func
to the left value if present. - mapRight(Function<R, A>) - Method in class io.codemodder.Either
-
Applies
func
to the left value if present. - match(MethodCallExpr) - Static method in class io.codemodder.remediation.javadeserialization.JavaDeserializationFixStrategy
-
Match code shape for MethodCallExpr case
- match(ObjectCreationExpr) - Static method in class io.codemodder.remediation.javadeserialization.JavaDeserializationFixStrategy
-
Match code shape for ObjectCreationExpr case
- match(VariableDeclarationExpr) - Static method in class io.codemodder.remediation.javadeserialization.JavaDeserializationFixStrategy
-
Match code shape for AssignExpr case
- match(Node) - Static method in class io.codemodder.remediation.javadeserialization.JavaDeserializationFixStrategy
-
Default matching
- match(Node) - Method in class io.codemodder.remediation.MatchAndFixStrategy
-
Matches a node against an expected pattern for a fix.
- match(Node) - Static method in class io.codemodder.remediation.sqlinjection.SQLInjectionFixComposer
-
Check if the node is a JDBC API query method that is a target of a SQL injection transformation.
- match(Node, int) - Method in class io.codemodder.remediation.WithoutScopePositionMatcher
- match(Node, int) - Method in interface io.codemodder.remediation.NodePositionMatcher
-
Matches a node with a range against a line
- match(Node, int, int) - Method in class io.codemodder.remediation.WithoutScopePositionMatcher
- match(Node, int, int) - Method in interface io.codemodder.remediation.NodePositionMatcher
-
Matches a node with a range against a line range
- match(Node, int, int, int) - Method in class io.codemodder.remediation.WithoutScopePositionMatcher
- match(Node, int, int, int) - Method in interface io.codemodder.remediation.NodePositionMatcher
-
Matches a node with a range against a line range and column
- match(Node, int, int, int, int) - Method in class io.codemodder.remediation.WithoutScopePositionMatcher
- match(Node, int, int, int, int) - Method in interface io.codemodder.remediation.NodePositionMatcher
-
Matches a node with a range against another range
- MatchAndFixStrategy - Class in io.codemodder.remediation
-
Provides matching logic as well as a fix strategy
- MatchAndFixStrategy() - Constructor for class io.codemodder.remediation.MatchAndFixStrategy
- matchCall(MethodCallExpr) - Static method in class io.codemodder.remediation.sqlinjection.SQLTableInjectionFilterTransform
- matches(int) - Method in class io.codemodder.LineIncludesExcludes.ExcludeBasedLineIncludesExcludes
- matches(int) - Method in class io.codemodder.LineIncludesExcludes.IncludeBasedLineIncludesExcludes
- matches(int) - Method in interface io.codemodder.LineIncludesExcludes
-
Return true if the include/exclude rules allow changes to this line.
- matches(int) - Method in class io.codemodder.LineIncludesExcludes.MatchesEverything
- matches(SourceCodeRegion, Range) - Method in interface io.codemodder.RegionNodeMatcher
-
Return true if the given
Region
matches the givenRange
. - matches(File) - Method in class io.codemodder.PathMatcher
-
Return if this path matcher matches the given file.
- MATCHES_LINE - Static variable in interface io.codemodder.RegionNodeMatcher
- MATCHES_START - Static variable in interface io.codemodder.RegionNodeMatcher
-
Return true if the
Node
isRegion
start at the same location. - MatchesEverything() - Constructor for class io.codemodder.IncludesExcludes.MatchesEverything
- MatchesEverything() - Constructor for class io.codemodder.LineIncludesExcludes.MatchesEverything
- MEDIUM - Enum constant in enum class io.codemodder.Importance
- MERGE_AFTER_CURSORY_REVIEW - Enum constant in enum class io.codemodder.ReviewGuidance
- MERGE_AFTER_REVIEW - Enum constant in enum class io.codemodder.ReviewGuidance
- MERGE_WITHOUT_REVIEW - Enum constant in enum class io.codemodder.ReviewGuidance
- mergeConcatenatedLiterals(Expression) - Static method in class io.codemodder.ast.ASTTransforms
-
Given a string expression, merge any literals that are directly concatenated.
- mergeStackedTryStmts(TryStmt) - Static method in class io.codemodder.ast.ASTTransforms
-
Tries to merge the given try stmt with an enveloping one.
- MethodCallExpectation(Optional<MethodCallExpr>) - Constructor for class io.codemodder.javaparser.ASTExpectations.MethodCallExpectation
- MethodOrConstructor - Record Class in io.codemodder.remediation
-
Convenience type to represent a method or constructor call in our APIs that work with both.
- MethodOrConstructor(Node) - Constructor for record class io.codemodder.remediation.MethodOrConstructor
-
Creates an instance of a
MethodOrConstructor
record class. - MISSING_SECURE_FLAG - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- MissingSecureFlagFixStrategy - Class in io.codemodder.remediation.missingsecureflag
-
Default strategy to add missing secure flags in cookies.
- MissingSecureFlagFixStrategy() - Constructor for class io.codemodder.remediation.missingsecureflag.MissingSecureFlagFixStrategy
- MissingSecureFlagRemediator<T> - Class in io.codemodder.remediation.missingsecureflag
- MissingSecureFlagRemediator() - Constructor for class io.codemodder.remediation.missingsecureflag.MissingSecureFlagRemediator
- MIT - Static variable in class io.codemodder.DependencyLicenses
- ModularRemediationStrategy - Class in io.codemodder.remediation
-
Builds a remediation strategy from a function
- ModularRemediationStrategy(BiFunction<CompilationUnit, Node, SuccessOrReason>) - Constructor for class io.codemodder.remediation.ModularRemediationStrategy
- MPL_2_0 - Static variable in class io.codemodder.DependencyLicenses
- multipleNodesFound - Static variable in interface io.codemodder.remediation.RemediationMessages
-
Multiple nodes found at the given location and that may cause confusion
N
- name() - Element in annotation interface io.codemodder.CodemodParameter
-
The name of the parameter.
- newArray(String, Expression...) - Static method in class io.codemodder.javaparser.JavaParserTransformer
-
Creates a new array creation expression.
- newFactory() - Static method in interface io.codemodder.javaparser.JavaParserFactory
- next() - Method in class io.codemodder.ast.ASTs.ReverseEvaluationOrder
- noChanges - Static variable in interface io.codemodder.javaparser.ChangesResult
- node() - Method in record class io.codemodder.remediation.FixCandidate
-
Returns the value of the
node
record component. - node() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Returns the value of the
node
record component. - NodeCollector - Interface in io.codemodder
-
A type that can collect specific types of nodes from a
CompilationUnit
. - NodeExpectation(Node) - Constructor for class io.codemodder.javaparser.ASTExpectations.NodeExpectation
- NodePositionMatcher - Interface in io.codemodder.remediation
-
Provides methods for matching nodes to given coordinates.
- none() - Static method in interface io.codemodder.CodemodFileScanningResult
-
Creates an empty instance of
CodemodFileScanningResult
. - noNodesAtThatLocation - Static variable in interface io.codemodder.remediation.RemediationMessages
-
No nodes at that location
- NORMAL - Enum constant in enum class io.codemodder.CodemodExecutionPriority
- number() - Method in interface io.codemodder.Line
- NUMBER - Enum constant in enum class io.codemodder.CodemodParameter.ParameterType
O
- of(DefaultRuleSetting, List<String>) - Static method in interface io.codemodder.CodemodRegulator
- onChangeCreated(Path, String, CodeTFChange) - Method in interface io.codemodder.CodeTFProvider
-
Called when a change is created.
- onFileFound(CodemodInvocationContext, List<Result>) - Method in class io.codemodder.SarifPluginRawFileChanger
-
Creates a visitor for the given context and results.
- onRegionMatchingXMLEvent(XMLEventReader, XMLEventWriter, XMLEvent) - Method in interface io.codemodder.XMLEventHandler
-
Perform some action when an
XMLEvent
is determined to match a SARIF region. - onResultCreated(CodeTFResult) - Method in interface io.codemodder.CodeTFProvider
-
Called when a result is created.
- onResultFound(CodemodInvocationContext, CompilationUnit, T, Result) - Method in class io.codemodder.SarifPluginJavaParserChanger
-
Creates a visitor for the given context and locations.
- OUR_ROOT_LOGGER_NAME - Static variable in class io.codemodder.LoggingConfigurator
- overrideEntry(Path, String) - Method in interface io.codemodder.FileCache
-
Put the string contents of a file into the cache.
- OWASP_XSS_JAVA_ENCODER - Static variable in interface io.codemodder.DependencyGAV
-
There are multiple XSS rules require an XSS encoder.
P
- packageActions() - Method in interface io.codemodder.CodemodPackageUpdateResult
- packageChanges() - Method in interface io.codemodder.DependencyUpdateResult
-
An updated model of the changed files in the project, after the dependency update operation.
- Parameter - Interface in io.codemodder
-
A parameter for a codemod, capable of retrieving the right value for a given path and line.
- ParameterDeclaration - Class in io.codemodder.ast
-
Represents the declaration of a parameter in a method, constructor, lambda expression, and catch clause.
- ParameterDeclaration(Parameter) - Constructor for class io.codemodder.ast.ParameterDeclaration
- parseIntoMap(List<Path>, CodeDirectory) - Method in interface io.codemodder.SarifParser
- parseJavaFile(Path) - Method in interface io.codemodder.javaparser.JavaParserFacade
-
Return the
CompilationUnit
for the given Java file. - parsePattern(File, String) - Static method in interface io.codemodder.IncludesExcludes
- path() - Method in interface io.codemodder.CodemodInvocationContext
-
The individual file being changed.
- path() - Method in class io.codemodder.SourceDirectory.DefaultSourceDirectory
- path() - Method in interface io.codemodder.SourceDirectory
-
The filesystem path of the directory.
- PathMatcher - Class in io.codemodder
-
This type is used in include/exclude logic for matching paths.
- PathMatcher(FileSystem, File, String, Integer) - Constructor for class io.codemodder.PathMatcher
- Position - Record Class in io.codemodder
-
Represents a position in a source file.
- Position(Integer, Integer) - Constructor for record class io.codemodder.Position
-
Creates an instance of a
Position
record class. - PREDICTABLE_SEED - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- PredictableSeedRemediator<T> - Class in io.codemodder.remediation.predictableseed
-
Remediator for predictable seed weaknesses.
- PredictableSeedRemediator() - Constructor for class io.codemodder.remediation.predictableseed.PredictableSeedRemediator
- process(Path, String, XPathStreamEventHandler) - Method in interface io.codemodder.XPathStreamProcessor
-
Scan the given XML file for nodes that match the given XPath expression and hand them off to the given handler.
- ProjectProvider - Interface in io.codemodder
-
A type that plugins can implement to provide a project management functions to codemods.
Q
- QueryParameterizer - Class in io.codemodder.remediation.sqlinjection
-
This class is temporarily public -- it should ideally be hidden behind a package-private implementor in
io.codemodder.remediation.sqlinjection
that abstracts away all logic about remediating Hibernate injections. - QueryParameterizer(Expression) - Constructor for class io.codemodder.remediation.sqlinjection.QueryParameterizer
- question() - Element in annotation interface io.codemodder.CodemodParameter
-
The question to ask the user when they are prompted for this parameter.
R
- rawDocument() - Method in class io.codemodder.LazyLoadingRuleSarif
- rawDocument() - Method in class io.codemodder.RuleSarif.EmptyRuleSarif
- rawDocument() - Method in interface io.codemodder.RuleSarif
-
Return the entire SARIF as a model in case more comprehensive inspection is needed.
- RawFileChanger - Class in io.codemodder
-
Gives access to raw files for performing arbitrary changes.
- RawFileChanger() - Constructor for class io.codemodder.RawFileChanger
- RawFileChanger(CodemodReporterStrategy) - Constructor for class io.codemodder.RawFileChanger
- reason(String) - Static method in interface io.codemodder.remediation.SuccessOrReason
- REFLECTION_INJECTION - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- ReflectionInjectionFixStrategy - Class in io.codemodder.remediation.reflectioninjection
-
Default strategy to fix reflection injection vulnerabilities.
- ReflectionInjectionFixStrategy() - Constructor for class io.codemodder.remediation.reflectioninjection.ReflectionInjectionFixStrategy
- ReflectionInjectionRemediator<T> - Class in io.codemodder.remediation.reflectioninjection
- ReflectionInjectionRemediator() - Constructor for class io.codemodder.remediation.reflectioninjection.ReflectionInjectionRemediator
- RegexFileChanger - Class in io.codemodder
-
This type does the heavy lifting for many protections that can work in a simple "search-and-replace" pattern for non-Java code.
- RegexFileChanger(Pattern, boolean, List<DependencyGAV>) - Constructor for class io.codemodder.RegexFileChanger
- RegexFileChanger(Pattern, boolean, List<DependencyGAV>, CodemodReporterStrategy) - Constructor for class io.codemodder.RegexFileChanger
- REGION_INSIDE_RANGE - Static variable in interface io.codemodder.RegionNodeMatcher
-
Return true when the given
Region
is inside the givenRange
. - RegionNodeMatcher - Interface in io.codemodder
-
A type that can match a
Region
to aRange
for determining if we should change the node at this location. - remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.headerinjection.HeaderInjectionRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.javadeserialization.JavaDeserializationRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.jndiinjection.JNDIInjectionRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.missingsecureflag.MissingSecureFlagRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.predictableseed.PredictableSeedRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.reflectioninjection.ReflectionInjectionRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in interface io.codemodder.remediation.Remediator
-
Performs the work of performing all remediation, and returning reporting metadata.
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.SearcherStrategyRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.sqlinjection.SQLInjectionRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.ssrf.SSRFRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.weakrandom.WeakRandomRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.xss.XSSRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.xxe.XXEIntermediateXMLStreamReaderRemediator
- remediateAll(CompilationUnit, String, DetectorRule, Collection<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in class io.codemodder.remediation.xxe.XXERemediator
- RemediationMessages - Interface in io.codemodder.remediation
-
Holds common messages for remediation intended for human consumption as a part of CodeTF reporting
- RemediationStrategy - Interface in io.codemodder.remediation
- Remediator<T> - Interface in io.codemodder.remediation
-
Remediates findings for a given path.
- removeEmptyStringConcatenation(BinaryExpr) - Static method in class io.codemodder.ast.ASTTransforms
-
Removes concatenation with empty strings.
- removeEmptyStringConcatenation(Node) - Static method in class io.codemodder.ast.ASTTransforms
-
Removes all concatenations with empty strings in the given subtree.
- removeEntry(Path) - Method in interface io.codemodder.FileCache
-
Remove the string contents of a file from the cache if it exists.
- removeImportIfUnused(CompilationUnit, String) - Static method in class io.codemodder.ast.ASTTransforms
-
Remove an import if we can't find references to it in the code.
- removeUnusedLocalVariables(Node) - Static method in class io.codemodder.ast.ASTTransforms
-
Removes unused variables.
- replace(Expression) - Static method in class io.codemodder.javaparser.JavaParserTransformer
-
Useful for replacing an expression (method call or object creation) with a surrounding method call.
- ReplaceLimitedLookupStrategy - Class in io.codemodder.remediation.jndiinjection
-
Remediates JNDI injection vulnerabilities.
- ReplaceLimitedLookupStrategy() - Constructor for class io.codemodder.remediation.jndiinjection.ReplaceLimitedLookupStrategy
- reporter - Variable in class io.codemodder.javaparser.JavaParserChanger
- reporter - Variable in class io.codemodder.RawFileChanger
- reporter() - Method in enum class io.codemodder.remediation.GenericRemediationMetadata
-
Get the reporter strategy for this vulnerability class.
- repositoryUrl() - Method in class io.codemodder.DependencyGAV.Default
- repositoryUrl() - Method in interface io.codemodder.DependencyGAV
-
The repository URL for this dependency's source control.
- resolveLocalExpression(Expression) - Static method in class io.codemodder.ast.ASTs
-
Tries to find the source of an expression if it can be uniquely defined, otherwise, returns self.
- ResourceLeakFixer - Class in io.codemodder.remediation.resourceleak
-
A library that contains methods for automatically fixing resource leaks detected by CodeQL's rules "java/database-resource-leak", java/input-resource-leak, and java/output-resource-leak whenever possible.
- result() - Method in class io.codemodder.javaparser.ASTExpectations.ExpressionStatementExpectation
- result() - Method in class io.codemodder.javaparser.ASTExpectations.FieldAccessExpectation
- result() - Method in class io.codemodder.javaparser.ASTExpectations.LocalVariableDeclaratorExpectation
- result() - Method in class io.codemodder.javaparser.ASTExpectations.MethodCallExpectation
- result() - Method in class io.codemodder.javaparser.ASTExpectations.NameExpressionExpectation
- result() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
- result() - Method in class io.codemodder.javaparser.ASTExpectations.StringLiteralExpectation
- result() - Method in class io.codemodder.javaparser.ASTExpectations.VariableDeclarationExprExpectation
- reversePreOrderIterator(Node) - Static method in class io.codemodder.ast.ASTs
-
Returns an iterator for all the nodes in the AST that precedes
n
in the pre-order ordering. - reviewGuidance() - Element in annotation interface io.codemodder.Codemod
-
The review guidance for the changes introduced by this codemod
- ReviewGuidance - Enum Class in io.codemodder
-
Represents a codemod author's confidence that changes wll be safe and effective.
- right(B) - Static method in class io.codemodder.Either
-
Returns an
Either
containingvalue
as a right value. - RuleSarif - Interface in io.codemodder
-
Defines a model for interacting with SARIF.
- RuleSarif.EmptyRuleSarif - Class in io.codemodder
-
An empty implementation of
RuleSarif
for binding codemods with no SARIF results. - RuleSarifFactory - Interface in io.codemodder
-
Builds
RuleSarif
s. - run(CodemodInvocationContext) - Method in interface io.codemodder.CodemodRunner
-
Run the codemod on a single file.
- run(CodemodInvocationContext) - Method in class io.codemodder.javaparser.JavaParserCodemodRunner
- run(List<Class<? extends CodeChanger>>, String[]) - Static method in class io.codemodder.Runner
-
Runs the given codemods with CLI arguments you get from a main() method.
- run(List<Class<? extends CodeChanger>>, String[], PrintWriter, PrintWriter) - Static method in class io.codemodder.Runner
-
Runs the codemods with a set of customized streams.
- Runner - Class in io.codemodder
-
Provides an entrypoint for CLIs built with the codemodder framework.
S
- sarif - Variable in class io.codemodder.SarifPluginJavaParserChanger
- Sarif - Class in io.codemodder
-
Utility class for working with SARIF model objects.
- SarifFindingKeyUtil - Class in io.codemodder
-
Utility class for building keys for SARIF findings.
- SarifParser - Interface in io.codemodder
- SarifPluginJavaParserChanger<T extends com.github.javaparser.ast.Node> - Class in io.codemodder
-
Provides base functionality for making JavaParser-based changes based on results found by a sarif file.
- SarifPluginJavaParserChanger(RuleSarif, Class<? extends Node>) - Constructor for class io.codemodder.SarifPluginJavaParserChanger
- SarifPluginJavaParserChanger(RuleSarif, Class<? extends Node>, CodemodReporterStrategy) - Constructor for class io.codemodder.SarifPluginJavaParserChanger
- SarifPluginJavaParserChanger(RuleSarif, Class<? extends Node>, RegionNodeMatcher) - Constructor for class io.codemodder.SarifPluginJavaParserChanger
- SarifPluginJavaParserChanger(RuleSarif, Class<? extends Node>, RegionNodeMatcher, CodemodReporterStrategy) - Constructor for class io.codemodder.SarifPluginJavaParserChanger
- SarifPluginJavaParserChanger(RuleSarif, Class<? extends Node>, SourceCodeRegionExtractor<Result>) - Constructor for class io.codemodder.SarifPluginJavaParserChanger
- SarifPluginJavaParserChanger(RuleSarif, Class<? extends Node>, SourceCodeRegionExtractor<Result>, RegionNodeMatcher) - Constructor for class io.codemodder.SarifPluginJavaParserChanger
- SarifPluginJavaParserChanger(RuleSarif, Class<? extends Node>, SourceCodeRegionExtractor<Result>, RegionNodeMatcher, CodemodReporterStrategy) - Constructor for class io.codemodder.SarifPluginJavaParserChanger
- SarifPluginRawFileChanger - Class in io.codemodder
-
A
RawFileChanger
bundled with aRuleSarif
. - SarifPluginRawFileChanger(RuleSarif) - Constructor for class io.codemodder.SarifPluginRawFileChanger
- SarifPluginRawFileChanger(RuleSarif, CodemodReporterStrategy) - Constructor for class io.codemodder.SarifPluginRawFileChanger
- scope - Variable in class io.codemodder.ast.LocalVariableDeclaration
- search(CompilationUnit, String, DetectorRule, List<T>, Function<T, String>, Function<T, Integer>, Function<T, Optional<Integer>>, Function<T, Optional<Integer>>) - Method in interface io.codemodder.remediation.FixCandidateSearcher
-
Searches the AST for nodes associated with the given issues.
- SearcherStrategyRemediator<T> - Class in io.codemodder.remediation
-
Remediates issues with pairs of searchers and strategies.
- SearcherStrategyRemediator(Map<FixCandidateSearcher<T>, RemediationStrategy>) - Constructor for class io.codemodder.remediation.SearcherStrategyRemediator
- SearcherStrategyRemediator.Builder<T> - Class in io.codemodder.remediation
- shouldInspect(File) - Method in class io.codemodder.IncludesExcludes.Default
- shouldInspect(File) - Method in class io.codemodder.IncludesExcludes.MatchesEverything
- shouldInspect(File) - Method in interface io.codemodder.IncludesExcludes
-
Do we have any includes that include this file?
- shouldRun() - Method in interface io.codemodder.CodeChanger
-
A lifecycle event that is called before any files are processed.
- shouldRun() - Method in class io.codemodder.SarifPluginJavaParserChanger
- skippedPackages() - Method in interface io.codemodder.DependencyUpdateResult
-
The list of dependencies that were already available to the given file.
- SourceCodeRegion - Record Class in io.codemodder
-
Describes a region of source code.
- SourceCodeRegion(Position, Position) - Constructor for record class io.codemodder.SourceCodeRegion
-
Creates an instance of a
SourceCodeRegion
record class. - SourceCodeRegionExtractor<T> - Interface in io.codemodder
-
A type responsible for extracting a region from a result
- SourceDirectory - Interface in io.codemodder
-
Represent a normally-structured Java source code directory and all its files underneath it.
- SourceDirectory.DefaultSourceDirectory - Class in io.codemodder
- SourceDirectoryLister - Interface in io.codemodder
-
Represents a worker class that reads a list of repository roots and captures the Java source directories.
- SourceDirectoryLister.DefaultSourceDirectoryLister - Class in io.codemodder
- splitResources(TryStmt, int) - Static method in class io.codemodder.ast.ASTTransforms
-
Given a
TryStmt
split its resources into two nestedTryStmt
s. - SQL_INJECTION - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- SQLInjectionFixComposer - Class in io.codemodder.remediation.sqlinjection
-
Composes several transformations related to SQL injections.
- SQLInjectionFixComposer() - Constructor for class io.codemodder.remediation.sqlinjection.SQLInjectionFixComposer
- SQLInjectionRemediator<T> - Class in io.codemodder.remediation.sqlinjection
-
A Remediator for SQL injection issues.
- SQLInjectionRemediator() - Constructor for class io.codemodder.remediation.sqlinjection.SQLInjectionRemediator
- SQLParameterizer - Class in io.codemodder.remediation.sqlinjection
-
Contains most of the logic for detecting and fixing parameterizable SQL statements for a given
MethodCallExpr
. - SQLParameterizer(MethodCallExpr) - Constructor for class io.codemodder.remediation.sqlinjection.SQLParameterizer
- SQLParameterizer(MethodCallExpr, CompilationUnit) - Constructor for class io.codemodder.remediation.sqlinjection.SQLParameterizer
- SQLParameterizerWithCleanup - Class in io.codemodder.remediation.sqlinjection
- SQLTableInjectionFilterTransform - Class in io.codemodder.remediation.sqlinjection
-
Wrap table name parameters in SQL queries with an alphanumeric blacklist filter.
- SSRF - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- SSRFFixStrategy - Class in io.codemodder.remediation.ssrf
-
Default strategy to fix SSRF issues.
- SSRFFixStrategy() - Constructor for class io.codemodder.remediation.ssrf.SSRFFixStrategy
- SSRFRemediator<T> - Class in io.codemodder.remediation.ssrf
- SSRFRemediator() - Constructor for class io.codemodder.remediation.ssrf.SSRFRemediator
- start() - Method in record class io.codemodder.SourceCodeRegion
-
Returns the value of the
start
record component. - stream() - Method in class io.codemodder.ast.LocalScope
- STRING - Enum constant in enum class io.codemodder.CodemodParameter.ParameterType
- StringLiteralExpectation(Optional<StringLiteralExpr>) - Constructor for class io.codemodder.javaparser.ASTExpectations.StringLiteralExpectation
- success() - Static method in interface io.codemodder.remediation.SuccessOrReason
- success(List<DependencyGAV>) - Static method in interface io.codemodder.remediation.SuccessOrReason
- SuccessOrReason - Interface in io.codemodder.remediation
-
Represents the result of a strategy fix.
- supports(Path) - Method in interface io.codemodder.CodeChanger
-
A predicate which dictates if the file should be inspected by the codemod.
- supports(Path) - Method in interface io.codemodder.CodemodRunner
-
The
Predicate
that determines if this runner supports the given file. - supports(Path) - Method in class io.codemodder.CompositeJavaParserChanger
- supports(Path) - Method in class io.codemodder.javaparser.JavaParserChanger
- supports(Path) - Method in class io.codemodder.javaparser.JavaParserCodemodRunner
- supports(Path) - Method in class io.codemodder.SarifPluginJavaParserChanger
- supports(Path) - Method in class io.codemodder.SarifPluginRawFileChanger
T
- targetsLine() - Method in class io.codemodder.PathMatcher
- toBeExpressionStatement() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
-
Return an expectation that asserts the node is a
ExpressionStmt
. - toBeFieldAccessExpression() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
-
Return an expectation that asserts the node is a
FieldAccessExpr
. - toBeInitializedByMethodCall() - Method in class io.codemodder.javaparser.ASTExpectations.LocalVariableDeclaratorExpectation
-
Return an expectation that asserts that the initializer is a
MethodCallExpr
. - toBeMethodCallExpression() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
-
Return an expectation that asserts the node is a
MethodCallExpr
. - toBeNameExpression() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
-
Return an expectation that asserts the node is a
NameExpr
. - toBeSingleLocalVariableDefinition() - Method in class io.codemodder.javaparser.ASTExpectations.VariableDeclarationExprExpectation
-
Return an expectation that asserts the local variable declaration has only a single variable.
- toBeStringLiteral() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
- toBeVariableDeclarationStatement() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
-
Return an expectation that asserts the node is an
ExpressionStmt
with aVariableDeclarationExpr
for its expression. - toString() - Method in class io.codemodder.ast.LocalVariableDeclaration
- toString() - Method in class io.codemodder.ast.ParameterDeclaration
- toString() - Method in class io.codemodder.CodemodChange
- toString() - Method in class io.codemodder.DependencyGAV.Default
- toString() - Method in class io.codemodder.Either
- toString() - Method in class io.codemodder.IncludesExcludes.Default
- toString() - Method in class io.codemodder.IncludesExcludesPattern.Default
- toString() - Method in class io.codemodder.PathMatcher
- toString() - Method in record class io.codemodder.Position
-
Returns a string representation of this record class.
- toString() - Method in record class io.codemodder.remediation.FixCandidate
-
Returns a string representation of this record class.
- toString() - Method in record class io.codemodder.remediation.MethodOrConstructor
-
Returns a string representation of this record class.
- toString() - Method in record class io.codemodder.SourceCodeRegion
-
Returns a string representation of this record class.
- toString() - Method in class io.codemodder.SourceDirectory.DefaultSourceDirectory
- transformedXml() - Method in class io.codemodder.XPathStreamProcessChange.Default
- transformedXml() - Method in interface io.codemodder.XPathStreamProcessChange
-
A temporary file containing the transformed XML.
- TryResourceDeclaration - Class in io.codemodder.ast
-
Holds the nodes in the AST that represents a variable declaration as a try resource.
- TryResourceDeclaration(TryStmt, VariableDeclarationExpr, VariableDeclarator) - Constructor for class io.codemodder.ast.TryResourceDeclaration
- tryToFix(MethodCallExpr) - Static method in class io.codemodder.remediation.resourceleak.ResourceLeakFixer
-
Tries to fix the leak of
expr
and returns line if it does. - tryToFix(ObjectCreationExpr) - Static method in class io.codemodder.remediation.resourceleak.ResourceLeakFixer
- type() - Element in annotation interface io.codemodder.CodemodParameter
-
The type of the parameter.
U
- unfixableFindings() - Method in interface io.codemodder.remediation.FixCandidateSearchResults
-
The findings that for which we could not find potential fix locations.
- unfixedFindings() - Method in interface io.codemodder.CodemodFileScanningResult
-
Returns the results of the findings that were hoping to be addressed.
- UNLICENSE - Static variable in class io.codemodder.DependencyLicenses
- unmatchedIssues() - Method in interface io.codemodder.remediation.FixCandidateSearchResults
-
Issues that were not matched by this searcher
- updateDependencies(Path, Path, List<DependencyGAV>) - Method in interface io.codemodder.ProjectProvider
-
Given the file edited during codemod execution, attempt to update the dependencies in the project to allow referencing new types.
V
- validationPattern() - Element in annotation interface io.codemodder.CodemodParameter
-
A regex pattern that describes the valid values for this parameter.
- valueOf(String) - Static method in enum class io.codemodder.CodemodExecutionPriority
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class io.codemodder.CodemodParameter.ParameterType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class io.codemodder.DefaultRuleSetting
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class io.codemodder.Importance
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class io.codemodder.remediation.GenericRemediationMetadata
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class io.codemodder.ReviewGuidance
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class io.codemodder.CodemodExecutionPriority
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class io.codemodder.CodemodParameter.ParameterType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class io.codemodder.DefaultRuleSetting
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class io.codemodder.Importance
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class io.codemodder.remediation.GenericRemediationMetadata
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class io.codemodder.ReviewGuidance
-
Returns an array containing the constants of this enum class, in the order they are declared.
- vd - Variable in class io.codemodder.ast.LocalVariableDeclaration
- vde - Variable in class io.codemodder.ast.LocalVariableDeclaration
- vendorName() - Method in interface io.codemodder.FixOnlyCodeChanger
-
Detection tool name.
- version() - Method in class io.codemodder.DependencyGAV.Default
- version() - Method in interface io.codemodder.DependencyGAV
-
The version of the dependency.
- visit(CodemodInvocationContext, CompilationUnit) - Method in class io.codemodder.CompositeJavaParserChanger
- visit(CodemodInvocationContext, CompilationUnit) - Method in class io.codemodder.javaparser.JavaParserChanger
-
Called when a Java file, which has already been parsed into a compilation unit, is seen.
- visit(CodemodInvocationContext, CompilationUnit) - Method in class io.codemodder.SarifPluginJavaParserChanger
- visitFile(CodemodInvocationContext) - Method in class io.codemodder.RawFileChanger
-
Visit a file.
- visitFile(CodemodInvocationContext) - Method in class io.codemodder.RegexFileChanger
- visitFile(CodemodInvocationContext) - Method in class io.codemodder.SarifPluginRawFileChanger
W
- wantsSarifToolNames() - Method in interface io.codemodder.CodemodProvider
-
Tools this provider is interested in processing the SARIF output of.
- WEAK_RANDOM - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- WeakRandomRemediator<T> - Class in io.codemodder.remediation.weakrandom
- WeakRandomRemediator() - Constructor for class io.codemodder.remediation.weakrandom.WeakRandomRemediator
- withArguments() - Method in class io.codemodder.javaparser.ASTExpectations.MethodCallExpectation
-
Return an expectation that asserts the method call has 1+ arguments.
- withArgumentsSize(int) - Method in class io.codemodder.javaparser.ASTExpectations.MethodCallExpectation
-
Return an expectation that asserts the method call has a specific number of arguments.
- withBlockParent() - Method in class io.codemodder.javaparser.ASTExpectations.NodeExpectation
-
Return an expectation that asserts the parent node is a
BlockStmt
. - withDirectReferenceCount(int) - Method in class io.codemodder.javaparser.ASTExpectations.LocalVariableDeclaratorExpectation
-
Return an expectation that asserts the variable declaration has only a single variable.
- withExpression(Expression) - Method in interface io.codemodder.javaparser.CallReplacer
-
Performs the actual transformation of replacing the given expression another arbitrary expression.
- withFunctions(Predicate<Node>, BiFunction<CompilationUnit, Node, SuccessOrReason>) - Method in class io.codemodder.remediation.SearcherStrategyRemediator.Builder
- withMatchAndFixStrategy(MatchAndFixStrategy) - Method in class io.codemodder.remediation.SearcherStrategyRemediator.Builder
- withMatchAndFixStrategyAndNodeMatcher(MatchAndFixStrategy, NodePositionMatcher) - Method in class io.codemodder.remediation.SearcherStrategyRemediator.Builder
- withMatcher(Predicate<Node>) - Method in class io.codemodder.remediation.FixCandidateSearcher.Builder
- withMethodCallExpression() - Method in class io.codemodder.javaparser.ASTExpectations.ExpressionStatementExpectation
- withName(String) - Method in class io.codemodder.javaparser.ASTExpectations.MethodCallExpectation
-
Return an expectation that asserts the method call has a specific name.
- withNewArguments(NodeList<Expression>) - Method in interface io.codemodder.javaparser.CallReplacer.CallReplacerBuilder
-
Replace with a static method call with new arguments.
- withNodePositionMatcher(NodePositionMatcher) - Method in class io.codemodder.remediation.FixCandidateSearcher.Builder
- withOnlyChanges(List<CodemodChange>) - Static method in interface io.codemodder.CodemodFileScanningResult
-
Creates an instance of
CodemodFileScanningResult
with only changes. - WithoutScopePositionMatcher - Class in io.codemodder.remediation
-
Removes the range of the node's scope before matching it against a position.
- WithoutScopePositionMatcher() - Constructor for class io.codemodder.remediation.WithoutScopePositionMatcher
- withSameArguments() - Method in interface io.codemodder.javaparser.CallReplacer.CallReplacerBuilder
-
Replace with a static method call with the same arguments.
- withScopelessMethod(String) - Method in interface io.codemodder.javaparser.JavaParserTransformer.ExpressionWrapper
-
Performs the actual transformation of wrapping the given expression with the given scopeless method (e.g., a local method).
- withSearcherStrategyPair(FixCandidateSearcher<T>, RemediationStrategy) - Method in class io.codemodder.remediation.SearcherStrategyRemediator.Builder
- withSettings(File, List<String>, List<String>) - Static method in interface io.codemodder.IncludesExcludes
-
Create an
IncludesExcludes
. - withSingleVariableDeclarationExpression() - Method in class io.codemodder.javaparser.ASTExpectations.ExpressionStatementExpectation
- withStaticImport() - Method in interface io.codemodder.javaparser.CallReplacer.CallReplacerBuilder
-
Use a static import.
- withStaticMethod(String, String) - Method in interface io.codemodder.javaparser.CallReplacer
-
Performs the actual transformation of replacing the given expression a static method call.
- withStaticMethod(String, String, boolean) - Method in interface io.codemodder.javaparser.JavaParserTransformer.ExpressionWrapper
-
Performs the actual transformation of wrapping the given expression with the given static method.
- wrap(Expression) - Static method in class io.codemodder.javaparser.JavaParserTransformer
-
Useful for wrapping an expression with a surrounding method call.
- wrapIntoResource(ExpressionStmt, VariableDeclarationExpr, LocalScope) - Static method in class io.codemodder.ast.ASTTransforms
-
Given a local variable declaration
stmt
, wherevdecl
is a single initialized declaration of a variablev
with scopescope
,v
is never assigned in its scope, then wrap the declaration into as a resource of a try stmt.
X
- XMLEventHandler - Interface in io.codemodder
-
Type that gets used to modify an XML stream.
- XMLFixBuilder - Class in io.codemodder.remediation.xxe
-
Holds shared APIs for building nodes shared between XML fixers
- XMLFixBuilder() - Constructor for class io.codemodder.remediation.xxe.XMLFixBuilder
- XPathStreamEventHandler - Interface in io.codemodder
-
A handler for
XMLEvent
s that match an XPath expression. - XPathStreamProcessChange - Interface in io.codemodder
-
Represents the results when an XML file is transformed using
XPathStreamProcessor
. - XPathStreamProcessChange.Default - Class in io.codemodder
- XPathStreamProcessor - Interface in io.codemodder
-
Performs configurable actions on nodes that match XPath expressions.
- XSS - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- XSSRemediator<T> - Class in io.codemodder.remediation.xss
- XSSRemediator() - Constructor for class io.codemodder.remediation.xss.XSSRemediator
- XXE - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
- XXEIntermediateXMLStreamReaderRemediator<T> - Class in io.codemodder.remediation.xxe
- XXEIntermediateXMLStreamReaderRemediator() - Constructor for class io.codemodder.remediation.xxe.XXEIntermediateXMLStreamReaderRemediator
- XXERemediator<T> - Class in io.codemodder.remediation.xxe
- XXERemediator() - Constructor for class io.codemodder.remediation.xxe.XXERemediator
- XXERemediator(NodePositionMatcher) - Constructor for class io.codemodder.remediation.xxe.XXERemediator
Z
- ZIP_SLIP - Enum constant in enum class io.codemodder.remediation.GenericRemediationMetadata
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form