The following document contains the results of PMD 5.3.2.

Files

tint-digimorph-annotator - eu/fbk/dh/tint/digimorph/annotator/DigiCompMorphAnnotator.java

Violation Line
The class 'DigiCompMorphAnnotator' has a Cyclomatic Complexity of 4 (Highest = 10). 1665
The method 'annotate' has a Cyclomatic Complexity of 10. 1944
Parameter 'annotation' is not assigned and could be declared final 19
Local variable 'sentence' could be declared final 21
Local variable 'tokens' could be declared final 22
Local variable 'c' could be declared final 23
Local variable 'morph_fatures' could be declared final 24
Local variable 'lemma' could be declared final 25
Avoid instantiating new objects inside loops 27
Local variable 'comps' could be declared final 27
Local variable 'm' could be declared final 28
Avoid instantiating new objects inside loops 38

tint-digimorph-annotator - eu/fbk/dh/tint/digimorph/annotator/DigiLemmaAnnotator.java

Violation Line
The class 'DigiLemmaAnnotator' has a Standard Cyclomatic Complexity of 8 (Highest = 29). 23261
The class 'DigiLemmaAnnotator' has a Cyclomatic Complexity of 12 (Highest = 40). 23261
The class 'DigiLemmaAnnotator' has a Modified Cyclomatic Complexity of 8 (Highest = 29). 23261
Private field 'extractFeatures' could be made final; it is only initialized in the declaration or constructor. 30
Private field 'useGuesser' could be made final; it is only initialized in the declaration or constructor. 30
Parameter 'prop' is not assigned and could be declared final 81
Parameter 'annotatorName' is not assigned and could be declared final 81
The method 'annotate' has a Standard Cyclomatic Complexity of 29. 91236
The method 'annotate' has a Cyclomatic Complexity of 40. 91236
The method 'annotate' has a Modified Cyclomatic Complexity of 29. 91236
Parameter 'annotation' is not assigned and could be declared final 91
The method annotate() has an NPath complexity of 57483 91236
Avoid really long methods. 91236
Local variable 'sentence' could be declared final 93
Local variable 'tokens' could be declared final 98
Local variable 'token' could be declared final 99
Local variable 'morph_fatures' could be declared final 102
Local variable 'pos' could be declared final 103
Local variable 'isGuessable' could be declared final 104
Useless parentheses. 113
These nested if statements could be combined 122208
Local variable 'finalMorpho' could be declared final 127
Position literals first in String comparisons 129
Deeply nested if..then statements are hard to read 130134
Local variable 'featMapped' could be declared final 137
Local variable 'shouldBeGuessed' could be declared final 138
Local variable 'guess' could be declared final 141
Local variable 'featMapped' could be declared final 156
Local variable 'feature' could be declared final 162
Deeply nested if..then statements are hard to read 164166
Position literals first in String comparisons 168
Position literals first in String comparisons 168
Deeply nested if..then statements are hard to read 169173
Position literals first in String comparisons 176
Position literals first in String comparisons 178
Local variable 'guess' could be declared final 212

tint-digimorph-annotator - eu/fbk/dh/tint/digimorph/annotator/DigiMorphAnnotator.java

Violation Line
Parameter 'annotatorName' is not assigned and could be declared final 21
Parameter 'prop' is not assigned and could be declared final 21
Local variable 'model_path' could be declared final 22
Parameter 'annotation' is not assigned and could be declared final 26
Local variable 'sentence' could be declared final 31
Local variable 'tokens' could be declared final 32
Local variable 'c' could be declared final 33
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 41
Local variable 'sentence' could be declared final 42
Local variable 'tokens' could be declared final 43
Local variable 'c' could be declared final 44

tint-digimorph-annotator - eu/fbk/dh/tint/digimorph/annotator/DigiMorphModel.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 820
Parameter 'model_path' is not assigned and could be declared final 12
Singleton is not thread safe 1315

tint-digimorph-annotator - eu/fbk/dh/tint/digimorph/annotator/GuessModel.java

Violation Line
Possible God class (WMC=75, ATFD=13, TCC=0.0) 1338
The class 'GuessModel' has a Cyclomatic Complexity of 8 (Highest = 35). 18338
The class 'GuessModel' has a Standard Cyclomatic Complexity of 7 (Highest = 35). 18338
The class 'GuessModel' has a Modified Cyclomatic Complexity of 5 (Highest = 12). 18338
Parameter 'lemma' is not assigned and could be declared final 34
Parameter 'form' is not assigned and could be declared final 34
Parameter 'feats' is not assigned and could be declared final 34
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 41
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 48
Avoid unused private fields such as 'LOGGER'. 48
Private field 'allowedTags' could be made final; it is only initialized in the declaration or constructor. 49
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 49
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 50
Private field 'trees' could be made final; it is only initialized in the declaration or constructor. 50
Private field 'featMappings' could be made final; it is only initialized in the declaration or constructor. 51
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 51
Parameter 'featString' is not assigned and could be declared final 53
Parameter 'set' is not assigned and could be declared final 59
Parameter 'sex' is not assigned and could be declared final 59
Position literals first in String comparisons 60
Position literals first in String comparisons 62
Parameter 'set' is not assigned and could be declared final 67
Parameter 'num' is not assigned and could be declared final 67
Position literals first in String comparisons 68
Position literals first in String comparisons 70
Parameter 'set' is not assigned and could be declared final 75
Parameter 'pers' is not assigned and could be declared final 75
Position literals first in String comparisons 76
Position literals first in String comparisons 76
Position literals first in String comparisons 76
Parameter 'type' is not assigned and could be declared final 81
Parameter 'set' is not assigned and could be declared final 81
Position literals first in String comparisons 82
Position literals first in String comparisons 85
The method 'getMorphoFeats' has a Cyclomatic Complexity of 35. 90220
Parameter 'pos' is not assigned and could be declared final 90
Parameter 'featString' is not assigned and could be declared final 90
The method getMorphoFeats() has an NPath complexity of 1566 90220
The method 'getMorphoFeats' has a Modified Cyclomatic Complexity of 11. 90220
The method getMorphoFeats() has an NCSS line count of 116 90220
Avoid really long methods. 90220
The method 'getMorphoFeats' has a Standard Cyclomatic Complexity of 35. 90220
Local variable 'featureSet' could be declared final 91
Local variable 'parts' could be declared final 92
Switch statements should have a default label 94122
Switch statements should have a default label 124205
Switch statements should have a default label 154163
Local variable 'buffer' could be declared final 207
Local variable 's' could be declared final 209
Avoid appending characters as strings in StringBuffer.append. 212
Avoid appending characters as strings in StringBuffer.append. 216
The constructor 'GuessModel' has a Standard Cyclomatic Complexity of 12. 222295
The constructor 'GuessModel' has a Cyclomatic Complexity of 12. 222295
The constructor 'GuessModel' has a Modified Cyclomatic Complexity of 12. 222295
Local variable 'uMap' could be declared final 224
Local variable 'adjResource' could be declared final 234
Local variable 'parts' could be declared final 241
Local variable 'allowedTag' could be declared final 252
Avoid instantiating new objects inside loops 253
Local variable 'digiMorph' could be declared final 256
Local variable 'map' could be declared final 257
Local variable 'gmIterator' could be declared final 258
Local variable 'key' could be declared final 260
Local variable 'value' could be declared final 261
Local variable 'words' could be declared final 262
Local variable 'word' could be declared final 263
Local variable 'parts' could be declared final 264
Local variable 'ePos' could be declared final 269
Local variable 'feats' could be declared final 278
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 283
Local variable 'token' could be declared final 283
Local variable 'lemma' could be declared final 284
Local variable 'reverse_token' could be declared final 285
Avoid instantiating new objects inside loops 285
Local variable 'features' could be declared final 287
Avoid instantiating new objects inside loops 287
Parameter 'token' is not assigned and could be declared final 297
Parameter 'pos' is not assigned and could be declared final 297
Local variable 'reverse_sample_query' could be declared final 298
Local variable 'values' could be declared final 299
Local variable 'closestForms' could be declared final 300
Local variable 's' could be declared final 301
Local variable 'guess' could be declared final 305
Local variable 'closestForm' could be declared final 307
Local variable 'feat' could be declared final 308
Local variable 'lemma' could be declared final 310
Local variable 'form' could be declared final 311
Local variable 'min' could be declared final 313
Local variable 'charForm' could be declared final 316
Local variable 'charLemma' could be declared final 317
Local variable 'postfix' could be declared final 319
Local variable 'length' could be declared final 320
Local variable 'prefix' could be declared final 321
Parameter 'args' is not assigned and could be declared final 333
Consider using varargs for methods or constructors which take an array the last parameter. 333
Local variable 'model' could be declared final 334

tint-digimorph-annotator - eu/fbk/dh/tint/digimorph/annotator/GuessModelInstance.java

Violation Line
A class which only has private constructors should be final 1032
Private field 'model' could be made final; it is only initialized in the declaration or constructor. 13
Singleton is not thread safe 2224

tint-digimorph-annotator - eu/fbk/dh/tint/digimorph/annotator/ModelHelper.java

Violation Line
The class 'ModelHelper' has a Modified Cyclomatic Complexity of 21 (Highest = 20). 19166
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 19166
The class 'ModelHelper' has a Cyclomatic Complexity of 21 (Highest = 20). 19166
The class 'ModelHelper' has a Standard Cyclomatic Complexity of 21 (Highest = 20). 19166
Avoid unused private fields such as 'LOGGER'. 21
The method 'main' has a Standard Cyclomatic Complexity of 20. 23165
The method main() has an NPath complexity of 6720 23165
Consider using varargs for methods or constructors which take an array the last parameter. 23
The method 'main' has a Modified Cyclomatic Complexity of 20. 23165
Parameter 'args' is not assigned and could be declared final 23
Avoid really long methods. 23165
The method 'main' has a Cyclomatic Complexity of 20. 23165
Local variable 'conllFile' could be declared final 25
Local variable 'detAdj' could be declared final 27
Local variable 'adjResource' could be declared final 28
Local variable 'digiMorph' could be declared final 42
Local variable 'formToFeats' could be declared final 43
Local variable 'formToForms' could be declared final 44
Local variable 'reader' could be declared final 48
Local variable 'forms' could be declared final 50
Local variable 'feats' could be declared final 51
This call to String.startsWith can be rewritten using String.charAt(0) 56
Local variable 'parts' could be declared final 60
Local variable 'morpho' could be declared final 69
Local variable 'mor' could be declared final 72
Local variable 'fea' could be declared final 73
Local variable 'form' could be declared final 74
Local variable 'words' could be declared final 76
Local variable 'word' could be declared final 80
Local variable 'parts' could be declared final 81
Avoid instantiating new objects inside loops 94
Avoid instantiating new objects inside loops 96
Avoid instantiating new objects inside loops 97
Local variable 'uMap' could be declared final 108
Local variable 'featsList' could be declared final 114
Local variable 'map' could be declared final 117
Local variable 'gmIterator' could be declared final 118
Local variable 'key' could be declared final 120
Local variable 'value' could be declared final 121
Local variable 'words' could be declared final 122
Local variable 'word' could be declared final 123
Local variable 'parts' could be declared final 124
Local variable 'ePos' could be declared final 129
Local variable 'feats' could be declared final 151
Local variable 'mostFrequent' could be declared final 154

tint-digimorph - eu/fbk/dh/tint/digimorph/DigiMorph.java

Violation Line
Avoid using redundant field initializer for 'executor' 29
Avoid using redundant field initializer for 'futures' 30
Avoid using redundant field initializer for 'volume' 33
Avoid using redundant field initializer for 'map' 34
Avoid reassigning parameters such as 'model_path' 50
Local variable 'file' could be declared final 53
Local variable 'bytes' could be declared final 55
Use block level rather than method level synchronization 80123
Parameter 'token_list' is not assigned and could be declared final 80
Local variable 'results' could be declared final 81
Local variable 'threadsNumber' could be declared final 82
Useless parentheses. 83
Local variable 'parts' could be declared final 83
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 85
Avoid instantiating new objects inside loops 95
Local variable 'future' could be declared final 111
Local variable 'stringList' could be declared final 112
Parameter 'csv_path' is not assigned and could be declared final 134
Parameter 'output' is not assigned and could be declared final 134
Parameter 'include_lemma' is not assigned and could be declared final 134
Local variable 'volume' could be declared final 138
Local variable 'sink' could be declared final 139147
Local variable 'map' could be declared final 149
Local variable 'in' could be declared final 151
Local variable 'records' could be declared final 152
Local variable 'record' could be declared final 153
Local variable 'feature' could be declared final 155
Local variable 'forma' could be declared final 157
Local variable 'e' could be declared final 172
Local variable 'stmap' could be declared final 180
Avoid unused local variables such as 'stmap'. 180

tint-digimorph - eu/fbk/dh/tint/digimorph/DigiMorph_Analizer.java

