Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Architectural: Add Wala Framework Setup #35

Merged
merged 48 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d8b74e1
Add Wala Framework Setup
sarpsahinalp Oct 21, 2024
18533d7
Merge branch 'main' into feature/wala-implementation
sarpsahinalp Oct 21, 2024
a0ba1d9
Updated archunit tests
sarpsahinalp Oct 28, 2024
c17e30b
Changes in class resolver
sarpsahinalp Oct 29, 2024
ead7c0c
Updated archunit tests
sarpsahinalp Oct 31, 2024
54da5b5
Fix thread creation stuff for archunit
sarpsahinalp Oct 31, 2024
9e49868
Update archunit and wala implementation
sarpsahinalp Oct 31, 2024
4dd34ef
Improve wala tests
sarpsahinalp Oct 31, 2024
f2c0515
Merge branch 'main' into feature/wala-implementation
Oct 31, 2024
a525684
Feedback addressed coderabbit
sarpsahinalp Oct 31, 2024
6762c4d
Changes
sarpsahinalp Nov 3, 2024
82bf8d6
Changes in class resolver
sarpsahinalp Nov 4, 2024
72cfc94
Refactoring of architectural tests
sarpsahinalp Nov 5, 2024
a0a18f1
Fix failing tests
sarpsahinalp Nov 12, 2024
b60311c
Merge remote-tracking branch 'origin/feature/wala-implementation' int…
sarpsahinalp Nov 12, 2024
e257cc2
Add Wala enum for the architecture mode
sarpsahinalp Nov 19, 2024
ee10233
1. Refactor and add a strategy pattern for dynamic allocation of the …
sarpsahinalp Nov 19, 2024
157e936
1. Implemented the test cases for WalaSecurityTestCases
sarpsahinalp Nov 20, 2024
094935e
1. Add german translation for reasons
sarpsahinalp Nov 21, 2024
fc60a59
Macos specific file methods
sarpsahinalp Nov 24, 2024
69ca695
Add linux methods
sarpsahinalp Nov 24, 2024
2335c97
Merge remote-tracking branch 'origin/feature/wala-implementation' int…
sarpsahinalp Nov 24, 2024
f01a37d
Add windows methods to analyze
sarpsahinalp Nov 24, 2024
6b95748
Add methods for Wala framework
sarpsahinalp Nov 24, 2024
824732a
1. Refactor methods, parse methods for Wala framework
sarpsahinalp Nov 25, 2024
3150e2a
Narrowed structural differences between AOP and Architecture
Nov 26, 2024
26b18a5
Narrowed structural differences between AOP and Architecture
Nov 26, 2024
e76c20f
Update src/main/resources/de/tum/cit/ase/ares/api/localization/messag…
sarpsahinalp Nov 26, 2024
aab978f
Update src/main/resources/de/tum/cit/ase/ares/api/localization/messag…
sarpsahinalp Nov 26, 2024
23cb0b3
Update src/main/java/de/tum/cit/ase/ares/api/architecture/Architectur…
sarpsahinalp Nov 26, 2024
eba498f
Update src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/J…
sarpsahinalp Nov 26, 2024
3b80a18
Improve error messages
sarpsahinalp Nov 26, 2024
934b429
Merge remote-tracking branch 'origin/feature/wala-implementation' int…
sarpsahinalp Nov 26, 2024
3e29c27
Add german translation
sarpsahinalp Nov 26, 2024
6eb557c
Refactoring
sarpsahinalp Nov 26, 2024
6cb9ec1
Narrowed structural differences between Versions of Architecture tests
Nov 26, 2024
79c9c17
Narrowed structural differences between Versions of Architecture tests
Nov 26, 2024
452dae9
Narrowed structural differences between Versions of Architecture tests
Nov 26, 2024
3ced159
Narrowed structural differences between Versions of Architecture tests
Nov 26, 2024
78d52ca
Narrowed structural differences between Versions of Architecture tests
Nov 26, 2024
4950299
Narrowed structural differences between Versions of Architecture tests
Nov 26, 2024
536233d
Change file constant names
sarpsahinalp Nov 26, 2024
64c9a0c
Add localization in ReachabilityChecker
sarpsahinalp Nov 26, 2024
8b8880f
Change german messages to pass the tests
sarpsahinalp Nov 27, 2024
1aba388
Add comment functionality in text files
sarpsahinalp Nov 27, 2024
10df859
Add comment functionality in text files
sarpsahinalp Nov 27, 2024
013b0e7
Add tests for the wala framework fix changes
sarpsahinalp Nov 27, 2024
b7ae64b
Address the changes!
sarpsahinalp Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@
<artifactId>byte-buddy-agent</artifactId>
<version>1.14.19</version>
</dependency>
<dependency>
<groupId>com.ibm.wala</groupId>
<artifactId>com.ibm.wala.core</artifactId>
<version>1.6.7</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down Expand Up @@ -282,6 +287,7 @@
</execution>
</executions>
<configuration>
<failOnError>false</failOnError>
<tags>
<tag>
<name>apiNote</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* </p>
*
* @version 2.0.0
* @author Markus Paulsen
* @see <a href="https://refactoring.guru/design-patterns/abstract-factory">Abstract Factory Design Pattern</a>
* @since 2.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
package de.tum.cit.ase.ares.api.architecture;

