Program: 60315
Project: 60315
Buggy source:
@SuppressWarnings("String_Node_Str") private TableData fetchData(String dataVar){
  TableData data=null;
  if (dataVar != null) {
    int rangeMarker=dataVar.indexOf("String_Node_Str");
    if (rangeMarker > 0) {
      int rangeMarker2=dataVar.indexOf("String_Node_Str",rangeMarker);
      if (rangeMarker2 < 0)       rangeMarker2=dataVar.length();
      String range=dataVar.substring(rangeMarker + 1,rangeMarker2);
      dataVar=dataVar.substring(0,rangeMarker);
      registerOption("String_Node_Str",range);
    }
    char c0=dataVar.charAt(0);
    boolean isDirective=false;
    if (c0 == '^' || c0 == '.') {
      dataVar=RegexFilter.applyRegex(dataVar,"String_Node_Str");
      isDirective=true;
    }
    if (isDirective || c0 == '~' || c0 == '$') {
      dataVar=dataVar.substring(1);
      if (chunk != null) {
        Object dataStore=chunk.get(dataVar);
        int depth=0;
        while (dataStore != null && depth < 10) {
          if (dataStore instanceof TableData) {
            data=(TableData)dataStore;
          }
 else           if (dataStore instanceof String) {
            data=InlineTable.parseTable((String)dataStore);
          }
 else           if (dataStore instanceof Snippet) {
            Snippet snippetData=(Snippet)dataStore;
            if (snippetData.isSimplePointer()) {
              dataStore=chunk.get(snippetData.getPointer());
              depth++;
              continue;
            }
 else {
              data=InlineTable.parseTable(snippetData.toString());
            }
          }
 else           if (dataStore instanceof String[]) {
            data=new SimpleTable((String[])dataStore);
          }
 else           if (dataStore instanceof List) {
            List list=(List)dataStore;
            if (list.size() > 0) {
              Object a=list.get(0);
              if (a instanceof String) {
                data=new SimpleTable(list);
              }
 else               if (a instanceof Map) {
                data=new TableOfMaps(list);
              }
 else {
                data=TableOfMaps.boxObjectList((List)dataStore);
              }
            }
          }
 else           if (dataStore instanceof Object[]) {
            data=DataCapsuleTable.extractData((Object[])dataStore);
            if (data == null) {
              data=TableOfMaps.boxObjectArray((Object[])dataStore);
            }
          }
 else           if (dataStore instanceof Map) {
            Map object=(Map)dataStore;
            data=new ObjectTable(object);
          }
          break;
        }
      }
    }
 else {
      if (chunk != null) {
        String tableAsString=chunk.getTemplateSet().fetch(dataVar);
        if (tableAsString != null) {
          data=InlineTable.parseTable(tableAsString);
        }
      }
    }
  }
  return data;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private TableData fetchData(String dataVar,String origin){
  TableData data=null;
  if (dataVar != null) {
    int rangeMarker=dataVar.indexOf("String_Node_Str");
    if (rangeMarker > 0) {
      int rangeMarker2=dataVar.indexOf("String_Node_Str",rangeMarker);
      if (rangeMarker2 < 0)       rangeMarker2=dataVar.length();
      String range=dataVar.substring(rangeMarker + 1,rangeMarker2);
      dataVar=dataVar.substring(0,rangeMarker);
      registerOption("String_Node_Str",range);
    }
    char c0=dataVar.charAt(0);
    boolean isDirective=false;
    if (c0 == '^' || c0 == '.') {
      dataVar=RegexFilter.applyRegex(dataVar,"String_Node_Str");
      isDirective=true;
    }
    if (isDirective || c0 == '~' || c0 == '$') {
      dataVar=dataVar.substring(1);
      if (chunk != null) {
        Object dataStore=chunk.get(dataVar);
        int depth=0;
        while (dataStore != null && depth < 10) {
          if (dataStore instanceof TableData) {
            data=(TableData)dataStore;
          }
 else           if (dataStore instanceof String) {
            data=InlineTable.parseTable((String)dataStore);
          }
 else           if (dataStore instanceof Snippet) {
            Snippet snippetData=(Snippet)dataStore;
            if (snippetData.isSimplePointer()) {
              dataStore=chunk.get(snippetData.getPointer());
              depth++;
              continue;
            }
 else {
              data=InlineTable.parseTable(snippetData.toString());
            }
          }
 else           if (dataStore instanceof String[]) {
            data=new SimpleTable((String[])dataStore);
          }
 else           if (dataStore instanceof List) {
            List list=(List)dataStore;
            if (list.size() > 0) {
              Object a=list.get(0);
              if (a instanceof String) {
                data=new SimpleTable(list);
              }
 else               if (a instanceof Map) {
                data=new TableOfMaps(list);
              }
 else {
                data=TableOfMaps.boxObjectList((List)dataStore);
              }
            }
          }
 else           if (dataStore instanceof Object[]) {
            data=DataCapsuleTable.extractData((Object[])dataStore);
            if (data == null) {
              data=TableOfMaps.boxObjectArray((Object[])dataStore);
            }
          }
 else           if (dataStore instanceof Map) {
            Map object=(Map)dataStore;
            data=new ObjectTable(object);
          }
          break;
        }
      }
    }
 else {
      if (chunk != null) {
        dataVar=qualifyTemplateRef(origin,dataVar);
        String tableAsString=chunk.getTemplateSet().fetch(dataVar);
        if (tableAsString != null) {
          data=InlineTable.parseTable(tableAsString);
        }
      }
    }
  }
  return data;
}