The answer to that is a clear yes.
In studies of Firefox and Eclipse
we found one specific feature of the code
that dominated all others.
These were the imports made by individual modules.
That is, the other modules that the module in question would interact with.
More specifically, whatever a module imported
would determine its likelihood to have a defect.
In Firefox, for instance, if you're module included nsIPrivateDOMEvent.h
and nsReadableutils.h--that is, used these specific APIs or interacted with these specific APIs,
then you're code would be doomed.
Because 20 modules that also included these two files
l had at least one security issue.
Likewise, in Eclipse if you imported something that dealt with internal features
of the compiler, your code would be 4-5 times as error prone as code that only dealt
with a graphical user interface.
Why is that so?
Well, if you write import compiler internal, this means you're going to write some compiler code,
and compiler code is more error prone than user interface code,
in particular because if you worked with a user interface,
most errors you make will be immediately visible to the human eye.
Whereas if you deal with compiler internals,
it's a long path from a bug in the compiler to a bug in the actual compiled program,
which then, again, has to be executed in order to have the bug cause a failure.
None of this cause needs to be discovered right away.
All of these are reasons why this domain, namely the compiler,
is way more error prone than the user interface.
答えは明らかにイエスです
FirefoxやEclipseの学習の際に
コードに特有な特徴がありました
それは他の何よりも重要なものでしたね
その特徴とは各モジュールによるインポートでした
つまり問題のあるモジュールが
別のモジュールと対話するということです
さらに詳しく言えば
モジュールがインポートしたものは何でも
欠陥を持つ可能性があるということです
例えばFirefoxで以下をインクルードしたとします
nsIPrivateDOMEvent.hとnsReadableutils.hです
つまりこれはインクルードしたAPIを利用した
または対話したということことを意味しました
そしてコードのデバッグは絶望的な状態に陥ります
この2つのAPIが20ものモジュールに含まれていたことで
最低でもセキュリティ問題が1つありました
同様にEclipseでは
コンパイラ内部の処理を担う何かをインポートした場合
GUIのみを処理するコードを処理する時の
4~5倍ものエラーが
含まれるようになりました
なぜそうなるのでしょうか?
コンパイラの内部処理をインポートすることは
コンパイラのコードを書くことにつながります
コンパイラのコードはUIのコードより
エラーを起こす傾向があるのです
つまりもしあなたがUIに取り組んでいたとしたら
エラーのほとんどは
人の目で見て確認できるものになります
一方もしあなたが
コンパイラの内部処理に取り組んでいたとしたら
コンパイラ内のバグからコンパイル後のプログラム内の
バグにたどり着くには長い道のりになります
そしてバグが不具合を起こすタイミングは
プログラムの実行時だけなのです
不具合の原因をすぐ発見できるわけがありません
このような理由があるため
このドメインつまりコンパイラは
UIよりもエラーを起こしやすいのです