public void doSmap(org.apache.jasper.compiler.NodeRemoteInterface n) throws RemoteException {
   try {
     doSmap(n, 1, n.getEndJavaLine() - n.getBeginJavaLine(), 0);
   } catch (Exception excp) {
     excp.printStackTrace();
   }
 }
 @Override
 public void visitBody(org.apache.jasper.compiler.NodeRemoteInterface n)
     throws JasperException, RemoteException {
   try {
     org.apache.jasper.compiler.SmapStratumRemoteInterface smapSave = smap;
     String innerClass = n.getInnerClassName();
     if (innerClass != null) {
       this.smap = innerClassMap.get(innerClass);
     }
     super.visitBody(n);
     smap = smapSave;
   } catch (Exception excp) {
     excp.printStackTrace();
   }
 }
  public void doSmap(
      org.apache.jasper.compiler.NodeRemoteInterface n,
      int inLineCount,
      int outIncrement,
      int skippedLines)
      throws RemoteException {
    try {
      org.apache.jasper.compiler.MarkRemoteInterface mark = n.getStart();
      if (mark == null) {
        return;
      }

      String unqualifiedName = gerenciadornuvem1.SmapUtilunqualify(mark.getFile());
      smap.addFile(unqualifiedName, mark.getFile());
      smap.addLineData(
          mark.getLineNumber() + skippedLines,
          mark.getFile(),
          inLineCount - skippedLines,
          n.getBeginJavaLine() + skippedLines,
          outIncrement);
    } catch (Exception excp) {
      excp.printStackTrace();
    }
  }
  public void doSmapText(org.apache.jasper.compiler.NodeRemoteInterface n) throws RemoteException {
    try {
      String text = n.getText();
      int index = 0;
      int next = 0;
      int lineCount = 1;
      int skippedLines = 0;
      boolean slashStarSeen = false;
      boolean beginning = true;

      // Count lines inside text, but skipping comment lines at the
      // beginning of the text.
      while ((next = text.indexOf('\n', index)) > -1) {
        if (beginning) {
          String line = text.substring(index, next).trim();
          if (!slashStarSeen && line.startsWith("/*")) {
            slashStarSeen = true;
          }
          if (slashStarSeen) {
            skippedLines++;
            int endIndex = line.indexOf("*/");
            if (endIndex >= 0) {
              // End of /* */ comment
              slashStarSeen = false;
              if (endIndex < line.length() - 2) {
                // Some executable code after comment
                skippedLines--;
                beginning = false;
              }
            }
          } else if (line.length() == 0 || line.startsWith("//")) {
            skippedLines++;
          } else {
            beginning = false;
          }
        }
        lineCount++;
        index = next + 1;
      }

      doSmap(n, lineCount, 1, skippedLines);
    } catch (Exception excp) {
      excp.printStackTrace();
    }
  }