Violation Line
The class 'DigiMorph_Analizer' has a Standard Cyclomatic Complexity of 10 (Highest = 32). 15252
The class 'DigiMorph_Analizer' has a Cyclomatic Complexity of 12 (Highest = 37). 15252
The class 'DigiMorph_Analizer' has a Modified Cyclomatic Complexity of 10 (Highest = 32). 15252
Private field 'map' could be made final; it is only initialized in the declaration or constructor. 18
Avoid using redundant field initializer for 'map' 18
Non-static initializers are confusing 2237
Private field 'prefix' could be made final; it is only initialized in the declaration or constructor. 22
Private field 'suffix' could be made final; it is only initialized in the declaration or constructor. 39
Non-static initializers are confusing 3955
Non-static initializers are confusing 5866
Private field 'middle_suffix' could be made final; it is only initialized in the declaration or constructor. 58
Parameter 'tokens' is not assigned and could be declared final 68
Parameter 'map' is not assigned and could be declared final 68
Local variable 'results' could be declared final 74
Local variable 's' could be declared final 75
Avoid reassigning parameters such as 'token' 81
Local variable 'original_token' could be declared final 82
Local variable 'no_prefix_phase' could be declared final 84
Local variable 'p' could be declared final 86
Local variable 'prefix_phase' could be declared final 89
Local variable 'prefisso' could be declared final 91
Avoid unused local variables such as 'prefisso'. 91
The method 'process_token' has a Cyclomatic Complexity of 37. 109250
The method 'process_token' has a Modified Cyclomatic Complexity of 32. 109250
Avoid reassigning parameters such as 'token' 109
Avoid really long methods. 109250
The method 'process_token' has a Standard Cyclomatic Complexity of 32. 109250
The method process_token() has an NPath complexity of 187056040 109250
Local variable 'orginal_token' could be declared final 110
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 111
Local variable 'out_buffer' could be declared final 112
Local variable 'basic_result' could be declared final 113
Local variable 'suf' could be declared final 128
Local variable 'suf' could be declared final 138
Local variable 'possible_suffix' could be declared final 148
Avoid unused local variables such as 'ends_with_double'. 152
Local variable 'ends_with_double' could be declared final 152
Useless parentheses. 167
Useless parentheses. 176
Prefer StringBuffer over += for concatenating strings 180
Useless parentheses. 183
Avoid unused local variables such as 'suf'. 188
Local variable 'suf' could be declared final 188
Avoid unused local variables such as 'mid_suf'. 189
Local variable 'mid_suf' could be declared final 189
Local variable 'verb_items' could be declared final 190
Local variable 'suffix_items' could be declared final 191
Local variable 'mid_suffix_items' could be declared final 192
Local variable 'infiniti' could be declared final 194
Local variable 'mid_suff' could be declared final 195
Local variable 'suff' could be declared final 196
Local variable 'v' could be declared final 200
Prefer StringBuffer over += for concatenating strings 203
Local variable 'f' could be declared final 207
Local variable 'f' could be declared final 212
Local variable 'lists' could be declared final 217
Local variable 'results' could be declared final 222
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 225
Local variable 'verb_hypernym' could be declared final 226
Local variable 'object_hypernym' could be declared final 227
Local variable 'subject_hypernym' could be declared final 228
Local variable 'verb_hypernym' could be declared final 234
Local variable 'subject_hypernym' could be declared final 235

tint-digimorph - eu/fbk/dh/tint/digimorph/Main.java

Violation Line
The class 'Main' has a Cyclomatic Complexity of 4 (Highest = 10). 1280
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1280
Avoid unused private methods such as 'printUsage(Options)'. 14
Parameter 'opt' is not assigned and could be declared final 14
Local variable 'formatter' could be declared final 15
Parameter 'filepath' is not assigned and could be declared final 21
Parameter 'outputPath' is not assigned and could be declared final 21
Parameter 'include_lemma' is not assigned and could be declared final 21
Parameter 'args' is not assigned and could be declared final 26
Consider using varargs for methods or constructors which take an array the last parameter. 26
The method 'main' has a Cyclomatic Complexity of 10. 2679
Unnecessary use of fully qualified name 'eu.fbk.utils.core.CommandLine.parser' due to existing import 'eu.fbk.utils.core.CommandLine' 2930
Unnecessary use of fully qualified name 'eu.fbk.utils.core.CommandLine' due to existing import 'eu.fbk.utils.core.CommandLine' 29
Local variable 'retrainInputFile' could be declared final 46
Local variable 'retrainOutputFile' could be declared final 47
Local variable 'lemma' could be declared final 48
Local variable 'text' could be declared final 62
Local variable 'scanner' could be declared final 63
Local variable 'dm' could be declared final 73
Local variable 's' could be declared final 75

tint-eval - eu/fbk/dh/tint/eval/morpho/AnnotateLemma.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2488
Avoid unused private fields such as 'LOGGER'. 26
Parameter 'args' is not assigned and could be declared final 28
Consider using varargs for methods or constructors which take an array the last parameter. 28
Local variable 'input' could be declared final 40
Local variable 'output' could be declared final 41
Local variable 'text' could be declared final 43
Local variable 'writer' could be declared final 44
Local variable 'props' could be declared final 46
Local variable 'ITApipeline' could be declared final 61
Local variable 'annotation' could be declared final 62
Local variable 'sents' could be declared final 67
Local variable 'thisSent' could be declared final 68
Local variable 'tokens' could be declared final 69
Local variable 'token' could be declared final 70

tint-eval - eu/fbk/dh/tint/eval/morpho/TextProEvaluation.java

Violation Line
The class 'TextProEvaluation' has a Modified Cyclomatic Complexity of 12 (Highest = 11). 1696
The class 'TextProEvaluation' has a Cyclomatic Complexity of 12 (Highest = 11). 1696
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1696
The class 'TextProEvaluation' has a Standard Cyclomatic Complexity of 12 (Highest = 11). 1696
Avoid unused private fields such as 'LOGGER'. 18
Consider using varargs for methods or constructors which take an array the last parameter. 22
The method 'main' has a Standard Cyclomatic Complexity of 11. 2295
Parameter 'args' is not assigned and could be declared final 22
The method 'main' has a Cyclomatic Complexity of 11. 2295
The method 'main' has a Modified Cyclomatic Complexity of 11. 2295
Local variable 'guessed' could be declared final 34
Local variable 'gold' could be declared final 35
Local variable 'guesses' could be declared final 37
Local variable 'trueLabels' could be declared final 38
Local variable 'pos' could be declared final 55
This call to String.startsWith can be rewritten using String.charAt(0) 58
This call to String.startsWith can be rewritten using String.charAt(0) 60
This call to String.startsWith can be rewritten using String.charAt(0) 62
This call to String.startsWith can be rewritten using String.charAt(0) 64
Position literals first in String comparisons 68

tint-eval - eu/fbk/dh/tint/eval/morpho/TintEvaluation.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1696
The class 'TintEvaluation' has a Cyclomatic Complexity of 12 (Highest = 11). 1696
The class 'TintEvaluation' has a Standard Cyclomatic Complexity of 12 (Highest = 11). 1696
The class 'TintEvaluation' has a Modified Cyclomatic Complexity of 12 (Highest = 11). 1696
Avoid unused private fields such as 'LOGGER'. 18
The method 'main' has a Cyclomatic Complexity of 11. 2295
Consider using varargs for methods or constructors which take an array the last parameter. 22
The method 'main' has a Modified Cyclomatic Complexity of 11. 2295
The method 'main' has a Standard Cyclomatic Complexity of 11. 2295
Parameter 'args' is not assigned and could be declared final 22
Local variable 'guessed' could be declared final 34
Local variable 'gold' could be declared final 35
Local variable 'guesses' could be declared final 37
Local variable 'trueLabels' could be declared final 38
Local variable 'pos' could be declared final 55
This call to String.startsWith can be rewritten using String.charAt(0) 58
This call to String.startsWith can be rewritten using String.charAt(0) 60
This call to String.startsWith can be rewritten using String.charAt(0) 62
This call to String.startsWith can be rewritten using String.charAt(0) 64
Position literals first in String comparisons 68

tint-eval - eu/fbk/dh/tint/eval/morpho/TreeTaggerEvaluation.java

Violation Line
The class 'TreeTaggerEvaluation' has a Modified Cyclomatic Complexity of 12 (Highest = 11). 1696
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1696
The class 'TreeTaggerEvaluation' has a Cyclomatic Complexity of 12 (Highest = 11). 1696
The class 'TreeTaggerEvaluation' has a Standard Cyclomatic Complexity of 12 (Highest = 11). 1696
Avoid unused private fields such as 'LOGGER'. 18
The method 'main' has a Modified Cyclomatic Complexity of 11. 2295
Consider using varargs for methods or constructors which take an array the last parameter. 22
The method 'main' has a Cyclomatic Complexity of 11. 2295
The method 'main' has a Standard Cyclomatic Complexity of 11. 2295
Parameter 'args' is not assigned and could be declared final 22
Local variable 'guessed' could be declared final 34
Local variable 'gold' could be declared final 35
Local variable 'guesses' could be declared final 37
Local variable 'trueLabels' could be declared final 38
Local variable 'pos' could be declared final 55
This call to String.startsWith can be rewritten using String.charAt(0) 58
This call to String.startsWith can be rewritten using String.charAt(0) 60
This call to String.startsWith can be rewritten using String.charAt(0) 62
This call to String.startsWith can be rewritten using String.charAt(0) 64
Position literals first in String comparisons 68

tint-eval - eu/fbk/dh/tint/eval/ner/PairEvaluation.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1889
The class 'PairEvaluation' has a Standard Cyclomatic Complexity of 10 (Highest = 9). 1889
The class 'PairEvaluation' has a Modified Cyclomatic Complexity of 10 (Highest = 9). 1889
The class 'PairEvaluation' has a Cyclomatic Complexity of 10 (Highest = 9). 1889
Parameter 'args' is not assigned and could be declared final 22
Consider using varargs for methods or constructors which take an array the last parameter. 22
Local variable 'guessed' could be declared final 34
Local variable 'gold' could be declared final 35
Local variable 'guesses' could be declared final 37
Local variable 'trueLabels' could be declared final 38
Local variable 'tReader' could be declared final 40
Local variable 'gReader' could be declared final 41
This call to String.startsWith can be rewritten using String.charAt(0) 47
Local variable 'parts' could be declared final 50
Position literals first in String comparisons 57
Local variable 'parts' could be declared final 66
Local variable 'ner' could be declared final 71
Local variable 'stats' could be declared final 79

tint-eval - eu/fbk/dh/tint/eval/ner/TanlEvaluation.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 18137
The class 'TanlEvaluation' has a Modified Cyclomatic Complexity of 15 (Highest = 14). 18137
The class 'TanlEvaluation' has a Standard Cyclomatic Complexity of 17 (Highest = 16). 18137
The class 'TanlEvaluation' has a Cyclomatic Complexity of 17 (Highest = 16). 18137
Avoid unused private fields such as 'LOGGER'. 20
The method 'main' has a Standard Cyclomatic Complexity of 16. 22136
Parameter 'args' is not assigned and could be declared final 22
Consider using varargs for methods or constructors which take an array the last parameter. 22
Avoid really long methods. 22136
The method 'main' has a Cyclomatic Complexity of 16. 22136
The method main() has an NPath complexity of 451 22136
The method 'main' has a Modified Cyclomatic Complexity of 14. 22136
Local variable 'tanl' could be declared final 34
Local variable 'gold' could be declared final 35
Local variable 'goldLabels' could be declared final 37
Local variable 'tanlLabels' could be declared final 38
Local variable 'indexMap' could be declared final 39
Local variable 'tReader' could be declared final 41
Local variable 'gReader' could be declared final 42
Local variable 'parts' could be declared final 52
Local variable 'token' could be declared final 56
Position literals first in String comparisons 59
Local variable 'parts' could be declared final 70
Local variable 'token' could be declared final 74
Local variable 'ner' could be declared final 75
Local variable 'diffMatchPatch' could be declared final 81
Local variable 'diffs' could be declared final 82
Local variable 'diff' could be declared final 87
Local variable 'text' could be declared final 88
Switch statements should have a default label 89106
Local variable 'guesses' could be declared final 109
Local variable 'trueLabels' could be declared final 110
Local variable 'key' could be declared final 112
Local variable 'label' could be declared final 113
Local variable 'mappedIndex' could be declared final 115
Local variable 'stats' could be declared final 127

tint-eval - eu/fbk/dh/tint/eval/pos/StanfordEvaluation.java

Violation Line
The class 'StanfordEvaluation' has a Standard Cyclomatic Complexity of 14 (Highest = 13). 1797
The class 'StanfordEvaluation' has a Modified Cyclomatic Complexity of 14 (Highest = 13). 1797
The class 'StanfordEvaluation' has a Cyclomatic Complexity of 15 (Highest = 14). 1797
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1797
Avoid unused private fields such as 'LOGGER'. 19
The method 'main' has a Modified Cyclomatic Complexity of 13. 2396
The method 'main' has a Cyclomatic Complexity of 14. 2396
Parameter 'args' is not assigned and could be declared final 23
Consider using varargs for methods or constructors which take an array the last parameter. 23
The method 'main' has a Standard Cyclomatic Complexity of 13. 2396
Local variable 'guessed' could be declared final 35
Local variable 'gold' could be declared final 36
Local variable 'guesses' could be declared final 38
Local variable 'trueLabels' could be declared final 39
Local variable 'goldLabel' could be declared final 46
Position literals first in String comparisons 48
Local variable 'parts' could be declared final 54
This call to String.startsWith can be rewritten using String.charAt(0) 60
This call to String.startsWith can be rewritten using String.charAt(0) 62
This call to String.startsWith can be rewritten using String.charAt(0) 64
This call to String.startsWith can be rewritten using String.charAt(0) 66
This call to String.startsWith can be rewritten using String.charAt(0) 70
This call to String.startsWith can be rewritten using String.charAt(0) 72
This call to String.startsWith can be rewritten using String.charAt(0) 74
This call to String.startsWith can be rewritten using String.charAt(0) 76
Local variable 'stats' could be declared final 90

tint-eval - eu/fbk/dh/tint/eval/pos/TextProEvaluation.java

Violation Line
The class 'TextProEvaluation' has a Cyclomatic Complexity of 17 (Highest = 16). 18106
The class 'TextProEvaluation' has a Modified Cyclomatic Complexity of 16 (Highest = 15). 18106
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 18106
The class 'TextProEvaluation' has a Standard Cyclomatic Complexity of 16 (Highest = 15). 18106
Avoid unused private fields such as 'LOGGER'. 20
The method main() has an NPath complexity of 454 24105
The method 'main' has a Standard Cyclomatic Complexity of 15. 24105
The method 'main' has a Cyclomatic Complexity of 16. 24105
Consider using varargs for methods or constructors which take an array the last parameter. 24
Parameter 'args' is not assigned and could be declared final 24
The method 'main' has a Modified Cyclomatic Complexity of 15. 24105
Local variable 'guessed' could be declared final 36
Local variable 'gold' could be declared final 37
Local variable 'guesses' could be declared final 39
Local variable 'guessesTmp' could be declared final 40
Local variable 'trueLabels' could be declared final 41
Local variable 'guess' could be declared final 44
This call to String.startsWith can be rewritten using String.charAt(0) 45
Local variable 'goldLabel' could be declared final 55
Position literals first in String comparisons 57
Local variable 'parts' could be declared final 63
This call to String.startsWith can be rewritten using String.charAt(0) 69
This call to String.startsWith can be rewritten using String.charAt(0) 71
This call to String.startsWith can be rewritten using String.charAt(0) 73
This call to String.startsWith can be rewritten using String.charAt(0) 75
This call to String.startsWith can be rewritten using String.charAt(0) 79
This call to String.startsWith can be rewritten using String.charAt(0) 81
This call to String.startsWith can be rewritten using String.charAt(0) 83
This call to String.startsWith can be rewritten using String.charAt(0) 85
Local variable 'stats' could be declared final 99

