@@ -66,21 +66,15 @@ private EnumConstant getAContainedEnumConstant(Expr enumSetRef) {
6666private VarAccess getFileForPathConversion ( Expr pathExpr ) {
6767 pathExpr .getType ( ) .( RefType ) .hasQualifiedName ( "java.nio.file" , "Path" ) and
6868 (
69- /*
70- * Look for conversion from `File` to `Path` using `file.getPath()`.
71- */
72-
69+ // Look for conversion from `File` to `Path` using `file.getPath()`.
7370 exists ( MethodAccess fileToPath |
7471 fileToPath = pathExpr and
7572 result = fileToPath .getQualifier ( ) and
7673 fileToPath .getMethod ( ) .hasName ( "toPath" ) and
7774 fileToPath .getMethod ( ) .getDeclaringType ( ) .hasQualifiedName ( "java.io" , "File" )
7875 )
7976 or
80- /*
81- * Look for the pattern `Paths.get(file.get*Path())` for converting between a `File` and a `Path`.
82- */
83-
77+ // Look for the pattern `Paths.get(file.get*Path())` for converting between a `File` and a `Path`.
8478 exists ( MethodAccess pathsGet , MethodAccess fileGetPath |
8579 pathsGet = pathExpr and
8680 pathsGet .getMethod ( ) .hasName ( "get" ) and
@@ -99,10 +93,7 @@ private VarAccess getFileForPathConversion(Expr pathExpr) {
9993 * Holds if `fileAccess` is used in the `setWorldWritableExpr` to set the file to be world writable.
10094 */
10195private predicate fileSetWorldWritable ( VarAccess fileAccess , Expr setWorldWritable ) {
102- /*
103- * Calls to `File.setWritable(.., false)`.
104- */
105-
96+ // Calls to `File.setWritable(.., false)`.
10697 exists ( MethodAccess fileSetWritable |
10798 // A call to the `setWritable` method.
10899 fileSetWritable .getMethod ( ) instanceof SetWritable and
@@ -114,10 +105,7 @@ private predicate fileSetWorldWritable(VarAccess fileAccess, Expr setWorldWritab
114105 fileAccess = fileSetWritable .getQualifier ( )
115106 )
116107 or
117- /*
118- * Calls to `Files.setPosixFilePermissions(...)`.
119- */
120-
108+ // Calls to `Files.setPosixFilePermissions(...)`.
121109 exists ( MethodAccess setPosixPerms |
122110 setPosixPerms = setWorldWritable and
123111 setPosixPerms .getMethod ( ) .hasName ( "setPosixFilePermissions" ) and
@@ -132,10 +120,7 @@ private predicate fileSetWorldWritable(VarAccess fileAccess, Expr setWorldWritab
132120 getAContainedEnumConstant ( setPosixPerms .getArgument ( 1 ) ) .hasName ( "OTHERS_WRITE" )
133121 )
134122 or
135- /*
136- * Calls to something that indirectly sets the file permissions.
137- */
138-
123+ // Calls to something that indirectly sets the file permissions.
139124 exists ( Call call , int parameterPos , VarAccess nestedFileAccess , Expr nestedSetWorldWritable |
140125 call = setWorldWritable and
141126 fileSetWorldWritable ( nestedFileAccess , nestedSetWorldWritable ) and
0 commit comments