Need to write for below 48 test cases

Please go through these functions to understand its functionality. Also figure out the issues in them.

Example 1:

int FunctionOne(int a, int b) { for(int x = a; x >= 0; x--) { if (a % x == 0 && b % x == 0) { return x; } } return 1; } Example 2:

Map FunctionTwo(int[] a, int[] b) { Map m = new HashMap<>(); for(int i = 0; i < a.length; i++) { m.put(a,b); } return m; }