Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
0c2f6e0
[SpecsUtils] Fixed the bugs reported in BUGS_5.6.md
lm-sousa Aug 30, 2025
d34af60
[SpecsUtils] Fixed the bugs reported in BUGS_5.7.md
lm-sousa Aug 30, 2025
2fc67dd
[SpecsUtils] Fixed the bugs reported in BUGS_5.8.md
lm-sousa Aug 30, 2025
300d590
[SpecsUtils] Fixed the bugs reported in BUGS_5.9.md
lm-sousa Aug 30, 2025
b061a48
[SpecsUtils] Fixed the bugs reported in BUGS_6.1.md
lm-sousa Aug 31, 2025
62f29cd
Deprecate checkNotNull method and recommend using Objects.requireNonN…
lm-sousa Aug 31, 2025
709bea5
[SpecsUtils] Fixed the bugs reported in BUGS_6.2.md
lm-sousa Aug 31, 2025
b504851
[SpecsUtils] Fixed the bugs reported in BUGS_6.3.md
lm-sousa Aug 31, 2025
a61a5fb
[SpecsUtils] Fixed the bugs reported in BUGS_6.4.md
lm-sousa Aug 31, 2025
e0106c5
[SpecsUtils] Fixed the bugs reported in BUGS_6.6.md
lm-sousa Sep 1, 2025
476f4ed
Clarify expected behavior in BUGS_7.1.md and update severity descript…
lm-sousa Sep 1, 2025
e879f9d
[SpecsUtils] Fixed the bugs reported in BUGS_7.1.md
lm-sousa Sep 1, 2025
edeafc3
[SpecsUtils] Fixed the bugs reported in BUGS_7.2.md
lm-sousa Sep 1, 2025
3f33ace
[SpecsUtils] Discarded the bugs reported in BUGS_7.3.md and BUGS_7.4.md
lm-sousa Sep 1, 2025
9553154
[SpecsUtils] Fixed the bugs reported in BUGS_7.5.md
lm-sousa Sep 2, 2025
f9c79f5
[SpecsUtils] Fixed the bugs reported in BUGS_csv.md
lm-sousa Sep 2, 2025
47e269e
Refactor PrintOnce to use ConcurrentHashMap for thread-safe message t…
lm-sousa Sep 3, 2025
3ece387
[XStreamPlus] Fixes bugs.
lm-sousa Sep 4, 2025
40396d8
Applied most suggestions made by IntelliJ to the code. Fixed a ton of…
lm-sousa Sep 4, 2025
0eef3ad
Fix getChildren method to return mutable list to prevent breaking fun…
lm-sousa Sep 9, 2025
dee9858
Refactor null checks to use Objects.requireNonNull
lm-sousa Sep 9, 2025
bbb85b9
Bug fix
lm-sousa Sep 9, 2025
2b0b0b8
Enforced a single style for all code. Enforced the use of spaces, as …
lm-sousa Sep 9, 2025
393e47b
Fix brittle tests
lm-sousa Sep 9, 2025
5ad7ad6
Refactor toString methods in PushingQueue implementations to handle n…
lm-sousa Sep 9, 2025
2c4fa21
Bug Fix: Enhance event notification safety by iterating over a snapsh…
lm-sousa Sep 10, 2025
ed2696c
Fix incorrect test assumption
lm-sousa Sep 10, 2025
fcd040c
Bug fixes: Refactor resource paths in tests and WebResourceProvider i…
lm-sousa Sep 10, 2025
9f445ab
Bug Fix: Enhance DebugBufferedReader: Add consistent debug output for…
lm-sousa Sep 10, 2025
b73fc0d
Bug Fix: Update exception handling in ReporterUtilsTest to throw Null…
lm-sousa Sep 10, 2025
f7e79da
Bug Fix: Improve CachedValue concurrency handling by ensuring atomic …
lm-sousa Sep 10, 2025
899b8d2
Bug Fix: Tests still expected old buggy behaviour
lm-sousa Sep 10, 2025
1831dec
Bug Fix: Refactor MemProgressBarUpdater to use Objects.requireNonNull…
lm-sousa Sep 11, 2025
e986835
Bug Fix: Add capacity check in LastUsedItems to prevent usage when ca…
lm-sousa Sep 11, 2025
dac87a5
Refactor LastUsedItems to return Optional.empty() for empty head inst…
lm-sousa Sep 11, 2025
953e873
Refactor comments to remove bug references and clarify handling of nu…
lm-sousa Sep 11, 2025
9154ab7
Refactor RangeMapTest to improve readability and maintain consistency…
lm-sousa Sep 11, 2025
50b73cb
Enhance MemoryProfiler to handle output file creation and ensure data…
lm-sousa Sep 11, 2025
50d5531
Enhance Reporter interface methods for thread safety; add stress test…
lm-sousa Sep 11, 2025
8fa8da2
Add persisted content caching and enhance toString() method in Buffer…
lm-sousa Sep 11, 2025
0ea719f
Refactor MemoryProfiler to improve thread management; replace execute…
lm-sousa Sep 11, 2025
f9c030d
Enhance null safety in PatternDetector by using Objects.equals() for …
lm-sousa Sep 12, 2025
3357908
Refactor LineStreamFileService to use ConcurrentHashMap for cache; im…
lm-sousa Sep 12, 2025
9a517d7
Enhance ProgressCounter to enforce non-negative max count; update tes…
lm-sousa Sep 12, 2025
1e49a09
Refactor ProgressCounter to use camelCase for maxCount; update behavi…
lm-sousa Sep 12, 2025
927aba5
Fix isBranchTakenInstruction logic to correctly classify jump instruc…
lm-sousa Sep 12, 2025
8a9e0d7
Enhance cancellable task test to use CountDownLatch for deterministic…
lm-sousa Sep 12, 2025
d7b9713
Enhance DelaySlotBranchCorrector documentation and tests; clarify beh…
lm-sousa Sep 12, 2025
e53f1ad
Refactor LogSourceInfoTest to reset LOGGER_SOURCE_INFO to factory def…
lm-sousa Sep 12, 2025
1cd4f30
Update jacocoTestCoverageVerification minimum coverage to 0.79; clari…
lm-sousa Sep 12, 2025
5a1ef35
Enhance MemoryProfilerTest to ensure proper thread execution; add cle…
lm-sousa Sep 12, 2025
85d5983
Increase performance threshold in GluerTest from 100ms to 500ms for b…
lm-sousa Sep 12, 2025
d3c8776
Refactor SpecsSwing to streamline file browsing logic; improve handli…
lm-sousa Sep 12, 2025
2395605
Remove documentation file for now-fixed bugs.
lm-sousa Sep 12, 2025
426c11f
Enhance SpecsSwing utility: add null handling in runOnSwing method; i…
lm-sousa Sep 12, 2025
28f1af6
Enhance HeapWindow: add headless environment support; prevent UI init…
lm-sousa Sep 12, 2025
1202d0a
Remove RetryingTest annotation from PerformanceTests in SymjaNodeTest
lm-sousa Sep 12, 2025
7d5b84f
Relaxed minimum coverage requirement due to CI headless environment.
lm-sousa Sep 12, 2025
2e1aa65
Removed now completed testing plan. Hurray! Over 10.000 tests!
lm-sousa Sep 12, 2025
9f869f8
Prevent exception leakeage and annotation creation on CI runs for pas…
lm-sousa Sep 12, 2025
e61d685
Remove redundant task from workflow
lm-sousa Sep 12, 2025
b5029df
Snuff out the last Annotation leak
lm-sousa Sep 12, 2025
d9c2ee8
Refactor tests to use @TempDir for temporary file management
lm-sousa Sep 15, 2025
f887801
Refactor build configuration: use environment variables for library p…
lm-sousa Sep 19, 2025
79431f7
Improve file download handling by using a temporary file for download…
lm-sousa Oct 4, 2025
efde272
GearmanPlus' dependency is gone. The project is no longer used. I wil…
lm-sousa Oct 4, 2025
c4b6fba
Refactor comments and remove unused constants in JsEngine, NodeJsEngi…
lm-sousa Nov 4, 2025
2326379
Remove redundant test for carry constants in SpecsAsmTest
lm-sousa Nov 4, 2025
73471b0
Refactor usage of Collections.singletonList to List.of for improved r…
lm-sousa Dec 25, 2025
4854793
Revert DeleteTransform to use Collections.singletonList
lm-sousa Dec 25, 2025
fb20834
Remove unused methods and imports from PostProcessUtils for cleaner code
lm-sousa Dec 25, 2025
f9ed084
Refactor SpecsXml to remove duplicate code.
lm-sousa Dec 25, 2025
d476eee
Removed all code that could have originated from StackOverflow. Remov…
lm-sousa Dec 26, 2025
19f6e04
Refactor logging calls to use SpecsLogs.warn for consistency
lm-sousa Dec 26, 2025
6f4d6f1
Make ATreeNode.getChildren return an immutable list to improve code s…
lm-sousa Dec 26, 2025
ef80f87
Potential fix for pull request finding 'Inconsistent equals and hashC…
lm-sousa Dec 26, 2025
9f7d110
Refactor variable names for clarity in JavaType class
lm-sousa Dec 26, 2025
420eede
Refactor build.gradle files to ensure consistency across projects
lm-sousa Dec 26, 2025
3489499
Renames file that causes collision in case-insensitive file systems
joaobispo Dec 31, 2025
050667f
Partially revert commit to readd a couple methods that do not depend …
lm-sousa Jan 1, 2026
d36a151
Remove unused, deprecated or obsolete projects.
lm-sousa Jan 1, 2026
8eb62c1
Prepare for Gradle 10 and fix eslint config
lm-sousa Jan 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 2 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This repository contains 24 Java libraries developed by the SPeCS research group, organized as independent Gradle projects. Each library extends or enhances existing Java libraries (indicated by the "-Plus" suffix) or provides custom utilities. The repository uses Java 17, Gradle for builds, and follows a multi-project structure without a root Gradle configuration.

