diff --git a/common/build-tools/src/main/resources/build-tools/fb-exclude.xml b/common/build-tools/src/main/resources/build-tools/fb-exclude.xml new file mode 100644 index 0000000000000000000000000000000000000000..e6bf2f14d55849d3424594799311cac559850a55 --- /dev/null +++ b/common/build-tools/src/main/resources/build-tools/fb-exclude.xml @@ -0,0 +1,23 @@ + +<FindBugsFilter> + <!-- Example: http://findbugs.sourceforge.net/manual/filter.html#d0e2103 --> + + <Match> + <Package name="~org.omg.*" /> + </Match> + + <Match> + <Package name="~mamba.examples.systemdomainmodel.*" /> + </Match> + + <Match> + <Package name="~mamba.visualization.*" /> + </Match> + +<!-- <Match> + <Class name="kieker.common.logging.LogImplWebguiLogging" /> + <Method name="addMessage" params="java.lang.String" returns="void" /> + <Bug pattern="RV_RETURN_VALUE_IGNORED" /> + </Match>--> + +</FindBugsFilter> diff --git a/common/build-tools/src/main/resources/build-tools/fb-filter.xml b/common/build-tools/src/main/resources/build-tools/fb-filter.xml deleted file mode 100644 index 8b713727d11bc311ebccb7f41a86f39bb7b656e0..0000000000000000000000000000000000000000 --- a/common/build-tools/src/main/resources/build-tools/fb-filter.xml +++ /dev/null @@ -1,227 +0,0 @@ -<FindBugsFilter> - <!-- Example: http://findbugs.sourceforge.net/manual/filter.html#d0e2103 --> - - <Match> - <Class name="kieker.common.logging.LogImplWebguiLogging" /> - <Method name="addMessage" params="java.lang.String" returns="void" /> - <Bug pattern="RV_RETURN_VALUE_IGNORED" /> - </Match> - - <Match> - <Class - name="kieker.test.analysis.junit.plugin.filter.select.TestTimestampFilter" /> - <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.filter.flow.TraceEventRecords" /> - <Bug pattern="EI_EXPOSE_REP2" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.filter.flow.TraceEventRecords" /> - <Bug pattern="EI_EXPOSE_REP" /> - </Match> - - <Match> - <Class - name="kieker.monitoring.probe.servlet.SessionAndTraceRegistrationFilter" /> - <Method name="doFilter" - params="javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain" - returns="void" /> - <Bug pattern="ES_COMPARING_STRINGS_WITH_EQ" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.jms.JMSReader" /> - <Method name="read" params="" returns="boolean" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.tools.KaxViz" /> - <Method name="main" params="java.lang.String[]" returns="void" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.analysis.AnalysisController" /> - <Method name="getCurrentConfiguration" params="" - returns="kieker.analysis.model.analysisMetaModel.MIProject" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.database.DbReader" /> - <Method name="read" params="" returns="boolean" /> - <Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.database.DbReader" /> - <Method name="table2record" - params="java.sql.Connection,java.lang.String,java.lang.Class" - returns="void" /> - <Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" /> - </Match> - - <Match> - <Class name="kieker.monitoring.writer.database.DbWriterThread" /> - <Method name="consume" params="kieker.common.record.IMonitoringRecord" - returns="void" /> - <Bug pattern="OBL_UNSATISFIED_OBLIGATION" /> - </Match> - - <Match> - <Class name="kieker.monitoring.writer.database.DbWriterThread" /> - <Method name="consume" params="kieker.common.record.IMonitoringRecord" - returns="void" /> - <Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" /> - </Match> - - <Match> - <Class name="kieker.monitoring.writer.database.SyncDbWriter" /> - <Method name="newMonitoringRecord" params="kieker.common.record.IMonitoringRecord" - returns="boolean" /> - <Bug pattern="OBL_UNSATISFIED_OBLIGATION" /> - </Match> - - <Match> - <Class name="kieker.monitoring.writer.database.SyncDbWriter" /> - <Method name="newMonitoringRecord" params="kieker.common.record.IMonitoringRecord" - returns="boolean" /> - <Bug pattern="SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING" /> - </Match> - - <Match> - <Class name="kieker.monitoring.writer.database.DBWriterHelper" /> - <Method name="createTable" params="java.lang.String,java.lang.Class[]" - returns="java.lang.String" /> - <Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" /> - </Match> - - <Match> - <Class name="kieker.monitoring.writer.database.DBWriterHelper" /> - <Method name="createIndexTable" params="" returns="void" /> - <Bug pattern="SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE" /> - </Match> - - <Match> - <Class name="kieker.evaluation.benchmark.Benchmark" /> - <Method name="parseAndInitializeArguments" params="java.lang.String[]" - returns="void" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.monitoring.timer.AbstractTimeSource" /> - <Method name="toString" params="" returns="java.lang.String" /> - <Bug pattern="USM_USELESS_ABSTRACT_METHOD" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.jmx.JMXReader" /> - <Method name="read2" params="" returns="boolean" /> - <Bug pattern="DE_MIGHT_IGNORE" /> - </Match> - - <Match> - <Class name="kieker.common.logging.LogFactory" /> - <Bug pattern="DE_MIGHT_IGNORE" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.filesystem.FSReader" /> - <Method name="read" params="" returns="boolean" /> - <Bug pattern="NN_NAKED_NOTIFY" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.filesystem.FSReader" /> - <Method name="newMonitoringRecord" params="kieker.common.record.IMonitoringRecord" - returns="boolean" /> - <Bug pattern="WA_NOT_IN_LOOP" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.filesystem.FSReader" /> - <Method name="newMonitoringRecord" params="kieker.common.record.IMonitoringRecord" - returns="boolean" /> - <Bug pattern="UW_UNCOND_WAIT" /> - </Match> - - <Match> - <Class name="kieker.monitoring.core.registry.Registry" /> - <Field name="eArrayCached" /> - <Bug pattern="VO_VOLATILE_REFERENCE_TO_ARRAY" /> - </Match> - - <Match> - <Class name="org.apache.commons.logging.impl.Jdk14LoggerPatched" /> - <Method name="getLog" params="java.lang.String" returns="org.apache.commons.logging.Log" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.filesystem.FSDirectoryReader" /> - <Method name="processNormalInputFile" params="java.io.File" - returns="void" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.analysis.plugin.reader.filesystem.FSDirectoryReader" /> - <Method name="processBinaryInputFile" params="java.io.File" - returns="void" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.monitoring.core.controller.JMXController" /> - <Method name="<init>" params="kieker.common.configuration.Configuration" - returns="void" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Class name="kieker.tools.traceAnalysis.TraceAnalysisTool" /> - <Method name="dispatchTasks" params="" returns="boolean" /> - <Bug pattern="REC_CATCH_EXCEPTION" /> - </Match> - - <Match> - <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON" /> - </Match> - - <Match> - <Package name="~kieker\.analysis\.model\.analysisMetaModel.*" /> - <Bug pattern="IC_SUPERCLASS_USES_SUBCLASS_DURING_INITIALIZATION" /> - </Match> - - <Match> - <Package name="~kieker\.analysis\.model\.analysisMetaModel.*" /> - <Bug pattern="RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE" /> - </Match> - - <Match> - <Package name="~kieker\.analysis\.model\.analysisMetaModel.*" /> - <Bug pattern="BC_UNCONFIRMED_CAST" /> - </Match> - - <Match> - <Package name="~kieker\.analysis\.model\.analysisMetaModel.*" /> - <Bug pattern="NP_LOAD_OF_KNOWN_NULL_VALUE" /> - </Match> - - <Match> - <Package name="~kieker\.analysis\.model\.analysisMetaModel.*" /> - <Bug pattern="NM_CONFUSING" /> - </Match> - - <Match> - <Package name="~kieker\.analysis\.model\.analysisMetaModel.*" /> - <Bug pattern="MS_PKGPROTECT" /> - </Match> - - -</FindBugsFilter> diff --git a/common/common/pom.xml b/common/common/pom.xml index ad87054a01a668c0ba9b7e7d75f9d24877ef5539..700f95293cef031c2252b2adb8871b9ea6e54915 100644 --- a/common/common/pom.xml +++ b/common/common/pom.xml @@ -86,15 +86,14 @@ <configLocation>build-tools/cs-conf.xml</configLocation> </configuration> </plugin> - <!-- TODO Must be done --> - <!-- <plugin> --> - <!-- <groupId>org.codehaus.mojo</groupId> --> - <!-- <artifactId>findbugs-maven-plugin</artifactId> --> - <!-- <version>2.4.0</version> --> - <!-- <configuration> --> - <!-- <includeFilterFile>build-tools/fb-filter.xml</includeFilterFile> --> - <!-- </configuration> --> - <!-- </plugin> --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>2.4.0</version> + <configuration> + <excludeFilterFile>build-tools/fb-exclude.xml</excludeFilterFile> + </configuration> + </plugin> </plugins> </reporting> diff --git a/examples/quickstart/src/test/java/mamba/examples/quickstart/SimpleCSVMeasurementProviderTest.java b/examples/quickstart/src/test/java/mamba/examples/quickstart/SimpleCSVMeasurementProviderTest.java index 75457b9006c3d6bc9d78f1256ac7cba581e8bbe4..0d9b7cf938e5a36accab6f20951333c5729ba4eb 100644 --- a/examples/quickstart/src/test/java/mamba/examples/quickstart/SimpleCSVMeasurementProviderTest.java +++ b/examples/quickstart/src/test/java/mamba/examples/quickstart/SimpleCSVMeasurementProviderTest.java @@ -48,12 +48,12 @@ public class SimpleCSVMeasurementProviderTest { } private void executeExample(final URI output) { - final String path = System.getProperty("user.dir"); + final String path = System.getProperty("user.dir").replaceAll("examples" + File.separator + "quickstart", "quickstart-example"); final String[] args = new String[5]; args[0] = path + File.separator + "bookstore-analysis.smm"; args[1] = "LOC"; - args[3] = path + File.separator + "bookstore.system"; - args[4] = "SimpleCSV=" + path + File.separator + "simple.properties"; + args[3] = path + File.separator + "bookstore.system"; + args[4] = "SimpleCSV=" + path + File.separator + "simple.properties"; final URI smmInstance = URI.createFileURI(args[0]); final List<String> requestedMeasures = Arrays @@ -82,7 +82,6 @@ public class SimpleCSVMeasurementProviderTest { controller.execute(); controller.waitForCompletion(); } catch (final MetricsExecutionException e) { - e.printStackTrace(); assertTrue("This must not happen!", false); } catch (final InterruptedException e) { assertTrue("This must not happen!", false); diff --git a/mamba-core/src/main/java/mamba/evaluator/EvaluatorPlugin.java b/mamba-core/src/main/java/mamba/evaluator/EvaluatorPlugin.java deleted file mode 100644 index 6108fed33a26699da7197c92ef2fd81dcde4359e..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/evaluator/EvaluatorPlugin.java +++ /dev/null @@ -1,178 +0,0 @@ -///*************************************************************************** -// * Copyright 2011 by -// * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany -// * + Department of Computer Science -// * + Software Engineering Group -// * -// * 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 mamba.evaluator; -// -//import java.io.File; -//import java.io.IOException; -//import java.util.Collections; -//import java.util.logging.Logger; -//import kieker.analysis.plugin.IAnalysisPlugin; -//import kieker.analysis.plugin.configuration.AbstractInputPort; -//import kieker.analysis.plugin.configuration.IInputPort; -//import kieker.tools.traceAnalysis.systemModel.Execution; -//import mamba.mee.extended.MetricsExecutionEngineMMEK; -//import org.eclipse.emf.common.util.URI; -//import org.eclipse.emf.ecore.resource.Resource; -//import org.eclipse.emf.ecore.resource.ResourceSet; -//import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; -//import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; -//import org.omg.adm.smm.core.SmmModel; -// -//public class EvaluatorPlugin implements IAnalysisPlugin { -// -// private final SmmModel smmModel; -// // private MonitoringModel model; -// // private Map<kieker.tools.traceAnalysis.systemModel.Operation, Operation> opMapping; -// private MetricsExecutionEngineMMEK mee; -// -// public EvaluatorPlugin(final SmmModel smmModel) { -// this.smmModel = smmModel; -// try { -// // final EObject[] domainModels = { ModelFactory.eINSTANCE -// // .createMonitoringModel() }; -// // this.mee = new MetricsExecutionEngineMMEK(smmModel, domainModels); -// // this.registerAggregateFunctions(); -// } catch (final Exception e) { -// Logger.getLogger(this.getClass().toString()).severe( -// "Can't create execution engine"); -// } -// } -// -// private void registerAggregateFunctions() { -// final String implClassName = "kieker.mmek.mee.extended.handler.MMEKFunctions"; -// final String packageName = "org.omg.adm.smm.extended."; -// this.mee.registerAggregateFunction(packageName + "MaxFunction", -// implClassName, "maxFunction"); -// this.mee.registerAggregateFunction(packageName + "MeanFunction", -// implClassName, "meanFunction"); -// this.mee.registerAggregateFunction(packageName + "MedianFunction", -// implClassName, "medianFunction"); -// this.mee.registerAggregateFunction(packageName + "MinFunction", -// implClassName, "minFunction"); -// this.mee.registerAggregateFunction(packageName + "PercentileFunction", -// implClassName, "percentileFunction"); -// this.mee.registerAggregateFunction(packageName + "SumFunction", -// implClassName, "sumFunction"); -// } -// -// /** -// * Performs the actual translation to SMM. -// * -// * @param execution -// */ -// private void newExecution(final Execution execution) { -// // Operation op = this.opMapping.get(execution.getOperation()); -// // if (op == null) { -// // final Signature sig = ModelFactory.eINSTANCE.createSignature(); -// // sig.setName(execution.getOperation().getSignature().getName()); -// // // TODO maybe component was already created -// // // so create hash map with full qualified name -// // final Component component = ModelFactory.eINSTANCE -// // .createComponent(); -// // component.setName(execution.getOperation().getComponentType() -// // .getFullQualifiedName()); -// // op = ModelFactory.eINSTANCE.createOperation(); -// // op.setSignature(sig); -// // this.opMapping.put(execution.getOperation(), op); -// // -// // component.getOperations().add(op); -// // model.getComponents().add(component); -// // } -// // final mamba.model.Execution exe = ModelFactory.eINSTANCE -// // .createExecution(); -// // exe.setTin(execution.getTin()); -// // exe.setTout(execution.getTout()); -// // exe.setOperation(this.opMapping.get(execution.getOperation())); -// // exe.setModel(this.model); -// // op.getExecutions().add(exe); -// } -// -// @Override -// public boolean execute() { -// return true; -// } -// -// @Override -// public void terminate(final boolean error) { -// this.mee.terminate(); -// // finally we will write the smm to the hard disk -// try { -// // Create a resource set. -// final ResourceSet resourceSet = new ResourceSetImpl(); -// // Register the default resource factory -- only needed for -// // stand-alone! -// // this tells EMF to use XML to save the model -// resourceSet -// .getResourceFactoryRegistry() -// .getExtensionToFactoryMap() -// .put(Resource.Factory.Registry.DEFAULT_EXTENSION, -// new XMIResourceFactoryImpl()); -// final URI fileURI2 = URI.createFileURI(new File("monitoring.xmi") -// .getAbsolutePath()); -// // Create a resource for this file. -// final Resource resource2 = resourceSet.createResource(fileURI2); -// // Add the model objects to the contents. -// // resource2.getContents().add(this.model); -// try { -// resource2.save(Collections.EMPTY_MAP); // the map can pass -// // special saving -// // options to the -// // operation -// } catch (final IOException e) { -// /* error handling */ -// } -// // Get the URI of the model file. -// final URI fileURI = URI.createFileURI(new File("smm.xmi") -// .getAbsolutePath()); -// // Create a resource for this file. -// final Resource resource = resourceSet.createResource(fileURI); -// // Add the model objects to the contents. -// resource.getContents().add(this.smmModel); -// // Save the contents of the resource to the file system. -// try { -// resource.save(Collections.EMPTY_MAP); // the map can pass -// // special saving -// // options to the -// // operation -// } catch (final IOException e) { -// /* error handling */ -// } -// } catch (final Exception ex) { -// ex.printStackTrace(); -// } -// } -// -// public IInputPort<Execution> getExecutionInputPort() { -// return this.executionInputPort; -// } -// -// private final IInputPort<Execution> executionInputPort = new AbstractInputPort<Execution>( -// "Execution input") { -// -// @Override -// public void newEvent(final Execution event) { -// EvaluatorPlugin.this.newExecution(event); -// } -// }; -// -// public SmmModel getSmmModel() { -// return this.smmModel; -// } -//} diff --git a/mamba-core/src/main/java/mamba/evaluator/ExecutionFactory.java b/mamba-core/src/main/java/mamba/evaluator/ExecutionFactory.java deleted file mode 100644 index a91e34789e648001ac276cbedfea9dd17d2beeac..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/evaluator/ExecutionFactory.java +++ /dev/null @@ -1,163 +0,0 @@ -///*************************************************************************** -// * Copyright 2011 by -// * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany -// * + Department of Computer Science -// * + Software Engineering Group -// * -// * 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 mamba.evaluator; -// -//import kieker.tools.traceAnalysis.systemModel.AllocationComponent; -//import kieker.tools.traceAnalysis.systemModel.AssemblyComponent; -//import kieker.tools.traceAnalysis.systemModel.ComponentType; -//import kieker.tools.traceAnalysis.systemModel.Execution; -//import kieker.tools.traceAnalysis.systemModel.ExecutionContainer; -//import kieker.tools.traceAnalysis.systemModel.Operation; -//import kieker.tools.traceAnalysis.systemModel.Signature; -//import kieker.tools.traceAnalysis.systemModel.repository.SystemModelRepository; -// -///** -// * Copied from Kieker: -// * kieker.test.tools.junit.traceAnalysis.util.ExecutionFactory -// * -// * @author Andre van Hoorn -// */ -//public class ExecutionFactory { -// -// private final static String DEFAULT_STRING = "N/A"; -// private final SystemModelRepository systemEntityFactory; -// -// @SuppressWarnings("unused") -// private ExecutionFactory() { -// this.systemEntityFactory = null; -// } -// -// public ExecutionFactory(final SystemModelRepository systemEntityFactory) { -// this.systemEntityFactory = systemEntityFactory; -// } -// -// /** -// * Creates an Execution object initialized with the passed values. The -// * remaining values of the Execution object are assigned default values. -// * -// * @param componentTypeName -// * @param componentInstanceName -// * @param operationName -// * @param traceId -// * @param tin -// * @param tout -// * @param eoi -// * @param ess -// * @throws NullPointerException -// * iff one of the String args has the value null. -// * @return -// */ -// public Execution genExecution(final String componentTypeName, -// final String componentInstanceName, final String operationName, -// final long traceId, final long tin, final long tout, final int eoi, -// final int ess) { -// if ((componentTypeName == null) || (componentInstanceName == null) -// || (operationName == null)) { -// throw new NullPointerException( -// "None of the String args must be null."); -// } -// -// /* Register component type (if it hasn't been registered before) */ -// ComponentType componentTypeA = this.systemEntityFactory -// .getTypeRepositoryFactory() -// .lookupComponentTypeByNamedIdentifier(componentTypeName); -// if (componentTypeA == null) { -// componentTypeA = this.systemEntityFactory -// .getTypeRepositoryFactory().createAndRegisterComponentType( -// componentTypeName, componentTypeName); -// } -// /* Register operation (if it hasn't been registered before) */ -// Operation operationAa = this.systemEntityFactory.getOperationFactory() -// .lookupOperationByNamedIdentifier(operationName); -// if (operationAa == null) { -// operationAa = this.systemEntityFactory -// .getOperationFactory() -// .createAndRegisterOperation( -// operationName, -// componentTypeA, -// new Signature( -// operationName, -// ExecutionFactory.DEFAULT_STRING, -// new String[] { ExecutionFactory.DEFAULT_STRING })); -// } -// if (componentTypeA.getOperations().contains(operationAa)) { -// componentTypeA.addOperation(operationAa); -// } -// -// /* Register assembly component (if it hasn't been registered before) */ -// AssemblyComponent assemblyComponentA = this.systemEntityFactory -// .getAssemblyFactory() -// .lookupAssemblyComponentInstanceByNamedIdentifier( -// componentInstanceName); -// if (assemblyComponentA == null) { -// assemblyComponentA = this.systemEntityFactory.getAssemblyFactory() -// .createAndRegisterAssemblyComponentInstance( -// componentInstanceName, componentTypeA); -// } -// -// /* Register execution container (if it hasn't been registered before) */ -// ExecutionContainer containerC = this.systemEntityFactory -// .getExecutionEnvironmentFactory() -// .lookupExecutionContainerByNamedIdentifier( -// ExecutionFactory.DEFAULT_STRING); -// if (containerC == null) { -// containerC = this.systemEntityFactory -// .getExecutionEnvironmentFactory() -// .createAndRegisterExecutionContainer( -// ExecutionFactory.DEFAULT_STRING, -// ExecutionFactory.DEFAULT_STRING); -// } -// -// /* Register allocation container (if it hasn't been registered before) */ -// AllocationComponent allocationComponentA = this.systemEntityFactory -// .getAllocationFactory() -// .lookupAllocationComponentInstanceByNamedIdentifier( -// ExecutionFactory.DEFAULT_STRING); -// if (allocationComponentA == null) { -// allocationComponentA = this.systemEntityFactory -// .getAllocationFactory() -// .createAndRegisterAllocationComponentInstance( -// ExecutionFactory.DEFAULT_STRING, -// assemblyComponentA, containerC); -// } -// -// return new Execution(operationAa, allocationComponentA, traceId, -// ExecutionFactory.DEFAULT_STRING, eoi, ess, tin, tout); -// } -// -// /** -// * Creates an Execution object initialized with the passed values. The -// * remaining values of the Execution object are assigned default values. -// * -// * @param traceId -// * @param tin -// * @param tout -// * @param eoi -// * @param ess -// * @return -// */ -// public Execution genExecution(final long traceId, final long tin, -// final long tout, final int eoi, final int ess) { -// return this.genExecution(ExecutionFactory.DEFAULT_STRING, // component type -// ExecutionFactory.DEFAULT_STRING, // component instance -// ExecutionFactory.DEFAULT_STRING, // operation name -// traceId, tin, tout, eoi, ess); -// } -//} diff --git a/mamba-core/src/main/java/mamba/mee/MeasurementController.java b/mamba-core/src/main/java/mamba/mee/MeasurementController.java index 208984f9a8f6ae6a8d7eca20a147d4387f582d8e..8faf817439ee176e6b8605c05a49c7ae3a73d9fa 100644 --- a/mamba-core/src/main/java/mamba/mee/MeasurementController.java +++ b/mamba-core/src/main/java/mamba/mee/MeasurementController.java @@ -36,10 +36,7 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.logging.Level; import java.util.logging.Logger; -import mamba.mee.exceptions.InitializationException; -import mamba.mee.exceptions.MetricsExecutionException; -import mamba.mee.utils.ClassPathHelper; -import mamba.mee.utils.EcoreUtil; + import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EFactory; import org.eclipse.emf.ecore.EObject; @@ -51,6 +48,11 @@ import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; import org.omg.adm.smm.core.SmmModel; import org.omg.adm.smm.measure.NamedMeasure; +import mamba.mee.exceptions.InitializationException; +import mamba.mee.exceptions.MetricsExecutionException; +import mamba.mee.utils.ClassPathHelper; +import mamba.mee.utils.EcoreUtil; + public class MeasurementController { public static final MeasurementResult END = new MeasurementResult(null); @@ -79,7 +81,7 @@ public class MeasurementController { this.inputSmm = inputSmm; this.domainModels = domainModels; this.outputSmm = outputSmm; - // XXX Is this good practice? Otherwise we always have to check whether props is null (e.g. line 250) + // XXX Is this good practice? Otherwise we always have to check whether props is null (e.g. line 250) if (props != null) { this.props = props; } else { @@ -96,20 +98,20 @@ public class MeasurementController { public void execute() throws MetricsExecutionException { try { _log.log(Level.INFO, "started to load SMM instance"); - final SmmModel smmModel = EcoreUtil.loadSmmModel(inputSmm); + final SmmModel smmModel = EcoreUtil.loadSmmModel(this.inputSmm); _log.log(Level.INFO, "finished to load SMM instance"); // get the domain models _log.log(Level.INFO, "started to load domain models"); - final EObject[] models = loadModels(domainModels); + final EObject[] models = loadModels(this.domainModels); _log.log(Level.INFO, "finished to load domain models"); // create the engine this.engine = new MambaExecutionEngine(smmModel, models, - requestedMeasureElements); + this.requestedMeasureElements); _log.log(Level.INFO, "MEE initialized"); // find the measurementProviders for the named measures _log.log(Level.INFO, "started to find measurement providers"); findMeasurementProviders(this.engine.getNamedMeasures(), models, - props); + this.props); if (this.measurementProviders == null) { this.numberOfActiveMeasurementProviders = 0; } else { @@ -122,7 +124,7 @@ public class MeasurementController { if (this.engine.getNamedMeasures().size() > 0) { // start the measurement providers in separated threads for (final AbstractMeasurementProvider provider : this.measurementProviders) { - threadExecutor.execute(new Runnable() { + this.threadExecutor.execute(new Runnable() { @Override public void run() { @@ -130,7 +132,7 @@ public class MeasurementController { provider.start(); } catch (final Exception e) { _log.log(Level.SEVERE, e.getMessage(), e); - errorOccured.set(true); + MeasurementController.this.errorOccured.set(true); } } }); @@ -143,7 +145,7 @@ public class MeasurementController { try { MeasurementController.this .processMeasurementBuffer(); - finish(outputSmm, smmModel); + finish(MeasurementController.this.outputSmm, smmModel); } catch (final IOException e) { throw new RuntimeException( "Failed to write smm result", e); @@ -159,7 +161,7 @@ public class MeasurementController { } }); } else { - finish(outputSmm, smmModel); + finish(this.outputSmm, smmModel); } } catch (final Exception ex) { throw new MetricsExecutionException( diff --git a/mamba-core/src/main/java/mamba/statistics/impl/java/JavaStatisticsEngine.java b/mamba-core/src/main/java/mamba/statistics/impl/java/JavaStatisticsEngine.java deleted file mode 100644 index a0af0c3c52469ef32f9303d4ddc798015d33787d..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/impl/java/JavaStatisticsEngine.java +++ /dev/null @@ -1,180 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.impl.java; - -import java.util.Arrays; -import mamba.statistics.IStatisticFunctionsEngine; -import mamba.statistics.StatisticFunctionsEngineException; - -/** - * Pure Java-based implementation of {@link IStatisticFunctionsEngine}. - * - * @author avanhoorn - * - */ -public class JavaStatisticsEngine implements IStatisticFunctionsEngine { - - @Override - public double min(final double[] values) throws IllegalArgumentException, - StatisticFunctionsEngineException { - this.assertNotNull(values); // throws IllegalArgumentException if values - // == null - if (values.length == 0) { - return Double.NaN; - } - double minVal = values[0]; - for (final double val : values) { - if (val < minVal) { - minVal = val; - } - } - return minVal; - } - - @Override - public double max(final double[] values) throws IllegalArgumentException, - StatisticFunctionsEngineException { - this.assertNotNull(values); // throws IllegalArgumentException if values - // == null - if (values.length == 0) { // may throw (declared) NullPointerException - return Double.NaN; - } - double maxVal = values[0]; - for (final double val : values) { - if (val > maxVal) { - maxVal = val; - } - } - return maxVal; - } - - @Override - public double mean(final double[] values) throws IllegalArgumentException, - StatisticFunctionsEngineException { - this.assertNotNull(values); // throws IllegalArgumentException if values - // == null - if (values.length == 0) { // may throw (declared) NullPointerException - return Double.NaN; - } - final double sum = this.sum(values); - return sum / values.length; - } - - @Override - public double sum(final double[] values) throws IllegalArgumentException, - StatisticFunctionsEngineException { - this.assertNotNull(values); // throws IllegalArgumentException if values - // == null - if (values.length == 0) { // may throw (declared) NullPointerException - return Double.NaN; - } - double sum = 0; - for (final double val : values) { - sum += val; - } - return sum; - } - - @Override - public double median(final double[] values) - throws IllegalArgumentException, StatisticFunctionsEngineException { - this.assertNotNull(values); // throws IllegalArgumentException if values - // == null - if (values.length == 0) { // may throw (declared) NullPointerException - return Double.NaN; - } - if (values.length == 1) { - return values[0]; - } - /* First, we need to sort */ - final double[] valuesInternal = Arrays.copyOf(values, values.length); - Arrays.sort(valuesInternal); - final double median; - final int middleIdx = values.length / 2; - if ((values.length % 2) == 0) { - /* - * Even number of elements (in this case, middleIdx is actually - * right from the middle) - */ - median = (valuesInternal[middleIdx] + valuesInternal[middleIdx - 1]) / 2; - } else { - /* Odd number of elements */ - median = valuesInternal[middleIdx]; - } - return median; - } - - @Override - public double percentile(final double[] values, final double p) - throws StatisticFunctionsEngineException { - this.assertNotNull(values); // throws IllegalArgumentException if values - // == null - if ((p < 0) || (p > 1)) { - throw new StatisticFunctionsEngineException( - "Invalid percentile value (muste be in range [0,1]): " + p); - } - final int length; - if ((length = values.length) == 0) { // may throw (declared) - // NullPointerException - return Double.NaN; - } - final double n = length; - if (length == 1) { - return values[0]; - } - /* - * Following code mainly taken from <code>http://www.koders.com/java/ - * fid867FA235DAF49EE794B20334EF719CE6C69E17E5.aspx</code> (which is - * from <code>commons.math</code>). - */ - final double pos = p * (n + 1); - final double fpos = Math.floor(pos); - final int intPos = (int) fpos; - final double dif = pos - fpos; - final double[] sorted = Arrays.copyOf(values, length); - Arrays.sort(sorted); - if (pos < 1) { - return sorted[0]; - } - if (pos >= n) { - return sorted[length - 1]; - } - final double lower = sorted[intPos - 1]; - final double upper = sorted[intPos]; - return lower + (dif * (upper - lower)); - } - - /** - * Asserts that the given array is not null. - * - * TODO: We might pull this method up into a class AbstractStatisticsEngine - * or alike as it contains clones in each of the XStatisticsEngine classes. - * - * @param values - * @throws IllegalArgumentException - * if the given array is null - */ - private void assertNotNull(final double[] values) - throws IllegalArgumentException { - if (values == null) { - throw new IllegalArgumentException("Input array must not be null"); - } - } -} diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/ITimeSeries.java b/mamba-core/src/main/java/mamba/statistics/timeseries/ITimeSeries.java deleted file mode 100644 index a74cdf0cafa8dc480ff5d7847d7060459a28d599..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/ITimeSeries.java +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries; - -import java.util.Date; -import java.util.List; -import java.util.concurrent.TimeUnit; - -/** - * - * @author Andre van Hoorn - * - * @param <T> - * - */ -public interface ITimeSeries<T> { - - public Date getStartTime(); - - public long getDeltaTime(); - - public TimeUnit getDeltaTimeUnit(); - - public ITimeSeriesPoint<T> append(T value); - - public List<ITimeSeriesPoint<T>> getPoints(); - - public int getCapacity(); - - public int size(); -} diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/ITimeSeriesPoint.java b/mamba-core/src/main/java/mamba/statistics/timeseries/ITimeSeriesPoint.java deleted file mode 100644 index 01797ae7df32ad1c335f83d3081226e018fc7229..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/ITimeSeriesPoint.java +++ /dev/null @@ -1,35 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries; - -import java.util.Date; - -/** - * - * @author Andre van Hoorn - * - * @param <T> - */ -public interface ITimeSeriesPoint<T> { - - public Date getTime(); - - public T getValue(); -} diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/TimeSeries.java b/mamba-core/src/main/java/mamba/statistics/timeseries/TimeSeries.java deleted file mode 100644 index 85a5fc31f9c5c2ab34b94374dd6436ffc28007ea..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/TimeSeries.java +++ /dev/null @@ -1,118 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries; - -import java.util.Date; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.TimeUnit; - -/** - * - * @author Andre van Hoorn - * - * @param <T> - */ -public class TimeSeries<T> implements ITimeSeries<T> { - - public static final int INFINITE_CAPACITY = -1; - - private final Date startTime; - private final Date nextTime; - private final long deltaTime; - private final TimeUnit deltaTimeUnit; - private final int capacity; - private final CopyOnWriteArrayList<ITimeSeriesPoint<T>> points; - - /** - * - * @param startTime - * @param deltaTime - * @param deltaTimeUnit - * @param capacity - */ - public TimeSeries(final Date startTime, final long deltaTime, - final TimeUnit deltaTimeUnit, final int capacity) { - this.startTime = startTime; - this.deltaTime = deltaTime; - this.deltaTimeUnit = deltaTimeUnit; - this.capacity = capacity; - - this.points = new CopyOnWriteArrayList<ITimeSeriesPoint<T>>(); - - // TODO: set nextTime properly - this.nextTime = this.startTime; - } - - public TimeSeries(final Date startTime, final long deltaTime, - final TimeUnit deltaTimeUnit) { - this(startTime, deltaTime, deltaTimeUnit, TimeSeries.INFINITE_CAPACITY); - } - - /** - * @return the startTime - */ - @Override - public Date getStartTime() { - return this.startTime; - } - - @Override - public long getDeltaTime() { - return this.deltaTime; - } - - @Override - public TimeUnit getDeltaTimeUnit() { - return this.deltaTimeUnit; - } - - @Override - public synchronized ITimeSeriesPoint<T> append(final T value) { - final ITimeSeriesPoint<T> point = new TimeSeriesPoint<T>(this.nextTime, - value); - - // TODO: respect capacity - - this.points.add(point); - - // TODO: set nextTime - - return point; - } - - @Override - public List<ITimeSeriesPoint<T>> getPoints() { - return this.points; - } - - /** - * @return the capacity - */ - @Override - public int getCapacity() { - return this.capacity; - } - - @Override - public int size() { - return this.points.size(); - } -} \ No newline at end of file diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/TimeSeriesPoint.java b/mamba-core/src/main/java/mamba/statistics/timeseries/TimeSeriesPoint.java deleted file mode 100644 index 66e9282ce1ee9624afe0897dbc6db67c86fb3cec..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/TimeSeriesPoint.java +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries; - -import java.util.Date; - -public class TimeSeriesPoint<T> implements ITimeSeriesPoint<T> { - - private final Date time; - private final T value; - - /** - * @param time - * @param value - */ - public TimeSeriesPoint(final Date time, final T value) { - this.time = time; - this.value = value; - } - - @Override - public Date getTime() { - return this.time; - } - - @Override - public T getValue() { - return this.value; - } - -} diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/AbstractForecaster.java b/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/AbstractForecaster.java deleted file mode 100644 index 7a880749eaf935a6bab4cf5cc9d8b027ab89039a..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/AbstractForecaster.java +++ /dev/null @@ -1,42 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries.forecast; - -import mamba.statistics.timeseries.ITimeSeries; - -public abstract class AbstractForecaster<T> implements IForecaster<T> { - - private final ITimeSeries<T> historyTimeseries; - - /** - * @param historyTimeseries - */ - public AbstractForecaster(final ITimeSeries<T> historyTimeseries) { - this.historyTimeseries = historyTimeseries; - } - - /** - * @return the historyTimeseries - */ - @Override - public ITimeSeries<T> getHistoryTimeSeries() { - return this.historyTimeseries; - } -} diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/ForecastResult.java b/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/ForecastResult.java deleted file mode 100644 index 358e90a8cadf9d5f6e561d4b1761349c518675d2..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/ForecastResult.java +++ /dev/null @@ -1,42 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries.forecast; - -import mamba.statistics.timeseries.ITimeSeries; - -/** - * - * @author Andre van Hoorn - * - * @param <T> - */ -public class ForecastResult<T> implements IForecastResult<T> { - - private final ITimeSeries<T> forecastSeries; - - public ForecastResult(final ITimeSeries<T> forecastSeries) { - this.forecastSeries = forecastSeries; - } - - @Override - public ITimeSeries<T> getForecastTimeSeries() { - return this.forecastSeries; - } -} diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/IForecastResult.java b/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/IForecastResult.java deleted file mode 100644 index 47702cc9d6f54b16e3fb366a3d519fae5940ac71..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/IForecastResult.java +++ /dev/null @@ -1,27 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries.forecast; - -import mamba.statistics.timeseries.ITimeSeries; - -public interface IForecastResult<T> { - - public ITimeSeries<T> getForecastTimeSeries(); -} diff --git a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/IForecaster.java b/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/IForecaster.java deleted file mode 100644 index 7f0ebec6ea4bab3308942ea8866fdd2a2b2bc9ae..0000000000000000000000000000000000000000 --- a/mamba-core/src/main/java/mamba/statistics/timeseries/forecast/IForecaster.java +++ /dev/null @@ -1,35 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.statistics.timeseries.forecast; - -import mamba.statistics.timeseries.ITimeSeries; - -/** - * - * @author Andre van Hoorn - * - * @param <T> - */ -public interface IForecaster<T> { - - public IForecastResult<T> forecast(final int numForecastSteps); - - public ITimeSeries<T> getHistoryTimeSeries(); -} diff --git a/mamba-core/src/test/java/mamba/test/junit/statistics/JavaStatisticsEngineTest.java b/mamba-core/src/test/java/mamba/test/junit/statistics/JavaStatisticsEngineTest.java deleted file mode 100644 index 481eda0831c20f42782aa8400f16fd3db72ec418..0000000000000000000000000000000000000000 --- a/mamba-core/src/test/java/mamba/test/junit/statistics/JavaStatisticsEngineTest.java +++ /dev/null @@ -1,34 +0,0 @@ -/*************************************************************************** - * Copyright 2011 by - * Christian-Albrechts-University of Kiel, 24098 Kiel, Germany - * + Department of Computer Science - * + Software Engineering Group - * - * 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 mamba.test.junit.statistics; - -import mamba.statistics.impl.java.JavaStatisticsEngine; - -/** - * Inherits all test methods from {@link AbstractStatisticsEngineTest}. - * - * @author Andre van Hoorn - */ -public class JavaStatisticsEngineTest extends AbstractStatisticsEngineTest { - - public JavaStatisticsEngineTest() { - super(new JavaStatisticsEngine()); - } -}