private void addScriptingLineInfo(Element jspElement) {
        JspId jspId = new JspId(jspElement.getAttributeNS(Constants.JSP_NAMESPACE, "id"));
        if (fileList.contains(jspId.getFilePath()) == false) {
            smapStratum.addFile(jspId.getFileName(), jspId.getFilePath());
            fileList.add(jspId.getFilePath()); //227804
        }
        if (jspId.getStartGeneratedLineNum() > 0) {
            CDATASection cdata = (CDATASection)jspElement.getChildNodes().item(0);
            BufferedReader reader = new BufferedReader(new StringReader(cdata.getData()));
            int skipLeadingCount = 0;
            int skipTrailingCount = 0;
            int lineCount = 0;
            boolean contentFound = false;
            try {
                for (String line = null;(line = reader.readLine()) != null;) {
                    lineCount++;
                    if (line.trim().length() < 1) {
                        if (contentFound) {
                            skipTrailingCount++;
                        }
                        else {
                            skipLeadingCount++;
                        }
                    }
                    else {
                        contentFound = true;
                        skipTrailingCount = 0;
                    }
                }
            }
            catch (IOException ex) {}
            smapStratum.addLineData(jspId.getStartSourceLineNum()+skipLeadingCount,
                                    jspId.getFileName(),
                                    lineCount - skipLeadingCount - skipTrailingCount,
                                    jspId.getStartGeneratedLineNum()+skipLeadingCount,
                                    1);
        }
    }
private void addScriptingLineInfo ( Element jspElement ) { JspId jspId = new JspId ( jspElement . getAttributeNS ( Constants . JSP_NAMESPACE , "id" ) ) ; if ( fileList . contains ( jspId . getFilePath ( ) ) == false ) { smapStratum . addFile ( jspId . getFileName ( ) , jspId . getFilePath ( ) ) ; fileList . add ( jspId . getFilePath ( ) ) ; } if ( jspId . getStartGeneratedLineNum ( ) > 0 ) { CDATASection cdata = ( CDATASection ) jspElement . getChildNodes ( ) . item ( 0 ) ; BufferedReader reader = new BufferedReader ( new StringReader ( cdata . getData ( ) ) ) ; int skipLeadingCount = 0 ; int skipTrailingCount = 0 ; int lineCount = 0 ; boolean contentFound = false ; try { for ( String line = null ; ( line = reader . readLine ( ) ) != null ; ) { lineCount ++ ; if ( line . trim ( ) . length ( ) < 1 ) { if ( contentFound ) { skipTrailingCount ++ ; } else { skipLeadingCount ++ ; } } else { contentFound = true ; skipTrailingCount = 0 ; } } } catch ( IOException ex ) { } smapStratum . addLineData ( jspId . getStartSourceLineNum ( ) + skipLeadingCount , jspId . getFileName ( ) , lineCount - skipLeadingCount - skipTrailingCount , jspId . getStartGeneratedLineNum ( ) + skipLeadingCount , 1 ) ; } }
/* New method for Defect 260728