test_class.file: web-framework/src/test/java/org/unidal/web/jsp/tag/ErrorTagTest.java
test_class.identifier: ErrorTagTest
test_case.body: @Test
     public void testCode() {
        ErrorTag tag = new ErrorTag();
  
        String result = tag.processBody("Code is ${code}.", new ErrorObject("id"));
        String expected = "Code is id.";
  
        Assert.assertEquals(expected, result);
     }
test_case.class_method_signature: ErrorTagTest.testCode()
test_case.full_signature: @Test public void testCode()
test_case.identifier: testCode
test_case.invocations: processBody assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCode()
focal_class.declarator: serialVersionUID = 1L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 1L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: m_code
focal_class.modifier: private
focal_class.original_string: private String m_code;
focal_class.type: String
focal_class.var_name: m_code
focal_class.declarator: m_enabled = true
focal_class.modifier: private
focal_class.original_string: private boolean m_enabled = true;
focal_class.type: boolean
focal_class.var_name: m_enabled
focal_class.file: web-framework/src/main/java/org/unidal/web/jsp/tag/ErrorTag.java
focal_class.identifier: ErrorTag
focal_class.class_method_signature: ErrorTag.findError(String code)
focal_class.full_signature: private ErrorObject findError(String code)
focal_class.identifier: findError
focal_class.modifiers: private
focal_class.parameters: (String code)
focal_class.return: ErrorObject
focal_class.signature: ErrorObject findError(String code)
focal_class.class_method_signature: ErrorTag.findMessagePattern(String code, ErrorsTag parent)
focal_class.full_signature: private String findMessagePattern(String code, ErrorsTag parent)
focal_class.identifier: findMessagePattern
focal_class.modifiers: private
focal_class.parameters: (String code, ErrorsTag parent)
focal_class.return: String
focal_class.signature: String findMessagePattern(String code, ErrorsTag parent)
focal_class.class_method_signature: ErrorTag.getErrors()
focal_class.full_signature: private List<ErrorObject> getErrors()
focal_class.identifier: getErrors
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: List<ErrorObject>
focal_class.signature: List<ErrorObject> getErrors()
focal_class.class_method_signature: ErrorTag.handleBody()
focal_class.full_signature: @Override protected void handleBody()
focal_class.identifier: handleBody
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void handleBody()
focal_class.class_method_signature: ErrorTag.out(String str)
focal_class.full_signature: private void out(String str)
focal_class.identifier: out
focal_class.modifiers: private
focal_class.parameters: (String str)
focal_class.return: void
focal_class.signature: void out(String str)
focal_class.class_method_signature: ErrorTag.processBody(String body, ErrorObject error)
focal_class.full_signature:  String processBody(String body, ErrorObject error)
focal_class.identifier: processBody
focal_class.parameters: (String body, ErrorObject error)
focal_class.return: String
focal_class.signature: String processBody(String body, ErrorObject error)
focal_class.class_method_signature: ErrorTag.processPlaceholder(String name, ErrorObject error)
focal_class.full_signature:  String processPlaceholder(String name, ErrorObject error)
focal_class.identifier: processPlaceholder
focal_class.parameters: (String name, ErrorObject error)
focal_class.return: String
focal_class.signature: String processPlaceholder(String name, ErrorObject error)
focal_class.class_method_signature: ErrorTag.setCode(String code)
focal_class.full_signature: @AttributeMeta(required = true) public void setCode(String code)
focal_class.identifier: setCode
focal_class.modifiers: @AttributeMeta(required = true) public
focal_class.parameters: (String code)
focal_class.return: void
focal_class.signature: void setCode(String code)
focal_class.class_method_signature: ErrorTag.setEnabled(boolean enabled)
focal_class.full_signature: @AttributeMeta public void setEnabled(boolean enabled)
focal_class.identifier: setEnabled
focal_class.modifiers: @AttributeMeta public
focal_class.parameters: (boolean enabled)
focal_class.return: void
focal_class.signature: void setEnabled(boolean enabled)
focal_class.superclass: extends AbstractBodyTag
focal_method.body: String processBody(String body, ErrorObject error) {
        StringBuilder sb = new StringBuilder(2048);
        int len = body.length();
        boolean dollar = false;
        int bracketStart = -1;
  
        for (int i = 0; i < len; i++) {
           char ch = body.charAt(i);
  
           switch (ch) {
           case '$':
              if (dollar) {
                 sb.append(ch);
              }
  
              dollar = true;
              break;
           case '{':
              if (dollar) {
                 bracketStart = i;
                 dollar = false;
              } else {
                 sb.append(ch);
              }
              break;
           case '}':
              if (bracketStart >= 0) {
                 String name = body.substring(bracketStart + 1, i);
                 String value = processPlaceholder(name.trim(), error);
  
                 if (value != null) {
                    sb.append(value);
                 }
              }
  
              bracketStart = -1;
              break;
           case '\\':
              if (i + 1 < len) {
                 char ch2 = body.charAt(i + 1);
  
                 if (ch2 == '\\' || ch2 == '$') {
                    sb.append(ch2);
                    i++;
                    break;
                 }
              }
  
              // break through
           default:
              if (bracketStart < 0) {
                 if (dollar) {
                    sb.append('$');
                 }
  
                 sb.append(ch);
                 dollar = false;
              }
  
              break;
           }
        }
  
        return sb.toString();
     }
focal_method.class_method_signature: ErrorTag.processBody(String body, ErrorObject error)
focal_method.full_signature:  String processBody(String body, ErrorObject error)
focal_method.identifier: processBody
focal_method.invocations: length charAt append append substring processPlaceholder trim append charAt append append append toString
focal_method.parameters: (String body, ErrorObject error)
focal_method.return: String
focal_method.signature: String processBody(String body, ErrorObject error)