_id
stringlengths
2
7
title
stringlengths
3
140
partition
stringclasses
3 values
text
stringlengths
73
34.1k
language
stringclasses
1 value
meta_information
dict
q179900
Token.getDepLabel
test
public String getDepLabel() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depLabel == null) jcasType.jcas.throwFeatMissing("depLabel", "edu.cmu.lti.oaqa.type.nlp.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasType).casFeatCode_depLabel);}
java
{ "resource": "" }
q179901
Token.setDepLabel
test
public void setDepLabel(String v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_depLabel == null) jcasType.jcas.throwFeatMissing("depLabel", "edu.cmu.lti.oaqa.type.nlp.Token"); jcasType.ll_cas.ll_setStringValue(addr, ((Token_Type)jcasType).casFeatCode_depLabel, v);}
java
{ "resource": "" }
q179902
Token.getSemanticType
test
public String getSemanticType() { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_semanticType == null) jcasType.jcas.throwFeatMissing("semanticType", "edu.cmu.lti.oaqa.type.nlp.Token"); return jcasType.ll_cas.ll_getStringValue(addr, ((Token_Type)jcasType).casFeatCode_semanticType);}
java
{ "resource": "" }
q179903
Token.setSemanticType
test
public void setSemanticType(String v) { if (Token_Type.featOkTst && ((Token_Type)jcasType).casFeat_semanticType == null) jcasType.jcas.throwFeatMissing("semanticType", "edu.cmu.lti.oaqa.type.nlp.Token"); jcasType.ll_cas.ll_setStringValue(addr, ((Token_Type)jcasType).casFeatCode_semanticType, v);}
java
{ "resource": "" }
q179904
Document.getSections
test
public StringArray getSections() { if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_sections == null) jcasType.jcas.throwFeatMissing("sections", "edu.cmu.lti.oaqa.type.retrieval.Document"); return (StringArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_sections)));}
java
{ "resource": "" }
q179905
Document.setSections
test
public void setSections(StringArray v) { if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_sections == null) jcasType.jcas.throwFeatMissing("sections", "edu.cmu.lti.oaqa.type.retrieval.Document"); jcasType.ll_cas.ll_setRefValue(addr, ((Document_Type)jcasType).casFeatCode_sections, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179906
Document.getSections
test
public String getSections(int i) { if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_sections == null) jcasType.jcas.throwFeatMissing("sections", "edu.cmu.lti.oaqa.type.retrieval.Document"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_sections), i); return jcasType.ll_cas.ll_getStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_sections), i);}
java
{ "resource": "" }
q179907
Document.setSections
test
public void setSections(int i, String v) { if (Document_Type.featOkTst && ((Document_Type)jcasType).casFeat_sections == null) jcasType.jcas.throwFeatMissing("sections", "edu.cmu.lti.oaqa.type.retrieval.Document"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_sections), i); jcasType.ll_cas.ll_setStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Document_Type)jcasType).casFeatCode_sections), i, v);}
java
{ "resource": "" }
q179908
Concept.getUris
test
public StringList getUris() { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_uris == null) jcasType.jcas.throwFeatMissing("uris", "edu.cmu.lti.oaqa.type.kb.Concept"); return (StringList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Concept_Type)jcasType).casFeatCode_uris)));}
java
{ "resource": "" }
q179909
Concept.setUris
test
public void setUris(StringList v) { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_uris == null) jcasType.jcas.throwFeatMissing("uris", "edu.cmu.lti.oaqa.type.kb.Concept"); jcasType.ll_cas.ll_setRefValue(addr, ((Concept_Type)jcasType).casFeatCode_uris, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179910
Concept.getTypes
test
public FSList getTypes() { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_types == null) jcasType.jcas.throwFeatMissing("types", "edu.cmu.lti.oaqa.type.kb.Concept"); return (FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Concept_Type)jcasType).casFeatCode_types)));}
java
{ "resource": "" }
q179911
Concept.setTypes
test
public void setTypes(FSList v) { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_types == null) jcasType.jcas.throwFeatMissing("types", "edu.cmu.lti.oaqa.type.kb.Concept"); jcasType.ll_cas.ll_setRefValue(addr, ((Concept_Type)jcasType).casFeatCode_types, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179912
AnswerType.getTargetType
test
public Annotation getTargetType() { if (AnswerType_Type.featOkTst && ((AnswerType_Type)jcasType).casFeat_targetType == null) jcasType.jcas.throwFeatMissing("targetType", "edu.cmu.lti.oaqa.type.answer.AnswerType"); return (Annotation)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((AnswerType_Type)jcasType).casFeatCode_targetType)));}
java
{ "resource": "" }
q179913
AnswerType.setTargetType
test
public void setTargetType(Annotation v) { if (AnswerType_Type.featOkTst && ((AnswerType_Type)jcasType).casFeat_targetType == null) jcasType.jcas.throwFeatMissing("targetType", "edu.cmu.lti.oaqa.type.answer.AnswerType"); jcasType.ll_cas.ll_setRefValue(addr, ((AnswerType_Type)jcasType).casFeatCode_targetType, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179914
SearchResult.getRank
test
public int getRank() { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_rank == null) jcasType.jcas.throwFeatMissing("rank", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); return jcasType.ll_cas.ll_getIntValue(addr, ((SearchResult_Type)jcasType).casFeatCode_rank);}
java
{ "resource": "" }
q179915
SearchResult.setRank
test
public void setRank(int v) { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_rank == null) jcasType.jcas.throwFeatMissing("rank", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); jcasType.ll_cas.ll_setIntValue(addr, ((SearchResult_Type)jcasType).casFeatCode_rank, v);}
java
{ "resource": "" }
q179916
SearchResult.getQueryString
test
public String getQueryString() { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_queryString == null) jcasType.jcas.throwFeatMissing("queryString", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); return jcasType.ll_cas.ll_getStringValue(addr, ((SearchResult_Type)jcasType).casFeatCode_queryString);}
java
{ "resource": "" }
q179917
SearchResult.setQueryString
test
public void setQueryString(String v) { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_queryString == null) jcasType.jcas.throwFeatMissing("queryString", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); jcasType.ll_cas.ll_setStringValue(addr, ((SearchResult_Type)jcasType).casFeatCode_queryString, v);}
java
{ "resource": "" }
q179918
SearchResult.getCandidateAnswers
test
public FSArray getCandidateAnswers() { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_candidateAnswers == null) jcasType.jcas.throwFeatMissing("candidateAnswers", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((SearchResult_Type)jcasType).casFeatCode_candidateAnswers)));}
java
{ "resource": "" }
q179919
SearchResult.setCandidateAnswers
test
public void setCandidateAnswers(FSArray v) { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_candidateAnswers == null) jcasType.jcas.throwFeatMissing("candidateAnswers", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); jcasType.ll_cas.ll_setRefValue(addr, ((SearchResult_Type)jcasType).casFeatCode_candidateAnswers, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179920
SearchResult.getCandidateAnswers
test
public CandidateAnswerVariant getCandidateAnswers(int i) { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_candidateAnswers == null) jcasType.jcas.throwFeatMissing("candidateAnswers", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((SearchResult_Type)jcasType).casFeatCode_candidateAnswers), i); return (CandidateAnswerVariant)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((SearchResult_Type)jcasType).casFeatCode_candidateAnswers), i)));}
java
{ "resource": "" }
q179921
SearchResult.setCandidateAnswers
test
public void setCandidateAnswers(int i, CandidateAnswerVariant v) { if (SearchResult_Type.featOkTst && ((SearchResult_Type)jcasType).casFeat_candidateAnswers == null) jcasType.jcas.throwFeatMissing("candidateAnswers", "edu.cmu.lti.oaqa.type.retrieval.SearchResult"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((SearchResult_Type)jcasType).casFeatCode_candidateAnswers), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((SearchResult_Type)jcasType).casFeatCode_candidateAnswers), i, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179922
Search.getQuery
test
public String getQuery() { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_query == null) jcasType.jcas.throwFeatMissing("query", "edu.cmu.lti.oaqa.type.retrieval.Search"); return jcasType.ll_cas.ll_getStringValue(addr, ((Search_Type)jcasType).casFeatCode_query);}
java
{ "resource": "" }
q179923
Search.setQuery
test
public void setQuery(String v) { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_query == null) jcasType.jcas.throwFeatMissing("query", "edu.cmu.lti.oaqa.type.retrieval.Search"); jcasType.ll_cas.ll_setStringValue(addr, ((Search_Type)jcasType).casFeatCode_query, v);}
java
{ "resource": "" }
q179924
Search.getHitList
test
public FSArray getHitList() { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_hitList == null) jcasType.jcas.throwFeatMissing("hitList", "edu.cmu.lti.oaqa.type.retrieval.Search"); return (FSArray)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Search_Type)jcasType).casFeatCode_hitList)));}
java
{ "resource": "" }
q179925
Search.setHitList
test
public void setHitList(FSArray v) { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_hitList == null) jcasType.jcas.throwFeatMissing("hitList", "edu.cmu.lti.oaqa.type.retrieval.Search"); jcasType.ll_cas.ll_setRefValue(addr, ((Search_Type)jcasType).casFeatCode_hitList, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179926
Search.getHitList
test
public SearchResult getHitList(int i) { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_hitList == null) jcasType.jcas.throwFeatMissing("hitList", "edu.cmu.lti.oaqa.type.retrieval.Search"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Search_Type)jcasType).casFeatCode_hitList), i); return (SearchResult)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Search_Type)jcasType).casFeatCode_hitList), i)));}
java
{ "resource": "" }
q179927
Search.setHitList
test
public void setHitList(int i, SearchResult v) { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_hitList == null) jcasType.jcas.throwFeatMissing("hitList", "edu.cmu.lti.oaqa.type.retrieval.Search"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Search_Type)jcasType).casFeatCode_hitList), i); jcasType.ll_cas.ll_setRefArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Search_Type)jcasType).casFeatCode_hitList), i, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179928
Search.getAbstractQuery
test
public AbstractQuery getAbstractQuery() { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_abstractQuery == null) jcasType.jcas.throwFeatMissing("abstractQuery", "edu.cmu.lti.oaqa.type.retrieval.Search"); return (AbstractQuery)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Search_Type)jcasType).casFeatCode_abstractQuery)));}
java
{ "resource": "" }
q179929
Search.setAbstractQuery
test
public void setAbstractQuery(AbstractQuery v) { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_abstractQuery == null) jcasType.jcas.throwFeatMissing("abstractQuery", "edu.cmu.lti.oaqa.type.retrieval.Search"); jcasType.ll_cas.ll_setRefValue(addr, ((Search_Type)jcasType).casFeatCode_abstractQuery, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179930
Search.getSearchId
test
public String getSearchId() { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_searchId == null) jcasType.jcas.throwFeatMissing("searchId", "edu.cmu.lti.oaqa.type.retrieval.Search"); return jcasType.ll_cas.ll_getStringValue(addr, ((Search_Type)jcasType).casFeatCode_searchId);}
java
{ "resource": "" }
q179931
Search.setSearchId
test
public void setSearchId(String v) { if (Search_Type.featOkTst && ((Search_Type)jcasType).casFeat_searchId == null) jcasType.jcas.throwFeatMissing("searchId", "edu.cmu.lti.oaqa.type.retrieval.Search"); jcasType.ll_cas.ll_setStringValue(addr, ((Search_Type)jcasType).casFeatCode_searchId, v);}
java
{ "resource": "" }
q179932
Passage.setDocId
test
public void setDocId(String v) { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_docId == null) jcasType.jcas.throwFeatMissing("docId", "edu.cmu.lti.oaqa.type.retrieval.Passage"); jcasType.ll_cas.ll_setStringValue(addr, ((Passage_Type)jcasType).casFeatCode_docId, v);}
java
{ "resource": "" }
q179933
Passage.getOffsetInBeginSection
test
public int getOffsetInBeginSection() { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInBeginSection == null) jcasType.jcas.throwFeatMissing("offsetInBeginSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); return jcasType.ll_cas.ll_getIntValue(addr, ((Passage_Type)jcasType).casFeatCode_offsetInBeginSection);}
java
{ "resource": "" }
q179934
Passage.setOffsetInBeginSection
test
public void setOffsetInBeginSection(int v) { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInBeginSection == null) jcasType.jcas.throwFeatMissing("offsetInBeginSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); jcasType.ll_cas.ll_setIntValue(addr, ((Passage_Type)jcasType).casFeatCode_offsetInBeginSection, v);}
java
{ "resource": "" }
q179935
Passage.getOffsetInEndSection
test
public int getOffsetInEndSection() { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInEndSection == null) jcasType.jcas.throwFeatMissing("offsetInEndSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); return jcasType.ll_cas.ll_getIntValue(addr, ((Passage_Type)jcasType).casFeatCode_offsetInEndSection);}
java
{ "resource": "" }
q179936
Passage.setOffsetInEndSection
test
public void setOffsetInEndSection(int v) { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_offsetInEndSection == null) jcasType.jcas.throwFeatMissing("offsetInEndSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); jcasType.ll_cas.ll_setIntValue(addr, ((Passage_Type)jcasType).casFeatCode_offsetInEndSection, v);}
java
{ "resource": "" }
q179937
Passage.getBeginSection
test
public String getBeginSection() { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_beginSection == null) jcasType.jcas.throwFeatMissing("beginSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); return jcasType.ll_cas.ll_getStringValue(addr, ((Passage_Type)jcasType).casFeatCode_beginSection);}
java
{ "resource": "" }
q179938
Passage.setBeginSection
test
public void setBeginSection(String v) { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_beginSection == null) jcasType.jcas.throwFeatMissing("beginSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); jcasType.ll_cas.ll_setStringValue(addr, ((Passage_Type)jcasType).casFeatCode_beginSection, v);}
java
{ "resource": "" }
q179939
Passage.getEndSection
test
public String getEndSection() { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_endSection == null) jcasType.jcas.throwFeatMissing("endSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); return jcasType.ll_cas.ll_getStringValue(addr, ((Passage_Type)jcasType).casFeatCode_endSection);}
java
{ "resource": "" }
q179940
Passage.setEndSection
test
public void setEndSection(String v) { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_endSection == null) jcasType.jcas.throwFeatMissing("endSection", "edu.cmu.lti.oaqa.type.retrieval.Passage"); jcasType.ll_cas.ll_setStringValue(addr, ((Passage_Type)jcasType).casFeatCode_endSection, v);}
java
{ "resource": "" }
q179941
Passage.getAspects
test
public String getAspects() { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_aspects == null) jcasType.jcas.throwFeatMissing("aspects", "edu.cmu.lti.oaqa.type.retrieval.Passage"); return jcasType.ll_cas.ll_getStringValue(addr, ((Passage_Type)jcasType).casFeatCode_aspects);}
java
{ "resource": "" }
q179942
Passage.setAspects
test
public void setAspects(String v) { if (Passage_Type.featOkTst && ((Passage_Type)jcasType).casFeat_aspects == null) jcasType.jcas.throwFeatMissing("aspects", "edu.cmu.lti.oaqa.type.retrieval.Passage"); jcasType.ll_cas.ll_setStringValue(addr, ((Passage_Type)jcasType).casFeatCode_aspects, v);}
java
{ "resource": "" }
q179943
TripleSearchResult.getTriple
test
public Triple getTriple() { if (TripleSearchResult_Type.featOkTst && ((TripleSearchResult_Type)jcasType).casFeat_triple == null) jcasType.jcas.throwFeatMissing("triple", "edu.cmu.lti.oaqa.type.retrieval.TripleSearchResult"); return (Triple)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((TripleSearchResult_Type)jcasType).casFeatCode_triple)));}
java
{ "resource": "" }
q179944
TripleSearchResult.setTriple
test
public void setTriple(Triple v) { if (TripleSearchResult_Type.featOkTst && ((TripleSearchResult_Type)jcasType).casFeat_triple == null) jcasType.jcas.throwFeatMissing("triple", "edu.cmu.lti.oaqa.type.retrieval.TripleSearchResult"); jcasType.ll_cas.ll_setRefValue(addr, ((TripleSearchResult_Type)jcasType).casFeatCode_triple, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179945
PassageFromRelation.getSourceRelation
test
public Triple getSourceRelation() { if (PassageFromRelation_Type.featOkTst && ((PassageFromRelation_Type)jcasType).casFeat_sourceRelation == null) jcasType.jcas.throwFeatMissing("sourceRelation", "edu.cmu.lti.oaqa.type.retrieval.PassageFromRelation"); return (Triple)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((PassageFromRelation_Type)jcasType).casFeatCode_sourceRelation)));}
java
{ "resource": "" }
q179946
PassageFromRelation.setSourceRelation
test
public void setSourceRelation(Triple v) { if (PassageFromRelation_Type.featOkTst && ((PassageFromRelation_Type)jcasType).casFeat_sourceRelation == null) jcasType.jcas.throwFeatMissing("sourceRelation", "edu.cmu.lti.oaqa.type.retrieval.PassageFromRelation"); jcasType.ll_cas.ll_setRefValue(addr, ((PassageFromRelation_Type)jcasType).casFeatCode_sourceRelation, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179947
Triple.getSubject
test
public String getSubject() { if (Triple_Type.featOkTst && ((Triple_Type)jcasType).casFeat_subject == null) jcasType.jcas.throwFeatMissing("subject", "edu.cmu.lti.oaqa.type.kb.Triple"); return jcasType.ll_cas.ll_getStringValue(addr, ((Triple_Type)jcasType).casFeatCode_subject);}
java
{ "resource": "" }
q179948
Triple.setSubject
test
public void setSubject(String v) { if (Triple_Type.featOkTst && ((Triple_Type)jcasType).casFeat_subject == null) jcasType.jcas.throwFeatMissing("subject", "edu.cmu.lti.oaqa.type.kb.Triple"); jcasType.ll_cas.ll_setStringValue(addr, ((Triple_Type)jcasType).casFeatCode_subject, v);}
java
{ "resource": "" }
q179949
Triple.getPredicate
test
public String getPredicate() { if (Triple_Type.featOkTst && ((Triple_Type)jcasType).casFeat_predicate == null) jcasType.jcas.throwFeatMissing("predicate", "edu.cmu.lti.oaqa.type.kb.Triple"); return jcasType.ll_cas.ll_getStringValue(addr, ((Triple_Type)jcasType).casFeatCode_predicate);}
java
{ "resource": "" }
q179950
Triple.setPredicate
test
public void setPredicate(String v) { if (Triple_Type.featOkTst && ((Triple_Type)jcasType).casFeat_predicate == null) jcasType.jcas.throwFeatMissing("predicate", "edu.cmu.lti.oaqa.type.kb.Triple"); jcasType.ll_cas.ll_setStringValue(addr, ((Triple_Type)jcasType).casFeatCode_predicate, v);}
java
{ "resource": "" }
q179951
Triple.getIsObjUri
test
public boolean getIsObjUri() { if (Triple_Type.featOkTst && ((Triple_Type)jcasType).casFeat_isObjUri == null) jcasType.jcas.throwFeatMissing("isObjUri", "edu.cmu.lti.oaqa.type.kb.Triple"); return jcasType.ll_cas.ll_getBooleanValue(addr, ((Triple_Type)jcasType).casFeatCode_isObjUri);}
java
{ "resource": "" }
q179952
Triple.setIsObjUri
test
public void setIsObjUri(boolean v) { if (Triple_Type.featOkTst && ((Triple_Type)jcasType).casFeat_isObjUri == null) jcasType.jcas.throwFeatMissing("isObjUri", "edu.cmu.lti.oaqa.type.kb.Triple"); jcasType.ll_cas.ll_setBooleanValue(addr, ((Triple_Type)jcasType).casFeatCode_isObjUri, v);}
java
{ "resource": "" }
q179953
ComplexQueryConcept.getOperator
test
public QueryOperator getOperator() { if (ComplexQueryConcept_Type.featOkTst && ((ComplexQueryConcept_Type)jcasType).casFeat_operator == null) jcasType.jcas.throwFeatMissing("operator", "edu.cmu.lti.oaqa.type.retrieval.ComplexQueryConcept"); return (QueryOperator)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((ComplexQueryConcept_Type)jcasType).casFeatCode_operator)));}
java
{ "resource": "" }
q179954
ComplexQueryConcept.setOperator
test
public void setOperator(QueryOperator v) { if (ComplexQueryConcept_Type.featOkTst && ((ComplexQueryConcept_Type)jcasType).casFeat_operator == null) jcasType.jcas.throwFeatMissing("operator", "edu.cmu.lti.oaqa.type.retrieval.ComplexQueryConcept"); jcasType.ll_cas.ll_setRefValue(addr, ((ComplexQueryConcept_Type)jcasType).casFeatCode_operator, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179955
ComplexQueryConcept.getOperatorArgs
test
public FSList getOperatorArgs() { if (ComplexQueryConcept_Type.featOkTst && ((ComplexQueryConcept_Type)jcasType).casFeat_operatorArgs == null) jcasType.jcas.throwFeatMissing("operatorArgs", "edu.cmu.lti.oaqa.type.retrieval.ComplexQueryConcept"); return (FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((ComplexQueryConcept_Type)jcasType).casFeatCode_operatorArgs)));}
java
{ "resource": "" }
q179956
ComplexQueryConcept.setOperatorArgs
test
public void setOperatorArgs(FSList v) { if (ComplexQueryConcept_Type.featOkTst && ((ComplexQueryConcept_Type)jcasType).casFeat_operatorArgs == null) jcasType.jcas.throwFeatMissing("operatorArgs", "edu.cmu.lti.oaqa.type.retrieval.ComplexQueryConcept"); jcasType.ll_cas.ll_setRefValue(addr, ((ComplexQueryConcept_Type)jcasType).casFeatCode_operatorArgs, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179957
ConceptMention.getConcept
test
public Concept getConcept() { if (ConceptMention_Type.featOkTst && ((ConceptMention_Type)jcasType).casFeat_concept == null) jcasType.jcas.throwFeatMissing("concept", "edu.cmu.lti.oaqa.type.kb.ConceptMention"); return (Concept)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((ConceptMention_Type)jcasType).casFeatCode_concept)));}
java
{ "resource": "" }
q179958
ConceptMention.getScore
test
public double getScore() { if (ConceptMention_Type.featOkTst && ((ConceptMention_Type)jcasType).casFeat_score == null) jcasType.jcas.throwFeatMissing("score", "edu.cmu.lti.oaqa.type.kb.ConceptMention"); return jcasType.ll_cas.ll_getDoubleValue(addr, ((ConceptMention_Type)jcasType).casFeatCode_score);}
java
{ "resource": "" }
q179959
CandidateAnswerOccurrence.getText
test
public String getText() { if (CandidateAnswerOccurrence_Type.featOkTst && ((CandidateAnswerOccurrence_Type)jcasType).casFeat_text == null) jcasType.jcas.throwFeatMissing("text", "edu.cmu.lti.oaqa.type.answer.CandidateAnswerOccurrence"); return jcasType.ll_cas.ll_getStringValue(addr, ((CandidateAnswerOccurrence_Type)jcasType).casFeatCode_text);}
java
{ "resource": "" }
q179960
CandidateAnswerOccurrence.setText
test
public void setText(String v) { if (CandidateAnswerOccurrence_Type.featOkTst && ((CandidateAnswerOccurrence_Type)jcasType).casFeat_text == null) jcasType.jcas.throwFeatMissing("text", "edu.cmu.lti.oaqa.type.answer.CandidateAnswerOccurrence"); jcasType.ll_cas.ll_setStringValue(addr, ((CandidateAnswerOccurrence_Type)jcasType).casFeatCode_text, v);}
java
{ "resource": "" }
q179961
ConceptType.getId
test
public String getId() { if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_id == null) jcasType.jcas.throwFeatMissing("id", "edu.cmu.lti.oaqa.type.kb.ConceptType"); return jcasType.ll_cas.ll_getStringValue(addr, ((ConceptType_Type)jcasType).casFeatCode_id);}
java
{ "resource": "" }
q179962
ConceptType.setId
test
public void setId(String v) { if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_id == null) jcasType.jcas.throwFeatMissing("id", "edu.cmu.lti.oaqa.type.kb.ConceptType"); jcasType.ll_cas.ll_setStringValue(addr, ((ConceptType_Type)jcasType).casFeatCode_id, v);}
java
{ "resource": "" }
q179963
ConceptType.getName
test
public String getName() { if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_name == null) jcasType.jcas.throwFeatMissing("name", "edu.cmu.lti.oaqa.type.kb.ConceptType"); return jcasType.ll_cas.ll_getStringValue(addr, ((ConceptType_Type)jcasType).casFeatCode_name);}
java
{ "resource": "" }
q179964
ConceptType.getAbbreviation
test
public String getAbbreviation() { if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_abbreviation == null) jcasType.jcas.throwFeatMissing("abbreviation", "edu.cmu.lti.oaqa.type.kb.ConceptType"); return jcasType.ll_cas.ll_getStringValue(addr, ((ConceptType_Type)jcasType).casFeatCode_abbreviation);}
java
{ "resource": "" }
q179965
ConceptType.setAbbreviation
test
public void setAbbreviation(String v) { if (ConceptType_Type.featOkTst && ((ConceptType_Type)jcasType).casFeat_abbreviation == null) jcasType.jcas.throwFeatMissing("abbreviation", "edu.cmu.lti.oaqa.type.kb.ConceptType"); jcasType.ll_cas.ll_setStringValue(addr, ((ConceptType_Type)jcasType).casFeatCode_abbreviation, v);}
java
{ "resource": "" }
q179966
ConceptSearchResult.setConcept
test
public void setConcept(Concept v) { if (ConceptSearchResult_Type.featOkTst && ((ConceptSearchResult_Type)jcasType).casFeat_concept == null) jcasType.jcas.throwFeatMissing("concept", "edu.cmu.lti.oaqa.type.retrieval.ConceptSearchResult"); jcasType.ll_cas.ll_setRefValue(addr, ((ConceptSearchResult_Type)jcasType).casFeatCode_concept, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179967
Answer.getVariants
test
public FSList getVariants() { if (Answer_Type.featOkTst && ((Answer_Type)jcasType).casFeat_variants == null) jcasType.jcas.throwFeatMissing("variants", "edu.cmu.lti.oaqa.type.answer.Answer"); return (FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Answer_Type)jcasType).casFeatCode_variants)));}
java
{ "resource": "" }
q179968
Answer.setVariants
test
public void setVariants(FSList v) { if (Answer_Type.featOkTst && ((Answer_Type)jcasType).casFeat_variants == null) jcasType.jcas.throwFeatMissing("variants", "edu.cmu.lti.oaqa.type.answer.Answer"); jcasType.ll_cas.ll_setRefValue(addr, ((Answer_Type)jcasType).casFeatCode_variants, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179969
QueryConcept.getNamedEntityTypes
test
public StringList getNamedEntityTypes() { if (QueryConcept_Type.featOkTst && ((QueryConcept_Type)jcasType).casFeat_namedEntityTypes == null) jcasType.jcas.throwFeatMissing("namedEntityTypes", "edu.cmu.lti.oaqa.type.retrieval.QueryConcept"); return (StringList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((QueryConcept_Type)jcasType).casFeatCode_namedEntityTypes)));}
java
{ "resource": "" }
q179970
QueryConcept.setNamedEntityTypes
test
public void setNamedEntityTypes(StringList v) { if (QueryConcept_Type.featOkTst && ((QueryConcept_Type)jcasType).casFeat_namedEntityTypes == null) jcasType.jcas.throwFeatMissing("namedEntityTypes", "edu.cmu.lti.oaqa.type.retrieval.QueryConcept"); jcasType.ll_cas.ll_setRefValue(addr, ((QueryConcept_Type)jcasType).casFeatCode_namedEntityTypes, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179971
QueryConcept.getConceptType
test
public String getConceptType() { if (QueryConcept_Type.featOkTst && ((QueryConcept_Type)jcasType).casFeat_conceptType == null) jcasType.jcas.throwFeatMissing("conceptType", "edu.cmu.lti.oaqa.type.retrieval.QueryConcept"); return jcasType.ll_cas.ll_getStringValue(addr, ((QueryConcept_Type)jcasType).casFeatCode_conceptType);}
java
{ "resource": "" }
q179972
QueryConcept.setConceptType
test
public void setConceptType(String v) { if (QueryConcept_Type.featOkTst && ((QueryConcept_Type)jcasType).casFeat_conceptType == null) jcasType.jcas.throwFeatMissing("conceptType", "edu.cmu.lti.oaqa.type.retrieval.QueryConcept"); jcasType.ll_cas.ll_setStringValue(addr, ((QueryConcept_Type)jcasType).casFeatCode_conceptType, v);}
java
{ "resource": "" }
q179973
CandidateAnswerVariant.getOccurrences
test
public FSList getOccurrences() { if (CandidateAnswerVariant_Type.featOkTst && ((CandidateAnswerVariant_Type)jcasType).casFeat_occurrences == null) jcasType.jcas.throwFeatMissing("occurrences", "edu.cmu.lti.oaqa.type.answer.CandidateAnswerVariant"); return (FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((CandidateAnswerVariant_Type)jcasType).casFeatCode_occurrences)));}
java
{ "resource": "" }
q179974
CandidateAnswerVariant.setOccurrences
test
public void setOccurrences(FSList v) { if (CandidateAnswerVariant_Type.featOkTst && ((CandidateAnswerVariant_Type)jcasType).casFeat_occurrences == null) jcasType.jcas.throwFeatMissing("occurrences", "edu.cmu.lti.oaqa.type.answer.CandidateAnswerVariant"); jcasType.ll_cas.ll_setRefValue(addr, ((CandidateAnswerVariant_Type)jcasType).casFeatCode_occurrences, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179975
AbstractQuery.getConcepts
test
public FSList getConcepts() { if (AbstractQuery_Type.featOkTst && ((AbstractQuery_Type)jcasType).casFeat_concepts == null) jcasType.jcas.throwFeatMissing("concepts", "edu.cmu.lti.oaqa.type.retrieval.AbstractQuery"); return (FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((AbstractQuery_Type)jcasType).casFeatCode_concepts)));}
java
{ "resource": "" }
q179976
AbstractQuery.setConcepts
test
public void setConcepts(FSList v) { if (AbstractQuery_Type.featOkTst && ((AbstractQuery_Type)jcasType).casFeat_concepts == null) jcasType.jcas.throwFeatMissing("concepts", "edu.cmu.lti.oaqa.type.retrieval.AbstractQuery"); jcasType.ll_cas.ll_setRefValue(addr, ((AbstractQuery_Type)jcasType).casFeatCode_concepts, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179977
AtomicQueryConcept.getOriginalText
test
public String getOriginalText() { if (AtomicQueryConcept_Type.featOkTst && ((AtomicQueryConcept_Type)jcasType).casFeat_originalText == null) jcasType.jcas.throwFeatMissing("originalText", "edu.cmu.lti.oaqa.type.retrieval.AtomicQueryConcept"); return jcasType.ll_cas.ll_getStringValue(addr, ((AtomicQueryConcept_Type)jcasType).casFeatCode_originalText);}
java
{ "resource": "" }
q179978
AtomicQueryConcept.setOriginalText
test
public void setOriginalText(String v) { if (AtomicQueryConcept_Type.featOkTst && ((AtomicQueryConcept_Type)jcasType).casFeat_originalText == null) jcasType.jcas.throwFeatMissing("originalText", "edu.cmu.lti.oaqa.type.retrieval.AtomicQueryConcept"); jcasType.ll_cas.ll_setStringValue(addr, ((AtomicQueryConcept_Type)jcasType).casFeatCode_originalText, v);}
java
{ "resource": "" }
q179979
QueryOperator.getArgs
test
public StringList getArgs() { if (QueryOperator_Type.featOkTst && ((QueryOperator_Type)jcasType).casFeat_args == null) jcasType.jcas.throwFeatMissing("args", "edu.cmu.lti.oaqa.type.retrieval.QueryOperator"); return (StringList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((QueryOperator_Type)jcasType).casFeatCode_args)));}
java
{ "resource": "" }
q179980
QueryOperator.setArgs
test
public void setArgs(StringList v) { if (QueryOperator_Type.featOkTst && ((QueryOperator_Type)jcasType).casFeat_args == null) jcasType.jcas.throwFeatMissing("args", "edu.cmu.lti.oaqa.type.retrieval.QueryOperator"); jcasType.ll_cas.ll_setRefValue(addr, ((QueryOperator_Type)jcasType).casFeatCode_args, jcasType.ll_cas.ll_getFSRef(v));}
java
{ "resource": "" }
q179981
SemanticRole.getLabel
test
public String getLabel() { if (SemanticRole_Type.featOkTst && ((SemanticRole_Type)jcasType).casFeat_label == null) jcasType.jcas.throwFeatMissing("label", "edu.cmu.lti.oaqa.type.nlp.SemanticRole"); return jcasType.ll_cas.ll_getStringValue(addr, ((SemanticRole_Type)jcasType).casFeatCode_label);}
java
{ "resource": "" }
q179982
SemanticRole.setLabel
test
public void setLabel(String v) { if (SemanticRole_Type.featOkTst && ((SemanticRole_Type)jcasType).casFeat_label == null) jcasType.jcas.throwFeatMissing("label", "edu.cmu.lti.oaqa.type.nlp.SemanticRole"); jcasType.ll_cas.ll_setStringValue(addr, ((SemanticRole_Type)jcasType).casFeatCode_label, v);}
java
{ "resource": "" }
q179983
BlockLocks.nextClearBit
test
public int nextClearBit(int index) { int i = index >> 6; if (i >= wlen) return -1; int subIndex = index & 0x3f; // index within the word long word = ~bits.get(i) >> subIndex; // skip all the bits to the right of // index if (word != 0) { return (i << 6) + subIndex + Long.numberOfTrailingZeros(word); } while (++i < wlen) { word = ~bits.get(i); if (word != 0) { return (i << 6) + Long.numberOfTrailingZeros(word); } } return -1; }
java
{ "resource": "" }
q179984
BlockLocks.set
test
public boolean set(int index) { int wordNum = index >> 6; // div 64 int bit = index & 0x3f; // mod 64 long bitmask = 1L << bit; long word, oword; do { word = bits.get(wordNum); // if set another thread stole the lock if ((word & bitmask) != 0) { return false; } oword = word; word |= bitmask; } while (!bits.compareAndSet(wordNum, oword, word)); return true; }
java
{ "resource": "" }
q179985
BlockCache.freeBuffer
test
protected void freeBuffer(final ByteBuffer buffer) throws IOException { if (buffer == null) { return; } if (UNMAP_SUPPORTED) { try { AccessController.doPrivileged(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { final Method getCleanerMethod = buffer.getClass().getMethod("cleaner"); getCleanerMethod.setAccessible(true); final Object cleaner = getCleanerMethod.invoke(buffer); if (cleaner != null) { cleaner.getClass().getMethod("clean").invoke(cleaner); } return null; } }); } catch (PrivilegedActionException e) { final IOException ioe = new IOException("unable to unmap the mapped buffer"); ioe.initCause(e.getCause()); throw ioe; } } }
java
{ "resource": "" }
q179986
Cache.newInstance
test
public CacheValue newInstance(CacheDirectory directory, String fileName) { return newInstance(directory, fileName, getCacheBlockSize(directory, fileName)); }
java
{ "resource": "" }
q179987
SlimSet.rehash
test
private static Object[] rehash(final Object[] values, final int newSize) { Object[] newArray = new Object[newSize]; for (Object value : values) { if (value == null) { continue; } newArray[predictedPosition(newArray, value, value.hashCode())] = value; } return newArray; }
java
{ "resource": "" }
q179988
PolymerElements.toHELM2
test
public String toHELM2() { StringBuilder notation = new StringBuilder(); for (int i = 0; i < listMonomerNotations.size(); i++) { notation.append(listMonomerNotations.get(i).toHELM2() + "."); } notation.setLength(notation.length() - 1); return notation.toString(); }
java
{ "resource": "" }
q179989
AnnotationsParser.checkBracketsParenthesis
test
private boolean checkBracketsParenthesis() { LOG.debug("Check of brackets in the annotation section:"); if (bracketCounterOpen == bracketCounterClose && parenthesisCounterOpen == parenthesisCounterClose && curlyBracketCounterOpen == curlyBracketCounterClose) { return true; } return false; }
java
{ "resource": "" }
q179990
ConnectionNotation.addDetails
test
private void addDetails(String str) throws NotationException{ String[] parts = str.split("-"); /* MonomerUnit */ sourceUnit = parts[0].split(":")[0].toUpperCase(); targetUnit = parts[1].split(":")[0].toUpperCase(); /* R-group */ rGroupSource = parts[0].split(":")[1]; rGroupTarget = parts[1].split(":")[1]; Pattern r = Pattern.compile("R\\d", Pattern.CASE_INSENSITIVE); Pattern pair = Pattern.compile("pair", Pattern.CASE_INSENSITIVE); Matcher mR = r.matcher(rGroupSource); Matcher mPair = pair.matcher(rGroupTarget); if(mR.matches()){ rGroupSource = rGroupSource.toUpperCase(); }else{ rGroupSource = rGroupSource.toLowerCase(); } if(mPair.matches()){ rGroupTarget = rGroupTarget.toLowerCase(); }else{ rGroupTarget = rGroupTarget.toUpperCase(); } }
java
{ "resource": "" }
q179991
ConnectionNotation.toHELM2
test
public String toHELM2() { if (isAnnotationTrue()) { return sourceId.getId() + "," + targetId.getId() + "," + sourceUnit + ":" + rGroupSource + "-" + targetUnit + ":" + rGroupTarget + "\"" + annotation + "\""; } else { return sourceId.getId() + "," + targetId.getId() + "," + sourceUnit + ":" + rGroupSource + "-" + targetUnit + ":" + rGroupTarget; } }
java
{ "resource": "" }
q179992
MonomerNotationGroup.addElement
test
public void addElement(String str, String type, double one, double two, boolean interval, boolean isDefault) throws NotationException{ this.elements.add(ValidationMethod.decideWhichMonomerNotationInGroup(str, type, one, two, interval, isDefault)); }
java
{ "resource": "" }
q179993
StartHELM2Parser.main
test
public static void main(String[] args) throws ParseException, ExceptionState, IOException { /* options for the program */ Options options = new Options(); /* add helm string */ options.addOption("inputHELM", true, "HELM1 or HELM2 string in a file"); /* add output option */ options.addOption("output", true, "output can be in JSON- or HELM2-format"); /* add translate option */ options.addOption("translate", false, "translate HELM1 to HELM2"); CommandLineParser parameter = new DefaultParser(); try { CommandLine cmd = parameter.parse(options, args); String filename = cmd.getOptionValue("inputHELM"); ParserHELM2 parser = new ParserHELM2(); FileReader in = new FileReader(filename); BufferedReader br = new BufferedReader(in); String line; String helm; try { while ((line = br.readLine()) != null) { helm = line; /* HELM1 notation has to be translated into HELM2 */ if (cmd.hasOption("translate")) { ConverterHELM1ToHELM2 converter = new ConverterHELM1ToHELM2(); helm = converter.doConvert(helm); LOG.info("HELM1 is translated to HELM2"); } parser.parse(helm); /* There are two different output options */ String output = ""; if (cmd.getOptionValue("output").equals("HELM2")) { output = parser.getHELM2Notation().toHELM2(); } else if (cmd.getOptionValue("output").equals("JSON")) { output = parser.getJSON(); } System.out.println(output); } } finally { br.close(); } } catch (NullPointerException e) { System.out.println("Please call the program with the following arguments: " + "\n" + "-inputHELM <" + options.getOption("inputHELM").getDescription() + ">\n" + "-output <" + options.getOption("output").getDescription() + ">\n-translate(optional) <" + options.getOption("translate").getDescription() + ">"); } catch (ParseException exp) { System.out.println("Unexpected exception: " + exp.getMessage()); } }
java
{ "resource": "" }
q179994
StateMachineParser.checkPolymerId
test
public boolean checkPolymerId(String polymerId) { LOG.debug("Validation of polymerID: " + polymerId); String pattern = "PEPTIDE[1-9][0-9]*|RNA[1-9][0-9]*|CHEM[1-9][0-9]*|BLOB[1-9][0-9]*"; Pattern p = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE); Matcher m = p.matcher(polymerId); if (m.matches()) { LOG.debug("PolymerID is valid: " + polymerId); return true; } LOG.debug("PolymerID is not valid: " + polymerId); return false; }
java
{ "resource": "" }
q179995
StateMachineParser.checkPolymeridConnection
test
public boolean checkPolymeridConnection(String polymerId) { LOG.debug("Validation of polymerID in the connection section:"); String ratio = "(:[1-9][0-9]*(\\.[0-9]+)?)?"; String id = "(PEPTIDE[1-9][0-9]*|RNA[1-9][0-9]*|CHEM[1-9][0-9]*|BLOB[1-9][0-9]*|G[1-9][0-9]*)"; String pattern = "(\\(" + id + ratio + "(," + id + ratio + ")+\\)" + ratio + "|" + id + ratio + ")"; Pattern p = Pattern.compile(pattern,Pattern.CASE_INSENSITIVE); Matcher m = p.matcher(polymerId); if (m.matches()) { LOG.debug("PolymerID in the connection section is valid:"); return true; } LOG.debug("PolymerID in the connection section is not valid: " + polymerId); return false; }
java
{ "resource": "" }
q179996
StateMachineParser.checkDetailsConnections
test
public boolean checkDetailsConnections(String d) { LOG.debug("Validation of connection's details:"); String group = "\\((\\D|\\d)((,|\\+)(\\D|\\d))+\\)"; String partOne = "([1-9][0-9]*|\\D|\\?|" + group + ")"; String partTwo = "(R[1-9][0-9]*+|\\?)"; String element = partOne + ":" + partTwo; String patternConnection = element + "-" + element; String hydrogenBondPartner = partOne + ":pair"; String hydrogenBondPattern = hydrogenBondPartner + "-" + hydrogenBondPartner; Pattern pConnection = Pattern.compile(patternConnection , Pattern.CASE_INSENSITIVE); Matcher mConnection = pConnection.matcher(d); Pattern pHydrogen = Pattern.compile(hydrogenBondPattern, Pattern.CASE_INSENSITIVE); Matcher mHydrogen = pHydrogen.matcher(d); if (mConnection.matches() || mHydrogen.matches()) { LOG.debug("Connection's details are valid:"); return true; } LOG.debug("Connection's details are not valid: " + d); return false; }
java
{ "resource": "" }
q179997
StateMachineParser.checkGroupId
test
public boolean checkGroupId(String d) { Pattern p = Pattern.compile("G[1-9][0-9]*", Pattern.CASE_INSENSITIVE); Matcher m = p.matcher(d); LOG.debug("Validation of groupID:"); if (m.matches()) { LOG.debug("GroupID is valid:"); return true; } LOG.debug("GroupID is not valid:"); return false; }
java
{ "resource": "" }
q179998
StateMachineParser.checkRepeating
test
public boolean checkRepeating(String str) { String pattern = "\\d+|\\d+-\\d+"; if (str.matches(pattern)) { return true; } return false; }
java
{ "resource": "" }
q179999
StateMachineParser.isPeptideOrRna
test
public boolean isPeptideOrRna() throws SimplePolymerSectionException { if (polymerElements.size() >= 1) { if (polymerElements.get(polymerElements.size() - 1).matches("(PEPTIDE[1-9][0-9]*+|RNA[1-9][0-9]*)")) { return true; } return false; } else { throw new SimplePolymerSectionException("No Polymer Id is found"); } }
java
{ "resource": "" }