import com.tngtech.archunit.core.domain.JavaClasses;
import de.tum.cit.ase.ares.api.architecture.java.JavaArchitectureMode;

import javax.annotation.Nonnull;

/**
* Interface for defining architecture security test cases in various programming languages.
* Interface for architecture security test case configurations across various programming languages.
* <p>
* This interface serves as an abstract product in the Abstract Factory Design Pattern,
* outlining the required methods for generating and executing architecture test cases
* tailored to any programming languages.
* This interface serves as the abstract product in the Abstract Factory Design Pattern,
* requiring the implementation of methods for generating and executing architecture test case
* files tailored to any programming languages.
* </p>
*
* @version 2.0.0
Expand All @@ -27,7 +30,7 @@ public interface ArchitectureSecurityTestCase {
*
* @return a {@link String} representing the content of the architecture test case file.
*/
String writeArchitectureTestCase();
@Nonnull String writeArchitectureTestCase(@Nonnull String architectureMode);

/**
* Executes the architecture test case using the provided set of Java classes.
Expand All @@ -37,7 +40,8 @@ public interface ArchitectureSecurityTestCase {
* to handle any language-specific execution details required to run the test case.
* </p>
*
* @param classes a set of {@link JavaClasses} representing the codebase to which the test case will be applied.
* @param architectureMode a set of {@link JavaClasses} representing the codebase to which the test case will be applied.
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
*/
void executeArchitectureTestCase(JavaClasses classes);
// TODO: Change this from JavaArchitectureMode architectureMode to @Nonnull String architectureMode
void executeArchitectureTestCase(JavaArchitectureMode architectureMode);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
package de.tum.cit.ase.ares.api.architecture.java;

//<editor-fold desc="Imports">

import com.ibm.wala.classLoader.IClass;
import com.ibm.wala.classLoader.Language;
import com.ibm.wala.core.java11.Java9AnalysisScopeReader;
import com.ibm.wala.ipa.callgraph.*;
import com.ibm.wala.ipa.callgraph.impl.DefaultEntrypoint;
import com.ibm.wala.ipa.callgraph.impl.Util;
import com.ibm.wala.ipa.callgraph.propagation.InstanceKey;
import com.ibm.wala.ipa.cha.ClassHierarchy;
import com.ibm.wala.ipa.cha.ClassHierarchyException;
import com.ibm.wala.ipa.cha.ClassHierarchyFactory;
import com.ibm.wala.types.ClassLoaderReference;
import com.ibm.wala.types.TypeReference;
import com.tngtech.archunit.core.domain.JavaClass;
import com.tngtech.archunit.core.importer.ClassFileImporter;
import de.tum.cit.ase.ares.api.architecture.java.wala.ReachabilityChecker;
import de.tum.cit.ase.ares.api.util.FileTools;

import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.nio.file.Path;
import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;
//</editor-fold>

