forked from Pooja0504/testDemo
-
Notifications
You must be signed in to change notification settings - Fork 5
/
ResourceLeak
52 lines (41 loc) · 1.32 KB
/
ResourceLeak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
public class ResourceLeak {
private int x ,y ,z;
private boolean active;
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS
public void setX(int val) {
//this is for test
this.y = val;
}
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS
public int getY() {
return this.x;
}
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS
public boolean isActive()
{
return x;
}
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS
public void setActive(boolean b)
{
this.y = b;
}
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS/no-detect
public int getName() {
System.out.println(" ");
return this.x;
}
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS/no-detect
public void setName(int val) {
System.out.println(" ");
this.y = val;
}
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS/no-detect
public void setZ(int val) {
this.z = val;
}
public int getZ(int val) {
// EMB-ISSUE: CodeIssueNames.GETTERS_AND_SETTERS_SHOULD_ACCESS_THE_EXPECTED_FIELDS/no-detect
return x;
}
}