Code Duplication    Length = 77-79 lines in 4 locations

src/main/java/it/cnr/istc/pst/platinum/ai/lang/ddl/v3/parser/ddl3Parser.java 4 locations

@@ 2895-2973 (lines=79) @@
2892
				}
2893
				else if ( (LA9_2==54) ) {
2894
					int LA9_4 = input.LA(3);
2895
					if ( (LA9_4==13) ) {
2896
						int LA9_11 = input.LA(4);
2897
						if ( (LA9_11==VarID) ) {
2898
							switch ( input.LA(5) ) {
2899
							case 22:
2900
								{
2901
								alt9=1;
2902
								}
2903
								break;
2904
							case 20:
2905
								{
2906
								alt9=2;
2907
								}
2908
								break;
2909
							case 23:
2910
								{
2911
								alt9=3;
2912
								}
2913
								break;
2914
							case 21:
2915
								{
2916
								alt9=4;
2917
								}
2918
								break;
2919
							case 24:
2920
								{
2921
								alt9=5;
2922
								}
2923
								break;
2924
							case 10:
2925
								{
2926
								alt9=6;
2927
								}
2928
								break;
2929
							default:
2930
								if (state.backtracking>0) {state.failed=true; return retval;}
2931
								int nvaeMark = input.mark();
2932
								try {
2933
									for (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {
2934
										input.consume();
2935
									}
2936
									NoViableAltException nvae =
2937
										new NoViableAltException("", 9, 12, input);
2938
									throw nvae;
2939
								} finally {
2940
									input.rewind(nvaeMark);
2941
								}
2942
							}
2943
						}
2944
2945
						else {
2946
							if (state.backtracking>0) {state.failed=true; return retval;}
2947
							int nvaeMark = input.mark();
2948
							try {
2949
								for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
2950
									input.consume();
2951
								}
2952
								NoViableAltException nvae =
2953
									new NoViableAltException("", 9, 11, input);
2954
								throw nvae;
2955
							} finally {
2956
								input.rewind(nvaeMark);
2957
							}
2958
						}
2959
2960
					}
2961
2962
					else {
2963
						if (state.backtracking>0) {state.failed=true; return retval;}
2964
						int nvaeMark = input.mark();
2965
						try {
2966
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
2967
								input.consume();
2968
							}
2969
							NoViableAltException nvae =
2970
								new NoViableAltException("", 9, 4, input);
2971
							throw nvae;
2972
						} finally {
2973
							input.rewind(nvaeMark);
2974
						}
2975
					}
2976
@@ 2810-2888 (lines=79) @@
2807
				int LA9_2 = input.LA(2);
2808
				if ( (LA9_2==INT) ) {
2809
					int LA9_3 = input.LA(3);
2810
					if ( (LA9_3==13) ) {
2811
						int LA9_11 = input.LA(4);
2812
						if ( (LA9_11==VarID) ) {
2813
							switch ( input.LA(5) ) {
2814
							case 22:
2815
								{
2816
								alt9=1;
2817
								}
2818
								break;
2819
							case 20:
2820
								{
2821
								alt9=2;
2822
								}
2823
								break;
2824
							case 23:
2825
								{
2826
								alt9=3;
2827
								}
2828
								break;
2829
							case 21:
2830
								{
2831
								alt9=4;
2832
								}
2833
								break;
2834
							case 24:
2835
								{
2836
								alt9=5;
2837
								}
2838
								break;
2839
							case 10:
2840
								{
2841
								alt9=6;
2842
								}
2843
								break;
2844
							default:
2845
								if (state.backtracking>0) {state.failed=true; return retval;}
2846
								int nvaeMark = input.mark();
2847
								try {
2848
									for (int nvaeConsume = 0; nvaeConsume < 5 - 1; nvaeConsume++) {
2849
										input.consume();
2850
									}
2851
									NoViableAltException nvae =
2852
										new NoViableAltException("", 9, 12, input);
2853
									throw nvae;
2854
								} finally {
2855
									input.rewind(nvaeMark);
2856
								}
2857
							}
2858
						}
2859
2860
						else {
2861
							if (state.backtracking>0) {state.failed=true; return retval;}
2862
							int nvaeMark = input.mark();
2863
							try {
2864
								for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
2865
									input.consume();
2866
								}
2867
								NoViableAltException nvae =
2868
									new NoViableAltException("", 9, 11, input);
2869
								throw nvae;
2870
							} finally {
2871
								input.rewind(nvaeMark);
2872
							}
2873
						}
2874
2875
					}
2876
2877
					else {
2878
						if (state.backtracking>0) {state.failed=true; return retval;}
2879
						int nvaeMark = input.mark();
2880
						try {
2881
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
2882
								input.consume();
2883
							}
2884
							NoViableAltException nvae =
2885
								new NoViableAltException("", 9, 3, input);
2886
							throw nvae;
2887
						} finally {
2888
							input.rewind(nvaeMark);
2889
						}
