code: public static DualInputSemanticProperties readDualConstantAnnotations(UserCodeWrapper<?> udf) {
  		ImplicitlyForwardingTwoInputSemanticProperties semanticProperties = new ImplicitlyForwardingTwoInputSemanticProperties();
  
  		// get readSet annotation from stub
  		ConstantFieldsFirst constantSet1Annotation = udf.getUserCodeAnnotation(ConstantFieldsFirst.class);
  		ConstantFieldsSecond constantSet2Annotation = udf.getUserCodeAnnotation(ConstantFieldsSecond.class);
  		
  		// get readSet annotation from stub
  		ConstantFieldsFirstExcept notConstantSet1Annotation = udf.getUserCodeAnnotation(ConstantFieldsFirstExcept.class);
  		ConstantFieldsSecondExcept notConstantSet2Annotation = udf.getUserCodeAnnotation(ConstantFieldsSecondExcept.class);
  		
  		
  		if (notConstantSet1Annotation != null && constantSet1Annotation != null) {
  			throw new RuntimeException("Either ConstantFieldsFirst or ConstantFieldsFirstExcept can be specified, not both.");
  		}
  		
  		if (constantSet2Annotation != null && notConstantSet2Annotation != null) {
  			throw new RuntimeException("Either ConstantFieldsSecond or ConstantFieldsSecondExcept can be specified, not both.");
  		}
  		
  		
  		// extract readSets from annotations
  		if(notConstantSet1Annotation != null) {
  			semanticProperties.setImplicitlyForwardingFirstExcept(new FieldSet(notConstantSet1Annotation.value()));
  		}
  		
  		if(notConstantSet2Annotation != null) {
  			semanticProperties.setImplicitlyForwardingSecondExcept(new FieldSet(notConstantSet2Annotation.value()));
  		}
  		
  		// extract readSets from annotations
  		if (constantSet1Annotation != null) {
  			for(int value: constantSet1Annotation.value()) {
  				semanticProperties.addForwardedField1(value, value);
  			}
  		}
  		
  		if (constantSet2Annotation != null) {
  			for(int value: constantSet2Annotation.value()) {
  				semanticProperties.addForwardedField2(value, value);
  			}
  		}
  		
  		return semanticProperties;
  	}
docs: --------------------------------------------------------------------------------------------