tint-eval - eu/fbk/dh/tint/eval/pos/TreeTaggerEvaluation.java

Violation Line
The class 'TreeTaggerEvaluation' has a Standard Cyclomatic Complexity of 16 (Highest = 15). 17104
The class 'TreeTaggerEvaluation' has a Modified Cyclomatic Complexity of 16 (Highest = 15). 17104
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 17104
The class 'TreeTaggerEvaluation' has a Cyclomatic Complexity of 16 (Highest = 15). 17104
Avoid unused private fields such as 'LOGGER'. 19
The method 'main' has a Modified Cyclomatic Complexity of 15. 23103
Consider using varargs for methods or constructors which take an array the last parameter. 23
The method 'main' has a Standard Cyclomatic Complexity of 15. 23103
The method 'main' has a Cyclomatic Complexity of 15. 23103
The method main() has an NPath complexity of 304 23103
Parameter 'args' is not assigned and could be declared final 23
Local variable 'guessed' could be declared final 35
Local variable 'gold' could be declared final 36
Local variable 'guesses' could be declared final 38
Local variable 'trueLabels' could be declared final 39
Local variable 'label' could be declared final 42
String.trim().length()==0 is an inefficient way to validate an empty String. 43
Local variable 'goldLabel' could be declared final 53
Position literals first in String comparisons 55
Local variable 'parts' could be declared final 61
This call to String.startsWith can be rewritten using String.charAt(0) 67
This call to String.startsWith can be rewritten using String.charAt(0) 69
This call to String.startsWith can be rewritten using String.charAt(0) 71
This call to String.startsWith can be rewritten using String.charAt(0) 73
Local variable 'stats' could be declared final 97

tint-heideltime-annotator - eu/fbk/dh/tint/heideltime/annotator/HeidelTimeAnnotations.java

Violation Line
Avoid unused imports such as 'edu.stanford.nlp.util.Pair' 5

tint-heideltime-annotator - eu/fbk/dh/tint/heideltime/annotator/HeidelTimeAnnotator.java

Violation Line
The class 'HeidelTimeAnnotator' has a Modified Cyclomatic Complexity of 4 (Highest = 10). 27196
The class 'HeidelTimeAnnotator' has a Cyclomatic Complexity of 4 (Highest = 11). 27196
The class 'HeidelTimeAnnotator' has a Standard Cyclomatic Complexity of 4 (Highest = 10). 27196
Parameter 'start' is not assigned and could be declared final 43
Parameter 'end' is not assigned and could be declared final 51
Parameter 'timexType' is not assigned and could be declared final 59
Parameter 'timexValue' is not assigned and could be declared final 67
Parameter 'timexValue' is not assigned and could be declared final 71
Parameter 'timexType' is not assigned and could be declared final 71
Parameter 'start' is not assigned and could be declared final 71
Parameter 'end' is not assigned and could be declared final 71
Parameter 'annotatorName' is not assigned and could be declared final 79
Parameter 'props' is not assigned and could be declared final 79
Local variable 'configFile' could be declared final 84
Local variable 'dtString' could be declared final 85
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 89
Local variable 'convertedProperties' could be declared final 95
The method 'annotate' has a Modified Cyclomatic Complexity of 10. 107178
The method 'annotate' has a Cyclomatic Complexity of 11. 107178
The method 'annotate' has a Standard Cyclomatic Complexity of 10. 107178
Parameter 'annotation' is not assigned and could be declared final 107
Local variable 'text' could be declared final 108
Local variable 'creationDate' could be declared final 115
Static DateFormatter objects should be accessed in a synchronized manner 116
Avoid empty catch blocks 117119
Local variable 'process' could be declared final 120
Local variable 'dbFactory' could be declared final 122
Local variable 'dBuilder' could be declared final 123
Local variable 'textStream' could be declared final 125
Local variable 'doc' could be declared final 127
Local variable 'timexes' could be declared final 130
Local variable 'finalTimexes' could be declared final 131
Local variable 'entries' could be declared final 132
Local variable 'element' could be declared final 135
Local variable 'begin' could be declared final 137
Local variable 'end' could be declared final 138
Local variable 'timexType' could be declared final 140
Local variable 'timexValue' could be declared final 141
Local variable 'timexObject' could be declared final 143
Avoid instantiating new objects inside loops 143
Local variable 'tokens' could be declared final 149
Local variable 'token' could be declared final 152
Local variable 'begin' could be declared final 153
Local variable 'end' could be declared final 154

tint-heideltime-annotator - eu/fbk/dh/tint/heideltime/annotator/HeidelTimeModel.java

Violation Line
A class which only has private constructors should be final 1756
Private field 'tagger' could be made final; it is only initialized in the declaration or constructor. 20
Parameter 'documentType' is not assigned and could be declared final 25
Parameter 'configFile' is not assigned and could be declared final 25
Parameter 'properties' is not assigned and could be declared final 30
Parameter 'documentType' is not assigned and could be declared final 30
Parameter 'configFile' is not assigned and could be declared final 37
Parameter 'documentType' is not assigned and could be declared final 37
Singleton is not thread safe 3840
Parameter 'properties' is not assigned and could be declared final 45
Parameter 'documentType' is not assigned and could be declared final 45
Singleton is not thread safe 4648

tint-inverse-digimorph - eu/fbk/dh/tint/inverse/digimorph/annotator/DigiInverseMorphAnnotations.java

Violation Line
Avoid unused imports such as 'edu.stanford.nlp.pipeline.Annotator' 4

tint-inverse-digimorph - eu/fbk/dh/tint/inverse/digimorph/annotator/DigiInverseMorphAnnotator.java

Violation Line
Parameter 'annotation' is not assigned and could be declared final 21
Local variable 'sentence' could be declared final 23
Local variable 'tokens' could be declared final 24
Local variable 'c' could be declared final 25
Local variable 'morph_features' could be declared final 26

tint-inverse-digimorph - eu/fbk/dh/tint/inverse/digimorph/annotator/InverseDigiMorph.java

Violation Line
Avoid using redundant field initializer for 'executor' 25
Avoid using redundant field initializer for 'futures' 26
Avoid using redundant field initializer for 'volume' 29
Avoid using redundant field initializer for 'map' 30
Avoid reassigning parameters such as 'model_path' 39
Local variable 'file' could be declared final 42
Local variable 'bytes' could be declared final 44
Parameter 'morphology' is not assigned and could be declared final 65
Use block level rather than method level synchronization 6570
Local variable 'token_list' could be declared final 66
Local variable 'inverseMorphology' could be declared final 68
Use block level rather than method level synchronization 79121
Parameter 'morpho_list' is not assigned and could be declared final 79
Local variable 'results' could be declared final 80
Local variable 'threadsNumber' could be declared final 82
Useless parentheses. 84
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 86
Avoid instantiating new objects inside loops 96
Local variable 'stringList' could be declared final 110

tint-inverse-digimorph - eu/fbk/dh/tint/inverse/digimorph/annotator/InverseDigiMorph_Analizer.java

Violation Line
Avoid using redundant field initializer for 'map' 16
Private field 'map' could be made final; it is only initialized in the declaration or constructor. 16
Parameter 'morphos' is not assigned and could be declared final 20
Parameter 'map' is not assigned and could be declared final 20
Local variable 'results' could be declared final 26
Local variable 's' could be declared final 27
Parameter 'morpho' is not assigned and could be declared final 33
Local variable 'form' could be declared final 37
Useless parentheses. 37

tint-readability - eu/fbk/dh/tint/readability/DescriptionForm.java

Violation Line
Parameter 'start' is not assigned and could be declared final 12
Parameter 'end' is not assigned and could be declared final 12
Parameter 'description' is not assigned and could be declared final 12
Parameter 'start' is not assigned and could be declared final 22
Parameter 'end' is not assigned and could be declared final 30
Parameter 'description' is not assigned and could be declared final 38

tint-readability - eu/fbk/dh/tint/readability/GlossarioEntry.java

Violation Line
The user-supplied array 'forms' is stored directly. 15
Parameter 'forms' is not assigned and could be declared final 15
Parameter 'description' is not assigned and could be declared final 15
Parameter 'form' is not assigned and could be declared final 20
Parameter 'description' is not assigned and could be declared final 20
Returning 'forms' may expose an internal array. 26
Consider using varargs for methods or constructors which take an array the last parameter. 29
Parameter 'forms' is not assigned and could be declared final 29
The user-supplied array 'forms' is stored directly. 29
Parameter 'description' is not assigned and could be declared final 37
Parameter 'pos' is not assigned and could be declared final 53

tint-readability - eu/fbk/dh/tint/readability/Readability.java

Violation Line
Possible God class (WMC=80, ATFD=35, TCC=0.05102040816326531) 1487
The class 'Readability' has a Modified Cyclomatic Complexity of 2 (Highest = 16). 30487
The class 'Readability' has a Cyclomatic Complexity of 2 (Highest = 16). 30487
Too many fields 30487
The class 'Readability' has a Standard Cyclomatic Complexity of 2 (Highest = 16). 30487
Private field 'ttrLimit' could be made final; it is only initialized in the declaration or constructor. 33
Avoid using redundant field initializer for 'language' 35
Private field 'language' could be made final; it is only initialized in the declaration or constructor. 35
Avoid using redundant field initializer for 'contentEasyWordSize' 36
Avoid using redundant field initializer for 'wordCount' 36
Avoid using redundant field initializer for 'contentWordSize' 36
Avoid using redundant field initializer for 'docLenLettersOnly' 37
Avoid using redundant field initializer for 'docLenWithSpaces' 37
Avoid using redundant field initializer for 'docLenWithoutSpaces' 37
Avoid using redundant field initializer for 'sentenceCount' 38
Avoid using redundant field initializer for 'tokenCount' 38
Avoid using redundant field initializer for 'hyphenCount' 39
Avoid using redundant field initializer for 'hyphenWordCount' 40
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 65
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 66
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 67
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 69
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 70
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 72
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 73
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 74
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 76
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 77
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 78
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 80
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 81
Parameter 'localProperties' is not assigned and could be declared final 83
Parameter 'annotation' is not assigned and could be declared final 83
Parameter 'language' is not assigned and could be declared final 83
Local variable 'text' could be declared final 87
The method 'finalizeReadability' has a Modified Cyclomatic Complexity of 16. 93194
The method finalizeReadability() has an NPath complexity of 3660 93194
Avoid really long methods. 93194
The method 'finalizeReadability' has a Cyclomatic Complexity of 16. 93194
The method 'finalizeReadability' has a Standard Cyclomatic Complexity of 16. 93194
Local variable 'ttr' could be declared final 94
Local variable 'token' could be declared final 97
Local variable 'isWord' could be declared final 98
Local variable 'tokenText' could be declared final 106
Local variable 'deeps' could be declared final 110
Local variable 'propositions' could be declared final 111
Local variable 'sentences' could be declared final 116
Local variable 'sentence' could be declared final 118
Local variable 'semanticGraph' could be declared final 120121
Local variable 'indexedWord' could be declared final 127
Avoid empty catch blocks 130132
Local variable 'verbs' could be declared final 140
Local variable 'heads' could be declared final 143
Avoid instantiating new objects inside loops 143
Local variable 'verb' could be declared final 144
Local variable 'parentIDs' could be declared final 145
Local variable 'head' could be declared final 146
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 150
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 164
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 168
Local variable 'total' could be declared final 176
Parameter 'token' is not assigned and could be declared final 200
Parameter 'token' is not assigned and could be declared final 206
Parameter 'sentenceID' is not assigned and could be declared final 214
Parameter 'contentWordSize' is not assigned and could be declared final 230
Parameter 'contentEasyWordSize' is not assigned and could be declared final 238
Parameter 'wordCount' is not assigned and could be declared final 246
Parameter 'docLenWithSpaces' is not assigned and could be declared final 254
Parameter 'docLenWithoutSpaces' is not assigned and could be declared final 262
Parameter 'docLenLettersOnly' is not assigned and could be declared final 270
Parameter 'sentenceCount' is not assigned and could be declared final 278
Parameter 'tokenCount' is not assigned and could be declared final 286
Parameter 'pos' is not assigned and could be declared final 298
Parameter 'hyphenCount' is not assigned and could be declared final 306
Parameter 'increment' is not assigned and could be declared final 310
Avoid reassigning parameters such as 'string' 315
Local variable 'sb' could be declared final 316
Local variable 'c' could be declared final 318
Parameter 'token' is not assigned and could be declared final 326
Local variable 'pos' could be declared final 330
Local variable 'hyphenation' could be declared final 342
Local variable 'h' could be declared final 347
Avoid empty catch blocks 352354
Local variable 'genericPos' could be declared final 375
Parameter 'pos' is not assigned and could be declared final 380
Parameter 'reverse' is not assigned and could be declared final 384
Avoid reassigning parameters such as 'pos' 384
Parameter 'constraint' is not assigned and could be declared final 384
Parameter 'setToCheck' is not assigned and could be declared final 384
Local variable 'ret' could be declared final 388
Parameter 'fileName' is not assigned and could be declared final 396
Parameter 'defaultFileName' is not assigned and could be declared final 396
Local variable 'streamFile' could be declared final 399
Local variable 'input' could be declared final 404
Parameter 'pos' is not assigned and could be declared final 415
Parameter 'pos' is not assigned and could be declared final 419
Parameter 'pos' is not assigned and could be declared final 423

tint-readability - eu/fbk/dh/tint/readability/ReadabilityAnnotator.java

Violation Line
The class 'ReadabilityAnnotator' has a Standard Cyclomatic Complexity of 4 (Highest = 13). 25137
The class 'ReadabilityAnnotator' has a Modified Cyclomatic Complexity of 4 (Highest = 10). 25137
The class 'ReadabilityAnnotator' has a Cyclomatic Complexity of 4 (Highest = 13). 25137
Private field 'language' could be made final; it is only initialized in the declaration or constructor. 30
Private field 'className' could be made final; it is only initialized in the declaration or constructor. 31
Private field 'maxSentenceLength' could be made final; it is only initialized in the declaration or constructor. 32
Private field 'globalProperties' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'localProperties' could be made final; it is only initialized in the declaration or constructor. 35
Parameter 'annotatorName' is not assigned and could be declared final 37
Parameter 'props' is not assigned and could be declared final 37
The method 'annotate' has a Standard Cyclomatic Complexity of 13. 52114
Parameter 'annotation' is not assigned and could be declared final 52
The method annotate() has an NPath complexity of 270 52114
The method 'annotate' has a Modified Cyclomatic Complexity of 10. 52114
The method 'annotate' has a Cyclomatic Complexity of 13. 52114
Local variable 'obj' could be declared final 58
Local variable 'constructor' could be declared final 59
Switch statements should have a default label 7287
Local variable 'sentences' could be declared final 94
Local variable 'sentence' could be declared final 97
Local variable 'sentenceID' could be declared final 98
Local variable 'wordsNow' could be declared final 99
Local variable 'token' could be declared final 100
Local variable 'words' could be declared final 104

