forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFSelfContainedness.qhelp
More file actions
70 lines (58 loc) · 2.02 KB
/
FSelfContainedness.qhelp
File metadata and controls
70 lines (58 loc) · 2.02 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>
This metric measures the percentage of the types on which a compilation unit
depends for which we have source code available.
</p>
<p>
The availability of source code is one of the key factors affecting how easy
or difficult it will be to build a software project in the future, especially
on platforms other than those for which it was originally developed. Projects
will a high level of self-containedness are likely to be more portable and
easier to build in ten years' time than those that depend on many binary-only,
third-party libraries. (This is one reason why many of the dependencies of
open-source projects are distributed as source code, aside from the fact that
the binaries are generally larger and more unwieldy to distribute.)
</p>
<p>
In the context of Java's platform independence, the availability of source code
is less critical than it is for platform-dependent languages.
However, note that there can be minor binary incompatibilities between
different versions of Java.
</p>
</overview>
<recommendation>
<p>
Low self-containedness may or may not be a problem, depending on the context
of your project. However, if you determine that it is an issue for you, it is
best tackled at a project level, in the following ways:
</p>
<ul>
<li>
Try to use libraries for which the source code is available.
</li>
<li>
Try to obtain the source code for binary-only libraries from the authors.
</li>
<li>
Where practical, rewrite parts of your code to reduce your dependence on
external libraries.
</li>
</ul>
</recommendation>
<references>
<li>
Wikipedia: <a href="http://en.wikipedia.org/wiki/Software_portability">Software portability</a>
</li>
<li>
Oracle Technology Network: <a href="https://www.oracle.com/java/technologies/javase/compatibility.html">Java SE 6 Compatibility</a>
</li>
<li>
Java Language Specification:
<a href="https://docs.oracle.com/javase/specs/jls/se11/html/jls-13.html">Binary Compatibility</a>
</li>
</references>
</qhelp>