Skip to content

Commit

Permalink
Fix test case (#102)
Browse files Browse the repository at this point in the history
* Refactor - Extract configuration attributes

* Refactor - Replace temp with Query

* Refactor - Fix ToolFactory path issue

* Refactor - Extract tasks

* Enhance console output with own logger

* Enhance console output, redirect all the current info into the log file with own logger

* Create validation folder, #72

* Enhance console output #45

* Refactor - Parameterize Function

* Refactor - Extract Function

* Minor format changes #45

* Minor format changes #45

* Add support for Gradle #44

* Add support for Ant #83

* Add support for Ant #83

* Find the variable name for some vulnerabilities

* Column info on MS_SHOULD_BE_FINAL and EI_EXPOSE_REP2

* Complete refactor of ColumnInfoParser

* Implement AST method for retrieving column info

* Use JavaParser library for parsing column info (temporary solution)

* Extended JavaParser implementation, find column info for FB_EER/FB_EiER, FB_NNOSP and FB_MSBF

* dynamic column info data passed to OpenStaticAnalyzer and processed properly

* ColumnInfoParser uses anonymous VoidVisitor class to visit nodes, minor code cleanup

* Minor code cleanup

* Insert TODOs

* Refactor - Replace temp with Query, minor changes

* Refactor - SRP: Separate 'column info attach' from VulnerabilityLocation

* Refactor - Clean OpenStaticAnalyzer

* Refactor - Clean OpenStaticAnalyzer

* Create integration test for: extracting column info #6

* Framework repair (#77)

* Refactor - Extract configuration attributes

* Refactor - Replace temp with Query

* Refactor - Fix ToolFactory path issue

* Refactor - Extract tasks

* Enhance console output with own logger

* Enhance console output, redirect all the current info into the log file with own logger

* Create validation folder, #72

* Enhance console output #45

* Refactor - Parameterize Function

* Add support for Gradle #44

* Refactor - Replace temp with Query, minor changes

* Refactor - SRP: Separate 'column info attach' from VulnerabilityLocation

* Refactor - Clean OpenStaticAnalyzer

* Fix NullPointerException in getResultPair()

* Skip build when the generated patch is empty

* Log Vulnerabilities

* Add support for MavenCLI

* Fix failure on not retrieved column info

* Get mapping properties from config

* Log elapsed time

* Disable test case

* Create statistics

* Create statistics

* Fix invalid elapsed time

* Refactor - Simplify OpenStaticAnalyzer

* Extend pairing with variable source path #87

* Trying to fix #88

* Save number of generated/filtered/verified patches

* Upload missing method

* Fix command line argument usage

* Remove copyDependency option from CLI patchers

* Add an option to change the source path of the analysed project

* Separate log files for each build

* Save unit test results for each compiled patch

* Clarify patch name in patch_unit_test.csv

* Separate Vuln_ID and Patch in patch_unit_test.csv

* Updated CodeRepair to 1.0.2

* Updated README.md with working command

* Remove copyDependency option from CLI patchers

* Updated CodeRepair to 1.0.2

* Updated README.md with working command

* Fix path issue

* Change path to relative
  • Loading branch information
fea-devteam authored Jul 29, 2022
1 parent aa653da commit 2065849
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/test/java/eu/assuremoss/utils/ConfigurationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ static void setup() throws IOException {
@Test
void shouldReadGeneralSettings() {
assertEquals("test-project", config.properties.getProperty("config.project_name"));
assertEquals("d:\\AIFix4SecCode\\test-project", config.properties.getProperty("config.project_path"));
assertEquals(PathHandler.joinPath(Utils.getWorkingDir(), "test-project"), config.properties.getProperty("config.project_path"));
assertEquals("src\\main\\java", config.properties.getProperty("config.project_source_path"));
assertEquals("maven", config.properties.getProperty("config.project_build_tool"));
assertEquals("d:\\OpenStaticAnalyzer-4.1.0-x64-Windows\\Java", config.properties.getProperty("config.osa_path"));
Expand Down Expand Up @@ -72,11 +72,11 @@ void shouldArchiveBeDisabled() {

@Test
void shouldGetDescriptionPath() {
assertEquals("d:\\AIFix4SecCode\\test-project\\results\\osa_xml", Configuration.descriptionPath(config.properties));
assertEquals(PathHandler.joinPath("d:\\AIFix4SecCode\\test-project\\results", "osa_xml"), Configuration.descriptionPath(config.properties));
}

@Test
void shouldGetPatchSavePath() {
assertEquals("d:\\AIFix4SecCode\\test-project\\results\\patches", Configuration.patchSavePath(config.properties));
assertEquals(PathHandler.joinPath("d:\\AIFix4SecCode\\test-project\\results", "patches"), Configuration.patchSavePath(config.properties));
}
}
2 changes: 1 addition & 1 deletion src/test/resources/config-example.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# General settings

config.project_name=test-project
config.project_path=d:\\AIFix4SecCode\\test-project
config.project_path=test-project
config.project_source_path=src\\main\\java
config.project_build_tool=maven
config.osa_path=d:\\OpenStaticAnalyzer-4.1.0-x64-Windows\\Java
Expand Down

0 comments on commit 2065849

Please sign in to comment.