EMMA Coverage Report (generated Sun Feb 05 10:43:15 CET 2012)
[all classes][de.uka.ipd.sdq.codegen.simucontroller.workflow.jobs]

COVERAGE SUMMARY FOR SOURCE FILE [SensitivityAnalysisJob.java]

nameclass, %method, %block, %line, %
SensitivityAnalysisJob.java0%   (0/1)0%   (0/2)0%   (0/92)0%   (0/22)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SensitivityAnalysisJob0%   (0/1)0%   (0/2)0%   (0/92)0%   (0/22)
SensitivityAnalysisJob (SimuComWorkflowConfiguration, IDebugListener): void 0%   (0/1)0%   (0/45)0%   (0/11)
getNextSConfigList (List): List 0%   (0/1)0%   (0/47)0%   (0/11)

1package de.uka.ipd.sdq.codegen.simucontroller.workflow.jobs;
2 
3import java.util.ArrayList;
4import java.util.List;
5 
6import org.eclipse.core.runtime.CoreException;
7 
8import de.uka.ipd.sdq.codegen.simucontroller.debug.IDebugListener;
9import de.uka.ipd.sdq.codegen.simucontroller.runconfig.SimuComWorkflowConfiguration;
10import de.uka.ipd.sdq.workflow.IBlackboardInteractingJob;
11import de.uka.ipd.sdq.workflow.LowMemoryFootprintCompositeJob;
12import de.uka.ipd.sdq.workflow.mdsd.blackboard.MDSDBlackboard;
13import de.uka.ipd.sdq.workflow.pcm.runconfig.SensitivityAnalysisConfiguration;
14 
15public class SensitivityAnalysisJob
16extends LowMemoryFootprintCompositeJob<MDSDBlackboard>
17implements IBlackboardInteractingJob<MDSDBlackboard> {
18 
19        boolean isFinished = false;
20 
21        public SensitivityAnalysisJob(SimuComWorkflowConfiguration config,
22                        IDebugListener listener) throws CoreException {
23 
24                if (config.isSensitivityAnalysisEnabled()) {
25                        List<SensitivityAnalysisConfiguration> sconfList = config.getSensitivityAnalysisConfigurations();
26                        config = config.copy(sconfList);
27 
28                        while (!isFinished){
29                                this.add(new SimuComJob(config, listener));
30                                sconfList = getNextSConfigList(sconfList);
31                                config = config.copy(sconfList);
32                        }
33                } else {
34                        this.add(new SimuComJob(config, listener));
35                }
36 
37        }
38 
39        private List<SensitivityAnalysisConfiguration> getNextSConfigList(
40                        List<SensitivityAnalysisConfiguration> sconfList) {
41                List<SensitivityAnalysisConfiguration> resultList = new ArrayList<SensitivityAnalysisConfiguration>();
42                boolean increased = false;
43                for (SensitivityAnalysisConfiguration sconf : sconfList){
44                        if(!increased){
45                                if(sconf.getCurrent() < sconf.getMax()){
46                                        increased = true;
47                                        sconf = sconf.getNext();
48                                } else {
49                                        sconf = sconf.getFirst();
50                                }
51                        }
52                        resultList.add(sconf);
53                }
54                isFinished = !increased;
55 
56                return resultList;
57        }
58}

[all classes][de.uka.ipd.sdq.codegen.simucontroller.workflow.jobs]
EMMA 2.0.9414 (unsupported private build) (C) Vladimir Roubtsov