**Repository Statistics:**
- 24 main Java libraries + 3 legacy projects (RuntimeMutators, SpecsHWUtils, SupportJavaLibs)
- 24 main Java libraries + 1 legacy project (SpecsHWUtils)
- ~200K+ lines of Java code across all projects
- Mixed testing frameworks: JUnit 5 (modern projects) and JUnit 4 (legacy projects)
- Inter-project dependencies centered around SpecsUtils as the core utility library
Expand Down Expand Up @@ -101,13 +101,10 @@ ProjectName/

**Development Tools:**
- **JavaGenerator** - Java code generation utilities
- **EclipseUtils** - Eclipse IDE integration tools
- **AntTasks** - Custom Ant build tasks

### Legacy Projects (No Gradle builds)
- **RuntimeMutators** - Runtime code mutation (Eclipse project only)
- **SpecsHWUtils** - Hardware utilities (Eclipse project only)
- **SupportJavaLibs** - Supporting libraries and tools

## Continuous Integration

Expand All @@ -125,7 +122,7 @@ File: `.github/workflows/nightly.yml`
5. Generates dependency graphs

### Tested Projects (in CI order):
AntTasks, AsmParser, CommonsCompressPlus, CommonsLangPlus, GearmanPlus, GitlabPlus, GitPlus, Gprofer, GsonPlus, GuiHelper, JacksonPlus, JadxPlus, JavaGenerator, jOptions, JsEngine, LogbackPlus, MvelPlus, SlackPlus, SpecsUtils, SymjaPlus, tdrcLibrary, XStreamPlus, Z3Helper
AntTasks, AsmParser, CommonsCompressPlus, CommonsLangPlus, GearmanPlus, GitlabPlus, GitPlus, Gprofer, GsonPlus, GuiHelper, JacksonPlus, JadxPlus, JavaGenerator, jOptions, JsEngine, LogbackPlus, MvelPlus, SlackPlus, SpecsUtils, SymjaPlus, tdrcLibrary, XStreamPlus

