src/main/java/sancus/service/ContractOntologyService.java
public void solidityFunctions(JsonArray entireContract) {
		JsonNode jsonNode;
		try {
			jsonNode = new ObjectMapper().readTree(entireContract.toString());
			List<JsonNode> functionValue = jsonNode.findParents(ConfigTokens.functionDefinition);
			for(int i = 0; i < functionValue.size(); i++) {
				functionSpecification = new FunctionSpecification();
				parameterSpecificationList = new ArrayList<ParameterSpecification>();
				returnParameterSpecificationList = new ArrayList<ParameterSpecification>();
				List<JsonNode> functionDescriptor = jsonNode.findParents(ConfigTokens.functionDescriptor);
				if(functionDescriptor.get(i).findValue(ConfigTokens.text).asText().contentEquals(ConfigTokens.function)) {
					functionSpecification.setHasFunctionName(getFunctionName(functionDescriptor, i));
					List<JsonNode> codeValue = functionValue.get(i).findParents(ConfigTokens.statement);
					//					List<JsonNode> codeValue = jsonNode.findParents(Tokens.statement);
					functionSpecification.setHasCode(getCode(codeValue, i));
					List<JsonNode> modifierValue = jsonNode.findParents(ConfigTokens.modifierList);
					functionSpecification.setVisibility(VisibilitySpecification.valueOf(getVisibility(modifierValue, i).toUpperCase()));
					if(getMutability(modifierValue, i) != null) {
						functionSpecification.setHasFunctionBehaviour(FunctionBehaviour.valueOf(getMutability(modifierValue, i).toUpperCase()));
					}
					JsonNode parameterValues = functionValue.get(i).findParent(ConfigTokens.parametersList);
					functionSpecification.setParamSpecification(solidityParameters(parameterValues));
					JsonNode parameterReturnValues = functionValue.get(i).findParent(ConfigTokens.returnParameters);
					functionSpecification.setReturnParamSpecification(solidityParameters(parameterReturnValues));
					functionSpecificationList.add(functionSpecification);
				}
			}
		} catch (JsonProcessingException e) {
			e.printStackTrace();
		}
	}
/**
	 * Find and recopile all the functions in the Solidity Contract
	 * @param entireContract
	 */
Find and recopile all the functions in the Solidity Contract
@param entireContract
Find and recopile all the functions in the Solidity Contract @param entireContract
public void solidityFunctions(JsonArray entireContract) {
		JsonNode jsonNode;
		try {
			jsonNode = new ObjectMapper().readTree(entireContract.toString());
			List<JsonNode> functionValue = jsonNode.findParents(ConfigTokens.functionDefinition);
			for(int i = 0; i < functionValue.size(); i++) {
				functionSpecification = new FunctionSpecification();
				parameterSpecificationList = new ArrayList<ParameterSpecification>();
				returnParameterSpecificationList = new ArrayList<ParameterSpecification>();
				List<JsonNode> functionDescriptor = jsonNode.findParents(ConfigTokens.functionDescriptor);
				if(functionDescriptor.get(i).findValue(ConfigTokens.text).asText().contentEquals(ConfigTokens.function)) {
					functionSpecification.setHasFunctionName(getFunctionName(functionDescriptor, i));
					List<JsonNode> codeValue = functionValue.get(i).findParents(ConfigTokens.statement);
					functionSpecification.setHasCode(getCode(codeValue, i));
					List<JsonNode> modifierValue = jsonNode.findParents(ConfigTokens.modifierList);
					functionSpecification.setVisibility(VisibilitySpecification.valueOf(getVisibility(modifierValue, i).toUpperCase()));
					if(getMutability(modifierValue, i) != null) {
						functionSpecification.setHasFunctionBehaviour(FunctionBehaviour.valueOf(getMutability(modifierValue, i).toUpperCase()));
					}
					JsonNode parameterValues = functionValue.get(i).findParent(ConfigTokens.parametersList);
					functionSpecification.setParamSpecification(solidityParameters(parameterValues));
					JsonNode parameterReturnValues = functionValue.get(i).findParent(ConfigTokens.returnParameters);
					functionSpecification.setReturnParamSpecification(solidityParameters(parameterReturnValues));
					functionSpecificationList.add(functionSpecification);
				}
			}
		} catch (JsonProcessingException e) {
			e.printStackTrace();
		}
	}
public void solidityFunctions ( JsonArray entireContract ) { JsonNode jsonNode ; try { jsonNode = new ObjectMapper ( ) . readTree ( entireContract . toString ( ) ) ; List < JsonNode > functionValue = jsonNode . findParents ( ConfigTokens . functionDefinition ) ; for ( int i = 0 ; i < functionValue . size ( ) ; i ++ ) { functionSpecification = new FunctionSpecification ( ) ; parameterSpecificationList = new ArrayList < ParameterSpecification > ( ) ; returnParameterSpecificationList = new ArrayList < ParameterSpecification > ( ) ; List < JsonNode > functionDescriptor = jsonNode . findParents ( ConfigTokens . functionDescriptor ) ; if ( functionDescriptor . get ( i ) . findValue ( ConfigTokens . text ) . asText ( ) . contentEquals ( ConfigTokens . function ) ) { functionSpecification . setHasFunctionName ( getFunctionName ( functionDescriptor , i ) ) ; List < JsonNode > codeValue = functionValue . get ( i ) . findParents ( ConfigTokens . statement ) ; functionSpecification . setHasCode ( getCode ( codeValue , i ) ) ; List < JsonNode > modifierValue = jsonNode . findParents ( ConfigTokens . modifierList ) ; functionSpecification . setVisibility ( VisibilitySpecification . valueOf ( getVisibility ( modifierValue , i ) . toUpperCase ( ) ) ) ; if ( getMutability ( modifierValue , i ) != null ) { functionSpecification . setHasFunctionBehaviour ( FunctionBehaviour . valueOf ( getMutability ( modifierValue , i ) . toUpperCase ( ) ) ) ; } JsonNode parameterValues = functionValue . get ( i ) . findParent ( ConfigTokens . parametersList ) ; functionSpecification . setParamSpecification ( solidityParameters ( parameterValues ) ) ; JsonNode parameterReturnValues = functionValue . get ( i ) . findParent ( ConfigTokens . returnParameters ) ; functionSpecification . setReturnParamSpecification ( solidityParameters ( parameterReturnValues ) ) ; functionSpecificationList . add ( functionSpecification ) ; } } } catch ( JsonProcessingException e ) { e . printStackTrace ( ) ; } }
Find and recopile all the functions in the Solidity Contract
 @param entireContract
Find and recopile all the functions in the Solidity Contract @param entireContract
//					List<JsonNode> codeValue = jsonNode.findParents(Tokens.statement);