diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3da2535925..48766c44cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ Do not use Scala's feature to import multiple classes/objects from the same pack (This behavior can be configured in *IntelliJ*) ## Do Not Use Wildcard Imports -Do not used wildcard imports, e.g., `import scala.collection._`, unless you import a huge (> 48) number of classes for the same package. Such imports are very brittle and can lead to strange behavior. +Do not use wildcard imports, e.g., `import scala.collection._`, unless you import a huge (> 48) number of classes for the same package. Such imports are very brittle and can lead to strange behavior. (This behavior can be configured in *IntelliJ*) diff --git a/Changes.md b/Changes.md index ad70eedbc3..b387bca23d 100644 --- a/Changes.md +++ b/Changes.md @@ -90,9 +90,9 @@ ## 3.0.0 - Snapshot available since June 7th, 2019 - added a preliminary IFDS framework -- the Hermes and BugPicker UI projects were deleted (JavaFX was removed from the JDK 11 which makes the overall development and deplyoment process to cost intensive) +- the Hermes and BugPicker UI projects were deleted (JavaFX was removed from the JDK 11 which makes the overall development and deployment process to cost intensive) - Hermes was promoted to a real project: TOOLS/hermes -- renamed `DefaultOneStepAnalysis` to `ProjectAnalysisApplication`; added a new subclass `MethodAnalysisApplication` to facilitate the developmen of respective analysis +- renamed `DefaultOneStepAnalysis` to `ProjectAnalysisApplication`; added a new subclass `MethodAnalysisApplication` to facilitate the development of respective analysis - added support for analyses using the monotone framework; the monotone framework itself was added to `CFG` - the three-address code has been moved to its own subproject (`ThreeAddressCode`) in the folder OPAL/tac - fixed the name of the static analysis infrastructure project (the name of the project on Maven Central has changed) @@ -119,7 +119,7 @@ ## 2.0.1 - Released Oct. 10th 2018 - fixed a bug in the identification of closed strongly connected components -- fixed a bug when computing the stackmap table when a register store instruction is found in a try block of a finally handler and therefore is considered to be throwing an exception by the VM when it tries to verify the bytecode +- fixed a bug when computing the stackmap table when a register store instruction is found in a try block of a finally-handler and therefore is considered to be throwing an exception by the VM when it tries to verify the bytecode - fixed a bug when a simple property of an entity is queried in a later phase (after the analysis was run) and the analysis didn't compute a value ## 2.0.0 - Released Oct. 2nd 2018 @@ -130,13 +130,13 @@ - support for Java 11 - rewriting StringConcatFactory based invokedynamics - support for analyzing Scala 2.12.6-7 invokedynamics -- Hermes now has extended visualization capabilities to make it even easiere to comprehend the differences between projects -- the overall performance has been improved (in particular on multi-core systems with 4 or more cores) +- Hermes now has extended visualization capabilities to make it even easier to comprehend the differences between projects +- the overall performance has been improved (in particular on multicore systems with 4 or more cores) - moved to sbt 1.2.x - fixed issues in some tests which open a huge number of files - fixed a rare issue in the identification of closed strongly connected components - completely reimplemented the property store - - added various analyses related to deriving the purity of methods, the immutabiliy of classes, escape information etc. + - added various analyses related to deriving the purity of methods, the immutability of classes, escape information etc. - very much improved OPAL's collection library w.r.t. optimized data structures for Int values ## 1.0.0 - Released Oct. 25th 2017 @@ -162,9 +162,9 @@ ### General - the call graph construction algorithms finally completely support Java 8 (e.g., default methods, static methods in interfaces, lambda expressions) -- ***Assertions are turned-off by default when you checkout the latest stable release of OPAL***; to turn them on rename `local.sbt.template` to `local.sbt`; assertions are still turned on, when you depend on a development snapshot from Maven Central -- removed the Eclipse plug-in sub-project; it wasn't maintained anymore and is now replaced by the ATOM plug-in -- removed the Viz sub-project; it wasn't maintained anymore and OPAL has gained the possibility to generate SVGs using [a JavaScript based Graphviz version](https://github.com/mdaines/viz.js) which is executed using JDK's Nashorn JavaScript engine +- ***Assertions are turned-off by default when you check out the latest stable release of OPAL***; to turn them on rename `local.sbt.template` to `local.sbt`; assertions are still turned on, when you depend on a development snapshot from Maven Central +- removed the Eclipse plug-in subproject; it wasn't maintained anymore and is now replaced by the ATOM plug-in +- removed the Viz subproject; it wasn't maintained anymore and OPAL has gained the possibility to generate SVGs using [a JavaScript based Graphviz version](https://github.com/mdaines/viz.js) which is executed using JDK's Nashorn JavaScript engine - fixed several minor bugs and issues when analyzing bytecode which contains compile-time dead code; the Groovy compiler frequently generated (generates?) such code - renamed packages called "analysis" to "analyses" @@ -229,7 +229,7 @@ - the AI now prevents simple, unnecessary joins if a variable is known to be dead when multiple control flow paths join - added a simple live variables analysis to `br.Code.liveVariables` which computes liveness information for a code's locals (operand stack values are not considered because standard compilers generally don't create "dead operands" and the intended usage are performance and precision improvements) - refined the implementations of Graphs -- added efficient implementatin of Tarjan's algorithm for finding strongly connected components (the implementation can easily handle graphs with millions of nodes) +- added efficient implementation of Tarjan's algorithm for finding strongly connected components (the implementation can easily handle graphs with millions of nodes) - added support for converting dot files to SVG using vis-js.com - completely reworked `org.opalj.collection.immmutable.UIDSet`; instead of a simple binary search tree - which had significant scalability issues - we are now using a trie. - initial release of Hermes diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/CipherGetInstanceStrings.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/CipherGetInstanceStrings.scala index 3d2a5bf4bb..a06a043166 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/CipherGetInstanceStrings.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/CipherGetInstanceStrings.scala @@ -21,7 +21,7 @@ import org.opalj.br.instructions.INVOKESTATIC import org.opalj.br.instructions.LoadString /** - * The analysis demonstrates how to find values passed to Chipher.getInstance: + * The analysis demonstrates how to find values passed to Cipher.getInstance: * {{{ * static Chipher getInstance(String transformation) * static Cipher getInstance(String transformation, Provider provider) @@ -66,7 +66,7 @@ object CipherGetInstanceStrings extends ProjectsAnalysisApplication { case invoke @ INVOKEINTERFACE(ClassType.JavaSecurityKey, "getAlgorithm", JustReturnsString) => report.add(m.toJava(s"return value of ($pc): ${invoke.toString}")) - case get @ GETFIELD(_, _, _) => println("uknown value: " + get) + case get @ GETFIELD(_, _, _) => println("known value: " + get) case i => println("unsupported instruction: " + i) } } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/InfiniteRecursions.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/InfiniteRecursions.scala index b3802edac0..4494e84b47 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/InfiniteRecursions.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/InfiniteRecursions.scala @@ -77,7 +77,7 @@ object InfiniteRecursions extends ProjectsAnalysisApplication { } } if pcs.nonEmpty - result <- inifiniteRecursions(maxRecursionDepth, project, method, pcs) + result <- infiniteRecursions(maxRecursionDepth, project, method, pcs) } yield { result } (project, BasicReport(result.map(_.toString).mkString("\n"))) @@ -90,7 +90,7 @@ object InfiniteRecursions extends ProjectsAnalysisApplication { * `maxRecursionDepth` determines after how many non-recursive calls the analysis * is aborted. */ - def inifiniteRecursions( + def infiniteRecursions( maxRecursionDepth: Int, project: SomeProject, method: Method, @@ -117,8 +117,8 @@ object InfiniteRecursions extends ProjectsAnalysisApplication { if operandsArray(pc) ne null nextCallOperands: domain.Operands = operandsArray(pc).take(parametersCount) } { - // IntegerRangeValues and ReferenceValues have useable equals semantics - if (!callOperandsList.exists { _ == nextCallOperands }) + // IntegerRangeValues and ReferenceValues have usable equals semantics + if (!callOperandsList.contains(nextCallOperands)) callOperandsList = nextCallOperands :: callOperandsList } callOperandsList diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l0/ParameterUsageAnalysis.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l0/ParameterUsageAnalysis.scala index 7ff01ce88b..86869bc661 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l0/ParameterUsageAnalysis.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l0/ParameterUsageAnalysis.scala @@ -90,11 +90,11 @@ object ParameterUsageAnalysis extends ProjectsAnalysisApplication { } { t => analysisTime = t.toSeconds } - val occurences = returnedParameters.size + val occurrences = returnedParameters.size val report = BasicReport( returnedParameters.mkString("Directly returned parameters:\n", "\n", "\n\n") + unusedParameters.mkString("Unused parameters:\n", "\n", "\n\n") + - s"\nThe analysis took $analysisTime and found $occurences direct returns" + s"\nThe analysis took $analysisTime and found $occurrences direct returns" ) (project, report) } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/IfNullParameterAnalysis.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/IfNullParameterAnalysis.scala index 1a36185d89..b00b7e3a27 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/IfNullParameterAnalysis.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/IfNullParameterAnalysis.scala @@ -122,9 +122,10 @@ object IfNullParameterAnalysis extends ProjectsAnalysisApplication { domain1, // We need to keep the original location, otherwise // the correlation analysis would miserably fail! - ex.asInstanceOf[domain2.DomainSingleOriginReferenceValue].origin + ex.asInstanceOf[domain2.DomainSingleOriginReferenceValue] + .origin ).asInstanceOf[domain1.ExceptionValue] - ).toSet[domain1.DomainReferenceValue] + ) val diff = d1thrownException.diff(adaptedD2ThrownException) ++ adaptedD2ThrownException.diff(d1thrownException) diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/MethodReturnValuesAnalysis.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/MethodReturnValuesAnalysis.scala index b67f9f6b36..da6a9fc232 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/MethodReturnValuesAnalysis.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/MethodReturnValuesAnalysis.scala @@ -6,6 +6,7 @@ package l1 import java.io.File import java.net.URL +import scala.compiletime.uninitialized import org.opalj.ai.CorrelationalDomain import org.opalj.ai.Domain @@ -68,7 +69,7 @@ object MethodReturnValuesAnalysis extends ProjectsAnalysisApplication { private val originalReturnType: ReferenceType = method.descriptor.returnType.asReferenceType - private var theReturnedValue: DomainValue = null + private var theReturnedValue: DomainValue = uninitialized // e.g., a method that always throws an exception... def returnedValue: Option[DomainValue] = Option(theReturnedValue) @@ -88,7 +89,7 @@ object MethodReturnValuesAnalysis extends ProjectsAnalysisApplication { } } - // Test if it make sense to continue the abstract interpretation or if the + // Test if it makes sense to continue the abstract interpretation or if the // return value information is already not more precise than the "return type". theReturnedValue match { case rv @ TypeOfReferenceValue(UIDSet1(`originalReturnType`)) @@ -146,7 +147,7 @@ object MethodReturnValuesAnalysis extends ProjectsAnalysisApplication { case class RefinedReturnType(method: Method, refinedType: Option[Domain#DomainValue]) { - override def toString(): String = { + override def toString: String = { import Console.* "Refined the return type of " + BOLD + BLUE + method.toJava + " => " + GREEN + refinedType.getOrElse("\"NONE\" (the method does not return normally)") + RESET diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/Ownership.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/Ownership.scala index 4e212fc883..383912afe1 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/Ownership.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ai/domain/l1/Ownership.scala @@ -114,7 +114,7 @@ object OwnershipAnalysis extends ProjectsAnalysisApplication { case domain.DomainSingleOriginReferenceValueTag(sorv) => checkValue(sorv) case domain.DomainMultipleReferenceValuesTag(morv) => - morv.values.forall(checkValue(_)) + morv.values.forall { checkValue } } } } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/SimpleInstrumentationDemo.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/SimpleInstrumentationDemo.scala index 13154644c6..df09b2a6c3 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/SimpleInstrumentationDemo.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/SimpleInstrumentationDemo.scala @@ -10,14 +10,14 @@ class SimpleInstrumentationDemo { } def callsToString(): Unit = { - println("the length of the toString representation is: " + this.toString().length()) + println("the length of the toString representation is: " + this.toString.length()) } def returnsValue(i: Int): Int = { if (i % 2 == 0) - return -1; + -1 else - return 2; + 2 } def playingWithTypes(a: AnyRef): Unit = { diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/ThirdInstrumentation.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/ThirdInstrumentation.scala index c471e2688a..2567b8f299 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/ThirdInstrumentation.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/ba/ThirdInstrumentation.scala @@ -53,8 +53,8 @@ object ThirdInstrumentation extends App { val TheType = ClassType("org/opalj/ba/SimpleInstrumentationDemo") - // Let's load the class ( we need the RT Jar to compute appropriate supertypes for - // local variables and stack values during instrumentation. + // Let's load the class (we need JavaBase to compute appropriate supertypes for + // local variables and stack values during instrumentation). val f = new File(this.getClass.getResource("SimpleInstrumentationDemo.class").getFile) val p = Project(f.getParentFile, org.opalj.bytecode.JavaBase) implicit val classHierarchy: ClassHierarchy = p.classHierarchy // STRICTLY REQUIRED WHEN A StackMapTable NEEDS TO BE COMPUTED! @@ -113,10 +113,10 @@ object ThirdInstrumentation extends App { // whenever a method is called, we output its signature lCode.insert( // Note, we generally don't want to use Before, here! - // If we would use "Before" and would have a method like: + // If we used "Before" and would have a method like: // do { // } while(...) - // It could happen that the output would be printed each time the loop + // , it could happen that the output would be printed each time the loop // is evaluated. 0, InsertionPosition.At, @@ -164,7 +164,7 @@ object ThirdInstrumentation extends App { Seq( DUP, // duplicate the value GETSTATIC(SystemType, "out", PrintStreamType), // receiver - SWAP, // the int value is on top now.. + SWAP, // the int value is on top now... IFGT(gtTarget), // value is less than 0 LoadString("negative"), // top is the parameter, receiver is 2nd top most @@ -230,7 +230,7 @@ object ThirdInstrumentation extends App { if (!ite.getCause.isInstanceOf[RuntimeException]) { Console.err.println("Big Bug!") } else { - Console.out.println("Dead code successfully removedt!") + Console.out.println("Dead code successfully removed!") } } } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/DAandBR.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/DAandBR.scala index 2b0dbab214..2e67f321ff 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/DAandBR.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/DAandBR.scala @@ -216,7 +216,7 @@ object DAandBR extends App { val brClassFile = Java8Framework.ClassFile(() => new ByteArrayInputStream(assembledCF)).head val newBRMethods = brClassFile.methods - .filter(m => /*due some sophisticated analysis...*/ m.name == "") + .filter(m => /* do some sophisticated analysis...*/ m.name == "") .map[MethodTemplate](m => m.copy()) val newBRClassFile = brClassFile.copy(methods = newBRMethods) diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/HelloWorldClass.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/HelloWorldClass.scala index 6f6bb9d984..eb14a60b25 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/HelloWorldClass.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/bc/HelloWorldClass.scala @@ -206,5 +206,5 @@ object HelloWorldClass extends App { attributes = ArraySeq(SourceFile_attribute(32, 33)) ) - println("Created class file: " + Files.write(Paths.get("Test.class"), Assembler(cf)).toAbsolutePath()) + println("Created class file: " + Files.write(Paths.get("Test.class"), Assembler(cf)).toAbsolutePath) } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/FieldAccessInformationAnalysis.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/FieldAccessInformationAnalysis.scala index a3f78aa24f..9234162951 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/FieldAccessInformationAnalysis.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/FieldAccessInformationAnalysis.scala @@ -89,7 +89,7 @@ object FieldAccessInformationAnalysis extends ProjectsAnalysisApplication { } else { BasicReport( accessInformation.statistics - .mkString(s"determing field access information required $memoryUsage :\n", "\n", "\n") + .mkString(s"determining field access information required $memoryUsage :\n", "\n", "\n") ) } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/OverridingMethodsCount.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/OverridingMethodsCount.scala index d724994aa1..193c904796 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/OverridingMethodsCount.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/OverridingMethodsCount.scala @@ -40,7 +40,7 @@ object OverridingMethodsCount extends ProjectsAnalysisApplication { val overridingMethods = allOverridingMethods.map(m => m.classFile.fqn) val count = overridingMethods.size method.toJava( - overridingMethods.mkString(s"\n\thas $count overridde(s):\n\t\t", "\n\t\t", "\n") + overridingMethods.mkString(s"\n\thas $count override(s):\n\t\t", "\n\t\t", "\n") ) } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/MoreCheckers.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/MoreCheckers.scala index ecd55b0c6b..b05f313ae4 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/MoreCheckers.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/MoreCheckers.scala @@ -67,9 +67,9 @@ object MoreCheckers { } println(Console.BOLD + "WARMUP PHASE" + Console.RESET) - // for Scalatest - we use 8 warumup runs + // for Scalatest - we use 8 warmup runs // for Bugs.zip - we use 50 warmup runs - // for CLASSES.jar - we use 2 warumup runs + // for CLASSES.jar - we use 2 warmup runs for (i <- 1 to 2) { println("\n\n\n\n\n\n\n" + i + "=======================================================================" + i); // time(t => println("Performing all analyses took: "+nsToSecs(t))) { @@ -127,7 +127,7 @@ object MoreCheckers { field <- classFile.fields if field.isProtected } yield (classFile, field) } { t => collect("CI_CONFUSED_INHERITANCE", t /*nsToSecs(t)*/ ) } - println(", " /*"\tViolations: "*/ + protectedFields.size) + println(", " /*"\tViolations: "*/ + protectedFields.length) // FINDBUGS: CN: Class implements Cloneable but does not define or use clone method (CN_IDIOM) val cloneableNoClone = time { @@ -174,7 +174,7 @@ object MoreCheckers { if classHierarchy.isASubtypeOf(classFile.thisType, ClassType.Cloneable).isYesOrUnknown } yield (classFile.thisType.fqn, method.name) }(t => collect("CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE", t /*nsToSecs(t)*/ )) - println(", " /*"\tViolations: "*/ /*+cloneButNotCloneable.mkString(", ")*/ + cloneButNotCloneable.size) + println(", " /*"\tViolations: "*/ /*+cloneButNotCloneable.mkString(", ")*/ + cloneButNotCloneable.length) // FINDBUGS: Co: Abstract class defines covariant compareTo() method (CO_ABSTRACT_SELF) // FINDBUGS: Co: Covariant compareTo() method defined (CO_SELF_NO_OBJECT) @@ -201,7 +201,7 @@ object MoreCheckers { for { // we don't care about gc calls in java.lang and also about gc calls that happen inside of methods related to garbage collection (heuristic) classFile <- classFiles if !classFile.thisType.fqn.startsWith("java/lang"); method <- classFile.methods - if method.body.isDefined && !"(^gc)|(gc$)".r.findFirstIn(method.name).isDefined; + if method.body.isDefined && "(^gc)|(gc$)".r.findFirstIn(method.name).isEmpty; instruction <- method.body.get.instructions } { instruction match { @@ -255,7 +255,7 @@ object MoreCheckers { ) <- classFile.methods if method.isAbstract } yield (classFile, method); }(t => collect("EQ_ABSTRACT_SELF", t /*nsToSecs(t)*/ )) - println(", " /*"\tViolations: "*/ + abstractCovariantEquals.size) + println(", " /*"\tViolations: "*/ + abstractCovariantEquals.length) // FINDBUGS: FI: Finalizer should be protected, not public (FI_PUBLIC_SHOULD_BE_PROTECTED) val classesWithPublicFinalizeMethods = time { @@ -270,7 +270,7 @@ object MoreCheckers { // FINDBUGS: Se: Class is Serializable but its superclass doesn't define a void constructor (SE_NO_SUITABLE_CONSTRUCTOR) - // The following solution reports all pairs of seriablizable classes and their non-seriablizable + // The following solution reports all pairs of serializable classes and their non-seriablizable // superclasses that do not define a default constructor. // val classesWithoutDefaultConstructor = time(t => println("SE_NO_SUITABLE_CONSTRUCTOR: "+nsToSecs(t))) { // for ( @@ -292,7 +292,7 @@ object MoreCheckers { if getClassFile.isDefinedAt(superclass) // the class file of some supertypes (defined in libraries, which we do not analyze) may not be available superClassFile = getClassFile(superclass) if !superClassFile.isInterfaceDeclaration - if !superClassFile.constructors.exists(_.descriptor.parameterTypes.length == 0) + if !superClassFile.constructors.exists(_.descriptor.parameterTypes.isEmpty) } yield superclass // there can be at most one method }(t => collect("SE_NO_SUITABLE_CONSTRUCTOR", t /*nsToSecs(t)*/ )) println(", " /*"\tViolations: "*/ + classesWithoutDefaultConstructor.size); @@ -313,7 +313,7 @@ object MoreCheckers { case _ => } } - if (privateFields.size > 0) + if (privateFields.nonEmpty) unusedFields = (classFile, privateFields) :: unusedFields } }(t => collect("UUF_UNUSED_FIELD", t /*nsToSecs(t)*/ )) @@ -354,9 +354,9 @@ object MoreCheckers { classFile <- classFiles if classFile.isClassDeclaration case method @ MethodWithBody(body) <- classFile.methods exceptionHandler <- body.exceptionHandlers - if exceptionHandler.catchType == Some(IllegalMonitorStateExceptionType) + if exceptionHandler.catchType.contains(IllegalMonitorStateExceptionType) } yield (classFile, method) }(t => collect("IMSE_DONT_CATCH_IMSE", t /*nsToSecs(t)*/ )) - println(", " /*"\tViolations: "*/ + catchesIllegalMonitorStateException.size) + println(", " /*"\tViolations: "*/ + catchesIllegalMonitorStateException.length) } } diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/SimpleProjectStatistics.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/SimpleProjectStatistics.scala index 0533a14004..d61f7759ab 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/SimpleProjectStatistics.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/SimpleProjectStatistics.scala @@ -42,26 +42,17 @@ object SimpleProjectStatistics extends ProjectsAnalysisApplication { (group, es.size) } - val maxInstanceFieldsInAClass = - project.allClassFiles.map(_.fields.filter(f => !f.isStatic).size).max - val classWithMaxInstanceFields = - project.allClassFiles.find( - _.fields.filter(f => !f.isStatic).size == maxInstanceFieldsInAClass - ).map(_.thisType.toJava) - - val maxClassFieldsInAClass = - project.allClassFiles.map(_.fields.filter(f => f.isStatic).size).max - val classWithMaxClassFields = - project.allClassFiles.find( - _.fields.filter(f => f.isStatic).size == maxClassFieldsInAClass - ).map(_.thisType.toJava) - - val maxMethodsInAClass = - project.allClassFiles.map(_.methods.size).max - val classWithMaxMethods = - project.allClassFiles.find( - _.methods.size == maxMethodsInAClass - ).map(_.thisType.toJava) + val maxInstanceFieldsInAClass = project.allClassFiles.map(_.fields.count(f => !f.isStatic)).max + val classWithMaxInstanceFields = project.allClassFiles + .find(_.fields.count(f => !f.isStatic) == maxInstanceFieldsInAClass).map(_.thisType.toJava) + + val maxClassFieldsInAClass = project.allClassFiles.map(_.fields.count(f => f.isStatic)).max + val classWithMaxClassFields = project.allClassFiles + .find(_.fields.count(f => f.isStatic) == maxClassFieldsInAClass).map(_.thisType.toJava) + + val maxMethodsInAClass = project.allClassFiles.map(_.methods.size).max + val classWithMaxMethods = project.allClassFiles + .find(_.methods.size == maxMethodsInAClass).map(_.thisType.toJava) val (longestMethodInAClass, theLongestMethod) = { var max = 0 diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/observers/ObserverPatternUsage.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/observers/ObserverPatternUsage.scala index fe04b537cc..02d48fa1d7 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/observers/ObserverPatternUsage.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/br/analyses/observers/ObserverPatternUsage.scala @@ -38,8 +38,8 @@ object ObserverPatternUsage extends ProjectsAnalysisApplication { val appClassFiles = project.allProjectClassFiles val libClassFiles = project.allLibraryClassFiles println("Application:\n\tClasses:" + appClassFiles.size) - println("\tMethods:" + appClassFiles.foldLeft(0)(_ + _.methods.filter(!_.isSynthetic).size)) - println("\tNon-final Fields:" + appClassFiles.foldLeft(0)(_ + _.fields.filter(!_.isFinal).size)) + println("\tMethods:" + appClassFiles.foldLeft(0)(_ + _.methods.count(!_.isSynthetic))) + println("\tNon-final Fields:" + appClassFiles.foldLeft(0)(_ + _.fields.count(!_.isFinal))) println("Library:\n\tClasses:" + libClassFiles.size) println("Overall " + project.statistics) @@ -86,7 +86,7 @@ object ObserverPatternUsage extends ProjectsAnalysisApplication { } val allObserverTypes = allObserverInterfaces ++ - // we also want to include classes such as WindowAdapater which are + // we also want to include classes such as WindowAdapter which are // pure implementations of an observer interface (allObservers filter { observerType => if (project.classFile(observerType).isDefined) { // check that the project is complete diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/fpcf/analyses/UnnecessarySynchronizationAnalysis.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/fpcf/analyses/UnnecessarySynchronizationAnalysis.scala index 94dd94eef0..978e94dc89 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/fpcf/analyses/UnnecessarySynchronizationAnalysis.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/fpcf/analyses/UnnecessarySynchronizationAnalysis.scala @@ -49,7 +49,7 @@ object UnnecessarySynchronizationAnalysis extends ProjectsAnalysisApplication { ): (Project[URL], BasicReport) = { val (project, _) = analysisConfig.setupProject(cp) val (propertyStore, _) = analysisConfig.setupPropertyStore(project) - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) time { project.get(FPCFAnalysesManagerKey).runAll( diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/AvailableExpressionsDemo.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/AvailableExpressionsDemo.scala index d7bdb17c02..13b3a5e776 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/AvailableExpressionsDemo.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/AvailableExpressionsDemo.scala @@ -2,7 +2,7 @@ package org.opalj package tac -/** Just a very simple class to demonstrate the available expressions analysis. */ +/** Just a very simple class to demonstrate the available-expressions analysis. */ class AvailableExpressionsDemo { def simple(a: Int, b: Int): Unit = { diff --git a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/VeryBusyExpressionsDemo.scala b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/VeryBusyExpressionsDemo.scala index 92f9b9964f..40fb69679a 100644 --- a/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/VeryBusyExpressionsDemo.scala +++ b/DEVELOPING_OPAL/demos/src/main/scala/org/opalj/tac/VeryBusyExpressionsDemo.scala @@ -4,7 +4,7 @@ package org.opalj package tac /** - * Just a very simple class to demonstrate the very busy expressions analysis. + * Just a very simple class to demonstrate the very-busy-expressions analysis. * * @author Michael Eichberg */ diff --git a/DEVELOPING_OPAL/doc/Classes with guaranteed invalid bytecode.md b/DEVELOPING_OPAL/doc/Classes with guaranteed invalid bytecode.md index aa634817f8..2de720af38 100644 --- a/DEVELOPING_OPAL/doc/Classes with guaranteed invalid bytecode.md +++ b/DEVELOPING_OPAL/doc/Classes with guaranteed invalid bytecode.md @@ -2,7 +2,7 @@ Here, ___invalid___ means that the code cannot successfully be executed by the JVM or will already be rejected by the bytecode verifier. -An abstract interpretation of the the following methods will lead to various "problems/exceptions": +An abstract interpretation of the following methods will lead to various "problems/exceptions": - `com.drahtwerk.drahtkern.q{ void onCreate(android.os.Bundle) }` NullPointerException due to the load of an empty register: __a_load(7)@49__ diff --git a/DEVELOPING_OPAL/plugins/sbt-java-fixture-compiler/Readme.md b/DEVELOPING_OPAL/plugins/sbt-java-fixture-compiler/Readme.md index 4bcf5cec90..f17cfe34bc 100644 --- a/DEVELOPING_OPAL/plugins/sbt-java-fixture-compiler/Readme.md +++ b/DEVELOPING_OPAL/plugins/sbt-java-fixture-compiler/Readme.md @@ -43,7 +43,7 @@ The definitions and implementations of the tasks (compile, package, discovery) r and reside within `org.opalj.javacompilation.FixtureCompileSpec.scala`. -In the following, we discuss how to setup the plugin to find all java fixtures and how to compile them automatically using the discovery task and fixture-specific configuration files. For doing it all manually, the user may set the `javaFixtureTaskDefs` setting to a sequence of `org.opalj.javacompilation.JavaFixtureCompilationTask` task descriptions. The intricacies of this approach are not discussed here; it is straightforward though to instantiate custom compilation tasks with the configuration semantics that are also used with the automated discovery. See `org.opalj.javacompilation.FixtureCompileSpec.scala` for inline documentation of the `JavaFixtureCompilationTask` class. +In the following, we discuss how to set up the plugin to find all java fixtures and how to compile them automatically using the discovery task and fixture-specific configuration files. For doing it all manually, the user may set the `javaFixtureTaskDefs` setting to a sequence of `org.opalj.javacompilation.JavaFixtureCompilationTask` task descriptions. The intricacies of this approach are not discussed here; it is straightforward though to instantiate custom compilation tasks with the configuration semantics that are also used with the automated discovery. See `org.opalj.javacompilation.FixtureCompileSpec.scala` for inline documentation of the `JavaFixtureCompilationTask` class. The version of the Eclipse JDT compiler is set statically in the plugin's `build.sbt` file. @@ -86,7 +86,7 @@ The compiler.config file is optional. In short, its content are distinct lines f - _comments_ -- any line starting with a `#` - _requires_ specification -- the line `requires=lib1` makes the support library `lib1` from the above exemplaric directory structure available on the classpath - - _command line parameters_ -- any line starting with a dash, e. g. `-1.8 -g -parameters -genericsignature`. + - _command line parameters_ -- any line starting with a dash, e.g. `-1.8 -g -parameters -genericsignature`. For a reference of the Eclipse JDT compiler command line options, please refer to `jdtcompiler.txt`. A more complete specification on the format of fixture-specific .config files (that include command-line arguments and "require" specifications of support libraries) can be found in the file `OPAL/bi/src/test/fixtures-java/Readme.md`. @@ -102,7 +102,7 @@ the fixture projects are taken to be located under `src/main/...`, while with th fixture projects directory is by default located under `src/test`. We will go one step further and change the name of that projects directory as an example. -First, every project that wants to use the plugin has to do so explicitely: +First, every project that wants to use the plugin has to do so explicitly: ``` lazy val proj = Project( diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ClassHierarchyVisualizer.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ClassHierarchyVisualizer.scala index 27a2133b48..ac27e7e078 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ClassHierarchyVisualizer.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ClassHierarchyVisualizer.scala @@ -34,7 +34,8 @@ object ClassHierarchyVisualizer extends ProjectsAnalysisApplication { val (project, _) = analysisConfig.setupProject(cp) - val dotGraph = toDot(Set(project.classHierarchy.toGraph()), "back") + val dotGraph = toDot(Set(project.classHierarchy.toGraph), "back") + val file = writeAndOpen(dotGraph, "ClassHierarchy", ".gv") println(s"Wrote class hierarchy graph to: $file.") } diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleEvaluationTracer.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleEvaluationTracer.scala index 6ca59cdaa8..8deebda5bf 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleEvaluationTracer.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleEvaluationTracer.scala @@ -35,7 +35,7 @@ trait ConsoleEvaluationTracer extends AITracer { def reset(): Unit = { indent = 0 } - override def instructionEvalution( + override def instructionEvaluation( domain: Domain )( pc: Int, diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleTracer.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleTracer.scala index 31d93c8da8..dc5978a640 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleTracer.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/ConsoleTracer.scala @@ -9,8 +9,8 @@ import org.opalj.ai.Domain import org.opalj.ai.NoUpdate import org.opalj.ai.SomeUpdate import org.opalj.ai.Update -import org.opalj.ai.domain import org.opalj.ai.domain.TheCode +import org.opalj.ai.domain.l1.ReferenceValues import org.opalj.br.Code import org.opalj.br.instructions.Instruction import org.opalj.collection.mutable.IntArrayStack @@ -68,10 +68,10 @@ trait ConsoleTracer extends AITracer { tracer => case rv: IsReferenceValue if rv.allValues.size > 1 => val values = rv.allValues val t = - if (rv.isInstanceOf[domain.l1.ReferenceValues#TheReferenceValue]) - s";refId=${rv.asInstanceOf[org.opalj.ai.domain.l1.ReferenceValues#TheReferenceValue].refId}" - else - "" + rv match { + case value1: ReferenceValues#TheReferenceValue => s";refId=${value1.refId}" + case _ => "" + } values.map(toStringWithOID(_)).mkString("OneOf[" + values.size + "](", ",", ")") + rv.upperTypeBound.map(_.toJava).mkString(";lutb=", " with ", ";") + s"isPrecise=${rv.isPrecise};isNull=${rv.isNull}$t " + @@ -91,7 +91,7 @@ trait ConsoleTracer extends AITracer { tracer => } } - override def instructionEvalution( + override def instructionEvaluation( domain: Domain )( pc: Int, @@ -115,7 +115,7 @@ trait ConsoleTracer extends AITracer { tracer => val ps = { val ps = domain.properties(pc) - if ((ps eq null) || ps == None) + if ((ps eq null) || ps.isEmpty) "" else { s"\tproperties: ${ps.get}\n" @@ -173,7 +173,7 @@ trait ConsoleTracer extends AITracer { tracer => override def deadLocalVariable(domain: Domain)(pc: Int, lvIndex: Int): Unit = { println( - pc.toString + line(domain, pc).toString + ":" + + pc.toString + line(domain, pc) + ":" + Console.BLACK_B + Console.WHITE + s"local variable $lvIndex is dead" ) } @@ -382,7 +382,7 @@ trait ConsoleTracer extends AITracer { tracer => ): Unit = { val loc = pc.map(pc => s"$pc:").getOrElse("") println( - s"$loc[Domain:${source.getSimpleName().split('$')(0)} - $typeID] $message" + s"$loc[Domain:${source.getSimpleName.split('$')(0)} - $typeID] $message" ) } } diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretAllMethods.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretAllMethods.scala index dbd402400a..191a240000 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretAllMethods.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretAllMethods.scala @@ -121,7 +121,7 @@ object InterpretMethodsAnalysis { RED + "[aborted after evaluating " + ai.currentEvaluationCount + " instructions (size of instructions array=" + - body.instructions.size + + body.instructions.length + "; max=" + ai.maxEvaluationCount + ")]" + RESET ) @@ -205,12 +205,12 @@ object InterpretMethodsAnalysis { methodsCount.get + " methods (of " + project.methodsCount + ") in " + project.classFilesCount + " classes (real time: " + getTime(Symbol("OVERALL")).toSeconds + ", ai (∑CPU Times): " + getTime(Symbol("AI")).toSeconds + - ")" + collectedExceptions.size + " exceptions occured.", + ")" + collectedExceptions.size + " exceptions occurred.", Some(file) ) } else { ( - "No exceptions occured during the interpretation of " + + "No exceptions occurred during the interpretation of " + methodsCount.get + " methods (of " + project.methodsCount + ") in " + project.classFilesCount + " classes\nreal time: " + getTime(Symbol("OVERALL")).toSeconds + "\n" + "ai (∑CPU Times): " + getTime(Symbol("AI")).toSeconds + diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretMethods.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretMethods.scala index f9d051bee7..c4df882945 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretMethods.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/InterpretMethods.scala @@ -200,7 +200,7 @@ object InterpretMethods extends MethodAnalysisApplication { aiState + ife.cause.getStackTrace.mkString("\n
  • ", "
  • \n
  • ", "
\n") + "
" + causeToString(ife, true) + "
" case e: Throwable => - val message = e.getMessage() + val message = e.getMessage if (message != null) aiState + "
Underlying cause: " + util.XHTML.htmlify(message) else diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/XHTMLTracer.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/XHTMLTracer.scala index 25c6207b3b..95e0dcc435 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/XHTMLTracer.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/debug/XHTMLTracer.scala @@ -3,6 +3,7 @@ package org.opalj package support package debug +import scala.compiletime.uninitialized import scala.xml.Node import org.opalj.ai.AIResult @@ -70,7 +71,7 @@ trait XHTMLTracer extends AITracer { "new …" + classType.simpleName; case CHECKCAST(referenceType) => "checkcast " + referenceType.toJava; - case LoadString(s) if s.size < 5 => + case LoadString(s) if s.length < 5 => "Load \"" + s + "\""; case LoadString(s) => "Load \"" + s.substring(0, 4) + "…\"" @@ -250,7 +251,7 @@ trait XHTMLTracer extends AITracer { } - private var code: Code = null + private var code: Code = uninitialized override def initialLocals(domain: Domain)(locals: domain.Locals): Unit = { /*EMPTY*/ } @@ -298,7 +299,7 @@ trait XHTMLTracer extends AITracer { /*ignored for now*/ } - override def instructionEvalution( + override def instructionEvaluation( domain: Domain )( pc: Int, @@ -394,7 +395,7 @@ trait XHTMLTracer extends AITracer { ): Unit = { /*EMPTY*/ } def result(result: AIResult): Unit = { - writeAndOpen(dumpXHTML((new java.util.Date).toString()), "AITrace", ".html") + writeAndOpen(dumpXHTML((new java.util.Date).toString), "AITrace", ".html") } } diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/APICallsStringAnalysis.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/APICallsStringAnalysis.scala index 7d8e7a0981..0e3bcaacfc 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/APICallsStringAnalysis.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/APICallsStringAnalysis.scala @@ -87,7 +87,7 @@ object APICallsStringAnalysis extends ProjectsAnalysisApplication { private val onlyMethodHandleArg = new PlainArg[Boolean] { override val name: String = "onlyMethodHandle" - override val description: String = "Only identify MethdoHandle reflection API calls" + override val description: String = "Only identify MethdodHandle reflection API calls" override val defaultValue: Option[Boolean] = Some(false) } @@ -149,7 +149,7 @@ object APICallsStringAnalysis extends ProjectsAnalysisApplication { "javax.crypto.SecretKeyFactory#getInstance" ) - private def getRelevantMethods(): Set[String] = { + private def getRelevantMethods: Set[String] = { var result = Set.empty[String] if (!(apply(onlyCryptoArg) || apply(onlyMethodHandleArg))) @@ -162,7 +162,7 @@ object APICallsStringAnalysis extends ProjectsAnalysisApplication { result } - val relevantMethodNames = getRelevantMethods() + val relevantMethodNames = getRelevantMethods } protected type ConfigType = APICallsConfig diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/CallGraph.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/CallGraph.scala index b140ed80ff..cd70aa09cd 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/CallGraph.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/CallGraph.scala @@ -96,7 +96,7 @@ object CallGraph extends ProjectsAnalysisApplication { ): (Project[URL], BasicReport) = { val (project, projectTime) = analysisConfig.setupProject() implicit val (ps: PropertyStore, propertyStoreTime: Seconds) = analysisConfig.setupPropertyStore(project) - val (cg, callGraphTime) = analysisConfig.setupCallGaph(project) + val (cg, callGraphTime) = analysisConfig.setupCallGraph(project) implicit val declaredMethods: DeclaredMethods = project.get(DeclaredMethodsKey) val allMethods = declaredMethods.declaredMethods.filter { dm => diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/EscapeAnalysis.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/EscapeAnalysis.scala index da5d9b96a9..8bc846ffb8 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/EscapeAnalysis.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/EscapeAnalysis.scala @@ -82,7 +82,7 @@ object EscapeAnalysis extends ProjectsAnalysisApplication { if (analysisConfig.analysis eq EagerSimpleEscapeAnalysis) { manager.runAll(EagerSimpleEscapeAnalysis, LazyL0BaseAIAnalysis, TACAITransformer) } else { - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) manager.runAll(EagerInterProceduralEscapeAnalysis) } } { t => info("progress", s"escape analysis took ${t.toSeconds}")(using project.logContext) } diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/FieldLocality.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/FieldLocality.scala index a0dd179237..a67f78d4c8 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/FieldLocality.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/FieldLocality.scala @@ -46,7 +46,7 @@ object FieldLocality extends ProjectsAnalysisApplication { ): (Project[URL], BasicReport) = { val (project, _) = analysisConfig.setupProject(cp) val (ps, _) = analysisConfig.setupPropertyStore(project) - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) time { project.get(FPCFAnalysesManagerKey).runAll( diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Immutability.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Immutability.scala index 7fafb24a9a..9b61bbf176 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Immutability.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Immutability.scala @@ -500,7 +500,7 @@ object Immutability extends ProjectsAnalysisApplication { | | results folder: ${analysisConfig.get(OutputDirArg)} | - | CofigurationName: ${analysisConfig(ConfigurationNameArg)} + | ConfigurationName: ${analysisConfig(ConfigurationNameArg)} | | AI domain: ${analysisConfig(DomainArg)} | diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/MaxLocalsEvaluation.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/MaxLocalsEvaluation.scala index a9326af2f5..ed5284ad98 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/MaxLocalsEvaluation.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/MaxLocalsEvaluation.scala @@ -35,7 +35,7 @@ object MaxLocalsEvaluation extends ProjectsAnalysisApplication { ): (Project[URL], BasicReport) = { import scala.collection.immutable.TreeMap // <= Sorted... var methodParametersDistribution: Map[Int, Int] = TreeMap.empty - var maxLocalsDistrbution: Map[Int, Int] = TreeMap.empty + var maxLocalsDistribution: Map[Int, Int] = TreeMap.empty val (project, _) = analysisConfig.setupProject(cp) @@ -50,8 +50,8 @@ object MaxLocalsEvaluation extends ProjectsAnalysisApplication { methodParametersDistribution = methodParametersDistribution.updated(parametersCount, methodParametersFrequency) - val newMaxLocalsCount = maxLocalsDistrbution.getOrElse(body.maxLocals, 0) + 1 - maxLocalsDistrbution = maxLocalsDistrbution.updated(body.maxLocals, newMaxLocalsCount) + val newMaxLocalsCount = maxLocalsDistribution.getOrElse(body.maxLocals, 0) + 1 + maxLocalsDistribution = maxLocalsDistribution.updated(body.maxLocals, newMaxLocalsCount) } ( @@ -62,7 +62,7 @@ object MaxLocalsEvaluation extends ProjectsAnalysisApplication { methodParametersDistribution.map(kv => { val (k, v) = kv; s"$k\t\t$v" }).mkString("\n") + "\n\n" + "MaxLocals Distribution:\n" + "#Locals\t\tFrequency:\n" + - maxLocalsDistrbution.map(kv => { val (k, v) = kv; s"$k\t\t$v" }).mkString("\n")) + maxLocalsDistribution.map(kv => { val (k, v) = kv; s"$k\t\t$v" }).mkString("\n")) ) } } diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/PureVoidMethods.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/PureVoidMethods.scala index 59fc866639..d8e90e2aa2 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/PureVoidMethods.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/PureVoidMethods.scala @@ -29,7 +29,7 @@ import org.opalj.tac.fpcf.analyses.fieldassignability.LazyL1FieldAssignabilityAn import org.opalj.tac.fpcf.analyses.purity.EagerL2PurityAnalysis /** - * Identifies pure/side-effect free methods with a void return type. + * Identifies pure/side-effect-free methods with a void return type. * * @author Dominik Helm */ @@ -51,7 +51,7 @@ object PureVoidMethods extends ProjectsAnalysisApplication { ): (Project[URL], BasicReport) = { val (project, _) = analysisConfig.setupProject(cp) val (ps, _) = analysisConfig.setupPropertyStore(project) - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) project.get(FPCFAnalysesManagerKey).runAll( EagerFieldAccessInformationAnalysis, diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Purity.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Purity.scala index 5f4d189d53..99f26a0934 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Purity.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/Purity.scala @@ -399,7 +399,7 @@ object Purity extends ProjectsAnalysisApplication { ps.toString(false) + "\ncompile-time pure: " + compileTimePure.size + "\nAt least pure: " + pure.size + - "\nAt least domain-specficic pure: " + dPure.size + + "\nAt least domain-specific pure: " + dPure.size + "\nAt least side-effect free: " + sideEffectFree.size + "\nAt least d-s side effect free: " + dSideEffectFree.size + "\nAt least externally pure: " + externallyPure.size + diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ReturnValueFreshness.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ReturnValueFreshness.scala index a22edec408..46ce4db25f 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ReturnValueFreshness.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ReturnValueFreshness.scala @@ -47,7 +47,7 @@ object ReturnValueFreshness extends ProjectsAnalysisApplication { ): (Project[URL], BasicReport) = { val (project, _) = analysisConfig.setupProject(cp) val (ps, _) = analysisConfig.setupPropertyStore(project) - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) project.get(FPCFAnalysesManagerKey).runAll( EagerFieldAccessInformationAnalysis, diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ThrownExceptions.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ThrownExceptions.scala index ac43e77137..4fa87e8f62 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ThrownExceptions.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/ThrownExceptions.scala @@ -82,7 +82,7 @@ object ThrownExceptions extends ProjectsAnalysisApplication { ps.waitOnPhaseCompletion() ps } else /* if no analysis level is specified or L1 */ { - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) project.get(FPCFAnalysesManagerKey).runAll( EagerL1ThrownExceptionsAnalysis ) diff --git a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/UnusedResults.scala b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/UnusedResults.scala index 6cc28f77c6..6d0b249a1a 100644 --- a/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/UnusedResults.scala +++ b/DEVELOPING_OPAL/tools/src/main/scala/org/opalj/support/info/UnusedResults.scala @@ -46,7 +46,7 @@ import org.opalj.tac.fpcf.properties.TACAI import org.opalj.value.ValueInformation /** - * Identifies calls to pure/side-effect free methods where the results are not used subsequently. + * Identifies calls to pure/side-effect-free methods where the results are not used subsequently. * * @author Dominik Helm */ @@ -54,7 +54,7 @@ object UnusedResults extends ProjectsAnalysisApplication { protected class UnusedResultsConfig(args: Array[String]) extends MultiProjectAnalysisConfig(args) with CGBasedCommandLineConfig { - val description = "Finds invocations of pure/side-effect free methods where the result is not used" + val description = "Finds invocations of pure/side-effect-free methods where the result is not used" } protected type ConfigType = UnusedResultsConfig @@ -70,7 +70,7 @@ object UnusedResults extends ProjectsAnalysisApplication { ): (Project[URL], BasicReport) = { implicit val (project: Project[URL], _) = analysisConfig.setupProject(cp)() implicit val (ps, _) = analysisConfig.setupPropertyStore(project) - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) val issues = new ConcurrentLinkedQueue[String] diff --git a/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/instructions/GeneratedProxyClassFilesTest.scala b/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/instructions/GeneratedProxyClassFilesTest.scala index 8351b5f313..99defbdb9f 100644 --- a/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/instructions/GeneratedProxyClassFilesTest.scala +++ b/DEVELOPING_OPAL/validate/src/it/scala/org/opalj/br/instructions/GeneratedProxyClassFilesTest.scala @@ -112,7 +112,7 @@ class GeneratedProxyClassFilesTest extends AnyFunSpec with Matchers { // there is no dead-code var nextPc = 0 - while (nextPc < instructions.size) { + while (nextPc < instructions.length) { result.operandsArray(nextPc) should not be (null) nextPc = instructions(nextPc).indexOfNextInstruction(nextPc, false) } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/br/analyses/properties/declared_methods/DeclaredMethods.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/br/analyses/properties/declared_methods/DeclaredMethods.java index e4a986c24c..0247f14075 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/br/analyses/properties/declared_methods/DeclaredMethods.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/br/analyses/properties/declared_methods/DeclaredMethods.java @@ -9,7 +9,7 @@ import static java.lang.annotation.ElementType.TYPE; /** - * Container for mutliple [[DeclaredMethod]] annotations. + * Container for multiple [[DeclaredMethod]] annotations. * * @author Dominik Helm */ diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/Readme.md b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/Readme.md index 0e49a6e8e6..89c3684f21 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/Readme.md +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/Readme.md @@ -3,4 +3,4 @@ The folder (`org.opalj.fpcf.fixtures`) and its subfolders contain a Java project where several entities, such as methods, fields, or allocation sites, have annotations regarding their expected properties. The expected properties are annotated using custom annotations defined in the package `org.opalj.fpcf.properties`. When the test suite is run, the project (the code in the subpackages of `org.opalj.fpcf.fixture`) is instantiated and the configured analyses are run. The project will consist of all classes below the `fixtures` package. The library classes will consist of the JDK and the classes below the `properties` package. -Afterwards, the test will check that the actual (computed) properties and the specified properties match. For that, the `PropertyMatcher` associated with the annotation is called. +Afterward, the test will check that the actual (computed) properties and the specified properties match. For that, the `PropertyMatcher` associated with the annotation is called. diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/DynamicMethodFlows.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/DynamicMethodFlows.java index e36f904ce6..e0b5567f6c 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/DynamicMethodFlows.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/DynamicMethodFlows.java @@ -96,7 +96,7 @@ private static abstract class C { } private static class C1 extends C { - // Since this method is reachable, the type set contains the this pointer. + // Since this method is reachable, the type set contains the this-pointer. @AvailableTypes("org/opalj/fpcf/fixtures/callgraph/xta/DynamicMethodFlows$C1") // "this" public void foo() { diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows.java index a701bba80f..2f607a2bab 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows.java @@ -104,7 +104,7 @@ public static B twoWayFlow_SourceAndSink(A obj) { // Note: All array tests use different types for isolation, since values written to ArrayTypes // are available globally, across test boundaries. - // In this test, two different types are written to an array. The array is accessed in + // In this test, two different types are written to an array. The array is accessed // in arrayTest_sink, which should make both types available in this method. @AvailableTypes("[Lorg/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows$A;") public static void arrayTest() { @@ -322,7 +322,7 @@ public static void externalWorldField_sink(java.awt.Event e) { // information regarding their type hierarchy. In this test, we consider two sinks with parameters of external // types ArrayList and Map. - static class MyList extends ArrayList { } + static class MyList extends ArrayList { } @AvailableTypes({ "org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows$A", @@ -338,7 +338,7 @@ private static void externalTypeFilter() { sink(new MyList()); // LinkedList is an external type for which it is unknwon whether it extends Map or ArrayList. // It should propagate to both sinks. - sink(new LinkedList()); + sink(new LinkedList<>()); externalTypeFilter_sink(null); externalTypeFilter_sink2(null); @@ -347,12 +347,12 @@ private static void externalTypeFilter() { @AvailableTypes({ "org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows$MyList", "java/util/LinkedList"}) - private static void externalTypeFilter_sink(ArrayList list) { } + private static void externalTypeFilter_sink(ArrayList list) { } @AvailableTypes({ "org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows$MyList", "java/util/LinkedList"}) - private static void externalTypeFilter_sink2(Map map) { } + private static void externalTypeFilter_sink2(Map map) { } // === Return optimization === // Even though the source method here has a non-void return type, the analysis should not consider the call @@ -435,7 +435,7 @@ public static void genericContainer_sink2(Container a, Container b) { "org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows$B", "org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows$C", "org/opalj/fpcf/fixtures/callgraph/xta/StaticMethodFlows$Container"}) - public static void genericContainer_sink3(Container c) { + public static void genericContainer_sink3(Container c) { // This method's parameter is a raw type. Object obj = c.get(); sink(obj); diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/compile_time_constancy/CompileTimeConstancy.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/compile_time_constancy/CompileTimeConstancy.java index 00af75d047..e21d762d0b 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/compile_time_constancy/CompileTimeConstancy.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/compile_time_constancy/CompileTimeConstancy.java @@ -3,7 +3,6 @@ import org.opalj.fpcf.properties.compile_time_constancy.CompileTimeConstant; import org.opalj.fpcf.properties.compile_time_constancy.CompileTimeVarying; -import org.opalj.fpcf.properties.static_data_usage.UsesConstantDataOnly; import org.opalj.fpcf.properties.static_data_usage.UsesNoStaticData; import org.opalj.fpcf.properties.static_data_usage.UsesVaryingData; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/AList.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/AList.java index a3e515d999..a0721dbc89 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/AList.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/AList.java @@ -23,7 +23,7 @@ public Object get(int index) { public void add( @AtMostEscapeViaParameter(value = "the parameter escapes via the array", analyses = InterProceduralEscapeAnalysis.class) - @AtMostNoEscape(value = "SimpleEscapeAnalyis does not track formal parameters", + @AtMostNoEscape(value = "SimpleEscapeAnalysis does not track formal parameters", analyses = SimpleEscapeAnalysis.class) Object o ) { diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesOfExceptions.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesOfExceptions.java index 2270ac1b48..d0b027661e 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesOfExceptions.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesOfExceptions.java @@ -13,20 +13,20 @@ public static void directThrowException() { throw new @EscapeViaAbnormalReturn("the exception is thrown") RuntimeException(); } - public static int directCatchedException() { + public static int directCaughtException() { try { - throw new @EscapeInCallee("the exception is catched immediately") RuntimeException(); + throw new @EscapeInCallee("the exception is caught immediately") RuntimeException(); } catch (RuntimeException e) { return -1; } } - public static int multipleExceptionsAllCatched(boolean b) throws Exception { + public static int multipleExceptionsAllCaught(boolean b) throws Exception { Exception e; if (b) { - e = new @EscapeInCallee("the exception is catched") IllegalArgumentException(); + e = new @EscapeInCallee("the exception is caught") IllegalArgumentException(); } else { - e = new @EscapeInCallee("the exception is also catched") IllegalStateException(); + e = new @EscapeInCallee("the exception is also caught") IllegalStateException(); } try { throw e; @@ -37,13 +37,13 @@ public static int multipleExceptionsAllCatched(boolean b) throws Exception { } } - public static int multipleExceptionsSomeCatched(boolean b) throws Exception { + public static int multipleExceptionsSomeCaught(boolean b) throws Exception { Exception e = null; if (b) { - e = new @EscapeInCallee("the exception is catched") IllegalArgumentException(); + e = new @EscapeInCallee("the exception is caught") IllegalArgumentException(); } else { e = new @EscapeViaAbnormalReturn( - "the exception is not catched") IllegalStateException(); + "the exception is not caught") IllegalStateException(); } try { throw e; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesViaReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesViaReturn.java index e0d12a996b..8bf15d29ad 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesViaReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/EscapesViaReturn.java @@ -29,7 +29,7 @@ public Object escapeAfterCallToIdentity() { @AtMostEscapeViaReturn( value = "intra-procedural analyses don't track the call but the domain does", analyses = SimpleEscapeAnalysis.class) - @AtMostEscapeInCallee(value = "the domain does not recognize the identity", performInvokationsDomain = false) + @AtMostEscapeInCallee(value = "the domain does not recognize the identity", performInvocationsDomain = false) Object(); Object x = identity(o); return x; @@ -39,7 +39,7 @@ public static void handlingReturnGlobalEscape() { Object o = new @EscapeViaStaticField( value = "the object is passed to an identity function and escapes") - @AtMostEscapeInCallee(value = "the domain does not recognize the identity", performInvokationsDomain = false) + @AtMostEscapeInCallee(value = "the domain does not recognize the identity", performInvocationsDomain = false) Object(); Object x = identity(o); if (x != null) { @@ -47,7 +47,7 @@ public static void handlingReturnGlobalEscape() { } } - public void noEscapeAfterCallToIdentiy() { + public void noEscapeAfterCallToIdentity() { Object o = new @EscapeInCallee( value = "the object is passed to an identity function and not returned", @@ -73,8 +73,8 @@ public static Object sometimesIdentity(boolean b, public Object escapeAfterCallToSometimesIdentity(boolean b) { Object o = new - @AtMostEscapeInCallee(value = "the object is passed to an identity like function", performInvokationsDomain = false) - @AtMostEscapeViaReturn(value = "the object is passed to an identity like function", performInvokationsDomain = true) + @AtMostEscapeInCallee(value = "the object is passed to an identity like function", performInvocationsDomain = false) + @AtMostEscapeViaReturn(value = "the object is passed to an identity like function", performInvocationsDomain = true) Object(); return sometimesIdentity(b, o); } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/AdaptiveCoding.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/AdaptiveCoding.java index 7d1312b5ef..31947da8a0 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/AdaptiveCoding.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/AdaptiveCoding.java @@ -49,7 +49,7 @@ private static int decodeK(int KX, int KB) { return (KB+KB_OFFSET) << (KX * KX_LG2BASE); } - public static int parseMetaCoding(byte[] bytes, int pos, @AtMostEscapeInCallee(value = "", analyses = InterProceduralEscapeAnalysis.class) Coding dflt, CodingMethod res[]) { + public static int parseMetaCoding(byte[] bytes, int pos, @AtMostEscapeInCallee(value = "", analyses = InterProceduralEscapeAnalysis.class) Coding dflt, CodingMethod[] res) { int op = bytes[pos++] & 0xFF; if (op < _meta_run || op >= _meta_pop) return pos-1; // backup AdaptiveCoding prevc = null; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/Coding.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/Coding.java index b0397228f9..0c5b4f7c9b 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/Coding.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/Coding.java @@ -38,7 +38,7 @@ private Coding(int B, int H, int S, int del) { } - public static int parseMetaCoding(byte[] bytes, int pos, @NoEscape(value = "", analyses = InterProceduralEscapeAnalysis.class) Coding dflt, CodingMethod res[]) { + public static int parseMetaCoding(byte[] bytes, int pos, @NoEscape(value = "", analyses = InterProceduralEscapeAnalysis.class) Coding dflt, CodingMethod[] res) { int op = bytes[pos++] & 0xFF; if (_meta_canon_min <= op && op <= _meta_canon_max) { Coding c = BandStructure.codingForIndex(op); diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/PopulationCoding.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/PopulationCoding.java index 515db42391..5b78a85d2a 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/PopulationCoding.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/coding/PopulationCoding.java @@ -26,7 +26,7 @@ class PopulationCoding implements CodingMethod { static final int[] LValuesCoded = { -1, 4, 8, 16, 32, 64, 128, 192, 224, 240, 248, 252 }; - public static int parseMetaCoding12345(byte[] bytes, int pos, @AtMostEscapeInCallee(value = "", analyses = InterProceduralEscapeAnalysis.class) Coding dflt, CodingMethod res[]) { + public static int parseMetaCoding12345(byte[] bytes, int pos, @AtMostEscapeInCallee(value = "", analyses = InterProceduralEscapeAnalysis.class) Coding dflt, CodingMethod[] res) { int op = bytes[pos++] & 0xFF; if (op < _meta_pop || op >= _meta_limit) return pos-1; // backup op -= _meta_pop; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/interface_test/Main.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/interface_test/Main.java index ac315ae579..abbdf02c3f 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/interface_test/Main.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/interface_test/Main.java @@ -34,7 +34,7 @@ public static void main(String[] args) { Object o4 = new @EscapeViaStaticField( - value = "the defualt impl. let it escape", + value = "the default impl. let it escape", analyses = InterProceduralEscapeAnalysis.class ) Object(); a1.bazz(o4); diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/virtual_calls/Interface.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/virtual_calls/Interface.java index 0b53aeff93..403f928edc 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/virtual_calls/Interface.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/escape/virtual_calls/Interface.java @@ -2,7 +2,6 @@ package org.opalj.fpcf.fixtures.escape.virtual_calls; import org.opalj.fpcf.fixtures.escape.Circle; -import org.opalj.fpcf.properties.escape.AtMostNoEscape; public interface Interface { Circle copyCircle(Circle aCircle); diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/ExtensibleLocalFieldExample.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/ExtensibleLocalFieldExample.java index 9a0bb203c6..f75abde45d 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/ExtensibleLocalFieldExample.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/ExtensibleLocalFieldExample.java @@ -5,6 +5,6 @@ public class ExtensibleLocalFieldExample { - @ExtensibleLocalField("This field is local only for this precise type, a subtype coud leak it") + @ExtensibleLocalField("This field is local only for this precise type, a subtype could leak it") private int[] extensibleLocalField; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/FinalClassExample.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/FinalClassExample.java index 94af107ca4..5d73a01413 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/FinalClassExample.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/FinalClassExample.java @@ -3,7 +3,6 @@ import org.opalj.fpcf.properties.field_locality.LocalField; import org.opalj.fpcf.properties.field_locality.LocalFieldWithGetter; -import org.opalj.fpcf.properties.field_locality.NoLocalField; public final class FinalClassExample { diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/LocalFieldExample.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/LocalFieldExample.java index 4f4fe95b51..f544489019 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/LocalFieldExample.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/field_locality/LocalFieldExample.java @@ -2,7 +2,6 @@ package org.opalj.fpcf.fixtures.field_locality; import org.opalj.fpcf.properties.field_locality.LocalField; -import org.opalj.fpcf.properties.field_locality.NoLocalField; public class LocalFieldExample implements Cloneable { diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/DifferentAssignmentPossibilitiesOfEffectivelyNonAssignableField.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/DifferentAssignmentPossibilitiesOfEffectivelyNonAssignableField.java index 7651a0ee7e..2a655b8f0c 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/DifferentAssignmentPossibilitiesOfEffectivelyNonAssignableField.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/DifferentAssignmentPossibilitiesOfEffectivelyNonAssignableField.java @@ -4,7 +4,7 @@ import org.opalj.fpcf.properties.immutability.field_assignability.EffectivelyNonAssignableField; /** - * Class encompasses two possible cases of assigning the effectively non assignable field object. + * Class encompasses two possible cases of assigning the effectively non-assignable field object. */ public class DifferentAssignmentPossibilitiesOfEffectivelyNonAssignableField { diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/EffectivelyNonAssignable.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/EffectivelyNonAssignable.java index 5b2ea293ff..137b7c65a2 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/EffectivelyNonAssignable.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/assignability/EffectivelyNonAssignable.java @@ -1,19 +1,15 @@ /* BSD 2-Clause License - see OPAL/LICENSE for details. */ package org.opalj.fpcf.fixtures.immutability.openworld.assignability; -import java.util.HashMap; -import java.util.List; -import java.util.LinkedList; -import java.util.HashSet; -import java.util.Set; - import org.opalj.fpcf.fixtures.immutability.openworld.general.ClassWithMutableFields; import org.opalj.fpcf.properties.immutability.field_assignability.EffectivelyNonAssignableField; import org.opalj.fpcf.properties.immutability.fields.NonTransitivelyImmutableField; import org.opalj.fpcf.properties.immutability.fields.TransitivelyImmutableField; +import java.util.*; + /** - * This class encompasses different cases of effectively non assignable fields. + * This class encompasses different cases of effectively non-assignable fields. */ public class EffectivelyNonAssignable { @@ -67,7 +63,7 @@ public void callNopOfClassWithMutableFields(){ @TransitivelyImmutableField("The field is effectively non assignable and has a primitive type") @EffectivelyNonAssignableField("The field is not written after initialization") - private Long simpleLong = 5l; + private Long simpleLong = 5L; @TransitivelyImmutableField("The concrete assigned object is known to be deep immutable") @EffectivelyNonAssignableField("The field is not written after initialization") diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/objects/DifferentLazyInitializedFieldTypes.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/objects/DifferentLazyInitializedFieldTypes.java index c3aa38cbfb..cc1f52e792 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/objects/DifferentLazyInitializedFieldTypes.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/objects/DifferentLazyInitializedFieldTypes.java @@ -41,7 +41,7 @@ public synchronized Integer getInGetterSynchronizedSimpleLazyInitializedIntegerF private long inGetterSynchronizedLazyInitializedLongField; public synchronized long getInGetterSynchronizedLazyInitializedLongField(){ - if(inGetterSynchronizedLazyInitializedLongField == 0l) + if(inGetterSynchronizedLazyInitializedLongField == 0L) inGetterSynchronizedLazyInitializedLongField = 5; return inGetterSynchronizedLazyInitializedLongField; } @@ -51,8 +51,8 @@ public synchronized long getInGetterSynchronizedLazyInitializedLongField(){ private Long lazyintializedLongObject; public synchronized Long getLongObject(){ - if(lazyintializedLongObject == 0l) - lazyintializedLongObject = 5l; + if(lazyintializedLongObject == 0L) + lazyintializedLongObject = 5L; return lazyintializedLongObject; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/primitive_types/LazyInitializationPrimitiveTypes.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/primitive_types/LazyInitializationPrimitiveTypes.java index a407ee6593..1446c3b19d 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/primitive_types/LazyInitializationPrimitiveTypes.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/lazyinitialization/primitive_types/LazyInitializationPrimitiveTypes.java @@ -19,7 +19,7 @@ class Simple { @TransitivelyImmutableField(value = "field is lazily initialized and has primitive value", analyses = {}) @MutableField(value = "The field is unsafely lazily initialized", analyses = { FieldImmutabilityAnalysis.class}) @LazilyInitializedField(value = "Simple lazy initialization with primitive type", analyses = {}) - @UnsafelyLazilyInitializedField(value = "The analysis does not reconize determinism", + @UnsafelyLazilyInitializedField(value = "The analysis does not recognize determinism", analyses = {L2FieldAssignabilityAnalysis.class}) private int x; @@ -35,7 +35,7 @@ class Local { @TransitivelyImmutableField(value = "field is lazily initialized and has primitive value", analyses = {}) @LazilyInitializedField(value = "Lazy initialization with local", analyses = {}) - @UnsafelyLazilyInitializedField(value = "The analysis does not reconize determinism", + @UnsafelyLazilyInitializedField(value = "The analysis does not recognize determinism", analyses = {L2FieldAssignabilityAnalysis.class}) private int x; @@ -67,7 +67,7 @@ class LocalReversed { @TransitivelyImmutableField(value = "field is lazily initialized and has primitive value", analyses = {}) @LazilyInitializedField(value = "Lazy initialization with local (reversed)", analyses = {}) - @UnsafelyLazilyInitializedField(value = "The analysis does not reconize determinism", + @UnsafelyLazilyInitializedField(value = "The analysis does not recognize determinism", analyses = {L2FieldAssignabilityAnalysis.class}) private int x; @@ -84,7 +84,7 @@ class SimpleReversed { @TransitivelyImmutableField(value = "field is lazily initialized and has primitive value", analyses = {}) @LazilyInitializedField(value = "Simple lazy initialization (reversed)", analyses = {}) - @UnsafelyLazilyInitializedField(value = "The analysis cannot reconizes determinism", + @UnsafelyLazilyInitializedField(value = "The analysis cannot recognize determinism", analyses = {L2FieldAssignabilityAnalysis.class}) private int x; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/stringelements/SimpleStringModel.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/stringelements/SimpleStringModel.java index a50a78ade8..bc31baf84e 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/stringelements/SimpleStringModel.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/immutability/openworld/stringelements/SimpleStringModel.java @@ -19,7 +19,7 @@ public final class SimpleStringModel { @NonTransitivelyImmutableField(value = "The analysis can not recognize transitive immutable arrays", analyses = { FieldImmutabilityAnalysis.class}) @NonAssignableField("The field is final") - private final char value[]; + private final char[] value; public char[] getValue(){ return value.clone(); @@ -42,7 +42,7 @@ public SimpleStringModel(char[] value){ public int hashCode() { int h = 0; if (hash == 0) { - char val[] = value; + char[] val = value; for (int i = 0; i < value.length; i++) { h = 31 * h + val[i]; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/BaseClass.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/BaseClass.java index 82c271e4ca..882298a92a 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/BaseClass.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/BaseClass.java @@ -11,7 +11,7 @@ */ public abstract class BaseClass { - // This method has pure (SubClassA) and side-effect free (SubClassB) implementations + // This method has pure (SubClassA) and side-effect-free (SubClassB) implementations public abstract int abstractMethod(int i); // This (pure) method has an impure override in SubClassB diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/Complex.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/Complex.java index 997b65eafe..3b3f4d839a 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/Complex.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/Complex.java @@ -39,22 +39,22 @@ public void impureBase(int a) { staticNonFinal = a; } - // Methods depending on side-effect free method which are pure internally + // Methods depending on side-effect-free method which are pure internally - @SideEffectFree("Calls a side-effect free method") - @Impure(value = "Calls side-effect free method", analyses = L0PurityAnalysis.class) + @SideEffectFree("Calls a side-effect-free method") + @Impure(value = "Calls side-effect-free method", analyses = L0PurityAnalysis.class) public static int sef_0_0(int a) { return a + Complex.sefBase(); } - @SideEffectFree("Transitively calls a side-effect free method") - @Impure(value = "Transitively calls side-effect free method", analyses = L0PurityAnalysis.class) + @SideEffectFree("Transitively calls a side-effect-free method") + @Impure(value = "Transitively calls side-effect-free method", analyses = L0PurityAnalysis.class) public static int sef_0_1(int a, int b) { return sef_0_0(1) + sef_0_2(a - 1, b); } - @SideEffectFree("Transitively calls a side-effect free method") - @Impure(value = "Transitively calls side-effect free method", analyses = L0PurityAnalysis.class) + @SideEffectFree("Transitively calls a side-effect-free method") + @Impure(value = "Transitively calls side-effect-free method", analyses = L0PurityAnalysis.class) public static int sef_0_2(int a, int b) { if (a < 0) { return 0; @@ -63,8 +63,8 @@ public static int sef_0_2(int a, int b) { } } - @SideEffectFree("Transitively calls a side-effect free method") - @Impure(value = "Transitively calls side-effect free method", analyses = L0PurityAnalysis.class) + @SideEffectFree("Transitively calls a side-effect-free method") + @Impure(value = "Transitively calls side-effect-free method", analyses = L0PurityAnalysis.class) public static int sef_0_3(int a) { return a - sef_0_0(a); } @@ -125,7 +125,7 @@ public int impure_1_1() { } } - // Methods depending on side-effect free method which are impure + // Methods depending on side-effect-free method which are impure @Impure("Modifies static field") public static void impure_2_0() { diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/DependentCalls.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/DependentCalls.java index cdd98c546f..5e507ac259 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/DependentCalls.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/DependentCalls.java @@ -155,7 +155,7 @@ static int pureCyclicRecursiveCall3(int i) { // -------------------------------------------------------------------------------------------- // The following methods are pure, but only if we know the pureness of the target method - // which we don't know if do not analyze the JDK! + // which we don't know if we do not analyze the JDK! // @CompileTimePure(value = "calls compile-time pure Math.abs", @@ -214,7 +214,7 @@ static int cpureCallsAbsCalleeCalleeCallee(int i) { eps = @EP(cf = Math.class, method = "abs(I)I", pk = "Purity", p = "Pure")) @Impure(value = "Math.abs not recognized as pure", eps = @EP(cf = Math.class, method = "abs(I)I", pk = "Purity", p = "Impure")) - static int cpureCallsAbsCalleeCalleeCalleCallee(int i) { + static int cpureCallsAbsCalleeCalleeCalleeCallee(int i) { return cpureCallsAbsCalleeCalleeCallee(1299); } @@ -280,7 +280,7 @@ static int impureComplex6(int i) { // -------------------------------------------------------------------------------------------- // Two methods which are mutually dependent, but one depends on another pure method (where - // the latter is also part of a mutual recursive dependency. + // the latter is also part of a mutual recursive dependency). // @CompileTimePure("methods in all cycles are compile-time pure") @@ -371,7 +371,7 @@ static int pureClosedSCC3(int i) { // @Impure("calls native function System.nanoTime()") public static int impureAtLast(int i) { - int v = cpureCallsAbsCalleeCalleeCalleCallee(i); + int v = cpureCallsAbsCalleeCalleeCalleeCallee(i); int u = impureRecursiveCallWithDependency1(impureRecursiveCallWithDependency2(v)); int z = pureRecursiveCallWithDependency2(pureRecursiveCallWithDependency1(u)); int l = pureClosedSCC2(pureClosedSCC1(pureClosedSCC0(z))); diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/PrimitiveTypes.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/PrimitiveTypes.java index 7b86e85ce6..d23a13fb03 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/PrimitiveTypes.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/PrimitiveTypes.java @@ -94,7 +94,7 @@ public static int sef_0_1(int a) { return a + nonFinalStaticField; } - // Side-effect free Methods depending on final fields + // side-effect-free Methods depending on final fields @DomainSpecificSideEffectFree( "Value accessed from array is non-deterministic, potential index out of bounds exception" ) @@ -127,7 +127,7 @@ public static void impure_0_1(int a) { // Some methods have a known purity level even if they can not be analyzed // (defined in ai/reference.conf) - @SideEffectFree("Invokes known to be side-effect free native method") + @SideEffectFree("Invokes known to be side-effect-free native method") @Impure(value = "Analysis does not support preloaded purity values", analyses = L0PurityAnalysis.class) public long getCurrentTime(){ diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/ReferenceTypes.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/ReferenceTypes.java index 893df645ee..7befa46561 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/ReferenceTypes.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/ReferenceTypes.java @@ -126,7 +126,7 @@ public static Object getNewObject() { @Pure(value = "Returns new object, but type (-> mutability) is not precisely known anymore", eps = @EP(cf = ReferenceTypes.class, pk = "ReturnValueFreshness", method = "getNewObject()Ljava/lang/Object;", p = "FreshReturnValue")) - @SideEffectFree(value = "Anaylsis doesn't recognize new object/freshness not recognized", + @SideEffectFree(value = "Analysis doesn't recognize new object/freshness not recognized", eps = @EP(cf = ReferenceTypes.class, pk = "ReturnValueFreshness", method = "getNewObject()Ljava/lang/Object;", p = "FreshReturnValue", analyses = L2PurityAnalysis.class), negate = true) @@ -144,7 +144,7 @@ public static Object getStaticFinalObjIndirect() { @Pure(value = "Returns a new object", analyses = L2PurityAnalysis.class, eps = @EP(cf = ReferenceTypes.class, pk = "ReturnValueFreshness", method = "getNewObject()Ljava/lang/Object;", p = "FreshReturnValue")) - @SideEffectFree(value = "Anaylsis doesn't recognize new object/freshness not recognized", + @SideEffectFree(value = "Analysis doesn't recognize new object/freshness not recognized", eps = @EP(cf = ReferenceTypes.class, pk = "ReturnValueFreshness", method = "getNewObject()Ljava/lang/Object;", p = "FreshReturnValue", analyses = L2PurityAnalysis.class), negate = true) @@ -303,7 +303,7 @@ public static int[] setFreshArrayEntry(int index, int value) { } @SideEffectFree("hashCode is not deterministic on new objects") - @Impure(value = "Analysis doesn't recognize side-effect free methods", + @Impure(value = "Analysis doesn't recognize side-effect-free methods", analyses = L0PurityAnalysis.class) private int newHashCode(){ return new Object().hashCode(); diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/SubClassA.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/SubClassA.java index a1cf7bd4fd..83e1600836 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/SubClassA.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/SubClassA.java @@ -19,14 +19,14 @@ public int interfaceMethod(int i) { } @CompileTimePure("Only returns result of exception-free computation on immutable parameter") - @Pure(value = "Only returns result of cexception-free omputation on immutable parameter", + @Pure(value = "Only returns result of exception-free computation on immutable parameter", analyses = { L0PurityAnalysis.class, L1PurityAnalysis.class }) public final int abstractMethod(int i) { return i + 2; } @CompileTimePure("Only returns result of exception-free computation on immutable parameter") - @Pure(value = "Only returns result of cexception-free omputation on immutable parameter", + @Pure(value = "Only returns result of exception-free computation on immutable parameter", analyses = { L0PurityAnalysis.class, L1PurityAnalysis.class }) public int nonAbstractMethod(int i) { if (i > 0) diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/VirtualCalls.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/VirtualCalls.java index 994c7e2668..53559eebaf 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/VirtualCalls.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/purity/VirtualCalls.java @@ -48,7 +48,7 @@ public int abstractMethodCall1(SubClassA a) { return bc.abstractMethod(5); } - @SideEffectFree("Calls side-effect free final method") + @SideEffectFree("Calls side-effect-free final method") @Impure(value = "Calls impure final method", analyses = L0PurityAnalysis.class) public int abstractMethodCall2(SubClassB b) { BaseClass bc = b; @@ -67,7 +67,7 @@ public int abstractMethodCall3(SubClassC c) { return bc.abstractMethod(5); } - @Impure("abstractMethod could be overriden in a subtype of BaseClass that is not available") + @Impure("abstractMethod could be overridden in a subtype of BaseClass that is not available") public int abstractMethodCall4(BaseClass bc) { if (bc == null) return 0; @@ -82,14 +82,14 @@ public int pureAbstractMethodCall(int i) { return bc.abstractMethod(i); } - @SideEffectFree(value = "Calls side-effect free method on object with precise type") + @SideEffectFree(value = "Calls side-effect-free method on object with precise type") @Impure(value = "Analysis doesn't handle virtual calls", analyses = L0PurityAnalysis.class) public int sideEffectFreeAbstractMethodCall(int i) { BaseClass bc = new SubClassB(); return bc.abstractMethod(i); } - @Impure("nonAbstractMethod could be overriden in a subtype of BaseClass that is not available") + @Impure("nonAbstractMethod could be overridden in a subtype of BaseClass that is not available") public int impureNonAbstractMethodCall(BaseClass bc) { if (bc == null) return 0; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/thrown_exceptions/ExceptionUsages.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/thrown_exceptions/ExceptionUsages.java index 62fe83af37..983c7c0d5d 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/thrown_exceptions/ExceptionUsages.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/fixtures/thrown_exceptions/ExceptionUsages.java @@ -110,12 +110,12 @@ public static int staticCallThrowsException() { } @ExpectedExceptions() - public static final int staticFinalThrowsException() { + public static int staticFinalThrowsException() { throw new NullPointerException(); } @ExpectedExceptions() - public static final int staticFinalCallThrowsException() { + public static int staticFinalCallThrowsException() { staticThrowsException(); return 42; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MayAlias.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MayAlias.java index 244a8ee82f..dd38424f1b 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MayAlias.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MayAlias.java @@ -37,7 +37,7 @@ * *
  • * parameterIndex: If the element is used as a parameter in a method call, this value is the index the element has in the parameter list. - * -1 is the this Parameter. Other parameter indices start wit 0 and increase by 1. + * -1 is the this-parameter. Other parameter indices start wit 0 and increase by 1. *
  • *
  • * fieldName: If the element is a fieldReference, this value is the name of the field. diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MustAlias.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MustAlias.java index b38a27d5c6..d969f0c955 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MustAlias.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/MustAlias.java @@ -36,7 +36,7 @@ *
  • *
  • * parameterIndex: If the element is used as a parameter in a method call, this value is the index the element has in the parameter list. - * -1 is the this Parameter. Other parameter indices start wit 0 and increase by 1. + * -1 is the this-parameter. Other parameter indices start wit 0 and increase by 1. *
  • *
  • * fieldName: If the element is a fieldReference, this value is the name of the field. diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/NoAlias.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/NoAlias.java index 8a3a617269..eb1e7c223d 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/NoAlias.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/alias/NoAlias.java @@ -36,7 +36,7 @@ *
  • *
  • * parameterIndex: If the element is used as a parameter in a method call, this value is the index the element has in the parameter list. - * -1 is the this Parameter. Other parameter indices start wit 0 and increase by 1. + * -1 is the this-parameter. Other parameter indices start wit 0 and increase by 1. *
  • *
  • * fieldName: If the element is a fieldReference, this value is the name of the field. diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/DirectCall.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/DirectCall.java index da1f34a66a..65f447215b 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/DirectCall.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/DirectCall.java @@ -17,7 +17,7 @@ * Describes a method call at a specific call site and states which methods * the call must be resolved to. * Using this annotation implies that the call edges must be - * directly available within the call graph from the specified call site. Therefore, this annoation + * directly available within the call graph from the specified call site. Therefore, this annotation * can be used to specify monomorphic or polymorphic method calls but are not suited to specify * indirect call targets, e.g., reflective call targets. * Furthermore, it is possible to exclude certain target methods. diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/TypePropagationVariant.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/TypePropagationVariant.java index 9899f1ef30..3bac1ae0ae 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/TypePropagationVariant.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/callgraph/TypePropagationVariant.java @@ -7,5 +7,5 @@ public enum TypePropagationVariant { FTA, CTA; - public static String tag = "TypePropagationVariant"; + public static final String tag = "TypePropagationVariant"; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeInCallee.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeInCallee.java index cc98606a60..e5abcd4d2e 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeInCallee.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeInCallee.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaAbnormalReturn.java index 1d1d75281a..9e43288631 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaAbnormalReturn.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaNormalAndAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaNormalAndAbnormalReturn.java index d46fb71df9..4c31d146ef 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaNormalAndAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaNormalAndAbnormalReturn.java @@ -35,5 +35,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameter.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameter.java index 07de41a74e..13217b8828 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameter.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameter.java @@ -35,5 +35,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndAbnormalReturn.java index a70e6cec3b..0c2ea9aeec 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndAbnormalReturn.java @@ -35,5 +35,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndNormalAndAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndNormalAndAbnormalReturn.java index 55a01af464..f3b1524ffa 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndNormalAndAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndNormalAndAbnormalReturn.java @@ -36,5 +36,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndReturn.java index 7536193d6d..819302e195 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaParameterAndReturn.java @@ -35,5 +35,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaReturn.java index 39550379e8..40119f492d 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostEscapeViaReturn.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostNoEscape.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostNoEscape.java index 7e2f3cf7a8..ee31db7a9b 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostNoEscape.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/AtMostNoEscape.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeInCallee.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeInCallee.java index 3b806c113e..6a2b02b5dd 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeInCallee.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeInCallee.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaAbnormalReturn.java index fa5dcd3389..22167122c1 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaAbnormalReturn.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaHeapObject.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaHeapObject.java index 36aab97ea2..947cee5898 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaHeapObject.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaHeapObject.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaNormalAndAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaNormalAndAbnormalReturn.java index d2c8e41987..0259e5d2dc 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaNormalAndAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaNormalAndAbnormalReturn.java @@ -35,5 +35,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameter.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameter.java index 6085770000..cbe7f0d6a2 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameter.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameter.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndAbnormalReturn.java index c775a9cd87..e132cb7ac9 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndAbnormalReturn.java @@ -35,5 +35,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndNormalAndAbnormalReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndNormalAndAbnormalReturn.java index 82d6064570..5e24ba3664 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndNormalAndAbnormalReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndNormalAndAbnormalReturn.java @@ -35,5 +35,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndReturn.java index 74a0f143b3..0137a4405a 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaParameterAndReturn.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaReturn.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaReturn.java index cda3f28190..7da7b7323e 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaReturn.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaReturn.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaStaticField.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaStaticField.java index 3cb408a19e..d2b4d093d0 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaStaticField.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/EscapeViaStaticField.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/GlobalEscape.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/GlobalEscape.java index d5981083e9..74f56a8668 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/GlobalEscape.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/GlobalEscape.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean requiresPerformInvokationsDomain() default false; + boolean performInvocationsDomain() default false; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/NoEscape.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/NoEscape.java index 4597f947c8..e84ca38e02 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/NoEscape.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/escape/NoEscape.java @@ -34,5 +34,5 @@ Class[] analyses() default { SimpleEscapeAnalysis.class, InterProceduralEscapeAnalysis.class }; - boolean performInvokationsDomain() default true; + boolean performInvocationsDomain() default true; } diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/CompileTimePure.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/CompileTimePure.java index 684c1b191c..f2bdee09fd 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/CompileTimePure.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/CompileTimePure.java @@ -10,7 +10,7 @@ import java.lang.annotation.RetentionPolicy; /** - * Annotation to state that the annotated method is compile time pure. + * Annotation to state that the annotated method is compile-time pure. * * @author Dominik Helm */ diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/DomainSpecific.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/DomainSpecific.java index 24c2f106be..2e32cfbb3a 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/DomainSpecific.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/purity/DomainSpecific.java @@ -2,7 +2,7 @@ package org.opalj.fpcf.properties.purity; public class DomainSpecific { - // WHEN CHANGING THESE MAKE SURE THE ANNOTED TEST CLASSES ARE RECOMPILED, THIS DOES NOT HAPPEN + // WHEN CHANGING THESE MAKE SURE THE ANNOTATED TEST CLASSES ARE RECOMPILED, THIS DOES NOT HAPPEN // AUTOMATICALLY! public final static String RaisesExceptions = "raises exceptions"; public final static String UsesSystemOutOrErr = "uses System.out or System.err"; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/static_data_usage/UsesNoStaticData.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/static_data_usage/UsesNoStaticData.java index 51eed4f423..5a610408e8 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/static_data_usage/UsesNoStaticData.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/static_data_usage/UsesNoStaticData.java @@ -2,7 +2,6 @@ package org.opalj.fpcf.properties.static_data_usage; import org.opalj.fpcf.properties.PropertyValidator; -import org.opalj.fpcf.properties.compile_time_constancy.CompileTimeConstantMatcher; import java.lang.annotation.Documented; import java.lang.annotation.Retention; diff --git a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptions.java b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptions.java index 1983572539..5b75caa825 100644 --- a/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptions.java +++ b/DEVELOPING_OPAL/validate/src/test/java/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptions.java @@ -9,7 +9,7 @@ import java.lang.annotation.RetentionPolicy; /** - * Annotation to state the (transitivley) thrown exceptions. + * Annotation to state the (transitively) thrown exceptions. * * @author Andreas Muttscheller * @author Michael Eichberg diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/control/ControlAbstractionsTest.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/control/ControlAbstractionsTest.scala index ea32693d55..aea74a59fd 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/control/ControlAbstractionsTest.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/control/ControlAbstractionsTest.scala @@ -61,7 +61,7 @@ class ControlAbstractionsTest extends AnyFlatSpec with Matchers { assert(success) } - it should "should execute the given function the given numeber of times" in { + it should "should execute the given function the given number of times" in { var index = 0 repeat(5) { index += 1 } assert(index == 5) diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/AliasTests.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/AliasTests.scala index 38a0db2557..dec1827ad0 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/AliasTests.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/AliasTests.scala @@ -156,7 +156,7 @@ class AliasTests(final val callGraphKey: CallGraphKey) extends PropertiesTest { } // force the computation of the alias property because we are using a lazy scheduler to avoid unnecessary computations - // (a eager scheduler would cause a quadratic blowup of the number of possible alias pairs) + // (an eager scheduler would cause a quadratic blowup of the number of possible alias pairs) properties.foreach { case (e, _, _) => as.propertyStore.force(e, Alias.key) } @@ -169,10 +169,10 @@ class AliasTests(final val callGraphKey: CallGraphKey) extends PropertiesTest { /** * Resolves the first element of an alias relation. * - * If the annotation is a alias line annotation and describes the relation between two lines or a line and null, + * If the annotation is an alias line annotation and describes the relation between two lines or a line and null, * the first element is resolved using the first line number. * - * Otherwise the first element is the annotated entity. + * Otherwise, the first element is the annotated entity. * * @param e The annotated entity. * @param a The annotation that describes the alias relation. diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/CallGraphTests.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/CallGraphTests.scala index e0211def95..e23e9b1794 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/CallGraphTests.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/CallGraphTests.scala @@ -3,6 +3,7 @@ package org.opalj package fpcf import java.net.URL +import scala.compiletime.uninitialized import com.typesafe.config.Config import com.typesafe.config.ConfigValueFactory @@ -54,7 +55,7 @@ class CallGraphTests extends PropertiesTest { List("org/opalj/fpcf/fixtures/callgraph/") } - var cgKey: CallGraphKey = null + var cgKey: CallGraphKey = uninitialized override def init(p: Project[URL]): Unit = { p.updateProjectInformationKeyInitializationData(ContextProviderKey) { diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/AvailableTypesMatcher.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/AvailableTypesMatcher.scala index c0270dad0b..73805f9314 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/AvailableTypesMatcher.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/AvailableTypesMatcher.scala @@ -65,7 +65,7 @@ class AvailableTypesMatcher extends AbstractPropertyMatcher { ) UIDSet.empty[ReferenceType] } - }.toSet + } val expectedTypeNames: Seq[String] = getValue(p, a.annotationType.asClassType, a.elementValuePairs, "value").asArrayValue.values diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/DirectCallMatcher.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/DirectCallMatcher.scala index e20c1fb62a..2a96f33fa8 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/DirectCallMatcher.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/callgraph/DirectCallMatcher.scala @@ -86,7 +86,7 @@ class DirectCallMatcher extends AbstractRepeatablePropertyMatcher { val resolvedTargets = { val av = a.elementValuePairs collectFirst { case ElementValuePair("resolvedTargets", ArrayValue(ab)) => - ab.toIndexedSeq.map(_.asInstanceOf[StringValue].value) + ab.map(_.asInstanceOf[StringValue].value) } av.getOrElse(List()) } @@ -116,7 +116,7 @@ class DirectCallMatcher extends AbstractRepeatablePropertyMatcher { if (missingCalleesSet.nonEmpty) { // TODO more detailed reporting? - Some(s"${missingCalleesSet.size} unresolved targets for call to ${methodName} in line ${lineNumber}") + Some(s"${missingCalleesSet.size} unresolved targets for call to $methodName in line $lineNumber") } else { None } diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/escape/EscapePropertyMatcher.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/escape/EscapePropertyMatcher.scala index 4814cfe2be..aa5134c495 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/escape/EscapePropertyMatcher.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/escape/EscapePropertyMatcher.scala @@ -38,9 +38,9 @@ abstract class EscapePropertyMatcher( val analyses = analysesElementValues map { _.asClassValue.value.asClassType } val analysisRelevant = analyses.exists(as.contains) - // check whether the PerformInvokations domain or the ArrayValuesBinding domain are required - val requiresPerformInvokationsDomain = - getValue(p, a.annotationType.asClassType, a.elementValuePairs, "performInvokationsDomain") + // check whether the PerformInvocations domain or the ArrayValuesBinding domain are required + val requiresPerformInvocationsDomain = + getValue(p, a.annotationType.asClassType, a.elementValuePairs, "performInvocationsDomain") .asInstanceOf[BooleanValue].value // val requiresArrayDomain = getValue(p, a.annotationType.asClassType, a.elementValuePairs, "arrayDomain").asInstanceOf[BooleanValue].value @@ -51,7 +51,7 @@ abstract class EscapePropertyMatcher( dm case (_, VirtualFormalParameter(_: DefinedMethod, _)) => return false; case (_, DefinitionSite(m, _)) => m - case _ => throw new RuntimeException(s"unsuported entity $entity") + case _ => throw new RuntimeException(s"unsupported entity $entity") } if (as.nonEmpty && m.hasSingleDefinedMethod && m.definedMethod.body.isDefined) { val domainClass = p.get(AIDomainFactoryKey).domainClass @@ -59,7 +59,7 @@ abstract class EscapePropertyMatcher( val isPerformInvocationsClass = performInvocationsClass.isAssignableFrom(domainClass) val isPerformInvocationDomainRelevant = - if (requiresPerformInvokationsDomain) isPerformInvocationsClass + if (requiresPerformInvocationsDomain) isPerformInvocationsClass else !isPerformInvocationsClass analysisRelevant && isPerformInvocationDomainRelevant diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/classes/ClassImmutabilityMatcher.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/classes/ClassImmutabilityMatcher.scala index db7d723145..525ff35eb4 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/classes/ClassImmutabilityMatcher.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/classes/ClassImmutabilityMatcher.scala @@ -68,7 +68,7 @@ class DependentlyImmutableClassMatcher getValue(project, annotationType, a.elementValuePairs, "parameter").asArrayValue.values.map(x => x.asStringValue.value ) - annotationParameters.toSet.equals(latticeParameters.toSet) + annotationParameters.toSet.equals(latticeParameters) case p => p == property } ) { diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/types/TypeImmutabilityMatcher.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/types/TypeImmutabilityMatcher.scala index 6640e1807d..efe96aced0 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/types/TypeImmutabilityMatcher.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/immutability/types/TypeImmutabilityMatcher.scala @@ -70,7 +70,7 @@ class DependentlyImmutableTypeMatcher val annotationParameters = getValue(project, annotationType, a.elementValuePairs, "parameter").asArrayValue.values .map(x => x.asStringValue.value) - annotationParameters.toSet.equals(latticeParameters.toSet) + annotationParameters.toSet.equals(latticeParameters) case _ => p == property } ) diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/DoesNotThrowExceptionMatcher.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/DoesNotThrowExceptionMatcher.scala index de0ae18b87..aee902d4b7 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/DoesNotThrowExceptionMatcher.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/DoesNotThrowExceptionMatcher.scala @@ -11,7 +11,7 @@ import org.opalj.br.fpcf.properties.ThrownExceptions import org.opalj.fpcf.properties.AbstractPropertyMatcher /** - * Matches a methods's `ThrownExceptions` property. + * Matches a method's `ThrownExceptions` property. * * @author Andreas Muttscheller */ diff --git a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptionsMatcher.scala b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptionsMatcher.scala index a506439964..8c16bf00a7 100644 --- a/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptionsMatcher.scala +++ b/DEVELOPING_OPAL/validate/src/test/scala/org/opalj/fpcf/properties/thrown_exceptions/ExpectedExceptionsMatcher.scala @@ -51,7 +51,7 @@ private[thrown_exceptions] trait ExceptionTypeExtractor extends AbstractProperty } /** - * Matches a methods's `ThrownExceptions` property. + * Matches a method's `ThrownExceptions` property. * * @author Andreas Muttscheller */ diff --git a/OPAL/ai/src/it/scala/org/opalj/ai/DomainTestInfrastructure.scala b/OPAL/ai/src/it/scala/org/opalj/ai/DomainTestInfrastructure.scala index ad08f8c66f..a862ff0fc1 100644 --- a/OPAL/ai/src/it/scala/org/opalj/ai/DomainTestInfrastructure.scala +++ b/OPAL/ai/src/it/scala/org/opalj/ai/DomainTestInfrastructure.scala @@ -106,7 +106,7 @@ abstract class DomainTestInfrastructure(domainName: String) extends AnyFlatSpec val exceptions = new ConcurrentLinkedQueue[(String, ClassFile, Method, Throwable)]() project.parForeachMethodWithBody() { (m) => val MethodInfo(source, method) = m - analyzeClassFile(source.toString, method) foreach { exceptions.add(_) } + analyzeClassFile(source.toString, method) foreach { exceptions.add } } import scala.jdk.CollectionConverters.* exceptions.asScala @@ -144,11 +144,11 @@ abstract class DomainTestInfrastructure(domainName: String) extends AnyFlatSpec project.classFilesCount + " classes (real time: " + getTime(Symbol("OVERALL")).toSeconds + ", ai (∑CPU Times): " + getTime(Symbol("AI")).toSeconds + ")" + collectedExceptions.size + - " exceptions occured (details: " + file.toString + ")." + " exceptions occurred (details: " + file.toString + ")." ) } else { info( - s"$projectName: no exceptions occured during the interpretation of " + + s"$projectName: no exceptions occurred during the interpretation of " + methodsCount.get + " methods (of " + project.methodsCount + ") in " + project.classFilesCount + " classes (real time: " + getTime(Symbol("OVERALL")).toSeconds + ", ai (∑CPU Times): " + getTime(Symbol("AI")).toSeconds + ")" @@ -165,13 +165,13 @@ abstract class DomainTestInfrastructure(domainName: String) extends AnyFlatSpec behavior of domainName - it should ("be useable to perform an abstract interpretation of the JRE's classes") in { + it should ("be usable to perform an abstract interpretation of the JRE's classes") in { val project = BRTestSupport.createJREProject() analyzeProject("JDK", project, 4d) } - it should ("be useable to perform an abstract interpretation of OPAL-SNAPSHOT-08-14-2014") in { + it should ("be usable to perform an abstract interpretation of OPAL-SNAPSHOT-08-14-2014") in { import reader.AllClassFiles val classFilesFolder = TestResources.locateTestResources("classfiles", "bi") @@ -187,7 +187,7 @@ abstract class DomainTestInfrastructure(domainName: String) extends AnyFlatSpec analyzeProject("OPAL-SNAPSHOT-08-14-2014", project, 1.5d) } - it should ("be useable to perform an abstract interpretation of OPAL-SNAPSHOT-0.3.jar") in { + it should ("be usable to perform an abstract interpretation of OPAL-SNAPSHOT-0.3.jar") in { val classFiles = TestResources.locateTestResources("classfiles/OPAL-SNAPSHOT-0.3.jar", "bi") val project = Project(reader.ClassFiles(classFiles), Iterable.empty, true) diff --git a/OPAL/ai/src/it/scala/org/opalj/ai/domain/DomainIndependenceTest.scala b/OPAL/ai/src/it/scala/org/opalj/ai/domain/DomainIndependenceTest.scala index f0c4da1d5e..7dcc850d02 100644 --- a/OPAL/ai/src/it/scala/org/opalj/ai/domain/DomainIndependenceTest.scala +++ b/OPAL/ai/src/it/scala/org/opalj/ai/domain/DomainIndependenceTest.scala @@ -209,7 +209,7 @@ class DomainIndependenceTest extends AnyFlatSpec with Matchers { info( classFile.thisType.toJava + "{ " + method.signatureToJava(false) + - "(Instructions " + method.body.get.instructions.size + ")}\n" + + "(Instructions " + method.body.get.instructions.length + ")}\n" + Console.BLUE + "\t// domain r1 is not deterministic (concurrency bug?)\n" + Console.RESET ) @@ -217,7 +217,7 @@ class DomainIndependenceTest extends AnyFlatSpec with Matchers { info( classFile.thisType.toJava + "{ " + method.signatureToJava(false) + - "(Instructions " + method.body.get.instructions.size + ")} \n" + + "(Instructions " + method.body.get.instructions.length + ")} \n" + "\t// the results of r1 and r2 do not correspond\n" + "\t// " + Console.BOLD + m + Console.RESET + "\n" ) @@ -229,7 +229,9 @@ class DomainIndependenceTest extends AnyFlatSpec with Matchers { failed.incrementAndGet() info( classFile.thisType.toJava + "{ " + - method.signatureToJava(false) + "(Instructions " + method.body.get.instructions.size + ")} \n" + + method.signatureToJava( + false + ) + "(Instructions " + method.body.get.instructions.length + ")} \n" + "\t// the results of r2 and r3 do not correspond\n" + "\t// " + Console.BOLD + m + Console.RESET + "\n" ) diff --git a/OPAL/ai/src/it/scala/org/opalj/ai/domain/PrecisionOfDomainsTest.scala b/OPAL/ai/src/it/scala/org/opalj/ai/domain/PrecisionOfDomainsTest.scala index b5a6f04b5a..f7f1d09437 100644 --- a/OPAL/ai/src/it/scala/org/opalj/ai/domain/PrecisionOfDomainsTest.scala +++ b/OPAL/ai/src/it/scala/org/opalj/ai/domain/PrecisionOfDomainsTest.scala @@ -174,7 +174,7 @@ class PrecisionOfDomainsTest extends AnyFunSpec with Matchers { ): Unit = { failed.set(true) val bodyMessage = - "\" /*Instructions " + method.body.get.instructions.size + "*/\n" + + "\" /*Instructions " + method.body.get.instructions.length + "*/\n" + s"\tthe less precise domain ($lpDomain) did not abstract " + s"over the state of the more precise domain ($mpDomain)\n" + "\t" + Console.BOLD + m + Console.RESET + "\n" diff --git a/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordCFGTest.scala b/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordCFGTest.scala index 6b21f9e58d..0e803b5b88 100644 --- a/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordCFGTest.scala +++ b/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordCFGTest.scala @@ -58,7 +58,7 @@ class RecordCFGTest extends AnyFunSpec with Matchers { def terminateAfter[T >: Null <: AnyRef](millis: Long, msg: => String)(f: => T): T = { @volatile var result: T = null - val t = new Thread(new Runnable { def run(): Unit = { result = f } }) + val t = new Thread(() => { result = f }) t.start() t.join(millis) t.interrupt() @@ -170,7 +170,7 @@ class RecordCFGTest extends AnyFunSpec with Matchers { } } catch { case t: Throwable => - t.printStackTrace + t.printStackTrace() fail(s"getting the control dependency information for $pc failed", t) } } @@ -187,8 +187,8 @@ class RecordCFGTest extends AnyFunSpec with Matchers { var root: Throwable = exception while (root.getCause != null) root = root.getCause val location = - if (root.getStackTrace() != null && root.getStackTrace().length > 0) { - root.getStackTrace().take(5).map { stackTraceElement => + if (root.getStackTrace != null && root.getStackTrace.length > 0) { + root.getStackTrace.take(5).map { stackTraceElement => stackTraceElement.getClassName + " { " + stackTraceElement.getMethodName + ":" + stackTraceElement.getLineNumber + @@ -201,7 +201,7 @@ class RecordCFGTest extends AnyFunSpec with Matchers { s"[${root.getClass.getSimpleName}: ${root.getMessage}; location: $location] " } - val failuresHeader = s"${failures.size} exceptions occured in: \n" + val failuresHeader = s"${failures.size} exceptions occurred in: \n" val failuresInfo = failureMessages.mkString(failuresHeader, "\n", "\n") fail(failuresInfo) } diff --git a/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordDefUseTest.scala b/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordDefUseTest.scala index 734206fe8c..0618fcfd8e 100644 --- a/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordDefUseTest.scala +++ b/OPAL/ai/src/it/scala/org/opalj/ai/domain/RecordDefUseTest.scala @@ -269,7 +269,7 @@ class RecordDefUseTest extends AnyFunSpec with Matchers { s"${exception.getClass.getSimpleName}:\n\t$details;\n\tlocation: $location]" } - val errorMessageHeader = s"${failures.size} exceptions occured ($baseMessage) in:\n" + val errorMessageHeader = s"${failures.size} exceptions occurred ($baseMessage) in:\n" fail(failureMessages.mkString(errorMessageHeader, "\n", "\n")) } else { info(baseMessage) diff --git a/OPAL/ai/src/it/scala/org/opalj/ai/domain/l1/DefaultReferenceValuesBindingTest.scala b/OPAL/ai/src/it/scala/org/opalj/ai/domain/l1/DefaultReferenceValuesBindingTest.scala index 589ef329ad..7696047fed 100644 --- a/OPAL/ai/src/it/scala/org/opalj/ai/domain/l1/DefaultReferenceValuesBindingTest.scala +++ b/OPAL/ai/src/it/scala/org/opalj/ai/domain/l1/DefaultReferenceValuesBindingTest.scala @@ -62,7 +62,7 @@ class DefaultReferenceValuesBindingTest extends AnyFlatSpec with Matchers { } - it should "correctly join a value which implements multiple interfaces with a value that implementes just one interface that is a subtype of one of the previous interfaces" in { + it should "correctly join a value which implements multiple interfaces with a value that implements just one interface that is a subtype of one of the previous interfaces" in { val l1 = ClassType("java/io/Serializable") val l2 = ClassType("java/util/RandomAccess") val r = ClassType("java/io/Externalizable") diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/AI.scala b/OPAL/ai/src/main/scala/org/opalj/ai/AI.scala index c2ec94888f..87de75ee14 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/AI.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/AI.scala @@ -94,7 +94,7 @@ import org.opalj.util.elidedAssert * (STILL IN DESIGN!!!!) * ===Idea=== * Given an instruction i which may result in a fork of the control-flow (e.g., - * a conditional branch or an invoke instruction that may throw a catched exception). + * a conditional branch or an invoke instruction that may throw a caught exception). * If the (first) evaluation of i definitively rules out several possible paths and - on * all paths that are taken - some values are dead, but live on some of the other paths, * then the respectively current values will never be propagated to the remaining paths, @@ -105,7 +105,7 @@ import org.opalj.util.elidedAssert * for{/* it can statically be determined that this path is taken at least once!*/} { * s = "something else" * } - * doIt(s); // here, "s" is guaranteed not to reference the orignal value "null"! + * doIt(s); // here, "s" is guaranteed not to reference the original value "null"! * }}} * ===Implementation=== * When we have a fork, check if all paths... @@ -1061,7 +1061,7 @@ abstract class AI[D <: Domain]( // scheduled in the context of the calling parent // routine, but it may be scheduled in a different // context!) - // isTargetScheduled = No if we don't have subroutines.. + // isTargetScheduled = No if we don't have subroutines if (tracer.isDefined) { tracer.get.noFlow(theDomain)(sourcePC, targetPC) } @@ -1074,8 +1074,8 @@ abstract class AI[D <: Domain]( } elidedAssert( - worklist.exists(_ == targetPC) == isTargetScheduled.isYesOrUnknown || - worklist.forall(_ != targetPC) == isTargetScheduled.isNoOrUnknown, + worklist.contains(targetPC) == isTargetScheduled.isYesOrUnknown || + !worklist.contains(targetPC) == isTargetScheduled.isNoOrUnknown, s"worklist=$worklist; target=$targetPC; scheduled=$isTargetScheduled " + s"(join=$wasJoinPerformed,exceptional=$isExceptionalControlFlow)" ) @@ -1136,7 +1136,7 @@ abstract class AI[D <: Domain]( // - by the JSR / RET instructions // - by the "gotoTarget" method val pc: Int = { - // Check if we we have a return from the evaluation of a subroutine. + // Check if we have a return from the evaluation of a subroutine. // I.e., all paths in a subroutine are explored and we know all // exit points; we will now schedule the jump to the return // address and reset the subroutine's computation context @@ -1310,7 +1310,7 @@ abstract class AI[D <: Domain]( val locals = localsArray(pc) if (tracer.isDefined) { - tracer.get.instructionEvalution(theDomain)(pc, instruction, operands, locals) + tracer.get.instructionEvaluation(theDomain)(pc, instruction, operands, locals) } @inline def pcOfNextInstruction = code.pcOfNextInstruction(pc) @@ -1796,7 +1796,7 @@ abstract class AI[D <: Domain]( // find the exception handler that matches the given exception val branchTarget = eh.handlerPC val catchTypeOption = eh.catchType - if (catchTypeOption.isEmpty) { // this is a finally handler + if (catchTypeOption.isEmpty) { // this is a finally-handler gotoExceptionHandler(pc, branchTarget, None) true } else { @@ -1851,7 +1851,7 @@ abstract class AI[D <: Domain]( "aborting exception processing" ) OPALLogger.logOnce(warning) - true // effectively aborts the handling.. + true // effectively aborts the handling... } } } @@ -2119,7 +2119,7 @@ abstract class AI[D <: Domain]( // recursively call a subroutine if that subroutine is already // present in the subroutine call chain. (Subroutines can be // nested when using try-finally constructs from within a - // finally clause.) + // finally-clause.) // HOWEVER, if a subroutine is terminated by a thrown exception // it may be the case that we call the same subroutine again // even though it appears as if the subroutine was not finished. @@ -2473,7 +2473,7 @@ abstract class AI[D <: Domain]( } // - // STATEMENTS THAT CAN CAUSE EXCEPTIONELL TRANSFER OF CONTROL FLOW + // STATEMENTS THAT CAN CAUSE EXCEPTIONAL TRANSFER OF CONTROL FLOW // case 191 /*athrow*/ => @@ -2490,7 +2490,7 @@ abstract class AI[D <: Domain]( testForNullnessOfExceptionValue = true, // athrow throws AT MOST one implicit exception and the case of // potentially overlapping implicit and explicit exceptions - // related to NullPointerException is handled by "testForNull..=true" + // related to NullPointerException is handled by "testForNull...=true" forceJoin = false ) @@ -3393,7 +3393,7 @@ abstract class AI[D <: Domain]( private object AI { /** - * The list of program counters (`List(0)`) that is used when we analysis a method + * The list of program counters (`List(0)`) that is used when we analyze a method * right from the beginning. */ final val initialWorkList: List[Int /*PC*/ ] = List(0) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/AITracer.scala b/OPAL/ai/src/main/scala/org/opalj/ai/AITracer.scala index 0a4807897b..67acb66329 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/AITracer.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/AITracer.scala @@ -36,7 +36,7 @@ trait AITracer { * * If the tracer changes the `operandsArray` and/or `localsArray`, it is * the responsibility of the tracer to ensure that the data structures are still - * valid afterwards. + * valid afterward. */ def continuingInterpretation( code: Code, @@ -59,7 +59,7 @@ trait AITracer { * @param operands The operand stack before the execution of the instruction. * @param locals The registers before the execution of the instruction. */ - def instructionEvalution( + def instructionEvaluation( domain: Domain )( pc: Int, @@ -96,7 +96,7 @@ trait AITracer { ): Unit /** - * Called by the interpret when a local variable with the given index (`lvIndex`) + * Called by the interpreter when a local variable with the given index (`lvIndex`) * was set to a new value and, therefore, the reference stored in the local variable * previously was useless/dead. */ @@ -118,7 +118,7 @@ trait AITracer { * instruction was already scheduled for evaluation, but is now moved to the first * position in the list of all instructions to be executed (related to the specific * subroutine). '''A rescheduled event is also issued if the instruction was the - * the first in the list of instructions executed next.''' + * first in the list of instructions executed next.''' * However, further instructions may be appended to the list before the * next `instructionEvaluation` takes place. * @@ -163,7 +163,7 @@ trait AITracer { def jumpToSubroutine(domain: Domain)(pc: Int, target: Int, nestingLevel: Int): Unit /** - * Called when a `RET` instruction is encountered. (That does not necessary imply + * Called when a `RET` instruction is encountered. (That does not necessarily imply * that the evaluation of the subroutine as such has finished. It is possible * that other paths still need to be pursued.) */ diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/Computation.scala b/OPAL/ai/src/main/scala/org/opalj/ai/Computation.scala index e3d6bb7e0a..dfdcf68cc6 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/Computation.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/Computation.scala @@ -19,7 +19,7 @@ package ai * or threw an exception ([[throwsException]]). Only if `returnsNormally` returns * `true` the methods `result` and `hasResult` are defined. * - * @tparam V The result of the computation. Typically a `DomainValue`; + * @tparam V The result of the computation. Typically, a `DomainValue`; * if the computation is executed for its side * effect (e.g., as in case of a `monitorenter` or `monitorexit` instruction) * the type of `V` maybe `Nothing`. diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/Configuration.scala b/OPAL/ai/src/main/scala/org/opalj/ai/Configuration.scala index 45cac16ff4..ec8ff5ad39 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/Configuration.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/Configuration.scala @@ -16,7 +16,7 @@ package ai * * In general, the [[org.opalj.ai.domain.ThrowAllPotentialExceptionsConfiguration]] * should be used as a foundation as it generates all exceptions that may be thrown; however, - * configuring the behavior of method calls may be worth while. + * configuring the behavior of method calls may be worthwhile. * * @author Michael Eichberg */ @@ -72,7 +72,7 @@ trait Configuration { * Determines the behavior how method calls are handled when the exceptions that the * called method may throw are unknown. * - * @note Used by domains which handle method invokations. + * @note Used by domains which handle method invocations. */ def throwExceptionsOnMethodCall: ExceptionsRaisedByCalledMethod @@ -89,7 +89,7 @@ trait Configuration { * } * }}} * - * @note Used by domains which handle method invokations. + * @note Used by domains which handle method invocations. */ def throwNullPointerExceptionOnMethodCall: Boolean @@ -154,7 +154,7 @@ trait Configuration { def throwNegativeArraySizeException: Boolean /** - * Throw a `ClassNotFoundException` if the a specific reference type is not + * Throw a `ClassNotFoundException` if the specific reference type is not * known in the current context. The context is typically a specific `Project`. */ def throwClassNotFoundException: Boolean diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/CoreDomainFunctionality.scala b/OPAL/ai/src/main/scala/org/opalj/ai/CoreDomainFunctionality.scala index b645ed9cd3..ee0cd2c0c9 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/CoreDomainFunctionality.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/CoreDomainFunctionality.scala @@ -40,7 +40,7 @@ trait CoreDomainFunctionality extends ValuesDomain with SubroutinesDomain { core } /** - * This methods is called after the evaluation of the instruction with + * This method is called after the evaluation of the instruction with * the given `pc` with respect to `targetPC`, but before the values are propagated * (joined) and before it is checked whether the interpretation needs to be continued. * I.e., if the operands (`newOperands`) or locals (`newLocals`) are further refined @@ -283,7 +283,7 @@ trait CoreDomainFunctionality extends ValuesDomain with SubroutinesDomain { core * framework did not process the worklist and doesn't know anything about * the scheduled successors. Note that this value is independent of the * subroutine in which the value may be scheduled. If an implementation schedules - * `successorPC` the the super call has to set `isSuccessorScheduled` to `Yes`. + * `successorPC`, the super call has to set `isSuccessorScheduled` to `Yes`. * * @param isExceptionalControlFlow `true` if and only if the evaluation of * the instruction with the program counter `currentPC` threw an exception; @@ -336,7 +336,7 @@ trait CoreDomainFunctionality extends ValuesDomain with SubroutinesDomain { core * If the PC does not belong to the same (current) (sub)routine, it is not * allowed to be moved to the beginning of the worklist. * (Subroutines can only be found in code generated by old Java compilers; - * before Java 6. Subroutines are identified by jsr/ret instructions. + * before Java 6.) Subroutines are identified by jsr/ret instructions. * A subroutine can be identified by going back in the worklist * and by looking for specific "program counters" (e.g., [[SUBROUTINE_START]], * [[SUBROUTINE_END]]). @@ -384,7 +384,7 @@ trait CoreDomainFunctionality extends ValuesDomain with SubroutinesDomain { core * the state of all potential successor instructions was updated and the * flow method was called – potentially multiple times – accordingly. * - * By default this method does nothing. + * By default, this method does nothing. */ def evaluationCompleted( pc: Int, @@ -400,7 +400,7 @@ trait CoreDomainFunctionality extends ValuesDomain with SubroutinesDomain { core * has ended. The abstract interpretation of a method ends if either the fixpoint * is reached or the interpretation was aborted. * - * By default this method does nothing. + * By default, this method does nothing. * * Domains that override this method are expected to also call * `super.abstractInterpretationEnded(aiResult)`. @@ -412,7 +412,7 @@ trait CoreDomainFunctionality extends ValuesDomain with SubroutinesDomain { core /** * This function can be called when the instruction `successorPC` needs to be * scheduled. The function will test if the instruction is already scheduled and - * – if so – returns the given worklist. Otherwise the instruction + * – if so – returns the given worklist. Otherwise, the instruction * is scheduled in the correct (subroutine-)context. */ protected def schedule( diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/InstructionCountBoundedAI.scala b/OPAL/ai/src/main/scala/org/opalj/ai/InstructionCountBoundedAI.scala index 0c191bf5f7..6279af9073 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/InstructionCountBoundedAI.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/InstructionCountBoundedAI.scala @@ -87,7 +87,7 @@ object InstructionCountBoundedAI { // If this method is just a convenience wrapper we want to ensure that // we can still analyze the called methods if we also analyze the called // methods. - val instructionsSize = Math.max(code.instructions.size, 100).toDouble + val instructionsSize = Math.max(code.instructions.length, 100).toDouble // this is roughly the number of instructions * ~2 var upperBound: Double = instructionsSize @@ -112,7 +112,7 @@ object InstructionCountBoundedAI { OPALLogger.warn( "analysis configuration", "effectively unbounded evaluation" + - "; instructions size=" + code.instructions.size + + "; instructions size=" + code.instructions.length + "; exception handlers=" + code.exceptionHandlers.size + "; maxEvaluationFactor=" + maxEvaluationFactor ) @@ -122,8 +122,8 @@ object InstructionCountBoundedAI { OPALLogger.warn( "analysis configuration", "evaluation (up to: " + upperBound.toInt + - " instructions) may take execessively long" + - "; instructions size=" + code.instructions.size + + " instructions) may take excessively long" + + "; instructions size=" + code.instructions.length + "; exception handlers=" + code.exceptionHandlers.size + "; maxEvaluationFactor=" + maxEvaluationFactor ) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/InterpretationFailedException.scala b/OPAL/ai/src/main/scala/org/opalj/ai/InterpretationFailedException.scala index 6afa600263..e8d5eccce2 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/InterpretationFailedException.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/InterpretationFailedException.scala @@ -86,7 +86,7 @@ object InterpretationFailedException { s"\n)" } - override final def getMessage(): String = toString + override final def getMessage: String = toString } } } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/InterruptableAI.scala b/OPAL/ai/src/main/scala/org/opalj/ai/InterruptableAI.scala index eb8519a00f..8da8d9f86b 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/InterruptableAI.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/InterruptableAI.scala @@ -12,7 +12,7 @@ class InterruptableAI[D <: Domain] extends AI[D] { @volatile private var doInterrupt: Boolean = false - override def isInterrupted = doInterrupt || Thread.currentThread().isInterrupted() + override def isInterrupted = doInterrupt || Thread.currentThread().isInterrupted /** * After a call of this method the abstract interpretation of the current method diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/LongValuesDomain.scala b/OPAL/ai/src/main/scala/org/opalj/ai/LongValuesDomain.scala index 3aa6f7b5f4..e76b2a1f80 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/LongValuesDomain.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/LongValuesDomain.scala @@ -124,7 +124,7 @@ trait LongValuesDomain extends LongValuesFactory { domain => * * @param pc The pc of the "shift left" instruction. * @param value1 A long value (guaranteed by the JVM's semantics). - * @param value2 A int value (guaranteed by the JVM's semantics) that determines + * @param value2 An int value (guaranteed by the JVM's semantics) that determines * the number of bits to shift. */ def lshl(pc: Int, value1: DomainValue, value2: DomainValue): DomainValue @@ -144,7 +144,7 @@ trait LongValuesDomain extends LongValuesFactory { domain => * * @param pc The pc of the "unsigned shift right" instruction. * @param value1 A long value (guaranteed by the JVM's semantics). - * @param value2 A int value (guaranteed by the JVM's semantics) that determines + * @param value2 An int value (guaranteed by the JVM's semantics) that determines * the number of bits to shift. */ def lushr(pc: Int, value1: DomainValue, value2: DomainValue): DomainValue diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/MultiTracer.scala b/OPAL/ai/src/main/scala/org/opalj/ai/MultiTracer.scala index 1f0c27eb00..a88824798f 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/MultiTracer.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/MultiTracer.scala @@ -38,7 +38,7 @@ class MultiTracer(val tracers: AITracer*) extends AITracer { } } - override def instructionEvalution( + override def instructionEvaluation( domain: Domain )( pc: Int, @@ -46,7 +46,7 @@ class MultiTracer(val tracers: AITracer*) extends AITracer { operands: domain.Operands, locals: domain.Locals ): Unit = { - tracers foreach { tracer => tracer.instructionEvalution(domain)(pc, instruction, operands, locals) } + tracers foreach { tracer => tracer.instructionEvaluation(domain)(pc, instruction, operands, locals) } } override def flow( diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesDomain.scala b/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesDomain.scala index c948af3088..9589db0b1d 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesDomain.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesDomain.scala @@ -58,7 +58,7 @@ trait ReferenceValuesDomain extends ReferenceValuesFactory { domain => * Compares the given values for reference equality. Returns `Yes` if both values * point to the '''same instance''' and returns `No` if both objects are known not to * point to the same instance. The latter is, e.g., trivially the case when both - * values have a different concrete type. Otherwise `Unknown` is returned. + * values have a different concrete type. Otherwise, `Unknown` is returned. * * If both values are representing the `null` value the [[org.opalj.Answer]] is `Yes`. * @@ -72,7 +72,7 @@ trait ReferenceValuesDomain extends ReferenceValuesFactory { domain => * Compares the given values for reference inequality. Returns `No` if both values * point to the '''same instance''' and returns `Yes` if both objects are known not to * point to the same instance. The latter is, e.g., trivially the case when both - * values have a different concrete type. Otherwise `Unknown` is returned. + * values have a different concrete type. Otherwise, `Unknown` is returned. * * If both values are representing the `null` value the [[org.opalj.Answer]] is `Yes`. * diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesFactory.scala b/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesFactory.scala index 75b2314f87..44e1184987 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesFactory.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/ReferenceValuesFactory.scala @@ -16,7 +16,7 @@ import org.opalj.br.Type trait ReferenceValuesFactory extends ExceptionsFactory { domain => /** - * Factory method to create a `DomainValue` that represents value `null` and + * Factory method to create a `DomainValue` that represents value `null` * and that was created (explicitly or implicitly) by the instruction * with the specified program counter. * @@ -113,7 +113,7 @@ trait ReferenceValuesFactory extends ExceptionsFactory { domain => def NewObject(origin: ValueOrigin, classType: ClassType): DomainReferenceValue /** - * Creates a new `DomainValue` that represents ''the `this` value of a constructor before the + * Creates a new `DomainValue` that represents ''the this-value of a constructor before the * super constructor is called''. Hence, the value origin is necessarily always -1. * * OPAL calls this method when it creates the initial locals for constructors. diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/TheAI.scala b/OPAL/ai/src/main/scala/org/opalj/ai/TheAI.scala index c05f665e7a..70a643980f 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/TheAI.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/TheAI.scala @@ -2,6 +2,8 @@ package org.opalj package ai +import scala.compiletime.uninitialized + /** * Makes the instance of the abstract interpreter that performs the * abstract interpretation available to the domain. @@ -17,7 +19,7 @@ package ai */ trait TheAI[D <: Domain] { - private var theAI: AI[D] = null + private var theAI: AI[D] = uninitialized private[ai] def setAI(ai: AI[D]): Unit = { this.theAI = ai diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/TheCodeStructure.scala b/OPAL/ai/src/main/scala/org/opalj/ai/TheCodeStructure.scala index 01ed21fad6..3370ade828 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/TheCodeStructure.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/TheCodeStructure.scala @@ -2,6 +2,8 @@ package org.opalj package ai +import scala.compiletime.uninitialized + import org.opalj.br.LiveVariables import org.opalj.br.instructions.Instruction import org.opalj.collection.immutable.IntTrieSet @@ -19,9 +21,9 @@ import org.opalj.collection.immutable.IntTrieSet */ trait TheCodeStructure { domain: ValuesDomain => - private var theInstructions: Array[Instruction] = null + private var theInstructions: Array[Instruction] = uninitialized - private var theCFJoins: IntTrieSet = null + private var theCFJoins: IntTrieSet = uninitialized def instructions: Array[Instruction] = theInstructions diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/TheMemoryLayout.scala b/OPAL/ai/src/main/scala/org/opalj/ai/TheMemoryLayout.scala index 93dac6ce3b..7cc115fef9 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/TheMemoryLayout.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/TheMemoryLayout.scala @@ -2,6 +2,8 @@ package org.opalj package ai +import scala.compiletime.uninitialized + import org.opalj.br.PC /** @@ -19,14 +21,14 @@ import org.opalj.br.PC */ trait TheMemoryLayout { domain: ValuesDomain => - private var theOperandsArray: OperandsArray = null + private var theOperandsArray: OperandsArray = uninitialized - private var theLocalsArray: LocalsArray = null + private var theLocalsArray: LocalsArray = uninitialized - private var theMemoryLayoutBeforeSubroutineCall: List[(PC, OperandsArray, LocalsArray)] = null + private var theMemoryLayoutBeforeSubroutineCall: List[(PC, OperandsArray, LocalsArray)] = uninitialized - private var theSubroutinesOperandsArray: OperandsArray = null - private var theSubroutinesLocalsArray: LocalsArray = null + private var theSubroutinesOperandsArray: OperandsArray = uninitialized + private var theSubroutinesLocalsArray: LocalsArray = uninitialized private[ai] def setMemoryLayout( theOperandsArray: this.OperandsArray, diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/ValuesDomain.scala b/OPAL/ai/src/main/scala/org/opalj/ai/ValuesDomain.scala index ce0c720599..6a3434b542 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/ValuesDomain.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/ValuesDomain.scala @@ -50,7 +50,7 @@ trait ValuesDomain { domain => /** * Creates a domain value from the given value information that represents a - * properly domain value. + * proper domain value. * A representation of a proper value is created even if the value information is provided * for an '''uninitialized''' value. * @@ -97,7 +97,7 @@ trait ValuesDomain { domain => * * ==Use Of Value/Dependencies On Value== * '''In general, subclasses and users of a `Domain` should not have/declare - * a direct dependency on `Value`'''. Instead they should use `DomainValue` as otherwise + * a direct dependency on `Value`'''. Instead, they should use `DomainValue` as otherwise * extensibility of a `Domain` may be hampered or even be impossible. The only * exceptions are, of course, classes that directly inherit from this class. * @@ -213,7 +213,7 @@ trait ValuesDomain { domain => * * Conceptually, the join of an object with itself has to return the object * itself. Note, that this is a conceptual requirement as such a call - * (`this.doJoin(..,this)`) will not be performed by the abstract interpretation + * (`this.doJoin(...,this)`) will not be performed by the abstract interpretation * framework; this case is handled by the [[join]] method. * However, if the join object is also used by the implementation of the domain * itself, it may be necessary to explicitly handle self-joins. @@ -308,7 +308,7 @@ trait ValuesDomain { domain => * * @param other Another `DomainValue` with the same computational type as this value. * (The `IllegalValue` has no computational type and, hence, a comparison with - * an IllegalValue is not well defined.) + * an IllegalValue is not well-defined.) * * @see `abstractsOver` */ @@ -469,7 +469,7 @@ trait ValuesDomain { domain => type LocalsArray = org.opalj.ai.TheLocalsArray[Locals] // the package name is required by unidoc /** - * Represents a value that has no well defined state/type. Such values are either + * Represents a value that has no well-defined state/type. Such values are either * the result of a join of two incompatible values or if the variable was identified * as being dead. `IllegalValue`'s are only found in registers (in the locals). * diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/common/DomainRegistry.scala b/OPAL/ai/src/main/scala/org/opalj/ai/common/DomainRegistry.scala index 1eacabddac..6f8cd4da26 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/common/DomainRegistry.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/common/DomainRegistry.scala @@ -13,7 +13,7 @@ import org.opalj.br.analyses.SomeProject * body. * * The registry was developed to support tools for enabling the automatic selection of a domain - * that satisfies a given set of requirements; it also support debugging purposes that let + * that satisfies a given set of requirements; it also supports debugging purposes that let * the user/developer choose between different domains. After choosing a domain, * an abstract interpretation can be performed. * @@ -54,7 +54,7 @@ object DomainRegistry { factory: (SomeProject, Method) => Domain ): Unit = { this.synchronized { - if (classRegistry.get(domainClass).nonEmpty) + if (classRegistry.contains(domainClass)) throw new IllegalArgumentException(s"$domainClass is already registered"); descriptions += ((domainDescription, domainClass)) @@ -130,7 +130,7 @@ object DomainRegistry { // we already have a less precise domain... c } else { - // This one is less precise than all other, is one the other acutally + // This one is less precise than all other, is one of the other actually // more precise than N c.filter(c => !allLessPreciseDomains(c).contains(n)) + n } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/common/SimpleAIKey.scala b/OPAL/ai/src/main/scala/org/opalj/ai/common/SimpleAIKey.scala index 68ca5a437d..894ab4ca88 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/common/SimpleAIKey.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/common/SimpleAIKey.scala @@ -86,7 +86,7 @@ object SimpleAIKey case Some(taCode) => taCode case None => val brCode = m.body.get - // Basically, we use double checked locking; we really don't want to + // Basically, we use double-checked locking; we really don't want to // transform the code more than once! brCode.synchronized { aiResults.get(m) match { diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/common/XHTML.scala b/OPAL/ai/src/main/scala/org/opalj/ai/common/XHTML.scala index 72de4b7b99..103afebcf7 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/common/XHTML.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/common/XHTML.scala @@ -63,7 +63,7 @@ object XHTML { val currentTime = System.currentTimeMillis() if ((currentTime - this.lastDump) > minimumDumpInterval) { this.lastDump = currentTime - val title = Some("Generated due to exception: " + e.getMessage()) + val title = Some("Generated due to exception: " + e.getMessage) val code = method.body.get val dump = XHTML.dump( @@ -75,7 +75,7 @@ object XHTML { )(result.cfJoins, operandsArray, localsArray) writeAndOpen(dump, "StateOfIncompleteAbstractInterpretation", ".html") } else { - Console.err.println("[info] dump suppressed: " + e.getMessage()) + Console.err.println("[info] dump suppressed: " + e.getMessage) } throw e } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/AsJavaObject.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/AsJavaObject.scala index aa80716c09..53ff22ae0b 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/AsJavaObject.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/AsJavaObject.scala @@ -31,7 +31,7 @@ trait AsJavaObject { domain: ReferenceValuesDomain => * Every domain that supports the creation of a Java object's based on a domain * value is expected to implement this method and to test if it can create * a precise representation of the given value. If not, the implementation has to delegate - * the responsibility to the super method to creat an abstract representation. + * the responsibility to the super method to create an abstract representation. * {{{ * abstract override def toJavaObject(value : DomainValue): Option[Object] = { * if(value...) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/DefaultHandlingForReturnInstructions.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/DefaultHandlingForReturnInstructions.scala index 209ea111ba..6359d1658b 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/DefaultHandlingForReturnInstructions.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/DefaultHandlingForReturnInstructions.scala @@ -5,7 +5,7 @@ package domain /** * Provides default implementations for a `Domain`'s return methods that always throw - * an `IllegalMonitorStateExceptoin`. + * an `IllegalMonitorStateException`. * * You can mix in this trait if you are not interested in a method's return values or if * you need some default implementations. diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/JoinStabilization.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/JoinStabilization.scala index 8eb2f12f7a..12a01ffb7d 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/JoinStabilization.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/JoinStabilization.scala @@ -123,7 +123,7 @@ trait JoinStabilization extends CoreDomainFunctionality { left: DomainValue, right: DomainValue ): Update[DomainValue] = { - val key = new IdentityPair(left, right) + val key = IdentityPair(left, right) val joinedValue = joinedValues.get(key) if (joinedValue != null) { joinedValue diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/MethodCallsHandling.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/MethodCallsHandling.scala index 156beadcf5..9b6428452d 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/MethodCallsHandling.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/MethodCallsHandling.scala @@ -44,11 +44,11 @@ trait MethodCallsHandling extends MethodCallsDomain { } } case ExceptionsRaisedByCalledMethods.Known => - // we basically know nothing.. + // we basically know nothing... } // The list of exception values is in reverse order when compared to the handlers! - // This is by purpose to foster a faster overall evaluation. (I.e., we want + // This is by purpose to foster a faster overall evaluation. I.e., we want // to perform the abstract interpretation using more abstract values first (<=> // exceptions with types higher-up in the type hierarchy). exceptionValues diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/Origin.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/Origin.scala index d94e00ce0e..6b81f7df10 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/Origin.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/Origin.scala @@ -27,7 +27,7 @@ import org.opalj.collection.immutable.IntTrieSet1 * as an example); the respective domains have to override [[providesOriginInformationFor]] * * @note A [[org.opalj.br.instructions.CHECKCAST]] must not modify `origin` information; i.e., - * the origin of the value on the stack before and after the checkast (unless we have + * the origin of the value on the stack before and after the checkcast (unless we have * an exception) must be the same! * @author Michael Eichberg */ @@ -53,7 +53,7 @@ trait Origin { domain: ValuesDomain => * This trait only defines a general contract how to get access to a * value's origin (I.e., the origin of the instruction which created the * respective value.) - * By default this method returns an empty `Iterable`. + * By default, this method returns an empty `Iterable`. */ def originsIterator(value: DomainValue): ValueOriginsIterator = { value match { diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/PostEvaluationMemoryManagement.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/PostEvaluationMemoryManagement.scala index 83370b50fe..21287540a5 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/PostEvaluationMemoryManagement.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/PostEvaluationMemoryManagement.scala @@ -3,6 +3,8 @@ package org.opalj package ai package domain +import scala.compiletime.uninitialized + import org.opalj.br.instructions.Instruction import org.opalj.util.elidedAssert @@ -20,9 +22,9 @@ import org.opalj.util.elidedAssert */ trait PostEvaluationMemoryManagement extends CoreDomainFunctionality { - private var oldValue: DomainValue = null - private var newValueAfterEvaluation: DomainValue = null - private var newValueAfterException: DomainValue = null + private var oldValue: DomainValue = uninitialized + private var newValueAfterEvaluation: DomainValue = uninitialized + private var newValueAfterException: DomainValue = uninitialized protected def updateAfterExecution( oldValue: DomainValue, diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordAllThrownExceptions.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordAllThrownExceptions.scala index 13409350df..56f72e00ba 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordAllThrownExceptions.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordAllThrownExceptions.scala @@ -13,7 +13,7 @@ import scala.collection.immutable * have meaningful `equals` and `hashCode` methods. (Depending on the purpose * of the abstract interpretation, reference equality may be sufficient.) * - * @note This domain is only effective if the calculation of joins is fast. Otherwise + * @note This domain is only effective if the calculation of joins is fast. Otherwise, * it can significantly hamper overall performance! * * @author Michael Eichberg diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordCFG.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordCFG.scala index f9eb7f8138..b714b95852 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordCFG.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordCFG.scala @@ -338,7 +338,7 @@ trait RecordCFG /** * Returns all PCs that may lead to the (ab)normal termination of the method. I.e., * those instructions (in particular method call instructions, but potentially also - * array access instructions and (I]L)DIV|MOD instructions etc.) that may throw + * array access instructions and (I/L)DIV|MOD instructions etc.) that may throw * some unhandled exceptions will also be returned; even if the instruction may * also have regular and also exception handlers! */ @@ -376,7 +376,7 @@ trait RecordCFG * The `pc` has to identify a valid instruction. */ private final def unsafeWasExecuted(pc: PC): Boolean = { - // The following "comparatively expensive" test cannot be replace by a simple + // The following "comparatively expensive" test cannot be replaced by a simple // operandsArray(pc) eq null test as long as we support containing subroutines. // In the latter case, a subroutine's (sub) operands array will contain null // values directly after the analysis has finished (when the computeBBCFG is @@ -469,7 +469,7 @@ trait RecordCFG /** * Tests if the instruction with the given `pc` has a successor instruction with - * a `pc'` that satisfies the given predicate `p`. + * a `pc` that satisfies the given predicate `p`. */ def hasSuccessor( pc: Int, @@ -605,7 +605,7 @@ trait RecordCFG setFieldValue(new SRef(newValue)) newValue } else { - f // initialized by a side-effect of evaluating the if condition + f // initialized by a side effect of evaluating the if condition } } } else { @@ -619,7 +619,7 @@ trait RecordCFG setFieldValue(new SRef(newValue)) newValue } else { - f // initialized by a side-effect of evaluating the if condition + f // initialized by a side effect of evaluating the if condition } } } else { diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordDefUse.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordDefUse.scala index f71b6a683b..a9aa9758d3 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordDefUse.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordDefUse.scala @@ -413,7 +413,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => forceScheduling } else { - elidedAssert(newDefOps forall { vo => vo != null }, "null value origin found") + elidedAssert(!newDefOps.contains(null), "null value origin found") // elidedAssert(newDefOps.forall(e => e.iterator.size == e.size)) defOps(successorPC) = newDefOps defLocals(successorPC) = newDefLocals @@ -510,7 +510,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => newDefOps case INVOKEDYNAMIC.opcode | INVOKESTATIC.opcode => - // ... we have no receiver, hence, we can't have a VM + // ... we have no receiver, hence, we can't have a // VM NullPointerException and therefore the exception // is not raised by the INVOKEDYNAMIC instruction ValueOrigins(ValueOriginForMethodExternalException(currentPC)) @@ -531,8 +531,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => * the stack and that – optionally – a new value is pushed onto the stack (and * associated with a new variable). * - * The usage is independent of the question whether the usage resulted in an - * exceptional control flow. + * The usage is independent of whether the usage resulted in an exceptional control flow. */ protected def stackOperation( currentPC: Int, @@ -548,7 +547,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => operandsArray: OperandsArray ): Boolean = { val currentDefOps = defOps(currentPC) - currentDefOps.take(usedValues).map { op => updateUsageInformation(op, currentPC) } + currentDefOps.take(usedValues).foreach { op => updateUsageInformation(op, currentPC) } val newDefOps: List[ValueOrigins] = if (isExceptionalControlFlow) { @@ -955,10 +954,10 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => // exceptional control flow) - that does not mean that the cast was useless. // At this point in time we simply don't have the necessary information to // decide whether the cast is truly useless. - // E.g,. + // E.g., // AbstractList abstractL = ...; // List l = (java.util.List) abstractL; // USELESS - // ArrayList al = (java.util.ArrayList) l; // MAY OR MAY NO SUCCEED + // ArrayList al = (java.util.ArrayList) l; // MAY OR MAY NOT SUCCEED val currentDefOps = defOps(currentPC) val op = currentDefOps.head updateUsageInformation(op, currentPC) @@ -1002,7 +1001,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => // TODO FIXME XXX Handle throws which terminate subroutines... - // We generally first have to clean-up the state of a currently executed + // We generally first have to clean up the state of a currently executed // subroutine, before we start the evaluation of the next subroutine, // unless, we have a nested subroutine call - in that case, we have to // do the nested subroutine call first! @@ -1138,7 +1137,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => else scheduleNextSubroutine() } else { - // we don't have subroutines at all.. + // we don't have subroutines at all... false } } @@ -1263,7 +1262,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => // just operates on the stack and which is not a stack management instruction (dup, // ...)) val usedValues = instructions(currentPC).numberOfPoppedOperands(NotRequired) - defOps(currentPC).take(usedValues).map(op => updateUsageInformation(op, currentPC)) + defOps(currentPC).take(usedValues).foreach(op => updateUsageInformation(op, currentPC)) } } @@ -1347,7 +1346,11 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => if (os eq null) {"N/A"} else - os.map { o =>
  • {if (o eq null) "N/A" else o.mkString("{", ",", "}")}
  • }.toList + os.map { o => +
  • + {if (o eq null) "N/A" else o.mkString("{", ",", "}")} +
  • + } val locals = if (ls eq null) @@ -1404,7 +1407,7 @@ trait RecordDefUse extends RecordCFG { defUseDomain: Domain & TheCode => def instructionToString(vo: ValueOrigin): String = { if (ai.isImplicitOrExternalException(vo)) - s"" + s"" else if (vo < 0) s"" else diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordReturnedValue.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordReturnedValue.scala index bb26b83413..d90e179b65 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordReturnedValue.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/RecordReturnedValue.scala @@ -3,6 +3,8 @@ package org.opalj package ai package domain +import scala.compiletime.uninitialized + /** * Record the value returned by a method across all return instructions. * @@ -18,7 +20,7 @@ package domain trait RecordReturnedValue extends RecordReturnedValuesInfrastructure { domain: ValuesDomain => - protected var theReturnedValue: DomainValue = null + protected var theReturnedValue: DomainValue = uninitialized def returnedValue: Option[DomainValue] = Option(theReturnedValue) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/TheMethod.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/TheMethod.scala index 069f1db3dc..07f0caac06 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/TheMethod.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/TheMethod.scala @@ -40,7 +40,7 @@ trait TheMethod extends TheCode { */ final /*override*/ val code: Code = method.body.get - override def toString(): String = { + override def toString: String = { super.toString + s" with TheMethod(${method.toJava})" } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/ThrowNoPotentialExceptionsConfiguration.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/ThrowNoPotentialExceptionsConfiguration.scala index cfd1e19d40..5ed5e5cb2f 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/ThrowNoPotentialExceptionsConfiguration.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/ThrowNoPotentialExceptionsConfiguration.scala @@ -4,7 +4,7 @@ package ai package domain /** - * A configuration that forces the abstract interpretor to never create an exception + * A configuration that forces the abstract interpreter to never create an exception * if it is not possible to deduce that the specific exception is guaranteed to be thrown. * * ==Usage== diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelHandlingForReturnInstructions.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelHandlingForReturnInstructions.scala index 89b0d0e7fc..8623dfdfa2 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelHandlingForReturnInstructions.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelHandlingForReturnInstructions.scala @@ -6,7 +6,7 @@ package l0 /** * Provides default implementations for a `Domain`'s return methods that always throw - * an `IllegalMonitorStateExceptoin`. + * an `IllegalMonitorStateException`. * * You can mix in this trait if you are not interested in a method's return values or if * you need some default implementations. diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelIntegerValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelIntegerValues.scala index f9825a1aa7..5e38d6e3cc 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelIntegerValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelIntegerValues.scala @@ -8,7 +8,7 @@ import org.opalj.br.ComputationalTypeInt /** * Base implementation of the `TypeLevelIntegerValues` trait that requires that - * the domain's Value` trait is not extended. This implementation satisfies + * the domain's `Value` trait is not extended. This implementation satisfies * the requirements of OPAL w.r.t. the domain's computational type. Additionally, * it collects information about a value's range, if possible. * @@ -16,8 +16,8 @@ import org.opalj.br.ComputationalTypeInt * all values of the same primitive type. * * =Adaptation/Reusability= - * This domain '''does not support constraint propagation''' – due to its reuse of the - * the same instance of a DomainValue across all potential instantiations of such values – + * This domain '''does not support constraint propagation''' – due to its reuse of + * the same instance of a DomainValue across all potential instantiations of such values – * and should not be used to implement such a domain as this requires the * reimplementation of basically '''all''' methods. * diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelReferenceValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelReferenceValues.scala index 486c70c683..4311b8a3c6 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelReferenceValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/DefaultTypeLevelReferenceValues.scala @@ -39,7 +39,7 @@ trait DefaultTypeLevelReferenceValues type DomainObjectValue <: AnObjectValue & AReferenceValue // <= SObject.. and MObject... type DomainArrayValue <: AnArrayValue & AReferenceValue - protected class ANullValue() extends super.NullValueLike { this: DomainNullValue => + protected class ANullValue extends super.NullValueLike { this: DomainNullValue => override protected def doJoin(pc: Int, other: DomainValue): Update[DomainValue] = { other match { @@ -78,7 +78,7 @@ trait DefaultTypeLevelReferenceValues // the elementValue is "null" elidedAssert(elementValue.isNull.isYes) // e.g., it is possible to store null in the n-1 dimensions of - // a n-dimensional array of primitive values + // an n-dimensional array of primitive values if (theUpperTypeBound.componentType.isReferenceType) Yes else diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/TypeLevelReferenceValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/TypeLevelReferenceValues.scala index 6d34b59237..743e6399f0 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/TypeLevelReferenceValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l0/TypeLevelReferenceValues.scala @@ -731,7 +731,7 @@ trait TypeLevelReferenceValues extends GeneralizedArrayHandling with AsJavaObjec def ArrayValue(pc: Int, arrayType: ArrayType): DomainArrayValue /** - * Factory method to create a `DomainValue` that represents ''either an class-/interface + * Factory method to create a `DomainValue` that represents ''either a class-/interface * value that has the given type or the value `null`''. However, the * information whether the value is `null` or not is not available. Furthermore, the * type may also just be an upper bound and it is not known if the value is @@ -750,7 +750,7 @@ trait TypeLevelReferenceValues extends GeneralizedArrayHandling with AsJavaObjec def ObjectValue(pc: Int, classType: ClassType): DomainObjectValue /** - * Factory method to create a `DomainValue` that represents ''either an class-/interface + * Factory method to create a `DomainValue` that represents ''either a class-/interface * value that has the given types as an upper bound or the value `null`''. However, the * information whether the value is `null` or not is not available. Furthermore, the * type may also just be an upper bound and it is not known if the value is @@ -803,7 +803,7 @@ trait TypeLevelReferenceValues extends GeneralizedArrayHandling with AsJavaObjec * - Type: '''Precise''' * - Null: '''No''' * - Size: '''Count''' - * - Content: ''Symbol("Empty")''' (i.e., default values w.r.t. to the array's component type) + * - Content: '''Symbol("Empty")''' (i.e., default values w.r.t. to the array's component type) */ def NewArray(pc: Int, count: DomainValue, arrayType: ArrayType): DomainArrayValue = { ArrayValue(pc, arrayType) @@ -823,7 +823,7 @@ trait TypeLevelReferenceValues extends GeneralizedArrayHandling with AsJavaObjec * - Type: '''Precise''' * - Null: '''No''' * - Size: '''Depending on the values in `counts`''' - * - Content: ''Symbol("Empty")''' (i.e., default values w.r.t. to the array's component type) + * - Content: '''Symbol("Empty")''' (i.e., default values w.r.t. to the array's component type) */ def NewArray(pc: Int, counts: Operands, arrayType: ArrayType): DomainArrayValue = { ArrayValue(pc, arrayType) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ArrayValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ArrayValues.scala index 9846697ea5..dae9134021 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ArrayValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ArrayValues.scala @@ -32,7 +32,7 @@ trait ArrayValues extends l1.ReferenceValues { // IMPROVE Add support to track the size of arrays independent of a concrete instance /** - * Represents some (multi-dimensional) array where the (initialized) dimensions have + * Represents some (multidimensional) array where the (initialized) dimensions have * the given size. */ // NOTE THAT WE CANNOT STORE SIZE INFORMATION FOR AlL DIMENSIONS BEYOND THE FIRST ONE; diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ClassValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ClassValues.scala index 351325a1bc..93c0439c2d 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ClassValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ClassValues.scala @@ -38,7 +38,7 @@ import org.opalj.value.TheClassValue * class MyDomain * extends DefaultTypeLevelInvokeInstructions * with ClassValues - * with + * with * }}} * * @author Michael Eichberg (fixes for multi-parameter Class.forName(...) calls) @@ -123,7 +123,7 @@ trait ClassValues override def ClassValue(vo: ValueOrigin, value: Type): DomainObjectValue protected[l1] def simpleClassForNameCall(pc: Int, className: String): MethodCallResult = { - if (className.length() == 0) + if (className.isEmpty) return justThrows(ClassNotFoundException(pc)); val classValue = @@ -182,7 +182,7 @@ trait ClassValues case `forName_String_Class` => simpleClassForNameCall(pc, value) case `forName_String_boolean_ClassLoader_Class` => simpleClassForNameCall(pc, value) case _ => - throw new DomainException( + throw DomainException( s"unsupported Class { ${methodDescriptor.toJava("forName")} }" ) } @@ -196,7 +196,7 @@ trait ClassValues case `forName_Module_String` => simpleClassForNameCall(pc, value) case `forName_Module_String_Class` => simpleClassForNameCall(pc, value) case _ => - throw new DomainException( + throw DomainException( s"unsupported Class { ${methodDescriptor.toJava("forName")} }" ) } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConcreteArrayValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConcreteArrayValues.scala index 034a3984fb..1fc499428e 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConcreteArrayValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConcreteArrayValues.scala @@ -49,7 +49,7 @@ trait ConcreteArrayValues * The default value is 16. * * This setting can dynamically be adapted at runtime and will be considered - * for each new array that is created afterwards. + * for each new array that is created afterward. */ def maxTrackedArraySize: Int = 16 @@ -80,7 +80,7 @@ trait ConcreteArrayValues * of reflectively called methods, it might be interesting to track arrays * that contain string values. * - * By default only arrays of known immutable values up to a size of [[maxTrackedArraySize]] + * By default, only arrays of known immutable values up to a size of [[maxTrackedArraySize]] * are reified. * * @note Tracking the content of arrays generally has a significant performance @@ -119,7 +119,7 @@ trait ConcreteArrayValues * The tracking of the content of an array is only possible as long as the * array is not merged with another array created at a different point in time. * From that point on, it is no longer possible to track the content of the arrays - * that are merged as well as the "merged array" it self since operations on the + * that are merged as well as the "merged array" itself since operations on the * "merged array" are not reflected in the original arrays. */ // NOTE THAT WE DO NOT SUPPORT THE CASE WHERE THE ARRAY STORES CONCRETE MUTABLE VALUES! @@ -178,7 +178,7 @@ trait ConcreteArrayValues // In both of the following cases, the array remains untouched: // - if an ArrayIndexOutOfBoundsException is thrown then the index // is invalid - // - if an ArrayStoreException may be thrown, we are totally lost.. + // - if an ArrayStoreException may be thrown, we are totally lost... // // However, if some exception may be thrown, then we certainly // do not have enough information about the value/the index and @@ -297,7 +297,7 @@ trait ConcreteArrayValues that.canEqual(this) && this.origin == that.origin && (this.theUpperTypeBound eq that.theUpperTypeBound) && - this.values == that.values + (this.values sameElements that.values) ) case _ => false @@ -312,7 +312,7 @@ trait ConcreteArrayValues override def toString: String = { val valuesAsString = values.mkString("«", ", ", "»") - s"${theUpperTypeBound.toJava}[@$origin;length=${values.size};refId=$refId,$valuesAsString]" + s"${theUpperTypeBound.toJava}[@$origin;length=${values.length};refId=$refId,$valuesAsString]" } } @@ -336,7 +336,7 @@ trait ConcreteArrayValues if (size >= 256) { val message = s"tracking very large arrays (${arrayType.toJava}) " + - "usually incurrs significant overhead without increasing " + + "usually incurs significant overhead without increasing " + "the precision of the analysis" OPALLogger.logOnce(Warn("analysis configuration", message)) } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConstraintsBetweenIntegerValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConstraintsBetweenIntegerValues.scala index a72d95f05d..d4c31776d7 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConstraintsBetweenIntegerValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ConstraintsBetweenIntegerValues.scala @@ -5,6 +5,7 @@ package domain package l1 import java.util.IdentityHashMap as IDMap +import scala.compiletime.uninitialized import scala.jdk.CollectionConverters.* import org.opalj.br.LiveVariables @@ -21,7 +22,7 @@ import org.opalj.util.elidedAssert */ trait ConstraintsBetweenIntegerValues extends CoreDomainFunctionality - with IntegerRangeValues // IMRPOVE Define a common trait that specifies that the values support aliasing analyses + with IntegerRangeValues // IMPROVE Define a common trait that specifies that the values support aliasing analyses with TheCodeStructure { domain: CorrelationalDomainSupport & Configuration & ExceptionsFactory => @@ -36,7 +37,7 @@ trait ConstraintsBetweenIntegerValues // // We store the constraints that are in effect for each instruction - private var constraints: Array[ConstraintsStore] = null + private var constraints: Array[ConstraintsStore] = uninitialized abstract override def setCodeStructure( theInstructions: Array[Instruction], @@ -440,7 +441,7 @@ trait ConstraintsBetweenIntegerValues // (value1, value2) match { // case (IntegerRange(lb1, ub1), IntegerRange(lb2, ub2)) => // // to identify overflows we simply do the "add" on long values - // // and check afterwards + // // and check afterward // val lb = lb1.toLong + lb2.toLong // val ub = ub1.toLong + ub2.toLong // if (lb < Int.MinValue || ub > Int.MaxValue) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerRangeValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerRangeValues.scala index 04356cfb07..40128f9d3c 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerRangeValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerRangeValues.scala @@ -103,8 +103,8 @@ trait DefaultIntegerRangeValues extends DefaultSpecialDomainValuesBinding with I } else if (newLB == thisLB && newUB == thisUB) { // This is NOT a "NoUpdate" since we have two values that may // have the same range, but which can still be two different - // runtime values (they were not created at the same time! - // The "CorrelationalDomain" will make sure that this udpate is + // runtime values (they were not created at the same time!) + // The "CorrelationalDomain" will make sure that this update is // handled. MetaInformationUpdate(IntegerRange(newLB, newUB)) } else if (thisLB == thisUB && otherLB == otherUB) { @@ -112,7 +112,7 @@ trait DefaultIntegerRangeValues extends DefaultSpecialDomainValuesBinding with I // create a "true" range. StructuralUpdate(IntegerRange(newLB, newUB)) } else if (abs(newLB.toLong - newUB.toLong) > maxCardinalityOfIntegerRanges) { - // let's just use one of the default ranges.. + // let's just use one of the default ranges var adjustedNewLB: Int = if (newLB < Short.MinValue) { Int.MinValue diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerSetValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerSetValues.scala index ab6f6bbf6d..38cb75ade5 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerSetValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultIntegerSetValues.scala @@ -83,7 +83,7 @@ trait DefaultIntegerSetValues extends DefaultSpecialDomainValuesBinding with Int } else if (newValues.size == this.values.size) { // This is NOT a "NoUpdate" since we have two values that may // have the same range, but which can still be two different - // runtime values (they were not created at the same time! + // runtime values (they were not created at the same time!) MetaInformationUpdate(IntegerSet(this.values)) } else { StructuralUpdate(IntegerSet(newValues)) @@ -104,15 +104,14 @@ trait DefaultIntegerSetValues extends DefaultSpecialDomainValuesBinding with Int override def summarize(pc: Int): DomainValue = this override def adapt(target: TargetDomain, pc: Int): target.DomainValue = { - if (target.isInstanceOf[IntegerSetValues]) { - val thatDomain = target.asInstanceOf[IntegerSetValues] - thatDomain.IntegerSet(this.values).asInstanceOf[target.DomainValue] - } else if (target.isInstanceOf[IntegerRangeValues]) { - val thatDomain = target.asInstanceOf[IntegerRangeValues] - val value = thatDomain.IntegerRange(this.values.firstKey, this.values.lastKey) - value.asInstanceOf[target.DomainValue] - } else { - target.IntegerValue(pc) + target match { + case thatDomain: IntegerSetValues => + thatDomain.IntegerSet(this.values).asInstanceOf[target.DomainValue] + case thatDomain: IntegerRangeValues => + val value = thatDomain.IntegerRange(this.values.firstKey, this.values.lastKey) + value.asInstanceOf[target.DomainValue] + case _ => + target.IntegerValue(pc) } } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultLongSetValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultLongSetValues.scala index ab85a2bd21..96c4c22efb 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultLongSetValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/DefaultLongSetValues.scala @@ -21,7 +21,7 @@ trait DefaultLongSetValues with LongSetValues { domain: IntegerRangeValuesFactory & Configuration & ExceptionsFactory => - class ALongValue() extends super.ALongValueLike { + class ALongValue extends super.ALongValueLike { override def constantValue: Option[Long] = None diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerRangeValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerRangeValues.scala index 94f301affa..6a7a97ea70 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerRangeValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerRangeValues.scala @@ -101,7 +101,7 @@ trait IntegerRangeValues * This setting is only used when true ranges are merged; in case of a join of two * concrete values we will always create an [[IntegerRangeLike]] value. If the cardinality * is exceeded, we will also first create ranges based on the boundaries determined - * by the defaul data types (byte,short,char). + * by the default data types (byte,short,char). * * This setting can be adapted at runtime. */ @@ -140,7 +140,7 @@ trait IntegerRangeValues /** * Represents a range of integer values. The range's bounds are inclusive. - * Unless a range has only one value it is impossible to tell whether or not + * Unless a range has only one value, it is impossible to tell whether or not * a value that is in the range will potentially occur at runtime. */ abstract class IntegerRangeLike extends IntegerLikeValue { @@ -551,7 +551,7 @@ trait IntegerRangeValues value1 else { // to identify overflows we simply do the "add" on long values - // and check afterwards + // and check afterward val lb: Long = lb1.toLong + lb2.toLong val ub: Long = ub1.toLong + ub2.toLong if (lb < Int.MinValue || ub > Int.MaxValue) @@ -603,7 +603,7 @@ trait IntegerRangeValues left match { case IntegerRangeLike(llb, lub) => // to identify overflows we simply do the "add" on long values - // and check afterwards + // and check afterward val lb = llb.toLong - rub.toLong val ub = lub.toLong - rlb.toLong if (lb < Int.MinValue || ub > Int.MaxValue) @@ -674,7 +674,7 @@ trait IntegerRangeValues case (IntegerRangeLike(lb1, ub1), IntegerRangeLike(lb2, ub2)) => // to identify overflows we simply do the "mul" on long values - // and check afterwards + // and check afterward val lb1l = lb1.toLong val ub1l = ub1.toLong val lb2l = lb2.toLong @@ -1060,12 +1060,12 @@ trait IntegerRangeValues // The min value is calculated by setting subBits to zero, // since min neg value contains the most trailing zeros. // The first right shift preserves the leading bits, since - // the do not change. + // they do not change. val lb = (v1lb >> subBits) << subBits // The max value is calculated by setting subBits to one, // since this change can result into the max number. The - // or operation leading preserves the leading bits, since + // OR operation leading preserves the leading bits, since // those bits do not change. val ub = v1ub | ((1 << subBits) - 1) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerSetValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerSetValues.scala index 7282ec0068..00f6bb5f11 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerSetValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/IntegerSetValues.scala @@ -621,7 +621,7 @@ trait IntegerSetValues val newLs = ls.filter(_ < rsMax) val (operands1, locals1) = if (newLs.size != ls.size) { - if (newLs.size == 0) { + if (newLs.isEmpty) { val message = s"constraint: $left < $right led to impossible value" throw new IllegalStateException(message) } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/MaxArrayLengthRefinement.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/MaxArrayLengthRefinement.scala index 29affd8a3f..d45719a8d1 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/MaxArrayLengthRefinement.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/MaxArrayLengthRefinement.scala @@ -24,7 +24,7 @@ trait MaxArrayLengthRefinement extends l0.TypeLevelReferenceValues { case _ => length } } else { - // if the array is null.. + // if the array is null... length } } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/NullPropertyRefinement.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/NullPropertyRefinement.scala index 537c7b9a82..b5fa1e05ee 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/NullPropertyRefinement.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/NullPropertyRefinement.scala @@ -146,7 +146,7 @@ trait NullPropertyRefinement extends CoreDomainFunctionality { val arrayRef = oldOperands.head establishNullProperty(arrayRef) - case MONITORENTER.opcode /* not necessary: | MONITOREXIT.opcode (every monitorexit is preceeded by a monitorenter) */ => + case MONITORENTER.opcode /* not necessary: | MONITOREXIT.opcode (every monitorexit is preceded by a monitorenter) */ => val monitor = oldOperands.head establishNullProperty(monitor) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReferenceValues.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReferenceValues.scala index cd7051258b..02ddb8d12f 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReferenceValues.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReferenceValues.scala @@ -286,7 +286,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { * (`this.isValueASubtypeOf(supertype)`) * returned `Unknown` and we are now on the branch where the value has to be of * the respective type. '''Hence, this method only handles the case where - * supertype is more strict than this type's upper type bound.''' + * supertype is stricter than this type's upper type bound.''' * * @return The updated operand stack and register values. */ @@ -491,7 +491,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { StructuralUpdate(mrv) } else { - // This value has the the same origin as a value found in + // This value has the same origin as a value found in // MultipleReferenceValues. val key = IdentityPair(this, that) val joinResult = joinedValues.computeIfAbsent(key, _ => this.join(pc, that)) @@ -628,7 +628,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { } } - protected def doPeformJoinWithNonNullValueWithSameOrigin( + protected def doPerformJoinWithNonNullValueWithSameOrigin( that: DomainSingleOriginReferenceValue, newRefId: RefId ): DomainSingleOriginReferenceValue @@ -645,18 +645,18 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { else if (that.abstractsOver(this)) StructuralUpdate(that) else - StructuralUpdate(doPeformJoinWithNonNullValueWithSameOrigin(that, this.refId)) + StructuralUpdate(doPerformJoinWithNonNullValueWithSameOrigin(that, this.refId)) }; // The reference ids are different... if (this == that) - return RefIdUpdate(that); - if (this.abstractsOver(that)) - return RefIdUpdate(this.updateRefId(that.refId)); + RefIdUpdate(that) + else if (this.abstractsOver(that)) + RefIdUpdate(this.updateRefId(that.refId)) else if (that.abstractsOver(this)) - return StructuralUpdate(that); // StructuralUpdate(that.updateRefId()); + StructuralUpdate(that); // StructuralUpdate(that.updateRefId()) else - return StructuralUpdate(doPeformJoinWithNonNullValueWithSameOrigin(that, that.refId)); + StructuralUpdate(doPerformJoinWithNonNullValueWithSameOrigin(that, that.refId)) } def toString(upperTypeBound: String): String = { @@ -674,7 +674,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { def theUpperTypeBound: T - override def doPeformJoinWithNonNullValueWithSameOrigin( + override def doPerformJoinWithNonNullValueWithSameOrigin( that: DomainSingleOriginReferenceValue, newRefId: RefId ): DomainSingleOriginReferenceValue = { @@ -800,7 +800,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { !classHierarchy.isKnown(theUpperTypeBound) || classHierarchy.isInterface(theUpperTypeBound).isNo, s"the type ${theUpperTypeBound.toJava} defines an interface and, " + - "hence, cannnot be the concrete(precise) type of an object instance " + + "hence, cannot be the concrete(precise) type of an object instance " + "(if this assertion fails, the project configuration may be bogus))" ) @@ -926,10 +926,10 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { value: DomainObjectValue => /** - * If we have an incomplete type hierarchy it may happen that we ceate an + * If we have an incomplete type hierarchy it may happen that we create an * MObjectValue where the types of the bound are in a sub-/supertype relation to ensure * that after a checkcast a corresponding test will return Yes and not Unknown. - * In that case – and if one of the types is final – we can nevertheless determine that we + * In that case – and if one of the types is final – we can nevertheless determine that we * know the precise type of the value. */ override def isPrecise: Boolean = { @@ -952,7 +952,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { if (domain.isSubtypeOf(supertype, anUTB)) newUTB += theSupertype else { - // supertype is either a supertype of anUTB or the + // supertype is either a supertype of anUTB or // the relationship is unknown; in both cases // we have to keep "anUTB"; however, we also have // to add supertype if the relation is unknown. @@ -976,7 +976,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { } } - def doPeformJoinWithNonNullValueWithSameOrigin( + def doPerformJoinWithNonNullValueWithSameOrigin( that: DomainSingleOriginReferenceValue, newRefId: RefId ): DomainSingleOriginReferenceValue = { @@ -1323,7 +1323,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { // we now have to impose the conditions of this "MultipleReferenceValue" // on the refinedValue if (thisIsNull.isYesOrNo && refinedValue.isNull.isUnknown) - refinedValue = refinedValue.doRefineIsNull(isNull).asInstanceOf[DomainSingleOriginReferenceValue] + refinedValue = refinedValue.doRefineIsNull(isNull) if (thisIsNull.isNoOrUnknown /*if the value is null then there is nothing (more) to do*/ && !refinedValue.isPrecise /*if the value isPrecise then there is nothing (more) to do*/ && thisUpperTypeBound != refinedValue.upperTypeBound && @@ -1331,7 +1331,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { ) { if (thisUpperTypeBound.isSingletonSet) refinedValue = - refinedValue.doRefineUpperTypeBound(thisUpperTypeBound.head).asInstanceOf[DomainSingleOriginReferenceValue] + refinedValue.doRefineUpperTypeBound(thisUpperTypeBound.head) else refinedValue = ObjectValue( @@ -1353,9 +1353,9 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { else domain.isNull(refinedValues) - // The upper type bound can be independent from the least common + // The upper type bound can be independent of the least common // upper type of a all values if, e.g., the value as a whole - // was casted to a specific value. + // was cast to a specific value. val newUTB = if (newIsNull.isYes) UIDSet.empty[ReferenceType] @@ -1437,7 +1437,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { elidedAssert(isNull.isYesOrNo) // Recall that this value's property – as a whole – can be undefined also - // each individual value's property is well defined (Yes, No). + // each individual value's property is well-defined (Yes, No). // Furthermore, the parameter isNull is either Yes or No and we are // going to filter those values that do not satisfy the constraint. @@ -1497,7 +1497,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { value.isNull.isYes || { value.isValueASubtypeOf(supertype) match { case Yes | Unknown => true - case No => { filteredValuesOrigins -= value.id; false } + case No => filteredValuesOrigins -= value.id; false } } } @@ -1516,7 +1516,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { // We have to support (2) the case where we cast an array of reference values of // type X to an array of reference values of type Y (which may succeed if at least // one type is an interface type or if both types are in an effective - // inheritance relation! For example, + // inheritance relation!) For example, // {{{ // scala> val ss = new Array[java.util.ArrayList[AnyRef]](1) // ss: Array[java.util.ArrayList[AnyRef]] = Array(null) @@ -1655,7 +1655,7 @@ trait ReferenceValues extends l0.DefaultTypeLevelReferenceValues with Origin { } else { val joinResult = joinedValues.computeIfAbsent( - new IdentityPair(thisValue, otherValue), + IdentityPair(thisValue, otherValue), _ => thisValue.join(joinPC, otherValue) ) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReflectiveInvoker.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReflectiveInvoker.scala index 9a8bb8ad75..cff834831b 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReflectiveInvoker.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/ReflectiveInvoker.scala @@ -141,7 +141,7 @@ trait ReflectiveInvoker extends DefaultJavaObjectToDomainValueConversion with As // The exception happens as part of the execution of the underlying method; // hence, we want to capture it and use it in the following! case _: NullPointerException => Some(justThrows(NullPointerException(pc))) - case e: InvocationTargetException => Some(justThrows(toDomainValue(pc, e.getCause()))) + case e: InvocationTargetException => Some(justThrows(toDomainValue(pc, e.getCause))) } } } diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/package.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/package.scala index e172409550..f7552d3bdc 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/package.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l1/package.scala @@ -28,7 +28,7 @@ package object l1 { domain: l1.ReferenceValues )( operandsArray: domain.OperandsArray - ): Seq[Int /*PC*/ ] = { // IMPROVE Ues Int based datastructure + ): Seq[Int /*PC*/ ] = { // IMPROVE Ues Int based data structure val instructions = code.instructions diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/CalledMethodsStore.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/CalledMethodsStore.scala index d40454e1ff..f3b2a99d61 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/CalledMethodsStore.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/CalledMethodsStore.scala @@ -26,7 +26,7 @@ trait CalledMethodsStore { rootStore => /** * The domain that is used as the target domain for the adaptation of - * the operand values to make them comparable. '''The domain object is not used + * the operand values to make them comparable. The domain object is not used * at construction time which enables the creation of the store along with/ as * part of the creation of "its" domain. */ diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetection.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetection.scala index bfd763dc23..8bdd087851 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetection.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetection.scala @@ -4,6 +4,8 @@ package ai package domain package l2 +import scala.compiletime.uninitialized + import org.opalj.br.Method /** @@ -27,7 +29,7 @@ trait PerformInvocationsWithRecursionDetection extends PerformInvocations with T // The childCalledMethodsStore is valid for one invocation only and is set by // doInvoke... - private[l2] var childCalledMethodsStore: CalledMethodsStore { val domain: coordinatingDomain.type } = null + private[l2] var childCalledMethodsStore: CalledMethodsStore { val domain: coordinatingDomain.type } = uninitialized override protected def doInvoke( pc: Int, diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/domain/package.scala b/OPAL/ai/src/main/scala/org/opalj/ai/domain/package.scala index 2ac2db75ea..4d393ec759 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/domain/package.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/domain/package.scala @@ -48,7 +48,7 @@ import org.opalj.collection.immutable.UIDSet * ==Thread Safety== * Unless explicitly documented, a domain is never thread-safe. The general programming * model is to use one `Domain` object per code block/method and therefore, thread-safety - * is not required for `Domain`s that are used for the evaluation of methods. However + * is not required for `Domain`s that are used for the evaluation of methods. However, * domains that are used to adapt/transfer values should be thread safe * (see [[org.opalj.ai.domain.ValuesCoordinatingDomain]] for further details). * diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBFieldValuesAnalysis.scala b/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBFieldValuesAnalysis.scala index a1e4077899..e8c62894d8 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBFieldValuesAnalysis.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBFieldValuesAnalysis.scala @@ -5,6 +5,7 @@ package fpcf package analyses import scala.collection.mutable +import scala.compiletime.uninitialized import org.opalj.ai.fpcf.analyses.FieldValuesAnalysis.ignoredFields import org.opalj.ai.fpcf.domain.RefinedTypeLevelFieldAccessInstructions @@ -65,7 +66,7 @@ import org.opalj.log.OPALLogger * * @note * ADDITIONALLY, WE HAVE TO IGNORE THOSE FIELDS WHICH SEEMS TO BE ALWAYS NULL BECAUSE THESE - * FIELDS ARE OFTEN INITIALZED - AT RUNTIME - BY SOME CODE OUTSIDE THE SCOPE OF "PURE" JAVA BASED + * FIELDS ARE OFTEN INITIALIZED - AT RUNTIME - BY SOME CODE OUTSIDE THE SCOPE OF "PURE" JAVA BASED * ANALYSES. * * E.G., WE IGNORE THE FOLLOWING FIELDS FROM JAVA 8: @@ -87,7 +88,7 @@ import org.opalj.log.OPALLogger * - [OK] javax.swing.JList.AccessibleJList.AccessibleJListChild{ component:null } * - [OK] com.sun.corba.se.impl.io.IIOPInputStream{ abortIOException:null } * - [OK] com.sun.corba.se.impl.orb.ORBImpl{ codeBaseIOR:null } - * - [OK - ACCIDENTIALLY CREATED?] com.sun.org.apache.xpath.internal.jaxp.XPathImpl{ d:null } + * - [OK - ACCIDENTALLY CREATED?] com.sun.org.apache.xpath.internal.jaxp.XPathImpl{ d:null } * - [OK - LEGACY CODE?] javax.swing.JPopupMenu{ margin:null } * - [OK - LEGACY CODE?] sun.audio.AudioDevice{ mixer:null } * - [OK - RESERVED FOR FUTURE USAGE] com.sun.corba.se.impl.corba.ServerRequestImpl{ _ctx:null } @@ -175,7 +176,7 @@ class LBFieldValuesAnalysis private[analyses] ( final val thisClassType: ClassType = classFile.thisType // Map of fieldNames (that are potentially relevant) and the (refined) value information - var fieldInformation: Map[Field, Option[DomainValue]] = null + var fieldInformation: Map[Field, Option[DomainValue]] = uninitialized // Map between the method and the ones called by the method which could successfully // be resolved. @@ -197,11 +198,11 @@ class LBFieldValuesAnalysis private[analyses] ( def hasCandidateFields: Boolean = fieldInformation.nonEmpty def candidateFields: Iterable[Field] = fieldInformation.keys - private var currentCode: Code = null + private var currentCode: Code = uninitialized /** * Sets the method that is currently analyzed. This method '''must not be called''' - * during the abstract interpretation of a method. It is must be called + * during the abstract interpretation of a method. It must be called * before this domain is used for the first time and immediately before the * interpretation of the next method (code block) starts. */ @@ -310,7 +311,6 @@ class LBFieldValuesAnalysis private[analyses] ( // relevant field, but obviously no writes were found... val dv = domain.DefaultValue(-1, f.fieldType) val fv = ValueBasedFieldValueInformation(dv) - // println(f.toJava+"!!!!!!>>>>>> "+fv) Result(FinalEP(f, fv)) case Some(Some(domain.DomainReferenceValueTag(dv))) => @@ -319,7 +319,6 @@ class LBFieldValuesAnalysis private[analyses] ( ) ) { val vi = ValueBasedFieldValueInformation(dv.toCanonicalForm) - // println(f.toJava+"!!!!!!>>>>>> "+vi) Result(FinalEP(f, vi)) } else { // IMPROVE Consider using the CFG to determine if the read fields are relevant at all; currently the analysis is flow insensitive. @@ -347,7 +346,7 @@ class LBFieldValuesAnalysis private[analyses] ( // e.g. // {{{ // val o = Foo.m() // initially returns "some object" - // o.toString // no precisely resolvables + // o.toString // no precisely resolvable // // if now, m() is known to return only String objects // // o.toString becomes resolvable! // }}} @@ -372,12 +371,11 @@ class LBFieldValuesAnalysis private[analyses] ( // the field is no longer written... OPALLogger.error( "analysis state", - s"the field values analysis for ${f} failed miserably: " + s"the field values analysis for $f failed miserably: " )(using project.logContext) } val domain.DomainReferenceValueTag(dv) = dvOption.get: @unchecked val vi = ValueBasedFieldValueInformation(dv.toCanonicalForm) - // println("======>>>>>>\n\t\t"+vi+"\n\t\t"+relevantDependees) if (newDependees.isEmpty || dv.isNull.isYes || classHierarchy.isKnownToBeFinal(dv.leastUpperType.get) @@ -390,10 +388,8 @@ class LBFieldValuesAnalysis private[analyses] ( val vi = ValueBasedFieldValueInformation(dv.toCanonicalForm) if (relevantDependees.isEmpty) { - // println(f.toJava+"!!!!!!>>>>>> "+vi) Result(FinalEP(f, vi)) } else { - // println(f.toJava+"======>>>>>>\n\t\t"+vi+"\n\t\t"+relevantDependees) InterimResult.forLB(f, vi, relevantDependees.toSet, c) } } @@ -451,7 +447,7 @@ object EagerLBFieldValuesAnalysis extends BasicFPCFEagerAnalysisScheduler { ) override def init(p: SomeProject, ps: PropertyStore): Null = { - // To ensure that subsequent analyses are able to pick-up the results of this + // To ensure that subsequent analyses are able to pick up the results of this // analysis, we state that the domain that has to be used when computing // the AIResult has to use the (partial) domain: RefinedTypeLevelFieldAccessInstructions. p.updateProjectInformationKeyInitializationData(AIDomainFactoryKey)(i => diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBMethodReturnValuesAnalysis.scala b/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBMethodReturnValuesAnalysis.scala index 62c2c220ed..1327b17cf3 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBMethodReturnValuesAnalysis.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/analyses/LBMethodReturnValuesAnalysis.scala @@ -140,7 +140,7 @@ class LBMethodReturnValuesAnalysis private[analyses] ( ai, method, // We need a new instance, because the set may grow when compared to the - // last run; actually it may even shrink, but this is will likely only happen in + // last run; actually it may even shrink, but this will likely only happen in // very rare cases and is not a problem. dependees.clone() ) @@ -183,7 +183,7 @@ object EagerLBMethodReturnValuesAnalysis extends BasicFPCFEagerAnalysisScheduler override def requiredProjectInformation: ProjectInformationKeys = Seq.empty override def init(p: SomeProject, ps: PropertyStore): Null = { - // To ensure that subsequent analyses are able to pick-up the results of this + // To ensure that subsequent analyses are able to pick up the results of this // analysis, we state that the domain that has to be used when computing // the AIResult has to use the (partial) domain: RefinedTypeLevelInvokeInstructions. p.updateProjectInformationKeyInitializationData(AIDomainFactoryKey)(i => diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/domain/RefinedTypeLevelInvokeInstructions.scala b/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/domain/RefinedTypeLevelInvokeInstructions.scala index e4c63adfb2..7c67798612 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/domain/RefinedTypeLevelInvokeInstructions.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/fpcf/domain/RefinedTypeLevelInvokeInstructions.scala @@ -220,7 +220,7 @@ trait MethodCallsDomainWithMethodLockup extends MethodCallsHandling { // ----------------------------------------------------------------------------------- /** - * Returns `true` for those methods for which we try to lookup the target method. + * Returns `true` for those methods for which we try to look up the target method. * This filter is collaboratively implemented (stackable trait). * * @note Domains reusing this template domain have to be able to cope with ALL methods; this @@ -296,7 +296,7 @@ trait MethodCallsDomainWithMethodLockup extends MethodCallsHandling { /** * Those `invokestatic` calls for which we have no concrete method (e.g., * the respective class file was never loaded or the method is native) or - * if have a recursive invocation are delegated to the super class. + * if we have a recursive invocation are delegated to the super class. */ abstract override def invokestatic( pc: PC, diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/package.scala b/OPAL/ai/src/main/scala/org/opalj/ai/package.scala index ee9475e34d..b5b10d58a4 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/package.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/package.scala @@ -19,7 +19,7 @@ import org.opalj.util.AnyToAnyThis import org.opalj.util.elidedAssert /** - * Implementation of an abstract interpretation (ai) framework. + * Implementation of an abstract interpretation (AI) framework. * * Please note that the abstract interpreter just refers to the classes and traits * defined in this package (`ai`). The classes and traits defined in the sub-packages @@ -85,13 +85,13 @@ package object ai { * In general, parameters are identified by using negative origin information as described below. * Given that * - the maximum size of the method parameters array is 255 and - * - that the first slot is required for the `this` reference in case of instance methods and + * - that the first slot is required for the this-reference in case of instance methods and * - that `long` and `double` values require two slots * the smallest number used to encode that the value is an actual parameter is `-256`. * * === AI Framework === * - * In case of the ai framework, values passed to a method get indexes as follows: + * In case of the AI framework, values passed to a method get indexes as follows: * `-1-(isStatic ? 0 : 1)-(the index of the parameter adjusted by the computational * type of the previous parameters)`. * @@ -123,10 +123,9 @@ package object ai { * * Values in the range [ [[SpecialValuesOriginOffset]] (`-800,000,000`) , * [[MethodExternalExceptionsOriginOffset]] (`-1,000,000`) ] are used to identify exceptions that - * are created outside of the method; i.e., by an instruction which does not belong - * to the method. + * are created outside the method; i.e., by an instruction which does not belong to the method. * Exceptions in the range ([[MethodExternalExceptionsOriginOffset]] (`-1,000,000`), - * [[ImmediateVMExceptionsOriginOffset]] (-100,000)] are used to identify values that are + * [[ImmediateVMExceptionsOriginOffset]] (-100,000)) are used to identify values that are * created by the VM due to an exception while evaluating an instruction. * * @see [[isImmediateVMException]], [[ValueOriginForImmediateVMException]], [[pcOfImmediateVMException]], @@ -139,7 +138,7 @@ package object ai { @inline final def NoValueOrigins: ValueOrigins = IntTrieSet.empty /** - * Used to identify that the origin of the value is outside of the program. + * Used to identify that the origin of the value is outside the program. * * For example, the VM sometimes performs comparisons against predetermined fixed * values (specified in the JVM Spec.). The origin associated with such values is @@ -195,7 +194,7 @@ package object ai { /** * Identifies the ''upper bound for those origin values that encode origin * information about formal parameters''. That is, respective values - * identify formal parameters of a method including the `this` parameter (in first position). + * identify formal parameters of a method including the this-parameter (in first position). */ final val FormalParametersOriginOffset /*: ValueOrigin*/ = -1 @@ -357,7 +356,7 @@ package object ai { /** * Calculates the initial `ValueOrigin` associated with a method's explicit parameter. - * The index of the first parameter is 0. If the method is not static the this reference + * The index of the first parameter is 0. If the method is not static the this-reference * stored in local variable `0` has the origin `-1`. * * @param isStatic `true` if method is static and, hence, has no implicit parameter for `this`. @@ -529,8 +528,7 @@ package object ai { * be performed once and the adapted value will be reused; this ensures that * the relation between values remains stable. * @param calledMethod The method that will be evaluated using the given operands. - * @param targetDomain The [[Domain]] that will be use to perform the abstract - * interpretation. + * @param targetDomain The [[Domain]] that will be used to perform the abstract interpretation. */ def mapOperandsToParameters( operands: Operands[? <: ValuesDomain#DomainValue], @@ -580,7 +578,7 @@ package object ai { /** * Maps the operands to the target domain while ensuring that two operands that - * are identical before are identical afterwards. + * are identical before are identical afterward. */ def mapOperands( theOperands: Operands[? <: ValuesDomain#DomainValue], @@ -658,7 +656,7 @@ package object ai { f: (Int /*PC*/, Instruction, domain.Operands) => U ): Unit = { val instructions = code.instructions - val max_pc = instructions.size + val max_pc = instructions.length var pc = 0 while (pc < max_pc) { val instruction = instructions(pc) diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/project/AIProject.scala b/OPAL/ai/src/main/scala/org/opalj/ai/project/AIProject.scala index dd744c9cbe..29ea7a39b5 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/project/AIProject.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/project/AIProject.scala @@ -70,7 +70,7 @@ trait AIProject[Source, D <: Domain & OptionalReport] { * * @note This method is intended to be overridden by subtraits that need to get * hold on the specified analysis parameters. In this case (in the subtrait) - * it is recommended to first analyze the parameters and afterwards to call + * it is recommended to first analyze the parameters and afterward to call * this method using `super.analyze(...)`. */ def analyze(project: Project[Source], parameters: Seq[String]): ReportableAnalysisResult = { diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/util/XHTML.scala b/OPAL/ai/src/main/scala/org/opalj/ai/util/XHTML.scala index 82cbffb175..fcd431b601 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/util/XHTML.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/util/XHTML.scala @@ -83,7 +83,7 @@ object XHTML { def throwableToXHTML(throwable: Throwable): scala.xml.Node = { val node = if (throwable.getStackTrace == null || - throwable.getStackTrace.size == 0 + throwable.getStackTrace.length == 0 ) {
    {throwable.getClass.getSimpleName + " " + throwable.getMessage}
    } else { diff --git a/OPAL/ai/src/main/scala/org/opalj/ai/util/package.scala b/OPAL/ai/src/main/scala/org/opalj/ai/util/package.scala index fcf13f42fc..0eaac551fc 100644 --- a/OPAL/ai/src/main/scala/org/opalj/ai/util/package.scala +++ b/OPAL/ai/src/main/scala/org/opalj/ai/util/package.scala @@ -137,7 +137,7 @@ package object util { else { val nextPC = tailWorklist.head if (nextPC == pc) - return worklist; // unchanged + worklist // unchanged else if (nextPC == prefixEnd) prepend(headWorklist, pc :: tailWorklist) else diff --git a/OPAL/ai/src/main/scala/org/opalj/collection/mutable/Locals.scala b/OPAL/ai/src/main/scala/org/opalj/collection/mutable/Locals.scala index 5a20821a3d..f8d96c17a8 100644 --- a/OPAL/ai/src/main/scala/org/opalj/collection/mutable/Locals.scala +++ b/OPAL/ai/src/main/scala/org/opalj/collection/mutable/Locals.scala @@ -24,7 +24,7 @@ import scala.util.boundary.break * * ==Usage Scenario== * For example, the median of the number of registers that are used per method is 2 - * (JDK and OPAL) and more then 99,5% of all methods have less than 20 elements and + * (JDK and OPAL) and more than 99,5% of all methods have less than 20 elements and * in particular those elements related to the parameters do not change often. * * @author Michael Eichberg @@ -108,7 +108,7 @@ sealed trait Locals[T >: Null <: AnyRef] { * the return value will be `this` or `other`, otherwise a new locals data structure * is created. * - * @param other Another `Locals` data-structure that has the the same number of + * @param other Another `Locals` data-structure that has the same number of * elements as this `Locals` data-structure. */ /* ABSTRACT */ @@ -173,8 +173,7 @@ sealed trait Locals[T >: Null <: AnyRef] { /** * Counts the number of '''non-null''' values that do not match the given - * given predicate; the index of the first element that matches the predicate - * is returned. + * predicate; the index of the first element that matches the predicate is returned. * * If no value matches the value -1 is returned. */ diff --git a/OPAL/ai/src/main/scala/org/opalj/issues/IssueLocation.scala b/OPAL/ai/src/main/scala/org/opalj/issues/IssueLocation.scala index 64f3604f36..9c0e07a28e 100644 --- a/OPAL/ai/src/main/scala/org/opalj/issues/IssueLocation.scala +++ b/OPAL/ai/src/main/scala/org/opalj/issues/IssueLocation.scala @@ -192,7 +192,7 @@ class MethodLocation( } if (firstLineOfMethod.isDefined) { - val firstLine = firstLineOfMethod.get.toString + val firstLine = firstLineOfMethod.get methodNode %= new UnprefixedAttribute("data-line", firstLine, scala.xml.Null) } diff --git a/OPAL/ai/src/main/scala/org/opalj/issues/IssueOrdering.scala b/OPAL/ai/src/main/scala/org/opalj/issues/IssueOrdering.scala index ab0e38f688..1e432986e4 100644 --- a/OPAL/ai/src/main/scala/org/opalj/issues/IssueOrdering.scala +++ b/OPAL/ai/src/main/scala/org/opalj/issues/IssueOrdering.scala @@ -19,8 +19,8 @@ object IssueOrdering extends scala.math.Ordering[Issue] { if (xUniques.isEmpty) { 0 } else { - val xUniqueHead = xUniques.toSeq.sorted.head - val yUniqueHead = (y -- x).toSeq.sorted.head + val xUniqueHead = xUniques.toSeq.min + val yUniqueHead = (y -- x).toSeq.min xUniqueHead compare yUniqueHead } } @@ -35,7 +35,7 @@ object IssueOrdering extends scala.math.Ordering[Issue] { x.locations.zip(y.locations).collectFirst { case (l1, l2) if l1.compareTo(l2) != 0 => l1.compareTo(l2) } match { - case Some(result) => result + case Some(result) => return result; case _ => // let's continue the comparison } } diff --git a/OPAL/ai/src/main/scala/org/opalj/issues/IssueRepresentations.scala b/OPAL/ai/src/main/scala/org/opalj/issues/IssueRepresentations.scala index 15c193f56c..1185b7c92d 100644 --- a/OPAL/ai/src/main/scala/org/opalj/issues/IssueRepresentations.scala +++ b/OPAL/ai/src/main/scala/org/opalj/issues/IssueRepresentations.scala @@ -46,9 +46,9 @@ trait IssueRepresentations extends ReportableAnalysisResult { * * Line and column information is optional. * - * If the real filename is not available use the fully qualified name of the class + * If the real filename is not available, use the fully qualified name of the class * in binary notation (i.e., using "/" to separate the package qualifiers) - * with the suffice ".class" appended. + * with the suffix ".class" appended. * * Note that the space after the location information is required. * diff --git a/OPAL/ai/src/main/scala/org/opalj/issues/package.scala b/OPAL/ai/src/main/scala/org/opalj/issues/package.scala index 846492e67b..8c7a467106 100644 --- a/OPAL/ai/src/main/scala/org/opalj/issues/package.scala +++ b/OPAL/ai/src/main/scala/org/opalj/issues/package.scala @@ -3,6 +3,7 @@ package org.opalj import java.io.File import java.net.URL +import java.nio.file.FileSystems import play.api.libs.json.JsObject import play.api.libs.json.Json import play.api.libs.json.JsValue @@ -44,7 +45,7 @@ package object issues { * Shortens an absolute path to one relative to the current working directory. */ def absoluteToRelative(path: String): String = { - path.stripPrefix(System.getProperty("user.dir") + System.getProperty("file.separator")) + path.stripPrefix(System.getProperty("user.dir") + FileSystems.getDefault.getSeparator) } /** @@ -68,18 +69,17 @@ package object issues { * to avoid using up too much screen space in the console. */ def urlToLocationIdentifier(url: URL): String = { - url.getProtocol() match { - case "file" => absoluteToRelative(url.getPath()) - case "jar" => prettifyJarUrl(url.toExternalForm()) - case _ => url.toExternalForm() + url.getProtocol match { + case "file" => absoluteToRelative(url.getPath) + case "jar" => prettifyJarUrl(url.toExternalForm) + case _ => url.toExternalForm } } - def fileToLocationIdentifier(file: File): String = file.getAbsolutePath() + def fileToLocationIdentifier(file: File): String = file.getAbsolutePath /** - * Given a `LocalVariable` object and its current value a human readable `String` - * is created. + * Given a `LocalVariable` object and its current value, a human-readable String is created. */ def localVariableToString(localVariable: LocalVariable, value: AnyRef): String = { if ((localVariable.fieldType eq BooleanType) && diff --git a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/CallabilityKeys.java b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/CallabilityKeys.java index 82be9edf41..982c9cc804 100644 --- a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/CallabilityKeys.java +++ b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/CallabilityKeys.java @@ -6,7 +6,7 @@ * Represents all possible property variants of the [[LibraryLeakage]] property * defined in the [[LibraryLeakageAnalysis]]. * - * @Note This enum is used for test-only purposes. It is used as parameter in + * @note This enum is used for test-only purposes. It is used as parameter in * the [[LibraryLeakageAnalysis]] annotation. Make sure, that the names * of the different variants of the Overridden property matches the enumeration * names exactly. @@ -17,7 +17,7 @@ public enum CallabilityKeys { /** - * This has to be used if a method can't be inherit by any immediate non-abstract + * This has to be used if a method can't be inherited by any immediate non-abstract * subclass and due to this is overridden in every concrete subclass. */ NotClientCallable, diff --git a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/FactoryMethodKeys.java b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/FactoryMethodKeys.java index dc0d418196..266ba29120 100644 --- a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/FactoryMethodKeys.java +++ b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/FactoryMethodKeys.java @@ -5,7 +5,7 @@ * Represents all possible property variants of the [[FactoryMethod]] property which * is defined in the [[FactoryMethodAnalysis]]. * - * @Note This enum is used for test-only purposes. It is used as parameter in + * @note This enum is used for test-only purposes. It is used as parameter in * the [[FactoryMethodProperty]] annotation. Make sure, that the names * of the different variants of the Overridden property matches the enumeration * names exactly. diff --git a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/InstantiabilityKeys.java b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/InstantiabilityKeys.java index 39330d92f7..250bb63189 100644 --- a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/InstantiabilityKeys.java +++ b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/InstantiabilityKeys.java @@ -6,7 +6,7 @@ * Represents all possible property variants of the [[Instantiability]] property * defined in the [[InstantiabilityAnalysis]]. * - * @Note This enum is used for test-only purposes. It is used as parameter in + * @note This enum is used for test-only purposes. It is used as parameter in * the [[InstantiabilityProperty]] annotation. Make sure, that the names * of the different variants of the [[Instantiability]] property matches the enumeration * names exactly. diff --git a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/ProjectAccessibilityKeys.java b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/ProjectAccessibilityKeys.java index 31f444eb5e..0fb2242a50 100644 --- a/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/ProjectAccessibilityKeys.java +++ b/OPAL/ai/src/test/java/org/opalj/fpcf/test/annotations/ProjectAccessibilityKeys.java @@ -4,9 +4,9 @@ /** * * Represents all possible property variants of the [[ProjectAccessibility]] property - * defined in the [[SchadowingAnalysis]]. + * defined in the [[ShadowingAnalysis]]. * - * @Note This enum is used for test-only purposes. It is used as parameter in + * @note This enum is used for test-only purposes. It is used as parameter in * the [[ProjectAccessibilityProperty]] annotation. Make sure, that the names * of the different variants of the Overridden property matches the enumeration * names exactly. diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/PackageTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/PackageTest.scala index b92fb11115..1cb86ba8ec 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/PackageTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/PackageTest.scala @@ -39,7 +39,7 @@ class PackageTest extends AnyFlatSpec with Matchers { val operands: List[DomainValue] = List(IntegerValue(valueOrigin = -1)) val result = mapOperands(operands, SimpleCoordinatingTypeLevelDomain) - result.size should be(1) + result.length should be(1) result.head should be(IntegerValue(valueOrigin = -1)) } diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/DefaultPerInstructionPostProcessingTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/DefaultPerInstructionPostProcessingTest.scala index b331381630..cbf68f8c8f 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/DefaultPerInstructionPostProcessingTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/DefaultPerInstructionPostProcessingTest.scala @@ -106,8 +106,8 @@ class DefaultPerInstructionPostProcessingTest extends AnyFlatSpec with Matchers import domain.* allReturnVoidInstructions should be(IntTrieSet(38)) // <= void return allThrownExceptions should be(LongMap.empty) - // Due to the simplicity of the domain I(the exceptions of called methods are - // not yet analyze) we cannot determine that the following exception + // Due to the simplicity of the domain (the exceptions of called methods are + // not yet analyzed) we cannot determine that the following exception // (among others?) may also be thrown: // ("throws", SomeReferenceValue(...,ClassType("java/lang/RuntimeException"),No)) } diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/MethodsPlainTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/MethodsPlainTest.scala index 7ff0ad7e2a..e15f25a22f 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/MethodsPlainTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/MethodsPlainTest.scala @@ -202,7 +202,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { domain.returnedValue should be(Some(AnIntegerValue)) } - it should "be able to analyze a method that substracts two int values" in { + it should "be able to analyze a method that subtracts two int values" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "iSub").get @@ -310,7 +310,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { domain.returnedValue should be(Some(ALongValue)) } - it should "be able to analyze a method that substracts two long values" in { + it should "be able to analyze a method that subtracts two long values" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "lSub").get @@ -380,7 +380,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { domain.returnedValue should be(Some(DoubleValue(IrrelevantPC))) } - it should "be able to analyze a method that substracts two double values" in { + it should "be able to analyze a method that subtracts two double values" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "dSub").get @@ -430,7 +430,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { domain.returnedValue should be(Some(FloatValue(IrrelevantPC))) } - it should "be able to analyze a method that substracts two float values" in { + it should "be able to analyze a method that subtracts two float values" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "fSub").get @@ -590,7 +590,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { // // UNARY EXPRESSIONS - it should "be able to analyze a method that returns a negativ float value" in { + it should "be able to analyze a method that returns a negative float value" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "fNeg").get @@ -600,7 +600,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { domain.returnedValue should be(Some(FloatValue(IrrelevantPC))) } - it should "be able to analyze a method that returns a negativ double value" in { + it should "be able to analyze a method that returns a negative double value" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "dNeg").get @@ -610,7 +610,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { domain.returnedValue should be(Some(DoubleValue(IrrelevantPC))) } - it should "be able to analyze a method that returns a negativ long value" in { + it should "be able to analyze a method that returns a negative long value" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "lNeg").get @@ -620,7 +620,7 @@ class MethodsPlainTest extends AnyFlatSpec with Matchers { domain.returnedValue should be(Some(ALongValue)) } - it should "be able to analyze a method that returns a negativ int value" in { + it should "be able to analyze a method that returns a negative int value" in { val domain = new RecordingDomain import domain.* val method = classFile.methods.find(_.name == "iNeg").get diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ClassValuesTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ClassValuesTest.scala index e1844067d7..58cddf9572 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ClassValuesTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ClassValuesTest.scala @@ -110,9 +110,9 @@ class ClassValuesTest extends AnyFlatSpec with Matchers { c1.join(-1, c2) should be(c2.join(-1, c1)) } - it should ("be able to trace static class values of primitves") in { + it should ("be able to trace static class values of primitives") in { val domain = new RecordingDomain - val method = classFile.methods.find(m => m.name == "staticPrimitveClassValue").get + val method = classFile.methods.find(m => m.name == "staticPrimitiveClassValue").get BaseAI(method, domain) domain.returnedValue.map(_.asInstanceOf[domain.DomainClassValue].value) should be(Some(IntegerType)) } diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/DefaultIntegerRangesTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/DefaultIntegerRangesTest.scala index 43554d02f9..44619903dd 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/DefaultIntegerRangesTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/DefaultIntegerRangesTest.scala @@ -101,7 +101,7 @@ class DefaultIntegerRangesTest extends AnyFunSpec with Matchers { v2.join(-1, v1) should be(StructuralUpdate(AnIntegerValue())) } - it("the rejoin of two ranges which exceed the max. card. should result in the same rane") { + it("the rejoin of two ranges which exceed the max. card. should result in the same range") { val v1 = IntegerRange(lb = 0, ub = Char.MaxValue) val v2 = IntegerRange(lb = 0, ub = Char.MaxValue) v1.join(-1, v2) should be(MetaInformationUpdate(IntegerRange(lb = 0, ub = Char.MaxValue))) @@ -1577,7 +1577,7 @@ class DefaultIntegerRangesTest extends AnyFunSpec with Matchers { } } - it("(the dividend is a value 2^x and the divisor is a multiplikativ of 2^x) [32,32] % [16,16] => [0,15]") { + it("(the dividend is a value 2^x and the divisor is a multiplicative of 2^x) [32,32] % [16,16] => [0,15]") { val v1 = IntegerRange(0, Int.MaxValue) val v2 = IntegerRange(16, 16) @@ -3310,7 +3310,7 @@ class DefaultIntegerRangesTest extends AnyFunSpec with Matchers { } - describe("handling of complex dependent casts and moduluo operations") { + describe("handling of complex dependent casts and modulo operations") { it("the analysis should be correct in the presence of type casts (\"randomModulo\")") { val domain = new DefaultIntegerRangesTestDomain(128) diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ReflectiveInvokerTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ReflectiveInvokerTest.scala index a6be9462d6..abd7fc2797 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ReflectiveInvokerTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/ReflectiveInvokerTest.scala @@ -75,7 +75,7 @@ class ReflectiveInvokerTest extends AnyFlatSpec with Matchers { def createDomain() = new ReflectiveInvokerTestDomain - behavior of "the RefleciveInvoker trait" + behavior of "the ReflectiveInvoker trait" it should "be able to call a static method" in { val domain = createDomain() @@ -93,7 +93,7 @@ class ReflectiveInvokerTest extends AnyFlatSpec with Matchers { javaResult should be("A") } - it should "be able to call a static method with a primitve parameter" in { + it should "be able to call a static method with a primitive parameter" in { val domain = createDomain() import domain.* diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/StringValuesTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/StringValuesTest.scala index 378fc23c6b..3db1bcf009 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/StringValuesTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l1/StringValuesTest.scala @@ -62,7 +62,7 @@ class StringValuesTest extends AnyFlatSpec with Matchers { } it should ("result in some object value if both values have the same origin but different values") in { - // we are now referring to all "Strings".. + // we are now referring to all "Strings"... val joinResult = s1t0.join(1, s1Alt) joinResult.value should not(be theSameInstanceAs s1t0) joinResult.value should not(be theSameInstanceAs s1Alt) diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsTest.scala index dd7b49fb08..7aecb3cc2d 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsTest.scala @@ -150,7 +150,7 @@ class PerformInvocationsTest extends AnyFlatSpec with Matchers { domain.allReturnedValues.size should be(2) if (!domain.allReturnedValues.forall { - e => domain.intValueOption(e._2).map(_ == 1).getOrElse(false) + e => domain.intValueOption(e._2).contains(1) } ) fail("unexpected result: " + domain.allReturnedValues) } diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetectionTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetectionTest.scala index b7371576d3..80f157f936 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetectionTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/l2/PerformInvocationsWithRecursionDetectionTest.scala @@ -64,7 +64,7 @@ class PerformInvocationsWithRecursionDetectionTest extends AnyFlatSpec with Matc val domain = new InvocationDomain(project, method) BaseAI(method, domain) - domain.returnedNormally should be(true) // because we work at the type level at some point.. + domain.returnedNormally should be(true) // because we work at the type level at some point... } it should ("be able to analyze a static method that uses recursion to calculate the factorial of a small concrete number") in { @@ -164,7 +164,7 @@ object PerformInvocationsWithRecursionDetectionTestFixture { method: Method, operandsSet: List[Array[domain.DomainValue]] ): Unit = { - // super.frequentEvalution(definingClass, method, operandsSet) + // super.frequentEvaluation(definingClass, method, operandsSet) warningIssued = true } diff --git a/OPAL/ai/src/test/scala/org/opalj/ai/domain/tracing/PropertyTracingTest.scala b/OPAL/ai/src/test/scala/org/opalj/ai/domain/tracing/PropertyTracingTest.scala index 5ba1c8cb4d..448f8a3930 100644 --- a/OPAL/ai/src/test/scala/org/opalj/ai/domain/tracing/PropertyTracingTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/ai/domain/tracing/PropertyTracingTest.scala @@ -71,7 +71,7 @@ class PropertyTracingTest extends AnyFlatSpec with Matchers { super.invokestatic(pc, declaringClass, isInterface, name, descriptor, operands) } - def isSanitized(): Boolean = hasPropertyOnExit + def isSanitized: Boolean = hasPropertyOnExit } private def evaluateMethod(name: String)(f: AnalysisDomain => Unit): Unit = { @@ -94,40 +94,40 @@ class PropertyTracingTest extends AnyFlatSpec with Matchers { // it should "be able to correctly identify that the method notSanitized1 does not sanitize the value" in { - evaluateMethod("notSanitized1") { domain => domain.isSanitized() should be(false) } + evaluateMethod("notSanitized1") { domain => domain.isSanitized should be(false) } } it should "be able to correctly identify that the method notSanitized2 does not sanitize the value" in { - evaluateMethod("notSanitized2") { domain => domain.isSanitized() should be(false) } + evaluateMethod("notSanitized2") { domain => domain.isSanitized should be(false) } } it should "be able to correctly identify that the method sanitized1 does sanitize the value" in { - evaluateMethod("sanitized1") { domain => domain.isSanitized() should be(true) } + evaluateMethod("sanitized1") { domain => domain.isSanitized should be(true) } } it should "be able to correctly identify that the method sanitized2 does sanitize the value" in { - evaluateMethod("sanitized2") { domain => domain.isSanitized() should be(true) } + evaluateMethod("sanitized2") { domain => domain.isSanitized should be(true) } } it should "be able to correctly identify that the method sanitized3 does sanitize the value" in { - evaluateMethod("sanitized3") { domain => domain.isSanitized() should be(true) } + evaluateMethod("sanitized3") { domain => domain.isSanitized should be(true) } } it should "be able to correctly identify that the method sanitized4 does sanitize the value" in { - evaluateMethod("sanitized4") { domain => domain.isSanitized() should be(true) } + evaluateMethod("sanitized4") { domain => domain.isSanitized should be(true) } } it should "be able to correctly identify that the method sanitized5 does sanitize the value" in { - evaluateMethod("sanitized5") { domain => domain.isSanitized() should be(true) } + evaluateMethod("sanitized5") { domain => domain.isSanitized should be(true) } } it should "be able to correctly identify that the method sanitized6 does sanitize the value" in { - evaluateMethod("sanitized6") { domain => domain.isSanitized() should be(true) } + evaluateMethod("sanitized6") { domain => domain.isSanitized should be(true) } } // We can not yet identify that the value is definitively sanitized. // it should "be able to correctly identify that the method sanitized7 does sanitize the value" in { // evaluateMethod("sanitized7", domain => { - // domain.isSanitized() should be(true) + // domain.isSanitized should be(true) // }) // } } diff --git a/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsEval.scala b/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsEval.scala index 2c5b8f6f20..25e85d9cad 100644 --- a/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsEval.scala +++ b/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsEval.scala @@ -31,7 +31,7 @@ object LocalsEval extends App { def evalUsingLocals(elems: Int): Unit = { var lastAvg = 0L - println(s"$elems elments stored in vector") + println(s"$elems elements stored in vector") val data_v = time( e, eMax, @@ -67,7 +67,7 @@ object LocalsEval extends App { def evalUsingArray(elems: Int): Unit = { var lastAvg = 0L - println(s"$elems elments stored in array") + println(s"$elems elements stored in array") val data_a = time( e, eMax, diff --git a/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsTest.scala b/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsTest.scala index ffff52d53c..9b694f6b9e 100644 --- a/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsTest.scala +++ b/OPAL/ai/src/test/scala/org/opalj/collection/mutable/LocalsTest.scala @@ -44,7 +44,7 @@ class LocalsTest extends AnyFlatSpec with Matchers { } } - it should ("be able to return the value stored (upated(index,value)) at an index") in { + it should ("be able to return the value stored (updated(index,value)) at an index") in { for { i <- 1 to 100 v = Locals[Integer](i) @@ -54,7 +54,7 @@ class LocalsTest extends AnyFlatSpec with Matchers { } } - it should ("be able to return the values stored (upated(index,value1,value2)) at an index") in { + it should ("be able to return the values stored (updated(index,value1,value2)) at an index") in { for { i <- 2 to 100 v = Locals[Integer](i) @@ -96,7 +96,7 @@ class LocalsTest extends AnyFlatSpec with Matchers { v = v.updated(i, i) } val l1 = v.map(String.valueOf(_)).iterator.toList - val l2 = (0 until size).map(String.valueOf(_)) + val l2 = (0 until size).map { String.valueOf } l1 should equal(l2) } } @@ -232,7 +232,7 @@ class LocalsTest extends AnyFlatSpec with Matchers { v.hashCode should not be (0) } - it should ("be compareable to a non-full Locals collections") in { + it should ("be comparable to a non-full Locals collections") in { val size = 25 val v1 = Locals[Integer](size) val v2 = Locals[Integer](size) diff --git a/OPAL/apk/src/test/fixtures-android/OPALNativeTest/gradle.properties b/OPAL/apk/src/test/fixtures-android/OPALNativeTest/gradle.properties index dab7c28bff..3e927b11ef 100644 --- a/OPAL/apk/src/test/fixtures-android/OPALNativeTest/gradle.properties +++ b/OPAL/apk/src/test/fixtures-android/OPALNativeTest/gradle.properties @@ -12,7 +12,7 @@ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true # AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK +# Android operating system, and which are packaged with your app's APK # https://developer.android.com/topic/libraries/support-library/androidx-rn android.useAndroidX=true # Enables namespacing of each library's R class so that its R class includes only the diff --git a/OPAL/av/src/main/scala/org/opalj/av/checking/AnnotationPredicate.scala b/OPAL/av/src/main/scala/org/opalj/av/checking/AnnotationPredicate.scala index 1ccf8aaa2c..8aec690486 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/checking/AnnotationPredicate.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/checking/AnnotationPredicate.scala @@ -132,7 +132,7 @@ case class AnnotatedWith( val thatEVPs = that.elementValuePairs thatEVPs.size == thisEVPs.size && - thisEVPs.forall(thisEVP => thatEVPs.exists(_ == thisEVP)) + thisEVPs.forall(thisEVP => thatEVPs.contains(thisEVP)) } } @@ -191,7 +191,7 @@ object AnnotatedWith { ): AnnotatedWith = { new AnnotatedWith( ClassType(annotationTypeName.asString), - elementValuePairs.map(kv => ElementValuePair(kv._1, kv._2)).toSeq + elementValuePairs.map(kv => ElementValuePair(kv._1, kv._2)) ) } } diff --git a/OPAL/av/src/main/scala/org/opalj/av/checking/BinaryString.scala b/OPAL/av/src/main/scala/org/opalj/av/checking/BinaryString.scala index 4cb9c1015d..8a21ca559c 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/checking/BinaryString.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/checking/BinaryString.scala @@ -26,7 +26,7 @@ final class BinaryString private (private val string: String) { override def hashCode: Int = string.hashCode() - override def toString: String = string.toString() + override def toString: String = string } object BinaryString { diff --git a/OPAL/av/src/main/scala/org/opalj/av/checking/ClassMatcher.scala b/OPAL/av/src/main/scala/org/opalj/av/checking/ClassMatcher.scala index 595fe1e4a6..e749d33580 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/checking/ClassMatcher.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/checking/ClassMatcher.scala @@ -54,7 +54,7 @@ case class DefaultClassMatcher( namePredicate: NamePredicate = RegexNamePredicate(""".*""".r), annotationsPredicate: AnnotationsPredicate = AnyAnnotations, matchSubclasses: Boolean = false, - matchImplementingclasses: Boolean = false, + matchImplementingClasses: Boolean = false, matchMethods: Boolean = true, matchFields: Boolean = true ) extends ClassMatcher { @@ -87,7 +87,7 @@ case class DefaultClassMatcher( val classFileName = classFile.thisType.fqn (namePredicate(classFileName) || (matchSubclasses && isSubClass(classFile, project)) || - (matchImplementingclasses && implementsInterface(classFile, project))) && + (matchImplementingClasses && implementsInterface(classFile, project))) && (doesAnnotationMatch(classFile)) && accessFlagsMatcher.unapply(classFile.accessFlags) } @@ -111,16 +111,16 @@ case class DefaultClassMatcher( object ClassMatcher { def apply(namePredicate: NamePredicate): ClassMatcher = { - new DefaultClassMatcher(namePredicate = namePredicate) + DefaultClassMatcher(namePredicate = namePredicate) } def apply(annotationsPredicate: AnnotationsPredicate): ClassMatcher = { - new DefaultClassMatcher(annotationsPredicate = annotationsPredicate) + DefaultClassMatcher(annotationsPredicate = annotationsPredicate) } def apply(className: String): ClassMatcher = { require(className.indexOf('*') == -1) - new DefaultClassMatcher(namePredicate = Equals(className)) + DefaultClassMatcher(namePredicate = Equals(className)) } def apply(className: String, matchPrefix: Boolean): ClassMatcher = { @@ -130,7 +130,7 @@ object ClassMatcher { StartsWith(className) else Equals(className) - new DefaultClassMatcher(namePredicate = namePredicate) + DefaultClassMatcher(namePredicate = namePredicate) } def apply( @@ -147,7 +147,7 @@ object ClassMatcher { else Equals(className) - new DefaultClassMatcher( + DefaultClassMatcher( namePredicate = namePredicate, matchMethods = matchMethods, matchFields = matchFields @@ -162,18 +162,18 @@ object ClassMatcher { StartsWith(className) else Equals(className) - new DefaultClassMatcher( + DefaultClassMatcher( namePredicate = namePredicate, matchSubclasses = matchSubclasses ) } def apply(regex: Regex): ClassMatcher = { - new DefaultClassMatcher(namePredicate = RegexNamePredicate(regex)) + DefaultClassMatcher(namePredicate = RegexNamePredicate(regex)) } def apply(regex: Regex, matchSubclasses: Boolean): ClassMatcher = { - new DefaultClassMatcher( + DefaultClassMatcher( namePredicate = RegexNamePredicate(regex), matchSubclasses = matchSubclasses ) diff --git a/OPAL/av/src/main/scala/org/opalj/av/checking/FieldMatcher.scala b/OPAL/av/src/main/scala/org/opalj/av/checking/FieldMatcher.scala index 3ac2ec62a5..9b470fd2ce 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/checking/FieldMatcher.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/checking/FieldMatcher.scala @@ -38,11 +38,10 @@ case class FieldMatcher( def extension(implicit project: SomeProject): immutable.Set[VirtualSourceElement] = { val allMatchedFields = project.allClassFiles collect { - case classFile if doesClassFileMatch(classFile) => { + case classFile if doesClassFileMatch(classFile) => classFile.fields collect { case field if doesFieldMatch(field) => field.asVirtualField(classFile) } - } } allMatchedFields.flatten.toSet } diff --git a/OPAL/av/src/main/scala/org/opalj/av/checking/SourceElementPredicate.scala b/OPAL/av/src/main/scala/org/opalj/av/checking/SourceElementPredicate.scala index c11c5f589a..67e90f5779 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/checking/SourceElementPredicate.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/checking/SourceElementPredicate.scala @@ -30,7 +30,7 @@ trait SourceElementPredicate[-S <: ConcreteSourceElement] extends (S => Boolean) ): SourceElementPredicate[X] = and(right) /** - * Returns a human readable representation of this predicate that is well suited + * Returns a human-readable representation of this predicate that is well suited * for presenting it in messages related to architectural deviations. * * It should not end with a white space and should not use multiple lines. @@ -62,7 +62,7 @@ case class Attributes( def apply(sourceElement: ConcreteSourceElement): Boolean = { // sourceElement.attributes.size == this.attributes.size && - this.attributes.forall(a => sourceElement.attributes.exists(_ == a)) + this.attributes.forall(a => sourceElement.attributes.contains(a)) } def toDescription: String = { diff --git a/OPAL/av/src/main/scala/org/opalj/av/checking/Specification.scala b/OPAL/av/src/main/scala/org/opalj/av/checking/Specification.scala index bf1a4f70f3..a5779b1fbb 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/checking/Specification.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/checking/Specification.scala @@ -39,7 +39,7 @@ import scala.collection.parallel.CollectionConverters.IterableIsParallelizable * evaluated. * * The intended way to create a specification is to create a new anonymous Specification - * class that contains the specification of the architecture. Afterwards the specification + * class that contains the specification of the architecture. Afterward, the specification * object can be used to get the list of architectural violations. * * {{{ @@ -577,11 +577,9 @@ class Specification(val project: Project[URL], val useAnsiColors: Boolean) { spe case s: VirtualClass => project.classFile(s.classType.asClassType).get case _ => throw SpecificationError(sourceElement.toJava + " is not a class") } - if sourceClassFile.superclassType.exists(s => - !allLocalTargetSourceElements.exists(v => - v.classType.asClassType.equals(s) - ) - ) + if sourceClassFile.superclassType.exists { s => + !allLocalTargetSourceElements.exists(v => v.classType.asClassType.equals(s)) + } } yield { PropertyViolation( project, @@ -665,7 +663,7 @@ class Specification(val project: Project[URL], val useAnsiColors: Boolean) { spe matchAny: Boolean = false ): Unit = { architectureCheckers = - new LocalOutgoingAnnotatedWithConstraint( + LocalOutgoingAnnotatedWithConstraint( contextEnsembleSymbol, annotationPredicates, property, @@ -677,7 +675,7 @@ class Specification(val project: Project[URL], val useAnsiColors: Boolean) { spe methodPredicate: SourceElementPredicate[Method] ): Unit = { architectureCheckers = - new LocalOutgoingShouldImplementMethodConstraint( + LocalOutgoingShouldImplementMethodConstraint( contextEnsembleSymbol, methodPredicate ) :: architectureCheckers @@ -795,7 +793,7 @@ class Specification(val project: Project[URL], val useAnsiColors: Boolean) { spe logInfo(" => Matched source elements: " + matchedSourceElements.size) logInfo(" => Other source elements: " + unmatchedSourceElements.size) - } { ns => logProgress("3. determing the extension of the ensembles took " + ns.toSeconds) } + } { ns => logProgress("3. determining the extension of the ensembles took " + ns.toSeconds) } // Check all rules // @@ -875,7 +873,7 @@ object Specification { /** * Returns a list of paths contained inside the given classpath file. - * A classpath file should contain paths as text seperated by a path-separator character. + * A classpath file should contain paths as text separated by a path-separator character. * On UNIX systems, this character is ':'; on Microsoft Windows systems it * is ';'. * diff --git a/OPAL/av/src/main/scala/org/opalj/av/checking/SpecificationViolation.scala b/OPAL/av/src/main/scala/org/opalj/av/checking/SpecificationViolation.scala index f960efe69f..7a83d7bd83 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/checking/SpecificationViolation.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/checking/SpecificationViolation.scala @@ -20,7 +20,7 @@ import org.opalj.de.* */ sealed trait SpecificationViolation { - override final def toString(): String = toString(useAnsiColors = false) + override final def toString: String = toString(useAnsiColors = false) def toString(useAnsiColors: Boolean): String @@ -44,9 +44,9 @@ case class DependencyViolation( override def toString(useAnsiColors: Boolean): String = { val sourceLineNumber = source.getLineNumber(project).getOrElse(1) - val javaSource = s"(${source.classType.toJava}.java:${sourceLineNumber})" + val javaSource = s"(${source.classType.toJava}.java:$sourceLineNumber)" val targetLineNumber = target.getLineNumber(project).getOrElse(1) - val javaTarget = s"(${target.classType.toJava}.java:${targetLineNumber})" + val javaTarget = s"(${target.classType.toJava}.java:$targetLineNumber)" if (useAnsiColors) RED + description + diff --git a/OPAL/av/src/main/scala/org/opalj/av/viz/DependencyAnalysis.scala b/OPAL/av/src/main/scala/org/opalj/av/viz/DependencyAnalysis.scala index dfc5512596..cb183a972a 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/viz/DependencyAnalysis.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/viz/DependencyAnalysis.scala @@ -62,13 +62,12 @@ object DependencyAnalysis extends ProjectsAnalysisApplication { val pattern = "<%[A-Z_]+%>".r val option = pattern findFirstIn doc option match { - case Some(o) => { + case Some(o) => println( Console.YELLOW + "[warn] HtmlDocument has at least one unset option " + o + Console.RESET ) - } case None => } doc diff --git a/OPAL/av/src/main/scala/org/opalj/av/viz/InstructionStatistics.scala b/OPAL/av/src/main/scala/org/opalj/av/viz/InstructionStatistics.scala index fe69b2c56a..6336887f5f 100644 --- a/OPAL/av/src/main/scala/org/opalj/av/viz/InstructionStatistics.scala +++ b/OPAL/av/src/main/scala/org/opalj/av/viz/InstructionStatistics.scala @@ -66,7 +66,7 @@ object InstructionStatistics extends ProjectsAnalysisApplication { processPackage( childPN, ( - if (rootFQPN.length() == 0) + if (rootFQPN.isEmpty) childPN else childPN.substring(rootFQPN.length() + 1) @@ -95,7 +95,7 @@ object InstructionStatistics extends ProjectsAnalysisApplication { fqpn <- instructionsPerFQPN.keys if fqpn.length > rootFQPN.length() if fqpn.startsWith(rootFQPN) - if fqpn.charAt(rootFQPN.length()) == '/' // javax is not a subpackage of java.. + if fqpn.charAt(rootFQPN.length()) == '/' // javax is not a subpackage of java } { val pnsToRemove = HashSet.empty[String] var pnNeedToBeAdded = true diff --git a/OPAL/av/src/test/resources/sourcefiles/entity/impl/Address.scala b/OPAL/av/src/test/resources/sourcefiles/entity/impl/Address.scala index 5e74f2441d..d2335594a0 100644 --- a/OPAL/av/src/test/resources/sourcefiles/entity/impl/Address.scala +++ b/OPAL/av/src/test/resources/sourcefiles/entity/impl/Address.scala @@ -1,6 +1,8 @@ /* BSD 2-Clause License - see OPAL/LICENSE for details. */ package entity.impl +import scala.compiletime.uninitialized + import entity.AbstractEntity import entity.annotation.Column import entity.annotation.Entity @@ -18,7 +20,7 @@ class Address extends AbstractEntity { @Id @Column(name = "id", nullable = false) - var id: Int = _ + var id: Int = uninitialized @Column(name = "street", nullable = false) var street: String = "" diff --git a/OPAL/av/src/test/resources/sourcefiles/entity/impl/User.scala b/OPAL/av/src/test/resources/sourcefiles/entity/impl/User.scala index ede1c7c508..307d489600 100644 --- a/OPAL/av/src/test/resources/sourcefiles/entity/impl/User.scala +++ b/OPAL/av/src/test/resources/sourcefiles/entity/impl/User.scala @@ -1,6 +1,8 @@ /* BSD 2-Clause License - see OPAL/LICENSE for details. */ package entity.impl +import scala.compiletime.uninitialized + import entity.AbstractEntity import entity.annotation.Column import entity.annotation.Entity @@ -18,7 +20,7 @@ class User extends AbstractEntity { @Id @Column(name = "id", nullable = false) - var id: Int = _ + var id: Int = uninitialized @Column(name = "first_name", nullable = false) var firstName: String = "" diff --git a/OPAL/ba/src/main/scala/org/opalj/ba/CODE.scala b/OPAL/ba/src/main/scala/org/opalj/ba/CODE.scala index bdc131bebd..bfc7f26958 100644 --- a/OPAL/ba/src/main/scala/org/opalj/ba/CODE.scala +++ b/OPAL/ba/src/main/scala/org/opalj/ba/CODE.scala @@ -189,7 +189,7 @@ object CODE { // never throw an exception. def markMetaInformationAsLive(index: Int): Unit = { var currentIndex = index - // the code element "0" is already marked as live.. + // the code element "0" is already marked as live. while (currentIndex > 0) { if (isLive(currentIndex) || markedAsLive.contains(currentIndex)) { return; // nothing to do @@ -308,7 +308,7 @@ object CODE { * TRY(END) pseudo instructions; updates isLiveCount if necessary. */ def propagateLiveInformation(): Unit = { - // Step 2.2 We now have to test for still required TRY-Block and LINENUMBER markers.. + // Step 2.2 We now have to test for still required TRY-Block and LINENUMBER markers. // (Basically, we just set them to "isLive".) // A TRY/TRYEND marker is to be live if we have one or more live instructions // between two corresponding markers. @@ -490,7 +490,7 @@ object CODE { case LabelElement(label) => if (label.isPCLabel) { - // let's store the mapping to make it possible to remap the other attributes.. + // let's store the mapping to make it possible to remap the other attributes pcMapping += (label.pc, nextPC) } labels += (label -> nextPC) diff --git a/OPAL/ba/src/main/scala/org/opalj/ba/CodeAttributeBuilder.scala b/OPAL/ba/src/main/scala/org/opalj/ba/CodeAttributeBuilder.scala index 9245764d5d..6eb0e0f6e4 100644 --- a/OPAL/ba/src/main/scala/org/opalj/ba/CodeAttributeBuilder.scala +++ b/OPAL/ba/src/main/scala/org/opalj/ba/CodeAttributeBuilder.scala @@ -222,7 +222,7 @@ object CodeAttributeBuilder { // because some instructions will never throw an exception and the respective variable is // guaranteed to be initialized to a new appropriate value along the way. Unfortunately, // the information may be required by the JVM to compute the stack map table. - // I.e., when we have a finally handler the JVM assumes that EVERY instruction may throw + // I.e., when we have a finally-handler the JVM assumes that EVERY instruction may throw // an exception and therefore the register information associated with the handler // has to be compatible with all handlers... (see `AI.IdentifyDeadVariables` for further // details!) @@ -271,7 +271,7 @@ object CodeAttributeBuilder { case dv => val operandSize = dv.computationalType.operandSize if (operandSize == 2 && locals(index + 1) != null) { - // This situation may arises in cases where we use a local variable + // This situation may arise in cases where we use a local variable // with index x for a long value and later on use x + 1 for some // new value index += 1 @@ -304,7 +304,7 @@ object CodeAttributeBuilder { val evaluationDetails = r.evaluatedPCs.mkString("evaluated: ", ", ", body) val ehs = c.exceptionHandlers.mkString("Exception Handlers:\n", "\n", "\nt") val message = m.toJava(evaluationDetails + ehs) - throw new BytecodeProcessingFailedException(message); + throw BytecodeProcessingFailedException(message); } computeLocalsVerificationTypeInfo(locals) } diff --git a/OPAL/ba/src/main/scala/org/opalj/ba/CodeElement.scala b/OPAL/ba/src/main/scala/org/opalj/ba/CodeElement.scala index 3629d96ce1..4f5f611aff 100644 --- a/OPAL/ba/src/main/scala/org/opalj/ba/CodeElement.scala +++ b/OPAL/ba/src/main/scala/org/opalj/ba/CodeElement.scala @@ -49,7 +49,7 @@ object CodeElement { implicit def instructionToInstructionElement( instruction: LabeledInstruction ): InstructionElement = { - new InstructionElement(instruction) + InstructionElement(instruction) } /** @@ -65,5 +65,5 @@ object CodeElement { /** * Converts a `Symbol` (label) to [[org.opalj.ba.LabelElement]]. */ - implicit def symbolToLabelElement(label: Symbol): LabelElement = new LabelElement(label) + implicit def symbolToLabelElement(label: Symbol): LabelElement = LabelElement(label) } diff --git a/OPAL/ba/src/main/scala/org/opalj/ba/ExceptionHandlerElement.scala b/OPAL/ba/src/main/scala/org/opalj/ba/ExceptionHandlerElement.scala index 2f0d47c5c5..1155dc4532 100644 --- a/OPAL/ba/src/main/scala/org/opalj/ba/ExceptionHandlerElement.scala +++ b/OPAL/ba/src/main/scala/org/opalj/ba/ExceptionHandlerElement.scala @@ -50,7 +50,7 @@ case class TRYEND(id: Symbol) extends ExceptionHandlerElement { * is stable - i.e., two handlers with the same number will end up in the same order * in the table. Furthermore, it is possible to use negative numbers to ensure that a * (custom) handler has precedence over all ''handlers'' found in the initial code; - * the initial handlers will have ids in the range [0...(number of exception handler)). + * the initial handlers will have ids in the range [0...(number of exception handlers)]. * @param handlerType The type of the handled exception or `None` if all exceptions are handled * (finally handler). */ @@ -72,7 +72,7 @@ object CATCH { /** * Creates a [[CATCH]] pseudo instruction marking the handler of a - * [[org.opalj.br.ExceptionHandler]] catching the given `handlerTpye`. + * [[org.opalj.br.ExceptionHandler]] catching the given `handlerType`. * @see [[ExceptionHandlerElement]] * @param handlerType the fqn of the caught exception class */ diff --git a/OPAL/ba/src/main/scala/org/opalj/ba/LabeledCode.scala b/OPAL/ba/src/main/scala/org/opalj/ba/LabeledCode.scala index 43697a1887..c030fdc2a5 100644 --- a/OPAL/ba/src/main/scala/org/opalj/ba/LabeledCode.scala +++ b/OPAL/ba/src/main/scala/org/opalj/ba/LabeledCode.scala @@ -52,7 +52,7 @@ class LabeledCode( /** * Inserts the given sequence of instructions before, at or after the instruction - identified * by a [[org.opalj.br.instructions.PCLabel]] - with the given pc. - * CODE objects created by `Code.toLabeldCode` generally creates + * CODE objects created by `Code.toLabeledCode` generally creates * [[org.opalj.br.instructions.PCLabel]]. * * Here, '''before''' means that those instruction which currently jump to the instruction with @@ -111,7 +111,6 @@ class LabeledCode( * * '''After''': * EH | L | I | CE | EH | L+1 // i.e., the insertion position depends on L+1(!) - * ) * * Hence, `At` and `After` can be used interchangeably except when an * instruction should be added at the very beginning or after the end. @@ -253,7 +252,7 @@ object LabeledCode { val labeledInstructions = new ArrayBuffer[CodeElement[AnyRef]](estimatedSize) // Transform the current code to use labels; this approach handles cases such as - // switches which now require more/less bytes very elegantly. + // switches which now require more/fewer bytes very elegantly. code.iterate { (pc, i) => // IMPROVE [L1] use while loop code.exceptionHandlers.iterator.zipWithIndex.foreach { ehIndex => diff --git a/OPAL/ba/src/main/scala/org/opalj/ba/package.scala b/OPAL/ba/src/main/scala/org/opalj/ba/package.scala index 1fe2621823..896b3721a9 100644 --- a/OPAL/ba/src/main/scala/org/opalj/ba/package.scala +++ b/OPAL/ba/src/main/scala/org/opalj/ba/package.scala @@ -170,15 +170,15 @@ package object ba { ba => def createBoostrapMethodTableAttribute(constantsPool: ConstantsPool): da.Attribute = { import constantsPool.* val bootstrap_methods = bootstrapMethods map { bootstrapMethod => - new da.BootstrapMethod( + da.BootstrapMethod( CPEMethodHandle(bootstrapMethod.handle, false), bootstrapMethod.arguments.map[da.BootstrapArgument] { argument => - new da.BootstrapArgument(CPEntryForBootstrapArgument(argument)) + da.BootstrapArgument(CPEntryForBootstrapArgument(argument)) } ) } val attributeNameIndex = constantsPool.CPEUtf8(bi.BootstrapMethodsAttribute.Name) - new da.BootstrapMethods_attribute(attributeNameIndex, bootstrap_methods) + da.BootstrapMethods_attribute(attributeNameIndex, bootstrap_methods) } /** @@ -511,7 +511,7 @@ package object ba { ba => } } - instructions.flush + instructions.flush() da.Code_attribute( attribute_name_index = constantsBuffer.CPEUtf8(bi.CodeAttribute.Name), diff --git a/OPAL/ba/src/test/scala/org/opalj/ba/MethodBuilderTest.scala b/OPAL/ba/src/test/scala/org/opalj/ba/MethodBuilderTest.scala index f6a2df5d28..6e7e0d7b7d 100644 --- a/OPAL/ba/src/test/scala/org/opalj/ba/MethodBuilderTest.scala +++ b/OPAL/ba/src/test/scala/org/opalj/ba/MethodBuilderTest.scala @@ -68,8 +68,8 @@ class MethodBuilderTest extends AnyFlatSpec { val brClassFile = J8ClassFile(() => new java.io.ByteArrayInputStream(rawClassFile)).head val testMethod = brClassFile.methods.find { m => - val expectedMethodDescritor = MethodDescriptor("(Ljava/lang/String;)Ljava/lang/String;") - m.name == "testMethod" && m.descriptor == expectedMethodDescritor + val expectedMethodDescriptor = MethodDescriptor("(Ljava/lang/String;)Ljava/lang/String;") + m.name == "testMethod" && m.descriptor == expectedMethodDescriptor } it should "have the correct signature: (Ljava/lang/String;)Ljava/lang/String;" in { @@ -355,7 +355,7 @@ class MethodBuilderTest extends AnyFlatSpec { LabelElement(PCLabel(22)) ) - assert(c.instructions.size == 45) + assert(c.instructions.length == 45) } it should "aggressively remove useless try markers if no exceptions are thrown" in { @@ -408,7 +408,7 @@ class MethodBuilderTest extends AnyFlatSpec { LabelElement(PCLabel(23)) ) - assert(c.instructions.size == 12) + assert(c.instructions.length == 12) } it should "not remove live code in nested exception handlers" in { @@ -463,7 +463,7 @@ class MethodBuilderTest extends AnyFlatSpec { LabelElement(PCLabel(23)) ) - assert(c.instructions.size == 26) + assert(c.instructions.length == 26) } } diff --git a/OPAL/bc/src/main/scala/org/opalj/bc/Assembler.scala b/OPAL/bc/src/main/scala/org/opalj/bc/Assembler.scala index a125de7318..a5f4950463 100644 --- a/OPAL/bc/src/main/scala/org/opalj/bc/Assembler.scala +++ b/OPAL/bc/src/main/scala/org/opalj/bc/Assembler.scala @@ -450,7 +450,7 @@ object Assembler { val ovi = as[ObjectVariableInfo](vti) writeByte(tag) writeShort(ovi.cpool_index) - case VerificationTypeInfo.ITEM_Unitialized => + case VerificationTypeInfo.ITEM_Uninitialized => val uvi = as[UninitializedVariableInfo](vti) writeByte(tag) writeShort(uvi.offset) diff --git a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/InheritedStaticMethods.scala b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/InheritedStaticMethods.scala index dbb8b6da8e..36039e3198 100644 --- a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/InheritedStaticMethods.scala +++ b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/InheritedStaticMethods.scala @@ -124,6 +124,6 @@ object InheritedStaticMethods extends App { val assembledMainPath = Paths.get("OPAL/bc/src/test/resources/InheritedStaticInterfaceMethods/mr/inheritedstaticinterfacemethods/Main.class") val assembledMainFile = Files.write(assembledMainPath, assembledMain) - println("Created class file: " + assembledMainFile.toAbsolutePath()) + println("Created class file: " + assembledMainFile.toAbsolutePath) } diff --git a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/MaximallySpecificInterfaceMethods.scala b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/MaximallySpecificInterfaceMethods.scala index 66d4e6f8a4..39c346e338 100644 --- a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/MaximallySpecificInterfaceMethods.scala +++ b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/MaximallySpecificInterfaceMethods.scala @@ -83,7 +83,7 @@ object MaximallySpecificInterfaceMethods extends App { val assembledS0_1Path = Paths.get("OPAL/bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods/S0_1.class") val assembledS0_1File = Files.write(assembledS0_1Path, assembledS0_1) - println("Created class file: " + assembledS0_1File.toAbsolutePath()) + println("Created class file: " + assembledS0_1File.toAbsolutePath) } { @@ -133,7 +133,7 @@ object MaximallySpecificInterfaceMethods extends App { val assembledS0_2Path = Paths.get("OPAL/bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods/S0_2.class") val assembledS0_2File = Files.write(assembledS0_2Path, assembledS0_2) - println("Created class file: " + assembledS0_2File.toAbsolutePath()) + println("Created class file: " + assembledS0_2File.toAbsolutePath) } { @@ -165,7 +165,7 @@ object MaximallySpecificInterfaceMethods extends App { val assembledS1_aPath = Paths.get("OPAL/bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods/S1_a.class") val assembledS1_aFile = Files.write(assembledS1_aPath, assembledS1_a) - println("Created class file: " + assembledS1_aFile.toAbsolutePath()) + println("Created class file: " + assembledS1_aFile.toAbsolutePath) } { @@ -218,7 +218,7 @@ object MaximallySpecificInterfaceMethods extends App { val assembledS1_cPath = Paths.get("OPAL/bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods/S1_c.class") val assembledS1_cFile = Files.write(assembledS1_cPath, assembledS1_c) - println("Created class file: " + assembledS1_cFile.toAbsolutePath()) + println("Created class file: " + assembledS1_cFile.toAbsolutePath) } { @@ -245,7 +245,7 @@ object MaximallySpecificInterfaceMethods extends App { val assembledS2_1Path = Paths.get("OPAL/bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods/S2_1.class") val assembledS2_1File = Files.write(assembledS2_1Path, assembledS2_1) - println("Created class file: " + assembledS2_1File.toAbsolutePath()) + println("Created class file: " + assembledS2_1File.toAbsolutePath) } { @@ -270,7 +270,7 @@ object MaximallySpecificInterfaceMethods extends App { val assembledS2_2Path = Paths.get("OPAL/bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods/S2_2.class") val assembledS2_2File = Files.write(assembledS2_2Path, assembledS2_2) - println("Created class file: " + assembledS2_2File.toAbsolutePath()) + println("Created class file: " + assembledS2_2File.toAbsolutePath) } { @@ -297,7 +297,7 @@ object MaximallySpecificInterfaceMethods extends App { val assembledIntfPath = Paths.get("OPAL/bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods/Intf.class") val assembledIntfFile = Files.write(assembledIntfPath, assembledIntf) - println("Created class file: " + assembledIntfFile.toAbsolutePath()) + println("Created class file: " + assembledIntfFile.toAbsolutePath) } } diff --git a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/Readme.md b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/Readme.md index 7675c112c1..ac17b13697 100644 --- a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/Readme.md +++ b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/Readme.md @@ -55,7 +55,7 @@ class Main { ``` ## InheritedInterfaceMethods -The following is **pseudo-code** to facilitate comprehension of the test case: +The following is **pseudocode** to facilitate comprehension of the test case: ***(The code is not valid Java code!)*** The engineered classes are found in `bc/src/test/resources/InheritedInterfaceMethods/mr/inheritedinterfacemethods`. @@ -87,7 +87,7 @@ public class Sub extends Top implements Intf { } ### StaticAndDefaultInterfaceMethods -The following is **pseudo-code** to facilitate comprehension of the test case: +The following is **pseudocode** to facilitate comprehension of the test case: ***(The code is not valid Java code!)*** The engineered classes are found in `bc/src/test/resources/StaticAndDefaultInterfaceMethods/mr/staticanddefaultinterfacemethods`. @@ -129,7 +129,7 @@ public class Main { ``` ### MaximallySpecificInterfaceMethods -The following is **pseudo-code** to facilitate comprehension of the test case: +The following is **pseudocode** to facilitate comprehension of the test case: ***(The code is not valid Java code!)*** The engineered classes are found in `bc/src/test/resources/MaximallySpecificInterfaceMethods/mr/maximallyspecificinterfacemethods`. diff --git a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/StaticAndDefaultInterfaceMethods.scala b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/StaticAndDefaultInterfaceMethods.scala index d0af27a9d5..c6d5244deb 100644 --- a/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/StaticAndDefaultInterfaceMethods.scala +++ b/OPAL/bc/src/test/scala/org/opalj/test/fixtures/mr/StaticAndDefaultInterfaceMethods.scala @@ -93,7 +93,7 @@ object StaticAndDefaultInterfaceMethods extends App { val assembledSuperIntfPath = Paths.get("OPAL/bc/src/test/resources/StaticAndDefaultInterfaceMethods/mr/staticanddefaultinterfacemethods/SuperIntf.class") val assembledSuperIntfFile = Files.write(assembledSuperIntfPath, assembledSuperIntf) - println("Created class file: " + assembledSuperIntfFile.toAbsolutePath()) + println("Created class file: " + assembledSuperIntfFile.toAbsolutePath) val intfCF = ClassFile( Array[Constant_Pool_Entry]( @@ -152,7 +152,7 @@ object StaticAndDefaultInterfaceMethods extends App { val assembledIntfPath = Paths.get("OPAL/bc/src/test/resources/StaticAndDefaultInterfaceMethods/mr/staticanddefaultinterfacemethods/Intf.class") val assembledIntfFile = Files.write(assembledIntfPath, assembledIntf) - println("Created class file: " + assembledIntfFile.toAbsolutePath()) + println("Created class file: " + assembledIntfFile.toAbsolutePath) val subIntfCF = ClassFile( Array[Constant_Pool_Entry]( @@ -175,5 +175,5 @@ object StaticAndDefaultInterfaceMethods extends App { val assembledSubIntfPath = Paths.get("OPAL/bc/src/test/resources/StaticAndDefaultInterfaceMethods/mr/staticanddefaultinterfacemethods/SubIntf.class") val assembledSubIntfFile = Files.write(assembledSubIntfPath, assembledSubIntf) - println("Created class file: " + assembledSubIntfFile.toAbsolutePath()) + println("Created class file: " + assembledSubIntfFile.toAbsolutePath) } diff --git a/OPAL/bi/src/main/resources/JVMInstructions.xml b/OPAL/bi/src/main/resources/JVMInstructions.xml index ffda019f55..1ec68ed2e1 100644 --- a/OPAL/bi/src/main/resources/JVMInstructions.xml +++ b/OPAL/bi/src/main/resources/JVMInstructions.xml @@ -1989,7 +1989,7 @@ constant of type int or float, or must be a symbolic reference to a class (§5.4.3.1) or a string literal (§5.1) or a method type or method handle ($5.4.3.5) or a dynamically computed constant ($5.4.3.6) whose field descriptor - is neither J (long) or D (double). + is neither J (long) nor D (double). --> @@ -2006,7 +2006,7 @@ constant of type int or float, or must be a symbolic reference to a class (§5.4.3.1) or a string literal (§5.1) or a method type or method handle ($5.4.3.5) or a dynamically computed constant ($5.4.3.6) whose field descriptor - is neither J (long) or D (double). + is neither J (long) nor D (double). --> diff --git a/OPAL/bi/src/main/resources/JVMInstructions.xsd b/OPAL/bi/src/main/resources/JVMInstructions.xsd index e076d5c9c3..dd06c697fb 100644 --- a/OPAL/bi/src/main/resources/JVMInstructions.xsd +++ b/OPAL/bi/src/main/resources/JVMInstructions.xsd @@ -687,7 +687,7 @@ Each reference is either an objectref, an arrayref or a - null value. An instruction is specified as operating on an reference, if further + null value. An instruction is specified as operating on a reference, if further information is not available. diff --git a/OPAL/bi/src/main/scala/org/opalj/bi/AccessFlag.scala b/OPAL/bi/src/main/scala/org/opalj/bi/AccessFlag.scala index 773d325d9d..82dba74c3d 100644 --- a/OPAL/bi/src/main/scala/org/opalj/bi/AccessFlag.scala +++ b/OPAL/bi/src/main/scala/org/opalj/bi/AccessFlag.scala @@ -79,7 +79,7 @@ object VisibilityModifier { * element has default visibility. */ def get(accessFlags: Int): Option[VisibilityModifier] = { - ((accessFlags & mask): @switch) match { + (accessFlags & mask: @switch) match { case ACC_PUBLIC.mask => SOME_PUBLIC case ACC_PRIVATE.mask => SOME_PRIVATE case ACC_PROTECTED.mask => SOME_PROTECTED diff --git a/OPAL/bi/src/main/scala/org/opalj/bi/reader/AnnotationsReader.scala b/OPAL/bi/src/main/scala/org/opalj/bi/reader/AnnotationsReader.scala index a059b9e7fe..ac5936b6d4 100644 --- a/OPAL/bi/src/main/scala/org/opalj/bi/reader/AnnotationsReader.scala +++ b/OPAL/bi/src/main/scala/org/opalj/bi/reader/AnnotationsReader.scala @@ -27,7 +27,7 @@ trait AnnotationsReader extends AnnotationsAbstractions { type Annotations = ArraySeq[Annotation] /** - * Reads the annotations of a annotations attributes. + * Reads the annotations of an annotation's attributes. * * ''' From the Specification''' *
    diff --git a/OPAL/bi/src/main/scala/org/opalj/bi/reader/AttributesReader.scala b/OPAL/bi/src/main/scala/org/opalj/bi/reader/AttributesReader.scala
    index d1734b86dc..b51e6db328 100644
    --- a/OPAL/bi/src/main/scala/org/opalj/bi/reader/AttributesReader.scala
    +++ b/OPAL/bi/src/main/scala/org/opalj/bi/reader/AttributesReader.scala
    @@ -163,7 +163,7 @@ trait AttributesReader
             val attributes: Attributes =
                 fillArraySeq(in.readUnsignedShort) {
                     Attribute(cp, ap, ap_name_index, ap_descriptor_index, in)
    -            }.filter(attr => attr != null) // lets remove the attributes we don't need or understand
    +            }.filter(attr => attr != null) // let's remove the attributes we don't need or understand
     
             attributesPostProcessors.foldLeft(attributes)((a, p) => p(a))
         }
    diff --git a/OPAL/bi/src/main/scala/org/opalj/bi/reader/ClassFileReader.scala b/OPAL/bi/src/main/scala/org/opalj/bi/reader/ClassFileReader.scala
    index c10059f9be..5161f8deb4 100644
    --- a/OPAL/bi/src/main/scala/org/opalj/bi/reader/ClassFileReader.scala
    +++ b/OPAL/bi/src/main/scala/org/opalj/bi/reader/ClassFileReader.scala
    @@ -421,7 +421,7 @@ trait ClassFileReader extends ClassFileReaderConfiguration with Constant_PoolAbs
         // and
         // https://github.com/delphi-hub/delphi-crawler/blob/develop/src/main/scala/de/upb/cs/swt/delphi/crawler/tools/ClassStreamReader.scala
         def ClassFiles(in: => JarInputStream): List[(ClassFile, String)] = process(in) { in =>
    -        var je: JarEntry = in.getNextJarEntry()
    +        var je: JarEntry = in.getNextJarEntry
     
             var futures: List[Future[List[(ClassFile, String)]]] = Nil
     
    @@ -449,12 +449,12 @@ trait ClassFileReader extends ClassFileReaderConfiguration with Constant_PoolAbs
                     }(
                         // we can't use the OPALExecutionContext here, because the number of
                         // threads is bounded and (depending on the nesting level, we may need
    -                    // more threads..)
    +                    // more threads...)
                         using ExecutionContext.global
                     )
     
                 }
    -            je = in.getNextJarEntry()
    +            je = in.getNextJarEntry
             }
     
             futures.flatMap(f => Await.result(f, Duration.Inf))
    @@ -582,7 +582,7 @@ trait ClassFileReader extends ClassFileReaderConfiguration with Constant_PoolAbs
             try {
                 process(new ZipFile(file)) { zf => ClassFiles(zf, exceptionHandler) }
             } catch {
    -            case e: Exception => { exceptionHandler(file, e); Nil }
    +            case e: Exception => exceptionHandler(file, e); Nil
             }
         }
     
    @@ -595,7 +595,7 @@ trait ClassFileReader extends ClassFileReaderConfiguration with Constant_PoolAbs
                     new DataInputStream(new BufferedInputStream(new FileInputStream(file)))
                 ) { in => ClassFile(in).map(classFile => (classFile, file.toURI.toURL)) }
             } catch {
    -            case e: Exception => { exceptionHandler(file, e); Nil }
    +            case e: Exception => exceptionHandler(file, e); Nil
             }
         }
     
    @@ -607,7 +607,7 @@ trait ClassFileReader extends ClassFileReaderConfiguration with Constant_PoolAbs
          *  - If the file object specifies a directory object, all ".class" files
          *    in the directory and in all subdirectories are loaded as well as all
          *    class files stored in ".jar" files in one of the directories. This class loads
    -     *    all class files in parallel. However, this does not effect analyses working on the
    +     *    all class files in parallel. However, this does not affect analyses working on the
          *    resulting `List`.
          */
         def ClassFiles(
    @@ -691,13 +691,12 @@ trait ClassFileReader extends ClassFileReaderConfiguration with Constant_PoolAbs
                                 traversePath(subPath)
                             }
                         } catch {
    -                        case e: Exception => {
    +                        case e: Exception =>
                                 error(
                                     "class file reader",
                                     "failed processing Java 9+ Runtime Image (jrt:/)",
                                     e
                                 )
    -                        }
                         }
                     } else if (p.getFileName.toString.endsWith(".class")) {
                         val cf = ClassFile(() => Files.newInputStream(p))
    diff --git a/OPAL/bi/src/main/scala/org/opalj/bi/reader/Constant_PoolReader.scala b/OPAL/bi/src/main/scala/org/opalj/bi/reader/Constant_PoolReader.scala
    index 437f20577a..50de7d2ce5 100644
    --- a/OPAL/bi/src/main/scala/org/opalj/bi/reader/Constant_PoolReader.scala
    +++ b/OPAL/bi/src/main/scala/org/opalj/bi/reader/Constant_PoolReader.scala
    @@ -119,7 +119,7 @@ trait Constant_PoolReader extends Constant_PoolAbstractions {
             val constant_pool_count = in.readUnsignedShort
     
             /*
    -         * The format of each constant_pool table entry is indicated by its first
    +         * The format of each constant_pool table entry is indicated by its first
              * “tag” byte.
              *
              * The constant_pool table is indexed from 1 to constant_pool_count−1.
    @@ -209,7 +209,7 @@ trait Constant_PoolReader extends Constant_PoolAbstractions {
                         val header = s"wrong constant pool tag: $tag (entry: $i/$constant_pool_count); "
                         val message = constant_pool_entries.iterator.zipWithIndex.slice(1, i).map(_.swap)
                             .mkString(header + "previous entries:\n\t", "\n\t", "\n")
    -                    throw new BytecodeProcessingFailedException(message)
    +                    throw BytecodeProcessingFailedException(message)
                 }
             }
             constant_pool_entries
    diff --git a/OPAL/bi/src/main/scala/org/opalj/bi/reader/Signature_attributeReader.scala b/OPAL/bi/src/main/scala/org/opalj/bi/reader/Signature_attributeReader.scala
    index 5cd8ed6a68..a384217c54 100644
    --- a/OPAL/bi/src/main/scala/org/opalj/bi/reader/Signature_attributeReader.scala
    +++ b/OPAL/bi/src/main/scala/org/opalj/bi/reader/Signature_attributeReader.scala
    @@ -99,7 +99,7 @@ trait Signature_attributeReader extends AttributeReader with ClassFileReaderConf
                 case iae: IllegalArgumentException =>
                     OPALLogger.error(
                         "parsing bytecode",
    -                    s"skipping ${ap.toString().toLowerCase()} signature: " + iae.getMessage
    +                    s"skipping ${ap.toString.toLowerCase()} signature: " + iae.getMessage
                     )
                     if (throwIllegalArgumentException) throw iae else null
             }
    diff --git a/OPAL/bi/src/main/scala/org/opalj/bi/reader/VerificationTypeInfoReader.scala b/OPAL/bi/src/main/scala/org/opalj/bi/reader/VerificationTypeInfoReader.scala
    index e60173d42c..4556d9b42d 100644
    --- a/OPAL/bi/src/main/scala/org/opalj/bi/reader/VerificationTypeInfoReader.scala
    +++ b/OPAL/bi/src/main/scala/org/opalj/bi/reader/VerificationTypeInfoReader.scala
    @@ -73,7 +73,7 @@ trait VerificationTypeInfoReader extends Constant_PoolAbstractions {
             r(ITEM_Object.id) =
                 (cp: Constant_Pool, in: DataInputStream) => ObjectVariableInfo(cp, in.readUnsignedShort)
     
    -        r(ITEM_Unitialized.id) =
    +        r(ITEM_Uninitialized.id) =
                 (cp: Constant_Pool, in: DataInputStream) =>
                     UninitializedVariableInfo(in.readUnsignedShort)
     
    @@ -90,5 +90,5 @@ object VerificationTypeInfoItem extends Enumeration {
         final val ITEM_Null = Value(5)
         final val ITEM_UninitializedThis = Value(6)
         final val ITEM_Object = Value(7)
    -    final val ITEM_Unitialized = Value(8)
    +    final val ITEM_Uninitialized = Value(8)
     }
    diff --git a/OPAL/bi/src/main/scala/org/opalj/bytecode/package.scala b/OPAL/bi/src/main/scala/org/opalj/bytecode/package.scala
    index 085f242b97..f9a450c16b 100644
    --- a/OPAL/bi/src/main/scala/org/opalj/bytecode/package.scala
    +++ b/OPAL/bi/src/main/scala/org/opalj/bytecode/package.scala
    @@ -117,7 +117,7 @@ package object bytecode {
         lazy val JRELibraryFolder: File = {
             val javaVersion = System.getProperty("java.version")
             if (javaVersion.startsWith("1.")) {
    -            val sunBootClassPath = System.getProperties().getProperty("sun.boot.class.path")
    +            val sunBootClassPath = System.getProperties.getProperty("sun.boot.class.path")
                 val paths = sunBootClassPath.split(File.pathSeparator)
                 paths.find(_.endsWith("rt.jar")) match {
     
    @@ -148,7 +148,7 @@ package object bytecode {
     
             val javaVersion = System.getProperty("java.version")
             if (javaVersion.startsWith("1.")) {
    -            val sunBootClassPath = System.getProperties().getProperty("sun.boot.class.path")
    +            val sunBootClassPath = System.getProperties.getProperty("sun.boot.class.path")
                 val paths = sunBootClassPath.split(File.pathSeparator)
     
                 paths.find(_.endsWith("rt.jar")) match {
    diff --git a/OPAL/bi/src/test/fixtures-java/Readme.md b/OPAL/bi/src/test/fixtures-java/Readme.md
    index aa99463f3a..3c9ca14256 100644
    --- a/OPAL/bi/src/test/fixtures-java/Readme.md
    +++ b/OPAL/bi/src/test/fixtures-java/Readme.md
    @@ -1,7 +1,7 @@
     #Overview
     The folder `projects` contains Java projects (to be precise: the root packages of the projects) that serve as ***test fixtures*** for tests and therefore have to have a very specific bytecode layout! _The java files are compiled with the bundled Eclipse JDT 3.26.0 compiler automatically by the build script._
     
    -The fixtures are compiled by a sbt plugin that is part of the developer tools of OPAL. It resides in `DEVELOPING_OPAL/plugins/sbt-java-fixture-compiler`. The
    +The fixtures are compiled by an sbt plugin that is part of the developer tools of OPAL. It resides in `DEVELOPING_OPAL/plugins/sbt-java-fixture-compiler`. The
     (fixed) Eclipse JDT compiler version is configured over there. For more information, please refer to `DEVELOPING_OPAL/plugins/sbt-java-fixture-compiler/Readme.md`.
     
     The generated files are found in:
    @@ -16,7 +16,7 @@ If a project should be compiled using different compiler settings or requires an
     
     For the generated JAR archive the compiler parameters are concatenated (" " => "") and colons are replaced by equals signs: (':' => '='), unless the default options are used. In the latter case all parameters are omitted.
     
    - > The target folder, the enconding (UTF-8) and the error messages style (emacs) are however
    + > The target folder, the encoding (UTF-8) and the error messages style (emacs) are however
      > automatically configured and most not be specified.
     
      If the project requires some shared support library add a line with a `requires` statement that lists the name of the root package; e.g.:
    diff --git a/OPAL/bi/src/test/fixtures-java/projects/ai/domain/PlainClassesJava.java b/OPAL/bi/src/test/fixtures-java/projects/ai/domain/PlainClassesJava.java
    index a310b4783f..0a6b425054 100644
    --- a/OPAL/bi/src/test/fixtures-java/projects/ai/domain/PlainClassesJava.java
    +++ b/OPAL/bi/src/test/fixtures-java/projects/ai/domain/PlainClassesJava.java
    @@ -13,7 +13,7 @@ public Class staticClassValue() {
             return String.class;
         }
     
    -    public Class staticPrimitveClassValue() {
    +    public Class staticPrimitiveClassValue() {
             return int.class;
         }
     
    diff --git a/OPAL/bi/src/test/fixtures-java/projects/extensible_classes/visibility/readme.md b/OPAL/bi/src/test/fixtures-java/projects/extensible_classes/visibility/Readme.md
    similarity index 92%
    rename from OPAL/bi/src/test/fixtures-java/projects/extensible_classes/visibility/readme.md
    rename to OPAL/bi/src/test/fixtures-java/projects/extensible_classes/visibility/Readme.md
    index b99fce8c36..54d29a3064 100644
    --- a/OPAL/bi/src/test/fixtures-java/projects/extensible_classes/visibility/readme.md
    +++ b/OPAL/bi/src/test/fixtures-java/projects/extensible_classes/visibility/Readme.md
    @@ -43,7 +43,7 @@ open and closed packages.
         
         
             Class
    -        pacakge visible
    +        package visible
             ✘
             ✔
             ✘
    @@ -56,7 +56,7 @@ open and closed packages.
             ✘
         
         
    -        PublicClassWithPrivateConstrutor
    +        PublicClassWithPrivateConstructor
             public
             ✔ (effectively)
             ✘
    @@ -71,7 +71,7 @@ open and closed packages.
         
         
             Enum
    -        pacakge visible
    +        package visible
             ✔
             ✘
             ✘
    @@ -85,7 +85,7 @@ open and closed packages.
         
         
             Annotation
    -        pacakge visible
    +        package visible
             ✔
             ✘
             ✘
    diff --git a/OPAL/bi/src/test/scala/org/opalj/bi/TestResources.scala b/OPAL/bi/src/test/scala/org/opalj/bi/TestResources.scala
    index 52c2d4459c..1eb9b54e64 100644
    --- a/OPAL/bi/src/test/scala/org/opalj/bi/TestResources.scala
    +++ b/OPAL/bi/src/test/scala/org/opalj/bi/TestResources.scala
    @@ -29,9 +29,9 @@ object TestResources {
             resourceFile => { Some("../../" + resourceFile) },
             // if the current path is set to "DEVELOPING_OPAL//"
             resourceFile => { Some("../../../OPAL/" + resourceFile) },
    -        // if we are in the sub-project's root folder
    +        // if we are in the subproject's root folder
             resourceFile => { Some("../" + subProjectFolder + resourceFile) },
    -        // if we are in a "developing opal" sub-project's root folder
    +        // if we are in a "developing opal" subproject's root folder
             resourceFile => { Some("../../OPAL/" + resourceFile) },
             // if the current path is set to "target/scala-.../classes"
             resourceFile => { Some("./" + resourceFile) },
    diff --git a/OPAL/br/src/it/scala/org/opalj/br/reader/ScalaInvokedynamicRewritingTest.scala b/OPAL/br/src/it/scala/org/opalj/br/reader/ScalaInvokedynamicRewritingTest.scala
    index cf380b3c2d..861d011cb2 100644
    --- a/OPAL/br/src/it/scala/org/opalj/br/reader/ScalaInvokedynamicRewritingTest.scala
    +++ b/OPAL/br/src/it/scala/org/opalj/br/reader/ScalaInvokedynamicRewritingTest.scala
    @@ -11,7 +11,7 @@ import scala.collection.parallel.CollectionConverters.ImmutableIterableIsParalle
     
     /**
      * This test loads all classes found in the Scala 2.12.4 libraries and verifies that all
    - * suported [[INVOKEDYNAMIC]] instructions can be resolved.
    + * supported [[INVOKEDYNAMIC]] instructions can be resolved.
      *
      * @author Arne Lottmann
      * @author Andreas Amuttsch
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/BootstrapArgument.scala b/OPAL/br/src/main/scala/org/opalj/br/BootstrapArgument.scala
    index 7ad7cdcf2e..adb94553c5 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/BootstrapArgument.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/BootstrapArgument.scala
    @@ -3,8 +3,8 @@ package org.opalj
     package br
     
     /**
    - * A marker trait to identify those constant pool values that can be arguments of boot
    - * strap methods.
    + * A marker trait to identify those constant pool values that can be arguments of
    + * bootstrap methods.
      *
      * @author Michael Eichberg
      */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/ClassFile.scala b/OPAL/br/src/main/scala/org/opalj/br/ClassFile.scala
    index 76c6ae0dd6..826b354c0f 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/ClassFile.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/ClassFile.scala
    @@ -254,7 +254,7 @@ final class ClassFile private (
             elidedAssert(oldMethod.descriptor == newMethod.descriptor)
     
             val index = binarySearch[Method, JVMMethod](this.methods, oldMethod)
    -        val newPreparedMethod: Method = newMethod.prepareClassFileAttachement()
    +        val newPreparedMethod: Method = newMethod.prepareClassFileAttachment()
             newPreparedMethod.declaringClassFile = this
             val methods = this.methods.unsafeArray.asInstanceOf[Array[AnyRef]]
             methods(index) = newPreparedMethod
    @@ -276,7 +276,7 @@ final class ClassFile private (
          * @note This method is primarily intended to be used to perform load-time transformations!
          */
         def _UNSAFE_addMethod(methodTemplate: MethodTemplate): ClassFile = {
    -        val newMethod = methodTemplate.prepareClassFileAttachement()
    +        val newMethod = methodTemplate.prepareClassFileAttachment()
     
             elidedAssert(this.findMethod(newMethod.name, newMethod.descriptor).isEmpty)
     
    @@ -540,7 +540,7 @@ final class ClassFile private (
                         }
     
                         // let's filter those classes that are known innerclasses of this type's
    -                    // (indirect) outertype (they cannot be innerclasses of this class..)
    +                    // (indirect) outertype (they cannot be innerclasses of this class...)
                         var nestedClassesOfOuterClass = outerClass.nestedClasses(using classFileRepository)
                         while (nestedClassesOfOuterClass.nonEmpty &&
                                !nestedClassesOfOuterClass.contains(thisType) &&
    @@ -830,7 +830,7 @@ final class ClassFile private (
     
         /**
          * Returns the method which directly overrides a method with the given properties. The result
    -     * is `Success()`` if we can find a method; `Empty` if no method can be found and
    +     * is `Success()` if we can find a method; `Empty` if no method can be found and
          * `Failure` if a method is found which supposedly overrides the specified method,
          * but which is less visible.
          *
    @@ -896,7 +896,7 @@ final class ClassFile private (
         }
     
         override def toString: String = {
    -        val superIntefaces =
    +        val superInterfaces =
                 if (interfaceTypes.nonEmpty)
                     interfaceTypes.iterator.map[String](_.toJava).mkString("\t\twith ", " with ", "\n")
                 else
    @@ -906,7 +906,7 @@ final class ClassFile private (
                 AccessFlags.toStrings(accessFlags, AccessFlagsContexts.CLASS).mkString("", " ", " ") +
                 thisType.toJava + "\n" +
                 superclassType.map("\textends " + _.toJava + "\n").getOrElse("") +
    -            superIntefaces +
    +            superInterfaces +
                 annotationsToJava(runtimeVisibleAnnotations, "\t@{ ", " }\n") +
                 annotationsToJava(runtimeInvisibleAnnotations, "\t@{ ", " }\n") +
                 "\t[version=" + majorVersion + "." + minorVersion + "]\n)"
    @@ -954,8 +954,8 @@ object ClassFile {
                 thisType,
                 superclassType,
                 interfaceTypes,
    -            fields.sorted[JVMField].map[Field](f => f.prepareClassFileAttachement()),
    -            methods.sorted[JVMMethod].map[Method](f => f.prepareClassFileAttachement()),
    +            fields.sorted[JVMField].map[Field](f => f.prepareClassFileAttachment()),
    +            methods.sorted[JVMMethod].map[Method](f => f.prepareClassFileAttachment()),
                 attributes
             )
         }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/ClassHierarchy.scala b/OPAL/br/src/main/scala/org/opalj/br/ClassHierarchy.scala
    index da74cf0415..174694b5ec 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/ClassHierarchy.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/ClassHierarchy.scala
    @@ -244,9 +244,9 @@ class ClassHierarchy private (
                 }
             }
     
    -        val rootTypes = this.rootTypes.toSet
    +        val rootTypes = this.rootTypes
             val typeInfos =
    -            (0 until knownTypesMap.length) filter { i => knownTypesMap(i) ne null } map { i =>
    +            knownTypesMap.indices filter { i => knownTypesMap(i) ne null } map { i =>
                     val t = knownTypesMap(i)
                     TypeInfo(
                         t,
    @@ -875,7 +875,7 @@ class ClassHierarchy private (
         /**
          * Returns the list of all super types in initialization order.
          * I.e., it will return the top level super class first - i.e., `java.lang.Object`
    -     * and then all sub class types.
    +     * and then all subclass types.
          *
          * If the given type is `java.lang.Object`, the empty list is returned.
          *
    @@ -951,7 +951,7 @@ class ClassHierarchy private (
                 // information!
                 // This happens ONLY in case of broken projects where
                 // the sub-supertype information is totally broken;
    -            // e.g., a sub type `extends C` but C is an interface.
    +            // e.g., a subtype `extends C` but C is an interface.
                 supertypeInformation = interpolateSupertypeInformation(classType)
                 supertypeInformationMap(cid) = supertypeInformation
             }
    @@ -982,7 +982,7 @@ class ClassHierarchy private (
             if (supertypeInformation == null) {
                 // The following is thread-safe, because we will always compute the same information!
                 // This happens ONLY in case of broken projects where the sub-supertype information is
    -            // totally broken; e.g., a sub type `extends C` but C is an interface.
    +            // totally broken; e.g., a subtype `extends C` but C is an interface.
                 supertypeInformation = interpolateSupertypeInformation(classType)
                 supertypeInformationMap(cid) = supertypeInformation
             }
    @@ -1271,7 +1271,7 @@ class ClassHierarchy private (
                 if (supertype.isClassType)
                     isSubtypeOf(subtype.asClassType, supertype.asClassType)
                 else
    -                // the supertype is an array type..
    +                // the supertype is an array type...
                     false
             } else {
                 // the subtype is an array type
    @@ -1569,7 +1569,7 @@ class ClassHierarchy private (
                             val isSubtypeOf = this.isASubtypeOf(subtype, supertype)
                             isSubtypeOf match {
                                 case Yes     => true
    -                            case Unknown => { subtypingRelationUnknown = true; false /* continue */ }
    +                            case Unknown => subtypingRelationUnknown = true; false /* continue */
                                 case No      => false
                             }
                         }
    @@ -1611,7 +1611,7 @@ class ClassHierarchy private (
                 subtypes exists { (subtype: ReferenceType) =>
                     this.isASubtypeOf(subtype, supertype) match {
                         case Yes     => true
    -                    case Unknown => { subtypeRelationUnknown = true; false /* continue search */ }
    +                    case Unknown => subtypeRelationUnknown = true; false /* continue search */
                         case No      => false
                     }
                 }
    @@ -1749,7 +1749,7 @@ class ClassHierarchy private (
          * Determines whether the given [[ClassSignature]] of `subtype` implements or extends
          * the given `supertype`.
          * In case that the `subtype` does implement or extend the `supertype`, an `Option` of
    -     * [[ClassTypeSignature]] is returned. Otherwise None will be returned.
    +     * [[ClassTypeSignature]] is returned. Otherwise, None will be returned.
          *
          * @example
          *  subtype: [[ClassSignature]] from class A where A extends List
    @@ -1802,7 +1802,7 @@ class ClassHierarchy private (
          * of the class or interface type encoded in the [[ClassTypeSignature]] of the
          * `supertype`.
          *
    -     * @note This method relies – in case of a comparison of non generic types – on
    +     * @note This method relies – in case of a comparison of non-generic types – on
          *       `isSubtypeOf(org.opalj.br.ClassType,org.opalj.br.ClassType)` of `Project` which
          *        performs an upwards search only. E.g., given the following
          *      type hierarchy:
    @@ -1837,7 +1837,7 @@ class ClassHierarchy private (
          *      subtype: List // List
          *      supertype: List // List
          *
    -     *      If the ContainerType of the `subtype` is equal to the ContainerType of the `supertype` and non of the
    +     *      If the ContainerType of the `subtype` is equal to the ContainerType of the `supertype` and none of the
          *      [[TypeArgument]]s has a [[VarianceIndicator]], then exists a subtype relation if and only if all of the
          *      [[TypeArgument]]s are equal.
          * @example ========= 2 =========
    @@ -1847,7 +1847,7 @@ class ClassHierarchy private (
          *
          * Is the `subtype` a [[ConcreteType]] without [[org.opalj.br.FormalTypeParameter]]s and the `supertype` is a [[GenericType]] then
          * we first have to check whether the `subtype` is a subtype of the given `supertype`. If not, then the `subtype` is not an actual
    -     * subtype of the given `supertype`. Otherwise we have to find the definition of the `supertype` in the type definition
    +     * subtype of the given `supertype`. Otherwise, we have to find the definition of the `supertype` in the type definition
          * or the type definition of a super class or a super interface (interface definition of SomeInterface).
          * Once found the `supertype`, we can compare all [[TypeArgument]]s of the supertype definition of the `subtype`
          * and the given `supertype`. (We are comparing String and String in this example)
    @@ -1862,11 +1862,11 @@ class ClassHierarchy private (
          * our example the subtype Foo has two [[FormalTypeParameter]] (T,E) and the supertype Bar has only one
          * [[FormalTypeParameter]] (E). Since both of them specify E in the [[ClassSignature]] of Foo, they share E as
          * [[FormalTypeParameter]]. So it is necessary to check whether the actual bound [[TypeArgument]] at the
    -     * position of E is equal. At first we have to locate the shared parameter in the [[ClassSignature]], so it is possible
    -     * to find the correct [[TypeArgument]]s. The above example shows that the shared parameter E is in the second position
    -     * of the [[FormalTypeParameter]]s of Foo and at the first position of the [[FormalTypeParameter]]s of Bar. Second and last
    -     * we know can compare the according [[TypeArgument]]s. All other parameters can be ignored because they are no important
    -     * to decide the subtype relation.
    +     * position of E is equal. At first, we have to locate the shared parameter in the [[ClassSignature]], so it is
    +     * possible to find the correct [[TypeArgument]]s. The above example shows that the shared parameter E is in the
    +     * second position of the [[FormalTypeParameter]]s of Foo and at the first position of the [[FormalTypeParameter]]s
    +     * of Bar. Second and last we know can compare the according [[TypeArgument]]s. All other parameters can be ignored
    +     * because they are not important to decide the subtype relation.
          */
         def isASubtypeOf(
             subtype:   ClassTypeSignature,
    @@ -1903,12 +1903,11 @@ class ClassHierarchy private (
                     case (
                             GenericTypeWithClassSuffix(_, elements, suffix),
                             GenericTypeWithClassSuffix(_, superElements, superSuffix)
    -                    ) => {
    +                    ) =>
                         compareTypeArguments(elements, superElements) match {
                             case Yes    => compareTypeArgumentsOfClassSuffixes(suffix, superSuffix)
                             case answer => answer
                         }
    -                }
     
                     case _ => No
                 }
    @@ -2012,7 +2011,7 @@ class ClassHierarchy private (
                                             }
                                             if (ss.get.classTypeSignatureSuffix.last.typeArguments.collectFirst {
                                                     case x @ ProperTypeArgument(_, TypeVariableSignature(_)) => x
    -                                            }.size > 0
    +                                            }.isDefined
                                             )
                                                 compareTypeArgumentsOfClassSuffixes(
                                                     List(subtype.simpleClassTypeSignature),
    @@ -2092,7 +2091,7 @@ class ClassHierarchy private (
          * into a dot representation [[http://www.graphviz.org Graphviz]]). This
          * graph can be a multi-graph if the class hierarchy contains holes.
          */
    -    def toGraph(): Node = new Node {
    +    def toGraph: Node = new Node {
     
             private val nodes: mutable.Map[ClassType, Node] = {
                 val nodes = mutable.HashMap.empty[ClassType, Node]
    @@ -2249,7 +2248,7 @@ class ClassHierarchy private (
          * @return (I) Returns (if reflexive is `true`) `upperTypeBoundA` if it is a supertype
          *      of at least one type of `upperTypeBoundB`.
          *      (II) Returns `upperTypeBoundB` if `upperTypeBoundA` is
    -     *      a subtype of all types of `upperTypeBoundB`. Otherwise a new upper type
    +     *      a subtype of all types of `upperTypeBoundB`. Otherwise, a new upper type
          *      bound is calculated and returned.
          */
         def joinClassTypes(
    @@ -2281,7 +2280,7 @@ class ClassHierarchy private (
                 // deliberately contains types which are guaranteed to be in a super-/subtype
                 // relation, but which are not part of the analyzed code base. Nevertheless,
                 // we are performing a join and therefore, drop the information...
    -            return new UIDSet1(upperTypeBoundA);
    +            return UIDSet1(upperTypeBoundA);
             }
     
             if (isUnknown(upperTypeBoundA)) {
    @@ -2306,10 +2305,10 @@ class ClassHierarchy private (
             upperTypeBoundB match {
                 case UIDSet1(utbB: ArrayType) =>
                     if (utbB eq upperTypeBoundA)
    -                    return upperTypeBoundB;
    +                    upperTypeBoundB
                     else
                         joinArrayTypes(upperTypeBoundA, utbB) match {
    -                        case Left(newUTB)  => new UIDSet1(newUTB)
    +                        case Left(newUTB)  => UIDSet1(newUTB)
                             case Right(newUTB) => newUTB
                         }
                 case UIDSet1(utbB: ClassType) =>
    @@ -2384,21 +2383,21 @@ class ClassHierarchy private (
     
             if (upperTypeBoundA eq upperTypeBoundB) {
                 if (reflexive)
    -                return new UIDSet1(upperTypeBoundA);
    +                return UIDSet1(upperTypeBoundA);
                 else
                     return directSupertypes(upperTypeBoundA /*or ...B*/ );
             }
     
             if (isSubtypeOf(upperTypeBoundB, upperTypeBoundA)) {
                 if (reflexive)
    -                return new UIDSet1(upperTypeBoundA);
    +                return UIDSet1(upperTypeBoundA);
                 else
                     return directSupertypes(upperTypeBoundA);
             }
     
             if (isSubtypeOf(upperTypeBoundA, upperTypeBoundB)) {
                 if (reflexive)
    -                return new UIDSet1(upperTypeBoundB);
    +                return UIDSet1(upperTypeBoundB);
                 else
                     return directSupertypes(upperTypeBoundB);
             }
    @@ -2439,11 +2438,11 @@ class ClassHierarchy private (
                     if (isCloneable)
                         SerializableAndCloneable
                     else
    -                    new UIDSet1(Serializable)
    +                    UIDSet1(Serializable)
                 } else if (isCloneable) {
    -                new UIDSet1(Cloneable)
    +                UIDSet1(Cloneable)
                 } else {
    -                new UIDSet1(Object)
    +                UIDSet1(Object)
                 }
             }
         }
    @@ -2463,7 +2462,7 @@ class ClassHierarchy private (
                 (thatUpperTypeBound eq Serializable) ||
                 (thatUpperTypeBound eq Cloneable)
             )
    -            new UIDSet1(thatUpperTypeBound)
    +            UIDSet1(thatUpperTypeBound)
             else {
                 var newUpperTypeBound: UIDSet[ClassType] = UIDSet.empty
                 if (isSubtypeOf(thatUpperTypeBound, Serializable))
    @@ -2471,7 +2470,7 @@ class ClassHierarchy private (
                 if (isSubtypeOf(thatUpperTypeBound, Cloneable))
                     newUpperTypeBound += Cloneable
                 if (newUpperTypeBound.isEmpty)
    -                new UIDSet1(Object)
    +                UIDSet1(Object)
                 else
                     newUpperTypeBound
             }
    @@ -2524,7 +2523,7 @@ class ClassHierarchy private (
                        thatUpperTypeBound.elementType.isBaseType
             ) {
                 // => the number of dimensions is the same, but the elementType isn't
    -            //    (if the element type would be the same, both object reference would
    +            //    (if the element-type would be the same, both object reference would
                 //    refer to the same object and this would have been handled the very
                 //    first test)
                 // Scenario:
    @@ -2609,7 +2608,7 @@ class ClassHierarchy private (
                                 utbA.head.asInstanceOf[ArrayType]
                             )
                         joinedArrayType match {
    -                        case Left(arrayType)       => new UIDSet1(arrayType)
    +                        case Left(arrayType)       => UIDSet1(arrayType)
                             case Right(upperTypeBound) => upperTypeBound
                         }
                     } else {
    @@ -2713,13 +2712,13 @@ object ClassHierarchy {
     
         private implicit val classHierarchyEC: ExecutionContext = OPALUnboundedExecutionContext
     
    -    final val JustObject: UIDSet[ClassType] = new UIDSet1(ClassType.Object)
    +    final val JustObject: UIDSet[ClassType] = UIDSet1(ClassType.Object)
     
         /**
          * Creates a `ClassHierarchy` that captures the type hierarchy related to
          * the exceptions thrown by specific Java bytecode instructions as well as
          * fundamental types such as Cloneable and Serializable and also those types
    -     * related to reflection..
    +     * related to reflection.
          *
          * This class hierarchy is primarily useful for testing purposes.
          */
    @@ -2752,7 +2751,7 @@ object ClassHierarchy {
                 val typeRegExp =
                     """(class|interface)\s+(\S+)(\s+extends\s+(\S+)(\s+implements\s+(.+))?)?""".r
                 processSource(new BufferedSource(in)) { source =>
    -                source.getLines().map(_.trim).filterNot { l => l.startsWith("#") || l.length == 0 }.map { l =>
    +                source.getLines().map(_.trim).filterNot { l => l.startsWith("#") || l.isEmpty }.map { l =>
                         val typeRegExp(typeKind, theType, _, superclassType, _, superinterfaceTypes) = l: @unchecked
                         TypeDeclaration(
                             ClassType(theType),
    @@ -2790,7 +2789,7 @@ object ClassHierarchy {
          * Creates the class hierarchy by analyzing the given class files, the predefined
          * type declarations, and the specified predefined class hierarchies.
          *
    -     * By default the class hierarchy related to the exceptions thrown by bytecode
    +     * By default, the class hierarchy related to the exceptions thrown by bytecode
          * instructions are predefined as well as the class hierarchy related to the main
          * classes of the JDK.
          * See the file `ClassHierarchyJVMExceptions.ths`, `ClassHierarchyJLS.ths` and
    @@ -2857,7 +2856,7 @@ object ClassHierarchy {
                     val classTypes = data(index)
                     data(index) = {
                         if (classTypes eq null)
    -                        new UIDSet1(t)
    +                        UIDSet1(t)
                         else
                             classTypes + t
                     }
    @@ -3243,7 +3242,7 @@ object ClassHierarchy {
                             val supertypeId = supertype.id
                             supertypes(supertypeId) match {
                                 case null =>
    -                                // It may happen that we we will never have complete information about a
    +                                // It may happen that we will never have complete information about a
                                     // superinterface type, because we have an incomplete project OR
                                     // that the class hierarchy is totally broken in the sense that
                                     // the super interface types are actually class types.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/Code.scala b/OPAL/br/src/main/scala/org/opalj/br/Code.scala
    index 1d822dcd96..d5e2a99862 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/Code.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/Code.scala
    @@ -4,7 +4,6 @@ package br
     
     import scala.annotation.switch
     import scala.annotation.tailrec
    -import scala.reflect.ClassTag
     
     import java.util.Arrays.fill
     import scala.collection.AbstractIterator
    @@ -42,7 +41,7 @@ import org.opalj.util.AnyToAnyThis
      *          code array is not completely filled (it contains `null` values) the
      *          preferred way to iterate over all instructions is to use for-comprehensions
      *          and pattern matching or to use one of the predefined methods [[foreach]],
    - *          [[collect]], [[collectPair]], [[collectWithIndex]], etc..
    + *          [[collect]], [[collectPair]], [[collectWithIndex]], etc.
      *          The `instructions` array must not be mutated!
      *
      * @author Michael Eichberg
    @@ -402,7 +401,7 @@ final class Code private (
          *
          * Note, that in case of completely broken code, set 2 may contain other
          * instructions than `return` and `athrow` instructions.
    -     * If the code contains jsr/ret instructions, the full blown CFG is computed.
    +     * If the code contains jsr/ret instructions, the full-blown CFG is computed.
          */
         def predecessorPCs(implicit classHierarchy: ClassHierarchy): (Array[PCs], PCs, PCs) = {
             implicit val code: Code = this
    @@ -450,7 +449,7 @@ final class Code private (
                         } else {
                             // This handles cases where we have totally broken code; e.g.,
                             // compile-time dead code at the end of the method where the
    -                        // very last instruction is not even a ret/jsr/goto/return/atrow
    +                        // very last instruction is not even a ret/jsr/goto/return/athrow
                             // instruction (e.g., a NOP instruction as in case of jPython
                             // related classes.)
                             exitPCs +!= pc
    @@ -705,7 +704,7 @@ final class Code private (
         /**
          * Returns a view of all handlers (exception and finally handlers) for the
          * instruction with the given program counter (`pc`) that may catch an exception; as soon
    -     * as a finally handler is found no further handlers will be returned!
    +     * as a finally-handler is found no further handlers will be returned!
          *
          * In case of multiple exception handlers that are identical (in particular
          * in case of the finally handlers) only the first one is returned as that
    @@ -744,7 +743,7 @@ final class Code private (
     
         /**
          * Returns a view of all potential exception handlers (if any) for the
    -     * instruction with the given program counter (`pc`). `Finally` handlers
    +     * instruction with the given program counter (`pc`). `Finally`-handlers
          * (`catchType == None`) are not returned but will stop the evaluation (as all further
          * exception handlers have no further meaning w.r.t. the runtime)!
          * In case of identical caught exceptions only the
    @@ -781,7 +780,7 @@ final class Code private (
                         val isSubtype = isASubtypeOf(exception, catchType)
                         if (isSubtype.isYes) {
                             ehs += eh
    -                        /* we found a definitiv matching handler*/
    +                        /* we found a definitively matching handler*/
                             false
                         } else if (isSubtype.isUnknown) {
                             if (!handledExceptions.contains(catchType)) {
    @@ -796,7 +795,7 @@ final class Code private (
                         }
                     } else {
                         ehs += eh
    -                    /* we are done; we found a finally handler... */
    +                    /* we are done; we found a finally-handler... */
                         false
                     }
                 } else {
    @@ -1004,7 +1003,7 @@ final class Code private (
         /**
          * Computes the set of PCs for which a stack map frame is required. Calling this method
          * (i.e., the generation of stack map tables in general) is only defined for Java > 5 code;
    -     * i.e., cocde which does not use JSR/RET; therefore the behavior for Java 5 or earlier code
    +     * i.e., code which does not use JSR/RET; therefore the behavior for Java 5 or earlier code
          * is deliberately undefined.
          *
          * @param classHierarchy The computation of the stack map table generally requires the
    @@ -1370,7 +1369,7 @@ final class Code private (
          *
          * @param  pc           The program counter of an instruction that strictly dominates all
          *                      succeeding instructions up until the next instruction (as determined
    -     *                      by [[#cfJoins]] where two or more paths join. If the pc belongs to an instruction
    +     *                      by [[#cfJoins]]) where two or more paths join. If the pc belongs to an instruction
          *                      where multiple paths join, `false` will be returned.
          *
          * @param  anInvocation When the analysis finds a method call, it calls this method
    @@ -1671,12 +1670,12 @@ object Code {
     
             var localVariableTablesCount = 0
             var lineNumberTablesCount = 0
    -        attributes foreach { a =>
    -            if (a.isInstanceOf[LocalVariableTable]) {
    +        attributes foreach {
    +            case _: LocalVariableTable =>
                     localVariableTablesCount += 1
    -            } else if (a.isInstanceOf[UnpackedLineNumberTable]) {
    +            case _: UnpackedLineNumberTable =>
                     lineNumberTablesCount += 1
    -            }
    +            case _ =>
             }
     
             if (localVariableTablesCount <= 1 && lineNumberTablesCount <= 1) {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/CommonAttributes.scala b/OPAL/br/src/main/scala/org/opalj/br/CommonAttributes.scala
    index c7f865e7ed..82a91518bb 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/CommonAttributes.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/CommonAttributes.scala
    @@ -53,7 +53,7 @@ trait CommonAttributes {
             }
             // Recall that some attributes may be defined multiple times and therefore an easy
             // approach to get a stable sorting is not available.
    -        // (We have not seen any case of multiple occurences of an attribute in practice so far.)
    +        // (We have not seen any case of multiple occurrences of an attribute in practice so far.)
             thisAttributes.find { a => !otherAttributes.exists(o => a.similar(o, config)) } map { missingAttribute =>
                 val message = "missing attribute: " + missingAttribute
                 break(Some((message, thisAttributes, otherAttributes)));
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/ConstantFieldValue.scala b/OPAL/br/src/main/scala/org/opalj/br/ConstantFieldValue.scala
    index 66d40d195b..a315f33338 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/ConstantFieldValue.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/ConstantFieldValue.scala
    @@ -147,7 +147,7 @@ final case class ConstantString(
     
         override def toUTF8: String = value
     
    -    override def valueToString: String = value.toString
    +    override def valueToString: String = value
     
         override def toJava: String = s""""$valueToString""""
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/ConstantValue.scala b/OPAL/br/src/main/scala/org/opalj/br/ConstantValue.scala
    index d9854e106e..e10acdc170 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/ConstantValue.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/ConstantValue.scala
    @@ -33,52 +33,52 @@ trait ConstantValue[T >: Nothing] extends BootstrapArgument {
         private def className: String = this.getClass.getSimpleName
     
         def toBoolean: Boolean =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a boolean value"
             )
     
         def toByte: Byte =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a byte value"
             )
     
         def toChar: Char =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to an char value"
             )
     
         def toShort: Short =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a short value"
             )
     
         def toInt: Int =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to an int value"
             )
     
         def toLong: Long =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a long value"
             )
     
         def toFloat: Float =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a float value"
             )
     
         def toDouble: Double =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a double value"
             )
     
         def toUTF8: String =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a String(UTF8) value"
             )
     
         def toReferenceType: ReferenceType =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 className + " cannot be converted to a reference type"
             )
     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/DynamicConstant.scala b/OPAL/br/src/main/scala/org/opalj/br/DynamicConstant.scala
    index bb7da58428..470547513a 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/DynamicConstant.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/DynamicConstant.scala
    @@ -2,6 +2,8 @@
     package org.opalj
     package br
     
    +import scala.compiletime.uninitialized
    +
     import org.opalj.bytecode.BytecodeProcessingFailedException
     
     /**
    @@ -14,7 +16,7 @@ final class DynamicConstant(
         val descriptor:       FieldType,
         private val bsmIndex: Int
     ) extends ConstantValue[Any] {
    -    private var bsm: BootstrapMethod = null
    +    private var bsm: BootstrapMethod = uninitialized
     
         def fillInBootstrapMethod(bootstrapMethods: BootstrapMethods): Unit = {
             if (bsm eq null) bsm = bootstrapMethods(bsmIndex)
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/ElementValue.scala b/OPAL/br/src/main/scala/org/opalj/br/ElementValue.scala
    index c7d6f79afd..a97dafddbe 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/ElementValue.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/ElementValue.scala
    @@ -4,7 +4,7 @@ package br
     
     /**
      * An element value represents an annotation's value or an
    - * annonation's default value; depending on the context in
    + * annotation's default value; depending on the context in
      * which it is used.
      *
      * @author Michael Eichberg
    @@ -191,7 +191,7 @@ case class StringValue(value: String) extends ElementValue {
     
         override final def valueType: ClassType = ClassType.String
     
    -    override def toJava: String = "\"" + value.toString + "\""
    +    override def toJava: String = "\"" + value + "\""
     
         override def kindId: Int = StringValue.KindId
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/ExceptionHandler.scala b/OPAL/br/src/main/scala/org/opalj/br/ExceptionHandler.scala
    index 55d30ab242..841f340bb9 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/ExceptionHandler.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/ExceptionHandler.scala
    @@ -10,7 +10,7 @@ package br
      * @param  endPC An index into the code array that points to the instruction after the
      *         "try-block" (exclusive).
      * @param  handlerPC Points to the first instruction of the exception handler.
    - * @param  catchType The type of the exception that is catched. `None` in case of
    + * @param  catchType The type of the exception that is caught. `None` in case of
      *         a finally block.
      *
      * @author Michael Eichberg
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/Field.scala b/OPAL/br/src/main/scala/org/opalj/br/Field.scala
    index 5f007488cf..6b98fd974b 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/Field.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/Field.scala
    @@ -3,7 +3,6 @@ package org.opalj
     package br
     
     import scala.collection.immutable.ArraySeq
    -import scala.math.Ordered
     
     import org.opalj.bi.ACC_PUBLIC
     import org.opalj.bi.ACC_TRANSIENT
    @@ -57,9 +56,9 @@ sealed abstract class JVMField extends ClassMember with Ordered[JVMField] {
          */
         def attributes: Attributes
     
    -    // This method is only to be called by ..br.ClassFile to associate this method
    +    // This method is only to be called by br.ClassFile to associate this method
         // with the respective class file.
    -    private[br] def prepareClassFileAttachement(): Field = {
    +    private[br] def prepareClassFileAttachment(): Field = {
             new Field(
                 null /*will be set by class file*/,
                 accessFlags,
    @@ -150,7 +149,7 @@ sealed abstract class JVMField extends ClassMember with Ordered[JVMField] {
         //
         //
     
    -    override def toString(): String = {
    +    override def toString: String = {
             import AccessFlagsContexts.FIELD
             val jAccessFlags = AccessFlags.toStrings(accessFlags, FIELD).mkString(" ")
             val jDescriptor = fieldType.toJava + " " + name
    @@ -162,7 +161,7 @@ sealed abstract class JVMField extends ClassMember with Ordered[JVMField] {
                 }
     
             if (attributes.nonEmpty) {
    -            field + attributes.map(_.getClass().getSimpleName()).mkString("«", ", ", "»")
    +            field + attributes.map(_.getClass.getSimpleName()).mkString("«", ", ", "»")
             } else {
                 field
             }
    @@ -206,8 +205,8 @@ final class Field private[br] (
             s"${declaringClassFile.thisType.toJava}{ ${signatureToJava(true)} $message }"
         }
     
    -    override def toString(): String = {
    -        super.toString() + " // in " + declaringClassFile.thisType.toJava
    +    override def toString: String = {
    +        super.toString + " // in " + declaringClassFile.thisType.toJava
         }
     }
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/InnerClassTable.scala b/OPAL/br/src/main/scala/org/opalj/br/InnerClassTable.scala
    index a80ecc64ac..910d90b3f3 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/InnerClassTable.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/InnerClassTable.scala
    @@ -42,7 +42,7 @@ case class InnerClass(
         innerClassAccessFlags: Int
     ) {
     
    -    override def toString(): String = {
    +    override def toString: String = {
             "InnerClass" +
                 "(type=" + innerClassType.toJava +
                 ",outerType=" + outerClassType.map(_.toJava) +
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/Method.scala b/OPAL/br/src/main/scala/org/opalj/br/Method.scala
    index 48bed4f6a0..c6ec150a3a 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/Method.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/Method.scala
    @@ -76,9 +76,9 @@ sealed abstract class JVMMethod
          */
         def attributes: Attributes
     
    -    // This method is only to be called by ..br.ClassFile to associate this method
    +    // This method is only to be called by br.ClassFile to associate this method
         // with the respective class file.
    -    private[br] def prepareClassFileAttachement(): Method = {
    +    private[br] def prepareClassFileAttachment(): Method = {
             new Method(
                 null /*will be set by class file*/,
                 accessFlags,
    @@ -201,7 +201,7 @@ sealed abstract class JVMMethod
             this.hasSignature(name, descriptor, false)
         }
     
    -    def signature: MethodSignature = new MethodSignature(name, descriptor)
    +    def signature: MethodSignature = MethodSignature(name, descriptor)
     
         def runtimeVisibleParameterAnnotations: ParameterAnnotations = {
             attributes.collectFirst { case RuntimeVisibleParameterAnnotationTable(as) => as } match {
    @@ -475,7 +475,7 @@ final class Method private[br] (
         override def asMethod: this.type = this
     
         /**
    -     * @return wether this class is defined as strict. Starting from Java 17, this is true by default.
    +     * @return whether this class is defined as strict. Starting from Java 17, this is true by default.
          *         Strict evaluation of float expressions was also required in Java 1.0 and 1.1.
          */
         override def isStrict: Boolean =
    @@ -521,7 +521,7 @@ object Method {
          * Returns `true` if the method is object serialization related.
          * That is, if the declaring class is `Externalizable` then the methods `readObject` and
          * `writeObject` are unused.
    -     * If the declaring class is '''only''' `Seralizable`, then the write and read
    +     * If the declaring class is '''only''' `Serializable`, then the write and read
          * external methods are not serialization related unless a subclass exists that inherits
          * these two methods and implements the interface `Externalizable`.
          *
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/MethodDescriptor.scala b/OPAL/br/src/main/scala/org/opalj/br/MethodDescriptor.scala
    index 2445857455..6af6108c80 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/MethodDescriptor.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/MethodDescriptor.scala
    @@ -6,7 +6,6 @@ import scala.annotation.switch
     
     import scala.collection.Seq
     import scala.collection.immutable.ArraySeq
    -import scala.math.Ordered
     
     /**
      * A method descriptor represents the parameters that the method takes and
    @@ -434,8 +433,8 @@ object SingleArgumentMethodDescriptor {
     object TheArgument {
     
         /**
    -     * Returns `Some(FieldType)` of the first paramter type if the given method
    -     * descriptor just defines a single paramter.
    +     * Returns `Some(FieldType)` of the first parameter type if the given method
    +     * descriptor just defines a single parameter.
          *
          * @author Michael Eichberg
          */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/PCAndInstruction.scala b/OPAL/br/src/main/scala/org/opalj/br/PCAndInstruction.scala
    index e8c54f00ab..a30771b245 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/PCAndInstruction.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/PCAndInstruction.scala
    @@ -8,7 +8,7 @@ import org.opalj.br.instructions.Instruction
      * An efficient (i.e., no (un)boxing...) representation of an instruction and its pc.
      *
      * @param pc The program counter of an instruction.
    - * @param i The instruction with the respective program counter.
    + * @param instruction The instruction with the respective program counter.
      * @author Michael Eichberg
      */
     /* no case class */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/SimilarityTestConfiguration.scala b/OPAL/br/src/main/scala/org/opalj/br/SimilarityTestConfiguration.scala
    index 931b6bf068..af9c0e539b 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/SimilarityTestConfiguration.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/SimilarityTestConfiguration.scala
    @@ -10,7 +10,7 @@ package br
     abstract class SimilarityTestConfiguration {
     
         /**
    -     * Selects those fields which should be compared. By default all fields are selected.
    +     * Selects those fields which should be compared. By default, all fields are selected.
          */
         def compareFields(
             leftContext: ClassFile,
    @@ -19,7 +19,7 @@ abstract class SimilarityTestConfiguration {
         ): (Iterable[JVMField], Iterable[JVMField])
     
         /**
    -     * Selects those methods which should be compared. By default all methods are selected.
    +     * Selects those methods which should be compared. By default, all methods are selected.
          *
          * If, e.g., the `left` methods belong to the class which is derived from the `right` one
          * and should contain all methods except of the default constructor, then the default
    @@ -67,7 +67,7 @@ class CompareAllConfiguration extends SimilarityTestConfiguration {
         }
     
         /**
    -     * Selects the attributes which should be compared. By default all attributes except
    +     * Selects the attributes which should be compared. By default, all attributes except
          * of unknown ones are selected.
          */
         override def compareAttributes(
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/StackMapFrame.scala b/OPAL/br/src/main/scala/org/opalj/br/StackMapFrame.scala
    index 0f07aa1a4f..5be125caf0 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/StackMapFrame.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/StackMapFrame.scala
    @@ -54,9 +54,9 @@ object ChopFrame {
     
         def apply(frameType: Int, offsetDelta: Int): ChopFrame = {
             frameType match {
    -            case 248 => new ChopFrame248(offsetDelta)
    -            case 249 => new ChopFrame249(offsetDelta)
    -            case 250 => new ChopFrame250(offsetDelta)
    +            case 248 => ChopFrame248(offsetDelta)
    +            case 249 => ChopFrame249(offsetDelta)
    +            case 250 => ChopFrame250(offsetDelta)
             }
         }
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/StructureIdentifier.scala b/OPAL/br/src/main/scala/org/opalj/br/StructureIdentifier.scala
    index f8a6675df9..56956b5f83 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/StructureIdentifier.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/StructureIdentifier.scala
    @@ -13,7 +13,7 @@ package br
     trait StructureIdentifier {
     
         /**
    -     * Returns a compact, human readable representation of this structure element.
    +     * Returns a compact, human-readable representation of this structure element.
          * This representation is not guaranteed to return a unique representation.
          * However, it should be precise enough to enable developers (with some
          * additional context information) to precisely identify the structure element.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/Type.scala b/OPAL/br/src/main/scala/org/opalj/br/Type.scala
    index 64c89db667..6884b870ae 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/Type.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/Type.scala
    @@ -10,6 +10,7 @@ import java.util.WeakHashMap
     import java.util.concurrent.atomic.AtomicInteger
     import java.util.concurrent.locks.ReentrantReadWriteLock
     import scala.collection.SortedSet
    +import scala.compiletime.uninitialized
     import scala.math.Ordered
     
     import org.opalj.collection.UIDValue
    @@ -510,10 +511,10 @@ sealed abstract class NumericType protected () extends BaseType {
          * superset of the range of values captured by values of type `targetType`. Here,
          * strict superset means that – except of rounding issues – the value is conceptually
          * representable by `this` type. For example, a conversion from a `long` value to a
    -     * `double` value may loose some precision related to the least significant bits,
    +     * `double` value may lose some precision related to the least significant bits,
          * but the value is still representable.
          *
    -     * In general, the result of `isWiderThan` is comparable to the result of determing
    +     * In general, the result of `isWiderThan` is comparable to the result of determining
          * if a conversion of a value of this type to the given type is an explicit/implicit
          * widening conversion.
          *
    @@ -999,7 +1000,7 @@ final class ClassType private ( // DO NOT MAKE THIS A CASE CLASS!
     
         override def toJVMTypeName: String = s"L$fqn;"
     
    -    override def toJavaClass: java.lang.Class[?] = classOf[Type].getClassLoader().loadClass(toJava)
    +    override def toJavaClass: java.lang.Class[?] = classOf[Type].getClassLoader.loadClass(toJava)
     
         def unboxValue[T](implicit typeConversionFactory: TypeConversionFactory[T]): T = {
             ClassType.unboxValue(this)
    @@ -1103,7 +1104,7 @@ object ClassType {
                 // Refill the cache using the classTypes array
                 classTypes.foreach { ct => cache.put(ct.fqn, new WeakReference[ClassType](ct)) }
     
    -            // Reset ID counter to highest id in the cache
    +            // Reset ID counter to the highest id in the cache
                 nextId.set(highestPredefinedTypeId + 1)
             } finally {
                 writeLock.unlock()
    @@ -1115,7 +1116,7 @@ object ClassType {
         private val cacheRWLock = new ReentrantReadWriteLock();
         private val cache = new WeakHashMap[String, WeakReference[ClassType]]()
     
    -    @volatile private var classTypeCreationListener: ClassType => Unit = null
    +    @volatile private var classTypeCreationListener: ClassType => Unit = uninitialized
     
         /**
          * Sets the listener and immediately calls it (multiple times) to inform the listener
    @@ -1231,7 +1232,7 @@ object ClassType {
     
         // THE FOLLOWING CLASS TYPES ARE PREDEFINED BECAUSE OF
         // THEIR PERVASIVE USAGE AND THEIR EXPLICIT MENTIONING IN THE
    -    // THE JVM SPEC. OR THEIR IMPORTANCE FOR THE RUNTIME ENVIRONMENT
    +    // JVM SPEC. OR THEIR IMPORTANCE FOR THE RUNTIME ENVIRONMENT
         final val Object = ClassType("java/lang/Object")
         final val ObjectId = 0
         require(Object.id == ObjectId)
    @@ -1484,7 +1485,7 @@ object ClassType {
      * type. If, starting from any array type, one considers its component type, and then
      * (if that is also an array type) the component type of that type, and so on, eventually
      * one must reach a component type that is not an array type; this is called the '''element
    - * type of the array type'''. The element type of an array type is necessarily either a
    + * type of the array type'''. The element-type of an array type is necessarily either a
      * primitive type, or a class type, or an interface type.
      *
      * @author Michael Eichberg
    @@ -1501,7 +1502,7 @@ final class ArrayType private ( // DO NOT MAKE THIS A CASE CLASS!
         override def mostPreciseClassType: ClassType = ClassType.Object
     
         /**
    -     * Returns this array type's element type. E.g., the element type of an
    +     * Returns this array type's element-type. E.g., the element-type of an
          * array of arrays of arrays of `int` is `int`.
          */
         def elementType: FieldType = {
    @@ -1691,7 +1692,7 @@ object ArrayType {
     }
     
     /**
    - * Facilitates matching against an array's element type.
    + * Facilitates matching against an array's element-type.
      *
      * @author Michael Eichberg
      */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/TypeAnnotation.scala b/OPAL/br/src/main/scala/org/opalj/br/TypeAnnotation.scala
    index ffdac38919..175995fcc9 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/TypeAnnotation.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/TypeAnnotation.scala
    @@ -32,7 +32,7 @@ sealed abstract class TypeAnnotationTargetInFieldDeclaration extends TypeAnnotat
         override final def remapPCs(codeSize: Int, f: PC => PC): Some[TypeAnnotationTarget] = Some(this)
     }
     
    -sealed abstract class TypeAnnotationTargetInMetodDeclaration extends TypeAnnotationTarget {
    +sealed abstract class TypeAnnotationTargetInMethodDeclaration extends TypeAnnotationTarget {
         override final def remapPCs(codeSize: Int, f: PC => PC): Some[TypeAnnotationTarget] = Some(this)
     }
     
    @@ -54,7 +54,7 @@ sealed abstract class TypeAnnotationPathElement {
          * A value in the range [0..3] which identifies the `path kind` as specified by the JVM
          * specification.
          *
    -     * @note This enables efficient identificaion – e.g., in a switch – of the type path kind.
    +     * @note This enables efficient identification – e.g., in a switch – of the type path kind.
          */
         def kindId: Int
     }
    @@ -99,7 +99,7 @@ case class TAOfParameterDeclarationOfClassOrInterface(
     
     case class TAOfParameterDeclarationOfMethodOrConstructor(
         type_parameter_index: Int
    -) extends TypeAnnotationTargetInMetodDeclaration {
    +) extends TypeAnnotationTargetInMethodDeclaration {
         def typeId: Int = 0x01
     }
     
    @@ -117,7 +117,7 @@ case class TAOfTypeBoundOfParameterDeclarationOfClassOrInterface(
     case class TAOfTypeBoundOfParameterDeclarationOfMethodOrConstructor(
         type_parameter_index: Int,
         bound_index:          Int
    -) extends TypeAnnotationTargetInMetodDeclaration {
    +) extends TypeAnnotationTargetInMethodDeclaration {
         def typeId: Int = 0x12
     }
     
    @@ -125,21 +125,21 @@ case object TAOfFieldDeclaration extends TypeAnnotationTargetInFieldDeclaration
         def typeId: Int = 0x13
     }
     
    -case object TAOfReturnType extends TypeAnnotationTargetInMetodDeclaration {
    +case object TAOfReturnType extends TypeAnnotationTargetInMethodDeclaration {
         def typeId: Int = 0x14
     }
     
    -case object TAOfReceiverType extends TypeAnnotationTargetInMetodDeclaration {
    +case object TAOfReceiverType extends TypeAnnotationTargetInMethodDeclaration {
         def typeId: Int = 0x15
     }
     
     case class TAOfFormalParameter(
         formal_parameter_index: Int
    -) extends TypeAnnotationTargetInMetodDeclaration {
    +) extends TypeAnnotationTargetInMethodDeclaration {
         def typeId: Int = 0x16
     }
     
    -case class TAOfThrows(throws_type_index: Int) extends TypeAnnotationTargetInMetodDeclaration {
    +case class TAOfThrows(throws_type_index: Int) extends TypeAnnotationTargetInMethodDeclaration {
         def typeId: Int = 0x17
     }
     
    @@ -210,7 +210,7 @@ case class TAOfInstanceOf(offset: Int) extends TypeAnnotationTargetInCode {
         override def remapPCs(codeSize: Int, f: PC => PC): Option[TAOfInstanceOf] = {
             val newOffset = f(offset)
             if (newOffset < codeSize)
    -            Some(new TAOfInstanceOf(newOffset))
    +            Some(TAOfInstanceOf(newOffset))
             else
                 None
         }
    @@ -223,7 +223,7 @@ case class TAOfNew(offset: Int) extends TypeAnnotationTargetInCode {
         override def remapPCs(codeSize: Int, f: PC => PC): Option[TAOfNew] = {
             val newOffset = f(offset)
             if (newOffset < codeSize)
    -            Some(new TAOfNew(newOffset))
    +            Some(TAOfNew(newOffset))
             else
                 None
         }
    @@ -236,7 +236,7 @@ case class TAOfMethodReferenceExpressionNew(offset: Int) extends TypeAnnotationT
         override def remapPCs(codeSize: Int, f: PC => PC): Option[TAOfMethodReferenceExpressionNew] = {
             val newOffset = f(offset)
             if (newOffset < codeSize)
    -            Some(new TAOfMethodReferenceExpressionNew(newOffset))
    +            Some(TAOfMethodReferenceExpressionNew(newOffset))
             else
                 None
         }
    @@ -252,7 +252,7 @@ case class TAOfMethodReferenceExpressionIdentifier(offset: Int) extends TypeAnno
         ): Option[TAOfMethodReferenceExpressionIdentifier] = {
             val newOffset = f(offset)
             if (newOffset < codeSize)
    -            Some(new TAOfMethodReferenceExpressionIdentifier(newOffset))
    +            Some(TAOfMethodReferenceExpressionIdentifier(newOffset))
             else
                 None
         }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/TypeHierarchyInformation.scala b/OPAL/br/src/main/scala/org/opalj/br/TypeHierarchyInformation.scala
    index 4fcf530c9a..9538395890 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/TypeHierarchyInformation.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/TypeHierarchyInformation.scala
    @@ -132,7 +132,7 @@ object SubtypeInformation {
                     override final def iterator: Iterator[ClassType] = classTypes.iterator
                     override final def contains(t: ClassType): Boolean = {
                         val tid = t.id
    -                    // the first three checks are just guard checks..
    +                    // the first three checks are just guard checks...
                         tid != ClassType.ObjectId &&
                             tid < isKnownType.length && isKnownType(tid) && !isInterfaceType(tid) &&
                             classTypes.containsId(tid)
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/UnknownAttribute.scala b/OPAL/br/src/main/scala/org/opalj/br/UnknownAttribute.scala
    index 675623890a..08e0178ebe 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/UnknownAttribute.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/UnknownAttribute.scala
    @@ -19,7 +19,7 @@ case class UnknownAttribute(attributeName: String, info: Array[Byte]) extends At
         }
     
         def similar(other: UnknownAttribute): Boolean = {
    -        this.attributeName.size == other.attributeName.size &&
    +        this.attributeName.length == other.attributeName.length &&
             java.util.Arrays.equals(this.info, other.info)
         }
     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredFieldsKey.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredFieldsKey.scala
    index a978bb0e5d..fbc40ae051 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredFieldsKey.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredFieldsKey.scala
    @@ -3,7 +3,7 @@ package org.opalj
     package br
     package analyses
     
    -import java.util.concurrent.{ConcurrentHashMap => ConcurrentMap}
    +import java.util.concurrent.ConcurrentHashMap as ConcurrentMap
     import java.util.concurrent.atomic.AtomicInteger
     import scala.jdk.CollectionConverters.EnumerationHasAsScala
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredMethods.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredMethods.scala
    index 85b9bfce9b..75fcc9d5cb 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredMethods.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/DeclaredMethods.scala
    @@ -26,7 +26,7 @@ class DeclaredMethods(
         private val p: SomeProject,
         // We need concurrent, mutable maps here, as VirtualDeclaredMethods may be added when they
         // are queried. This can result in DeclaredMethods added for a type not yet seen, too (e.g.
    -    // methods on type Object when not analyzing the JDK.
    +    // methods on type Object when not analyzing the JDK).
         private val data:      ConcurrentHashMap[ReferenceType, ConcurrentHashMap[MethodContext, DeclaredMethod]],
         private var id2method: Array[DeclaredMethod],
         private var idCounter: Int
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/FieldAccessInformation.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/FieldAccessInformation.scala
    index 53f5e51abb..b4ef984295 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/FieldAccessInformation.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/FieldAccessInformation.scala
    @@ -17,7 +17,7 @@ import org.opalj.fpcf.SomeInterimEP
     
     /**
      * Acts as a proxy for the propertyStore, accessing [[FieldReadAccessInformation]] and [[FieldWriteAccessInformation]].
    - * Should be computed outside of any FPCF phases as it cannot handle intermediate values.
    + * Should be computed outside any FPCF phases as it cannot handle intermediate values.
      *
      * @author Maximilian Rüsch
      */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/MethodDeclarationContext.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/MethodDeclarationContext.scala
    index 4a51b84826..a3f8b4ff82 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/MethodDeclarationContext.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/MethodDeclarationContext.scala
    @@ -138,8 +138,8 @@ final class MethodDeclarationContext(val method: Method) extends Ordered[MethodD
     
         /**
          * Returns true if a method with the same signature as this method that is defined in
    -     * the given package directly overrides this encapsultated method. This property
    -     * always holds if this method has public or protected visiblity. If this method
    +     * the given package directly overrides this encapsulated method. This property
    +     * always holds if this method has public or protected visibility. If this method
          * has package visibility, the other (implicit) method has to be defined in
          * this method's package.
          */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/Project.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/Project.scala
    index 61d1ff8f30..135fd05a2f 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/Project.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/Project.scala
    @@ -90,7 +90,7 @@ import org.opalj.util.PerformanceEvaluation.time
      *         context after the project is no longer referenced (garbage collected) is not
      *         possible.
      *
    - * @param classFilesCount The number of classes (including inner and annoymous classes as
    + * @param classFilesCount The number of classes (including inner and anonymous classes as
      *         well as interfaces, annotations, etc.) defined in libraries and in
      *         the analyzed project.
      *
    @@ -279,7 +279,7 @@ class Project[Source] private (
             // in case of partial type hierarchies it may happen that all known
             // supertypes are processed, but no all...
     
    -        // the set of interfaces that are not functional interfaces themselve, but
    +        // the set of interfaces that are not functional interfaces themselves, but
             // which can be extended.
             var irrelevantInterfaces = UIDSet.empty[ClassType]
             val functionalInterfaces = mutable.HashMap.empty[ClassType, MethodSignature]
    @@ -314,7 +314,7 @@ class Project[Source] private (
                     if (!otherInterfaces.contains(subIType)) {
     
                         // only add those types for which we have already derived information for all
    -                    // superinterface types and which are not already classified..
    +                    // superinterface types and which are not already classified
                         if (classHierarchy.superinterfaceTypes(subIType) match {
                                 case Some(superinterfaceTypes) =>
                                     superinterfaceTypes.forall { superSubIType =>
    @@ -572,7 +572,7 @@ class Project[Source] private (
     
         /**
          * Iterates over all methods in parallel; actually, the methods belonging to a specific class
    -     * are analyzed sequentially..
    +     * are analyzed sequentially...
          */
         def parForeachMethod[T](
             isInterrupted: () => Boolean = defaultIsInterrupted
    @@ -621,7 +621,7 @@ class Project[Source] private (
                         // java is not a root package of "javax"...
                         val (_, lastPackage) = rootPackages.last
                         if (nextPackage.startsWith(lastPackage) &&
    -                        nextPackage.charAt(lastPackage.size) == '/'
    +                        nextPackage.charAt(lastPackage.length) == '/'
                         )
                             rootPackages + ((nextPackage, lastPackage))
                         else
    @@ -639,7 +639,7 @@ class Project[Source] private (
     
         /**
          * Distributes all classes which define methods with bodies across a given number of
    -     * groups. Afterwards these groups can, e.g., be processed in parallel.
    +     * groups. Afterward, these groups can, e.g., be processed in parallel.
          */
         def groupedClassFilesWithMethodsWithBody(groupsCount: Int): Array[Buffer[ClassFile]] = {
             var nextGroupId = 0
    @@ -674,7 +674,7 @@ class Project[Source] private (
         /**
          * Returns `true` if the given class file belongs to the library part of the project.
          * This is only the case if the class file was explicitly identified as being
    -     * part of the library. By default all class files are considered to belong to the
    +     * part of the library. By default, all class files are considered to belong to the
          * code base that will be analyzed.
          */
         def isLibraryType(classFile: ClassFile): Boolean = isLibraryType(classFile.thisType)
    @@ -784,7 +784,7 @@ class Project[Source] private (
          *
          * @note This method is intended to be used by Java projects that want to interact with OPAL.
          */
    -    def toJavaMap(): java.util.HashMap[ClassType, ClassFile] = {
    +    def toJavaMap: java.util.HashMap[ClassType, ClassFile] = {
             val map = new java.util.HashMap[ClassType, ClassFile]
             for (classFile <- allClassFiles) map.put(classFile.thisType, classFile)
             map
    @@ -1673,7 +1673,7 @@ object Project {
          *      [Thread Safety] The underlying data structure has to support concurrent access.
          *
          * @param libraryClassFilesAreInterfacesOnly If `true` then only the non-private interface of
    -     *         of the classes belonging to the library was loaded. I.e., this setting just reflects
    +     *         the classes belonging to the library was loaded. I.e., this setting just reflects
          *         the way how the class files were loaded; it does not change the classes!
          *
          * @param virtualClassFiles A list of virtual class files that have no direct
    @@ -1842,7 +1842,7 @@ object Project {
                             logContext,
                             InconsistentProjectException(
                                 s"${projectType.toJava} is defined by multiple class files:\n\t" +
    -                                sources.get(projectType).getOrElse("") + " and\n\t" +
    +                                sources.getOrElse(projectType, "") + " and\n\t" +
                                     source.map(_.toString).getOrElse("") +
                                     "\n\tkeeping the first one."
                             )
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/ProjectLike.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/ProjectLike.scala
    index 562c7afaaa..2c82ac8c0b 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/ProjectLike.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/ProjectLike.scala
    @@ -195,7 +195,7 @@ trait ProjectLike extends ClassFileRepository { project =>
          * class Z extends X implements Y {
          *  // Z inherits m() from X; hence, X.m() (in this context) "overrides" Y.m(), but is not
          *  // returned by this function. To also identify X.m() you have to combine the results
    -     *  // of overridenBy and instanceMethods(!).
    +     *  // of overriddenBy and instanceMethods(!).
          * }
          * }}}
          */
    @@ -234,7 +234,7 @@ trait ProjectLike extends ClassFileRepository { project =>
          * to have the given `classType`, would lead to the direct invocation of the given `method`.
          * The given method can be an inherited method, but it will never return `Yes` if
          * the given method is overridden by `classType` or a supertype of it which is a
    -     * sub type of the declaring type of `method`.
    +     * subtype of the declaring type of `method`.
          *
          * @note    The computation is based on the computed set of [[instanceMethods]] and generally
          *          requires at most O(n log n) steps where n is the number of callable instance
    @@ -327,7 +327,7 @@ trait ProjectLike extends ClassFileRepository { project =>
                         !isSignaturePolymorphic(receiverType, descriptor)
                     ) {
                         // At least in Java 15 the signature polymorphic methods are not overloaded and
    -                    // it actually doesn't make sense to do so. Therefore we decided to only
    +                    // it actually doesn't make sense to do so. Therefore, we decided to only
                         // make this lookup if strictly required.
                         lookupSignaturePolymorphicMethod(SignaturePolymorphicMethodObject) match {
                             case Empty if VarHandleSubtypes.contains(receiverType) =>
    @@ -614,7 +614,7 @@ trait ProjectLike extends ClassFileRepository { project =>
                         }
                     }
     
    -                // [FROM THE SPECIFICATION]]
    +                // [FROM THE SPECIFICATION]
                     // A method is signature polymorphic if all of the following conditions hold :
                     // - It is declared in the java.lang.invoke.MethodHandle class.
                     // - It has a single formal parameter of type Object[].
    @@ -729,7 +729,7 @@ trait ProjectLike extends ClassFileRepository { project =>
         ): Result[Method] = {
             // Recall that the invokestatic instruction:
             // "... gives the name and descriptor of the method as well as a symbolic reference to
    -        // the class or interface in which the method is to be found.
    +        // the class or interface in which the method is to be found."
             // However, in case of interfaces no lookup in superclasses is done!
             if (isInterface) {
                 classFile(declaringClassType) match {
    @@ -776,7 +776,7 @@ trait ProjectLike extends ClassFileRepository { project =>
          * @return  One of the following three values:
          *           - [[org.opalj.Success]] `(method)` if the method was found;
          *           - `Failure` if the project is inconsistent; i.e., the target class file is found,
    -     *             but the method cannot be found. `Failure` is returned on a best effort basis.
    +     *             but the method cannot be found. `Failure` is returned on a best-effort basis.
          *           - `Empty`.
          */
         def specialCall(
    @@ -990,7 +990,7 @@ trait ProjectLike extends ClassFileRepository { project =>
                             methods ++=
                                 overriddenBy(mdc.method).iterator.filter { m => m.classFile.thisType.isSubtypeOf(subtype) }
     
    -                    // for interfaces we have to continue, because we may have inherited a
    +                    // for interfaces, we have to continue, because we may have inherited
                         // a concrete method from a class type which is not in the set of
                         // overriddenBy methods
                         subtypeCF.isInterfaceDeclaration
    @@ -1073,7 +1073,7 @@ trait ProjectLike extends ClassFileRepository { project =>
                             && !mdcOption.get.method.isPrivate
                         ) {
                             methods ++= overriddenBy(mdcOption.get.method)
    -                        false // we don't have to look into furthersubtypes
    +                        false // we don't have to look into further subtypes
                         } else {
                             true
                         }
    @@ -1130,7 +1130,7 @@ trait ProjectLike extends ClassFileRepository { project =>
                         } else {
                             methods ++= overriddenBy(mdc.method)
                         }
    -                    false // we don't have to look into furthersubtypes
    +                    false // we don't have to look into further subtypes
                     case _ /*None*/ =>
                         true
                 }
    @@ -1219,7 +1219,7 @@ object ProjectLike {
          * and descriptor
          *
          * @note    This method requires that the class hierarchy is already computed.
    -     *          It does not required `instanceMethods`.
    +     *          It does not require `instanceMethods`.
          * @param   superinterfaceTypes A set of interfaces which potentially declare a method
          *          with the given name and descriptor.
          */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/ReportableAnalysisResult.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/ReportableAnalysisResult.scala
    index d7f1c7d13d..89c1fb6444 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/ReportableAnalysisResult.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/ReportableAnalysisResult.scala
    @@ -28,7 +28,7 @@ trait ReportableAnalysisResult {
          *
          * If the real filename is not available, use the fully qualified name of the class
          * in binary notation (i.e., using "/" to separate the package qualifiers)
    -     * with the suffice ".class" appended.
    +     * with the suffix ".class" appended.
          *
          * Note that the space after the location information is required.
          *
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/VirtualFormalParameter.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/VirtualFormalParameter.scala
    index 63074487d6..da8152e1a6 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/VirtualFormalParameter.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/VirtualFormalParameter.scala
    @@ -10,7 +10,7 @@ package analyses
      * The first parameter explicitly defined by the method will have the origin `-2`, the second one
      * will have the origin `-3` and so on.
      * That is, the origin of an explicitly declared parameter is always `-(parameter_index + 2)`.
    - * The origin of the `this` parameter is `-1`.
    + * The origin of the this-parameter is `-1`.
      *
      * @note The computational type category of the parameters is ignored to ease the mapping.
      *
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/CallBySignatureKey.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/CallBySignatureKey.scala
    index 665796ca9a..3d1699974e 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/CallBySignatureKey.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/CallBySignatureKey.scala
    @@ -15,8 +15,6 @@ import scala.collection.mutable.ListBuffer
      * @note To get call-by-signature information use the [[org.opalj.br.analyses.Project]]'s `get`
      * method and pass in `this` object.
      *
    - * @see [[CallBySignatureResolution]] for further information.
    - *
      * @author Michael Reif
      */
     object CallBySignatureKey extends ProjectInformationKey[CallBySignatureTargets, Nothing] {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClassExtensibility.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClassExtensibility.scala
    index 9f99c2a76a..9d26844e8b 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClassExtensibility.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClassExtensibility.scala
    @@ -100,7 +100,7 @@ abstract class AbstractClassExtensibility extends ClassExtensibility {
                         Yes
                     else if (isClosedPackage(classType.packageName))
                         No
    -                else // => non public class in an open package...
    +                else // => non-public class in an open package...
                         Yes
                 }
                 r(classType.id) = isExtensible
    @@ -156,7 +156,7 @@ class ConfiguredExtensibleClasses(val project: SomeProject) extends AbstractClas
      * `[[ClassExtensibilityKey.ConfigKeyPrefix]] + finalClasses`
      *
      * @example The following example configuration would consider `java/util/Math` and
    - *          `com/exmaple/Type` as ''not extensible''.
    + *          `com/example/Type` as ''not extensible''.
      *          {{{
      *          org.opalj.br.analyses.cg.ClassExtensibilityKey.finalClasses =
      *              ["java/util/Math", "com/example/Type"]
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackages.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackages.scala
    index 18082256b7..fe7d4995cf 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackages.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackages.scala
    @@ -50,11 +50,11 @@ abstract class ClosedPackages extends (String => Boolean) {
     }
     
     /**
    - * Treats all packages as being closed. This analysis is useable, e.g., for simple applications
    + * Treats all packages as being closed. This analysis is usable, e.g., for simple applications
      * which have no concept of plug-ins or a similar mechanism.
      * In this case every package is supposed to be closed since the entire code base
      * is available at analysis time.
    - * Generally, not useable for libraries/frameworks/code which can be "freely" extended.
    + * Generally, not usable for libraries/frameworks/code which can be "freely" extended.
      *
      * To use this analysis set the config key:
      *  `org.opalj.br.analyses.cg.ClosedPackagesKey.analysis`
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackagesKey.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackagesKey.scala
    index c286532724..b41d150e32 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackagesKey.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/ClosedPackagesKey.scala
    @@ -14,7 +14,7 @@ import net.ceedubs.ficus.Ficus.*
      *
      * This ''key'' reflectively instantiates the analysis that determines whether a package is closed
      * or not. The respective analysis has to extend the abstract [[ClosedPackages]] class.
    - * To configure which analysis is used use the key
    + * To configure which analysis is used, use the key
      * `org.opalj.br.analyses.cg.ClosedPackagesKey.analysis` to specify the name of the class which
      * implements the analysis.
      *
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala
    index 3d2ae20d5b..650faf87ad 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/EntryPointFinder.scala
    @@ -10,7 +10,7 @@ import org.opalj.log.OPALLogger
     import net.ceedubs.ficus.Ficus.*
     
     /**
    - * The EntryPointFinder trait is a common trait for all analyses that can derive an programs entry
    + * The EntryPointFinder trait is a common trait for all analyses that can derive a program's entry
      * points. The concrete entry point finder that is used to determines a programs entry points directly
      * impacts the computation of a programs call graph.
      *
    @@ -243,7 +243,7 @@ trait LibraryEntryPointsFinder extends EntryPointFinder {
      *  }}}
      *
      * Please note that the first entry point, by adding the "+" to the declaring class' name, considers
    - * all "add" methods from all subtypes independently from the respective method's descriptor. In
    + * all "add" methods from all subtypes independently of the respective method's descriptor. In
      * contrast, the second entry does specify a descriptor and does not consider List's subtypes (by
      * not suffixing a plus to the declaringClass) which implies that only the remove method with this
      * descriptor is considered as entry point.
    @@ -296,7 +296,7 @@ trait ConfigurationEntryPointsFinder extends EntryPointFinder {
     
                 val considerSubtypes = configuredType.endsWith("+")
                 val typeName = if (considerSubtypes) {
    -                configuredType.substring(0, configuredType.size - 1)
    +                configuredType.substring(0, configuredType.length - 1)
                 } else {
                     configuredType
                 }
    @@ -309,7 +309,7 @@ trait ConfigurationEntryPointsFinder extends EntryPointFinder {
                         case _: IllegalArgumentException =>
                             OPALLogger.warn(
                                 "project configuration",
    -                            s"illegal method descriptor: $typeName { $name or ${md}}"
    +                            s"illegal method descriptor: $typeName { $name or $md}"
                             )
                             None
                     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InitialEntryPointsKey.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InitialEntryPointsKey.scala
    index 9c29b1ccd2..5b7c7ef631 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InitialEntryPointsKey.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InitialEntryPointsKey.scala
    @@ -9,16 +9,15 @@ import org.opalj.util.getObjectReflectively
     import net.ceedubs.ficus.Ficus.*
     
     /**
    - * The ''key'' object to get a traversable of entry points. Entry points are particularly relevant
    + * The ''key'' object to get an Iterable of entry points. Entry points are particularly relevant
      * to construct call graphs.
      * See [[InitialEntryPointsKey]] for further details.
      *
      * This ''key'' reflectively instantiates the analysis that determines the program's entry points.
      * The respective analysis has to extend the trait [[InitialEntryPointsKey]] class.
      *
    - * To configure which analysis is used use the key
    - * `org.opalj.br.analyses.cg.InitialEntryPointKey.analysis` to specify the name of the class which
    - * implements the analysis.
    + * To configure which analysis is used, use the key `org.opalj.br.analyses.cg.InitialEntryPointKey.analysis`
    + * to specify the name of the class which implements the analysis.
      *
      * @example
      *      {{{
    @@ -41,7 +40,7 @@ object InitialEntryPointsKey extends ProjectInformationKey[Iterable[DeclaredMeth
     
         /**
          * The [[InitialEntryPointsKey]] depends on three other keys and queries information about closed
    -     * packages, must answer the question whether a method can be overridden by unknown code, and
    +     * packages, must answer whether a method can be overridden by unknown code, and
          * performs checks whether types are extensible or not. Additionally, required keys from the configured
          * EntryPointFinder are added.
          *
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InstantiatedTypesFinder.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InstantiatedTypesFinder.scala
    index 79e1b79694..49f735c9b9 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InstantiatedTypesFinder.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/InstantiatedTypesFinder.scala
    @@ -119,7 +119,7 @@ trait ConfigurationInstantiatedTypesFinder extends InstantiatedTypesFinder {
             configInstantiatedTypes foreach { configuredType =>
                 val considerSubtypes = configuredType.endsWith("+")
                 val typeName = if (considerSubtypes) {
    -                configuredType.substring(0, configuredType.size - 1)
    +                configuredType.substring(0, configuredType.length - 1)
                 } else {
                     configuredType
                 }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/IsOverridableMethodAnalysis.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/IsOverridableMethodAnalysis.scala
    index 641a429e2a..b1827869ef 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/IsOverridableMethodAnalysis.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/IsOverridableMethodAnalysis.scala
    @@ -44,7 +44,7 @@ private[analyses] class IsOverridableMethodAnalysis(
             val worklist = mutable.Queue.empty[ClassType]
     
             def addDirectSubclasses(ct: ClassType): Unit = {
    -            classHierarchy.directSubclassesOf(ct).foreach(worklist.enqueue(_))
    +            classHierarchy.directSubclassesOf(ct).foreach(worklist.enqueue)
             }
     
             while (worklist.nonEmpty) {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityAnalysis.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityAnalysis.scala
    index 6247086255..7dfa16e39d 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityAnalysis.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityAnalysis.scala
    @@ -48,24 +48,24 @@ class TypeExtensibilityAnalysis(val project: SomeProject) extends (ClassType =>
                 val thisSubtypeExtensibility = subtypeExtensibility(cid)
                 if (thisSubtypeExtensibility eq null) No else thisSubtypeExtensibility
             }
    -        val thisTypeExtensbility = isClassExtensible(classType) match {
    +        val thisTypeExtensibility = isClassExtensible(classType) match {
                 case Yes     => Yes
                 case Unknown => if (thisSubtypeExtensibility.isYes) Yes else Unknown
                 case No      => thisSubtypeExtensibility
             }
    -        typeExtensibility(cid) = thisTypeExtensbility
    +        typeExtensibility(cid) = thisTypeExtensibility
             var update = false
             foreachDirectSupertype(classType) { st =>
                 val scid = st.id
                 subtypeExtensibility(scid) match {
                     case null | No => {
    -                    update = subtypeExtensibility(scid) ne thisTypeExtensbility
    -                    subtypeExtensibility(scid) = thisTypeExtensbility
    +                    update = subtypeExtensibility(scid) ne thisTypeExtensibility
    +                    subtypeExtensibility(scid) = thisTypeExtensibility
                     }
                     case Yes     => // do nothing
                     case Unknown => {
    -                    update = subtypeExtensibility(scid) ne thisTypeExtensbility
    -                    if (thisTypeExtensbility.isYes) subtypeExtensibility(scid) = Yes
    +                    update = subtypeExtensibility(scid) ne thisTypeExtensibility
    +                    if (thisTypeExtensibility.isYes) subtypeExtensibility(scid) = Yes
                     }
                 }
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityKey.scala b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityKey.scala
    index db1e631e14..3e4a8fb839 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityKey.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/analyses/cg/TypeExtensibilityKey.scala
    @@ -5,7 +5,7 @@ package analyses
     package cg
     
     /**
    - * '''Key'' to get the function that determines whether a type (i.e., we abstract over a class/
    + * '''Key''' to get the function that determines whether a type (i.e., we abstract over a class/
      * interface and all its subtypes) is extensible or not.
      * A type is extensible if a developer could define a sub(*)type that is not part of the given
      * application/library.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cfg/BasicBlock.scala b/OPAL/br/src/main/scala/org/opalj/br/cfg/BasicBlock.scala
    index 3aa5932f42..c796e82c50 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cfg/BasicBlock.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cfg/BasicBlock.scala
    @@ -92,7 +92,7 @@ final class BasicBlock(
          * pcs - of a basic block.
          *
          * @param     f The function that will be called.
    -     * @param     code The [[org.opalj.br.Code]]` object to which this `BasicBlock` implicitly
    +     * @param     code The [[org.opalj.br.Code]] object to which this `BasicBlock` implicitly
          *             belongs.
          */
         def foreach[U](f: Int => U)(implicit code: Code): Unit = {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cfg/CFG.scala b/OPAL/br/src/main/scala/org/opalj/br/cfg/CFG.scala
    index a71f43e524..f6a4ba19b8 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cfg/CFG.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cfg/CFG.scala
    @@ -254,7 +254,7 @@ case class CFG[I <: AnyRef, C <: CodeSequence[I]](
          *        I.e., even if the left and right sets contain the same values and are
          *       `equal` (`==`) it is necessary to return the left set.
          *
    -     * @note   No facts will derived for stmts that are not reachable from an
    +     * @note   No facts will be derived for stmts that are not reachable from an
          *         exit node; e.g., due to an infinite loop.
          *         That is, the returned array may contain `null` values and in an
          *         extreme case will only contain null values!
    @@ -596,7 +596,7 @@ case class CFG[I <: AnyRef, C <: CodeSequence[I]](
          *         ''This situation cannot be handled using pcToIndex.''
          *         This information is used to ensure that if a basic block, which currently just
          *         encompasses a single instruction, will encompass the new and the old instruction
    -     *         afterwards.
    +     *         afterward.
          *         The returned value will be used as the `endIndex.`
          *         `endIndex = singletonBBsExpander(pcToIndex(pc of singleton bb))`
          *         Hence, the function is given the mapped index has to return that value if the index
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cfg/CFGFactory.scala b/OPAL/br/src/main/scala/org/opalj/br/cfg/CFGFactory.scala
    index 98d3b181d0..e7ccea349e 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cfg/CFGFactory.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cfg/CFGFactory.scala
    @@ -42,8 +42,8 @@ object CFGFactory {
         /**
          * Constructs the control flow graph for a given method.
          *
    -     * The constructed [[CFG]] basically consists of the code's basic blocks. Additionally,
    -     * two artifical exit nodes are added.
    +     * The constructed [[CFG]] basically consists of the code's basic blocks. Additionally,
    +     * two artificial exit nodes are added.
          * One artificial exit node is added to facilitate the navigation to all normal
          * return instructions. A second artificial node is added that enables the navigation
          * to all instructions that led to an abnormal return. Exception handlers are
    @@ -346,7 +346,7 @@ object CFGFactory {
                                     }
                                 }
                                 if (!isHandled) {
    -                                // also connect with exit unless we found a finally handler
    +                                // also connect with exit unless we found a finally-handler
                                     currentBB.addSuccessor(abnormalReturnNode)
                                     abnormalReturnNode.addPredecessor(currentBB)
                                 }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cfg/CatchNode.scala b/OPAL/br/src/main/scala/org/opalj/br/cfg/CatchNode.scala
    index a53eb383fc..6fe189acbd 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cfg/CatchNode.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cfg/CatchNode.scala
    @@ -35,7 +35,7 @@ final class CatchNode(
         def this(handler: ExceptionHandler, index: Int) =
             this(index, handler.startPC, handler.endPC, handler.handlerPC, handler.catchType)
     
    -    override final def nodeId: Int = {
    +    override def nodeId: Int = {
             // OLD: the offset is required to ensure that catch node ids do not collide with basic
             // OLD: block ids (even if the index is zero!)
             // OLD: 0xFFFFFF + startPC + (index << 16)
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/collection/mutable/InstructionsBuilder.scala b/OPAL/br/src/main/scala/org/opalj/br/collection/mutable/InstructionsBuilder.scala
    index 286bcfe375..5ba15d5945 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/collection/mutable/InstructionsBuilder.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/collection/mutable/InstructionsBuilder.scala
    @@ -23,7 +23,7 @@ class InstructionsBuilder private (private val buffer: ArrayBuffer[Instruction])
         /**
          * Adds the given instruction to the buffer and adds the appropriate number of `null`
          * values to the array such that the instruction occupies exactly so many slots as
    -     * specified by `slots`. Hence, `slotes` has to be >= 1.
    +     * specified by `slots`. Hence, `slots` has to be >= 1.
          */
         def ++=(value: Instruction, slots: Int): Unit = {
             //        if (slots > 1) buffer.ensureAdditionalCapacity(slots)
    @@ -49,7 +49,7 @@ class InstructionsBuilder private (private val buffer: ArrayBuffer[Instruction])
         def ++=(instructions: Array[Instruction]): Unit = buffer ++= instructions
     
         /**
    -     * Returns the build instructions array; this builder is not to be used afterwards.
    +     * Returns the build instructions array; this builder is not to be used afterward.
          */
         def result(): Array[Instruction] = buffer.toArray
     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cp/AsMethodref.scala b/OPAL/br/src/main/scala/org/opalj/br/cp/AsMethodref.scala
    index 1399b13874..0f469b3088 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cp/AsMethodref.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cp/AsMethodref.scala
    @@ -3,6 +3,8 @@ package org.opalj
     package br
     package cp
     
    +import scala.compiletime.uninitialized
    +
     /**
      * Constant pool entry that represents method refs.
      *
    @@ -20,7 +22,7 @@ trait AsMethodref extends Constant_Pool_Entry {
         def isInterfaceMethodRef: Boolean
     
         // to cache the result
    -    @volatile private var methodref: (ReferenceType, Boolean, String, MethodDescriptor) = null
    +    @volatile private var methodref: (ReferenceType, Boolean, String, MethodDescriptor) = uninitialized
         override def asMethodref(
             cp: Constant_Pool
         ): (ReferenceType, Boolean /* isInterface*/, String, MethodDescriptor) = {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Fieldref_info.scala b/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Fieldref_info.scala
    index 99becaaa31..7335928495 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Fieldref_info.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Fieldref_info.scala
    @@ -3,6 +3,8 @@ package org.opalj
     package br
     package cp
     
    +import scala.compiletime.uninitialized
    +
     import org.opalj.bi.ConstantPoolTags
     
     /**
    @@ -22,7 +24,7 @@ case class CONSTANT_Fieldref_info(
         // should be parallelized) as it is just an optimization and the object reference
         // is of no importance; an equals check will return true. Hence, w.r.t. the
         // previous definition this code is thread-safe.
    -    private var fieldref: (ClassType, String, FieldType) = null // to cache the result
    +    private var fieldref: (ClassType, String, FieldType) = uninitialized // to cache the result
         override def asFieldref(cp: Constant_Pool): (ClassType, String, FieldType) = {
             var fieldref = this.fieldref
             if (fieldref eq null) {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Utf8_info.scala b/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Utf8_info.scala
    index 1143767a7f..12db71dc46 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Utf8_info.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cp/CONSTANT_Utf8_info.scala
    @@ -3,6 +3,8 @@ package org.opalj
     package br
     package cp
     
    +import scala.compiletime.uninitialized
    +
     import org.opalj.bi.AttributeParent
     import org.opalj.bi.AttributesParent
     import org.opalj.bi.ConstantPoolTags
    @@ -21,13 +23,13 @@ case class CONSTANT_Utf8_info(value: String) extends Constant_Pool_Entry {
     
         override def asString = value
     
    -    private var methodDescriptor: MethodDescriptor = null // to cache the result
    +    private var methodDescriptor: MethodDescriptor = uninitialized // to cache the result
         override def asMethodDescriptor = {
             if (methodDescriptor eq null) { methodDescriptor = MethodDescriptor(value) };
             methodDescriptor
         }
     
    -    private var fieldType: FieldType = null // to cache the result
    +    private var fieldType: FieldType = uninitialized // to cache the result
         override def asFieldType = {
             if (fieldType eq null) { fieldType = FieldType(value) };
             fieldType
    @@ -47,7 +49,7 @@ case class CONSTANT_Utf8_info(value: String) extends Constant_Pool_Entry {
                 case AttributesParent.Method    => SignatureParser.parseMethodTypeSignature(value)
                 case AttributesParent.Code      =>
                     val message = s"code attribute has an unexpected signature attribute: $value"
    -                throw new BytecodeProcessingFailedException(message)
    +                throw BytecodeProcessingFailedException(message)
             }
         }
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cp/Constant_Pool_Entry.scala b/OPAL/br/src/main/scala/org/opalj/br/cp/Constant_Pool_Entry.scala
    index 34dbe54b41..9231d13f7d 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cp/Constant_Pool_Entry.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cp/Constant_Pool_Entry.scala
    @@ -17,88 +17,88 @@ trait Constant_Pool_Entry extends bi.reader.ConstantPoolEntry {
         def tag: Int = throw new UnknownError("tag not available")
     
         def asString: String = {
    -        throw new BytecodeProcessingFailedException(s"$this cannot be converted to string")
    +        throw BytecodeProcessingFailedException(s"$this cannot be converted to string")
         }
     
         def asFieldType: FieldType = {
    -        throw new BytecodeProcessingFailedException("conversion to field type is not supported")
    +        throw BytecodeProcessingFailedException("conversion to field type is not supported")
         }
     
         def asMethodDescriptor: MethodDescriptor =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 "conversion to method descriptor is not supported"
             )
     
         def asFieldTypeSignature: FieldTypeSignature =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 "conversion to field type signature is not supported"
             )
     
         def asSignature(ap: AttributeParent): Signature =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 "conversion to signature attribute is not supported"
             )
     
         def asConstantValue(cp: Constant_Pool): ConstantValue[?] =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 "conversion of " + this.getClass.getSimpleName + " to constant value is not supported"
             )
     
         def asConstantFieldValue(cp: Constant_Pool): ConstantFieldValue[?] =
    -        throw new BytecodeProcessingFailedException(
    +        throw BytecodeProcessingFailedException(
                 "conversion of " + this.getClass.getSimpleName + " to constant field value is not supported"
             )
     
         def asFieldref(cp: Constant_Pool): (ClassType, String, FieldType) =
    -        throw new BytecodeProcessingFailedException("conversion to field ref is not supported")
    +        throw BytecodeProcessingFailedException("conversion to field ref is not supported")
     
         def asMethodref(
             cp: Constant_Pool
         ): (ReferenceType, Boolean /*InterfaceMethodRef*/, String, MethodDescriptor) =
    -        throw new BytecodeProcessingFailedException("conversion to method ref is not supported")
    +        throw BytecodeProcessingFailedException("conversion to method ref is not supported")
     
         def asClassType(cp: Constant_Pool): ClassType =
    -        throw new BytecodeProcessingFailedException("conversion to class type is not supported")
    +        throw BytecodeProcessingFailedException("conversion to class type is not supported")
     
         def asReferenceType(cp: Constant_Pool): ReferenceType = {
             val message = "conversion to reference type is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         def asBootstrapArgument(cp: Constant_Pool): BootstrapArgument = {
             val message = "conversion to bootstrap argument is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         def asMethodHandle(cp: Constant_Pool): MethodHandle = {
             val message = "conversion to method handle is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         def asNameAndType: CONSTANT_NameAndType_info = {
             val message = "conversion to name and type info is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         def asInvokeDynamic: CONSTANT_InvokeDynamic_info = {
             val message = "conversion to invoke dynamic info is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         def asModuleIdentifier(cp: Constant_Pool): String = {
             val message = "conversion to reference type is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         def asPackageIdentifier(cp: Constant_Pool): String = {
             val message = "conversion to reference type is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         def isDynamic = false
     
         def asDynamic: CONSTANT_Dynamic_info = {
             val message = "conversion to dynamic info is not supported"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsBuffer.scala b/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsBuffer.scala
    index 1208b216a3..7736fdcf9a 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsBuffer.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsBuffer.scala
    @@ -49,7 +49,7 @@ class ConstantsBuffer private (
         private def validateIndex(index: Int, requiresUByteIndex: Boolean): Int = {
             if (requiresUByteIndex && index > UByte.MaxValue) {
                 val message = s"the constant pool index $index is larger than  ${UByte.MaxValue}"
    -            throw new ConstantPoolException(message)
    +            throw ConstantPoolException(message)
             }
     
             validateUShortIndex(index)
    @@ -59,7 +59,7 @@ class ConstantsBuffer private (
         private def validateUShortIndex(index: Int): Int = {
             if (index > UShort.MaxValue) {
                 val message = s"the constant pool index $index is larger than ${UShort.MaxValue}"
    -            throw new ConstantPoolException(message)
    +            throw ConstantPoolException(message)
             }
             index
         }
    @@ -359,7 +359,7 @@ object ConstantsBuffer {
     
             /*
             The basic idea is to first add the referenced constant pool entries (which always use two
    -        byte references) and afterwards create the LDC related constant pool entries.
    +        byte references) and afterward create the LDC related constant pool entries.
             For the first phase the pool's nextIndex is set to the first index that is required by the
             referenced entries. After that, nextIndex is set to 1 and all LDC related entries
             are created.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsPool.scala b/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsPool.scala
    index f14d3ad4d3..818dc1beae 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsPool.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/cp/ConstantsPool.scala
    @@ -19,7 +19,7 @@ class ConstantsPool(
         private def validateIndex(index: Int, requiresUByteIndex: Boolean): Int = {
             if (requiresUByteIndex && index > UByte.MaxValue) {
                 val message = s"the constant pool index $index is larger than ${UByte.MaxValue}"
    -            throw new ConstantPoolException(message)
    +            throw ConstantPoolException(message)
             }
             index
         }
    @@ -131,7 +131,7 @@ class ConstantsPool(
         ): Int = {
             val indexOfBootstrapMethod = bootstrapMethods.indexOf(bootstrapMethod)
             if (indexOfBootstrapMethod == -1) {
    -            throw new ConstantPoolException(s"the bootstrap method $bootstrapMethod is unknown")
    +            throw ConstantPoolException(s"the bootstrap method $bootstrapMethod is unknown")
             }
             val cpNameAndTypeIndex = CPENameAndType(name, descriptor)
             constantPool(CONSTANT_InvokeDynamic_info(indexOfBootstrapMethod, cpNameAndTypeIndex))
    @@ -154,7 +154,7 @@ class ConstantsPool(
         ): Int = {
             val indexOfBootstrapMethod = bootstrapMethods.indexOf(bootstrapMethod)
             if (indexOfBootstrapMethod == -1) {
    -            throw new ConstantPoolException(s"the bootstrap method $bootstrapMethod is unknown")
    +            throw ConstantPoolException(s"the bootstrap method $bootstrapMethod is unknown")
             }
             val cpNameAndTypeIndex = CPENameAndType(name, descriptor)
             validateIndex(
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0AllocationFreenessAnalysis.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0AllocationFreenessAnalysis.scala
    index b965a303df..88e55eeec4 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0AllocationFreenessAnalysis.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0AllocationFreenessAnalysis.scala
    @@ -73,7 +73,7 @@ class L0AllocationFreenessAnalysis private[analyses] (
             val method = definedMethod.definedMethod
             val declaringClassType = method.classFile.thisType
     
    -        // If thhis is not the method's declaration, but a non-overwritten method in a subtype,
    +        // If this is not the method's declaration, but a non-overwritten method in a subtype,
             // don't re-analyze the code
             if (declaringClassType ne definedMethod.declaringClassType)
                 return baseMethodAllocationFreeness(definedMethod.asDefinedMethod);
    @@ -182,8 +182,8 @@ class L0AllocationFreenessAnalysis private[analyses] (
     
                     case ARETURN.opcode | IRETURN.opcode | FRETURN.opcode | DRETURN.opcode |
                         LRETURN.opcode | RETURN.opcode =>
    -                // if we have a monitor instruction the method has allocations anyway..
    -                // hence, we can ignore the monitor related implicit exception
    +                // if we have a monitor instruction the method has allocations anyway...
    +                // hence, we can ignore the monitor-related implicit exception
     
                     case _ =>
                         // All other instructions (IFs, Load/Stores, Arith., etc.) allocate no objects
    @@ -199,7 +199,7 @@ class L0AllocationFreenessAnalysis private[analyses] (
             if (dependees.isEmpty)
                 return Result(definedMethod, AllocationFreeMethod);
     
    -        // This function computes the “allocation freeness for a method based on the allocation
    +        // This function computes the allocation freeness for a method based on the allocation
             // freeness of its callees
             def c(eps: SomeEPS): ProperPropertyComputationResult = {
                 // Let's filter the entity.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0PurityAnalysis.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0PurityAnalysis.scala
    index 565e67a663..8948382c35 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0PurityAnalysis.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L0PurityAnalysis.scala
    @@ -216,7 +216,7 @@ class L0PurityAnalysis private[analyses] (final val project: SomeProject) extend
                     case ARETURN.opcode |
                         IRETURN.opcode | FRETURN.opcode | DRETURN.opcode | LRETURN.opcode |
                         RETURN.opcode =>
    -                // if we have a monitor instruction the method is impure anyway..
    +                // if we have a monitor instruction the method is impure anyway...
                     // hence, we can ignore the monitor related implicit exception
     
                     // Reference comparisons may have different results for structurally equal values
    @@ -232,7 +232,7 @@ class L0PurityAnalysis private[analyses] (final val project: SomeProject) extend
                             // the calling context is now an explicit part of the method's result.
                             return Result(context, ImpureByAnalysis);
                         }
    -                // else ok..
    +                // else ok...
     
                 }
                 currentPC = body.pcOfNextInstruction(currentPC)
    @@ -243,7 +243,7 @@ class L0PurityAnalysis private[analyses] (final val project: SomeProject) extend
             if (dependees.isEmpty)
                 return Result(context, Pure);
     
    -        // This function computes the “purity for a method based on the properties of its dependees:
    +        // This function computes the purity for a method based on the properties of its dependees:
             // other methods (Purity), types (immutability), fields (effectively final)
             def c(eps: SomeEPS): ProperPropertyComputationResult = {
                 // Let's filter the entity.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L1ThrownExceptionsAnalysis.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L1ThrownExceptionsAnalysis.scala
    index 07672b3a11..eec2f4a823 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L1ThrownExceptionsAnalysis.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/L1ThrownExceptionsAnalysis.scala
    @@ -153,7 +153,7 @@ class L1ThrownExceptionsAnalysis(
                                     case eps @ UBP(te: ThrownExceptions) =>
                                         // Copy the concrete exception types to our initial
                                         // exceptions set. Upper type bounds are only used
    -                                    // for `SomeExecption`, which are handled above, and
    +                                    // for `SomeException`, which are handled above, and
                                         // don't have to be added to this set.
                                         initialExceptions ++= te.types.concreteTypes
                                         if (eps.isRefinable) {
    @@ -207,7 +207,7 @@ class L1ThrownExceptionsAnalysis(
                         false
     
                     // let's determine if the register 0 is updated (i.e., if the register which
    -                // stores the this reference in case of instance methods is updated)
    +                // stores the this-reference in case of instance methods is updated)
                     case ISTORE_0.opcode | LSTORE_0.opcode |
                         DSTORE_0.opcode | FSTORE_0.opcode |
                         ASTORE_0.opcode =>
    @@ -227,7 +227,7 @@ class L1ThrownExceptionsAnalysis(
                             isStaticMethod || // <= the receiver is some object
                                 isLocalVariable0Updated || // <= we don't know the receiver object at all
                                 cfJoins.contains(pc) || // <= we cannot locally decide who is the receiver
    -                            instructions(code.pcOfPreviousInstruction(pc)) != ALOAD_0 // <= the receiver may be null..
    +                            instructions(code.pcOfPreviousInstruction(pc)) != ALOAD_0 // <= the receiver may be null...
                         true
     
                     case PUTFIELD.opcode =>
    @@ -243,7 +243,7 @@ class L1ThrownExceptionsAnalysis(
                                         code.pcOfPreviousInstruction(predecessorPC)
                                     val valueInstruction = instructions(predecessorPC)
     
    -                                instructions(predecessorOfPredecessorPC) != ALOAD_0 || // <= the receiver may be null..
    +                                instructions(predecessorOfPredecessorPC) != ALOAD_0 || // <= the receiver may be null...
                                         valueInstruction.isInstanceOf[StackManagementInstruction] ||
                                         // we have to ensure that our "this" reference is not used for something else... =>
                                         valueInstruction.numberOfPoppedOperands(NotRequired) > 0
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/MethodComplexityAnalysis.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/MethodComplexityAnalysis.scala
    index 21031d2fa9..980a7f9198 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/MethodComplexityAnalysis.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/MethodComplexityAnalysis.scala
    @@ -305,7 +305,7 @@ class MethodComplexityAnalysis(val maxComplexity: Int = Int.MaxValue) {
                     case 0 /*nop*/    => /*complexity += 0*/
                     case 196 /*wide*/ => /*complexity += 0*/
                     case opcode       =>
    -                    throw new BytecodeProcessingFailedException(s"unsupported opcode: $opcode")
    +                    throw BytecodeProcessingFailedException(s"unsupported opcode: $opcode")
     
                 }
                 if (complexity < 0) {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/StaticDataUsageAnalysis.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/StaticDataUsageAnalysis.scala
    index 15becf8321..38ec78fdb7 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/StaticDataUsageAnalysis.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/analyses/StaticDataUsageAnalysis.scala
    @@ -79,7 +79,7 @@ class StaticDataUsageAnalysis private[analyses] (final val project: SomeProject)
             val method = definedMethod.definedMethod
             val declaringClassType = method.classFile.thisType
     
    -        // If thhis is not the method's declaration, but a non-overwritten method in a subtype,
    +        // If this is not the method's declaration, but a non-overwritten method in a subtype,
             // don't re-analyze the code
             if (declaringClassType ne definedMethod.declaringClassType)
                 return baseMethodStaticDataUsage(definedMethod.asDefinedMethod);
    @@ -170,7 +170,7 @@ class StaticDataUsageAnalysis private[analyses] (final val project: SomeProject)
             if (dependees.isEmpty)
                 return Result(definedMethod, maxLevel);
     
    -        // This function computes the “static data usage" for a method based on the usage of its
    +        // This function computes the "static data usage" for a method based on the usage of its
             // callees and the compile-time constancy of its static field reads
             def c(eps: SomeEPS): ProperPropertyComputationResult = {
                 // Let's filter the entity.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/cli/cg/CGModulesArg.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/cli/cg/CGModulesArg.scala
    index 4bd831f906..047e0cfee4 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/cli/cg/CGModulesArg.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/cli/cg/CGModulesArg.scala
    @@ -28,7 +28,7 @@ object EnabledCGModulesArg extends CGModulesArg {
     object DisabledCGModulesArg extends CGModulesArg {
         override val name: String = "disabledCGModules"
         override val argName: String = "modules"
    -    override val description: String = "Modules to be diabled for call-graph generation, e.g., FinalizerAnalysis"
    +    override val description: String = "Modules to be disabled for call-graph generation, e.g., FinalizerAnalysis"
     
         override def operation(currentModules: util.List[String], argumentModules: util.List[String]): Unit =
             currentModules.removeAll(argumentModules)
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Context.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Context.scala
    index 473789c270..463be877fe 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Context.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Context.scala
    @@ -48,7 +48,7 @@ case object NoContext extends Context {
     }
     
     /**
    - * A simple context that provides the bare minumum for context-insensitive analyses.
    + * A simple context that provides the bare minimum for context-insensitive analyses.
      */
     case class SimpleContext private[properties] (method: DeclaredMethod) extends Context {
         override def id: Int = method.id
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/EscapeProperty.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/EscapeProperty.scala
    index f31906c5f7..9e5464f63e 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/EscapeProperty.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/EscapeProperty.scala
    @@ -17,7 +17,7 @@ sealed trait EscapePropertyMetaInformation extends PropertyMetaInformation {
     }
     
     /**
    - * Specifies the lifetime and accessability of object instance. This is classically used for
    + * Specifies the lifetime and accessibility of object instance. This is classically used for
      * compiler optimizations such as scalar replacement, stack allocation or removal of
      * synchronization.
      * However, other usages such as finding bugs or helping to identify immutable data-structures
    @@ -33,7 +33,7 @@ sealed trait EscapePropertyMetaInformation extends PropertyMetaInformation {
      * "Let O be an object instance and T be a thread (instance). O is said to escape T, again
      * denoted as Escapes(O, T), if another thread, T’ != T, may access O."
      *
    - * Furthermore it holds that "For any object O, !Escapes(O, M) implies !Escapes(O, T), where method
    + * Furthermore, it holds that "For any object O, !Escapes(O, M) implies !Escapes(O, T), where method
      * M is invoked in thread T." [1]
      *
      * In contrast to this, Kotzmann and Mössenböck [2] describe the escape of an object with the access
    @@ -71,7 +71,7 @@ sealed trait EscapePropertyMetaInformation extends PropertyMetaInformation {
      * The property [[EscapeViaParameter]] describes objects that gets assigned to a parameter of its
      * method of creation (M). If O gets assigned to p.f for a parameter p of M, it could be the case
      * that the actual parameter of p already escaped T. In this case O would also escape T directly
    - * via this assignment. Therefore no synchronization for O can be removed.
    + * via this assignment. Therefore, no synchronization for O can be removed.
      * As it could be also the case that O gets assigned to a parameter and returned by M, there are
      * also properties representing the combinations of this kind of escapes. They are
      * [[EscapeViaParameterAndAbnormalReturn]], [[EscapeViaParameterAndReturn]],
    @@ -99,11 +99,11 @@ sealed trait EscapePropertyMetaInformation extends PropertyMetaInformation {
      * words, P' is less restrictive than P).
      *
      * If they simply don't know the actual property they should use [[AtMost]]([[NoEscape]]).
    - * If we know that the actual property is at most [[EscapeInCallee (i.e. not [[NoEscape]]),
    + * If we know that the actual property is at most [[EscapeInCallee]] (i.e. not [[NoEscape]]),
      * [[AtMost]]([[EscapeInCallee]]) should be used.
      * The same holds for every other non-bottom property.
      * E.g. [[AtMost]]([[EscapeViaParameter]]) should be used if we know that the actual property is at
    - * most [[EscapeViaParameter]] (i.e. neither [[NoEscape]] nor [[EscapeInCallee]].
    + * most [[EscapeViaParameter]] (i.e. neither [[NoEscape]] nor [[EscapeInCallee]]).
      *
      * `org.opalj.ai.DefinitionSiteLike` and [[org.opalj.br.analyses.VirtualFormalParameter]] are
      * generally used as [[org.opalj.fpcf.Entity]] in combination with this property.
    @@ -284,7 +284,7 @@ case object EscapeInCallee extends FinalEscapeProperty {
      * Characterizes escapes via an assignment to a field of a method parameter. It may also escape
      * [[EscapeInCallee]].
      * For a given entity this characterizes only the escape state within its method of creation (M),
    - * i.e. it could escape globally in a caller of M. As the actual parameter could escaped globally
    + * i.e. it could escape globally in a caller of M. As the actual parameter could have escaped globally
      * before the call of M, the entity could also be global within M. Analyses are expected to be
      * context insensitive and do not check all callers of M.
      *
    @@ -592,8 +592,8 @@ case object EscapeViaParameterAndNormalAndAbnormalReturn extends FinalEscapeProp
      * This property should be used if and only if the analysis is conclusive and could determine
      * that the value definitively escapes globally.
      * If a more advanced analysis – potentially run later – could identify an object
    - * as only [[EscapeViaParameter]], [[EscapeInCallee]] or even [[NoEscape]] then the refineable
    - * property AtMost(NoEscape) (or another non final property) should be used.
    + * as only [[EscapeViaParameter]], [[EscapeInCallee]] or even [[NoEscape]] then the refinable
    + * property AtMost(NoEscape) (or another non-final property) should be used.
      *
      * @example
      * Given the following library code:
    @@ -707,7 +707,7 @@ case object EscapeViaStaticField extends GlobalEscape {
     }
     
     /**
    - * A refineable property that provides an upper bound. Only refinements to values below or equal to
    + * A refinable property that provides an upper bound. Only refinements to values below or equal to
      * `property` are allowed to perform.
      * This property should be used, if the analysis is not able to compute a more precise property.
      */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/FieldLocality.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/FieldLocality.scala
    index bed533eee9..5130c18465 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/FieldLocality.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/FieldLocality.scala
    @@ -23,7 +23,7 @@ sealed trait FieldLocalityMetaInformation extends PropertyMetaInformation {
      * The lifetime of a value in a [[LocalFieldWithGetter]] can only be extended by it being returned
      * by a method. I.e. if the caller of such method knows that it's receiver is fresh, the field's
      * value may also be treated as fresh.
    - * [[ExtensibleLocalFieldWithGetter]] is used if both restrictions apply: The type type of the
    + * [[ExtensibleLocalFieldWithGetter]] is used if both restrictions apply: The type of the
      * owning instance may not be cloneable and the value's lifetime could be extended by being
      * returned by a method.
      */
    @@ -95,7 +95,7 @@ case object ExtensibleLocalFieldWithGetter extends FieldLocality {
     }
     
     /**
    - * The field is not local, i.e. it may be written with non-fresh values or the fields's value may
    + * The field is not local, i.e. it may be written with non-fresh values or the field's value may
      * escape other than by being returned by a method of the owning instance.
      */
     case object NoLocalField extends FieldLocality {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/MethodComplexity.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/MethodComplexity.scala
    index e86c68f73f..534ac59d76 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/MethodComplexity.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/MethodComplexity.scala
    @@ -37,7 +37,7 @@ sealed trait MethodComplexityPropertyMetaInformation extends PropertyMetaInforma
      *
      * In general, the control flow graph is analyzed to compute an upper bound for the number
      * of evaluated instructions; as far as (easily) possible, loops are conceptually unrolled. If
    - * the uppper bound could not be determined, the method is rated as being maximally complex.
    + * the upper bound could not be determined, the method is rated as being maximally complex.
      *
      * The complexity of called methods is generally not taken into account. However, invoke
      * instructions generally have a higher complexity than all other instructions to account for the
    @@ -46,7 +46,7 @@ sealed trait MethodComplexityPropertyMetaInformation extends PropertyMetaInforma
      * If an upper bound of a method's complexity cannot be estimated, the method will have
      * `Int.MaxValue` complexity.
      *
    - * @param value The estimated complexity of a specific method ([0...`Int.MaxMavlue`])
    + * @param value The estimated complexity of a specific method ([0...`Int.MaxValue`])
      *
      * @author Michael Eichberg
      */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Purity.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Purity.scala
    index 9195d5f901..9c957a2b1f 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Purity.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/Purity.scala
    @@ -82,7 +82,7 @@ sealed trait PurityPropertyMetaInformation extends PropertyMetaInformation {
      * any side effects.
      * In single-threaded execution, this means that the object graph of the program may not
      * have changed between invocation of the method and its return, except for potentially additional
    - * objects allocated by the method. For multi-threaded execution, the object graph may not change
    + * objects allocated by the method. For multithreaded execution, the object graph may not change
      * due to the invocation of the method, again except allocation of new objects. Note that the object
      * graph may change during execution of the method due to other methods executing on concurrent
      * threads. The method must not have any effects (besides consumption of resources like memory and
    @@ -106,7 +106,7 @@ sealed trait PurityPropertyMetaInformation extends PropertyMetaInformation {
      *      s eq "Demo";
      * }
      * }}}
    - * In multi-threaded execution, pure methods can not depend on any mutable state of their
    + * In multithreaded execution, pure methods can not depend on any mutable state of their
      * parameters if that state might be mutated by concurrently executing methods.
      *
      * Analyses may return [[Pure]] only if they are able to guarantee that a method fulfills these
    @@ -122,7 +122,7 @@ sealed trait PurityPropertyMetaInformation extends PropertyMetaInformation {
      * These properties may be used to detect changes that are confined because the receiver object is
      * under the control of the caller.
      *
    - * [[ContextuallySideEffectFree]] and [[ContextuallyPure]] methods may modifiy not only their
    + * [[ContextuallySideEffectFree]] and [[ContextuallyPure]] methods may modify not only their
      * receiver object but all of their parameters. Therefore, these properties can be used to detect
      * confined changes because all parameters are under the control of the caller.
      *
    @@ -219,7 +219,7 @@ object Purity extends PurityPropertyMetaInformation {
         /**
          * Returns the purity level matching the given flags for internal use by the combine operation
          * and unconditional/withoutExternal.
    -     * This will not return Impure/LBImpure as they have to be handled seperately.
    +     * This will not return Impure/LBImpure as they have to be handled separately.
          */
         private def apply(flags: Int): Purity = (flags: @switch) match {
             case CompileTimePure.flags => CompileTimePure
    @@ -350,7 +350,7 @@ case class ContextuallyPure(override val modifiedParams: IntTrieSet) extends Pur
      * The respective method may modify its parameters, but otherwise it is side-effect free, i.e. it
      * does not have side effects but its results may still be non-deterministic.
      *
    - * A method calling a `ConteuxtuallySideEffectFree` method can be `SideEffectFree` if the parameters
    + * A method calling a `ContextuallySideEffectFree` method can be `SideEffectFree` if the parameters
      * of the call are confined inside that method.
      *
      * @see [[Purity]] for further details regarding the purity levels.
    @@ -379,7 +379,7 @@ case class ContextuallySideEffectFree(override val modifiedParams: IntTrieSet) e
     
     /**
      * The respective method may perform actions that are generally considered impure or
    - * non-deterministic that some clients may wish to treat as pure. Otherwise it is pure.
    + * non-deterministic that some clients may wish to treat as pure. Otherwise, it is pure.
      *
      * @see [[Purity]] for further details regarding the purity levels.
      */
    @@ -389,7 +389,7 @@ case object DPure extends Purity {
     
     /**
      * The respective method may perform actions that are generally considered impure that some clients
    - * may wish to treat as pure. Otherwise it is side-effect free.
    + * may wish to treat as pure. Otherwise, it is side-effect free.
      *
      * @see [[Purity]] for further details regarding the purity levels.
      */
    @@ -400,7 +400,7 @@ case object DSideEffectFree extends Purity {
     /**
      * The respective method may perform actions that are generally considered impure or
      * non-deterministic that some clients may wish to treat as pure and it may modify its receiver.
    - * Otherwise it is pure.
    + * Otherwise, it is pure.
      *
      * @see [[Purity]] for further details regarding the purity levels.
      */
    @@ -410,7 +410,7 @@ case object DExternallyPure extends Purity {
     
     /**
      * The respective method may perform actions that are generally considered impure that some clients
    - * may wish to treat as pure and it may modify its receiver. Otherwise it is side-effect free.
    + * may wish to treat as pure and it may modify its receiver. Otherwise, it is side-effect free.
      *
      * @see [[Purity]] for further details regarding the purity levels.
      */
    @@ -421,7 +421,7 @@ case object DExternallySideEffectFree extends Purity {
     /**
      * The respective method may perform actions that are generally considered impure or
      * non-deterministic that some clients may wish to treat as pure and it may modify its parameters.
    - * Otherwise it is pure.
    + * Otherwise, it is pure.
      *
      * @see [[Purity]] for further details regarding the purity levels.
      */
    @@ -449,7 +449,7 @@ case class DContextuallyPure(override val modifiedParams: IntTrieSet) extends Pu
     
     /**
      * The respective method may perform actions that are generally considered impure that some clients
    - * may wish to treat as pure and it may modify its parameters. Otherwise it is side-effect free.
    + * may wish to treat as pure and it may modify its parameters. Otherwise, it is side-effect free.
      *
      * @see [[Purity]] for further details regarding the purity levels.
      */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/ThrownExceptionsFallback.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/ThrownExceptionsFallback.scala
    index d2d49edeeb..9298d06bce 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/ThrownExceptionsFallback.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/ThrownExceptionsFallback.scala
    @@ -149,7 +149,7 @@ object ThrownExceptionsFallback extends ((PropertyStore, FallbackReason, Entity)
                         false
     
                     // let's determine if the register 0 is updated (i.e., if the register which
    -                // stores the this reference in case of instance methods is updated)
    +                // stores the this-reference in case of instance methods is updated)
                     case ISTORE_0.opcode | LSTORE_0.opcode |
                         DSTORE_0.opcode | FSTORE_0.opcode |
                         ASTORE_0.opcode =>
    @@ -168,7 +168,7 @@ object ThrownExceptionsFallback extends ((PropertyStore, FallbackReason, Entity)
                             isStaticMethod || // <= the receiver is some object
                                 isLocalVariable0Updated || // <= we don't know the receiver object at all
                                 cfJoins.contains(pc) || // <= we cannot locally decide who is the receiver
    -                            instructions(code.pcOfPreviousInstruction(pc)) != ALOAD_0 // <= the receiver may be null..
    +                            instructions(code.pcOfPreviousInstruction(pc)) != ALOAD_0 // <= the receiver may be null...
                         true
     
                     case PUTFIELD.opcode =>
    @@ -184,7 +184,7 @@ object ThrownExceptionsFallback extends ((PropertyStore, FallbackReason, Entity)
                                         code.pcOfPreviousInstruction(predecessorPC)
                                     val valueInstruction = instructions(predecessorPC)
     
    -                                instructions(predecessorOfPredecessorPC) != ALOAD_0 || // <= the receiver may be null..
    +                                instructions(predecessorOfPredecessorPC) != ALOAD_0 || // <= the receiver may be null...
                                         valueInstruction.isInstanceOf[StackManagementInstruction] ||
                                         // we have to ensure that our "this" reference is not used for something else... =>
                                         valueInstruction.numberOfPoppedOperands(NotRequired) > 0
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/alias/Alias.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/alias/Alias.scala
    index 91d52738bf..1f532cbb00 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/alias/Alias.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/alias/Alias.scala
    @@ -108,7 +108,7 @@ object Alias extends AliasPropertyMetaInformation {
         final val PropertyKeyName = "opalj.Alias"
     
         /**
    -     * The key used to access alias properties. It's name is "opalj.Alias" and the fallback value is [[MayAlias]].
    +     * The key used to access alias properties. Its name is "opalj.Alias" and the fallback value is [[MayAlias]].
          */
         final val key: PropertyKey[Alias] = {
             PropertyKey.create(
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/cg/Callees.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/cg/Callees.scala
    index 6a06031d87..27626872e7 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/cg/Callees.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/cg/Callees.scala
    @@ -151,7 +151,7 @@ sealed trait Callees extends Property with CalleesPropertyMetaInformation {
         /**
          * Returns for a given call site pc and indirect target method the receiver information.
          * If the receiver can not be determined, the `scala.Option` will be empty, otherwise it will
    -     * contain all [[br.PCs]] and the the negative indices of parameters that may define the value of
    +     * contain all [[br.PCs]] and the negative indices of parameters that may define the value of
          * the receiver.
          * The parameter at index 0 always corresponds to the *this* local and is `null` for static
          * methods.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/immutability/FieldImmutability.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/immutability/FieldImmutability.scala
    index 5971667c28..5777902935 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/immutability/FieldImmutability.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/immutability/FieldImmutability.scala
    @@ -25,7 +25,7 @@ sealed trait FieldImmutabilityPropertyMetaInformation extends PropertyMetaInform
      * [[NonTransitivelyImmutableField]] A not assignable field and a non-transitively immutable or mutable data type
      *
      * [[DependentlyImmutableField]] A not assignable field with a generic type and parts of it are not
    - * substantiated in an non-transitively or transitively immutable
    + * substantiated in a non-transitively or transitively immutable
      *
      * [[TransitivelyImmutableField]] A not assignable field with a transitively immutable field type or
      * a referenced object that can not escape or its state cannot be mutated.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/AllocationSitePointsToSet.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/AllocationSitePointsToSet.scala
    index f3e77a6fb2..099158aff4 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/AllocationSitePointsToSet.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/AllocationSitePointsToSet.scala
    @@ -269,7 +269,7 @@ case class AllocationSitePointsToSetN private[pointsto] (
     
         override def hashCode: Int = elements.hashCode()
     
    -    override def getNewestElement(): AllocationSite = elements.head
    +    override def getNewestElement: AllocationSite = elements.head
     }
     
     object NoAllocationSites extends AllocationSitePointsToSet {
    @@ -314,7 +314,7 @@ object NoAllocationSites extends AllocationSitePointsToSet {
             elidedAssert(n == 0)
         }
     
    -    override def getNewestElement(): AllocationSite = throw new NoSuchElementException
    +    override def getNewestElement: AllocationSite = throw new NoSuchElementException
     }
     
     case class AllocationSitePointsToSet1(
    @@ -474,5 +474,5 @@ case class AllocationSitePointsToSet1(
     
         override def hashCode: Int = (allocationSite ^ (allocationSite >> 32)).toInt
     
    -    override def getNewestElement(): AllocationSite = allocationSite
    +    override def getNewestElement: AllocationSite = allocationSite
     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/PointsToSetLike.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/PointsToSetLike.scala
    index dd6d1f503d..f99f69f307 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/PointsToSetLike.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/PointsToSetLike.scala
    @@ -45,7 +45,7 @@ trait PointsToSetLike[ElementType, +PointsToSet, T <: PointsToSetLike[ElementTyp
     
         def filter(typeFilter: ReferenceType => Boolean): T
     
    -    def getNewestElement(): ElementType
    +    def getNewestElement: ElementType
     }
     
     object PointsToSetLike {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/TypeBasedPointsToSet.scala b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/TypeBasedPointsToSet.scala
    index 9d4fa296a0..1c882e26ab 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/TypeBasedPointsToSet.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/fpcf/properties/pointsto/TypeBasedPointsToSet.scala
    @@ -73,7 +73,7 @@ case class TypeBasedPointsToSet private[properties] (
             var newOrderedTypes = orderedTypes
             var typesUnion = types
     
    -        other.orderedTypes.take(other.numElements - seenElements).map { t =>
    +        other.orderedTypes.take(other.numElements - seenElements).foreach { t =>
                 if (!types.contains(t)) {
                     newOrderedTypes ::= t
                     typesUnion += t
    @@ -113,7 +113,7 @@ case class TypeBasedPointsToSet private[properties] (
             var newOrderedTypes = orderedTypes
             var typesUnion = types
     
    -        other.orderedTypes.take(other.numElements - seenElements).map { t =>
    +        other.orderedTypes.take(other.numElements - seenElements).foreach { t =>
                 if (typeFilter(t) && !types.contains(t)) {
                     newOrderedTypes ::= t
                     typesUnion += t
    @@ -148,7 +148,7 @@ case class TypeBasedPointsToSet private[properties] (
             TypeBasedPointsToSet(newOrderedTypes, newTypes)
         }
     
    -    override def getNewestElement(): ReferenceType = orderedTypes.head
    +    override def getNewestElement: ReferenceType = orderedTypes.head
     }
     
     object TypeBasedPointsToSet extends TypeBasedPointsToSetPropertyMetaInformation {
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/ClassFileFactory.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/ClassFileFactory.scala
    index 55aada4b06..9c4858deaa 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/ClassFileFactory.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/ClassFileFactory.scala
    @@ -125,7 +125,7 @@ object ClassFileFactory {
          *
          * - `methodDescriptor`'s return type is [[VoidType]] (so no returning is necessary)
          * - `receiverMethodDescriptor`'s return type is assignable to `methodDescriptor`'s
    -     *      (e.g., a "smaller" numerical type, (un)boxable, a subtype, etc)
    +     *      (e.g., a "smaller" numerical type, (un)boxable, a subtype, etc.)
          * - `receiverMethodDescriptor` returns `Object`: in this case, we assume that `Object`
          *   stands for "generic return type" and expect the receiver method to return an
          *   object of a type compatible to the forwarder method's return type
    @@ -182,7 +182,7 @@ object ClassFileFactory {
          * @param invocationInstruction the opcode of the invocation instruction
          *          (`INVOKESPECIAL.opcode`,`INVOKEVIRTUAL.opcode`,
          *          `INVOKESTATIC.opcode`,`INVOKEINTERFACE.opcode`)
    -     *          used to call call the method on the receiver.
    +     *          used to call the method on the receiver.
          */
         def Proxy(
             caller:                  ClassType,
    @@ -777,7 +777,7 @@ object ClassFileFactory {
                     numberOfInstructionsForParameterLoading +
                     3 + // INVOKESPECIAL
                     1 // ARETURN
    -        val maxLocals = fieldTypes.iterator.map(_.computationalType.operandSize.toInt).sum
    +        val maxLocals = fieldTypes.iterator.map(_.computationalType.operandSize).sum
             val maxStack = maxLocals + 2 // new + dup makes two extra on the stack
             val instructions = new Array[Instruction](numberOfInstructions)
             var currentPC: Int = 0
    @@ -998,7 +998,7 @@ object ClassFileFactory {
         /**
          * Creates the bytecode instructions for the proxy method.
          *
    -     * These instructions will setup the stack with the variables required to call the
    +     * These instructions will set up the stack with the variables required to call the
          * `receiverMethod`, perform the appropriate invocation instruction (one of
          * INVOKESTATIC, INVOKEVIRTUAL, or INVOKESPECIAL), and return from the proxy method.
          *
    @@ -1250,7 +1250,7 @@ object ClassFileFactory {
                     if (forwarderParametersCount > receiverParametersCount) {
                         /* This is the case of an implicit receiver becoming explicit in the
                          * forwarder, hence we get one instruction for loading the first
    -                     * parameter. Subsequently we need to ignore that parameter, though.
    +                     * parameter. Subsequently, we need to ignore that parameter, though.
                          */
                         numberOfInstructions += 1
                         lvIndex += forwarderParameters(0).computationalType.operandSize
    @@ -1438,7 +1438,7 @@ object ClassFileFactory {
                 numberOfInstructions += loadInstructions + conversionInstructions
     
                 parameterIndex += 1
    -            lvIndex += parameter.computationalType.operandSize.toInt
    +            lvIndex += parameter.computationalType.operandSize
             }
             numberOfInstructions += 3 // invoke target method
             numberOfInstructions += 1 // return
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/GETFIELD.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/GETFIELD.scala
    index e3b3f8e020..8a84b6e316 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/GETFIELD.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/GETFIELD.scala
    @@ -4,7 +4,7 @@ package br
     package instructions
     
     /**
    - * Fetch field from object.
    + * Fetch field from object.
      *
      * ==NOTE==
      * Getting an Array's length is translated to the special `arraylength` instruction.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEDYNAMIC.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEDYNAMIC.scala
    index 2c2855c120..405f87dbf8 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEDYNAMIC.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEDYNAMIC.scala
    @@ -54,7 +54,7 @@ object INVOKEDYNAMIC extends InstructionMetaInformation {
      * to the fact that not all information is yet available because it is not
      * yet loaded. In case of `invokedynamic` instructions it is necessary
      * to read a class file's attributes which are read in at the very end. This requires
    - * to resolve INVOKEDYNAMIC instructions in a two step process.
    + * to resolve INVOKEDYNAMIC instructions in a two-step process.
      *
      * @author Michael Eichberg
      */
    @@ -62,7 +62,7 @@ case object INCOMPLETE_INVOKEDYNAMIC extends INVOKEDYNAMIC {
     
         private def error: Nothing = {
             val message = "this invokedynamic is incomplete"
    -        throw new BytecodeProcessingFailedException(message)
    +        throw BytecodeProcessingFailedException(message)
         }
     
         override final def bootstrapMethod: BootstrapMethod = error
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEVIRTUAL.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEVIRTUAL.scala
    index f717abb88c..7be6f3176d 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEVIRTUAL.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/INVOKEVIRTUAL.scala
    @@ -9,7 +9,7 @@ package instructions
      * @author Michael Eichberg
      */
     case class INVOKEVIRTUAL(
    -    declaringClass:   ReferenceType, // an class or array type to be precise
    +    declaringClass:   ReferenceType, // a class or array type to be precise
         name:             String,
         methodDescriptor: MethodDescriptor
     ) extends VirtualMethodInvocationInstruction {
    @@ -47,8 +47,6 @@ object INVOKEVIRTUAL extends InstructionMetaInformation {
          *          e.g., `java/lang/Object` or `[java/lang/Object` in case of a method call on
          *          an array object. In the latter case, the called method has to be a method defined
          *          by `java/lang/Object`; e.g., `clone` or `wait`.
    -     * @param   isInterface has to be `true` if declaring class identifies an interface.
    -     *          (Determines how the target method is resolved - relevant for Java 8 onwards.)
          * @param   methodDescriptor the method descriptor in JVM notation,
          *          e.g., "()V" for a method without parameters which returns void.
          */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/ImplicitValue.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/ImplicitValue.scala
    index 57fc60c39b..01331645ec 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/ImplicitValue.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/ImplicitValue.scala
    @@ -4,7 +4,7 @@ package br
     package instructions
     
     /**
    - * Trait that can be mixed in if the value of a instruction is implicitly defined.
    + * Trait that can be mixed in if the value of an instruction is implicitly defined.
      *
      * @author Michael Eichberg
      */
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/Instruction.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/Instruction.scala
    index 3655634aee..6a5d74f3c9 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/Instruction.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/Instruction.scala
    @@ -16,7 +16,7 @@ trait Instruction extends InstructionLike {
          * The index of the next instruction in the (sparse) code array.
          *
          * @note    This is primarily a convenience method that delegates to the method
    -     *          `indexOfNextInstrution(PC,Boolean)`. However, given that this is also the
    +     *          `indexOfNextInstruction(PC,Boolean)`. However, given that this is also the
          *          standard method called by clients, it is often meaningful to directly implement
          *          this. In particular since most instructions cannot be modified by wide.
          */
    @@ -47,7 +47,7 @@ trait Instruction extends InstructionLike {
         /**
          * Checks for structural equality of two instructions.
          *
    -     * @note   Implemted by using the underlying (compiler generated) equals methods.
    +     * @note   Implemented by using the underlying (compiler generated) equals methods.
          */
         def similar(other: Instruction): Boolean = this == other
     
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLabel.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLabel.scala
    index 195f13ee99..4165497283 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLabel.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLabel.scala
    @@ -61,7 +61,7 @@ object InstructionLabel {
         implicit final def nameToInstructionLabel(l:   String): InstructionLabel = InstructionLabel(l)
         implicit final def pcToInstructionLabel(l:     PC): InstructionLabel = InstructionLabel(l)
     
    -    def apply(s:    Symbol): NamedLabel = new NamedLabel(s.name)
    -    def apply(name: String): NamedLabel = new NamedLabel(name)
    -    def apply(pc:   Int): PCLabel = new PCLabel(pc)
    +    def apply(s:    Symbol): NamedLabel = NamedLabel(s.name)
    +    def apply(name: String): NamedLabel = NamedLabel(name)
    +    def apply(pc:   Int): PCLabel = PCLabel(pc)
     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLike.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLike.scala
    index 10fada1d30..63eca9fd36 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLike.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/InstructionLike.scala
    @@ -66,7 +66,7 @@ trait InstructionLike {
         /**
          * Determines if this instruction is isomorphic to the given instruction.
          *
    -     * Two instructions are isomporphic if they access the same operand and register
    +     * Two instructions are isomorphic if they access the same operand and register
          * values and if the instructions have the same bytecode representation, except
          * of (A) (potential) padding bytes and (B) the branch offset of JSR(_W) instructions.
          * In the first case the branch offsets are corrected by the number of padding bytes and
    @@ -103,7 +103,7 @@ trait InstructionLike {
          * @note In case of some of the [[StackManagementInstruction]] the number of popped values is
          *      not fixed. In that case the number depends on the concrete layout of the
          *      operand stack. E.g., the [[POP2]] instruction may just pop one
    -     *      ''categeory 2'' value (of type `long` or `double`) or two ''category 1''
    +     *      ''category 2'' value (of type `long` or `double`) or two ''category 1''
          *      values.
          *
          * @param   ctg A function that returns the computational type category of
    @@ -122,7 +122,7 @@ trait InstructionLike {
          * @note In case of some of the [[StackManagementInstruction]] this number is
          *      not fixed. In that case the number depends on the concrete layout of the
          *      operand stack. E.g., the [[DUP2]]
    -     *      instruction may just duplicate one ''categeory 2'' value (result is 1)
    +     *      instruction may just duplicate one ''category 2'' value (result is 1)
          *      (of type long or double) or two ''category 1'' values (result is 2).
          *
          * @param   ctg A function that returns the computational type category of
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/LOOKUPSWITCH.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/LOOKUPSWITCH.scala
    index 964f2384e2..ef0d2a8215 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/LOOKUPSWITCH.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/LOOKUPSWITCH.scala
    @@ -83,7 +83,7 @@ case class LOOKUPSWITCH(
         ): List[PC] = {
             val defaultTarget = currentPC + defaultOffset
             var pcs = List(defaultTarget)
    -        var seen: IntArraySet = new IntArraySet1(defaultTarget)
    +        var seen: IntArraySet = IntArraySet1(defaultTarget)
             npairs foreach { npair =>
                 val offset = npair.value
                 val nextTarget = currentPC + offset
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledInstruction.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledInstruction.scala
    index b6543a2d5d..9817462d2c 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledInstruction.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledInstruction.scala
    @@ -6,7 +6,7 @@ package instructions
     /**
      * An instruction where the jump targets are identified using `Symbols` associated with the
      * instructions which should be executed in case of a jump.
    - * The labels are `InstructionLabel`s; however, the eDSL provides implicits to faciliate the
    + * The labels are `InstructionLabel`s; however, the eDSL provides implicits to facilitate the
      * usage of standard scala Symbols as labels.
      *
      * @author Malte Limmeroth
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledSimpleConditionalBranchInstruction.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledSimpleConditionalBranchInstruction.scala
    index c8644e3e74..f06f182c4f 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledSimpleConditionalBranchInstruction.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/LabeledSimpleConditionalBranchInstruction.scala
    @@ -4,7 +4,7 @@ package br
     package instructions
     
     /**
    - * An conditional branch instruction where the jump target is identified using a `Symbol`.
    + * A conditional branch instruction where the jump target is identified using a `Symbol`.
      *
      * @author Malte Limmeroth
      * @author Michael Eichberg
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/ReturnInstruction.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/ReturnInstruction.scala
    index 8c7bd93052..5ebcb3bf11 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/ReturnInstruction.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/ReturnInstruction.scala
    @@ -148,6 +148,6 @@ object MethodCompletionInstruction {
     
     object NoMethodCompletionInstruction {
     
    -    def unappy(i: Instruction): Boolean = !MethodCompletionInstruction.unapply(i)
    +    def unapply(i: Instruction): Boolean = !MethodCompletionInstruction.unapply(i)
     
     }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/instructions/SimpleConditionalBranchInstruction.scala b/OPAL/br/src/main/scala/org/opalj/br/instructions/SimpleConditionalBranchInstruction.scala
    index 6574797130..283522b4b5 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/instructions/SimpleConditionalBranchInstruction.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/instructions/SimpleConditionalBranchInstruction.scala
    @@ -13,7 +13,7 @@ trait SimpleConditionalBranchInstructionLike
         with SimpleBranchInstructionLike {
     
         /**
    -     * The comparison operator (incl. the constant) underlying the if instruction.
    +     * The comparison operator (incl. the constant) underlying the if-instruction.
          * E.g., `<`, `< 0` or `!= null`.
          */
         def operator: String
    @@ -35,9 +35,9 @@ trait SimpleConditionalBranchInstruction[T <: SimpleConditionalBranchInstruction
     
         /**
          * Returns the IF instruction that - when compared with this if instruction -
    -     * performs a jump in case of a fall-through and vice-versa. I.e., given the
    -     * following condition: `(a < b)`, the negation is performend: `!(a < b)` which
    -     * is equivalent to `(a ≥ b)`. In other words,  if this IF instruction is an
    +     * performs a jump in case of a fall-through and vice versa. I.e., given the
    +     * following condition: `(a < b)`, the negation is performed: `!(a < b)` which
    +     * is equivalent to `(a ≥ b)`. In other words, if this IF-instruction is an
          * IFGT instruction and IFLE instruction is returned.
          */
         def negate(newBranchoffset: Int = branchoffset): SimpleConditionalBranchInstruction[?]
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/BytecodeOptimizer.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/BytecodeOptimizer.scala
    index 94966d5739..15c6ddbfe3 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/BytecodeOptimizer.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/BytecodeOptimizer.scala
    @@ -47,20 +47,20 @@ import net.ceedubs.ficus.Ficus.*
      *
      * The following transformations are performed:
      *  - trivial gotos which jump to the immediately succeeding instruction are replaced by nops
    - *    (the CFG may contain less basic blocks afterwards)
    + *    (the CFG may contain less basic blocks afterward)
      *  - goto chains are shortened (i.e., a goto jumping to another goto)
      *    (this primarily reduces the number of instructions that need to be evaluated at
      *    abstract interpretation time; it may - however - also reduce the number of basic blocks)
      *  - useless ifs where the jump target is the next instruction are replaced by nops
    - *    (the CFG may contain less basic blocks afterwards)
    + *    (the CFG may contain less basic blocks afterward)
      *  - if -> goto instruction sequences are resolved
      *    (this primarily reduces the number of instructions that need to be evaluated at
      *    abstract interpretation time; it may - however - also reduce the number of basic blocks)
      *  - useless switches are replaced
    - *    (the CFG may contain less basic blocks afterwards)
    + *    (the CFG may contain less basic blocks afterward)
      *
    - * The target array has the same size as the source array to make sure that branch offsets/line-
    - * numbers etc. point to the correct instruction. Furthermore, we try to avoid the introduction
    + * The target array has the same size as the source array to make sure that branch offsets/line-numbers
    + * etc. point to the correct instruction. Furthermore, we try to avoid the introduction
      * of dead code.
      *
      * @note All transformation always only reduce the number of basic blocks and never create new
    @@ -315,7 +315,7 @@ trait BytecodeOptimizer extends MethodsBinding {
                             val jumpTargetPC = pc + defaultOffset
                             val jumpTargetInstruction = instructions(jumpTargetPC)
                             if (jumpTargetPC == nextPC) {
    -                            // totally useless..
    +                            // totally useless...
                                 newNextPC = nextPC
                             } else {
                                 // This switch is basically just a goto... we will add
    @@ -413,7 +413,7 @@ trait BytecodeOptimizer extends MethodsBinding {
                 // EXAMPLE:
                 //
                 // The sequence
    -            // (SPECIAL, BUT FREQUENT, CASE.. the second GOTO just jumps over the next goto..):
    +            // (SPECIAL, BUT FREQUENT, CASE... the second GOTO just jumps over the next goto...):
                 //      pc=182: IF_ACMPNE(6), pc+3: GOTO(6), pc+6: GOTO(-170)
                 // is rewritten to:
                 //      pc=182: IF_ACMPNE(6 + (-170) ), pc+[3..9]: NOP
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/CachedBytecodeReaderAndBinding.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/CachedBytecodeReaderAndBinding.scala
    index d47d0a9e5f..aadbf09068 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/CachedBytecodeReaderAndBinding.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/CachedBytecodeReaderAndBinding.scala
    @@ -11,7 +11,7 @@ import org.opalj.control.fillIntArray
     
     /**
      * Defines a method to parse an array of bytes (containing Java bytecode instructions) and
    - * to return an array of [[org.opalj.br.instructions.Instruction]]`s.
    + * to return an array of [[org.opalj.br.instructions.Instruction]]s.
      *
      * The target array has the same size as the source array to make sure that branch offsets
      * etc. point to the correct instruction.
    @@ -40,7 +40,7 @@ trait CachedBytecodeReaderAndBinding extends InstructionsDeserializer {
     
             val bas = new ByteArrayInputStream(source)
             val in = new DataInputStream(bas)
    -        val codeLength = source.size
    +        val codeLength = source.length
             val instructions = new Array[Instruction](codeLength)
     
             var wide: Boolean = false
    @@ -410,7 +410,7 @@ trait CachedBytecodeReaderAndBinding extends InstructionsDeserializer {
                         WIDE
     
                     case opcode =>
    -                    throw new BytecodeProcessingFailedException("unsupported opcode: " + opcode)
    +                    throw BytecodeProcessingFailedException("unsupported opcode: " + opcode)
                 }
     
             }
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/DeferredDynamicConstantResolution.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/DeferredDynamicConstantResolution.scala
    index b7956230ec..76a28a47f9 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/DeferredDynamicConstantResolution.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/DeferredDynamicConstantResolution.scala
    @@ -37,7 +37,7 @@ trait DeferredDynamicConstantResolution extends ConstantPoolBinding with CodeBin
          *
          * @param   classFile The [[ClassFile]] with which the deferred action was registered.
          * @param   cp The class file's [[Constant_Pool]].
    -     * @param   dynamicInfo The consttant pool entry describing the dynamic constant.
    +     * @param   dynamicInfo The constant pool entry describing the dynamic constant.
          * @param   instructions This method's array of [[instructions.Instruction]]s.
          *          (The array returned by the [[#Instructions]] method.)
          * @param   pc The program counter of the `invokedynamic` instruction.
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/DynamicConstantRewriting.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/DynamicConstantRewriting.scala
    index 0c96e6fcca..7bdc5d90d8 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/DynamicConstantRewriting.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/DynamicConstantRewriting.scala
    @@ -180,7 +180,7 @@ trait DynamicConstantRewriting
                     info("rewriting dynamic constant", s"Java: $load => $head")
             } else if (instructionLength == 3) { // Replace ldc(2)_w with invocation
                 val newMethodName =
    -                newTargetMethodName(cp, methodNameIndex, methodDescriptorIndex, pc, "load_dynamic_contstant")
    +                newTargetMethodName(cp, methodNameIndex, methodDescriptorIndex, pc, "load_dynamic_constant")
                 val newMethod = Method(
                     ACC_SYNTHETIC.mask | ACC_PRIVATE.mask | ACC_STATIC.mask,
                     newMethodName,
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/InvokedynamicRewriting.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/InvokedynamicRewriting.scala
    index 0f4c783735..5b72e3cd04 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/InvokedynamicRewriting.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/InvokedynamicRewriting.scala
    @@ -624,7 +624,7 @@ trait InvokedynamicRewriting
          *
          * @param classFile The classfile to parse
          * @param instructions The instructions of the method we are currently parsing
    -     * @param pc The program counter of the current instuction
    +     * @param pc The program counter of the current instruction
          * @param invokedynamic The INVOKEDYNAMIC instruction we want to replace
          * @return A classfile which has the INVOKEDYNAMIC instruction replaced
          */
    @@ -710,7 +710,7 @@ trait InvokedynamicRewriting
          *
          * @param classFile The classfile to parse
          * @param instructions The instructions of the method we are currently parsing
    -     * @param pc The program counter of the current instuction
    +     * @param pc The program counter of the current instruction
          * @param invokedynamic The INVOKEDYNAMIC instruction we want to replace
          * @return A classfile which has the INVOKEDYNAMIC instruction replaced
          */
    @@ -896,7 +896,7 @@ trait InvokedynamicRewriting
                 // (e.g., about bridges or markers)
                 altMetafactoryArgs
             ) = bootstrapArguments match {
    -            case Seq(smt: MethodDescriptor, tim: MethodCallMethodHandle, imt: MethodDescriptor, ama*) =>
    +            case Seq(smt: MethodDescriptor, tim: MethodCallMethodHandle, imt: MethodDescriptor, ama @ _*) =>
                     (smt, tim, imt, ama)
                 case _ =>
                     if (logUnknownInvokeDynamics) {
    @@ -982,10 +982,10 @@ trait InvokedynamicRewriting
     
             *** INVOKEINTERFACE ***
             It is similar to INVOKEVIRTUAL, but the method definition is defined in an
    -        interface. Therefore, the same rule like INVOKEVIRTUAL applies.
    +        interface. Therefore, the same rule as for INVOKEVIRTUAL applies.
     
             *** INVOKESTATIC ***
    -        Because we call a static method, we don't have an instance. Therefore we don't
    +        Because we call a static method, we don't have an instance. Therefore, we don't
             need a receiver field.
     
             *** INVOKESPECIAL ***
    @@ -994,9 +994,9 @@ trait InvokedynamicRewriting
               in called class -> no rewrite necessary
             - private method invocation: The private method must be in the same class as
               the callee -> no rewrite needed
    -        - Invokation of methods using super keyword -> Not needed, because a synthetic
    +        - Invocation of methods using super keyword -> Not needed, because a synthetic
               method in the callee class is created which handles the INVOKESPECIAL.
    -          Therefore the receiverType is also the callee class.
    +          Therefore, the receiverType is also the callee class.
     
               E.g.
                   public static class Superclass {
    @@ -1015,7 +1015,7 @@ trait InvokedynamicRewriting
               The class Subclass contains a synthetic method `access`, which has an
               INVOKESPECIAL instruction calling Superclass.someMethod. The generated
               Lambda Proxyclass calls Subclass.access, so the receiverType must be
    -          Subclass insteaed of Superclass.
    +          Subclass instead of Superclass.
     
               More information:
                 http://www.javaworld.com/article/2073578/java-s-synthetic-methods.html
    @@ -1028,7 +1028,7 @@ trait InvokedynamicRewriting
                 } else if (invokedynamic.methodDescriptor.parameterTypes.nonEmpty &&
                            invokedynamic.methodDescriptor.parameterTypes.head.isClassType
                 ) {
    -                // If we have an instance of a object and use a method reference,
    +                // If we have an instance of an object and use a method reference,
                     // get the receiver type from the invokedynamic instruction.
                     // It is the first parameter of the functional interface parameter
                     // list.
    @@ -1036,7 +1036,7 @@ trait InvokedynamicRewriting
                 } else if (instantiatedMethodType.parameterTypes.nonEmpty &&
                            instantiatedMethodType.parameterTypes.head.isClassType
                 ) {
    -                // If we get a instance method reference like `LinkedHashSet::addAll`, get
    +                // If we get an instance method reference like `LinkedHashSet::addAll`, get
                     // the receiver type from the functional interface. The first parameter is
                     // the instance where the method should be called.
                     instantiatedMethodType.parameterTypes.head.asClassType
    @@ -1289,7 +1289,7 @@ trait InvokedynamicRewriting
                 argCount += markerCount
             }
     
    -        // bridge methods come afterwards if FLAG_BRIDGES is set.
    +        // bridge methods come afterward if FLAG_BRIDGES is set.
             if ((flags & LambdaMetafactory.FLAG_BRIDGES) > 0) {
                 val ConstantInteger(bridgesCount) = altMetafactoryArgs(argCount): @unchecked
                 argCount += 1
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/LineNumberTable_attributeBinding.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/LineNumberTable_attributeBinding.scala
    index 01a6809654..334ef51fad 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/LineNumberTable_attributeBinding.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/LineNumberTable_attributeBinding.scala
    @@ -27,11 +27,11 @@ trait UnpackedLineNumberTable_attributeBinding
             attribute_name_index: Constant_Pool_Index,
             line_number_table:    LineNumbers
         ): UnpackedLineNumberTable = {
    -        new UnpackedLineNumberTable(line_number_table)
    +        UnpackedLineNumberTable(line_number_table)
         }
     
         def LineNumberTableEntry(start_pc: Int, line_number: Int): br.LineNumber = {
    -        new LineNumber(start_pc, line_number)
    +        LineNumber(start_pc, line_number)
         }
     
     }
    @@ -55,7 +55,7 @@ trait CompactLineNumberTable_attributeBinding
             attribute_name_index: Constant_Pool_Index,
             line_number_table:    Array[Byte]
         ): CompactLineNumberTable = {
    -        new CompactLineNumberTable(line_number_table)
    +        CompactLineNumberTable(line_number_table)
         }
     
         /**
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTable_attributeBinding.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTable_attributeBinding.scala
    index d965cbe00d..410857de7a 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTable_attributeBinding.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTable_attributeBinding.scala
    @@ -26,7 +26,7 @@ trait LocalVariableTable_attributeBinding
             descriptor_index: Constant_Pool_Index,
             index:            Int
         ): LocalVariable = {
    -        new LocalVariable(
    +        LocalVariable(
                 start_pc,
                 length,
                 cp(name_index).asString,
    diff --git a/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTypeTable_attributeBinding.scala b/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTypeTable_attributeBinding.scala
    index 46759af9bc..3488312378 100644
    --- a/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTypeTable_attributeBinding.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/br/reader/LocalVariableTypeTable_attributeBinding.scala
    @@ -27,7 +27,7 @@ trait LocalVariableTypeTable_attributeBinding
             signature_index: Constant_Pool_Index,
             index:           Int
         ): LocalVariableType = {
    -        new LocalVariableType(
    +        LocalVariableType(
                 start_pc,
                 length,
                 cp(name_index).asString,
    diff --git a/OPAL/br/src/main/scala/org/opalj/value/ValueInformation.scala b/OPAL/br/src/main/scala/org/opalj/value/ValueInformation.scala
    index d69295d916..7408181122 100644
    --- a/OPAL/br/src/main/scala/org/opalj/value/ValueInformation.scala
    +++ b/OPAL/br/src/main/scala/org/opalj/value/ValueInformation.scala
    @@ -78,7 +78,7 @@ trait ValueInformation {
          * Returns `Yes` if the value is _not null_ and the least upper type bound is an `ArrayType`;
          * the value is `Unknown` if the least upper type bound is `ArrayType` but the value may be null;
          * in all other cases `No` is returned; in particular if the value is known to be null. `No`
    -     * is also returned if the value's type is `Object` or `Seriablizable` or `Cloneable`.
    +     * is also returned if the value's type is `Object` or `Serializable` or `Cloneable`.
          */
         def isArrayValue: Answer
     
    @@ -247,7 +247,7 @@ case object AReturnAddressValue extends IsReturnAddressValue
     trait ConstantValueInformationProvider[T] {
     
         /**
    -     * The constant value that this variable takes - if it take a single constant value!
    +     * The constant value that this variable takes - if it takes a single constant value!
          * I.e., if the variable may take multiple different values at runtime `constantValue` will
          * return `None`.
          */
    @@ -741,7 +741,7 @@ trait IsSReferenceValue[T <: ReferenceType] extends IsBaseReferenceValue {
     
         override final def leastUpperType: Option[ReferenceType] = Some(theUpperTypeBound)
     
    -    override final def upperTypeBound: UIDSet[T] = new UIDSet1(theUpperTypeBound)
    +    override final def upperTypeBound: UIDSet[T] = UIDSet1(theUpperTypeBound)
     
     }
     
    @@ -1007,7 +1007,7 @@ trait IsMultipleReferenceValue extends IsReferenceValue {
         ): Answer = boundary {
             // Recall that the client has to make an "isNull" check before calling
             // isValueASubtypeOf. Hence, at least one of the possible reference values
    -        // has to be non null and this value's upper type bound has to be non-empty.
    +        // has to be non-null and this value's upper type bound has to be non-empty.
     
             // It may be the case that the subtype relation of each individual value –
             // when compared with supertype – is Unknown, but that the type of the
    @@ -1036,7 +1036,7 @@ trait IsMultipleReferenceValue extends IsReferenceValue {
             var uniqueBaseValues = Set.empty[IsReferenceValue]
             uniqueBaseValues = baseValues.foldLeft(uniqueBaseValues)(_ + _.toCanonicalForm)
             // ...toSet is required because we potentially drop domain specific information
    -        // and afterwards the values are identical.
    +        // and afterward the values are identical.
             if (uniqueBaseValues.size == 1 &&
                 uniqueBaseValues.head.isNull == this.isNull &&
                 uniqueBaseValues.head.isPrecise == this.isPrecise &&
    @@ -1086,7 +1086,7 @@ case class AMultipleReferenceValue(
      * Defines an extractor method for instances of `IsReferenceValue` objects.
      *
      * @note To ensure that the generic type can be matched, it may be necessary to first cast
    - *       a ''generic'' `org.opalj.ai.ValuesDomain.DomainValue` to a
    + *       a ''generic'' `org.opalj.ai.ValuesDomain.DomainValue` to an
      *       `org.opalj.ai.ValuesDomain.DomainReferenceValue`.
      *       {{{
      *           val d : Domain = ...
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/AttributesTest.scala b/OPAL/br/src/test/scala/org/opalj/br/AttributesTest.scala
    index a1132ca0aa..57b757a002 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/AttributesTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/AttributesTest.scala
    @@ -32,7 +32,7 @@ class AttributesTest extends AnyFunSuite {
     
         test("test that the source file attribute is present") {
             val cf1 = ClassFile(attributesJARFile, "deprecated/DeprecatedByAnnotation.class").head
    -        assert(cf1.sourceFile != None)
    +        assert(cf1.sourceFile.isDefined)
         }
     
     }
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/ClassFileTest.scala b/OPAL/br/src/test/scala/org/opalj/br/ClassFileTest.scala
    index 1428ed506f..155e333901 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/ClassFileTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/ClassFileTest.scala
    @@ -39,7 +39,7 @@ class ClassFileTest extends AnyFunSuite with Matchers {
         }
     
         test("test that all constructors are returned") {
    -        assert(immutableList.constructors.size.toInt == 2)
    +        assert(immutableList.constructors.size == 2)
         }
     
         test("test that it can find all other methods") {
    @@ -165,7 +165,8 @@ class ClassFileTest extends AnyFunSuite with Matchers {
                     case b: Break[?]  => throw b
                     case t: Throwable =>
                         failures =
    -                        s"cannot calculate inner classes for ${classFile.fqn}: ${t.getClass().getSimpleName()} - ${t.getMessage()}" ::
    +                        s"cannot calculate inner classes for ${classFile.fqn}: ${t.getClass.getSimpleName} - ${t
    +                                .getMessage}" ::
                                 failures
                         None
                 }
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/CodeAttributeTest.scala b/OPAL/br/src/test/scala/org/opalj/br/CodeAttributeTest.scala
    index 63fa668bb5..0c36456103 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/CodeAttributeTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/CodeAttributeTest.scala
    @@ -27,9 +27,9 @@ class CodeAttributeTest extends AnyFlatSpec with Matchers {
     
         it should "only report the most specific handler and not all handers" in {
     
    -        nestedCatch.handlersFor(5).toList should be(Iterable(nestedCatch.exceptionHandlers(0)))
    -        nestedCatch.handlersFor(14).toList should be(Iterable(nestedCatch.exceptionHandlers(1)))
    -        nestedCatch.handlersFor(10).toList should be(Iterable(nestedCatch.exceptionHandlers(2)))
    +        nestedCatch.handlersFor(5) should be(Iterable(nestedCatch.exceptionHandlers(0)))
    +        nestedCatch.handlersFor(14) should be(Iterable(nestedCatch.exceptionHandlers(1)))
    +        nestedCatch.handlersFor(10) should be(Iterable(nestedCatch.exceptionHandlers(2)))
     
             // the last instruction
             nestedCatch.handlersFor(37) should be(empty)
    @@ -124,7 +124,7 @@ class CodeAttributeTest extends AnyFlatSpec with Matchers {
             instructions should be(
                 Seq(
                     PCAndInstruction(0, ALOAD_0),
    -                PCAndInstruction(1, GETFIELD(immutbleListClass, "e", ClassType.Object)),
    +                PCAndInstruction(1, GETFIELD(immutableListClass, "e", ClassType.Object)),
                     PCAndInstruction(4, ARETURN)
                 )
             )
    @@ -150,7 +150,7 @@ class CodeAttributeTest extends AnyFlatSpec with Matchers {
     
         behavior of "the \"Code\" attribute's firstLineNumber method"
     
    -    it should "be able to correctly extract the line number for the first instruction of aconstructor" in {
    +    it should "be able to correctly extract the line number for the first instruction of a äconstructor" in {
             codeOfConstructor.firstLineNumber should be(Some(18))
         }
         it should "be able to correctly extract the line number for the first instruction" in {
    @@ -239,7 +239,7 @@ private object CodeAttributeTest {
                 .find(_.name == "nestedCatch").get.body.get
     
         val boundedBufferClass = ClassType("code/BoundedBuffer")
    -    val immutbleListClass = ClassType("code/ImmutableList")
    +    val immutableListClass = ClassType("code/ImmutableList")
         val quickSortClass = ClassType("code/Quicksort")
     
         //
    @@ -277,7 +277,7 @@ private object CodeAttributeTest {
         // The code of the "put" method is excepted to have the following bytecode:
         // Method descriptor #13 (I)V
         // Stack: 3, Locals: 2
    -    //  public void put(int item) throws java.lang.InterruptedException;
    +    //  public void put(int item) throws java.lang.InterruptedException {
         //     0  aload_0 [this]
         //     1  getfield code.BoundedBuffer.numberInBuffer : int [18]
         //     4  aload_0 [this]
    @@ -324,7 +324,7 @@ private object CodeAttributeTest {
         //        [pc: 15, same]
         // }
     
    -    val codeOfGet = project.classFile(immutbleListClass).get.methods.find(_.name == "get").get.body.get
    +    val codeOfGet = project.classFile(immutableListClass).get.methods.find(_.name == "get").get.body.get
         // The code of get is as follows:
         // Method descriptor #30 ()Ljava/lang/Object;
         // Signature: ()TT;
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/MethodDescriptorTest.scala b/OPAL/br/src/test/scala/org/opalj/br/MethodDescriptorTest.scala
    index d98e624b5a..ba9c68938f 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/MethodDescriptorTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/MethodDescriptorTest.scala
    @@ -12,13 +12,13 @@ class MethodDescriptorTest extends AnyFunSuite {
     
         test("Parsing: ()V") {
             val md = MethodDescriptor("()V")
    -        assert(md.parameterTypes.size.toInt == 0)
    +        assert(md.parameterTypes.size == 0)
             assert(md.returnType.isVoidType)
         }
     
         test("Parsing: (III)I") {
             val md = MethodDescriptor("(III)I")
    -        assert(md.parameterTypes.size.toInt == 3)
    +        assert(md.parameterTypes.size == 3)
             assert(md.parameterTypes(0).isIntegerType)
             assert(md.parameterTypes(1).isIntegerType)
             assert(md.parameterTypes(2).isIntegerType)
    @@ -27,14 +27,14 @@ class MethodDescriptorTest extends AnyFunSuite {
     
         test("Parsing: ([I)[I") {
             val md = MethodDescriptor("([I)[I")
    -        assert(md.parameterTypes.size.toInt == 1)
    +        assert(md.parameterTypes.size == 1)
             assert(md.parameterTypes(0).isArrayType)
             assert(md.returnType.isArrayType)
         }
     
         test("Parsing: ([[[III)[I") {
             val md = MethodDescriptor("([[[III)[I")
    -        assert(md.parameterTypes.size.toInt == 3)
    +        assert(md.parameterTypes.size == 3)
             assert(md.parameterTypes(0).isArrayType)
             assert(md.parameterTypes(1).isIntegerType)
             assert(md.parameterTypes(2).isIntegerType)
    @@ -43,7 +43,7 @@ class MethodDescriptorTest extends AnyFunSuite {
     
         test("Parsing: (IDLjava/lang/Thread;)Ljava/lang/Object;") {
             val md = MethodDescriptor("(IDLjava/lang/Thread;)Ljava/lang/Object;")
    -        assert(md.parameterTypes.size.toInt == 3)
    +        assert(md.parameterTypes.size == 3)
             assert(md.parameterTypes(0).isIntegerType)
             assert(md.parameterTypes(1).isDoubleType)
             assert(md.parameterTypes(2).isClassType)
    @@ -52,7 +52,7 @@ class MethodDescriptorTest extends AnyFunSuite {
     
         test("Parsing: (IDLjava/lang/Thread;[J)[Ljava/lang/Object;") {
             val md = MethodDescriptor("(IDLjava/lang/Thread;[J)[Ljava/lang/Object;")
    -        assert(md.parameterTypes.size.toInt == 4)
    +        assert(md.parameterTypes.size == 4)
             assert(md.parameterTypes(0).isIntegerType)
             assert(md.parameterTypes(1).isDoubleType)
             assert(md.parameterTypes(2).isClassType)
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/SimilarityTestConfigurationTest.scala b/OPAL/br/src/test/scala/org/opalj/br/SimilarityTestConfigurationTest.scala
    index 6e1d6bdf93..5259bfb4d3 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/SimilarityTestConfigurationTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/SimilarityTestConfigurationTest.scala
    @@ -120,7 +120,7 @@ class SimilarityTestConfigurationTest extends AnyFunSuite with Matchers {
                     )
                 }
             }
    -        // the following class has less attributes
    +        // the following class has fewer attributes
             val noLongerDeprecatedClass = simpleClass.copy(attributes = ArraySeq(SourceFile("abc")))
     
             // normal test fails
    @@ -151,7 +151,7 @@ class SimilarityTestConfigurationTest extends AnyFunSuite with Matchers {
                     (newLeft, newRight)
                 }
             }
    -        // the following class has less attributes
    +        // the following class has fewer attributes
             val noLongerDeprecatedClass = simpleClass.copy(attributes = ArraySeq(SourceFile("abc")))
     
             // normal test fails
    @@ -180,7 +180,7 @@ class SimilarityTestConfigurationTest extends AnyFunSuite with Matchers {
                     )
                 }
             }
    -        // the following class has less fields
    +        // the following class has fewer fields
             val classWithLessFields = simpleClass.copy(fields = ArraySeq(simpleField))
     
             // normal test fails
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/TestSupport.scala b/OPAL/br/src/test/scala/org/opalj/br/TestSupport.scala
    index 434f97a2b0..6a7bb01879 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/TestSupport.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/TestSupport.scala
    @@ -137,7 +137,7 @@ object TestSupport {
     
         /**
          * @note     Using this method in combination with Scalatest, where the test cases are generated
    -     *           inside the loop, may lead to the situation that the project's are not gc'ed before
    +     *           inside the loop, may lead to the situation that the projects are not gc'ed before
          *           the entire test has completed!
          */
         def foreachBIProject(
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/analyses/ClassHierarchyTest.scala b/OPAL/br/src/test/scala/org/opalj/br/analyses/ClassHierarchyTest.scala
    index d94ea7cfc3..e7e2602e8e 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/analyses/ClassHierarchyTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/analyses/ClassHierarchyTest.scala
    @@ -52,8 +52,8 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
         val ArithmeticException = ClassType.ArithmeticException
         val Cloneable = ClassType.Cloneable
         val Serializable = ClassType.Serializable
    -    val SeriablizableArray = ArrayType(Serializable)
    -    val SeriablizableArrayOfArray = ArrayType(SeriablizableArray)
    +    val SerializableArray = ArrayType(Serializable)
    +    val SerializableArrayOfArray = ArrayType(SerializableArray)
         val AnUnknownType = ClassType("myTest/AnUnknownType")
         val AnUnknownTypeArray = ArrayType(AnUnknownType)
         val CloneableArray = ArrayType(Cloneable)
    @@ -189,7 +189,7 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
         val nestedInnerCovariantContainer = CTS("SimpleGeneric", List(elementType(covariantContainer)))
     
         /** SimpleGeneric> */
    -    val nestedOutterCovariantContainer = CTS("SimpleGeneric", List(upperBoundType(baseContainer)))
    +    val nestedOuterCovariantContainer = CTS("SimpleGeneric", List(upperBoundType(baseContainer)))
     
         /** SimpleGeneric> */
         val nestedContravariantContainer =
    @@ -234,21 +234,21 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
             List(SimpleCTS("Suffix1_1", List(elementType(baseCTS))), SimpleCTS("Suffix1_4", Nil))
         )
     
    -    /** GenericWithSuffix.Suffix1_1.Suffix1_5 // Suffix1_5 where T is not the FormalTypeParamter of the prefix of Suffix1_5. */
    +    /** GenericWithSuffix.Suffix1_1.Suffix1_5 // Suffix1_5 where T is not the FormalTypeParameter of the prefix of Suffix1_5. */
         val genericWithSuffix_Suffix1_5 = CTS(
             "GenericWithSuffix",
             List(elementType(baseCTS)),
             List(SimpleCTS("Suffix1_1", List(elementType(baseCTS))), SimpleCTS("Suffix1_5", List(elementType(baseCTS))))
         )
     
    -    /** GenericWithSuffix.Suffix1_1.Suffix1_5 // Suffix1_5 where T is not the FormalTypeParamter of the prefix of Suffix1_5. */
    +    /** GenericWithSuffix.Suffix1_1.Suffix1_5 // Suffix1_5 where T is not the FormalTypeParameter of the prefix of Suffix1_5. */
         val genericWithSuffix_altBase_Suffix1_5 = CTS(
             "GenericWithSuffix",
             List(elementType(altBaseCTS)),
             List(SimpleCTS("Suffix1_1", List(elementType(altBaseCTS))), SimpleCTS("Suffix1_5", List(elementType(baseCTS))))
         )
     
    -    /** GenericWithSuffix.Suffix1_1.Suffix1_5 // Suffix1_5 where T is not the FormalTypeParamter of the prefix of Suffix1_5. */
    +    /** GenericWithSuffix.Suffix1_1.Suffix1_5 // Suffix1_5 where T is not the FormalTypeParameter of the prefix of Suffix1_5. */
         val genericWithSuffix_Suffix1_5_altBase = CTS(
             "GenericWithSuffix",
             List(elementType(baseCTS)),
    @@ -262,7 +262,7 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
             List(SimpleCTS("Suffix1_1", List(elementType(baseCTS))), SimpleCTS("Suffix1_6", Nil))
         )
     
    -    /** GenericWithSuffix.Suffix1_1.Suffix1_6 // Suffix1_6 extends Suffix1_5 */
    +    /** GenericWithSuffix.Suffix1_1.Suffix1_6 // Suffix1_6 extends Suffix1_5 */
         val genericWithSuffix_altBase_Suffix1_6 = CTS(
             "GenericWithSuffix",
             List(elementType(altBaseCTS)),
    @@ -533,27 +533,27 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
         it should "correctly reflect the basic type hierarchy related to Arrays" in {
             preInitCH.isASubtypeOf(ObjectArray, Object) should be(Yes)
             preInitCH.isSubtypeOf(ObjectArray, Object) should be(true)
    -        preInitCH.isASubtypeOf(SeriablizableArray, ObjectArray) should be(Yes)
    -        preInitCH.isSubtypeOf(SeriablizableArray, ObjectArray) should be(true)
    +        preInitCH.isASubtypeOf(SerializableArray, ObjectArray) should be(Yes)
    +        preInitCH.isSubtypeOf(SerializableArray, ObjectArray) should be(true)
             preInitCH.isASubtypeOf(CloneableArray, ObjectArray) should be(Yes)
             preInitCH.isSubtypeOf(CloneableArray, ObjectArray) should be(true)
             preInitCH.isASubtypeOf(ObjectArray, ObjectArray) should be(Yes)
             preInitCH.isSubtypeOf(ObjectArray, ObjectArray) should be(true)
    -        preInitCH.isASubtypeOf(SeriablizableArray, SeriablizableArray) should be(Yes)
    -        preInitCH.isSubtypeOf(SeriablizableArray, SeriablizableArray) should be(true)
    +        preInitCH.isASubtypeOf(SerializableArray, SerializableArray) should be(Yes)
    +        preInitCH.isSubtypeOf(SerializableArray, SerializableArray) should be(true)
             preInitCH.isASubtypeOf(AnUnknownTypeArray, AnUnknownTypeArray) should be(Yes)
             preInitCH.isSubtypeOf(AnUnknownTypeArray, AnUnknownTypeArray) should be(true)
     
             preInitCH.isASubtypeOf(Object, ObjectArray) should be(No)
             preInitCH.isSubtypeOf(Object, ObjectArray) should be(false)
    -        preInitCH.isASubtypeOf(CloneableArray, SeriablizableArray) should be(No)
    -        preInitCH.isSubtypeOf(CloneableArray, SeriablizableArray) should be(false)
    +        preInitCH.isASubtypeOf(CloneableArray, SerializableArray) should be(No)
    +        preInitCH.isSubtypeOf(CloneableArray, SerializableArray) should be(false)
     
    -        preInitCH.isASubtypeOf(AnUnknownTypeArray, SeriablizableArray) should be(Unknown)
    -        preInitCH.isSubtypeOf(AnUnknownTypeArray, SeriablizableArray) should be(false)
    +        preInitCH.isASubtypeOf(AnUnknownTypeArray, SerializableArray) should be(Unknown)
    +        preInitCH.isSubtypeOf(AnUnknownTypeArray, SerializableArray) should be(false)
     
    -        preInitCH.isASubtypeOf(SeriablizableArray, AnUnknownTypeArray) should be(No)
    -        preInitCH.isSubtypeOf(SeriablizableArray, AnUnknownTypeArray) should be(false)
    +        preInitCH.isASubtypeOf(SerializableArray, AnUnknownTypeArray) should be(No)
    +        preInitCH.isSubtypeOf(SerializableArray, AnUnknownTypeArray) should be(false)
         }
     
         it should "correctly reflect the type hierarchy related to Arrays of primitives" in {
    @@ -573,25 +573,25 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
     
             preInitCH.isASubtypeOf(arrayOfIntArray, ObjectArray) should be(Yes)
             preInitCH.isSubtypeOf(arrayOfIntArray, ObjectArray) should be(true)
    -        preInitCH.isASubtypeOf(arrayOfIntArray, SeriablizableArray) should be(Yes)
    -        preInitCH.isSubtypeOf(arrayOfIntArray, SeriablizableArray) should be(true)
    +        preInitCH.isASubtypeOf(arrayOfIntArray, SerializableArray) should be(Yes)
    +        preInitCH.isSubtypeOf(arrayOfIntArray, SerializableArray) should be(true)
         }
     
         it should "correctly reflect the type hierarchy related to Arrays of Arrays" in {
    -        preInitCH.isASubtypeOf(SeriablizableArrayOfArray, Object) should be(Yes)
    -        preInitCH.isSubtypeOf(SeriablizableArrayOfArray, Object) should be(true)
    -        preInitCH.isASubtypeOf(SeriablizableArrayOfArray, SeriablizableArrayOfArray) should be(Yes)
    -        preInitCH.isSubtypeOf(SeriablizableArrayOfArray, SeriablizableArrayOfArray) should be(true)
    +        preInitCH.isASubtypeOf(SerializableArrayOfArray, Object) should be(Yes)
    +        preInitCH.isSubtypeOf(SerializableArrayOfArray, Object) should be(true)
    +        preInitCH.isASubtypeOf(SerializableArrayOfArray, SerializableArrayOfArray) should be(Yes)
    +        preInitCH.isSubtypeOf(SerializableArrayOfArray, SerializableArrayOfArray) should be(true)
     
    -        preInitCH.isASubtypeOf(SeriablizableArrayOfArray, SeriablizableArray) should be(Yes)
    -        preInitCH.isSubtypeOf(SeriablizableArrayOfArray, SeriablizableArray) should be(true)
    -        preInitCH.isASubtypeOf(SeriablizableArrayOfArray, ObjectArray) should be(Yes)
    -        preInitCH.isSubtypeOf(SeriablizableArrayOfArray, ObjectArray) should be(true)
    -        preInitCH.isASubtypeOf(SeriablizableArrayOfArray, CloneableArray) should be(Yes)
    -        preInitCH.isSubtypeOf(SeriablizableArrayOfArray, CloneableArray) should be(true)
    +        preInitCH.isASubtypeOf(SerializableArrayOfArray, SerializableArray) should be(Yes)
    +        preInitCH.isSubtypeOf(SerializableArrayOfArray, SerializableArray) should be(true)
    +        preInitCH.isASubtypeOf(SerializableArrayOfArray, ObjectArray) should be(Yes)
    +        preInitCH.isSubtypeOf(SerializableArrayOfArray, ObjectArray) should be(true)
    +        preInitCH.isASubtypeOf(SerializableArrayOfArray, CloneableArray) should be(Yes)
    +        preInitCH.isSubtypeOf(SerializableArrayOfArray, CloneableArray) should be(true)
     
    -        preInitCH.isASubtypeOf(SeriablizableArrayOfArray, AnUnknownTypeArray) should be(No)
    -        preInitCH.isSubtypeOf(SeriablizableArrayOfArray, AnUnknownTypeArray) should be(false)
    +        preInitCH.isASubtypeOf(SerializableArrayOfArray, AnUnknownTypeArray) should be(No)
    +        preInitCH.isSubtypeOf(SerializableArrayOfArray, AnUnknownTypeArray) should be(false)
         }
     
         behavior of "the ClassHierarchy's directSubtypesOf(UpperTypeBound) method"
    @@ -772,7 +772,7 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
             isASubtypeOf(nestedExtBase, nestedInnerCovariantContainer) should be(Yes)
             isASubtypeOf(nestedBase, nestedContravariantContainer) should be(Yes)
             isASubtypeOf(nestedBase, contravariantWithContainer) should be(Yes)
    -        isASubtypeOf(nestedBase, nestedOutterCovariantContainer) should be(Yes)
    +        isASubtypeOf(nestedBase, nestedOuterCovariantContainer) should be(Yes)
         }
     
         it should "return NO if nested type arguments of the subtype and the supertype doesn't match" in {
    @@ -896,7 +896,7 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
     
         behavior of "the ClassHierarchy's method to traverse the class hierarchy"
     
    -    it should "correctly find all suptypes of an interface" in {
    +    it should "correctly find all subtypes of an interface" in {
             import clusteringProject.classHierarchy
     
             val window = ClassType("pattern/decorator/example1/Window")
    @@ -932,7 +932,7 @@ class ClassHierarchyTest extends AnyFlatSpec with Matchers {
                 true
             )
     
    -    it should "correctly iterate over all suptypes of Object, even without the JDK included" in {
    +    it should "correctly iterate over all subtypes of Object, even without the JDK included" in {
             var foundSomeEnumerationClass = false
             jvmFeaturesProject.classHierarchy.foreachSubtypeCF(ClassType.Object, false) { subTypeCF =>
                 val subType = subTypeCF.thisType
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinClassTypesTest.scala b/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinClassTypesTest.scala
    index 09b5e73f38..bce2abd16a 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinClassTypesTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinClassTypesTest.scala
    @@ -19,9 +19,9 @@ import org.opalj.log.GlobalLogContext
     @RunWith(classOf[JUnitRunner])
     class JoinClassTypesTest extends AnyFunSpec with Matchers {
     
    -    final val classhierachy = {
    +    final val classhierarchy = {
             // val thisClass = classOf[org.opalj.br.analyses.JoinClassTypesTest]
    -        val thisClass = this.getClass()
    +        val thisClass = this.getClass
             val in = thisClass.getResourceAsStream("ClassHierarchyUpperBounds.ths")
             if (in == null)
                 throw new UnknownError("class hierarchy could not be loaded")
    @@ -49,11 +49,11 @@ class JoinClassTypesTest extends AnyFunSpec with Matchers {
             reflexive: Boolean,
             expected:  UIDSet[ClassType]
         ) = {
    -        val result = classhierachy.joinClassTypes(param1, param2, reflexive)
    +        val result = classhierarchy.joinClassTypes(param1, param2, reflexive)
             if (result != expected)
                 fail(
    -                s"${param1} join${if (reflexive) "(reflexive)" else ""}" +
    -                    s" ${param2} is ${mkString(result)};" +
    +                s"$param1 join${if (reflexive) "(reflexive)" else ""}" +
    +                    s" $param2 is ${mkString(result)};" +
                         s" expected ${mkString(expected)}"
                 )
         }
    @@ -64,7 +64,7 @@ class JoinClassTypesTest extends AnyFunSpec with Matchers {
             reflexive: Boolean,
             expected:  UIDSet[ClassType]
         ) = {
    -        val result = classhierachy.joinClassTypes(param1, param2, reflexive)
    +        val result = classhierarchy.joinClassTypes(param1, param2, reflexive)
             if (result != expected)
                 fail(
                     s"$param1 join${if (reflexive) "(reflexive)" else ""}" +
    @@ -79,28 +79,28 @@ class JoinClassTypesTest extends AnyFunSpec with Matchers {
             reflexive: Boolean,
             expected:  ClassType
         ) = {
    -        val result = classhierachy.joinClassTypesUntilSingleUpperBound(param1, param2, reflexive)
    +        val result = classhierarchy.joinClassTypesUntilSingleUpperBound(param1, param2, reflexive)
             if (result != expected)
                 fail(s"$param1 join $param2 ${if (reflexive) "(reflexive)" else ""}" +
    -                s" with joinClassTypesUntilSingleUpperBound(ClassType, ClassType, Boolean) is ${result};" +
    -                s" expected ${expected}")
    +                s" with joinObjectTypesUntilSingleUpperBound(ClassType, ObjectType, Boolean) is $result;" +
    +                s" expected $expected")
         }
     
         def testJoinClassTypesUntilSingleUpperBound(
             param:    UIDSet[ClassType],
             expected: ClassType
         ) = {
    -        val result = classhierachy.joinClassTypesUntilSingleUpperBound(param)
    +        val result = classhierarchy.joinClassTypesUntilSingleUpperBound(param)
             if (result != expected)
                 fail(s"join of ${mkString(param)}" +
    -                s" using joinClassTypesUntilSingleUpperBound(UIDSet[ClassType]) is ${result};" +
    -                s" expected ${expected}")
    +                s" using joinObjectTypesUntilSingleUpperBound(UIDSet[ClassType]) is $result;" +
    +                s" expected $expected")
     
         }
     
    -    describe("the behavior of the method joinClassTypes(ClassType,ClassType) of ClassHierachy") {
    +    describe("the behavior of the method joinClassTypes(ClassType,ClassType) of ClassHierarchy") {
             // uncomment to display the test graph:
    -        // io.writeAndOpen((toDot.generateDot(Set(classhierachy.toGraph))), "test", ".dot")
    +        // io.writeAndOpen((toDot.generateDot(Set(classhierarchy.toGraph))), "test", ".dot")
     
             describe("the behavior of joins with classes") {
     
    @@ -598,7 +598,7 @@ class JoinClassTypesTest extends AnyFunSpec with Matchers {
             }
         }
     
    -    describe("the behavior of the method joinClassTypesUntilSingleUpperBound of ClassHierachy") {
    +    describe("the behavior of the method joinClassTypesUntilSingleUpperBound of ClassHierarchy") {
             describe("the behavior of joins with classes") {
                 describe("the behavior of joins with sets containing one class") {
                     it("join class with itself should result in the same class") {
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinUpperBoundsTest.scala b/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinUpperBoundsTest.scala
    index 379810f95c..d2c28cfea8 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinUpperBoundsTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/analyses/JoinUpperBoundsTest.scala
    @@ -19,7 +19,7 @@ import org.opalj.log.GlobalLogContext
     @RunWith(classOf[JUnitRunner])
     class JoinUpperBoundsTest extends AnyFunSpec with Matchers {
     
    -    val classhierachy =
    +    val classhierarchy: ClassHierarchy =
             ClassHierarchy(
                 Iterable.empty,
                 List(() => this.getClass.getResourceAsStream("ClassHierarchyUpperBounds.ths"))
    @@ -41,7 +41,7 @@ class JoinUpperBoundsTest extends AnyFunSpec with Matchers {
             def mkString(param: UIDSet[ClassType]) = {
                 param.toSeq.map(_.toJava).mkString("{", ",", "}")
             }
    -        val result1_2 = classhierachy.joinUpperTypeBounds(param1, param2, reflexive)
    +        val result1_2 = classhierarchy.joinUpperTypeBounds(param1, param2, reflexive)
             if (result1_2 != expected) {
                 fail(
                     s"${mkString(param1)} join${if (reflexive) "(reflexive)" else ""}" +
    @@ -50,7 +50,7 @@ class JoinUpperBoundsTest extends AnyFunSpec with Matchers {
                 )
             }
     
    -        val result2_1 = classhierachy.joinUpperTypeBounds(param2, param1, reflexive)
    +        val result2_1 = classhierarchy.joinUpperTypeBounds(param2, param1, reflexive)
             if (result2_1 != expected) {
                 fail(s"${mkString(param2)} join${if (reflexive) "(reflexive)" else ""}" +
                     s" ${mkString(param1)} is ${mkString(result2_1)};" +
    @@ -59,9 +59,9 @@ class JoinUpperBoundsTest extends AnyFunSpec with Matchers {
     
         }
     
    -    describe("the behavior of the method joinUpperTypeBounds of ClassHierachy") {
    +    describe("the behavior of the method joinUpperTypeBounds of ClassHierarchy") {
             // uncomment to display the test graph:
    -        // io.writeAndOpen((toDot.generateDot(Set(classhierachy.toGraph))), "test", ".dot")
    +        // io.writeAndOpen((toDot.generateDot(Set(classhierarchy.toGraph))), "test", ".dot")
     
             describe("the behavior of joins with classes") {
                 describe("the behavior of joins with sets containing one class") {
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/analyses/ProjectTest.scala b/OPAL/br/src/test/scala/org/opalj/br/analyses/ProjectTest.scala
    index 62869490da..72fd9aa9b5 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/analyses/ProjectTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/analyses/ProjectTest.scala
    @@ -205,7 +205,7 @@ class ProjectTest extends AnyFlatSpec with Matchers {
     
             val pik = new TestProjectInformationKey
             project.get(pik)
    -        // the other tests may also attach information..
    +        // the other tests may also attach information...
             project.availableProjectInformation.length should be >= 1
             project.availableProjectInformation should contain(pik.theResult)
         }
    @@ -225,10 +225,10 @@ class ProjectTest extends AnyFlatSpec with Matchers {
         it should "be able to compute project information that has requirements" in {
             val pik = new TestProjectInformationWithDependenciesKey
             project.get(pik) should be(pik.theResult)
    -        // the other tests may also attach information..
    +        // the other tests may also attach information...
             project.availableProjectInformation.length should be >= 3
    -        project.availableProjectInformation should contain(pik.depdencies.head.theResult)
    -        project.availableProjectInformation should contain(pik.depdencies.tail.head.theResult)
    +        project.availableProjectInformation should contain(pik.dependencies.head.theResult)
    +        project.availableProjectInformation should contain(pik.dependencies.tail.head.theResult)
         }
     
         behavior of "a Project's projectPackages methods"
    @@ -751,11 +751,11 @@ private class TestProjectInformationWithDependenciesKey extends ProjectInformati
     
         val theResult = new Object()
     
    -    val depdencies = List(new TestProjectInformationKey, new TestProjectInformationKey)
    +    val dependencies = List(new TestProjectInformationKey, new TestProjectInformationKey)
     
         override def compute(project: SomeProject): Object = theResult
     
    -    override def requirements(project: SomeProject): Seq[ProjectInformationKey[? <: AnyRef, ? <: AnyRef]] = depdencies
    +    override def requirements(project: SomeProject): Seq[ProjectInformationKey[? <: AnyRef, ? <: AnyRef]] = dependencies
     
     }
     
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/analyses/StringConstantsInformationKeyTest.scala b/OPAL/br/src/test/scala/org/opalj/br/analyses/StringConstantsInformationKeyTest.scala
    index fe347916d8..62e44390c1 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/analyses/StringConstantsInformationKeyTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/analyses/StringConstantsInformationKeyTest.scala
    @@ -31,7 +31,7 @@ class StringConstantsInformationKeyTest extends AnyFlatSpec with Matchers {
         behavior of "StringConstantsInformationKey"
     
         it should "collect all Strings in the strings project" in {
    -        // expected is a lower bound.. more are in the project!
    +        // expected is a lower bound. more are in the project!
             val expected = Set("List(", "1,2,3", ")", "yes", "no", "0123456789")
             val found = stringsProject.get(StringConstantsInformationKey).keys.toSet
             assert(expected.forall { found.contains })
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/fpcf/properties/PurityPropertyTest.scala b/OPAL/br/src/test/scala/org/opalj/br/fpcf/properties/PurityPropertyTest.scala
    index 7b35cf0d20..f708e9a6df 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/fpcf/properties/PurityPropertyTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/fpcf/properties/PurityPropertyTest.scala
    @@ -83,7 +83,7 @@ class PurityPropertyTest extends AnyFlatSpec with Matchers {
             for (prop <- allPurities) {
                 assert(
                     prop.usesDomainSpecificActions != doesntUseDomainSpecificActions.contains(prop),
    -                s"$prop.usesDomainSpecicifActions was ${prop.usesDomainSpecificActions}"
    +                s"$prop.usesDomainSpecificActions was ${prop.usesDomainSpecificActions}"
                 )
             }
         }
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/instructions/ClassFileFactoryTest.scala b/OPAL/br/src/test/scala/org/opalj/br/instructions/ClassFileFactoryTest.scala
    index f2bf6a4532..2c16023fb6 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/instructions/ClassFileFactoryTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/instructions/ClassFileFactoryTest.scala
    @@ -261,7 +261,7 @@ class ClassFileFactoryTest extends AnyFunSpec with Matchers {
                             }
                         parameters.foreach { requiredParameter =>
                             val remainingInstructions =
    -                            instructions.slice(currentInstruction, instructions.size)
    +                            instructions.slice(currentInstruction, instructions.length)
                             val consumedInstructions =
                                 requiredParameter match {
                                     case IntegerType      => requireIntLoad(remainingInstructions)
    @@ -930,7 +930,7 @@ class ClassFileFactoryTest extends AnyFunSpec with Matchers {
                 }
             }
     
    -        describe("should be able to profixy $newInstance methods") {
    +        describe("should be able to proxify $newInstance methods") {
                 it("by picking an alternate name for the factory method") {
                     val lambdas = lambdasProject.allProjectClassFiles.find(_.fqn == "lambdas/Lambdas").get
                     val theType = ClassType("ClassFileFactoryTest$newInstanceName")
    @@ -1504,7 +1504,7 @@ class ClassFileFactoryTest extends AnyFunSpec with Matchers {
                         null,
                         LDC(ConstantString(instantiatedMethodType.toJVMDescriptor)),
                         null,
    -                    // Add the caputeredArgs
    +                    // Add the capturedArgs
                         BIPUSH(2),
                         null,
                         ANEWARRAY(ClassType.Object),
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/instructions/FactoryMethodsOfInstructionTest.scala b/OPAL/br/src/test/scala/org/opalj/br/instructions/FactoryMethodsOfInstructionTest.scala
    index 7ee5a2dfe0..898798459c 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/instructions/FactoryMethodsOfInstructionTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/instructions/FactoryMethodsOfInstructionTest.scala
    @@ -19,7 +19,7 @@ class FactoryMethodsOfInstructionTest extends AnyFlatSpec {
     
         val declaringClass = "my/invoke/Class"
     
    -    val methodName = "myMythod"
    +    val methodName = "myMethod"
         val methodDescriptor = "()V"
     
         val fieldName = "myField"
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/instructions/LoadConstantInstructionTest.scala b/OPAL/br/src/test/scala/org/opalj/br/instructions/LoadConstantInstructionTest.scala
    index 30e9a6cfe9..a0bd04dbdf 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/instructions/LoadConstantInstructionTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/instructions/LoadConstantInstructionTest.scala
    @@ -37,7 +37,7 @@ class LoadConstantInstructionTest extends AnyFunSpec with Matchers {
                 ) foreach { i => LoadConstantInstruction(i) should be(BIPUSH(i)) }
             }
     
    -        it("short values that are larger/smaller than byte values shoud use sipush") {
    +        it("short values that are larger/smaller than byte values should use sipush") {
                 Seq(
                     Short.MinValue.toInt,
                     Byte.MinValue.toInt - 1,
    @@ -50,8 +50,8 @@ class LoadConstantInstructionTest extends AnyFunSpec with Matchers {
             it("integer values larger/smaller than short values should use ") {
                 Seq(
                     Short.MaxValue.toInt + 1,
    -                Int.MaxValue.toInt / 2,
    -                Int.MaxValue.toInt
    +                Int.MaxValue / 2,
    +                Int.MaxValue
                 ) foreach { i => LoadConstantInstruction(i) should be(LoadInt(i)) }
             }
         }
    diff --git a/OPAL/br/src/test/scala/org/opalj/br/reader/BasicLambdaExpressionsRewritingTest.scala b/OPAL/br/src/test/scala/org/opalj/br/reader/BasicLambdaExpressionsRewritingTest.scala
    index 358247d4b4..8fa86b6afd 100644
    --- a/OPAL/br/src/test/scala/org/opalj/br/reader/BasicLambdaExpressionsRewritingTest.scala
    +++ b/OPAL/br/src/test/scala/org/opalj/br/reader/BasicLambdaExpressionsRewritingTest.scala
    @@ -123,7 +123,7 @@ class BasicLambdaExpressionsRewritingTest extends AnyFunSpec with Matchers {
             }
     
             // Make sure to get the correct instruction, Integer::compareUnsigned has 3
    -        // MethodInvokations in the proxy class, 2x intValue for getting the value of the int and
    +        // MethodInvocations in the proxy class, 2x intValue for getting the value of the int and
             // compareUnsigned for the actual comparison. This method must return the last one, which
             // is compareUnsigned
             val invocationInstruction = invocationInstructions
    diff --git a/OPAL/common/src/main/scala/org/opalj/Result.scala b/OPAL/common/src/main/scala/org/opalj/Result.scala
    index 69c55eb34a..687369920c 100644
    --- a/OPAL/common/src/main/scala/org/opalj/Result.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/Result.scala
    @@ -96,7 +96,7 @@ object NoResult {
     }
     
     /**
    - * The computation '''finished''', but did no produce any results or the result was filtered.
    + * The computation '''finished''', but did not produce any results or the result was filtered.
      *
      * @note    The precise semantics of ''succeeded without results'' is dependent on the semantics
      *          of the concrete computation and needs to be defined per use case.
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/IntIterator.scala b/OPAL/common/src/main/scala/org/opalj/collection/IntIterator.scala
    index 9e911cab51..4f90775c94 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/IntIterator.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/IntIterator.scala
    @@ -10,7 +10,7 @@ import org.opalj.collection.immutable.IntTrieSet
     import org.opalj.collection.immutable.IntTrieSet1
     
     /**
    - * Iterator over a collection of primitive int valuea; basically overrides all inherited methods
    + * Iterator over a collection of primitive int values; basically overrides all inherited methods
      * to avoid (un)boxing.
      *
      * @note   No guarantee is given what will happen if `next` is called after `hasNext` returns or
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/QualifiedCollection.scala b/OPAL/common/src/main/scala/org/opalj/collection/QualifiedCollection.scala
    index 15693c9741..00f389210d 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/QualifiedCollection.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/QualifiedCollection.scala
    @@ -30,7 +30,7 @@ sealed trait QualifiedCollection[+S] {
     
         /**
          * Returns `true` if the underlying collection is not guaranteed to contain all elements (w.r.t.
    -     * some query/analysis/...
    +     * some query/analysis/...)
          */
         final def isIncomplete: Boolean = !isComplete
     }
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/SetRelation.scala b/OPAL/common/src/main/scala/org/opalj/collection/SetRelation.scala
    index a449411874..2f13021872 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/SetRelation.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/SetRelation.scala
    @@ -10,6 +10,9 @@ package collection
     sealed abstract class SetRelation
     
     object StrictSubset extends SetRelation
    +
     object EqualSets extends SetRelation
    +
     object StrictSuperset extends SetRelation
    +
     object UncomparableSets extends SetRelation
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/eval/MapsEval.scala b/OPAL/common/src/main/scala/org/opalj/collection/eval/MapsEval.scala
    index fd6a09d28c..ed393665a5 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/eval/MapsEval.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/eval/MapsEval.scala
    @@ -46,7 +46,7 @@ object MapsEval extends App {
         @nowarn("msg=deprecated")
         val anyRefMap = scala.collection.mutable.AnyRefMap.empty[T, Object]
         val trieMap = scala.collection.concurrent.TrieMap.empty[T, Object]
    -    // immmutable maps...
    +    // immutable maps...
         var hashMap = scala.collection.immutable.HashMap.empty[T, Object]
         var treeMap = scala.collection.immutable.TreeMap.empty[T, Object]
     
    @@ -66,7 +66,7 @@ object MapsEval extends App {
     
         time {
             ls.foreach { s =>
    -            anyRefMap += (s -> theObject) // <= faster then adding it using pairs...
    +            anyRefMap += (s -> theObject) // <= faster than adding it using pairs...
                 // anyRefMap += ((s, theObject()))
             }: @nowarn("msg=deprecated")
         } { t => println("mutable AnyRefMap.add: " + t.toSeconds) }
    @@ -93,8 +93,8 @@ object MapsEval extends App {
                     (1 to Repetitions).foreach { i => ls.foreach { s => t += jConcurrentMap.get(s).hashCode } }
                 }
             })
    -        ts.foreach(t => t.start)
    -        ts.foreach(t => t.join)
    +        ts.foreach(t => t.start())
    +        ts.foreach(t => t.join())
         } { t => println("Java ConcurrentHashMap.get: " + t.toSeconds) }
     
         time {
    @@ -103,8 +103,8 @@ object MapsEval extends App {
                     (1 to Repetitions).foreach { i => ls.foreach { s => t += jHashMap.get(s).hashCode } }
                 }
             })
    -        ts.foreach(t => t.start)
    -        ts.foreach(t => t.join)
    +        ts.foreach(t => t.start())
    +        ts.foreach(t => t.join())
         } { t => println("Java HashMap.get: " + t.toSeconds) }
     
         time {
    @@ -113,8 +113,8 @@ object MapsEval extends App {
                     (1 to Repetitions).foreach { i => ls.foreach { s => t += anyRefMap(s).hashCode } }
                 }
             })
    -        ts.foreach(t => t.start)
    -        ts.foreach(t => t.join)
    +        ts.foreach(t => t.start())
    +        ts.foreach(t => t.join())
         } { t => println("AnyRefMap.get: " + t.toSeconds) }
     
         time {
    @@ -123,8 +123,8 @@ object MapsEval extends App {
                     (1 to Repetitions).foreach { i => ls.foreach { s => t += trieMap(s).hashCode } }
                 }
             })
    -        ts.foreach(t => t.start)
    -        ts.foreach(t => t.join)
    +        ts.foreach(t => t.start())
    +        ts.foreach(t => t.join())
         } { t => println("concurrent.TrieMap.get: " + t.toSeconds) }
     
         time {
    @@ -133,8 +133,8 @@ object MapsEval extends App {
                     (1 to Repetitions).foreach { i => ls.foreach { s => t += anyRefMap(s).hashCode } }
                 }
             })
    -        ts.foreach(t => t.start)
    -        ts.foreach(t => t.join)
    +        ts.foreach(t => t.start())
    +        ts.foreach(t => t.join())
         } { t => println("immutable HashMap.get: " + t.toSeconds) }
     
         time {
    @@ -143,8 +143,8 @@ object MapsEval extends App {
                     (1 to Repetitions).foreach { i => ls.foreach { s => t += treeMap(s).hashCode } }
                 }
             })
    -        ts.foreach(t => t.start)
    -        ts.foreach(t => t.join)
    +        ts.foreach(t => t.start())
    +        ts.foreach(t => t.join())
         } { t => println("immutable TreeMap.get: " + t.toSeconds) }
     
         println(s"\n Run: $t")
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/eval/SetsEval.scala b/OPAL/common/src/main/scala/org/opalj/collection/eval/SetsEval.scala
    index db00f3ea08..efffa50262 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/eval/SetsEval.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/eval/SetsEval.scala
    @@ -42,7 +42,7 @@ object SetsEval extends App {
         //
         val mHashSet = scala.collection.mutable.HashSet.empty[T]
         val mTreeSet = scala.collection.mutable.TreeSet.empty[T]
    -    // imutable maps...
    +    // immutable maps...
         var iHashSet = scala.collection.immutable.HashSet.empty[T]
         var iTreeSet = scala.collection.immutable.TreeSet.empty[T]
     
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/BitArraySet.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/BitArraySet.scala
    index e627a5e3a5..fe3e168cc8 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/BitArraySet.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/BitArraySet.scala
    @@ -27,8 +27,8 @@ sealed abstract class BitArraySet extends BitSet { thisSet =>
     
         final def |(that: BitArraySet): BitArraySet = this ++ that
     
    -    override def equals(other: Any): Boolean
    -    override def hashCode: Int
    +    def equals(other: Any): Boolean
    +    def hashCode: Int
     
         override final def toString: String = mkString("BitArraySet(", ",", ")")
     
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Int2List.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Int2List.scala
    index a15b7ff372..8f3275efd3 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Int2List.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Int2List.scala
    @@ -61,9 +61,9 @@ object Int2List {
     
         def empty: Int2List = Int2ListEnd
     
    -    def apply(v: Int): Int2List = new Int2ListNode(Int.MinValue, v, Int2ListEnd)
    +    def apply(v: Int): Int2List = Int2ListNode(Int.MinValue, v, Int2ListEnd)
     
    -    def apply(head: Int, last: Int): Int2List = new Int2ListNode(head, last, Int2ListEnd)
    +    def apply(head: Int, last: Int): Int2List = Int2ListNode(head, last, Int2ListEnd)
     
     }
     
    @@ -87,14 +87,14 @@ case object Int2ListEnd extends Int2List {
         override def forFirstN[U](n: Int)(f: Int => U): Unit = {}
         override def iterator: IntIterator = IntIterator.empty
         /** Prepends the given value to this list. E.g., `l = 2l +: l`. */
    -    override def +:(v: Int): Int2List = new Int2ListNode(Int.MinValue, v, this)
    +    override def +:(v: Int): Int2List = Int2ListNode(Int.MinValue, v, this)
     
         override def equals(that: Int2List): Boolean = this eq that
         override def hashCode(): Int = 37
     }
     
     /**
    - * An container for a list element.
    + * A container for a list element.
      *
      * @author Michael Eichberg
      */
    @@ -122,13 +122,11 @@ final case class Int2ListNode(
         override def forFirstN[U](n: Int)(f: Int => U): Unit = {
             n match {
                 case 0 =>
    -                return;
                 case 1 =>
                     if (h != Int.MinValue)
                         f(h)
                     else
                         f(t)
    -                return;
                 case _ =>
                     // ... n >= 2
                     var i = n - 1 // <= for the second element...
    @@ -165,9 +163,9 @@ final case class Int2ListNode(
     
         override def +:(v: Int): Int2List = {
             if (h != Int.MinValue)
    -            new Int2ListNode(Int.MinValue, v, this)
    +            Int2ListNode(Int.MinValue, v, this)
             else
    -            new Int2ListNode(v, t, this.rest)
    +            Int2ListNode(v, t, this.rest)
         }
     
         override def equals(that: Int2List): Boolean = {
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntArraySet.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntArraySet.scala
    index a82bbf8a11..11c7133079 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntArraySet.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntArraySet.scala
    @@ -54,7 +54,7 @@ case object EmptyIntArraySet extends IntArraySet {
         override def flatMap(f:        Int => IntArraySet): IntArraySet = this
         override def -(i:              Int): this.type = this
         override def subsetOf(other:   IntArraySet): Boolean = true
    -    override def +(i:              Int): IntArraySet1 = new IntArraySet1(i)
    +    override def +(i:              Int): IntArraySet1 = IntArraySet1(i)
         override def iterator: IntIterator = IntIterator.empty
         override def reverseIntIterator: IntIterator = IntIterator.empty
         override def contains(value: Int): Boolean = false
    @@ -90,7 +90,7 @@ case class IntArraySet1(i: Int) extends IntArraySet {
             val i = this.i
             val newI = f(i)
             if (newI != i)
    -            new IntArraySet1(newI)
    +            IntArraySet1(newI)
             else
                 this
         }
    @@ -99,7 +99,7 @@ case class IntArraySet1(i: Int) extends IntArraySet {
             if (mappedI == i)
                 this
             else
    -            new IntArraySet1(mappedI)
    +            IntArraySet1(mappedI)
         }
         override def flatMap(f: Int => IntArraySet): IntArraySet = f(i)
         override def -(i:       Int): IntArraySet = if (this.i != i) this else EmptyIntArraySet
    @@ -108,9 +108,9 @@ case class IntArraySet1(i: Int) extends IntArraySet {
             if (thisI == i)
                 this
             else if (thisI < i)
    -            new IntArraySet2(thisI, i)
    +            IntArraySet2(thisI, i)
             else
    -            new IntArraySet2(i, thisI)
    +            IntArraySet2(i, thisI)
         }
         override def iterator: IntIterator = IntIterator(i)
         override def reverseIntIterator: IntIterator = IntIterator(i)
    @@ -134,7 +134,7 @@ case class IntArraySet1(i: Int) extends IntArraySet {
     }
     
     /**
    - * Represents an orderd set of two values where i1 has to be smaller than i2.
    + * Represents an ordered set of two values where i1 has to be smaller than i2.
      */
     private[immutable] case class IntArraySet2(i1: Int, i2: Int) extends IntArraySet {
     
    @@ -165,9 +165,9 @@ private[immutable] case class IntArraySet2(i1: Int, i2: Int) extends IntArraySet
         override def withFilter(p: Int => Boolean): IntArraySet = {
             if (p(i1)) {
                 if (p(i2)) this
    -            else new IntArraySet1(i1)
    +            else IntArraySet1(i1)
             } else {
    -            if (p(i2)) new IntArraySet1(i2)
    +            if (p(i2)) IntArraySet1(i2)
                 else
                     EmptyIntArraySet
             }
    @@ -187,19 +187,19 @@ private[immutable] case class IntArraySet2(i1: Int, i2: Int) extends IntArraySet
         }
         override def flatMap(f: Int => IntArraySet): IntArraySet = f(i1) ++ f(i2)
         override def -(i: Int): IntArraySet = {
    -        if (i == i1) new IntArraySet1(i2)
    -        else if (i == i2) new IntArraySet1(i1)
    +        if (i == i1) IntArraySet1(i2)
    +        else if (i == i2) IntArraySet1(i1)
             else this
         }
         override def +(i: Int): IntArraySet = {
             if (i <= i1) {
                 if (i == i1) this
    -            else new IntArraySet3(i, i1, i2)
    +            else IntArraySet3(i, i1, i2)
             } else if (i <= i2) {
                 if (i == i2) this
    -            else new IntArraySet3(i1, i, i2)
    +            else IntArraySet3(i1, i, i2)
             } else {
    -            new IntArraySet3(i1, i2, i)
    +            IntArraySet3(i1, i2, i)
             }
         }
         override def contains(value: Int): Boolean = value == i1 || value == i2
    @@ -220,7 +220,7 @@ private[immutable] case class IntArraySet2(i1: Int, i2: Int) extends IntArraySet
     }
     
     /**
    - * Represents an orderd set of three int values: i1 < i2 < i3.
    + * Represents an ordered set of three int values: i1 < i2 < i3.
      */
     private[immutable] case class IntArraySet3(i1: Int, i2: Int, i3: Int) extends IntArraySet {
     
    @@ -257,22 +257,22 @@ private[immutable] case class IntArraySet3(i1: Int, i2: Int, i3: Int) extends In
                     if (p(i3))
                         this
                     else
    -                    new IntArraySet2(i1, i2)
    +                    IntArraySet2(i1, i2)
                 } else {
                     if (p(i3))
    -                    new IntArraySet2(i1, i3)
    +                    IntArraySet2(i1, i3)
                     else
    -                    new IntArraySet1(i1)
    +                    IntArraySet1(i1)
                 }
             } else {
                 if (p(i2)) {
                     if (p(i3))
    -                    new IntArraySet2(i2, i3)
    +                    IntArraySet2(i2, i3)
                     else
    -                    new IntArraySet1(i2)
    +                    IntArraySet1(i2)
                 } else {
                     if (p(i3))
    -                    new IntArraySet1(i3)
    +                    IntArraySet1(i3)
                     else
                         IntArraySet.empty
                 }
    @@ -296,28 +296,28 @@ private[immutable] case class IntArraySet3(i1: Int, i2: Int, i3: Int) extends In
         override def flatMap(f: Int => IntArraySet): IntArraySet = f(i1) ++ f(i2) ++ f(i3)
     
         override def -(i: Int): IntArraySet = {
    -        if (i1 == i) new IntArraySet2(i2, i3)
    -        else if (i2 == i) new IntArraySet2(i1, i3)
    -        else if (i3 == i) new IntArraySet2(i1, i2)
    +        if (i1 == i) IntArraySet2(i2, i3)
    +        else if (i2 == i) IntArraySet2(i1, i3)
    +        else if (i3 == i) IntArraySet2(i1, i2)
             else this
         }
         override def +(i: Int): IntArraySet = {
             if (i < i2) {
                 if (i < i1)
    -                new IntArraySetN(Array[Int](i, i1, i2, i3))
    +                IntArraySetN(Array[Int](i, i1, i2, i3))
                 else if (i == i1)
                     this
                 else
    -                new IntArraySetN(Array[Int](i1, i, i2, i3))
    +                IntArraySetN(Array[Int](i1, i, i2, i3))
             } else if (i < i3) {
                 if (i == i2)
                     this
                 else
    -                new IntArraySetN(Array[Int](i1, i2, i, i3))
    +                IntArraySetN(Array[Int](i1, i2, i, i3))
             } else if (i == i3)
                 this
             else
    -            new IntArraySetN(Array[Int](i1, i2, i3, i))
    +            IntArraySetN(Array[Int](i1, i2, i3, i))
         }
         override def contains(value: Int): Boolean = value == i1 || value == i2 || value == i3
         override def exists(p:       Int => Boolean): Boolean = p(i1) || p(i2) || p(i3)
    @@ -421,17 +421,17 @@ case class IntArraySetN private[immutable] (
             if (index >= 0) {
                 if (is.length == 4) {
                     index match {
    -                    case 0 => new IntArraySet3(is(1), is(2), is(3))
    -                    case 1 => new IntArraySet3(is(0), is(2), is(3))
    -                    case 2 => new IntArraySet3(is(0), is(1), is(3))
    -                    case 3 => new IntArraySet3(is(0), is(1), is(2))
    +                    case 0 => IntArraySet3(is(1), is(2), is(3))
    +                    case 1 => IntArraySet3(is(0), is(2), is(3))
    +                    case 2 => IntArraySet3(is(0), is(1), is(3))
    +                    case 3 => IntArraySet3(is(0), is(1), is(2))
                     }
                 } else {
                     // the element is found
                     val targetIs = new Array[Int](is.length - 1)
                     System.arraycopy(is, 0, targetIs, 0, index)
                     System.arraycopy(is, index + 1, targetIs, index, is.length - 1 - index)
    -                new IntArraySetN(targetIs)
    +                IntArraySetN(targetIs)
                 }
             } else {
                 this
    @@ -448,7 +448,7 @@ case class IntArraySetN private[immutable] (
                 targetIs(insertionPoint) = i
                 val count = is.length - insertionPoint
                 System.arraycopy(is, insertionPoint, targetIs, insertionPoint + 1, count)
    -            new IntArraySetN(targetIs)
    +            IntArraySetN(targetIs)
             } else {
                 this
             }
    @@ -537,14 +537,14 @@ private[immutable] class FilteredIntArraySet(
                             }
                             targetIsIndex match {
                                 case 0 => EmptyIntArraySet
    -                            case 1 => new IntArraySet1(targetIs(0))
    -                            case 2 => new IntArraySet2(targetIs(0), targetIs(1))
    -                            case 3 => new IntArraySet3(targetIs(0), targetIs(1), targetIs(2))
    +                            case 1 => IntArraySet1(targetIs(0))
    +                            case 2 => IntArraySet2(targetIs(0), targetIs(1))
    +                            case 3 => IntArraySet3(targetIs(0), targetIs(1), targetIs(2))
                                 case _ =>
                                     if (targetIsIndex == max) // no value was filtered...
                                         origS
                                     else {
    -                                    new IntArraySetN(JArrays.copyOf(targetIs, targetIsIndex))
    +                                    IntArraySetN(JArrays.copyOf(targetIs, targetIsIndex))
                                     }
     
                             }
    @@ -660,16 +660,16 @@ class IntArraySetBuilder private[immutable] (
         override def result(): IntArraySet = {
             size match {
                 case 0 => EmptyIntArraySet
    -            case 1 => new IntArraySet1(is(0))
    -            case 2 => new IntArraySet2(is(0), is(1))
    -            case 3 => new IntArraySet3(is(0), is(1), is(2))
    +            case 1 => IntArraySet1(is(0))
    +            case 2 => IntArraySet2(is(0), is(1))
    +            case 3 => IntArraySet3(is(0), is(1), is(2))
                 case _ =>
                     if (size == is.length)
    -                    new IntArraySetN(is)
    +                    IntArraySetN(is)
                     else {
                         val targetIs = new Array[Int](size)
                         System.arraycopy(is, 0, targetIs, 0, size)
    -                    new IntArraySetN(targetIs)
    +                    IntArraySetN(targetIs)
                     }
     
             }
    @@ -705,11 +705,11 @@ object IntArraySet {
     
         def empty: IntArraySet = EmptyIntArraySet
     
    -    def apply(i: Int): IntArraySet = new IntArraySet1(i)
    +    def apply(i: Int): IntArraySet = IntArraySet1(i)
     
         def apply(i1: Int, i2: Int): IntArraySet = {
    -        if (i1 < i2) new IntArraySet2(i1, i2)
    -        else if (i1 == i2) new IntArraySet1(i1)
    +        if (i1 < i2) IntArraySet2(i1, i2)
    +        else if (i1 == i2) IntArraySet1(i1)
             else IntArraySet2(i2, i1)
         }
     
    @@ -717,7 +717,7 @@ object IntArraySet {
             if (i1 == i2)
                 return IntArraySet(i2, i3);
             if (i1 == i3 || i2 == i3)
    -            return if (i1 < i2) new IntArraySet2(i1, i2) else new IntArraySet2(i2, i1);
    +            return if (i1 < i2) IntArraySet2(i1, i2) else IntArraySet2(i2, i1);
     
             // ... all three values are different
             var v0 = 0
    @@ -730,10 +730,10 @@ object IntArraySet {
                 v1 = i1
             }
             if (i3 < v1) {
    -            if (i3 < v0) new IntArraySet3(i3, v0, v1)
    -            else new IntArraySet3(v0, i3, v1)
    +            if (i3 < v0) IntArraySet3(i3, v0, v1)
    +            else IntArraySet3(v0, i3, v1)
             } else {
    -            new IntArraySet3(v0, v1, i3)
    +            IntArraySet3(v0, v1, i3)
             }
         }
     
    @@ -744,20 +744,20 @@ object IntArraySet {
         def _UNSAFE_fromSorted(data: Array[Int]): IntArraySet = {
             data.length match {
                 case 0 => EmptyIntArraySet
    -            case 1 => new IntArraySet1(data(0))
    -            case 2 => new IntArraySet2(data(0), data(1))
    -            case 3 => new IntArraySet3(data(0), data(1), data(2))
    -            case _ => new IntArraySetN(data)
    +            case 1 => IntArraySet1(data(0))
    +            case 2 => IntArraySet2(data(0), data(1))
    +            case 3 => IntArraySet3(data(0), data(1), data(2))
    +            case _ => IntArraySetN(data)
             }
         }
     
         def _UNSAFE_from(data: Array[Int]): IntArraySet = {
             data.length match {
                 case 0 => EmptyIntArraySet
    -            case 1 => new IntArraySet1(data(0))
    +            case 1 => IntArraySet1(data(0))
                 case 2 => IntArraySet(data(0), data(1))
                 case 3 => IntArraySet(data(0), data(1), data(2))
    -            case _ => { JArrays.parallelSort(data); new IntArraySetN(data) }
    +            case _ => JArrays.parallelSort(data); new IntArraySetN(data)
             }
         }
     
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntIntPair.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntIntPair.scala
    index a383f210b9..12a8c98648 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntIntPair.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntIntPair.scala
    @@ -19,10 +19,10 @@ final case class IntIntPair(_1: Int, _2: Int) {
         def foreach(f: Int => Unit): Unit = { f(_1); f(_2) }
     
         def incrementKey(increment: Int): IntIntPair = {
    -        new IntIntPair(_1 + increment, _2)
    +        IntIntPair(_1 + increment, _2)
         }
     
         def incrementValue(increment: Int): IntIntPair = {
    -        new IntIntPair(_1, _2 + increment)
    +        IntIntPair(_1, _2 + increment)
         }
     }
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntList.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntList.scala
    index e76c71714a..6c88c0b1b4 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntList.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntList.scala
    @@ -54,10 +54,10 @@ object IntList {
     
         def empty: IntList = EmptyIntList
     
    -    def apply(v: Int): IntList = new IntListNode(v, EmptyIntList)
    +    def apply(v: Int): IntList = IntListNode(v, EmptyIntList)
     
         def apply(head: Int, last: Int): IntList = {
    -        new IntListNode(head, new IntListNode(last, EmptyIntList))
    +        IntListNode(head, IntListNode(last, EmptyIntList))
         }
     
     }
    @@ -78,7 +78,7 @@ case object EmptyIntList extends IntList {
         override def forFirstN[U](n: Int)(f: Int => U): Unit = {}
         override def iterator: IntIterator = IntIterator.empty
         /** Prepends the given value to this list. E.g., `l = 2 +: l`. */
    -    override def +:(v: Int): IntList = new IntListNode(v, this)
    +    override def +:(v: Int): IntList = IntListNode(v, this)
     
         override def ++:(other: IntList): IntList = other
     
    @@ -87,7 +87,7 @@ case object EmptyIntList extends IntList {
     }
     
     /**
    - * An container for a list element.
    + * A container for a list element.
      *
      * @author Michael Eichberg
      */
    @@ -135,7 +135,7 @@ final case class IntListNode(
             }
         }
     
    -    override def +:(v: Int): IntList = new IntListNode(v, this)
    +    override def +:(v: Int): IntList = IntListNode(v, this)
     
         override def ++:(other: IntList): IntList = other.iterator.foldLeft(this)((list, value) => IntListNode(value, list))
     
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntTrieSet.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntTrieSet.scala
    index 1c11636c49..4918055d9f 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntTrieSet.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/IntTrieSet.scala
    @@ -7,7 +7,7 @@ import org.opalj.util.elidedAssert
     
     /**
      * An unordered set of integer values backed by a trie set. The branching is done using
    - * the least significant bit and values are only stored in leaf nodes. This ensure that
    + * the least significant bit and values are only stored in leaf nodes. This ensures that
      * we have a stable iteration order.
      *
      * @author Michael Eichberg
    @@ -310,7 +310,7 @@ object IntTrieSet1 {
         // The preallocation of the IntTrieSet1 data structures costs ~2Mb memory;
         // however, we use it as the backbone Infrastructure for storing CFGs and
         // def-use information; in both cases, we generally require HUGE numbers
    -    // of such sets in the preconfigured ranges and therefore we avoid allocating
    +    // of such sets in the preconfigured ranges, and therefore we avoid allocating
         // several hundred million instances (in case of a thorough analysis of the
         // JDK) and corresponding memory.
         val Cache1LowerBound = -100000 - (48 * 1024) // inclusive
    @@ -760,7 +760,7 @@ private[immutable] final class IntTrieSetN private[immutable] (
     
         /**
          * Ensures that subtrees which contain less than 3 elements are represented using
    -     * a cannonical representation.
    +     * a canonical representation.
          */
         override private[immutable] def constringe(): IntTrieSet = {
             elidedAssert(size <= 2)
    @@ -982,7 +982,7 @@ private[immutable] final class IntTrieSetNJustRight private[immutable] (
     
         /**
          * Ensures that subtrees which contain less than 3 elements are represented using
    -     * a cannonical representation.
    +     * a canonical representation.
          */
         override private[immutable] def constringe(): IntTrieSet = {
             elidedAssert(size <= 2)
    @@ -1112,7 +1112,7 @@ private[immutable] final class IntTrieSetNJustLeft private[immutable] (
     
         /**
          * Ensures that subtrees which contain less than 3 elements are represented using
    -     * a cannonical representation.
    +     * a canonical representation.
          */
         override private[immutable] def constringe(): IntTrieSet = {
             elidedAssert(size <= 2)
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Long2List.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Long2List.scala
    index cbe4a54351..a07732e097 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Long2List.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Long2List.scala
    @@ -156,10 +156,12 @@ abstract private[immutable] class Long2List1_4 extends Long2List {
                 def hasNext: Boolean = list != null
                 def next(): Long = {
                     index match {
    -                    case 0 => { index += 1; list.v1 }
    -                    case 1 => { index += 1; list.v2 }
    -                    case 2 => { index += 1; list.v3 }
    -                    case 3 => { index = 0; val v = list.v4; list = list.rest; v }
    +                    case 0 => index += 1; list.v1
    +                    case 1 => index += 1; list.v2
    +                    case 2 => index += 1; list.v3
    +                    case 3 =>
    +                        index = 0;
    +                        val v = list.v4; list = list.rest; v
                     }
                 }
             }
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongLinkedTrieSet.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongLinkedTrieSet.scala
    index ece72be387..ca6fa3837f 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongLinkedTrieSet.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongLinkedTrieSet.scala
    @@ -31,13 +31,13 @@ object LongLinkedTrieSet {
     
         def empty: LongLinkedTrieSet = LongLinkedTrieSet0
     
    -    def apply(v: Long): LongLinkedTrieSet = new LongLinkedTrieSet1(v)
    +    def apply(v: Long): LongLinkedTrieSet = LongLinkedTrieSet1(v)
     
         def apply(head: Long, last: Long): LongLinkedTrieSet = {
             if (head == last)
    -            new LongLinkedTrieSet1(head)
    +            LongLinkedTrieSet1(head)
             else
    -            new LongLinkedTrieSet2(head, last)
    +            LongLinkedTrieSet2(head, last)
         }
     
     }
    @@ -74,7 +74,7 @@ final case class LongLinkedTrieSet1(v1: Long) extends LongLinkedTrieSet {
         override final def iterator: LongIterator = LongIterator(v1)
     
         override final def +(v: Long): LongLinkedTrieSet = {
    -        if (v != v1) new LongLinkedTrieSet2(v, v1) else this
    +        if (v != v1) LongLinkedTrieSet2(v, v1) else this
         }
     }
     
    @@ -102,7 +102,7 @@ private[immutable] final case class LongLinkedTrieSet2(
         override final def iterator: LongIterator = LongIterator(v1, v2)
     
         override final def +(v: Long): LongLinkedTrieSet = {
    -        if (v != v1 && v != v2) new LongLinkedTrieSet3(v, v1, v2) else this
    +        if (v != v1 && v != v2) LongLinkedTrieSet3(v, v1, v2) else this
         }
     }
     
    @@ -561,7 +561,7 @@ private[immutable] final class LongLinkedTrieSetN2(
             val lLSB = ((lValue >> level) & 1L) // lsb == bit at index `level`
     
             if (_0.isN || _1.isN) {
    -            // We can't get rid of this N2 node... a successor node is an inner node and we
    +            // We can't get rid of this N2 node... a successor node is an inner node, and we
                 // do not want to perform "large" changes to the overall trie.
                 return {
                     if (lLSB == 0) {
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongList.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongList.scala
    index 04c148f08a..4eb9329f1b 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongList.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongList.scala
    @@ -50,10 +50,10 @@ object LongList {
     
         def empty: LongList = LongList0
     
    -    def apply(v: Long): LongList = new LongListNode(v, LongList0)
    +    def apply(v: Long): LongList = LongListNode(v, LongList0)
     
         def apply(head: Long, last: Long): LongList = {
    -        new LongListNode(head, new LongListNode(last, LongList0))
    +        LongListNode(head, LongListNode(last, LongList0))
         }
     
     }
    @@ -74,14 +74,14 @@ case object LongList0 extends LongList {
         override def forFirstN[U](n: Int)(f: Long => U): Unit = {}
         override def iterator: LongIterator = LongIterator.empty
         /** Prepends the given value to this list. E.g., `l = 2l +: l`. */
    -    override def +:(v: Long): LongList = new LongListNode(v, this)
    +    override def +:(v: Long): LongList = LongListNode(v, this)
     
         override def equals(that: LongList): Boolean = that eq this
         override def hashCode(): Int = 31
     }
     
     /**
    - * An container for a list element.
    + * A container for a list element.
      *
      * @author Michael Eichberg
      */
    @@ -129,7 +129,7 @@ final case class LongListNode(
             }
         }
     
    -    override def +:(v: Long): LongList = new LongListNode(v, this)
    +    override def +:(v: Long): LongList = LongListNode(v, this)
     
         override def equals(that: LongList): Boolean = {
             (that eq this) || {
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongTrieSet.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongTrieSet.scala
    index 14ca995f00..7ce947cb1b 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongTrieSet.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/LongTrieSet.scala
    @@ -6,6 +6,7 @@ package immutable
     import scala.annotation.tailrec
     
     import java.lang.Long.hashCode as lHashCode
    +import scala.compiletime.uninitialized
     
     sealed abstract class LongTrieSet extends LongSet { intSet =>
     
    @@ -289,7 +290,7 @@ private[immutable] final class LongTrieSet3(
                 if (i1_7L == i3_7L) {
                     if (i1_7L == i_7L) {
                         // they all have the same 3 bits used for branching purposes...
    -                    new LongTrieSetNode1(i1_7L.toInt, grow(i, level + 3))
    +                    new LongTrieSetNode1(i1_7L, grow(i, level + 3))
                     } else {
                         new LongTrieSetNode2(
                             1 << (i_7L * 4) | 2 << (i1_7L * 4) /*lookuptable*/,
    @@ -459,7 +460,7 @@ private[immutable] final class LongTrieSetN(
         override def foreach[U](f:   Long => U): Unit = root.foreach(f)
     
         override def iterator: LongIterator = new LongIterator {
    -        private var leafNode: LongTrieSetLeaf = null
    +        private var leafNode: LongTrieSetLeaf = uninitialized
             private var index = 0
             private val nodes =
                 new scala.collection.mutable.Stack(initialSize = Math.min(16, LongTrieSetN.this.size / 2)) += root
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Pair.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Pair.scala
    index f2e746aee2..e9998773f0 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Pair.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Pair.scala
    @@ -5,7 +5,7 @@ package immutable
     
     object Pair {
     
    -    def apply(v1: Int, v2: Int): IntIntPair = new IntIntPair(v1, v2)
    +    def apply(v1: Int, v2: Int): IntIntPair = IntIntPair(v1, v2)
     
         def apply[T <: AnyRef](v1: Long, v2: T) = new LongRefPair[T](v1, v2)
     
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Ref2List.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Ref2List.scala
    index e87f72e5b0..deba425756 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/Ref2List.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/Ref2List.scala
    @@ -100,7 +100,7 @@ private[immutable] case object Ref2ListEnd extends Ref2List[Nothing] {
     }
     
     /**
    - * An container for a list element.
    + * A container for a list element.
      *
      * @author Michael Eichberg
      */
    @@ -128,13 +128,11 @@ private[immutable] final case class Ref2ListNode[T >: Null <: AnyRef](
         override def forFirstN[U](n: Int)(f: T => U): Unit = {
             n match {
                 case 0 =>
    -                return;
                 case 1 =>
                     if (h != null)
                         f(h)
                     else
                         f(t)
    -                return;
                 case _ =>
                     // ... n >= 2
                     var i = n - 1 // <= -1 for the second element "t"...
    @@ -171,9 +169,9 @@ private[immutable] final case class Ref2ListNode[T >: Null <: AnyRef](
     
         override def +:[X >: T <: AnyRef](v: X): Ref2List[X] = {
             if (h != null)
    -            new Ref2ListNode(null, v, this)
    +            Ref2ListNode(null, v, this)
             else
    -            new Ref2ListNode(v, t, this.rest)
    +            Ref2ListNode(v, t, this.rest)
         }
     
         override def equals(that: Ref2List[AnyRef]): Boolean = {
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/immutable/UIDSet.scala b/OPAL/common/src/main/scala/org/opalj/collection/immutable/UIDSet.scala
    index 9d328a8b5a..cf439f4de0 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/immutable/UIDSet.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/immutable/UIDSet.scala
    @@ -241,7 +241,7 @@ final class UIDSet2[T <: UID](value1: T, value2: T) extends NonEmptyUIDSet[T] {
         override def iterator: Iterator[T] = Iterator(value1, value2)
         override def head: T = value1
         override def last: T = value2
    -    override def tail: UIDSet[T] = new UIDSet1(value2)
    +    override def tail: UIDSet[T] = UIDSet1(value2)
         override def foldLeft[B](z: B)(op: (B, T) => B): B = op(op(z, value1), value2)
     
         override def find(p: T => Boolean): Option[T] = {
    @@ -254,9 +254,9 @@ final class UIDSet2[T <: UID](value1: T, value2: T) extends NonEmptyUIDSet[T] {
                 if (p(value2))
                     this
                 else
    -                new UIDSet1(value1)
    +                UIDSet1(value1)
             } else if (p(value2)) {
    -            new UIDSet1(value2)
    +            UIDSet1(value2)
             } else {
                 empty
             }
    @@ -267,16 +267,16 @@ final class UIDSet2[T <: UID](value1: T, value2: T) extends NonEmptyUIDSet[T] {
                 if (p(value2))
                     empty
                 else
    -                new UIDSet1(value2)
    +                UIDSet1(value2)
             } else if (p(value2)) {
    -            new UIDSet1(value1)
    +            UIDSet1(value1)
             } else {
                 this
             }
         }
     
         override def drop(n: Int): UIDSet[T] = {
    -        if (n == 0) this else if (n == 1) new UIDSet1(value2) else empty
    +        if (n == 0) this else if (n == 1) UIDSet1(value2) else empty
         }
     
         override def incl(e: T): UIDSet[T] = {
    @@ -294,9 +294,9 @@ final class UIDSet2[T <: UID](value1: T, value2: T) extends NonEmptyUIDSet[T] {
         override def excl(e: T): UIDSet[T] = {
             val eId = e.id
             if (value1.id == eId)
    -            new UIDSet1(value2)
    +            UIDSet1(value2)
             else if (value2.id == eId)
    -            new UIDSet1(value1)
    +            UIDSet1(value1)
             else
                 this
         }
    @@ -398,7 +398,7 @@ final class UIDSet3[T <: UID](value1: T, value2: T, value3: T) extends NonEmptyU
             n match {
                 case 0 => this
                 case 1 => new UIDSet2(value2, value3)
    -            case 2 => new UIDSet1(value3)
    +            case 2 => UIDSet1(value3)
                 case _ => empty
             }
         }
    @@ -574,7 +574,7 @@ sealed abstract private[immutable] class UIDSetNodeLike[T <: UID] extends NonEmp
                 case 1 => empty
                 case 2 =>
                     val left = this.left
    -                new UIDSet1(if (left ne null) left.value else right.value)
    +                UIDSet1(if (left ne null) left.value else right.value)
                 case 3 =>
                     val left = this.left
                     val right = this.right
    @@ -607,12 +607,12 @@ sealed abstract private[immutable] class UIDSetNodeLike[T <: UID] extends NonEmp
                     val value = this.value
                     val eId = e.id
                     if (value.id == eId)
    -                    new UIDSet1(if (left ne null) left.head else right.head)
    +                    UIDSet1(if (left ne null) left.head else right.head)
                     else {
                         val value1 = value
                         val value2Candidate = if (left ne null) left.head else right.head
                         if (value2Candidate.id == eId)
    -                        new UIDSet1(value)
    +                        UIDSet1(value)
                         else
                             new UIDSet2(value1, value2Candidate)
                     }
    @@ -664,7 +664,7 @@ sealed abstract private[immutable] class UIDSetNodeLike[T <: UID] extends NonEmp
                 return empty;
     
             result.size match {
    -            case 1 => new UIDSet1(result.head)
    +            case 1 => UIDSet1(result.head)
                 case 2 => new UIDSet2(result.head, result.last)
                 case _ => result
             }
    @@ -1006,7 +1006,6 @@ final class UIDSetLeaf[T <: UID] private[immutable] (
     
     }
     
    -// we wan't to be able to adapt the case class...
     final class UIDSetInnerNode[T <: UID] private[immutable] (
         protected var theSize:          Int,
         protected[immutable] var value: T,
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/mutable/ArrayMap.scala b/OPAL/common/src/main/scala/org/opalj/collection/mutable/ArrayMap.scala
    index 0e0bb6c793..836866fa1b 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/mutable/ArrayMap.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/mutable/ArrayMap.scala
    @@ -155,7 +155,7 @@ class ArrayMap[T >: Null <: AnyRef: ClassTag] private (private var data: Array[T
                         if (data(i) ne null)
                             return i;
                     }
    -                return max;
    +                max
                 }
     
                 private var i = getNextIndex(-1)
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizeBitSet.scala b/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizeBitSet.scala
    index 8f3cef10b2..6df31e5ae9 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizeBitSet.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizeBitSet.scala
    @@ -11,7 +11,7 @@ import org.opalj.util.elidedAssert
      * impact on equals and/or hashcode computations. I.e., two sets with two different upper bounds
      * which contain the same values, are equal and have the same hashcode.
      *
    - * Conceptually, the an array of long values is used to store the values.
    + * Conceptually, an array of long values is used to store the values.
      *
      * @note If values are added to the set that are larger than the specified size the behavior is
      *       undefined!
    @@ -24,7 +24,7 @@ sealed abstract class FixedSizeBitSet extends BitSet with Serializable {
     
         /**
          * Adds the given value to the set if the value is not in the set and returns true;
    -     * otherwise returns false. That is, the value is definitively in the set afterwards.
    +     * otherwise returns false. That is, the value is definitively in the set afterward.
          */
         def add(i: Int): Boolean
     
    @@ -169,7 +169,7 @@ private[mutable] final class FixedSizeBitSet128 extends FixedSizeBitSet { thisSe
             val set1Hash = (set1 ^ (set1 >>> 32)).toInt
             if (set1Hash != 0) result = 31 + set1Hash
             val set2Hash = (set2 ^ (set2 >>> 32)).toInt
    -        if (set2Hash != 0) 31 * result + set2Hash
    +        if (set2Hash != 0) result = 31 * result + set2Hash
             result
         }
     }
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizedHashIDMap.scala b/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizedHashIDMap.scala
    index b55225416e..160d3c214e 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizedHashIDMap.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/mutable/FixedSizedHashIDMap.scala
    @@ -16,7 +16,7 @@ import scala.collection.immutable.ArraySeq
      *     values stored in the map; i.e., two different key objects have to have different
      *     hashcode values.
      *  1. The range of hashcode values returned by the keys has to be known and should be reasonably
    - *     consecutive because an array will be preallocated to hold all values.
    + *     consecutive because an array will be pre-allocated to hold all values.
      *     (it can nevertheless start with an arbitrary int)
      *  1. The number of eventually stored key/values should be > 1/4 of the range of key values to
      *     amortize the costs of the underlying data-structures.
    diff --git a/OPAL/common/src/main/scala/org/opalj/collection/package.scala b/OPAL/common/src/main/scala/org/opalj/collection/package.scala
    index 6810b57562..5460030904 100644
    --- a/OPAL/common/src/main/scala/org/opalj/collection/package.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/collection/package.scala
    @@ -22,7 +22,7 @@ import scala.jdk.CollectionConverters.*
      * ==Integration With Scala's Collection Library==
      * Hence, OPAL's collection library complements Scala's default collection library and is not
      * intended to replace it. Integration with Scala's collection library is primarily provided
    - * by means of iterators (OPAL's `Iterator`s inherit from Scala's `Iterator`s). Furthermore
    + * by means of iterators (OPAL's `Iterator`s inherit from Scala's `Iterator`s). Furthermore,
      * the companion object of each of OPAL's collection classes generally provides factory methods
      * that facilitate the conversion from Scala collection classes to OPAL collection classes.
      *
    @@ -69,8 +69,8 @@ package object collection {
         //
     
         /**
    -     * Converts a multi-map (a Map that contains Maps) based on
    -     * `java.util.concurrent.ConcurrentHashMap`s into a corresponding multi-map
    +     * Converts a multimap (a Map that contains Maps) based on
    +     * `java.util.concurrent.ConcurrentHashMap`s into a corresponding multimap
          * based on `scala.collection.immutable.HashMap`s.
          * E.g.,
          * {{{
    diff --git a/OPAL/common/src/main/scala/org/opalj/concurrent/ConcurrentExceptions.scala b/OPAL/common/src/main/scala/org/opalj/concurrent/ConcurrentExceptions.scala
    index bef310cf3b..855697a770 100644
    --- a/OPAL/common/src/main/scala/org/opalj/concurrent/ConcurrentExceptions.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/concurrent/ConcurrentExceptions.scala
    @@ -3,7 +3,7 @@ package org.opalj
     package concurrent
     
     /**
    - * An exception that is used to signal that some exceptions occured concurrently.
    + * An exception that is used to signal that some exceptions occurred concurrently.
      * Those exceptions are added to this exception by the underlying framework and can then be
      * queried using the standard methods.
      *
    diff --git a/OPAL/common/src/main/scala/org/opalj/concurrent/Locking.scala b/OPAL/common/src/main/scala/org/opalj/concurrent/Locking.scala
    index a721e84c3b..4f05ce1963 100644
    --- a/OPAL/common/src/main/scala/org/opalj/concurrent/Locking.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/concurrent/Locking.scala
    @@ -23,13 +23,13 @@ trait Locking {
     
         /**
          * Acquires the write lock associated with this instance and then executes the function `f`.
    -     * Afterwards, the lock is released.
    +     * Afterward, the lock is released.
          */
         @inline protected final def withWriteLock[B](f: => B): B = Locking.withWriteLock(rwLock)(f)
     
         /**
          * Acquires the read lock associated with this instance and then executes the function `f`.
    -     * Afterwards, the lock is released.
    +     * Afterward, the lock is released.
          */
         @inline protected final def withReadLock[B](f: => B): B = Locking.withReadLock(rwLock)(f)
     }
    @@ -41,7 +41,7 @@ object Locking {
     
         /**
          * Acquires the write lock associated with this instance and then executes the function `f`.
    -     * Afterwards, the lock is released.
    +     * Afterward, the lock is released.
          */
         @inline final def withWriteLock[B](rwLock: ReentrantReadWriteLock)(f: => B): B = {
             val lock = rwLock.writeLock()
    @@ -57,7 +57,7 @@ object Locking {
     
         /**
          * Acquires all given locks in the given order and then executes the given function `f`.
    -     * Afterwards all locks are released in reverse order.
    +     * Afterward, all locks are released in reverse order.
          */
         @inline final def withWriteLocks[T](
             rwLocks: IterableOnce[ReentrantReadWriteLock]
    @@ -70,7 +70,7 @@ object Locking {
                 rwLocks.iterator.forall { rwLock =>
                     try {
                         val l = rwLock.writeLock
    -                    l.lock
    +                    l.lock()
                         acquiredRWLocks ::= l
                         true
                     } catch {
    diff --git a/OPAL/common/src/main/scala/org/opalj/concurrent/OPALThreadPoolExecutor.scala b/OPAL/common/src/main/scala/org/opalj/concurrent/OPALThreadPoolExecutor.scala
    index 17ef30ec0f..6f1effc20a 100644
    --- a/OPAL/common/src/main/scala/org/opalj/concurrent/OPALThreadPoolExecutor.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/concurrent/OPALThreadPoolExecutor.scala
    @@ -57,7 +57,7 @@ class OPALBoundedThreadPoolExecutor(
                     case ce: CancellationException =>
                         e = ce
                     case ee: ExecutionException =>
    -                    e = ee.getCause()
    +                    e = ee.getCause
                     case ie: InterruptedException =>
                         e = ie
                         Thread.currentThread().interrupt(); // ignore/reset
    diff --git a/OPAL/common/src/main/scala/org/opalj/concurrent/Tasks.scala b/OPAL/common/src/main/scala/org/opalj/concurrent/Tasks.scala
    index d099a9bdf6..dde3306bc1 100644
    --- a/OPAL/common/src/main/scala/org/opalj/concurrent/Tasks.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/concurrent/Tasks.scala
    @@ -35,7 +35,7 @@ sealed trait Tasks[T] {
     final class SequentialTasks[T](
         val process:                         (Tasks[T], T) => Unit,
         val abortOnExceptions:               Boolean       = false,
    -    @volatile private var isInterrupted: () => Boolean = () => Thread.currentThread().isInterrupted()
    +    @volatile private var isInterrupted: () => Boolean = () => Thread.currentThread().isInterrupted
     ) extends Tasks[T] {
     
         private val tasksQueue = scala.collection.mutable.Queue.empty[T]
    @@ -71,14 +71,13 @@ final class SequentialTasks[T](
                 try {
                     process(this, tasksQueue.dequeue())
                 } catch {
    -                case t: Throwable => {
    +                case t: Throwable =>
                         if (concurrentExceptions == null) concurrentExceptions = new ConcurrentExceptions()
                         concurrentExceptions.addSuppressed(t)
                         if (abortOnExceptions) {
                             this.isInterrupted = () => true
                             throw concurrentExceptions;
                         }
    -                }
                 }
             }
     
    @@ -109,7 +108,7 @@ final class SequentialTasks[T](
     final class ConcurrentTasks[T](
         val process:                         (Tasks[T], T) => Unit,
         val abortOnExceptions:               Boolean       = false,
    -    @volatile private var isInterrupted: () => Boolean = () => Thread.currentThread().isInterrupted()
    +    @volatile private var isInterrupted: () => Boolean = () => Thread.currentThread().isInterrupted
     )(
         implicit val executionContext: ExecutionContext
     ) extends Tasks[T] { self =>
    @@ -240,7 +239,7 @@ object Tasks {
         def apply[T](
             process:           (Tasks[T], T) => Unit,
             abortOnExceptions: Boolean       = false,
    -        isInterrupted:     () => Boolean = () => Thread.currentThread().isInterrupted()
    +        isInterrupted:     () => Boolean = () => Thread.currentThread().isInterrupted
         )(
             implicit executionContext: ExecutionContext
         ): Tasks[T] = {
    diff --git a/OPAL/common/src/main/scala/org/opalj/concurrent/package.scala b/OPAL/common/src/main/scala/org/opalj/concurrent/package.scala
    index 16b13ced02..06be40eceb 100644
    --- a/OPAL/common/src/main/scala/org/opalj/concurrent/package.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/concurrent/package.scala
    @@ -115,7 +115,7 @@ package object concurrent {
             "OPAL",
             s"using at most $NumberOfThreadsForIOBoundTasks thread(s) for IO bound tasks " +
                 "(can be changed by setting the system property org.opalj.threads.IOBoundTasks; " +
    -            "the number should be betweeen 1 and 2 times the number of (hyperthreaded) cores)"
    +            "the number should be between 1 and 2 times the number of (hyperthreaded) cores)"
         )
     
         //
    diff --git a/OPAL/common/src/main/scala/org/opalj/constraints/ValueConstraints.scala b/OPAL/common/src/main/scala/org/opalj/constraints/ValueConstraints.scala
    index 9b9f79450b..26f3e04923 100644
    --- a/OPAL/common/src/main/scala/org/opalj/constraints/ValueConstraints.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/constraints/ValueConstraints.scala
    @@ -51,7 +51,7 @@ case class ObjectConstraint(
     ) extends ReferenceValueConstraint
     
     /**
    - * @param arrayValues Constraint which is satisified by all elements of the array (on first access).
    + * @param arrayValues Constraint which is satisfied by all elements of the array (on first access).
      */
     case class ArrayConstraint(
         arrayReference: ReferenceValueConstraint,
    diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/DefaultMutableNode.scala b/OPAL/common/src/main/scala/org/opalj/graphs/DefaultMutableNode.scala
    index af500eb3bc..267c3500db 100644
    --- a/OPAL/common/src/main/scala/org/opalj/graphs/DefaultMutableNode.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/graphs/DefaultMutableNode.scala
    @@ -33,14 +33,14 @@ class DefaultMutableNode[I](
                 identifier,
                 identifierToString,
                 theVisualProperties =
    -                fillcolor.map(c => DefaultMutableMode.BaseVirtualPropertiers + ("fillcolor" -> c))
    -                    .getOrElse(DefaultMutableMode.BaseVirtualPropertiers)
    +                fillcolor.map(c => DefaultMutableMode.BaseVirtualProperties + ("fillcolor" -> c))
    +                    .getOrElse(DefaultMutableMode.BaseVirtualProperties)
             )
     
     }
     
     object DefaultMutableMode {
     
    -    val BaseVirtualPropertiers = immutable.Map("style" -> "filled", "fillcolor" -> "white")
    +    val BaseVirtualProperties = immutable.Map("style" -> "filled", "fillcolor" -> "white")
     
     }
    diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/DominanceFrontiers.scala b/OPAL/common/src/main/scala/org/opalj/graphs/DominanceFrontiers.scala
    index b05576fc2f..1e0d371af3 100644
    --- a/OPAL/common/src/main/scala/org/opalj/graphs/DominanceFrontiers.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/graphs/DominanceFrontiers.scala
    @@ -96,7 +96,7 @@ final class DominanceFrontiers private (
                 val (df, s /*index*/ ) = e
                 if (isNodeValid(s)) {
                     if (df == null) {
    -                    g.addVertice(s)
    +                    g.addVertex(s)
                     } else {
                         df.foreach { t => g.addEdge(s, t) }
                     }
    @@ -142,14 +142,14 @@ object DominanceFrontiers {
          *
          * @param   dt The dominator tree of the specified (flow) graph. We provide basic support
          *          for augmented post dominator trees: [[PostDominatorTree]]; we in particular
    -     *          handle common cases related to additional exit nodes as created by the implented(!)
    +     *          handle common cases related to additional exit nodes as created by the implemented(!)
          *          post dominator tree computation algorithm.
          *          However, the following case:
          *          {{{
          *          while (true) {
          *               if (i < 0) {
          *                   i += 1000;
    -     *                   // Exit Piont 1
    +     *                   // Exit Point 1
          *               } else {
          *                   i -= 100;
          *                   // Exit Point 2
    @@ -159,7 +159,7 @@ object DominanceFrontiers {
          *          is not yet supported; it would require a significant transformation of the
          *          computed PDT, which we currently do not perform.
          *          Basically, in the PDT we would need to make both bodies dependent on the
    -     *          artifical exit node of the loop to ensure that both bodies are control-dependent
    +     *          artificial exit node of the loop to ensure that both bodies are control-dependent
          *          on the "if" node.
          *
          * @param   isValidNode A function that returns `true` if the given id represents a node of the
    diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/DominatorTree.scala b/OPAL/common/src/main/scala/org/opalj/graphs/DominatorTree.scala
    index b5bd963e7b..1f5b63b482 100644
    --- a/OPAL/common/src/main/scala/org/opalj/graphs/DominatorTree.scala
    +++ b/OPAL/common/src/main/scala/org/opalj/graphs/DominatorTree.scala
    @@ -99,7 +99,7 @@ object DominatorTree {
          *          
    * * '''This implementation does not use non-tailrecursive methods and hence - * also handles very large degenerated graphs (e.g., a graph which consists of a + * also handles very large degenerated graphs (e.g., a graph which consists of * a very, very long single path.).''' */ def apply[D <: AbstractDominatorTree]( diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/Graph.scala b/OPAL/common/src/main/scala/org/opalj/graphs/Graph.scala index 5f481c0e5c..8b7b8998ab 100644 --- a/OPAL/common/src/main/scala/org/opalj/graphs/Graph.scala +++ b/OPAL/common/src/main/scala/org/opalj/graphs/Graph.scala @@ -31,9 +31,9 @@ class Graph[@specialized(Int) N: ClassTag] private ( def asIterable: N => Iterable[N] = (n: N) => { this(n) } /** - * Adds a new vertice. + * Adds a new vertex. */ - def addVertice(n: N): this.type = { + def addVertex(n: N): this.type = { vertices += n this } @@ -61,9 +61,9 @@ class Graph[@specialized(Int) N: ClassTag] private ( } /** - * Removes the given vertice from this graph. + * Removes the given vertex from this graph. */ - def removeVertice(v: N): this.type = { + def removeVertex(v: N): this.type = { vertices -= v val oldSuccessorsOpt = successors.get(v) oldSuccessorsOpt.foreach(_ foreach { s => predecessors(s) = predecessors(s) filter (_ != v) }) @@ -74,7 +74,7 @@ class Graph[@specialized(Int) N: ClassTag] private ( this } - def --=(vs: IterableOnce[N]): this.type = { vs.iterator.foreach { v => this.removeVertice(v) }; this } + def --=(vs: IterableOnce[N]): this.type = { vs.iterator.foreach { v => this.removeVertex(v) }; this } /** * All nodes which only have incoming dependencies/which have no successors. diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/MutableNodeLike.scala b/OPAL/common/src/main/scala/org/opalj/graphs/MutableNodeLike.scala index 7a6fd127c6..f84e1ac481 100644 --- a/OPAL/common/src/main/scala/org/opalj/graphs/MutableNodeLike.scala +++ b/OPAL/common/src/main/scala/org/opalj/graphs/MutableNodeLike.scala @@ -21,9 +21,8 @@ import scala.collection.immutable * I.e., the `hashCode` of two object instances that are added to the same graph is * different whenever `equals` is `false`'''. * @param identifierToString A function that converts "an" identifier to a string. By - * default the given object's `toString` method is called. It is possible - * that a graph has two nodes with the same textual representation representation - * but a different identity. + * default, the given object's `toString` method is called. It is possible that + * a graph has two nodes with the same textual representation but a different identity. * @author Michael Eichberg */ class MutableNodeLike[I, N <: Node]( diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/Node.scala b/OPAL/common/src/main/scala/org/opalj/graphs/Node.scala index 7c3095c1dc..1a56fa5030 100644 --- a/OPAL/common/src/main/scala/org/opalj/graphs/Node.scala +++ b/OPAL/common/src/main/scala/org/opalj/graphs/Node.scala @@ -17,7 +17,7 @@ import scala.collection.immutable trait Node { /** - * Returns a human readable representation (HRR) of this node. + * Returns a human-readable representation (HRR) of this node. */ def toHRR: Option[String] @@ -25,7 +25,7 @@ trait Node { /** * An identifier that uniquely identifies this node in the graph to which this - * node belongs. By default two nodes are considered equal if they have the same + * node belongs. By default, two nodes are considered equal if they have the same * unique id. */ def nodeId: Int @@ -41,7 +41,7 @@ trait Node { def foreachSuccessor(f: Node => Unit): Unit /** - * The hash code of this node. By default the hash code is the unique id. + * The hash code of this node. By default, the hash code is the unique id. */ override def hashCode(): Int = nodeId diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/PostDominatorTree.scala b/OPAL/common/src/main/scala/org/opalj/graphs/PostDominatorTree.scala index 49c8df60b5..b05ca7e040 100644 --- a/OPAL/common/src/main/scala/org/opalj/graphs/PostDominatorTree.scala +++ b/OPAL/common/src/main/scala/org/opalj/graphs/PostDominatorTree.scala @@ -16,7 +16,7 @@ import org.opalj.collection.immutable.IntTrieSet * start node. * @param hasVirtualStartNode `true` if an artificial end node (w.r.t. the underlying CFG) was * created, because the underlying CFG had multiple exits. - * @param additionalExitNodes Nodes in the original, underyling CFG that are treated as additional + * @param additionalExitNodes Nodes in the original, underlying CFG that are treated as additional * exit nodes; e.g., to handle infinite loops. * @param foreachSuccessorOf The original successor information. */ @@ -44,7 +44,7 @@ object PostDominatorTree { /** * Computes the post dominator tree for the given control flow graph. (The reverse - * control flow graph will computed on demand by this method.) + * control flow graph will be computed on demand by this method.) * If necessary, an artificial start node will be created to ensure that we have a unique * start node for the post dominator tree; if created the node will have the * `id = (maxNodeId+1)`; additionally, all edges are automatically reversed. diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/UnidirectionalGraph.scala b/OPAL/common/src/main/scala/org/opalj/graphs/UnidirectionalGraph.scala index a657d9a8e5..408799a004 100644 --- a/OPAL/common/src/main/scala/org/opalj/graphs/UnidirectionalGraph.scala +++ b/OPAL/common/src/main/scala/org/opalj/graphs/UnidirectionalGraph.scala @@ -8,8 +8,7 @@ import org.opalj.collection.immutable.IntTrieSet /** * Efficient representation of a mutable graph where the nodes are identified using consecutive * int values. This graph in particular supports the case where many nodes do not have successors. - * Computing the strongly connected components is particular efficient as no transformations are - * are required. + * Computing the strongly connected components is particular efficient as no transformations are required. * * ==Thread Safety== * This class is not thread-safe! diff --git a/OPAL/common/src/main/scala/org/opalj/graphs/package.scala b/OPAL/common/src/main/scala/org/opalj/graphs/package.scala index 0eea18ae23..f93fcae9c4 100644 --- a/OPAL/common/src/main/scala/org/opalj/graphs/package.scala +++ b/OPAL/common/src/main/scala/org/opalj/graphs/package.scala @@ -37,14 +37,14 @@ package object graphs { * * * @note Though the function is optimized to handle very large graphs, encoding sparse - * graphs using adjacency matrixes is not recommended. + * graphs using adjacency matrices is not recommended. * * @param maxNodeId The id of the last node. The first node has to have the id 0. I.e., * in case of a graph with just two nodes, the maxNodeId is 1. * @param successors The successor nodes of the node with the given id; the function has to * be defined for every node in the range [0..maxNodeId]. * @return an adjacency matrix describing the given graph encoded using CSV. The returned - * byte array an be directly saved and represents a valid CSV file. + * byte array can be directly saved and represents a valid CSV file. */ def toAdjacencyMatrix(maxNodeId: Int, successors: Int => Set[Int]): Array[Byte] = { val columns = (maxNodeId + 1) * 2 @@ -125,7 +125,7 @@ package object graphs { * vis-js.com library which is a translated version of graphviz to JavaScript. * * The first call, which will initialize the JavaScript engine, will take some time. - * Afterwards, the tranformation is much faster. + * Afterward, the transformation is much faster. */ final lazy val dotToSVG: String => String = { import javax.script.Invocable @@ -139,7 +139,7 @@ package object graphs { OPALLogger.info( "setup", - "initialzing JavaScript engine for rendering dot graphics" + "initializing JavaScript engine for rendering dot graphics" )(using GlobalLogContext) val engineManager = new ScriptEngineManager() val engine: ScriptEngine = engineManager.getEngineByName("nashorn") @@ -679,7 +679,7 @@ package object graphs { nOnStack(n) = true remainingSuccessors = es(n) } else { - // we have visisted a successor node "w" and now continue with "n" + // we have visited a successor node "w" and now continue with "n" val w = ws.pop() nLowLink(n) = Math.min(nLowLink(n), nLowLink(w)) } @@ -690,7 +690,7 @@ package object graphs { if (nIndex(w) == UndefinedIndex) { // We basically simulate the recursive call by storing the current // evaluation state for n: the current edge "n->w" and the "remaining - // successors"; and the push the succesor node "w" + // successors"; and the push the successor node "w" ws.push(w) ws.push(n) wsSuccessors.push(remainingSuccessors) diff --git a/OPAL/common/src/main/scala/org/opalj/io/package.scala b/OPAL/common/src/main/scala/org/opalj/io/package.scala index ca59a0856d..88457c80ad 100644 --- a/OPAL/common/src/main/scala/org/opalj/io/package.scala +++ b/OPAL/common/src/main/scala/org/opalj/io/package.scala @@ -61,7 +61,7 @@ package object io { /** * Writes the given string (`data`) to a temporary file using the given prefix and suffix. - * Afterwards the system's native application that claims to be able to handle + * Afterward, the system's native application that claims to be able to handle * files with the given suffix is opened. If this fails, the string is printed to * the console. * diff --git a/OPAL/common/src/main/scala/org/opalj/log/ConsoleOPALLogger.scala b/OPAL/common/src/main/scala/org/opalj/log/ConsoleOPALLogger.scala index 8e986029d0..d90ce532ad 100644 --- a/OPAL/common/src/main/scala/org/opalj/log/ConsoleOPALLogger.scala +++ b/OPAL/common/src/main/scala/org/opalj/log/ConsoleOPALLogger.scala @@ -19,7 +19,7 @@ class ConsoleOPALLogger(val ansiColored: Boolean, val minLogLevel: Int) extends val stream = if (messageLevel.value >= Error.value) Console.err else Console.out val theMessage = message.toConsoleOutput(ansiColored) - if (theMessage.size > 0 && theMessage.charAt(0) == '\r') + if (theMessage.nonEmpty && theMessage.charAt(0) == '\r') stream.print(theMessage) else stream.println(theMessage) diff --git a/OPAL/common/src/main/scala/org/opalj/log/DevNullLogger.scala b/OPAL/common/src/main/scala/org/opalj/log/DevNullLogger.scala index a5f3de66ac..1215e4e4c6 100644 --- a/OPAL/common/src/main/scala/org/opalj/log/DevNullLogger.scala +++ b/OPAL/common/src/main/scala/org/opalj/log/DevNullLogger.scala @@ -6,7 +6,7 @@ package log * An instance of [[OPALLogger]] that does not perform _any logging_ . * * In general, it is HIGHLY recommended to use the `ConsoleOPALLogger` and - * to the set the minimium log level to `Error`. + * to the set the minimum log level to `Error`. * * @author Florian Kübler */ diff --git a/OPAL/common/src/main/scala/org/opalj/log/Level.scala b/OPAL/common/src/main/scala/org/opalj/log/Level.scala index a801193ec2..2c10371fd0 100644 --- a/OPAL/common/src/main/scala/org/opalj/log/Level.scala +++ b/OPAL/common/src/main/scala/org/opalj/log/Level.scala @@ -30,7 +30,7 @@ case object Info extends Level { def apply(info: String): LogMessage = BasicLogMessage(message = info) def apply(category: String, info: String): LogMessage = { - new StandardLogMessage(Info, Some(category), info) + StandardLogMessage(Info, Some(category), info) } def ansiColorEscape: String = "" @@ -50,7 +50,7 @@ case object Warn extends Level { def apply(info: String): LogMessage = BasicLogMessage(Warn, info) def apply(category: String, info: String): LogMessage = { - new StandardLogMessage(Warn, Some(category), info) + StandardLogMessage(Warn, Some(category), info) } def ansiColorEscape: String = Console.BLUE @@ -70,12 +70,12 @@ case object Error extends Level { def apply(info: String): LogMessage = BasicLogMessage(Error, info) def apply(category: String, info: String): LogMessage = { - new StandardLogMessage(Error, Some(category), info) + StandardLogMessage(Error, Some(category), info) } def apply(category: String, info: String, t: Throwable): LogMessage = { try { - new ExceptionLogMessage(Error, Some(category), info, t) + ExceptionLogMessage(Error, Some(category), info, t) } catch { case it: Throwable => Console.err.println( @@ -95,10 +95,10 @@ case object Error extends Level { case object Fatal extends Level { - def apply(info: String): LogMessage = new BasicLogMessage(Fatal, info) + def apply(info: String): LogMessage = BasicLogMessage(Fatal, info) def apply(category: String, info: String): LogMessage = { - new StandardLogMessage(Fatal, Some(category), info) + StandardLogMessage(Fatal, Some(category), info) } def ansiColorEscape: String = Console.RED + Console.YELLOW_B diff --git a/OPAL/common/src/main/scala/org/opalj/log/LogContext.scala b/OPAL/common/src/main/scala/org/opalj/log/LogContext.scala index cc71343f7e..f646686b33 100644 --- a/OPAL/common/src/main/scala/org/opalj/log/LogContext.scala +++ b/OPAL/common/src/main/scala/org/opalj/log/LogContext.scala @@ -35,7 +35,7 @@ trait LogContext { /** * The unique id associated with this log context. Each log context gets a unique id - * when it is registered with the OPALLogger. This id will not change afterwards. + * when it is registered with the OPALLogger. This id will not change afterward. */ final def logContextId: Int = id diff --git a/OPAL/common/src/main/scala/org/opalj/log/LogMessage.scala b/OPAL/common/src/main/scala/org/opalj/log/LogMessage.scala index 4a662d0c57..73c6391cad 100644 --- a/OPAL/common/src/main/scala/org/opalj/log/LogMessage.scala +++ b/OPAL/common/src/main/scala/org/opalj/log/LogMessage.scala @@ -19,7 +19,7 @@ trait LogMessage { /** * The category to which this method belongs. E.g., "project configuration" to - * signal that the message is related to the project configuration and it is – hence - + * signal that the message is related to the project configuration and it is –hence– * an issue that probably needs to be fixed by the developer. Another category * might be "internal (error)" to signal that an error occurred that might need * to be fixed by the developer of the respective analysis. @@ -50,7 +50,7 @@ trait LogMessage { message.split('\n').map { ln => var cr = "" var rawln = ln - if (ln.length > 0 && ln.charAt(0) == '\r') { + if (ln.nonEmpty && ln.charAt(0) == '\r') { cr = "\r" rawln = ln.substring(1) } diff --git a/OPAL/common/src/main/scala/org/opalj/log/StandardLogContext.scala b/OPAL/common/src/main/scala/org/opalj/log/StandardLogContext.scala index 555580d55e..671ed07287 100644 --- a/OPAL/common/src/main/scala/org/opalj/log/StandardLogContext.scala +++ b/OPAL/common/src/main/scala/org/opalj/log/StandardLogContext.scala @@ -6,8 +6,8 @@ case class StandardLogContext private (final val startTime: Long) extends LogCon def this() = this(startTime = System.currentTimeMillis()) - override def toString: String = s"LogContext(${startTime.toString().drop(6)})" + override def toString: String = s"LogContext(${startTime.toString.drop(6)})" - override def newInstance: LogContext = new StandardLogContext(this.startTime) + override def newInstance: LogContext = StandardLogContext(this.startTime) } diff --git a/OPAL/common/src/main/scala/org/opalj/package.scala b/OPAL/common/src/main/scala/org/opalj/package.scala index dc9e09c9e0..5043dea8ba 100644 --- a/OPAL/common/src/main/scala/org/opalj/package.scala +++ b/OPAL/common/src/main/scala/org/opalj/package.scala @@ -64,7 +64,7 @@ import org.opalj.util.elidedAssert * ===Assertions=== * OPAL makes heavy use of Scala's '''Assertion Facility''' to facilitate writing correct * code. Hence, for production builds (after thorough testing(!)) it is - * highly recommend to build OPAL again using `-Xdisable-assertions`. + * highly recommend to build OPAL again with assertions elided. * * @author Michael Eichberg */ diff --git a/OPAL/common/src/main/scala/org/opalj/util/InMemoryClassLoader.scala b/OPAL/common/src/main/scala/org/opalj/util/InMemoryClassLoader.scala index c8b04017ba..38105d4201 100644 --- a/OPAL/common/src/main/scala/org/opalj/util/InMemoryClassLoader.scala +++ b/OPAL/common/src/main/scala/org/opalj/util/InMemoryClassLoader.scala @@ -5,7 +5,7 @@ package util /** * A simple `ClassLoader` that looks-up the available classes in a standard map. * - * @param classes a `Map` of classes where the key is the class name – using `.` as the package + * @param rawClasses a `Map` of classes where the key is the class name – using `.` as the package * separator – and the value is the serialized class file. * * @author Malte Limmeroth diff --git a/OPAL/common/src/main/scala/org/opalj/util/PerformanceEvaluation.scala b/OPAL/common/src/main/scala/org/opalj/util/PerformanceEvaluation.scala index f120e57bce..25f5cd2d14 100644 --- a/OPAL/common/src/main/scala/org/opalj/util/PerformanceEvaluation.scala +++ b/OPAL/common/src/main/scala/org/opalj/util/PerformanceEvaluation.scala @@ -133,12 +133,12 @@ object GlobalPerformanceEvaluation extends PerformanceEvaluation object PerformanceEvaluation { /** - * Measures the amount of memory that is used as a side-effect + * Measures the amount of memory that is used as a side effect * of executing the given function `f`. I.e., the amount of memory is measured that is * used before and after executing `f`; i.e., the permanent data structures that are created * by `f` are measured. * - * @note If large data structures are used by `f` that are not used anymore afterwards + * @note If large data structures are used by `f` that are not used anymore afterward * then it may happen that the used amount of memory is negative. */ def memory[T]( @@ -231,7 +231,7 @@ object PerformanceEvaluation { * * @note If epsilon is too small we can get an endless loop as the termination * condition is never met. However, in practice often a value such as "1 or 2" - * is still useable. + * is still usable. * * @note This method can generally only be used to measure the time of some process * that does not require user interaction or disk/network access. In the latter @@ -248,7 +248,7 @@ object PerformanceEvaluation { * the last run is only considered if it is at most `consideredRunsEpsilon%` * slower than the average. Hence, it is even possible that the average may rise * during the evaluation of `f`. - * @param f The side-effect free function that will be measured. + * @param f The side-effect-free function that will be measured. * @param r A function that is called back whenever `f` was successfully evaluated. * The signature is: * {{{ diff --git a/OPAL/common/src/main/scala/org/opalj/util/package.scala b/OPAL/common/src/main/scala/org/opalj/util/package.scala index 62df7bca23..4f7d8e9b5b 100644 --- a/OPAL/common/src/main/scala/org/opalj/util/package.scala +++ b/OPAL/common/src/main/scala/org/opalj/util/package.scala @@ -86,16 +86,16 @@ package object util { var run = 0 while { if (logContext.isDefined) { - val pendingCount = memoryMXBean.getObjectPendingFinalizationCount() + val pendingCount = memoryMXBean.getObjectPendingFinalizationCount OPALLogger.info( "performance", s"garbage collection run $run (pending finalization: $pendingCount)" )(using logContext.get) } - // In general it is **not possible to guarantee** that the garbage collector is really + // In general, it is **not possible to guarantee** that the garbage collector is really // run, but we still do our best. memoryMXBean.gc() - if (memoryMXBean.getObjectPendingFinalizationCount() > 0) { + if (memoryMXBean.getObjectPendingFinalizationCount > 0) { // It may be the case that some finalizers (of just gc'ed object) are still running // and -- therefore -- some further objects are freed after the gc run. Thread.sleep(50) @@ -103,7 +103,7 @@ package object util { } run += 1 - memoryMXBean.getObjectPendingFinalizationCount() > 0 && ns2ms( + memoryMXBean.getObjectPendingFinalizationCount > 0 && ns2ms( System.nanoTime() - startTime ) < maxGCTime.timeSpan } do () diff --git a/OPAL/common/src/test/scala/org/opalj/collection/immutable/BitArraySetProperties.scala b/OPAL/common/src/test/scala/org/opalj/collection/immutable/BitArraySetProperties.scala index 59f46b7165..57ae0aeba5 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/immutable/BitArraySetProperties.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/immutable/BitArraySetProperties.scala @@ -105,9 +105,11 @@ object BitArraySetProperties extends Properties("BitArraySetProperties") { property("adding a subset of this set to this set should return this set") = forAll { (s: IntArraySet) => - val bas1 = s.foldLeft(BitArraySet.empty)(_ + _) - val bas2 = s.foldLeft(BitArraySet.empty)(_ + _) - (bas1 ++ bas2) eq bas1 + { + val bas1 = s.foldLeft(BitArraySet.empty)(_ + _) + val bas2 = s.foldLeft(BitArraySet.empty)(_ + _) + (bas1 ++ bas2) eq bas1 + } } property("adding this set to another set of which this set is a subset of should return the other set") = forAll { diff --git a/OPAL/common/src/test/scala/org/opalj/collection/immutable/IdentityPairTest.scala b/OPAL/common/src/test/scala/org/opalj/collection/immutable/IdentityPairTest.scala index 84886e5e1c..b487e808dc 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/immutable/IdentityPairTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/immutable/IdentityPairTest.scala @@ -22,9 +22,9 @@ class IdentityPairTest extends AnyFunSpec with Matchers { val b = "foo" + "Bar" require(a ne b) require(a == b) - val p1 = new IdentityPair(a, b) // #1 - val p2 = new IdentityPair(a, a) // #2 - val p3 = new IdentityPair(a, b) // #3 + val p1 = IdentityPair(a, b) // #1 + val p2 = IdentityPair(a, a) // #2 + val p3 = IdentityPair(a, b) // #3 it("should return the given values") { assert(p1._1 eq a) diff --git a/OPAL/common/src/test/scala/org/opalj/collection/immutable/IntTrieSetProperties.scala b/OPAL/common/src/test/scala/org/opalj/collection/immutable/IntTrieSetProperties.scala index a9920a5b41..c1a5f8a392 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/immutable/IntTrieSetProperties.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/immutable/IntTrieSetProperties.scala @@ -113,7 +113,7 @@ object IntTrieSetProperties extends Properties("IntTrieSet") { property("create IntTrieSet from List (i.e., with duplicates)") = forAll { (l: List[Int]) => val its = l.foldLeft(EmptyIntTrieSet: IntTrieSet)(_ + _) - val lWithoutDuplicates = l.toSet.toList + val lWithoutDuplicates = l.distinct (its.size == lWithoutDuplicates.size) :| "matching size" && its.iterator.toList.sorted == lWithoutDuplicates.sorted } diff --git a/OPAL/common/src/test/scala/org/opalj/collection/immutable/Long2ListEval.scala b/OPAL/common/src/test/scala/org/opalj/collection/immutable/Long2ListEval.scala index 27533a6ed1..841d2aaa8e 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/immutable/Long2ListEval.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/immutable/Long2ListEval.scala @@ -43,7 +43,7 @@ object Long2ListEval extends App { } { t => println(s"iterator sum took ${t.toSeconds}") } elidedAssert(sumForeach == sumIterator) - println(s"summarized value: ${sumIterator}") + println(s"summarized value: $sumIterator") } } diff --git a/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongListTest.scala b/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongListTest.scala index d8634c9e60..378cfb3d6e 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongListTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongListTest.scala @@ -56,7 +56,7 @@ class LongListTest extends AnyFunSpec with Matchers { } { t => info(s"iterator sum took ${t.toSeconds}") } assert(sumForeach == sumIterator) - info(s"summarized value: ${sumIterator}") + info(s"summarized value: $sumIterator") } } diff --git a/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongSetEval.scala b/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongSetEval.scala index 65a44f4d42..447e711b8e 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongSetEval.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/immutable/LongSetEval.scala @@ -106,29 +106,26 @@ abstract class LongSetEval { } /* - it("when comparing with Set[Long]") { - - - var opalS = org.opalj.collection.immutable.LongTrieSet.empty - var scalaS = Set.empty[Long] - for { i <- 0 to 1000000 } { - val v = rngGen.nextLong() - opalS += v - scalaS += v - } + it("when comparing with Set[Long]") { + var opalS = org.opalj.collection.immutable.LongTrieSet.empty + var scalaS = Set.empty[Long] + for { i <- 0 to 1000000 } { + val v = rngGen.nextLong() + opalS += v + scalaS += v + } - var opalTotal = 0L - PerformanceEvaluation.time { - for { v <- opalS } { opalTotal += v } - } { t => info(s"OPAL ${t.toSeconds} for foreach") } + var opalTotal = 0L + PerformanceEvaluation.time { + for { v <- opalS } { opalTotal += v } + } { t => info(s"OPAL ${t.toSeconds} for foreach") } - var scalaTotal = 0L - PerformanceEvaluation.time { - for { v <- scalaS } { scalaTotal += v } - } { t => info(s"Scala ${t.toSeconds} for foreach") } + var scalaTotal = 0L + PerformanceEvaluation.time { + for { v <- scalaS } { scalaTotal += v } + } { t => info(s"Scala ${t.toSeconds} for foreach") } - assert(opalTotal == scalaTotal, s"$opalS vs. $scalaS") - } + assert(opalTotal == scalaTotal, s"$opalS vs. $scalaS") } it("for small sets (up to 8 elements) creation and contains check should finish in reasonable time (all values are positive)") { diff --git a/OPAL/common/src/test/scala/org/opalj/collection/mutable/ArrayMapTest.scala b/OPAL/common/src/test/scala/org/opalj/collection/mutable/ArrayMapTest.scala index a9798d8eb6..d331b35384 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/mutable/ArrayMapTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/mutable/ArrayMapTest.scala @@ -169,7 +169,7 @@ class ArrayMapTest extends AnyFlatSpec with Matchers { map.valuesIterator.map(_.intValue()).sum should be(0) } - it should ("have a useable map implementation") in { + it should ("have a usable map implementation") in { val map = ArrayMap.empty[Integer] map(0) = 0 map(2) = 2 diff --git a/OPAL/common/src/test/scala/org/opalj/collection/mutable/FixedSizeBitSetProperties.scala b/OPAL/common/src/test/scala/org/opalj/collection/mutable/FixedSizeBitSetProperties.scala index 9181db8aed..0cc6a38ed9 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/mutable/FixedSizeBitSetProperties.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/mutable/FixedSizeBitSetProperties.scala @@ -65,7 +65,7 @@ object FixedSizeBitSetProperties extends Properties("FixedSizeBitSet") { var ias = initialIas val as = initialIas.iterator.toArray - (0 until as.length).forall { i => + as.indices.forall { i => val v = as(r.nextInt(as.length)) ias -= v bs -= v diff --git a/OPAL/common/src/test/scala/org/opalj/collection/mutable/IntArrayStackTest.scala b/OPAL/common/src/test/scala/org/opalj/collection/mutable/IntArrayStackTest.scala index e00cd35bcd..d9f1de2311 100644 --- a/OPAL/common/src/test/scala/org/opalj/collection/mutable/IntArrayStackTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/collection/mutable/IntArrayStackTest.scala @@ -149,7 +149,7 @@ class IntArrayStackTest extends AnyFlatSpec with Matchers { it should ("should contain the correct values even if the initial stack size was too small") in { val Max = 50000 val stack1 = new IntArrayStack(2) - Range(start = 0, end = Max).foreach { stack1.push(_) } + Range(start = 0, end = Max).foreach { stack1.push } stack1.size should be(Max) { // test iteration diff --git a/OPAL/common/src/test/scala/org/opalj/concurrent/ParForeachArrayElementTest.scala b/OPAL/common/src/test/scala/org/opalj/concurrent/ParForeachArrayElementTest.scala index 6249f2e00c..17f0d90249 100644 --- a/OPAL/common/src/test/scala/org/opalj/concurrent/ParForeachArrayElementTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/concurrent/ParForeachArrayElementTest.scala @@ -52,7 +52,7 @@ class ParForeachArrayElementTest extends AnyFunSpec with Matchers { parForeachArrayElement(data, 8) { e => if (e == 7) break(); else processed.incrementAndGet() } } catch { case ce: ConcurrentExceptions => - assert(ce.getSuppressed().length == 1) + assert(ce.getSuppressed.length == 1) assert(ce.getSuppressed()(0).getCause.isInstanceOf[Break[?]]) } } diff --git a/OPAL/common/src/test/scala/org/opalj/concurrent/TasksTest.scala b/OPAL/common/src/test/scala/org/opalj/concurrent/TasksTest.scala index 321301582c..7a3e5c58c2 100644 --- a/OPAL/common/src/test/scala/org/opalj/concurrent/TasksTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/concurrent/TasksTest.scala @@ -100,9 +100,9 @@ class TasksTest extends AnyFunSpec with Matchers { processedValues.incrementAndGet() } tasks.submit(1) - Thread.sleep(250) // ttask 1 is probably already long finished... + Thread.sleep(250) // task 1 is probably already long finished... tasks.submit(2) - tasks.join() // task 2 is probably still running.. + tasks.join() // task 2 is probably still running... processedValues.get() should be(2) } diff --git a/OPAL/common/src/test/scala/org/opalj/graphs/ClosedSCCTest.scala b/OPAL/common/src/test/scala/org/opalj/graphs/ClosedSCCTest.scala index 2a4aaf7b24..33b8ff0b7c 100644 --- a/OPAL/common/src/test/scala/org/opalj/graphs/ClosedSCCTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/graphs/ClosedSCCTest.scala @@ -25,7 +25,7 @@ class ClosedSCCTest extends AnyFlatSpec with Matchers { } "a graph with just one node" should "not contain any cSCCs" in { - val g = Graph.empty[String].addVertice("a") + val g = Graph.empty[String].addVertex("a") closedSCCs(g) should be(List.empty) } @@ -45,7 +45,7 @@ class ClosedSCCTest extends AnyFlatSpec with Matchers { } "a graph with multiple nodes, but no edges" should "not contain any cSCCs" in { - val g = Graph.empty[String].addVertice("a").addVertice("b") + val g = Graph.empty[String].addVertex("a").addVertex("b") closedSCCs(g) should be(List.empty) } @@ -65,7 +65,7 @@ class ClosedSCCTest extends AnyFlatSpec with Matchers { "a graph with four nodes with two nodes with a self dependency" should "contain two cSCCs with the respective nodes" in { - val g = Graph.empty[String].addEdge("a", "a").addVertice("b").addEdge("c" -> "c").addVertice("d") + val g = Graph.empty[String].addEdge("a", "a").addVertex("b").addEdge("c" -> "c").addVertex("d") closedSCCs(g).map(_.toList.sorted).toSet should be(Set(List("a"), List("c"))) } @@ -369,7 +369,7 @@ class ClosedSCCTest extends AnyFlatSpec with Matchers { while { val g = { val g = - Graph.empty[String].addVertice("a").addVertice("b").addVertice("i").addVertice("n").addVertice("z") + Graph.empty[String].addVertex("a").addVertex("b").addVertex("i").addVertex("n").addVertex("z") // permutate the edges var swaps = 10 while (swaps > 0) { diff --git a/OPAL/common/src/test/scala/org/opalj/graphs/DominanceFrontiersTest.scala b/OPAL/common/src/test/scala/org/opalj/graphs/DominanceFrontiersTest.scala index d2b386845c..574ace6a76 100644 --- a/OPAL/common/src/test/scala/org/opalj/graphs/DominanceFrontiersTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/graphs/DominanceFrontiersTest.scala @@ -62,13 +62,13 @@ class DominanceFrontiersTest extends AnyFlatSpec with Matchers { DominanceFrontiers(dominatorTree, isValidNode) } catch { case t: Throwable => - writeAndOpen(dominatorTree.toDot(), "FailedComputingDominaceFrontierFor", ".dt.gv") + writeAndOpen(dominatorTree.toDot(), "FailedComputingDominanceFrontierFor", ".dt.gv") throw t } } "a graph with a single node" should "result in no dominance frontiers" in { - val graph = Graph.empty[Int].addVertice(0) + val graph = Graph.empty[Int].addVertex(0) val df = setUpDominanceFrontiers(0, graph, 0) df.df(0) should be(EmptyIntArraySet) @@ -114,7 +114,7 @@ class DominanceFrontiersTest extends AnyFlatSpec with Matchers { } "a graph modeling a simple if" should - "result in a dominance frontier grpah which correctly represents the if-block" in { + "result in a dominance frontier graph which correctly represents the if-block" in { val graph = Graph.empty[Int].addEdge(0 -> 1).addEdge(1 -> 2).addEdge(2 -> 3).addEdge(1 -> 3) val df = setUpDominanceFrontiers(0, graph, 3) diff --git a/OPAL/common/src/test/scala/org/opalj/graphs/DominatorTreeTest.scala b/OPAL/common/src/test/scala/org/opalj/graphs/DominatorTreeTest.scala index 51e81a7182..9299ae4ade 100644 --- a/OPAL/common/src/test/scala/org/opalj/graphs/DominatorTreeTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/graphs/DominatorTreeTest.scala @@ -19,7 +19,7 @@ import org.opalj.util.PerformanceEvaluation.time class DominatorTreeTest extends AnyFlatSpec with Matchers { "a graph with just one node" should "result in a dominator tree with a single node" in { - val g = Graph.empty[Int].addVertice(0) + val g = Graph.empty[Int].addVertex(0) val foreachSuccessorOf: Int => ((Int => Unit) => Unit) = (n: Int) => { (f: (Int => Unit)) => g.successors.getOrElse(n, Nil).foreach(e => f(e)) } @@ -44,7 +44,7 @@ class DominatorTreeTest extends AnyFlatSpec with Matchers { } "a graph with one custom node" should "result in a dominator tree with a single node" in { - val g = Graph.empty[Int].addVertice(7) + val g = Graph.empty[Int].addVertex(7) val foreachSuccessorOf: Int => ((Int => Unit) => Unit) = (n: Int) => { (f: (Int => Unit)) => g.successors.getOrElse(n, Nil).foreach(e => f(e)) } diff --git a/OPAL/common/src/test/scala/org/opalj/graphs/PostDominatorTreeTest.scala b/OPAL/common/src/test/scala/org/opalj/graphs/PostDominatorTreeTest.scala index 3981d6465e..4121a4e239 100644 --- a/OPAL/common/src/test/scala/org/opalj/graphs/PostDominatorTreeTest.scala +++ b/OPAL/common/src/test/scala/org/opalj/graphs/PostDominatorTreeTest.scala @@ -20,7 +20,7 @@ import org.opalj.util.PerformanceEvaluation.time class PostDominatorTreeTest extends AnyFlatSpec with Matchers { "a graph with just one node" should "result in a post dominator tree with a single node" in { - val g = Graph.empty[Int].addVertice(0) + val g = Graph.empty[Int].addVertex(0) val foreachSuccessorOf: Int => ((Int => Unit) => Unit) = (n: Int) => { (f: (Int => Unit)) => g.successors.getOrElse(n, Nil).foreach(e => f(e)) } diff --git a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_InvokeDynamic_info.scala b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_InvokeDynamic_info.scala index ff93f33f1a..60f10a5b7e 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_InvokeDynamic_info.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_InvokeDynamic_info.scala @@ -22,7 +22,7 @@ case class CONSTANT_InvokeDynamic_info( override def asCPNode(implicit cp: Constant_Pool): Node = {
    - {this.getClass().getSimpleName} + {this.getClass.getSimpleName} (
    bootstrap_method_attr_index={bootstrap_method_attr_index}
    diff --git a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_MethodHandle_info.scala b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_MethodHandle_info.scala index d60467c6ae..e48e01e977 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_MethodHandle_info.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_MethodHandle_info.scala @@ -19,7 +19,7 @@ case class CONSTANT_MethodHandle_info( override def Constant_Type_Value: ConstantPoolTag = bi.ConstantPoolTags.CONSTANT_MethodHandle - def refrenceKindAsNode(implicit cp: Constant_Pool): Node = { + def referenceKindAsNode(implicit cp: Constant_Pool): Node = { { reference_kind match { case 1 => "REF_getField getfield C.f: T" @@ -52,7 +52,7 @@ case class CONSTANT_MethodHandle_info( {this.getClass.getSimpleName} (reference_kind={reference_kind} /* - {refrenceKindAsNode} + {referenceKindAsNode} */, reference_index={reference_index} /* @@ -62,7 +62,7 @@ case class CONSTANT_MethodHandle_info( override def asInstructionParameter(implicit cp: Constant_Pool): NodeSeq = MethodHandle(kind={ - refrenceKindAsNode + referenceKindAsNode }, { cp(reference_index).asInstructionParameter }) diff --git a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_NameAndType_info.scala b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_NameAndType_info.scala index dfe489a493..85398e3597 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_NameAndType_info.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_NameAndType_info.scala @@ -22,7 +22,7 @@ case class CONSTANT_NameAndType_info( override def asCPNode(implicit cp: Constant_Pool): Node =
    - {this.getClass().getSimpleName} + {this.getClass.getSimpleName} (
    name_index={name_index} diff --git a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Ref.scala b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Ref.scala index 2a32833a1e..7495a2a4c5 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Ref.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Ref.scala @@ -18,7 +18,7 @@ trait CONSTANT_Ref extends Constant_Pool_Entry { override def asCPNode(implicit cp: Constant_Pool): Node =
    - {this.getClass().getSimpleName} + {this.getClass.getSimpleName} (
    class_index={class_index} « diff --git a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Utf8_info.scala b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Utf8_info.scala index 4f515de3b8..21e78816b4 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Utf8_info.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/CONSTANT_Utf8_info.scala @@ -14,7 +14,7 @@ case class CONSTANT_Utf8_info(raw: Array[Byte], value: String) extends Constant_ override final def size: Int = { // The length of the string in bytes is not equivalent to `value.length` due to the - // usage of the modified UTF8 enconding. + // usage of the modified UTF8 encoding. 1 /* tag */ + 2 /* the length */ + raw.length /* the bytes of the string */ } @@ -38,13 +38,13 @@ case class CONSTANT_Utf8_info(raw: Array[Byte], value: String) extends Constant_ object CONSTANT_Utf8 { def apply(value: String): CONSTANT_Utf8_info = { - new CONSTANT_Utf8_info( + CONSTANT_Utf8_info( { val bout = new ByteArrayOutputStream(value.length + 2) val dout = new DataOutputStream(bout) dout.writeUTF(value) dout.flush() - bout.toByteArray() + bout.toByteArray }, value ) diff --git a/OPAL/da/src/main/scala/org/opalj/da/ClassFile.scala b/OPAL/da/src/main/scala/org/opalj/da/ClassFile.scala index 0c6dda0810..86dc365424 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/ClassFile.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/ClassFile.scala @@ -74,7 +74,7 @@ case class ClassFile( /** * The fully qualified name of this class in Java notation (i.e., using dots - * to seperate packages.) + * to separate packages.) */ final val thisType: ClassTypeInfo = cp(this_class).asConstantClass.asJavaClassOrInterfaceType @@ -171,7 +171,7 @@ case class ClassFile( * @param embeddedCSS A string which contains a CSS. * @param cssFile Reference to a(nother) CSS file. * @param jsFile Reference to a JavaScript file. - * @return The generatd HTML. + * @return The generated HTML. */ def toXHTML( source: Option[AnyRef], diff --git a/OPAL/da/src/main/scala/org/opalj/da/Code.scala b/OPAL/da/src/main/scala/org/opalj/da/Code.scala index 4bf49f59fe..5e8707424c 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/Code.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/Code.scala @@ -51,7 +51,7 @@ case class Code(instructions: Array[Byte]) { { // One instruction per row for { - pc <- (0 until instructions.length) + pc <- instructions.indices if instructions(pc) != null } yield { val exceptionInfo = exceptions.foldRight(Seq.empty[Node]) { (a, b) => Seq(a(pc)) ++ b } @@ -94,7 +94,7 @@ case class Code(instructions: Array[Byte]) { import java.io.ByteArrayInputStream val bas = new ByteArrayInputStream(source) val in = new DataInputStream(bas) - val codeLength = source.size + val codeLength = source.length val instructions = new Array[Node](codeLength) var wide: Boolean = false diff --git a/OPAL/da/src/main/scala/org/opalj/da/Code_attribute.scala b/OPAL/da/src/main/scala/org/opalj/da/Code_attribute.scala index 13984cfdec..b65a13eb17 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/Code_attribute.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/Code_attribute.scala @@ -58,7 +58,7 @@ case class Code_attribute( def attributesAsXHTML(implicit cp: Constant_Pool): Seq[Node] = attributes.map(_.toXHTML) - /** Can only be called if the exception table is non-emtpy! */ + /** Can only be called if the exception table is non-empty! */ def exception_handlersAsXHTML(implicit cp: Constant_Pool): NodeSeq = { if (exceptionTable.nonEmpty)
    diff --git a/OPAL/da/src/main/scala/org/opalj/da/Constant_Pool_Entry.scala b/OPAL/da/src/main/scala/org/opalj/da/Constant_Pool_Entry.scala index 4c1aa0b28a..77580eae6f 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/Constant_Pool_Entry.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/Constant_Pool_Entry.scala @@ -41,7 +41,7 @@ trait Constant_Pool_Entry extends bi.reader.ConstantPoolEntry { /** * Creates a resolved representation of this constant pool entry that is well-suited as an * output in combination with an instruction (e.g., an `ldc`, `get|putfield`, - * `invokXYZ`,...). I.e., a representation that contains no more pointers in the CP. + * `invokeXYZ`,...). I.e., a representation that contains no more pointers in the CP. */ def asInstructionParameter(implicit cp: Constant_Pool): NodeSeq diff --git a/OPAL/da/src/main/scala/org/opalj/da/Disassembler.scala b/OPAL/da/src/main/scala/org/opalj/da/Disassembler.scala index 438b8b3fc4..bdbab1e699 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/Disassembler.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/Disassembler.scala @@ -82,12 +82,12 @@ object Disassembler { } while (i < args.length) { args(i) match { - case "-help" | "--help" => { Console.out.println(Usage); return } + case "-help" | "--help" => Console.out.println(Usage); return case "-o" => toFile = Some(readNextArg()) case "-open" => openHTMLFile = true case "-noDefaultCSS" => noDefaultCSS = true case "-noMethodsFilter" => noMethodsFilter = true - case "-noHeader" => { noHeader = true; noMethodsFilter = true; noDefaultCSS = true } + case "-noHeader" => noHeader = true; noMethodsFilter = true; noDefaultCSS = true case "-css" => css = Some(readNextArg()) case "-js" => js = Some(readNextArg()) case "-source" => sources ::= readNextArg() @@ -169,7 +169,7 @@ object Disassembler { targetFile match { case Some(f) => - Files.write(f.toPath, xHTML.toString.getBytes("UTF-8")) + Files.write(f.toPath, xHTML.getBytes("UTF-8")) println("wrote: " + f) if (openHTMLFile) org.opalj.io.open(f) case None => diff --git a/OPAL/da/src/main/scala/org/opalj/da/ElementValue.scala b/OPAL/da/src/main/scala/org/opalj/da/ElementValue.scala index 6d9ab62835..7f07244966 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/ElementValue.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/ElementValue.scala @@ -39,42 +39,42 @@ trait BaseElementValue extends ElementValue { } case class ByteValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = ByteValue.tag.toInt + override final def tag: Int = ByteValue.tag } object ByteValue { final val tag: Int = 'B' } case class CharValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = CharValue.tag.toInt + override final def tag: Int = CharValue.tag } object CharValue { final val tag: Int = 'C' } case class DoubleValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = DoubleValue.tag.toInt + override final def tag: Int = DoubleValue.tag } object DoubleValue { final val tag: Int = 'D' } case class FloatValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = FloatValue.tag.toInt + override final def tag: Int = FloatValue.tag } object FloatValue { final val tag: Int = 'F' } case class IntValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = IntValue.tag.toInt + override final def tag: Int = IntValue.tag } object IntValue { final val tag: Int = 'I' } case class LongValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = LongValue.tag.toInt + override final def tag: Int = LongValue.tag } object LongValue { final val tag: Int = 'J' } case class ShortValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = ShortValue.tag.toInt + override final def tag: Int = ShortValue.tag } object ShortValue { final val tag: Int = 'S' } case class BooleanValue(const_value_index: Constant_Pool_Index) extends BaseElementValue { - override final def tag: Int = BooleanValue.tag.toInt + override final def tag: Int = BooleanValue.tag } object BooleanValue { final val tag: Int = 'Z' } @@ -82,7 +82,7 @@ case class StringValue(const_value_index: Constant_Pool_Index) extends ElementVa override final def attribute_length: Int = 1 + 2 - override final def tag: Int = StringValue.tag.toInt + override final def tag: Int = StringValue.tag def toXHTML(implicit cp: Constant_Pool): Node = {
    "{cp(const_value_index).toString}"
    @@ -94,7 +94,7 @@ case class ClassValue(class_info_index: Constant_Pool_Index) extends ElementValu override final def attribute_length: Int = 1 + 2 - override final def tag: Int = ClassValue.tag.toInt + override final def tag: Int = ClassValue.tag def toXHTML(implicit cp: Constant_Pool): Node = {
    {returnTypeAsJavaType(class_info_index).asSpan("")}.class
    @@ -111,7 +111,7 @@ case class EnumValue( ) extends StructuredElementValue { override final def attribute_length: Int = 1 + 2 + 2 - override final def tag: Int = EnumValue.tag.toInt + override final def tag: Int = EnumValue.tag def toXHTML(implicit cp: Constant_Pool): Node = { val et = parseFieldType(type_name_index).asSpan("") @@ -127,7 +127,7 @@ case class AnnotationValue(annotation: Annotation) extends StructuredElementValu override final def attribute_length: Int = 1 + annotation.attribute_length - override final def tag: Int = AnnotationValue.tag.toInt + override final def tag: Int = AnnotationValue.tag def toXHTML(implicit cp: Constant_Pool): Node = {
    {annotation.toXHTML}
    @@ -142,7 +142,7 @@ case class ArrayValue(values: Seq[ElementValue]) extends StructuredElementValue 1 + values.foldLeft(2 /*num_values*/ )((c, n) => c + n.attribute_length) } - override final def tag: Int = ArrayValue.tag.toInt + override final def tag: Int = ArrayValue.tag def toXHTML(implicit cp: Constant_Pool): Node = { val valueNodes = diff --git a/OPAL/da/src/main/scala/org/opalj/da/LineNumberTableEntry.scala b/OPAL/da/src/main/scala/org/opalj/da/LineNumberTableEntry.scala index bfa7450a36..4535e567d8 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/LineNumberTableEntry.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/LineNumberTableEntry.scala @@ -15,7 +15,7 @@ case class LineNumberTableEntry( line_number: Int ) { - def toXHTML(): Node = { + def toXHTML: Node = {
    start_pc: {start_pc}, line_number: {line_number}
    } } diff --git a/OPAL/da/src/main/scala/org/opalj/da/LineNumberTable_attribute.scala b/OPAL/da/src/main/scala/org/opalj/da/LineNumberTable_attribute.scala index f3d133afa9..27fa1cb938 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/LineNumberTable_attribute.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/LineNumberTable_attribute.scala @@ -24,6 +24,6 @@ case class LineNumberTable_attribute(
    } - def line_number_tableToXHTML(): Seq[Node] = line_number_table.map(_.toXHTML()) + def line_number_tableToXHTML(): Seq[Node] = line_number_table.map(_.toXHTML) } diff --git a/OPAL/da/src/main/scala/org/opalj/da/Signature_attribute.scala b/OPAL/da/src/main/scala/org/opalj/da/Signature_attribute.scala index 2158f17689..9d7eace494 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/Signature_attribute.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/Signature_attribute.scala @@ -105,8 +105,8 @@ Add a comment to this line + { typeSigToXHTML(prop.fieldTypeSignature) } + + case _ => -+ // this is a complete list of TypeArugments at the time of writing -+ throw new IllegalArgumentException("unknown TypeArugment") ++ // this is a complete list of TypeArguments at the time of writing ++ throw new IllegalArgumentException("unknown TypeArgument") + } + } */ diff --git a/OPAL/da/src/main/scala/org/opalj/da/TypeAnnotationTarget.scala b/OPAL/da/src/main/scala/org/opalj/da/TypeAnnotationTarget.scala index 2ebeeb1a9c..bdec5b3ffc 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/TypeAnnotationTarget.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/TypeAnnotationTarget.scala @@ -241,7 +241,7 @@ trait TATLocalvar extends TypeAnnotationTarget { def description: String def toXHTML(implicit cp: Constant_Pool): Node = { - {description}[0x{tag.toHexString}](local variable occurences:{ + {description}[0x{tag.toHexString}](local variable occurrences:{ localvarTable.map(_.toXHTML) }) } diff --git a/OPAL/da/src/main/scala/org/opalj/da/TypeInfo.scala b/OPAL/da/src/main/scala/org/opalj/da/TypeInfo.scala index 70e94dafb1..499066e527 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/TypeInfo.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/TypeInfo.scala @@ -16,7 +16,7 @@ sealed abstract class TypeInfo { def asJava: String /** - * `true` if the underlying type (in case of an array the element type) is a base type/ + * `true` if the underlying type (in case of an array the element-type) is a base type/ * primitive type; `false` in all other cases except if the "type" is void. In that case * an exception is thrown. */ diff --git a/OPAL/da/src/main/scala/org/opalj/da/Unknown_attribute.scala b/OPAL/da/src/main/scala/org/opalj/da/Unknown_attribute.scala index f039dec14f..e2e5ddfe9f 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/Unknown_attribute.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/Unknown_attribute.scala @@ -14,7 +14,7 @@ case class Unknown_attribute( info: Array[Byte] ) extends Attribute { - override final def attribute_length: Int = info.size + override final def attribute_length: Int = info.length @nowarn("msg=Discarded non-Unit value") // TODO Remove once scala compiler is fixed: https://github.com/scala/bug/issues/12658 override def toXHTML(implicit cp: Constant_Pool): Node = { diff --git a/OPAL/da/src/main/scala/org/opalj/da/VerificationTypeInfo.scala b/OPAL/da/src/main/scala/org/opalj/da/VerificationTypeInfo.scala index b713327eda..f40bda510e 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/VerificationTypeInfo.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/VerificationTypeInfo.scala @@ -34,7 +34,7 @@ object VerificationTypeInfo { final val ITEM_Null = 5 final val ITEM_UninitializedThis = 6 final val ITEM_Object = 7 - final val ITEM_Unitialized = 8 + final val ITEM_Uninitialized = 8 } case object TopVariableInfo extends VerificationTypeInfo { @@ -121,11 +121,11 @@ case class ObjectVariableInfo(cpool_index: Int) extends VerificationTypeInfo { } } -case class UninitializedVariableInfo(val offset: Int) extends VerificationTypeInfo { +case class UninitializedVariableInfo(offset: Int) extends VerificationTypeInfo { override final def attribute_length: Int = 1 + 2 - def tag: Int = VerificationTypeInfo.ITEM_Unitialized + def tag: Int = VerificationTypeInfo.ITEM_Uninitialized def toXHTML(implicit cp: Constant_Pool): Node = { <Uninitialized({offset})> diff --git a/OPAL/da/src/main/scala/org/opalj/da/package.scala b/OPAL/da/src/main/scala/org/opalj/da/package.scala index 7280ace4bc..2f3465805b 100644 --- a/OPAL/da/src/main/scala/org/opalj/da/package.scala +++ b/OPAL/da/src/main/scala/org/opalj/da/package.scala @@ -84,7 +84,7 @@ package object da { val explicitAccessFlags = VisibilityModifier.get(access_flags) match { - case None => if (accessFlags.length() == 0) "default" else accessFlags + " default" + case None => if (accessFlags.isEmpty) "default" else accessFlags + " default" case _ => accessFlags } @@ -259,10 +259,10 @@ package object da { } def abbreviateType(definingType: String, memberType: String): Node = { - val classAttrtibute = "type " + (if (definingType.indexOf('[') == -1) "object" else "array") + val classAttribute = "type " + (if (definingType.indexOf('[') == -1) "object" else "array") val abbreviatedMemberType = org.opalj.bytecode.abbreviateType(definingType, memberType, '.') - {abbreviatedMemberType} + {abbreviatedMemberType} } def byteArrayToNode(info: Array[Byte]): Node = { diff --git a/OPAL/de/src/main/scala/org/opalj/de/DependencyCollectingDependencyProcessor.scala b/OPAL/de/src/main/scala/org/opalj/de/DependencyCollectingDependencyProcessor.scala index 5792fd4320..eead73a7ca 100644 --- a/OPAL/de/src/main/scala/org/opalj/de/DependencyCollectingDependencyProcessor.scala +++ b/OPAL/de/src/main/scala/org/opalj/de/DependencyCollectingDependencyProcessor.scala @@ -15,7 +15,7 @@ import org.opalj.collection.asScala * This class is thread-safe. However, it does not make sense to call the method * [[toStore]] unless the dependency extractor that uses this processor has completed. * - * @param virtualSourceElementsCount An estimation of the number of + * @param virtualSourceElementsCountHint An estimation of the number of * "VirtualSourceElements" that will be analyzed. In case that a program and all * its libraries are analyzed this number should be roughly equivalent to the number * of all declared classes/interfaces/enums/annotations plus the number of all diff --git a/OPAL/de/src/main/scala/org/opalj/de/DependencyExtractor.scala b/OPAL/de/src/main/scala/org/opalj/de/DependencyExtractor.scala index c18bc643b3..26cbe2c3b6 100644 --- a/OPAL/de/src/main/scala/org/opalj/de/DependencyExtractor.scala +++ b/OPAL/de/src/main/scala/org/opalj/de/DependencyExtractor.scala @@ -26,7 +26,7 @@ import org.opalj.log.OPALLogger * class is thread-safe. * * However, if multiple dependency extractors are executed concurrently and - * share the same [[DependencyProcessor]] or the same `DepencencyExtractor` + * share the same [[DependencyProcessor]] or the same `DependencyExtractor` * is used by multiple threads concurrently, the [[DependencyProcessor]] has to be * thread-safe. * @@ -284,7 +284,7 @@ class DependencyExtractor(protected val dependencyProcessor: DependencyProcessor case _ => val fieldInfo = vf.toJava val message = s"unexpected field attribute: $attribute ($fieldInfo)" - throw new BytecodeProcessingFailedException(message) + throw BytecodeProcessingFailedException(message) } } } diff --git a/OPAL/de/src/main/scala/org/opalj/de/DependencyProcessor.scala b/OPAL/de/src/main/scala/org/opalj/de/DependencyProcessor.scala index 9f9f7a5098..61039ff748 100644 --- a/OPAL/de/src/main/scala/org/opalj/de/DependencyProcessor.scala +++ b/OPAL/de/src/main/scala/org/opalj/de/DependencyProcessor.scala @@ -33,7 +33,7 @@ trait DependencyProcessor { * Called for each dependency of a source element on an array type. * * @note A dependency on an array type also introduces another dependency on the - * element type of the array type and the dependency extractor will + * element-type of the array type and the dependency extractor will * notify the dependency processor about such dependencies. * * @param source The source element that has a dependency on the array type. diff --git a/OPAL/de/src/main/scala/org/opalj/de/DependencyStore.scala b/OPAL/de/src/main/scala/org/opalj/de/DependencyStore.scala index ffacd35db0..07d3c6193a 100644 --- a/OPAL/de/src/main/scala/org/opalj/de/DependencyStore.scala +++ b/OPAL/de/src/main/scala/org/opalj/de/DependencyStore.scala @@ -38,7 +38,7 @@ object DependencyStore { val dc = time { val dc = new DependencyCollectingDependencyProcessor(Some(classFiles.size * 10)) val de = createDependencyExtractor(dc) - classFiles.par.foreach { de.process(_) } + classFiles.par.foreach { de.process } dc } { ns => OPALLogger.info("progress", "collecting dependencies took " + ns.toSeconds) } diff --git a/OPAL/de/src/main/scala/org/opalj/de/FilterSelfDependencies.scala b/OPAL/de/src/main/scala/org/opalj/de/FilterSelfDependencies.scala index 920332f90c..69b40c2915 100644 --- a/OPAL/de/src/main/scala/org/opalj/de/FilterSelfDependencies.scala +++ b/OPAL/de/src/main/scala/org/opalj/de/FilterSelfDependencies.scala @@ -21,11 +21,11 @@ trait FilterSelfDependencies extends DependencyProcessor { * @param dependencyType The type of the dependency. */ abstract override def processDependency( - source: VirtualSourceElement, - target: VirtualSourceElement, - dType: DependencyType + source: VirtualSourceElement, + target: VirtualSourceElement, + dependencyType: DependencyType ): Unit = { - if (source != target) super.processDependency(source, target, dType) + if (source != target) super.processDependency(source, target, dependencyType) } } diff --git a/OPAL/de/src/test/scala/org/opalj/de/DependencyExtractorJava8Test.scala b/OPAL/de/src/test/scala/org/opalj/de/DependencyExtractorJava8Test.scala index 3f05aa2d49..f5b79da5bb 100644 --- a/OPAL/de/src/test/scala/org/opalj/de/DependencyExtractorJava8Test.scala +++ b/OPAL/de/src/test/scala/org/opalj/de/DependencyExtractorJava8Test.scala @@ -40,13 +40,13 @@ class DependencyExtractorJava8Test extends AnyFunSuite { case Some(x) => dependencies = dependencies.updated(key, x - 1) case None => - val remainigDependencies = + val remainingDependencies = dependencies.toList.sorted.mkString( s"Remaining dependencies (${dependencies.size}):\n\t", "\n\t", "\n" ) - fail("the dependency " + key + " was not extracted.\n" + remainigDependencies) + fail("the dependency " + key + " was not extracted.\n" + remainingDependencies) } } @@ -71,7 +71,7 @@ class DependencyExtractorJava8Test extends AnyFunSuite { ) } - assert(dependencies.size > 0, "no dependencies extracted") + assert(dependencies.nonEmpty, "no dependencies extracted") // package dependencies; // @@ -2226,7 +2226,7 @@ class DependencyExtractorJava8Test extends AnyFunSuite { // // EMPTY // } catch (Exception e) { - // // EMTPY + // // EMPTY assertDependency( "dependencies.AnnotationTypeTestClass.tryWithResource(java.lang.String)", "java.lang.Exception", diff --git a/OPAL/framework/Readme.md b/OPAL/framework/Readme.md index 4fb82b3fd1..33f294b413 100644 --- a/OPAL/framework/Readme.md +++ b/OPAL/framework/Readme.md @@ -1,4 +1,4 @@ # Overview -This project aggregates all core projects belonging to OPAL. Hence, in most cases it is sufficient/recommended to just declare a dependency to this project to get a consistent snapshot of all sub projects. +This project aggregates all core projects belonging to OPAL. Hence, in most cases it is sufficient/recommended to just declare a dependency to this project to get a consistent snapshot of all subprojects. This project primarily contains configuration files that are targeted at specific use cases. diff --git a/OPAL/ide/src/main/scala/org/opalj/ide/integration/FlowRecordingAnalysisScheduler.scala b/OPAL/ide/src/main/scala/org/opalj/ide/integration/FlowRecordingAnalysisScheduler.scala index 7f2fa1c11d..6aa8e0b0d7 100644 --- a/OPAL/ide/src/main/scala/org/opalj/ide/integration/FlowRecordingAnalysisScheduler.scala +++ b/OPAL/ide/src/main/scala/org/opalj/ide/integration/FlowRecordingAnalysisScheduler.scala @@ -12,7 +12,7 @@ import java.io.Writer import java.nio.file.Files import java.nio.file.Path import java.nio.file.Paths -import scala.collection.mutable.{Map => MutableMap} +import scala.collection.mutable.Map as MutableMap import org.opalj.br.analyses.ProjectInformationKeys import org.opalj.br.analyses.SomeProject diff --git a/OPAL/ide/src/main/scala/org/opalj/ide/solver/IDEAnalysis.scala b/OPAL/ide/src/main/scala/org/opalj/ide/solver/IDEAnalysis.scala index 18c784201a..d326480d53 100644 --- a/OPAL/ide/src/main/scala/org/opalj/ide/solver/IDEAnalysis.scala +++ b/OPAL/ide/src/main/scala/org/opalj/ide/solver/IDEAnalysis.scala @@ -3,9 +3,9 @@ package org.opalj package ide package solver -import scala.collection.mutable.{Map => MutableMap} -import scala.collection.mutable.{Queue => MutableQueue} -import scala.collection.mutable.{Set => MutableSet} +import scala.collection.mutable.Map as MutableMap +import scala.collection.mutable.Queue as MutableQueue +import scala.collection.mutable.Set as MutableSet import org.opalj.br.analyses.SomeProject import org.opalj.br.fpcf.FPCFAnalysis @@ -323,7 +323,7 @@ class IDEAnalysis[Fact <: IDEFact, Value <: IDEValue, Statement, Callable <: Ent * for the path. */ def getSummaryFunction(path: Path): SummaryFunction = { - summaryFunctions.getOrElse(path, allTopEdgeFunction) // else part handels IDE lines 3 - 4 + summaryFunctions.getOrElse(path, allTopEdgeFunction) // else part handles IDE lines 3 - 4 } /** diff --git a/OPAL/ifds/src/main/scala/org/opalj/ifds/IFDSAnalysis.scala b/OPAL/ifds/src/main/scala/org/opalj/ifds/IFDSAnalysis.scala index c29faa6cdc..cf62586045 100644 --- a/OPAL/ifds/src/main/scala/org/opalj/ifds/IFDSAnalysis.scala +++ b/OPAL/ifds/src/main/scala/org/opalj/ifds/IFDSAnalysis.scala @@ -192,7 +192,7 @@ case class PathEdges[Fact <: AbstractIFDSFact, S, C <: AnyRef]( * The state of the analysis. For each method and source fact, there is a separate state. * * @param source The callable and input fact for which the callable is analyzed. - * @param subsumes The subsuming function, return whether a new fact is subsume by the existing ones + * @param subsumes The subsuming function, return whether a new fact is subsumed by the existing ones */ protected class IFDSState[Fact <: AbstractIFDSFact, C <: AnyRef, S, WorklistItem]( val source: (C, IFDSFact[Fact, C, S]), diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/AnalysisScenario.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/AnalysisScenario.scala index 4230c685c8..abc2d4e21a 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/AnalysisScenario.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/AnalysisScenario.scala @@ -72,7 +72,7 @@ class AnalysisScenario[A](val ps: PropertyStore) { allCS foreach { cs => // all derived properties depend on all used properties cs.derives foreach { derived => - psDeps.addVertice(derived) + psDeps.addVertex(derived) cs.uses(ps) foreach { use => psDeps.addEdge(derived, use) } } } @@ -99,7 +99,7 @@ class AnalysisScenario[A](val ps: PropertyStore) { derivedBy } allCS foreach { cs => - compDeps.addVertice(cs) + compDeps.addVertex(cs) cs.uses(ps) foreach { usedPK => derivedBy.get(usedPK).iterator.flatten.foreach { providerCS => if (providerCS ne cs) { @@ -132,7 +132,7 @@ class AnalysisScenario[A](val ps: PropertyStore) { if (derivedProperties.contains(lazilyDerivedProperty)) { val pkName = PropertyKey.name(lazilyDerivedProperty.pk.id) val m = s"can not register $cs: $pkName is already computed by another analysis" - throw new SpecificationViolation(m) + throw SpecificationViolation(m) } } @@ -144,7 +144,7 @@ class AnalysisScenario[A](val ps: PropertyStore) { val m = s"can not register $cs: " + s"$pkName is not computed collaboratively by all analyses" - throw new SpecificationViolation(m) + throw SpecificationViolation(m) } } @@ -152,7 +152,7 @@ class AnalysisScenario[A](val ps: PropertyStore) { if (derivedProperties.contains(eagerlyDerivedProperty)) { val pkName = PropertyKey.name(eagerlyDerivedProperty.pk.id) val m = s"can not register $cs: $pkName is already computed by another analysis" - throw new SpecificationViolation(m) + throw SpecificationViolation(m) } } @@ -231,7 +231,7 @@ class AnalysisScenario[A](val ps: PropertyStore) { if (alreadyComputedPropertyKinds.contains(derivedProperty.pk.id)) { val pkName = PropertyKey.name(derivedProperty.pk.id) val m = s"can not register $cs: $pkName was computed in a previous phase" - throw new SpecificationViolation(m) + throw SpecificationViolation(m) } } } diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionP.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionP.scala index 27c59f3318..4ec4c60577 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionP.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionP.scala @@ -115,9 +115,9 @@ sealed trait EOptionP[+E <: Entity, +P <: Property] { * } * } * }}} - * In that case – assuming we do not perform context sensitive analyses – + * In that case – assuming we do not perform context-sensitive analyses – * if the lower bound for `f` for the set of thrown exceptions is determined - * to be `Set(IllegalArgumentException,UnkownError)`, then the catch of the + * to be `Set(IllegalArgumentException,UnknownError)`, then the catch of the * `NumberFormatException` can be ruled out and a final result for `m` can be * computed. * @@ -141,7 +141,7 @@ sealed trait EOptionP[+E <: Entity, +P <: Property] { * provided that this `EOptionP` is guaranteed to be at most as old as `oldEOptionP`. * That is, this EPS is considered to be newer if the properties are different. * - * @note The caller has to ensure that this EOptionP and and the given EOptionP are + * @note The caller has to ensure that this EOptionP and the given EOptionP are * comparable. That is, they define properties of the same kind associated with * the same entity and same bounds. */ diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionPSet.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionPSet.scala index f1293cb4d5..fe74a02a96 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionPSet.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/EOptionPSet.scala @@ -6,7 +6,7 @@ import scala.collection.immutable.IntMap import scala.collection.mutable /** - * An semi-mutable set storing EPKs and interim properties. + * A semi-mutable set storing EPKs and interim properties. * * The set is semi-mutable in the sense that the concrete property values associated with * a specific entity can be updated, but as soon as dependencies to other E/PKs are added or removed @@ -77,7 +77,7 @@ sealed trait EOptionPSet[E <: Entity, P <: Property] extends Iterable[EOptionP[E */ def updateAll()(implicit ps: PropertyStore): Unit - /** Creates new successor instance which can be manipulated independently from this instance. */ + /** Creates new successor instance which can be manipulated independently of this instance. */ override def clone(): EOptionPSet[E, P] = { // an implementation is required to shut up the compiler... throw new UnknownError("this method must be overridden by subclasses") diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/FPCFAnalysesRegistry.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/FPCFAnalysesRegistry.scala index 4c6444419e..55496dbcbf 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/FPCFAnalysesRegistry.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/FPCFAnalysesRegistry.scala @@ -46,7 +46,8 @@ object FPCFAnalysesRegistry { * @param analysisDescription A short description of the analysis and the properties that the * analysis computes; in particular w.r.t. a specific set of entities. * @param analysisFactory The factory. - * @param lazyFactory Register the analysis factory as lazy analysis factory. + * @param factoryType Type to register the analysis factory as (eager, lazy, triggered) + * @param default Whether this is the default analysis to be scheduled if the property is required */ def register( analysisID: String, diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/FallbackReason.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/FallbackReason.scala index f05547f8c9..e01486cd98 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/FallbackReason.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/FallbackReason.scala @@ -23,7 +23,7 @@ case object PropertyIsNotComputedByAnyAnalysis extends FallbackReason { * The fallback is used, because the property was queried/is required, but the property was * not computed for the specific entity though an analysis is scheduled/executed. * - * @note This may happen for properties associated with dead code/code that is no used by the + * @note This may happen for properties associated with dead code/code that is not used by the * current project. E.g., the callers property of an unused library method is most * likely not computed. If it is queried, then this is the Property that should be returned. */ diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.md b/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.md index cf6432cbcf..90188c089b 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.md +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.md @@ -6,7 +6,7 @@ Properties computed for entities always have an underlying (semi-)lattice which In case that we have entities for which no analyses are scheduled, it is possible to let the store automatically fill in default values (fallback values). Fallbacks are configurable. ## Programming Model -A computation of a property must never stop and wait for the result of a dependee, instead it must collect all dependees which have a refineable property of relevance and give this information to the store when it stores (a next) intermediate result. +A computation of a property must never stop and wait for the result of a dependee, instead it must collect all dependees which have a refinable property of relevance and give this information to the store when it stores (a next) intermediate result. ## Scheduling property computations It is possible to schedule the computation of the properties for an arbitrary set of entities. @@ -18,7 +18,7 @@ Lazy property computations are regular analyses, however, they are only schedule In some cases it is possible to write a very, very fast analysis (at most performing a few hundred bytecode operations) that can compute some property efficiently, without requiring significant resources upfront. ## Dependencies are managed automatically -I.e., the analysis only states to which other entities/property kinds it has dependencies and is informed about the changes automatically. The call back function (continuation function) is guaranteed to never be executed concurrently (additionally, the store gives the guarantee that the analysis will see the last value of a entity/property kind it is depending on eventually). After processing the dependencies, the analysis states their new dependencies. The new set of dependencies can be completely different. +I.e., the analysis only states to which other entities/property kinds it has dependencies and is informed about the changes automatically. The call back function (continuation function) is guaranteed to never be executed concurrently (additionally, the store gives the guarantee that the analysis will see the last value of an entity/property kind it depends on eventually). After processing the dependencies, the analysis states their new dependencies. The new set of dependencies can be completely different. The property store has the guarantee that it will get a new computation result whenever it passes an updated property to a downstream analysis. @@ -28,4 +28,4 @@ The property store has the guarantee that it will get a new computation result w ## Debugging support To facilitate the debugging of analyses, several options, which depend on the concrete property store implementation, are available. -For example, the `PKEParallelPropertyStore` has an explicit `debugging` mode and also offeres the possibility to record all relevant events such as updates of values. +For example, the `PKEParallelPropertyStore` has an explicit `debugging` mode and also offers the possibility to record all relevant events such as updates of values. diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.scala index 7cea67c4de..7d7b4b2453 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/PropertyStore.scala @@ -74,12 +74,12 @@ import org.opalj.log.OPALLogger.info * the first partial result has to set the property to the default (typically "most precise") * value.''' * - * - '''Monoton''' a function which computes a property has to be monotonic. + * - '''Monotone''' a function which computes a property has to be monotonic. * * ===Cyclic Dependencies=== * In general, it may happen that some analyses are mutually dependent and therefore no * final value is directly computed. In this case the current extension (the most precise result) - * of the properties are committed as the final values when the phase end. If the analyses only + * of the properties are committed as the final values when the phase ends. If the analyses only * computed a lower bound that one will be used. * * ==Thread Safety== @@ -141,7 +141,7 @@ abstract class PropertyStore { * Attaches or returns some information associated with the property store using a key object. * * This method is thread-safe. However, the client which adds information to the store - * has to ensure that the overall process of adding/querying/removing is well defined and + * has to ensure that the overall process of adding/querying/removing is well-defined and * the ordered is ensured. */ final def getOrCreateInformation[T <: AnyRef](key: AnyRef, f: => T): T = { @@ -152,7 +152,7 @@ abstract class PropertyStore { * Returns the information stored in the store, if any. * * This method is thread-safe. However, the client which adds information to the store - * has to ensure that the overall process of adding/querying/removing is well defined and + * has to ensure that the overall process of adding/querying/removing is well-defined and * the ordered is ensured. */ final def getInformation[T <: AnyRef](key: AnyRef): Option[T] = { @@ -163,7 +163,7 @@ abstract class PropertyStore { * Returns the information stored in the store and removes the key, if any. * * This method is thread-safe. However, the client which adds information to the store - * has to ensure that the overall process of adding/querying/removing is well defined and + * has to ensure that the overall process of adding/querying/removing is well-defined and * the ordered is ensured. */ final def getAndClearInformation[T <: AnyRef](key: AnyRef): Option[T] = { @@ -197,7 +197,7 @@ abstract class PropertyStore { /** * If set to `true` no new computations will be scheduled and running computations will - * be terminated. Afterwards, the store can be queried, but no new computations can + * be terminated. Afterward, the store can be queried, but no new computations can * be started. */ @volatile var doTerminate: Boolean = false @@ -324,7 +324,7 @@ abstract class PropertyStore { /** * `true` if entities with a specific property kind (EP) may have dependers with suppressed - * notifications. (I.e., suppressInteriumUpdates("depender")("EP") is `true`.) + * notifications. (I.e., suppressInterimUpdates("depender")("EP") is `true`.) */ protected final val hasSuppressedDependers: Array[Boolean] = { Array.fill(SupportedPropertyKinds) { false } @@ -588,9 +588,9 @@ abstract class PropertyStore { // Step 1 // Copy all property kinds that were computed in the previous phase that are no // longer computed to the "propertyKindsComputedInEarlierPhase" array. - // Afterwards, initialize the "propertyKindsComputedInThisPhase" with the given + // Afterward, initialize the "propertyKindsComputedInThisPhase" with the given // information. - // Note that "lazy" property computations may be executed accross several phases, + // Note that "lazy" property computations may be executed across several phases, // however, all "intermediate" values found at the end of a phase can still be executed. this.propertyKindsComputedInThisPhase.iterator.zipWithIndex foreach { previousPhaseComputedPK => val (isComputed, pkId) = previousPhaseComputedPK @@ -640,7 +640,7 @@ abstract class PropertyStore { // Step 5 // Call `newPhaseInitialized` to enable subclasses to perform custom initialization steps - // when a phase was setup. + // when a phase was set up. newPhaseInitialized( propertyKindsComputedInThisPhase, propertyKindsComputedInLaterPhase, @@ -839,7 +839,7 @@ abstract class PropertyStore { * guaranteed to be executed sequentially per E/PK pair). The primary use case is to * kick-start the computation of some e/pk as soon as an entity "becomes relevant". * - * In general, it also possible to have a standard analysis that just queries the properties + * In general, it is also possible to have a standard analysis that just queries the properties * of the respective entities and which maintains the list of dependees. However, if the * list of dependees becomes larger and (at least initially) encompasses a significant fraction * or even all entities of a specific kind, the overhead that is generated in the framework diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/par/PKECPropertyStore.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/par/PKECPropertyStore.scala index ee8102545d..3d5b2f8b7a 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/par/PKECPropertyStore.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/par/PKECPropertyStore.scala @@ -575,7 +575,7 @@ class PKECPropertyStore( while ({ curInitialTask = initialTasks.poll(); curInitialTask != null }) { curInitialTask.apply() } - // Subtract the processed tasks just once to avoid synchronization overhad for + // Subtract the processed tasks just once to avoid synchronization overhead for // decrementing every time we process a task activeTasks.addAndGet(-initialTaskSize) @@ -777,7 +777,7 @@ case class EPKState( var eOptP: SomeEOptionP, var c: OnUpdateContinuation, var dependees: Set[SomeEOptionP], - // Use Java's HashSet here, this is internal implementiton only and they are *way* faster + // Use Java's HashSet here, this is internal implementation only and they are *way* faster dependers: java.util.HashSet[EPKState] = new java.util.HashSet(), suppressedDependers: java.util.HashSet[EPKState] = new java.util.HashSet() ) { diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/par/PropertyStoreTracer.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/par/PropertyStoreTracer.scala index cac766c3f8..79fdf655b9 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/par/PropertyStoreTracer.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/par/PropertyStoreTracer.scala @@ -108,7 +108,7 @@ case class ProcessingResultEvent(eventId: Int, r: PropertyComputationResult) ext } case class DeferredProcessingResultEvent(eventId: Int, r: PropertyComputationResult) extends StoreEvent { - override def toTxt: String = s"$eventId: DeferedProcessingResult($r)" + override def toTxt: String = s"$eventId: DeferredProcessingResult($r)" } case class FirstExceptionEvent( diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/seq/PKESequentialPropertyStore.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/seq/PKESequentialPropertyStore.scala index 4f5597e3b0..f4cd392262 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/seq/PKESequentialPropertyStore.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/seq/PKESequentialPropertyStore.scala @@ -242,7 +242,7 @@ final class PKESequentialPropertyStore protected ( // Add this transformer as a depender to the transformer's // source; this works, because notifications about intermediate // values are suppressed. - // This will happen only once, because afterwards an EPK + // This will happen only once, because afterward, an EPK // will be stored in the properties data structure and // then returned. val c: OnUpdateContinuation = (eps) => { @@ -323,7 +323,7 @@ final class PKESequentialPropertyStore protected ( pc: PropertyComputation[E] ): Unit = handleExceptions { scheduledTasksCounter += 1 - tasksManager.push(new PropertyComputationTask(this, e, pc)) + tasksManager.push(PropertyComputationTask(this, e, pc)) } override def doScheduleEagerComputationForEntity[E <: Entity]( @@ -332,7 +332,7 @@ final class PKESequentialPropertyStore protected ( pc: PropertyComputation[E] ): Unit = handleExceptions { scheduledTasksCounter += 1 - tasksManager.push(new PropertyComputationTask(this, e, pc)) + tasksManager.push(PropertyComputationTask(this, e, pc)) } private def removeDependerFromDependees(dependerEPK: SomeEPK): Unit = { @@ -398,9 +398,9 @@ final class PKESequentialPropertyStore protected ( if (isFinal || !suppressInterimUpdates(dependerEPK.pk.id)(pkId)) { val t: QualifiedTask = if (isFinal) { - new OnFinalUpdateComputationTask(this, eps.asFinal, c) + OnFinalUpdateComputationTask(this, eps.asFinal, c) } else { - new OnUpdateComputationTask(this, eps.toEPK, c) + OnUpdateComputationTask(this, eps.toEPK, c) } tasksManager.push(t, dependerEPK, eps, newDependees, currentDependers) scheduledOnUpdateComputationsCounter += 1 @@ -652,7 +652,7 @@ final class PKESequentialPropertyStore protected ( dependees(AnalysisKeyId).put(sourceE, newDependees) } else { // There was an update and we already scheduled the computation... hence, - // we have no live dependees any more. + // we have no live dependees anymore. elidedAssert(newDependees == null || newDependees.isEmpty) } @@ -726,7 +726,7 @@ final class PKESequentialPropertyStore protected ( // We have reached quiescence.... - // 1. Let's search for all EPKs (not EPS) and use the fall back for them. + // 1. Let's search for all EPKs (not EPS) and use the fallback for them. // (Recall that we return fallback properties eagerly if no analysis is // scheduled or will be scheduled, However, it is still possible that we will // not have computed a property for a specific entity, if the underlying @@ -741,7 +741,7 @@ final class PKESequentialPropertyStore protected ( .filter { eOptionP => eOptionP.isEPK && // There is no suppression; i.e., we have no dependees - dependees(pkId).get(eOptionP.e).isEmpty + !dependees(pkId).contains(eOptionP.e) } continueComputation |= epkIterator.hasNext epkIterator.foreach { eOptionP => diff --git a/OPAL/si/src/main/scala/org/opalj/fpcf/seq/TasksManager.scala b/OPAL/si/src/main/scala/org/opalj/fpcf/seq/TasksManager.scala index 0ab0e8b679..0ac07bfe0c 100644 --- a/OPAL/si/src/main/scala/org/opalj/fpcf/seq/TasksManager.scala +++ b/OPAL/si/src/main/scala/org/opalj/fpcf/seq/TasksManager.scala @@ -6,6 +6,7 @@ package seq import java.util.ArrayDeque import java.util.PriorityQueue import scala.collection.mutable +import scala.compiletime.uninitialized trait TasksManager { @@ -141,7 +142,7 @@ private class ExtendedQualifiedTask( trait PropertyStoreDependentTasksManager extends TasksManager { - protected var ps: PKESequentialPropertyStore = null + protected var ps: PKESequentialPropertyStore = uninitialized private[seq] def setSeqPropertyStore(ps: PKESequentialPropertyStore): Unit = { if (this.ps != null) diff --git a/OPAL/si/src/main/scala/org/opalj/si/Project.scala b/OPAL/si/src/main/scala/org/opalj/si/Project.scala index a7ff605c88..a4322161ff 100644 --- a/OPAL/si/src/main/scala/org/opalj/si/Project.scala +++ b/OPAL/si/src/main/scala/org/opalj/si/Project.scala @@ -153,7 +153,7 @@ trait Project { } } else { // We have to synchronize w.r.t. "this" object on write accesses - // to make sure that we do not loose a concurrent update or + // to make sure that we do not lose a concurrent update or // derive an information more than once. this.synchronized { val projectInformation = this.projectInformation diff --git a/OPAL/si/src/main/scala/org/opalj/si/flowanalysis/StructuralAnalysis.scala b/OPAL/si/src/main/scala/org/opalj/si/flowanalysis/StructuralAnalysis.scala index 61a0db35fd..a2f1b743b0 100644 --- a/OPAL/si/src/main/scala/org/opalj/si/flowanalysis/StructuralAnalysis.scala +++ b/OPAL/si/src/main/scala/org/opalj/si/flowanalysis/StructuralAnalysis.scala @@ -17,7 +17,7 @@ import scalax.collection.edges.DiEdge import scalax.collection.generic.Edge import scalax.collection.hyperedges.DiHyperEdge import scalax.collection.immutable.Graph -import scalax.collection.mutable.{Graph => MutableGraph} +import scalax.collection.mutable.Graph as MutableGraph /** * An algorithm that identifies several different types of flow regions in a given flow graph and reduces them to a @@ -101,7 +101,7 @@ object StructuralAnalysis { val newRegion = Region(regionType, subNodes.flatMap(_.nodeIds), entry) // Compact - // Note that adding the new region to the graph and superGraph is done anyways since we add edges later + // Note that adding the new region to the graph and superGraph is done anyway since we add edges later val maxPost = post.indexOf(subNodes.maxBy(post.indexOf)) post(maxPost) = newRegion // Removing old regions from the graph is done later diff --git a/OPAL/si/src/test/scala/org/opalj/fpcf/EOptionPSetTest.scala b/OPAL/si/src/test/scala/org/opalj/fpcf/EOptionPSetTest.scala index 6b1de4da7e..614e1d09b5 100644 --- a/OPAL/si/src/test/scala/org/opalj/fpcf/EOptionPSetTest.scala +++ b/OPAL/si/src/test/scala/org/opalj/fpcf/EOptionPSetTest.scala @@ -47,7 +47,7 @@ class EOptionPSetTest extends AnyFunSuite { assert(set.getOrQueryAndUpdate(e1, Marker.Key) == ie1Marker) // the same value is returned... assert(set.getOrQueryAndUpdate(e2, Palindromes.PalindromeKey) == ie2Pal) // the same value is returned... - set.updateAll() // updates both objects to final values.. + set.updateAll() // updates both objects to final values assert(set.isEmpty, ps.data) // all updates result in final values - hence, they are deleted diff --git a/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyComputationsSchedulerTest.scala b/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyComputationsSchedulerTest.scala index 4d0057e104..050f536f3a 100644 --- a/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyComputationsSchedulerTest.scala +++ b/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyComputationsSchedulerTest.scala @@ -179,7 +179,7 @@ class PropertyComputationsSchedulerTest extends AnyFunSpec with Matchers with Be batches should be(Symbol("Empty")) } - it("should produce an empty configuration in an empty scenary") { + it("should produce an empty configuration in an empty scenario") { val ps = setupPropertyStoreConfigurationRecorder(strategy) val scenario = AnalysisScenario(Set.empty, ps) val schedule = scenario.computeSchedule(ps) diff --git a/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyStoreTest.scala b/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyStoreTest.scala index 11fa172830..9529f1814a 100644 --- a/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyStoreTest.scala +++ b/OPAL/si/src/test/scala/org/opalj/fpcf/PropertyStoreTest.scala @@ -1201,7 +1201,7 @@ sealed abstract class PropertyStoreTest[PS <: PropertyStore] val dropCount = (System.nanoTime() % 10000).toInt var count = -1 val nodeEntitiesPermutations = nodeEntities.toList.permutations - for (nodeEntitiesPermutation <- nodeEntitiesPermutations.drop(dropCount).take(1000)) { + for (nodeEntitiesPermutation <- nodeEntitiesPermutations.slice(dropCount, dropCount + 1000)) { count += 1 if (count % 99 == 0) { val ps = createPropertyStore() @@ -1629,8 +1629,7 @@ sealed abstract class PropertyStoreTest[PS <: PropertyStore] FinalEP(nodeA, ReachableNodes(nodeEntities.toSet)) ) - // now let's check if we have the correct notification of the - // of the lazily dependent computations + // now let's check if we have the correct notification of the lazily dependent computations val expected = ReachableNodesCount(11) ps(nodeA, ReachableNodesCount.Key) should be(FinalEP(nodeA, expected)) ps(nodeB, ReachableNodesCount.Key) should be(FinalEP(nodeB, expected)) @@ -1664,8 +1663,7 @@ sealed abstract class PropertyStoreTest[PS <: PropertyStore] FinalEP(nodeA, ReachableNodes(nodeEntities.toSet)) ) - // now let's check if we have the correct notification of the - // of the lazily dependent computations + // now let's check if we have the correct notification of the lazily dependent computations val expected = ReachableNodesCount(11) ps(nodeA, ReachableNodesCount.Key) should be(FinalEP(nodeA, expected)) ps(nodeB, ReachableNodesCount.Key) should be(FinalEP(nodeB, expected)) @@ -1796,7 +1794,7 @@ sealed abstract class PropertyStoreTest[PS <: PropertyStore] ps.setupPhase(Set(Purity.Key), Set.empty) def purityAnalysis(node: Node): PropertyComputationResult = { def c(successorNode: SomeEOptionP): ProperPropertyComputationResult = { - // HERE - For this test case only, we can simple get to the previous + // HERE - For this test case only, we can simply get to the previous // node from the one that was updated. (successorNode: @unchecked) match { case epk: EPK[_, _] => diff --git a/OPAL/tac/src/it/scala/org/opalj/tac/fpcf/analyses/FPCFAnalysesIntegrationTest.scala b/OPAL/tac/src/it/scala/org/opalj/tac/fpcf/analyses/FPCFAnalysesIntegrationTest.scala index eb3e7b9a71..ce1a76dc8f 100644 --- a/OPAL/tac/src/it/scala/org/opalj/tac/fpcf/analyses/FPCFAnalysesIntegrationTest.scala +++ b/OPAL/tac/src/it/scala/org/opalj/tac/fpcf/analyses/FPCFAnalysesIntegrationTest.scala @@ -43,7 +43,7 @@ import org.opalj.util.PerformanceEvaluation.time import org.opalj.util.getObjectReflectively /** - * Simple test to ensure that the FPFC analyses do not cause exceptions and that their results + * Simple test to ensure that the FPCF analyses do not cause exceptions and that their results * remain stable. * * @author Dominik Helm @@ -197,7 +197,7 @@ class FPCFAnalysesIntegrationTest extends AnyFunSpec { } else if (line.startsWith("=>")) { readProperties = true } else { - if (!line.isEmpty) { + if (line.nonEmpty) { if (curConfig != null) configurations :+= curConfig curConfig = (line, Set.empty, Seq.empty) } diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/ASTNode.scala b/OPAL/tac/src/main/scala/org/opalj/tac/ASTNode.scala index cdb80072fa..120cc084a6 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/ASTNode.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/ASTNode.scala @@ -30,13 +30,13 @@ trait ASTNode[+V] { * * @note '''Deeply nested expressions are not supported'''; i.e. an expression's sub-expressions * have to be [[Var]] or [[Const]] expressions. Generally, a statements expressions have to - * to simple expressions too - except of the [[Assignment]] statement; in the latter case + * be simple expressions too - except of the [[Assignment]] statement; in the latter case * the right-expression can have references to simple expressions. Hence, in case of - * [[Assignment]] statements the side-effect freenes is determined by the referenced + * [[Assignment]] statements the side-effect freeness is determined by the referenced * expression; in all other cases the side-effect freeness is determined directly by * the statement/expression. * - * @return `true` if the expression is ''GUARENTEED'' to have no side effect other than + * @return `true` if the expression is ''GUARANTEED'' to have no side effect other than * wasting some CPU cycles if it is not executed. */ def isSideEffectFree: Boolean diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/ComputeTACAIKey.scala b/OPAL/tac/src/main/scala/org/opalj/tac/ComputeTACAIKey.scala index d1a5b903f9..0094aa5956 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/ComputeTACAIKey.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/ComputeTACAIKey.scala @@ -30,7 +30,7 @@ object ComputeTACAIKey extends TACAIKey[Method => Domain & RecordDefUse] { override def requirements(project: SomeProject): Seq[ProjectInformationKey[Nothing, Nothing]] = Nil /** - * Returns an factory which computes the 3-address code of a method anew when called. + * Returns a factory which computes the 3-address code of a method anew when called. * * All methods belonging to a project are converted using the same `domainFactory`. Hence, * the `domainFactory` needs to be set (using `setProjectInformationKeyInitializationData`) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/EagerDetachedTACAIKey.scala b/OPAL/tac/src/main/scala/org/opalj/tac/EagerDetachedTACAIKey.scala index b86ff46c75..8d44874047 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/EagerDetachedTACAIKey.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/EagerDetachedTACAIKey.scala @@ -33,7 +33,7 @@ object EagerDetachedTACAIKey extends TACAIKey[Method => Domain & RecordDefUse] { override def requirements(project: SomeProject): Seq[ProjectInformationKey[Nothing, Nothing]] = Nil /** - * Returns an factory which computes and caches the 3-address code of a method when required. + * Returns a factory which computes and caches the 3-address code of a method when required. * * All methods belonging to a project are converted using the same `domainFactory`. Hence, * the `domainFactory` needs to be set (using `setProjectInformationKeyInitializationData`) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/Expr.scala b/OPAL/tac/src/main/scala/org/opalj/tac/Expr.scala index 103fd9f62f..fd3e1ad75c 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/Expr.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/Expr.scala @@ -31,7 +31,7 @@ import org.opalj.value.ValueInformation /** * Represents an expression. In general, every expression should be a simple expression, where * the child expressions are just [[Var]]s or [[Const]]s. - * However, when the code is going to be transformed to human readable code (e.g., Java oder + * However, when the code is going to be transformed to human-readable code (e.g., Java oder * Scala), then it is possible to build up complex/nested expressions '''after''' all * transformations and static analyses have been performed. * @@ -1072,7 +1072,7 @@ trait Var[+V] extends ValueExpr[V] { this: V => override final def astID: Int = Var.ASTID /** - * A ''human readable'' name of the local variable. + * A ''human-readable'' name of the local variable. */ def name: String } diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/IdBasedVar.scala b/OPAL/tac/src/main/scala/org/opalj/tac/IdBasedVar.scala index 51e0f7b9c1..ae0979f4b2 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/IdBasedVar.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/IdBasedVar.scala @@ -6,7 +6,7 @@ import org.opalj.br.* import org.opalj.value.ValueInformation /** - * Id based variables are named based on the position of the corresponding stack/register value. + * ID based variables are named based on the position of the corresponding stack/register value. * * @author Roberts Kolosovs * @author Michael Eichberg @@ -34,7 +34,7 @@ sealed trait IdBasedVar extends Var[IdBasedVar] { * * This operation is not supported for local variables! */ - def updated(cTpe: ComputationalType): SimpleVar = { new SimpleVar(id, cTpe) } + def updated(cTpe: ComputationalType): SimpleVar = { SimpleVar(id, cTpe) } def toCanonicalForm(implicit ev: IdBasedVar <:< DUVar[ValueInformation]): Nothing = { throw new IncompatibleClassChangeError( diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/LazyDetachedTACAIKey.scala b/OPAL/tac/src/main/scala/org/opalj/tac/LazyDetachedTACAIKey.scala index fae5935e2d..87e9136112 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/LazyDetachedTACAIKey.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/LazyDetachedTACAIKey.scala @@ -33,7 +33,7 @@ object LazyDetachedTACAIKey extends TACAIKey[Method => Domain & RecordDefUse] { override def requirements(project: SomeProject): Seq[ProjectInformationKey[Nothing, Nothing]] = Nil /** - * Returns an factory which computes and caches the 3-address code of a method when required. + * Returns a factory which computes and caches the 3-address code of a method when required. * * All methods belonging to a project are converted using the same `domainFactory`. Hence, * the `domainFactory` needs to be set (using `setProjectInformationKeyInitializationData`) @@ -65,7 +65,7 @@ object LazyDetachedTACAIKey extends TACAIKey[Method => Domain & RecordDefUse] { case Some(taCode) => taCode case None => val brCode = m.body.get - // Basically, we use double checked locking; we really don't want to + // Basically, we use double-checked locking; we really don't want to // transform the code more than once! brCode.synchronized { taCodes.get(m) match { diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/LazyTACUsingAIKey.scala b/OPAL/tac/src/main/scala/org/opalj/tac/LazyTACUsingAIKey.scala index 91a77ff6e9..00a0448953 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/LazyTACUsingAIKey.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/LazyTACUsingAIKey.scala @@ -73,7 +73,7 @@ object LazyTACUsingAIKey extends TACAIKey[Nothing] { case Some(taCode) => taCode case None => val brCode = m.body.get - // Basically, we use double checked locking; we really don't want to + // Basically, we use double-checked locking; we really don't want to // transform the code more than once! brCode.synchronized { taCodes.get(m) match { diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/Parameters.scala b/OPAL/tac/src/main/scala/org/opalj/tac/Parameters.scala index e2d5b2ca1b..dedc297784 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/Parameters.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/Parameters.scala @@ -11,7 +11,7 @@ import org.opalj.ai.ValueOrigin * * @param parameters The (non-null) array with the information about the explicit method parameters. * The array must not be mutated. The first explicit parameter is ''always'' stored at - * location 1 (also in case of static methods) to enable a unified access to a + * location 1 (also in case of static methods) to enable unified access to a * method's parameters whether the method is static or not. * @author Michael Eichberg */ @@ -29,7 +29,7 @@ class Parameters[P <: AnyRef]( * Returns the parameter with the respective value origin. * * @param vo The origin of the associated parameter. The origin is used in the 3-address code - * to identify parameters. The origin `-1` always identifies the `this` parameter in + * to identify parameters. The origin `-1` always identifies the this-parameter in * case of an instance method and is unused otherwise. The origins * [-2..(-2-parametersCount)] correspond to the explicitly specified method * parameters. @@ -41,7 +41,7 @@ class Parameters[P <: AnyRef]( /** * The instance method's implicit `this` parameter. * - * @return The variable capturing information about the `this` parameter; + * @return The variable capturing information about the this-parameter; * if the underlying methods is static an `UnsupportedOperationException` is thrown. */ def thisParameter: P = { diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/SimplePropagation.scala b/OPAL/tac/src/main/scala/org/opalj/tac/SimplePropagation.scala index 61ae4b42f2..eb27e7dc89 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/SimplePropagation.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/SimplePropagation.scala @@ -85,7 +85,7 @@ object SimplePropagation extends TACOptimization[Param, IdBasedVar, NaiveTACode[ case ReturnValue(nextPC, `trgtVar`) => wasTransformed = true - code(index) = Nop(pc) // it is impossible that we have another use.. + code(index) = Nop(pc) // it is impossible that we have another use... code(index + 1) = ReturnValue(nextPC, c) case _ => // nothing to do @@ -105,6 +105,6 @@ object SimplePropagation extends TACOptimization[Param, IdBasedVar, NaiveTACode[ cfg, taCode.exceptionHandlers ) - new TACOptimizationResult(newTACode, wasTransformed) + TACOptimizationResult(newTACode, wasTransformed) } } diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/Stmt.scala b/OPAL/tac/src/main/scala/org/opalj/tac/Stmt.scala index e805d15e31..9d130f92e2 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/Stmt.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/Stmt.scala @@ -20,7 +20,7 @@ import org.opalj.value.ValueInformation sealed abstract class Stmt[+V] extends ASTNode[V] { /** - * The program counter of the original '''underyling bytecode instruction'''. + * The program counter of the original '''underlying bytecode instruction'''. * * This `pc` is independent of the (implicit) `index` of the statement * in the generated statements array! This pc is, e.g., useful for @@ -210,9 +210,9 @@ object Goto { * Return from subroutine; only to be used in combination with JSR instructions (Java 6 and earlier). * * @param returnAddresses The set of return addresses. Based on the return addresses it is - * immediately possible to determine the original JSR instruction that led - * to the execution of the subroutine. It is the JSR instruction directly - * preceding the instruction to which this RET instruction jumps to. + * immediately possible to determine the original JSR-instruction that led + * to the execution of the subroutine. It is the JSR-instruction directly + * preceding the instruction to which this RET-instruction jumps to. * '''This information is only relevant in case of flow-sensitive * analyses.''' */ @@ -471,7 +471,7 @@ object Return { /** * Models a no-operation. In general, a NOP (no operation) can be pruned; however, in the TACAI * representation, if a NOP is the last statement of a basic block where the previous basic block - * has multiple-successors then it may be the case that the NOP cannot be pruned, because it it + * has multiple-successors then it may be the case that the NOP cannot be pruned, because it * is required to keep the path alive. For example, given the following code: * {{{ * public int m(int i, int j, boolean z){ @@ -487,7 +487,7 @@ object Return { * * In this case, the returned value is either i or j and therefore the UVar would directly encode * that information and therefore the assignments would be ignored. (The information cannot be - * recovered! If needed a complete SSA representation would be required; TACAI only provides only + * recovered! If needed, a complete SSA representation would be required; TACAI only provides * an SSA-like representation!) */ case class Nop(pc: Int) extends SimpleStmt { @@ -765,7 +765,7 @@ object PutField { sealed abstract class MethodCall[+V] extends Stmt[V] with Call[V] { - override final def isSideEffectFree: Boolean = false // IMPROVE Check if a call has no side-effect + override final def isSideEffectFree: Boolean = false // IMPROVE Check if a call has no sideeffect override final def asMethodCall: this.type = this override final def isMethodCall: Boolean = true override final def isStaticCall: Boolean = isStaticMethodCall @@ -1160,7 +1160,7 @@ case class CaughtException[+V]( * - If the exception is a parameter the parameter's origin (-1,... -n) is returned. * - If the exception was raised due to a sideeffect of evaluating an expression, then the * origin is smaller or equal to [[org.opalj.ai.ImmediateVMExceptionsOriginOffset]] and can be - * tranformed to the index of the responsible instruction using + * transformed to the index of the responsible instruction using * [[org.opalj.ai#pcOfImmediateVMException]]. */ def origins: IntTrieSet = throwingStmts @@ -1168,7 +1168,7 @@ case class CaughtException[+V]( /** * Textual description of the sources of the caught exceptions. If the exception was * thrown by the JVM due to the evaluation of an expression (e.g., NullPointerException, - * DivisionByZero,..) then the string will be `exception@` where index identifies + * DivisionByZero, ...) then the string will be `exception@` where index identifies * the failing expression. In case an exception is caught that was thrown using `ATHROW` * the local variable/parameter which stores the local variable is returned. */ @@ -1229,7 +1229,7 @@ case class Checkcast[+V](pc: PC, value: Expr[V], cmpTpe: ReferenceType) extends // IMPROVE identify (from the JVM verifiers point-of-view) truly useless checkcasts // A useless checkcast is one where the static intra-procedural type information which // is available in the bytecode is sufficient to determine that the type is a subtype - // of the tested type (i.e., only those check casts are truly usefull that would not + // of the tested type (i.e., only those check casts are truly usefully that would not // lead to a failing validation of the bytecode by the JVM!) false } diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/TACAI.scala b/OPAL/tac/src/main/scala/org/opalj/tac/TACAI.scala index a03b22e3b5..063eda2bfb 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/TACAI.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/TACAI.scala @@ -57,7 +57,7 @@ object TACAI { /** * Returns a map which maps an ai-based value origin for a parameter to the tac value origin; - * to lookup the tac based origin, the ai-based origin aiVO has to be negated and 1 has to + * to look up the tac based origin, the ai-based origin aiVO has to be negated and 1 has to * be subtracted. * * @return An implicit map (keys are aiVOKey = `-aiVo-1`) from `aiVO` to `tacVo`. @@ -185,8 +185,8 @@ object TACAI { // has to be used in the corresponding tables etc. // For (2) we have to adapt the use-site if we have a self-use; the latter // happens if we have an instruction which immediately processes a caught exception. In - // that case the use information associated with the def-site, which initializes the - // the variable which stores the exception (`CaughtException`, would otherwise "use" itself. + // that case, the use-information associated with the def-site, which initializes the + // variable which stores the exception (`CaughtException`), would otherwise "use" itself. val pcToIndex = new Array[Int](codeSize + 1 /* +1 if the try includes the last inst. */ ) val simpleRemapping = !descriptor.hasComputationalTypeCategory2ValueInInit @@ -893,7 +893,7 @@ object TACAI { // H A N D L I N G S W I T C H S T A T E M E N T S // // It may be the case that some or all except of one branch are actually - // dead – in particular in obfuscated code - in this cases, we have to + // dead – in particular in obfuscated code – in this case, we have to // rewrite the switch statement. Given that at least one branch has to // be live, we can use that branches jump target as the jump target of the // goto instruction; in this case it doesn't matter whether it is a default @@ -973,7 +973,7 @@ object TACAI { } else { usedBy = usedBy.map(pcToIndex) } - paramDVars(0) = new TACMethodParameter(-1, usedBy) + paramDVars(0) = TACMethodParameter(-1, usedBy) defOrigin = -2 } var pIndex = 1 @@ -985,7 +985,7 @@ object TACAI { } else { usedBy = usedBy.map(pcToIndex) } - paramDVars(pIndex) = new TACMethodParameter(-pIndex - 1, usedBy) + paramDVars(pIndex) = TACMethodParameter(-pIndex - 1, usedBy) defOrigin -= parameterTypes(pIndex - 1).operandSize pIndex += 1 } @@ -1037,13 +1037,13 @@ object TACAI { val TACMethodParameter(origin, useSites) = tacParams.parameter(defSite) // Note that the "use sites" of the parameters are already remapped. val newUseSites = useSites - pcToIndex(useSite) - tacParams.parameters(-defSite - 1) = new TACMethodParameter(origin, newUseSites) + tacParams.parameters(-defSite - 1) = TACMethodParameter(origin, newUseSites) } else { /* IMPROVE Support tracking def->use information for exceptions (currently we only have use->def.) val useSiteIndex = pcToIndex(useSite) val defSitePC = ai.pcOfVMLevelValue(defSite) // we have an obsolete exception usage; see - // ai.MethodsWithexceptoins.nestedTryFinally() + // ai.MethodsWithExceptions.nestedTryFinally() // for an example which has dead code that leads to an obsolete exception usage */ ; @@ -1113,13 +1113,13 @@ object TACAI { // (2) Perform constant propagation when a use-site has only a _single_ def-site: // val x = 304 // if({a,b} != x) goto t - // => afterwards check if the def site has more use sites and – if not – + // => afterward, check if the def site has more use sites and – if not – // replace it by nops // // // (3) Identify _really_ useless nops and remove them. (Note that some nops may be // required to ensure that the path information is available. E.g., - // java.lang.String.(byte[],int,int,int) (java 1.8.0_181) + // java.lang.String.(byte[],int,int,int) (java 1.8.0_181)) // Non-Optimizations // ================= diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/TACNaive.scala b/OPAL/tac/src/main/scala/org/opalj/tac/TACNaive.scala index f4b5f26864..2b95458d66 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/TACNaive.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/TACNaive.scala @@ -20,12 +20,12 @@ import org.opalj.util.elidedAssert /** * Converts the bytecode of a method into a three address representation using a very naive - * approach where each each operand stack value is stored in a local variable based on the - * position of the value on the stack and where each local variable is stored in a local variable - * named based on the register's index (In general, you should use the three-address code create + * approach where each operand stack value is stored in a local variable based on the position + * of the value on the stack and where each local variable is stored in a local variable named + * based on the register's index (In general, you should use the three-address code create * using [[TACAI]]). * - * The converted method has an isomorophic CFG when compared to the original method, + * The converted method has an isomorphic CFG when compared to the original method, * but may contain more instructions due to the way how the stack manipulation instructions are * transformed. In general - unless JSR/RET instructions are found - no CFG is created and used. * This approach relies on the invariant that the stack has to have the same layout on all paths. @@ -43,7 +43,7 @@ object TACNaive { * Converts the plain bytecode of a method into a quadruples based three address * representation. Compared to the previous method, no data- and control-flow information is * used and a very general transformation mechanism is used to do the transformation. - * Therefore the representation is very verbose. However, both leverage the same + * Therefore, the representation is very verbose. However, both leverage the same * AST nodes. * * @param method A method with a body. I.e., a non-native, non-abstract method. @@ -666,7 +666,7 @@ object TACNaive { case cfgNode => // in these cases something went terribly wrong... val message = "the cfg has an unexpected shape: " + cfgNode - throw new AnalysisException(message) + throw AnalysisException(message) } successors += successor schedule(successor, stack) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/TACode.scala b/OPAL/tac/src/main/scala/org/opalj/tac/TACode.scala index b8cc1be642..080007db1d 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/TACode.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/TACode.scala @@ -18,7 +18,7 @@ import org.opalj.value.ValueInformation * * OPAL offers multiple 3-address code like representations. One that is a one-to-one conversion * of the bytecode and which does not provide higher-level information. - * Additionally, the (Base)TACAI represtation is offered that is targeted towards static analyses. + * Additionally, the (Base)TACAI representation is offered that is targeted towards static analyses. * The base TACAI representation does not preserve all information which would be required to * regenerate the original code, but which greatly facilitates static analysis by making the * end-to-end def-use chains directly available. @@ -179,7 +179,7 @@ final class AITACode[P <: AnyRef, VI <: ValueInformation]( import AITACode.AITACodeCFG - /** Detaches the 3-address code from the underlying abstract interpreation result. */ + /** Detaches the 3-address code from the underlying abstract interpretation result. */ def detach(): AITACode[P, ValueInformation] = { new AITACode[P, ValueInformation]( params, diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/ToTxt.scala b/OPAL/tac/src/main/scala/org/opalj/tac/ToTxt.scala index c312850dda..64e6329587 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/ToTxt.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/ToTxt.scala @@ -215,7 +215,7 @@ object ToTxt { } /** - * Converts the statements to some human readable text. + * Converts the statements to some human-readable text. * * @param includePC If `true` the original program counter is also shown in the output. */ @@ -237,7 +237,7 @@ object ToTxt { params.parameters.zipWithIndex foreach { paramWithIndex => val (param, index) = paramWithIndex if (param ne null) { - val paramTxt = indention + " param" + index.toHexString + ": " + param.toString() + val paramTxt = indention + " param" + index.toHexString + ": " + param.toString javaLikeCode += (param match { case v: DVar[?] => v.useSites.mkString(s"$paramTxt // use sites={", ", ", "}") diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/cg/CGBasedCommandLineConfig.scala b/OPAL/tac/src/main/scala/org/opalj/tac/cg/CGBasedCommandLineConfig.scala index 61142ba860..9fa0372b19 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/cg/CGBasedCommandLineConfig.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/cg/CGBasedCommandLineConfig.scala @@ -39,7 +39,7 @@ trait CGBasedCommandLineConfig extends AIBasedCommandLineConfig with PropertySto cgArgs.foreach { arg => argGroups += arg -> cgArgGroup } - def setupCallGaph(project: Project): (CallGraph, Seconds) = { + def setupCallGraph(project: Project): (CallGraph, Seconds) = { var callGraphTime = Seconds.None val callGraphKeyOpt = apply(CallGraphArg) if (callGraphKeyOpt.isEmpty) { diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/cg/CallGraphKey.scala b/OPAL/tac/src/main/scala/org/opalj/tac/cg/CallGraphKey.scala index fa667a9313..f19fbf1c88 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/cg/CallGraphKey.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/cg/CallGraphKey.scala @@ -4,6 +4,7 @@ package tac package cg import scala.collection.mutable.ArrayBuffer +import scala.compiletime.uninitialized import scala.jdk.CollectionConverters.* import org.opalj.ai.domain.RecordCFG @@ -44,7 +45,7 @@ trait CallGraphKey extends ProjectInformationKey[CallGraph, Nothing] { private val CallBySignatureConfigKey = "org.opalj.br.analyses.cg.callBySignatureResolution" - private var typeIterator: TypeIterator = null + private var typeIterator: TypeIterator = uninitialized /** * Lists the call graph specific schedulers that must be run to compute the respective call diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/cg/PropagationBasedCallGraphKeys.scala b/OPAL/tac/src/main/scala/org/opalj/tac/cg/PropagationBasedCallGraphKeys.scala index 4bb8e38be4..a9bb29b2de 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/cg/PropagationBasedCallGraphKeys.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/cg/PropagationBasedCallGraphKeys.scala @@ -33,8 +33,7 @@ import org.opalj.tac.fpcf.analyses.fieldaccess.reflection.ReflectionRelatedField * [[org.opalj.tac.fpcf.analyses.cg.xta.LibraryInstantiatedTypesBasedEntryPointsAnalysis]]. * * Note, that initial instantiated types ([[org.opalj.br.analyses.cg.InitialInstantiatedTypesKey]]) - * and entry points ([[org.opalj.br.analyses.cg.InitialEntryPointsKey]]) can be configured before - * hand. + * and entry points ([[org.opalj.br.analyses.cg.InitialEntryPointsKey]]) can be configured beforehand. * Furthermore, you can configure the analysis mode (Library or Application) in the configuration * of these keys. * diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/cg/RTACallGraphKey.scala b/OPAL/tac/src/main/scala/org/opalj/tac/cg/RTACallGraphKey.scala index 4df153f7f3..d759126174 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/cg/RTACallGraphKey.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/cg/RTACallGraphKey.scala @@ -24,8 +24,7 @@ import org.opalj.tac.fpcf.analyses.cg.xta.LibraryInstantiatedTypesBasedEntryPoin * [[org.opalj.tac.fpcf.analyses.cg.xta.LibraryInstantiatedTypesBasedEntryPointsAnalysis]]. * * Note, that initial instantiated types ([[org.opalj.br.analyses.cg.InitialInstantiatedTypesKey]]) - * and entry points ([[org.opalj.br.analyses.cg.InitialEntryPointsKey]]) can be configured before - * hand. + * and entry points ([[org.opalj.br.analyses.cg.InitialEntryPointsKey]]) can be configured beforehand. * Furthermore, you can configure the analysis mode (Library or Application) in the configuration * of these keys. * diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/FieldLocalityAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/FieldLocalityAnalysis.scala index 16d46a99b7..e7f2a68b4f 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/FieldLocalityAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/FieldLocalityAnalysis.scala @@ -86,12 +86,12 @@ class FieldLocalityAnalysis private[analyses] ( implicit final val declaredMethods: DeclaredMethods = project.get(DeclaredMethodsKey) implicit final val declaredFields: DeclaredFields = project.get(DeclaredFieldsKey) private implicit val contextProvider: ContextProvider = project.get(ContextProviderKey) - final val typeExtensiblity = project.get(TypeExtensibilityKey) + final val typeExtensibility = project.get(TypeExtensibilityKey) final val definitionSites = project.get(DefinitionSitesKey) /** * Checks if the field locality can be determined trivially. - * Otherwise it forwards to `FieldLocalityAnalysis.step2`. + * Otherwise, it forwards to `FieldLocalityAnalysis.step2`. */ def step1(field: Field): ProperPropertyComputationResult = { val fieldType = field.fieldType @@ -111,7 +111,7 @@ class FieldLocalityAnalysis private[analyses] ( } // There may be methods in unknown subtypes that leak the field - if (field.isProtected && typeExtensiblity(thisType).isYesOrUnknown) { + if (field.isProtected && typeExtensibility(thisType).isYesOrUnknown) { return Result(field, NoLocalField); } @@ -133,7 +133,7 @@ class FieldLocalityAnalysis private[analyses] ( * In case it is not cloneable, there might be still a cloneable subtype. * In this case, the field is at most an [[ExtensibleLocalField]]. * - * Afterwards it calls [[step3]]. + * Afterward it calls [[step3]]. */ private def step2(field: Field): ProperPropertyComputationResult = { @@ -164,8 +164,8 @@ class FieldLocalityAnalysis private[analyses] ( // If there may be a Cloneable subtype, the field could be leaked through this subtype, // but if the client knows that the precise type of the reference is never cloneable, // it may treat the field as local (i.e. it is an - // [[org.opalj.fpcf.properties.ExtensibleLocalField]]. - if (typeExtensiblity(thisType).isYesOrUnknown || existsCloneableSubtypeWithoutClone) { + // [[org.opalj.fpcf.properties.ExtensibleLocalField]]). + if (typeExtensibility(thisType).isYesOrUnknown || existsCloneableSubtypeWithoutClone) { state.updateWithMeet(ExtensibleLocalField) } } diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/AbstractAliasAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/AbstractAliasAnalysis.scala index aa3be2c34c..e6f9d8ebdb 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/AbstractAliasAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/AbstractAliasAnalysis.scala @@ -99,7 +99,7 @@ trait AbstractAliasAnalysis extends FPCFAnalysis { } /** - * Creates a intermediate result for the given upper and lower bounds of the alias properties. + * Creates an intermediate result for the given upper and lower bounds of the alias properties. */ protected def interimResult(lb: Alias, ub: Alias)(implicit context: AnalysisContext, diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/SetBasedAliasAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/SetBasedAliasAnalysis.scala index 927e97826a..0fb7793d6a 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/SetBasedAliasAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/SetBasedAliasAnalysis.scala @@ -43,9 +43,9 @@ trait SetBasedAliasAnalysis extends AbstractAliasAnalysis { /** * Checks if the current analysis state allows for a [[MustAlias]] relation between the two elements. It assumes - * the the given element is the only intersection between the two points-to sets. + * the given element is the only intersection between the two points-to sets. * - * This method always returns false and should be overriden if more precise must alias checks can be performed. + * This method always returns false and should be overridden if more precise must alias checks can be performed. * * @param intersectingElement The only between the two points-to sets. * @return `true` if the two elements can be a [[MustAlias]], `false` otherwise. diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/AbstractPointsToBasedAliasAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/AbstractPointsToBasedAliasAnalysis.scala index fa75150d34..3d8f198a20 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/AbstractPointsToBasedAliasAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/AbstractPointsToBasedAliasAnalysis.scala @@ -116,7 +116,7 @@ trait AbstractPointsToBasedAliasAnalysis extends TacBasedAliasAnalysis with Abst /** * Retrieves the points-to set of the given non-static field. - * If the points-to set of one of the defSites of the fieldReference is refineable, it is added as a field dependency. + * If the points-to set of one of the defSites of the fieldReference is refinable, it is added as a field dependency. */ private def getPointsToOfField(field: AliasField, fieldContext: Context, tac: Tac)( implicit diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/PointsToBasedAliasAnalysisState.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/PointsToBasedAliasAnalysisState.scala index 31d114ec55..11a07ff36a 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/PointsToBasedAliasAnalysisState.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/alias/pointsto/PointsToBasedAliasAnalysisState.scala @@ -15,7 +15,7 @@ import org.opalj.tac.fpcf.analyses.alias.AliasAnalysisContext import org.opalj.tac.fpcf.analyses.alias.TacBasedAliasAnalysisState /** - * Encapsulates the current state of an points-to based alias analysis. + * Encapsulates the current state of a points-to based alias analysis. * * It additionally contains the following information: * diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/CallGraphAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/CallGraphAnalysis.scala index 5c1aefd0ba..52d2e6a2e4 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/CallGraphAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/CallGraphAnalysis.scala @@ -58,7 +58,7 @@ class CallGraphAnalysis private[cg] ( private val isMethodOverridable: Method => Answer = project.get(IsOverridableMethodKey) private lazy val getCBSTargets = project.get(CallBySignatureKey) - private val resovleCallBySignature = + private val resolveCallBySignature = project.config.getBoolean("org.opalj.br.analyses.cg.callBySignatureResolution") def c(state: TACAIBasedCGState[ContextType])(eps: SomeEPS): ProperPropertyComputationResult = { @@ -141,7 +141,7 @@ class CallGraphAnalysis private[cg] ( val callSite = CallSite(pc, call.name, call.descriptor, call.declaringClass) val cbsTargets: Set[ReferenceType] = - if (!isPrecise && resovleCallBySignature && call.isInterface && + if (!isPrecise && resolveCallBySignature && call.isInterface && call.declaringClass.isClassType ) { val cf = project.classFile(call.declaringClass.asClassType) @@ -375,7 +375,7 @@ class CallGraphAnalysis private[cg] ( } /** - * Computes the calles of the given `method` including the known effect of the `call` and + * Computes the callees of the given `method` including the known effect of the `call` and * the call sites associated ith this call (in order to process updates of instantiated types). * There can be multiple "call sites", in case the three-address code has computed multiple * type bounds for the receiver. diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/LoadedClassesAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/LoadedClassesAnalysis.scala index a554c2ef08..a0aed83703 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/LoadedClassesAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/LoadedClassesAnalysis.scala @@ -54,7 +54,7 @@ class LoadedClassesAnalysis( * In case there are definitively some callers, we remove the potential existing dependency * and handle the method as being newly reachable (i.e. analyse the field accesses of the method * and update its declaring class type as reachable) - * Here we add ne classes as being loaded. + * Here we add new classes as being loaded. */ def handleCaller( declaredMethod: DeclaredMethod @@ -83,7 +83,7 @@ class LoadedClassesAnalysis( if (declClassType ne method.classFile.thisType) return NoResult; - val currentLoadedClasses = getCurrentLoadedClasses() + val currentLoadedClasses = getCurrentLoadedClasses if (method.body.isEmpty) { if (!currentLoadedClasses.contains(declClassType)) { // todo only for interfaces with default methods @@ -194,7 +194,7 @@ class LoadedClassesAnalysis( stmts: Array[Stmt[V]] ): UIDSet[ClassType] = { var newLoadedClasses = UIDSet.empty[ClassType] - val currentLoadedClasses = getCurrentLoadedClasses() + val currentLoadedClasses = getCurrentLoadedClasses @inline def isNewLoadedClass(dc: ClassType): Boolean = { !currentLoadedClasses.contains(dc) && !newLoadedClasses.contains(dc) @@ -230,7 +230,7 @@ class LoadedClassesAnalysis( ch.allSupertypes(declClassType, reflexive = true).filterNot(currentLoadedClasses.contains) } - private def getCurrentLoadedClasses(): UIDSet[ClassType] = { + private def getCurrentLoadedClasses: UIDSet[ClassType] = { val currentLoadedClassesEPS: EOptionP[SomeProject, LoadedClasses] = propertyStore(project, LoadedClasses.key) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/SerializationRelatedCallsAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/SerializationRelatedCallsAnalysis.scala index f900baf653..d572d2fc3f 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/SerializationRelatedCallsAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/SerializationRelatedCallsAnalysis.scala @@ -430,7 +430,7 @@ class OISReadObjectAnalysis private[analyses] ( /** * Handles the effect of serialization to the call graph. * As an example models the invocation of constructors when `readObject` is called, if there is a - * cast afterwards. + * cast afterward. * * @author Florian Kuebler * @author Dominik Helm diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/ThreadRelatedCallsAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/ThreadRelatedCallsAnalysis.scala index 16497633d7..27a90c34f4 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/ThreadRelatedCallsAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/ThreadRelatedCallsAnalysis.scala @@ -196,9 +196,9 @@ class ThreadStartAnalysis private[cg] ( * A call to `Thread#start` eventually leads to calls to `Thread#exit` and * `ConcreteRunnable#run`. These methods will be returned by this method. * Note, that if the concrete type of the runnable object is unknown, the corresponding - * `run` methods might be missing. Thus the resulting call graph may be unsound. + * `run` methods might be missing. Thus, the resulting call graph may be unsound. * - * Note: It takes the given `threadRelatedMethods`, add the relavant ones and returns the + * Note: It takes the given `threadRelatedMethods`, add the relevant ones and returns the * updated set. */ private def handleStart( @@ -307,7 +307,7 @@ class ThreadStartAnalysis private[cg] ( } /** - * Handles the case of a call to `run` of a thread object, that holds a instance of + * Handles the case of a call to `run` of a thread object, that holds an instance of * [[Runnable]] (passed as an argument to the constructor). */ private def handleThreadInit( @@ -390,7 +390,7 @@ class ThreadStartAnalysis private[cg] ( * Otherwise, it will add the corresponding [[org.opalj.br.DeclaredMethod]] in case it is * virtual (i.e. its definition is not available). * - * Note: It takes the given `threadRelatedMethods`, add the relavant ones and returns the + * Note: It takes the given `threadRelatedMethods`, add the relevant ones and returns the * updated set. */ private def addRunnableMethod( @@ -462,7 +462,7 @@ class ThreadStartAnalysis private[cg] ( * Otherwise, it will add the corresponding [[org.opalj.br.DeclaredMethod]] in case it is * virtual (i.e. its definition is not available). * - * Note: It takes the given `threadRelatedMethods`, add the relavant ones and returns the + * Note: It takes the given `threadRelatedMethods`, add the relevant ones and returns the * updated set. */ private def addMethod( @@ -573,7 +573,7 @@ class UncaughtExceptionHandlerAnalysis private[analyses] ( * `uncaughtException` if the runtime type is precisely known. * Otherwise, we remain unsound. * - * Note: It takes the given `threadRelatedMethods`, add the relavant ones and returns the + * Note: It takes the given `threadRelatedMethods`, add the relevant ones and returns the * updated set. */ private def handleUncaughtExceptionHandler( @@ -663,12 +663,12 @@ class ThreadRelatedCallsAnalysis private[cg] ( )) classHierarchy.foreachSubclass(ClassType.Thread, project) { cf => - val setUncaughtExcpetionHandlerOpt = + val setUncaughtExceptionHandlerOpt = cf.findMethod("setUncaughtExceptionHandler", setUncaughtExceptionHandlerDescriptor) .map(declaredMethods.apply) - if (setUncaughtExcpetionHandlerOpt.isDefined) - setUncaughtExceptionHandlerMethods ::= setUncaughtExcpetionHandlerOpt.get + if (setUncaughtExceptionHandlerOpt.isDefined) + setUncaughtExceptionHandlerMethods ::= setUncaughtExceptionHandlerOpt.get val threadStartOpt = cf.findMethod("start", MethodDescriptor.NoArgsAndReturnVoid).map(declaredMethods.apply) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/TypeIteratorState.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/TypeIteratorState.scala index 9164a61954..db42d8535a 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/TypeIteratorState.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/TypeIteratorState.scala @@ -30,7 +30,7 @@ trait TypeIteratorState extends AnalysisState { // dependers (the use sites) and their dependees (the respective definition sites). // For each dependee (def-site) we store the corresponding EOptionP, such that we can // efficiently perform updates here. - // If we get an update for a dependee, we have to update all points-to sets for the + // If we get an update for a dependee, we have to update all points-to sets for // its dependers (_dependeeToDependers(dependee). private val _dependeeToDependers: mutable.Map[EPK[Entity, Property], mutable.Set[Entity]] = { mutable.Map.empty diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/reflection/ReflectionRelatedCallsAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/reflection/ReflectionRelatedCallsAnalysis.scala index 169c22e1ca..b7170943e1 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/reflection/ReflectionRelatedCallsAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/reflection/ReflectionRelatedCallsAnalysis.scala @@ -1530,7 +1530,7 @@ object ReflectionRelatedCallsAnalysis { /** * Handles the effect of serialization to the call graph. * As an example models the invocation of constructors when `readObject` is called, if there is a - * cast afterwards. + * cast afterward. * * @author Florian Kuebler * @author Dominik Helm diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/rta/InstantiatedTypesAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/rta/InstantiatedTypesAnalysis.scala index 72a0ab9954..e26e59f7ba 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/rta/InstantiatedTypesAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/rta/InstantiatedTypesAnalysis.scala @@ -111,30 +111,30 @@ class InstantiatedTypesAnalysis private[analyses] ( ): PropertyComputationResult = boundary { callersUB.forNewCallerContexts(seenCallers, callersEOptP.e) { (_, callerContext, _, isDirect) => - // unknown or VM level calls always have to be treated as instantiations + // Unknown or VM level calls always have to be treated as instantiations if (!callerContext.hasContext) { break(partialResult(instantiatedTypes + declaredType)); } - // indirect calls, e.g. via reflection, are to be treated as instantiations as well + // Indirect calls, e.g. via reflection, are to be treated as instantiations as well if (!isDirect) { break(partialResult(instantiatedTypes + declaredType)); } val caller = callerContext.method - // a constructor is called by a non-constructor method, there will be an initialization. + // A constructor is called by a non-constructor method, there will be an initialization. if (caller.name != "") { break(partialResult(instantiatedTypes + declaredType)); } - // if the caller is not available, we have to assume that it was no super call + // If the caller is not available, we have to assume that it was no super call if (!caller.hasSingleDefinedMethod) { break(partialResult(instantiatedTypes + declaredType)); } - // the constructor is called from another constructor. it is only an new instantiated - // type if it was no super call. Thus the caller must be a direct subtype + // The constructor is called from another constructor. It is only a newly instantiated + // type if it was no super call. Thus, the caller must be a direct subtype. project.classFile(caller.declaringClassType).foreach { cf => cf.superclassType.foreach { supertype => if (supertype != declaredType) @@ -144,8 +144,8 @@ class InstantiatedTypesAnalysis private[analyses] ( val body = caller.definedMethod.body.get - // there must either be a new of the `declaredType` or it is a super call. - // check if there is an explicit NEW that instantiates the type + // There must either be a NEW of the `declaredType` or it is a super call. + // Check if there is an explicit NEW that instantiates the type val newInstr = NEW(declaredType) val hasNew = body.exists(pcInst => pcInst.instruction == newInstr) if (hasNew) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/ConfiguredNativeMethodsInstantiatedTypesAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/ConfiguredNativeMethodsInstantiatedTypesAnalysis.scala index d2fe3a4683..b1c64793ac 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/ConfiguredNativeMethodsInstantiatedTypesAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/ConfiguredNativeMethodsInstantiatedTypesAnalysis.scala @@ -114,7 +114,7 @@ class ConfiguredNativeMethodsInstantiatedTypesAnalysis private[analyses] ( val returnType = declaredMethod.descriptor.returnType.asReferenceType - // If we have an array return type, we want the ArrayType and its element type to be considered + // If we have an array return type, we want the ArrayType and its element-type to be considered val types = if (returnType.isArrayType && returnType.asArrayType.elementType.isClassType) Array(returnType, returnType.asArrayType.elementType.asClassType) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/InstantiatedTypesAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/InstantiatedTypesAnalysis.scala index 3eca9b3325..089b2e71f1 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/InstantiatedTypesAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/InstantiatedTypesAnalysis.scala @@ -149,7 +149,7 @@ class InstantiatedTypesAnalysis private[analyses] ( isDirect: Boolean, partialResults: ArrayBuffer[PartialResult[TypeSetEntity, InstantiatedTypes]] ): Unit = boundary { - // a constructor is called from an unknown context, there could be an initialization. + // A constructor is called from an unknown context, there could be an initialization. if (!callContext.hasContext) { partialResults += partialResult(declaredType, ExternalWorld) return; @@ -157,26 +157,26 @@ class InstantiatedTypesAnalysis private[analyses] ( val caller = callContext.method - // indirect calls, e.g. via reflection, are to be treated as instantiations as well + // Indirect calls, e.g. via reflection, are to be treated as instantiations as well if (!isDirect) { partialResults += partialResult(declaredType, caller) return; } - // a constructor is called by a non-constructor method, there will be an initialization. + // A constructor is called by a non-constructor method, there will be an initialization. if (caller.name != "") { partialResults += partialResult(declaredType, caller) return; } - // the constructor is called from another constructor. it is only an new instantiated - // type if it was no super call. Thus the caller must be a subtype + // The constructor is called from another constructor. It is only a newly instantiated + // type if it was no super call. Thus, the caller must be a direct subtype. if (!classHierarchy.isSubtypeOf(caller.declaringClassType, declaredType)) { partialResults += partialResult(declaredType, caller) return; } - // actually it must be the direct subtype! -- we did the first check to return early + // Actually it must be the direct subtype! -- we did the first check to return early project.classFile(caller.declaringClassType.asClassType).foreach { cf => cf.superclassType.foreach { supertype => if (supertype != declaredType) { @@ -186,7 +186,7 @@ class InstantiatedTypesAnalysis private[analyses] ( } } - // if the caller is not available, we have to assume that it was no super call + // If the caller is not available, we have to assume that it was no super call if (!caller.hasSingleDefinedMethod) { partialResults += partialResult(declaredType, caller) return; @@ -194,7 +194,7 @@ class InstantiatedTypesAnalysis private[analyses] ( val callerMethod = caller.definedMethod - // if the caller has no body, we have to assume that it was no super call + // If the caller has no body, we have to assume that it was no super call if (callerMethod.body.isEmpty) { partialResults += partialResult(declaredType, caller) return; @@ -213,15 +213,15 @@ class InstantiatedTypesAnalysis private[analyses] ( elidedAssert(pcsOfSuperCalls.nonEmpty) - // there can be only one super call, so there must be an explicit call + // There can be only one super call, so there must be an explicit call if (pcsOfSuperCalls.size > 1) { partialResults += partialResult(declaredType, caller) return; } - // there is exactly the current call as potential super call, it still might no super - // call if the class has another constructor that calls the super. In that case - // there must either be a new of the `declaredType` or it is a super call. + // There is exactly the current call as potential super call, it still might be no super + // call if the class has another constructor that calls the super. In that case, + // there must either be a NEW of the `declaredType` or it is a super call. val newInstr = NEW(declaredType) val hasNew = callerMethod.body.get.exists(pcInst => pcInst.instruction == newInstr) if (hasNew) @@ -306,7 +306,7 @@ class InstantiatedTypesAnalysisScheduler( // While processing entry points and fields, we keep track of all array types we see, as // well as subtypes and lower-dimensional types. These types also need to be - // pre-initialized. Note: This set only contains ArrayTypes whose element type is an + // pre-initialized. Note: This set only contains ArrayTypes whose element-type is an // ClassType. Arrays of primitive types can be ignored. val seenArrayTypes = UIDSet.newBuilder[ArrayType] @@ -379,7 +379,7 @@ class InstantiatedTypesAnalysisScheduler( @inline def fieldIsRelevant(f: Field): Boolean = { // Only fields which are ArrayType or ClassType are relevant. f.fieldType.isReferenceType && - // If the field is an ArrayType, then the array's element type must be a ClassType. + // If the field is an ArrayType, then the array's element-type must be a ClassType. // In other words: We don't care about arrays of primitive types (e.g. int[]) which // do not have to be pre-initialized. (!f.fieldType.isArrayType || f.fieldType.asArrayType.elementType.isClassType) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/TypePropagationAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/TypePropagationAnalysis.scala index 1d82ca982d..7d8c621bfb 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/TypePropagationAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/cg/xta/TypePropagationAnalysis.scala @@ -525,11 +525,11 @@ final class TypePropagationAnalysis private[analyses] ( val filteredTypes = newTypes.foldLeft(UIDSet.newBuilder[ReferenceType]) { (builder, nt) => val fitr = filters.iterator - var canditateMatches = false - while (!canditateMatches && fitr.hasNext) { + var candidateMatches = false + while (!candidateMatches && fitr.hasNext) { val tf = fitr.next() if (candidateMatchesTypeFilter(nt, tf)) { - canditateMatches = true + candidateMatches = true builder += nt } } diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysis.scala index d2d753b057..b07bf27a06 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysis.scala @@ -77,7 +77,7 @@ trait AbstractEscapeAnalysis extends FPCFAnalysis { } /** - * Analyzes each TAC statement of the given method. This methods assumes that there is at least + * Analyzes each TAC statement of the given method. This method assumes that there is at least * an intermediate result for the TAC present. */ protected def analyzeTAC()( @@ -416,7 +416,7 @@ trait AbstractEscapeAnalysis extends FPCFAnalysis { } /** - * Extracts information from the given entity and should call [[doDetermineEscape]] afterwards. + * Extracts information from the given entity and should call [[doDetermineEscape]] afterward. * For some entities a result might be returned immediately. */ def determineEscape(e: Entity): ProperPropertyComputationResult = diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysisState.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysisState.scala index 54a9f58a76..1f4fde6571 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysisState.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractEscapeAnalysisState.scala @@ -153,7 +153,7 @@ trait AbstractEscapeAnalysisState { } /** - * Stores the parameters to which the analyses depends on, and whose functions return value is used + * Stores the parameters to which the analysis depends on, and whose functions return value is used * any further. */ trait ReturnValueUseSites { diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractInterProceduralEscapeAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractInterProceduralEscapeAnalysis.scala index 78ed067c09..acd44bed8c 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractInterProceduralEscapeAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/AbstractInterProceduralEscapeAnalysis.scala @@ -218,7 +218,7 @@ trait AbstractInterProceduralEscapeAnalysis extends AbstractEscapeAnalysis { implicit state: AnalysisState ): Unit = { /* - * Handling a escape state twice, does not affect the escape state + * Handling an escape state twice, does not affect the escape state */ val escapeState = propertyStore(fp, EscapeProperty.key) if (state.containsDependency(escapeState)) { diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConfigurationBasedConstructorEscapeAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConfigurationBasedConstructorEscapeAnalysis.scala index f110971347..f9de58a452 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConfigurationBasedConstructorEscapeAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConfigurationBasedConstructorEscapeAnalysis.scala @@ -12,9 +12,9 @@ import org.opalj.util.elidedAssert import pureconfig.* /** - * In the configuration system it is possible to define escape information for the this local in the - * constructors of a specific class. This analysis sets the [[org.opalj.br.analyses.VirtualFormalParameter]] of the this local - * to the defined value. + * In the configuration system it is possible to define escape information for the this-local in the + * constructors of a specific class. This analysis sets the [[org.opalj.br.analyses.VirtualFormalParameter]] of the + * this-local to the defined value. * * @author Florian Kuebler */ @@ -52,7 +52,7 @@ trait ConfigurationBasedConstructorEscapeAnalysis extends AbstractEscapeAnalysis val propertyOption = predefinedConstructors.get(call.declaringClass.asClassType) - // the object constructor will not escape the this local + // the object constructor will not escape the this-local if (propertyOption.nonEmpty) { state.meetMostRestrictive(propertyOption.get) } else { diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConstructorSensitiveEscapeAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConstructorSensitiveEscapeAnalysis.scala index 3bba5f70fe..0398d59346 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConstructorSensitiveEscapeAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/ConstructorSensitiveEscapeAnalysis.scala @@ -30,7 +30,7 @@ import org.opalj.fpcf.SomeInterimEP import org.opalj.util.elidedAssert /** - * Special handling for constructor calls, as the receiver of an constructor is always an + * Special handling for constructor calls, as the receiver of a constructor is always an * allocation site. * The constructor of Object does not escape the self reference by definition. For other * constructors, the inter-procedural chain will be processed until it reaches the Object @@ -57,7 +57,7 @@ trait ConstructorSensitiveEscapeAnalysis extends AbstractEscapeAnalysis { elidedAssert(call.name == "", "method is not a constructor") elidedAssert(state.usesDefSite(call.receiver), "call receiver does not use def-site") - // the object constructor will not escape the this local + // the object constructor will not escape the this-local if (call.declaringClass eq ClassType.Object) return; @@ -71,7 +71,7 @@ trait ConstructorSensitiveEscapeAnalysis extends AbstractEscapeAnalysis { ) constructor match { case Success(callee) => - // check if the this local escapes in the callee + // check if the this-local escapes in the callee val fp = context.virtualFormalParameters(context.declaredMethods(callee))(0) val fpEntity = ( diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/InterProceduralEscapeAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/InterProceduralEscapeAnalysis.scala index a94a62d963..acef608cf0 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/InterProceduralEscapeAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/InterProceduralEscapeAnalysis.scala @@ -221,7 +221,7 @@ object LazyInterProceduralEscapeAnalysis /** * Registers the analysis as a lazy computation, that is, the method - * will call `ProperytStore.scheduleLazyComputation`. + * will call `PropertyStore.scheduleLazyComputation`. */ override def register(p: SomeProject, ps: PropertyStore, unused: Null): FPCFAnalysis = { val analysis = new InterProceduralEscapeAnalysis(p) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/SimpleEscapeAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/SimpleEscapeAnalysis.scala index 774238aca6..7a917cbb47 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/SimpleEscapeAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/escape/SimpleEscapeAnalysis.scala @@ -46,7 +46,7 @@ class SimpleEscapeAnalysisContext( /** * A simple escape analysis that can handle [[org.opalj.tac.common.DefinitionSiteLike]]s and - * [[org.opalj.br.analyses.VirtualFormalParameter]]s (the this parameter of a constructor). All other + * [[org.opalj.br.analyses.VirtualFormalParameter]]s (the this-parameter of a constructor). All other * [[org.opalj.br.analyses.VirtualFormalParameter]]s are marked as * [[org.opalj.br.fpcf.properties.AtMost]]([[org.opalj.br.fpcf.properties.NoEscape]]). * diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/AbstractFieldAssignabilityAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/AbstractFieldAssignabilityAnalysis.scala index 377be8d0b1..828217f15b 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/AbstractFieldAssignabilityAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/AbstractFieldAssignabilityAnalysis.scala @@ -46,7 +46,6 @@ import org.opalj.br.fpcf.properties.immutability.FieldAssignability import org.opalj.br.fpcf.properties.immutability.NonAssignable import org.opalj.fpcf.Entity import org.opalj.fpcf.EOptionP -import org.opalj.fpcf.FinalEP import org.opalj.fpcf.FinalP import org.opalj.fpcf.InterimResult import org.opalj.fpcf.InterimUBP diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/L2FieldAssignabilityAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/L2FieldAssignabilityAnalysis.scala index 5aebf66fb3..7b1e59e603 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/L2FieldAssignabilityAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/fieldassignability/L2FieldAssignabilityAnalysis.scala @@ -159,6 +159,7 @@ class L2FieldAssignabilityAnalysis private[analyses] (val project: SomeProject) val assignedValueObjectVar = stmts(assignedValueObject.definedBy.head).asAssignment.targetVar.asVar val fieldWriteInMethodIndex = taCode.pcToIndex(writesInMethod.head._2) + if (assignedValueObjectVar != null && !assignedValueObjectVar.usedBy.forall { index => val stmt = stmts(index) @@ -346,7 +347,7 @@ class L2FieldAssignabilityAnalysis private[analyses] (val project: SomeProject) val resultCatchesAndThrows = findCatchesAndThrows(taCode) /** - * Determines whether all caught exceptions are thrown afterwards + * Determines whether all caught exceptions are thrown afterward */ def noInterferingExceptions(): Boolean = resultCatchesAndThrows._1.forall { @@ -776,7 +777,7 @@ class L2FieldAssignabilityAnalysis private[analyses] (val project: SomeProject) /** * Checks if an expression is a field read of the currently analyzed field. - * For instance fields, the read must be on the `this` reference. + * For instance fields, the read must be on the this-reference. */ def isReadOfCurrentField( expr: Expr[V], diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/lcp_on_fields/problem/LCPOnFieldsProblem.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/lcp_on_fields/problem/LCPOnFieldsProblem.scala index 98abe1ad98..27f08f2fad 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/lcp_on_fields/problem/LCPOnFieldsProblem.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/lcp_on_fields/problem/LCPOnFieldsProblem.scala @@ -41,7 +41,7 @@ import org.opalj.tac.fpcf.analyses.ide.solver.JavaStatement.StmtAsCall import org.opalj.value.IsIntegerValue /** - * Definition of linear constant propagation on fields problem. This implementation detects basic cases of linear + * Definition of linear-constant-propagation-on-fields problem. This implementation detects basic cases of linear * constant propagation involving fields. It detects direct field assignments but fails to detect assignments done in a * method where the value is passed as an argument (e.g. a classical setter). Similar, array read accesses can only be * resolved if the index is a constant literal. There also is just minimal support for static fields. @@ -247,7 +247,7 @@ class LCPOnFieldsProblem( } case (_, f: AbstractEntityFact) => - /* Specialized facts only live for one step and are turned back into basic ones afterwards */ + /* Specialized facts only live for one step and are turned back into basic ones afterward */ Set(f.toObjectOrArrayFact) /* Static fields are modeled such that statements that change their value can always originate from @@ -284,7 +284,7 @@ class LCPOnFieldsProblem( } case (_, f: AbstractStaticFieldFact) => - /* Specialized facts only live for one step and are turned back into basic ones afterwards */ + /* Specialized facts only live for one step and are turned back into basic ones afterward */ Set(f.toStaticFieldFact) case _ => Set(sourceFact) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/linear_constant_propagation/problem/LinearConstantPropagationProblem.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/linear_constant_propagation/problem/LinearConstantPropagationProblem.scala index 9a328d58b2..9d422cf409 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/linear_constant_propagation/problem/LinearConstantPropagationProblem.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/instances/linear_constant_propagation/problem/LinearConstantPropagationProblem.scala @@ -10,8 +10,6 @@ package problem import scala.annotation.unused -import scala.collection.immutable.Set - import org.opalj.BinaryArithmeticOperators import org.opalj.br.Method import org.opalj.fpcf.PropertyStore @@ -394,7 +392,7 @@ class LinearConstantPropagationProblem throw new IllegalArgumentException(s"Combination ($leftExpr, $rightExpr) should not occur here!") } - /* Try to resolve an constant or variable expression to a constant value */ + /* Try to resolve a constant or variable expression to a constant value */ val getValueForExpr: Expr[JavaStatement.V] => Option[Int] = expr => { expr.astID match { case Var.ASTID => diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBackwardICFG.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBackwardICFG.scala index 1a6f51f400..5ef35b5a70 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBackwardICFG.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBackwardICFG.scala @@ -6,7 +6,7 @@ package analyses package ide package solver -import scala.collection.mutable.{Set => MutableSet} +import scala.collection.mutable.Set as MutableSet import org.opalj.br.Method import org.opalj.br.analyses.SomeProject diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBaseICFG.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBaseICFG.scala index dfbdfd58dc..cb6b3413ff 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBaseICFG.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaBaseICFG.scala @@ -6,7 +6,7 @@ package analyses package ide package solver -import scala.collection.mutable.{Map => MutableMap} +import scala.collection.mutable.Map as MutableMap import org.opalj.br.Method import org.opalj.br.analyses.DeclaredMethods diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaForwardICFG.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaForwardICFG.scala index 80d25bfd1a..184b99b80c 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaForwardICFG.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ide/solver/JavaForwardICFG.scala @@ -6,7 +6,7 @@ package analyses package ide package solver -import scala.collection.mutable.{Set => MutableSet} +import scala.collection.mutable.Set as MutableSet import org.opalj.br.Method import org.opalj.br.analyses.SomeProject diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/IFDSEvaluationRunner.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/IFDSEvaluationRunner.scala index d17c74bbb4..00c1734108 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/IFDSEvaluationRunner.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/IFDSEvaluationRunner.scala @@ -59,7 +59,7 @@ abstract class IFDSEvaluationRunner extends ProjectsAnalysisApplication { ): Unit = { val (project, _) = analysisConfig.setupProject(cp) val (ps, _) = analysisConfig.setupPropertyStore(project) - analysisConfig.setupCallGaph(project) + analysisConfig.setupCallGraph(project) var analysisTime: Milliseconds = Milliseconds.None println("Start: " + new java.util.Date) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/taint/JavaBackwardTaintProblem.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/taint/JavaBackwardTaintProblem.scala index 2510ad0f35..4921025bb6 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/taint/JavaBackwardTaintProblem.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/ifds/taint/JavaBackwardTaintProblem.scala @@ -190,7 +190,7 @@ abstract class JavaBackwardTaintProblem(project: SomeProject) /** * Adds a FlowFact, if `createFlowFactAtCall` creates one. - * Removes taints according to `sanitizeParamters`. + * Removes taints according to `sanitizeParameters`. */ override def callToReturnFlow( call: JavaStatement, diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/AbstractPointsToAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/AbstractPointsToAnalysis.scala index 843eb7763f..d37f193220 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/AbstractPointsToAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/AbstractPointsToAnalysis.scala @@ -202,7 +202,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod case _ => PointsToSetLike.noFilter } - if (state.hasCalleesDepenedee) { + if (state.hasCalleesDependee) { state.includeSharedPointsToSet(defSiteObject, emptyPointsToSet, filter) state.addDependee(defSiteObject, state.calleesDependee, filter) } @@ -334,7 +334,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod var continue = !isEmptyArray while (remainingCounts.nonEmpty && allocatedType.isArrayType && continue) { val theType = allocatedType.asArrayType - val arrayEntity = ArrayEntity(arrayReferencePTS.getNewestElement()) + val arrayEntity = ArrayEntity(arrayReferencePTS.getNewestElement) if (countIsZero(remainingCounts)) continue = false @@ -358,7 +358,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod } } - // maps the points-to set of actual parameters (including *this*) the the formal parameters + // maps the points-to set of actual parameters (including *this*) the formal parameters private def handleCall( call: Call[DUVar[ValueInformation]], pc: Int @@ -384,7 +384,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod filter ) } - if (state.hasCalleesDepenedee) { + if (state.hasCalleesDependee) { state.addDependee(callExceptions, state.calleesDependee, filter) state.includeSharedPointsToSet( callExceptions, @@ -403,7 +403,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod val fps = formalParameters(target.method) if (fps != null) { - // handle receiver for non static methods + // handle receiver for non-static methods if (receiverOpt.isDefined) { val isNonVirtualCall = call match { case _: NonVirtualFunctionCall[V] | _: NonVirtualMethodCall[V] => true @@ -445,7 +445,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod // TODO That rather is a responsibility of the reflection analysis though if (indirectParams.isEmpty || descriptor.parametersCount == indirectParams.size) { if (fps != null) { - // handle receiver for non static methods + // handle receiver for non-static methods val receiverOpt = callees.indirectCallReceiver(state.callContext, pc, target) if (receiverOpt.isDefined && !targetMethod.definedMethod.isStatic) { val receiverDefSites = valueOriginsOfPCs(receiverOpt.get._2, tac.pcToIndex) @@ -522,7 +522,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod if (target.definedField.isStatic) { handleGetStatic(target, pc) } else if (receiverOpt.isDefined) { - // handle receiver for non static fields if available + // handle receiver for non-static fields if available handleGetField( Some(target), pc, @@ -554,7 +554,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod if (target.definedField.isStatic) { handlePutStatic(target, rhsDefSites) } else if (receiverOpt.isDefined) { - // handle receiver for non static fields if available + // handle receiver for non-static fields if available handlePutField( Some(target), valueOriginsOfPCs(receiverOpt.get._2, tac.pcToIndex), @@ -569,7 +569,7 @@ trait AbstractPointsToAnalysis extends PointsToAnalysisBase with ReachableMethod ): ArrayBuffer[ProperPropertyComputationResult] = { val results = super.createResults - if (state.hasCalleesDepenedee) { + if (state.hasCalleesDependee) { val calleesDependee = state.calleesDependee results += InterimPartialResult( Set(calleesDependee), diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/ConfiguredMethodsPointsToAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/ConfiguredMethodsPointsToAnalysis.scala index 50cfaad550..ba95e96887 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/ConfiguredMethodsPointsToAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/ConfiguredMethodsPointsToAnalysis.scala @@ -219,7 +219,7 @@ abstract class ConfiguredMethodsPointsToAnalysis private[analyses] ( ) state.includeSharedPointsToSet(defSiteObject, pts, PointsToSetLike.noFilter) if (asd.arrayComponentTypes.nonEmpty) { - val arrayEntity = ArrayEntity(pts.getNewestElement()) + val arrayEntity = ArrayEntity(pts.getNewestElement) var arrayPTS: PointsToSet = emptyPointsToSet asd.arrayComponentTypes.foreach { componentTypeString => val componentType = ClassType(componentTypeString) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/LibraryPointsToAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/LibraryPointsToAnalysis.scala index f54c1dc17f..6e292be404 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/LibraryPointsToAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/LibraryPointsToAnalysis.scala @@ -59,7 +59,7 @@ abstract class LibraryPointsToAnalysis(final val project: SomeProject) // While processing entry points and fields, we keep track of all array types we see, as // well as subtypes and lower-dimensional types. These types also need to be - // pre-initialized. Note: This set only contains ArrayTypes whose element type is an + // pre-initialized. Note: This set only contains ArrayTypes whose element-type is an // ClassType. Arrays of primitive types can be ignored. val seenArrayTypes = UIDSet.newBuilder[ArrayType] @@ -119,7 +119,7 @@ abstract class LibraryPointsToAnalysis(final val project: SomeProject) @inline def fieldIsRelevant(f: Field): Boolean = { // Only fields which are ArrayType or ClassType are relevant. f.fieldType.isReferenceType && - // If the field is an ArrayType, then the array's element type must be a ClassType. + // If the field is an ArrayType, then the array's element-type must be a ClassType. // In other words: We don't care about arrays of primitive types (e.g. int[]) which // do not have to be pre-initialized. (!f.fieldType.isArrayType || f.fieldType.asArrayType.elementType.isClassType) diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisBase.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisBase.scala index a9a2ef5a0a..716910a8b0 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisBase.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisBase.scala @@ -332,7 +332,7 @@ trait PointsToAnalysisBase extends AbstractPointsToBasedAnalysis with TypeConsum state.addDependee(depender, p2s, typeFilter) } - pointsToUB(p2s.asInstanceOf[EOptionP[Entity, PointsToSet]]) + pointsToUB(p2s) } @inline protected def updatedDependees( diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisState.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisState.scala index 19cb5622b2..94b984deb7 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisState.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/PointsToAnalysisState.scala @@ -209,7 +209,7 @@ class PointsToAnalysisState[ else calleesProperty.ub } - def hasCalleesDepenedee: Boolean = { + def hasCalleesDependee: Boolean = { _calleesDependee.nonEmpty && _calleesDependee.get.isRefinable } @@ -278,12 +278,12 @@ class PointsToAnalysisState[ def writeAccessDependee: EOptionP[Method, MethodFieldWriteAccessInformation] = _writeAccessesDependee.get override def hasOpenDependencies: Boolean = { - hasCalleesDepenedee || super.hasOpenDependencies + hasCalleesDependee || super.hasOpenDependencies } override def dependees: Set[SomeEOptionP] = { val otherDependees = super.dependees - if (hasCalleesDepenedee) + if (hasCalleesDependee) otherDependees + _calleesDependee.get else otherDependees diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/TypeBasedPointsToAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/TypeBasedPointsToAnalysis.scala index 83b121f17e..077f183851 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/TypeBasedPointsToAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/pointsto/TypeBasedPointsToAnalysis.scala @@ -22,7 +22,7 @@ import org.opalj.fpcf.PropertyMetaInformation * - [[org.opalj.br.Field]] for fields (either static of instance) * - [[org.opalj.br.DeclaredMethod]] for the points-to set of the return values. * - [[org.opalj.br.analyses.VirtualFormalParameter]] for the parameters of a method. - * - [[org.opalj.br.ClassType]] for the element type of an array. + * - [[org.opalj.br.ClassType]] for the element-type of an array. * * @author Florian Kuebler */ diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/AbstractPurityAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/AbstractPurityAnalysis.scala index de5bf7ef93..1a6fbac291 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/AbstractPurityAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/AbstractPurityAnalysis.scala @@ -228,7 +228,7 @@ trait AbstractPurityAnalysis extends FPCFAnalysis { // See // https://stackoverflow.com/questions/6416408/static-circular-dependency-in-java // for an in-depth discussion. - // (Howevever, if we would check for cycles, we could determine that it is pure, + // (However, if we would check for cycles, we could determine that it is pure, // but this is not considered to be too useful...) atMost(ImpureByAnalysis) false @@ -336,7 +336,7 @@ trait AbstractPurityAnalysis extends FPCFAnalysis { /** * Examines the influence of the purity property of a method on the examined method's purity. * - * @note Adds dependendies when necessary. + * @note Adds dependendees when necessary. */ def checkMethodPurity( ep: EOptionP[Context, Purity], @@ -413,7 +413,7 @@ trait AbstractPurityAnalysis extends FPCFAnalysis { if (!returnValue.isVar) { // The expression could refer to further expressions in a non-flat representation. To - // avoid special handling, we just fallback to SideEffectFreeWithoutAllocations here if + // avoid special handling, we just fall back to SideEffectFreeWithoutAllocations here if // the return value is not local as the analysis is intended to be used on flat // representations anyway. isLocal(returnValue, SideEffectFree) @@ -471,7 +471,7 @@ trait AbstractPurityAnalysis extends FPCFAnalysis { handleUnknownTypeImmutability(ep, returnValue) true case _ => - atMost(Pure) // Can not be compile time pure if mutable object is returned + atMost(Pure) // Can not be compile-time pure if mutable object is returned if (state.ubPurity.isDeterministic) isLocal(returnValue, SideEffectFree) false // Return early if we are already side-effect free diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L1PurityAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L1PurityAnalysis.scala index b9deb36f3b..a2a18bd9ee 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L1PurityAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L1PurityAnalysis.scala @@ -99,7 +99,7 @@ class L1PurityAnalysis private[analyses] (val project: SomeProject) extends Abst * @param tac The method's three address code * @param lbPurity The current minimum purity level for the method * @param ubPurity The current maximum purity level for the method that will be assigned by - * checkPurityOfX methods to aggregrate the purity + * checkPurityOfX methods to aggregate the purity */ class State( var dependees: Set[EOptionP[Entity, Property]], @@ -173,7 +173,7 @@ class L1PurityAnalysis private[analyses] (val project: SomeProject) extends Abst // The expression could refer to further expressions in a non-flat representation. // In that case it could be, e.g., a GetStatic. In that case the reference is // not locally created and/or initialized. To avoid special handling, we just - // fallback to false here as the analysis is intended to be used on flat + // fall back to false here as the analysis is intended to be used on flat // representations anyway. atMost(otherwise) false @@ -183,7 +183,7 @@ class L1PurityAnalysis private[analyses] (val project: SomeProject) extends Abst /** * Examines the influence of the purity property of a method on the examined method's purity. * - * @note Adds dependendies when necessary. + * @note Adds dependees when necessary. */ def checkMethodPurity( ep: EOptionP[Context, Purity], diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L2PurityAnalysis.scala b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L2PurityAnalysis.scala index 989709e5b1..96d72a1ed6 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L2PurityAnalysis.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/fpcf/analyses/purity/L2PurityAnalysis.scala @@ -97,7 +97,7 @@ import net.ceedubs.ficus.Ficus.* * @note This analysis derives all purity level. * A configurable [[org.opalj.tac.fpcf.analyses.purity.DomainSpecificRater]] is used to * identify calls, expressions and exceptions that are `LBDPure` instead of `LBImpure` or any - * `SideEffectFree` purity level. Compared to `L1PurityAnaylsis` it identifies objects/arrays + * `SideEffectFree` purity level. Compared to `L1PurityAnalysis` it identifies objects/arrays * returned from pure callees that can be considered local. Synchronized methods are treated * as `ExternallyPure`. * @author Dominik Helm @@ -108,11 +108,11 @@ class L2PurityAnalysis private[analyses] (val project: SomeProject) extends Abst * Holds the state of this analysis. * @param lbPurity The current minimum purity level for the method * @param ubPurity The current maximum purity level for the method that will be assigned by - * checkPurityOfX methods to aggregrate the purity + * checkPurityOfX methods to aggregate the purity * @param method The currently analyzed method * @param context The corresponding Context we report results for * @param declClass The declaring class of the currently analyzed method - * @param code The code of the currently analyzed method + * @param tac The code of the currently analyzed method */ class State( val method: Method, @@ -170,7 +170,7 @@ class L2PurityAnalysis private[analyses] (val project: SomeProject) extends Abst } } - def addFieldAssingabilityDependee( + def addFieldAssignabilityDependee( f: Field, eop: EOptionP[Field, FieldAssignability], owner: Option[Expr[V]] @@ -325,7 +325,7 @@ class L2PurityAnalysis private[analyses] (val project: SomeProject) extends Abst if (!expr.isVar) { // The expression could refer to further expressions in a non-flat representation. // In that case it could be, e.g., a GetStatic. In that case the reference is not - // locally created and/or initialized. To avoid special handling, we just fallback to + // locally created and/or initialized. To avoid special handling, we just fall back to // false here as the analysis is intended to be used on flat representations anyway. atMost(otherwise) return false; @@ -545,7 +545,7 @@ class L2PurityAnalysis private[analyses] (val project: SomeProject) extends Abst /** * Examines the influence of the purity property of a method on the examined method's purity. * - * @note Adds dependendees when necessary. + * @note Adds dependees when necessary. */ def checkMethodPurity( ep: EOptionP[Context, Purity], @@ -601,7 +601,7 @@ class L2PurityAnalysis private[analyses] (val project: SomeProject) extends Abst ep: EOptionP[Field, FieldAssignability], objRef: Option[Expr[V]] )(implicit state: State): Unit = { - state.addFieldAssingabilityDependee(ep.e, ep, objRef) + state.addFieldAssignabilityDependee(ep.e, ep, objRef) } /** diff --git a/OPAL/tac/src/main/scala/org/opalj/tac/package.scala b/OPAL/tac/src/main/scala/org/opalj/tac/package.scala index 2a402c54ca..a7d83845d1 100644 --- a/OPAL/tac/src/main/scala/org/opalj/tac/package.scala +++ b/OPAL/tac/src/main/scala/org/opalj/tac/package.scala @@ -76,7 +76,7 @@ package object tac { /** * Identifies the implicit `this` reference in the 3-address code representation. - * -1 always identifies the origin of the self reference(`this`) if the the method is + * -1 always identifies the origin of the self reference(`this`) if the method is * an instance method; if the method is not an instance method the origin -1 is not used. */ final val OriginOfThis /*: ValueOrigin*/ = -1 diff --git a/OPAL/tac/src/test/resources/org/opalj/tac/TACAITest.config b/OPAL/tac/src/test/resources/org/opalj/tac/TACAITest.config index d233e750aa..6ea5d47c74 100644 --- a/OPAL/tac/src/test/resources/org/opalj/tac/TACAITest.config +++ b/OPAL/tac/src/test/resources/org/opalj/tac/TACAITest.config @@ -53,7 +53,7 @@ project: ai-9.jar jdk: no class: ai.MethodsWithExceptions method: alwaysCatch -test: if we have a catch handler which catches a given and explictily thrown exception then the origin should identify the respective parameter +test: if we have a catch handler which catches a given and explicitly thrown exception then the origin should identify the respective parameter domain: org.opalj.ai.domain.l1.DefaultDomainWithCFGAndDefUse project: ai-9.jar @@ -74,7 +74,7 @@ project: ai-9.jar jdk: complete class: ai.domain.StringValues method: build -test: chained method calles ("Builder Pattern") +test: chained method callees ("Builder Pattern") domain: org.opalj.ai.domain.l2.DefaultPerformInvocationsDomainWithCFGAndDefUse project: ai-9.jar diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACAITest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACAITest.scala index 8e5055e210..b3e4f4699e 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACAITest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACAITest.scala @@ -72,7 +72,7 @@ class TACAITest extends AnyFunSpec with Matchers { val expectedInputStream = this.getClass.getResourceAsStream(expectedFileName) if (expectedInputStream eq null) fail( - s"missing expected 3-adddress code representation: $expectedFileName;" + + s"missing expected 3-address code representation: $expectedFileName;" + s"current representation:\n${actual.mkString("\n")}" ) val expected = Source.fromInputStream(expectedInputStream)(using UTF8).getLines().toList diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveArrayTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveArrayTest.scala index 906e02e9b7..aba65e567c 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveArrayTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveArrayTest.scala @@ -88,7 +88,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeInt), IntConst(0, 5)), @@ -156,7 +156,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(Array[Stmt[IdBasedVar]]( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeInt), IntConst(0, 4)), @@ -195,7 +195,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(expectedAST(ComputationalTypeDouble, ArrayType(DoubleType), DoubleConst(6, 1.0d))) javaLikeCode.shouldEqual(expectedJLC("double", "1.0d")) } @@ -206,7 +206,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(expectedAST(ComputationalTypeFloat, ArrayType(FloatType), FloatConst(6, 2.0f))) javaLikeCode.shouldEqual(expectedJLC("float", "2.0f")) } @@ -217,7 +217,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(expectedAST(ComputationalTypeInt, ArrayType(IntegerType), IntConst(6, 2))) javaLikeCode.shouldEqual(expectedJLC("int", "2")) } @@ -228,7 +228,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(expectedAST(ComputationalTypeLong, ArrayType(LongType), LongConst(6, 1))) javaLikeCode.shouldEqual(expectedJLC("long", "1l")) } @@ -239,7 +239,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(expectedAST(ComputationalTypeInt, ArrayType(ShortType), IntConst(6, 2))) javaLikeCode.shouldEqual(expectedJLC("short", "2")) } @@ -250,7 +250,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(expectedAST(ComputationalTypeInt, ArrayType(ByteType), IntConst(6, 2))) javaLikeCode.shouldEqual(expectedJLC("byte", "2")) } @@ -261,7 +261,7 @@ class TACNaiveArrayTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(stmts, false) assert(stmts.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) stmts.shouldEqual(expectedAST(ComputationalTypeInt, ArrayType(CharType), IntConst(6, 2))) javaLikeCode.shouldEqual(expectedJLC("char", "2")) } diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCastTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCastTest.scala index 07fb2325ba..9105e9efc7 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCastTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCastTest.scala @@ -103,7 +103,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(typecheckResultAST(ClassType.Object)) javaLikeCode.shouldEqual(typecheckResultJLC(ClassType.Object.toJava)) } @@ -116,7 +116,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) val listTpe = ReferenceType.apply("java/util/List") statements.shouldEqual(typecheckResultAST(listTpe)) javaLikeCode.shouldEqual(typecheckResultJLC(listTpe.toJava)) @@ -128,7 +128,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) val listType = ReferenceType("java/util/List") statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), @@ -154,7 +154,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeDouble, FloatType)) javaLikeCode.shouldEqual(longResultJLC("3: op_0 = (float) op_0")) } @@ -165,7 +165,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeDouble, IntegerType)) javaLikeCode.shouldEqual(longResultJLC("3: op_0 = (int) op_0")) } @@ -176,7 +176,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeDouble, LongType)) javaLikeCode.shouldEqual(longResultJLC("3: op_0 = (long) op_0")) } @@ -187,7 +187,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeFloat, DoubleType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (double) op_0")) } @@ -198,7 +198,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeFloat, LongType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (long) op_0")) } @@ -209,7 +209,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeFloat, IntegerType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (int) op_0")) } @@ -220,7 +220,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeLong, DoubleType)) javaLikeCode.shouldEqual(longResultJLC("3: op_0 = (double) op_0")) } @@ -231,7 +231,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeLong, FloatType)) javaLikeCode.shouldEqual(longResultJLC("3: op_0 = (float) op_0")) } @@ -242,7 +242,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeLong, IntegerType)) javaLikeCode.shouldEqual(longResultJLC("3: op_0 = (int) op_0")) } @@ -253,7 +253,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeInt, DoubleType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (double) op_0")) } @@ -264,7 +264,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeInt, LongType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (long) op_0")) } @@ -275,7 +275,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeInt, FloatType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (float) op_0")) } @@ -286,7 +286,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeInt, CharType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (char) op_0")) } @@ -297,7 +297,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeInt, ByteType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (byte) op_0")) } @@ -308,7 +308,7 @@ class TACNaiveCastTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(castResultAST(ComputationalTypeInt, ShortType)) javaLikeCode.shouldEqual(shortResultJLC("3: op_0 = (short) op_0")) } diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCmpToZeroIfTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCmpToZeroIfTest.scala index 368ffc866e..a4147f304b 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCmpToZeroIfTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveCmpToZeroIfTest.scala @@ -60,7 +60,7 @@ class TACNaiveCmpToZeroIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(1, SimpleVar(0, ComputationalTypeInt), NE, IntConst(-1, 0), 6) )) @@ -73,7 +73,7 @@ class TACNaiveCmpToZeroIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(1, SimpleVar(0, ComputationalTypeInt), EQ, IntConst(-1, 0), 6) )) @@ -86,7 +86,7 @@ class TACNaiveCmpToZeroIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(1, SimpleVar(0, ComputationalTypeInt), GE, IntConst(-1, 0), 6) )) @@ -99,7 +99,7 @@ class TACNaiveCmpToZeroIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(1, SimpleVar(0, ComputationalTypeInt), LT, IntConst(-1, 0), 6) )) @@ -112,7 +112,7 @@ class TACNaiveCmpToZeroIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(1, SimpleVar(0, ComputationalTypeInt), LE, IntConst(-1, 0), 6) )) @@ -125,7 +125,7 @@ class TACNaiveCmpToZeroIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(1, SimpleVar(0, ComputationalTypeInt), GT, IntConst(-1, 0), 6) )) diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveConstantsTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveConstantsTest.scala index fa5e4d58aa..c1f09b6e3a 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveConstantsTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveConstantsTest.scala @@ -36,7 +36,7 @@ class TACNaiveConstantsTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeInt), IntConst(0, 0)), @@ -83,7 +83,7 @@ class TACNaiveConstantsTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeLong), LongConst(0, 0L)), @@ -110,7 +110,7 @@ class TACNaiveConstantsTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeFloat), FloatConst(0, 0.0f)), @@ -143,7 +143,7 @@ class TACNaiveConstantsTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeDouble), DoubleConst(0, 0.0d)), @@ -172,7 +172,7 @@ class TACNaiveConstantsTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeReference), NullExpr(0)), @@ -197,7 +197,7 @@ class TACNaiveConstantsTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeInt), IntConst(0, 10)), diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveDoubleArithmeticTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveDoubleArithmeticTest.scala index e73590b67c..2ae0c2b3c2 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveDoubleArithmeticTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveDoubleArithmeticTest.scala @@ -60,7 +60,7 @@ class TACNaiveDoubleArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -83,7 +83,7 @@ class TACNaiveDoubleArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -106,7 +106,7 @@ class TACNaiveDoubleArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(-1, SimpleVar(-2, ComputationalTypeDouble), Param(ComputationalTypeDouble, "p_1")), @@ -135,7 +135,7 @@ class TACNaiveDoubleArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -158,7 +158,7 @@ class TACNaiveDoubleArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -181,7 +181,7 @@ class TACNaiveDoubleArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveFloatArithmeticTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveFloatArithmeticTest.scala index 8f3b588257..0b295e77a9 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveFloatArithmeticTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveFloatArithmeticTest.scala @@ -61,7 +61,7 @@ class TACNaiveFloatArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -84,7 +84,7 @@ class TACNaiveFloatArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -107,7 +107,7 @@ class TACNaiveFloatArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(-1, SimpleVar(-2, ComputationalTypeFloat), Param(ComputationalTypeFloat, "p_1")), @@ -136,7 +136,7 @@ class TACNaiveFloatArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -159,7 +159,7 @@ class TACNaiveFloatArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -182,7 +182,7 @@ class TACNaiveFloatArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -205,7 +205,7 @@ class TACNaiveFloatArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(-1, SimpleVar(-2, ComputationalTypeFloat), Param(ComputationalTypeFloat, "p_1")), diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerArithmeticTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerArithmeticTest.scala index 294992efde..51c0021926 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerArithmeticTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerArithmeticTest.scala @@ -74,7 +74,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -97,7 +97,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -120,7 +120,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -143,7 +143,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(-1, SimpleVar(-2, ComputationalTypeInt), Param(ComputationalTypeInt, "p_1")), @@ -164,7 +164,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(-1, SimpleVar(-2, ComputationalTypeInt), Param(ComputationalTypeInt, "p_1")), @@ -185,7 +185,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -208,7 +208,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -231,7 +231,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -254,7 +254,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -277,7 +277,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -300,7 +300,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -323,7 +323,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -346,7 +346,7 @@ class TACNaiveIntegerArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerIfTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerIfTest.scala index f500aaacda..95c9f1199f 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerIfTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveIntegerIfTest.scala @@ -64,7 +64,7 @@ class TACNaiveIntegerIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(2, SimpleVar(0, ComputationalTypeInt), NE, SimpleVar(1, ComputationalTypeInt), 8) )) @@ -77,7 +77,7 @@ class TACNaiveIntegerIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(2, SimpleVar(0, ComputationalTypeInt), EQ, SimpleVar(1, ComputationalTypeInt), 8) )) @@ -90,7 +90,7 @@ class TACNaiveIntegerIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(2, SimpleVar(0, ComputationalTypeInt), GE, SimpleVar(1, ComputationalTypeInt), 8) )) @@ -103,7 +103,7 @@ class TACNaiveIntegerIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(2, SimpleVar(0, ComputationalTypeInt), LT, SimpleVar(1, ComputationalTypeInt), 8) )) @@ -116,7 +116,7 @@ class TACNaiveIntegerIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(2, SimpleVar(0, ComputationalTypeInt), LE, SimpleVar(1, ComputationalTypeInt), 8) )) @@ -129,7 +129,7 @@ class TACNaiveIntegerIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(resultAST( If(2, SimpleVar(0, ComputationalTypeInt), GT, SimpleVar(1, ComputationalTypeInt), 8) )) diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveLongArithmeticTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveLongArithmeticTest.scala index 11d7d302d2..8dcd3d0a35 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveLongArithmeticTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveLongArithmeticTest.scala @@ -75,7 +75,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -98,7 +98,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -121,7 +121,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -144,7 +144,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(-1, SimpleVar(-2, ComputationalTypeLong), Param(ComputationalTypeLong, "p_1")), @@ -173,7 +173,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -196,7 +196,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -219,7 +219,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -242,7 +242,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryShiftAST( Assignment( 2, @@ -265,7 +265,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryShiftAST( Assignment( 2, @@ -288,7 +288,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, @@ -311,7 +311,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryShiftAST( Assignment( 2, @@ -334,7 +334,7 @@ class TACNaiveLongArithmeticTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryAST( Assignment( 2, diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveRefCmpIfTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveRefCmpIfTest.scala index a4467eff66..e2e2feaf35 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveRefCmpIfTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveRefCmpIfTest.scala @@ -84,7 +84,7 @@ class TACNaiveRefCmpIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryResultAST( If(2, SimpleVar(0, ComputationalTypeReference), EQ, SimpleVar(1, ComputationalTypeReference), 8) )) @@ -97,7 +97,7 @@ class TACNaiveRefCmpIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(binaryResultAST( If(2, SimpleVar(0, ComputationalTypeReference), NE, SimpleVar(1, ComputationalTypeReference), 8) )) @@ -110,7 +110,7 @@ class TACNaiveRefCmpIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(unaryResultAST( If(1, SimpleVar(0, ComputationalTypeReference), NE, NullExpr(-1), 6) )) @@ -123,7 +123,7 @@ class TACNaiveRefCmpIfTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(unaryResultAST( If(1, SimpleVar(0, ComputationalTypeReference), EQ, NullExpr(-1), 6) )) diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveStackAndSynchronizationTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveStackAndSynchronizationTest.scala index 9235bccd13..deb1509beb 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveStackAndSynchronizationTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveStackAndSynchronizationTest.scala @@ -37,7 +37,7 @@ class TACNaiveStackAndSynchronizationTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment( -1, @@ -80,7 +80,7 @@ class TACNaiveStackAndSynchronizationTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeReference), SimpleVar(-1, ComputationalTypeReference)), @@ -115,7 +115,7 @@ class TACNaiveStackAndSynchronizationTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeReference), New(0, ClassType.Object)), @@ -150,7 +150,7 @@ class TACNaiveStackAndSynchronizationTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeReference), SimpleVar(-1, ComputationalTypeReference)), @@ -201,7 +201,7 @@ class TACNaiveStackAndSynchronizationTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeInt), IntConst(0, 1)), @@ -239,7 +239,7 @@ class TACNaiveStackAndSynchronizationTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, false) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment(-1, SimpleVar(-1, ComputationalTypeReference), Param(ComputationalTypeReference, "this")), Assignment(0, SimpleVar(0, ComputationalTypeReference), New(0, ClassType("java/util/ArrayList"))), diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveSwitchTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveSwitchTest.scala index dfab1323ff..501eade68f 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveSwitchTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/TACNaiveSwitchTest.scala @@ -34,7 +34,7 @@ class TACNaiveSwitchTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, true) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) val expected = Array( Assignment( @@ -96,7 +96,7 @@ class TACNaiveSwitchTest extends TACNaiveTest { val javaLikeCode = ToTxt.stmtsToTxtStmt(statements, true) assert(statements.nonEmpty) - assert(javaLikeCode.length > 0) + assert(javaLikeCode.nonEmpty) statements.shouldEqual(Array( Assignment( -1, diff --git a/OPAL/tac/src/test/scala/org/opalj/tac/fpcf/properties/CallersTest.scala b/OPAL/tac/src/test/scala/org/opalj/tac/fpcf/properties/CallersTest.scala index 6306d6ad47..2d4b6fabe9 100644 --- a/OPAL/tac/src/test/scala/org/opalj/tac/fpcf/properties/CallersTest.scala +++ b/OPAL/tac/src/test/scala/org/opalj/tac/fpcf/properties/CallersTest.scala @@ -249,14 +249,14 @@ class CallersTest extends AnyFlatSpec with Matchers { assert(!withVM.hasCallersWithUnknownContext) assert(withVM.hasVMLevelCallers) - val withUnknwonContext = + val withUnknownContext = CallersImplWithOtherCalls(encodedCallers, hasVMLevelCallers = false, hasCallersWithUnknownContext = true) - assert(withUnknwonContext.size == 1) - assert(withUnknwonContext.callers(otherMethod).iterator.exists { + assert(withUnknownContext.size == 1) + assert(withUnknownContext.callers(otherMethod).iterator.exists { case (dm, pc, isDirect) => (dm eq declaredMethod) && (pc == 0) && isDirect }) - assert(withUnknwonContext.hasCallersWithUnknownContext) - assert(!withUnknwonContext.hasVMLevelCallers) + assert(withUnknownContext.hasCallersWithUnknownContext) + assert(!withUnknownContext.hasVMLevelCallers) val withBoth = CallersImplWithOtherCalls(encodedCallers, hasVMLevelCallers = true, hasCallersWithUnknownContext = true) diff --git a/README.markdown b/README.markdown index 8dd6af068b..8d5fa7d157 100644 --- a/README.markdown +++ b/README.markdown @@ -35,7 +35,7 @@ OPAL consists of several projects: * **Architecture Validation** (OPAL/av): A small framework to check a project's implemented architecture against a specified one. -* **Framework** (OPAL/framework): Basically just aggregates all sub-projects to make it possible to easily get a consistent snapshot of all sub-projects. In general, it is recommended to declare a dependency on this project when you want to use OPAL. +* **Framework** (OPAL/framework): Basically just aggregates all subprojects to make it possible to easily get a consistent snapshot of all subprojects. In general, it is recommended to declare a dependency on this project when you want to use OPAL. * **Demos** (OPAL/demos): Contains working code samples that demonstrate how to use OPAL. The code in the Demo project is primarily meant as a teaching resource. To start the examples, start the `sbt` console (Scala Build Tools) and change the current project to "Demos" (`project Demos`). After that you can `run` several small demo analyses. diff --git a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/Console.scala b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/Console.scala index e879dab1cd..3c13b9afe7 100644 --- a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/Console.scala +++ b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/Console.scala @@ -199,7 +199,7 @@ object Console extends Analysis[URL, BasicReport] with AnalysisApplication { } // - // PREPARE THE GENERATION OF THE REPORT OF THE OCCURED EXCEPTIONS + // PREPARE THE GENERATION OF THE REPORT OF THE OCCURRED EXCEPTIONS // if (exceptions.nonEmpty) { OPALLogger.error( diff --git a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedFields.scala b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedFields.scala index 74d3b831c6..2a2dae2d36 100644 --- a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedFields.scala +++ b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedFields.scala @@ -21,7 +21,7 @@ import org.opalj.log.GlobalLogContext import org.opalj.log.OPALLogger /** - * Identifies fields (static or instance) that are not used and which are also not useable. + * Identifies fields (static or instance) that are not used and which are also not usable. * * @author Michael Eichberg */ diff --git a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedLocalVariables.scala b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedLocalVariables.scala index 6083576ace..6a9fad1632 100644 --- a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedLocalVariables.scala +++ b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedLocalVariables.scala @@ -123,7 +123,7 @@ object UnusedLocalVariables { import code.collectInstructions val allConstantsValues = collectInstructions { case LoadConstantInstruction(v) => v } val constantValuesOnlyUsedOnces = allConstantsValues.groupBy(v => v).collect { - case (k, occurences) if occurences.tail.isEmpty => k + case (k, occurrences) if occurrences.tail.isEmpty => k } constantValuesOnlyUsedOnces.toSet } diff --git a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedMethodsAnalysis.scala b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedMethodsAnalysis.scala index f9ffdbfa91..221d8cbd01 100644 --- a/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedMethodsAnalysis.scala +++ b/TOOLS/bp/src/main/scala/org/opalj/bugpicker/core/analyses/UnusedMethodsAnalysis.scala @@ -25,8 +25,8 @@ import org.opalj.issues.Relevance object UnusedMethodsAnalysis { /** - * Checks if the given method is used/is potentially useable. If the method is not used - * and is also not potentially useable by future clients, then an issue is created + * Checks if the given method is used/is potentially usable. If the method is not used + * and is also not potentially usable by future clients, then an issue is created * and returned. * * If any of the following conditions is true, the method is considered as being called. diff --git a/TOOLS/ce/readme.md b/TOOLS/ce/Readme.md similarity index 97% rename from TOOLS/ce/readme.md rename to TOOLS/ce/Readme.md index 5d090c3b6d..8423c23b62 100644 --- a/TOOLS/ce/readme.md +++ b/TOOLS/ce/Readme.md @@ -20,7 +20,7 @@ You can add your documentation in the lines before an element, or directly behin ``` Also keep in mind that HOCON allows for multiple values within one line. -In this case, the comment will be associated with its closest neighbor that fullfills the criteria: +In this case, the comment will be associated with its closest neighbor that fulfills the criteria: ``` Object = {Key = "Value", AnotherKey = "SecondValue"} // This comment will be associated with Object, since its closing bracket is closest @@ -81,7 +81,7 @@ You can pick a type that you want to indicate, which logical restraints are, but #### @constraint Use @constraint to define which values are allowed and which are not. -If there are multiple constraints, use a new line for each constraint using the flag "@constraint" at the beginnning of each line. +If there are multiple constraints, use a new line for each constraint using the flag "@constraint" at the beginning of each line. There are currently two types implemented where you use a special style to list constraints: ##### Subclass type diff --git a/TOOLS/ce/src/main/scala/org/opalj/ce/CommentParser.scala b/TOOLS/ce/src/main/scala/org/opalj/ce/CommentParser.scala index 9d703e5bcd..9fdc5094ba 100644 --- a/TOOLS/ce/src/main/scala/org/opalj/ce/CommentParser.scala +++ b/TOOLS/ce/src/main/scala/org/opalj/ce/CommentParser.scala @@ -114,7 +114,7 @@ object CommentParser { val entries = mutable.Map[String, ConfigNode]() var nextComment = parseComments() var currentKey = "" - var currentvalue: ConfigNode = null + var currentValue: ConfigNode = null // Using a breakable while loop to interrupt as soon as the object ends breakable { @@ -131,7 +131,7 @@ object CommentParser { // 1. Separating Key and value // In JSON, Keys and values are separated with ':'. HOCON allows substituting ':' with '=' and - // also allows ommitting these symbols when using a '{' or '[' to open an object/list afterward + // also allows omitting these symbols when using a '{' or '[' to open an object/list afterward // Finding first instance of these symbols // TerminatingIndex is the index of the symbol that terminates the key. val terminatingIndex = line.indexWhere(objectKeyTerminatingChars.contains) @@ -143,13 +143,13 @@ object CommentParser { // Evaluating the type of value if (line.startsWith("{")) { // Case: Value is an object - currentvalue = parseObject(nextComment) + currentValue = parseObject(nextComment) } else if (line.startsWith("[")) { // Case: Value is a list - currentvalue = parseList(nextComment) + currentValue = parseList(nextComment) } else { // Case: Value is an entry - currentvalue = parseEntry(nextComment) + currentValue = parseEntry(nextComment) } // Json Keys are split using a ",". This is not necessary, but tolerated in HOCON syntax @@ -157,15 +157,15 @@ object CommentParser { // If there is a comment directly behind the comma, add it to comments too. getSingleLineComment.foreach { comment => - currentvalue.comment = - currentvalue.comment.mergeComment(DocumentationComment.fromString(Seq(comment))) + currentValue.comment = + currentValue.comment.mergeComment(DocumentationComment.fromString(Seq(comment))) } // Reset next comment nextComment = ListBuffer[String]() // Adding the new Key, Value pair to the Map - entries += ((currentKey, currentvalue)) + entries += ((currentKey, currentValue)) } // Proceed with the next line if the current one was fully parsed @@ -186,7 +186,7 @@ object CommentParser { /** * Method responsible to parse Entry-Type Nodes. - * @param currentComment assings previously parsed comment to this Node. This is necessary as most comments appear before the opening bracket of an object (Which identifies it as an object). + * @param currentComment assigns previously parsed comment to this Node. This is necessary as most comments appear before the opening bracket of an object (Which identifies it as an object). * @return returns the fully parsed entry. */ private def parseEntry(currentComment: ListBuffer[String]): ConfigEntry = { diff --git a/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigList.scala b/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigList.scala index 66e6af1445..68c2b2ccc2 100644 --- a/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigList.scala +++ b/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigList.scala @@ -24,7 +24,7 @@ case class ConfigList(entries: ListBuffer[ConfigNode], var comment: Documentatio pageHTML: StringBuilder )(implicit project: SomeProject): Unit = { for (entry <- entries) { - entry.toHTML(exporter, "", pageHTML) + entry.createHTML(exporter, "", pageHTML) pageHTML ++= "\n" } } diff --git a/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigNode.scala b/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigNode.scala index 11f747e316..aefeca6b07 100644 --- a/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigNode.scala +++ b/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigNode.scala @@ -17,7 +17,7 @@ trait ConfigNode { * @param label required if the Object is part of another object (Writes the key of the K,V Map there instead). Overrides the label property of the Comment object. Supply an empty string if not needed. * @param pageHTML accepts a StringBuilder. The method adds the HTML String to this StringBuilder. */ - def toHTML( + def createHTML( exporter: HTMLExporter, label: String, pageHTML: StringBuilder @@ -43,7 +43,7 @@ trait ConfigNode { // Write value into HTML code val splitContent = exporter.content.split("\\$content") pageHTML ++= splitContent(0) - comment.toHTML(pageHTML) + comment.createHTML(pageHTML) entriesToHTML(exporter, pageHTML) pageHTML ++= "\n" pageHTML ++= splitContent(1) @@ -59,7 +59,7 @@ trait ConfigNode { } /** - * Returns an HMTL-escaped text for the brief description. + * Returns an HTML-escaped text for the brief description. */ protected def getBrief(exporter: HTMLExporter)(implicit project: SomeProject): String = { if (comment.brief.nonEmpty || comment.description.nonEmpty) @@ -83,7 +83,7 @@ trait ConfigNode { )(implicit project: SomeProject): Unit /** - * Checks if the configNode (and its potential child objects are empty. + * Checks if the configNode (and its potential child objects) are empty. * @return Returns true, if the ConfigNode, its comment and its childObjects are all empty. Returns false otherwise. */ def isEmpty: Boolean diff --git a/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigObject.scala b/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigObject.scala index afa9d12b11..9a586279c7 100644 --- a/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigObject.scala +++ b/TOOLS/ce/src/main/scala/org/opalj/ce/ConfigObject.scala @@ -29,7 +29,7 @@ case class ConfigObject(var entries: mutable.Map[String, ConfigNode], var commen pageHTML: StringBuilder )(implicit project: SomeProject): Unit = { def entryToHTML(key: String, entry: ConfigNode): Unit = { - entry.toHTML(exporter, key, pageHTML) + entry.createHTML(exporter, key, pageHTML) pageHTML ++= "\n" } diff --git a/TOOLS/ce/src/main/scala/org/opalj/ce/DocumentationComment.scala b/TOOLS/ce/src/main/scala/org/opalj/ce/DocumentationComment.scala index 59e92a0d78..d2ee199c5c 100644 --- a/TOOLS/ce/src/main/scala/org/opalj/ce/DocumentationComment.scala +++ b/TOOLS/ce/src/main/scala/org/opalj/ce/DocumentationComment.scala @@ -26,7 +26,7 @@ case class DocumentationComment( * Converts the Comment object into HTML syntax. * @param pageHTML The method will add the export to this StringBuilder. */ - def toHTML(pageHTML: StringBuilder): Unit = { + def createHTML(pageHTML: StringBuilder): Unit = { if (!isEmpty) { if (description.mkString("").trim.nonEmpty) { pageHTML ++= "

    Description:
    \n" @@ -63,7 +63,7 @@ case class DocumentationComment( /** * Merges another comment into this comment. - * The datatype flag will not be merged. Reason for this is that datatypes are only used to describe entries, which cannot be merged anyways. + * The datatype flag will not be merged. Reason for this is that datatypes are only used to describe entries, which cannot be merged anyway. * @param comment accepts the comment that should be merged into this comment. * @return returns a merged DocumentationComment. */ diff --git a/TOOLS/ce/src/main/scala/org/opalj/ce/HTMLExporter.scala b/TOOLS/ce/src/main/scala/org/opalj/ce/HTMLExporter.scala index e275ad7a6c..6bf50fc39b 100644 --- a/TOOLS/ce/src/main/scala/org/opalj/ce/HTMLExporter.scala +++ b/TOOLS/ce/src/main/scala/org/opalj/ce/HTMLExporter.scala @@ -29,7 +29,6 @@ class HTMLExporter(config: Config) { * The following parameters are all read from the Configuration Explorer config, however, the CE config was not handed over due to namespace conflicts with the internally used ConfigNode. * @param configList A list of parsed Configuration Files. * @param templatePath A path to the HTML Template that should be used. - * @param config The config of the ConfigurationExplorer in order to read necessary values from it directly. * @param exportFile A path to the file that the Config shall be written to. */ def exportHTML(configList: Iterable[ConfigNode], templatePath: Path, exportFile: File)(implicit @@ -42,7 +41,7 @@ class HTMLExporter(config: Config) { val template = Using(Source.fromFile(templatePath.toFile)) { _.mkString }.getOrElse("") for (config <- configList) { if (!config.isEmpty) { - config.toHTML(this, "", pageHTML) + config.createHTML(this, "", pageHTML) pageHTML ++= "


    \n" } } diff --git a/TOOLS/ce/src/main/scala/org/opalj/ce/SubclassExtractor.scala b/TOOLS/ce/src/main/scala/org/opalj/ce/SubclassExtractor.scala index 527cd8eeb6..61e2a37b1e 100644 --- a/TOOLS/ce/src/main/scala/org/opalj/ce/SubclassExtractor.scala +++ b/TOOLS/ce/src/main/scala/org/opalj/ce/SubclassExtractor.scala @@ -11,8 +11,7 @@ import org.opalj.br.analyses.SomeProject /** * The class subclassExtractor is a wrapper class around the bytecode representation project. - * It will fetch all subclasses from the opal project and prepares the bytecode hierarchies for querying. - * @param files accepts an array of files of the jar archives that should be included in the ClassHierarchies + * It will fetch all subclasses from the project and prepares the bytecode hierarchies for querying. */ class SubclassExtractor(project: SomeProject) { val classHierarchy: ClassHierarchy = project.classHierarchy diff --git a/TOOLS/hermes/README.markdown b/TOOLS/hermes/README.markdown index 53580c0c90..87e018fcdd 100644 --- a/TOOLS/hermes/README.markdown +++ b/TOOLS/hermes/README.markdown @@ -1,5 +1,5 @@ # Overview -Hermes is a small, extensible project that helps to assess the quality of a given corpus of applications. It extracts a wide range of properties from the given projects to make it possible to asses which language features and API features are used by the respective project(s). This information can then be used to design small, efficient test fixtures/corpuses. +Hermes is a small, extensible project that helps to assess the quality of a given corpus of applications. It extracts a wide range of properties from the given projects to make it possible to assess which language features and API features are used by the respective project(s). This information can then be used to design small, efficient test fixtures/corpora. ## Categories of Queries diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/BytecodeInstrumentationAPIUsage.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/BytecodeInstrumentationAPIUsage.markdown index a7bc1abbbe..ebdd02d889 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/BytecodeInstrumentationAPIUsage.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/BytecodeInstrumentationAPIUsage.markdown @@ -17,4 +17,4 @@ Methods in this category allow instrumentation support classes to be defined in ## Retrieve Classes Information -Methods in this categroy allow to retrieve information about currently loaded and instantiated classes. +Methods in this category allow to retrieve information about currently loaded and instantiated classes. diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassFileVersion.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassFileVersion.markdown index 75db1a9e86..a99d811706 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassFileVersion.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassFileVersion.markdown @@ -10,7 +10,7 @@ Class files using Java 1.0 and 1.1. are grouped together because they use the sa Generally, don't have *jsr*/*ret* instructions anymore, because Java stopped generating them. However, technically they are still allowed and were only forbidden with version 51 (*cf. Java Virtual Machine Specification - Constraints on Java Virtual Machine code - Static Constraints*) ### Java 7 and newer -May have *invokedynamic* instructions; however, Java only started using *invokedynamic* with Java 8 and all other languages (e.g., Clojure, Groovy, Scala) also did not starte using them right away. +May have *invokedynamic* instructions; however, Java only started using *invokedynamic* with Java 8 and all other languages (e.g., Clojure, Groovy, Scala) also did not start using them right away. ### Java 8 and newer - usually have *invokedynamic* instructions because Java started using it diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassTypes.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassTypes.markdown index 2ea6e1d387..28c5e7066f 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassTypes.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/ClassTypes.markdown @@ -19,7 +19,7 @@ A marker interface is an empty interface. For example, `java.io.Serializable` or ## functional interfaces *(Also called: single abstract method (SAM) interfaces)* -> [Java 8 Lang. Spec.] A functional interface is an interface that has just one abstract method (aside from the methods of Object), and thus represents a single function contract. This "single" method may take the form of multiple abstract methods with override- equivalent signatures inherited from superinterfaces; in this case, the inherited methods logically represent a single method. +> [Java 8 Lang. Spec.] A functional interface is an interface that has just one abstract method (aside from the methods of Object), and thus represents a single function contract. This "single" method may take the form of multiple abstract methods with override-equivalent signatures inherited from superinterfaces; in this case, the inherited methods logically represent a single method. Such interfaces are particularly used in combination with lambda expressions. diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/FanInFanOut.md b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/FanInFanOut.md index 8b8fa7c64a..0def2f6676 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/FanInFanOut.md +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/FanInFanOut.md @@ -6,9 +6,9 @@ The query computes for each class the *Fan-In*, *Fan-Out* and the ratio between ### Configuration Options -All three feature kinds are configurable over two dimensions. The first dimension is the number of catergories which also determines the number of features per metric. (Each category relates to a feature.) The second dimension is the cardinality of each category. It determines how many values belong to a single feature. +All three feature kinds are configurable over two dimensions. The first dimension is the number of categories which also determines the number of features per metric. (Each category relates to a feature.) The second dimension is the cardinality of each category. It determines how many values belong to a single feature. -Lets assume we have 3 categories with a cardinality of 2. This will result in the following categories/features w.r.t. the fan in/out: +Let's assume we have 3 categories with a cardinality of 2. This will result in the following categories/features w.r.t. the fan in/out: Category 1: `Fan In/Out < 2` diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/JavaCryptoArchitectureUsage.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/JavaCryptoArchitectureUsage.markdown index 94ad9555cc..3c8ae3ba12 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/JavaCryptoArchitectureUsage.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/JavaCryptoArchitectureUsage.markdown @@ -28,7 +28,7 @@ The _Key Handling_ group represents whether some of the following classes/interf - `KeyPairGenerator` - `KeyAgreement` -> Note: Subclasses are not considered. However, querying theses types already gives a first intuition about +> Note: Subclasses are not considered. However, querying these types already gives a first intuition about > the usage of cryptographic keys. Especially the factories are often used. ## Key Store diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/LambdasAndMethodReferences.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/LambdasAndMethodReferences.markdown index 6099d2a771..dd47dab89d 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/LambdasAndMethodReferences.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/LambdasAndMethodReferences.markdown @@ -247,7 +247,7 @@ Test cases in the presence of lambdas. ##Lambda1 [//]: # (MAIN: lambda1/Class) -Tests the invocation of a lambda with a integer boxing. +Tests the invocation of a lambda with integer boxing. ```java // lambda1/Class.java diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/MicroPatterns.md b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/MicroPatterns.md index 251239641e..a35e4bbf88 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/MicroPatterns.md +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/MicroPatterns.md @@ -42,7 +42,7 @@ A class with one or more public constructors, and at least one static field of t A class which has exactly one, mutable, instance field. ### Compound Box -A class with exactly one non primitive instance field. +A class with exactly one non-primitive instance field. ### Canopy A class with exactly one instance field that it assigned exactly once, during instance construction. diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/UnsafeAPIUsage.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/UnsafeAPIUsage.markdown index a8cc0d71a4..f347337359 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/UnsafeAPIUsage.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/UnsafeAPIUsage.markdown @@ -82,7 +82,7 @@ Extracts calls of methods which use `sun.misc.Unsafe`. Closely related methods a ## Throw The throwException method is contained in the *Throw* group, and allows one to throw checked exceptions without - declaring them in the throws clause. + declaring them in the throws-clause. ## Volatile Get & Put The *Volatile Get and Volatile Put* groups allow diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Java8Invokedynamics.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Java8Invokedynamics.markdown index 5c5b143548..db59cf78c1 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Java8Invokedynamics.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Java8Invokedynamics.markdown @@ -194,7 +194,7 @@ class Class { [//]: # (MAIN: id.Class) Tests a method reference that results in an invokedynamic that uses an *INVOKEVIRTUAL* method handle which is given by the method reference of ```cls::version``` where the actually called method is -implentend with ```id.Class```'s superclass ```id.SuperClass```. +implemented with ```id.Class```'s superclass ```id.SuperClass```. ```java // id/Class.java @@ -225,8 +225,8 @@ Test cases in the presence of lambdas. ##Lambda1 [//]: # (MAIN: id.Class) -Tests the invocation of a lamdba that results in an invokedynamic with an *INVOKESTATIC* method handle -which points to an synthetic method. Please not that all primitive integers are autoboxed to +Tests the invocation of a lambda that results in an invokedynamic with an *INVOKESTATIC* method handle +which points to a synthetic method. Please note that all primitive integers are autoboxed to ```java.lang.Integer``` which then fits the lambdas (cf. ```isEven```) type. ```java // id/Class.java diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Library.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Library.markdown index db0a27c352..c0a53957e7 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Library.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Library.markdown @@ -23,7 +23,7 @@ The circumstances of the virtual call are as follows: parameter, 2) A type ```public class Type``` which declares a method ```public void method()```, 3) Another type ```public class Subtype extends Type``` which also declares a method ```public void method()```, -4) An additional type ```public class SomeType``` which also delcares a method ```public void method()```. +4) An additional type ```public class SomeType``` which also declares a method ```public void method()```. Since the calling context of ```Type.method()``` in ```Demo.entrypoint(Type t)``` is unknown. The call-graph construction must assume that the parameter ```type``` can hold all possible subtypes of ```Type``` . ```java @@ -84,7 +84,7 @@ The circumstances of the virtual call are as follows: parameter, 2) A type ```public class Type``` which declares a method ```public void method()```, 3) Another type ```public class Subtype extends Type``` which also declares a method ```public void method()```, -4) An additional type ```public class SomeType``` which also delcares a method ```public void method()```. +4) An additional type ```public class SomeType``` which also declares a method ```public void method()```. Since the calling context of ```Type.method()``` in ```Demo.callOnField()``` is unknown, i.e., the field is public and non-final and, therefore, can be re-assigned by library users. The call-graph construction must assume that all possible subtypes of ```Type``` can be assigned to the field. @@ -144,7 +144,7 @@ public class SomeType { [//]: # (LIBRARY) Tests library interface invocation for CBS edges under the following circumstances: 1) a ```public class PotentialSuperclass``` that can be inherited, -1) a ```public class DismissedSuperclass``` that cannot be inherited and, therefore, can't be target, +1) a ```public class DismissedSuperclass``` that cannot be inherited and, therefore, can't be a target, 1) a ```public interface``` that can be inherited, 1) all of the previous mentioned classes/interfaces declare the method ```public void method()```. ```java @@ -201,7 +201,7 @@ Tests library interface invocation for CBS edges under the following circumstanc 1) a ```package visible class PotentialSuperclass``` in package ```lib4.collude``` that can be inherited from a class within the same package, i.e. when a new class is added to the same package, 2) a ```package visible class InternalClass``` in package ```lib4.internal``` that can be inherited -(analogously to 1) ), +(analogously to 1), 3) a ```package visible interface``` in package ```lib4.collude``` that can be inherited from classes in the same package, 4) all of the previous mentioned classes/interfaces declare the method ```public void method()```. ```java @@ -258,7 +258,7 @@ Tests library interface invocation for CBS edges under the following circumstanc 1) a ```public class PotentialSuperclass``` in package ```lib5.internal``` that can be inherited from and, therefore, provides the method ```public void method()``` from its superclass, 2) a ```package visible class InternalClass``` in package ```lib5.internal``` that can be inherited -(analogously to 1) ), +(analogously to 1), 3) a ```package visible interface``` in package ```lib5.collude``` that can be inherited from classes in the same package, 4) all of the previous mentioned classes/interfaces declare the method ```public void method()```. ```java diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/ModernReflection.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/ModernReflection.markdown index f244f71ae0..b988db02cc 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/ModernReflection.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/ModernReflection.markdown @@ -7,7 +7,7 @@ All strings and constants are directly available and thus no control- or data-fl [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findStatic``` method handle lookup where the declaring class type, the static method's name, and the method's return type is given within the -the main method of ```tmr.Demo```. Afterwards, ```invokeExact``` is called on the looked up method +main method of ```tmr.Demo```. Afterward, ```invokeExact``` is called on the looked up method handle which results in a call to ```staticToString```. ```java // tmr/Demo.java @@ -38,7 +38,7 @@ class Demo { [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findVirtual``` method handle lookup where the declaring class type, the instance method's name, and the method's method type object is given within the -the main method of ```tmr.Demo```. Afterwards, ```invokeExact``` is called on the looked up method +main method of ```tmr.Demo```. Afterward, ```invokeExact``` is called on the looked up method handle which results in a call to ```tmr.Demo.target```. ```java // tmr/Demo.java @@ -69,7 +69,7 @@ class Demo { [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findConstructor``` method handle lookup where the declaring class type and the method's method type object is given within the -the main method of ```tmr.Demo```. Afterwards, ```invokeExact``` is called on the looked up method +main method of ```tmr.Demo```. Afterward, ```invokeExact``` is called on the looked up method handle which results in a call to ```tmr.Demo```'s constructor. Whether the constructor is called or not is verified by a static method call within the constructor. @@ -104,7 +104,7 @@ class Demo { [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findStaticGetter``` method handle lookup where the declaring class type, the field's name, and the static field's type is given within the -the main method of ```tmr.Demo```. Afterwards, ```invoke``` is called on the looked up method +main method of ```tmr.Demo```. Afterward, ```invoke``` is called on the looked up method handle which results in a call to ```Demo.target``` on ```tmr.Demo.field```. ```java // tmr/Demo.java @@ -137,7 +137,7 @@ class Demo { [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findGetter``` method handle lookup where the declaring class type, the field's name, and the field's type is given within the -the main method of ```tmr.Demo```. Afterwards, ```invoke``` is called with a new instance of +main method of ```tmr.Demo```. Afterward, ```invoke``` is called with a new instance of ```tmr.Demo``` on the looked up method handle which results in a call to ```Demo.target``` on ```tmr.Demo.field```. ```java @@ -174,7 +174,7 @@ class Demo { [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findSpecial``` method handle lookup where the declaring class type, the method's name and signature, and the special caller are passed to method. -Afterwards, ```invoke``` is called with a new instance of ```tmr.Demo``` on the looked +Afterward, ```invoke``` is called with a new instance of ```tmr.Demo``` on the looked up method handle which results in a call to ```Superclass.target``` on an instance of```tmr.Demo```. ```java @@ -210,7 +210,7 @@ class Superclass { [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findStatic``` method handle lookup where the declaring class type, the static method's name, and the method's signature is given within the -the main method of ```tmr.Demo```. Afterwards, ```invoke``` is called on the looked up method +main method of ```tmr.Demo```. Afterward, ```invoke``` is called on the looked up method handle which results in a call to ```target```. Due to the invocation of ```MethodHandle.invoke``` it is possible that the return- or parameter types are adapted by the JVM, i.e. types might be (un)boxed. @@ -243,7 +243,7 @@ class Demo { [//]: # (MAIN: tmr.Demo) Tests modern reflection by performing a ```findStatic``` method handle lookup where the declaring class type, the static method's name, and the method's signature is given within the -the main method of ```tmr.Demo```. Afterwards, ```invokeWithArguments``` is called on the looked up method +main method of ```tmr.Demo```. Afterward, ```invokeWithArguments``` is called on the looked up method handle which results in a call to ```target``` with where the respective parameters are passed. ```java // tmr/Demo.java diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Reflection.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Reflection.markdown index 7084406ceb..32b2deaf23 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Reflection.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Reflection.markdown @@ -8,7 +8,7 @@ data-flow nor control-flow analyses are required. ##TR1 [//]: # (MAIN: tr.Demo) Tests the reflective call resolution when an object of type ```java.lang.Class``` is used to find a -declared method (```Class.getDeclaredMethod```) of this class. Afterwards, the found method is invoked. +declared method (```Class.getDeclaredMethod```) of this class. Afterward, the found method is invoked. Since the target method ```Demo.target``` is static and has no arguments, neither a receiver nor a method argument is passed over the ```invoke``` method. ```java @@ -34,7 +34,7 @@ class Demo { ##TR2 [//]: # (MAIN: tr.Demo) Tests the reflective call resolution when an object of type ```java.lang.Class``` is used to find a -declared method (```Class.getDeclaredMethod```) of this class. Afterwards, the found method is invoked. +declared method (```Class.getDeclaredMethod```) of this class. Afterward, the found method is invoked. Since the target method ```Demo.target``` is an instance method, the receiver (```this```) is passed ```invoke``` such that the method can be called on the actual receiver. ```java @@ -64,7 +64,7 @@ class Demo { ##TR3 [//]: # (MAIN: tr.Demo) Tests the reflective call resolution when an object of type ```java.lang.Class``` is used to find a -method (```Class.getMethod```) of this class. Afterwards, the found method is invoked. +method (```Class.getMethod```) of this class. Afterward, the found method is invoked. Since the target method ```Demo.target``` is an instance method, the receiver (```this```) is passed ```invoke``` such that the method can be called on the actual receiver. ```java @@ -92,7 +92,7 @@ public class Demo { ##TR4 [//]: # (MAIN: tr.Demo) Tests the reflective call resolution when an object of type ```java.lang.Class``` is used to find a -declared method (```Class.getDeclaredMethod```) of this class. Afterwards, the found method is invoked. +declared method (```Class.getDeclaredMethod```) of this class. Afterward, the found method is invoked. Since the target method ```Demo.target``` is static and has one parameter, a ```null``` receiver as well as a ```String``` matching the method's parameters are passed over the ```invoke``` method. ```java @@ -171,7 +171,7 @@ reflection API. In ```tr.Demo```'s main method a new ```tr.Demo``` object is cre of type ```tr.CallTarget``` is assigned to its field. This field is then retrieved via the reflection using ```java.lang.Class.getDeclaredField()``` and the field's name, namely ```"field"```. ```java.lang.reflect.Field.get``` is then used to get the object stored within the field of the Demo -instance that has been created previously. Afterwards, the returned instance is used to call +instance that has been created previously. Afterward, the returned instance is used to call the ```target``` method. ```java // tr/Demo.java @@ -217,7 +217,7 @@ reflection API. In ```tr.Demo```'s main method a new ```tr.Demo``` object is cre of type ```tr.CallTarget``` is assigned to its field. This field is then retrieved via the reflection using ```java.lang.Class.getField()``` and the field's name, namely ```"field"```. ```java.lang.reflect.Field.get``` is then used to get the object stored within the field of the Demo -instance that has been created previously. Afterwards, the returned instance is used to call +instance that has been created previously. Afterward, the returned instance is used to call the ```target``` method. ```java @@ -522,7 +522,7 @@ class TargetClass { [//]: # (MAIN: csr.Demo) This test cases concerns the reflection API as well as a class' static initializer. Within the main method of ```csr.Demo``` a static method is called reads the value from a static field which is -first written write before the method call to ```Demo.callForName``` and then passed to ```Class.forName```. +first written before the method call to ```Demo.callForName``` and then passed to ```Class.forName```. ```Class.forName``` then tries to retrieve an object of ```java.lang.Class``` which is parameterized over ```csr.CallTarget```. In this test it is impossible to get any information about the retrieved typed and, therefore, all possible types must be considered for a sound method resolution. @@ -565,7 +565,7 @@ class CallTarget { This test cases concerns the reflection API as well as a class' static initializer. Within the main method the methods ```java.lang.System.getProperties``` and ```java.lang.System.setProperties``` are used to add a ```className``` property with the value ```csr.TargetClass``` to the global system -properties and thus make it globally available throughout the program. Afterwards, +properties and thus make it globally available throughout the program. Afterward, ```csr.Demo.callForName``` is called that then uses ```java.lang.System.getProperty("className")``` to access the stored string which is passed to the ```Class.forName``` call. Modelling system properties would help to resolve this case soundly and better precision. @@ -614,7 +614,7 @@ exceptions to test whether valid path might be ignored which leads to unsoundnes ##CFNE1 [//]: # (MAIN: cfne.Demo) This test case targets a common try catch pattern when classes are loaded. An existing class is loaded -over ```Class.forName(...)```, instantiated and then casted to another class. Unfortunately, the class +over ```Class.forName(...)```, instantiated and then cast to another class. Unfortunately, the class that is instantiated is __incompatible__ with the cast such that the operation results in a ```ClassCastException```. ```java diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Serialization.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Serialization.markdown index f0cf635922..cc12d314e4 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Serialization.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Serialization.markdown @@ -178,7 +178,7 @@ the JVM to call ```readObject``` instead of the normally used ```defaultReadObje ```ser.Demo```'s main method, an ```ObjectInputStream``` is used to deserialize a previously serialized object from the ```test.ser``` file. The call to ```ObjectInputStream.readObject``` then causes the JVM to trigger the deserialization mechanism which in turn calls ```ser.Demo.readObject```. -The returned result is then casted to ```ser.Demo``` which either results in a class cast exception or +The returned result is then cast to ```ser.Demo``` which either results in a class cast exception or implies that the deserialized object was from type ```ser.Demo```. Without any information about the file's content it is impossible to resolve the call precisely. ```java diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/StaticInitializers.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/StaticInitializers.markdown index 3097ef3915..3a0a09fb40 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/StaticInitializers.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/StaticInitializers.markdown @@ -39,7 +39,7 @@ A static initializer should be triggered when a *static interface method* is inv shows an interface ```si.Interface``` which declares a static method (```callback```) which is called in the ```si.Demo```'s main method. The invocation of ```callback``` causes the JVM to call ```si.Interface```'s static initializer (``````). - >Please not that this is not directly annotatable and we thus use a static initialized field that + >Please note that this is not directly annotatable and we thus use a static initialized field that is also initialized within the static initializer and triggers a method invocation that can be tested. ```java // si/Interface.java @@ -139,7 +139,7 @@ interface Interface { ##SI5 [//]: # (MAIN: si.Main) The instantiation of a class should trigger its static initializer. The class ```si.Demo``` has an -explictly defined static initializer. When a new instance of the ```si.Demo``` class is created in +explicitly defined static initializer. When a new instance of the ```si.Demo``` class is created in ```si.Main```'s main method, the static initializer of ```si.Demo``` must be executed. ```java // si/Main.java diff --git a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Types.markdown b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Types.markdown index a2ccf7d740..2cfcaf84d5 100644 --- a/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Types.markdown +++ b/TOOLS/hermes/src/main/resources/org/opalj/hermes/queries/jcg/Types.markdown @@ -4,7 +4,7 @@ no visible effect on the soundness they still must be supported by the framework ##TC1 [//]: # (MAIN: simplecast.Demo) This case shows type narrowing due to previous cast. The method ```simplecast.Demo.castToTarget``` takes an -object, casts it to ```simplecast.Target```, and then calls ```target``` on the casted object which +object, casts it to ```simplecast.Target```, and then calls ```target``` on the cast object which rules out ```simplecast.Demo.target``` as receiver. ```java // simplecast/Demo.java @@ -40,8 +40,8 @@ class Target { [//]: # (MAIN: castclassapi.Demo) Type narrowing due to previous cast using Java's class API. The method ```castclassapi.Demo.castToTarget``` takes a class object that is parameterized over the type the cast should be performed to and an object -that will be casted within the method. It then casts it via ```Class.cast``` to ```castclassapi.Target``` -and then calls ```toString``` on the casted object which rules out ```castclassapi.Demo.toString``` as receiver. +that will be cast within the method. It then casts it via ```Class.cast``` to ```castclassapi.Target``` +and then calls ```toString``` on the cast object which rules out ```castclassapi.Demo.toString``` as receiver. ```java // castclassapi/Demo.java package castclassapi; @@ -82,7 +82,7 @@ public class Target { ##TC3 [//]: # (MAIN: classeq.Demo) -Type narrowing due to a equality check of two ```java.lang.Class``` objects. Within the ```this``` +Type narrowing due to an equality check of two ```java.lang.Class``` objects. Within the ```this``` branch of ```classeq.Demo.callIfInstanceOfTarget``` it is thus known that the passed object ```o``` must be of type ```Target```. Hence, ```o.toString``` must only be resolved to ```Target.toString```. ```java @@ -196,7 +196,7 @@ class Target { ##TC6 [//]: # (MAIN: tc.Demo) Type narrowing due to Java's ```java.lang.Class.isAssignableFrom``` API call that checks whether a given -object (i.e. ```o```) can be assign to variable of the type the class instance is parameterized over, i.e., +object (i.e. ```o```) can be assigned to variable of the type the class instance is parameterized over, i.e., ```Target.class``` is a shorthand notation for ```java.lang.Class```. Within the ```this``` branch of ```Demo.callIfInstanceOfTarget``` it is thus known that the passed object ```o``` must be a subtype of ```Target```. Hence, ```o.toString``` must only be resolved to ```Target.toString```. diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/DuplicateFeatureIDException.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/DuplicateFeatureIDException.scala index c2c87d14bd..d341b182c4 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/DuplicateFeatureIDException.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/DuplicateFeatureIDException.scala @@ -3,7 +3,7 @@ package org.opalj package hermes /** - * @param featureID The id of the feature that is reued. + * @param featureID The id of the feature that is reused. * @param featureQueryA The id of some feature query that derives features with * the given name. * @param featureQueryB The id of another feature query that derives features with diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/FeatureQuery.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/FeatureQuery.scala index 0c50d8c70a..3971a47fe3 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/FeatureQuery.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/FeatureQuery.scala @@ -25,7 +25,7 @@ abstract class FeatureQuery(implicit hermes: HermesConfig) { /** * Queries should regularly check if they are interrupted using this method. */ - final def isInterrupted(): Boolean = Thread.currentThread().isInterrupted() + final def isInterrupted: Boolean = Thread.currentThread().isInterrupted // ================================ ABSTRACT FUNCTIONALITY ================================ @@ -71,7 +71,7 @@ abstract class FeatureQuery(implicit hermes: HermesConfig) { /** * Returns an explanation of the feature (group) using Markdown as its formatting language. * - * By default the name of the class is used to lookup the resource "className.markdown" + * By default, the name of the class is used to look up the resource "className.markdown" * which is expected to be found along the extractor. */ protected def mdDescription: String = { @@ -87,9 +87,9 @@ abstract class FeatureQuery(implicit hermes: HermesConfig) { /** * Returns an HTML description of this feature query that is targeted at end users; by default - * it calls `mdDescription` to try to find a markdown document that describes this feature and + * it calls `mdDescription` to try to find a Markdown document that describes this feature and * then uses TxtMark to convert the document. If a document is returned the web engine's - * user style sheet is set to [[org.opalj.hermes.FeatureQueries.MDCSS]]; in case of an URL no + * user style sheet is set to [[org.opalj.hermes.FeatureQueries.MDCSS]]; in case of a URL no * stylesheet is set. * * @return An HTML document/a link to an HTML document that describes this query. diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesCLI.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesCLI.scala index 8abd8e14c1..bd1b60a552 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesCLI.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesCLI.scala @@ -76,7 +76,7 @@ object HermesCLI { val waitOnFinished = new CountDownLatch(1) Hermes.analysesFinished.addListener { (_, _, isFinished) => if (isFinished) { - val theStatisticsFile = new File(statisticsFile).getAbsoluteFile() + val theStatisticsFile = new File(statisticsFile).getAbsoluteFile Hermes.exportStatistics(theStatisticsFile, !noProjectStatistics) println("Wrote statistics: " + theStatisticsFile) @@ -89,7 +89,7 @@ object HermesCLI { } mappingFile.foreach { mappingFile => - val theMappingFile = new File(mappingFile).getAbsoluteFile() + val theMappingFile = new File(mappingFile).getAbsoluteFile Hermes.exportMapping(theMappingFile) println("Wrote mapping: " + theMappingFile) } diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesConfig.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesConfig.scala index 1abbe3bb8d..a098166941 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesConfig.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/HermesConfig.scala @@ -3,6 +3,7 @@ package org.opalj package hermes import java.io.File +import scala.compiletime.uninitialized import com.typesafe.config.Config import com.typesafe.config.ConfigFactory @@ -24,7 +25,7 @@ trait HermesConfig { private var isInitialized: Boolean = false - private var config: Config = null + private var config: Config = uninitialized /** * The global configuration file. @@ -37,7 +38,7 @@ trait HermesConfig { */ def initialize(configFile: File): Unit = { import Console.err - if (!configFile.exists || !configFile.canRead()) { + if (!configFile.exists || !configFile.canRead) { err.println(s"The config file cannot be found or read: $configFile") err.println("The current folder is: " + System.getProperty("user.dir")) System.exit(2) @@ -48,9 +49,9 @@ trait HermesConfig { setConfig(config) } catch { case t: Throwable => - err.println(s"Failed while reading: $configFile; ${t.getMessage()}") + err.println(s"Failed while reading: $configFile; ${t.getMessage}") System.exit(3) - // ... if System.exit does not terminate the app; this will at least kill the + // ... if System.exit does not terminate the app; this will at least kill // the current call. throw t; } diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/ProjectConfiguration.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/ProjectConfiguration.scala index 2653063044..2b4c81b6ca 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/ProjectConfiguration.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/ProjectConfiguration.scala @@ -64,7 +64,7 @@ case class ProjectConfiguration( def instantiate: ProjectInstantiation = { // let's try to garbage collect previous projects - new Thread(() => { System.gc() }).start() + new Thread(() => System.gc()).start() info( "project setup", diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/Query.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/Query.scala index 636583b517..a0b4010843 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/Query.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/Query.scala @@ -2,10 +2,12 @@ package org.opalj package hermes +import scala.compiletime.uninitialized + import org.opalj.log.GlobalLogContext import org.opalj.log.OPALLogger.error -import pureconfig._ +import pureconfig.* /** * Container for feature queries. @@ -20,7 +22,7 @@ case class Query(query: String, private var activate: Boolean = true) derives Co def isEnabled: Boolean = activate - private var reifiedQuery: Option[FeatureQuery] = null + private var reifiedQuery: Option[FeatureQuery] = uninitialized def reify(implicit hermes: HermesConfig): Option[FeatureQuery] = this.synchronized { if (reifiedQuery ne null) { diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/BytecodeInstructions.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/BytecodeInstructions.scala index 1763e4ad0b..2d968d551a 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/BytecodeInstructions.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/BytecodeInstructions.scala @@ -43,7 +43,7 @@ class BytecodeInstructions(implicit hermes: HermesConfig) extends FeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) case method @ MethodWithBody(body) <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassFileVersion.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassFileVersion.scala index 4ee295f26d..10e3014707 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassFileVersion.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassFileVersion.scala @@ -36,7 +36,7 @@ class ClassFileVersion(implicit hermes: HermesConfig) extends FeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted } { val version = classFile.majorVersion val normalizedVersion = if (version < Java5MajorVersion) Java1MajorVersion else version diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassTypes.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassTypes.scala index 2d88ff17be..3d49c401db 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassTypes.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/ClassTypes.scala @@ -39,7 +39,7 @@ class ClassTypes(implicit hermes: HermesConfig) extends FeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted } { val location = ClassFileLocation(source, classFile) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/DebugInformation.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/DebugInformation.scala index faf3176d52..08098692d8 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/DebugInformation.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/DebugInformation.scala @@ -33,7 +33,7 @@ class DebugInformation(implicit hermes: HermesConfig) extends FeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) } { if (classFile.sourceFile.isDefined) locations(0) += classFileLocation diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/FieldAccessStatistics.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/FieldAccessStatistics.scala index 52b601a6e4..1e78a87e8e 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/FieldAccessStatistics.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/FieldAccessStatistics.scala @@ -31,7 +31,7 @@ class FieldAccessStatistics(implicit hermes: HermesConfig) extends DefaultFeatur /*3*/ "unused public fields", /*4*/ "package visible fields\nonly used by defining type", /*5*/ "protected fields\nonly used by defining type", - /*6*/ "public fields\nonly used by defininig type " + /*6*/ "public fields\nonly used by defining type " ) } diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodTypes.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodTypes.scala index 81207fe1b8..6a44296007 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodTypes.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodTypes.scala @@ -37,7 +37,7 @@ class MethodTypes(implicit hermes: HermesConfig) extends FeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classLocation = ClassFileLocation(source, classFile) m <- classFile.methods } { diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodsWithoutReturns.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodsWithoutReturns.scala index 622eb909aa..f7731add49 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodsWithoutReturns.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MethodsWithoutReturns.scala @@ -31,7 +31,7 @@ class MethodsWithoutReturns(implicit hermes: HermesConfig) extends FeatureQuery for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) method <- classFile.methods body <- method.body diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MicroPatterns.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MicroPatterns.scala index ca96c78f75..394f771097 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MicroPatterns.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/MicroPatterns.scala @@ -85,7 +85,7 @@ class MicroPatterns(implicit hermes: HermesConfig) extends FeatureQuery { val microPatternLocations = Array.fill(featureIDs.size)(new LocationsContainer[S]) for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted } { val location = ClassFileLocation(source, classFile) @@ -184,7 +184,7 @@ class MicroPatterns(implicit hermes: HermesConfig) extends FeatureQuery { * Joiner, since in effect, it joins together the sets of members of its parents. * * An empty class which implements one or more interfaces is also a Joiner. - * ''Here, empty means that the we can have constructors and (optionally) a serialVersionUID + * ''Here, empty means that we can have constructors and (optionally) a serialVersionUID * field.'' */ def isJoiner(cl: ClassFile): Boolean = { @@ -240,16 +240,13 @@ class MicroPatterns(implicit hermes: HermesConfig) extends FeatureQuery { } def isCobolLike(cl: ClassFile): Boolean = { - !cl.methods.exists { m => !isInitMethod(m) } && cl.methods.count { m => - !isInitMethod(m) && - m.isStatic - } == 1 && - !cl.fields.exists { f => !f.isStatic } && cl.fields.exists(f => f.isStatic) + cl.methods.forall(m => isInitMethod(m)) && cl.methods.count(m => !isInitMethod(m) && m.isStatic) == 1 && + cl.fields.nonEmpty && cl.fields.forall(f => f.isStatic) } def isStateless(cl: ClassFile): Boolean = { !cl.isInterfaceDeclaration && !cl.isAbstract && - !cl.fields.exists { f => !(f.isFinal && f.isStatic) } && + cl.fields.forall(f => f.isFinal && f.isStatic) && cl.methods.count(m => !isInitMethod(m) && !isObjectMethod(m)) > 1 } diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/RecursiveDataStructures.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/RecursiveDataStructures.scala index 72f9d0d7f0..f520ab958e 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/RecursiveDataStructures.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/RecursiveDataStructures.scala @@ -40,7 +40,7 @@ class RecursiveDataStructures(implicit hermes: HermesConfig) extends FeatureQuer // 1. create graph for { classFile <- project.allProjectClassFiles - if !isInterrupted() + if !isInterrupted classType = classFile.thisType field <- classFile.fields fieldType = field.fieldType @@ -58,7 +58,7 @@ class RecursiveDataStructures(implicit hermes: HermesConfig) extends FeatureQuer // 2. search for strongly connected components for { scc <- g.sccs(filterSingletons = true) - if !isInterrupted() + if !isInterrupted /* An scc is never empty! */ sccCategory = Math.min(scc.size, 5) - 1 classTypeID <- scc diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/TrivialReflectionUsage.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/TrivialReflectionUsage.scala index c75077fc5b..e5b78bb799 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/TrivialReflectionUsage.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/TrivialReflectionUsage.scala @@ -40,7 +40,7 @@ class TrivialReflectionUsage(implicit hermes: HermesConfig) extends FeatureQuery val trivialLocations = new LocationsContainer[S] val nontrivialLocations = new LocationsContainer[S] - project.parForeachMethodWithBody(isInterrupted = () => this.isInterrupted()) { mi => + project.parForeachMethodWithBody(isInterrupted = () => this.isInterrupted) { mi => val MethodInfo(source, m @ MethodWithBody(body)) = mi: @unchecked val classForNameCalls = body.collect({ case i @ INVOKESTATIC(Class, false, "forName", ForName1MD | ForName3MD) => i @@ -53,7 +53,7 @@ class TrivialReflectionUsage(implicit hermes: HermesConfig) extends FeatureQuery instruction = pcAndInstruction.value pc = pcAndInstruction.pc classNameParameterIndex = instruction.parametersCount - 1 - operands = aiResult.operandsArray(pc) // if i is dead... opeands is null + operands = aiResult.operandsArray(pc) // if i is dead... operands is null if operands ne null classNameParameter = operands(classNameParameterIndex) } { @@ -64,7 +64,7 @@ class TrivialReflectionUsage(implicit hermes: HermesConfig) extends FeatureQuery val classNames = classNameParameters.collect { case aiResult.domain.StringValue(className) => className } - // check if we have a concrete string in all cases.. + // check if we have a concrete string in all cases... val locations = if (classNames.size == classNameParameters.size) { trivialLocations } else { diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Classloading.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Classloading.scala index 83efb18b26..c5c126b2c1 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Classloading.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Classloading.scala @@ -67,7 +67,7 @@ class Classloading(implicit hermes: HermesConfig) extends DefaultFeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) case method @ MethodWithBody(body) <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/JVMCalls.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/JVMCalls.scala index 506e429282..e94e81d5f3 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/JVMCalls.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/JVMCalls.scala @@ -54,7 +54,7 @@ class JVMCalls(implicit hermes: HermesConfig) extends DefaultFeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) method <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8InterfaceMethods.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8InterfaceMethods.scala index 0802c34416..05f34d93d1 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8InterfaceMethods.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8InterfaceMethods.scala @@ -33,7 +33,7 @@ class Java8InterfaceMethods(implicit hermes: HermesConfig) extends DefaultFeatur Seq( /* IDM = interface default method */ "J8DIM1", /* 0 --- call on interface which must be resolved to an IDM */ "J8DIM2", /* 1 --- call on interface (with IDM) that must not be resolved to it */ - "J8DIM3", /* 2 --- call on class which transitively calls an method that potentially could target an IDM */ + "J8DIM3", /* 2 --- call on class which transitively calls a method that potentially could target an IDM */ "J8DIM4", /* 3 --- call on class type which must be resolved to an IDM */ "J8DIM5", /* 4 --- call that's dispatched to IDM where the class inherits from multiple interfaces with that idm (sig. wise) */ "J8SIM1", /* 5 --- call to static interface method */ @@ -50,7 +50,7 @@ class Java8InterfaceMethods(implicit hermes: HermesConfig) extends DefaultFeatur for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) callerType = classFile.thisType case method @ MethodWithBody(body) <- classFile.methods diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8Invokedynamics.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8Invokedynamics.scala index 3d07bae524..0cb7d45c58 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8Invokedynamics.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Java8Invokedynamics.scala @@ -29,7 +29,7 @@ import org.opalj.br.instructions.INVOKEDYNAMIC /** * This feature query corresponds to the Java8Invokedynamics.md test cases from the JCG call - * graph test suite as well as some infrastructure incompatabile tests pertaining to JVM-hosted + * graph test suite as well as some infrastructure incompatible tests pertaining to JVM-hosted * languages that also use invokedynamics or Java 10 invokedynamics that are used to concatenate * Strings. * diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Library.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Library.scala index 8583a23b11..9fafba7e54 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Library.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Library.scala @@ -35,7 +35,7 @@ class Library(implicit hermes: HermesConfig) extends DefaultFeatureQuery { override def featureIDs: Seq[String] = { Seq( // CBS = call-by-signature "LIB1", /* 0 --- parameter of library entry points must be resolved to any subtype */ - "LIB2", /* 1 --- calls on publically writeable fields must resolved to any subtype */ + "LIB2", /* 1 --- calls on publicly writeable fields must be resolved to any subtype */ "LIB3", /* 2 --- cbs with public classes only. */ "LIB4", /* 3 --- cbs with an internal class */ "LIB5" /* 4 --- cbs with an internal class that has subclasses */ @@ -55,7 +55,7 @@ class Library(implicit hermes: HermesConfig) extends DefaultFeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) fieldTypes = classFile.fields.filter(f => f.isNotFinal && !f.isPrivate).collect { case f: Field if f.fieldType.id >= 0 => f.fieldType.id diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode1.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode1.scala index 95fcb4a0a7..1ba50a36fe 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode1.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode1.scala @@ -35,7 +35,7 @@ class NonJavaBytecode1(implicit hermes: HermesConfig) extends DefaultFeatureQuer for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) case method @ MethodWithBody(body) <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode2.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode2.scala index 8f4cd941fa..812d91747d 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode2.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonJavaBytecode2.scala @@ -32,7 +32,7 @@ class NonJavaBytecode2(implicit hermes: HermesConfig) extends DefaultFeatureQuer for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) } { val methodMap = mutable.Map.empty[String, Int] diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonVirtualCalls.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonVirtualCalls.scala index a103b1988f..97b1eb55d2 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonVirtualCalls.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/NonVirtualCalls.scala @@ -44,7 +44,7 @@ class NonVirtualCalls(implicit hermes: HermesConfig) extends DefaultFeatureQuery for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) case method @ MethodWithBody(body) <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/PackageBoundaries.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/PackageBoundaries.scala index a06db6e235..a87ed51f94 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/PackageBoundaries.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/PackageBoundaries.scala @@ -17,7 +17,7 @@ import org.opalj.da.ClassFile /** * Groups test case features that perform a polymorphic method calls over package boundaries. This is - * particulary relevant for package visible types and/or package visible methods. + * particularly relevant for package visible types and/or package visible methods. * * @note The features represent the __PackageBoundaries__ test cases from the Call Graph Test Project (JCG). * @@ -41,7 +41,7 @@ class PackageBoundaries(implicit hermes: HermesConfig) extends DefaultFeatureQue for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) callerType = classFile.thisType callerPackage = callerType.packageName @@ -84,11 +84,11 @@ class PackageBoundaries(implicit hermes: HermesConfig) extends DefaultFeatureQue } ) { instructionsLocations(1) += l - /* it exists a subtype `S` within the same package as the declared typed `D` + /* there exists a subtype `S` within the same package as the declared typed `D` that inherits transitively from type `D`, such that `S` <: `S'` <: `D` where `S'` overrides the package private method `D.m` */ } else { - // it exists an target in another package that overrides the method + // there exists a target in another package that overrides the method instructionsLocations(0) += l } } @@ -107,7 +107,7 @@ class PackageBoundaries(implicit hermes: HermesConfig) extends DefaultFeatureQue ) = { project.classHierarchy.existsSubclass(rtCt, project) { sct => (sct.thisType.packageName ne callerPackage) && - sct.findMethod(name, methodDescriptor).map(_.isPackagePrivate).getOrElse(false) + sct.findMethod(name, methodDescriptor).exists(_.isPackagePrivate) } } diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Reflection.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Reflection.scala index 88c23e1c35..9ec9b3c677 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Reflection.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Reflection.scala @@ -94,7 +94,7 @@ class Reflection(implicit hermes: HermesConfig) extends DefaultFeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) case method @ MethodWithBody(body) <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) @@ -156,13 +156,13 @@ class Reflection(implicit hermes: HermesConfig) extends DefaultFeatureQuery { case "newInstance" => locations(5 /* Class.newInstance */ ) += l case "getDeclaredField" => if (stmt.astID == Assignment.ASTID && - getFieldUsedForInvokation(index, stmt.asAssignment) + getFieldUsedForInvocation(index, stmt.asAssignment) ) { handleParameterSources(call, l) } case "getField" => if (stmt.astID == Assignment.ASTID && - getFieldUsedForInvokation(index, stmt.asAssignment) + getFieldUsedForInvocation(index, stmt.asAssignment) ) { locations(7 /* getField */ ) += l handleParameterSources(call, l) @@ -398,7 +398,7 @@ class Reflection(implicit hermes: HermesConfig) extends DefaultFeatureQuery { } } - def getFieldUsedForInvokation[S]( + def getFieldUsedForInvocation[S]( pc: Int, stmt: Assignment[V] )( diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Serialization.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Serialization.scala index d326d78c6b..f8e7bedddc 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Serialization.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Serialization.scala @@ -100,7 +100,7 @@ class Serialization(implicit hermes: HermesConfig) extends DefaultFeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) case method @ MethodWithBody(body) <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/StaticInitializer.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/StaticInitializer.scala index d53ec93515..3fdddedd20 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/StaticInitializer.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/StaticInitializer.scala @@ -51,7 +51,7 @@ class StaticInitializer(implicit hermes: HermesConfig) extends DefaultFeatureQue for { (classFile, source) <- project.projectClassFilesWithSources if classFile.staticInitializer.isDefined - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) } { val hasStaticField = classFile.fields.exists(_.isStatic) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Types.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Types.scala index b2b734df9d..d8e8fe3986 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Types.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/Types.scala @@ -34,11 +34,11 @@ class Types(implicit hermes: HermesConfig) extends DefaultFeatureQuery { override def featureIDs: Seq[String] = { Seq( "TC1", /* 0 --- checkcast (instr.) */ - "TC2", /* 1 --- virutal invocation of java.lang.Class.cast that's not followed by a checkcast instr. */ + "TC2", /* 1 --- virtual invocation of java.lang.Class.cast that's not followed by a checkcast instr. */ "TC3", /* 2 --- equality check between two objects of type java.lang.Class */ "TC4", /* 3 --- instanceof (instr.) */ - "TC5", /* 4 --- virutal invocation of java.lang.Class.isInstance */ - "TC6" /* 5 --- virutal invocation of java.lang.Class.isAssignableFrom */ + "TC5", /* 4 --- virtual invocation of java.lang.Class.isInstance */ + "TC6" /* 5 --- virtual invocation of java.lang.Class.isAssignableFrom */ ) } @@ -52,7 +52,7 @@ class Types(implicit hermes: HermesConfig) extends DefaultFeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) case method @ MethodWithBody(body) <- classFile.methods methodLocation = MethodLocation(classFileLocation, method) diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/VirtualCalls.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/VirtualCalls.scala index 6fefa4b1a4..9e79a41573 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/VirtualCalls.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/jcg/VirtualCalls.scala @@ -15,7 +15,7 @@ import org.opalj.br.instructions.VirtualMethodInvocationInstruction import org.opalj.da.ClassFile /** - * Groups test case features that perform a pre Java 8 polymorhpic method call. + * Groups test case features that perform a pre Java 8 polymorphic method call. * * @note The features represent the __PolymorphicCalls__ test cases from the Call Graph Test Project (JCG). * @@ -41,7 +41,7 @@ class VirtualCalls(implicit hermes: HermesConfig) extends DefaultFeatureQuery { for { (classFile, source) <- project.projectClassFilesWithSources - if !isInterrupted() + if !isInterrupted classFileLocation = ClassFileLocation(source, classFile) callerType = classFile.thisType case method @ MethodWithBody(body) <- classFile.methods @@ -57,7 +57,7 @@ class VirtualCalls(implicit hermes: HermesConfig) extends DefaultFeatureQuery { val l = InstructionLocation(methodLocation, pc) val kindID = invokeKind.opcode match { - case INVOKEVIRTUAL.opcode => { + case INVOKEVIRTUAL.opcode => val targets = project.virtualCall(callerType, invokeKind.asInstanceOf[INVOKEVIRTUAL]) targets.size match { @@ -65,8 +65,7 @@ class VirtualCalls(implicit hermes: HermesConfig) extends DefaultFeatureQuery { case 1 => 0 /* single target cs */ case _ => 1 /* multiple target cs*/ } - } - case INVOKEINTERFACE.opcode => { + case INVOKEINTERFACE.opcode => val targets = project.interfaceCall(callerType, invokeKind.asInstanceOf[INVOKEINTERFACE]) targets.size match { @@ -74,7 +73,6 @@ class VirtualCalls(implicit hermes: HermesConfig) extends DefaultFeatureQuery { case 1 => 2 /* single target cs */ case _ => 3 /* multiple target cs*/ } - } } if (kindID >= 0) { diff --git a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/util/APIFeatureQuery.scala b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/util/APIFeatureQuery.scala index 14cbf5a3ec..647209987a 100644 --- a/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/util/APIFeatureQuery.scala +++ b/TOOLS/hermes/src/main/scala/org/opalj/hermes/queries/util/APIFeatureQuery.scala @@ -109,7 +109,7 @@ abstract class APIFeatureQuery(implicit hermes: HermesConfig) extends FeatureQue for { cf <- project.allProjectClassFiles - if !isInterrupted() + if !isInterrupted source <- project.source(cf) case m @ MethodWithBody(code) <- cf.methods pcAndInvocation <- code.collect({ case mii: MethodInvocationInstruction => mii }: PartialFunction[ diff --git a/build.sbt b/build.sbt index efa2c2a027..a02914da5a 100644 --- a/build.sbt +++ b/build.sbt @@ -510,7 +510,7 @@ lazy val `Demos` = (project in file("DEVELOPING_OPAL/demos")) lazy val ce = `ConfigurationExplorer` lazy val `ConfigurationExplorer` = (project in file("TOOLS/ce")) - .settings(buildSettings: _*) + .settings(buildSettings *) .settings( fork := true, javaOptions += s"-Dbuild.version=${version.value}", @@ -536,7 +536,7 @@ lazy val `ConfigurationExplorer` = (project in file("TOOLS/ce")) /* *************************************************************************** * - * TASKS, etc + * TASKS, etc. * */ diff --git a/local.sbt.template b/local.sbt.template index 9e73b44eb5..e7b1d46440 100644 --- a/local.sbt.template +++ b/local.sbt.template @@ -1,5 +1,5 @@ // -// Additional configuration __settings__ specific to each developers machine. +// Additional configuration __settings__ specific to each developer's machine. // Please note that you have to change scalac.options.local for changes to // the configuration of the scalac compiler. // @@ -8,7 +8,7 @@ // If your CPU uses hyperthreading, it is recommended to specify the // number of physical cores and the number of hyperthreaded cores; -// this will spead up the overall execution. +// this will speed up the overall execution. ThisBuild / javaOptions ++= Seq( "-Dorg.opalj.threads.CPUBoundTasks=4", // Number of physical (not hyperthreaded) cores/CPUs "-Dorg.opalj.threads.IOBoundTasks=12" // Number of (hyperthreaded) cores * 1,5 diff --git a/project/plugins.sbt b/project/plugins.sbt index 8739b40ffb..9e1d0ecf5f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ // We have centralized the configuration of all plug-ins here, to make this file easily -// useable by the dockerfile to configure the docker image used for building OPAL. +// usable by the dockerfile to configure the docker image used for building OPAL. resolvers += Resolver.url("scoverage-bintray", url("https://dl.bintray.com/sksamuel/sbt-plugins/"))( Resolver.ivyStylePatterns diff --git a/src/site/DeveloperTools.md b/src/site/DeveloperTools.md index 800728327e..dc8bab303c 100644 --- a/src/site/DeveloperTools.md +++ b/src/site/DeveloperTools.md @@ -2,7 +2,7 @@ OPAL comes with a large number of tools to analyze and visualize various aspects related to *Java Bytecode* projects. These tools can be used as is or can be embedded into other tools. Some of the tools require Graphviz to visualize graphs which depict control- and data-flow information. ## Running Tools which are part of the OPAL Suite -To use the tools, start `sbt`, change to the `project OPAL-DeveloperTools` project and call `run`. Afterwards, you'll see the list of tools which can be run. +To use the tools, start `sbt`, change to the `project OPAL-DeveloperTools` project and call `run`. Afterward, you'll see the list of tools which can be run. ## Java Bytecode Disassembler / Java Class File Finder OPAL has a built-in Java Bytecode Disassembler which is also made available as a [standalone tool](/artifacts/OPALDisassembler.jar) and also as plugins for the [ATOM](https://atom.io/) text editor and the [IntelliJ IDEA](https://www.jetbrains.com/idea/) and [VisualStudioCode](https://code.visualstudio.com/) IDEs. @@ -15,27 +15,27 @@ In contrast to most existing Java disassemblers, OPAL generates an HTML document
     Usage: java org.opalj.da.Disassembler
    -       [-help will print the help and terminate]
    -       [-o <File> the name of the file to which the generated html page should be written]
    -       [-open the generated html page will be opened in a browser]
    -       [-source <File> a class or jar file or a directory containing jar or class files;
    +       [-help will print the help and terminate]
    +       [-o <File> the name of the file to which the generated html page should be written]
    +       [-open the generated html page will be opened in a browser]
    +       [-source <File> a class or jar file or a directory containing jar or class files;
                          if no source files/folders are specified the current folder will be
    -                     searched for class files]* (can be specified multiple times)
    -       [-sourceJDK the current JDK/JRE is added as a source folder]
    -       [-noDefaultCSS the generated html page will have no CSS styling]
    -       [-noMethodsFilter the generated html page will have no embedded means to filter methods
    -                       (as a whole, the file will not contain any JavaScript code)]
    -       [-noHeader the generated output will have no header;
    +                     searched for class files]* (can be specified multiple times)
    +       [-sourceJDK the current JDK/JRE is added as a source folder]
    +       [-noDefaultCSS the generated html page will have no CSS styling]
    +       [-noMethodsFilter the generated html page will have no embedded means to filter methods
    +                       (as a whole, the file will not contain any JavaScript code)]
    +       [-noHeader the generated output will have no header;
                      the top level element will be <div class="class_file">...</div>
    -                 (automatically activates "-noMethodsFilter" and "-noDefaultCSS")]
    -       [-css <Source> the path (URL) of a CSS file (".csss")
    -                     which will be referenced from the generated HTML page]
    -       [-js <Source> the path (URL) of a JavaScript file (".js")
    -                    which will be referenced from the generated HTML page]
    -       [-showProgress shows the progress when searching for the class file]
    -       [<ClassName> name of the class for which we want to create the HTML page; if not
    +                 (automatically activates "-noMethodsFilter" and "-noDefaultCSS")]
    +       [-css <Source> the path (URL) of a CSS file (".csss")
    +                     which will be referenced from the generated HTML page]
    +       [-js <Source> the path (URL) of a JavaScript file (".js")
    +                    which will be referenced from the generated HTML page]
    +       [-showProgress shows the progress when searching for the class file]
    +       [<ClassName> name of the class for which we want to create the HTML page; if not
                        specified the first class that is found on the given path is taken; this
    -                   is particularly useful if the source identifies a particular ".class" file]
    +                   is particularly useful if the source identifies a particular ".class" file]
     
    Note, that the OPAL Disassembler is fast and can scan thousands of class files per second; this makes it also possible to use it to locate a certain class file. For example, if you want to find the jar which defines a specific class, e.g., `java.util.HashMap$Entry`, it is sufficient to specify the root folder of the JDK and let it automatically find the class for you. The generated HTML file will contain precise information where the class file was found. This also works if you specify the root of your `.ivy` or `.m2` folders. @@ -71,8 +71,8 @@ The [Java Bytecode Workbench](https://marketplace.visualstudio.com/items?itemNam If you are a developer of static analyses and suffered from the pain of having to support Invokedynamic (Java 7+) - in other words, Java lambda expressions and method references - then this is the tool for you! OPAL's project serializer rewrites Invokedynamic calls using plain-old standard Java bytecode instructions to facilitate the writing of static analyses! ___You no longer have to worry about Invokedynamics created by Java compilers.___ -Currently, we can rewrite Invokedynamics created by standard Java compilers and we are adding support to completely support Scala. Basically, OPAL replaces the Invokedynamic calls using Java's LambdaMetaFactory by a standard Invokestatic call which will create an instance of a newly created class (similar to what LambdaMetaFactory does). The object will encapsulate the relevant state used by the Lambda and implement the Lambda's functional interface. Later on, when the Lambda is evaluated the generated class will forward the call to the implementation method of the Lambda. The tool is currently in a beta version, but we already successfully rewrote JUnit 5 and were able to execute its entire test suite afterwards (originally over 3000 Invokedynamics). +Currently, we can rewrite Invokedynamics created by standard Java compilers and we are adding support to completely support Scala. Basically, OPAL replaces the Invokedynamic calls using Java's LambdaMetaFactory by a standard Invokestatic call which will create an instance of a newly created class (similar to what LambdaMetaFactory does). The object will encapsulate the relevant state used by the Lambda and implement the Lambda's functional interface. Later on, when the Lambda is evaluated the generated class will forward the call to the implementation method of the Lambda. The tool is currently in a beta version, but we already successfully rewrote JUnit 5 and were able to execute its entire test suite afterward (originally over 3000 Invokedynamics). OPAL's project serializer can be downloaded [here](/artifacts/OPALInvokedynamicRectifier.jar). -If you want to see it in action, just use OPAL's Invokedynamic rectifier to rewrite your project and study the code afterwards using our Bytecode Disassembler (see below). \ No newline at end of file +If you want to see it in action, just use OPAL's Invokedynamic rectifier to rewrite your project and study the code afterward using our Bytecode Disassembler (see below). \ No newline at end of file diff --git a/src/site/Hermes.md b/src/site/Hermes.md index 3ad6177db5..669408d4a1 100644 --- a/src/site/Hermes.md +++ b/src/site/Hermes.md @@ -110,7 +110,7 @@ The big advantage of registering all queries in the same place is that it is eas ## Starting Hermes -Hermes can be be started by specifying the json file which contains the configured projects that should be analysed. If you have checked out OPAL/Hermes from BitBucket you can use the `sbt` console to start Hermes (the main class is: `org.opalj.hermes.Hermes`). For example, to get an overview of the properties of some of the test projects which are part of OPAL, you can use the preconfigured project configuration: +Hermes can be started by specifying the json file which contains the configured projects that should be analysed. If you have checked out OPAL/Hermes from BitBucket you can use the `sbt` console to start Hermes (the main class is: `org.opalj.hermes.Hermes`). For example, to get an overview of the properties of some of the test projects which are part of OPAL, you can use the preconfigured project configuration: project OPAL-DeveloperTools ~runMain org.opalj.hermes.Hermes src/main/resources/hermes-test-fixtures.json diff --git a/src/site/Opium.md b/src/site/Opium.md index bdb33dafab..4a5723cd9d 100644 --- a/src/site/Opium.md +++ b/src/site/Opium.md @@ -11,7 +11,7 @@ Purity results for the JOlden benchmark are available [here](https://bitbucket.org/delors/opal/downloads/JOlden-Purity-Results.zip). ## Obtaining OPIUM -A version of OPIUM ready to to be executed can be downloaded +A version of OPIUM ready to be executed can be downloaded [here](https://bitbucket.org/delors/opal/downloads/OPIUM.jar). A current state of OPIUM can be obtained from diff --git a/src/site/Publications.md b/src/site/Publications.md index c483d9317e..8afaa2e8cf 100644 --- a/src/site/Publications.md +++ b/src/site/Publications.md @@ -1,6 +1,6 @@ # Publications -This page lists publications around OPAL, both [core contributions](#core-papers) to the framework as well as [further research](#research-using-opal) that uses OPAL. +This page lists publications around OPAL, both [core contributions](#core-papers) to the framework and [further research](#research-using-opal) that uses OPAL. There are also links to [related presentations](#related-presentations) below. ## Citing OPAL diff --git a/src/site/UsingOPAL.md b/src/site/UsingOPAL.md index 5bd1d2e031..8c1fb9d6c3 100644 --- a/src/site/UsingOPAL.md +++ b/src/site/UsingOPAL.md @@ -20,7 +20,7 @@ OPAL comes with a large number of code [snippets](https://bitbucket.org/snippets ## Sub Projects -OPAL consists of multiple sub projects and tools which are described in the following. +OPAL consists of multiple subprojects and tools which are described in the following. ### Framework Combines all of OPAL's subproject for ease of use. @@ -34,7 +34,7 @@ an implementation of Tarjan's algorithm for finding strongly connected component libraryDependencies += "de.opal-project" % "common_2.13" % "6.0.0" ### Static Analysis Framework -The static analysis framework is a generally useful framework for developing static analyses. The framework has wide ranging support for very different types of static analyses and automatically parallels their execution. The framework only depends on `Common` and can be flexibly combined with other static analyses frameworks (e.g., BCEL, SOOT, Wala, ASM,... ) +The static analysis framework is a generally useful framework for developing static analyses. The framework has wide-ranging support for very different types of static analyses and automatically parallels their execution. The framework only depends on `Common` and can be flexibly combined with other static analyses frameworks (e.g., BCEL, SOOT, Wala, ASM,... ) libraryDependencies += "de.opal-project" % "static-analysis-infrastructure_2.13" % "6.0.0" @@ -58,7 +58,7 @@ The abstract interpretation framework is a highly-customizable framework for the libraryDependencies += "de.opal-project" % "abstract-interpretation-framework_2.13" % "6.0.0" ### Three-Address Code -The three-address-code toolkit provides a more human readable representation of the bytecode that includes additional information derived by the abstract interpretation framework. +The three-address-code toolkit provides a more human-readable representation of the bytecode that includes additional information derived by the abstract interpretation framework. libraryDependencies += "de.opal-project" % "three-address-code_2.13" % "6.0.0" @@ -68,7 +68,7 @@ The architecture validation framework facilitates the development of tools for s libraryDependencies += "de.opal-project" % "architecture-validation_2.13" % "6.0.0" ### APK -Provides support for the analyis of APKs, with automatic conversion from dalvik to java byte code. +Provides support for the analysis of APKs, with automatic conversion from dalvik to java byte code. libraryDependencies += "de.opal-project" % "apk_2.13" % "6.0.0" diff --git a/src/site/artifacts/DeadMethods_JDK7u80/caseStudyCPA.html b/src/site/artifacts/DeadMethods_JDK7u80/caseStudyCPA.html index 66bbf79acf..c1322e842d 100755 --- a/src/site/artifacts/DeadMethods_JDK7u80/caseStudyCPA.html +++ b/src/site/artifacts/DeadMethods_JDK7u80/caseStudyCPA.html @@ -29,8 +29,8 @@ e.target.documentElement.classList.add("noDetails"); var parameters = document.querySelector("details#analysis_parameters_summary"); parameters.setAttribute("open",""); - var summarys = document.querySelectorAll("details summary"); - summarys.forEach(function(e) { + var summaries = document.querySelectorAll("details summary"); + summaries.forEach(function(e) { e.addEventListener("click", toggleDetailsOpen); }); } @@ -154,7 +154,7 @@ */ update: function () { if (!init) { - log("[IssueFilter] Update cancelled. IssueFilter not yet initialzed!", + log("[IssueFilter] Update cancelled. IssueFilter not yet initialized!", debug_WARNING); return; } diff --git a/src/site/artifacts/DeadMethods_JDK7u80/caseStudyNaive.html b/src/site/artifacts/DeadMethods_JDK7u80/caseStudyNaive.html index 4c780a8fd9..543a1b04c7 100755 --- a/src/site/artifacts/DeadMethods_JDK7u80/caseStudyNaive.html +++ b/src/site/artifacts/DeadMethods_JDK7u80/caseStudyNaive.html @@ -30,8 +30,8 @@ e.target.documentElement.classList.add("noDetails"); var parameters = document.querySelector("details#analysis_parameters_summary"); parameters.setAttribute("open",""); - var summarys = document.querySelectorAll("details summary"); - summarys.forEach(function(e) { + var summaries = document.querySelectorAll("details summary"); + summaries.forEach(function(e) { e.addEventListener("click", toggleDetailsOpen); }); } diff --git a/src/site/artifacts/DeadMethods_JDK7u80/caseStudyOPA.html b/src/site/artifacts/DeadMethods_JDK7u80/caseStudyOPA.html index 21179fc592..6f25bd3ce5 100755 --- a/src/site/artifacts/DeadMethods_JDK7u80/caseStudyOPA.html +++ b/src/site/artifacts/DeadMethods_JDK7u80/caseStudyOPA.html @@ -30,8 +30,8 @@ e.target.documentElement.classList.add("noDetails"); var parameters = document.querySelector("details#analysis_parameters_summary"); parameters.setAttribute("open",""); - var summarys = document.querySelectorAll("details summary"); - summarys.forEach(function(e) { + var summaries = document.querySelectorAll("details summary"); + summaries.forEach(function(e) { e.addEventListener("click", toggleDetailsOpen); }); } diff --git a/src/site/artifacts/DeadMethods_JDK7u80/caseStudy_manuallyCheckedSamples.txt b/src/site/artifacts/DeadMethods_JDK7u80/caseStudy_manuallyCheckedSamples.txt index ad746501c8..0d8f410d9a 100755 --- a/src/site/artifacts/DeadMethods_JDK7u80/caseStudy_manuallyCheckedSamples.txt +++ b/src/site/artifacts/DeadMethods_JDK7u80/caseStudy_manuallyCheckedSamples.txt @@ -13,10 +13,10 @@ id correct class method 9 x java.lang.invoke.BoundMethodHandle final double argD (int) 10 x java.lang.AbstractStringBuilder append ( Object ) 11 x java.beans.EventSetDescriptor (EventSetDescriptor) -12 x javax.managmement.BinaryOpValueExp public int getOperator() -13 x javax.xml.crypto.dsigTransformService$MachanismMapEntry public boolean equals(Object) +12 x javax.management.BinaryOpValueExp public int getOperator() +13 x javax.xml.crypto.dsigTransformService$MechanismMapEntry public boolean equals(Object) 14 x java.util.regex.Pattern private int readEscape() -15 x javax.swing.text.rtf.MockAtrributeSet public boolean isEmpty() +15 x javax.swing.text.rtf.MockAttributeSet public boolean isEmpty() 16 x java.awt.geom.GeneralPath (int, byte[], int, float[], int) // comments hint to native, but we found no evidence. 17 x java.security.AccessControlContext boolean isPrivileged() 18 x java.net.Inet6Address int deriveNumericScope ( String ) diff --git a/src/site/defaultTemplate.scala.html b/src/site/defaultTemplate.scala.html index 439be5f116..95c0912de1 100644 --- a/src/site/defaultTemplate.scala.html +++ b/src/site/defaultTemplate.scala.html @@ -77,7 +77,7 @@

    Related

    Supported By

      -

    • +

    • YourKit supports open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler an innovative and intelligent tool for profiling Java applications. diff --git a/src/site/examples/BytecodeEngineering.md b/src/site/examples/BytecodeEngineering.md index fa2341b049..61be3cbe85 100644 --- a/src/site/examples/BytecodeEngineering.md +++ b/src/site/examples/BytecodeEngineering.md @@ -91,7 +91,7 @@ Jump targets are specified using labels directly before the instruction which is ) ) -> Making the control-flow graph explicit is possible using the CFGFactory to create the CFG and to then to transform it to an SVG. +> Making the control-flow graph explicit is possible using the CFGFactory to create the CFG and then transforming it to an SVG. > > val (br,_) = cb.toBR > val cfg = org.opalj.br.cfg.CFGFactory(br.methods.tail.head.body.get) @@ -190,7 +190,7 @@ The DSL interacts seamlessly with the bytecode representation and all attibutes Instead of creating a `ClassFile` using the eDSL it is also possible to directly create the bytecode using the default representation. Every `br.ClassFile` can be converted to a `daClassFile` using `org.opalj.ba.toDA()` and can then be serialized as shown above. -## Creating Class Files Using the Bare Bones Representation +## Creating Class Files Using the Bare-bones Representation ### Basics @@ -252,4 +252,4 @@ Defining an interface with a (Java 8) default method which calls another static println("Created class file: "+Files.write(assembledMyIntfPath, assembledMyIntf).toAbsolutePath) ### Summary -Using this representation is primarily useful for performing simple method and field filterings of existing class files, or for performing simple operations at the method instructions level. Complex transformations or even the creation of new class files requires explicit management/extension of the constant pool and writing the bare bone instructions array. In such cases, using OPAL's default representation – as described next – is highly recommend. +Using this representation is primarily useful for performing simple method and field filterings of existing class files, or for performing simple operations at the method instructions level. Complex transformations or even the creation of new class files requires explicit management/extension of the constant pool and writing the bare-bones instructions array. In such cases, using OPAL's default representation – as described next – is highly recommend. diff --git a/src/site/examples/ClassHierarchy.md b/src/site/examples/ClassHierarchy.md index c62e795b3c..47632b7fbb 100644 --- a/src/site/examples/ClassHierarchy.md +++ b/src/site/examples/ClassHierarchy.md @@ -1,18 +1,18 @@ # Querying the Class Hierarchy -One of the most common tasks when implementing static analyses is to get information about the inheritance relation between different classes, to traverse all super/sub classes/interfaces or to compute the least upper bound given some classes. Support for answering such questions or for processing a project's class hierarchy is directly provided by OPAL's `org.opalj.br.ClassHierarchy`. The easiest way to get the class hierarchy is to first instantiate a project and then ask the project for the class hierarchy. +One of the most common tasks when implementing static analyses is to get information about the inheritance relation between different classes, to traverse all super/sub-classes/interfaces or to compute the least upper bound given some classes. Support for answering such questions or for processing a project's class hierarchy is directly provided by OPAL's `org.opalj.br.ClassHierarchy`. The easiest way to get the class hierarchy is to first instantiate a project and then ask the project for the class hierarchy. import org.opalj.br._ ; import org.opalj.br.analyses._ ; import java.io.File val projectJAR = "./OPAL/bi/target/scala-2.13/resource_managed/test/method_types.jar" implicit val p = Project(new File(projectJAR),org.opalj.bytecode.RTJar) val classHierarchy = p.classHierarchy -The class hierarchy, e.g., directly makes the information about a type's super/sub types available: +The class hierarchy, e.g., directly makes the information about a type's super/sub-types available: def subtypeInformation(ClassType) : SubtypeInformation def supertypeInformation(ClassType) : SupertypeInformation -To get, e.g., all subtypes of `java.io.Serializable`, it is sufficient to query the subtypes information: +To get, e.g., all subtypes of `java.io.Serializable`, it is sufficient to query the subtype information: val subtypesOfSerializable = classHierarchy.subtypeInformation(ClassType("java/io/Serializable")) diff --git a/src/site/examples/ReadingClassFiles.md b/src/site/examples/ReadingClassFiles.md index fad145cbce..fdab07ba9e 100644 --- a/src/site/examples/ReadingClassFiles.md +++ b/src/site/examples/ReadingClassFiles.md @@ -8,7 +8,7 @@ OPAL provides multiple different representations for Java class files to support ## Bare Bones 1:1 Representation of Java Class Files - A bit by bit representation is provided by the bytecode disassembler sub project. In this representation, the constant pool is kept and all other elements (e.g., names of classes, methods and fields, but also constant values etc.) use `int` based references to the constant pool to refer to the respective values. A single class file can trivially be loaded using: + A bit by bit representation is provided by the bytecode disassembler subproject. In this representation, the constant pool is kept and all other elements (e.g., names of classes, methods and fields, but also constant values etc.) use `int` based references to the constant pool to refer to the respective values. A single class file can trivially be loaded using: import java.io.{DataInputStream, FileInputStream} import org.opalj.io.process @@ -26,7 +26,7 @@ Using this representation is very, very fast and makes it, e.g., easily possibl ## Object-Oriented Representation of Java Class Files -In most cases, an explicit representation of the constant pool actually complicates the implementation of static analyses. To avoid that you have to deal with the constant pool, OPAL provides a standard object oriented representation that suits many needs. This representation is still stack based and, therefore, the operand stack is still present. It, nevertheless, often strikes a nice balance between performance, memory usage and convenience and, therefore, many analyses that are part of OPAL use this representation. In general, a list of class files is returned to support class file transformations while the class file is loaded. For example – if configured – `invokedynamic` instructions, which are, e.g., created by Java compilers when closures are used in Java code, will automatically be transformed to standard (*pre Java 7*) classes and method calls to faciliate subsequent analyses. In this case, a class is generated that will capture the closure's call state and the `invokedynamic` instruction will be replaced by a call to the generated class' factory method; this class serves a similar purpose as the *call-site* object that would be created by the JVM at runtime. +In most cases, an explicit representation of the constant pool actually complicates the implementation of static analyses. To avoid that you have to deal with the constant pool, OPAL provides a standard object-oriented representation that suits many needs. This representation is still stack based and, therefore, the operand stack is still present. It, nevertheless, often strikes a nice balance between performance, memory usage and convenience and, therefore, many analyses that are part of OPAL use this representation. In general, a list of class files is returned to support class file transformations while the class file is loaded. For example – if configured – `invokedynamic` instructions, which are, e.g., created by Java compilers when closures are used in Java code, will automatically be transformed to standard (*pre Java 7*) classes and method calls to facilitate subsequent analyses. In this case, a class is generated that will capture the closure's call state and the `invokedynamic` instruction will be replaced by a call to the generated class' factory method; this class serves a similar purpose as the *call-site* object that would be created by the JVM at runtime. import java.io.{DataInputStream, FileInputStream} import org.opalj.io.process @@ -41,4 +41,4 @@ In most cases, an explicit representation of the constant pool actually complica Instead of reading the class files on your own, it is also possible to directly create a `Project` which also directly makes the class hierarchy available and offers many methods related to resolving method calls and the like. A `Project` is usually at the core of implementing static analyses on top of OPAL. To read more about it go [here](Projects.html). ### 3-Address Code Representation -On top/based on the object oriented representation OPAL provides a third representation based on 3-address code/quadruples in single static assignment (SSA) form. This representation is directly made available by a `Project` on-demand. To read more about it go [here](TAC.html). +On top/based on the object-oriented representation OPAL provides a third representation based on 3-address code/quadruples in single static assignment (SSA) form. This representation is directly made available by a `Project` on-demand. To read more about it go [here](TAC.html). diff --git a/src/site/examples/TAC.md b/src/site/examples/TAC.md index 5438bb5053..0890cbcb4e 100644 --- a/src/site/examples/TAC.md +++ b/src/site/examples/TAC.md @@ -1,5 +1,5 @@ # 3-Address Code / Quadruples Code / Static Single Assignment Form -OPAL enables you to transform Java bytecode into a 3-address code (TAC) which is also sometimes called "Quadruples Code". The standard representation provided by OPAL is always in SSA form and is created after performing a low-level, highly configurable data-flow analysis; based on the configured low-level analysis, the amount of additional information about the program's values may differ greatly. In the simplest case, only basic type information is provided. In more advanced cases, constant computations are perfomed, constants are propagated, must-alias information is provided, dead paths due to programming errors/context-dependent impossible paths are automatically pruned, and so on. In all cases the 3-address code (in the following called **TAC**) immediately provides complete def-use information and the control-flow graph is also reified. +OPAL enables you to transform Java bytecode into a 3-address code (TAC) which is also sometimes called "Quadruples Code". The standard representation provided by OPAL is always in SSA form and is created after performing a low-level, highly configurable data-flow analysis; based on the configured low-level analysis, the amount of additional information about the program's values may differ greatly. In the simplest case, only basic type information is provided. In more advanced cases, constant computations are performed, constants are propagated, must-alias information is provided, dead paths due to programming errors/context-dependent impossible paths are automatically pruned, and so on. In all cases the 3-address code (in the following called **TAC**) immediately provides complete def-use information and the control-flow graph is also reified. ## Using the 3-Address Code (TAC) @@ -124,9 +124,9 @@ In this case the initial three-address code will be: 7:/*pc=21:*/ goto 5 } -In the above example, the `static` method `endless` defines, e.g., a [parameter](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.TACMethodParameter) which is immediately used by the first statement with index 0 (`useSites`); the parameter it not used any further - `useSites` for `param1` only contains one value. Def/use information is always directly available at a local-variable initialization ([`DVar`](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.DVar)) or usage site ([`UVar`](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.UVar)). +In the above example, the `static` method `endless` defines, e.g., a [parameter](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.TACMethodParameter) which is immediately used by the first statement with index 0 (`useSites`); the parameter is not used any further - `useSites` for `param1` only contains one value. Def/use information is always directly available at a local-variable initialization ([`DVar`](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.DVar)) or usage site ([`UVar`](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.UVar)). -Parameters of methods always get origins in the range `[-2-method.parametersCount..-2]`. This way a trivial check (`-512 < origin < 0`) is sufficient to determine that a [parameter](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.TACMethodParameter) is used. Furthermore, the `origin -1` is reserved for `this`; if the method is an instance method. For example, a method with the parameters `(Object o, int i, double d, Float[] fs)` will have the origins: `o -> -2`, `i -> -3`, `d -> -4` and `fs -> -5` independent of the method being static or not. By mapping the explicitly declared parameters as described, an analysis can handle static and instance methods similarily. +Parameters of methods always get origins in the range `[-2-method.parametersCount..-2]`. This way a trivial check (`-512 < origin < 0`) is sufficient to determine that a [parameter](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.TACMethodParameter) is used. Furthermore, the `origin -1` is reserved for `this`; if the method is an instance method. For example, a method with the parameters `(Object o, int i, double d, Float[] fs)` will have the origins: `o -> -2`, `i -> -3`, `d -> -4` and `fs -> -5` independent of the method being static or not. By mapping the explicitly declared parameters as described, an analysis can handle static and instance methods similarly. Furthermore, given that the def-use information is explicitly reified, the information that the receiver object of the `println` [call](https://www.opal-project.de/library/api/SNAPSHOT/#org.opalj.tac.MethodCall) (statement 6) is either `lv1` or `lv3`, i.e., `System.out` or `System.err`, is directly available. @@ -177,7 +177,7 @@ Given the method's three-address code, we can now get the definition sites and t val returnStmts = code.cfg.normalReturnNode.predecessors.iterator.map(bb => code.stmts(bb.asBasicBlock.endPC)) -2) Use simple pattern matching to get the defintion sites and the value information. +2) Use simple pattern matching to get the definition sites and the value information. for { tac.ReturnValue(pc,tac.UVar(v,defSites)) <- returnStmts} { println(defSites.mkString(", ") + " => "+ v.asDomainReferenceValue) diff --git a/src/site/examples/WritingAnalyses.md b/src/site/examples/WritingAnalyses.md index 027b4532da..a2872a9d78 100644 --- a/src/site/examples/WritingAnalyses.md +++ b/src/site/examples/WritingAnalyses.md @@ -1,3 +1,3 @@ # Writing Analyses -Writing new analyses is often relatively straight-forward. To see a number of examples, just take a look at the Demos sub project. Addtionally, you can find a growing number of small code snippets (which are directly executable) at [OPAL Code Snippets](https://bitbucket.org/snippets/delors/) +Writing new analyses is often relatively straight-forward. To see a number of examples, just take a look at the Demos subproject. Additionally, you can find a growing number of small code snippets (which are directly executable) at [OPAL Code Snippets](https://bitbucket.org/snippets/delors/) diff --git a/src/site/index.md b/src/site/index.md index 60a5b52c66..012f724000 100644 --- a/src/site/index.md +++ b/src/site/index.md @@ -1,6 +1,6 @@ # OPAL -OPAL is a next-generation, highly configurable and scalable static analysis platform that supports developers in systematically chosing the best tradeoffs between precision, soundness and performance of static analyses. +OPAL is a next-generation, highly configurable and scalable static analysis platform that supports developers in systematically choosing the best tradeoffs between precision, soundness and performance of static analyses. It does so by hosting a wide and extensible collection of modular analyses modules that can be automatically composed in a case-by-case manner to collaboratively reason about a particular software at hand. OPAL manages the execution of analysis modules and adjusts it as needed for scalability.
      diff --git a/src/site/tutorial/CollaborativeAnalyses.md b/src/site/tutorial/CollaborativeAnalyses.md index cf2b78e2f9..f6f023d75c 100644 --- a/src/site/tutorial/CollaborativeAnalyses.md +++ b/src/site/tutorial/CollaborativeAnalyses.md @@ -112,7 +112,7 @@ We use a [`PartialResult`](/library/api/SNAPSHOT/org/opalj/fpcf/NoResult.html) h The partial result takes the entity (we use `project` here, since the set of instantiated classes is global to the whole program that is analyzed) and the key of the property that we compute. Finally, it takes a function that will get the current value of that property and computes an update to it. To do so, we check whether there already is a property present and extract its upper bound. -If that upper bound already contains our class, we return `None` to signal that no update is necessary, otherwise we create an updated result, which is an [`InterimEUBP`](/library/api/SNAPSHOT/org/opalj/fpcf/InterimEUBP.html), i.e., a not yet final result consisting of an entity (E; `project`) and and upper bound (UB) for its property (P), which is the old set of instantiated classes extended by the class type of the analyzed constructor. +If that upper bound already contains our class, we return `None` to signal that no update is necessary, otherwise we create an updated result, which is an [`InterimEUBP`](/library/api/SNAPSHOT/org/opalj/fpcf/InterimEUBP.html), i.e., a not yet final result consisting of an entity (E; `project`) and an upper bound (UB) for its property (P), which is the old set of instantiated classes extended by the class type of the analyzed constructor. If, on the other hand, no property has been computed so far, the update function will be called with an [`EPK`](/library/api/SNAPSHOT/org/opalj/fpcf/EPK.html), i.e., a tuple of the entity and the key of the property. In that case, we return property that contains just the class type of the analyzed constructor. diff --git a/src/site/tutorial/FixedPointAnalyses.md b/src/site/tutorial/FixedPointAnalyses.md index 18a01dade7..c25b2d9d00 100644 --- a/src/site/tutorial/FixedPointAnalyses.md +++ b/src/site/tutorial/FixedPointAnalyses.md @@ -109,7 +109,7 @@ def analyzeClassImmutability(classFile: ClassFile): ProperPropertyComputationRes } ``` We need to keep track of the information we already have about the immutability of our class, and as we are implementing an optimistic analysis, we initially assume it might be transitively immutable. -Additionally, we will need to keep track of some dependencies. Dependecies are of type [`EOptionP`](/library/api/SNAPSHOT/org/opalj/fpcf/EOptionP.html), i.e., a pair of some entity with, optionally, some property that entity has. +Additionally, we will need to keep track of some dependencies. Dependencies are of type [`EOptionP`](/library/api/SNAPSHOT/org/opalj/fpcf/EOptionP.html), i.e., a pair of some entity with, optionally, some property that entity has. We store them in a map with the entity as the key in order to be able to access them easily. Now it is time to gather the information we need. @@ -165,7 +165,7 @@ Checking whether the superclass is `java.lang.Object` not only allows us to skip Next, from the type, we try to retrieve the actual classfile from the analyzed project. It may be the case that the classfile for the superclass is not part of the analyzed project and thus, we get no result here. In that case, we soundly assume that it is mutable and can thus end our analysis here early, returning that our classfile represents a mutable class. -Otherwise, we ask the [`PropertyStore`](/library/api/SNAPSHOT/org/opalj/fpcf/PropertyStore.html) for the superclass' class immutabilty, using the key we defined in our lattice. +Otherwise, we ask the [`PropertyStore`](/library/api/SNAPSHOT/org/opalj/fpcf/PropertyStore.html) for the superclass' class immutability, using the key we defined in our lattice. The property store is the central data structure that keeps track of all properties that have been computed for any entity so far. We didn't have to define it, because `FPCFAnalysis` provides it for us. Finally, we use our previously defined `checkSuperclass` function to process the value that we got from the property store. @@ -203,7 +203,7 @@ We could of course have defined a function to incorporate a `FieldImmutability` In order to get the immutability properties of the class' instance fields, we filter the classfile's fields for those that aren't static, then we use a second form of the property store's `apply` method to query several properties at once and finally pass each of the results to `checkField`. -Now we have queried all information that we need, but as you have seen, the property store may return `EOptionP` values that have no upper bound yet for the property we're interested in, or values that aren't be final yet. +Now we have queried all information that we need, but as you have seen, the property store may return `EOptionP` values that have no upper bound yet for the property we're interested in, or values that aren't final yet. The fixed-point computation will provide these values later on in an asynchronous fashion. In order to be able to process them once they are available, we define another function, called the continuation: ```scala @@ -337,7 +337,7 @@ As before, we finally have to return the analysis. ## Running the Analysis -Finally it is time to try our analysis. +Finally, it is time to try our analysis. To do so easily, we extend [ProjectAnalysisApplication](/library/api/SNAPSHOT/org/opalj/br/analyses/ProjectAnalysisApplication.html) which provides us with an implicit `main` method that parses parameters for us, most importantly the "-cp=" parameter that lets users specify the path to a project that they want to analyze. ```scala object ClassImmutabilityRunner extends ProjectAnalysisApplication { @@ -376,7 +376,7 @@ override def doAnalyze(project: Project[URL], parameters: Seq[String], isInterru The [`PropertyStore`](/library/api/SNAPSHOT/org/opalj/fpcf/PropertyStore.html) provides several methods to inspect the results. Here we use `finalEntities` to get all entities that have the given final property, then we count those. -Finally, the `doAnalyze` method requires us to return a [`BasicReport`](/library/api/SNAPSHOT/org/opalj/br/analyses/BasicReport.html), which is a simple way to return some string that will ultimate be printed to the console: +Finally, the `doAnalyze` method requires us to return a [`BasicReport`](/library/api/SNAPSHOT/org/opalj/br/analyses/BasicReport.html), which is a simple way to return some string that will ultimately be printed to the console: ```scala override def doAnalyze(project: Project[URL], parameters: Seq[String], isInterrupted: () => Boolean): BasicReport = { [...] diff --git a/src/site/tutorial/Results.md b/src/site/tutorial/Results.md index 79b989cb33..1be0654e1a 100644 --- a/src/site/tutorial/Results.md +++ b/src/site/tutorial/Results.md @@ -64,7 +64,7 @@ IncrementalResult(Result(classFile, immutability), classHierarchy.allSubclassTyp ## PartialResult [`PartialResult`](/library/api/SNAPSHOT/org/opalj/fpcf/IncrementalResult.html) allows several analyses to collaboratively compute a single property (see the tutorial on [Collaborative Analyses](CollaborativeAnalyses.html)). -A `PartialResult` is different from the other result types in that it does not take a property value, but, in addition to analyzed entity, the kind of property (identified by the [`PropertyKey`](/library/api/SNAPSHOT/org/opalj/fpcf/PropertyKey.html)) and a function that is applied to whatever value that entity/property kind pair currently has: +A `PartialResult` is different from the other result types in that it does not take a property value, but, in addition to the analyzed entity, the kind of property (identified by the [`PropertyKey`](/library/api/SNAPSHOT/org/opalj/fpcf/PropertyKey.html)) and a function that is applied to whatever value that entity/property kind pair currently has: ```scala PartialResult[DeclaredMethod, Callers](method, Callers.key, { case InterimUBP(ub: Callers) => diff --git a/src/site/tutorial/Schedulers.md b/src/site/tutorial/Schedulers.md index 906f612284..64691dc28f 100644 --- a/src/site/tutorial/Schedulers.md +++ b/src/site/tutorial/Schedulers.md @@ -111,7 +111,7 @@ object TACAITransformer extends BasicFPCFTransformerScheduler { It computes the [`TACAI`](/library/api/SNAPSHOT/org/opalj/tac/fpcf/properties/TACAI.html), a three address code intermediate representation of your methods based on the result of an abstract interpretation. As that abstract interpretation has to be performed first, there is no need to call the analysis function before this has completed, thus a transformer is more convenient and more performant here than a lazy scheduler. -As you can see, it is almost identical to he lazy scheduler, but it uses `registerTransformer` to register the analysis function. +As you can see, it is almost identical to the lazy scheduler, but it uses `registerTransformer` to register the analysis function. In addition to the key of the property that our analysis computes (`TACAI.key` here), we also have to specify the key of the property that the analysis waits for (`BaseAIResult.key` in our example). Note that it is not necessary to explicitly query for this required property: when the property computed by the transformer is queried, that automatically triggers the computation of its required property as well. The analysis function here takes two arguments: the entity (as with lazy schedulers, this could be on any type) and the required property (a `BaseAIResult` here).