2890
					}
2891
@@ 3082-3158 (lines=77) @@
3079
			case 54:
3080
				{
3081
				int LA9_4 = input.LA(2);
3082
				if ( (LA9_4==13) ) {
3083
					int LA9_11 = input.LA(3);
3084
					if ( (LA9_11==VarID) ) {
3085
						switch ( input.LA(4) ) {
3086
						case 22:
3087
							{
3088
							alt9=1;
3089
							}
3090
							break;
3091
						case 20:
3092
							{
3093
							alt9=2;
3094
							}
3095
							break;
3096
						case 23:
3097
							{
3098
							alt9=3;
3099
							}
3100
							break;
3101
						case 21:
3102
							{
3103
							alt9=4;
3104
							}
3105
							break;
3106
						case 24:
3107
							{
3108
							alt9=5;
3109
							}
3110
							break;
3111
						case 10:
3112
							{
3113
							alt9=6;
3114
							}
3115
							break;
3116
						default:
3117
							if (state.backtracking>0) {state.failed=true; return retval;}
3118
							int nvaeMark = input.mark();
3119
							try {
3120
								for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
3121
									input.consume();
3122
								}
3123
								NoViableAltException nvae =
3124
									new NoViableAltException("", 9, 12, input);
3125
								throw nvae;
3126
							} finally {
3127
								input.rewind(nvaeMark);
3128
							}
3129
						}
3130
					}
3131
3132
					else {
3133
						if (state.backtracking>0) {state.failed=true; return retval;}
3134
						int nvaeMark = input.mark();
3135
						try {
3136
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
3137
								input.consume();
3138
							}
3139
							NoViableAltException nvae =
3140
								new NoViableAltException("", 9, 11, input);
3141
							throw nvae;
3142
						} finally {
3143
							input.rewind(nvaeMark);
3144
						}
3145
					}
3146
3147
				}
3148
3149
				else {
3150
					if (state.backtracking>0) {state.failed=true; return retval;}
3151
					int nvaeMark = input.mark();
3152
					try {
3153
						input.consume();
3154
						NoViableAltException nvae =
3155
							new NoViableAltException("", 9, 4, input);
3156
						throw nvae;
3157
					} finally {
3158
						input.rewind(nvaeMark);
3159
					}
3160
				}
3161
@@ 2997-3073 (lines=77) @@
2994
			case INT:
2995
				{
2996
				int LA9_3 = input.LA(2);
2997
				if ( (LA9_3==13) ) {
2998
					int LA9_11 = input.LA(3);
2999
					if ( (LA9_11==VarID) ) {
3000
						switch ( input.LA(4) ) {
3001
						case 22:
3002
							{
3003
							alt9=1;
3004
							}
3005
							break;
3006
						case 20:
3007
							{
3008
							alt9=2;
3009
							}
3010
							break;
3011
						case 23:
3012
							{
3013
							alt9=3;
3014
							}
3015
							break;
3016
						case 21:
3017
							{
3018
							alt9=4;
3019
							}
3020
							break;
3021
						case 24:
3022
							{
3023
							alt9=5;
3024
							}
3025
							break;
3026
						case 10:
3027
							{
3028
							alt9=6;
3029
							}
3030
							break;
3031
						default:
3032
							if (state.backtracking>0) {state.failed=true; return retval;}
3033
							int nvaeMark = input.mark();
3034
							try {
3035
								for (int nvaeConsume = 0; nvaeConsume < 4 - 1; nvaeConsume++) {
3036
									input.consume();
3037
								}
3038
								NoViableAltException nvae =
3039
									new NoViableAltException("", 9, 12, input);
3040
								throw nvae;
3041
							} finally {
3042
								input.rewind(nvaeMark);
3043
							}
3044
						}
3045
					}
3046
3047
					else {
3048
						if (state.backtracking>0) {state.failed=true; return retval;}
3049
						int nvaeMark = input.mark();
3050
						try {
3051
							for (int nvaeConsume = 0; nvaeConsume < 3 - 1; nvaeConsume++) {
3052
								input.consume();
3053
							}
3054
							NoViableAltException nvae =
3055
								new NoViableAltException("", 9, 11, input);
3056
							throw nvae;
3057
						} finally {
3058
							input.rewind(nvaeMark);
3059
						}
3060
					}
3061
3062
				}
3063
3064
				else {
3065
					if (state.backtracking>0) {state.failed=true; return retval;}
3066
					int nvaeMark = input.mark();
3067
					try {
3068
						input.consume();
3069
						NoViableAltException nvae =
3070
							new NoViableAltException("", 9, 3, input);
3071
						throw nvae;
3072
					} finally {
3073
						input.rewind(nvaeMark);
3074
					}
3075
				}
3076