Code best practices for Java FunctionGraph functions