Code Duplication    Length = 13-13 lines in 2 locations

src/main/java/it/cnr/istc/pst/platinum/ai/framework/domain/component/DomainComponent.java 2 locations

@@ 587-599 (lines=13) @@
584
	 * @param duration
585
	 * @return
586
	 */
587
	public synchronized Decision create(ComponentValue value, String[] labels, long[] start, long[] end, long[] duration, ExecutionNodeStatus status) 
588
	{
589
		// check if value is known to the component
590
		if (!value.getComponent().equals(this)) {
591
			throw new RuntimeException("Trying to add a decision with a value unknown to the component:\n- component: " + this.name + "\n- value: " + value + "\n");
592
		}
593
		
594
		// set decision
595
		Decision dec = new Decision(DecisionIdCounter.getAndIncrement(), value, labels, start, end, duration, status);
596
		// add decision the the agenda
597
		this.decisions.get(PlanElementStatus.PENDING).add(dec);
598
		// get set decision
599
		return dec;
600
	}
601
	
602
	/**
@@ 563-575 (lines=13) @@
560
	 * @param duration
561
	 * @return
562
	 */
563
	public synchronized Decision create(ComponentValue value, String[] labels, long[] start, long[] end, long[] duration) 
564
	{
565
		// check if value is known to the component
566
		if (!value.getComponent().equals(this)) {
567
			throw new RuntimeException("Trying to add a decision with a value unknown to the component:\n- component: " + this.name + "\n- value: " + value + "\n");
568
		}
569
		
570
		// set decision
571
		Decision dec = new Decision(DecisionIdCounter.getAndIncrement(), value, labels, start, end, duration);
572
		// add decision the the agenda
573
		this.decisions.get(PlanElementStatus.PENDING).add(dec);
574
		// get decision
575
		return dec;
576
	}
577
	
578
	/**