From 10b205b5e288bf40ddfdaf168ae3c091472d7e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Tue, 1 Sep 2020 17:59:49 +0200 Subject: [PATCH] REVERT ME Make end column inclusive This is for consistency with PMD 6, on pmd 7 this commit may be reverted --- .../net/sourceforge/pmd/cpd/AnyTokenizer.java | 2 + .../sourceforge/pmd/cpd/AnyTokenizerTest.java | 4 +- .../pmd/lang/fortran/cpd/testdata/sample.txt | 1400 ++++++++--------- .../pmd/lang/perl/cpd/PerlTokenizerTest.java | 3 +- .../pmd/lang/perl/cpd/testdata/sample.txt | 70 +- .../pmd/lang/ruby/cpd/testdata/server.txt | 127 +- .../pmd/lang/ruby/cpd/testdata/tabWidth.txt | 127 +- 7 files changed, 868 insertions(+), 865 deletions(-) diff --git a/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java b/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java index d476af6e006..25ec8c12ac4 100644 --- a/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java +++ b/pmd-core/src/main/java/net/sourceforge/pmd/cpd/AnyTokenizer.java @@ -86,6 +86,8 @@ public void tokenize(SourceCode sourceCode, Tokens tokenEntries) { lineNo += StringUtil.lineNumberAt(image, image.length()) - 1; lastLineStart = matcher.start() + image.length() - ecol + 1; } + // note: remove this -1 on the 7.0.x branch, this is here because in PMD 6, end columns are inclusive + ecol = ecol - 1; tokenEntries.add(new TokenEntry(image, sourceCode.getFileName(), bline, bcol, ecol)); } } finally { diff --git a/pmd-core/src/test/java/net/sourceforge/pmd/cpd/AnyTokenizerTest.java b/pmd-core/src/test/java/net/sourceforge/pmd/cpd/AnyTokenizerTest.java index 330f6da5c29..1a6b7cb9618 100644 --- a/pmd-core/src/test/java/net/sourceforge/pmd/cpd/AnyTokenizerTest.java +++ b/pmd-core/src/test/java/net/sourceforge/pmd/cpd/AnyTokenizerTest.java @@ -34,13 +34,13 @@ public void testMultilineString() { assertEquals("\"oo\n\"", getTokenImage(string)); assertEquals(1, string.getBeginLine()); assertEquals(5, string.getBeginColumn()); - assertEquals(2, string.getEndColumn()); // ends on line 2 + assertEquals(1, string.getEndColumn()); // ends on line 2 TokenEntry semi = tokens.getTokens().get(3); assertEquals(";", getTokenImage(semi)); assertEquals(2, semi.getBeginLine()); assertEquals(2, semi.getBeginColumn()); - assertEquals(3, semi.getEndColumn()); + assertEquals(2, semi.getEndColumn()); } private Tokens compareResult(AnyTokenizer tokenizer, String source, List expectedImages) { diff --git a/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt b/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt index 18af5878e50..d96c6010eaa 100644 --- a/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt +++ b/pmd-fortran/src/test/resources/net/sourceforge/pmd/lang/fortran/cpd/testdata/sample.txt @@ -1,818 +1,818 @@ [Image] or [Truncated image[ Bcol Ecol L1 - [options] 8 15 - [/] 15 16 - [extend_source] 16 29 + [options] 8 14 + [/] 15 15 + [extend_source] 16 28 L2 - [program] 8 15 - [tp3] 16 19 + [program] 8 14 + [tp3] 16 18 L3 - [implicit] 8 16 - [none] 17 21 + [implicit] 8 15 + [none] 17 20 L9 - [character] 8 17 - [*] 17 18 - [60] 18 20 - [COMMANDE] 21 29 + [character] 8 16 + [*] 17 17 + [60] 18 19 + [COMMANDE] 21 28 L10 - [integer] 8 15 - [*] 15 16 - [4] 16 17 - [IOS] 18 21 - [,] 21 22 + [integer] 8 14 + [*] 15 15 + [4] 16 16 + [IOS] 18 20 + [,] 21 21 L11 - [1] 8 9 - [COMPTEUR] 18 26 - [,] 26 27 + [1] 8 8 + [COMPTEUR] 18 25 + [,] 26 26 L12 - [1] 8 9 - [SORTIE] 18 24 - [,] 24 25 + [1] 8 8 + [SORTIE] 18 23 + [,] 24 24 L13 - [1] 8 9 - [ERRONE] 18 24 - [,] 24 25 + [1] 8 8 + [ERRONE] 18 23 + [,] 24 24 L14 - [1] 8 9 - [CONF] 18 22 - [,] 22 23 + [1] 8 8 + [CONF] 18 21 + [,] 22 22 L15 - [1] 8 9 - [POSITION_ESPACE] 18 33 - [,] 33 34 + [1] 8 8 + [POSITION_ESPACE] 18 32 + [,] 33 33 L16 - [1] 8 9 - [DEBUT_MOT] 18 27 - [,] 27 28 + [1] 8 8 + [DEBUT_MOT] 18 26 + [,] 27 27 L17 - [1] 8 9 - [FIN_MOT] 18 25 - [,] 25 26 + [1] 8 8 + [FIN_MOT] 18 24 + [,] 25 25 L18 - [1] 8 9 - [NB_MOTS] 18 25 - [,] 25 26 + [1] 8 8 + [NB_MOTS] 18 24 + [,] 25 25 L19 - [1] 8 9 - [NB_MOTS_MAX] 18 29 - [,] 29 30 + [1] 8 8 + [NB_MOTS_MAX] 18 28 + [,] 29 29 L20 - [1] 8 9 - [FIN_CHAINE] 18 28 - [,] 28 29 + [1] 8 8 + [FIN_CHAINE] 18 27 + [,] 28 28 L21 - [1] 8 9 - [TROUVER_FIN] 18 29 - [,] 29 30 + [1] 8 8 + [TROUVER_FIN] 18 28 + [,] 29 29 L22 - [1] 8 9 - [NUM_CARACTERE] 18 31 - [,] 31 32 + [1] 8 8 + [NUM_CARACTERE] 18 30 + [,] 31 31 L23 - [1] 8 9 - [ACTION] 18 24 - [,] 24 25 + [1] 8 8 + [ACTION] 18 23 + [,] 24 24 L24 - [1] 8 9 - [PREMIERE_LETTRE] 18 33 - [,] 33 34 + [1] 8 8 + [PREMIERE_LETTRE] 18 32 + [,] 33 33 L25 - [1] 8 9 - [DERNIERE_LETTRE] 18 33 - [,] 33 34 + [1] 8 8 + [DERNIERE_LETTRE] 18 32 + [,] 33 33 L26 - [1] 8 9 - [INTERVALLE_MAJ_MIN] 18 36 - [,] 36 37 + [1] 8 8 + [INTERVALLE_MAJ_MIN] 18 35 + [,] 36 36 L27 - [1] 8 9 - [APRES_MAJ] 18 27 - [,] 27 28 + [1] 8 8 + [APRES_MAJ] 18 26 + [,] 27 27 L28 - [1] 8 9 - [TAILLE_COLONNE] 18 32 - [,] 32 33 + [1] 8 8 + [TAILLE_COLONNE] 18 31 + [,] 32 32 L29 - [1] 8 9 - [TAILLE_LIGNE] 18 30 - [,] 30 31 + [1] 8 8 + [TAILLE_LIGNE] 18 29 + [,] 30 30 L30 - [1] 8 9 - [LIGNES_DESC] 18 29 + [1] 8 8 + [LIGNES_DESC] 18 28 L32 - [parameter] 8 17 - [(] 17 18 - [NB_MOTS_MAX] 18 29 - [=] 30 31 - [9] 32 33 - [)] 33 34 + [parameter] 8 16 + [(] 17 17 + [NB_MOTS_MAX] 18 28 + [=] 30 30 + [9] 32 32 + [)] 33 33 L34 - [parameter] 8 17 - [(] 17 18 - [ERRONE] 18 24 - [=] 25 26 - [1] 27 28 - [)] 28 29 + [parameter] 8 16 + [(] 17 17 + [ERRONE] 18 23 + [=] 25 25 + [1] 27 27 + [)] 28 28 L35 - [parameter] 8 17 - [(] 17 18 - [SORTIE] 18 24 - [=] 25 26 - [-] 27 28 - [1] 29 30 - [)] 30 31 + [parameter] 8 16 + [(] 17 17 + [SORTIE] 18 23 + [=] 25 25 + [-] 27 27 + [1] 29 29 + [)] 30 30 L36 - [parameter] 8 17 - [(] 17 18 - [ACTION] 18 24 - [=] 25 26 - [1] 27 28 - [)] 28 29 + [parameter] 8 16 + [(] 17 17 + [ACTION] 18 23 + [=] 25 25 + [1] 27 27 + [)] 28 28 L37 - [parameter] 8 17 - [(] 17 18 - [PREMIERE_LETTRE] 18 33 - [=] 34 35 - [1] 36 37 - [)] 37 38 + [parameter] 8 16 + [(] 17 17 + [PREMIERE_LETTRE] 18 32 + [=] 34 34 + [1] 36 36 + [)] 37 37 L38 - [parameter] 8 17 - [(] 17 18 - [DERNIERE_LETTRE] 18 33 - [=] 34 35 - [18] 36 38 - [)] 38 39 + [parameter] 8 16 + [(] 17 17 + [DERNIERE_LETTRE] 18 32 + [=] 34 34 + [18] 36 37 + [)] 38 38 L39 - [parameter] 8 17 - [(] 17 18 - [INTERVALLE_MAJ_MIN] 18 36 - [=] 37 38 - [32] 39 41 - [)] 41 42 + [parameter] 8 16 + [(] 17 17 + [INTERVALLE_MAJ_MIN] 18 35 + [=] 37 37 + [32] 39 40 + [)] 41 41 L41 - [parameter] 8 17 - [(] 17 18 - [APRES_MAJ] 18 27 - [=] 28 29 - [96] 30 32 - [)] 32 33 + [parameter] 8 16 + [(] 17 17 + [APRES_MAJ] 18 26 + [=] 28 28 + [96] 30 31 + [)] 32 32 L42 - [parameter] 8 17 - [(] 17 18 - [TAILLE_COLONNE] 18 32 - [=] 33 34 - [7] 35 36 - [)] 36 37 + [parameter] 8 16 + [(] 17 17 + [TAILLE_COLONNE] 18 31 + [=] 33 33 + [7] 35 35 + [)] 36 36 L43 - [parameter] 8 17 - [(] 17 18 - [TAILLE_LIGNE] 18 30 - [=] 31 32 - [12] 33 35 - [)] 35 36 + [parameter] 8 16 + [(] 17 17 + [TAILLE_LIGNE] 18 29 + [=] 31 31 + [12] 33 34 + [)] 35 35 L44 - [parameter] 8 17 - [(] 17 18 - [LIGNES_DESC] 18 29 - [=] 30 31 - [11] 32 34 - [)] 34 35 + [parameter] 8 16 + [(] 17 17 + [LIGNES_DESC] 18 28 + [=] 30 30 + [11] 32 33 + [)] 34 34 L46 - [character] 9 18 - [*] 18 19 - [19] 19 21 - [N] 22 23 - [(] 23 24 - [TAILLE_COLONNE] 24 38 - [,] 38 39 - [TAILLE_LIGNE] 39 51 - [)] 51 52 + [character] 9 17 + [*] 18 18 + [19] 19 20 + [N] 22 22 + [(] 23 23 + [TAILLE_COLONNE] 24 37 + [,] 38 38 + [TAILLE_LIGNE] 39 50 + [)] 51 51 L47 - [character] 8 17 - [*] 17 18 - [19] 18 20 - [MOTS_COMMANDE] 21 34 - [(] 34 35 - [NB_MOTS_MAX] 35 46 - [)] 46 47 + [character] 8 16 + [*] 17 17 + [19] 18 19 + [MOTS_COMMANDE] 21 33 + [(] 34 34 + [NB_MOTS_MAX] 35 45 + [)] 46 46 L48 - [character] 8 17 - [*] 17 18 - [60] 18 20 - [DESC] 21 25 - [(] 25 26 - [LIGNES_DESC] 26 37 - [)] 37 38 + [character] 8 16 + [*] 17 17 + [60] 18 19 + [DESC] 21 24 + [(] 25 25 + [LIGNES_DESC] 26 36 + [)] 37 37 L50 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L51 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' ---------------------------[ 19 80 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' ---------------------------[ 19 79 L52 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' | Bonjour, et bienvenue dan[ 19 80 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' | Bonjour, et bienvenue dan[ 19 79 L53 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' ---------------------------[ 19 80 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' ---------------------------[ 19 79 L54 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L55 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L56 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' Voici un rappel des fonctions di[ 19 84 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' Voici un rappel des fonctions di[ 19 83 L57 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L58 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' _ TASK pour creer une tache (e[ 19 84 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' _ TASK pour creer une tache (e[ 19 83 L59 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L60 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' _ SHOW pour voir la descriptio[ 19 75 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' _ SHOW pour voir la descriptio[ 19 74 L61 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L62 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' _ REMOVE pour enlever une tach[ 19 77 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' _ REMOVE pour enlever une tach[ 19 76 L63 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L64 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' _ CLEAR pour effacer le DASHBO[ 19 70 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' _ CLEAR pour effacer le DASHBO[ 19 69 L65 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L66 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' _ CANCEL, DONE, TODO pour modi[ 19 100 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' _ CANCEL, DONE, TODO pour modi[ 19 99 L67 - [write] 8 13 - [(] 13 14 - [*] 14 15 - [,] 15 16 - [*] 16 17 - [)] 17 18 - [' '] 19 22 + [write] 8 12 + [(] 13 13 + [*] 14 14 + [,] 15 15 + [*] 16 16 + [)] 17 17 + [' '] 19 21 L70 - [do] 8 10 - [while] 11 16 - [(] 17 18 - [IOS] 18 21 - [.] 22 23 - [ne] 23 25 - [.] 25 26 - [SORTIE] 27 33 - [)] 33 34 + [do] 8 9 + [while] 11 15 + [(] 17 17 + [IOS] 18 20 + [.] 22 22 + [ne] 23 24 + [.] 25 25 + [SORTIE] 27 32 + [)] 33 33 L73 - [POSITION_ESPACE] 16 31 - [=] 32 33 - [0] 34 35 + [POSITION_ESPACE] 16 30 + [=] 32 32 + [0] 34 34 L74 - [DEBUT_MOT] 16 25 - [=] 26 27 - [0] 28 29 + [DEBUT_MOT] 16 24 + [=] 26 26 + [0] 28 28 L75 - [FIN_MOT] 16 23 - [=] 24 25 - [0] 26 27 + [FIN_MOT] 16 22 + [=] 24 24 + [0] 26 26 L76 - [NB_MOTS] 16 23 - [=] 24 25 - [0] 26 27 + [NB_MOTS] 16 22 + [=] 24 24 + [0] 26 26 L77 - [FIN_CHAINE] 16 26 - [=] 27 28 - [0] 29 30 + [FIN_CHAINE] 16 25 + [=] 27 27 + [0] 29 29 L80 - [do] 16 18 - [COMPTEUR] 19 27 - [=] 28 29 - [ACTION] 30 36 - [,] 36 37 - [NB_MOTS_MAX] 38 49 + [do] 16 17 + [COMPTEUR] 19 26 + [=] 28 28 + [ACTION] 30 35 + [,] 36 36 + [NB_MOTS_MAX] 38 48 L81 - [MOTS_COMMANDE] 24 37 - [(] 38 39 - [COMPTEUR] 39 47 - [)] 47 48 - [=] 49 50 - [' '] 51 54 + [MOTS_COMMANDE] 24 36 + [(] 38 38 + [COMPTEUR] 39 46 + [)] 47 47 + [=] 49 49 + [' '] 51 53 L82 - [end] 16 19 - [do] 20 22 + [end] 16 18 + [do] 20 21 L86 - [call] 16 20 - [SAISIE] 21 27 - [(] 27 28 - [COMMANDE] 28 36 - [,] 36 37 - [IOS] 38 41 - [)] 41 42 + [call] 16 19 + [SAISIE] 21 26 + [(] 27 27 + [COMMANDE] 28 35 + [,] 36 36 + [IOS] 38 40 + [)] 41 41 L88 - [if] 16 18 - [(] 19 20 - [IOS] 20 23 - [.] 24 25 - [eq] 25 27 - [.] 27 28 - [0] 29 30 - [)] 30 31 - [then] 32 36 + [if] 16 17 + [(] 19 19 + [IOS] 20 22 + [.] 24 24 + [eq] 25 26 + [.] 27 27 + [0] 29 29 + [)] 30 30 + [then] 32 35 L91 - [FIN_CHAINE] 24 34 - [=] 35 36 - [TROUVER_FIN] 37 48 - [(] 49 50 - [COMMANDE] 50 58 - [)] 58 59 + [FIN_CHAINE] 24 33 + [=] 35 35 + [TROUVER_FIN] 37 47 + [(] 49 49 + [COMMANDE] 50 57 + [)] 58 58 L92 - [COMPTEUR] 24 32 - [=] 33 34 - [1] 35 36 + [COMPTEUR] 24 31 + [=] 33 33 + [1] 35 35 L93 - [do] 24 26 - [while] 27 32 - [(] 33 34 - [POSITION_ESPACE] 34 49 - [.] 50 51 - [lt] 51 53 - [.] 53 54 - [FIN_CHAINE] 55 65 - [.] 66 67 - [and] 67 70 - [.] 70 71 - [NB_MOTS] 72 79 - [.] 80 81 - [lt] 81 83 - [.] 83 84 - [NB_MOTS_MAX] 85 96 - [)] 96 97 + [do] 24 25 + [while] 27 31 + [(] 33 33 + [POSITION_ESPACE] 34 48 + [.] 50 50 + [lt] 51 52 + [.] 53 53 + [FIN_CHAINE] 55 64 + [.] 66 66 + [and] 67 69 + [.] 70 70 + [NB_MOTS] 72 78 + [.] 80 80 + [lt] 81 82 + [.] 83 83 + [NB_MOTS_MAX] 85 95 + [)] 96 96 L94 - [DEBUT_MOT] 32 41 - [=] 42 43 - [POSITION_ESPACE] 44 59 - [+] 60 61 - [1] 62 63 + [DEBUT_MOT] 32 40 + [=] 42 42 + [POSITION_ESPACE] 44 58 + [+] 60 60 + [1] 62 62 L97 - [POSITION_ESPACE] 32 47 - [=] 48 49 - [POSITION_ESPACE] 50 65 - [+] 66 67 - [index] 68 73 - [(] 74 75 - [COMMANDE] 75 83 - [(] 84 85 - [DEBUT_MOT] 85 94 - [:] 94 95 - [)] 95 96 - [,] 96 97 - [' '] 98 101 - [)] 101 102 + [POSITION_ESPACE] 32 46 + [=] 48 48 + [POSITION_ESPACE] 50 64 + [+] 66 66 + [index] 68 72 + [(] 74 74 + [COMMANDE] 75 82 + [(] 84 84 + [DEBUT_MOT] 85 93 + [:] 94 94 + [)] 95 95 + [,] 96 96 + [' '] 98 100 + [)] 101 101 L98 - [FIN_MOT] 32 39 - [=] 40 41 - [POSITION_ESPACE] 42 57 - [-] 58 59 - [1] 60 61 + [FIN_MOT] 32 38 + [=] 40 40 + [POSITION_ESPACE] 42 56 + [-] 58 58 + [1] 60 60 L101 - [MOTS_COMMANDE] 32 45 - [(] 46 47 - [COMPTEUR] 47 55 - [)] 55 56 - [=] 57 58 - [COMMANDE] 59 67 - [(] 68 69 - [DEBUT_MOT] 69 78 - [:] 79 80 - [FIN_MOT] 81 88 - [)] 88 89 + [MOTS_COMMANDE] 32 44 + [(] 46 46 + [COMPTEUR] 47 54 + [)] 55 55 + [=] 57 57 + [COMMANDE] 59 66 + [(] 68 68 + [DEBUT_MOT] 69 77 + [:] 79 79 + [FIN_MOT] 81 87 + [)] 88 88 L104 - [if] 32 34 - [(] 35 36 - [MOTS_COMMANDE] 36 49 - [(] 50 51 - [COMPTEUR] 51 59 - [)] 59 60 - [.] 61 62 - [ne] 62 64 - [.] 64 65 - [' '] 66 69 - [)] 69 70 - [then] 71 75 + [if] 32 33 + [(] 35 35 + [MOTS_COMMANDE] 36 48 + [(] 50 50 + [COMPTEUR] 51 58 + [)] 59 59 + [.] 61 61 + [ne] 62 63 + [.] 64 64 + [' '] 66 68 + [)] 69 69 + [then] 71 74 L105 - [NB_MOTS] 40 47 - [=] 48 49 - [NB_MOTS] 50 57 - [+] 58 59 - [1] 60 61 + [NB_MOTS] 40 46 + [=] 48 48 + [NB_MOTS] 50 56 + [+] 58 58 + [1] 60 60 L106 - [COMPTEUR] 40 48 - [=] 49 50 - [COMPTEUR] 51 59 - [+] 60 61 - [1] 62 63 + [COMPTEUR] 40 47 + [=] 49 49 + [COMPTEUR] 51 58 + [+] 60 60 + [1] 62 62 L107 - [end] 32 35 - [if] 36 38 + [end] 32 34 + [if] 36 37 L108 - [end] 24 27 - [do] 28 30 + [end] 24 26 + [do] 28 29 L112 - [do] 24 26 - [COMPTEUR] 27 35 - [=] 36 37 - [1] 38 39 - [,] 39 40 - [NB_MOTS] 41 48 + [do] 24 25 + [COMPTEUR] 27 34 + [=] 36 36 + [1] 38 38 + [,] 39 39 + [NB_MOTS] 41 47 L113 - [do] 32 34 - [NUM_CARACTERE] 35 48 - [=] 49 50 - [PREMIERE_LETTRE] 51 66 - [,] 66 67 - [DERNIERE_LETTRE] 68 83 + [do] 32 33 + [NUM_CARACTERE] 35 47 + [=] 49 49 + [PREMIERE_LETTRE] 51 65 + [,] 66 66 + [DERNIERE_LETTRE] 68 82 L114 - [if] 40 42 - [(] 43 44 - [ichar] 44 49 - [(] 49 50 - [MOTS_COMMANDE] 50 63 - [(] 64 65 - [COMPTEUR] 65 73 - [)] 73 74 - [(] 74 75 - [NUM_CARACTERE] 75 88 - [:] 88 89 - [NUM_CARACTERE] 89 102 - [)] 102 103 - [)] 103 104 + [if] 40 41 + [(] 43 43 + [ichar] 44 48 + [(] 49 49 + [MOTS_COMMANDE] 50 62 + [(] 64 64 + [COMPTEUR] 65 72 + [)] 73 73 + [(] 74 74 + [NUM_CARACTERE] 75 87 + [:] 88 88 + [NUM_CARACTERE] 89 101 + [)] 102 102 + [)] 103 103 L115 - [1] 8 9 - [.] 10 11 - [gt] 11 13 - [.] 13 14 - [APRES_MAJ] 15 24 - [)] 24 25 - [then] 26 30 + [1] 8 8 + [.] 10 10 + [gt] 11 12 + [.] 13 13 + [APRES_MAJ] 15 23 + [)] 24 24 + [then] 26 29 L116 - [MOTS_COMMANDE] 48 61 - [(] 62 63 - [COMPTEUR] 63 71 - [)] 71 72 - [(] 72 73 - [NUM_CARACTERE] 73 86 - [:] 86 87 - [NUM_CARACTERE] 87 100 - [)] 100 101 - [=] 102 103 + [MOTS_COMMANDE] 48 60 + [(] 62 62 + [COMPTEUR] 63 70 + [)] 71 71 + [(] 72 72 + [NUM_CARACTERE] 73 85 + [:] 86 86 + [NUM_CARACTERE] 87 99 + [)] 100 100 + [=] 102 102 L117 - [1] 8 9 - [char] 10 14 - [(] 14 15 - [ichar] 15 20 - [(] 20 21 - [MOTS_COMMANDE] 21 34 - [(] 35 36 - [COMPTEUR] 36 44 - [)] 44 45 - [(] 45 46 - [NUM_CARACTERE] 46 59 - [:] 59 60 - [NUM_CARACTERE] 60 73 - [)] 73 74 - [)] 74 75 - [-] 76 77 - [INTERVALLE_MAJ_MIN] 78 96 - [)] 96 97 + [1] 8 8 + [char] 10 13 + [(] 14 14 + [ichar] 15 19 + [(] 20 20 + [MOTS_COMMANDE] 21 33 + [(] 35 35 + [COMPTEUR] 36 43 + [)] 44 44 + [(] 45 45 + [NUM_CARACTERE] 46 58 + [:] 59 59 + [NUM_CARACTERE] 60 72 + [)] 73 73 + [)] 74 74 + [-] 76 76 + [INTERVALLE_MAJ_MIN] 78 95 + [)] 96 96 L118 - [end] 40 43 - [if] 44 46 + [end] 40 42 + [if] 44 45 L119 - [end] 32 35 - [do] 36 38 + [end] 32 34 + [do] 36 37 L120 - [end] 24 27 - [do] 28 30 + [end] 24 26 + [do] 28 29 L133 - [if] 24 26 - [(] 27 28 - [NB_MOTS] 28 35 - [.] 36 37 - [eq] 37 39 - [.] 39 40 - [NB_MOTS_MAX] 41 52 - [)] 52 53 - [then] 54 58 + [if] 24 25 + [(] 27 27 + [NB_MOTS] 28 34 + [.] 36 36 + [eq] 37 38 + [.] 39 39 + [NB_MOTS_MAX] 41 51 + [)] 52 52 + [then] 54 57 L134 - [write] 32 37 - [(] 37 38 - [*] 38 39 - [,] 39 40 - [*] 40 41 - [)] 41 42 - [' '] 43 46 + [write] 32 36 + [(] 37 37 + [*] 38 38 + [,] 39 39 + [*] 40 40 + [)] 41 41 + [' '] 43 45 L135 - [write] 32 37 - [(] 37 38 - [*] 38 39 - [,] 39 40 - [*] 40 41 - [)] 41 42 - ['ERR> Trop de mot, veuillez ressai[ 43 81 + [write] 32 36 + [(] 37 37 + [*] 38 38 + [,] 39 39 + [*] 40 40 + [)] 41 41 + ['ERR> Trop de mot, veuillez ressai[ 43 80 L136 - [else] 24 28 + [else] 24 27 L139 - [if] 32 34 - [(] 35 36 - [MOTS_COMMANDE] 36 49 - [(] 50 51 - [ACTION] 51 57 - [)] 57 58 - [.] 59 60 - [eq] 60 62 - [.] 62 63 - ['TASK'] 64 70 - [)] 70 71 - [then] 72 76 + [if] 32 33 + [(] 35 35 + [MOTS_COMMANDE] 36 48 + [(] 50 50 + [ACTION] 51 56 + [)] 57 57 + [.] 59 59 + [eq] 60 61 + [.] 62 62 + ['TASK'] 64 69 + [)] 70 70 + [then] 72 75 L140 - [call] 40 44 - [TACHE] 45 50 - [(] 50 51 - [MOTS_COMMANDE] 51 64 - [,] 64 65 - [DESC] 66 70 - [,] 70 71 - [N] 72 73 - [)] 73 74 + [call] 40 43 + [TACHE] 45 49 + [(] 50 50 + [MOTS_COMMANDE] 51 63 + [,] 64 64 + [DESC] 66 69 + [,] 70 70 + [N] 72 72 + [)] 73 73 L141 - [else] 32 36 - [if] 37 39 - [(] 40 41 - [MOTS_COMMANDE] 41 54 - [(] 55 56 - [ACTION] 56 62 - [)] 62 63 - [.] 64 65 - [eq] 65 67 - [.] 67 68 - ['SHOW'] 69 75 - [)] 75 76 - [then] 77 81 + [else] 32 35 + [if] 37 38 + [(] 40 40 + [MOTS_COMMANDE] 41 53 + [(] 55 55 + [ACTION] 56 61 + [)] 62 62 + [.] 64 64 + [eq] 65 66 + [.] 67 67 + ['SHOW'] 69 74 + [)] 75 75 + [then] 77 80 L143 - [call] 40 44 - [SHOW] 45 49 - [(] 49 50 - [MOTS_COMMANDE] 50 63 - [,] 63 64 - [N] 65 66 - [)] 66 67 + [call] 40 43 + [SHOW] 45 48 + [(] 49 49 + [MOTS_COMMANDE] 50 62 + [,] 63 63 + [N] 65 65 + [)] 66 66 L144 - [else] 32 36 - [if] 37 39 - [(] 40 41 - [MOTS_COMMANDE] 41 54 - [(] 55 56 - [ACTION] 56 62 - [)] 62 63 - [.] 64 65 - [eq] 65 67 - [.] 67 68 - ['REMOVE'] 69 77 - [)] 77 78 - [then] 79 83 + [else] 32 35 + [if] 37 38 + [(] 40 40 + [MOTS_COMMANDE] 41 53 + [(] 55 55 + [ACTION] 56 61 + [)] 62 62 + [.] 64 64 + [eq] 65 66 + [.] 67 67 + ['REMOVE'] 69 76 + [)] 77 77 + [then] 79 82 L146 - [call] 40 44 - [REMOVE] 45 51 - [(] 51 52 - [MOTS_COMMANDE] 52 65 - [,] 65 66 - [DESC] 67 71 - [,] 71 72 - [N] 73 74 - [)] 74 75 + [call] 40 43 + [REMOVE] 45 50 + [(] 51 51 + [MOTS_COMMANDE] 52 64 + [,] 65 65 + [DESC] 67 70 + [,] 71 71 + [N] 73 73 + [)] 74 74 L147 - [else] 32 36 - [if] 37 39 - [(] 40 41 - [MOTS_COMMANDE] 41 54 - [(] 55 56 - [ACTION] 56 62 - [)] 62 63 - [.] 64 65 - [eq] 65 67 - [.] 67 68 - ['CLEAR'] 69 76 - [)] 76 77 - [then] 78 82 + [else] 32 35 + [if] 37 38 + [(] 40 40 + [MOTS_COMMANDE] 41 53 + [(] 55 55 + [ACTION] 56 61 + [)] 62 62 + [.] 64 64 + [eq] 65 66 + [.] 67 67 + ['CLEAR'] 69 75 + [)] 76 76 + [then] 78 81 L149 - [call] 40 44 - [CLEAR] 45 50 - [(] 50 51 - [MOTS_COMMANDE] 51 64 - [,] 64 65 - [N] 66 67 - [)] 67 68 + [call] 40 43 + [CLEAR] 45 49 + [(] 50 50 + [MOTS_COMMANDE] 51 63 + [,] 64 64 + [N] 66 66 + [)] 67 67 L150 - [else] 32 36 - [if] 37 39 - [(] 40 41 - [MOTS_COMMANDE] 41 54 - [(] 55 56 - [ACTION] 56 62 - [)] 62 63 - [.] 64 65 - [eq] 65 67 - [.] 67 68 - ['CANCEL'] 69 77 - [)] 77 78 - [then] 79 83 + [else] 32 35 + [if] 37 38 + [(] 40 40 + [MOTS_COMMANDE] 41 53 + [(] 55 55 + [ACTION] 56 61 + [)] 62 62 + [.] 64 64 + [eq] 65 66 + [.] 67 67 + ['CANCEL'] 69 76 + [)] 77 77 + [then] 79 82 L152 - [call] 40 44 - [CANCEL] 45 51 - [(] 51 52 - [MOTS_COMMANDE] 52 65 - [,] 65 66 - [N] 67 68 - [)] 68 69 + [call] 40 43 + [CANCEL] 45 50 + [(] 51 51 + [MOTS_COMMANDE] 52 64 + [,] 65 65 + [N] 67 67 + [)] 68 68 L153 - [else] 32 36 - [if] 37 39 - [(] 40 41 - [MOTS_COMMANDE] 41 54 - [(] 55 56 - [ACTION] 56 62 - [)] 62 63 - [.] 64 65 - [eq] 65 67 - [.] 67 68 - ['DONE'] 69 75 - [)] 75 76 - [then] 77 81 + [else] 32 35 + [if] 37 38 + [(] 40 40 + [MOTS_COMMANDE] 41 53 + [(] 55 55 + [ACTION] 56 61 + [)] 62 62 + [.] 64 64 + [eq] 65 66 + [.] 67 67 + ['DONE'] 69 74 + [)] 75 75 + [then] 77 80 L155 - [call] 40 44 - [DONE] 45 49 - [(] 49 50 - [MOTS_COMMANDE] 50 63 - [,] 63 64 - [N] 65 66 - [)] 66 67 + [call] 40 43 + [DONE] 45 48 + [(] 49 49 + [MOTS_COMMANDE] 50 62 + [,] 63 63 + [N] 65 65 + [)] 66 66 L156 - [else] 32 36 - [if] 37 39 - [(] 40 41 - [MOTS_COMMANDE] 41 54 - [(] 55 56 - [ACTION] 56 62 - [)] 62 63 - [.] 64 65 - [eq] 65 67 - [.] 67 68 - ['TODO'] 69 75 - [)] 75 76 - [then] 77 81 + [else] 32 35 + [if] 37 38 + [(] 40 40 + [MOTS_COMMANDE] 41 53 + [(] 55 55 + [ACTION] 56 61 + [)] 62 62 + [.] 64 64 + [eq] 65 66 + [.] 67 67 + ['TODO'] 69 74 + [)] 75 75 + [then] 77 80 L158 - [call] 40 44 - [TODO] 45 49 - [(] 49 50 - [MOTS_COMMANDE] 50 63 - [,] 63 64 - [N] 65 66 - [)] 66 67 + [call] 40 43 + [TODO] 45 48 + [(] 49 49 + [MOTS_COMMANDE] 50 62 + [,] 63 63 + [N] 65 65 + [)] 66 66 L159 - [else] 32 36 + [else] 32 35 L160 - [write] 40 45 - [(] 45 46 - [*] 46 47 - [,] 47 48 - [*] 48 49 - [)] 49 50 - [' '] 51 54 + [write] 40 44 + [(] 45 45 + [*] 46 46 + [,] 47 47 + [*] 48 48 + [)] 49 49 + [' '] 51 53 L161 - [write] 40 45 - [(] 45 46 - [*] 46 47 - [,] 47 48 - [*] 48 49 - [)] 49 50 - ['L'] 51 54 - ['action suivante n'] 54 73 - ['a pas ete'] 73 84 - [,] 84 85 + [write] 40 44 + [(] 45 45 + [*] 46 46 + [,] 47 47 + [*] 48 48 + [)] 49 49 + ['L'] 51 53 + ['action suivante n'] 54 72 + ['a pas ete'] 73 83 + [,] 84 84 L162 - [1] 8 9 - [' comprise: '] 10 23 - [,] 23 24 - [MOTS_COMMANDE] 25 38 - [(] 39 40 - [ACTION] 40 46 - [)] 46 47 + [1] 8 8 + [' comprise: '] 10 22 + [,] 23 23 + [MOTS_COMMANDE] 25 37 + [(] 39 39 + [ACTION] 40 45 + [)] 46 46 L163 - [end] 32 35 - [if] 36 38 + [end] 32 34 + [if] 36 37 L164 - [end] 24 27 - [if] 28 30 + [end] 24 26 + [if] 28 29 L165 - [end] 16 19 - [if] 20 22 + [end] 16 18 + [if] 20 21 L166 - [end] 8 11 - [do] 12 14 + [end] 8 10 + [do] 12 13 L167 - [end] 8 11 + [end] 8 10 EOF diff --git a/pmd-perl/src/test/java/net/sourceforge/pmd/lang/perl/cpd/PerlTokenizerTest.java b/pmd-perl/src/test/java/net/sourceforge/pmd/lang/perl/cpd/PerlTokenizerTest.java index ae90a538dba..4de92884d7b 100644 --- a/pmd-perl/src/test/java/net/sourceforge/pmd/lang/perl/cpd/PerlTokenizerTest.java +++ b/pmd-perl/src/test/java/net/sourceforge/pmd/lang/perl/cpd/PerlTokenizerTest.java @@ -6,7 +6,6 @@ import java.util.Properties; -import org.checkerframework.checker.nullness.qual.NonNull; import org.junit.Test; import net.sourceforge.pmd.cpd.PerlLanguage; @@ -23,7 +22,7 @@ public PerlTokenizerTest() { } @Override - public Tokenizer newTokenizer(@NonNull Properties properties) { + public Tokenizer newTokenizer(Properties properties) { return new PerlLanguage().getTokenizer(); } diff --git a/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt b/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt index 06f5c73a500..822223af75f 100644 --- a/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt +++ b/pmd-perl/src/test/resources/net/sourceforge/pmd/lang/perl/cpd/testdata/sample.txt @@ -1,48 +1,48 @@ [Image] or [Truncated image[ Bcol Ecol L5 - [use] 1 4 - [strict] 5 11 - [;] 11 12 + [use] 1 3 + [strict] 5 10 + [;] 11 11 L8 - [my] 1 3 - [$] 4 5 - [what] 5 9 - [=] 10 11 - ['fred|barney'] 12 25 - [;] 25 26 + [my] 1 2 + [$] 4 4 + [what] 5 8 + [=] 10 10 + ['fred|barney'] 12 24 + [;] 25 25 L10 - [while] 1 6 - [(] 7 8 - [<] 8 9 - [>] 9 10 - [)] 10 11 - [{] 12 13 + [while] 1 5 + [(] 7 7 + [<] 8 8 + [>] 9 9 + [)] 10 10 + [{] 12 12 L11 - [chomp] 5 10 - [;] 10 11 + [chomp] 5 9 + [;] 10 10 L18 - [if] 5 7 - [(] 8 9 - [/] 9 10 - [YOUR_PATTERN_GOES_HERE] 10 32 - [/] 32 33 - [)] 33 34 - [{] 35 36 + [if] 5 6 + [(] 8 8 + [/] 9 9 + [YOUR_PATTERN_GOES_HERE] 10 31 + [/] 32 32 + [)] 33 33 + [{] 35 35 L19 - [print] 2 7 - ['Matched: |$ `\n\t<$&>$|\\n'] 8 11 + [print] 2 6 + ['Matched: |$ `\n\t<$&>$|\\n'] 8 10 L20 - [;] 11 12 + [;] 11 11 L25 - [}] 5 6 - [else] 7 11 - [{] 12 13 + [}] 5 5 + [else] 7 10 + [{] 12 12 L26 - [print] 2 7 - ["No match.\\n"] 8 21 - [;] 21 22 + [print] 2 6 + ["No match.\\n"] 8 20 + [;] 21 21 L27 - [}] 5 6 + [}] 5 5 L29 - [}] 1 2 + [}] 1 1 EOF diff --git a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt index 73f541bc417..29428f45635 100644 --- a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt +++ b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/server.txt @@ -1,79 +1,80 @@ [Image] or [Truncated image[ Bcol Ecol L1 - [require] 1 8 - ["socket"] 9 17 + [require] 1 7 + ["socket"] 9 16 L3 - [gs] 1 3 - [=] 4 5 - [TCPServer] 7 16 - [.] 16 17 - [open] 17 21 - [(] 21 22 - [0] 22 23 - [)] 23 24 + [gs] 1 2 + [=] 4 4 + [TCPServer] 7 15 + [.] 16 16 + [open] 17 20 + [(] 21 21 + [0] 22 22 + [)] 23 23 L4 - [addr] 1 5 - [=] 7 8 - [gs] 9 11 - [.] 11 12 - [addr] 12 16 + [addr] 1 4 + [=] 7 7 + [gs] 9 10 + [.] 11 11 + [addr] 12 15 L5 - [addr] 1 5 - [.] 5 6 - [shift] 6 11 + [addr] 1 4 + [.] 5 5 + [shift] 6 10 L7 - [while] 1 6 - [true] 7 11 + [while] 1 5 + [true] 7 10 L8 - [ns] 3 5 - [=] 6 7 - [gs] 8 10 - [.] 10 11 - [accept] 11 17 + [ns] 3 4 + [=] 6 6 + [gs] 8 9 + [.] 10 10 + [accept] 11 16 L9 - [print] 3 8 - [(] 8 9 - [ns] 9 11 - [,] 11 12 - [" is accepted"] 13 27 - [)] 27 28 + [print] 3 7 + [(] 8 8 + [ns] 9 10 + [,] 11 11 + [" is accepted"] 13 26 + [)] 27 27 L10 - [Thread] 3 9 - [.] 9 10 - [start] 10 15 - [do] 16 18 + [Thread] 3 8 + [.] 9 9 + [start] 10 14 + [do] 16 17 L11 - [s] 5 6 - [=] 7 8 - [ns] 9 11 + [s] 5 5 + [=] 7 7 + [ns] 9 10 L12 - [while] 5 10 - [s] 11 12 - [.] 12 13 - [gets] 13 17 + [while] 5 9 + [s] 11 11 + [.] 12 12 + [gets] 13 16 L13 - [s] 7 8 - [.] 8 9 - [write] 9 14 - [(] 14 15 - [$] 15 16 - [_] 16 17 - [)] 17 18 + [s] 7 7 + [.] 8 8 + [write] 9 13 + [(] 14 14 + [$] 15 15 + [_] 16 16 + [)] 17 17 L14 - [end] 5 8 + [end] 5 7 L15 - [print] 5 10 - [(] 10 11 - [s] 11 12 - [,] 12 13 - [" is \n gone\n [ 14 37 - [)] 103 104 -L16 - [s] 5 6 - [.] 6 7 - [close] 7 12 -L17 - [end] 3 6 + [print] 5 9 + [(] 10 10 + [s] 11 11 + [,] 12 12 + [" is \n gone\n [ 14 36 L18 - [end] 1 4 + [)] 37 37 +L19 + [s] 5 5 + [.] 6 6 + [close] 7 11 +L20 + [end] 3 5 +L21 + [end] 1 3 EOF diff --git a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt index 06ecfb5d44a..05f23356f40 100644 --- a/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt +++ b/pmd-ruby/src/test/resources/net/sourceforge/pmd/lang/ruby/cpd/testdata/tabWidth.txt @@ -1,79 +1,80 @@ [Image] or [Truncated image[ Bcol Ecol L1 - [require] 1 8 - ["socket"] 9 17 + [require] 1 7 + ["socket"] 9 16 L3 - [gs] 1 3 - [=] 4 5 - [TCPServer] 7 16 - [.] 16 17 - [open] 17 21 - [(] 21 22 - [0] 22 23 - [)] 23 24 + [gs] 1 2 + [=] 4 4 + [TCPServer] 7 15 + [.] 16 16 + [open] 17 20 + [(] 21 21 + [0] 22 22 + [)] 23 23 L4 - [addr] 1 5 - [=] 7 8 - [gs] 9 11 - [.] 11 12 - [addr] 12 16 + [addr] 1 4 + [=] 7 7 + [gs] 9 10 + [.] 11 11 + [addr] 12 15 L5 - [addr] 1 5 - [.] 5 6 - [shift] 6 11 + [addr] 1 4 + [.] 5 5 + [shift] 6 10 L7 - [while] 1 6 - [true] 7 11 + [while] 1 5 + [true] 7 10 L8 - [ns] 2 4 - [=] 5 6 - [gs] 7 9 - [.] 9 10 - [accept] 10 16 + [ns] 2 3 + [=] 5 5 + [gs] 7 8 + [.] 9 9 + [accept] 10 15 L9 - [print] 2 7 - [(] 7 8 - [ns] 8 10 - [,] 10 11 - [" is accepted"] 12 26 - [)] 26 27 + [print] 2 6 + [(] 7 7 + [ns] 8 9 + [,] 10 10 + [" is accepted"] 12 25 + [)] 26 26 L10 - [Thread] 2 8 - [.] 8 9 - [start] 9 14 - [do] 15 17 + [Thread] 2 7 + [.] 8 8 + [start] 9 13 + [do] 15 16 L11 - [s] 3 4 - [=] 5 6 - [ns] 7 9 + [s] 3 3 + [=] 5 5 + [ns] 7 8 L12 - [while] 3 8 - [s] 9 10 - [.] 10 11 - [gets] 11 15 + [while] 3 7 + [s] 9 9 + [.] 10 10 + [gets] 11 14 L13 - [s] 4 5 - [.] 5 6 - [write] 6 11 - [(] 11 12 - [$] 12 13 - [_] 13 14 - [)] 14 15 + [s] 4 4 + [.] 5 5 + [write] 6 10 + [(] 11 11 + [$] 12 12 + [_] 13 13 + [)] 14 14 L14 - [end] 3 6 + [end] 3 5 L15 - [print] 3 8 - [(] 8 9 - [s] 9 10 - [,] 10 11 - [" is \n\t\t gone\n\t\t [ 12 35 - [)] 95 96 -L16 - [s] 3 4 - [.] 4 5 - [close] 5 10 -L17 - [end] 2 5 + [print] 3 7 + [(] 8 8 + [s] 9 9 + [,] 10 10 + [" is \n\t\t gone\n\t\t [ 12 34 L18 - [end] 1 4 + [)] 35 35 +L19 + [s] 3 3 + [.] 4 4 + [close] 5 9 +L20 + [end] 2 4 +L21 + [end] 1 3 EOF