### Local Validation Steps
1. **Build specific project**: `cd ProjectName && gradle build`
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
AsmParser
CommonsCompressPlus
CommonsLangPlus
GearmanPlus
GitlabPlus
GitPlus
Gprofer
Expand All @@ -59,13 +58,12 @@ jobs:
SymjaPlus
tdrcLibrary
XStreamPlus
Z3Helper
)
failed=()
for project in "${projects[@]}"; do
echo "\n===== Building and testing $project ====="
cd "$project"
if ! gradle build test; then
if ! gradle build; then
echo "[ERROR] $project failed to build or test"
failed+=("$project")
fi
Expand Down
10 changes: 5 additions & 5 deletions AntTasks/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ dependencies {
implementation ':SpecsUtils'

// Ivy dependencies
implementation group: 'org.apache.ant', name: 'ant', version: '1.9.1'
implementation group: 'org.apache.ivy', name: 'ivy', version: '2.5.0-rc1'
implementation group: 'org.apache.ant', name: 'ant-jsch', version: '1.10.5'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
implementation group: 'com.io7m.xom', name: 'xom', version: '1.2.10'
implementation 'org.apache.ant:ant:1.9.1'
implementation 'org.apache.ivy:ivy:2.5.0-rc1'
implementation 'org.apache.ant:ant-jsch:1.10.5'
implementation 'org.slf4j:slf4j-simple:1.7.25'
implementation 'com.io7m.xom:xom:1.2.10'
}

// Project sources
Expand Down
4 changes: 2 additions & 2 deletions AntTasks/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = 'AntTasks'

includeBuild("../../specs-java-libs/jOptions")
includeBuild("../../specs-java-libs/SpecsUtils")
includeBuild("../jOptions")
includeBuild("../SpecsUtils")
55 changes: 23 additions & 32 deletions AsmParser/build.gradle
Original file line number Diff line number Diff line change
@@ -1,54 +1,45 @@
plugins {
id 'distribution'
id 'distribution'
id 'java'
}

// Java project
apply plugin: 'java'

java {
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}


// Repositories providers
repositories {
mavenCentral()
}

