Program: 17052
Project: 17052
Buggy source:
public List<VjoSemanticProblem> getVjoSemanticProblemOnDemand(String testFolderName,String pacakgeName,String checkedFileName,Class<? extends VjoValidationBaseTester> currentClass){
  m_jstType=null;
  m_unit=null;
  m_unitList.clear();
  if (testFolderName == null) {
    testFolderName=VjoValidationBaseTester.TEST_FOLDER;
  }
  URL testFile=null;
  if (pacakgeName == null) {
    try {
      testFile=ResourceUtil.getResource(currentClass,checkedFileName);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    pacakgeName=pacakgeName.replace('.','/');
    testFile=this.getClass().getClassLoader().getResource(pacakgeName + checkedFileName);
  }
  if (testFile == null) {
    System.out.println("String_Node_Str" + pacakgeName);
    System.out.println("String_Node_Str" + currentClass.getName());
    System.out.println("String_Node_Str" + checkedFileName);
    System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
    System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
    throw new RuntimeException("String_Node_Str");
  }
  String typeName=getTypeName(testFile.getFile());
  IScriptUnit unit=m_c.parse(ONDEMAND,typeName,VjoParser.getContent(testFile));
  final JstTypeSpaceMgr mgr=new JstTypeSpaceMgr(m_c,new OnDemandValidationTestLoader(ONDEMAND,unit.getType(),testFile));
  mgr.getConfig().setSynchronousEvents(true);
  mgr.initialize();
  TsLibLoader.loadDefaultLibs(mgr);
  List<String> libs=new ArrayList<String>();
  libs.addAll(Arrays.asList(TsLibLoader.getDefaultLibNames()));
  mgr.registerTypeSpaceEventListener(new ITypeSpaceEventListener(){
    private volatile boolean done=false;
    @SuppressWarnings("String_Node_Str") @Override public void onUpdated(    TypeSpaceEvent event,    EventListenerStatus status){
      if (!done && EventId.Updated == event.getId()) {
        final Object trigger=event.getTrigger();
        if (trigger instanceof AddGroupEvent) {
          final AddGroupEvent addGroupEvt=(AddGroupEvent)trigger;
          final String groupName=addGroupEvt.getGroupName();
          final Group<IJstType> group=(Group<IJstType>)mgr.getTypeSpace().getGroup(groupName);
          if (group != null && ONDEMAND.equals(group.getName())) {
            final String[] libraries={JstTypeSpaceMgr.JAVA_PRIMITIVE_GRP,JstTypeSpaceMgr.JS_BROWSER_GRP,JstTypeSpaceMgr.JS_NATIVE_GRP,JstTypeSpaceMgr.VJO_BASE_LIB_NAME,JstTypeSpaceMgr.VJO_SELF_DESCRIBED};
            for (            String lib : libraries) {
              final IGroup<IJstType> libGroup=mgr.getTypeSpace().getGroup(lib);
              if (lib != null) {
                group.addGroupDependency(libGroup);
              }
            }
            done=true;
          }
        }
      }
    }
    @Override public void onUnloaded(    TypeSpaceEvent event,    EventListenerStatus status){
    }
    @Override public void onLoaded(    TypeSpaceEvent event,    EventListenerStatus status){
    }
  }
);
  mgr.processEvent(new AddGroupEvent(ONDEMAND,null,Collections.EMPTY_LIST,Collections.EMPTY_LIST,libs));
  unit=m_c.parseAndResolve(ONDEMAND,typeName,VjoParser.getContent(testFile));
  TestCase.assertNotNull(mgr.getTypeSpace().getGroup(ONDEMAND));
  TestCase.assertNotNull(mgr.getQueryExecutor().findAllTypesInPackage(unit.getType().getPackage().getName()));
  VjoValidationResult result=doValidate(unit,mgr);
  return result.getAllProblems();
}

Fixed version (ground truth):
public List<VjoSemanticProblem> getVjoSemanticProblemOnDemand(String testFolderName,String pacakgeName,String checkedFileName,Class<? extends VjoValidationBaseTester> currentClass,String groupName,boolean printTree){
  if (groupName == null) {
    groupName=ONDEMAND;
  }
  final String grpName=groupName;
  m_jstType=null;
  m_unit=null;
  m_unitList.clear();
  if (testFolderName == null) {
    testFolderName=VjoValidationBaseTester.TEST_FOLDER;
  }
  URL testFile=null;
  if (pacakgeName == null) {
    try {
      testFile=ResourceUtil.getResource(currentClass,checkedFileName);
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
 else {
    pacakgeName=pacakgeName.replace('.','/');
    testFile=this.getClass().getClassLoader().getResource(pacakgeName + checkedFileName);
  }
  if (testFile == null) {
    System.out.println("String_Node_Str" + pacakgeName);
    System.out.println("String_Node_Str" + currentClass.getName());
    System.out.println("String_Node_Str" + checkedFileName);
    System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
    System.out.println("String_Node_Str" + System.getProperty("String_Node_Str"));
    throw new RuntimeException("String_Node_Str");
  }
  String typeName=getTypeName(testFile.getFile());
  IScriptUnit unit=m_c.parse(grpName,typeName,VjoParser.getContent(testFile));
  final JstTypeSpaceMgr mgr=new JstTypeSpaceMgr(m_c,new OnDemandValidationTestLoader(grpName,unit.getType(),testFile));
  mgr.getConfig().setSynchronousEvents(true);
  mgr.initialize();
  TsLibLoader.loadDefaultLibs(mgr);
  List<String> libs=new ArrayList<String>();
  libs.addAll(Arrays.asList(TsLibLoader.getDefaultLibNames()));
  mgr.registerTypeSpaceEventListener(new ITypeSpaceEventListener(){
    private volatile boolean done=false;
    @SuppressWarnings("String_Node_Str") @Override public void onUpdated(    TypeSpaceEvent event,    EventListenerStatus status){
      if (!done && EventId.Updated == event.getId()) {
        final Object trigger=event.getTrigger();
        if (trigger instanceof AddGroupEvent) {
          final AddGroupEvent addGroupEvt=(AddGroupEvent)trigger;
          final String groupName=addGroupEvt.getGroupName();
          final Group<IJstType> group=(Group<IJstType>)mgr.getTypeSpace().getGroup(groupName);
          if (group != null && grpName.equals(group.getName())) {
            final String[] libraries={JstTypeSpaceMgr.JAVA_PRIMITIVE_GRP,JstTypeSpaceMgr.JS_BROWSER_GRP,JstTypeSpaceMgr.JS_NATIVE_GRP,JstTypeSpaceMgr.VJO_BASE_LIB_NAME,JstTypeSpaceMgr.VJO_SELF_DESCRIBED};
            for (            String lib : libraries) {
              final IGroup<IJstType> libGroup=mgr.getTypeSpace().getGroup(lib);
              if (lib != null) {
                group.addGroupDependency(libGroup);
              }
            }
            done=true;
          }
        }
      }
    }
    @Override public void onUnloaded(    TypeSpaceEvent event,    EventListenerStatus status){
    }
    @Override public void onLoaded(    TypeSpaceEvent event,    EventListenerStatus status){
    }
  }
);
  mgr.processEvent(new AddGroupEvent(grpName,null,Collections.EMPTY_LIST,Collections.EMPTY_LIST,libs));
  if (printTree)   ParseUtils.printTree2(unit.getType());
  unit=m_c.parseAndResolve(grpName,typeName,VjoParser.getContent(testFile));
  if (printTree)   ParseUtils.printTree2(unit.getType());
  TestCase.assertNotNull(mgr.getTypeSpace().getGroup(grpName));
  TestCase.assertNotNull(mgr.getQueryExecutor().findAllTypesInPackage(unit.getType().getPackage().getName()));
  VjoValidationResult result=doValidate(unit,mgr);
  return result.getAllProblems();
}