/**
* Utility class to build a call graph from a class path.
*/
public class CallGraphBuilderUtils {

private CallGraphBuilderUtils() {
throw new IllegalStateException("Utility class");
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}

/**
* Class file importer to import the class files.
* This is used to import the class files from the URL.
*/
private static final ClassFileImporter classFileImporter = new ClassFileImporter();

private static final ClassHierarchy classHierarchy;

private static final AnalysisScope scope;

static {
try {
scope = Java9AnalysisScopeReader.instance.makeJavaBinaryAnalysisScope(
System.getProperty("java.class.path"),
new File("src/main/java/de/tum/cit/ase/ares/api/architecture/java/wala/exclusions.txt")
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
);

// Build the class hierarchy
classHierarchy = ClassHierarchyFactory.make(scope);
} catch (ClassHierarchyException | IOException e) {
throw new SecurityException("Could not create class hierarchy for student submission", e); // $NON-NLS-1$
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}
}


/**
* Try to resolve the class by the given type name.
*
* @param typeName The type name of the class to resolve.
* @return The resolved class if it exists.
*/
public static Optional<JavaClass> tryResolve(String typeName) {
// Advice definition uses Reflection and therefor should not be resolved
if (typeName.startsWith("de.tum.cit.ase.ares.api.aop.java.aspectj.adviceandpointcut.JavaAspectJFileSystemAdviceDefinitions")) {
return Optional.empty();
}
URL url = CallGraphBuilderUtils.class.getResource("/" + typeName.replace(".", "/") + ".class");
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
try {
if (url == null) {
return Optional.empty();
}
return Optional.of(classFileImporter.withImportOption(location -> !location.contains("jrt")).importUrl(url).get(typeName));
} catch (IllegalArgumentException e) {
return Optional.empty();
}
}

/**
* Get the immediate subclasses of the given type name.
*
* @param typeName The type name of the class to get the immediate subclasses.
* @return The immediate subclasses of the given type name.
*/
public static Set<JavaClass> getImmediateSubclasses(String typeName) {
TypeReference reference = TypeReference.find(ClassLoaderReference.Application, convertTypeName(typeName));
if (reference == null) {
return Collections.emptySet();
}
IClass clazz = classHierarchy.lookupClass(reference);
if (clazz == null) {
return Collections.emptySet();
}
return classHierarchy
.getImmediateSubclasses(clazz)
.stream()
.map(IClass::getName)
.map(Object::toString)
.map(CallGraphBuilderUtils::tryResolve)
.filter(Optional::isPresent)
.map(Optional::get).collect(Collectors.toSet());
}

/**
* Convert the type name to the format that can be used in the class file.
*
* @param typeName The type name to convert.
* @return The converted type name.
*/
public static String convertTypeName(String typeName) {
if (typeName == null || typeName.isEmpty()) {
throw new IllegalArgumentException("Type name cannot be null or empty");
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}
return "L" + typeName.replace('.', '/');
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}

sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
/**
* Build a call graph from a class path and the passed in predicate
*/
public static CallGraph buildCallGraph(String classPathToAnalyze) {
try {
// Create a list to store entry points
List<DefaultEntrypoint> customEntryPoints = ReachabilityChecker.getEntryPointsFromStudentSubmission(classPathToAnalyze, classHierarchy);

// Create AnalysisOptions for call graph
AnalysisOptions options = new AnalysisOptions(scope, customEntryPoints);
options.setTraceStringConstants(false);
options.setHandleZeroLengthArray(false);
options.setReflectionOptions(AnalysisOptions.ReflectionOptions.NONE);

// Create call graph builder (n-CFA, context-sensitive, etc.)
com.ibm.wala.ipa.callgraph.CallGraphBuilder<InstanceKey> builder = Util.makeZeroOneCFABuilder(Language.JAVA, options, new AnalysisCacheImpl(), classHierarchy);

// Generate the call graph
return builder.makeCallGraph(options, null);
} catch (CallGraphBuilderCancelException e) {
throw new SecurityException("Error building call graph", e); //$NON-NLS-1$
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}
}

/**
* Get the content of a file from the architectural rules storage
*/
public static Set<String> getForbiddenMethods(Path filePath) {
return new HashSet<>(List.of(FileTools.readFile(filePath).split("\r\n")));
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package de.tum.cit.ase.ares.api.architecture.java;

import de.tum.cit.ase.ares.api.util.FileTools;

import java.nio.file.Path;

import static de.tum.cit.ase.ares.api.localization.Messages.localized;

/**
* Constants for the path of the files used in the ArchitectureTestCaseStorage
*/
public class FileHandlerConstants {

//<editor-fold desc="Java ArchUnit Methods">
public static final Path JAVA_FILESYSTEM_INTERACTION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "archunit", "methods", "file-system-access-methods.txt");
public static final Path JAVA_NETWORK_ACCESS_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "archunit", "methods", "network-access-methods.txt");
public static final Path JAVA_JVM_TERMINATION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "archunit", "methods", "jvm-termination-methods.txt");
public static final Path JAVA_REFLECTION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "archunit", "methods", "reflection-methods.txt");
public static final Path JAVA_COMMAND_EXECUTION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "archunit", "methods", "command-execution-methods.txt");
public static final Path JAVA_THREAD_MANIPULATION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "archunit", "methods", "thread-manipulation-methods.txt");
public static final Path JAVA_SERIALIZATION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "archunit", "methods", "serializable-methods.txt");
//</editor-fold>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Path resolution in FileHandlerConstants needs to be updated

