diff --git a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/DataflowEntry.java b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/DataflowEntry.java index fbbd14dafd0449a57df9e65bf9ff377185390c45..2de67394ecca994728b70229a105000c095e7bb5 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/DataflowEntry.java +++ b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/DataflowEntry.java @@ -114,4 +114,35 @@ public class DataflowEntry { this.direction = direction; } + @Override + public boolean equals(final Object object) { + if (object instanceof DataflowEntry) { + final DataflowEntry other = (DataflowEntry) object; + return this.checkString(this.sourcePath, other.getSourcePath()) + && this.checkString(this.sourceModule, other.getSourceModule()) + && this.checkString(this.sourceOperation, other.getSourceOperation()) + && this.checkString(this.targetPath, other.getTargetPath()) + && this.checkString(this.targetModule, other.getTargetModule()) + && this.checkString(this.targetOperation, other.getTargetOperation()); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.sourcePath.hashCode() ^ this.sourceModule.hashCode() ^ this.sourceOperation.hashCode() + ^ this.targetPath.hashCode() ^ this.targetModule.hashCode() ^ this.targetOperation.hashCode(); + } + } diff --git a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/FileOperationEntry.java b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/FileOperationEntry.java index 501abed26605afee2147d5b9a8828134d6d89cb8..b3aea106dda9c623e3cfd76f0ad7ca2584c5bdcb 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/FileOperationEntry.java +++ b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/FileOperationEntry.java @@ -1,3 +1,18 @@ +/*************************************************************************** + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ package org.oceandsl.analysis.code.stages.data; import org.csveed.annotations.CsvCell; @@ -33,4 +48,29 @@ public class FileOperationEntry { public void setName(final String name) { this.name = name; } + + @Override + public boolean equals(final Object object) { + if (object instanceof FileOperationEntry) { + final FileOperationEntry other = (FileOperationEntry) object; + return this.checkString(this.name, other.getName()) && this.checkString(this.path, other.getPath()); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.name.hashCode() ^ this.path.hashCode(); + } } diff --git a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/GlobalDataEntry.java b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/GlobalDataEntry.java index 70b85b77ceb9a14b8e40cdbc9dd554d08a2dc658..532416ada9c32c70e8b0354ccdbf59001830de7e 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/GlobalDataEntry.java +++ b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/GlobalDataEntry.java @@ -1,3 +1,18 @@ +/*************************************************************************** + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ package org.oceandsl.analysis.code.stages.data; import org.csveed.annotations.CsvCell; @@ -59,4 +74,31 @@ public class GlobalDataEntry { this.variables = variables; } + @Override + public boolean equals(final Object object) { + if (object instanceof GlobalDataEntry) { + final GlobalDataEntry other = (GlobalDataEntry) object; + return this.checkString(this.files, other.getFiles()) && this.checkString(this.modules, other.getModules()) + && this.checkString(this.name, other.getName()) + && this.checkString(this.variables, other.getVariables()); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.name.hashCode() ^ this.files.hashCode() ^ this.modules.hashCode() ^ this.variables.hashCode(); + } + } diff --git a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/NotFoundEntry.java b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/NotFoundEntry.java index 8d75978403b44a22749000fd93286ee3f2db6538..7c35ee8036d243d524d7ea4d495e06bfd3660a99 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/NotFoundEntry.java +++ b/analysis/src/main/java/org/oceandsl/analysis/code/stages/data/NotFoundEntry.java @@ -1,3 +1,18 @@ +/*************************************************************************** + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ package org.oceandsl.analysis.code.stages.data; import org.csveed.annotations.CsvCell; @@ -55,4 +70,31 @@ public class NotFoundEntry { public void setCall(final String call) { this.call = call; } + + @Override + public boolean equals(final Object object) { + if (object instanceof NotFoundEntry) { + final NotFoundEntry other = (NotFoundEntry) object; + return this.checkString(this.call, other.getCall()) && this.checkString(this.fileName, other.getFileName()) + && this.checkString(this.moduleName, other.getModuleName()) + && this.checkString(this.operation, other.getOperation()); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.call.hashCode() ^ this.fileName.hashCode() ^ this.moduleName.hashCode() ^ this.operation.hashCode(); + } } diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/data/package-info.java b/analysis/src/main/java/org/oceandsl/analysis/generic/data/package-info.java deleted file mode 100644 index a7f7a5f7f5c6ff99f911da401b6e3731ac360bb9..0000000000000000000000000000000000000000 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/data/package-info.java +++ /dev/null @@ -1,16 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***************************************************************************/ -package org.oceandsl.analysis.generic.data; \ No newline at end of file diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvRowReaderStage.java b/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvRowReaderStage.java index 02b367f839fbc07c95d36c79fb3580dab635c6de..8e48a649503b8a6895a15fd3aec93a423a4c4343 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvRowReaderStage.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvRowReaderStage.java @@ -57,7 +57,7 @@ public class CsvRowReaderStage<R, T> extends AbstractTransformation<Path, T> { * indicate how to interpret the first line in the CSV file, set to true to indicate * that the first line contains the header information * @param clazz - * bean class + * row class * @throws IOException * when a stream could not be opened. */ diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderProducerStage.java b/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderProducerStage.java index 6d32b6dc2fc8be6fc1039e8ace6c2e6c604ce508..8c6b83aa1ed6a3fc4667a290d99ff57b099ecb0a 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderProducerStage.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderProducerStage.java @@ -31,8 +31,10 @@ import org.oceandsl.analysis.generic.Table; /** * Reader for a CSV file. Outputs the whole file as a table. * + * @param <R> + * label data type * @param <T> - * ICsvRecord datatype + * record data type * * @author Reiner Jung * @since 1.0 @@ -94,7 +96,7 @@ public class CsvTableReaderProducerStage<R, T> extends AbstractProducerStage<Tab * that the first line contains the header information * @param clazz * bean class - * @param pathLabelMapper + * @param mapper * table label mapper object * @throws IOException * when a stream could not be opened. diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderStage.java b/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderStage.java index 73c569f03eb2e8afc7ef1928fba5d01b4b49e102..7dc33d27b96888421dba96a3598156ea2b25a09d 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderStage.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/source/CsvTableReaderStage.java @@ -32,9 +32,9 @@ import org.oceandsl.analysis.generic.Table; * Reader for multiple CSV files. Output them as tables. * * @param <R> - * table label type + * label data type * @param <T> - * ICsvRecord datatype + * record data type * * @author Reiner Jung * @since 1.0 diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/source/FileNameLabelMapper.java b/analysis/src/main/java/org/oceandsl/analysis/generic/source/FileNameLabelMapper.java index bdd5f47ba47956c134336143b275edfd169efdf7..2f7b6aa2fbadaf088e164efced5b5fd1ae821645 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/source/FileNameLabelMapper.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/source/FileNameLabelMapper.java @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright 2023 Kieker Project (http://kieker-monitoring.net) + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/source/IPathLabelMapper.java b/analysis/src/main/java/org/oceandsl/analysis/generic/source/IPathLabelMapper.java index 76d956e6f994e89964b7dbe24b9886cbbf60830b..bcba06f0dd188de10aba23ab508678ecc3cba588 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/source/IPathLabelMapper.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/source/IPathLabelMapper.java @@ -31,8 +31,7 @@ public interface IPathLabelMapper<T> { * * @param path * input path - * @return + * @return returns label */ T map(Path path); - } diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/source/PathLabelMapper.java b/analysis/src/main/java/org/oceandsl/analysis/generic/source/PathLabelMapper.java index 940f93a43e03a92ece38a3688937e30024a9b093..6689df45df9590209dbf7bf797f33465c0220202 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/source/PathLabelMapper.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/source/PathLabelMapper.java @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright 2023 Kieker Project (http://kieker-monitoring.net) + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,5 +28,4 @@ public class PathLabelMapper implements IPathLabelMapper<Path> { public Path map(final Path path) { return path; } - } diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/stages/TableCsvSink.java b/analysis/src/main/java/org/oceandsl/analysis/generic/stages/TableCsvSink.java index 014f15053590586222b11010dd1ef6abf69f414f..e629cfc433bc11b6f2eeef694617083f6da8b3b0 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/stages/TableCsvSink.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/stages/TableCsvSink.java @@ -32,6 +32,8 @@ import org.oceandsl.analysis.generic.Table; /** * Save tables with a specific row type as a csv files based on a path function. * + * @param <R> + * label type * @param <T> * row type * @@ -49,6 +51,18 @@ public class TableCsvSink<R, T> extends AbstractConsumerStage<Table<R, T>> { private Class<T> clazz; private char[] newline; + /** + * Create table sink. + * + * @param filePathFunction + * function to map string to path + * @param clazz + * row data type + * @param header + * boolean flag specify whether a header line should be written + * @param newline + * end of line marker + */ public TableCsvSink(final Function<String, Path> filePathFunction, final Class<T> clazz, final boolean header, final char[] newline) { this.header = header; @@ -57,6 +71,20 @@ public class TableCsvSink<R, T> extends AbstractConsumerStage<Table<R, T>> { this.newline = newline; // NOPMD } + /** + * Create table sink. + * + * @param filePath + * directory path where the output files are placed in. + * @param filename + * filename suffix + * @param clazz + * row data type + * @param header + * boolean flag specify whether a header line should be written + * @param newline + * end of line marker + */ public TableCsvSink(final Path filePath, final String filename, final Class<T> clazz, final boolean header, final char[] newline) { this(new Function<>() { @@ -68,6 +96,18 @@ public class TableCsvSink<R, T> extends AbstractConsumerStage<Table<R, T>> { }, clazz, header, newline); } + /** + * Create table sink. + * + * @param filePath + * directory path where the output files are placed in. + * @param clazz + * row data type + * @param header + * boolean flag specify whether a header line should be written + * @param newline + * end of line marker + */ public TableCsvSink(final Path filePath, final Class<T> clazz, final boolean header, final char[] newline) { this(new Function<>() { @@ -78,22 +118,6 @@ public class TableCsvSink<R, T> extends AbstractConsumerStage<Table<R, T>> { }, clazz, header, newline); } - public TableCsvSink(final Function<String, Path> filePathFunction, final Class<T> clazz, final boolean header) { - this(filePathFunction, clazz, header, TableCsvSink.LF); - } - - public TableCsvSink(final Path filePath, final Class<T> clazz, final boolean header) { - this(filePath, clazz, header, TableCsvSink.LF); - } - - public TableCsvSink(final Path filePath, final String filename, final Class<T> clazz) { - this(filePath, filename, clazz, false, TableCsvSink.LF); - } - - public TableCsvSink(final Path filePath, final String filename, final Class<T> clazz, final boolean header) { - this(filePath, filename, clazz, header, TableCsvSink.LF); - } - @Override protected void execute(final Table<R, T> table) throws IOException { try (final BufferedWriter outputStream = Files diff --git a/analysis/src/main/java/org/oceandsl/analysis/generic/stages/YamlSink.java b/analysis/src/main/java/org/oceandsl/analysis/generic/stages/YamlSink.java index 432ac2bec2bcff4db71c69f63d5d836f25cf0e72..95a625b7d4366abe57b5f82d8ec74de0c99bcd15 100644 --- a/analysis/src/main/java/org/oceandsl/analysis/generic/stages/YamlSink.java +++ b/analysis/src/main/java/org/oceandsl/analysis/generic/stages/YamlSink.java @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright 2023 Kieker Project (http://kieker-monitoring.net) + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,11 @@ import org.yaml.snakeyaml.nodes.Tag; import teetime.framework.AbstractConsumerStage; /** + * Sink creating a yaml file. + * + * @param <T> + * row data type. + * * @author Reiner Jung * @since 1.3.0 */ diff --git a/qa-configurations/import-control.xml b/qa-configurations/import-control.xml index f051bfe82d2b41e6b9b876c65f4194d32ff2b8bf..0130fa6164cc1e80ad69a20e11aefa79aaddc84d 100644 --- a/qa-configurations/import-control.xml +++ b/qa-configurations/import-control.xml @@ -15,12 +15,12 @@ <allow pkg="org.junit"/> <allow pkg="org.json"/> <allow pkg="org.mockito"/> + <allow pkg="org.mosim"/> + <allow pkg="org.osgi"/> <allow pkg="org.powermock"/> <allow pkg="org.slf4j"/> <allow pkg="org.xtext"/> - <allow pkg="org.osgi"/> - <allow pkg="org.mosim"/> - + <allow pkg="org.yaml"/> <allow pkg="lombok"/> <allow pkg="kieker"/> diff --git a/tools/delta/src/main/java/org/oceandsl/tools/delta/Settings.java b/tools/delta/src/main/java/org/oceandsl/tools/delta/Settings.java index fc07a63b3491fe92252b75ab3bb40aeac835ffe4..89fd8d36ea7a3a78bba4e8f8604a02419b288d38 100644 --- a/tools/delta/src/main/java/org/oceandsl/tools/delta/Settings.java +++ b/tools/delta/src/main/java/org/oceandsl/tools/delta/Settings.java @@ -37,6 +37,9 @@ public class Settings { // NOPMD data class "--output" }, required = true, converter = PathConverter.class, description = "Output restructure information as CSV table") private Path outputPath; + @Parameter(names = { "--eol" }, required = false, description = "End of line symbol") + private String lineSeparator = System.lineSeparator(); + public Path getInputPath() { return this.inputPath; } @@ -44,4 +47,12 @@ public class Settings { // NOPMD data class public Path getOutputPath() { return this.outputPath; } + + public char[] getLineSeparator() { + return this.lineSeparator.toCharArray(); + } + + public void setLineSeparator(final String lineSeparator) { + this.lineSeparator = lineSeparator; + } } \ No newline at end of file diff --git a/tools/delta/src/main/java/org/oceandsl/tools/delta/TeetimeConfiguration.java b/tools/delta/src/main/java/org/oceandsl/tools/delta/TeetimeConfiguration.java index 49c55a544c4b8d7ecf84ec2def8d1ad91be65fe9..586825502e4dbc162ec304f647823155007371ca 100644 --- a/tools/delta/src/main/java/org/oceandsl/tools/delta/TeetimeConfiguration.java +++ b/tools/delta/src/main/java/org/oceandsl/tools/delta/TeetimeConfiguration.java @@ -37,7 +37,7 @@ public class TeetimeConfiguration extends Configuration { final CompileRestructureYamlStage yamlProcessor = new CompileRestructureYamlStage(); final TableCsvSink<String, MoveOperationEntry> csvSink = new TableCsvSink<>( - settings.getOutputPath().getParent(), MoveOperationEntry.class, true); + settings.getOutputPath().getParent(), MoveOperationEntry.class, true, settings.getLineSeparator()); final Path outputPath = settings.getOutputPath().getParent().resolve(name + ".yaml"); final YamlSink<YamlRestructureModel> yamlSink = new YamlSink<>(outputPath); @@ -50,4 +50,4 @@ public class TeetimeConfiguration extends Configuration { this.connectPorts(distributor.getNewOutputPort(), yamlProcessor.getInputPort()); this.connectPorts(yamlProcessor.getOutputPort(), yamlSink.getInputPort()); } -} \ No newline at end of file +} diff --git a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/Settings.java b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/Settings.java index 50487ad2da295aff1f643dc6ddded78de8e8b7a7..4c48107197229b89be6405b2331c530e55b9d5b9 100644 --- a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/Settings.java +++ b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/Settings.java @@ -58,6 +58,9 @@ public class Settings { // NOPMD data class "--flat" }, required = false, description = "Scan source directories flat, i.e. not in recusrive mode.") private boolean flat; + @Parameter(names = "--eol", required = false, description = "End of line symbol") + private String lineSeparator = System.lineSeparator(); + public List<Path> getInputDirectoryPaths() { return this.inputDirectoryPaths; } @@ -82,4 +85,12 @@ public class Settings { // NOPMD data class return this.libraryFunctionsPaths; } + public char[] getLineSeparator() { + return this.lineSeparator.toCharArray(); + } + + public void setLineSeparator(final String lineSeparator) { + this.lineSeparator = lineSeparator; + } + } diff --git a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/TeetimeConfiguration.java b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/TeetimeConfiguration.java index bce61abb9d197cc2e299ea91b53abe592d0aac94..bbe78180e9bfb84fb8c0a0c919e913096631d536 100644 --- a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/TeetimeConfiguration.java +++ b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/TeetimeConfiguration.java @@ -111,23 +111,23 @@ public class TeetimeConfiguration extends Configuration { /** output stages. */ final TableCsvSink<String, FileOperationEntry> operationTableSink = new TableCsvSink<>( o -> settings.getOutputDirectoryPath().resolve(TeetimeConfiguration.OPERATION_DEFINITIONS), - FileOperationEntry.class, true); + FileOperationEntry.class, true, settings.getLineSeparator()); final TableCsvSink<String, CallerCalleeEntry> callTableSink = new TableCsvSink<>( o -> settings.getOutputDirectoryPath().resolve(TeetimeConfiguration.CALL_TABLE), - CallerCalleeEntry.class, true); + CallerCalleeEntry.class, true, settings.getLineSeparator()); final TableCsvSink<String, NotFoundEntry> notFoundSink = new TableCsvSink<>( o -> settings.getOutputDirectoryPath().resolve(TeetimeConfiguration.NOT_FOUND), NotFoundEntry.class, - true); + true, settings.getLineSeparator()); final TableCsvSink<String, DataflowEntry> callerCalleeDataflowTableSink = new TableCsvSink<>( o -> settings.getOutputDirectoryPath().resolve(TeetimeConfiguration.DATAFLOW), DataflowEntry.class, - true); + true, settings.getLineSeparator()); final TableCsvSink<String, CommonBlockArgumentDataflow> commonBlockDataflowTableSink = new TableCsvSink<>( o -> settings.getOutputDirectoryPath().resolve(TeetimeConfiguration.DATAFLOW_COMMON_BLOCKS), - CommonBlockArgumentDataflow.class, true); + CommonBlockArgumentDataflow.class, true, settings.getLineSeparator()); final TableCsvSink<String, GlobalDataEntry> commonBlocksTableSink = new TableCsvSink<>( o -> settings.getOutputDirectoryPath().resolve(TeetimeConfiguration.COMMON_BLOCKS), - GlobalDataEntry.class, true); + GlobalDataEntry.class, true, settings.getLineSeparator()); /** connections. */ this.connectPorts(producer.getOutputPort(), directoryScannerStage.getInputPort()); @@ -214,7 +214,7 @@ public class TeetimeConfiguration extends Configuration { result.add(line.substring(marker, i)); mode = 0; } - } else if ((mode == 3) && (ch == ',')) { + } else if (mode == 3 && ch == ',') { mode = 0; } } diff --git a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/calls/ProcessOperationCallStage.java b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/calls/ProcessOperationCallStage.java index 5296dd97c78a0dd3c69ccf70afd6df6b7140bc36..53ec2798e3df8873ef1c6f77ca2cc1806fbc7a6a 100644 --- a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/calls/ProcessOperationCallStage.java +++ b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/calls/ProcessOperationCallStage.java @@ -75,7 +75,6 @@ public class ProcessOperationCallStage extends AbstractFilter<FortranProject> { private void processFunctions(final FortranProject project, final FortranModule module, final Element element, final Table<String, NotFoundEntry> notFoundTable) { - try { final List<Pair<String, String>> calls = NodeUtils.findFunctionCalls(element); this.processCalls(project, module, calls, notFoundTable); @@ -88,7 +87,6 @@ public class ProcessOperationCallStage extends AbstractFilter<FortranProject> { private void processCalls(final FortranProject project, final FortranModule module, final List<Pair<String, String>> calls, final Table<String, NotFoundEntry> notFoundTable) { - calls.forEach(call -> { final Pair<FortranModule, FortranOperation> caller = this.findOperation(project.getModules().values(), call.getFirst()); diff --git a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/DataFlowAnalysisStage.java b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/DataFlowAnalysisStage.java index 2f68ce5725a9fa337dfd7dcbaf08d6f88761670a..1a128e85be8f8e4ad2cc3d99bf66dfcd9fd0fcd6 100644 --- a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/DataFlowAnalysisStage.java +++ b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/DataFlowAnalysisStage.java @@ -578,4 +578,4 @@ public class DataFlowAnalysisStage extends AbstractConsumerStage<FortranProject> } } -} \ No newline at end of file +} diff --git a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/data/CommonBlockArgumentDataflow.java b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/data/CommonBlockArgumentDataflow.java index 1d5a6ad6d261a20b8e918d3402340728c4dd924a..82f90075e875245b56578457e6a4a1b37c9dedfa 100644 --- a/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/data/CommonBlockArgumentDataflow.java +++ b/tools/fxca/src/main/java/org/oceandsl/tools/fxca/stages/dataflow/data/CommonBlockArgumentDataflow.java @@ -41,6 +41,10 @@ public class CommonBlockArgumentDataflow implements IDataflowEntry { @CsvCell(columnIndex = 5, columnName = "direction") private EDirection direction; + public CommonBlockArgumentDataflow() { + // dummy constructor for csveed + } + public CommonBlockArgumentDataflow(final String commonBlockName, final String fileName, final String moduleName, final String operationName, final EDirection direction) { this.commonBlockName = commonBlockName; @@ -90,4 +94,33 @@ public class CommonBlockArgumentDataflow implements IDataflowEntry { this.direction = direction; } + @Override + public boolean equals(final Object object) { + if (object instanceof CommonBlockArgumentDataflow) { + final CommonBlockArgumentDataflow other = (CommonBlockArgumentDataflow) object; + return this.checkString(this.commonBlockName, other.getCommonBlockName()) + && this.checkString(this.fileName, other.getFileName()) + && this.checkString(this.moduleName, other.getModuleName()) + && this.checkString(this.operationName, other.getOperationName()) + && this.direction.equals(other.getDirection()); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.commonBlockName.hashCode() ^ this.direction.hashCode() ^ this.fileName.hashCode() + ^ this.moduleName.hashCode() ^ this.operationName.hashCode(); + } } diff --git a/tools/maa/src/main/java/org/oceandsl/tools/maa/Settings.java b/tools/maa/src/main/java/org/oceandsl/tools/maa/Settings.java index ae8c6b8a31a63df07074defc3261081be00cdfa6..5aab17ab9f323f4256dfa702629869cb6455be76 100644 --- a/tools/maa/src/main/java/org/oceandsl/tools/maa/Settings.java +++ b/tools/maa/src/main/java/org/oceandsl/tools/maa/Settings.java @@ -56,6 +56,9 @@ public class Settings { "--component-statistics" }, required = false, description = "Output numerous component statistics") private boolean componentStatistics; + @Parameter(names = "--eol", required = false, description = "End of line symbol") + private String lineSeparator = System.lineSeparator(); + public Path getInputModelPath() { return this.inputModelPath; } @@ -88,4 +91,11 @@ public class Settings { return this.experimentName; } + public char[] getLineSeparator() { + return this.lineSeparator.toCharArray(); + } + + public void setLineSeparator(final String lineSeparator) { + this.lineSeparator = lineSeparator; + } } diff --git a/tools/maa/src/main/java/org/oceandsl/tools/maa/TeetimeConfiguration.java b/tools/maa/src/main/java/org/oceandsl/tools/maa/TeetimeConfiguration.java index ccc83de2e960c6069da30da6ede0ccff9e7a7e24..40c10a6f5b2dac33a1ae3b053b9168443d7eb8eb 100644 --- a/tools/maa/src/main/java/org/oceandsl/tools/maa/TeetimeConfiguration.java +++ b/tools/maa/src/main/java/org/oceandsl/tools/maa/TeetimeConfiguration.java @@ -60,7 +60,8 @@ public class TeetimeConfiguration extends Configuration { final ProvidedInterfaceTableTransformation providedInterfaceTableTransformation = new ProvidedInterfaceTableTransformation(); final TableCsvSink<String, ProvidedInterfaceEntry> providedInterfaceSink = new TableCsvSink<>( - settings.getOutputModelPath(), "provided-interfaces.csv", ProvidedInterfaceEntry.class, true); + settings.getOutputModelPath(), "provided-interfaces.csv", ProvidedInterfaceEntry.class, true, + settings.getLineSeparator()); OutputPort<ModelRepository> outputPort = modelReader.getOutputPort(); if (settings.isComputeInterfaces()) { @@ -81,7 +82,7 @@ public class TeetimeConfiguration extends Configuration { outputPort = generateProvidedInterfacesStage.getOutputPort(); } - final boolean mapFiles = (settings.getMapFiles() != null) && (settings.getMapFiles().size() > 0); + final boolean mapFiles = settings.getMapFiles() != null && settings.getMapFiles().size() > 0; if (mapFiles) { try { final GroupComponentsHierarchicallyStage groupComponentHierarchicallyStage = new GroupComponentsHierarchicallyStage( @@ -106,8 +107,12 @@ public class TeetimeConfiguration extends Configuration { if (settings.isOperationCalls()) { final OperationCallsStage operationCallsStage = new OperationCallsStage(); final TableCsvSink<String, CallEntry> operationCallSink = new TableCsvSink<>(settings.getOutputModelPath(), - "operation-calls.csv", CallEntry.class, true); +<<<<<<< HEAD + "operation-calls.csv", CallEntry.class, true, settings.getLineSeparator()); +======= + "operation-calls.csv", true; +>>>>>>> origin/main this.connectPorts(distributor.getNewOutputPort(), operationCallsStage.getInputPort()); this.connectPorts(operationCallsStage.getOutputPort(), operationCallSink.getInputPort()); } @@ -115,8 +120,13 @@ public class TeetimeConfiguration extends Configuration { if (settings.isComponentStatistics()) { final ComponentStatisticsStage componentStatisticsStage = new ComponentStatisticsStage(); final TableCsvSink<String, ComponentStatistics> operationCallSink = new TableCsvSink<>( +<<<<<<< HEAD + settings.getOutputModelPath(), "component-statistics.csv", ComponentStatistics.class, true, + settings.getLineSeparator()); +======= settings.getOutputModelPath(), "component-statistics.csv", ComponentStatistics.class, true); +>>>>>>> origin/main this.connectPorts(distributor.getNewOutputPort(), componentStatisticsStage.getInputPort()); this.connectPorts(componentStatisticsStage.getOutputPort(), operationCallSink.getInputPort()); } diff --git a/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ComponentStatistics.java b/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ComponentStatistics.java index 14a976dd0de04dee8bdd868e6fdcd999c23308a1..2fa0ebce6611600b34c9cfb4cbe245eed5a8088a 100644 --- a/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ComponentStatistics.java +++ b/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ComponentStatistics.java @@ -34,6 +34,10 @@ public class ComponentStatistics { @CsvCell(columnIndex = 4, columnName = "requires-operations") private long requiredOperations; + public ComponentStatistics() { + // dummy for csveed + } + public ComponentStatistics(final String componentName, final int operations, final long providedOperations, final long requiredOperations) { this.componentName = componentName; @@ -74,4 +78,32 @@ public class ComponentStatistics { this.requiredOperations = requiredOperations; } + @Override + public boolean equals(final Object object) { + if (object instanceof ComponentStatistics) { + final ComponentStatistics other = (ComponentStatistics) object; + return this.checkString(this.componentName, other.getComponentName()) + && this.operations == other.getOperations() + && this.providedOperations == other.getProvidedOperations() + && this.requiredOperations == other.getRequiredOperations(); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.componentName.hashCode() ^ Long.hashCode(this.operations) ^ Long.hashCode(this.providedOperations) + ^ Long.hashCode(this.requiredOperations); + } } diff --git a/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceEntry.java b/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceEntry.java index b2f7b60dbf8b3526eb71b77427f3f2678f725114..d90921d1469d96d1ec3f289f6fb394937fdbb291 100644 --- a/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceEntry.java +++ b/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceEntry.java @@ -28,6 +28,10 @@ public class ProvidedInterfaceEntry { @CsvCell(columnIndex = 4, columnName = "caller-component-types") private String callerComponentTypes; + public ProvidedInterfaceEntry() { + // dummy for csveed + } + public ProvidedInterfaceEntry(final String componentType, final String providedInterface, final String operation, final String callerComponentTypes) { this.componentType = componentType; @@ -68,4 +72,32 @@ public class ProvidedInterfaceEntry { this.callerComponentTypes = callerComponentTypes; } + @Override + public boolean equals(final Object object) { + if (object instanceof ProvidedInterfaceEntry) { + final ProvidedInterfaceEntry other = (ProvidedInterfaceEntry) object; + return this.checkString(this.callerComponentTypes, other.getCallerComponentTypes()) + && this.checkString(this.componentType, other.getComponentType()) + && this.checkString(this.operation, other.getOperation()) + && this.checkString(this.providedInterface, other.getProvidedInterface()); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.callerComponentTypes.hashCode() ^ this.componentType.hashCode() ^ this.operation.hashCode() + ^ this.providedInterface.hashCode(); + } } diff --git a/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceTableTransformation.java b/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceTableTransformation.java index c151d26e480037a35a6e177f6d258d3af0e53658..ba31823674fef95bcb47ed442a62acdbd345d6f4 100644 --- a/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceTableTransformation.java +++ b/tools/maa/src/main/java/org/oceandsl/tools/maa/stages/ProvidedInterfaceTableTransformation.java @@ -46,7 +46,6 @@ public class ProvidedInterfaceTableTransformation @Override protected void execute(final ModelRepository element) throws Exception { final Table<String, ProvidedInterfaceEntry> table = new Table<>("interfaces"); - final TypeModel typeModel = element.getModel(TypePackage.Literals.TYPE_MODEL); final Map<ProvidedInterfaceType, Set<RequiredInterfaceType>> providedToRequiredMap = this .createLookupProvidedInterfaceType(typeModel.getComponentTypes().values()); diff --git a/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/ExecutionModelMerger.java b/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/ExecutionModelMerger.java index 4dbcf0f6a4f92847906d4558897338a48b260834..9aebaa84629edcf7d7d0aab08750ae035fb51ebd 100644 --- a/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/ExecutionModelMerger.java +++ b/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/ExecutionModelMerger.java @@ -41,21 +41,21 @@ public final class ExecutionModelMerger { } /* default */ static void mergeExecutionModel(final DeploymentModel deploymentModel, // NOPMD - final ExecutionModel targetModel, final ExecutionModel mergeModel) { - ExecutionModelMerger.mergeInvocations(deploymentModel, targetModel, mergeModel); - ExecutionModelMerger.mergeStorageDataflows(deploymentModel, targetModel, mergeModel); - ExecutionModelMerger.mergeOperationDataflows(deploymentModel, targetModel, mergeModel); + final ExecutionModel lastModel, final ExecutionModel mergeModel) { + ExecutionModelMerger.mergeInvocations(deploymentModel, lastModel, mergeModel); + ExecutionModelMerger.mergeStorageDataflows(deploymentModel, lastModel, mergeModel); + ExecutionModelMerger.mergeOperationDataflows(deploymentModel, lastModel, mergeModel); } - private static void mergeInvocations(final DeploymentModel deploymentModel, final ExecutionModel targetModel, + private static void mergeInvocations(final DeploymentModel deploymentModel, final ExecutionModel lastModel, final ExecutionModel mergeModel) { for (final Entry<Tuple<DeployedOperation, DeployedOperation>, Invocation> entry : mergeModel.getInvocations()) { - if (!ExecutionModelMerger.compareTupleOperationKeys(targetModel.getInvocations(), entry.getKey())) { + if (!ExecutionModelMerger.compareTupleOperationKeys(lastModel.getInvocations(), entry.getKey())) { final Invocation value = ExecutionModelCloneUtils.duplicate(deploymentModel, entry.getValue()); final Tuple<DeployedOperation, DeployedOperation> key = ExecutionFactory.eINSTANCE.createTuple(); key.setFirst(value.getCaller()); key.setSecond(value.getCallee()); - targetModel.getInvocations().put(key, value); + lastModel.getInvocations().put(key, value); } } } @@ -72,41 +72,39 @@ public final class ExecutionModelMerger { return false; } - private static void mergeStorageDataflows(final DeploymentModel deploymentModel, final ExecutionModel targetModel, + private static void mergeStorageDataflows(final DeploymentModel deploymentModel, final ExecutionModel lastModel, final ExecutionModel mergeModel) { for (final Entry<Tuple<DeployedOperation, DeployedStorage>, StorageDataflow> entry : mergeModel .getStorageDataflows()) { - final Tuple<DeployedOperation, DeployedStorage> targetModelKey = ExecutionModelMerger - .findTupleStorageKeys(targetModel.getStorageDataflows(), entry.getKey()); - ExecutionModelMerger.mergeStorageDataflow(targetModelKey, deploymentModel, targetModel, entry.getValue()); + final Tuple<DeployedOperation, DeployedStorage> lastModelKey = ExecutionModelMerger + .findTupleStorageKeys(lastModel.getStorageDataflows(), entry.getKey()); + ExecutionModelMerger.mergeStorageDataflow(lastModelKey, deploymentModel, lastModel, entry.getValue()); } } - private static void mergeStorageDataflow(final Tuple<DeployedOperation, DeployedStorage> targetModelKey, - final DeploymentModel deploymentModel, final ExecutionModel targetModel, + private static void mergeStorageDataflow(final Tuple<DeployedOperation, DeployedStorage> lastModelKey, + final DeploymentModel deploymentModel, final ExecutionModel lastModel, final StorageDataflow sourceStorageDataflow) { - if (targetModelKey == null) { - ExecutionModelMerger.mergeStorageDataflowNotExistingInTargetModel(deploymentModel, targetModel, + if (lastModelKey == null) { + ExecutionModelMerger.mergeStorageDataflowNotExistingInlastModel(deploymentModel, lastModel, sourceStorageDataflow); } else { - ExecutionModelMerger.mergeStorageDataflowExistingInTarget(targetModel, targetModelKey, - sourceStorageDataflow); + ExecutionModelMerger.mergeStorageDataflowExistingInTarget(lastModel, lastModelKey, sourceStorageDataflow); } } - private static void mergeStorageDataflowNotExistingInTargetModel(final DeploymentModel deploymentModel, - final ExecutionModel targetModel, final StorageDataflow sourceStorageDataflow) { + private static void mergeStorageDataflowNotExistingInlastModel(final DeploymentModel deploymentModel, + final ExecutionModel lastModel, final StorageDataflow sourceStorageDataflow) { final StorageDataflow value = ExecutionModelCloneUtils.duplicate(deploymentModel, sourceStorageDataflow); final Tuple<DeployedOperation, DeployedStorage> key = ExecutionFactory.eINSTANCE.createTuple(); key.setFirst(value.getCode()); key.setSecond(value.getStorage()); - targetModel.getStorageDataflows().put(key, value); + lastModel.getStorageDataflows().put(key, value); } - private static void mergeStorageDataflowExistingInTarget(final ExecutionModel targetModel, - final Tuple<DeployedOperation, DeployedStorage> targetModelKey, - final StorageDataflow sourceStorageDataflow) { - final StorageDataflow targetStorageDataflow = targetModel.getStorageDataflows().get(targetModelKey); + private static void mergeStorageDataflowExistingInTarget(final ExecutionModel lastModel, + final Tuple<DeployedOperation, DeployedStorage> lastModelKey, final StorageDataflow sourceStorageDataflow) { + final StorageDataflow targetStorageDataflow = lastModel.getStorageDataflows().get(lastModelKey); switch (sourceStorageDataflow.getDirection()) { case READ: if (targetStorageDataflow.getDirection() == EDirection.WRITE) { @@ -125,7 +123,7 @@ public final class ExecutionModelMerger { throw new InternalError( "Found unsupported direction type " + sourceStorageDataflow.getDirection().getName()); } - targetModel.getStorageDataflows().put(targetModelKey, targetStorageDataflow); + lastModel.getStorageDataflows().put(lastModelKey, targetStorageDataflow); } private static Tuple<DeployedOperation, DeployedStorage> findTupleStorageKeys( @@ -140,36 +138,36 @@ public final class ExecutionModelMerger { return null; } - private static void mergeOperationDataflows(final DeploymentModel deploymentModel, final ExecutionModel targetModel, + private static void mergeOperationDataflows(final DeploymentModel deploymentModel, final ExecutionModel lastModel, final ExecutionModel mergeModel) { for (final Entry<Tuple<DeployedOperation, DeployedOperation>, OperationDataflow> entry : mergeModel .getOperationDataflows()) { - final Tuple<DeployedOperation, DeployedOperation> targetModelKey = ExecutionModelMerger - .findTupleOperationKeys(targetModel.getOperationDataflows(), entry.getKey()); + final Tuple<DeployedOperation, DeployedOperation> lastModelKey = ExecutionModelMerger + .findTupleOperationKeys(lastModel.getOperationDataflows(), entry.getKey()); final OperationDataflow sourceOperationDataflow = entry.getValue(); - if (targetModelKey == null) { - ExecutionModelMerger.mergeOperationDataflowNotExistingInTargetModel(deploymentModel, targetModel, + if (lastModelKey == null) { + ExecutionModelMerger.mergeOperationDataflowNotExistingInlastModel(deploymentModel, lastModel, sourceOperationDataflow); } else { - ExecutionModelMerger.mergeOperationDataflowExistingInTarget(targetModel, targetModelKey, + ExecutionModelMerger.mergeOperationDataflowExistingInTarget(lastModel, lastModelKey, sourceOperationDataflow); } } } - private static void mergeOperationDataflowNotExistingInTargetModel(final DeploymentModel deploymentModel, - final ExecutionModel targetModel, final OperationDataflow sourceOperationDataflow) { + private static void mergeOperationDataflowNotExistingInlastModel(final DeploymentModel deploymentModel, + final ExecutionModel lastModel, final OperationDataflow sourceOperationDataflow) { final OperationDataflow value = ExecutionModelCloneUtils.duplicate(deploymentModel, sourceOperationDataflow); final Tuple<DeployedOperation, DeployedOperation> key = ExecutionFactory.eINSTANCE.createTuple(); key.setFirst(value.getCaller()); key.setSecond(value.getCallee()); - targetModel.getOperationDataflows().put(key, value); + lastModel.getOperationDataflows().put(key, value); } - private static void mergeOperationDataflowExistingInTarget(final ExecutionModel targetModel, - final Tuple<DeployedOperation, DeployedOperation> targetModelKey, + private static void mergeOperationDataflowExistingInTarget(final ExecutionModel lastModel, + final Tuple<DeployedOperation, DeployedOperation> lastModelKey, final OperationDataflow sourceOperationDataflow) { - final OperationDataflow targetOperationDataflow = targetModel.getOperationDataflows().get(targetModelKey); + final OperationDataflow targetOperationDataflow = lastModel.getOperationDataflows().get(lastModelKey); switch (sourceOperationDataflow.getDirection()) { case READ: if (targetOperationDataflow.getDirection() == EDirection.WRITE) { @@ -188,7 +186,7 @@ public final class ExecutionModelMerger { throw new InternalError( "Found unsupported direction type " + sourceOperationDataflow.getDirection().getName()); } - targetModel.getOperationDataflows().put(targetModelKey, targetOperationDataflow); + lastModel.getOperationDataflows().put(lastModelKey, targetOperationDataflow); } private static Tuple<DeployedOperation, DeployedOperation> findTupleOperationKeys( diff --git a/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/StatisticsModelMerger.java b/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/StatisticsModelMerger.java index 1badc39d2fb00d81077ded60046622c314264208..f58843e5ca42cf32d42b705977b144b972d266dd 100644 --- a/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/StatisticsModelMerger.java +++ b/tools/mop/src/main/java/org/oceandsl/tools/mop/merge/StatisticsModelMerger.java @@ -174,7 +174,7 @@ public final class StatisticsModelMerger { private static boolean isIdenticalStorageDataflow(final StorageDataflow targetDataflow, final StorageDataflow dataflow) { - if ((dataflow.getDirection() == null) || StatisticsModelMerger.LOGGER.isDebugEnabled()) { + if (dataflow.getDirection() == null || StatisticsModelMerger.LOGGER.isDebugEnabled()) { StatisticsModelMerger.LOGGER.debug("dataflow {}:{} <--> {}:{}\n", dataflow.getCode().getComponent().getSignature(), dataflow.getCode().getAssemblyOperation().getOperationType().getSignature(), @@ -182,7 +182,7 @@ public final class StatisticsModelMerger { dataflow.getStorage().getAssemblyStorage().getStorageType().getName()); } - if ((targetDataflow.getDirection() == null) || StatisticsModelMerger.LOGGER.isDebugEnabled()) { + if (targetDataflow.getDirection() == null || StatisticsModelMerger.LOGGER.isDebugEnabled()) { StatisticsModelMerger.LOGGER.debug("target dataflow {}:{} <--> {}:{}\n", targetDataflow.getCode().getComponent().getSignature(), targetDataflow.getCode().getAssemblyOperation().getOperationType().getSignature(), diff --git a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/Settings.java b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/Settings.java index d6f4ddbdc9fdb48f478705756ae580b458e48f4d..d2db88830bdcb66ab75b6f499a8c7d1845dae578 100644 --- a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/Settings.java +++ b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/Settings.java @@ -64,6 +64,9 @@ public class Settings { // NOPMD "--mode" }, required = true, variableArity = true, converter = GraphGenerationConverter.class, description = "Mode deciding whether an edge is added when its nodes are not selected") private EGraphGenerationMode graphGenerationMode; + @Parameter(names = "--eol", required = false, description = "End of line symbol") + private String lineSeparator = System.lineSeparator(); + public Path getInputDirectory() { return this.inputDirectory; } @@ -91,4 +94,12 @@ public class Settings { // NOPMD public EGraphGenerationMode getGraphGenerationMode() { return this.graphGenerationMode; } + + public char[] getLineSeparator() { + return this.lineSeparator.toCharArray(); + } + + public void setLineSeparator(final String lineSeparator) { + this.lineSeparator = lineSeparator; + } } diff --git a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/TeetimeConfiguration.java b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/TeetimeConfiguration.java index 06876934e33445aab57265e51920128c7c2ddd42..f4d4be42868268d18fd6b4544105aa911e89799c 100644 --- a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/TeetimeConfiguration.java +++ b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/TeetimeConfiguration.java @@ -153,9 +153,10 @@ public class TeetimeConfiguration extends Configuration { if (settings.getComputeStatistics().contains(EStatistics.NUM_OF_CALLS)) { final NumberOfCallsStage numberOfCallsStage = new NumberOfCallsStage(); final TableCsvSink<String, NumberOfCallsEntry> operationCallSink = new TableCsvSink<>( - settings.getOutputDirectory(), String.format("%s-%s", settings.getSelector().getFilePrefix(), + settings.getOutputDirectory(), + String.format("%s-%s", settings.getSelector().getFilePrefix(), TeetimeConfiguration.OPERATION_CALLS_CSV), - NumberOfCallsEntry.class); + NumberOfCallsEntry.class, true, settings.getLineSeparator()); this.connectPorts(statisticsDistributor.getNewOutputPort(), numberOfCallsStage.getInputPort()); this.connectPorts(numberOfCallsStage.getOutputPort(), operationCallSink.getInputPort()); @@ -173,9 +174,10 @@ public class TeetimeConfiguration extends Configuration { final OperationNodeCountCouplingStage functionNodeCouplingStage = new OperationNodeCountCouplingStage(); final TableCsvSink<String, OperationNodeCountEntry> distinctOperationDegreeSink = new TableCsvSink<>( - settings.getOutputDirectory(), String.format("%s-%s", settings.getSelector().getFilePrefix(), + settings.getOutputDirectory(), + String.format("%s-%s", settings.getSelector().getFilePrefix(), TeetimeConfiguration.DISTINCT_OPERATION_DEGREE_CSV), - OperationNodeCountEntry.class); + OperationNodeCountEntry.class, true, settings.getLineSeparator()); this.connectPorts(statisticsDistributor.getNewOutputPort(), functionCallGraphStage.getInputPort()); this.connectPorts(functionCallGraphStage.getOutputPort(), functionNodeCouplingStage.getInputPort()); @@ -194,9 +196,10 @@ public class TeetimeConfiguration extends Configuration { final ModuleNodeCountCouplingStage moduleNodeCouplingStage = new ModuleNodeCountCouplingStage(); final TableCsvSink<String, ModuleNodeCountCouplingEntry> distinctModuleDegreeSink = new TableCsvSink<>( - settings.getOutputDirectory(), String.format("%s-%s", settings.getSelector().getFilePrefix(), + settings.getOutputDirectory(), + String.format("%s-%s", settings.getSelector().getFilePrefix(), TeetimeConfiguration.DISTINCT_MODULE_DEGREE_CSV), - ModuleNodeCountCouplingEntry.class); + ModuleNodeCountCouplingEntry.class, true, settings.getLineSeparator()); this.connectPorts(statisticsDistributor.getNewOutputPort(), moduleCallGraphStage.getInputPort()); this.connectPorts(moduleCallGraphStage.getOutputPort(), moduleNodeCouplingStage.getInputPort()); diff --git a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/ModuleNodeCountCouplingEntry.java b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/ModuleNodeCountCouplingEntry.java index 3bd54dfde04aa7ce998d7a7bd52e600c3a603ef3..8ec761f84bc73d5a92e70f5c50ec0b6937b2d265 100644 --- a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/ModuleNodeCountCouplingEntry.java +++ b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/ModuleNodeCountCouplingEntry.java @@ -1,3 +1,18 @@ +/*************************************************************************** + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ package org.oceandsl.tools.mvis.stages.metrics; import org.csveed.annotations.CsvCell; @@ -11,6 +26,10 @@ public class ModuleNodeCountCouplingEntry { @CsvCell(columnIndex = 3, columnName = "out-edges") private int outEdges; + public ModuleNodeCountCouplingEntry() { + // dummy for csveed + } + public ModuleNodeCountCouplingEntry(final String module, final int inEdges, final int outEdges) { this.module = module; this.inEdges = inEdges; @@ -41,4 +60,30 @@ public class ModuleNodeCountCouplingEntry { this.outEdges = outEdges; } + @Override + public boolean equals(final Object object) { + if (object instanceof ModuleNodeCountCouplingEntry) { + final ModuleNodeCountCouplingEntry other = (ModuleNodeCountCouplingEntry) object; + return this.checkString(this.module, other.getModule()) && this.inEdges == other.getInEdges() + && this.outEdges == other.getOutEdges(); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.module.hashCode() ^ Long.hashCode(this.inEdges) ^ Long.hashCode(this.outEdges); + } + } diff --git a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/NumberOfCallsEntry.java b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/NumberOfCallsEntry.java index 559df57c60b6920ec64a8a9a79587ce8b4a229c6..2fde26f5f33f40c2a94c629be16ff4be417bf904 100644 --- a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/NumberOfCallsEntry.java +++ b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/NumberOfCallsEntry.java @@ -1,3 +1,18 @@ +/*************************************************************************** + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ package org.oceandsl.tools.mvis.stages.metrics; import org.csveed.annotations.CsvCell; @@ -5,16 +20,19 @@ import org.csveed.annotations.CsvCell; public class NumberOfCallsEntry { @CsvCell(columnIndex = 1, columnName = "source-path") - private final String sourceFile; + private String sourceFile; @CsvCell(columnIndex = 2, columnName = "source-operation") - private final String sourceFunction; + private String sourceFunction; @CsvCell(columnIndex = 3, columnName = "target-path") - private final String targetFile; + private String targetFile; @CsvCell(columnIndex = 4, columnName = "target-operation") - private final String targetFunction; + private String targetFunction; @CsvCell(columnIndex = 5, columnName = "calls") + private long calls; - private final long calls; + public NumberOfCallsEntry() { + // dummy constructor for csveed + } public NumberOfCallsEntry(final String sourceFile, final String sourceFunction, final String targetFile, final String targetFunction, final long calls) { @@ -29,20 +47,69 @@ public class NumberOfCallsEntry { return this.sourceFile; } + public void setSourceFile(final String sourceFile) { + this.sourceFile = sourceFile; + } + public String getSourceFunction() { return this.sourceFunction; } + public void setSourceFunction(final String sourceFunction) { + this.sourceFunction = sourceFunction; + } + public String getTargetFile() { return this.targetFile; } + public void setTargetFile(final String targetFile) { + this.targetFile = targetFile; + } + public String getTargetFunction() { return this.targetFunction; } + public void setTargetFunction(final String targetFunction) { + this.targetFunction = targetFunction; + } + public long getCalls() { return this.calls; } + public void setCalls(final long calls) { + this.calls = calls; + } + + @Override + public boolean equals(final Object object) { + if (object instanceof NumberOfCallsEntry) { + final NumberOfCallsEntry other = (NumberOfCallsEntry) object; + return this.checkString(this.sourceFile, other.getSourceFile()) + && this.checkString(this.sourceFunction, other.getSourceFunction()) + && this.checkString(this.targetFile, other.getTargetFile()) + && this.checkString(this.targetFunction, other.getTargetFunction()) + && this.calls == other.getCalls(); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.sourceFile.hashCode() ^ this.sourceFunction.hashCode() ^ this.targetFile.hashCode() + ^ this.targetFunction.hashCode() ^ Long.hashCode(this.calls); + } } diff --git a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/OperationNodeCountEntry.java b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/OperationNodeCountEntry.java index c815eb1093e72fc59c1124413d53beb77148d210..6e604ed232732cec324ae234d1c5f86ceb5a52d2 100644 --- a/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/OperationNodeCountEntry.java +++ b/tools/mvis/src/main/java/org/oceandsl/tools/mvis/stages/metrics/OperationNodeCountEntry.java @@ -1,3 +1,18 @@ +/*************************************************************************** + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ package org.oceandsl.tools.mvis.stages.metrics; import org.csveed.annotations.CsvCell; @@ -5,13 +20,17 @@ import org.csveed.annotations.CsvCell; public class OperationNodeCountEntry { @CsvCell(columnIndex = 1, columnName = "module") - private final String module; + private String module; @CsvCell(columnIndex = 2, columnName = "operation") - private final String operation; + private String operation; @CsvCell(columnIndex = 3, columnName = "in-edges") - private final int inEdges; + private int inEdges; @CsvCell(columnIndex = 4, columnName = "out-edges") - private final int outEdges; + private int outEdges; + + public OperationNodeCountEntry() { + // dummy constructor for csveed + } public OperationNodeCountEntry(final String module, final String operation, final int inEdges, final int outEdges) { this.module = module; @@ -24,16 +43,59 @@ public class OperationNodeCountEntry { return this.module; } + public void setModule(final String module) { + this.module = module; + } + public String getOperation() { return this.operation; } + public void setOperation(final String operation) { + this.operation = operation; + } + public int getInEdges() { return this.inEdges; } + public void setInEdges(final int inEdges) { + this.inEdges = inEdges; + } + public int getOutEdges() { return this.outEdges; } + public void setOutEdges(final int outEdges) { + this.outEdges = outEdges; + } + + @Override + public boolean equals(final Object object) { + if (object instanceof OperationNodeCountEntry) { + final OperationNodeCountEntry other = (OperationNodeCountEntry) object; + return this.checkString(this.module, other.getModule()) + && this.checkString(this.operation, other.getOperation()) && this.inEdges == other.getInEdges() + && this.outEdges == other.getOutEdges(); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.module.hashCode() ^ this.operation.hashCode() ^ Integer.hashCode(this.inEdges) + ^ Integer.hashCode(this.outEdges); + } } diff --git a/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/Settings.java b/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/Settings.java index 3816128360561d31848410cccc699e4d136f25b1..9270a5776968bde0e94028df8ecf961e8bac3eff 100644 --- a/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/Settings.java +++ b/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/Settings.java @@ -44,6 +44,9 @@ public class Settings { // NOPMD data class "--strategy" }, required = true, converter = MappingStrategyConverter.class, description = "Strategy identifier") private EMappingStrategy mappingStrat; + @Parameter(names = "--eol", required = false, description = "End of line symbol") + private String lineSeparator = System.lineSeparator(); + public List<Path> getInputModelPaths() { return this.inputModelPaths; } @@ -60,4 +63,11 @@ public class Settings { // NOPMD data class return this.mappingStrat; } + public char[] getLineSeparator() { + return this.lineSeparator.toCharArray(); + } + + public void setLineSeparator(final String lineSeparator) { + this.lineSeparator = lineSeparator; + } } \ No newline at end of file diff --git a/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/TeetimeConfiguration.java b/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/TeetimeConfiguration.java index c9969fd5cd67ab490d813bb47d2a353da254fb19..5a9f78fced8538965023798579b70c182c1aaf75 100644 --- a/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/TeetimeConfiguration.java +++ b/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/TeetimeConfiguration.java @@ -37,17 +37,17 @@ import org.oceandsl.tools.restructuring.stages.TraceRestoratorStage; */ public class TeetimeConfiguration extends Configuration { - public TeetimeConfiguration(final Settings parameterConfiguration) throws IOException { + public TeetimeConfiguration(final Settings settings) throws IOException { - final ModelSource modelSource = new ModelSource(parameterConfiguration.getInputModelPaths()); + final ModelSource modelSource = new ModelSource(settings.getInputModelPaths()); final ModelRepositoryReaderStage modelReader = new ModelRepositoryReaderStage(); - final TraceRestoratorStage traceRestorator = new TraceRestoratorStage(parameterConfiguration.getMappingStrat()); + final TraceRestoratorStage traceRestorator = new TraceRestoratorStage(settings.getMappingStrat()); final RestructurerStage restructurer = new RestructurerStage(); final GenerateRestructureModelStage generateModelStage = new GenerateRestructureModelStage(); - final RestructureModelSink modelSink = new RestructureModelSink(parameterConfiguration.getOutputDirectory()); + final RestructureModelSink modelSink = new RestructureModelSink(settings.getOutputDirectory()); final AggregateModelEditDistanceStage aggregateStage = new AggregateModelEditDistanceStage(); final TableCsvSink<String, ModelEditDistanceEntry> medSinkStage = new TableCsvSink<>( - parameterConfiguration.getOutputDirectory(), ModelEditDistanceEntry.class, true); + settings.getOutputDirectory(), ModelEditDistanceEntry.class, true, settings.getLineSeparator()); this.connectPorts(modelSource.getOutputPort(), modelReader.getInputPort()); @@ -61,4 +61,4 @@ public class TeetimeConfiguration extends Configuration { this.connectPorts(restructurer.getNumberOfStepsOutputPort(), aggregateStage.getInputPort()); this.connectPorts(aggregateStage.getOutputPort(), medSinkStage.getInputPort()); } -} \ No newline at end of file +} diff --git a/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/stages/ModelEditDistanceEntry.java b/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/stages/ModelEditDistanceEntry.java index bdbdb69cd9c1afce67c2f856dd033d3485a7b19f..5eefca087af210e74bca3703869e5332efb853cf 100644 --- a/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/stages/ModelEditDistanceEntry.java +++ b/tools/restructuring/src/main/java/org/oceandsl/tools/restructuring/stages/ModelEditDistanceEntry.java @@ -41,4 +41,31 @@ public class ModelEditDistanceEntry { this.numberOfSteps = numberOfSteps; } + @Override + public boolean equals(final Object object) { + if (object instanceof ModelEditDistanceEntry) { + final ModelEditDistanceEntry other = (ModelEditDistanceEntry) object; + return this.checkString(this.goalModelName, other.getGoalModelName()) + && this.checkString(this.originalModelName, other.getOriginalModelName()) + && this.numberOfSteps == other.getNumberOfSteps(); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.goalModelName.hashCode() ^ this.originalModelName.hashCode() ^ Integer.hashCode(this.numberOfSteps); + } + } diff --git a/tools/sar/src/main/java/org/oceandsl/tools/sar/CallerCalleeDataflow.java b/tools/sar/src/main/java/org/oceandsl/tools/sar/CallerCalleeDataflow.java new file mode 100644 index 0000000000000000000000000000000000000000..db5969687d484d1b794717d7ba281812be54cf48 --- /dev/null +++ b/tools/sar/src/main/java/org/oceandsl/tools/sar/CallerCalleeDataflow.java @@ -0,0 +1,64 @@ +/*************************************************************************** + * Copyright (C) 2023 OceanDSL (https://oceandsl.uni-kiel.de) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ***************************************************************************/ +package org.oceandsl.tools.sar; + +import lombok.Getter; +import lombok.Setter; + +import kieker.model.analysismodel.execution.EDirection; + +/** + * @author Reiner Jung + * @since 1.3.0 + * + */ +public class CallerCalleeDataflow { + + @Getter + private final String sourceFileName; + + @Getter + private final String sourceModuleName; + + @Getter + private final String sourceOperationName; + + @Getter + private final String targetFileName; + + @Getter + private final String targetModuleName; + + @Getter + private final String targetOperatioName; + + @Getter + @Setter + private EDirection direction; // NOPMD pmd does not understand lombok + + public CallerCalleeDataflow(final String sourceFileName, final String sourceModuleName, + final String sourceOperationName, final String targetFileName, final String targetModuleName, + final String targetOperatioName, final EDirection direction) { + this.sourceFileName = sourceFileName; + this.sourceModuleName = sourceModuleName; + this.sourceOperationName = sourceOperationName; + this.targetFileName = targetFileName; + this.targetModuleName = targetModuleName; + this.targetOperatioName = targetOperatioName; + this.direction = direction; + } + +} diff --git a/tools/sar/src/main/java/org/oceandsl/tools/sar/StorageOperationDataflow.java b/tools/sar/src/main/java/org/oceandsl/tools/sar/StorageOperationDataflow.java index f54466f0e06f410217b2cadaf1f079aa61628046..47b5fd6e845635c6430cfe727dda4859a6759c6f 100644 --- a/tools/sar/src/main/java/org/oceandsl/tools/sar/StorageOperationDataflow.java +++ b/tools/sar/src/main/java/org/oceandsl/tools/sar/StorageOperationDataflow.java @@ -95,4 +95,34 @@ public class StorageOperationDataflow { this.direction = direction; } + @Override + public boolean equals(final Object object) { + if (object instanceof StorageOperationDataflow) { + final StorageOperationDataflow other = (StorageOperationDataflow) object; + return this.checkString(this.commonBlockName, other.getCommonBlockName()) + && this.checkString(this.fileName, other.getFileName()) + && this.checkString(this.moduleName, other.getModuleName()) + && this.checkString(this.operationName, other.getOperationName()) + && this.direction.equals(other.getDirection()); + } else { + return false; + } + } + + private boolean checkString(final String left, final String right) { + if (left == null && right == null) { + return true; + } else if (left != null && right != null) { + return left.equals(right); + } else { + return false; + } + } + + @Override + public int hashCode() { + return this.commonBlockName.hashCode() ^ this.fileName.hashCode() ^ this.moduleName.hashCode() + ^ this.operationName.hashCode() ^ this.direction.hashCode(); + } + } diff --git a/tools/sar/src/main/java/org/oceandsl/tools/sar/TeetimeDataflowConfiguration.java b/tools/sar/src/main/java/org/oceandsl/tools/sar/TeetimeDataflowConfiguration.java index e72ff32f0ea3bf01540807dcf80b1fa89245b1e6..84fdfac29dca69bee1be751d3b6270ddbaaa6325 100644 --- a/tools/sar/src/main/java/org/oceandsl/tools/sar/TeetimeDataflowConfiguration.java +++ b/tools/sar/src/main/java/org/oceandsl/tools/sar/TeetimeDataflowConfiguration.java @@ -74,6 +74,7 @@ public class TeetimeDataflowConfiguration extends Configuration { final CsvRowReaderProducerStage<DataflowEntry> callerCalleeDataflowReader = new CsvRowReaderProducerStage<>( callerCalleeDataflowPath, settings.getSplitSymbol(), '"', '\\', true, DataflowEntry.class); + final CsvRowReaderProducerStage<StorageOperationDataflow> storageOperationDataflowReader = new CsvRowReaderProducerStage<>( storageDataflowPath, settings.getSplitSymbol(), '"', '\\', true, StorageOperationDataflow.class);