dependencies {
testImplementation "junit:junit:4.13.1"
testImplementation "junit:junit:4.13.1"

implementation ':SpecsUtils'
implementation ':jOptions'

implementation group: 'com.google.code.gson', name: 'gson', version: '2.12.1'
implementation 'com.google.code.gson:gson:2.12.1'
}

java {
withSourcesJar()
}


// Project sources
sourceSets {
main {
java {
srcDir 'src'
}

resources {
srcDir 'test'
}
}

test {
java {
srcDir 'test'
}

resources {
srcDir 'test'
}
}
main {
java {
srcDir 'src'
}
resources {
srcDir 'resources'
}
}
test {
java {
srcDir 'test'
}
resources {
srcDir 'test'
}
}
}
4 changes: 2 additions & 2 deletions AsmParser/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rootProject.name = 'AsmParser'

includeBuild("../../specs-java-libs/SpecsUtils")
includeBuild("../../specs-java-libs/jOptions")
includeBuild("../SpecsUtils")
includeBuild("../jOptions")
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@

import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;

import org.suikasoft.jOptions.DataStore.ADataClass;
import org.suikasoft.jOptions.Datakey.DataKey;
import org.suikasoft.jOptions.Datakey.KeyFactory;

import pt.up.fe.specs.util.SpecsCheck;

/**
* Raw field data as extracted by an {@link IsaParser}
*
Expand Down Expand Up @@ -98,7 +97,7 @@ public int getReducedOpcode() {

public int getFieldAsBinaryInteger(String fieldName) {
var valueString = get(AsmFieldData.FIELDS).get(fieldName);
SpecsCheck.checkNotNull(valueString, () -> "No value found for field " + fieldName);
Objects.requireNonNull(valueString, () -> "No value found for field " + fieldName);
return Integer.parseInt(valueString, 2);
}

Expand Down
29 changes: 11 additions & 18 deletions CommonsCompressPlus/build.gradle
Original file line number Diff line number Diff line change
@@ -1,38 +1,31 @@
plugins {
id 'distribution'
id 'distribution'
id 'java'
}

// Java project
apply plugin: 'java'

java {
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}


// Repositories providers
repositories {
mavenCentral()
}

dependencies {
testImplementation "junit:junit:4.13.1"

implementation ':SpecsUtils'
implementation ':SpecsUtils'

implementation group: 'org.apache.commons', name: 'commons-compress', version: '1.27.1'
}

java {
withSourcesJar()
implementation 'org.apache.commons:commons-compress:1.27.1'
}

// Project sources
sourceSets {
main {
java {
srcDir 'src'
}
}
main {
java {
srcDir 'src'
}
}
}
2 changes: 1 addition & 1 deletion CommonsCompressPlus/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
rootProject.name = 'CommonsCompressPlus'

includeBuild("../../specs-java-libs/SpecsUtils")
includeBuild("../SpecsUtils")
23 changes: 8 additions & 15 deletions CommonsLangPlus/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,16 @@ repositories {
}

dependencies {
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.17.0'
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.13.0'
implementation 'org.apache.commons:commons-lang3:3.18.0'
implementation 'org.apache.commons:commons-text:1.13.0'

// Testing dependencies
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: '5.10.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '5.5.0'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '5.5.0'
testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.24.2'
testImplementation group: 'org.mockito', name: 'mockito-inline', version: '5.2.0' // For static mocking
testRuntimeOnly group: 'org.junit.platform', name: 'junit-platform-launcher'
}

java {
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.0'
testImplementation 'org.mockito:mockito-core:5.5.0'
testImplementation 'org.mockito:mockito-junit-jupiter:5.5.0'
testImplementation 'org.assertj:assertj-core:3.24.2'
testImplementation 'org.mockito:mockito-inline:5.2.0' // For static mocking
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.0'
}

// Project sources
Expand Down
5 changes: 3 additions & 2 deletions CommonsLangPlus/src/pt/up/fe/specs/lang/SpecsPlatforms.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import org.apache.commons.lang3.SystemUtils;

/**
* Utility class providing wrappers around Apache commons-lang methods for system platform identification.
* Utility class providing wrappers around Apache commons-lang methods for
* system platform identification.
* <p>
* Includes methods to check the current operating system and platform details.
*
Expand Down Expand Up @@ -50,7 +51,7 @@ public static boolean isLinux() {
* @return true if Linux ARM, false otherwise
*/
public static boolean isLinuxArm() {
return SystemUtils.IS_OS_LINUX && "arm".equals(System.getProperty("os.arch").toLowerCase());
return SystemUtils.IS_OS_LINUX && "arm".equalsIgnoreCase(System.getProperty("os.arch"));
}

/**
Expand Down
2 changes: 0 additions & 2 deletions EclipseUtils/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions EclipseUtils/PsfBuilder-run.launch

This file was deleted.

56 changes: 0 additions & 56 deletions EclipseUtils/build.gradle

This file was deleted.

Loading
Loading