The file paths referenced in FileHandlerConstants.java need to be updated to match the actual location of the files in the repository. The files exist but are located at src/main/resources/de/tum/cit/ase/ares/api/templates/architecture/java/archunit/methods/ instead of the currently referenced templates/architecture/java/archunit/methods/.

  • Update all path constants in FileHandlerConstants.java to include the full path prefix de/tum/cit/ase/ares/api/
  • Example: JAVA_FILESYSTEM_INTERACTION_METHODS should resolve to de/tum/cit/ase/ares/api/templates/architecture/java/archunit/methods/file-system-access-methods.txt
🔗 Analysis chain

Verify ArchUnit method files existence and content

The paths look well-structured, but let's verify the resources.


Let me check if these files might exist in a different location or with slightly different names before making a final conclusion.


Let me check the content of one of these files to verify the Java-style signatures, as the files exist but in a different location than what's referenced in the constants.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify ArchUnit method files existence and content format

echo "Checking ArchUnit method files..."
# Check if files exist and follow consistent format
for file in "file-system-access-methods.txt" "network-access-methods.txt" "jvm-termination-methods.txt" "reflection-methods.txt" "command-execution-methods.txt" "thread-manipulation-methods.txt" "serializable-methods.txt"; do
  echo "Checking $file:"
  # Check file existence
  if [ -f "src/main/resources/templates/architecture/java/archunit/methods/$file" ]; then
    echo "✓ File exists"
    # Check content format (should use Java-style signatures)
    if grep -q "^java\." "src/main/resources/templates/architecture/java/archunit/methods/$file"; then
      echo "✓ Contains Java-style signatures"
    else
      echo "✗ Missing Java-style signatures"
    fi
  else
    echo "✗ File missing"
  fi
done

Length of output: 3247


Script:

#!/bin/bash
# Search for these files anywhere in the repository
echo "Searching for method definition files..."
fd -t f -e txt . | grep -i "methods\|access\|termination\|reflection\|execution\|thread\|serializable"

# Also check if there's a template directory structure
echo -e "\nChecking template directory structure:"
fd -t d "templates"

# Look for any txt files under resources
echo -e "\nChecking all txt files under resources:"
fd -t f -e txt . | grep -i "resources"

Length of output: 5281


Script:

#!/bin/bash
# Check content of one of the files to verify format
echo "Checking content format of file-system-access-methods.txt:"
cat "src/main/resources/de/tum/cit/ase/ares/api/templates/architecture/java/archunit/methods/file-system-access-methods.txt"

# Check if FileTools.resolveOnResources is using the correct base path
echo -e "\nSearching for FileTools.resolveOnResources implementation:"
ast-grep --pattern 'class FileTools {
  $$$
  resolveOnResources($$$) {
    $$$
  }
  $$$
}'

Length of output: 25663


//<editor-fold desc="WALA Methods">
public static final Path WALA_CLASSLOADER_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "classloader.txt");
public static final Path WALA_FILESYSTEM_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "file-system-access-methods.txt");
public static final Path WALA_NETWORK_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "network-access-methods.txt");
public static final Path WALA_JVM_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "jvm-termination-methods.txt");
public static final Path WALA_REFLECTION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "reflection.txt");
public static final Path WALA_COMMAND_EXECUTION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "command-execution-methods.txt");
public static final Path WALA_SERIALIZATION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "serializable-methods.txt");
public static final Path WALA_THREAD_MANIPULATION_METHODS = FileTools.resolveOnResources("templates", "architecture" , "java", "wala", "methods", "thread-manipulation.txt");
//</editor-fold>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Standardization of method files is needed for consistency

The files exist but there are several inconsistencies that should be addressed:

  1. File naming inconsistency:

    • WALA uses thread-manipulation.txt while ArchUnit uses thread-manipulation-methods.txt
    • WALA uses reflection.txt while ArchUnit uses reflection-methods.txt
  2. Content structure differences:

    • WALA uses JNI-style signatures (e.g., Ljava/lang/String;)
    • ArchUnit uses Java-style signatures (e.g., java.lang.String)

Suggested changes:

  • Rename WALA files to match ArchUnit's naming pattern:
- thread-manipulation.txt
+ thread-manipulation-methods.txt
- reflection.txt
+ reflection-methods.txt
  • Consider standardizing method signature format between WALA and ArchUnit files for better maintainability
🔗 Analysis chain

Standardize naming between ArchUnit and WALA constants.

There are inconsistencies in naming between corresponding ArchUnit and WALA constants:

  • JAVA_JVM_TERMINATION_METHODS vs WALA_JVM_METHODS
  • JAVA_THREAD_MANIPULATION_METHODS vs WALA_THREAD_MANIPULATION_METHODS

Consider standardizing the names for better maintainability:

- public static final Path WALA_JVM_METHODS = FileTools.resolveOnResources(...);
+ public static final Path WALA_JVM_TERMINATION_METHODS = FileTools.resolveOnResources(...);

The WALA method files exist but at a different path than checked initially

The previous review comment about naming inconsistencies is valid, but there's a more important issue to address. The files exist at src/main/resources/de/tum/cit/ase/ares/api/templates/architecture/java/wala/methods/ instead of the path used in the constants. The FileTools.resolveOnResources() method should be able to handle this, but we should verify its implementation.

  • WALA_JVM_METHODS vs JAVA_JVM_TERMINATION_METHODS naming inconsistency exists
  • WALA_THREAD_MANIPULATION_METHODS vs thread-manipulation.txt file name inconsistency exists
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify WALA method files and compare with ArchUnit patterns

# Check if all referenced WALA files exist
echo "Checking WALA method files..."
for file in "classloader.txt" "file-system-access-methods.txt" "network-access-methods.txt" "jvm-termination-methods.txt" "reflection.txt" "command-execution-methods.txt" "serializable-methods.txt" "thread-manipulation.txt"; do
  if [ -f "templates/architecture/java/wala/methods/$file" ]; then
    echo "$file exists"
  else
    echo "$file missing"
  fi
done

# Compare naming patterns between ArchUnit and WALA
echo -e "\nComparing naming patterns:"
diff <(fd . "templates/architecture/java/archunit/methods" -e txt | sort) <(fd . "templates/architecture/java/wala/methods" -e txt | sort)

Length of output: 3706


Script:

#!/bin/bash
# Let's first check if the templates directory exists and its structure
echo "Checking templates directory structure:"
fd -t d "templates"

echo -e "\nChecking for any txt files in the repository:"
fd -e txt

echo -e "\nChecking for any files containing 'wala' or 'archunit':"
fd -i "wala|archunit"

# Let's also check if these files might be in src/main/resources
echo -e "\nChecking src/main/resources directory:"
ls -R src/main/resources 2>/dev/null || echo "src/main/resources not found"

Length of output: 8259


Script:

#!/bin/bash
# Let's check the FileTools implementation to understand how resolveOnResources works
ast-grep --pattern 'class FileTools {
  $$$
  resolveOnResources($$$) {
    $$$
  }
  $$$
}'

# Also check if there are any tests using these constants
rg "WALA_.*_METHODS" -t java

Length of output: 3476


Script:

#!/bin/bash
# Let's check the actual content of both WALA and ArchUnit method files to see if they serve different purposes
echo "Comparing WALA and ArchUnit reflection methods:"
echo "=== WALA reflection-methods.txt ==="
cat "src/main/resources/de/tum/cit/ase/ares/api/templates/architecture/java/wala/methods/reflection-methods.txt"
echo -e "\n=== ArchUnit reflection-methods.txt ==="
cat "src/main/resources/de/tum/cit/ase/ares/api/templates/architecture/java/archunit/methods/reflection-methods.txt"

echo -e "\nComparing WALA and ArchUnit thread manipulation methods:"
echo "=== WALA thread-manipulation.txt ==="
cat "src/main/resources/de/tum/cit/ase/ares/api/templates/architecture/java/wala/methods/thread-manipulation.txt"
echo -e "\n=== ArchUnit thread-manipulation-methods.txt ==="
cat "src/main/resources/de/tum/cit/ase/ares/api/templates/architecture/java/archunit/methods/thread-manipulation-methods.txt"

Length of output: 38715




private FileHandlerConstants() {
throw new UnsupportedOperationException(localized("security.general.utility.initialization"));
sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.cit.ase.ares.api.architecture.java.archunit;
package de.tum.cit.ase.ares.api.architecture.java;

sarpsahinalp marked this conversation as resolved.
Show resolved Hide resolved
/**
* Supported architecture test cases in Java programming language.
Expand All @@ -7,7 +7,7 @@
* @version 2.0.0
* @since 2.0.0
*/
public enum JavaArchUnitTestCaseSupported {
public enum JavaArchitecturalTestCaseSupported {
/**
* Architecture test case for the file system interaction.
*/
Expand All @@ -27,5 +27,22 @@ public enum JavaArchUnitTestCaseSupported {
/**
* Architecture test case for the package import.
*/
PACKAGE_IMPORT
PACKAGE_IMPORT,
/**
* Architecture test case for the premature jvm termination.
*/
TERMINATE_JVM,
/**
* Architecture test case for the reflection.
*/
REFLECTION,
/**
* Architecture test case for the serialization.
*/
SERIALIZATION,
/**
* Architecture test case for the class loading.
*/
CLASS_LOADING,

}
Loading
Loading