tint-readability - eu/fbk/dh/tint/readability/SemanticGraphUtils.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1688
Parameter 'indexedWord' is not assigned and could be declared final 18
Parameter 'semanticGraph' is not assigned and could be declared final 18
Avoid unused local variables such as 'parents'. 19
Local variable 'parents' could be declared final 19
Parameter 'verb' is not assigned and could be declared final 23
Parameter 'semanticGraph' is not assigned and could be declared final 23
Local variable 'frequencies' could be declared final 24
Local variable 'indexes' could be declared final 25
Local variable 'token' could be declared final 27
Local variable 'index' could be declared final 28
Local variable 'node' could be declared final 31
Local variable 'pathToRoot' could be declared final 33
Local variable 'indexedWord' could be declared final 34
Avoid empty catch blocks 3842
Local variable 'keys' could be declared final 45
Local variable 'key' could be declared final 46
Local variable 'index' could be declared final 50
Parameter 'semanticGraph' is not assigned and could be declared final 59
Parameter 'verb' is not assigned and could be declared final 59
Local variable 'parents' could be declared final 60
Local variable 'removeIndexes' could be declared final 61
Local variable 'token' could be declared final 63
Local variable 'index' could be declared final 64
Local variable 'node' could be declared final 67
Local variable 'incomingEdgesSorted' could be declared final 6869
Local variable 'edge' could be declared final 71
Local variable 'parentIndex' could be declared final 72
Avoid empty catch blocks 7579
Local variable 'removeIndex' could be declared final 82

tint-readability - eu/fbk/dh/tint/readability/en/EnglishReadability.java

Violation Line
Avoid using redundant field initializer for 'level2WordSize' 19
Avoid using redundant field initializer for 'level1WordSize' 19
Avoid using redundant field initializer for 'level3WordSize' 19
Local variable 'flesch' could be declared final 3132
Local variable 'fleschKincaid' could be declared final 3334
Useless parentheses. 34
Parameter 'globalProperties' is not assigned and could be declared final 66
Parameter 'annotation' is not assigned and could be declared final 66
Parameter 'localProperties' is not assigned and could be declared final 66
Parameter 'token' is not assigned and could be declared final 116
Local variable 'lemma' could be declared final 119
Document empty method body 150152
Parameter 'token' is not assigned and could be declared final 150
Parameter 'token' is not assigned and could be declared final 154
Overriding method merely calls super 154156
Parameter 'token' is not assigned and could be declared final 158
Document empty method body 165167
Parameter 'sentence' is not assigned and could be declared final 165

tint-readability - eu/fbk/dh/tint/readability/en/EnglishReadabilityModel.java

Violation Line
The class 'EnglishReadabilityModel' has a Cyclomatic Complexity of 3 (Highest = 10). 20118
The class 'EnglishReadabilityModel' has a Modified Cyclomatic Complexity of 3 (Highest = 10). 20118
A class which only has private constructors should be final 20118
The class 'EnglishReadabilityModel' has a Standard Cyclomatic Complexity of 3 (Highest = 10). 20118
Avoid using redundant field initializer for 'ourInstance' 23
Private field 'level1Lemmas' could be made final; it is only initialized in the declaration or constructor. 29
Private field 'level2Lemmas' could be made final; it is only initialized in the declaration or constructor. 30
Private field 'level3Lemmas' could be made final; it is only initialized in the declaration or constructor. 31
The method 'getInstance' has a Cyclomatic Complexity of 10. 3698
The method 'getInstance' has a Standard Cyclomatic Complexity of 10. 3698
The method 'getInstance' has a Modified Cyclomatic Complexity of 10. 3698
Parameter 'globalProperties' is not assigned and could be declared final 36
Parameter 'localProperties' is not assigned and could be declared final 36
Singleton is not thread safe 3796
Local variable 'freqLemmaFile' could be declared final 38
Local variable 'level1Lemmas' could be declared final 41
Local variable 'level2Lemmas' could be declared final 42
Local variable 'level3Lemmas' could be declared final 43
Local variable 'frequecies' could be declared final 47
Local variable 'stream' could be declared final 49
Local variable 'reader' could be declared final 50
Local variable 'parts' could be declared final 53
Local variable 'form' could be declared final 58
Local variable 'frequency' could be declared final 59
Local variable 'entry' could be declared final 64
Local variable 'form' could be declared final 65
Parameter 'level1Lemmas' is not assigned and could be declared final 100
Parameter 'level2Lemmas' is not assigned and could be declared final 100
Parameter 'level3Lemmas' is not assigned and could be declared final 101

tint-readability - eu/fbk/dh/tint/readability/en/EnglishStandardReadability.java

Violation Line
Avoid unused private fields such as 'LOGGER'. 19
Parameter 'pos' is not assigned and could be declared final 32
Position literals first in String comparisons 36
Position literals first in String comparisons 39
Local variable 'matcher' could be declared final 43
Parameter 'localProperties' is not assigned and could be declared final 51
Parameter 'globalProperties' is not assigned and could be declared final 51
Parameter 'annotation' is not assigned and could be declared final 51

tint-readability - eu/fbk/dh/tint/readability/es/SpanishReadability.java

Violation Line
Avoid using redundant field initializer for 'level3WordSize' 20
Avoid using redundant field initializer for 'level2WordSize' 20
Avoid using redundant field initializer for 'level1WordSize' 20
Local variable 'fleschSzigriszt' could be declared final 3234
Local variable 'fernandezHuerta' could be declared final 3537
Parameter 'annotation' is not assigned and could be declared final 69
Parameter 'globalProperties' is not assigned and could be declared final 69
Parameter 'localProperties' is not assigned and could be declared final 69
Parameter 'token' is not assigned and could be declared final 75
Local variable 'lemma' could be declared final 79
Document empty method body 113115
Parameter 'token' is not assigned and could be declared final 113
Overriding method merely calls super 117119
Parameter 'token' is not assigned and could be declared final 117
Parameter 'token' is not assigned and could be declared final 121
Document empty method body 128130
Parameter 'sentence' is not assigned and could be declared final 128

tint-readability - eu/fbk/dh/tint/readability/es/SpanishReadabilityModel.java

Violation Line
A class which only has private constructors should be final 18106
Avoid using redundant field initializer for 'ourInstance' 21
Private field 'level1Lemmas' could be made final; it is only initialized in the declaration or constructor. 27
Private field 'level2Lemmas' could be made final; it is only initialized in the declaration or constructor. 28
Private field 'level3Lemmas' could be made final; it is only initialized in the declaration or constructor. 29
Parameter 'localProperties' is not assigned and could be declared final 34
Parameter 'globalProperties' is not assigned and could be declared final 34
Singleton is not thread safe 3584
Local variable 'freqLemmaFile' could be declared final 36
Local variable 'level1Lemmas' could be declared final 39
Local variable 'level2Lemmas' could be declared final 40
Local variable 'level3Lemmas' could be declared final 41
Local variable 'stream' could be declared final 44
Local variable 'reader' could be declared final 45
Local variable 'parts' could be declared final 49
Local variable 'lemma' could be declared final 54
Parameter 'level2Lemmas' is not assigned and could be declared final 88
Parameter 'level1Lemmas' is not assigned and could be declared final 88
Parameter 'level3Lemmas' is not assigned and could be declared final 89

tint-readability - eu/fbk/dh/tint/readability/es/SpanishStandardReadability.java

Violation Line
Avoid unused private fields such as 'LOGGER'. 15
Parameter 'localProperties' is not assigned and could be declared final 17
Parameter 'globalProperties' is not assigned and could be declared final 17
Parameter 'annotation' is not assigned and could be declared final 17

tint-readability - eu/fbk/dh/tint/readability/gl/GalicianReadability.java

Violation Line
Avoid using redundant field initializer for 'level3WordSize' 21
Avoid using redundant field initializer for 'level2WordSize' 21
Avoid using redundant field initializer for 'level1WordSize' 21
Parameter 'args' is not assigned and could be declared final 23
Consider using varargs for methods or constructors which take an array the last parameter. 23
Local variable 'hyphenator' could be declared final 24
Local variable 'produción' could be declared final 25
Local variable 'fleschSzigriszt' could be declared final 3234
Local variable 'fernandezHuerta' could be declared final 3537
Parameter 'localProperties' is not assigned and could be declared final 47
Parameter 'annotation' is not assigned and could be declared final 47
Parameter 'globalProperties' is not assigned and could be declared final 47
Parameter 'token' is not assigned and could be declared final 53
Local variable 'lemma' could be declared final 57
Parameter 'token' is not assigned and could be declared final 72
Document empty method body 7274
Parameter 'token' is not assigned and could be declared final 76
Overriding method merely calls super 7678
Document empty method body 8081
Parameter 'token' is not assigned and could be declared final 80
Parameter 'sentence' is not assigned and could be declared final 83
Document empty method body 8385

tint-readability - eu/fbk/dh/tint/readability/gl/GalicianReadabilityModel.java

Violation Line
The class 'GalicianReadabilityModel' has a Cyclomatic Complexity of 3 (Highest = 11). 20131
The class 'GalicianReadabilityModel' has a Standard Cyclomatic Complexity of 3 (Highest = 11). 20131
A class which only has private constructors should be final 20131
The class 'GalicianReadabilityModel' has a Modified Cyclomatic Complexity of 3 (Highest = 11). 20131
Avoid using redundant field initializer for 'ourInstance' 23
Private field 'level1Lemmas' could be made final; it is only initialized in the declaration or constructor. 37
Private field 'level2Lemmas' could be made final; it is only initialized in the declaration or constructor. 38
Private field 'level3Lemmas' could be made final; it is only initialized in the declaration or constructor. 39
Parameter 'args' is not assigned and could be declared final 41
Consider using varargs for methods or constructors which take an array the last parameter. 41
Local variable 'instance' could be declared final 42
Parameter 'globalProperties' is not assigned and could be declared final 46
The method 'getInstance' has a Modified Cyclomatic Complexity of 11. 46111
The method 'getInstance' has a Standard Cyclomatic Complexity of 11. 46111
The method 'getInstance' has a Cyclomatic Complexity of 11. 46111
Parameter 'localProperties' is not assigned and could be declared final 46
Singleton is not thread safe 47109
Local variable 'freqLemmaFile' could be declared final 48
Local variable 'level1Lemmas' could be declared final 51
Local variable 'level2Lemmas' could be declared final 52
Local variable 'level3Lemmas' could be declared final 53
Local variable 'stream' could be declared final 56
Local variable 'reader' could be declared final 57
Local variable 'parts' could be declared final 64
Local variable 'lemmaPos' could be declared final 69
Local variable 'matcher' could be declared final 70
Local variable 'lemma' could be declared final 74
Local variable 'pos' could be declared final 75
Parameter 'level2Lemmas' is not assigned and could be declared final 113
Parameter 'level1Lemmas' is not assigned and could be declared final 113
Parameter 'level3Lemmas' is not assigned and could be declared final 114

tint-readability - eu/fbk/dh/tint/readability/gl/GalicianStandardReadability.java

Violation Line
Avoid unused private fields such as 'LOGGER'. 15
Parameter 'localProperties' is not assigned and could be declared final 17
Parameter 'globalProperties' is not assigned and could be declared final 17
Parameter 'annotation' is not assigned and could be declared final 17

tint-readability - eu/fbk/dh/tint/readability/it/EasyLanguage.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 29
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 30
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 31

tint-readability - eu/fbk/dh/tint/readability/it/ItalianReadability.java

Violation Line
Avoid using redundant field initializer for 'level2WordSize' 24
Avoid using redundant field initializer for 'level3WordSize' 24
Avoid using redundant field initializer for 'level1WordSize' 24
StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 26
StringBuffers can grow quite a lot, and so may become a source of memory leak (if the owning class has a long life time). 27
Avoid using redundant field initializer for 'lemmaIndex' 28
Local variable 'gulpease' could be declared final 35
Local variable 'lemmaText' could be declared final 42
Local variable 'tokenText' could be declared final 43
Local variable 'glossario' could be declared final 46
Local variable 'glossarioKeys' could be declared final 48
Local variable 'form' could be declared final 51
Local variable 'numberOfTokens' could be declared final 53
Local variable 'allOccurrences' could be declared final 54
Local variable 'allLemmaOccurrences' could be declared final 55
Local variable 'occurrence' could be declared final 57
Local variable 'occurrence' could be declared final 60
Parameter 'annotation' is not assigned and could be declared final 67
Parameter 'globalProperties' is not assigned and could be declared final 67
Parameter 'localProperties' is not assigned and could be declared final 67
Parameter 's2' is not assigned and could be declared final 110
Parameter 's1' is not assigned and could be declared final 110
Parameter 'needle' is not assigned and could be declared final 115
Parameter 'haystack' is not assigned and could be declared final 115
Local variable 'ret' could be declared final 117
Local variable 'afterChar' could be declared final 122
Avoid empty catch blocks 126128
Parameter 'start' is not assigned and could be declared final 135
Parameter 'form' is not assigned and could be declared final 135
Parameter 'indexes' is not assigned and could be declared final 135
Parameter 'forms' is not assigned and could be declared final 136
Parameter 'numberOfTokens' is not assigned and could be declared final 136
Parameter 'annotation' is not assigned and could be declared final 136
Parameter 'glossario' is not assigned and could be declared final 137
Local variable 'lemmaIndex' could be declared final 138
Local variable 'firstToken' could be declared final 143
Local variable 'endToken' could be declared final 144145
Avoid declaring a variable if it is unreferenced before a possible exit point. 146
Local variable 'beginOffset' could be declared final 146
Local variable 'endOffset' could be declared final 147
Avoid declaring a variable if it is unreferenced before a possible exit point. 147
Local variable 'glossarioEntry' could be declared final 149
Local variable 'descriptionForm' could be declared final 154155
Parameter 'token' is not assigned and could be declared final 160
Local variable 'easyWords' could be declared final 162
Local variable 'simplePos' could be declared final 163
Local variable 'lemma' could be declared final 164
Document empty method body 182184
Parameter 'token' is not assigned and could be declared final 182
Overriding method merely calls super 186188
Parameter 'token' is not assigned and could be declared final 186
Parameter 'token' is not assigned and could be declared final 190
Avoid appending characters as strings in StringBuffer.append. 194
Avoid appending characters as strings in StringBuffer.append. 195
Document empty method body 198200
Parameter 'sentence' is not assigned and could be declared final 198

