Program: 44294
Project: 44294
Buggy source:
/** 
 * Parses a Jelly script and lists up all the property names used in there.
 */
private Set<String> findAllProperties(File file) throws MojoExecutionException {
  getLog().debug("String_Node_Str" + file);
  try {
    final Set<String> properties=new LinkedHashSet<String>();
    parser.parse(file,new DefaultHandler(){
      private final StringBuilder buf=new StringBuilder();
      private Locator locator;
      public void setDocumentLocator(      Locator locator){
        this.locator=locator;
      }
      public void startElement(      String uri,      String localName,      String qName,      Attributes attributes) throws SAXException {
        findExpressions();
      }
      public void endElement(      String uri,      String localName,      String qName) throws SAXException {
        findExpressions();
      }
      public void characters(      char ch[],      int start,      int length) throws SAXException {
        buf.append(ch,start,length);
      }
      /** 
 * Find property references of the form "${%xxx(...)}" from   {@link #buf}and list up property names.
 */
      private void findExpressions() throws SAXParseException {
        int idx=0;
        do {
          idx=buf.indexOf("String_Node_Str",idx);
          if (idx < 0)           break;
          int end=buf.indexOf("String_Node_Str",idx);
          if (end == -1)           throw new SAXParseException("String_Node_Str",locator);
          String exp=buf.substring(idx + 3,end);
          getLog().debug("String_Node_Str" + exp);
          int op=exp.indexOf('(');
          if (op >= 0)           exp=exp.substring(0,op);
          properties.add(exp);
        }
 while (true);
        buf.setLength(0);
      }
    }
);
    return properties;
  }
 catch (  SAXException e) {
    throw new MojoExecutionException("String_Node_Str" + file,e);
  }
catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str" + file,e);
  }
}

Fixed version (ground truth):
/** 
 * Parses a Jelly script and lists up all the property names used in there.
 */
private Set<String> findAllProperties(File file) throws MojoExecutionException {
  getLog().debug("String_Node_Str" + file);
  try {
    final Set<String> properties=new LinkedHashSet<String>();
    parser.parse(file,new DefaultHandler(){
      private final StringBuilder buf=new StringBuilder();
      private Locator locator;
      public void setDocumentLocator(      Locator locator){
        this.locator=locator;
      }
      public void startElement(      String uri,      String localName,      String qName,      Attributes attributes) throws SAXException {
        findExpressions();
      }
      public void endElement(      String uri,      String localName,      String qName) throws SAXException {
        findExpressions();
      }
      public void characters(      char ch[],      int start,      int length) throws SAXException {
        buf.append(ch,start,length);
      }
      /** 
 * Find property references of the form "${%xxx(...)}" from   {@link #buf}and list up property names.
 */
      private void findExpressions() throws SAXParseException {
        int idx=-1;
        do {
          idx=buf.indexOf("String_Node_Str",idx + 1);
          if (idx < 0)           break;
          int end=buf.indexOf("String_Node_Str",idx);
          if (end == -1)           throw new SAXParseException("String_Node_Str",locator);
          String exp=buf.substring(idx + 3,end);
          getLog().debug("String_Node_Str" + exp);
          int op=exp.indexOf('(');
          if (op >= 0)           exp=exp.substring(0,op);
          properties.add(exp);
        }
 while (true);
        buf.setLength(0);
      }
    }
);
    return properties;
  }
 catch (  SAXException e) {
    throw new MojoExecutionException("String_Node_Str" + file,e);
  }
catch (  IOException e) {
    throw new MojoExecutionException("String_Node_Str" + file,e);
  }
}