title: Problem with AWK when after changing the print order
body: <p>I have a problem procesing some java classes that I can't understand why it happens, it doesn't have any logic to me.</p>
  
  <p>I want to extract just the attributes of each class. I have (for example) class "oplyanxp.java":</p>
  
  <pre><code>private static final long serialVersionUID = 1584084300397L;
  private OTrnPrcS oTrnPrcS = new OTrnPrcS();
  private OPlyAnxS oPlyAnxS;
  </code></pre>
  
  <p>and class "oplyanxs.java":</p>
  
  <pre><code>private static final long serialVersionUID = 1584084300397L;
  private java.math.BigDecimal  cmpVal;
  private java.lang.String  qtnVal;
  private java.lang.String  plyVal;
  </code></pre>
  
  <p>I run this script for each class:</p>
  
  <pre><code>awk '{if (($1 == "private") &amp;&amp; ($5 != "serialVersionUID")) {print $1" "$2" "$3}}' oplyanxp.java
  awk '{if (($1 == "private") &amp;&amp; ($5 != "serialVersionUID")) {print $1" "$2" "$3}}' oplyanxs.java
  </code></pre>
  
  <p>and the result is ok:</p>
  
  <p>oplyanxp.java</p>
  
  <pre><code>  private OTrnPrcS oTrnPrcS
    private OPlyAnxS oPlyAnxS;
  </code></pre>
  
  <p>oplyanxs.java</p>
  
  <pre><code>  private java.math.BigDecimal cmpVal;
    private java.lang.String qtnVal;
    private java.lang.String plyVal;
  </code></pre>
  
  <p>but if I change the parameter print order:</p>
  
  <pre><code>awk '{if (($1 == "private") &amp;&amp; ($5 != "serialVersionUID")) {print $1" "$3" "$2}}' oplyanxp.java
  awk '{if (($1 == "private") &amp;&amp; ($5 != "serialVersionUID")) {print $1" "$3" "$2}}' oplyanxs.java
  </code></pre>
  
  <p>the result for class "oplyanxs.java" is fine:</p>
  
  <pre><code>  private cmpVal; java.math.BigDecimal
    private qtnVal; java.lang.String
    private plyVal; java.lang.String
  </code></pre>
  
  <p>but for class "oplyanxs.java" is wrong:</p>
  
  <pre><code>  private oTrnPrcS OTrnPrcS
     OPlyAnxSPlyAnxS;
  </code></pre>
  
  <p>I have also another class (oplyanxcpt.java) with more.less the same problem:</p>
  
  <pre><code>private static final long serialVersionUID = 1584084300397L;
  private String prcTrmVal;
  private List&lt;OPlyAnxP&gt; oPlyAnxPT;
  </code></pre>
  
  <hr>
  
  <pre><code>awk '{if (($1 == "private") &amp;&amp; ($5 != "serialVersionUID")) {print $1" "$2" "$3}}' oplyanxcpt.java
  private String prcTrmVal;
  private List&lt;OPlyAnxP&gt; oPlyAnxPT;
  </code></pre>
  
  <hr>
  
  <pre><code>awk '{if (($1 == "private") &amp;&amp; ($5 != "serialVersionUID")) {print $1" "$3" "$2}}' oplyanxcpt.java
  String prcTrmVal;
  List&lt;OPlyAnxP&gt;PT;
  </code></pre>
  
  <p>I can't understand what the problem is, why it works for a class and not for the others. All files are in utf-8 encoding.</p>
  
  <p>Anybody have any idea of the problem?</p>