tint-readability - eu/fbk/dh/tint/readability/it/ItalianReadabilityModel.java

Violation Line
The class 'ItalianReadabilityModel' has a Modified Cyclomatic Complexity of 4 (Highest = 12). 26153
The class 'ItalianReadabilityModel' has a Cyclomatic Complexity of 4 (Highest = 13). 26153
A class which only has private constructors should be final 26153
The class 'ItalianReadabilityModel' has a Standard Cyclomatic Complexity of 4 (Highest = 12). 26153
Avoid using redundant field initializer for 'ourInstance' 29
Private field 'glossario' could be made final; it is only initialized in the declaration or constructor. 30
Private field 'easyWords' could be made final; it is only initialized in the declaration or constructor. 31
Parameter 'globalProperties' is not assigned and could be declared final 33
The method 'getInstance' has a Standard Cyclomatic Complexity of 12. 33137
Parameter 'localProperties' is not assigned and could be declared final 33
The method 'getInstance' has a Cyclomatic Complexity of 13. 33137
Avoid really long methods. 33137
The method 'getInstance' has a Modified Cyclomatic Complexity of 12. 33137
Singleton is not thread safe 34135
Local variable 'useGlossario' could be declared final 35
Local variable 'easyWordsFileName' could be declared final 36
Local variable 'gson' could be declared final 38
Local variable 'stream' could be declared final 45
Local variable 'reader' could be declared final 46
Local variable 'easyWords' could be declared final 52
Local variable 'glossario' could be declared final 72
Local variable 'stanfordProperties' could be declared final 7576
Local variable 'key' could be declared final 77
Local variable 'glossarioFileName' could be declared final 83
Local variable 'parseGlossario' could be declared final 8586
Local variable 'pipeline' could be declared final 88
Local variable 'stream' could be declared final 9192
Local variable 'reader' could be declared final 93
Local variable 'entries' could be declared final 94
Local variable 'entry' could be declared final 95
Local variable 'form' could be declared final 96
Avoid instantiating new objects inside loops 102
Local variable 'annotation' could be declared final 102
Avoid instantiating new objects inside loops 105
Local variable 'lemmaBuffer' could be declared final 105
Avoid instantiating new objects inside loops 106
Local variable 'tokenBuffer' could be declared final 106
Local variable 'tokens' could be declared final 108
Local variable 'token' could be declared final 109
Avoid appending characters as strings in StringBuffer.append. 110
Avoid appending characters as strings in StringBuffer.append. 111
Local variable 'pos' could be declared final 114
Local variable 'annotatedPos' could be declared final 115
Parameter 'glossario' is not assigned and could be declared final 140
Parameter 'easyWords' is not assigned and could be declared final 141

tint-readability - eu/fbk/dh/tint/readability/it/ItalianStandardReadability.java

Violation Line
Avoid unused private fields such as 'LOGGER'. 15
Parameter 'localProperties' is not assigned and could be declared final 17
Parameter 'annotation' is not assigned and could be declared final 17
Parameter 'globalProperties' is not assigned and could be declared final 17

tint-resources - eu/fbk/dh/tint/resources/morpho/FstanRunner.java

Violation Line
The class 'FstanRunner' has a Modified Cyclomatic Complexity of 5 (Highest = 23). 14214
The class 'FstanRunner' has a Cyclomatic Complexity of 5 (Highest = 23). 14214
The class 'FstanRunner' has a Standard Cyclomatic Complexity of 5 (Highest = 23). 14214
Parameter 'command' is not assigned and could be declared final 18
Parameter 'model' is not assigned and could be declared final 18
Parameter 'requests' is not assigned and could be declared final 23
Local variable 'ret' could be declared final 25
Local variable 'pb' could be declared final 29
Local variable 'writer' could be declared final 42
Local variable 'request' could be declared final 44
Local variable 'parts' could be declared final 53
Parameter 'word' is not assigned and could be declared final 64
Local variable 'requests' could be declared final 65
Local variable 'types' could be declared final 71
Local variable 'parts' could be declared final 72
Local variable 'part' could be declared final 73
Local variable 'subparts' could be declared final 74
Parameter 'word' is not assigned and could be declared final 85
Local variable 'requests' could be declared final 86
Local variable 'types' could be declared final 92
Local variable 'parts' could be declared final 93
Local variable 'part' could be declared final 94
Local variable 'subparts' could be declared final 95
Parameter 'word' is not assigned and could be declared final 106
Parameter 'word' is not assigned and could be declared final 110
Parameter 'type' is not assigned and could be declared final 110
Avoid reassigning parameters such as 'type' 114
Avoid reassigning parameters such as 'type' 114
The method 'get' has a Cyclomatic Complexity of 23. 114197
Avoid reassigning parameters such as 'rq' 114
Parameter 'word' is not assigned and could be declared final 114
Avoid reassigning parameters such as 'type' 114
The method 'get' has a Standard Cyclomatic Complexity of 23. 114197
Avoid reassigning parameters such as 'type' 114
The method 'get' has a Modified Cyclomatic Complexity of 23. 114197
Avoid reassigning parameters such as 'type' 114
Avoid reassigning parameters such as 'type' 114
Avoid reassigning parameters such as 'type' 114
Avoid reassigning parameters such as 'type' 114
Avoid reassigning parameters such as 'type' 114
Avoid reassigning parameters such as 'type' 114
Avoid reassigning parameters such as 'type' 114
The method get() has an NPath complexity of 69666 114197
Avoid reassigning parameters such as 'type' 114
Local variable 'requests' could be declared final 115
Local variable 'words' could be declared final 118
Position literals first in String comparisons 123
Position literals first in String comparisons 126
Position literals first in String comparisons 129
Position literals first in String comparisons 132
Position literals first in String comparisons 135
Position literals first in String comparisons 138
Position literals first in String comparisons 141
Position literals first in String comparisons 144
Position literals first in String comparisons 147
Position literals first in String comparisons 150
Position literals first in String comparisons 153
Local variable 'parts' could be declared final 163
Local variable 'subparts' could be declared final 166
Local variable 'subsubparts' could be declared final 170
Local variable 'part' could be declared final 178
Local variable 'subsubparts' could be declared final 179180
Local variable 'ret' could be declared final 191
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 193
Consider using varargs for methods or constructors which take an array the last parameter. 199
Parameter 'args' is not assigned and could be declared final 199
Local variable 'command' could be declared final 200
Local variable 'model' could be declared final 201
Local variable 'runner' could be declared final 203
Local variable 'strings' could be declared final 204
Local variable 'list' could be declared final 207
Local variable 'strings1' could be declared final 208

tint-resources - eu/fbk/dh/tint/resources/morpho/MorphItConverter.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2187
Parameter 'args' is not assigned and could be declared final 35
Consider using varargs for methods or constructors which take an array the last parameter. 35
Local variable 'writer' could be declared final 48
Local variable 'lines' could be declared final 50
Local variable 'parts' could be declared final 57
Local variable 'form' could be declared final 63
Local variable 'lemma' could be declared final 64
Local variable 'morpho' could be declared final 65
Local variable 'matcher' could be declared final 67
Local variable 'type' could be declared final 73

tint-resources - eu/fbk/dh/tint/resources/morpho/MorphItEaglesConverter.java

Violation Line
The class 'MorphItEaglesConverter' has a Cyclomatic Complexity of 39 (Highest = 38). 25374
The class 'MorphItEaglesConverter' has a Modified Cyclomatic Complexity of 39 (Highest = 38). 25374
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 25374
The class 'MorphItEaglesConverter' has a Standard Cyclomatic Complexity of 39 (Highest = 38). 25374
The method main() has an NPath complexity of 239380052 130373
The method 'main' has a Cyclomatic Complexity of 38. 130373
The method 'main' has a Standard Cyclomatic Complexity of 38. 130373
Parameter 'args' is not assigned and could be declared final 130
The method main() has an NCSS line count of 148 130373
Consider using varargs for methods or constructors which take an array the last parameter. 130
Avoid really long methods. 130373
The method 'main' has a Modified Cyclomatic Complexity of 38. 130373
Local variable 'useFstan' could be declared final 151
Local variable 'useSpaces' could be declared final 152
Local variable 'runner' could be declared final 159
Local variable 'buffer' could be declared final 160
Local variable 'allForms' could be declared final 162
Local variable 'writer' could be declared final 165
Local variable 'types' could be declared final 166
Local variable 'typeToForm' could be declared final 168
Local variable 'formMeanings' could be declared final 169
Local variable 'parts' could be declared final 178
Local variable 'form' could be declared final 184
Local variable 'lemma' could be declared final 185
Avoid unused local variables such as 'lemma'. 185
Local variable 'morpho' could be declared final 186
Local variable 'matcher' could be declared final 188
Local variable 'type' could be declared final 194
Local variable 'form' could be declared final 213
Local variable 'mappings' could be declared final 219
Local variable 'type' could be declared final 221
Avoid instantiating new objects inside loops 223
Local variable 'nonAmbiguous' could be declared final 223
Local variable 'form' could be declared final 224
Avoid instantiating new objects inside loops 234
Local variable 'toFstan' could be declared final 234
Local variable 'run' could be declared final 235
Avoid instantiating new objects inside loops 237
Local variable 'fstanForms' could be declared final 237
Local variable 'res' could be declared final 240
Local variable 'okForm' could be declared final 247
Local variable 'matcher' could be declared final 248
Local variable 'suffix' could be declared final 254
Local variable 'mf' could be declared final 264
Local variable 'allFormsArray' could be declared final 269
Local variable 'fstanMorpho' could be declared final 270
Local variable 'run' could be declared final 274
Local variable 'form' could be declared final 276
Local variable 'morphos' could be declared final 277
Local variable 'morpho' could be declared final 280
Local variable 'parts' could be declared final 295
Local variable 'form' could be declared final 301
Local variable 'lemma' could be declared final 302
Local variable 's' could be declared final 304
Local variable 'morpho' could be declared final 312
Local variable 'matcher' could be declared final 314
Local variable 'type' could be declared final 320
Local variable 'm' could be declared final 334
Local variable 'eaglesMorpho' could be declared final 340

tint-resources - eu/fbk/dh/tint/resources/ner/ConvertICAB.java

Violation Line
The class 'ConvertICAB' has a Modified Cyclomatic Complexity of 15 (Highest = 14). 14102
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 14102
The class 'ConvertICAB' has a Standard Cyclomatic Complexity of 15 (Highest = 14). 14102
The class 'ConvertICAB' has a Cyclomatic Complexity of 16 (Highest = 15). 14102
Avoid unused private fields such as 'LOGGER'. 16
Parameter 'args' is not assigned and could be declared final 18
The method main() has an NPath complexity of 1937 18101
The method 'main' has a Standard Cyclomatic Complexity of 14. 18101
The method 'main' has a Modified Cyclomatic Complexity of 14. 18101
The method 'main' has a Cyclomatic Complexity of 15. 18101
Consider using varargs for methods or constructors which take an array the last parameter. 18
Local variable 'input' could be declared final 35
Local variable 'output' could be declared final 36
Local variable 'textOut' could be declared final 37
Local variable 'textTok' could be declared final 38
Local variable 'keepGpe' could be declared final 40
Local variable 'writer' could be declared final 42
Local variable 'reader' could be declared final 4344
Local variable 'parts' could be declared final 69
Local variable 'token' could be declared final 74
Position literals first in String comparisons 77

tint-resources - eu/fbk/dh/tint/resources/ner/LoadWikipedia.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2196
The class 'LoadWikipedia' has a Cyclomatic Complexity of 10 (Highest = 9). 2196
The class 'LoadWikipedia' has a Modified Cyclomatic Complexity of 10 (Highest = 9). 2196
The class 'LoadWikipedia' has a Standard Cyclomatic Complexity of 10 (Highest = 9). 2196
Parameter 'args' is not assigned and could be declared final 26
Consider using varargs for methods or constructors which take an array the last parameter. 26
Local variable 'formPageSearcher' could be declared final 47
Local variable 'pageFormSearcher' could be declared final 48
Local variable 'writer' could be declared final 50
Local variable 'pages' could be declared final 52
Local variable 'pageSet' could be declared final 53
Local variable 'entries' could be declared final 62
Local variable 'entry' could be declared final 64
Local variable 'form' could be declared final 69
Local variable 'pEntries' could be declared final 70
Local variable 'pEntry' could be declared final 74

tint-resources - eu/fbk/dh/tint/resources/ner/WikiNewsReader.java

Violation Line
Parameter 'numThreads' is not assigned and could be declared final 14
Parameter 'numPages' is not assigned and could be declared final 14
Parameter 'configurationFolder' is not assigned and could be declared final 14
Parameter 'locale' is not assigned and could be declared final 14
Document empty method body 1820
Parameter 'extractorParameters' is not assigned and could be declared final 18
Parameter 'text' is not assigned and could be declared final 22
Document empty method body 2224
Parameter 'wikiID' is not assigned and could be declared final 22
Parameter 'title' is not assigned and could be declared final 22
Parameter 'title' is not assigned and could be declared final 26
Parameter 'wikiID' is not assigned and could be declared final 26
Document empty method body 2628
Parameter 'text' is not assigned and could be declared final 26
Parameter 'wikiID' is not assigned and could be declared final 30
Parameter 'title' is not assigned and could be declared final 30
Parameter 'text' is not assigned and could be declared final 30
Document empty method body 3032
Parameter 'title' is not assigned and could be declared final 34
Parameter 'wikiID' is not assigned and could be declared final 34
Parameter 'text' is not assigned and could be declared final 34
Document empty method body 3436
Parameter 'wikiID' is not assigned and could be declared final 38
Parameter 'title' is not assigned and could be declared final 38
Parameter 'text' is not assigned and could be declared final 38
Document empty method body 4850
Parameter 'wikiID' is not assigned and could be declared final 48
Parameter 'text' is not assigned and could be declared final 48
Parameter 'title' is not assigned and could be declared final 48
Parameter 'wikiID' is not assigned and could be declared final 52
Parameter 'title' is not assigned and could be declared final 52
Document empty method body 5254
Parameter 'text' is not assigned and could be declared final 52
Parameter 'title' is not assigned and could be declared final 56
Parameter 'text' is not assigned and could be declared final 56
Document empty method body 5658
Parameter 'wikiID' is not assigned and could be declared final 56
Consider using varargs for methods or constructors which take an array the last parameter. 60
Parameter 'args' is not assigned and could be declared final 60
Local variable 'wikiNewsReader' could be declared final 61

