[{"data":1,"prerenderedAt":5323},["ShallowReactive",2],{"global-navigation":3,"page-\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck07-j":28,"surround-\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck07-j":3750,"sidebar-sei-cert-oracle-coding-standard-for-java":3757},[4,8],{"title":5,"path":6,"_path":6,"fromAppConfig":7},"Home","\u002F",true,{"title":9,"path":10,"children":11,"_path":27,"fromAppConfig":7},"Coding Standards","\u002Fcoding-standards\u002F",[12,15,18,21,24],{"title":13,"path":14},"Android Coding Standard","\u002Fandroid-secure-coding-standard\u002F",{"title":16,"path":17},"C Coding Standard","\u002Fsei-cert-c-coding-standard\u002F",{"title":19,"path":20},"C++ Coding Standard","\u002Fsei-cert-cpp-coding-standard\u002F",{"title":22,"path":23},"Java Coding Standard","\u002Fsei-cert-oracle-coding-standard-for-java\u002F",{"title":25,"path":26},"Perl Coding Standard","\u002Fsei-cert-perl-coding-standard\u002F","\u002Fcoding-standards",{"id":29,"title":30,"body":31,"description":3737,"extension":3738,"meta":3739,"navigation":7,"path":3746,"seo":3747,"stem":3748,"__hash__":3749},"content\u002F6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F09.lck07-j.md","LCK07-J. Avoid deadlock by requesting and releasing locks in the same order",{"type":32,"value":33,"toc":3724},"minimark",[34,38,53,61,97,105,110,128,529,541,624,660,663,667,673,971,977,983,987,1004,1567,1581,1584,1592,1605,2150,2153,2167,2171,2178,2332,2335,2338,2844,2866,2869,2893,2912,2926,2930,2933,3386,3389,3395,3399,3404,3469,3473,3476,3607,3611,3654,3658,3695,3698,3720],[35,36,30],"h1",{"id":37},"lck07-j-avoid-deadlock-by-requesting-and-releasing-locks-in-the-same-order",[39,40,41,42,46,47,52],"p",{},"To avoid data corruption in multithreaded Java programs, shared data must be protected from concurrent modifications and accesses. Locking can be performed at the object level using synchronized methods, synchronized blocks, or the ",[43,44,45],"code",{},"java.util.concurrent"," dynamic lock objects. However, excessive use of locking can result in ",[48,49,51],"a",{"href":50},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-bb-glossary","deadlocks"," .",[39,54,55,56,60],{},"Java neither prevents deadlocks nor requires their detection [ ",[48,57,59],{"href":58},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-aa-references#RuleAA.References-JLS15","JLS 2015"," ]. Deadlock can occur when two or more threads request and release locks in different orders. Consequently, programs are required to avoid deadlock by acquiring and releasing locks in the same order.",[39,62,63,64,68,69,72,73,72,76,79,80,83,84,87,88,91,92,96],{},"Additionally, ",[48,65,67],{"href":66},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-bb-glossary#RuleBB.Glossary-synchro","synchronization"," should be limited to cases where it is absolutely necessary. For example, the ",[43,70,71],{},"paint()"," , ",[43,74,75],{},"dispose()",[43,77,78],{},"stop()"," , and ",[43,81,82],{},"destroy()"," methods should never be synchronized in an applet because they are always called and used from dedicated threads. Furthermore, the ",[43,85,86],{},"Thread.stop()"," and ",[43,89,90],{},"Thread.destroy()"," methods are deprecated (see ",[48,93,95],{"href":94},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-apis-thi\u002Fthi05-j","THI05-J. Do not use Thread.stop() to terminate threads"," for more information).",[39,98,99,100,104],{},"This rule also applies to programs that need to work with a limited set of resources. For example, ",[48,101,103],{"href":102},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-bb-glossary#RuleBB.Glossary-li","liveness"," issues can arise when two or more threads are waiting for each other to release resources such as database connections. These issues can be resolved by letting each waiting thread retry the operation at random intervals until they successfully acquire the resource.",[106,107,109],"h2",{"id":108},"noncompliant-code-example-different-lock-orders","Noncompliant Code Example (Different Lock Orders)",[39,111,112,113,116,117,119,120,123,124,127],{},"This noncompliant code example can ",[48,114,115],{"href":50},"deadlock"," because of excessive ",[48,118,67],{"href":66}," . The ",[43,121,122],{},"balanceAmount"," field represents the total balance available for a particular ",[43,125,126],{},"BankAccount"," object. Users are allowed to initiate an operation that atomically transfers a specified amount from one account to another.",[129,130,132],"code-block",{"quality":131},"bad",[133,134,139],"pre",{"className":135,"code":136,"language":137,"meta":138,"style":138},"language-java shiki shiki-themes github-light github-dark monokai","final class BankAccount {\n  private double balanceAmount;  \u002F\u002F Total amount in bank account\n\n  BankAccount(double balance) {\n    this.balanceAmount = balance;\n  }\n\n  \u002F\u002F Deposits the amount from this object instance\n  \u002F\u002F to BankAccount instance argument ba\n  private void depositAmount(BankAccount ba, double amount) {\n    synchronized (this) {\n      synchronized (ba) {\n        if (amount > balanceAmount) {\n          throw new IllegalArgumentException(\n               \"Transfer cannot be completed\"\n          );\n        }\n        ba.balanceAmount += amount;\n        this.balanceAmount -= amount;\n      }\n    }\n  }\n\n  public static void initiateTransfer(final BankAccount first,\n    final BankAccount second, final double amount) {\n\n    Thread transfer = new Thread(new Runnable() {\n        public void run() {\n          first.depositAmount(second, amount);\n        }\n    });\n    transfer.start();\n  }\n}\n","java","",[43,140,141,161,178,184,204,220,226,231,237,243,272,286,295,310,325,332,338,344,356,369,375,381,386,391,417,438,443,470,483,495,500,506,518,523],{"__ignoreMap":138},[142,143,146,150,153,157],"span",{"class":144,"line":145},"line",1,[142,147,149],{"class":148},"sC2Qs","final",[142,151,152],{"class":148}," class",[142,154,156],{"class":155},"sz2Vg"," BankAccount",[142,158,160],{"class":159},"sMOD_"," {\n",[142,162,164,167,171,174],{"class":144,"line":163},2,[142,165,166],{"class":148},"  private",[142,168,170],{"class":169},"sq6CD"," double",[142,172,173],{"class":159}," balanceAmount;  ",[142,175,177],{"class":176},"s8-w5","\u002F\u002F Total amount in bank account\n",[142,179,181],{"class":144,"line":180},3,[142,182,183],{"emptyLinePlaceholder":7},"\n",[142,185,187,191,194,197,201],{"class":144,"line":186},4,[142,188,190],{"class":189},"srTi1","  BankAccount",[142,192,193],{"class":159},"(",[142,195,196],{"class":169},"double",[142,198,200],{"class":199},"sTHNf"," balance",[142,202,203],{"class":159},") {\n",[142,205,207,211,214,217],{"class":144,"line":206},5,[142,208,210],{"class":209},"sP7S_","    this",[142,212,213],{"class":159},".balanceAmount ",[142,215,216],{"class":148},"=",[142,218,219],{"class":159}," balance;\n",[142,221,223],{"class":144,"line":222},6,[142,224,225],{"class":159},"  }\n",[142,227,229],{"class":144,"line":228},7,[142,230,183],{"emptyLinePlaceholder":7},[142,232,234],{"class":144,"line":233},8,[142,235,236],{"class":176},"  \u002F\u002F Deposits the amount from this object instance\n",[142,238,240],{"class":144,"line":239},9,[142,241,242],{"class":176},"  \u002F\u002F to BankAccount instance argument ba\n",[142,244,246,248,251,254,256,259,262,265,267,270],{"class":144,"line":245},10,[142,247,166],{"class":148},[142,249,250],{"class":169}," void",[142,252,253],{"class":189}," depositAmount",[142,255,193],{"class":159},[142,257,126],{"class":258},"sk8M1",[142,260,261],{"class":199}," ba",[142,263,264],{"class":159},", ",[142,266,196],{"class":169},[142,268,269],{"class":199}," amount",[142,271,203],{"class":159},[142,273,275,278,281,284],{"class":144,"line":274},11,[142,276,277],{"class":148},"    synchronized",[142,279,280],{"class":159}," (",[142,282,283],{"class":209},"this",[142,285,203],{"class":159},[142,287,289,292],{"class":144,"line":288},12,[142,290,291],{"class":148},"      synchronized",[142,293,294],{"class":159}," (ba) {\n",[142,296,298,301,304,307],{"class":144,"line":297},13,[142,299,300],{"class":148},"        if",[142,302,303],{"class":159}," (amount ",[142,305,306],{"class":148},">",[142,308,309],{"class":159}," balanceAmount) {\n",[142,311,313,316,319,322],{"class":144,"line":312},14,[142,314,315],{"class":148},"          throw",[142,317,318],{"class":148}," new",[142,320,321],{"class":189}," IllegalArgumentException",[142,323,324],{"class":159},"(\n",[142,326,328],{"class":144,"line":327},15,[142,329,331],{"class":330},"sstjo","               \"Transfer cannot be completed\"\n",[142,333,335],{"class":144,"line":334},16,[142,336,337],{"class":159},"          );\n",[142,339,341],{"class":144,"line":340},17,[142,342,343],{"class":159},"        }\n",[142,345,347,350,353],{"class":144,"line":346},18,[142,348,349],{"class":159},"        ba.balanceAmount ",[142,351,352],{"class":148},"+=",[142,354,355],{"class":159}," amount;\n",[142,357,359,362,364,367],{"class":144,"line":358},19,[142,360,361],{"class":209},"        this",[142,363,213],{"class":159},[142,365,366],{"class":148},"-=",[142,368,355],{"class":159},[142,370,372],{"class":144,"line":371},20,[142,373,374],{"class":159},"      }\n",[142,376,378],{"class":144,"line":377},21,[142,379,380],{"class":159},"    }\n",[142,382,384],{"class":144,"line":383},22,[142,385,225],{"class":159},[142,387,389],{"class":144,"line":388},23,[142,390,183],{"emptyLinePlaceholder":7},[142,392,394,397,400,402,405,407,409,411,414],{"class":144,"line":393},24,[142,395,396],{"class":148},"  public",[142,398,399],{"class":148}," static",[142,401,250],{"class":169},[142,403,404],{"class":189}," initiateTransfer",[142,406,193],{"class":159},[142,408,149],{"class":148},[142,410,156],{"class":258},[142,412,413],{"class":199}," first",[142,415,416],{"class":159},",\n",[142,418,420,423,425,428,430,432,434,436],{"class":144,"line":419},25,[142,421,422],{"class":148},"    final",[142,424,156],{"class":258},[142,426,427],{"class":199}," second",[142,429,264],{"class":159},[142,431,149],{"class":148},[142,433,170],{"class":169},[142,435,269],{"class":199},[142,437,203],{"class":159},[142,439,441],{"class":144,"line":440},26,[142,442,183],{"emptyLinePlaceholder":7},[142,444,446,449,452,454,456,459,461,464,467],{"class":144,"line":445},27,[142,447,448],{"class":258},"    Thread",[142,450,451],{"class":159}," transfer ",[142,453,216],{"class":148},[142,455,318],{"class":148},[142,457,458],{"class":189}," Thread",[142,460,193],{"class":159},[142,462,463],{"class":148},"new",[142,465,466],{"class":189}," Runnable",[142,468,469],{"class":159},"() {\n",[142,471,473,476,478,481],{"class":144,"line":472},28,[142,474,475],{"class":148},"        public",[142,477,250],{"class":169},[142,479,480],{"class":189}," run",[142,482,469],{"class":159},[142,484,486,489,492],{"class":144,"line":485},29,[142,487,488],{"class":159},"          first.",[142,490,491],{"class":189},"depositAmount",[142,493,494],{"class":159},"(second, amount);\n",[142,496,498],{"class":144,"line":497},30,[142,499,343],{"class":159},[142,501,503],{"class":144,"line":502},31,[142,504,505],{"class":159},"    });\n",[142,507,509,512,515],{"class":144,"line":508},32,[142,510,511],{"class":159},"    transfer.",[142,513,514],{"class":189},"start",[142,516,517],{"class":159},"();\n",[142,519,521],{"class":144,"line":520},33,[142,522,225],{"class":159},[142,524,526],{"class":144,"line":525},34,[142,527,528],{"class":159},"}\n",[39,530,531,532,534,535,87,537,540],{},"Objects of this class are prone to deadlock. An attacker who has two bank accounts can construct two threads that initiate balance transfers from two different ",[43,533,126],{}," object instances ",[43,536,48],{},[43,538,539],{},"b"," . For example, consider the following code:",[133,542,544],{"className":135,"code":543,"language":137,"meta":138,"style":138},"BankAccount a = new BankAccount(5000);\nBankAccount b = new BankAccount(6000);\nBankAccount.initiateTransfer(a, b, 1000); \u002F\u002F starts thread 1\nBankAccount.initiateTransfer(b, a, 1000); \u002F\u002F starts thread 2\n",[43,545,546,568,588,608],{"__ignoreMap":138},[142,547,548,550,553,555,557,559,561,565],{"class":144,"line":145},[142,549,126],{"class":258},[142,551,552],{"class":159}," a ",[142,554,216],{"class":148},[142,556,318],{"class":148},[142,558,156],{"class":189},[142,560,193],{"class":159},[142,562,564],{"class":563},"s7F3e","5000",[142,566,567],{"class":159},");\n",[142,569,570,572,575,577,579,581,583,586],{"class":144,"line":163},[142,571,126],{"class":258},[142,573,574],{"class":159}," b ",[142,576,216],{"class":148},[142,578,318],{"class":148},[142,580,156],{"class":189},[142,582,193],{"class":159},[142,584,585],{"class":563},"6000",[142,587,567],{"class":159},[142,589,590,593,596,599,602,605],{"class":144,"line":180},[142,591,592],{"class":159},"BankAccount.",[142,594,595],{"class":189},"initiateTransfer",[142,597,598],{"class":159},"(a, b, ",[142,600,601],{"class":563},"1000",[142,603,604],{"class":159},"); ",[142,606,607],{"class":176},"\u002F\u002F starts thread 1\n",[142,609,610,612,614,617,619,621],{"class":144,"line":186},[142,611,592],{"class":159},[142,613,595],{"class":189},[142,615,616],{"class":159},"(b, a, ",[142,618,601],{"class":563},[142,620,604],{"class":159},[142,622,623],{"class":176},"\u002F\u002F starts thread 2\n",[39,625,626,627,629,630,632,633,635,636,638,639,629,641,643,644,647,648,650,651,653,654,656,657,659],{},"Each transfer is performed in its own thread. The first thread atomically transfers the amount from ",[43,628,48],{}," to ",[43,631,539],{}," by depositing it in account ",[43,634,539],{}," and then withdrawing the same amount from ",[43,637,48],{}," . The second thread performs the reverse operation; that is, it transfers the amount from ",[43,640,539],{},[43,642,48],{}," . When executing ",[43,645,646],{},"depositAmount()"," , the first thread acquires a lock on object ",[43,649,48],{}," . The second thread could acquire a lock on object ",[43,652,539],{}," before the first thread can. Subsequently, the first thread would request a lock on ",[43,655,539],{}," , which is already held by the second thread. The second thread would request a lock on ",[43,658,48],{}," , which is already held by the first thread. This constitutes a deadlock condition because neither thread can proceed.",[39,661,662],{},"This noncompliant code example may or may not deadlock, depending on the scheduling details of the platform. Deadlock occurs when (1) two threads request the same two locks in different orders, and (2) each thread obtains a lock that prevents the other thread from completing its transfer. Deadlock is avoided when two threads request the same two locks but one thread completes its transfer before the other thread begins. Similarly, deadlock is avoided if the two threads request the same two locks in the same order (which would happen if they both transfer money from one account to a second account) or if two transfers involving distinct accounts occur concurrently.",[106,664,666],{"id":665},"compliant-solution-private-static-final-lock-object","Compliant Solution (Private Static Final Lock Object)",[39,668,669,670,672],{},"This compliant solution avoids ",[48,671,115],{"href":50}," by synchronizing on a private static final lock object before performing any account transfers:",[129,674,676],{"quality":675},"good",[133,677,679],{"className":135,"code":678,"language":137,"meta":138,"style":138},"final class BankAccount {\n  private double balanceAmount;  \u002F\u002F Total amount in bank account\n  private static final Object lock = new Object();\n\n  BankAccount(double balance) {\n    this.balanceAmount = balance;\n  }\n\n  \u002F\u002F Deposits the amount from this object instance\n  \u002F\u002F to BankAccount instance argument ba\n  private void depositAmount(BankAccount ba, double amount) {\n    synchronized (lock) {\n      if (amount > balanceAmount) {\n        throw new IllegalArgumentException(\n            \"Transfer cannot be completed\");\n      }\n      ba.balanceAmount += amount;\n      this.balanceAmount -= amount;\n    }\n  }\n\n  public static void initiateTransfer(final BankAccount first,\n    final BankAccount second, final double amount) {\n\n    Thread transfer = new Thread(new Runnable() {\n        @Override public void run() {\n          first.depositAmount(second, amount);\n        }\n    });\n    transfer.start();\n  }\n}\n",[43,680,681,691,701,724,728,740,750,754,758,762,766,788,795,806,817,824,828,837,848,852,856,860,880,898,902,922,939,947,951,955,963,967],{"__ignoreMap":138},[142,682,683,685,687,689],{"class":144,"line":145},[142,684,149],{"class":148},[142,686,152],{"class":148},[142,688,156],{"class":155},[142,690,160],{"class":159},[142,692,693,695,697,699],{"class":144,"line":163},[142,694,166],{"class":148},[142,696,170],{"class":169},[142,698,173],{"class":159},[142,700,177],{"class":176},[142,702,703,705,707,710,713,716,718,720,722],{"class":144,"line":180},[142,704,166],{"class":148},[142,706,399],{"class":148},[142,708,709],{"class":148}," final",[142,711,712],{"class":258}," Object",[142,714,715],{"class":159}," lock ",[142,717,216],{"class":148},[142,719,318],{"class":148},[142,721,712],{"class":189},[142,723,517],{"class":159},[142,725,726],{"class":144,"line":186},[142,727,183],{"emptyLinePlaceholder":7},[142,729,730,732,734,736,738],{"class":144,"line":206},[142,731,190],{"class":189},[142,733,193],{"class":159},[142,735,196],{"class":169},[142,737,200],{"class":199},[142,739,203],{"class":159},[142,741,742,744,746,748],{"class":144,"line":222},[142,743,210],{"class":209},[142,745,213],{"class":159},[142,747,216],{"class":148},[142,749,219],{"class":159},[142,751,752],{"class":144,"line":228},[142,753,225],{"class":159},[142,755,756],{"class":144,"line":233},[142,757,183],{"emptyLinePlaceholder":7},[142,759,760],{"class":144,"line":239},[142,761,236],{"class":176},[142,763,764],{"class":144,"line":245},[142,765,242],{"class":176},[142,767,768,770,772,774,776,778,780,782,784,786],{"class":144,"line":274},[142,769,166],{"class":148},[142,771,250],{"class":169},[142,773,253],{"class":189},[142,775,193],{"class":159},[142,777,126],{"class":258},[142,779,261],{"class":199},[142,781,264],{"class":159},[142,783,196],{"class":169},[142,785,269],{"class":199},[142,787,203],{"class":159},[142,789,790,792],{"class":144,"line":288},[142,791,277],{"class":148},[142,793,794],{"class":159}," (lock) {\n",[142,796,797,800,802,804],{"class":144,"line":297},[142,798,799],{"class":148},"      if",[142,801,303],{"class":159},[142,803,306],{"class":148},[142,805,309],{"class":159},[142,807,808,811,813,815],{"class":144,"line":312},[142,809,810],{"class":148},"        throw",[142,812,318],{"class":148},[142,814,321],{"class":189},[142,816,324],{"class":159},[142,818,819,822],{"class":144,"line":327},[142,820,821],{"class":330},"            \"Transfer cannot be completed\"",[142,823,567],{"class":159},[142,825,826],{"class":144,"line":334},[142,827,374],{"class":159},[142,829,830,833,835],{"class":144,"line":340},[142,831,832],{"class":159},"      ba.balanceAmount ",[142,834,352],{"class":148},[142,836,355],{"class":159},[142,838,839,842,844,846],{"class":144,"line":346},[142,840,841],{"class":209},"      this",[142,843,213],{"class":159},[142,845,366],{"class":148},[142,847,355],{"class":159},[142,849,850],{"class":144,"line":358},[142,851,380],{"class":159},[142,853,854],{"class":144,"line":371},[142,855,225],{"class":159},[142,857,858],{"class":144,"line":377},[142,859,183],{"emptyLinePlaceholder":7},[142,861,862,864,866,868,870,872,874,876,878],{"class":144,"line":383},[142,863,396],{"class":148},[142,865,399],{"class":148},[142,867,250],{"class":169},[142,869,404],{"class":189},[142,871,193],{"class":159},[142,873,149],{"class":148},[142,875,156],{"class":258},[142,877,413],{"class":199},[142,879,416],{"class":159},[142,881,882,884,886,888,890,892,894,896],{"class":144,"line":388},[142,883,422],{"class":148},[142,885,156],{"class":258},[142,887,427],{"class":199},[142,889,264],{"class":159},[142,891,149],{"class":148},[142,893,170],{"class":169},[142,895,269],{"class":199},[142,897,203],{"class":159},[142,899,900],{"class":144,"line":393},[142,901,183],{"emptyLinePlaceholder":7},[142,903,904,906,908,910,912,914,916,918,920],{"class":144,"line":419},[142,905,448],{"class":258},[142,907,451],{"class":159},[142,909,216],{"class":148},[142,911,318],{"class":148},[142,913,458],{"class":189},[142,915,193],{"class":159},[142,917,463],{"class":148},[142,919,466],{"class":189},[142,921,469],{"class":159},[142,923,924,927,930,933,935,937],{"class":144,"line":440},[142,925,926],{"class":159},"        @",[142,928,929],{"class":169},"Override",[142,931,932],{"class":148}," public",[142,934,250],{"class":169},[142,936,480],{"class":189},[142,938,469],{"class":159},[142,940,941,943,945],{"class":144,"line":445},[142,942,488],{"class":159},[142,944,491],{"class":189},[142,946,494],{"class":159},[142,948,949],{"class":144,"line":472},[142,950,343],{"class":159},[142,952,953],{"class":144,"line":485},[142,954,505],{"class":159},[142,956,957,959,961],{"class":144,"line":497},[142,958,511],{"class":159},[142,960,514],{"class":189},[142,962,517],{"class":159},[142,964,965],{"class":144,"line":502},[142,966,225],{"class":159},[142,968,969],{"class":144,"line":508},[142,970,528],{"class":159},[39,972,973,974,976],{},"In this scenario, deadlock cannot occur when two threads with two different ",[43,975,126],{}," objects try to transfer to each other's accounts simultaneously. One thread will acquire the private lock, complete its transfer, and release the lock before the other thread can proceed.",[39,978,979,980,982],{},"This solution imposes a performance penalty because a private static lock restricts the system to performing transfers sequentially. Two transfers involving four distinct accounts (with distinct target accounts) cannot be performed concurrently. This penalty increases considerably as the number of ",[43,981,126],{}," objects increase. Consequently, this solution fails to scale well.",[106,984,986],{"id":985},"compliant-solution-ordered-locks","Compliant Solution (Ordered Locks)",[39,988,989,990,992,993,995,996,999,1000,1003],{},"This compliant solution ensures that multiple locks are acquired and released in the same order. It requires a consistent ordering over ",[43,991,126],{}," objects. Consequently, the ",[43,994,126],{}," class implements the ",[43,997,998],{},"java.lang.Comparable"," interface and overrides the ",[43,1001,1002],{},"compareTo()"," method.",[129,1005,1006],{"quality":675},[133,1007,1009],{"className":135,"code":1008,"language":137,"meta":138,"style":138},"final class BankAccount implements Comparable\u003CBankAccount> {\n  private double balanceAmount;  \u002F\u002F Total amount in bank account\n  private final Object lock;\n\n  private final long id; \u002F\u002F Unique for each BankAccount\n  private static final AtomicLong nextID = new AtomicLong(0); \u002F\u002F Next unused ID\n\n  BankAccount(double balance) {\n    this.balanceAmount = balance;\n    this.lock = new Object();\n    this.id = nextID.getAndIncrement();\n  }\n\n  @Override public int compareTo(BankAccount ba) {\n     return (this.id > ba.id) ? 1 : (this.id \u003C ba.id) ? -1 : 0;\n  }\n\n  \u002F\u002F Deposits the amount from this object instance\n  \u002F\u002F to BankAccount instance argument ba\n  public void depositAmount(BankAccount ba, double amount) {\n    BankAccount former, latter;\n    if (compareTo(ba) \u003C 0) {\n      former = this;\n      latter = ba;\n    } else {\n      former = ba;\n      latter = this;\n    }\n    synchronized (former) {\n      synchronized (latter) {\n        if (amount > balanceAmount) {\n          throw new IllegalArgumentException(\n              \"Transfer cannot be completed\");\n        }\n        ba.balanceAmount += amount;\n        this.balanceAmount -= amount;\n      }\n    }\n  }\n\n  public static void initiateTransfer(final BankAccount first,\n    final BankAccount second, final double amount) {\n\n    Thread transfer = new Thread(new Runnable() {\n        @Override public void run() {\n          first.depositAmount(second, amount);\n        }\n    });\n    transfer.start();\n  }\n}\n",[43,1010,1011,1034,1044,1055,1059,1074,1104,1108,1120,1130,1145,1162,1166,1170,1193,1244,1248,1252,1256,1260,1282,1290,1309,1321,1331,1341,1349,1359,1363,1370,1377,1387,1397,1404,1408,1417,1428,1433,1438,1443,1448,1469,1488,1493,1514,1529,1538,1543,1548,1557,1562],{"__ignoreMap":138},[142,1012,1013,1015,1017,1019,1022,1026,1029,1031],{"class":144,"line":145},[142,1014,149],{"class":148},[142,1016,152],{"class":148},[142,1018,156],{"class":155},[142,1020,1021],{"class":148}," implements",[142,1023,1025],{"class":1024},"s30JN"," Comparable",[142,1027,1028],{"class":159},"\u003C",[142,1030,126],{"class":169},[142,1032,1033],{"class":159},"> {\n",[142,1035,1036,1038,1040,1042],{"class":144,"line":163},[142,1037,166],{"class":148},[142,1039,170],{"class":169},[142,1041,173],{"class":159},[142,1043,177],{"class":176},[142,1045,1046,1048,1050,1052],{"class":144,"line":180},[142,1047,166],{"class":148},[142,1049,709],{"class":148},[142,1051,712],{"class":258},[142,1053,1054],{"class":159}," lock;\n",[142,1056,1057],{"class":144,"line":186},[142,1058,183],{"emptyLinePlaceholder":7},[142,1060,1061,1063,1065,1068,1071],{"class":144,"line":206},[142,1062,166],{"class":148},[142,1064,709],{"class":148},[142,1066,1067],{"class":169}," long",[142,1069,1070],{"class":159}," id; ",[142,1072,1073],{"class":176},"\u002F\u002F Unique for each BankAccount\n",[142,1075,1076,1078,1080,1082,1085,1088,1090,1092,1094,1096,1099,1101],{"class":144,"line":222},[142,1077,166],{"class":148},[142,1079,399],{"class":148},[142,1081,709],{"class":148},[142,1083,1084],{"class":258}," AtomicLong",[142,1086,1087],{"class":159}," nextID ",[142,1089,216],{"class":148},[142,1091,318],{"class":148},[142,1093,1084],{"class":189},[142,1095,193],{"class":159},[142,1097,1098],{"class":563},"0",[142,1100,604],{"class":159},[142,1102,1103],{"class":176},"\u002F\u002F Next unused ID\n",[142,1105,1106],{"class":144,"line":228},[142,1107,183],{"emptyLinePlaceholder":7},[142,1109,1110,1112,1114,1116,1118],{"class":144,"line":233},[142,1111,190],{"class":189},[142,1113,193],{"class":159},[142,1115,196],{"class":169},[142,1117,200],{"class":199},[142,1119,203],{"class":159},[142,1121,1122,1124,1126,1128],{"class":144,"line":239},[142,1123,210],{"class":209},[142,1125,213],{"class":159},[142,1127,216],{"class":148},[142,1129,219],{"class":159},[142,1131,1132,1134,1137,1139,1141,1143],{"class":144,"line":245},[142,1133,210],{"class":209},[142,1135,1136],{"class":159},".lock ",[142,1138,216],{"class":148},[142,1140,318],{"class":148},[142,1142,712],{"class":189},[142,1144,517],{"class":159},[142,1146,1147,1149,1152,1154,1157,1160],{"class":144,"line":274},[142,1148,210],{"class":209},[142,1150,1151],{"class":159},".id ",[142,1153,216],{"class":148},[142,1155,1156],{"class":159}," nextID.",[142,1158,1159],{"class":189},"getAndIncrement",[142,1161,517],{"class":159},[142,1163,1164],{"class":144,"line":288},[142,1165,225],{"class":159},[142,1167,1168],{"class":144,"line":297},[142,1169,183],{"emptyLinePlaceholder":7},[142,1171,1172,1175,1177,1179,1182,1185,1187,1189,1191],{"class":144,"line":312},[142,1173,1174],{"class":159},"  @",[142,1176,929],{"class":169},[142,1178,932],{"class":148},[142,1180,1181],{"class":169}," int",[142,1183,1184],{"class":189}," compareTo",[142,1186,193],{"class":159},[142,1188,126],{"class":258},[142,1190,261],{"class":199},[142,1192,203],{"class":159},[142,1194,1195,1198,1200,1202,1204,1206,1209,1212,1215,1218,1220,1222,1224,1226,1228,1230,1233,1236,1238,1241],{"class":144,"line":327},[142,1196,1197],{"class":148},"     return",[142,1199,280],{"class":159},[142,1201,283],{"class":209},[142,1203,1151],{"class":159},[142,1205,306],{"class":148},[142,1207,1208],{"class":159}," ba.id) ",[142,1210,1211],{"class":148},"?",[142,1213,1214],{"class":563}," 1",[142,1216,1217],{"class":148}," :",[142,1219,280],{"class":159},[142,1221,283],{"class":209},[142,1223,1151],{"class":159},[142,1225,1028],{"class":148},[142,1227,1208],{"class":159},[142,1229,1211],{"class":148},[142,1231,1232],{"class":148}," -",[142,1234,1235],{"class":563},"1",[142,1237,1217],{"class":148},[142,1239,1240],{"class":563}," 0",[142,1242,1243],{"class":159},";\n",[142,1245,1246],{"class":144,"line":334},[142,1247,225],{"class":159},[142,1249,1250],{"class":144,"line":340},[142,1251,183],{"emptyLinePlaceholder":7},[142,1253,1254],{"class":144,"line":346},[142,1255,236],{"class":176},[142,1257,1258],{"class":144,"line":358},[142,1259,242],{"class":176},[142,1261,1262,1264,1266,1268,1270,1272,1274,1276,1278,1280],{"class":144,"line":371},[142,1263,396],{"class":148},[142,1265,250],{"class":169},[142,1267,253],{"class":189},[142,1269,193],{"class":159},[142,1271,126],{"class":258},[142,1273,261],{"class":199},[142,1275,264],{"class":159},[142,1277,196],{"class":169},[142,1279,269],{"class":199},[142,1281,203],{"class":159},[142,1283,1284,1287],{"class":144,"line":377},[142,1285,1286],{"class":258},"    BankAccount",[142,1288,1289],{"class":159}," former, latter;\n",[142,1291,1292,1295,1297,1300,1303,1305,1307],{"class":144,"line":383},[142,1293,1294],{"class":148},"    if",[142,1296,280],{"class":159},[142,1298,1299],{"class":189},"compareTo",[142,1301,1302],{"class":159},"(ba) ",[142,1304,1028],{"class":148},[142,1306,1240],{"class":563},[142,1308,203],{"class":159},[142,1310,1311,1314,1316,1319],{"class":144,"line":388},[142,1312,1313],{"class":159},"      former ",[142,1315,216],{"class":148},[142,1317,1318],{"class":209}," this",[142,1320,1243],{"class":159},[142,1322,1323,1326,1328],{"class":144,"line":393},[142,1324,1325],{"class":159},"      latter ",[142,1327,216],{"class":148},[142,1329,1330],{"class":159}," ba;\n",[142,1332,1333,1336,1339],{"class":144,"line":419},[142,1334,1335],{"class":159},"    } ",[142,1337,1338],{"class":148},"else",[142,1340,160],{"class":159},[142,1342,1343,1345,1347],{"class":144,"line":440},[142,1344,1313],{"class":159},[142,1346,216],{"class":148},[142,1348,1330],{"class":159},[142,1350,1351,1353,1355,1357],{"class":144,"line":445},[142,1352,1325],{"class":159},[142,1354,216],{"class":148},[142,1356,1318],{"class":209},[142,1358,1243],{"class":159},[142,1360,1361],{"class":144,"line":472},[142,1362,380],{"class":159},[142,1364,1365,1367],{"class":144,"line":485},[142,1366,277],{"class":148},[142,1368,1369],{"class":159}," (former) {\n",[142,1371,1372,1374],{"class":144,"line":497},[142,1373,291],{"class":148},[142,1375,1376],{"class":159}," (latter) {\n",[142,1378,1379,1381,1383,1385],{"class":144,"line":502},[142,1380,300],{"class":148},[142,1382,303],{"class":159},[142,1384,306],{"class":148},[142,1386,309],{"class":159},[142,1388,1389,1391,1393,1395],{"class":144,"line":508},[142,1390,315],{"class":148},[142,1392,318],{"class":148},[142,1394,321],{"class":189},[142,1396,324],{"class":159},[142,1398,1399,1402],{"class":144,"line":520},[142,1400,1401],{"class":330},"              \"Transfer cannot be completed\"",[142,1403,567],{"class":159},[142,1405,1406],{"class":144,"line":525},[142,1407,343],{"class":159},[142,1409,1411,1413,1415],{"class":144,"line":1410},35,[142,1412,349],{"class":159},[142,1414,352],{"class":148},[142,1416,355],{"class":159},[142,1418,1420,1422,1424,1426],{"class":144,"line":1419},36,[142,1421,361],{"class":209},[142,1423,213],{"class":159},[142,1425,366],{"class":148},[142,1427,355],{"class":159},[142,1429,1431],{"class":144,"line":1430},37,[142,1432,374],{"class":159},[142,1434,1436],{"class":144,"line":1435},38,[142,1437,380],{"class":159},[142,1439,1441],{"class":144,"line":1440},39,[142,1442,225],{"class":159},[142,1444,1446],{"class":144,"line":1445},40,[142,1447,183],{"emptyLinePlaceholder":7},[142,1449,1451,1453,1455,1457,1459,1461,1463,1465,1467],{"class":144,"line":1450},41,[142,1452,396],{"class":148},[142,1454,399],{"class":148},[142,1456,250],{"class":169},[142,1458,404],{"class":189},[142,1460,193],{"class":159},[142,1462,149],{"class":148},[142,1464,156],{"class":258},[142,1466,413],{"class":199},[142,1468,416],{"class":159},[142,1470,1472,1474,1476,1478,1480,1482,1484,1486],{"class":144,"line":1471},42,[142,1473,422],{"class":148},[142,1475,156],{"class":258},[142,1477,427],{"class":199},[142,1479,264],{"class":159},[142,1481,149],{"class":148},[142,1483,170],{"class":169},[142,1485,269],{"class":199},[142,1487,203],{"class":159},[142,1489,1491],{"class":144,"line":1490},43,[142,1492,183],{"emptyLinePlaceholder":7},[142,1494,1496,1498,1500,1502,1504,1506,1508,1510,1512],{"class":144,"line":1495},44,[142,1497,448],{"class":258},[142,1499,451],{"class":159},[142,1501,216],{"class":148},[142,1503,318],{"class":148},[142,1505,458],{"class":189},[142,1507,193],{"class":159},[142,1509,463],{"class":148},[142,1511,466],{"class":189},[142,1513,469],{"class":159},[142,1515,1517,1519,1521,1523,1525,1527],{"class":144,"line":1516},45,[142,1518,926],{"class":159},[142,1520,929],{"class":169},[142,1522,932],{"class":148},[142,1524,250],{"class":169},[142,1526,480],{"class":189},[142,1528,469],{"class":159},[142,1530,1532,1534,1536],{"class":144,"line":1531},46,[142,1533,488],{"class":159},[142,1535,491],{"class":189},[142,1537,494],{"class":159},[142,1539,1541],{"class":144,"line":1540},47,[142,1542,343],{"class":159},[142,1544,1546],{"class":144,"line":1545},48,[142,1547,505],{"class":159},[142,1549,1551,1553,1555],{"class":144,"line":1550},49,[142,1552,511],{"class":159},[142,1554,514],{"class":189},[142,1556,517],{"class":159},[142,1558,1560],{"class":144,"line":1559},50,[142,1561,225],{"class":159},[142,1563,1565],{"class":144,"line":1564},51,[142,1566,528],{"class":159},[39,1568,1569,1570,1572,1573,1576,1577,1580],{},"Whenever a transfer occurs, the two ",[43,1571,126],{}," objects are ordered so that the ",[43,1574,1575],{},"first"," object's lock is acquired before the ",[43,1578,1579],{},"second"," object's lock. When two threads attempt transfers between the same two accounts, they each try to acquire the first account's lock before acquiring the second account's lock. Consequently, one thread acquires both locks, completes the transfer, and releases both locks before the other thread can proceed.",[39,1582,1583],{},"Unlike the previous compliant solution, this solution permits multiple concurrent transfers as long as the transfers involve distinct accounts.",[106,1585,1587,1588,1591],{"id":1586},"compliant-solution-reentrantlock","Compliant Solution ( ",[43,1589,1590],{},"ReentrantLock"," )",[39,1593,1594,1595,1597,1598,1601,1602,1604],{},"In this compliant solution, each ",[43,1596,126],{}," has a ",[43,1599,1600],{},"java.util.concurrent.locks.ReentrantLock"," . This design permits the ",[43,1603,646],{}," method to attempt to acquire the locks of both accounts, to release the locks if it fails, and to try again later if necessary.",[129,1606,1607],{"quality":675},[133,1608,1610],{"className":135,"code":1609,"language":137,"meta":138,"style":138},"final class BankAccount {\n  private double balanceAmount;  \u002F\u002F Total amount in bank account\n  private final Lock lock = new ReentrantLock();\n  private final Random number = new Random(123L);\n\n  BankAccount(double balance) {\n    this.balanceAmount = balance;\n  }\n\n  \u002F\u002F Deposits amount from this object instance\n  \u002F\u002F to BankAccount instance argument ba\n  private void depositAmount(BankAccount ba, double amount)\n                             throws InterruptedException {\n    while (true) {\n      if (this.lock.tryLock()) {\n        try {\n          if (ba.lock.tryLock()) {\n            try {\n              if (amount > balanceAmount) {\n                throw new IllegalArgumentException(\n                    \"Transfer cannot be completed\");\n              }\n              ba.balanceAmount += amount;\n              this.balanceAmount -= amount;\n              break;\n            } finally {\n              ba.lock.unlock();\n            }\n          }\n        } finally {\n          this.lock.unlock();\n        }\n      }\n      int n = number.nextInt(1000);\n      int TIME = 1000 + n; \u002F\u002F 1 second + random delay to prevent livelock\n      Thread.sleep(TIME);\n    }\n  }\n\n  public static void initiateTransfer(final BankAccount first,\n    final BankAccount second, final double amount) {\n\n    Thread transfer = new Thread(new Runnable() {\n        public void run() {\n          try {\n            first.depositAmount(second, amount);\n          } catch (InterruptedException e) {\n            Thread.currentThread().interrupt(); \u002F\u002F Reset interrupted status\n          }\n        }\n    });\n    transfer.start();\n  }\n}\n",[43,1611,1612,1622,1632,1652,1677,1681,1693,1703,1707,1711,1716,1720,1743,1753,1765,1782,1789,1801,1808,1819,1830,1837,1842,1851,1862,1869,1879,1889,1894,1899,1908,1919,1923,1927,1949,1970,1981,1985,1989,1993,2013,2031,2035,2055,2065,2072,2081,2099,2119,2123,2127,2131,2140,2145],{"__ignoreMap":138},[142,1613,1614,1616,1618,1620],{"class":144,"line":145},[142,1615,149],{"class":148},[142,1617,152],{"class":148},[142,1619,156],{"class":155},[142,1621,160],{"class":159},[142,1623,1624,1626,1628,1630],{"class":144,"line":163},[142,1625,166],{"class":148},[142,1627,170],{"class":169},[142,1629,173],{"class":159},[142,1631,177],{"class":176},[142,1633,1634,1636,1638,1641,1643,1645,1647,1650],{"class":144,"line":180},[142,1635,166],{"class":148},[142,1637,709],{"class":148},[142,1639,1640],{"class":258}," Lock",[142,1642,715],{"class":159},[142,1644,216],{"class":148},[142,1646,318],{"class":148},[142,1648,1649],{"class":189}," ReentrantLock",[142,1651,517],{"class":159},[142,1653,1654,1656,1658,1661,1664,1666,1668,1670,1672,1675],{"class":144,"line":186},[142,1655,166],{"class":148},[142,1657,709],{"class":148},[142,1659,1660],{"class":258}," Random",[142,1662,1663],{"class":159}," number ",[142,1665,216],{"class":148},[142,1667,318],{"class":148},[142,1669,1660],{"class":189},[142,1671,193],{"class":159},[142,1673,1674],{"class":563},"123L",[142,1676,567],{"class":159},[142,1678,1679],{"class":144,"line":206},[142,1680,183],{"emptyLinePlaceholder":7},[142,1682,1683,1685,1687,1689,1691],{"class":144,"line":222},[142,1684,190],{"class":189},[142,1686,193],{"class":159},[142,1688,196],{"class":169},[142,1690,200],{"class":199},[142,1692,203],{"class":159},[142,1694,1695,1697,1699,1701],{"class":144,"line":228},[142,1696,210],{"class":209},[142,1698,213],{"class":159},[142,1700,216],{"class":148},[142,1702,219],{"class":159},[142,1704,1705],{"class":144,"line":233},[142,1706,225],{"class":159},[142,1708,1709],{"class":144,"line":239},[142,1710,183],{"emptyLinePlaceholder":7},[142,1712,1713],{"class":144,"line":245},[142,1714,1715],{"class":176},"  \u002F\u002F Deposits amount from this object instance\n",[142,1717,1718],{"class":144,"line":274},[142,1719,242],{"class":176},[142,1721,1722,1724,1726,1728,1730,1732,1734,1736,1738,1740],{"class":144,"line":288},[142,1723,166],{"class":148},[142,1725,250],{"class":169},[142,1727,253],{"class":189},[142,1729,193],{"class":159},[142,1731,126],{"class":258},[142,1733,261],{"class":199},[142,1735,264],{"class":159},[142,1737,196],{"class":169},[142,1739,269],{"class":199},[142,1741,1742],{"class":159},")\n",[142,1744,1745,1748,1751],{"class":144,"line":297},[142,1746,1747],{"class":148},"                             throws",[142,1749,1750],{"class":258}," InterruptedException",[142,1752,160],{"class":159},[142,1754,1755,1758,1760,1763],{"class":144,"line":312},[142,1756,1757],{"class":148},"    while",[142,1759,280],{"class":159},[142,1761,1762],{"class":563},"true",[142,1764,203],{"class":159},[142,1766,1767,1769,1771,1773,1776,1779],{"class":144,"line":327},[142,1768,799],{"class":148},[142,1770,280],{"class":159},[142,1772,283],{"class":209},[142,1774,1775],{"class":159},".lock.",[142,1777,1778],{"class":189},"tryLock",[142,1780,1781],{"class":159},"()) {\n",[142,1783,1784,1787],{"class":144,"line":334},[142,1785,1786],{"class":148},"        try",[142,1788,160],{"class":159},[142,1790,1791,1794,1797,1799],{"class":144,"line":340},[142,1792,1793],{"class":148},"          if",[142,1795,1796],{"class":159}," (ba.lock.",[142,1798,1778],{"class":189},[142,1800,1781],{"class":159},[142,1802,1803,1806],{"class":144,"line":346},[142,1804,1805],{"class":148},"            try",[142,1807,160],{"class":159},[142,1809,1810,1813,1815,1817],{"class":144,"line":358},[142,1811,1812],{"class":148},"              if",[142,1814,303],{"class":159},[142,1816,306],{"class":148},[142,1818,309],{"class":159},[142,1820,1821,1824,1826,1828],{"class":144,"line":371},[142,1822,1823],{"class":148},"                throw",[142,1825,318],{"class":148},[142,1827,321],{"class":189},[142,1829,324],{"class":159},[142,1831,1832,1835],{"class":144,"line":377},[142,1833,1834],{"class":330},"                    \"Transfer cannot be completed\"",[142,1836,567],{"class":159},[142,1838,1839],{"class":144,"line":383},[142,1840,1841],{"class":159},"              }\n",[142,1843,1844,1847,1849],{"class":144,"line":388},[142,1845,1846],{"class":159},"              ba.balanceAmount ",[142,1848,352],{"class":148},[142,1850,355],{"class":159},[142,1852,1853,1856,1858,1860],{"class":144,"line":393},[142,1854,1855],{"class":209},"              this",[142,1857,213],{"class":159},[142,1859,366],{"class":148},[142,1861,355],{"class":159},[142,1863,1864,1867],{"class":144,"line":419},[142,1865,1866],{"class":148},"              break",[142,1868,1243],{"class":159},[142,1870,1871,1874,1877],{"class":144,"line":440},[142,1872,1873],{"class":159},"            } ",[142,1875,1876],{"class":148},"finally",[142,1878,160],{"class":159},[142,1880,1881,1884,1887],{"class":144,"line":445},[142,1882,1883],{"class":159},"              ba.lock.",[142,1885,1886],{"class":189},"unlock",[142,1888,517],{"class":159},[142,1890,1891],{"class":144,"line":472},[142,1892,1893],{"class":159},"            }\n",[142,1895,1896],{"class":144,"line":485},[142,1897,1898],{"class":159},"          }\n",[142,1900,1901,1904,1906],{"class":144,"line":497},[142,1902,1903],{"class":159},"        } ",[142,1905,1876],{"class":148},[142,1907,160],{"class":159},[142,1909,1910,1913,1915,1917],{"class":144,"line":502},[142,1911,1912],{"class":209},"          this",[142,1914,1775],{"class":159},[142,1916,1886],{"class":189},[142,1918,517],{"class":159},[142,1920,1921],{"class":144,"line":508},[142,1922,343],{"class":159},[142,1924,1925],{"class":144,"line":520},[142,1926,374],{"class":159},[142,1928,1929,1932,1935,1937,1940,1943,1945,1947],{"class":144,"line":525},[142,1930,1931],{"class":169},"      int",[142,1933,1934],{"class":159}," n ",[142,1936,216],{"class":148},[142,1938,1939],{"class":159}," number.",[142,1941,1942],{"class":189},"nextInt",[142,1944,193],{"class":159},[142,1946,601],{"class":563},[142,1948,567],{"class":159},[142,1950,1951,1953,1956,1958,1961,1964,1967],{"class":144,"line":1410},[142,1952,1931],{"class":169},[142,1954,1955],{"class":159}," TIME ",[142,1957,216],{"class":148},[142,1959,1960],{"class":563}," 1000",[142,1962,1963],{"class":148}," +",[142,1965,1966],{"class":159}," n; ",[142,1968,1969],{"class":176},"\u002F\u002F 1 second + random delay to prevent livelock\n",[142,1971,1972,1975,1978],{"class":144,"line":1419},[142,1973,1974],{"class":159},"      Thread.",[142,1976,1977],{"class":189},"sleep",[142,1979,1980],{"class":159},"(TIME);\n",[142,1982,1983],{"class":144,"line":1430},[142,1984,380],{"class":159},[142,1986,1987],{"class":144,"line":1435},[142,1988,225],{"class":159},[142,1990,1991],{"class":144,"line":1440},[142,1992,183],{"emptyLinePlaceholder":7},[142,1994,1995,1997,1999,2001,2003,2005,2007,2009,2011],{"class":144,"line":1445},[142,1996,396],{"class":148},[142,1998,399],{"class":148},[142,2000,250],{"class":169},[142,2002,404],{"class":189},[142,2004,193],{"class":159},[142,2006,149],{"class":148},[142,2008,156],{"class":258},[142,2010,413],{"class":199},[142,2012,416],{"class":159},[142,2014,2015,2017,2019,2021,2023,2025,2027,2029],{"class":144,"line":1450},[142,2016,422],{"class":148},[142,2018,156],{"class":258},[142,2020,427],{"class":199},[142,2022,264],{"class":159},[142,2024,149],{"class":148},[142,2026,170],{"class":169},[142,2028,269],{"class":199},[142,2030,203],{"class":159},[142,2032,2033],{"class":144,"line":1471},[142,2034,183],{"emptyLinePlaceholder":7},[142,2036,2037,2039,2041,2043,2045,2047,2049,2051,2053],{"class":144,"line":1490},[142,2038,448],{"class":258},[142,2040,451],{"class":159},[142,2042,216],{"class":148},[142,2044,318],{"class":148},[142,2046,458],{"class":189},[142,2048,193],{"class":159},[142,2050,463],{"class":148},[142,2052,466],{"class":189},[142,2054,469],{"class":159},[142,2056,2057,2059,2061,2063],{"class":144,"line":1495},[142,2058,475],{"class":148},[142,2060,250],{"class":169},[142,2062,480],{"class":189},[142,2064,469],{"class":159},[142,2066,2067,2070],{"class":144,"line":1516},[142,2068,2069],{"class":148},"          try",[142,2071,160],{"class":159},[142,2073,2074,2077,2079],{"class":144,"line":1531},[142,2075,2076],{"class":159},"            first.",[142,2078,491],{"class":189},[142,2080,494],{"class":159},[142,2082,2083,2086,2089,2091,2094,2097],{"class":144,"line":1540},[142,2084,2085],{"class":159},"          } ",[142,2087,2088],{"class":148},"catch",[142,2090,280],{"class":159},[142,2092,2093],{"class":258},"InterruptedException",[142,2095,2096],{"class":199}," e",[142,2098,203],{"class":159},[142,2100,2101,2104,2107,2110,2113,2116],{"class":144,"line":1545},[142,2102,2103],{"class":159},"            Thread.",[142,2105,2106],{"class":189},"currentThread",[142,2108,2109],{"class":159},"().",[142,2111,2112],{"class":189},"interrupt",[142,2114,2115],{"class":159},"(); ",[142,2117,2118],{"class":176},"\u002F\u002F Reset interrupted status\n",[142,2120,2121],{"class":144,"line":1550},[142,2122,1898],{"class":159},[142,2124,2125],{"class":144,"line":1559},[142,2126,343],{"class":159},[142,2128,2129],{"class":144,"line":1564},[142,2130,505],{"class":159},[142,2132,2134,2136,2138],{"class":144,"line":2133},52,[142,2135,511],{"class":159},[142,2137,514],{"class":189},[142,2139,517],{"class":159},[142,2141,2143],{"class":144,"line":2142},53,[142,2144,225],{"class":159},[142,2146,2148],{"class":144,"line":2147},54,[142,2149,528],{"class":159},[39,2151,2152],{},"Deadlock is impossible in this compliant solution because locks are never held indefinitely. If the current object's lock is acquired but the second lock is unavailable, the first lock is released and the thread sleeps for some specified amount of time before attempting to reacquire the lock.",[39,2154,2155,2156,2158,2159,2162,2163,2166],{},"Code that uses this locking strategy has behavior similar to that of synchronized code that uses the traditional monitor lock. ",[43,2157,1590],{}," also provides several other capabilities. For example, the ",[43,2160,2161],{},"tryLock()"," method immediately returns false when another thread already holds the lock. Further, the ",[43,2164,2165],{},"java.util.concurrent.locks.ReentrantReadWriteLock"," class has multiple-readers\u002Fsingle-writer semantics and is useful when some threads require a lock to write information while other threads require the lock to concurrently read the information.",[106,2168,2170],{"id":2169},"noncompliant-code-example-different-lock-orders-recursive","Noncompliant Code Example (Different Lock Orders, Recursive)",[39,2172,2173,2174,2177],{},"The following immutable ",[43,2175,2176],{},"WebRequest"," class encapsulates a web request received by a server:",[133,2179,2181],{"className":135,"code":2180,"language":137,"meta":138,"style":138},"\u002F\u002F Immutable WebRequest\npublic final class WebRequest {\n  private final long bandwidth;\n  private final long responseTime;\n\n  public WebRequest(long bandwidth, long responseTime) {\n    this.bandwidth = bandwidth;\n    this.responseTime = responseTime;\n  }\n\n  public long getBandwidth() {\n    return bandwidth;\n  }\n\n  public long getResponseTime() {\n    return responseTime;\n  }\n}\n",[43,2182,2183,2188,2202,2213,2224,2228,2251,2262,2273,2277,2281,2292,2299,2303,2307,2318,2324,2328],{"__ignoreMap":138},[142,2184,2185],{"class":144,"line":145},[142,2186,2187],{"class":176},"\u002F\u002F Immutable WebRequest\n",[142,2189,2190,2193,2195,2197,2200],{"class":144,"line":163},[142,2191,2192],{"class":148},"public",[142,2194,709],{"class":148},[142,2196,152],{"class":148},[142,2198,2199],{"class":155}," WebRequest",[142,2201,160],{"class":159},[142,2203,2204,2206,2208,2210],{"class":144,"line":180},[142,2205,166],{"class":148},[142,2207,709],{"class":148},[142,2209,1067],{"class":169},[142,2211,2212],{"class":159}," bandwidth;\n",[142,2214,2215,2217,2219,2221],{"class":144,"line":186},[142,2216,166],{"class":148},[142,2218,709],{"class":148},[142,2220,1067],{"class":169},[142,2222,2223],{"class":159}," responseTime;\n",[142,2225,2226],{"class":144,"line":206},[142,2227,183],{"emptyLinePlaceholder":7},[142,2229,2230,2232,2234,2236,2239,2242,2244,2246,2249],{"class":144,"line":222},[142,2231,396],{"class":148},[142,2233,2199],{"class":189},[142,2235,193],{"class":159},[142,2237,2238],{"class":169},"long",[142,2240,2241],{"class":199}," bandwidth",[142,2243,264],{"class":159},[142,2245,2238],{"class":169},[142,2247,2248],{"class":199}," responseTime",[142,2250,203],{"class":159},[142,2252,2253,2255,2258,2260],{"class":144,"line":228},[142,2254,210],{"class":209},[142,2256,2257],{"class":159},".bandwidth ",[142,2259,216],{"class":148},[142,2261,2212],{"class":159},[142,2263,2264,2266,2269,2271],{"class":144,"line":233},[142,2265,210],{"class":209},[142,2267,2268],{"class":159},".responseTime ",[142,2270,216],{"class":148},[142,2272,2223],{"class":159},[142,2274,2275],{"class":144,"line":239},[142,2276,225],{"class":159},[142,2278,2279],{"class":144,"line":245},[142,2280,183],{"emptyLinePlaceholder":7},[142,2282,2283,2285,2287,2290],{"class":144,"line":274},[142,2284,396],{"class":148},[142,2286,1067],{"class":169},[142,2288,2289],{"class":189}," getBandwidth",[142,2291,469],{"class":159},[142,2293,2294,2297],{"class":144,"line":288},[142,2295,2296],{"class":148},"    return",[142,2298,2212],{"class":159},[142,2300,2301],{"class":144,"line":297},[142,2302,225],{"class":159},[142,2304,2305],{"class":144,"line":312},[142,2306,183],{"emptyLinePlaceholder":7},[142,2308,2309,2311,2313,2316],{"class":144,"line":327},[142,2310,396],{"class":148},[142,2312,1067],{"class":169},[142,2314,2315],{"class":189}," getResponseTime",[142,2317,469],{"class":159},[142,2319,2320,2322],{"class":144,"line":334},[142,2321,2296],{"class":148},[142,2323,2223],{"class":159},[142,2325,2326],{"class":144,"line":340},[142,2327,225],{"class":159},[142,2329,2330],{"class":144,"line":346},[142,2331,528],{"class":159},[39,2333,2334],{},"Each request has a response time associated with it, along with a measurement of the network bandwidth required to fulfill the request.",[39,2336,2337],{},"This noncompliant code example monitors web requests and provides routines for calculating the average bandwidth and response time required to serve incoming requests.",[129,2339,2340],{"quality":131},[133,2341,2343],{"className":135,"code":2342,"language":137,"meta":138,"style":138},"public final class WebRequestAnalyzer {\n  private final Vector\u003CWebRequest> requests = new Vector\u003CWebRequest>();\n\n  public boolean addWebRequest(WebRequest request) {\n    return requests.add(new WebRequest(request.getBandwidth(),\n                        request.getResponseTime()));\n  }\n\n  public double getAverageBandwidth() {\n    if (requests.size() == 0) {\n      throw new IllegalStateException(\"The vector is empty!\");\n    }\n    return calculateAverageBandwidth(0, 0);\n  }\n\n  public double getAverageResponseTime() {\n    if (requests.size() == 0) {\n      throw new IllegalStateException(\"The vector is empty!\");\n    }\n    return calculateAverageResponseTime(requests.size() - 1, 0);\n  }\n\n  private double calculateAverageBandwidth(int i, long bandwidth) {\n    if (i == requests.size()) {\n      return bandwidth \u002F requests.size();\n    }\n    synchronized (requests.elementAt(i)) {\n      bandwidth += requests.get(i).getBandwidth();\n      \u002F\u002F Acquires locks in increasing order\n      return calculateAverageBandwidth(++i, bandwidth);\n    }\n  }\n\n  private double calculateAverageResponseTime(int i, long responseTime) {\n    if (i \u003C= -1) {\n      return responseTime \u002F requests.size();\n    }\n    synchronized (requests.elementAt(i)) {\n      responseTime += requests.get(i).getResponseTime();\n      \u002F\u002F Acquires locks in decreasing order\n      return calculateAverageResponseTime(--i, responseTime);\n    }\n  }\n}\n",[43,2344,2345,2358,2387,2391,2410,2435,2446,2450,2454,2465,2485,2502,2506,2523,2527,2531,2542,2558,2572,2576,2601,2605,2609,2633,2648,2664,2668,2680,2699,2704,2718,2722,2726,2730,2752,2767,2782,2786,2796,2813,2818,2832,2836,2840],{"__ignoreMap":138},[142,2346,2347,2349,2351,2353,2356],{"class":144,"line":145},[142,2348,2192],{"class":148},[142,2350,709],{"class":148},[142,2352,152],{"class":148},[142,2354,2355],{"class":155}," WebRequestAnalyzer",[142,2357,160],{"class":159},[142,2359,2360,2362,2364,2367,2369,2371,2374,2376,2378,2380,2382,2384],{"class":144,"line":163},[142,2361,166],{"class":148},[142,2363,709],{"class":148},[142,2365,2366],{"class":258}," Vector",[142,2368,1028],{"class":159},[142,2370,2176],{"class":169},[142,2372,2373],{"class":159},"> requests ",[142,2375,216],{"class":148},[142,2377,318],{"class":148},[142,2379,2366],{"class":258},[142,2381,1028],{"class":159},[142,2383,2176],{"class":169},[142,2385,2386],{"class":159},">();\n",[142,2388,2389],{"class":144,"line":180},[142,2390,183],{"emptyLinePlaceholder":7},[142,2392,2393,2395,2398,2401,2403,2405,2408],{"class":144,"line":186},[142,2394,396],{"class":148},[142,2396,2397],{"class":169}," boolean",[142,2399,2400],{"class":189}," addWebRequest",[142,2402,193],{"class":159},[142,2404,2176],{"class":258},[142,2406,2407],{"class":199}," request",[142,2409,203],{"class":159},[142,2411,2412,2414,2417,2420,2422,2424,2426,2429,2432],{"class":144,"line":206},[142,2413,2296],{"class":148},[142,2415,2416],{"class":159}," requests.",[142,2418,2419],{"class":189},"add",[142,2421,193],{"class":159},[142,2423,463],{"class":148},[142,2425,2199],{"class":189},[142,2427,2428],{"class":159},"(request.",[142,2430,2431],{"class":189},"getBandwidth",[142,2433,2434],{"class":159},"(),\n",[142,2436,2437,2440,2443],{"class":144,"line":222},[142,2438,2439],{"class":159},"                        request.",[142,2441,2442],{"class":189},"getResponseTime",[142,2444,2445],{"class":159},"()));\n",[142,2447,2448],{"class":144,"line":228},[142,2449,225],{"class":159},[142,2451,2452],{"class":144,"line":233},[142,2453,183],{"emptyLinePlaceholder":7},[142,2455,2456,2458,2460,2463],{"class":144,"line":239},[142,2457,396],{"class":148},[142,2459,170],{"class":169},[142,2461,2462],{"class":189}," getAverageBandwidth",[142,2464,469],{"class":159},[142,2466,2467,2469,2472,2475,2478,2481,2483],{"class":144,"line":245},[142,2468,1294],{"class":148},[142,2470,2471],{"class":159}," (requests.",[142,2473,2474],{"class":189},"size",[142,2476,2477],{"class":159},"() ",[142,2479,2480],{"class":148},"==",[142,2482,1240],{"class":563},[142,2484,203],{"class":159},[142,2486,2487,2490,2492,2495,2497,2500],{"class":144,"line":274},[142,2488,2489],{"class":148},"      throw",[142,2491,318],{"class":148},[142,2493,2494],{"class":189}," IllegalStateException",[142,2496,193],{"class":159},[142,2498,2499],{"class":330},"\"The vector is empty!\"",[142,2501,567],{"class":159},[142,2503,2504],{"class":144,"line":288},[142,2505,380],{"class":159},[142,2507,2508,2510,2513,2515,2517,2519,2521],{"class":144,"line":297},[142,2509,2296],{"class":148},[142,2511,2512],{"class":189}," calculateAverageBandwidth",[142,2514,193],{"class":159},[142,2516,1098],{"class":563},[142,2518,264],{"class":159},[142,2520,1098],{"class":563},[142,2522,567],{"class":159},[142,2524,2525],{"class":144,"line":312},[142,2526,225],{"class":159},[142,2528,2529],{"class":144,"line":327},[142,2530,183],{"emptyLinePlaceholder":7},[142,2532,2533,2535,2537,2540],{"class":144,"line":334},[142,2534,396],{"class":148},[142,2536,170],{"class":169},[142,2538,2539],{"class":189}," getAverageResponseTime",[142,2541,469],{"class":159},[142,2543,2544,2546,2548,2550,2552,2554,2556],{"class":144,"line":340},[142,2545,1294],{"class":148},[142,2547,2471],{"class":159},[142,2549,2474],{"class":189},[142,2551,2477],{"class":159},[142,2553,2480],{"class":148},[142,2555,1240],{"class":563},[142,2557,203],{"class":159},[142,2559,2560,2562,2564,2566,2568,2570],{"class":144,"line":346},[142,2561,2489],{"class":148},[142,2563,318],{"class":148},[142,2565,2494],{"class":189},[142,2567,193],{"class":159},[142,2569,2499],{"class":330},[142,2571,567],{"class":159},[142,2573,2574],{"class":144,"line":358},[142,2575,380],{"class":159},[142,2577,2578,2580,2583,2586,2588,2590,2593,2595,2597,2599],{"class":144,"line":371},[142,2579,2296],{"class":148},[142,2581,2582],{"class":189}," calculateAverageResponseTime",[142,2584,2585],{"class":159},"(requests.",[142,2587,2474],{"class":189},[142,2589,2477],{"class":159},[142,2591,2592],{"class":148},"-",[142,2594,1214],{"class":563},[142,2596,264],{"class":159},[142,2598,1098],{"class":563},[142,2600,567],{"class":159},[142,2602,2603],{"class":144,"line":377},[142,2604,225],{"class":159},[142,2606,2607],{"class":144,"line":383},[142,2608,183],{"emptyLinePlaceholder":7},[142,2610,2611,2613,2615,2617,2619,2622,2625,2627,2629,2631],{"class":144,"line":388},[142,2612,166],{"class":148},[142,2614,170],{"class":169},[142,2616,2512],{"class":189},[142,2618,193],{"class":159},[142,2620,2621],{"class":169},"int",[142,2623,2624],{"class":199}," i",[142,2626,264],{"class":159},[142,2628,2238],{"class":169},[142,2630,2241],{"class":199},[142,2632,203],{"class":159},[142,2634,2635,2637,2640,2642,2644,2646],{"class":144,"line":393},[142,2636,1294],{"class":148},[142,2638,2639],{"class":159}," (i ",[142,2641,2480],{"class":148},[142,2643,2416],{"class":159},[142,2645,2474],{"class":189},[142,2647,1781],{"class":159},[142,2649,2650,2653,2656,2658,2660,2662],{"class":144,"line":419},[142,2651,2652],{"class":148},"      return",[142,2654,2655],{"class":159}," bandwidth ",[142,2657,6],{"class":148},[142,2659,2416],{"class":159},[142,2661,2474],{"class":189},[142,2663,517],{"class":159},[142,2665,2666],{"class":144,"line":440},[142,2667,380],{"class":159},[142,2669,2670,2672,2674,2677],{"class":144,"line":445},[142,2671,277],{"class":148},[142,2673,2471],{"class":159},[142,2675,2676],{"class":189},"elementAt",[142,2678,2679],{"class":159},"(i)) {\n",[142,2681,2682,2685,2687,2689,2692,2695,2697],{"class":144,"line":472},[142,2683,2684],{"class":159},"      bandwidth ",[142,2686,352],{"class":148},[142,2688,2416],{"class":159},[142,2690,2691],{"class":189},"get",[142,2693,2694],{"class":159},"(i).",[142,2696,2431],{"class":189},[142,2698,517],{"class":159},[142,2700,2701],{"class":144,"line":485},[142,2702,2703],{"class":176},"      \u002F\u002F Acquires locks in increasing order\n",[142,2705,2706,2708,2710,2712,2715],{"class":144,"line":497},[142,2707,2652],{"class":148},[142,2709,2512],{"class":189},[142,2711,193],{"class":159},[142,2713,2714],{"class":148},"++",[142,2716,2717],{"class":159},"i, bandwidth);\n",[142,2719,2720],{"class":144,"line":502},[142,2721,380],{"class":159},[142,2723,2724],{"class":144,"line":508},[142,2725,225],{"class":159},[142,2727,2728],{"class":144,"line":520},[142,2729,183],{"emptyLinePlaceholder":7},[142,2731,2732,2734,2736,2738,2740,2742,2744,2746,2748,2750],{"class":144,"line":525},[142,2733,166],{"class":148},[142,2735,170],{"class":169},[142,2737,2582],{"class":189},[142,2739,193],{"class":159},[142,2741,2621],{"class":169},[142,2743,2624],{"class":199},[142,2745,264],{"class":159},[142,2747,2238],{"class":169},[142,2749,2248],{"class":199},[142,2751,203],{"class":159},[142,2753,2754,2756,2758,2761,2763,2765],{"class":144,"line":1410},[142,2755,1294],{"class":148},[142,2757,2639],{"class":159},[142,2759,2760],{"class":148},"\u003C=",[142,2762,1232],{"class":148},[142,2764,1235],{"class":563},[142,2766,203],{"class":159},[142,2768,2769,2771,2774,2776,2778,2780],{"class":144,"line":1419},[142,2770,2652],{"class":148},[142,2772,2773],{"class":159}," responseTime ",[142,2775,6],{"class":148},[142,2777,2416],{"class":159},[142,2779,2474],{"class":189},[142,2781,517],{"class":159},[142,2783,2784],{"class":144,"line":1430},[142,2785,380],{"class":159},[142,2787,2788,2790,2792,2794],{"class":144,"line":1435},[142,2789,277],{"class":148},[142,2791,2471],{"class":159},[142,2793,2676],{"class":189},[142,2795,2679],{"class":159},[142,2797,2798,2801,2803,2805,2807,2809,2811],{"class":144,"line":1440},[142,2799,2800],{"class":159},"      responseTime ",[142,2802,352],{"class":148},[142,2804,2416],{"class":159},[142,2806,2691],{"class":189},[142,2808,2694],{"class":159},[142,2810,2442],{"class":189},[142,2812,517],{"class":159},[142,2814,2815],{"class":144,"line":1445},[142,2816,2817],{"class":176},"      \u002F\u002F Acquires locks in decreasing order\n",[142,2819,2820,2822,2824,2826,2829],{"class":144,"line":1450},[142,2821,2652],{"class":148},[142,2823,2582],{"class":189},[142,2825,193],{"class":159},[142,2827,2828],{"class":148},"--",[142,2830,2831],{"class":159},"i, responseTime);\n",[142,2833,2834],{"class":144,"line":1471},[142,2835,380],{"class":159},[142,2837,2838],{"class":144,"line":1490},[142,2839,225],{"class":159},[142,2841,2842],{"class":144,"line":1495},[142,2843,528],{"class":159},[39,2845,2846,2847,2850,2851,2854,2855,2858,2859,87,2862,2865],{},"The monitoring application is built around the ",[43,2848,2849],{},"WebRequestAnalyzer"," class, which maintains a list of web requests using the ",[43,2852,2853],{},"requests"," vector and includes the ",[43,2856,2857],{},"addWebRequest()"," setter method. Any thread can request the average bandwidth or average response time of all web requests by invoking the ",[43,2860,2861],{},"getAverageBandwidth()",[43,2863,2864],{},"getAverageResponseTime()"," methods.",[39,2867,2868],{},"These methods use fine-grained locking by holding locks on individual elements (web requests) of the vector. These locks permit new requests to be added while the computations are still underway. Consequently, the statistics reported by the methods are accurate when they return the results.",[39,2870,2871,2872,2875,2876,2879,2880,2883,2884,2886,2887,2889,2890,2892],{},"Unfortunately, this noncompliant code example is prone to deadlock because the recursive calls within the synchronized regions of these methods acquire the intrinsic locks in opposite numerical orders. That is, ",[43,2873,2874],{},"calculateAverageBandwidth()"," requests locks from index 0 up to ",[43,2877,2878],{},"requests.size()"," − 1, whereas ",[43,2881,2882],{},"calculateAverageResponseTime()"," requests them from index ",[43,2885,2878],{}," − 1 down to 0. Because of recursion, previously acquired locks are never released by either method. Deadlock occurs when two threads call these methods out of order, because one thread calls ",[43,2888,2874],{}," , while the other calls ",[43,2891,2882],{}," before either method has finished executing.",[39,2894,2895,2896,2898,2899,2901,2902,2904,2905,2907,2908,2911],{},"For example, when there are 20 requests in the vector, and one thread calls ",[43,2897,2861],{}," , the thread acquires the intrinsic lock of ",[43,2900,2176],{}," 0, the first element in the vector. Meanwhile, if a second thread calls ",[43,2903,2864],{}," , it acquires the intrinsic lock of ",[43,2906,2176],{}," 19, the last element in the vector. Consequently, ",[48,2909,115],{"href":2910},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-bb-glossary#RuleBB.Glossary-d"," results because neither thread can acquire all of the locks required to proceed with its calculations.",[39,2913,2914,2915,2917,2918,2922,2923,2925],{},"Note that the ",[43,2916,2857],{}," method also has a ",[48,2919,2921],{"href":2920},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-bb-glossary#RuleBB.Glossary-race","race condition"," with ",[43,2924,2882],{}," . While iterating over the vector, new elements can be added to the vector, invalidating the results of the previous computation. This race condition can be prevented by locking on the last element of the vector (when it contains at least one element) before inserting the element.",[106,2927,2929],{"id":2928},"compliant-solution","Compliant Solution",[39,2931,2932],{},"In this compliant solution, the two calculation methods acquire and release locks in the same order, beginning with the first web request in the vector.",[129,2934,2935],{"quality":675},[133,2936,2938],{"className":135,"code":2937,"language":137,"meta":138,"style":138},"public final class WebRequestAnalyzer {\n  private final Vector\u003CWebRequest> requests = new Vector\u003CWebRequest>();\n\n  public boolean addWebRequest(WebRequest request) {\n    return requests.add(new WebRequest(request.getBandwidth(),\n                        request.getResponseTime()));\n  }\n\n  public double getAverageBandwidth() {\n    if (requests.size() == 0) {\n      throw new IllegalStateException(\"The vector is empty!\");\n    }\n    return calculateAverageBandwidth(0, 0);\n  }\n\n  public double getAverageResponseTime() {\n    if (requests.size() == 0) {\n      throw new IllegalStateException(\"The vector is empty!\");\n    }\n    return calculateAverageResponseTime(0, 0);\n  }\n\n  private double calculateAverageBandwidth(int i, long bandwidth) {\n    if (i == requests.size()) {\n      return bandwidth \u002F requests.size();\n    }\n    synchronized (requests.elementAt(i)) {\n      \u002F\u002F Acquires locks in increasing order\n      bandwidth += requests.get(i).getBandwidth();\n      return calculateAverageBandwidth(++i, bandwidth);\n    }\n  }\n\n  private double calculateAverageResponseTime(int i, long responseTime) {\n    if (i == requests.size()) {\n      return responseTime \u002F requests.size();\n    }\n    synchronized (requests.elementAt(i)) {\n      \u002F\u002F Acquires locks in increasing order\n      responseTime += requests.get(i).getResponseTime();\n      return calculateAverageResponseTime(++i, responseTime);\n    }\n  }\n}\n",[43,2939,2940,2952,2978,2982,2998,3018,3026,3030,3034,3044,3060,3074,3078,3094,3098,3102,3112,3128,3142,3146,3162,3166,3170,3192,3206,3220,3224,3234,3238,3254,3266,3270,3274,3278,3300,3314,3328,3332,3342,3346,3362,3374,3378,3382],{"__ignoreMap":138},[142,2941,2942,2944,2946,2948,2950],{"class":144,"line":145},[142,2943,2192],{"class":148},[142,2945,709],{"class":148},[142,2947,152],{"class":148},[142,2949,2355],{"class":155},[142,2951,160],{"class":159},[142,2953,2954,2956,2958,2960,2962,2964,2966,2968,2970,2972,2974,2976],{"class":144,"line":163},[142,2955,166],{"class":148},[142,2957,709],{"class":148},[142,2959,2366],{"class":258},[142,2961,1028],{"class":159},[142,2963,2176],{"class":169},[142,2965,2373],{"class":159},[142,2967,216],{"class":148},[142,2969,318],{"class":148},[142,2971,2366],{"class":258},[142,2973,1028],{"class":159},[142,2975,2176],{"class":169},[142,2977,2386],{"class":159},[142,2979,2980],{"class":144,"line":180},[142,2981,183],{"emptyLinePlaceholder":7},[142,2983,2984,2986,2988,2990,2992,2994,2996],{"class":144,"line":186},[142,2985,396],{"class":148},[142,2987,2397],{"class":169},[142,2989,2400],{"class":189},[142,2991,193],{"class":159},[142,2993,2176],{"class":258},[142,2995,2407],{"class":199},[142,2997,203],{"class":159},[142,2999,3000,3002,3004,3006,3008,3010,3012,3014,3016],{"class":144,"line":206},[142,3001,2296],{"class":148},[142,3003,2416],{"class":159},[142,3005,2419],{"class":189},[142,3007,193],{"class":159},[142,3009,463],{"class":148},[142,3011,2199],{"class":189},[142,3013,2428],{"class":159},[142,3015,2431],{"class":189},[142,3017,2434],{"class":159},[142,3019,3020,3022,3024],{"class":144,"line":222},[142,3021,2439],{"class":159},[142,3023,2442],{"class":189},[142,3025,2445],{"class":159},[142,3027,3028],{"class":144,"line":228},[142,3029,225],{"class":159},[142,3031,3032],{"class":144,"line":233},[142,3033,183],{"emptyLinePlaceholder":7},[142,3035,3036,3038,3040,3042],{"class":144,"line":239},[142,3037,396],{"class":148},[142,3039,170],{"class":169},[142,3041,2462],{"class":189},[142,3043,469],{"class":159},[142,3045,3046,3048,3050,3052,3054,3056,3058],{"class":144,"line":245},[142,3047,1294],{"class":148},[142,3049,2471],{"class":159},[142,3051,2474],{"class":189},[142,3053,2477],{"class":159},[142,3055,2480],{"class":148},[142,3057,1240],{"class":563},[142,3059,203],{"class":159},[142,3061,3062,3064,3066,3068,3070,3072],{"class":144,"line":274},[142,3063,2489],{"class":148},[142,3065,318],{"class":148},[142,3067,2494],{"class":189},[142,3069,193],{"class":159},[142,3071,2499],{"class":330},[142,3073,567],{"class":159},[142,3075,3076],{"class":144,"line":288},[142,3077,380],{"class":159},[142,3079,3080,3082,3084,3086,3088,3090,3092],{"class":144,"line":297},[142,3081,2296],{"class":148},[142,3083,2512],{"class":189},[142,3085,193],{"class":159},[142,3087,1098],{"class":563},[142,3089,264],{"class":159},[142,3091,1098],{"class":563},[142,3093,567],{"class":159},[142,3095,3096],{"class":144,"line":312},[142,3097,225],{"class":159},[142,3099,3100],{"class":144,"line":327},[142,3101,183],{"emptyLinePlaceholder":7},[142,3103,3104,3106,3108,3110],{"class":144,"line":334},[142,3105,396],{"class":148},[142,3107,170],{"class":169},[142,3109,2539],{"class":189},[142,3111,469],{"class":159},[142,3113,3114,3116,3118,3120,3122,3124,3126],{"class":144,"line":340},[142,3115,1294],{"class":148},[142,3117,2471],{"class":159},[142,3119,2474],{"class":189},[142,3121,2477],{"class":159},[142,3123,2480],{"class":148},[142,3125,1240],{"class":563},[142,3127,203],{"class":159},[142,3129,3130,3132,3134,3136,3138,3140],{"class":144,"line":346},[142,3131,2489],{"class":148},[142,3133,318],{"class":148},[142,3135,2494],{"class":189},[142,3137,193],{"class":159},[142,3139,2499],{"class":330},[142,3141,567],{"class":159},[142,3143,3144],{"class":144,"line":358},[142,3145,380],{"class":159},[142,3147,3148,3150,3152,3154,3156,3158,3160],{"class":144,"line":371},[142,3149,2296],{"class":148},[142,3151,2582],{"class":189},[142,3153,193],{"class":159},[142,3155,1098],{"class":563},[142,3157,264],{"class":159},[142,3159,1098],{"class":563},[142,3161,567],{"class":159},[142,3163,3164],{"class":144,"line":377},[142,3165,225],{"class":159},[142,3167,3168],{"class":144,"line":383},[142,3169,183],{"emptyLinePlaceholder":7},[142,3171,3172,3174,3176,3178,3180,3182,3184,3186,3188,3190],{"class":144,"line":388},[142,3173,166],{"class":148},[142,3175,170],{"class":169},[142,3177,2512],{"class":189},[142,3179,193],{"class":159},[142,3181,2621],{"class":169},[142,3183,2624],{"class":199},[142,3185,264],{"class":159},[142,3187,2238],{"class":169},[142,3189,2241],{"class":199},[142,3191,203],{"class":159},[142,3193,3194,3196,3198,3200,3202,3204],{"class":144,"line":393},[142,3195,1294],{"class":148},[142,3197,2639],{"class":159},[142,3199,2480],{"class":148},[142,3201,2416],{"class":159},[142,3203,2474],{"class":189},[142,3205,1781],{"class":159},[142,3207,3208,3210,3212,3214,3216,3218],{"class":144,"line":419},[142,3209,2652],{"class":148},[142,3211,2655],{"class":159},[142,3213,6],{"class":148},[142,3215,2416],{"class":159},[142,3217,2474],{"class":189},[142,3219,517],{"class":159},[142,3221,3222],{"class":144,"line":440},[142,3223,380],{"class":159},[142,3225,3226,3228,3230,3232],{"class":144,"line":445},[142,3227,277],{"class":148},[142,3229,2471],{"class":159},[142,3231,2676],{"class":189},[142,3233,2679],{"class":159},[142,3235,3236],{"class":144,"line":472},[142,3237,2703],{"class":176},[142,3239,3240,3242,3244,3246,3248,3250,3252],{"class":144,"line":485},[142,3241,2684],{"class":159},[142,3243,352],{"class":148},[142,3245,2416],{"class":159},[142,3247,2691],{"class":189},[142,3249,2694],{"class":159},[142,3251,2431],{"class":189},[142,3253,517],{"class":159},[142,3255,3256,3258,3260,3262,3264],{"class":144,"line":497},[142,3257,2652],{"class":148},[142,3259,2512],{"class":189},[142,3261,193],{"class":159},[142,3263,2714],{"class":148},[142,3265,2717],{"class":159},[142,3267,3268],{"class":144,"line":502},[142,3269,380],{"class":159},[142,3271,3272],{"class":144,"line":508},[142,3273,225],{"class":159},[142,3275,3276],{"class":144,"line":520},[142,3277,183],{"emptyLinePlaceholder":7},[142,3279,3280,3282,3284,3286,3288,3290,3292,3294,3296,3298],{"class":144,"line":525},[142,3281,166],{"class":148},[142,3283,170],{"class":169},[142,3285,2582],{"class":189},[142,3287,193],{"class":159},[142,3289,2621],{"class":169},[142,3291,2624],{"class":199},[142,3293,264],{"class":159},[142,3295,2238],{"class":169},[142,3297,2248],{"class":199},[142,3299,203],{"class":159},[142,3301,3302,3304,3306,3308,3310,3312],{"class":144,"line":1410},[142,3303,1294],{"class":148},[142,3305,2639],{"class":159},[142,3307,2480],{"class":148},[142,3309,2416],{"class":159},[142,3311,2474],{"class":189},[142,3313,1781],{"class":159},[142,3315,3316,3318,3320,3322,3324,3326],{"class":144,"line":1419},[142,3317,2652],{"class":148},[142,3319,2773],{"class":159},[142,3321,6],{"class":148},[142,3323,2416],{"class":159},[142,3325,2474],{"class":189},[142,3327,517],{"class":159},[142,3329,3330],{"class":144,"line":1430},[142,3331,380],{"class":159},[142,3333,3334,3336,3338,3340],{"class":144,"line":1435},[142,3335,277],{"class":148},[142,3337,2471],{"class":159},[142,3339,2676],{"class":189},[142,3341,2679],{"class":159},[142,3343,3344],{"class":144,"line":1440},[142,3345,2703],{"class":176},[142,3347,3348,3350,3352,3354,3356,3358,3360],{"class":144,"line":1445},[142,3349,2800],{"class":159},[142,3351,352],{"class":148},[142,3353,2416],{"class":159},[142,3355,2691],{"class":189},[142,3357,2694],{"class":159},[142,3359,2442],{"class":189},[142,3361,517],{"class":159},[142,3363,3364,3366,3368,3370,3372],{"class":144,"line":1450},[142,3365,2652],{"class":148},[142,3367,2582],{"class":189},[142,3369,193],{"class":159},[142,3371,2714],{"class":148},[142,3373,2831],{"class":159},[142,3375,3376],{"class":144,"line":1471},[142,3377,380],{"class":159},[142,3379,3380],{"class":144,"line":1490},[142,3381,225],{"class":159},[142,3383,3384],{"class":144,"line":1495},[142,3385,528],{"class":159},[39,3387,3388],{},"Consequently, while one thread is calculating the average bandwidth or response time, another thread cannot interfere or induce deadlock. Each thread must first synchronize on the first web request, which cannot happen until any prior calculation completes.",[39,3390,3391,3392,3394],{},"Locking on the last element of the vector in ",[43,3393,2857],{}," is unnecessary for two reasons. First, the locks are acquired in increasing order in all the methods. Second, updates to the vector are reflected in the results of the computations.",[106,3396,3398],{"id":3397},"risk-assessment","Risk Assessment",[39,3400,3401,3402,52],{},"Acquiring and releasing locks in the wrong order can result in ",[48,3403,115],{"href":50},[3405,3406,3407,3408,3407,3438],"table",{},"\n  ",[3409,3410,3411,3412,3407],"thead",{},"\n    ",[3413,3414,3415,3416,3415,3420,3415,3423,3415,3426,3415,3429,3415,3432,3415,3435,3411],"tr",{},"\n      ",[3417,3418,3419],"th",{},"Rule",[3417,3421,3422],{},"Severity",[3417,3424,3425],{},"Likelihood",[3417,3427,3428],{},"Detectable",[3417,3430,3431],{},"Repairable",[3417,3433,3434],{},"Priority",[3417,3436,3437],{},"Level",[3439,3440,3411,3441,3407],"tbody",{},[3413,3442,3415,3443,3415,3447,3415,3450,3415,3453,3415,3456,3415,3458,3415,3464,3411],{},[3444,3445,3446],"td",{},"LCK07-J",[3444,3448,3449],{},"Low",[3444,3451,3452],{},"Likely",[3444,3454,3455],{},"No",[3444,3457,3455],{},[3444,3459,3461],{"style":3460},"color: #27ae60;",[539,3462,3463],{},"P3",[3444,3465,3466],{"style":3460},[539,3467,3468],{},"L3",[106,3470,3472],{"id":3471},"automated-detection","Automated Detection",[39,3474,3475],{},"Some static analysis tools can detect violations of this rule.",[3405,3477,3480],{"className":3478},[3479],"wrapped",[3439,3481,3482,3498,3528,3554,3583],{},[3413,3483,3486,3489,3492,3495],{"className":3484},[3485],"header",[3417,3487,3488],{},"Tool",[3417,3490,3491],{},"Version",[3417,3493,3494],{},"Checker",[3417,3496,3497],{},"Description",[3413,3499,3502,3508,3511,3525],{"className":3500},[3501],"odd",[3444,3503,3504],{},[48,3505,3507],{"href":3506},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fcoverity","Coverity",[3444,3509,3510],{},"7.5",[3444,3512,3513],{},[39,3514,3515,3519,3522],{},[3516,3517,3518],"strong",{},"LOCK_INVERSION",[3520,3521],"br",{},[3516,3523,3524],{},"LOCK_ORDERING",[3444,3526,3527],{},"Implemented",[3413,3529,3532,3538,3546,3551],{"className":3530},[3531],"even",[3444,3533,3534],{},[48,3535,3537],{"href":3536},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fparasoft","Parasoft Jtest",[3444,3539,3540],{},[3541,3542,3545],"div",{"className":3543},[3544],"content-wrapper","2025.2",[3444,3547,3548],{},[3516,3549,3550],{},"CERT.LCK07.LORD",[3444,3552,3553],{},"Ensure that nested locks are ordered correctly",[3413,3555,3557,3563,3571,3579],{"className":3556},[3501],[3444,3558,3559],{},[48,3560,3562],{"href":3561},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fpvs-studio","PVS-Studio",[3444,3564,3565],{},[3541,3566,3568],{"className":3567},[3544],[39,3569,3570],{},"7.42",[3444,3572,3573],{},[3516,3574,3575],{},[48,3576,3578],{"href":3577},"https:\u002F\u002Fpvs-studio.com\u002Fen\u002Fdocs\u002Fwarnings\u002Fv6129\u002F","V6129",[3444,3580,3581],{},[3520,3582],{},[3413,3584,3586,3592,3598,3605],{"className":3585},[3531],[3444,3587,3588],{},[48,3589,3591],{"href":3590},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fthreadsafe","ThreadSafe",[3444,3593,3594],{},[3541,3595,3597],{"className":3596},[3544],"1.3",[3444,3599,3600],{},[39,3601,3602],{},[3516,3603,3604],{},"CCE_DL_DEADLOCK",[3444,3606,3527],{},[106,3608,3610],{"id":3609},"related-guidelines","Related Guidelines",[3405,3612,3613,3621],{},[3409,3614,3615],{},[3413,3616,3617,3619],{},[3417,3618],{},[3417,3620],{},[3439,3622,3623,3636],{},[3413,3624,3625,3630],{},[3444,3626,3627],{},[48,3628,3629],{"href":17},"SEI CERT C Coding Standard",[3444,3631,3632],{},[48,3633,3635],{"href":3634},"\u002Fsei-cert-c-coding-standard\u002Frules\u002Fconcurrency-con\u002Fcon35-c","CON35-C. Avoid deadlock by locking in a predefined order",[3413,3637,3638,3646],{},[3444,3639,3640],{},[48,3641,3645],{"href":3642,"rel":3643},"http:\u002F\u002Fcwe.mitre.org\u002F",[3644],"nofollow","MITRE CWE",[3444,3647,3648,3653],{},[48,3649,3652],{"href":3650,"rel":3651},"http:\u002F\u002Fcwe.mitre.org\u002Fdata\u002Fdefinitions\u002F833.html",[3644],"CWE-833"," , Deadlock",[106,3655,3657],{"id":3656},"bibliography","Bibliography",[3405,3659,3661],{"className":3660},[3479],[3439,3662,3663,3678],{},[3413,3664,3666,3674],{"className":3665},[3501],[3444,3667,3668,3669,3673],{},"[ ",[48,3670,3672],{"href":3671},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-aa-references#RuleAA.References-Halloway00","Halloway 2000"," ]",[3444,3675,3676],{},[3520,3677],{},[3413,3679,3681,3687],{"className":3680},[3531],[3444,3682,3683],{},[39,3684,3668,3685,3673],{},[48,3686,59],{"href":58},[3444,3688,3689],{},[39,3690,3691],{},[48,3692,3694],{"href":3693},"http:\u002F\u002Fdocs.oracle.com\u002Fjavase\u002Fspecs\u002Fjls\u002Fse8\u002Fhtml\u002Fjls-17.html","Chapter 17, \"Threads and Locks\"",[3696,3697],"hr",{},[39,3699,3700,3707,3708,3707,3714],{},[48,3701,3703],{"href":3702},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck06-j",[3704,3705],"img",{"src":3706},"\u002Fattachments\u002F88487702\u002F88497198.png"," ",[48,3709,3711],{"href":3710},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002F",[3704,3712],{"src":3713},"\u002Fattachments\u002F88487702\u002F88497196.png",[48,3715,3717],{"href":3716},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck08-j",[3704,3718],{"src":3719},"\u002Fattachments\u002F88487702\u002F88497197.png",[3721,3722,3723],"style",{},"html pre.shiki code .sC2Qs, html code.shiki .sC2Qs{--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .sz2Vg, html code.shiki .sz2Vg{--shiki-default:#6F42C1;--shiki-default-text-decoration:inherit;--shiki-dark:#B392F0;--shiki-dark-text-decoration:inherit;--shiki-sepia:#A6E22E;--shiki-sepia-text-decoration:underline}html pre.shiki code .sMOD_, html code.shiki .sMOD_{--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sq6CD, html code.shiki .sq6CD{--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}html pre.shiki code .s8-w5, html code.shiki .s8-w5{--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F}html pre.shiki code .srTi1, html code.shiki .srTi1{--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sTHNf, html code.shiki .sTHNf{--shiki-default:#E36209;--shiki-default-font-style:inherit;--shiki-dark:#FFAB70;--shiki-dark-font-style:inherit;--shiki-sepia:#FD971F;--shiki-sepia-font-style:italic}html pre.shiki code .sP7S_, html code.shiki .sP7S_{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#FD971F}html pre.shiki code .sk8M1, html code.shiki .sk8M1{--shiki-default:#24292E;--shiki-default-font-style:inherit;--shiki-dark:#E1E4E8;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}html pre.shiki code .sstjo, html code.shiki .sstjo{--shiki-default:#032F62;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html pre.shiki code .s7F3e, html code.shiki .s7F3e{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .s30JN, html code.shiki .s30JN{--shiki-default:#6F42C1;--shiki-default-font-style:inherit;--shiki-default-text-decoration:inherit;--shiki-dark:#B392F0;--shiki-dark-font-style:inherit;--shiki-dark-text-decoration:inherit;--shiki-sepia:#A6E22E;--shiki-sepia-font-style:italic;--shiki-sepia-text-decoration:underline}",{"title":138,"searchDepth":163,"depth":163,"links":3725},[3726,3727,3728,3729,3731,3732,3733,3734,3735,3736],{"id":108,"depth":163,"text":109},{"id":665,"depth":163,"text":666},{"id":985,"depth":163,"text":986},{"id":1586,"depth":163,"text":3730},"Compliant Solution ( ReentrantLock )",{"id":2169,"depth":163,"text":2170},{"id":2928,"depth":163,"text":2929},{"id":3397,"depth":163,"text":3398},{"id":3471,"depth":163,"text":3472},{"id":3609,"depth":163,"text":3610},{"id":3656,"depth":163,"text":3657},"To avoid data corruption in multithreaded Java programs, shared data must be protected from concurrent modifications and accesses. Locking can be performed at the object level using synchronized methods, synchronized blocks, or the java.util.concurrent dynamic lock objects. However, excessive use of locking can result in deadlocks .","md",{"tags":3740},[3741,3742,3743,3744,3745],"android-applicable","lck","dos-cc","analyzable","rule","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck07-j",{"title":30,"description":3737},"6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F09.lck07-j","g4Uci2tFuQU35t9MhMc8Vky8kKik1Iwq6HraqEmqN94",[3751,3754],{"title":3752,"path":3702,"stem":3753,"children":-1},"LCK06-J. Do not use an instance lock to protect shared static data","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F08.lck06-j",{"title":3755,"path":3716,"stem":3756,"children":-1},"LCK08-J. Ensure actively held locks are released on exceptional conditions","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F10.lck08-j",[3758],{"title":3759,"path":3760,"stem":3761,"children":3762},"SEI CERT Oracle Coding Standard for Java","\u002Fsei-cert-oracle-coding-standard-for-java","6.sei-cert-oracle-coding-standard-for-java\u002F1.index",[3763,3764,3904,4731,5130,5299],{"title":3759,"path":3760,"stem":3761},{"title":3765,"path":3766,"stem":3767,"children":3768},"Front Matter","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F1.index",[3769,3770,3774,3778,3782,3828,3866],{"title":3765,"path":3766,"stem":3767},{"title":3771,"path":3772,"stem":3773},"Rules versus Recommendations (Java)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frules-versus-recommendations-java","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F2.rules-versus-recommendations-java",{"title":3775,"path":3776,"stem":3777},"Acknowledgments","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Facknowledgments","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F3.acknowledgments",{"title":3779,"path":3780,"stem":3781},"Deprecations","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Fdeprecations","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.deprecations",{"title":3783,"path":3784,"stem":3785,"children":3786},"Rec. Preface","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F01.index",[3787,3788,3792,3796,3800,3804,3808,3812,3816,3820,3824],{"title":3783,"path":3784,"stem":3785},{"title":3789,"path":3790,"stem":3791},"Scope","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fscope","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F02.scope",{"title":3793,"path":3794,"stem":3795},"Audience","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Faudience","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F03.audience",{"title":3797,"path":3798,"stem":3799},"Contents and Organization","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fcontents-and-organization","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F05.contents-and-organization",{"title":3801,"path":3802,"stem":3803},"Guidelines","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fguidelines","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F06.guidelines",{"title":3805,"path":3806,"stem":3807},"Usage","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fusage","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F07.usage",{"title":3809,"path":3810,"stem":3811},"System Qualities","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fsystem-qualities","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F08.system-qualities",{"title":3813,"path":3814,"stem":3815},"Priority and Levels","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fpriority-and-levels","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F09.priority-and-levels",{"title":3817,"path":3818,"stem":3819},"Automatically Generated Code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fautomatically-generated-code","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F10.automatically-generated-code",{"title":3821,"path":3822,"stem":3823},"Source Code Validation","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Fsource-code-validation","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F11.source-code-validation",{"title":3825,"path":3826,"stem":3827},"Tool Selection and Validation","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frec-preface\u002Ftool-selection-and-validation","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F4.rec-preface\u002F12.tool-selection-and-validation",{"title":3829,"path":3830,"stem":3831,"children":3832},"Rule. Introduction","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F01.index",[3833,3834,3838,3842,3846,3850,3854,3858,3862],{"title":3829,"path":3830,"stem":3831},{"title":3835,"path":3836,"stem":3837},"Input Validation and Data Sanitization","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Finput-validation-and-data-sanitization","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F02.input-validation-and-data-sanitization",{"title":3839,"path":3840,"stem":3841},"Leaking Sensitive Data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Fleaking-sensitive-data","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F03.leaking-sensitive-data",{"title":3843,"path":3844,"stem":3845},"Type Safety","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Ftype-safety","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F04.type-safety",{"title":3847,"path":3848,"stem":3849},"Leaking Capabilities","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Fleaking-capabilities","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F05.leaking-capabilities",{"title":3851,"path":3852,"stem":3853},"Denial of Service","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Fdenial-of-service","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F06.denial-of-service",{"title":3855,"path":3856,"stem":3857},"Libraries","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Flibraries","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F07.libraries",{"title":3859,"path":3860,"stem":3861},"Concurrency, Visibility, and Memory","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Fconcurrency-visibility-and-memory","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F08.concurrency-visibility-and-memory",{"title":3863,"path":3864,"stem":3865},"Privilege Escalation","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-introduction\u002Fprivilege-escalation","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F5.rule-introduction\u002F09.privilege-escalation",{"title":3867,"path":3868,"stem":3869,"children":3870},"Rule. Preface","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F01.index",[3871,3872,3875,3878,3881,3885,3888,3891,3894,3897,3901],{"title":3867,"path":3868,"stem":3869},{"title":3789,"path":3873,"stem":3874},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fscope","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F02.scope",{"title":3793,"path":3876,"stem":3877},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Faudience","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F03.audience",{"title":3797,"path":3879,"stem":3880},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fcontents-and-organization","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F04.contents-and-organization",{"title":3882,"path":3883,"stem":3884},"Identifiers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fidentifiers","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F05.identifiers",{"title":3805,"path":3886,"stem":3887},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fusage","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F06.usage",{"title":3809,"path":3889,"stem":3890},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fsystem-qualities","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F07.system-qualities",{"title":3813,"path":3892,"stem":3893},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fpriority-and-levels","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F08.priority-and-levels",{"title":3817,"path":3895,"stem":3896},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fautomatically-generated-code","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F09.automatically-generated-code",{"title":3898,"path":3899,"stem":3900},"Conformance Testing","\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Fconformance-testing","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F10.conformance-testing",{"title":3825,"path":3902,"stem":3903},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Ffront-matter\u002Frule-preface\u002Ftool-selection-and-validation","6.sei-cert-oracle-coding-standard-for-java\u002F2.front-matter\u002F6.rule-preface\u002F11.tool-selection-and-validation",{"title":3905,"path":3906,"stem":3907,"children":3908},"Rules","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F01.index",[3909,3910,3914,3940,3958,4004,4042,4116,4170,4196,4241,4303,4357,4415,4477,4527,4567,4625,4653,4679,4701],{"title":3905,"path":3906,"stem":3907},{"title":3911,"path":3912,"stem":3913},"Android (DRD)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fandroid-drd","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F02.android-drd",{"title":3915,"path":3916,"stem":3917,"children":3918},"Characters and Strings (STR)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fcharacters-and-strings-str","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F03.characters-and-strings-str\u002F1.index",[3919,3920,3924,3928,3932,3936],{"title":3915,"path":3916,"stem":3917},{"title":3921,"path":3922,"stem":3923},"STR00-J. Don't form strings containing partial characters from variable-width encodings","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fcharacters-and-strings-str\u002Fstr00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F03.characters-and-strings-str\u002F2.str00-j",{"title":3925,"path":3926,"stem":3927},"STR01-J. Do not assume that a Java char fully represents a Unicode code point","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fcharacters-and-strings-str\u002Fstr01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F03.characters-and-strings-str\u002F3.str01-j",{"title":3929,"path":3930,"stem":3931},"STR02-J. Specify an appropriate locale when comparing locale-dependent data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fcharacters-and-strings-str\u002Fstr02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F03.characters-and-strings-str\u002F4.str02-j",{"title":3933,"path":3934,"stem":3935},"STR03-J. Do not encode noncharacter data as a string","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fcharacters-and-strings-str\u002Fstr03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F03.characters-and-strings-str\u002F5.str03-j",{"title":3937,"path":3938,"stem":3939},"STR04-J. Use compatible character encodings when communicating string data between JVMs","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fcharacters-and-strings-str\u002Fstr04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F03.characters-and-strings-str\u002F6.str04-j",{"title":3941,"path":3942,"stem":3943,"children":3944},"Declarations and Initialization (DCL)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fdeclarations-and-initialization-dcl","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F04.declarations-and-initialization-dcl\u002F1.index",[3945,3946,3950,3954],{"title":3941,"path":3942,"stem":3943},{"title":3947,"path":3948,"stem":3949},"DCL00-J. Prevent class initialization cycles","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F04.declarations-and-initialization-dcl\u002F2.dcl00-j",{"title":3951,"path":3952,"stem":3953},"DCL01-J. Do not reuse public identifiers from the Java Standard Library","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F04.declarations-and-initialization-dcl\u002F3.dcl01-j",{"title":3955,"path":3956,"stem":3957},"DCL02-J. Do not modify the collection's elements during an enhanced for statement","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fdeclarations-and-initialization-dcl\u002Fdcl02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F04.declarations-and-initialization-dcl\u002F4.dcl02-j",{"title":3959,"path":3960,"stem":3961,"children":3962},"Exceptional Behavior (ERR)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F01.index",[3963,3964,3968,3972,3976,3980,3984,3988,3992,3996,4000],{"title":3959,"path":3960,"stem":3961},{"title":3965,"path":3966,"stem":3967},"ERR00-J. Do not suppress or ignore checked exceptions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F02.err00-j",{"title":3969,"path":3970,"stem":3971},"ERR01-J. Do not allow exceptions to expose sensitive information","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F03.err01-j",{"title":3973,"path":3974,"stem":3975},"ERR02-J. Prevent exceptions while logging data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F04.err02-j",{"title":3977,"path":3978,"stem":3979},"ERR03-J. Restore prior object state on method failure","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F05.err03-j",{"title":3981,"path":3982,"stem":3983},"ERR04-J. Do not complete abruptly from a finally block","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F06.err04-j",{"title":3985,"path":3986,"stem":3987},"ERR05-J. Do not let checked exceptions escape from a finally block","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F07.err05-j",{"title":3989,"path":3990,"stem":3991},"ERR06-J. Do not throw undeclared checked exceptions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F08.err06-j",{"title":3993,"path":3994,"stem":3995},"ERR07-J. Do not throw RuntimeException, Exception, or Throwable","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F09.err07-j",{"title":3997,"path":3998,"stem":3999},"ERR08-J. Do not catch NullPointerException or any of its ancestors","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F10.err08-j",{"title":4001,"path":4002,"stem":4003},"ERR09-J. Do not allow untrusted code to terminate the JVM","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexceptional-behavior-err\u002Ferr09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F05.exceptional-behavior-err\u002F11.err09-j",{"title":4005,"path":4006,"stem":4007,"children":4008},"Expressions (EXP)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F1.index",[4009,4010,4014,4018,4022,4026,4030,4034,4038],{"title":4005,"path":4006,"stem":4007},{"title":4011,"path":4012,"stem":4013},"EXP00-J. Do not ignore values returned by methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F2.exp00-j",{"title":4015,"path":4016,"stem":4017},"EXP01-J. Do not use a null in a case where an object is required","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F3.exp01-j",{"title":4019,"path":4020,"stem":4021},"EXP02-J. Do not use the Object.equals() method to compare two arrays","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F4.exp02-j",{"title":4023,"path":4024,"stem":4025},"EXP03-J. Do not use the equality operators when comparing values of boxed primitives","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F5.exp03-j",{"title":4027,"path":4028,"stem":4029},"EXP04-J. Do not pass arguments to certain Java Collections Framework methods that are a different type than the collection parameter type","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F6.exp04-j",{"title":4031,"path":4032,"stem":4033},"EXP05-J. Do not follow a write by a subsequent write or read of the same object within an expression","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F7.exp05-j",{"title":4035,"path":4036,"stem":4037},"EXP06-J. Expressions used in assertions must not produce side effects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F8.exp06-j",{"title":4039,"path":4040,"stem":4041},"EXP07-J. Prevent loss of useful data due to weak references","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fexpressions-exp\u002Fexp07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F06.expressions-exp\u002F9.exp07-j",{"title":4043,"path":4044,"stem":4045,"children":4046},"Input Output (FIO)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F01.index",[4047,4048,4052,4056,4060,4064,4068,4072,4076,4080,4084,4088,4092,4096,4100,4104,4108,4112],{"title":4043,"path":4044,"stem":4045},{"title":4049,"path":4050,"stem":4051},"FIO00-J. Do not operate on files in shared directories","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F02.fio00-j",{"title":4053,"path":4054,"stem":4055},"FIO01-J. Create files with appropriate access permissions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F03.fio01-j",{"title":4057,"path":4058,"stem":4059},"FIO02-J. Detect and handle file-related errors","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F04.fio02-j",{"title":4061,"path":4062,"stem":4063},"FIO03-J. Remove temporary files before termination","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F05.fio03-j",{"title":4065,"path":4066,"stem":4067},"FIO04-J. Release resources when they are no longer needed","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F06.fio04-j",{"title":4069,"path":4070,"stem":4071},"FIO05-J. Do not expose buffers or their backing arrays methods to untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F07.fio05-j",{"title":4073,"path":4074,"stem":4075},"FIO06-J. Do not create multiple buffered wrappers on a single byte or character stream","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F08.fio06-j",{"title":4077,"path":4078,"stem":4079},"FIO07-J. Do not let external processes block on IO buffers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F09.fio07-j",{"title":4081,"path":4082,"stem":4083},"FIO08-J. Distinguish between characters or bytes read from a stream and -1","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F10.fio08-j",{"title":4085,"path":4086,"stem":4087},"FIO09-J. Do not rely on the write() method to output integers outside the range 0 to 255","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F11.fio09-j",{"title":4089,"path":4090,"stem":4091},"FIO10-J. Ensure the array is filled when using read() to fill an array","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F12.fio10-j",{"title":4093,"path":4094,"stem":4095},"FIO11-J. Do not convert between strings and bytes without specifying a valid character encoding","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F13.fio11-j",{"title":4097,"path":4098,"stem":4099},"FIO12-J. Provide methods to read and write little-endian data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio12-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F14.fio12-j",{"title":4101,"path":4102,"stem":4103},"FIO13-J. Do not log sensitive information outside a trust boundary","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio13-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F15.fio13-j",{"title":4105,"path":4106,"stem":4107},"FIO14-J. Perform proper cleanup at program termination","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio14-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F16.fio14-j",{"title":4109,"path":4110,"stem":4111},"FIO15-J. Do not reset a servlet's output stream after committing it","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio15-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F17.fio15-j",{"title":4113,"path":4114,"stem":4115},"FIO16-J. Canonicalize path names before validating them","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-output-fio\u002Ffio16-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F07.input-output-fio\u002F18.fio16-j",{"title":4117,"path":4118,"stem":4119,"children":4120},"Input Validation and Data Sanitization (IDS)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F01.index",[4121,4122,4126,4130,4134,4138,4142,4146,4150,4154,4158,4162,4166],{"title":4117,"path":4118,"stem":4119},{"title":4123,"path":4124,"stem":4125},"IDS00-J. Prevent SQL injection","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F02.ids00-j",{"title":4127,"path":4128,"stem":4129},"IDS01-J. Normalize strings before validating them","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F03.ids01-j",{"title":4131,"path":4132,"stem":4133},"IDS03-J. Do not log unsanitized user input","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F04.ids03-j",{"title":4135,"path":4136,"stem":4137},"IDS04-J. Safely extract files from ZipInputStream","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F05.ids04-j",{"title":4139,"path":4140,"stem":4141},"IDS06-J. Exclude unsanitized user input from format strings","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F06.ids06-j",{"title":4143,"path":4144,"stem":4145},"IDS07-J. Sanitize untrusted data passed to the Runtime.exec() method","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F07.ids07-j",{"title":4147,"path":4148,"stem":4149},"IDS08-J. Sanitize untrusted data included in a regular expression","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F08.ids08-j",{"title":4151,"path":4152,"stem":4153},"IDS11-J. Perform any string modifications before validation","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F09.ids11-j",{"title":4155,"path":4156,"stem":4157},"IDS14-J. Do not trust the contents of hidden form fields","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids14-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F10.ids14-j",{"title":4159,"path":4160,"stem":4161},"IDS15-J. Do not allow sensitive information to leak outside a trust boundary","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids15-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F11.ids15-j",{"title":4163,"path":4164,"stem":4165},"IDS16-J. Prevent XML Injection","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids16-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F12.ids16-j",{"title":4167,"path":4168,"stem":4169},"IDS17-J. Prevent XML External Entity Attacks","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Finput-validation-and-data-sanitization-ids\u002Fids17-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F08.input-validation-and-data-sanitization-ids\u002F13.ids17-j",{"title":4171,"path":4172,"stem":4173,"children":4174},"Java Native Interface (JNI)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fjava-native-interface-jni","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F09.java-native-interface-jni\u002F1.index",[4175,4176,4180,4184,4188,4192],{"title":4171,"path":4172,"stem":4173},{"title":4177,"path":4178,"stem":4179},"JNI00-J. Define wrappers around native methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fjava-native-interface-jni\u002Fjni00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F09.java-native-interface-jni\u002F2.jni00-j",{"title":4181,"path":4182,"stem":4183},"JNI01-J. Safely invoke standard APIs that perform tasks using the immediate caller's class loader instance (loadLibrary)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fjava-native-interface-jni\u002Fjni01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F09.java-native-interface-jni\u002F3.jni01-j",{"title":4185,"path":4186,"stem":4187},"JNI02-J. Do not assume object references are constant or unique","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fjava-native-interface-jni\u002Fjni02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F09.java-native-interface-jni\u002F4.jni02-j",{"title":4189,"path":4190,"stem":4191},"JNI03-J. Do not use direct pointers to Java objects in JNI code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fjava-native-interface-jni\u002Fjni03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F09.java-native-interface-jni\u002F5.jni03-j",{"title":4193,"path":4194,"stem":4195},"JNI04-J. Do not assume that Java strings are null-terminated","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fjava-native-interface-jni\u002Fjni04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F09.java-native-interface-jni\u002F6.jni04-j",{"title":4197,"path":4198,"stem":4199,"children":4200},"Locking (LCK)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F01.index",[4201,4202,4206,4210,4214,4218,4222,4226,4227,4228,4229,4233,4237],{"title":4197,"path":4198,"stem":4199},{"title":4203,"path":4204,"stem":4205},"LCK00-J. Use private final lock objects to synchronize classes that may interact with untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F02.lck00-j",{"title":4207,"path":4208,"stem":4209},"LCK01-J. Do not synchronize on objects that may be reused","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F03.lck01-j",{"title":4211,"path":4212,"stem":4213},"LCK02-J. Do not synchronize on the class object returned by getClass()","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F04.lck02-j",{"title":4215,"path":4216,"stem":4217},"LCK03-J. Do not synchronize on the intrinsic locks of high-level concurrency objects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F05.lck03-j",{"title":4219,"path":4220,"stem":4221},"LCK04-J. Do not synchronize on a collection view if the backing collection is accessible","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F06.lck04-j",{"title":4223,"path":4224,"stem":4225},"LCK05-J. Synchronize access to static fields that can be modified by untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F07.lck05-j",{"title":3752,"path":3702,"stem":3753},{"title":30,"path":3746,"stem":3748},{"title":3755,"path":3716,"stem":3756},{"title":4230,"path":4231,"stem":4232},"LCK09-J. Do not perform operations that can block while holding a lock","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F11.lck09-j",{"title":4234,"path":4235,"stem":4236},"LCK10-J. Use a correct form of the double-checked locking idiom","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F12.lck10-j",{"title":4238,"path":4239,"stem":4240},"LCK11-J. Avoid client-side locking when using classes that do not commit to their locking strategy","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Flocking-lck\u002Flck11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F10.locking-lck\u002F13.lck11-j",{"title":4242,"path":4243,"stem":4244,"children":4245},"Methods (MET)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F01.index",[4246,4247,4251,4255,4259,4263,4267,4271,4275,4279,4283,4287,4291,4295,4299],{"title":4242,"path":4243,"stem":4244},{"title":4248,"path":4249,"stem":4250},"MET00-J. Validate method arguments","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F02.met00-j",{"title":4252,"path":4253,"stem":4254},"MET01-J. Never use assertions to validate method arguments","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F03.met01-j",{"title":4256,"path":4257,"stem":4258},"MET02-J. Do not use deprecated or obsolete classes or methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F04.met02-j",{"title":4260,"path":4261,"stem":4262},"MET03-J. Methods that perform a security check must be declared private or final","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F05.met03-j",{"title":4264,"path":4265,"stem":4266},"MET04-J. Do not increase the accessibility of overridden or hidden methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F06.met04-j",{"title":4268,"path":4269,"stem":4270},"MET05-J. Ensure that constructors do not call overridable methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F07.met05-j",{"title":4272,"path":4273,"stem":4274},"MET06-J. Do not invoke overridable methods in clone()","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F08.met06-j",{"title":4276,"path":4277,"stem":4278},"MET07-J. Never declare a class method that hides a method declared in a superclass or superinterface","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F09.met07-j",{"title":4280,"path":4281,"stem":4282},"MET08-J. Preserve the equality contract when overriding the equals() method","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F10.met08-j",{"title":4284,"path":4285,"stem":4286},"MET09-J. Classes that define an equals() method must also define a hashCode() method","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F11.met09-j",{"title":4288,"path":4289,"stem":4290},"MET10-J. Follow the general contract when implementing the compareTo() method","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F12.met10-j",{"title":4292,"path":4293,"stem":4294},"MET11-J. Ensure that keys used in comparison operations are immutable","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F13.met11-j",{"title":4296,"path":4297,"stem":4298},"MET12-J. Do not use finalizers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet12-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F14.met12-j",{"title":4300,"path":4301,"stem":4302},"MET13-J. Do not assume that reassigning method arguments modifies the calling environment","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmethods-met\u002Fmet13-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F11.methods-met\u002F15.met13-j",{"title":4304,"path":4305,"stem":4306,"children":4307},"Miscellaneous (MSC)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F01.index",[4308,4309,4313,4317,4321,4325,4329,4333,4337,4341,4345,4349,4353],{"title":4304,"path":4305,"stem":4306},{"title":4310,"path":4311,"stem":4312},"MSC00-J. Use SSLSocket rather than Socket for secure data exchange","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F02.msc00-j",{"title":4314,"path":4315,"stem":4316},"MSC01-J. Do not use an empty infinite loop","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F03.msc01-j",{"title":4318,"path":4319,"stem":4320},"MSC02-J. Generate strong random numbers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F04.msc02-j",{"title":4322,"path":4323,"stem":4324},"MSC03-J. Never hard code sensitive information","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F05.msc03-j",{"title":4326,"path":4327,"stem":4328},"MSC04-J. Do not leak memory","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F06.msc04-j",{"title":4330,"path":4331,"stem":4332},"MSC05-J. Do not exhaust heap space","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F07.msc05-j",{"title":4334,"path":4335,"stem":4336},"MSC06-J. Do not modify the underlying collection when an iteration is in progress","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F08.msc06-j",{"title":4338,"path":4339,"stem":4340},"MSC07-J. Prevent multiple instantiations of singleton objects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F09.msc07-j",{"title":4342,"path":4343,"stem":4344},"MSC08-J. Do not store nonserializable objects as attributes in an HTTP session","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F10.msc08-j",{"title":4346,"path":4347,"stem":4348},"MSC09-J. For OAuth, ensure (a) [relying party receiving user's ID in last step] is same as (b) [relying party the access token was granted to].","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F11.msc09-j",{"title":4350,"path":4351,"stem":4352},"MSC10-J. Do not use OAuth 2.0 implicit grant (unmodified) for authentication","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F12.msc10-j",{"title":4354,"path":4355,"stem":4356},"MSC11-J. Do not let session information leak within a servlet","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fmiscellaneous-msc\u002Fmsc11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F12.miscellaneous-msc\u002F13.msc11-j",{"title":4358,"path":4359,"stem":4360,"children":4361},"Numeric Types and Operations (NUM)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F01.index",[4362,4363,4367,4371,4375,4379,4383,4387,4391,4395,4399,4403,4407,4411],{"title":4358,"path":4359,"stem":4360},{"title":4364,"path":4365,"stem":4366},"NUM00-J. Detect or prevent integer overflow","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F02.num00-j",{"title":4368,"path":4369,"stem":4370},"NUM01-J. Do not perform bitwise and arithmetic operations on the same data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F03.num01-j",{"title":4372,"path":4373,"stem":4374},"NUM02-J. Ensure that division and remainder operations do not result in divide-by-zero errors","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F04.num02-j",{"title":4376,"path":4377,"stem":4378},"NUM03-J. Use integer types that can fully represent the possible range of unsigned data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F05.num03-j",{"title":4380,"path":4381,"stem":4382},"NUM04-J. Do not use floating-point numbers if precise computation is required","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F06.num04-j",{"title":4384,"path":4385,"stem":4386},"NUM07-J. Do not attempt comparisons with NaN","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F07.num07-j",{"title":4388,"path":4389,"stem":4390},"NUM08-J. Check floating-point inputs for exceptional values","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F08.num08-j",{"title":4392,"path":4393,"stem":4394},"NUM09-J. Do not use floating-point variables as loop counters","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F09.num09-j",{"title":4396,"path":4397,"stem":4398},"NUM10-J. Do not construct BigDecimal objects from floating-point literals","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F10.num10-j",{"title":4400,"path":4401,"stem":4402},"NUM11-J. Do not compare or inspect the string representation of floating-point values","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F11.num11-j",{"title":4404,"path":4405,"stem":4406},"NUM12-J. Ensure conversions of numeric types to narrower types do not result in lost or misinterpreted data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum12-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F12.num12-j",{"title":4408,"path":4409,"stem":4410},"NUM13-J. Avoid loss of precision when converting primitive integers to floating-point","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum13-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F13.num13-j",{"title":4412,"path":4413,"stem":4414},"NUM14-J. Use shift operators correctly","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fnumeric-types-and-operations-num\u002Fnum14-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F13.numeric-types-and-operations-num\u002F14.num14-j",{"title":4416,"path":4417,"stem":4418,"children":4419},"Object Orientation (OBJ)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F01.index",[4420,4421,4425,4429,4433,4437,4441,4445,4449,4453,4457,4461,4465,4469,4473],{"title":4416,"path":4417,"stem":4418},{"title":4422,"path":4423,"stem":4424},"OBJ01-J. Limit accessibility of fields","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F02.obj01-j",{"title":4426,"path":4427,"stem":4428},"OBJ02-J. Preserve dependencies in subclasses when changing superclasses","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F03.obj02-j",{"title":4430,"path":4431,"stem":4432},"OBJ03-J. Prevent heap pollution","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F04.obj03-j",{"title":4434,"path":4435,"stem":4436},"OBJ04-J. Provide mutable classes with copy functionality to safely allow passing instances to untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F05.obj04-j",{"title":4438,"path":4439,"stem":4440},"OBJ05-J. Do not return references to private mutable class members","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F06.obj05-j",{"title":4442,"path":4443,"stem":4444},"OBJ06-J. Defensively copy mutable inputs and mutable internal components","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F07.obj06-j",{"title":4446,"path":4447,"stem":4448},"OBJ07-J. Sensitive classes must not let themselves be copied","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F08.obj07-j",{"title":4450,"path":4451,"stem":4452},"OBJ08-J. Do not expose private members of an outer class from within a nested class","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F09.obj08-j",{"title":4454,"path":4455,"stem":4456},"OBJ09-J. Compare classes and not class names","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F10.obj09-j",{"title":4458,"path":4459,"stem":4460},"OBJ10-J. Do not use public static nonfinal fields","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F11.obj10-j",{"title":4462,"path":4463,"stem":4464},"OBJ11-J. Be wary of letting constructors throw exceptions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F12.obj11-j",{"title":4466,"path":4467,"stem":4468},"OBJ12-J. Respect object-based annotations","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj12-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F13.obj12-j",{"title":4470,"path":4471,"stem":4472},"OBJ13-J. Ensure that references to mutable objects are not exposed","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj13-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F14.obj13-j",{"title":4474,"path":4475,"stem":4476},"OBJ14-J. Do not use an object that has been freed.","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fobject-orientation-obj\u002Fobj14-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F14.object-orientation-obj\u002F15.obj14-j",{"title":4478,"path":4479,"stem":4480,"children":4481},"Platform Security (SEC)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F01.index",[4482,4483,4487,4491,4495,4499,4503,4507,4511,4515,4519,4523],{"title":4478,"path":4479,"stem":4480},{"title":4484,"path":4485,"stem":4486},"SEC00-J. Do not allow privileged blocks to leak sensitive information across a trust boundary","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F02.sec00-j",{"title":4488,"path":4489,"stem":4490},"SEC01-J. Do not allow tainted variables in privileged blocks","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F03.sec01-j",{"title":4492,"path":4493,"stem":4494},"SEC02-J. Do not base security checks on untrusted sources","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F04.sec02-j",{"title":4496,"path":4497,"stem":4498},"SEC03-J. Do not load trusted classes after allowing untrusted code to load arbitrary classes","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F05.sec03-j",{"title":4500,"path":4501,"stem":4502},"SEC04-J. Protect sensitive operations with security manager checks","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F06.sec04-j",{"title":4504,"path":4505,"stem":4506},"SEC05-J. Do not use reflection to increase accessibility of classes, methods, or fields","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F07.sec05-j",{"title":4508,"path":4509,"stem":4510},"SEC06-J. Do not rely on the default automatic signature verification provided by URLClassLoader and java.util.jar","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F08.sec06-j",{"title":4512,"path":4513,"stem":4514},"SEC07-J. Call the superclass's getPermissions() method when writing a custom class loader","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F09.sec07-j",{"title":4516,"path":4517,"stem":4518},"SEC08-J Trusted code must discard or clean any arguments provided by untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F10.sec08-j",{"title":4520,"path":4521,"stem":4522},"SEC09-J Never leak the results of certain standard API methods from trusted code to untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F11.sec09-j",{"title":4524,"path":4525,"stem":4526},"SEC10-J Never permit untrusted code to invoke any API that may (possibly transitively) invoke the reflection APIs","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fplatform-security-sec\u002Fsec10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F15.platform-security-sec\u002F12.sec10-j",{"title":4528,"path":4529,"stem":4530,"children":4531},"Runtime Environment (ENV)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F1.index",[4532,4533,4537,4541,4545,4555,4559,4563],{"title":4528,"path":4529,"stem":4530},{"title":4534,"path":4535,"stem":4536},"ENV00-J. Do not sign code that performs only unprivileged operations","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F2.env00-j",{"title":4538,"path":4539,"stem":4540},"ENV01-J. Place all security-sensitive code in a single JAR and sign and seal it","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F3.env01-j",{"title":4542,"path":4543,"stem":4544},"ENV02-J. Do not trust the values of environment variables","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F4.env02-j",{"title":4546,"path":4547,"stem":4548,"children":4549},"ENV03-J. Do not grant dangerous combinations of permissions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F5.env03-j\u002F1.index",[4550,4551],{"title":4546,"path":4547,"stem":4548},{"title":4552,"path":4553,"stem":4554},"DUMMY ENV03-J","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv03-j\u002Fdummy-env03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F5.env03-j\u002F2.dummy-env03-j",{"title":4556,"path":4557,"stem":4558},"ENV04-J. Do not disable bytecode verification","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F6.env04-j",{"title":4560,"path":4561,"stem":4562},"ENV05-J. Do not deploy an application that can be remotely monitored","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F7.env05-j",{"title":4564,"path":4565,"stem":4566},"ENV06-J. Production code must not contain debugging entry points","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fruntime-environment-env\u002Fenv06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F16.runtime-environment-env\u002F8.env06-j",{"title":4568,"path":4569,"stem":4570,"children":4571},"Serialization (SER)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F01.index",[4572,4573,4577,4581,4585,4589,4593,4597,4601,4605,4609,4613,4617,4621],{"title":4568,"path":4569,"stem":4570},{"title":4574,"path":4575,"stem":4576},"SER00-J. Enable serialization compatibility during class evolution","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F02.ser00-j",{"title":4578,"path":4579,"stem":4580},"SER01-J. Do not deviate from the proper signatures of serialization methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F03.ser01-j",{"title":4582,"path":4583,"stem":4584},"SER02-J. Sign then seal objects before sending them outside a trust boundary","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F04.ser02-j",{"title":4586,"path":4587,"stem":4588},"SER03-J. Do not serialize unencrypted sensitive data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F05.ser03-j",{"title":4590,"path":4591,"stem":4592},"SER04-J. Do not allow serialization and deserialization to bypass the security manager","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F06.ser04-j",{"title":4594,"path":4595,"stem":4596},"SER05-J. Do not serialize instances of inner classes","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F07.ser05-j",{"title":4598,"path":4599,"stem":4600},"SER06-J. Make defensive copies of private mutable components during deserialization","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser06-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F08.ser06-j",{"title":4602,"path":4603,"stem":4604},"SER07-J. Do not use the default serialized form for classes with implementation-defined invariants","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser07-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F09.ser07-j",{"title":4606,"path":4607,"stem":4608},"SER08-J. Minimize privileges before deserializing from a privileged context","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser08-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F10.ser08-j",{"title":4610,"path":4611,"stem":4612},"SER09-J. Do not invoke overridable methods from the readObject() method","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser09-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F11.ser09-j",{"title":4614,"path":4615,"stem":4616},"SER10-J. Avoid memory and resource leaks during serialization","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser10-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F12.ser10-j",{"title":4618,"path":4619,"stem":4620},"SER11-J. Prevent overwriting of externalizable objects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser11-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F13.ser11-j",{"title":4622,"path":4623,"stem":4624},"SER12-J. Prevent deserialization of untrusted data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fserialization-ser\u002Fser12-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F17.serialization-ser\u002F14.ser12-j",{"title":4626,"path":4627,"stem":4628,"children":4629},"Thread APIs (THI)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-apis-thi","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F18.thread-apis-thi\u002F1.index",[4630,4631,4635,4639,4643,4647,4651],{"title":4626,"path":4627,"stem":4628},{"title":4632,"path":4633,"stem":4634},"THI00-J. Do not invoke Thread.run()","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-apis-thi\u002Fthi00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F18.thread-apis-thi\u002F2.thi00-j",{"title":4636,"path":4637,"stem":4638},"THI01-J. Do not invoke ThreadGroup methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-apis-thi\u002Fthi01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F18.thread-apis-thi\u002F3.thi01-j",{"title":4640,"path":4641,"stem":4642},"THI02-J. Notify all waiting threads rather than a single thread","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-apis-thi\u002Fthi02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F18.thread-apis-thi\u002F4.thi02-j",{"title":4644,"path":4645,"stem":4646},"THI03-J. Always invoke wait() and await() methods inside a loop","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-apis-thi\u002Fthi03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F18.thread-apis-thi\u002F5.thi03-j",{"title":4648,"path":4649,"stem":4650},"THI04-J. Ensure that threads performing blocking operations can be terminated","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-apis-thi\u002Fthi04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F18.thread-apis-thi\u002F6.thi04-j",{"title":95,"path":94,"stem":4652},"6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F18.thread-apis-thi\u002F7.thi05-j",{"title":4654,"path":4655,"stem":4656,"children":4657},"Thread Pools (TPS)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-pools-tps","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F19.thread-pools-tps\u002F1.index",[4658,4659,4663,4667,4671,4675],{"title":4654,"path":4655,"stem":4656},{"title":4660,"path":4661,"stem":4662},"TPS00-J. Use thread pools to enable graceful degradation of service during traffic bursts","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-pools-tps\u002Ftps00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F19.thread-pools-tps\u002F2.tps00-j",{"title":4664,"path":4665,"stem":4666},"TPS01-J. Do not execute interdependent tasks in a bounded thread pool","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-pools-tps\u002Ftps01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F19.thread-pools-tps\u002F3.tps01-j",{"title":4668,"path":4669,"stem":4670},"TPS02-J. Ensure that tasks submitted to a thread pool are interruptible","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-pools-tps\u002Ftps02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F19.thread-pools-tps\u002F4.tps02-j",{"title":4672,"path":4673,"stem":4674},"TPS03-J. Ensure that tasks executing in a thread pool do not fail silently","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-pools-tps\u002Ftps03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F19.thread-pools-tps\u002F5.tps03-j",{"title":4676,"path":4677,"stem":4678},"TPS04-J. Ensure ThreadLocal variables are reinitialized when using thread pools","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-pools-tps\u002Ftps04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F19.thread-pools-tps\u002F6.tps04-j",{"title":4680,"path":4681,"stem":4682,"children":4683},"Thread-Safety Miscellaneous (TSM)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-safety-miscellaneous-tsm","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F20.thread-safety-miscellaneous-tsm\u002F1.index",[4684,4685,4689,4693,4697],{"title":4680,"path":4681,"stem":4682},{"title":4686,"path":4687,"stem":4688},"TSM00-J. Do not override thread-safe methods with methods that are not thread-safe","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-safety-miscellaneous-tsm\u002Ftsm00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F20.thread-safety-miscellaneous-tsm\u002F2.tsm00-j",{"title":4690,"path":4691,"stem":4692},"TSM01-J. Do not let the this reference escape during object construction","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-safety-miscellaneous-tsm\u002Ftsm01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F20.thread-safety-miscellaneous-tsm\u002F3.tsm01-j",{"title":4694,"path":4695,"stem":4696},"TSM02-J. Do not use background threads during class initialization","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-safety-miscellaneous-tsm\u002Ftsm02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F20.thread-safety-miscellaneous-tsm\u002F4.tsm02-j",{"title":4698,"path":4699,"stem":4700},"TSM03-J. Do not publish partially initialized objects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fthread-safety-miscellaneous-tsm\u002Ftsm03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F20.thread-safety-miscellaneous-tsm\u002F5.tsm03-j",{"title":4702,"path":4703,"stem":4704,"children":4705},"Visibility and Atomicity (VNA)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fvisibility-and-atomicity-vna","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F21.visibility-and-atomicity-vna\u002F1.index",[4706,4707,4711,4715,4719,4723,4727],{"title":4702,"path":4703,"stem":4704},{"title":4708,"path":4709,"stem":4710},"VNA00-J. Ensure visibility when accessing shared primitive variables","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fvisibility-and-atomicity-vna\u002Fvna00-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F21.visibility-and-atomicity-vna\u002F2.vna00-j",{"title":4712,"path":4713,"stem":4714},"VNA01-J. Ensure visibility of shared references to immutable objects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fvisibility-and-atomicity-vna\u002Fvna01-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F21.visibility-and-atomicity-vna\u002F3.vna01-j",{"title":4716,"path":4717,"stem":4718},"VNA02-J. Ensure that compound operations on shared variables are atomic","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fvisibility-and-atomicity-vna\u002Fvna02-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F21.visibility-and-atomicity-vna\u002F4.vna02-j",{"title":4720,"path":4721,"stem":4722},"VNA03-J. Do not assume that a group of calls to independently atomic methods is atomic","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fvisibility-and-atomicity-vna\u002Fvna03-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F21.visibility-and-atomicity-vna\u002F5.vna03-j",{"title":4724,"path":4725,"stem":4726},"VNA04-J. Ensure that calls to chained methods are atomic","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fvisibility-and-atomicity-vna\u002Fvna04-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F21.visibility-and-atomicity-vna\u002F6.vna04-j",{"title":4728,"path":4729,"stem":4730},"VNA05-J. Ensure atomicity when reading and writing 64-bit values","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frules\u002Fvisibility-and-atomicity-vna\u002Fvna05-j","6.sei-cert-oracle-coding-standard-for-java\u002F3.rules\u002F21.visibility-and-atomicity-vna\u002F7.vna05-j",{"title":4732,"path":4733,"stem":4734,"children":4735},"Recommendations","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F01.index",[4736,4737,4750,4768,4821,4846,4875,4896,4929,4962,5023,5048,5089],{"title":4732,"path":4733,"stem":4734},{"title":3915,"path":4738,"stem":4739,"children":4740},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fcharacters-and-strings-str","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F02.characters-and-strings-str\u002F1.index",[4741,4742,4746],{"title":3915,"path":4738,"stem":4739},{"title":4743,"path":4744,"stem":4745},"STR50-J. Use the appropriate method for counting characters in a string","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F02.characters-and-strings-str\u002F2.str50-j",{"title":4747,"path":4748,"stem":4749},"STR51-J. Use the charset encoder and decoder classes when more control over the encoding process is required","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fcharacters-and-strings-str\u002Fstr51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F02.characters-and-strings-str\u002F3.str51-j",{"title":4751,"path":4752,"stem":4753,"children":4754},"Concurrency (CON)","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fconcurrency-con","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F03.concurrency-con\u002F1.index",[4755,4756,4760,4764],{"title":4751,"path":4752,"stem":4753},{"title":4757,"path":4758,"stem":4759},"CON50-J. Do not assume that declaring a reference volatile guarantees safe publication of the members of the referenced object","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fconcurrency-con\u002Fcon50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F03.concurrency-con\u002F2.con50-j",{"title":4761,"path":4762,"stem":4763},"CON51-J. Do not assume that the sleep(), yield(), or getState() methods provide synchronization semantics","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fconcurrency-con\u002Fcon51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F03.concurrency-con\u002F3.con51-j",{"title":4765,"path":4766,"stem":4767},"CON52-J. Document thread-safety and use annotations where applicable","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fconcurrency-con\u002Fcon52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F03.concurrency-con\u002F4.con52-j",{"title":3941,"path":4769,"stem":4770,"children":4771},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F01.index",[4772,4773,4777,4781,4785,4789,4793,4797,4801,4805,4809,4813,4817],{"title":3941,"path":4769,"stem":4770},{"title":4774,"path":4775,"stem":4776},"DCL50-J. Use visually distinct identifiers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F02.dcl50-j",{"title":4778,"path":4779,"stem":4780},"DCL51-J. Do not shadow or obscure identifiers in subscopes","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F03.dcl51-j",{"title":4782,"path":4783,"stem":4784},"DCL52-J. Do not declare more than one variable per declaration","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F04.dcl52-j",{"title":4786,"path":4787,"stem":4788},"DCL53-J. Minimize the scope of variables","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F05.dcl53-j",{"title":4790,"path":4791,"stem":4792},"DCL54-J. Use meaningful symbolic constants to represent literal values in program logic","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F06.dcl54-j",{"title":4794,"path":4795,"stem":4796},"DCL55-J. Properly encode relationships in constant definitions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl55-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F07.dcl55-j",{"title":4798,"path":4799,"stem":4800},"DCL56-J. Do not attach significance to the ordinal associated with an enum","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl56-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F08.dcl56-j",{"title":4802,"path":4803,"stem":4804},"DCL57-J. Avoid ambiguous overloading of variable arity methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl57-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F09.dcl57-j",{"title":4806,"path":4807,"stem":4808},"DCL58-J. Enable compile-time type checking of variable arity parameter types","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl58-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F10.dcl58-j",{"title":4810,"path":4811,"stem":4812},"DCL59-J. Do not apply public final to constants whose value might change in later releases","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl59-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F11.dcl59-j",{"title":4814,"path":4815,"stem":4816},"DCL60-J. Avoid cyclic dependencies between packages","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl60-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F12.dcl60-j",{"title":4818,"path":4819,"stem":4820},"DCL61-J. Do not use raw types","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fdeclarations-and-initialization-dcl\u002Fdcl61-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F04.declarations-and-initialization-dcl\u002F13.dcl61-j",{"title":3959,"path":4822,"stem":4823,"children":4824},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexceptional-behavior-err","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F05.exceptional-behavior-err\u002F1.index",[4825,4826,4830,4834,4838,4842],{"title":3959,"path":4822,"stem":4823},{"title":4827,"path":4828,"stem":4829},"ERR50-J. Use exceptions only for exceptional conditions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexceptional-behavior-err\u002Ferr50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F05.exceptional-behavior-err\u002F2.err50-j",{"title":4831,"path":4832,"stem":4833},"ERR51-J. Prefer user-defined exceptions over more general exception types","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexceptional-behavior-err\u002Ferr51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F05.exceptional-behavior-err\u002F3.err51-j",{"title":4835,"path":4836,"stem":4837},"ERR52-J. Avoid in-band error indicators","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexceptional-behavior-err\u002Ferr52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F05.exceptional-behavior-err\u002F4.err52-j",{"title":4839,"path":4840,"stem":4841},"ERR53-J. Try to gracefully recover from system errors","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexceptional-behavior-err\u002Ferr53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F05.exceptional-behavior-err\u002F5.err53-j",{"title":4843,"path":4844,"stem":4845},"ERR54-J. Use a try-with-resources statement to safely handle closeable resources","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexceptional-behavior-err\u002Ferr54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F05.exceptional-behavior-err\u002F6.err54-j",{"title":4005,"path":4847,"stem":4848,"children":4849},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexpressions-exp","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F06.expressions-exp\u002F1.index",[4850,4851,4855,4859,4863,4867,4871],{"title":4005,"path":4847,"stem":4848},{"title":4852,"path":4853,"stem":4854},"EXP50-J. Do not confuse abstract object equality with reference equality","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexpressions-exp\u002Fexp50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F06.expressions-exp\u002F2.exp50-j",{"title":4856,"path":4857,"stem":4858},"EXP51-J. Do not perform assignments in conditional expressions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexpressions-exp\u002Fexp51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F06.expressions-exp\u002F3.exp51-j",{"title":4860,"path":4861,"stem":4862},"EXP52-J. Use braces for the body of an if, for, or while statement","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexpressions-exp\u002Fexp52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F06.expressions-exp\u002F4.exp52-j",{"title":4864,"path":4865,"stem":4866},"EXP53-J. Use parentheses for precedence of operation","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexpressions-exp\u002Fexp53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F06.expressions-exp\u002F5.exp53-j",{"title":4868,"path":4869,"stem":4870},"EXP54-J. Understand the differences between bitwise and logical operators","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexpressions-exp\u002Fexp54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F06.expressions-exp\u002F6.exp54-j",{"title":4872,"path":4873,"stem":4874},"EXP55-J. Use the same type for the second and third operands in conditional expressions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fexpressions-exp\u002Fexp55-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F06.expressions-exp\u002F7.exp55-j",{"title":4043,"path":4876,"stem":4877,"children":4878},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-output-fio","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F07.input-output-fio\u002F1.index",[4879,4880,4884,4888,4892],{"title":4043,"path":4876,"stem":4877},{"title":4881,"path":4882,"stem":4883},"FIO50-J. Do not make assumptions about file creation","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-output-fio\u002Ffio50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F07.input-output-fio\u002F2.fio50-j",{"title":4885,"path":4886,"stem":4887},"FIO51-J. Identify files using multiple file attributes","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-output-fio\u002Ffio51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F07.input-output-fio\u002F3.fio51-j",{"title":4889,"path":4890,"stem":4891},"FIO52-J. Do not store unencrypted sensitive information on the client side","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-output-fio\u002Ffio52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F07.input-output-fio\u002F4.fio52-j",{"title":4893,"path":4894,"stem":4895},"FIO53-J. Use the serialization methods writeUnshared() and readUnshared() with care","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-output-fio\u002Ffio53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F07.input-output-fio\u002F5.fio53-j",{"title":4117,"path":4897,"stem":4898,"children":4899},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F1.index",[4900,4901,4905,4909,4913,4917,4921,4925],{"title":4117,"path":4897,"stem":4898},{"title":4902,"path":4903,"stem":4904},"IDS50-J. Use conservative file naming conventions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids\u002Fids50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F2.ids50-j",{"title":4906,"path":4907,"stem":4908},"IDS51-J. Properly encode or escape output","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids\u002Fids51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F3.ids51-j",{"title":4910,"path":4911,"stem":4912},"IDS52-J. Prevent code injection","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids\u002Fids52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F4.ids52-j",{"title":4914,"path":4915,"stem":4916},"IDS53-J. Prevent XPath Injection","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids\u002Fids53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F5.ids53-j",{"title":4918,"path":4919,"stem":4920},"IDS54-J. Prevent LDAP injection","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids\u002Fids54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F6.ids54-j",{"title":4922,"path":4923,"stem":4924},"IDS55-J. Understand how escape characters are interpreted when strings are loaded","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids\u002Fids55-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F7.ids55-j",{"title":4926,"path":4927,"stem":4928},"IDS56-J. Prevent arbitrary file upload","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Finput-validation-and-data-sanitization-ids\u002Fids56-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F08.input-validation-and-data-sanitization-ids\u002F8.ids56-j",{"title":4242,"path":4930,"stem":4931,"children":4932},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F1.index",[4933,4934,4938,4942,4946,4950,4954,4958],{"title":4242,"path":4930,"stem":4931},{"title":4935,"path":4936,"stem":4937},"MET50-J. Avoid ambiguous or confusing uses of overloading","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met\u002Fmet50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F2.met50-j",{"title":4939,"path":4940,"stem":4941},"MET51-J. Do not use overloaded methods to differentiate between runtime types","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met\u002Fmet51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F3.met51-j",{"title":4943,"path":4944,"stem":4945},"MET52-J. Do not use the clone() method to copy untrusted method parameters","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met\u002Fmet52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F4.met52-j",{"title":4947,"path":4948,"stem":4949},"MET53-J. Ensure that the clone() method calls super.clone()","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met\u002Fmet53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F5.met53-j",{"title":4951,"path":4952,"stem":4953},"MET54-J. Always provide feedback about the resulting value of a method","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met\u002Fmet54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F6.met54-j",{"title":4955,"path":4956,"stem":4957},"MET55-J. Return an empty array or collection instead of a null value for methods that return an array or collection","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met\u002Fmet55-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F7.met55-j",{"title":4959,"path":4960,"stem":4961},"MET56-J. Do not use Object.equals() to compare cryptographic keys","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmethods-met\u002Fmet56-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F09.methods-met\u002F8.met56-j",{"title":4304,"path":4963,"stem":4964,"children":4965},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F01.index",[4966,4967,4971,4975,4979,4983,4987,4991,4995,4999,5003,5007,5011,5015,5019],{"title":4304,"path":4963,"stem":4964},{"title":4968,"path":4969,"stem":4970},"MSC50-J. Minimize the scope of the @SuppressWarnings annotation","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F02.msc50-j",{"title":4972,"path":4973,"stem":4974},"MSC51-J. Do not place a semicolon immediately following an if, for, or while condition","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F03.msc51-j",{"title":4976,"path":4977,"stem":4978},"MSC52-J. Finish every set of statements associated with a case label with a break statement","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F04.msc52-j",{"title":4980,"path":4981,"stem":4982},"MSC53-J. Carefully design interfaces before releasing them","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F05.msc53-j",{"title":4984,"path":4985,"stem":4986},"MSC54-J. Avoid inadvertent wrapping of loop counters","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F06.msc54-j",{"title":4988,"path":4989,"stem":4990},"MSC55-J. Use comments consistently and in a readable fashion","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc55-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F07.msc55-j",{"title":4992,"path":4993,"stem":4994},"MSC56-J. Detect and remove superfluous code and values","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc56-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F08.msc56-j",{"title":4996,"path":4997,"stem":4998},"MSC57-J. Strive for logical completeness","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc57-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F09.msc57-j",{"title":5000,"path":5001,"stem":5002},"MSC58-J. Prefer using iterators over enumerations","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc58-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F10.msc58-j",{"title":5004,"path":5005,"stem":5006},"MSC59-J. Limit the lifetime of sensitive data","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc59-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F11.msc59-j",{"title":5008,"path":5009,"stem":5010},"MSC60-J. Do not use assertions to verify the absence of runtime errors","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc60-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F12.msc60-j",{"title":5012,"path":5013,"stem":5014},"MSC61-J. Do not use insecure or weak cryptographic algorithms","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc61-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F13.msc61-j",{"title":5016,"path":5017,"stem":5018},"MSC62-J. Store passwords using a hash function","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc62-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F14.msc62-j",{"title":5020,"path":5021,"stem":5022},"MSC63-J. Ensure that SecureRandom is properly seeded","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fmiscellaneous-msc\u002Fmsc63-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F10.miscellaneous-msc\u002F15.msc63-j",{"title":4358,"path":5024,"stem":5025,"children":5026},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fnumeric-types-and-operations-num","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F11.numeric-types-and-operations-num\u002F1.index",[5027,5028,5032,5036,5040,5044],{"title":4358,"path":5024,"stem":5025},{"title":5029,"path":5030,"stem":5031},"NUM50-J. Convert integers to floating point for floating-point operations","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fnumeric-types-and-operations-num\u002Fnum50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F11.numeric-types-and-operations-num\u002F2.num50-j",{"title":5033,"path":5034,"stem":5035},"NUM51-J. Do not assume that the remainder operator always returns a nonnegative result for integral operands","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fnumeric-types-and-operations-num\u002Fnum51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F11.numeric-types-and-operations-num\u002F3.num51-j",{"title":5037,"path":5038,"stem":5039},"NUM52-J. Be aware of numeric promotion behavior","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fnumeric-types-and-operations-num\u002Fnum52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F11.numeric-types-and-operations-num\u002F4.num52-j",{"title":5041,"path":5042,"stem":5043},"NUM53-J. Use the strictfp modifier for floating-point calculation consistency across platforms","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fnumeric-types-and-operations-num\u002Fnum53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F11.numeric-types-and-operations-num\u002F5.num53-j",{"title":5045,"path":5046,"stem":5047},"NUM54-J. Do not use denormalized numbers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fnumeric-types-and-operations-num\u002Fnum54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F11.numeric-types-and-operations-num\u002F6.num54-j",{"title":4416,"path":5049,"stem":5050,"children":5051},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F01.index",[5052,5053,5057,5061,5065,5069,5073,5077,5081,5085],{"title":4416,"path":5049,"stem":5050},{"title":5054,"path":5055,"stem":5056},"OBJ50-J. Never confuse the immutability of a reference with that of the referenced object","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F02.obj50-j",{"title":5058,"path":5059,"stem":5060},"OBJ51-J. Minimize the accessibility of classes and their members","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F03.obj51-j",{"title":5062,"path":5063,"stem":5064},"OBJ52-J. Write garbage-collection-friendly code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F04.obj52-j",{"title":5066,"path":5067,"stem":5068},"OBJ53-J. Do not use direct buffers for short-lived, infrequently used objects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F05.obj53-j",{"title":5070,"path":5071,"stem":5072},"OBJ54-J. Do not attempt to help the garbage collector by setting local reference variables to null","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F06.obj54-j",{"title":5074,"path":5075,"stem":5076},"OBJ55-J. Remove short-lived objects from long-lived container objects","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj55-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F07.obj55-j",{"title":5078,"path":5079,"stem":5080},"OBJ56-J. Provide sensitive mutable classes with unmodifiable wrappers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj56-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F08.obj56-j",{"title":5082,"path":5083,"stem":5084},"OBJ57-J. Do not rely on methods that can be overridden by untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj57-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F09.obj57-j",{"title":5086,"path":5087,"stem":5088},"OBJ58-J. Limit the extensibility of classes and methods with invariants","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fobject-orientation-obj\u002Fobj58-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F12.object-orientation-obj\u002F10.obj58-j",{"title":4478,"path":5090,"stem":5091,"children":5092},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F01.index",[5093,5094,5098,5102,5106,5110,5114,5118,5122,5126],{"title":4478,"path":5090,"stem":5091},{"title":5095,"path":5096,"stem":5097},"SEC50-J. Avoid granting excess privileges","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec50-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F02.sec50-j",{"title":5099,"path":5100,"stem":5101},"SEC51-J. Minimize privileged code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec51-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F03.sec51-j",{"title":5103,"path":5104,"stem":5105},"SEC52-J. Do not expose methods that use reduced-security checks to untrusted code","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec52-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F04.sec52-j",{"title":5107,"path":5108,"stem":5109},"SEC53-J. Define custom security permissions for fine-grained security","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec53-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F05.sec53-j",{"title":5111,"path":5112,"stem":5113},"SEC54-J. Create a secure sandbox using a security manager","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec54-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F06.sec54-j",{"title":5115,"path":5116,"stem":5117},"SEC55-J. Ensure that security-sensitive methods are called with validated arguments","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec55-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F07.sec55-j",{"title":5119,"path":5120,"stem":5121},"SEC56-J. Do not serialize direct handles to system resources","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec56-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F08.sec56-j",{"title":5123,"path":5124,"stem":5125},"SEC57-J. Do not let untrusted code misuse privileges of callback methods","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec57-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F09.sec57-j",{"title":5127,"path":5128,"stem":5129},"SEC58-J. Deserialization methods should not perform potentially dangerous operations","\u002Fsei-cert-oracle-coding-standard-for-java\u002Frecommendations\u002Fplatform-security-sec\u002Fsec58-j","6.sei-cert-oracle-coding-standard-for-java\u002F4.recommendations\u002F13.platform-security-sec\u002F10.sec58-j",{"title":5131,"path":5132,"stem":5133,"children":5134},"Back Matter","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F1.index",[5135,5136,5140,5144,5148,5151,5270,5295],{"title":5131,"path":5132,"stem":5133},{"title":5137,"path":5138,"stem":5139},"Rec. AA. References","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frec-aa-references","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F2.rec-aa-references",{"title":5141,"path":5142,"stem":5143},"Rec. BB. Definitions","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frec-bb-definitions","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F3.rec-bb-definitions",{"title":5145,"path":5146,"stem":5147},"Rule AA. References","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-aa-references","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F4.rule-aa-references",{"title":5149,"path":50,"stem":5150},"Rule BB. Glossary","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F5.rule-bb-glossary",{"title":5152,"path":5153,"stem":5154,"children":5155},"Rule or Rec. CC. Analyzers","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F01.index",[5156,5157,5161,5165,5167,5171,5175,5179,5183,5187,5191,5195,5199,5203,5207,5211,5214,5218,5222,5226,5228,5232,5236,5240,5244,5248,5252,5256,5260,5264,5266],{"title":5152,"path":5153,"stem":5154},{"title":5158,"path":5159,"stem":5160},"CodeSonar","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fcodesonar","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F02.codesonar",{"title":5162,"path":5163,"stem":5164},"CodeSonar_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fcodesonar_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F03.codesonar_v",{"title":3507,"path":3506,"stem":5166},"6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F04.coverity",{"title":5168,"path":5169,"stem":5170},"Coverity_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fcoverity_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F05.coverity_v",{"title":5172,"path":5173,"stem":5174},"Eclipse","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Feclipse","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F06.eclipse",{"title":5176,"path":5177,"stem":5178},"Eclipse_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Feclipse_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F07.eclipse_v",{"title":5180,"path":5181,"stem":5182},"Error Prone","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Ferror-prone","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F08.error-prone",{"title":5184,"path":5185,"stem":5186},"Error Prone_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Ferror-prone_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F09.error-prone_v",{"title":5188,"path":5189,"stem":5190},"Findbugs","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Ffindbugs","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F10.findbugs",{"title":5192,"path":5193,"stem":5194},"Findbugs_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Ffindbugs_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F11.findbugs_v",{"title":5196,"path":5197,"stem":5198},"Fortify","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Ffortify","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F12.fortify",{"title":5200,"path":5201,"stem":5202},"Fortify_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Ffortify_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F13.fortify_v",{"title":5204,"path":5205,"stem":5206},"Klocwork","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fklocwork","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F14.klocwork",{"title":5208,"path":5209,"stem":5210},"Klocwork_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fklocwork_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F15.klocwork_v",{"title":5212,"path":3536,"stem":5213},"Parasoft","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F16.parasoft",{"title":5215,"path":5216,"stem":5217},"Parasoft_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fparasoft_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F17.parasoft_v",{"title":5219,"path":5220,"stem":5221},"Pmd","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fpmd","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F18.pmd",{"title":5223,"path":5224,"stem":5225},"Pmd_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fpmd_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F19.pmd_v",{"title":3562,"path":3561,"stem":5227},"6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F20.pvs-studio",{"title":5229,"path":5230,"stem":5231},"PVS-Studio_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fpvs-studio_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F21.pvs-studio_v",{"title":5233,"path":5234,"stem":5235},"Security Reviewer - Static Reviewer","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fsecurity-reviewer-static-reviewer","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F22.security-reviewer-static-reviewer",{"title":5237,"path":5238,"stem":5239},"Security Reviewer - Static Reviewer_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fsecurity-reviewer-static-reviewer_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F23.security-reviewer-static-reviewer_v",{"title":5241,"path":5242,"stem":5243},"SonarQube","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fsonarqube","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F24.sonarqube",{"title":5245,"path":5246,"stem":5247},"SonarQube_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fsonarqube_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F25.sonarqube_v",{"title":5249,"path":5250,"stem":5251},"SpotBugs","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fspotbugs","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F26.spotbugs",{"title":5253,"path":5254,"stem":5255},"SpotBugs_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fspotbugs_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F27.spotbugs_v",{"title":5257,"path":5258,"stem":5259},"The Checker Framework","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fthe-checker-framework","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F28.the-checker-framework",{"title":5261,"path":5262,"stem":5263},"The Checker Framework_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fthe-checker-framework_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F29.the-checker-framework_v",{"title":3591,"path":3590,"stem":5265},"6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F30.threadsafe",{"title":5267,"path":5268,"stem":5269},"ThreadSafe_V","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-cc-analyzers\u002Fthreadsafe_v","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F6.rule-or-rec-cc-analyzers\u002F31.threadsafe_v",{"title":5271,"path":5272,"stem":5273,"children":5274},"Rule or Rec. DD. Related Guidelines","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-dd-related-guidelines","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F7.rule-or-rec-dd-related-guidelines\u002F1.index",[5275,5276,5280,5284,5288,5291],{"title":5271,"path":5272,"stem":5273},{"title":5277,"path":5278,"stem":5279},"2010","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-dd-related-guidelines\u002F2.2010","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F7.rule-or-rec-dd-related-guidelines\u002F2.2010",{"title":5281,"path":5282,"stem":5283},"2013","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-dd-related-guidelines\u002F3.2013","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F7.rule-or-rec-dd-related-guidelines\u002F3.2013",{"title":5285,"path":5286,"stem":5287},"MITRE CAPEC","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-dd-related-guidelines\u002Fmitre-capec","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F7.rule-or-rec-dd-related-guidelines\u002F4.mitre-capec",{"title":3645,"path":5289,"stem":5290},"\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-dd-related-guidelines\u002Fmitre-cwe","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F7.rule-or-rec-dd-related-guidelines\u002F5.mitre-cwe",{"title":5292,"path":5293,"stem":5294},"SECURE CODING GUIDELINES FOR JAVA SE, VERSION 5.0","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-dd-related-guidelines\u002Fsecure-coding-guidelines-for-java-se-version-50","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F7.rule-or-rec-dd-related-guidelines\u002F6.secure-coding-guidelines-for-java-se-version-50",{"title":5296,"path":5297,"stem":5298},"Rule or Rec. EE. Risk Assessments","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fback-matter\u002Frule-or-rec-ee-risk-assessments","6.sei-cert-oracle-coding-standard-for-java\u002F5.back-matter\u002F8.rule-or-rec-ee-risk-assessments",{"title":5300,"path":5301,"stem":5302,"children":5303},"Admin","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fadmin","6.sei-cert-oracle-coding-standard-for-java\u002F6.admin\u002F1.index",[5304,5305,5309,5313,5317,5321],{"title":5300,"path":5301,"stem":5302},{"title":5306,"path":5307,"stem":5308},"All Guidelines with Classification","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fadmin\u002Fall-guidelines-with-classification","6.sei-cert-oracle-coding-standard-for-java\u002F6.admin\u002F2.all-guidelines-with-classification",{"title":5310,"path":5311,"stem":5312},"Normative Guidelines","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fadmin\u002Fnormative-guidelines","6.sei-cert-oracle-coding-standard-for-java\u002F6.admin\u002F3.normative-guidelines",{"title":5314,"path":5315,"stem":5316},"Tech-edit","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fadmin\u002Ftech-edit","6.sei-cert-oracle-coding-standard-for-java\u002F6.admin\u002F4.tech-edit",{"title":5318,"path":5319,"stem":5320},"TODO List","\u002Fsei-cert-oracle-coding-standard-for-java\u002Fadmin\u002Ftodo-list","6.sei-cert-oracle-coding-standard-for-java\u002F6.admin\u002F5.todo-list",{"title":5318,"path":5319,"stem":5322},"6.sei-cert-oracle-coding-standard-for-java\u002F6.admin\u002F6.todo-list",1775657819381]