test_class.declarator: A_FAMOUS_CATEGORY = "People of UKP"
test_class.modifier: private static final
test_class.original_string: private static final String A_FAMOUS_CATEGORY = "People of UKP";
test_class.type: String
test_class.var_name: A_FAMOUS_CATEGORY
test_class.declarator: A_FAMOUS_PAGE_ID = 8
test_class.modifier: private static final
test_class.original_string: private static final int A_FAMOUS_PAGE_ID = 8;
test_class.type: int
test_class.var_name: A_FAMOUS_PAGE_ID
test_class.declarator: A_FAMOUS_PAGE_OBJECT_ID = 4
test_class.modifier: private static final
test_class.original_string: private static final long A_FAMOUS_PAGE_OBJECT_ID = 4;
test_class.type: long
test_class.var_name: A_FAMOUS_PAGE_OBJECT_ID
test_class.file: de.tudarmstadt.ukp.wikipedia.api/src/test/java/de/tudarmstadt/ukp/wikipedia/api/CategoryTest.java
test_class.identifier: CategoryTest
test_class.superclass: extends BaseJWPLTest
test_case.body: @Test
      public void testNumberOfCategoryParents(){
          Category cat;
          try {
              cat = wiki.getCategory(A_FAMOUS_CATEGORY);
              assertNotNull(cat);
              int numberOfParents = cat.getNumberOfParents();
              // expecting IDs: 5 and 6 to make up for 2 parent categories
              assertEquals(2, numberOfParents);
              
          } catch (WikiApiException e) {
              fail("A WikiApiException occurred while getting the category 'People of UKP': " + e.getLocalizedMessage());
          }
      }