tint-resources - eu/fbk/dh/tint/resources/parse/CreateTrainingForStanfordParser.java

Violation Line
The class 'CreateTrainingForStanfordParser' has a Modified Cyclomatic Complexity of 11 (Highest = 16). 23229
The class 'CreateTrainingForStanfordParser' has a Standard Cyclomatic Complexity of 11 (Highest = 16). 23229
The class 'CreateTrainingForStanfordParser' has a Cyclomatic Complexity of 12 (Highest = 19). 23229
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 23229
The method main() has an NPath complexity of 2594 28186
The method 'main' has a Modified Cyclomatic Complexity of 16. 28186
Parameter 'args' is not assigned and could be declared final 28
The method 'main' has a Cyclomatic Complexity of 19. 28186
Avoid really long methods. 28186
The method 'main' has a Standard Cyclomatic Complexity of 16. 28186
Consider using varargs for methods or constructors which take an array the last parameter. 28
Local variable 'input' could be declared final 44
Local variable 'output' could be declared final 45
Local variable 'column' could be declared final 46
Local variable 'writer' could be declared final 48
Local variable 'lines' could be declared final 50
Local variable 'fromPattern' could be declared final 60
Local variable 'endPattern' could be declared final 61
This call to String.startsWith can be rewritten using String.charAt(0) 70
Avoid instantiating new objects inside loops 76
Avoid instantiating new objects inside loops 77
Local variable 'parts' could be declared final 83
Local variable 'id' could be declared final 85
Local variable 'token' could be declared final 86
Local variable 'lemma' could be declared final 87
Local variable 'pos' could be declared final 88
Avoid empty catch blocks 9395
Local variable 'parseLabel' could be declared final 96
Avoid instantiating new objects inside loops 102
Deeply nested if..then statements are hard to read 125127
Avoid appending characters as strings in StringBuffer.append. 126
Deeply nested if..then statements are hard to read 129132
Position literals first in String comparisons 129
Avoid instantiating new objects inside loops 138
Local variable 'thisToken' could be declared final 138
Avoid instantiating new objects inside loops 148
Avoid instantiating new objects inside loops 153
Position literals first in String comparisons 160
Local variable 'thisToken' could be declared final 165
Avoid instantiating new objects inside loops 165
Parameter 'sentence' is not assigned and could be declared final 188
Parameter 'writer' is not assigned and could be declared final 189
Parameter 'sentenceOffsets' is not assigned and could be declared final 189
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 190
Local variable 'map' could be declared final 194

tint-resources - eu/fbk/dh/tint/resources/pos/CreateTrainingForStanfordPOS.java

Violation Line
The class 'CreateTrainingForStanfordPOS' has a Standard Cyclomatic Complexity of 39 (Highest = 38). 19249
The class 'CreateTrainingForStanfordPOS' has a Cyclomatic Complexity of 41 (Highest = 40). 19249
The class 'CreateTrainingForStanfordPOS' has a Modified Cyclomatic Complexity of 39 (Highest = 38). 19249
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 19249
The method main() has an NCSS line count of 136 24248
The method 'main' has a Standard Cyclomatic Complexity of 38. 24248
The method 'main' has a Cyclomatic Complexity of 40. 24248
Avoid really long methods. 24248
The method 'main' has a Modified Cyclomatic Complexity of 38. 24248
Consider using varargs for methods or constructors which take an array the last parameter. 24
Parameter 'args' is not assigned and could be declared final 24
Local variable 'input' could be declared final 47
Local variable 'output' could be declared final 48
Local variable 'onlyTokens' could be declared final 49
Local variable 'onlyPos' could be declared final 50
Local variable 'onlyText' could be declared final 51
Local variable 'conll' could be declared final 52
Local variable 'column' could be declared final 54
Local variable 'writer' could be declared final 56
Local variable 'lines' could be declared final 75
Local variable 'fromPattern' could be declared final 81
Local variable 'endPattern' could be declared final 82
This call to String.startsWith can be rewritten using String.charAt(0) 89
Avoid instantiating new objects inside loops 96
Local variable 'parts' could be declared final 114
Local variable 'id' could be declared final 116
Local variable 'token' could be declared final 117
Local variable 'lemma' could be declared final 118
Avoid instantiating new objects inside loops 131
Deeply nested if..then statements are hard to read 149151
Avoid appending characters as strings in StringBuffer.append. 150
Avoid instantiating new objects inside loops 156
Local variable 'buffer' could be declared final 156
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 157
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 158
Avoid appending characters as strings in StringBuffer.append. 158
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 159
Avoid appending characters as strings in StringBuffer.append. 160
Deeply nested if..then statements are hard to read 162164
Deeply nested if..then statements are hard to read 165167
Deeply nested if..then statements are hard to read 168170
Deeply nested if..then statements are hard to read 171175
Avoid instantiating new objects inside loops 177
Position literals first in String comparisons 187
Local variable 'buffer' could be declared final 192
Avoid instantiating new objects inside loops 192
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 193
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 194
Avoid appending characters as strings in StringBuffer.append. 194
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 195
Avoid appending characters as strings in StringBuffer.append. 196

tint-resources - eu/fbk/dh/tint/resources/pos/CreateTrainingForStanfordPOS2.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 1681
Parameter 'args' is not assigned and could be declared final 24
Consider using varargs for methods or constructors which take an array the last parameter. 24
Local variable 'input' could be declared final 28
Local variable 'output' could be declared final 29
Local variable 'writer' could be declared final 32
Useless parentheses. 34
Local variable 'lines' could be declared final 34
Local variable 'line' could be declared final 36
Local variable 'parts' could be declared final 37
Avoid instantiating new objects inside loops 41
Local variable 'token' could be declared final 44
A switch statement does not contain a break 4756
Prefer StringBuffer over += for concatenating strings 49
Position literals first in String comparisons 59
Local variable 'buffer' could be declared final 64
Avoid instantiating new objects inside loops 64
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 65
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 66
Avoid appending characters as strings in StringBuffer.append. 66
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 67
Avoid appending characters as strings in StringBuffer.append. 68

tint-runner - eu/fbk/dh/tint/runner/TintHandler.java

Violation Line
Private field 'pipeline' could be made final; it is only initialized in the declaration or constructor. 25
Parameter 'pipeline' is not assigned and could be declared final 38
Parameter 'response' is not assigned and could be declared final 42
Parameter 'output' is not assigned and could be declared final 42
Parameter 'contentType' is not assigned and could be declared final 42
Parameter 'response' is not assigned and could be declared final 50
Parameter 'request' is not assigned and could be declared final 50
Local variable 'postBody' could be declared final 54
Local variable 'outputFormat' could be declared final 61
Local variable 'inputStream' could be declared final 63
Local variable 'outputStream' could be declared final 64
Local variable 'format' could be declared final 66
Local variable 'output' could be declared final 71

tint-runner - eu/fbk/dh/tint/runner/TintPipeline.java

Violation Line
Avoid using redundant field initializer for 'documentDate' 25
Parameter 'props' is not assigned and could be declared final 35
Parameter 'loadDefaultProperties' is not assigned and could be declared final 43
Overridable method 'loadDefaultProperties' called during object construction 46
Avoid unused local variables such as 'pipeline'. 55
Local variable 'pipeline' could be declared final 55
Local variable 'configStream' could be declared final 63
Parameter 'stream' is not assigned and could be declared final 69
Parameter 'propsFile' is not assigned and could be declared final 73
Local variable 'configStream' could be declared final 75
Parameter 'properties' is not assigned and could be declared final 80
Parameter 'value' is not assigned and could be declared final 86
Parameter 'key' is not assigned and could be declared final 86
Parameter 'key' is not assigned and could be declared final 90
Parameter 'documentDate' is not assigned and could be declared final 98
Parameter 'text' is not assigned and could be declared final 102
Parameter 'text' is not assigned and could be declared final 106
Avoid reassigning parameters such as 'pipeline' 106
Local variable 'annotation' could be declared final 109
Parameter 'text' is not assigned and could be declared final 125
Parameter 'format' is not assigned and could be declared final 125
Parameter 'outputStream' is not assigned and could be declared final 125
Local variable 'pipeline' could be declared final 127
Local variable 'annotation' could be declared final 128
Switch statements should have a default label 130162
Parameter 'outputStream' is not assigned and could be declared final 167
Parameter 'format' is not assigned and could be declared final 167
Parameter 'inputStream' is not assigned and could be declared final 167
Local variable 'reader' could be declared final 170
Local variable 'inputText' could be declared final 171
Local variable 'text' could be declared final 177

tint-runner - eu/fbk/dh/tint/runner/TintRunner.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 19162
The class 'TintRunner' has a Standard Cyclomatic Complexity of 7 (Highest = 10). 19162
The class 'TintRunner' has a Cyclomatic Complexity of 7 (Highest = 10). 19162
The class 'TintRunner' has a Modified Cyclomatic Complexity of 7 (Highest = 10). 19162
The method 'main' has a Modified Cyclomatic Complexity of 10. 27129
Parameter 'args' is not assigned and could be declared final 27
Avoid really long methods. 27129
Consider using varargs for methods or constructors which take an array the last parameter. 27
The method 'main' has a Standard Cyclomatic Complexity of 10. 27129
The method 'main' has a Cyclomatic Complexity of 10. 27129
Local variable 'addProperties' could be declared final 51
Local variable 'additionalProps' could be declared final 52
Local variable 'property' could be declared final 53
Avoid instantiating new objects inside loops 55
Avoid empty catch blocks 5658
Local variable 'console' could be declared final 61
Position literals first in String comparisons 64
Position literals first in String comparisons 68
Position literals first in String comparisons 72
Local variable 'format' could be declared final 95
Local variable 'pipeline' could be declared final 110
Parameter 'formatString' is not assigned and could be declared final 131
Parameter 'outputFormat' is not assigned and could be declared final 131
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 134

tint-runner - eu/fbk/dh/tint/runner/TintServer.java

Violation Line
Avoid unused imports such as 'java.io.StringReader' 10
Avoid unused imports such as 'java.util.List' 13
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 24117
Do not hard code the IP address 28
Parameter 'port' is not assigned and could be declared final 31
Parameter 'host' is not assigned and could be declared final 31
Parameter 'configFile' is not assigned and could be declared final 35
Parameter 'host' is not assigned and could be declared final 35
Parameter 'port' is not assigned and could be declared final 35
Parameter 'configFile' is not assigned and could be declared final 39
Parameter 'port' is not assigned and could be declared final 39
Parameter 'host' is not assigned and could be declared final 39
Parameter 'additionalProperties' is not assigned and could be declared final 40
Local variable 'timeoutInSeconds' could be declared final 43
Local variable 'pipeline' could be declared final 47
Local variable 'nl' could be declared final 60
Local variable 'tintHandler' could be declared final 63
Parameter 'args' is not assigned and could be declared final 78
Consider using varargs for methods or constructors which take an array the last parameter. 78
Local variable 'host' could be declared final 95
Local variable 'port' could be declared final 96
Local variable 'configFile' could be declared final 97
Local variable 'additionalProps' could be declared final 101
Avoid unused local variables such as 'server'. 110
Local variable 'server' could be declared final 110

tint-simplifier - eu/fbk/dh/tint/simplifier/Simplifier.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 22180
Consider using varargs for methods or constructors which take an array the last parameter. 26
Parameter 'args' is not assigned and could be declared final 26
Local variable 'pipeline' could be declared final 37
Local variable 'annotation' could be declared final 47
Local variable 'children' could be declared final 50
Local variable 'sentences' could be declared final 51
Local variable 'sentence' could be declared final 53
Local variable 'semanticGraph' could be declared final 5758
Local variable 'rootNodes' could be declared final 59
Local variable 'root' could be declared final 64
Local variable 'stack' could be declared final 65
Avoid instantiating new objects inside loops 65
Avoid instantiating new objects inside loops 66
Local variable 'used' could be declared final 66
Parameter 'node' is not assigned and could be declared final 100
Parameter 'semanticGraph' is not assigned and could be declared final 100
Local variable 'ret' could be declared final 101
Local variable 'incomingEdgesSorted' could be declared final 102
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 103
Local variable 'semanticGraphEdge' could be declared final 104
Parameter 'node' is not assigned and could be declared final 111
Parameter 'semanticGraph' is not assigned and could be declared final 111
Local variable 'ret' could be declared final 112
Local variable 'outEdgesSorted' could be declared final 113
Local variable 'semanticGraphEdge' could be declared final 114
Parameter 'semanticGraph' is not assigned and could be declared final 120
Parameter 'indexedWord' is not assigned and could be declared final 120
Local variable 'ret' could be declared final 121
Parameter 'semanticGraph' is not assigned and could be declared final 126
Parameter 'iter' is not assigned and could be declared final 126
Parameter 'list' is not assigned and could be declared final 126
Parameter 'node' is not assigned and could be declared final 126
Local variable 'outEdgesSorted' could be declared final 131
Local variable 'semanticGraphEdge' could be declared final 132
Local variable 'child' could be declared final 133
Parameter 'node' is not assigned and could be declared final 139
Parameter 'semanticGraph' is not assigned and could be declared final 139
Local variable 'ret' could be declared final 140
Parameter 'start' is not assigned and could be declared final 146
Parameter 'semanticGraph' is not assigned and could be declared final 146
Parameter 'node' is not assigned and could be declared final 146
Local variable 'incomingEdgesSorted' could be declared final 147
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 148
Local variable 'governor' could be declared final 149
Parameter 'stack' is not assigned and could be declared final 155
Parameter 'current' is not assigned and could be declared final 155
Parameter 'children' is not assigned and could be declared final 155
Parameter 'semanticGraph' is not assigned and could be declared final 156
Parameter 'used' is not assigned and could be declared final 156
Local variable 'edges' could be declared final 157
Local variable 'index' could be declared final 159
Local variable 'integer' could be declared final 161
Local variable 'newStack' could be declared final 165
Local variable 'edge' could be declared final 168
Local variable 'target' could be declared final 169

