Created
March 17, 2017 20:14
-
-
Save nerzid/467971c05144eb5d351215dea37f8932 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class hello { | |
public String foo(String s) { | |
s = "hello world"; | |
String x = "eren"; | |
System.out.println("s: " + s + "x: " + x); | |
System.out.println("s: " + s + "x: " + x); | |
System.out.println("s: " + s + "x: " + x); | |
System.out.println(s = s + x); | |
magic(); | |
if (!(s.isEmpty())) | |
return s + x; | |
else if (s.length > 5){ | |
return s + "x"; | |
} | |
else{ | |
int count = 0; | |
List<String> list = new ArrayList<>(); | |
while (count <= s.length) { | |
count++; | |
list.add(s); | |
} | |
if (list.length > 0) | |
return list.get(0); | |
else | |
return count; | |
} | |
} | |
public void magic(){ | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
METHOD: java.lang.String foo(java.lang.String)
ENDING S_UNITS
----> return s + x
----> return s + "x"
----> return list.get(0)
----> return count
VOID-RETURN S_UNITS
----> System.out.println(((("s: " + s) + "x: ") + x))
----> System.out.println(((("s: " + s) + "x: ") + x))
----> System.out.println(((("s: " + s) + "x: ") + x))
----> System.out.println((s = s + x))
----> magic()
SAME-ACTION S_UNITS
----> System.out.println(((("s: " + s) + "x: ") + x))
DATA-FACILITATING S_UNITS
----> s = "hello world"
----> (s = s + x)
CONTROLLING S_UNITS
----> !(s.isEmpty())
----> (s.length) > 5
----> count <= (s.length)
----> list > 0
METHOD: void magic()
ENDING S_UNITS
none
VOID-RETURN S_UNITS
none
SAME-ACTION S_UNITS
none
DATA-FACILITATING S_UNITS
none
CONTROLLING S_UNITS
none