1   package com.puppycrawl.tools.checkstyle.checks.coding.finallocalvariable;
2   
3   import java.util.ArrayList;
4   import java.util.Arrays;
5   
6   public class InputFinalLocalVariableFalsePositives {
7   
8       // spring-framework/spring-web/.../CommonsFileUploadSupport.java
9       private void foo1() {
10          String value;
11          if (true) {
12              try {
13                  value = "";
14              }
15              catch (Exception ex) {
16                  if (true) {
17  
18                  }
19                  value = "";
20              }
21          }
22          else {
23              value = "";
24          }
25      }
26  
27      // spring-framework/spring-messaging/.../StompBrokerRelayMessageHandler.java
28      private void foo2() {
29          String stompAccessor;
30  
31          if (true) {
32              throw new IllegalStateException(
33                  "No header accessor (not using the SimpMessagingTemplate?): ");
34          }
35          else if (true) {
36              stompAccessor = "";
37          }
38          else if (true) {
39              stompAccessor = "";
40          }
41          else {
42              throw new IllegalStateException("Unexpected header accessor type ");
43          }
44  
45          if (true) {
46              if (true) {
47                  if (true) {
48                  }
49                  return;
50              }
51              stompAccessor.toString();
52          }
53  
54          if (true) {
55              return;
56          }
57  
58          if (true) {
59              if (true) {
60              }
61              stompAccessor = "";
62              stompAccessor.toString();
63              stompAccessor.toString();
64              if (true) {
65                  stompAccessor.toString();
66              }
67          }
68          else if (true) {
69              if (true) {
70                  if (true) {
71                  }
72                  return;
73              }
74          }
75          else {
76              if (true) {
77                  if (true) {
78                  }
79                  return;
80              }
81          }
82      }
83  
84      // spring-framework/spring-jdbc/.../SQLErrorCodesFactory.java
85      private void foo3() {
86          String errorCodes;
87  
88          try {
89              if (true) {
90              }
91              else {
92              }
93  
94              if (true) {
95              }
96  
97              errorCodes = "";
98              if (true) {
99              }
100         }
101         catch (Exception ex) {
102             errorCodes = "";
103         }
104 
105         final String s = errorCodes;
106     }
107 
108     // spring-framework/spring-context/.../TaskExecutorFactoryBean.java
109     private void foo4() {
110         if (true) {
111             try {
112                 int corePoolSize;
113                 if (true) {
114                     corePoolSize = Integer.valueOf("1");
115                     if (corePoolSize > 2) {
116                     }
117                     if (true) {
118                         if (corePoolSize == 0) {
119                             corePoolSize = 2;
120                         }
121                         else {
122                         }
123                     }
124                 }
125                 else {
126                     corePoolSize = 1;
127                 }
128             }
129             catch (NumberFormatException ex) {
130             }
131         }
132     }
133 
134     // spring-framework/spring-beans/.../SimpleInstantiationStrategy.java
135     private void foo5() {
136         if (true) {
137             final String s = "";
138             String constructorToUse;
139             synchronized (s) {
140                 constructorToUse = "";
141                 if (constructorToUse == null) {
142                     if (true) {
143                     }
144                     try {
145                         if (System.getSecurityManager() != null) {
146                             constructorToUse = "";
147                         }
148                         else {
149                             constructorToUse = "";
150                         }
151                     }
152                     catch (Exception ex) {
153                     }
154                 }
155             }
156         }
157         else {
158         }
159     }
160 
161     // openjdk8/src/windows/classes/sun/print/Win32PrintJob.java
162     private void foo6() {
163         String[] attrs;
164         if (true) {
165             attrs = null;
166             for (int i = 0; i < attrs.length; i++) {
167             }
168         }
169 
170         if (true) {
171             attrs = null;
172             for (int i = 0; i < attrs.length; i++) {
173                 if (attrs[i] instanceof Object) {
174                 }
175                 if (attrs[i] instanceof Object) {
176                 }
177             }
178         }
179     }
180 
181     // openjdk8/src/windows/classes/sun/awt/windows/WInputMethod.java
182     private void foo7() {
183         int index;
184         if (true) {
185             index = 0;
186         }
187         else if (true) {
188             index = 2;
189         }
190         else {
191             return;
192         }
193         if (true) {
194             index += 1;
195         }
196     }
197 
198     // openjdk8/src/solaris/classes/sun/print/UnixPrintJob.java
199     private void foo8() {
200         String[] attrs;
201         if (true) {
202             attrs = null;
203             for (int i = 0; i < attrs.length; i++) {
204                 if (attrs[i] instanceof String) {
205                 }
206             }
207         }
208         if (true) {
209             attrs = null;
210             for (int i = 0; i < attrs.length; i++) {
211                 if (attrs[i] instanceof Object) {
212                 }
213                 if (attrs[i] instanceof String) {
214                 }
215             }
216         }
217     }
218 
219     // openjdk8/src/solaris/classes/sun/java2d/xr/XRRenderer.java
220     private void foo9() {
221         int transx, transy;
222 
223         if (true) {
224             if (true) {
225                 if (true) {
226                 }
227                 else {
228                 }
229                 transx = 2;
230                 transy = 1;
231             }
232             else {
233                 transx = 0;
234                 transy = 0;
235             }
236         }
237         if (true) {
238             transx = 1;
239             transy = 2;
240         }
241         else {
242             transx = transy = 0;
243         }
244 
245         try {
246         }
247         finally {
248         }
249     }
250 
251     // openjdk8/src/solaris/classes/sun/awt/X11InputMethod.java
252     private void foo10() {
253         int index;
254         if (false) {
255             index = 0;
256         }
257         else if (true) {
258             index = 2;
259         }
260         else {
261             return;
262         }
263         if (false) {
264             index += 1;
265         }
266     }
267 
268     // jdk8/src/solaris/classes/java/util/prefs/FileSystemPreferences.java
269     private void foo11() {
270         if (true)
271             if (true)
272                 return;
273         long lastModifiedTime;
274         if (true) {
275             lastModifiedTime = 1L;
276             if (true) {
277             }
278         }
279         else if (true) {
280         }
281         if (true) {
282             lastModifiedTime = 2L;
283             if (true) {
284             }
285         }
286     }
287 
288     // openjdk8/src/share/classes/sun/util/locale/provider/LocaleResources.java
289     private void foo12() {
290         String numElemKey;
291         if (true) {
292             numElemKey = ".NumberElements";
293             if (true) {
294             }
295         }
296         if (true) {
297             numElemKey = "";
298             if (true) {
299             }
300         }
301     }
302 
303     // openjdk8/src/share/classes/sun/tools/jar/Main.java
304     private void foo13() {
305         String out;
306         if (true) {
307             out = "";
308         }
309         else {
310             out = "";
311             if (true) {
312             }
313         }
314         if (true) {
315             out = "";
316         }
317         if (true) {
318         }
319         out.toString();
320         if (true) {
321             try {
322                 out = "";
323             }
324             catch (Exception ioe) {
325             }
326             finally {
327                 if (true) {
328                 }
329                 if (true) {
330                     out.toString();
331                 }
332                 if (true) {
333                 }
334                 if (true) {
335                 }
336                 if (true) {
337                 }
338             }
339         }
340     }
341 
342     // openjdk8/src/share/classes/sun/text/normalizer/NormalizerBase.java
343     private void foo14() {
344         int c, c2; // violation: Variable 'c2' should be declared final
345         if (true) {
346         }
347         if (true) {
348             if ((c = 'd') >= 0) {
349                 if (true) {
350                     c2 = 'a';
351                     if (true) {
352                         if (true) {
353                             if (true) {
354                             }
355                             c = c2;
356                         }
357                         else {
358                         }
359                     }
360                 }
361 
362                 if (true) {
363                 }
364             }
365             return;
366         }
367 
368     }
369 
370     // openjdk8/src/share/classes/sun/text/normalizer/CharTrie.java
371     private void foo15() {
372         int limit;
373         if (true) {
374             limit = 0xdc00 >> 1;
375             limit = 2 + 1;
376 
377         }
378     }
379 
380     // openjdk8/src/share/classes/sun/text/bidi/BidiBase.java
381     private void foo16() {
382         final int a = 1;
383         byte level;
384         if (true) {
385             switch (a) {
386                 case 1:
387                     break;
388                 case 2:
389                     break;
390                 case 3:
391                     if (true) {
392                     }
393                     if ((true) ||
394                         (true)) {
395                         level = 1;
396                         if (true) {
397                         }
398                         if (true) {
399                         }
400                         break;
401                     }
402                     for (int i = 0; i < 14; i++) {
403                     }
404                     if (true) {
405                     }
406                     break;
407                 case 4:
408                     if (true)
409                         break;
410                 case 5:
411                     if (true) {
412                         if (true) {
413                             break;
414                         }
415                         if (true) {
416                         }
417                         break;
418                     }
419                     if (true) {
420                     }
421                     break;
422                 case 6:
423                     break;
424                 case 7:
425                     for (int i = 0; i < 15458; i++) {
426                     }
427                     if (true) {
428                     }
429                     break;
430 
431                 case 8:
432                     break;
433 
434                 case 9:
435                     if (true) {
436                     }
437                     break;
438                 case 10:
439                     level = (byte) 1;
440                     for (int i = 0; i < 12; i++) {
441                         if (true) {
442                         }
443                     }
444                     break;
445                 case 11:
446                     level = 1;
447                     for (int i = 0; i < 12; i++) {
448                         if (true) {
449                             while (level < 2) {
450                             }
451                             while (true) {
452                             }
453                         }
454                         if (true) {
455                             continue;
456                         }
457                     }
458                     break;
459                 case 12:
460                     level = (byte) 2;
461                     for (int i = 0; i < 12; i++) {
462                         if (true) {
463                         }
464                     }
465                     break;
466                 default:
467                     throw new IllegalStateException("Internal ICU error in processPropertySeq");
468             }
469         }
470         if (true) {
471             level = (byte) 12;
472             for (; ; ) {
473             }
474         }
475     }
476 
477     // openjdk8/src/share/classes/sun/security/ssl/CipherBox.java
478     private void foo17() {
479         try {
480             int newLen;
481             if (true) {
482                 try {
483                     newLen = 1;
484                 }
485                 catch (Exception ibse) {
486                 }
487             }
488             else {
489                 newLen = 2;
490                 if (true) {
491                 }
492             }
493             if (true) {
494                 try {
495                 }
496                 catch (Exception e) {
497                 }
498             }
499             if (true) {
500                 newLen = 3;
501                 if (true) {
502                     if (true) {
503                     }
504                 }
505             }
506             return;
507         }
508         catch (Exception e) {
509             throw new ArrayIndexOutOfBoundsException(e.toString());
510         }
511     }
512 
513     // openjdk8/src/share/classes/sun/security/ssl/CipherBox.java
514     private void foo18() throws Exception {
515         int newLen;
516         if (true) {
517             try {
518                 newLen = 1;
519             }
520             catch (Exception ibse) {
521             }
522         }
523         else {
524             newLen = 2;
525             if (true) {
526             }
527         }
528         if (true) {
529             try {
530             }
531             catch (Exception e) {
532             }
533         }
534         if (true) {
535             newLen = 1;
536             if (true) {
537                 if (true) {
538                     throw new Exception("invalid explicit IV");
539                 }
540             }
541         }
542         return;
543     }
544 
545     // openjdk8/src/share/classes/sun/security/rsa/RSACore.java
546     private String foo19() {
547         String params;
548         synchronized (this) {
549             params = "blindingCache.get(modulus)";
550         }
551         if (true) {
552             return params;
553         }
554         params = "new BlindingParameters(e, re, rInv)";
555         synchronized (this) {
556         }
557         return params;
558     }
559 
560     // openjdk8/src/share/classes/sun/security/provider/certpath/ldap/LDAPCertStore.java
561     private void foo20() {
562         String cert;
563         if (true) {
564             cert = "certPair.getForward()";
565             if (true) {
566             }
567         }
568         if (true) {
569             cert = "certPair.getReverse()";
570             if (true) {
571             }
572         }
573     }
574 
575     // openjdk8/src/share/classes/sun/security/pkcs11/P11KeyGenerator.java
576     private void foo21() throws Exception {
577         try {
578             final int keyType = 8;
579             String[] attributes;
580             switch (keyType) {
581                 case 1:
582                 case 2:
583                 case 3:
584                     attributes = null;
585                     break;
586                 default:
587                     attributes = null;
588                     break;
589             }
590             attributes = null;
591             return;
592         }
593         catch (Exception e) {
594             throw new Exception("Could not generate key", e);
595         }
596         finally {
597         }
598     }
599 
600     // openjdk8/src/share/classes/sun/security/krb5/internal/KDCReqBody.java
601     private void foo22() throws Exception {
602         String subDer;
603         if (true) {
604             subDer = "";
605             if (true) {
606                 while ("".equals(subDer)) {
607                 }
608                 for (int i = 0; i < 1541; i++) {
609 
610                 }
611             }
612             else {
613                 throw new Exception();
614             }
615         }
616         else {
617             throw new Exception();
618         }
619         if (true) {
620         }
621         if (true) {
622         }
623         if (true) {
624             if (true) {
625                 subDer = "";
626                 if (true) {
627                     while ("".equals(subDer)) {
628                     }
629                 }
630                 else {
631                     throw new Exception();
632                 }
633                 if (true) {
634                 }
635             }
636             else {
637                 throw new Exception();
638             }
639         }
640         if (true) {
641             throw new Exception();
642         }
643     }
644 
645     // openjdk8/src/share/classes/sun/security/krb5/internal/KDCReq.java
646     private void foo23() throws Exception {
647         int bint;
648         if (true) {
649             throw new Exception();
650         }
651         if (true) {
652             throw new Exception();
653         }
654         if (true) {
655             bint = 1;
656             if (true) {
657                 throw new Exception("");
658             }
659         }
660         else {
661             throw new Exception();
662         }
663         if (true) {
664             bint = 2;
665             if (bint == 4) {
666                 throw new Exception();
667             }
668         }
669         else {
670             throw new Exception();
671         }
672     }
673 
674     // openjdk8/src/share/classes/sun/rmi/server/LoaderHandler.java
675     private void foo24() {
676         final String a = "";
677         String loader;
678         synchronized (this) {
679             while ("".equals(a)) {
680                 if (true) {
681                 }
682             }
683             if (true) {
684                 if (true) {
685                 }
686                 loader = "";
687             }
688             loader = "";
689         }
690     }
691 
692     // openjdk8/src/share/classes/sun/print/RasterPrinterJob.java
693     private void foo25() {
694         double w, h;
695         if (true) {
696             if (true) {
697                 w = 11.0;
698                 h = 12.2;
699             }
700         }
701         if (true) {
702             w = 1.0;
703             h = 2.5;
704         }
705         return;
706     }
707 
708     // openjdk8/src/share/classes/sun/print/PSStreamPrintJob.java
709     private void foo26() {
710         String[] attrs;
711         if (true) {
712             attrs = null;
713             for (int i = 0; i < attrs.length; i++) {
714                 if (true) {
715                 }
716             }
717         }
718         if (true) {
719             attrs = null;
720             for (int i = 0; i < attrs.length; i++) {
721                 if (attrs[i] instanceof String) {
722                 }
723                 if (attrs[i] instanceof String) {
724                 }
725             }
726         }
727     }
728 
729     // openjdk8/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
730     private void foo27() {
731         String locUrl;
732         try {
733             locUrl = "";
734             if (true) {
735                 return;
736             }
737         }
738         catch (Exception mue) {
739 
740             locUrl = "";
741         }
742     }
743 
744     // openjdk8/src/share/classes/sun/misc/Launcher.java
745     private void foo28() {
746         final String a = "";
747         String[] path;
748         if (true) {
749             while ("".equals(a)) {
750             }
751             path = new String[5];
752             while ("".equals(a)) {
753                 if (true) {
754                     path[1] = "";
755                 }
756                 else {
757                     path[2] = "";
758                 }
759             }
760             if (true) {
761                 path[3] = "";
762             }
763             else {
764                 path[4] = "";
765             }
766             if (true) {
767                 path = new String[14];
768             }
769         }
770         else {
771             path = new String[81];
772         }
773         return;
774     }
775 
776     // openjdk8/src/share/classes/sun/misc/FloatingDecimal.java
777     private void foo29() {
778         int decExp;
779         parseNumber:
780         try {
781             if (true) {
782                 throw new NumberFormatException("empty String");
783             }
784             int i = 0;
785             switch (i) {
786                 case '-':
787                 case '+':
788                     i++;
789             }
790             if (true) {
791                 if (true) {
792                     return;
793                 }
794                 break parseNumber;
795             }
796             else if (true) {
797                 if (true) {
798                     return;
799                 }
800                 break parseNumber;
801             }
802             else if (true) {
803                 if (true) {
804                     if (true) {
805                         return;
806                     }
807                 }
808             }
809             skipLeadingZerosLoop:
810             while (i < 15) {
811                 if (true) {
812                 }
813                 else if (true) {
814                     if (true) {
815                         throw new NumberFormatException("multiple points");
816                     }
817                     if (true) {
818                     }
819                 }
820                 else {
821                     break skipLeadingZerosLoop;
822                 }
823                 i++;
824             }
825             digitLoop:
826             while (i < 12) {
827                 if (true) {
828                 }
829                 else if (true) {
830                 }
831                 else if (true) {
832                     if (true) {
833                         throw new NumberFormatException("multiple points");
834                     }
835                     if (true) {
836                     }
837                 }
838                 else {
839                     break digitLoop;
840                 }
841                 i++;
842             }
843             if (true) {
844                 break parseNumber;
845             }
846             if (true) {
847                 decExp = 1;
848             }
849             else {
850                 decExp = 2;
851             }
852             if (true) {
853                 switch (i) {
854                     case '-':
855                     case '+':
856                         i++;
857                 }
858                 final int expAt = i;
859                 expLoop:
860                 while (i < 54) {
861                     if (true) {
862                     }
863                     if (true) {
864                     }
865                     else {
866                         i--;
867                         break expLoop;
868                     }
869                 }
870                 if (true) {
871                     decExp = 12;
872                 }
873                 else {
874                     decExp = decExp + 123;
875                 }
876                 if (i == expAt) {
877                     break parseNumber;
878                 }
879             }
880             if (i < 9788) {
881                 break parseNumber;
882             }
883             if (true) {
884                 return;
885             }
886             return;
887         }
888         catch (StringIndexOutOfBoundsException e) {
889         }
890         throw new NumberFormatException();
891     }
892 
893     // openjdk8/src/share/classes/sun/java2d/pipe/BufferedRenderPipe.java
894     private void foo30() {
895         int transx, transy;
896         if (true) {
897             if (true) {
898                 if (true) {
899                 }
900                 else {
901                 }
902                 transx = 1;
903                 transy = 2;
904             }
905             else {
906                 transx = 0;
907                 transy = 0;
908             }
909         }
910         if (true) {
911             transx = 4;
912             transy = 1;
913         }
914         else {
915             transx = transy = 0;
916         }
917     }
918 
919     // openjdk8/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java
920     private void foo31() throws Exception {
921         String srcIL;
922         if (true) {
923             srcIL = "";
924             if (srcIL != null) {
925                 return;
926             }
927         }
928         if (true) {
929             try {
930                 srcIL = "";
931             }
932             catch (Exception e) {
933                 throw new Exception("Unable to convert rasters");
934             }
935             for (int y = 0; y < 12; y++) {
936                 for (int x = 0; x < 12; x++) {
937                     for (int i = 0; i < 5478; i++) {
938                     }
939                 }
940                 for (int x = 0; x < 5; x++) {
941                     for (int i = 0; i < 541; i++) {
942                     }
943                 }
944             }
945         }
946         else {
947             try {
948                 srcIL = "";
949             }
950             catch (Exception e) {
951                 throw new Exception("Unable to convert rasters");
952             }
953         }
954     }
955 
956     // openjdk8/src/share/classes/sun/java2d/cmm/lcms/LCMSTransform.java
957     private void foo32() throws Exception {
958        String srcIL, dstIL;
959         try {
960             if (true) {
961                 dstIL = "";
962 
963                 if (dstIL != null) {
964                     srcIL = "";
965                     if (srcIL != null) {
966                         return;
967                     }
968                 }
969             }
970         }
971         catch (Exception e) {
972             throw new Exception("Unable to convert images");
973         }
974         if (true) {
975             if (true) {
976             }
977             try {
978                 srcIL = "";
979                 dstIL = "";
980             }
981             catch (Exception e) {
982                 throw new Exception("Unable to convert images");
983             }
984         }
985         else {
986                     dstIL = "";
987         }
988     }
989 
990     // openjdk8/src/share/classes/sun/font/FileFontStrike.java
991     private void foo33() {
992         float advance;
993         if (true) {
994             advance = 1234;
995             if (advance != Float.MAX_VALUE) {
996                 if (true) {
997                     return;
998                 }
999                 else {
1000                     return;
1001                 }
1002             }
1003         }
1004         else if (true) {
1005             if (true) {
1006                 advance = 123;
1007                 if (advance != Float.MAX_VALUE) {
1008                     if (true) {
1009                         return;
1010                     }
1011                     else {
1012                         return;
1013                     }
1014                 }
1015             }
1016         }
1017         if (true) {
1018             return;
1019         }
1020         if (true) {
1021             advance = 12435;
1022         }
1023         else {
1024             if (true) {
1025             }
1026             else {
1027             }
1028             if (true) {
1029                 advance = 123;
1030             }
1031             else {
1032                 advance = 123414;
1033             }
1034         }
1035         if (true) {
1036         }
1037         else if (true) {
1038             if (true) {
1039                 for (int i = 0; i < 214; i++) {
1040                 }
1041             }
1042         }
1043         return;
1044     }
1045 
1046     // openjdk8/src/share/classes/sun/awt/geom/AreaOp.java
1047     private void foo34() {
1048         final String s = "";
1049         int etag;
1050         if (true) {
1051             etag = 1;
1052             do {
1053                 if (true) {
1054                 }
1055                 if (true) {
1056                 }
1057             } while ("".equals(s));
1058             if (true) {
1059                 etag = 13213;
1060             }
1061             else {
1062             }
1063         }
1064         else {
1065             etag = 12312;
1066         }
1067     }
1068 
1069     // openjdk8/src/share/classes/javax/swing/text/html/parser/Parser.java
1070     private void foo35() {
1071         final int a = 8;
1072         String elem;
1073         switch (a) {
1074             case 1:
1075                 switch (a) {
1076                     case '-':
1077                         while (true) {
1078                             if (true) {
1079                             }
1080                         }
1081                     default:
1082                 }
1083             case '/':
1084                 switch (a) {
1085                     case '>':
1086                     case '<':
1087                         if (true) {
1088 
1089                         }
1090                         elem = "";
1091                         break;
1092                     default:
1093                         if (true) {
1094                             return;
1095                         }
1096                         switch (a) {
1097                             case '>':
1098                             case '<':
1099                                 break;
1100                             default:
1101                         }
1102                         if (true) {
1103                             elem = "";
1104                         }
1105                         else {
1106                             elem = "";
1107                         }
1108                         break;
1109                 }
1110                 if (true) {
1111                     elem = "";
1112                     if (true) {
1113                         return;
1114                     }
1115                 }
1116                 else {
1117                     if (true) {
1118                         elem = "";
1119                     }
1120                     else {
1121                         elem = "";
1122                     }
1123                 }
1124                 elem = "";
1125         }
1126     }
1127 
1128     // openjdk8/src/share/classes/javax/swing/text/html/parser/Parser.java
1129     private void foo36() {
1130         String attname;
1131         if (true) {
1132             attname = "";
1133             if (true) {
1134             }
1135             else {
1136                 if (true) {
1137                     if (true) {
1138                     }
1139                     else {
1140                     }
1141                 }
1142             }
1143         }
1144         else if (true) {
1145         }
1146         else if (true) {
1147             if (true) {
1148                 attname = "";
1149                 if (true) {
1150                 }
1151                 if (true) {
1152                 }
1153                 else {
1154                     if (true) {
1155                         if (true) {
1156                         }
1157                     }
1158                 }
1159             }
1160             else {
1161             }
1162         }
1163         else if (true) {
1164             attname = "";
1165         }
1166         else if (true) {
1167             return;
1168         }
1169         else {
1170             if (true) {
1171             }
1172             else {
1173                 return;
1174             }
1175         }
1176         if (true) {
1177             attname = "";
1178         }
1179         else {
1180         }
1181     }
1182 
1183     // openjdk8/src/share/classes/javax/swing/text/JTextComponent.java
1184     private void foo37() {
1185         int dot;
1186         if (true) {
1187             dot = 213213;
1188             if (true) {
1189                 if (true) {
1190                 }
1191             }
1192             if (true) {
1193                 dot += 1;
1194                 if (true) {
1195                     try {
1196                     }
1197                     catch (Exception ble) {
1198                     }
1199                 }
1200             }
1201         }
1202         else if (true) {
1203             dot = 31;
1204         }
1205     }
1206 
1207     // openjdk8/src/share/classes/javax/swing/plaf/synth/ParsedSynthStyle.java
1208     private void foo38() {
1209         String painter;
1210         if (true) {
1211             if ((painter = "").equals("")) {
1212                 return;
1213             }
1214         }
1215         if ((painter = "").equals("")) {
1216             return;
1217         }
1218     }
1219 
1220     // openjdk8/src/share/classes/javax/swing/plaf/metal/MetalInternalFrameTitlePane.java
1221     private void foo39() {
1222         int spacing;
1223         if (true) {
1224             if (true) {
1225                 if (true);
1226             }
1227             else {
1228                 spacing = 4;
1229                 if (true) return;
1230             }
1231         }
1232         if (true) {
1233             spacing = 123;
1234             if (true) return;
1235         }
1236         if (true) {
1237             spacing = 12;
1238         }
1239     }
1240 
1241     // openjdk8/src/share/classes/javax/swing/plaf/basic/BasicBorders.java
1242     private void foo40() {
1243         String cBounds;
1244         if (true) {
1245             if (true) {
1246                 cBounds = "";
1247             }
1248             if (true) {
1249                 cBounds = "";
1250             }
1251         }
1252         else {
1253             if (true) {
1254                 cBounds = "";
1255             }
1256             if (true) {
1257                 cBounds = "";
1258             }
1259         }
1260     }
1261 
1262     // openjdk8/src/share/classes/javax/swing/border/CompoundBorder.java
1263     private void foo41() {
1264         String nextInsets;
1265         if (true) {
1266             nextInsets = "";
1267         }
1268         if (true) {
1269             nextInsets = "";
1270         }
1271     }
1272 
1273     // openjdk8/src/share/classes/javax/swing/JTree.java
1274     private String foo42() {
1275         if (true) {
1276             String rowBounds;
1277             if (true) {
1278                 rowBounds = "";
1279                 if (true) {
1280                     if (true) {
1281                         return "";
1282                     }
1283                     return "";
1284                 }
1285                 if (true) {
1286                     if (true) {
1287                         rowBounds = "";
1288                         return rowBounds;
1289                     }
1290                 }
1291                 else {
1292                     return rowBounds;
1293                 }
1294             }
1295             return "";
1296         }
1297         return "";
1298     }
1299 
1300     // openjdk8/src/share/classes/javax/sql/rowset/spi/SyncFactory.java
1301     private void foo43() {
1302         String providerImpls;
1303         try {
1304             providerImpls = "";
1305         }
1306         catch (Exception ex) {
1307             providerImpls = null;
1308         }
1309         String strRowsetProperties;
1310         try {
1311             strRowsetProperties = "";
1312         }
1313         catch (Exception ex) {
1314             strRowsetProperties = "";
1315         }
1316     }
1317 
1318     // openjdk8/src/share/classes/javax/sound/sampled/AudioSystem.java
1319     private void foo45() {
1320         String mixer;
1321         if (true) {
1322             if (true) {
1323                 if (true) {
1324                     mixer = "";
1325                     if (mixer != null) {
1326                         return;
1327                     }
1328                 }
1329                 else {
1330                     mixer = "";
1331                     if (mixer != null) {
1332                         return;
1333                     }
1334                 }
1335 
1336             }
1337         }
1338         if (true) {
1339             mixer = "";
1340             if (mixer != null) {
1341                 return;
1342             }
1343         }
1344     }
1345 
1346     // openjdk8/src/share/classes/javax/security/auth/SubjectDomainCombiner.java
1347     private void foo46() {
1348         String e;
1349         if (true) {
1350             synchronized (this) {
1351                 e = "";
1352 
1353             }
1354             synchronized (this) {
1355                 e = "";
1356 
1357             }
1358         }
1359     }
1360 
1361     // openjdk8/src/share/classes/javax/naming/spi/NamingManager.java
1362     private void foo47() {
1363         final String a = "";
1364         String factory;
1365         if (true) {
1366             factory = "";
1367         }
1368         if ("".equals(a)) {
1369             factory = "";
1370         }
1371     }
1372 
1373     // openjdk8/src/share/classes/java/util/regex/Pattern.java
1374     private void foo48() {
1375         int ch;
1376         if (true) {
1377             ch = 1;
1378         }
1379         if (true) {
1380             ch = 2;
1381         }
1382     }
1383 
1384     // openjdk8/src/share/classes/java/util/concurrent/locks/StampedLock.java
1385     private String foo49() {
1386         long next;
1387         if (!Thread.interrupted()) {
1388             if (true) {
1389                 if (true) {
1390                     if ((next = 5) == 5)
1391                         return "next";
1392                 }
1393                 else if ((next = 5) == 5)
1394                     return "next";
1395             }
1396             if (true)
1397                 return "0L";
1398             if (true)
1399                 if ((next = 5) == 5)
1400                     return "next";
1401         }
1402         return "";
1403     }
1404 
1405     // openjdk8/src/share/classes/java/time/Duration.java
1406     private void foo50() {
1407         long nanos;
1408         try {
1409             nanos = 1L;
1410         }
1411         catch (Exception ex2) {
1412             nanos = 0L;
1413         }
1414     }
1415 
1416     // openjdk8/src/share/classes/java/text/CollationElementIterator.java
1417     private void foo51() {
1418         if (true) {
1419             int vowel;
1420             if (true) {
1421                 vowel = 1;
1422             }
1423             if (true) {
1424                 vowel = 2;
1425             }
1426         }
1427         if (true) {
1428             int consonant;
1429             if (true) {
1430                 consonant = 23;
1431             }
1432             if (true) {
1433                 consonant =2;
1434             }
1435         }
1436     }
1437 
1438     // openjdk8/src/share/classes/java/sql/DriverManager.java
1439     private void foo52() {
1440         String drivers;
1441         try {
1442             drivers = "";
1443         }
1444         catch (Exception ex) {
1445             drivers = null;
1446         }
1447     }
1448 
1449     // openjdk8/src/share/classes/java/security/Policy.java
1450     private void foo53() {
1451         String pc;
1452         synchronized (this) {
1453             pc = "Hello";
1454         }
1455         pc = "";
1456     }
1457 
1458     // openjdk8/src/share/classes/java/lang/invoke/DirectMethodHandle.java
1459     private void foo54() {
1460         final int a = 1;
1461         final String linkerName;
1462         String lambdaName;
1463         switch (a) {
1464             case 1:
1465                 linkerName = "linkToVirtual";
1466                 lambdaName = "DMH"
1467                     + ".invokeVirtual";
1468                 break;
1469             case 2:
1470                 linkerName = "linkToStatic";
1471                 lambdaName = "DMH"
1472                     + ".invokeStatic";
1473                 break;
1474             case 3:
1475                 linkerName = "linkToStatic";
1476                 lambdaName = "DMH.invokeStaticInit";
1477                 break;
1478             case 4:
1479                 linkerName = "linkToSpecial";
1480                 lambdaName = "DMH"
1481                     + ".invokeSpecial";
1482                 break;
1483             case 5:
1484                 linkerName = "linkToInterface";
1485                 lambdaName = "DMH"
1486                     + ".invokeInterface";
1487                 break;
1488             case 6:
1489                 linkerName = "linkToSpecial";
1490                 lambdaName = "DMH"
1491                     + ".newInvokeSpecial";
1492                 break;
1493             default:
1494                 throw new InternalError("which=");
1495         }
1496         lambdaName += "_";
1497     }
1498 
1499     // openjdk8/src/share/classes/java/lang/Class.java
1500     private String foo55() {
1501         String res;
1502         if (true) {
1503             res = "";
1504             if (res != null) return res;
1505         }
1506         if (true) {
1507             res = "temporaryRes";
1508         }
1509         else {
1510             res = "";
1511         }
1512         if (true) {
1513             if (true) {
1514             }
1515             else {
1516             }
1517         }
1518         return "";
1519     }
1520 
1521     // openjdk8/src/share/classes/java/awt/geom/CubicCurve2D.java
1522     private void foo56() {
1523         int num;
1524         if (true) {
1525             num = 3;
1526         }
1527         else {
1528             num = 1;
1529             if (true) {
1530                 num = 2;
1531             }
1532         }
1533         if (num > 1) {
1534             num = 2;
1535         }
1536     }
1537 
1538     // openjdk8/src/share/classes/java/awt/geom/AffineTransform.java
1539     private void foo57() {
1540         final int a = 1;
1541         double T01, T10;
1542         switch (a) {
1543             case 1:
1544                 break;
1545             case 9:
1546             case 11:
1547             case 12:
1548                 break;
1549             case 123:
1550             case 14:
1551                 break;
1552             case 1234:
1553             case 12345:
1554                 break;
1555             case 566:
1556             case 8678:
1557                 break;
1558             case 534:
1559             case 7968:
1560             case 86785678:
1561             case 86759789:
1562                 break;
1563             case 346547:
1564                 T01 =1;
1565                 T10 = 2;
1566                 break;
1567             case 432534523:
1568             case 5345235:
1569                 break;
1570             case 235345:
1571             case 523452345:
1572                 break;
1573             case 75675467:
1574                 break;
1575         }
1576         T01 = 21;
1577         T10 = 53;
1578     }
1579 
1580     // openjdk8/src/share/classes/java/awt/event/WindowEvent.java
1581     private void foo58() {
1582         final int a = 54;
1583         String typeStr;
1584         switch (a) {
1585             case 1:
1586                 typeStr = "WINDOW_OPENED";
1587                 break;
1588             case 2:
1589                 typeStr = "WINDOW_CLOSING";
1590                 break;
1591             case 3:
1592                 typeStr = "WINDOW_CLOSED";
1593                 break;
1594             case 4:
1595                 typeStr = "WINDOW_ICONIFIED";
1596                 break;
1597             case 5:
1598                 typeStr = "WINDOW_DEICONIFIED";
1599                 break;
1600             case 6:
1601                 typeStr = "WINDOW_ACTIVATED";
1602                 break;
1603             case 7:
1604                 typeStr = "WINDOW_DEACTIVATED";
1605                 break;
1606             case 8:
1607                 typeStr = "WINDOW_GAINED_FOCUS";
1608                 break;
1609             case 9:
1610                 typeStr = "WINDOW_LOST_FOCUS";
1611                 break;
1612             case 10:
1613                 typeStr = "WINDOW_STATE_CHANGED";
1614                 break;
1615             default:
1616                 typeStr = "unknown type";
1617         }
1618         typeStr += ",";
1619     }
1620 
1621     // openjdk8/src/share/classes/com/sun/tools/example/debug/tty/Commands.java
1622     private void foo59() {
1623         String spec;
1624         if (true) {
1625             spec = "";
1626         }
1627         if (true) {
1628             spec = "";
1629         }
1630     }
1631 
1632     // openjdk8/src/share/classes/com/sun/security/auth/callback/TextCallbackHandler.java
1633     private void foo60() throws Exception {
1634         final int a = 1;
1635         String text;
1636         switch (a) {
1637             case 1:
1638                 text = "";
1639                 break;
1640             case 2:
1641                 text = "Warning: ";
1642                 break;
1643             case 3:
1644                 text = "Error: ";
1645                 break;
1646             default:
1647                 throw new Exception();
1648         }
1649         final String message = "";
1650         if (message != null) {
1651             text += message;
1652         }
1653     }
1654 
1655     // openjdk8/src/share/classes/com/sun/net/ssl/SSLSecurity.java
1656     private void foo61() {
1657         String tmaw;
1658         if (true) {
1659             tmaw = "";
1660             for (int i = 0; i < 10; i++) {
1661                 if (true) {
1662                     if (true) {
1663                         tmaw = "";
1664                     }
1665                 }
1666                 else {
1667                     tmaw = "";
1668                 }
1669             }
1670             if (true) {
1671                 tmaw = "";
1672             }
1673         }
1674         else {
1675             tmaw = null;
1676         }
1677     }
1678 
1679     // openjdk8/src/share/classes/com/sun/jndi/dns/DnsContext.java
1680     private void foo62() {
1681         String znode;
1682         synchronized (this) {
1683             znode = "";
1684         }
1685         if (znode != null) {
1686             synchronized (znode) {
1687             }
1688             if (true) {
1689                 if (true) {
1690                     synchronized (znode) {
1691                         if (true) {
1692                         }
1693                         else if (true) {
1694                         }
1695                         else {
1696                             return;
1697                         }
1698                     }
1699                     if (true) {
1700                         return;
1701                     }
1702                 }
1703             }
1704         }
1705         synchronized (this) {
1706             znode = "";
1707         }
1708     }
1709 
1710     // openjdk8/src/share/classes/com/sun/java/swing/plaf/gtk/GTKColorType.java
1711     private void foo63() {
1712         float h;
1713         float l;
1714         float s;
1715         synchronized (this) {
1716             h = 1;
1717             l = 2;
1718             s = 3;
1719         }
1720         h = 4;
1721         l = 5;
1722         s = 6;
1723     }
1724 
1725     // openjdk8/src/macosx/classes/sun/lwawt/macosx/CInputMethod.java
1726     private void foo64() {
1727         int index;
1728         if (true) {
1729             index = 0;
1730         }
1731         else if (true) {
1732             index = 2;
1733         }
1734         else {
1735             return;
1736         }
1737         if (true) {
1738             index += 1;
1739         }
1740     }
1741 
1742     // apache-struts/core/.../mapper/DefaultActionMapper.java
1743     private void foo65() {
1744         String name;
1745         if (true) {
1746             name = "uri";
1747         }
1748         else if (true) {
1749             name = "";
1750         }
1751         else if (true) {
1752             name = "";
1753         }
1754         else {
1755             name = "";
1756         }
1757         if (true) {
1758             if (true) {
1759                 name = "";
1760             }
1761         }
1762     }
1763 
1764     // infinispan/remoting/transport/jgroups/JGroupsTransport.java
1765     private void foo66() {
1766         String cfg;
1767         if (true) {
1768             if (true) {
1769                 cfg = "";
1770             }
1771             if (true) {
1772                 cfg = "";
1773             }
1774             if (true) {
1775                 cfg = "";
1776             }
1777         }
1778     }
1779 
1780     // hibernate-core/.../internal/javassist/BytecodeProviderImpl.java
1781     private void foo67() {
1782         String fastClass;
1783         try {
1784             fastClass = "";
1785             if (true) {
1786                 if (fastClass == null) {
1787                 }
1788                 else {
1789                 }
1790             }
1791         }
1792         catch (Throwable t) {
1793             fastClass = null;
1794         }
1795     }
1796 
1797     // guava-mvnstyle/guava/src/com/google/common/net/InetAddresses.java
1798     private void foo68() {
1799         int partsLo;
1800         if (true) {
1801             partsLo = 1;
1802             if ( --partsLo != 0) {
1803                 return;
1804             }
1805             if (true) {
1806                 return;
1807             }
1808         }
1809         else {
1810             partsLo = 0;
1811         }
1812     }
1813 
1814     // guava-mvnstyle/guava/src/com/google/common/collect/TreeMultiset.java
1815     private void foo69() {
1816         String node;
1817         if (true) {
1818             node = "";
1819             if (node == null) {
1820                 return;
1821             }
1822             if (true) {
1823                 node = "";
1824             }
1825         }
1826         else {
1827             node = "";
1828         }
1829     }
1830 
1831     // guava-mvnstyle/guava/src/com/google/common/cache/LongAddables.java
1832     private void foo70() {
1833         String supplier;
1834         try {
1835             supplier = "";
1836         }
1837         catch (Throwable t) {
1838             supplier = "";
1839         }
1840     }
1841 
1842     // findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java
1843     private void foo71() {
1844         int priority;
1845         if (true) {
1846             priority = 1;
1847         }
1848         else if (true) {
1849             priority = 2;
1850         }
1851         else {
1852             return;
1853         }
1854         if (true) {
1855             priority++;
1856         }
1857         if (true) {
1858             priority++;
1859         }
1860     }
1861 
1862     // findbugs/src/java/edu/umd/cs/findbugs/ba/PruneUnconditionalExceptionThrowerEdges.java
1863     private void foo72() {
1864         String p;
1865         try {
1866             p = "";
1867         }
1868         catch (RuntimeException e) {
1869             p = "";
1870         }
1871     }
1872 
1873     // findbugs/eclipsePlugin/src/de/tobject/findbugs/actions/MarkerRulerAction.java
1874     private void foo73() {
1875         String control;
1876         if (true) {
1877             if (true) {
1878                 control = "";
1879                 if (control != null) {
1880                 }
1881             }
1882         }
1883         if (true) {
1884             if (true) {
1885             }
1886             if (true) {
1887                 control = "";
1888                 if (control != null) {
1889                 }
1890             }
1891         }
1892     }
1893 
1894     // findbugs/eclipsePlugin/src/de/tobject/findbugs/DetectorsExtensionHelper.java
1895     private void foo75() {
1896         String libPathAsString;
1897         try {
1898             libPathAsString = "";
1899             if (libPathAsString == null) {
1900             }
1901             libPathAsString = "";
1902             if (libPathAsString == null) {
1903             }
1904 
1905         } catch(Exception ex) {
1906 
1907         }
1908     }
1909 
1910     // findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java
1911     private void foo76() {
1912         int priority;
1913         if (true) {
1914             priority = 2;
1915         }
1916         else if (true) {
1917             priority = 3;
1918         }
1919         else {
1920             return;
1921         }
1922 
1923         if (true) {
1924             priority++;
1925         }
1926         if (true) {
1927             priority++;
1928         }
1929     }
1930 
1931     // elasticsearch/src/main/java/org/elasticsearch/index/search/child/ParentIdsFilter.java
1932     private void foo77() {
1933         if (true) {
1934             int docId;
1935             if (true) {
1936                 docId = 21;
1937                 if (docId != 1254) {
1938                 }
1939                 else {
1940                 }
1941             }
1942             else {
1943                 docId = 45234;
1944                 if (true) {
1945                 }
1946             }
1947             if (true) {
1948                 docId = 3213213;
1949             }
1950         }
1951     }
1952 
1953     // elasticsearch/src/main/java/org/elasticsearch/common/inject/internal/BindingBuilder.java
1954     private void foo78() {
1955         String injectionPoints;
1956         if (true) {
1957             try {
1958                 injectionPoints = "";
1959             }
1960             catch (Exception e) {
1961                 injectionPoints = "";
1962             }
1963         }
1964         else {
1965             injectionPoints = "";
1966         }
1967     }
1968 
1969     // apache-struts/core/.../dispatcher/mapper/DefaultActionMapper.java
1970     private void foo79() {
1971         String name;
1972         if (true) {
1973             name = "";
1974         }
1975         else if (true) {
1976             name = "";
1977         }
1978         else if (true) {
1979             name = "";
1980         }
1981         else {
1982             name = "";
1983         }
1984         if (true) {
1985             if (true) {
1986                 name = "";
1987             }
1988         }
1989     }
1990 
1991     // apache-ant/src/main/org/apache/tools/ant/types/PropertySet.java
1992     private void foo80() {
1993         String names;
1994         if (true) {
1995             names = "";
1996             if (true) {
1997                 names = "";
1998             }
1999         }
2000         else {
2001             names = "";
2002         }
2003     }
2004 
2005     // apache-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java
2006     private void foo81() {
2007         StringBuffer msg;
2008         synchronized (this) {
2009             msg = new StringBuffer("   [");
2010         }
2011         synchronized (this) {
2012             msg = new StringBuffer("   [");
2013         }
2014     }
2015 
2016     // Hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
2017     private void foo82() {
2018        String filesToCompact;
2019         try {
2020             synchronized (this) {
2021                 filesToCompact = "";
2022                 filesToCompact = "";
2023             }
2024         }
2025         finally {
2026         }
2027     }
2028 
2029     // Hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java
2030     private void foo83() {
2031         String key;
2032         if (true) {
2033             try {
2034                 key = "";
2035             }
2036             catch (Exception e) {
2037                 if (true) {
2038                     try {
2039                         key = "";
2040                     }
2041                     catch (Exception ex) {
2042                     }
2043                 }
2044             }
2045         }
2046         else {
2047             key = "";
2048         }
2049     }
2050 
2051     // Hbase/hbase-server/.../hadoop/hbase/regionserver/DefaultHeapMemoryTuner.java
2052     private void foo84() {
2053         float newMemstoreSize;
2054         float newBlockCacheSize;
2055         if (true) {
2056             newBlockCacheSize = 354;
2057             newMemstoreSize = 534;
2058         }
2059         else if (true) {
2060             newBlockCacheSize = 213213;
2061             newMemstoreSize = 53425;
2062         }
2063         else {
2064             return;
2065         }
2066         if (true) {
2067             newMemstoreSize = 2;
2068         }
2069         else if (true) {
2070             newMemstoreSize = 3;
2071         }
2072         if (true) {
2073             newBlockCacheSize = 354;
2074         }
2075         else if (true) {
2076             newBlockCacheSize = 14;
2077         }
2078     }
2079 
2080     // Hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/master/AssignmentManager.java
2081     private void foo85() {
2082         boolean needNewPlan;
2083         try {
2084             if (true) {
2085             }
2086             if (true) {
2087                 needNewPlan = true;
2088             }
2089             else {
2090                 if (true) {
2091                 }
2092                 return;
2093             }
2094         }
2095         catch (Throwable t) {
2096             if (t instanceof Object) {
2097             }
2098             if (true) {
2099                 if (true) {
2100                     if (t instanceof Object) {
2101                     }
2102                     else {
2103                     }
2104                 }
2105                 try {
2106                     needNewPlan = false;
2107                     if (true) {
2108                     }
2109                     else if (true) {
2110                         needNewPlan = true;
2111                     }
2112                 }
2113                 catch (Exception ie) {
2114                     return;
2115                 }
2116             }
2117             else if (true) {
2118                 needNewPlan = false;
2119             }
2120             else {
2121                 needNewPlan = true;
2122             }
2123         }
2124     }
2125 
2126     // Hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableRecordReaderImpl.java
2127     private void foo86() {
2128         String result;
2129         try {
2130             try {
2131                 result = "";
2132                 if (true) {
2133                     if (true) {
2134                     }
2135                 }
2136             }
2137             catch (Exception e) {
2138                 if (true) {
2139                 }
2140                 if (true) {
2141                 }
2142                 else {
2143                 }
2144                 result = "";
2145             }
2146         }
2147         catch (Exception ex) {
2148         }
2149     }
2150 
2151     // Hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
2152     private void foo87() {
2153         int count;
2154         if (true) {
2155             return;
2156         }
2157         try {
2158             count = 2;
2159         }
2160         catch (Exception ieo) {
2161             throw ieo;
2162         }
2163         catch (Error e) {
2164             count = -1;
2165         }
2166     }
2167 
2168     // Hbase/hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/RpcServer.java
2169     private void foo88() {
2170         String c;
2171         synchronized (this) {
2172             try {
2173                 c = "";
2174             }
2175             catch (Exception e) {
2176                 return;
2177             }
2178         }
2179         if (true) {
2180             if (true)
2181                 c = null;
2182         }
2183     }
2184 
2185     private void foo89() {
2186         final int a = 8;
2187         String b;
2188         switch (a) {
2189             case 8:
2190                 b = "b";
2191                 break;
2192             default:
2193                 b = "c";
2194                 break;
2195         }
2196     }
2197 
2198     private void foo90() {
2199         final int a = 8;
2200         String b;
2201         switch (a) {
2202             default:
2203                 b = "c";
2204         }
2205         b = "b";
2206     }
2207 
2208     private void foo91() {
2209         Integer[] s;
2210         if (true) {
2211             s = new Integer[0];
2212         } else {
2213             s = new Integer[5];
2214             if (true) {
2215                 final ArrayList<Integer> retain = new ArrayList<>();
2216                 for (final Integer c : s) {
2217                     if (true) {
2218                         retain.add(c);
2219                     }
2220                 }
2221                 s = retain.toArray(new Integer[retain.size()]);
2222             }
2223             if (true && s.length > 0) {
2224                 s = new Integer[] {s[0]};
2225             }
2226         }
2227         Arrays.toString(s);
2228     }
2229 
2230     // findbugs/src/java/edu/umd/cs/findbugs/ba/jsr305/TypeQualifierApplications.java
2231     private void foo92() {
2232         String tqa;
2233         if (true) {
2234             tqa = null;
2235             if (true) {
2236             }
2237         }
2238         else {
2239             if (true) {
2240             }
2241             tqa = "a";
2242             if (true) {
2243             }
2244             if (tqa == null) {
2245                 if (true) {
2246                 }
2247                 tqa = "b";
2248                 if (true) {
2249                     if (tqa == "abc") {
2250                     } else if (tqa != null) {
2251                     } else {
2252                     }
2253                 }
2254             }
2255             if (tqa == "bcd") {
2256                 tqa = null;
2257             }
2258             if (tqa == null) {
2259                 if (true) {
2260                     if (true) {
2261                     }
2262                 } else {
2263                     if (true) {
2264                     }
2265                     tqa = "c";
2266                     if (true) {
2267                     }
2268                 }
2269             }
2270         }
2271     }
2272 
2273     // hibernate-core/.../internal/util/collections/BoundedConcurrentHashMap.java
2274     private void foo93() {
2275         if (true) {
2276             String evictedCopy;
2277             if (true) {
2278                 final String evictedEntry = "a";
2279                 evictedCopy = evictedEntry;
2280             } else {
2281                 evictedCopy = "c";
2282                 for (int i = 0; i < 0; ++i) {
2283                     evictedCopy.trim();
2284                 }
2285                 evictedCopy = evictedCopy.trim();
2286             }
2287         }
2288     }
2289 
2290     // spring-framework/spring-core/src/main/java/org/springframework/core/Conventions.java
2291     private void foo94() {
2292         String valueClass;
2293         if (true) {
2294             valueClass = "a";
2295         }
2296         else if (true) {
2297             valueClass = "b";
2298             if (valueClass == null) {
2299                 if (true) {
2300                 }
2301                 if (true) {
2302                 }
2303                 valueClass = "c";
2304             }
2305         }
2306         else {
2307             valueClass = "d";
2308         }
2309     }
2310 
2311     // spring-framework/spring-test/.../springframework/test/annotation/ProfileValueUtils.java
2312     private void foo95() {
2313         String profileValueSource;
2314         if (true) {
2315             profileValueSource = "a";
2316         }
2317         else {
2318             try {
2319                 profileValueSource = "b";
2320             }
2321             catch (Exception e) {
2322                 if (true) {
2323                 }
2324                 profileValueSource = "c";
2325             }
2326         }
2327     }
2328 
2329     // spring-framework/spring-webmvc/.../method/annotation/RequestPartMethodArgumentResolver.java
2330     private void foo96() {
2331         Object arg;
2332         if (true) {
2333             arg = "a";
2334         }
2335         else if (true) {
2336             arg = "b";
2337         }
2338         else if (true) {
2339             arg = "c";
2340         }
2341         else if (true) {
2342             arg = "d";
2343         }
2344         else if (true) {
2345             arg = "e";
2346         }
2347         else if (true) {
2348             arg = "f";
2349         }
2350         else {
2351             try {
2352                 arg = "g";
2353                 if (arg != null) {
2354                     if (true) {
2355                     }
2356                 }
2357             }
2358             catch (Exception ex) {
2359                 arg = null;
2360             }
2361         }
2362     }
2363 
2364     // infinispan/commons/.../concurrent/jdk8backported/BoundedEquivalentConcurrentHashMapV8.java
2365     private void foo97() {
2366         if (true) {
2367             String evictedCopy;
2368             if (true) {
2369                 evictedCopy = "b";
2370             } else {
2371                 evictedCopy = "c";
2372                 for (int i = 0; i < 0; ++i) {
2373                 }
2374                 evictedCopy = "d";
2375             }
2376         }
2377     }
2378 
2379     // infinispan/core/src/main/java/org/infinispan/util/concurrent/BoundedConcurrentHashMap.java
2380     private void foo98() {
2381         if (true) {
2382             String evictedCopy;
2383             if (true) {
2384                 evictedCopy = "b";
2385             } else {
2386                 evictedCopy = "c";
2387                 for (int i = 0; i < 0; ++i) {
2388                 }
2389                 evictedCopy = "d";
2390             }
2391         }
2392     }
2393 
2394     // infinispan/persistence/soft-index/.../infinispan/persistence/sifs/IndexNode.java
2395     private void foo99() {
2396         int insertionPoint;
2397         if (true) {
2398             insertionPoint = 0;
2399         } else if (true) {
2400             insertionPoint = 1;
2401         } else {
2402             insertionPoint = 2;
2403             if (insertionPoint < 0) {
2404                 insertionPoint = -insertionPoint - 1;
2405             } else {
2406                 insertionPoint++;
2407             }
2408         }
2409     }
2410 
2411     // apache-struts/core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
2412     private void foo100() {
2413         String result;
2414         if (true) {
2415             result = "a";
2416         } else {
2417             result = "b";
2418             if (result != null) {
2419             }
2420             result = "c";
2421         }
2422     }
2423 }