tint-simplifier - eu/fbk/dh/tint/simplifier/Test.java

Violation Line
Possible God class (WMC=58, ATFD=67, TCC=0.16666666666666666) 1549
The class 'Test' has a Modified Cyclomatic Complexity of 22 (Highest = 23). 33549
The class 'Test' has a Cyclomatic Complexity of 26 (Highest = 26). 33549
The class 'Test' has a Standard Cyclomatic Complexity of 22 (Highest = 23). 33549
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 33549
Avoid unused private fields such as 'LOGGER'. 38
Consider using varargs for methods or constructors which take an array the last parameter. 53
Parameter 'annotation' is not assigned and could be declared final 59
Parameter 'annotation' is not assigned and could be declared final 70
Parameter 'originalEnd' is not assigned and could be declared final 70
Parameter 'originalStart' is not assigned and could be declared final 70
Parameter 'text' is not assigned and could be declared final 83
Consider using varargs for methods or constructors which take an array the last parameter. 83
Local variable 'start' could be declared final 89
Local variable 'end' could be declared final 90
Local variable 'buffer' could be declared final 97
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 98
Avoid using redundant field initializer for 'checkSpaceBefore' 108
Parameter 'textToInsert' is not assigned and could be declared final 111
Parameter 'annotation' is not assigned and could be declared final 111
Parameter 'originalStart' is not assigned and could be declared final 111
Parameter 'text' is not assigned and could be declared final 124
Consider using varargs for methods or constructors which take an array the last parameter. 124
Local variable 'buffer' could be declared final 130
Local variable 'start' could be declared final 131
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 135
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 136
The method 'complexString' has a Cyclomatic Complexity of 26. 142307
The method 'complexString' has a Modified Cyclomatic Complexity of 23. 142307
The method complexString() has an NPath complexity of 497674 142307
The method 'complexString' has a Standard Cyclomatic Complexity of 23. 142307
Avoid really long methods. 142307
Parameter 'annotation' is not assigned and could be declared final 142
Local variable 'sentence' could be declared final 147
Local variable 'commas' could be declared final 150
Avoid instantiating new objects inside loops 150
Local variable 'tokens' could be declared final 151
Local variable 'token' could be declared final 152
Local variable 'semanticGraph' could be declared final 158
Avoid instantiating new objects inside loops 163
Local variable 'subjects' could be declared final 163
Local variable 'edge' could be declared final 164
Local variable 'relation' could be declared final 165
Local variable 'index1' could be declared final 170
Local variable 'index2' could be declared final 171
Local variable 'commasSize1' could be declared final 178
Local variable 'actions' could be declared final 179
Avoid instantiating new objects inside loops 179
Local variable 'comma1' could be declared final 181
Local variable 'comma2' could be declared final 182
Avoid instantiating new objects inside loops 184
Local variable 'buffer' could be declared final 184
Local variable 'okStart' could be declared final 185
Local variable 'parents' could be declared final 187
Avoid instantiating new objects inside loops 187
Avoid instantiating new objects inside loops 188
Local variable 'children' could be declared final 188
Local variable 'node' could be declared final 190
Local variable 'token' could be declared final 193
Avoid appending characters as strings in StringBuffer.append. 194
Local variable 'sentenceText' could be declared final 196
Local variable 'node' could be declared final 199
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 206
Local variable 'key' could be declared final 212
Local variable 'value' could be declared final 213
Local variable 'okText' could be declared final 225
Local variable 'preposition' could be declared final 226
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 228
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 228
Local variable 'agnosticBegin' could be declared final 232
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 234
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 234
Local variable 'parent' could be declared final 244
Local variable 'allChildren' could be declared final 246
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 247
Local variable 'child' could be declared final 252
Local variable 'index' could be declared final 253
Local variable 'removeBegin' could be declared final 260
Local variable 'removeEnd' could be declared final 261
Avoid instantiating new objects inside loops 262
Local variable 'insertBegin' could be declared final 265
Avoid instantiating new objects inside loops 266
Avoid instantiating new objects inside loops 279
Local variable 'action' could be declared final 283
Local variable 'begin' could be declared final 287
Local variable 'end' could be declared final 288
Avoid instantiating new objects inside loops 290
Local variable 'stringBuffer' could be declared final 290
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 291
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 292
The method 'main' has a Cyclomatic Complexity of 24. 309548
The method main() has an NCSS line count of 117 309548
The method 'main' has a Modified Cyclomatic Complexity of 21. 309548
Parameter 'args' is not assigned and could be declared final 309
The method main() has an NPath complexity of 57752 309548
Consider using varargs for methods or constructors which take an array the last parameter. 309
The method 'main' has a Standard Cyclomatic Complexity of 21. 309548
Avoid really long methods. 309548
Local variable 'inputFile' could be declared final 314
Local variable 'outFile' could be declared final 315
Local variable 'writer' could be declared final 332
Local variable 'dbFactory' could be declared final 334
Local variable 'dBuilder' could be declared final 335
Local variable 'xPathfactory' could be declared final 336
Local variable 'xpath' could be declared final 337
Local variable 'doc' could be declared final 340
Local variable 'pipeline' could be declared final 344
Local variable 'item' could be declared final 354
Local variable 'element' could be declared final 355
Local variable 'toBeSimplified' could be declared final 361
Local variable 'beforeList' could be declared final 364
Local variable 'before' could be declared final 368
Local variable 'text1' could be declared final 371
Local variable 'annotation' could be declared final 374
Local variable 'originalText' could be declared final 397
Local variable 'sentence' could be declared final 413
Local variable 'sentenceOffset' could be declared final 414
Local variable 'semanticGraph' could be declared final 415
Local variable 'rootNodes' could be declared final 416
Avoid instantiating new objects inside loops 421
Local variable 'actions' could be declared final 421
Local variable 'rootNode' could be declared final 423
Local variable 'outEdgesSorted' could be declared final 424
Avoid instantiating new objects inside loops 425
Local variable 'underRoot' could be declared final 425
Local variable 'semanticGraphEdge' could be declared final 427
Local variable 'dependent' could be declared final 429
Local variable 'depIndex' could be declared final 430
Local variable 'depText' could be declared final 431
Local variable 'begin' could be declared final 433
Local variable 'end' could be declared final 434
Position literals first in String comparisons 436
Position literals first in String comparisons 436
Avoid instantiating new objects inside loops 437
Avoid instantiating new objects inside loops 438
Avoid instantiating new objects inside loops 439
Local variable 'previousToken' could be declared final 441
Deeply nested if..then statements are hard to read 442446
Local variable 'pbegin' could be declared final 443
Local variable 'pend' could be declared final 444
Avoid instantiating new objects inside loops 445
Position literals first in String comparisons 449
Avoid instantiating new objects inside loops 450
Avoid instantiating new objects inside loops 451
Avoid instantiating new objects inside loops 452
Local variable 'previousToken' could be declared final 454
Deeply nested if..then statements are hard to read 455459
Local variable 'pbegin' could be declared final 456
Local variable 'pend' could be declared final 457
Avoid instantiating new objects inside loops 458
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 472
Avoid instantiating new objects inside loops 478
Local variable 'action' could be declared final 482
Local variable 'begin' could be declared final 492
Local variable 'end' could be declared final 493
Avoid instantiating new objects inside loops 495
Local variable 'stringBuffer' could be declared final 495
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 496
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 497

tint-simplifier - eu/fbk/dh/tint/simplifier/rules/DenominatiSplittingRule.java

Violation Line
Local variable 'words' could be declared final 15
Local variable 'replacements' could be declared final 16

tint-simplifier - eu/fbk/dh/tint/simplifier/rules/GarantendoSplittingRule.java

Violation Line
Local variable 'words' could be declared final 15
Local variable 'replacements' could be declared final 16

tint-simplifier - eu/fbk/dh/tint/simplifier/rules/PrecisandoSplittingRule.java

Violation Line
Local variable 'words' could be declared final 15
Local variable 'replacements' could be declared final 16

tint-simplifier - eu/fbk/dh/tint/simplifier/rules/ReplaceSubordinateRule.java

Violation Line
Parameter 'semanticGraph' is not assigned and could be declared final 25
Parameter 'sentence' is not assigned and could be declared final 25
Parameter 'word' is not assigned and could be declared final 25
Local variable 'wordsToCheck' could be declared final 26
Local variable 'thisWord' could be declared final 32
Local variable 'outEdgesSorted' could be declared final 33
Local variable 'semanticGraphEdge' could be declared final 34
Local variable 'dependent' could be declared final 35
Local variable 'pos' could be declared final 36
Position literals first in String comparisons 37
Local variable 'token' could be declared final 44
Local variable 'morpho' could be declared final 45
Local variable 'parts' could be declared final 46
Local variable 'persons' could be declared final 47
Local variable 'vParts' could be declared final 49
Parameter 'children' is not assigned and could be declared final 59
Parameter 'annotation' is not assigned and could be declared final 59
Avoid declaring a variable if it is unreferenced before a possible exit point. 61
Local variable 'dm' could be declared final 61
Local variable 'conj' could be declared final 63
Local variable 'sentences' could be declared final 64
Local variable 'sentence' could be declared final 65
Local variable 'semanticGraph' could be declared final 6970
Local variable 'node' could be declared final 72
Local variable 'history' could be declared final 73
Local variable 'verb' could be declared final 77
Local variable 'token' could be declared final 78
Local variable 'pos' could be declared final 79
This call to String.startsWith can be rewritten using String.charAt(0) 80
Local variable 'morpho' could be declared final 87
Local variable 'parts' could be declared final 88
Local variable 'vParts' could be declared final 92
Local variable 'modo' could be declared final 97
Position literals first in String comparisons 98
Local variable 'stringBuffer' could be declared final 117
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 118
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 119
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 120
Local variable 'find' could be declared final 125
Local variable 'inverseMorphology' could be declared final 128

tint-simplifier - eu/fbk/dh/tint/simplifier/rules/SimpleSplittingRule.java

Violation Line
The class 'SimpleSplittingRule' has a Cyclomatic Complexity of 6 (Highest = 23). 17200
The class 'SimpleSplittingRule' has a Modified Cyclomatic Complexity of 5 (Highest = 22). 17200
The class 'SimpleSplittingRule' has a Standard Cyclomatic Complexity of 5 (Highest = 22). 17200
Private field 'patterns' could be made final; it is only initialized in the declaration or constructor. 20
Avoid using redundant field initializer for 'useRegex' 23
Parameter 'words' is not assigned and could be declared final 33
Parameter 'replacements' is not assigned and could be declared final 37
Parameter 'head' is not assigned and could be declared final 41
Parameter 'useRegex' is not assigned and could be declared final 45
The method apply() has an NPath complexity of 10002 57199
Parameter 'annotation' is not assigned and could be declared final 57
The method 'apply' has a Modified Cyclomatic Complexity of 22. 57199
The method 'apply' has a Standard Cyclomatic Complexity of 22. 57199
Avoid really long methods. 57199
Parameter 'children' is not assigned and could be declared final 57
The method 'apply' has a Cyclomatic Complexity of 23. 57199
Local variable 'word' could be declared final 60
Local variable 'ret' could be declared final 65
Local variable 'sentences' could be declared final 67
Local variable 'sentence' could be declared final 69
Avoid instantiating new objects inside loops 71
Local variable 'tokens' could be declared final 72
Avoid instantiating new objects inside loops 76
Local variable 'token' could be declared final 80
Using equalsIgnoreCase() is cleaner than using toUpperCase/toLowerCase().equals(). 83
Local variable 'matcher' could be declared final 89
Avoid instantiating new objects inside loops 106
Local variable 'groups' could be declared final 106
Local variable 'matcher' could be declared final 108
Avoid instantiating new objects inside loops 115
Local variable 'oldSentence' could be declared final 115
Avoid instantiating new objects inside loops 116
Local variable 'newSentence' could be declared final 116
Avoid instantiating new objects inside loops 119
Local variable 'tokensToTheNewSentence' could be declared final 119
Local variable 'token' could be declared final 137
Local variable 'relativeID' could be declared final 155
Local variable 'matcher' could be declared final 158
Avoid instantiating new objects inside loops 159
Local variable 'sb' could be declared final 159
Local variable 'text' could be declared final 162
Avoid appending characters as strings in StringBuffer.append. 175
Avoid appending characters as strings in StringBuffer.append. 180
Avoid appending characters as strings in StringBuffer.append. 189
Avoid appending characters as strings in StringBuffer.append. 190
Avoid appending characters as strings in StringBuffer.append. 193

tint-tokenizer - eu/fbk/dh/tint/tokenizer/ItalianTokenizer.java