test_case.class_method_signature: CategoryTest.testNumberOfCategoryParents()
test_case.full_signature: @Test public void testNumberOfCategoryParents()
test_case.identifier: testNumberOfCategoryParents
test_case.invocations: getCategory assertNotNull getNumberOfParents assertEquals fail getLocalizedMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNumberOfCategoryParents()
focal_class.declarator: catDAO
focal_class.modifier: private
focal_class.original_string: private CategoryDAO catDAO;
focal_class.type: CategoryDAO
focal_class.var_name: catDAO
focal_class.declarator: hibernateCategory
focal_class.modifier: private
focal_class.original_string: private de.tudarmstadt.ukp.wikipedia.api.hibernate.Category hibernateCategory;
focal_class.type: de.tudarmstadt.ukp.wikipedia.api.hibernate.Category
focal_class.var_name: hibernateCategory
focal_class.declarator: wiki
focal_class.modifier: private
focal_class.original_string: private Wikipedia wiki;
focal_class.type: Wikipedia
focal_class.var_name: wiki
focal_class.file: de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Category.java
focal_class.identifier: Category
focal_class.interfaces: implements WikiConstants
focal_class.class_method_signature: Category.Category(Wikipedia wiki, long id)
focal_class.full_signature: protected  Category(Wikipedia wiki, long id)
focal_class.identifier: Category
focal_class.modifiers: protected
focal_class.parameters: (Wikipedia wiki, long id)
focal_class.signature:  Category(Wikipedia wiki, long id)
focal_class.class_method_signature: Category.Category(Wikipedia wiki, int pageID)
focal_class.full_signature: protected  Category(Wikipedia wiki, int pageID)
focal_class.identifier: Category
focal_class.modifiers: protected
focal_class.parameters: (Wikipedia wiki, int pageID)
focal_class.signature:  Category(Wikipedia wiki, int pageID)
focal_class.class_method_signature: Category.Category(Wikipedia wiki, String pName)
focal_class.full_signature: public  Category(Wikipedia wiki, String pName)
focal_class.identifier: Category
focal_class.modifiers: public
focal_class.parameters: (Wikipedia wiki, String pName)
focal_class.signature:  Category(Wikipedia wiki, String pName)
focal_class.class_method_signature: Category.createCategory(long id)
focal_class.full_signature: private void createCategory(long id)
focal_class.identifier: createCategory
focal_class.modifiers: private
focal_class.parameters: (long id)
focal_class.return: void
focal_class.signature: void createCategory(long id)
focal_class.class_method_signature: Category.createCategory(int pageID)
focal_class.full_signature: private void createCategory(int pageID)
focal_class.identifier: createCategory
focal_class.modifiers: private
focal_class.parameters: (int pageID)
focal_class.return: void
focal_class.signature: void createCategory(int pageID)
focal_class.class_method_signature: Category.createCategory(Title title)
focal_class.full_signature: private void createCategory(Title title)
focal_class.identifier: createCategory
focal_class.modifiers: private
focal_class.parameters: (Title title)
focal_class.return: void
focal_class.signature: void createCategory(Title title)
focal_class.class_method_signature: Category.__getId()
focal_class.full_signature:  long __getId()
focal_class.identifier: __getId
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long __getId()
focal_class.class_method_signature: Category.getPageId()
focal_class.full_signature: public int getPageId()
focal_class.identifier: getPageId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getPageId()
focal_class.class_method_signature: Category.getParents()
focal_class.full_signature: public Set<Category> getParents()
focal_class.identifier: getParents
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Category>
focal_class.signature: Set<Category> getParents()
focal_class.class_method_signature: Category.getNumberOfParents()
focal_class.full_signature: public int getNumberOfParents()
focal_class.identifier: getNumberOfParents
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfParents()
focal_class.class_method_signature: Category.getParentIDs()
focal_class.full_signature: public Set<Integer> getParentIDs()
focal_class.identifier: getParentIDs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Integer>
focal_class.signature: Set<Integer> getParentIDs()
focal_class.class_method_signature: Category.getChildren()
focal_class.full_signature: public Set<Category> getChildren()
focal_class.identifier: getChildren
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Category>
focal_class.signature: Set<Category> getChildren()
focal_class.class_method_signature: Category.getNumberOfChildren()
focal_class.full_signature: public int getNumberOfChildren()
focal_class.identifier: getNumberOfChildren
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfChildren()
focal_class.class_method_signature: Category.getChildrenIDs()
focal_class.full_signature: public Set<Integer> getChildrenIDs()
focal_class.identifier: getChildrenIDs
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Integer>
focal_class.signature: Set<Integer> getChildrenIDs()
focal_class.class_method_signature: Category.getTitle()
focal_class.full_signature: public Title getTitle()
focal_class.identifier: getTitle
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Title
focal_class.signature: Title getTitle()
focal_class.class_method_signature: Category.getArticles()
focal_class.full_signature: public Set<Page> getArticles()
focal_class.identifier: getArticles
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Page>
focal_class.signature: Set<Page> getArticles()
focal_class.class_method_signature: Category.getArticleIds()
focal_class.full_signature: public Set<Integer> getArticleIds()
focal_class.identifier: getArticleIds
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Integer>
focal_class.signature: Set<Integer> getArticleIds()
focal_class.class_method_signature: Category.getNumberOfPages()
focal_class.full_signature: public int getNumberOfPages()
focal_class.identifier: getNumberOfPages
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getNumberOfPages()
focal_class.class_method_signature: Category.__getPages()
focal_class.full_signature:  Set<Integer> __getPages()
focal_class.identifier: __getPages
focal_class.parameters: ()
focal_class.return: Set<Integer>
focal_class.signature: Set<Integer> __getPages()
focal_class.class_method_signature: Category.getDescendants()
focal_class.full_signature: public Iterable <Category> getDescendants()
focal_class.identifier: getDescendants
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Iterable <Category>
focal_class.signature: Iterable <Category> getDescendants()
focal_class.class_method_signature: Category.getDescendants(int bufferSize)
focal_class.full_signature: protected Iterable <Category> getDescendants(int bufferSize)
focal_class.identifier: getDescendants
focal_class.modifiers: protected
focal_class.parameters: (int bufferSize)
focal_class.return: Iterable <Category>
focal_class.signature: Iterable <Category> getDescendants(int bufferSize)
focal_class.class_method_signature: Category.getSiblings()
focal_class.full_signature: public Set<Category> getSiblings()
focal_class.identifier: getSiblings
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Set<Category>
focal_class.signature: Set<Category> getSiblings()
focal_class.class_method_signature: Category.getCategoryInfo()
focal_class.full_signature: protected String getCategoryInfo()
focal_class.identifier: getCategoryInfo
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getCategoryInfo()
focal_method.body: public int getNumberOfParents() {
          BigInteger nrOfInlinks = new BigInteger("0");
  
          long id = this.__getId();
          Session session = this.wiki.__getHibernateSession();
          session.beginTransaction();
          Object returnValue = session.createNativeQuery("select count(inLinks) from category_inlinks where id = :id")
              .setParameter("id", id, LongType.INSTANCE)
              .uniqueResult();
          session.getTransaction().commit();
  
          if (returnValue != null) {
              nrOfInlinks = (BigInteger) returnValue;
          }
          return nrOfInlinks.intValue();
      }
focal_method.class_method_signature: Category.getNumberOfParents()
focal_method.full_signature: public int getNumberOfParents()
focal_method.identifier: getNumberOfParents
focal_method.invocations: __getId __getHibernateSession beginTransaction uniqueResult setParameter createNativeQuery commit getTransaction intValue
focal_method.modifiers: public
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int getNumberOfParents()