Code Duplication    Length = 16-16 lines in 2 locations

src/main/java/it/cnr/istc/pst/platinum/executive/dc/strategy/TreeStrategy.java 1 location

@@ 87-102 (lines=16) @@
84
	}
85
86
	//returns next strategy step (repeat until wait!!) using tic
87
	@Override
88
	public List<Action> askAllStrategySteps(long tic, Map<String,String> actualState) { // throws Exception {
89
		System.out.println(initialState + "tic " + tic + "\n\n");
90
		long time  = System.currentTimeMillis();
91
		List<Action> actions = new ArrayList<>();
92
		this.updateExpectedState(actualState);
93
		this.updateClocks(tic);
94
		Action action = askSingleStrategyStep(this.initialState);
95
		actions.add(action);
96
		while(action.getClass().equals(Transition.class)) {
97
			action = askSingleStrategyStep(this.initialState);
98
			actions.add(action);
99
		}
100
		time = System.currentTimeMillis() - time;
101
		System.out.println("\n"+ "Answer all strategy steps: " + time + "ms, " + "\n");
102
		return actions;
103
	}
104
105
	//returns one action predicted for next step *****

src/main/java/it/cnr/istc/pst/platinum/executive/dc/strategy/ListStrategy.java 1 location

@@ 76-91 (lines=16) @@
73
	}
74
75
	//returns next strategy step (repeat until wait!!) using tic
76
	@Override
77
	public List<Action> askAllStrategySteps(long tic, Map<String,String> actualState) { // throws Exception {
78
		System.out.println(expectedState + "tic " + tic + "\n\n");
79
		long time  = System.currentTimeMillis();
80
		List<Action> actions = new ArrayList<>();
81
		this.updateExpectedState(actualState);
82
		this.updateClocks(tic);
83
		Action action = askSingleStrategyStep(this.expectedState);
84
		actions.add(action);
85
		while(action.getClass().equals(Transition.class)) {
86
			action = askSingleStrategyStep(this.expectedState);
87
			actions.add(action);
88
		}
89
		time = System.currentTimeMillis() - time;
90
		System.out.println("\n"+ "Answer all strategy steps: " + time + "ms, " + "\n");
91
		return actions;
92
	}
93
94
	//returns one action predicted for next step