Violation Line
Possible God class (WMC=94, ATFD=64, TCC=0.0) 17602
The class 'ItalianTokenizer' has a Cyclomatic Complexity of 13 (Highest = 64). 53602
The class 'ItalianTokenizer' has a Standard Cyclomatic Complexity of 10 (Highest = 40). 53602
The class 'ItalianTokenizer' has a Modified Cyclomatic Complexity of 10 (Highest = 40). 53602
Private field 'splittingChars' could be made final; it is only initialized in the declaration or constructor. 63
Private field 'sentenceChars' could be made final; it is only initialized in the declaration or constructor. 64
Private field 'normalizedChars' could be made final; it is only initialized in the declaration or constructor. 65
Private field 'normalizedStrings' could be made final; it is only initialized in the declaration or constructor. 66
Private field 'expressions' could be made final; it is only initialized in the declaration or constructor. 67
The constructor 'ItalianTokenizer' has a Modified Cyclomatic Complexity of 14. 75195
Parameter 'settingFile' is not assigned and could be declared final 75
The constructor 'ItalianTokenizer' has a Standard Cyclomatic Complexity of 14. 75195
The constructor 'ItalianTokenizer' has a Cyclomatic Complexity of 14. 75195
Local variable 'builder' could be declared final 76
Avoid empty catch blocks 8284
Local variable 'dbFactory' could be declared final 92
Local variable 'dBuilder' could be declared final 93
Local variable 'xPathfactory' could be declared final 94
Local variable 'xpath' could be declared final 95
Local variable 'doc' could be declared final 101
Local variable 'item' could be declared final 108
Local variable 'element' could be declared final 109
Local variable 'hexCode' could be declared final 110
Position literals first in String comparisons 114
Local variable 'num' could be declared final 118
Local variable 'item' could be declared final 130
Local variable 'element' could be declared final 131
Local variable 'charID' could be declared final 132
Local variable 'item' could be declared final 141
Local variable 'element' could be declared final 142
Local variable 'charID' could be declared final 143
Local variable 'b' could be declared final 151
Avoid appending characters as strings in StringBuffer.append. 152
Local variable 'item' could be declared final 156
Local variable 'element' could be declared final 157
Local variable 'regExp' could be declared final 158
Local variable 'merge' could be declared final 159
Local variable 'group' could be declared final 160
Avoid appending characters as strings in StringBuffer.append. 163
Avoid appending characters as strings in StringBuffer.append. 173
Local variable 'item' could be declared final 182
The method 'tokenArray' has a Cyclomatic Complexity of 10. 197255
The method 'tokenArray' has a Modified Cyclomatic Complexity of 10. 197255
The method 'tokenArray' has a Standard Cyclomatic Complexity of 10. 197255
Parameter 'text' is not assigned and could be declared final 197
Local variable 'tokenGroup' could be declared final 204
Local variable 'isNewLine' could be declared final 212
Local variable 'lastToken' could be declared final 213
Local variable 'substring' could be declared final 228
Avoid instantiating new objects inside loops 232
Local variable 'charString' could be declared final 232
Avoid instantiating new objects inside loops 237
Local variable 'charString' could be declared final 237
Local variable 'substring' could be declared final 250
Parameter 'start' is not assigned and could be declared final 257
Parameter 'charString' is not assigned and could be declared final 257
Parameter 'group' is not assigned and could be declared final 257
Parameter 'isNewLine' is not assigned and could be declared final 257
Parameter 'end' is not assigned and could be declared final 257
Parameter 'lastToken' is not assigned and could be declared final 258
Local variable 'token' could be declared final 259
Local variable 'endLast' could be declared final 268
Local variable 'c' could be declared final 281
Parameter 'tokenGroup' is not assigned and could be declared final 294
Local variable 'buffer' could be declared final 295
Local variable 'tokens' could be declared final 296
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 299
Local variable 'token' could be declared final 301
Parameter 'text' is not assigned and could be declared final 327
The method 'parse' has a Cyclomatic Complexity of 64. 331561
The method parse() has an NPath complexity of 95386040 331561
The method 'parse' has a Standard Cyclomatic Complexity of 40. 331561
The method parse() has an NCSS line count of 135 331561
Avoid really long methods. 331561
Parameter 'text' is not assigned and could be declared final 331
The method 'parse' has a Modified Cyclomatic Complexity of 40. 331561
Parameter 'tokenizeOnlyOnSpace' is not assigned and could be declared final 331
Parameter 'newlineIsSentenceBreak' is not assigned and could be declared final 331
Parameter 'ssplitOnlyOnNewLine' is not assigned and could be declared final 332
Local variable 'ret' could be declared final 334
Local variable 'currentChar' could be declared final 346
Local variable 'isLast' could be declared final 347
Local variable 'word' could be declared final 356
Local variable 'clToken' could be declared final 357
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 361
These nested if statements could be combined 361365
Avoid instantiating new objects inside loops 364
These nested if statements could be combined 371375
Avoid instantiating new objects inside loops 374
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 392
Local variable 'mergeList' could be declared final 396
Local variable 'expression' could be declared final 398
Local variable 'get' could be declared final 399
Local variable 'matcher' could be declared final 400
Local variable 'tokenGroup' could be declared final 406
Local variable 'tokens' could be declared final 407
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 409
Local variable 'offset' could be declared final 413
Local variable 's' could be declared final 414
Local variable 'emits' could be declared final 416
Local variable 'emit' could be declared final 417
Local variable 'startToken' could be declared final 420
Local variable 'substring' could be declared final 431
Local variable 'newLines' could be declared final 446
Local variable 'token' could be declared final 449
Useless parentheses. 459
Local variable 'lastToken' could be declared final 482
Local variable 'lastToken' could be declared final 493
Local variable 'finish' could be declared final 521
Local variable 'word' could be declared final 522
Local variable 'clToken' could be declared final 530
These nested if statements could be combined 534538
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 534
Avoid instantiating new objects inside loops 537
These nested if statements could be combined 544548
Avoid instantiating new objects inside loops 547
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 554
Parameter 'argv' is not assigned and could be declared final 563
Consider using varargs for methods or constructors which take an array the last parameter. 563
Local variable 'tokenizer' could be declared final 565
Local variable 'text' could be declared final 569
Local variable 'sentences' could be declared final 583
Local variable 'sentence' could be declared final 587
Local variable 'token' could be declared final 588
Local variable 'sentenceSize' could be declared final 595
Local variable 'lastTokenIndex' could be declared final 596

tint-tokenizer - eu/fbk/dh/tint/tokenizer/annotators/ItalianTokenizerAnnotator.java

Violation Line
Avoid unused imports such as 'edu.stanford.nlp.util.ArrayCoreMap' 8
Avoid unused imports such as 'edu.stanford.nlp.util.CoreMap' 9
Parameter 'annotatorName' is not assigned and could be declared final 27
Parameter 'props' is not assigned and could be declared final 27
Local variable 'modelFile' could be declared final 28
Parameter 'annotation' is not assigned and could be declared final 52
Local variable 'text' could be declared final 53
Local variable 'sTokens' could be declared final 5455

tint-tokenizer - eu/fbk/dh/tint/tokenizer/models/ItalianTokenizerModel.java

Violation Line
A class which only has private constructors should be final 1335
Private field 'tokenizer' could be made final; it is only initialized in the declaration or constructor. 16
Parameter 'configuration' is not assigned and could be declared final 19
Parameter 'posModel' is not assigned and could be declared final 24
Singleton is not thread safe 2527

tint-tokenizer - eu/fbk/dh/tint/tokenizer/token/Extent.java

Violation Line
Parameter 'end' is not assigned and could be declared final 28
Parameter 'start' is not assigned and could be declared final 28
Parameter 's' is not assigned and could be declared final 67
Useless parentheses. 68
Parameter 's' is not assigned and could be declared final 78
Useless parentheses. 79
Parameter 's' is not assigned and could be declared final 89
Useless parentheses. 90
Parameter 's' is not assigned and could be declared final 99
Local variable 'sstart' could be declared final 100
Useless parentheses. 102103
Useless parentheses. 103
Parameter 's' is not assigned and could be declared final 112
Local variable 'sstart' could be declared final 113
Useless parentheses. 115116
Parameter 'o' is not assigned and could be declared final 120
Ensure you override both equals() and hashCode() 130
Parameter 'o' is not assigned and could be declared final 130
Local variable 's' could be declared final 139
Useless parentheses. 140

tint-tokenizer - eu/fbk/dh/tint/tokenizer/token/Token.java

Violation Line
Avoid using redundant field initializer for 'preceedBySpace' 15
Parameter 'preceedBySpace' is not assigned and could be declared final 23
Parameter 'spaceOffset' is not assigned and could be declared final 31
Parameter 'token' is not assigned and could be declared final 35
Parameter 'form' is not assigned and could be declared final 44
Parameter 'normForm' is not assigned and could be declared final 44
Parameter 'end' is not assigned and could be declared final 44
Parameter 'start' is not assigned and could be declared final 44
Parameter 'start' is not assigned and could be declared final 50
Parameter 'end' is not assigned and could be declared final 50
Parameter 'form' is not assigned and could be declared final 50
Parameter 'form' is not assigned and could be declared final 54
Parameter 'normForm' is not assigned and could be declared final 66
Ensure you override both equals() and hashCode() 70
Parameter 'obj' is not assigned and could be declared final 70

tint-tokenizer - eu/fbk/dh/tint/tokenizer/token/TokenGroup.java

Violation Line
Private field 'support' could be made final; it is only initialized in the declaration or constructor. 14
Private field 'startIndexes' could be made final; it is only initialized in the declaration or constructor. 15
Private field 'endIndexes' could be made final; it is only initialized in the declaration or constructor. 16
Private field 'startOffIndexes' could be made final; it is only initialized in the declaration or constructor. 17
Private field 'endOffIndexes' could be made final; it is only initialized in the declaration or constructor. 18
Private field 'newLines' could be made final; it is only initialized in the declaration or constructor. 19
Parameter 'token' is not assigned and could be declared final 21
Parameter 'offset' is not assigned and could be declared final 29

tint-tokenizer - eu/fbk/dh/tint/tokenizer/util/SplitSentences.java

Violation Line
All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 2365
Avoid unused private fields such as 'LOGGER'. 25
Parameter 'args' is not assigned and could be declared final 27
Consider using varargs for methods or constructors which take an array the last parameter. 27
Local variable 'input' could be declared final 39
Local variable 'output' could be declared final 40
Local variable 'text' could be declared final 42
Local variable 'writer' could be declared final 43
Local variable 'props' could be declared final 45
Local variable 'ITApipeline' could be declared final 50
Local variable 'annotation' could be declared final 51
Local variable 'sents' could be declared final 54
Local variable 'thisSent' could be declared final 55

tint-upos - eu/fbk/dh/tint/upos/UPosAnnotator.java

Violation Line
Parameter 'annotation' is not assigned and could be declared final 58
Local variable 'token' could be declared final 59
Local variable 'pos' could be declared final 60
Local variable 'parts' could be declared final 62
Local variable 'upos' could be declared final 63
Avoid instantiating new objects inside loops 63
Local variable 'part' could be declared final 64
Local variable 'thisPos' could be declared final 65
Avoid appending characters as strings in StringBuffer.append. 66

tint-verb - eu/fbk/dh/tint/verb/VerbAnnotator.java

Violation Line
The class 'VerbAnnotator' has a Cyclomatic Complexity of 3 (Highest = 10). 18170
Private field 'auxUsePrefix' could be made final; it is only initialized in the declaration or constructor. 33
Private field 'usePrefix' could be made final; it is only initialized in the declaration or constructor. 33
Private field 'modalUsePrefix' could be made final; it is only initialized in the declaration or constructor. 33
Private field 'auxTags' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'verbTags' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'modalTags' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'skipTags' could be made final; it is only initialized in the declaration or constructor. 34
Private field 'model' could be made final; it is only initialized in the declaration or constructor. 35
Parameter 'prop' is not assigned and could be declared final 37
Parameter 'annotatorName' is not assigned and could be declared final 37
Local variable 'skipTagsText' could be declared final 41
Local variable 'verbTagsText' could be declared final 42
Local variable 'auxTagsText' could be declared final 43
Local variable 'modalTagsText' could be declared final 44
Parameter 'tags' is not assigned and could be declared final 60
Parameter 'text' is not assigned and could be declared final 60
Local variable 'sParts' could be declared final 61
Local variable 'sPart' could be declared final 62
Parameter 'annotation' is not assigned and could be declared final 67
The method 'annotate' has a Cyclomatic Complexity of 10. 67114
Local variable 'sentence' could be declared final 69
Avoid instantiating new objects inside loops 71
Local variable 'tokens' could be declared final 73
Local variable 'followedByExMark' could be declared final 74
Avoid instantiating new objects inside loops 77
Local variable 'verbs' could be declared final 77
Local variable 'token' could be declared final 80
Local variable 'pos' could be declared final 82
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 101
Avoid instantiating new objects inside loops 103
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 107
Parameter 'verbs' is not assigned and could be declared final 116
Parameter 'followedByExMark' is not assigned and could be declared final 116
Avoid unused method parameters such as 'followedByExMark'. 116
Parameter 'lastVerb' is not assigned and could be declared final 116
Local variable 'multiToken' could be declared final 117
Local variable 'verb' could be declared final 119
Useless parentheses. 120
Local variable 'last' could be declared final 120
Parameter 'usePrefix' is not assigned and could be declared final 126
Parameter 'tags' is not assigned and could be declared final 126
Avoid reassigning parameters such as 'pos' 126
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 128
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 132
When doing a String.toLowerCase()/toUpperCase() call, use a Locale 139

tint-verb - eu/fbk/dh/tint/verb/VerbModel.java

Violation Line
A class which only has private constructors should be final 1671
Avoid using redundant field initializer for 'ourInstance' 19
Parameter 'fileName' is not assigned and could be declared final 26
Local variable 'transitiveVerbs' could be declared final 27
Singleton is not thread safe 2859
Local variable 'reader' could be declared final 39
This call to String.startsWith can be rewritten using String.charAt(0) 46
Parameter 'transitiveVerbs' is not assigned and could be declared final 63

tint-verb - eu/fbk/dh/tint/verb/VerbMultiToken.java

Violation Line
The class 'VerbMultiToken' has a Modified Cyclomatic Complexity of 3 (Highest = 10). 16179
The class 'VerbMultiToken' has a Standard Cyclomatic Complexity of 3 (Highest = 11). 16179
The class 'VerbMultiToken' has a Cyclomatic Complexity of 3 (Highest = 13). 16179
Avoid using redundant field initializer for 'isPassive' 19
Avoid using redundant field initializer for 'person' 22
Avoid using redundant field initializer for 'gender' 23
Parameter 'tokens' is not assigned and could be declared final 49
Parameter 'token' is not assigned and could be declared final 53
Parameter 'model' is not assigned and could be declared final 53
The method 'addToken' has a Modified Cyclomatic Complexity of 10. 57109
The method 'addToken' has a Cyclomatic Complexity of 13. 57109
Parameter 'token' is not assigned and could be declared final 57
The method 'addToken' has a Standard Cyclomatic Complexity of 11. 57109
Parameter 'model' is not assigned and could be declared final 57
Parameter 'last' is not assigned and could be declared final 57
Local variable 'features' could be declared final 59
Local variable 'lemma' could be declared final 67
A switch statement does not contain a break 73107
Position literals first in String comparisons 78
Position literals first in String comparisons 78
Local variable 'auxLemma' could be declared final 83
Position literals first in String comparisons 84
Avoid empty catch blocks 98100
Switch statements should have a default label 118131
Switch statements should have a default label 133136
A switch statement does not contain a break 133136
A switch with less than three branches is inefficient, use a if statement instead. 133136
Parameter 'coreLabel' is not assigned and could be declared final 140
Local variable 'features' could be declared final 141
Avoid empty catch blocks 161163

Back to top

Last Published: 2018/01/04.

Reflow Maven skin by Andrius Velykis.