id
stringlengths
7
14
source
stringlengths
135
41.2k
target
stringlengths
36
20.4k
context_text
stringlengths
183
4k
prompt_context
stringlengths
0
1.52k
source_ctx
stringlengths
198
41.2k
ctx_included
bool
2 classes
static_status
stringclasses
2 values
static_context
stringlengths
1.96k
252k
2117797_49
class WebRadioMessageFactory extends AbstractMessageFactory { @Override public List<Message2Send> getMessage(MessageProcessUnit inUnit) { if (inUnit instanceof MessageNSettingProcessUnit) { final SubscriptionSchedulingData theSubscriptionSchedulingData = inUnit.get(); final ApplicationSettingData urlSetting...
final Application theApplication = Factories.APPLICATION.findByName("net.violet.webradio.U105"); Factories.APPLICATION_SETTING.create(theApplication, "url", "webradioUrl"); final Subscription theSubscription = new SubscriptionMock(1, theApplication, getKowalskyObject()); final CCalendar theDeliveryDate = new CC...
[FOCAL] @Override public List<Message2Send> WebRadioMessageFactory.getMessage(MessageProcessUnit inUnit) [CLASS] class WebRadioMessageFactory extends AbstractMessageFactory [METRICS] loc=23 cc=3 branches=2 loops=0 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] MessageProcessUnit.get/0, ApplicationSettingData.findByAppli...
/* static context [FOCAL] @Override public List<Message2Send> WebRadioMessageFactory.getMessage(MessageProcessUnit inUnit) [PATH1] if(inUnit instanceof MessageNSettingProcessUnit)=T -> if((urlSetting == null) || !urlSetting.isValid())=T -> return Collections.emptyList() [PATH2] if(inUnit instanceof MessageNSettingProce...
/* static context [FOCAL] @Override public List<Message2Send> WebRadioMessageFactory.getMessage(MessageProcessUnit inUnit) [PATH1] if(inUnit instanceof MessageNSettingProcessUnit)=T -> if((urlSetting == null) || !urlSetting.isValid())=T -> return Collections.emptyList() [PATH2] if(inUnit instanceof MessageNSettingProce...
true
ok
{"focal": {"class": "WebRadioMessageFactory", "name": "getMessage", "signature": "List<Message2Send> getMessage(MessageProcessUnit inUnit)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "inUnit", "type": "MessageProcessUnit"}], "return_type": "List<Message2Send>"}, "class_info": {"name": "WebRa...
2118259_0
class ContactsEJB implements ContactsService { @Override @Nonnull public List<ContactDetailsDTO> getContactDetails() { initContactsIfRequired(); final ArrayList<ContactDetailsDTO> contactDetails = new ArrayList<ContactDetailsDTO>(); for( final Contact contact : _contactDAO.findAll() ) { c...
assertEquals( 22, s( ContactsService.class ).getContactDetails().size() ); } }
[FOCAL] @Override @Nonnull public List<ContactDetailsDTO> ContactsEJB.getContactDetails() [CLASS] class ContactsEJB implements ContactsService [METRICS] loc=13 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] ContactDetailsDTO toLightWeightContactDTO(Contact contact); void initContactsIfRequired() ...
/* static context [FOCAL] @Override @Nonnull public List<ContactDetailsDTO> ContactsEJB.getContactDetails() [PATH1] foreach(Contact contact : _contactDAO.findAll())=T -> exit loop -> return contactDetails [PATH2] foreach(Contact contact : _contactDAO.findAll())=F -> return contactDetails [CALLS-INTERNAL] ContactDetails...
/* static context [FOCAL] @Override @Nonnull public List<ContactDetailsDTO> ContactsEJB.getContactDetails() [PATH1] foreach(Contact contact : _contactDAO.findAll())=T -> exit loop -> return contactDetails [PATH2] foreach(Contact contact : _contactDAO.findAll())=F -> return contactDetails [CALLS-INTERNAL] ContactDetails...
true
ok
{"focal": {"class": "ContactsEJB", "name": "getContactDetails", "signature": "List<ContactDetailsDTO> getContactDetails()", "start_line": 3, "modifiers": "@Override @Nonnull public", "params": [], "return_type": "List<ContactDetailsDTO>"}, "class_info": {"name": "ContactsEJB", "kind": "class", "modifiers": "", "supercl...
2125451_113
class HashObject extends AbstractGeoGigOp<ObjectId> { public HashObject setObject(RevObject object) { this.object = object; return this; } @Override protected ObjectId _call(); private RevFeatureType featureType1; private RevFeatureType featureType2; private RevFeatureType fea...
RevPerson tagger = new RevPersonImpl("volaya", "volaya@boundlessgeo.com", -1000, -1); RevPerson tagger2 = new RevPersonImpl("groldan", "groldan@boundlessgeo.com", 10000, 0); RevTag tag = new RevTagImpl(null, "tag1", ObjectId.forString("fake commit id"), "message", tagger); ...
[FOCAL] public HashObject HashObject.setObject(RevObject object) [CLASS] class HashObject extends AbstractGeoGigOp<ObjectId> [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [FIELDS] write=object [STATE] object [DATAFLOW] object@param->L2 [CLASS-MEMBERS] ObjectId _call() [TEST] HashObjectTest: @Test...
/* static context [FOCAL] public HashObject HashObject.setObject(RevObject object) [STATE] object [FIELDS] write=object */
/* static context [FOCAL] public HashObject HashObject.setObject(RevObject object) [STATE] object [FIELDS] write=object */ class HashObject extends AbstractGeoGigOp<ObjectId> { public HashObject setObject(RevObject object) { this.object = object; return this; } @Override protected ObjectId...
true
ok
{"focal": {"class": "HashObject", "name": "setObject", "signature": "HashObject setObject(RevObject object)", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "RevObject"}], "return_type": "HashObject"}, "class_info": {"name": "HashObject", "kind": "class", "modifiers": "", "superclass": "A...
2125920_34
class LazyMPEInference extends InferenceApplication { public static void inference(List<Rule> rules, Reasoner reasoner, GroundRuleStore groundRuleStore, TermStore termStore, TermGenerator termGenerator, LazyAtomManager lazyAtomManager, int maxRounds) { // Performs rounds of inferenc...
LazyMPEInference mpe = new LazyMPEInference(info.model, inferDB); // The Friends predicate should be empty. assertEquals(0, inferDB.countAllGroundRandomVariableAtoms(info.predicates.get("Friends"))); mpe.inference(); // There are multiple optimal configuration to the first rou...
[FOCAL] public static void LazyMPEInference.inference(List<Rule> rules, Reasoner reasoner, GroundRuleStore groundRuleStore, TermStore termStore, TermGenerator termGenerator, LazyAtomManager lazyAtomManager, int maxRounds) [CLASS] class LazyMPEInference extends InferenceApplication [METRICS] loc=28 cc=2 branches=0 loops...
/* static context [FOCAL] public static void LazyMPEInference.inference(List<Rule> rules, Reasoner reasoner, GroundRuleStore groundRuleStore, TermStore termStore, TermGenerator termGenerator, LazyAtomManager lazyAtomManager, int maxRounds) [PATH1] do_while(numActivated > 0 && rounds < maxRounds)=F [INPUTS] branches=gro...
/* static context [FOCAL] public static void LazyMPEInference.inference(List<Rule> rules, Reasoner reasoner, GroundRuleStore groundRuleStore, TermStore termStore, TermGenerator termGenerator, LazyAtomManager lazyAtomManager, int maxRounds) [PATH1] do_while(numActivated > 0 && rounds < maxRounds)=F [INPUTS] branches=gro...
true
ok
{"focal": {"class": "LazyMPEInference", "name": "inference", "signature": "void inference(List<Rule> rules, Reasoner reasoner, GroundRuleStore groundRuleStore, TermStore termStore, TermGenerator termGenerator, LazyAtomManager lazyAtomManager, int maxRounds)", "start_line": 3, "modifiers": "public static", "params": [{"...
2129779_2
class PersonController { @RequestMapping(method=RequestMethod.GET,value="edit") public ModelAndView editPerson(@RequestParam(value="id",required=false) Long id) { logger.debug("Received request to edit person id : "+id); ModelAndView mav = new ModelAndView(); mav.setViewName("edit"); Person person ...
Long template = dataInitializer.getPeople().get(1); ModelAndView mav = personController.editPerson(template); assertNotNull(mav); assertEquals("edit", mav.getViewName()); Object object = mav.getModel().get("person"); assertTrue(Person.class.isAssignableFrom(object.getClass())); Person person = (Person) ob...
[FOCAL] @RequestMapping(method=RequestMethod.GET,value="edit") public ModelAndView PersonController.editPerson(Long id) [CLASS] class PersonController [METRICS] loc=16 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] logger.debug/1, ModelAndView.setViewName/1, personDao.find/1, ModelAndView.addObje...
/* static context [FOCAL] @RequestMapping(method=RequestMethod.GET,value="edit") public ModelAndView PersonController.editPerson(Long id) [PATH1] if(id == null)=T -> return mav [PATH2] if(id == null)=F -> return mav [INPUTS] branches=id | result=- [COLLABORATORS] field personDao find/1 [NEW] ModelAndView, Person [CALLS...
/* static context [FOCAL] @RequestMapping(method=RequestMethod.GET,value="edit") public ModelAndView PersonController.editPerson(Long id) [PATH1] if(id == null)=T -> return mav [PATH2] if(id == null)=F -> return mav [INPUTS] branches=id | result=- [COLLABORATORS] field personDao find/1 [NEW] ModelAndView, Person [CALLS...
true
ok
{"focal": {"class": "PersonController", "name": "editPerson", "signature": "ModelAndView editPerson(Long id)", "start_line": 3, "modifiers": "@RequestMapping(method=RequestMethod.GET,value=\"edit\") public", "params": [{"name": "id", "type": "Long"}], "return_type": "ModelAndView"}, "class_info": {"name": "PersonContro...
2139087_23
class MapUnitToPixelTransform { public Point<C2D> toPoint(Pixel pixel) { double x = extent.lowerLeft().getX() + mapUnitsPerPixelX * (pixel.x - this.pixelRange.getMinX()); double y = extent.upperRight().getY() - mapUnitsPerPixelY * (pixel.y - this.pixelRange.getMinY()); return point(extent....
Point<C2D> pnt = pixRangeBasedTransform.toPoint(Pixel.valueOf(100, 50)); assertTrue(equalsWithinTolerance(point(crs, c(10, 100)), pnt, Math.ulp(100d))); pnt = pixRangeBasedTransform.toPoint(Pixel.valueOf(100, 249)); assertTrue(equalsWithinTolerance(point(crs, c(10, 20.4)), pnt, Math.ul...
[FOCAL] public Point<C2D> MapUnitToPixelTransform.toPoint(Pixel pixel) [CLASS] class MapUnitToPixelTransform [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] extent.lowerLeft().getX/0, extent.lowerLeft/0, PixelRange.getMinX/0, extent.upperRight().getY/0, extent.upperRight/0, PixelRa...
/* static context [FOCAL] public Point<C2D> MapUnitToPixelTransform.toPoint(Pixel pixel) [INPUTS] branches=- | result=pixel, pixelRange [COLLABORATORS] field extent lowerLeft/0,upperRight/0,getCoordinateReferenceSystem/0; field pixelRange:PixelRange getMinX/0,getMinY/0 [FIELDS] read=pixelRange:PixelRange [CALLS-EXTERNA...
/* static context [FOCAL] public Point<C2D> MapUnitToPixelTransform.toPoint(Pixel pixel) [INPUTS] branches=- | result=pixel, pixelRange [COLLABORATORS] field extent lowerLeft/0,upperRight/0,getCoordinateReferenceSystem/0; field pixelRange:PixelRange getMinX/0,getMinY/0 [FIELDS] read=pixelRange:PixelRange [CALLS-EXTERNA...
true
ok
{"focal": {"class": "MapUnitToPixelTransform", "name": "toPoint", "signature": "Point<C2D> toPoint(Pixel pixel)", "start_line": 3, "modifiers": "public", "params": [{"name": "pixel", "type": "Pixel"}], "return_type": "Point<C2D>"}, "class_info": {"name": "MapUnitToPixelTransform", "kind": "class", "modifiers": "", "sup...
2144321_9
class PathUtils { public static String[] getMatchingPaths(final String[] includes, final String[] excludes, final String baseDir) { final DirectoryScanner scanner = new DirectoryScanner(); scanner.setBasedir(baseDir); if (includes != null && includes.length > 0) scanner.setIncludes(includes); if (exclud...
File dir = createDirectory(); File include = File.createTempFile("include", ".filetomatch", dir); File.createTempFile("neutral", ".notmatch", dir); File exclude = File.createTempFile("exlude", ".filetomatch", dir); String[] paths = PathUtils.getMatchingPaths( new String[] { "*.filetomatch" }, new Stri...
[FOCAL] public static String[] PathUtils.getMatchingPaths(String[] includes, String[] excludes, String baseDir) [CLASS] class PathUtils [METRICS] loc=11 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] DirectoryScanner.setBasedir/1, DirectoryScanner.setIncludes/1, DirectoryScanner.setExcludes/1, Di...
/* static context [FOCAL] public static String[] PathUtils.getMatchingPaths(String[] includes, String[] excludes, String baseDir) [PATH1] if(includes != null && includes.length > 0)=T -> if(excludes != null && excludes.length > 0)=T -> return scanner.getIncludedFiles() [PATH2] if(includes != null && includes.length > 0...
/* static context [FOCAL] public static String[] PathUtils.getMatchingPaths(String[] includes, String[] excludes, String baseDir) [PATH1] if(includes != null && includes.length > 0)=T -> if(excludes != null && excludes.length > 0)=T -> return scanner.getIncludedFiles() [PATH2] if(includes != null && includes.length > 0...
true
ok
{"focal": {"class": "PathUtils", "name": "getMatchingPaths", "signature": "String[] getMatchingPaths(String[] includes, String[] excludes, String baseDir)", "start_line": 3, "modifiers": "public static", "params": [{"name": "includes", "type": "String[]"}, {"name": "excludes", "type": "String[]"}, {"name": "baseDir", "...
2153523_457
class CssResponseRewriter implements ResponseRewriter { public void rewrite(HttpRequest request, HttpResponseBuilder original) throws RewritingException { ContentRewriterFeature.Config config = rewriterFeatureFactory.get(request); if (!RewriterUtils.isCss(request, original)) { return; } String...
String content = IOUtils.toString(this.getClass().getClassLoader(). getResourceAsStream("org/apache/shindig/gadgets/rewrite/rewritebasic.css")); String expected = IOUtils.toString(this.getClass().getClassLoader(). getResourceAsStream("org/apache/shindig/gadgets/rewrite/rewritebasic-expected.css"...
[FOCAL] public void CssResponseRewriter.rewrite(HttpRequest request, HttpResponseBuilder original) [CLASS] class CssResponseRewriter implements ResponseRewriter [METRICS] loc=13 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] List<String> rewrite(Reader content, Uri source, UriMaker uriMaker, Writ...
/* static context [FOCAL] public void CssResponseRewriter.rewrite(HttpRequest request, HttpResponseBuilder original) [PATH1] if(!RewriterUtils.isCss(request, original))=T -> return [PATH2] if(!RewriterUtils.isCss(request, original))=F [INPUTS] branches=original, request | result=- [COLLABORATORS] field rewriterFeatureF...
/* static context [FOCAL] public void CssResponseRewriter.rewrite(HttpRequest request, HttpResponseBuilder original) [PATH1] if(!RewriterUtils.isCss(request, original))=T -> return [PATH2] if(!RewriterUtils.isCss(request, original))=F [INPUTS] branches=original, request | result=- [COLLABORATORS] field rewriterFeatureF...
true
ok
{"focal": {"class": "CssResponseRewriter", "name": "rewrite", "signature": "void rewrite(HttpRequest request, HttpResponseBuilder original) throws RewritingException", "start_line": 3, "modifiers": "public", "params": [{"name": "request", "type": "HttpRequest"}, {"name": "original", "type": "HttpResponseBuilder"}], "re...
2155500_4
class CustomerSampler implements Sampler<Customer> { public Customer sample() throws Exception { Integer id = idSampler.sample(); Pair<String, String> name = nameSampler.sample(); Store store = storeSampler.sample(); Location location = locationSampler.sample(store); return new Customer(id, name, store, l...
SeedFactory factory = new SeedFactory(1234); List<Pair<String, String>> nameList = Lists.newArrayList(); nameList.add(Pair.of("Fred", "Fred")); nameList.add(Pair.of("Gary", "Gary")); nameList.add(Pair.of("George", "George")); nameList.add(Pair.of("Fiona", "Fiona")); List<Location> zipcodes = Arrays.asLi...
[FOCAL] public Customer CustomerSampler.sample() [CLASS] class CustomerSampler implements Sampler<Customer> [METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] idSampler.sample/0, nameSampler.sample/0, storeSampler.sample/0, locationSampler.sample/1 [NEW] Customer [EXCEPTIONS] declares...
/* static context [FOCAL] public Customer CustomerSampler.sample() [COLLABORATORS] field idSampler sample/0; field nameSampler sample/0; field storeSampler sample/0; field locationSampler sample/1 [EXCEPTIONS] declares Exception [NEW] Customer [CALLS-EXTERNAL] idSampler.sample/0, nameSampler.sample/0, storeSampler.samp...
/* static context [FOCAL] public Customer CustomerSampler.sample() [COLLABORATORS] field idSampler sample/0; field nameSampler sample/0; field storeSampler sample/0; field locationSampler sample/1 [EXCEPTIONS] declares Exception [NEW] Customer [CALLS-EXTERNAL] idSampler.sample/0, nameSampler.sample/0, storeSampler.samp...
true
ok
{"focal": {"class": "CustomerSampler", "name": "sample", "signature": "Customer sample() throws Exception", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Customer"}, "class_info": {"name": "CustomerSampler", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Sampler<Customer>",...
2157104_2
class FormatadorCodigo { public static String formata(String codigo) throws ErroCompilacao { Programa programa = Portugol.compilarParaAnalise(codigo); ASAPrograma asa = programa.getArvoreSintaticaAbstrata(); StringWriter stringWriter = new StringWriter(); try { Ge...
String codigo = "programa { " + " const inteiro _X = 0, _Y = 1, _MODELO = 2, _VELOCIDADE = 3, _COMBUSTIVEL = 4, _DANOS = 5" + " funcao inicio() {} " + "} "; ...
[FOCAL] public static String FormatadorCodigo.formata(String codigo) [CLASS] class FormatadorCodigo [METRICS] loc=18 cc=2 branches=0 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] Portugol.compilarParaAnalise/1, Programa.getArvoreSintaticaAbstrata/0, GeradorCodigoPortugol.visitar/1, LOGGER.log/3, StringWriter.to...
/* static context [FOCAL] public static String FormatadorCodigo.formata(String codigo) [PATH1] try-body throws -> return stringWriter.toString() [EXCEPTIONS] declares ErroCompilacao; catches ExcecaoVisitaASA ex [NEW] StringWriter, GeradorCodigoPortugol, PrintWriter [CALLS-EXTERNAL] Portugol.compilarParaAnalise/1, Progr...
/* static context [FOCAL] public static String FormatadorCodigo.formata(String codigo) [PATH1] try-body throws -> return stringWriter.toString() [EXCEPTIONS] declares ErroCompilacao; catches ExcecaoVisitaASA ex [NEW] StringWriter, GeradorCodigoPortugol, PrintWriter [CALLS-EXTERNAL] Portugol.compilarParaAnalise/1, Progr...
true
ok
{"focal": {"class": "FormatadorCodigo", "name": "formata", "signature": "String formata(String codigo) throws ErroCompilacao", "start_line": 3, "modifiers": "public static", "params": [{"name": "codigo", "type": "String"}], "return_type": "String"}, "class_info": {"name": "FormatadorCodigo", "kind": "class", "modifiers...
2158982_18
class DefaultQueryMetadata implements QueryMetadata, Cloneable { @Override public List<Expression<?>> getGroupBy() { return groupBy; } public DefaultQueryMetadata(); private static Predicate and(Predicate lhs, Predicate rhs); public DefaultQueryMetadata noValidate(); @Override pu...
metadata.addJoin(JoinType.DEFAULT, str); metadata.addGroupBy(str); assertEquals(Arrays.asList(str), metadata.getGroupBy()); } }
[FOCAL] @Override public List<Expression<?>> DefaultQueryMetadata.getGroupBy() [CLASS] class DefaultQueryMetadata implements QueryMetadata, Cloneable [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] DefaultQueryMetadata(); Predicate and(Predicate lhs, Predicate rhs); DefaultQueryMeta...
/* static context [FOCAL] @Override public List<Expression<?>> DefaultQueryMetadata.getGroupBy() */
/* static context [FOCAL] @Override public List<Expression<?>> DefaultQueryMetadata.getGroupBy() */ class DefaultQueryMetadata implements QueryMetadata, Cloneable { @Override public List<Expression<?>> getGroupBy() { return groupBy; } public DefaultQueryMetadata(); private static Predica...
true
ok
{"focal": {"class": "DefaultQueryMetadata", "name": "getGroupBy", "signature": "List<Expression<?>> getGroupBy()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "List<Expression<?>>"}, "class_info": {"name": "DefaultQueryMetadata", "kind": "class", "modifiers": "", "superclass": null, "...
2173227_2
class ROADMRepository extends ResourceRepository { public void capabilityFactoryAdded(ICapabilityFactory capabilityFactory) { log.info("Adding factory: " + capabilityFactory.getType()); this.capabilityFactories.put(capabilityFactory.getType(), capabilityFactory); } public ROADMRepository(String resourceType);...
roadmRepository = new ROADMRepository("ROADMrepository"); roadmRepository.setResourceDescriptorRepository(new MockDescriptorRepository()); roadmRepository.capabilityFactoryAdded(new MockCapabilityFactory("factory1")); roadmRepository.capabilityFactoryAdded(new MockCapabilityFactory("factory2")); Assert.asse...
[FOCAL] public void ROADMRepository.capabilityFactoryAdded(ICapabilityFactory capabilityFactory) [CLASS] class ROADMRepository extends ResourceRepository [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] log.info/1, ICapabilityFactory.getType/0, this.capabilityFactories.put/2 [FIELDS...
/* static context [FOCAL] public void ROADMRepository.capabilityFactoryAdded(ICapabilityFactory capabilityFactory) [COLLABORATORS] param capabilityFactory:ICapabilityFactory getType/0; field capabilityFactories put/2 [FIELDS] read=capabilityFactories [CALLS-EXTERNAL] log.info/1, ICapabilityFactory.getType/0, this.capab...
/* static context [FOCAL] public void ROADMRepository.capabilityFactoryAdded(ICapabilityFactory capabilityFactory) [COLLABORATORS] param capabilityFactory:ICapabilityFactory getType/0; field capabilityFactories put/2 [FIELDS] read=capabilityFactories [CALLS-EXTERNAL] log.info/1, ICapabilityFactory.getType/0, this.capab...
true
ok
{"focal": {"class": "ROADMRepository", "name": "capabilityFactoryAdded", "signature": "void capabilityFactoryAdded(ICapabilityFactory capabilityFactory)", "start_line": 3, "modifiers": "public", "params": [{"name": "capabilityFactory", "type": "ICapabilityFactory"}], "return_type": "void"}, "class_info": {"name": "ROAD...
2173449_175
class ProductSubsetBuilder extends AbstractProductBuilder { public static Product createProductSubset(Product sourceProduct, ProductSubsetDef subsetDef, String name, String desc) throws IOException { return createProductSubset(sourceProduct, false, subsetDef, n...
final Product product2 = ProductSubsetBuilder.createProductSubset(product, null, "subset", ""); final Band band = product2.getBand(DUMMY_BAND1); final Band band2 = product2.getBand(DUMMY_BAND2); assertNotNull(band); assertNotNull(band2); final ImageInfo imageInfo = band....
[FOCAL] public static Product ProductSubsetBuilder.createProductSubset(Product sourceProduct, ProductSubsetDef subsetDef, String name, String desc) [CLASS] class ProductSubsetBuilder extends AbstractProductBuilder [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Product createProduc...
/* static context [FOCAL] public static Product ProductSubsetBuilder.createProductSubset(Product sourceProduct, ProductSubsetDef subsetDef, String name, String desc) [INPUTS] branches=- | result=desc, name, sourceProduct, subsetDef [EXCEPTIONS] declares IOException [CALLS-INTERNAL] Product createProductSubset(Product s...
/* static context [FOCAL] public static Product ProductSubsetBuilder.createProductSubset(Product sourceProduct, ProductSubsetDef subsetDef, String name, String desc) [INPUTS] branches=- | result=desc, name, sourceProduct, subsetDef [EXCEPTIONS] declares IOException [CALLS-INTERNAL] Product createProductSubset(Product s...
true
ok
{"focal": {"class": "ProductSubsetBuilder", "name": "createProductSubset", "signature": "Product createProductSubset(Product sourceProduct, ProductSubsetDef subsetDef, String name, String desc) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "sourceProduct", "type": "Product"}, {...
2188276_354
class SqlGenerationPreferences { public void setSqlStatementSeparator(String sqlStatementSeparator) { this.sqlStatementSeparator = sqlStatementSeparator; } public boolean isQuoteConstraintNames(); public void setQuoteConstraintNames(boolean quoteConstraintNames); public boolean isQuoteColumnNames(); public v...
classUnderTest.setSqlStatementSeparator("\n"); assertEquals("\n", classUnderTest.getSqlStatementSeparator()); } }
[FOCAL] public void SqlGenerationPreferences.setSqlStatementSeparator(String sqlStatementSeparator) [CLASS] class SqlGenerationPreferences [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [FIELDS] write=sqlStatementSeparator [STATE] sqlStatementSeparator via getSqlStatementSeparator() [DATAFLOW] sql...
/* static context [FOCAL] public void SqlGenerationPreferences.setSqlStatementSeparator(String sqlStatementSeparator) [STATE] sqlStatementSeparator via getSqlStatementSeparator() [FIELDS] write=sqlStatementSeparator */
/* static context [FOCAL] public void SqlGenerationPreferences.setSqlStatementSeparator(String sqlStatementSeparator) [STATE] sqlStatementSeparator via getSqlStatementSeparator() [FIELDS] write=sqlStatementSeparator */ class SqlGenerationPreferences { public void setSqlStatementSeparator(String sqlStatementSeparator)...
true
ok
{"focal": {"class": "SqlGenerationPreferences", "name": "setSqlStatementSeparator", "signature": "void setSqlStatementSeparator(String sqlStatementSeparator)", "start_line": 3, "modifiers": "public", "params": [{"name": "sqlStatementSeparator", "type": "String"}], "return_type": "void"}, "class_info": {"name": "SqlGene...
2192780_20
class JOOX { public static Content content(final String value) { return new Content() { @Override public String content(Context context) { return value; } }; } public static Match(); public static Match(Object object); public st...
assertEquals("<customer id=\"0\"><age>0</age></customer>", $.content(new Customer()).content()); assertEquals($(new Customer()).toString(), $.content()); assertEquals("<customer id=\"0\"><customer id=\"0\"><age>0</age></customer></customer>", $.find("customer").content(ne...
[FOCAL] public static Content JOOX.content(String value) [CLASS] class JOOX [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] Content [INPUTS] branches=- | result=value [DATAFLOW] value@param->L2 [CLASS-MEMBERS] FastFilter none(); FastFilter all(); FastFilter even(); FastFilter odd(); FastFilte...
/* static context [FOCAL] public static Content JOOX.content(String value) [INPUTS] branches=- | result=value [NEW] Content */
/* static context [FOCAL] public static Content JOOX.content(String value) [INPUTS] branches=- | result=value [NEW] Content */ class JOOX { public static Content content(final String value) { return new Content() { @Override public String content(Context context) { r...
true
ok
{"focal": {"class": "JOOX", "name": "content", "signature": "Content content(String value)", "start_line": 3, "modifiers": "public static", "params": [{"name": "value", "type": "String"}], "return_type": "Content"}, "class_info": {"name": "JOOX", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null,...
2192825_0
class JSONWriter { public String write(Object object) throws JSONException { return this.write(object, null, null, false); } public String write(Object object, Collection<Pattern> excludeProperties, Collection<Pattern> includeProperties, boolean excludeNullProperties); ...
Bean bean1=new Bean(); bean1.setStringField("str"); bean1.setBooleanField(true); bean1.setCharField('s'); bean1.setDoubleField(10.1); bean1.setFloatField(1.5f); bean1.setIntField(10); bean1.setLongField(100); bean1.setEnumField(AnEnum.ValueA); ...
[FOCAL] public String JSONWriter.write(Object object) [CLASS] class JSONWriter [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] String write(Object object, Collection<Pattern> excludeProperties, Collection<Pattern> includeProperties, boolean excludeNullProperties) [EXCEPTIONS] decla...
/* static context [FOCAL] public String JSONWriter.write(Object object) [INPUTS] branches=- | result=object [EXCEPTIONS] declares JSONException [CALLS-INTERNAL] String write(Object object, Collection<Pattern> excludeProperties, Collection<Pattern> includeProperties, boolean excludeNullProperties) */
/* static context [FOCAL] public String JSONWriter.write(Object object) [INPUTS] branches=- | result=object [EXCEPTIONS] declares JSONException [CALLS-INTERNAL] String write(Object object, Collection<Pattern> excludeProperties, Collection<Pattern> includeProperties, boolean excludeNullProperties) */ class JSONWriter { ...
true
ok
{"focal": {"class": "JSONWriter", "name": "write", "signature": "String write(Object object) throws JSONException", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "Object"}], "return_type": "String"}, "class_info": {"name": "JSONWriter", "kind": "class", "modifiers": "", "superclass": nul...
2197202_17
class SugarConfig { public static void clearCache() { fields.clear(); fields = new HashMap<>(); } public static void setFields(Class<?> clazz, List<Field> fieldz); public static List<Field> getFields(Class<?> clazz); } class SugarConfigTest { @Test public void testClearCache...
SugarConfig.clearCache(); Assert.assertEquals(true, SugarConfig.fields.isEmpty()); } }
[FOCAL] public static void SugarConfig.clearCache() [CLASS] class SugarConfig [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] fields.clear/0 [NEW] HashMap<> [COLLABORATORS] field fields clear/0 [CLASS-MEMBERS] void setFields(Class<?> clazz, List<Field> fieldz); List<Field> getField...
/* static context [FOCAL] public static void SugarConfig.clearCache() [COLLABORATORS] field fields clear/0 [NEW] HashMap<> [CALLS-EXTERNAL] fields.clear/0 */
/* static context [FOCAL] public static void SugarConfig.clearCache() [COLLABORATORS] field fields clear/0 [NEW] HashMap<> [CALLS-EXTERNAL] fields.clear/0 */ class SugarConfig { public static void clearCache() { fields.clear(); fields = new HashMap<>(); } public static void setFields(Class...
true
ok
{"focal": {"class": "SugarConfig", "name": "clearCache", "signature": "void clearCache()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "void"}, "class_info": {"name": "SugarConfig", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name...
2197427_2
class TumbleJ { public JSONObject postPhoto(String caption, String source, String link, String tags, String date) throws Exception { Map<String, Object> params = new HashMap<String, Object>(); if (caption != null && caption != "") params.put("caption", caption); params.put("source", source); if (link...
// response: {"meta":{"status":201,"msg":"Created"},"response":{"id":8868275314}} JSONObject response = tj.postPhoto("Smile", "http://30.media.tumblr.com/tumblr_lk5tyx3Zqo1qb67gho1_500.jpg", "Senyum itu indah dan menyenangkan, apalagi dari mojang geulis :)", "smile,senyum", null); assertNotNull(respon...
[FOCAL] public JSONObject TumbleJ.postPhoto(String caption, String source, String link, String tags, String date) [CLASS] class TumbleJ [METRICS] loc=11 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] JSONObject post(String type, String tags, String date, Map<String, Object> params) [CALLS-EXTERNA...
/* static context [FOCAL] public JSONObject TumbleJ.postPhoto(String caption, String source, String link, String tags, String date) [PATH1] if(caption != null && caption != "")=T -> if(link != null && caption != "")=T -> return post(POST_PHOTO, tags, date, params) [PATH2] if(caption != null && caption != "")=F -> if(li...
/* static context [FOCAL] public JSONObject TumbleJ.postPhoto(String caption, String source, String link, String tags, String date) [PATH1] if(caption != null && caption != "")=T -> if(link != null && caption != "")=T -> return post(POST_PHOTO, tags, date, params) [PATH2] if(caption != null && caption != "")=F -> if(li...
true
ok
{"focal": {"class": "TumbleJ", "name": "postPhoto", "signature": "JSONObject postPhoto(String caption, String source, String link, String tags, String date) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "caption", "type": "String"}, {"name": "source", "type": "String"}, {"name": "link",...
2209304_0
class JbossRemotingExporter extends RemoteExporter implements InitializingBean, BeanNameAware, SmartLifecycle { @Override public void stop(Runnable callback) { stop(); if (null != callback) { callback.run(); } } @Override public void setBeanName(String name); pr...
AnnotationConfigApplicationContext client = null, server = null; try { server = new AnnotationConfigApplicationContext(ServerConfiguration.class); client = new AnnotationConfigApplicationContext(ClientConfiguration.class); Crm clientBean = client.getBean(Crm.class);...
[FOCAL] @Override public void JbossRemotingExporter.stop(Runnable callback) [CLASS] class JbossRemotingExporter extends RemoteExporter implements InitializingBean, BeanNameAware, SmartLifecycle [METRICS] loc=7 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-INTERNAL] void stop() [CALLS-EXTERNAL] Runnable.ru...
/* static context [FOCAL] @Override public void JbossRemotingExporter.stop(Runnable callback) [PATH1] if(null != callback)=T [PATH2] if(null != callback)=F [INPUTS] branches=callback | result=- [COLLABORATORS] param callback:Runnable run/0 [CALLS-INTERNAL] void stop() [CALLS-EXTERNAL] Runnable.run/0 */
/* static context [FOCAL] @Override public void JbossRemotingExporter.stop(Runnable callback) [PATH1] if(null != callback)=T [PATH2] if(null != callback)=F [INPUTS] branches=callback | result=- [COLLABORATORS] param callback:Runnable run/0 [CALLS-INTERNAL] void stop() [CALLS-EXTERNAL] Runnable.run/0 */ class JbossRemot...
true
ok
{"focal": {"class": "JbossRemotingExporter", "name": "stop", "signature": "void stop(Runnable callback)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "callback", "type": "Runnable"}], "return_type": "void"}, "class_info": {"name": "JbossRemotingExporter", "kind": "class", "modifiers": "", "sup...
2213380_0
class ArvcRiskModel { public double calculateRisk(double baselineSurvival) { return calculateRisk(baselineSurvival, linearPredictor()); } ArvcRiskModel(int sex, int age, int hxSyncope, int hxNSVT, int pvcCount, int twiCount, int rvef); private double linearPredictor(); ...
ArvcRiskModel pt1 = new ArvcRiskModel(0, 48, 0, 0, 1, 4, 55 ); assertEquals(3.0, pt1.calculateRisk(ArvcRiskModel.year5), 0.0001); assertEquals(1.8, pt1.calculateRisk(ArvcRiskModel.year2), 0.0001); assertEquals(1.1, pt1.calculateRisk(ArvcRiskModel.year1), 0.0001); ...
[FOCAL] public double ArvcRiskModel.calculateRisk(double baselineSurvival) [CLASS] class ArvcRiskModel [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] double calculateRisk(double baselineSurvival, double linearPredictor); double linearPredictor() [INPUTS] branches=- | result=baseli...
/* static context [FOCAL] public double ArvcRiskModel.calculateRisk(double baselineSurvival) [INPUTS] branches=- | result=baselineSurvival [CALLS-INTERNAL] double calculateRisk(double baselineSurvival, double linearPredictor); double linearPredictor() */
/* static context [FOCAL] public double ArvcRiskModel.calculateRisk(double baselineSurvival) [INPUTS] branches=- | result=baselineSurvival [CALLS-INTERNAL] double calculateRisk(double baselineSurvival, double linearPredictor); double linearPredictor() */ class ArvcRiskModel { public double calculateRisk(double bas...
true
ok
{"focal": {"class": "ArvcRiskModel", "name": "calculateRisk", "signature": "double calculateRisk(double baselineSurvival)", "start_line": 3, "modifiers": "public", "params": [{"name": "baselineSurvival", "type": "double"}], "return_type": "double"}, "class_info": {"name": "ArvcRiskModel", "kind": "class", "modifiers": ...
2254694_7
class ConversionService { public Converter<?> getConverter(Class<?> type, Annotation[] annotations) { for (ConverterFactory factory : factories) { Converter<?> converter = factory.createConverter(type, annotations); if (converter != null) { return converter; ...
Converter<?> converter = conversion.getConverter(Integer.class, null); Map<String, String[]> data = new HashMap<String, String[]>(); data.put("val1", new String[]{"1"}); data.put("val2", new String[]{"2", "3", "4"}); //convert a single value Object val = converter.conve...
[FOCAL] public Converter<?> ConversionService.getConverter(Class<?> type, Annotation[] annotations) [CLASS] class ConversionService [METRICS] loc=10 cc=3 branches=1 loops=1 returns=1 throws=1 nesting=2 [CALLS-EXTERNAL] ConverterFactory.createConverter/2 [NEW] NoConverterException [EXCEPTIONS] throws NoConverterExceptio...
/* static context [FOCAL] public Converter<?> ConversionService.getConverter(Class<?> type, Annotation[] annotations) [THROWS-WHEN] NoConverterException when foreach(ConverterFactory factory : factories)=T && !(converter != null) [THROWS-WHEN] NoConverterException when foreach(ConverterFactory factory : factories)=F [P...
/* static context [FOCAL] public Converter<?> ConversionService.getConverter(Class<?> type, Annotation[] annotations) [THROWS-WHEN] NoConverterException when foreach(ConverterFactory factory : factories)=T && !(converter != null) [THROWS-WHEN] NoConverterException when foreach(ConverterFactory factory : factories)=F [P...
true
ok
{"focal": {"class": "ConversionService", "name": "getConverter", "signature": "Converter<?> getConverter(Class<?> type, Annotation[] annotations)", "start_line": 3, "modifiers": "public", "params": [{"name": "type", "type": "Class<?>"}, {"name": "annotations", "type": "Annotation[]"}], "return_type": "Converter<?>"}, "...
2259237_53
class AbstractSearchResultFactoryImpl implements SearchResultFactory { protected void populateServiceAlerts(Set<String> serviceAlertDescriptions, List<ServiceAlertBean> serviceAlertBeans) { populateServiceAlerts(serviceAlertDescriptions, serviceAlertBeans, true); } public AbstractSearchResultFactoryImpl();...
populateServiceAlerts(serviceAlertDescriptions, serviceAlertBeans, false); assertEquals(1, serviceAlertDescriptions.size()); String d = (String) serviceAlertDescriptions.toArray()[0]; assertTrue("line one\nline two".equals(d)); } }
[FOCAL] protected void AbstractSearchResultFactoryImpl.populateServiceAlerts(Set<String> serviceAlertDescriptions, List<ServiceAlertBean> serviceAlertBeans) [CLASS] class AbstractSearchResultFactoryImpl implements SearchResultFactory [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] ...
/* static context [FOCAL] protected void AbstractSearchResultFactoryImpl.populateServiceAlerts(Set<String> serviceAlertDescriptions, List<ServiceAlertBean> serviceAlertBeans) [CALLS-INTERNAL] void populateServiceAlerts(Set<String> serviceAlertDescriptions, List<ServiceAlertBean> serviceAlertBeans, boolean htmlizeNewlin...
/* static context [FOCAL] protected void AbstractSearchResultFactoryImpl.populateServiceAlerts(Set<String> serviceAlertDescriptions, List<ServiceAlertBean> serviceAlertBeans) [CALLS-INTERNAL] void populateServiceAlerts(Set<String> serviceAlertDescriptions, List<ServiceAlertBean> serviceAlertBeans, boolean htmlizeNewlin...
true
ok
{"focal": {"class": "AbstractSearchResultFactoryImpl", "name": "populateServiceAlerts", "signature": "void populateServiceAlerts(Set<String> serviceAlertDescriptions, List<ServiceAlertBean> serviceAlertBeans)", "start_line": 3, "modifiers": "protected", "params": [{"name": "serviceAlertDescriptions", "type": "Set<Strin...
2271327_0
class Shortcuts { public static LoadableDetachableModel loadedModel(final Object bean, final String loadMethod) { // assert that method exists ReflectUtils.getZeroArgMethod(bean.getClass(), loadMethod); return new LoadableDe...
final List<String> values = new ArrayList(); IModel model = Shortcuts.loadedModel(new TestBean(values), "load"); List<String> loaded = (List<String>) model.getObject(); Assert.assertTrue(loaded == values); Assert.assertTrue(loaded.size() == 1); l...
[FOCAL] public static LoadableDetachableModel Shortcuts.loadedModel(Object bean, String loadMethod) [CLASS] class Shortcuts [METRICS] loc=13 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] ReflectUtils.getZeroArgMethod/2, Object.getClass/0, ReflectUtils.invokeZeroArgMethod/2 [NEW] LoadableDetachab...
/* static context [FOCAL] public static LoadableDetachableModel Shortcuts.loadedModel(Object bean, String loadMethod) [INPUTS] branches=- | result=bean, loadMethod [NEW] LoadableDetachableModel [CALLS-EXTERNAL] ReflectUtils.getZeroArgMethod/2, Object.getClass/0, ReflectUtils.invokeZeroArgMethod/2 */
/* static context [FOCAL] public static LoadableDetachableModel Shortcuts.loadedModel(Object bean, String loadMethod) [INPUTS] branches=- | result=bean, loadMethod [NEW] LoadableDetachableModel [CALLS-EXTERNAL] ReflectUtils.getZeroArgMethod/2, Object.getClass/0, ReflectUtils.invokeZeroArgMethod/2 */ class Shortcuts { ...
true
ok
{"focal": {"class": "Shortcuts", "name": "loadedModel", "signature": "LoadableDetachableModel loadedModel(Object bean, String loadMethod)", "start_line": 3, "modifiers": "public static", "params": [{"name": "bean", "type": "Object"}, {"name": "loadMethod", "type": "String"}], "return_type": "LoadableDetachableModel"}, ...
2272670_4
class ImageComparisonMatchers { @Factory public static Matcher<Object> isApproved() throws IOException { final StackTraceElement trace = StackUtils .getCallingTestMethodStackTraceElement(); final String methodName = trace.getMethodName(); final String className = getClas...
matcher = ImageComparisonMatchers.isApproved(); final BufferedImage image = ImageIO.read(getClass().getResource( "/net/avh4/util/imagecomparison/hamcrest/ImageComparisonMatchersTest.isApproved_withMatchingImage.png")); assertThat(matcher, not(doesNotMatch(image))); } }
[FOCAL] @Factory public static Matcher<Object> ImageComparisonMatchers.isApproved() [CLASS] class ImageComparisonMatchers [METRICS] loc=10 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Class<?> getClassObject(StackTraceElement trace); Matcher<Object> looksLike(String string, Class<?> callingClas...
/* static context [FOCAL] @Factory public static Matcher<Object> ImageComparisonMatchers.isApproved() [EXCEPTIONS] declares IOException [CALLS-INTERNAL] Class<?> getClassObject(StackTraceElement trace); Matcher<Object> looksLike(String string, Class<?> callingClass); String getClassName(StackTraceElement trace) [CALLS-...
/* static context [FOCAL] @Factory public static Matcher<Object> ImageComparisonMatchers.isApproved() [EXCEPTIONS] declares IOException [CALLS-INTERNAL] Class<?> getClassObject(StackTraceElement trace); Matcher<Object> looksLike(String string, Class<?> callingClass); String getClassName(StackTraceElement trace) [CALLS-...
true
ok
{"focal": {"class": "ImageComparisonMatchers", "name": "isApproved", "signature": "Matcher<Object> isApproved() throws IOException", "start_line": 3, "modifiers": "@Factory public static", "params": [], "return_type": "Matcher<Object>"}, "class_info": {"name": "ImageComparisonMatchers", "kind": "class", "modifiers": ""...
2287347_24
class AggregationService { public List<AggregatedSegment> aggregateSegments(List<? extends ConnectableSegment> segments) { List<AggregatedSegment> aggregatedSegments = new ArrayList<AggregatedSegment>(); for (Iterator<? extends ConnectableSegment> it = segments.iterator(); it.hasNext();) { ConnectableSegment s...
List<AggregatedSegment> list = aggregationService.aggregateSegments(Collections.EMPTY_LIST); assertTrue(list.isEmpty()); } }
[FOCAL] public List<AggregatedSegment> AggregationService.aggregateSegments(List<? extends ConnectableSegment> segments) [CLASS] class AggregationService [METRICS] loc=11 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] List<AggregatedSegment> aggregateMore(List<AggregatedSegment> segments); boolea...
/* static context [FOCAL] public List<AggregatedSegment> AggregationService.aggregateSegments(List<? extends ConnectableSegment> segments) [PATH1] for(it.hasNext())=T -> if(!canConnect(aggregatedSegments, newAggregatedSegment))=T -> exit loop -> return aggregateMore(aggregatedSegments) [PATH2] for(it.hasNext())=F -> re...
/* static context [FOCAL] public List<AggregatedSegment> AggregationService.aggregateSegments(List<? extends ConnectableSegment> segments) [PATH1] for(it.hasNext())=T -> if(!canConnect(aggregatedSegments, newAggregatedSegment))=T -> exit loop -> return aggregateMore(aggregatedSegments) [PATH2] for(it.hasNext())=F -> re...
true
ok
{"focal": {"class": "AggregationService", "name": "aggregateSegments", "signature": "List<AggregatedSegment> aggregateSegments(List<? extends ConnectableSegment> segments)", "start_line": 3, "modifiers": "public", "params": [{"name": "segments", "type": "List<? extends ConnectableSegment>"}], "return_type": "List<Aggre...
2293442_5
class UUIDUtils { public static String toOID(UUID uuid) { return toOID(uuid, OID_ROOT); } public static boolean isUUID(String uuidstr); public static String toOID(UUID uuid, String prefix); public static String toOIDFromUUIDString(String uuidstr); public static String toOIDFromUUIDStr...
UUID uuid = UUID.fromString("f81d4fae-7dec-11d0-a765-00a0c91e6bf6"); assertEquals("2.25.329800735698586629295641978511506172918", UUIDUtils.toOID(uuid)); } }
[FOCAL] public static String UUIDUtils.toOID(UUID uuid) [CLASS] class UUIDUtils [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] String toOID(UUID uuid, String prefix) [INPUTS] branches=- | result=uuid [DATAFLOW] uuid@param->L3 [CLASS-MEMBERS] boolean isUUID(String uuidstr); String ...
/* static context [FOCAL] public static String UUIDUtils.toOID(UUID uuid) [INPUTS] branches=- | result=uuid [CALLS-INTERNAL] String toOID(UUID uuid, String prefix) */
/* static context [FOCAL] public static String UUIDUtils.toOID(UUID uuid) [INPUTS] branches=- | result=uuid [CALLS-INTERNAL] String toOID(UUID uuid, String prefix) */ class UUIDUtils { public static String toOID(UUID uuid) { return toOID(uuid, OID_ROOT); } public static boolean isUUID(String uuid...
true
ok
{"focal": {"class": "UUIDUtils", "name": "toOID", "signature": "String toOID(UUID uuid)", "start_line": 3, "modifiers": "public static", "params": [{"name": "uuid", "type": "UUID"}], "return_type": "String"}, "class_info": {"name": "UUIDUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "...
2296450_8
class AnnotationDataBuilder { static void populateDataIndexFromAnnotations(final AnnotationData data, final Class expectedAnnotationClass, final Method targetMethod) throws NoSuchMethodException, IllegalAccessException,...
final AnnotationData data = new AnnotationData(); Class expected = InvalidateAssignCache.class; Method targetMethod = null; // Not an update type. AnnotationDataBuilder.populateDataIndexFromAnnotations(data, expected, null); assertEquals(AnnotationData.DEFAULT_INTEGER, ...
[FOCAL] static void AnnotationDataBuilder.populateDataIndexFromAnnotations(AnnotationData data, Class expectedAnnotationClass, Method targetMethod) [CLASS] class AnnotationDataBuilder [METRICS] loc=45 cc=10 branches=7 loops=2 returns=2 throws=2 nesting=6 [CALLS-EXTERNAL] UPDATES.contains/1, Method.getAnnotation/1, Anno...
/* static context [FOCAL] static void AnnotationDataBuilder.populateDataIndexFromAnnotations(AnnotationData data, Class expectedAnnotationClass, Method targetMethod) [THROWS-WHEN] InvalidParameterException when UPDATES.contains(expectedAnnotationClass) && !(returnAnnotation != null) && paramAnnotationArrays != null && ...
/* static context [FOCAL] static void AnnotationDataBuilder.populateDataIndexFromAnnotations(AnnotationData data, Class expectedAnnotationClass, Method targetMethod) [THROWS-WHEN] InvalidParameterException when UPDATES.contains(expectedAnnotationClass) && !(returnAnnotation != null) && paramAnnotationArrays != null && ...
true
ok
{"focal": {"class": "AnnotationDataBuilder", "name": "populateDataIndexFromAnnotations", "signature": "void populateDataIndexFromAnnotations(AnnotationData data, Class expectedAnnotationClass, Method targetMethod) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException", "start_line": 3, "modifi...
2304277_106
class MetadataIdentificationUtils { public static String getMetadataInstance(final String metadataId) { if (isIdentifyingInstance(metadataId)) { return metadataId.substring(metadataId.indexOf(INSTANCE_DELIMITER) + 1); } return null; } private MetadataIdentificationUtils(); public static St...
assertEquals(INSTANCE_CLASS, MetadataIdentificationUtils.getMetadataInstance(INSTANCE_MID)); } }
[FOCAL] public static String MetadataIdentificationUtils.getMetadataInstance(String metadataId) [CLASS] class MetadataIdentificationUtils [METRICS] loc=6 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] boolean isIdentifyingInstance(String metadataIdentificationString) [CALLS-EXTERNAL] String.subst...
/* static context [FOCAL] public static String MetadataIdentificationUtils.getMetadataInstance(String metadataId) [PATH1] if(isIdentifyingInstance(metadataId))=T -> return metadataId.substring(metadataId.indexOf(INSTANCE_DELIMITER) + 1) [PATH2] if(isIdentifyingInstance(metadataId))=F -> return null [INPUTS] branches=me...
/* static context [FOCAL] public static String MetadataIdentificationUtils.getMetadataInstance(String metadataId) [PATH1] if(isIdentifyingInstance(metadataId))=T -> return metadataId.substring(metadataId.indexOf(INSTANCE_DELIMITER) + 1) [PATH2] if(isIdentifyingInstance(metadataId))=F -> return null [INPUTS] branches=me...
true
ok
{"focal": {"class": "MetadataIdentificationUtils", "name": "getMetadataInstance", "signature": "String getMetadataInstance(String metadataId)", "start_line": 3, "modifiers": "public static", "params": [{"name": "metadataId", "type": "String"}], "return_type": "String"}, "class_info": {"name": "MetadataIdentificationUti...
2306348_0
class DefaultHelloService implements HelloService { public String sayHello( String who ) { return "Hello " + who; } int port; private Tomcat tomcat; } class TestDefaultHelloService { int port; private Tomcat tomcat; @Test public void testSayHello() {
HelloService service = JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/testServices/", HelloService.class ); String who = "foo"; assertEquals( "Hello "+who, service.sayHello( who ) ); } }
[FOCAL] public String DefaultHelloService.sayHello(String who) [CLASS] class DefaultHelloService implements HelloService [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=who [DATAFLOW] who@param->L3 [TEST] TestDefaultHelloService: @Test public void testSayHello() [TEST-F...
/* static context [FOCAL] public String DefaultHelloService.sayHello(String who) [INPUTS] branches=- | result=who */
/* static context [FOCAL] public String DefaultHelloService.sayHello(String who) [INPUTS] branches=- | result=who */ class DefaultHelloService implements HelloService { public String sayHello( String who ) { return "Hello " + who; } int port; private Tomcat tomcat; } class TestDefaultHe...
true
ok
{"focal": {"class": "DefaultHelloService", "name": "sayHello", "signature": "String sayHello(String who)", "start_line": 3, "modifiers": "public", "params": [{"name": "who", "type": "String"}], "return_type": "String"}, "class_info": {"name": "DefaultHelloService", "kind": "class", "modifiers": "", "superclass": null, ...
2306900_3
class PropertiesBasedDatastore implements GatewayDatastore { @Override public List<String> getAddressesForApplication(String jid) { return delegateStore.getAddressesForApplication(jid); } public PropertiesBasedDatastore(final Resource properties); public PropertiesBasedDatastore(final Resource properties, i...
clearCurrentTempFile(); tempFile = File.createTempFile("test", ".properties"); tempFile.deleteOnExit(); String newMappings = ".*usera.*=usera@localhost\n" + ".*usera.*=usera@localhost\n" + ".*usera.*=usera@localhost\n" + " \n"; // erase exi...
[FOCAL] @Override public List<String> PropertiesBasedDatastore.getAddressesForApplication(String jid) [CLASS] class PropertiesBasedDatastore implements GatewayDatastore [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] delegateStore.getAddressesForApplication/1 [INPUTS] branches=- | ...
/* static context [FOCAL] @Override public List<String> PropertiesBasedDatastore.getAddressesForApplication(String jid) [INPUTS] branches=- | result=jid [COLLABORATORS] field delegateStore getAddressesForApplication/1 [CALLS-EXTERNAL] delegateStore.getAddressesForApplication/1 */
/* static context [FOCAL] @Override public List<String> PropertiesBasedDatastore.getAddressesForApplication(String jid) [INPUTS] branches=- | result=jid [COLLABORATORS] field delegateStore getAddressesForApplication/1 [CALLS-EXTERNAL] delegateStore.getAddressesForApplication/1 */ class PropertiesBasedDatastore implemen...
true
ok
{"focal": {"class": "PropertiesBasedDatastore", "name": "getAddressesForApplication", "signature": "List<String> getAddressesForApplication(String jid)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "jid", "type": "String"}], "return_type": "List<String>"}, "class_info": {"name": "PropertiesBas...
2311431_0
class Vertex { public final int orientation(Vertex a, Vertex b, Vertex c) { double result = Geometry.leftOfPlane(a.x, a.y, a.z, b.x, b.y, b.z, c.x, c.y, c.z, x, y, z); if (result > 0.0) { return 1; } else if (result < 0.0) { ...
Vertex[] fourCorners = Tetrahedralization.getFourCorners(); assertEquals(1, fourCorners[3].orientation(fourCorners[0], fourCorners[1], fourCorners[2])); assertEquals(-1, fourCorners[3].orientati...
[FOCAL] public final int Vertex.orientation(Vertex a, Vertex b, Vertex c) [CLASS] class Vertex [METRICS] loc=10 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=2 [CALLS-EXTERNAL] Geometry.leftOfPlane/12 [PATH1] if(result > 0.0)=F -> if(result < 0.0)=T -> return -1 [PATH2] if(result > 0.0)=T -> return 1 [PATH3] if(re...
/* static context [FOCAL] public final int Vertex.orientation(Vertex a, Vertex b, Vertex c) [PATH1] if(result > 0.0)=F -> if(result < 0.0)=T -> return -1 [PATH2] if(result > 0.0)=T -> return 1 [PATH3] if(result > 0.0)=F -> if(result < 0.0)=F -> return 0 [INPUTS] branches=a, b, c | result=- [CALLS-EXTERNAL] Geometry.lef...
/* static context [FOCAL] public final int Vertex.orientation(Vertex a, Vertex b, Vertex c) [PATH1] if(result > 0.0)=F -> if(result < 0.0)=T -> return -1 [PATH2] if(result > 0.0)=T -> return 1 [PATH3] if(result > 0.0)=F -> if(result < 0.0)=F -> return 0 [INPUTS] branches=a, b, c | result=- [CALLS-EXTERNAL] Geometry.lef...
true
ok
{"focal": {"class": "Vertex", "name": "orientation", "signature": "int orientation(Vertex a, Vertex b, Vertex c)", "start_line": 3, "modifiers": "public final", "params": [{"name": "a", "type": "Vertex"}, {"name": "b", "type": "Vertex"}, {"name": "c", "type": "Vertex"}], "return_type": "int"}, "class_info": {"name": "V...
2316136_86
class CreateMeasure extends AnnotationType { public AggregationType getAggregateType() { return aggregateType; } public String getName(); public void setName( String name ); public void setAggregateType( AggregationType aggregateType ); public String getFormatString(); public void setFormatString( S...
CreateMeasure createMeasure = new CreateMeasure(); assertEquals( AggregationType.SUM, createMeasure.getAggregateType() ); } }
[FOCAL] public AggregationType CreateMeasure.getAggregateType() [CLASS] class CreateMeasure extends AnnotationType [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] String getName(); void setName(String name); void setAggregateType(AggregationType aggregateType); String getFormatStrin...
/* static context [FOCAL] public AggregationType CreateMeasure.getAggregateType() */
/* static context [FOCAL] public AggregationType CreateMeasure.getAggregateType() */ class CreateMeasure extends AnnotationType { public AggregationType getAggregateType() { return aggregateType; } public String getName(); public void setName( String name ); public void setAggregateType( AggregationType...
true
ok
{"focal": {"class": "CreateMeasure", "name": "getAggregateType", "signature": "AggregationType getAggregateType()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "AggregationType"}, "class_info": {"name": "CreateMeasure", "kind": "class", "modifiers": "", "superclass": "AnnotationType", "interfac...
2316191_151
class DSWDatasourceServiceImpl implements IDSWDatasourceService { public SerializedResultSet doPreview( String connectionName, String query, String previewLimit ) throws DatasourceServiceException { if ( !hasDataAccessPermission() ) { logger.error( Messages.getErrorString( "DatasourceServiceImpl.ERROR_...
doReturn( true ).when( dswService ).hasDataAccessPermission(); SerializedResultSet result = dswService.doPreview( CONNECTION_NAME, VALID_QUERY, PREVIEW_LIMIT ); try { verify( dswService ).executeQuery( "[connection &#25509;&#32154; &lt;;&gt;!@#$%^&amp;*()_-=+.,]", VALID_QUERY, PREVIEW_LIMIT );...
[FOCAL] public SerializedResultSet DSWDatasourceServiceImpl.doPreview(String connectionName, String query, String previewLimit) [CLASS] class DSWDatasourceServiceImpl implements IDSWDatasourceService [METRICS] loc=22 cc=4 branches=1 loops=0 returns=1 throws=3 nesting=1 [CALLS-INTERNAL] IPentahoResultSet executeQuery(St...
/* static context [FOCAL] public SerializedResultSet DSWDatasourceServiceImpl.doPreview(String connectionName, String query, String previewLimit) [THROWS-WHEN] DatasourceServiceException when !hasDataAccessPermission() [THROWS-WHEN] DatasourceServiceException when hasDataAccessPermission() && try-body throws [PATH1] if...
/* static context [FOCAL] public SerializedResultSet DSWDatasourceServiceImpl.doPreview(String connectionName, String query, String previewLimit) [THROWS-WHEN] DatasourceServiceException when !hasDataAccessPermission() [THROWS-WHEN] DatasourceServiceException when hasDataAccessPermission() && try-body throws [PATH1] if...
true
ok
{"focal": {"class": "DSWDatasourceServiceImpl", "name": "doPreview", "signature": "SerializedResultSet doPreview(String connectionName, String query, String previewLimit) throws DatasourceServiceException", "start_line": 3, "modifiers": "public", "params": [{"name": "connectionName", "type": "String"}, {"name": "query"...
2316200_293
class UsersVm { public void closeChangePasswordDialog() { zkHelper.findComponent(CHANGE_PASSWORD_DIALOG).detach(); } public UsersVm(@Nonnull UserService userService); @Init public void init(@ContextParam(ContextType.VIEW) Component component); @VisibleForTesting void init(Component compo...
Component mockComponent = mock(Component.class); when(zkHelper.findComponent(CHANGE_PASSWORD_DIALOG)).thenReturn(mockComponent); usersVm.closeChangePasswordDialog(); verify(mockComponent).detach(); } }
[FOCAL] public void UsersVm.closeChangePasswordDialog() [CLASS] class UsersVm [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] zkHelper.findComponent(CHANGE_PASSWORD_DIALOG).detach/0, ZkHelper.findComponent/1 [FIELDS] read=zkHelper:ZkHelper [COLLABORATORS] field zkHelper:ZkHelper fi...
/* static context [FOCAL] public void UsersVm.closeChangePasswordDialog() [COLLABORATORS] field zkHelper:ZkHelper findComponent/1 [FIELDS] read=zkHelper:ZkHelper [CALLS-EXTERNAL] zkHelper.findComponent(CHANGE_PASSWORD_DIALOG).detach/0, ZkHelper.findComponent/1 */
/* static context [FOCAL] public void UsersVm.closeChangePasswordDialog() [COLLABORATORS] field zkHelper:ZkHelper findComponent/1 [FIELDS] read=zkHelper:ZkHelper [CALLS-EXTERNAL] zkHelper.findComponent(CHANGE_PASSWORD_DIALOG).detach/0, ZkHelper.findComponent/1 */ class UsersVm { public void closeChangePasswordDial...
true
ok
{"focal": {"class": "UsersVm", "name": "closeChangePasswordDialog", "signature": "void closeChangePasswordDialog()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "UsersVm", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name...
2316202_113
class UserDataCacheService { public Integer getNewPmCountFor(String username) { Element cacheElementForUser = userDataCache.get(username); if (cacheElementForUser == null) { return null; } return (Integer) cacheElementForUser.getValue(); } public UserDataCacheS...
when(cache.get(USERNAME)).thenReturn(new Element(USERNAME, 2)); Integer count = userDataCacheService.getNewPmCountFor(USERNAME); assertEquals(count.intValue(), 2); verify(cache).get(USERNAME); } }
[FOCAL] public Integer UserDataCacheService.getNewPmCountFor(String username) [CLASS] class UserDataCacheService [METRICS] loc=7 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] userDataCache.get/1, Element.getValue/0 [PATH1] if(cacheElementForUser == null)=T -> return null [PATH2] if(cacheElementF...
/* static context [FOCAL] public Integer UserDataCacheService.getNewPmCountFor(String username) [PATH1] if(cacheElementForUser == null)=T -> return null [PATH2] if(cacheElementForUser == null)=F -> return (Integer) cacheElementForUser.getValue() [INPUTS] branches=username | result=username [COLLABORATORS] field userDat...
/* static context [FOCAL] public Integer UserDataCacheService.getNewPmCountFor(String username) [PATH1] if(cacheElementForUser == null)=T -> return null [PATH2] if(cacheElementForUser == null)=F -> return (Integer) cacheElementForUser.getValue() [INPUTS] branches=username | result=username [COLLABORATORS] field userDat...
true
ok
{"focal": {"class": "UserDataCacheService", "name": "getNewPmCountFor", "signature": "Integer getNewPmCountFor(String username)", "start_line": 3, "modifiers": "public", "params": [{"name": "username", "type": "String"}], "return_type": "Integer"}, "class_info": {"name": "UserDataCacheService", "kind": "class", "modifi...
2335594_25
class ExceptionWrapper { public CheckStylePluginException wrap(@Nullable final String message, @NotNull final Throwable error) { final Throwable root = rootOrCheckStyleException(error); final String exMessage = ofNullable(message).orElseGet(root::getMessage); if (isParseException(root)) { ...
assertThat( new ExceptionWrapper() .wrap(null, new CheckstyleException("aTestException", new IllegalStateException("aTestException"))), is(instanceOf(CheckStylePluginException.class))); } }
[FOCAL] public CheckStylePluginException ExceptionWrapper.wrap(String message, Throwable error) [CLASS] class ExceptionWrapper [METRICS] loc=9 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] Throwable rootOrCheckStyleException(Throwable error); boolean isParseException(Throwable throwable) [CALLS-...
/* static context [FOCAL] public CheckStylePluginException ExceptionWrapper.wrap(String message, Throwable error) [PATH1] if(isParseException(root))=T -> return new CheckStylePluginParseException(exMessage, root) [PATH2] if(isParseException(root))=F -> return new CheckStylePluginException(exMessage, root) [INPUTS] bran...
/* static context [FOCAL] public CheckStylePluginException ExceptionWrapper.wrap(String message, Throwable error) [PATH1] if(isParseException(root))=T -> return new CheckStylePluginParseException(exMessage, root) [PATH2] if(isParseException(root))=F -> return new CheckStylePluginException(exMessage, root) [INPUTS] bran...
true
ok
{"focal": {"class": "ExceptionWrapper", "name": "wrap", "signature": "CheckStylePluginException wrap(String message, Throwable error)", "start_line": 3, "modifiers": "public", "params": [{"name": "message", "type": "String"}, {"name": "error", "type": "Throwable"}], "return_type": "CheckStylePluginException"}, "class_i...
2341027_0
class IntegerParamEncoder implements IParamEncoder { @Override public int readTo(DecoderAdapter dest, String encoded, MessageParamField field ) { int decodedValue = IntegerEncoded.parseInt(encoded, radix); dest.putInt(field.dbFieldName, decodedValue); return 1; } public Integ...
int i = 0; for (char c : IntegerEncoded.ALPHABET) { String str = String.valueOf(c); MapEncoderAdpater dest = new MapEncoderAdpater(); service.readTo(dest, str, MessageParamField.LOC_ALTITUDE ); int decoded = dest.getInt(MessageParamField.LOC_ALTITUDE ); ...
[FOCAL] @Override public int IntegerParamEncoder.readTo(DecoderAdapter dest, String encoded, MessageParamField field) [CLASS] class IntegerParamEncoder implements IParamEncoder [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] IntegerEncoded.parseInt/2, DecoderAdapter.putInt/2 [COLLA...
/* static context [FOCAL] @Override public int IntegerParamEncoder.readTo(DecoderAdapter dest, String encoded, MessageParamField field) [COLLABORATORS] param dest:DecoderAdapter putInt/2 [CALLS-EXTERNAL] IntegerEncoded.parseInt/2, DecoderAdapter.putInt/2 */
/* static context [FOCAL] @Override public int IntegerParamEncoder.readTo(DecoderAdapter dest, String encoded, MessageParamField field) [COLLABORATORS] param dest:DecoderAdapter putInt/2 [CALLS-EXTERNAL] IntegerEncoded.parseInt/2, DecoderAdapter.putInt/2 */ class IntegerParamEncoder implements IParamEncoder { @Ove...
true
ok
{"focal": {"class": "IntegerParamEncoder", "name": "readTo", "signature": "int readTo(DecoderAdapter dest, String encoded, MessageParamField field)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "dest", "type": "DecoderAdapter"}, {"name": "encoded", "type": "String"}, {"name": "field", "type": ...
2349728_0
class ConvertUtils { public static Repository eventRepoToRepo(GitHubEvent.RepoIdentifier repo) { String[] ref = repo.repoWithUserName().split("/"); return InfoUtils.createRepoFromData(ref[0], ref[1]); } private static final String REPO_NAME_FIRST_PART; private static final String REPO_NAME_SECOND_PART; priva...
ConvertUtils.eventRepoToRepo(event.repo()); assertThat(event.repo().repoWithUserName(), equalTo(REPO_NAME)); } }
[FOCAL] public static Repository ConvertUtils.eventRepoToRepo(GitHubEvent.RepoIdentifier repo) [CLASS] class ConvertUtils [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] repo.repoWithUserName().split/1, GitHubEvent.RepoIdentifier.repoWithUserName/0, InfoUtils.createRepoFromData/2 [...
/* static context [FOCAL] public static Repository ConvertUtils.eventRepoToRepo(GitHubEvent.RepoIdentifier repo) [INPUTS] branches=- | result=repo [COLLABORATORS] param repo:GitHubEvent.RepoIdentifier repoWithUserName/0 [CALLS-EXTERNAL] repo.repoWithUserName().split/1, GitHubEvent.RepoIdentifier.repoWithUserName/0, Inf...
/* static context [FOCAL] public static Repository ConvertUtils.eventRepoToRepo(GitHubEvent.RepoIdentifier repo) [INPUTS] branches=- | result=repo [COLLABORATORS] param repo:GitHubEvent.RepoIdentifier repoWithUserName/0 [CALLS-EXTERNAL] repo.repoWithUserName().split/1, GitHubEvent.RepoIdentifier.repoWithUserName/0, Inf...
true
ok
{"focal": {"class": "ConvertUtils", "name": "eventRepoToRepo", "signature": "Repository eventRepoToRepo(GitHubEvent.RepoIdentifier repo)", "start_line": 3, "modifiers": "public static", "params": [{"name": "repo", "type": "GitHubEvent.RepoIdentifier"}], "return_type": "Repository"}, "class_info": {"name": "ConvertUtils...
2357859_654
class SetAccessStatusFilter implements IndexDocumentFilter { @Override public void filter(DocumentIndexingPackage dip) throws IndexingException { log.debug("Performing set access status filter on {}", dip.getPid()); dip.getDocument().setStatus(determineAccessStatus(dip)); } public void...
addInheritedRoleAssignment(pid, PUBLIC_PRINC, UserRole.canViewMetadata); addInheritedRoleAssignment(pid, AUTHENTICATED_PRINC, UserRole.canViewMetadata); when(inheritedAclFactory.getEmbargoUntil(pid)).thenReturn(getNextYear()); filter.filter(dip); verify(idb).setStatus(listCapt...
[FOCAL] @Override public void SetAccessStatusFilter.filter(DocumentIndexingPackage dip) [CLASS] class SetAccessStatusFilter implements IndexDocumentFilter [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] List<String> determineAccessStatus(DocumentIndexingPackage dip) [CALLS-EXTERNAL...
/* static context [FOCAL] @Override public void SetAccessStatusFilter.filter(DocumentIndexingPackage dip) [COLLABORATORS] param dip:DocumentIndexingPackage getPid/0,getDocument/0 [EXCEPTIONS] declares IndexingException [CALLS-INTERNAL] List<String> determineAccessStatus(DocumentIndexingPackage dip) [CALLS-EXTERNAL] log...
/* static context [FOCAL] @Override public void SetAccessStatusFilter.filter(DocumentIndexingPackage dip) [COLLABORATORS] param dip:DocumentIndexingPackage getPid/0,getDocument/0 [EXCEPTIONS] declares IndexingException [CALLS-INTERNAL] List<String> determineAccessStatus(DocumentIndexingPackage dip) [CALLS-EXTERNAL] log...
true
ok
{"focal": {"class": "SetAccessStatusFilter", "name": "filter", "signature": "void filter(DocumentIndexingPackage dip) throws IndexingException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "dip", "type": "DocumentIndexingPackage"}], "return_type": "void"}, "class_info": {"name": "SetAccessStat...
2364987_147
class DefaultExecutor implements Executor { @Override public void orFallBackTo(Runnable defaultClosure) { defaultClosure.run(); } @Override public Executor perform(Closure closure); } class DefaultExecutorTest { @Test public void performsDefaultAction() throws Exception {
Runnable action = mock(Runnable.class); new DefaultExecutor().orFallBackTo(action); verify(action).run(); } }
[FOCAL] @Override public void DefaultExecutor.orFallBackTo(Runnable defaultClosure) [CLASS] class DefaultExecutor implements Executor [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] Runnable.run/0 [COLLABORATORS] param defaultClosure:Runnable run/0 [DATAFLOW] defaultClosure@param->...
/* static context [FOCAL] @Override public void DefaultExecutor.orFallBackTo(Runnable defaultClosure) [COLLABORATORS] param defaultClosure:Runnable run/0 [CALLS-EXTERNAL] Runnable.run/0 */
/* static context [FOCAL] @Override public void DefaultExecutor.orFallBackTo(Runnable defaultClosure) [COLLABORATORS] param defaultClosure:Runnable run/0 [CALLS-EXTERNAL] Runnable.run/0 */ class DefaultExecutor implements Executor { @Override public void orFallBackTo(Runnable defaultClosure) { defaultClosure.r...
true
ok
{"focal": {"class": "DefaultExecutor", "name": "orFallBackTo", "signature": "void orFallBackTo(Runnable defaultClosure)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "defaultClosure", "type": "Runnable"}], "return_type": "void"}, "class_info": {"name": "DefaultExecutor", "kind": "class", "modi...
2383782_393
class InputLogicParser { public String parse(Element root) { return parseWithName(root, null); } @SuppressWarnings("unchecked") public String parseWithName(Element root, String name); public String parse(Element root, String opt, String min, String wait); @SuppressWarnings("unchecked") pr...
//@formatter:off String xml = "<input-logic>" + "<and>" + "<combine>" + "<data-in dataset=\"A\" />" + "<data-in dataset=\"B\" />"+ "</combine>" ...
[FOCAL] public String InputLogicParser.parse(Element root) [CLASS] class InputLogicParser [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] String parseWithName(Element root, String name) [INPUTS] branches=- | result=root [DATAFLOW] root@param->L2 [CLASS-MEMBERS] String parseWithName...
/* static context [FOCAL] public String InputLogicParser.parse(Element root) [INPUTS] branches=- | result=root [CALLS-INTERNAL] String parseWithName(Element root, String name) */
/* static context [FOCAL] public String InputLogicParser.parse(Element root) [INPUTS] branches=- | result=root [CALLS-INTERNAL] String parseWithName(Element root, String name) */ class InputLogicParser { public String parse(Element root) { return parseWithName(root, null); } @SuppressWarnings("un...
true
ok
{"focal": {"class": "InputLogicParser", "name": "parse", "signature": "String parse(Element root)", "start_line": 3, "modifiers": "public", "params": [{"name": "root", "type": "Element"}], "return_type": "String"}, "class_info": {"name": "InputLogicParser", "kind": "class", "modifiers": "", "superclass": null, "interfa...
2394379_79
class DefaultQueryMatcher implements QueryMatcher { @Override public boolean matches(Document document, Document query) { for (String key : query.keySet()) { Object queryValue = query.get(key); validateQueryValue(queryValue, key); if (!checkMatch(queryValue, key, doc...
Document query = map("a", size(1)); assertThat(matcher.matches(json(""), query)).isFalse(); assertThat(matcher.matches(json("a: 'x'"), query)).isFalse(); assertThat(matcher.matches(map("a", list()), query)).isFalse(); assertThat(matcher.matches(map("a", list(1)), query)).isTrue...
[FOCAL] @Override public boolean DefaultQueryMatcher.matches(Document document, Document query) [CLASS] class DefaultQueryMatcher implements QueryMatcher [METRICS] loc=12 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=2 [CALLS-INTERNAL] boolean checkMatch(Object queryValue, String key, Object document); void valida...
/* static context [FOCAL] @Override public boolean DefaultQueryMatcher.matches(Document document, Document query) [PATH1] foreach(String key : query.keySet())=T -> if(!checkMatch(queryValue, key, document))=F -> exit loop -> return true [PATH2] foreach(String key : query.keySet())=T -> if(!checkMatch(queryValue, key, d...
/* static context [FOCAL] @Override public boolean DefaultQueryMatcher.matches(Document document, Document query) [PATH1] foreach(String key : query.keySet())=T -> if(!checkMatch(queryValue, key, document))=F -> exit loop -> return true [PATH2] foreach(String key : query.keySet())=T -> if(!checkMatch(queryValue, key, d...
true
ok
{"focal": {"class": "DefaultQueryMatcher", "name": "matches", "signature": "boolean matches(Document document, Document query)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "document", "type": "Document"}, {"name": "query", "type": "Document"}], "return_type": "boolean"}, "class_info": {"name"...
2397476_0
class DateTimeParameter { public DateTime getValue() { return value; } public DateTimeParameter(final String value); private static final DateTimeFormatter ISO_DATE; } class TestDateTimeParameter { private static final DateTimeFormatter ISO_DATE; @Test(groups = "fast") pu...
System.setProperty("user.timezone", "UTC"); // Compare Epoch Assert.assertEquals(new DateTimeParameter(null).getValue().toDateTime(DateTimeZone.UTC).getMillis() / 1000, new DateTime(DateTimeZone.UTC).getMillis() / 1000); Assert.assertEquals(new DateTimeParameter("2012").getValue().getC...
[FOCAL] public DateTime DateTimeParameter.getValue() [CLASS] class DateTimeParameter [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] DateTimeParameter(String value) [TEST] TestDateTimeParameter: @Test(groups = "fast") public void testGetValue() throws Exception [TEST-FIELDS] DateTim...
/* static context [FOCAL] public DateTime DateTimeParameter.getValue() */
/* static context [FOCAL] public DateTime DateTimeParameter.getValue() */ class DateTimeParameter { public DateTime getValue() { return value; } public DateTimeParameter(final String value); private static final DateTimeFormatter ISO_DATE; } class TestDateTimeParameter { private s...
true
ok
{"focal": {"class": "DateTimeParameter", "name": "getValue", "signature": "DateTime getValue()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "DateTime"}, "class_info": {"name": "DateTimeParameter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "IS...
2403733_3
class PromoteKeyOperation extends BaseOperation { public PromoteKeyResult execute(long masterKeyId, byte[] cardAid, long[] subKeyIds) { OperationLog log = new OperationLog(); log.add(LogType.MSG_PR, 0); // Perform actual type change UncachedKeyRing promotedRing; { ...
PromoteKeyOperation op = new PromoteKeyOperation(RuntimeEnvironment.application, new ProviderHelper(RuntimeEnvironment.application), null, null); byte[] aid = Hex.decode("D2760001240102000000012345670000"); // only promote the first, rest stays dummy long keyId = Keyrin...
[FOCAL] public PromoteKeyResult PromoteKeyOperation.execute(long masterKeyId, byte[] cardAid, long[] subKeyIds) [CLASS] class PromoteKeyOperation extends BaseOperation [METRICS] loc=71 cc=8 branches=5 loops=1 returns=5 throws=0 nesting=4 [CALLS-INTERNAL] Integer naiveIndexOf(long[] haystack, long needle) [CALLS-EXTERNA...
/* static context [FOCAL] public PromoteKeyResult PromoteKeyOperation.execute(long masterKeyId, byte[] cardAid, long[] subKeyIds) [PATH1] if(subKeyIds == null)=F -> foreach(CanonicalizedPublicKey key : pubRing.publicKeyIterator())=T -> if(naiveIndexOf(subKeyIds, subKeyId) != null)=T -> exit loop -> if(promotedRing == n...
/* static context [FOCAL] public PromoteKeyResult PromoteKeyOperation.execute(long masterKeyId, byte[] cardAid, long[] subKeyIds) [PATH1] if(subKeyIds == null)=F -> foreach(CanonicalizedPublicKey key : pubRing.publicKeyIterator())=T -> if(naiveIndexOf(subKeyIds, subKeyId) != null)=T -> exit loop -> if(promotedRing == n...
true
ok
{"focal": {"class": "PromoteKeyOperation", "name": "execute", "signature": "PromoteKeyResult execute(long masterKeyId, byte[] cardAid, long[] subKeyIds)", "start_line": 3, "modifiers": "public", "params": [{"name": "masterKeyId", "type": "long"}, {"name": "cardAid", "type": "byte[]"}, {"name": "subKeyIds", "type": "lon...
2408915_45
class StaticResource { public int getResourceId(Context context) { int resourceId = context.getResources().getIdentifier( resourceName, resourceType, hasResourcePackage() ? resourcePackage : context.getPackageName()); checkResource(resourceId); return resourceId; } StaticResource(String value); pri...
MockResourcesBuilder aContextOfResources = aContextOfResources(); int expectedResourceId = aContextOfResources.declareResource(RESOURCE_NAME, RESOURCE_TYPE, RESOURCE_PACKAGE); StaticResource resource = new StaticResource(resourceValue(RESOURCE_NAME, RESOURCE_TYPE, RESOURCE_PACKAGE)); assertThat(resource.getRe...
[FOCAL] public int StaticResource.getResourceId(Context context) [CLASS] class StaticResource [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] boolean hasResourcePackage(); void checkResource(int resourceId) [CALLS-EXTERNAL] context.getResources().getIdentifier/3, Context.getResourc...
/* static context [FOCAL] public int StaticResource.getResourceId(Context context) [INPUTS] branches=- | result=context [COLLABORATORS] param context:Context getResources/0,getPackageName/0 [CALLS-INTERNAL] boolean hasResourcePackage(); void checkResource(int resourceId) [CALLS-EXTERNAL] context.getResources().getIdent...
/* static context [FOCAL] public int StaticResource.getResourceId(Context context) [INPUTS] branches=- | result=context [COLLABORATORS] param context:Context getResources/0,getPackageName/0 [CALLS-INTERNAL] boolean hasResourcePackage(); void checkResource(int resourceId) [CALLS-EXTERNAL] context.getResources().getIdent...
true
ok
{"focal": {"class": "StaticResource", "name": "getResourceId", "signature": "int getResourceId(Context context)", "start_line": 3, "modifiers": "public", "params": [{"name": "context", "type": "Context"}], "return_type": "int"}, "class_info": {"name": "StaticResource", "kind": "class", "modifiers": "", "superclass": nu...
2416378_14
class ASTUtils { public boolean inherits(ASTType astType, ASTType inheritable) { if (astType == null) { return false; } if(inheritable == null || inheritable.equals(OBJECT_TYPE)){ return true; } if (astType.equals(inheritable)) { return tr...
assertTrue(astUtils.inherits(a, null)); assertFalse(astUtils.inherits(null, null)); } }
[FOCAL] public boolean ASTUtils.inherits(ASTType astType, ASTType inheritable) [CLASS] class ASTUtils [METRICS] loc=17 cc=6 branches=4 loops=1 returns=5 throws=0 nesting=2 [CALLS-EXTERNAL] ASTType.equals/1, ASTType.getInterfaces/0, inherits/2 (inherited), ASTType.getSuperClass/0 [PATH1] if(astType == null)=F -> if(inhe...
/* static context [FOCAL] public boolean ASTUtils.inherits(ASTType astType, ASTType inheritable) [PATH1] if(astType == null)=F -> if(inheritable == null || inheritable.equals(OBJECT_TYPE))=F -> if(astType.equals(inheritable))=F -> foreach(ASTType typeInterfaces : astType.getInterfaces())=T -> if(inherits(typeInterfaces...
/* static context [FOCAL] public boolean ASTUtils.inherits(ASTType astType, ASTType inheritable) [PATH1] if(astType == null)=F -> if(inheritable == null || inheritable.equals(OBJECT_TYPE))=F -> if(astType.equals(inheritable))=F -> foreach(ASTType typeInterfaces : astType.getInterfaces())=T -> if(inherits(typeInterfaces...
true
ok
{"focal": {"class": "ASTUtils", "name": "inherits", "signature": "boolean inherits(ASTType astType, ASTType inheritable)", "start_line": 3, "modifiers": "public", "params": [{"name": "astType", "type": "ASTType"}, {"name": "inheritable", "type": "ASTType"}], "return_type": "boolean"}, "class_info": {"name": "ASTUtils",...
2422006_24
class Hook { public void shutdown() { keepRunning = false; thread.interrupt(); try { thread.join(); } catch (InterruptedException e) { logger.error("Error shutting down thread with hook", e); } } Hook(Thread thread); public boolean keepRunning(); private Hook instance; private Thread thread;...
assertTrue(instance.keepRunning()); instance.shutdown(); assertFalse(instance.keepRunning()); } }
[FOCAL] public void Hook.shutdown() [CLASS] class Hook [METRICS] loc=9 cc=2 branches=0 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] Thread.interrupt/0, Thread.join/0, logger.error/2 [FIELDS] read=thread:Thread [EXCEPTIONS] catches InterruptedException e [PATH1] try-body throws [COLLABORATORS] field thread:Thre...
/* static context [FOCAL] public void Hook.shutdown() [PATH1] try-body throws [COLLABORATORS] field thread:Thread interrupt/0,join/0 [EXCEPTIONS] catches InterruptedException e [FIELDS] read=thread:Thread [CALLS-EXTERNAL] Thread.interrupt/0, Thread.join/0, logger.error/2 */
/* static context [FOCAL] public void Hook.shutdown() [PATH1] try-body throws [COLLABORATORS] field thread:Thread interrupt/0,join/0 [EXCEPTIONS] catches InterruptedException e [FIELDS] read=thread:Thread [CALLS-EXTERNAL] Thread.interrupt/0, Thread.join/0, logger.error/2 */ class Hook { public void shutdown() { kee...
true
ok
{"focal": {"class": "Hook", "name": "shutdown", "signature": "void shutdown()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "Hook", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "instance", "type": "Hook", "modifier...
2432524_5
class XMLUtils { public static String prettyPrint( String xml ) { return prettyPrint( xml, INDENT_NUMBER ); } public static String prettyPrint( String xml, int indent ); public static AttributesImpl toAttributesImpl( Attributes attributes ); private static final String LINE_SEPARATOR;...
String xml = "<a><b>c</b></a>"; System.out.println( prettyPrint( xml ) ); long start = System.currentTimeMillis(); char[] padding = new char[4]; Arrays.fill( padding, ' ' ); assertEquals( "<a>" + LINE_SEPARATOR + String.copyValueOf( padding ) + "<b>c</b>" + LINE_SEPARAT...
[FOCAL] public static String XMLUtils.prettyPrint(String xml) [CLASS] class XMLUtils [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] String prettyPrint(String xml, int indent) [INPUTS] branches=- | result=xml [DATAFLOW] xml@param->L3 [CLASS-MEMBERS] String prettyPrint(String xml, i...
/* static context [FOCAL] public static String XMLUtils.prettyPrint(String xml) [INPUTS] branches=- | result=xml [CALLS-INTERNAL] String prettyPrint(String xml, int indent) */
/* static context [FOCAL] public static String XMLUtils.prettyPrint(String xml) [INPUTS] branches=- | result=xml [CALLS-INTERNAL] String prettyPrint(String xml, int indent) */ class XMLUtils { public static String prettyPrint( String xml ) { return prettyPrint( xml, INDENT_NUMBER ); } public s...
true
ok
{"focal": {"class": "XMLUtils", "name": "prettyPrint", "signature": "String prettyPrint(String xml)", "start_line": 3, "modifiers": "public static", "params": [{"name": "xml", "type": "String"}], "return_type": "String"}, "class_info": {"name": "XMLUtils", "kind": "class", "modifiers": "", "superclass": null, "interfac...
2434719_21
class CharacterSet extends ArrayList<CharacterRange> { public boolean contains(int charCode) { boolean found = false; for (int i = 0; !found && i < size(); i++) { CharacterRange range = get(i); if (range.characterSet != null) { // Version 1 CGT ...
// version 1 format (Strings) CharacterSet set = new CharacterSet(); set.add(new CharacterRange("ABC")); set.add(new CharacterRange("XyZ")); assertTrue("A", set.contains("A".codePointAt(0))); assertTrue("B", set.contains("B".codePointAt(0))); assertTrue("C", set.c...
[FOCAL] public boolean CharacterSet.contains(int charCode) [CLASS] class CharacterSet extends ArrayList<CharacterRange> [METRICS] loc=14 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] size/0 (inherited), get/1 (inherited), range.characterSet.contains/1, String.valueOf/1 [PATH1] for(!found && i < ...
/* static context [FOCAL] public boolean CharacterSet.contains(int charCode) [PATH1] for(!found && i < size())=T -> if(range.characterSet != null)=T -> exit loop -> return found [PATH2] for(!found && i < size())=F -> return found [PATH3] for(!found && i < size())=T -> if(range.characterSet != null)=F -> exit loop -> re...
/* static context [FOCAL] public boolean CharacterSet.contains(int charCode) [PATH1] for(!found && i < size())=T -> if(range.characterSet != null)=T -> exit loop -> return found [PATH2] for(!found && i < size())=F -> return found [PATH3] for(!found && i < size())=T -> if(range.characterSet != null)=F -> exit loop -> re...
true
ok
{"focal": {"class": "CharacterSet", "name": "contains", "signature": "boolean contains(int charCode)", "start_line": 3, "modifiers": "public", "params": [{"name": "charCode", "type": "int"}], "return_type": "boolean"}, "class_info": {"name": "CharacterSet", "kind": "class", "modifiers": "", "superclass": "ArrayList<Cha...
2438993_1
class WebApplicationMetaData { public String getContextPath() { return this.contextPath; } public boolean forceDefaultContext(); public boolean forceDefaultStaticPathPrefix(); public void addHost(String host); public void addHosts(List<String> hosts); public List<String> getHosts()...
assertEquals(null, new WebApplicationMetaData().getContextPath()); } }
[FOCAL] public String WebApplicationMetaData.getContextPath() [CLASS] class WebApplicationMetaData [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [FIELDS] read=contextPath [CLASS-MEMBERS] boolean forceDefaultContext(); boolean forceDefaultStaticPathPrefix(); void addHost(String host); void addHost...
/* static context [FOCAL] public String WebApplicationMetaData.getContextPath() [FIELDS] read=contextPath */
/* static context [FOCAL] public String WebApplicationMetaData.getContextPath() [FIELDS] read=contextPath */ class WebApplicationMetaData { public String getContextPath() { return this.contextPath; } public boolean forceDefaultContext(); public boolean forceDefaultStaticPathPrefix(); publi...
true
ok
{"focal": {"class": "WebApplicationMetaData", "name": "getContextPath", "signature": "String getContextPath()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "WebApplicationMetaData", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fiel...
2449032_110
class Value { Value not () { throw newOperandException ("not"); } abstract String getType(); Value or(Value v); Value and(Value v); abstract Value equal(Value v); abstract Value unequal(Value v); Value lessThan(Value v); Value lessOrEqual(Value v); Value greaterTha...
try { mValue.not (); fail ("no exception"); } catch (ExecutionException ee) { // ok } } }
[FOCAL] Value Value.not() [CLASS] class Value [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=1 nesting=0 [CALLS-INTERNAL] ExecutionException newOperandException(String operator) [EXCEPTIONS] throws throw newOperandException ("not") [THROWS-WHEN] newOperandException ("not") when always [CLASS-MEMBERS] String g...
/* static context [FOCAL] Value Value.not() [THROWS-WHEN] newOperandException ("not") when always [EXCEPTIONS] throws throw newOperandException ("not") [CALLS-INTERNAL] ExecutionException newOperandException(String operator) */
/* static context [FOCAL] Value Value.not() [THROWS-WHEN] newOperandException ("not") when always [EXCEPTIONS] throws throw newOperandException ("not") [CALLS-INTERNAL] ExecutionException newOperandException(String operator) */ class Value { Value not () { throw newOperandException ("not"); } abst...
true
ok
{"focal": {"class": "Value", "name": "not", "signature": "Value not()", "start_line": 3, "modifiers": "", "params": [], "return_type": "Value"}, "class_info": {"name": "Value", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "mValue", "type": "ValueImpl", "modifiers": "priv...
2466190_0
class Util { public static File getEncryptedFilename(File file) { String filename = file.getName(); return filename.endsWith(ENCRYPTED_FILENAME_SUFFIX) ? file : new File(file.getParent(), filename + ENCRYPTED_FILENAME_SUFFIX); } public static int getStatusBarHeight(Window window); public static int pixelsToDi...
File file = new File("/data/user/0/test.bin"); File encryptedFile = Util.getEncryptedFilename(file); assertEquals(new File("/data/user/0/test.bin.encrypted"), encryptedFile); File decryptedFile = Util.getUnencryptedFilename(encryptedFile); assertEquals(file, decryptedFile); } }
[FOCAL] public static File Util.getEncryptedFilename(File file) [CLASS] class Util [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] File.getName/0, String.endsWith/1, File.getParent/0 [NEW] File [INPUTS] branches=- | result=file [COLLABORATORS] param file:File getName/0,getParent/0 ...
/* static context [FOCAL] public static File Util.getEncryptedFilename(File file) [INPUTS] branches=- | result=file [COLLABORATORS] param file:File getName/0,getParent/0 [NEW] File [CALLS-EXTERNAL] File.getName/0, String.endsWith/1, File.getParent/0 */
/* static context [FOCAL] public static File Util.getEncryptedFilename(File file) [INPUTS] branches=- | result=file [COLLABORATORS] param file:File getName/0,getParent/0 [NEW] File [CALLS-EXTERNAL] File.getName/0, String.endsWith/1, File.getParent/0 */ class Util { public static File getEncryptedFilename(File file) {...
true
ok
{"focal": {"class": "Util", "name": "getEncryptedFilename", "signature": "File getEncryptedFilename(File file)", "start_line": 3, "modifiers": "public static", "params": [{"name": "file", "type": "File"}], "return_type": "File"}, "class_info": {"name": "Util", "kind": "class", "modifiers": "", "superclass": null, "inte...
2470704_0
class LevenshteinDistanceMatcher extends AbstractMatcher { protected float normalize(float score, int longestString){ return 1f - (score / longestString); } @Override protected float doMatchScore(String matchText, String cadidate); private LevenshteinDistanceMatcher levenshteinDistanceMatcher; } class Levens...
float score = this.levenshteinDistanceMatcher.normalize(5, 20); assertEquals(0.75f,score, 0f); } }
[FOCAL] protected float LevenshteinDistanceMatcher.normalize(float score, int longestString) [CLASS] class LevenshteinDistanceMatcher extends AbstractMatcher [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=longestString, score [DATAFLOW] longestString@param->L2; score@p...
/* static context [FOCAL] protected float LevenshteinDistanceMatcher.normalize(float score, int longestString) [INPUTS] branches=- | result=longestString, score */
/* static context [FOCAL] protected float LevenshteinDistanceMatcher.normalize(float score, int longestString) [INPUTS] branches=- | result=longestString, score */ class LevenshteinDistanceMatcher extends AbstractMatcher { protected float normalize(float score, int longestString){ return 1f - (score / longestString...
true
ok
{"focal": {"class": "LevenshteinDistanceMatcher", "name": "normalize", "signature": "float normalize(float score, int longestString)", "start_line": 3, "modifiers": "protected", "params": [{"name": "score", "type": "float"}, {"name": "longestString", "type": "int"}], "return_type": "float"}, "class_info": {"name": "Lev...
2474070_1
class ExperienceParser { public static Gson createGson(Context context) { if (gson == null) { GsonBuilder builder = new GsonBuilder(); if (context == null || Feature.get(context, R.bool.feature_load_old_experiences).isEnabled()) { builder.registerTypeAdapterFactory(new ExperienceTypeAdapterFactor())...
Experience experience = TestUtils.loadExperience("test_old"); Assert.assertTrue(experience.getName().equals("Test")); final Gson gson = ExperienceParser.createGson(null); System.out.println(gson.toJson(experience)); //Experience experience = new Experience(); //experience.setChecksumModulo(3); // TODO ...
[FOCAL] public static Gson ExperienceParser.createGson(Context context) [CLASS] class ExperienceParser [METRICS] loc=13 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] Feature.get(context, R.bool.feature_load_old_experiences).isEnabled/0, Feature.get/2, GsonBuilder.registerTypeAdapterFactory/1, Gs...
/* static context [FOCAL] public static Gson ExperienceParser.createGson(Context context) [PATH1] if(gson == null)=T -> if(context == null || Feature.get(context, R.bool.feature_load_old_experiences).isEnabled())=T -> return gson [PATH2] if(gson == null)=F -> return gson [PATH3] if(gson == null)=T -> if(context == null...
/* static context [FOCAL] public static Gson ExperienceParser.createGson(Context context) [PATH1] if(gson == null)=T -> if(context == null || Feature.get(context, R.bool.feature_load_old_experiences).isEnabled())=T -> return gson [PATH2] if(gson == null)=F -> return gson [PATH3] if(gson == null)=T -> if(context == null...
true
ok
{"focal": {"class": "ExperienceParser", "name": "createGson", "signature": "Gson createGson(Context context)", "start_line": 3, "modifiers": "public static", "params": [{"name": "context", "type": "Context"}], "return_type": "Gson"}, "class_info": {"name": "ExperienceParser", "kind": "class", "modifiers": "", "supercla...
2478263_260
class CypherProxyController { @RequestMapping(value = "/findExternalUrlForStudy/{studyTitle}", method = RequestMethod.GET, produces = "application/json") @ResponseBody public String findExternalLinkForStudyWithTitle(HttpServletRequest request, @PathVariable("studyTitle") String taxonName) throws IOExceptio...
String externalLink = new CypherProxyController().findExternalLinkForStudyWithTitle(null, "None existing study"); assertThat(externalLink, is("{}")); } }
[FOCAL] @RequestMapping(value = "/findExternalUrlForStudy/{studyTitle}", method = RequestMethod.GET, produces = "application/... String CypherProxyController.findExternalLinkForStudyWithTitle(HttpServletRequest request, String taxonName) [CLASS] class CypherProxyController [METRICS] loc=5 cc=1 branches=0 loops=0 return...
/* static context [FOCAL] @RequestMapping(value = "/findExternalUrlForStudy/{studyTitle}", method = RequestMethod.GET, produces = "application/... String CypherProxyController.findExternalLinkForStudyWithTitle(HttpServletRequest request, String taxonName) [INPUTS] branches=- | result=request, taxonName [EXCEPTIONS] dec...
/* static context [FOCAL] @RequestMapping(value = "/findExternalUrlForStudy/{studyTitle}", method = RequestMethod.GET, produces = "application/... String CypherProxyController.findExternalLinkForStudyWithTitle(HttpServletRequest request, String taxonName) [INPUTS] branches=- | result=request, taxonName [EXCEPTIONS] dec...
true
ok
{"focal": {"class": "CypherProxyController", "name": "findExternalLinkForStudyWithTitle", "signature": "String findExternalLinkForStudyWithTitle(HttpServletRequest request, String taxonName) throws IOException", "start_line": 3, "modifiers": "@RequestMapping(value = \"/findExternalUrlForStudy/{studyTitle}\", method = R...
2479886_26
class CcsdsPacket { @Override public String toString() { StringBuffer sb = new StringBuffer(); StringBuffer text = new StringBuffer(); byte c; int len = bb.limit(); int lengthRoundedUpToNextMultipleOf16 = (int) Math.ceil(len / 16.0) * 16; sb.append("apid: " + get...
CcsdsPacket ccsdsPacket = new CcsdsPacket(ByteBuffer.wrap(testPacketOf32Bytes)); // Initialize TimeEncoding to be able to call CcsdsPacket.toString() TimeEncoding.setUp(); String packetString = ccsdsPacket.toString(); Assert.assertEquals("apid: 906\n" + "packetId...
[FOCAL] @Override public String CcsdsPacket.toString() [CLASS] class CcsdsPacket [METRICS] loc=46 cc=6 branches=4 loops=1 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] int getAPID(); int getPacketID() [CALLS-EXTERNAL] bb.limit/0, Math.ceil/1, StringBuffer.append/1, String.format/2, StringBuffer.setLength/1, bb.get/1, S...
/* static context [FOCAL] @Override public String CcsdsPacket.toString() [PATH1] for(i < lengthRoundedUpToNextMultipleOf16)=T -> if(i % 16 == 0)=T -> if((i & 1) == 0)=T -> if(i < len)=T -> if((i + 1) % 16 == 0)=T -> exit loop -> return sb.toString() [PATH2] for(i < lengthRoundedUpToNextMultipleOf16)=T -> if(i % 16 == 0...
/* static context [FOCAL] @Override public String CcsdsPacket.toString() [PATH1] for(i < lengthRoundedUpToNextMultipleOf16)=T -> if(i % 16 == 0)=T -> if((i & 1) == 0)=T -> if(i < len)=T -> if((i + 1) % 16 == 0)=T -> exit loop -> return sb.toString() [PATH2] for(i < lengthRoundedUpToNextMultipleOf16)=T -> if(i % 16 == 0...
true
ok
{"focal": {"class": "CcsdsPacket", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "CcsdsPacket", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "testPack...
2485432_0
class IPNetwork extends PGcidr implements Serializable, Cloneable, Comparable<IPNetwork> { public byte[] getNetmaskAddress() { return netmaskAddress; } public IPNetwork(); public IPNetwork(PGcidr net); public IPNetwork(String net); @Override public void setValue(String v); publ...
IPNetwork net = new IPNetwork(); Assert.assertEquals("Empty IPNetwork must not have a network address", null, net.getNetmaskAddress()); } }
[FOCAL] public byte[] IPNetwork.getNetmaskAddress() [CLASS] class IPNetwork extends PGcidr implements Serializable, Cloneable, Comparable<IPNetwork> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] IPNetwork(); IPNetwork(PGcidr net); IPNetwork(String net); void setValue(String v); vo...
/* static context [FOCAL] public byte[] IPNetwork.getNetmaskAddress() */
/* static context [FOCAL] public byte[] IPNetwork.getNetmaskAddress() */ class IPNetwork extends PGcidr implements Serializable, Cloneable, Comparable<IPNetwork> { public byte[] getNetmaskAddress() { return netmaskAddress; } public IPNetwork(); public IPNetwork(PGcidr net); public IPNet...
true
ok
{"focal": {"class": "IPNetwork", "name": "getNetmaskAddress", "signature": "byte[] getNetmaskAddress()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "byte[]"}, "class_info": {"name": "IPNetwork", "kind": "class", "modifiers": "", "superclass": "PGcidr", "interfaces": "Serializable, Cloneable, C...
2488113_3
class DefaultHateoasContext implements HateoasContext { @Override public LinkableInfo getLinkableInfo(String link) { LinkableInfo linkableInfo = linkableMapping.get(link); Validate.notNull(linkableInfo, "Invalid link: " + link); return linkableInfo; } @Override public void map...
LinkableInfo result = tested.getLinkableInfo("test.dummy.sneaky.subpath"); assertEquals("test.dummy.sneaky.subpath", result.getId()); assertEquals("GET", result.getHttpMethod()); assertEquals("/dummy/subpath", result.getMethodPath()); } }
[FOCAL] @Override public LinkableInfo DefaultHateoasContext.getLinkableInfo(String link) [CLASS] class DefaultHateoasContext implements HateoasContext [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] linkableMapping.get/1, Validate.notNull/2 [INPUTS] branches=- | result=link [COLLAB...
/* static context [FOCAL] @Override public LinkableInfo DefaultHateoasContext.getLinkableInfo(String link) [INPUTS] branches=- | result=link [COLLABORATORS] field linkableMapping get/1 [CALLS-EXTERNAL] linkableMapping.get/1, Validate.notNull/2 */
/* static context [FOCAL] @Override public LinkableInfo DefaultHateoasContext.getLinkableInfo(String link) [INPUTS] branches=- | result=link [COLLABORATORS] field linkableMapping get/1 [CALLS-EXTERNAL] linkableMapping.get/1, Validate.notNull/2 */ class DefaultHateoasContext implements HateoasContext { @Override ...
true
ok
{"focal": {"class": "DefaultHateoasContext", "name": "getLinkableInfo", "signature": "LinkableInfo getLinkableInfo(String link)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "link", "type": "String"}], "return_type": "LinkableInfo"}, "class_info": {"name": "DefaultHateoasContext", "kind": "cla...
2488848_139
class MiniRepository implements Repository { public boolean exists(@Nullable ID subject, @Nullable UID predicate, @Nullable NODE object, @Nullable UID context) { return findStatements(subject, predicate, object, context, false).hasNext(); } public MiniRepository(); public MiniRepository(int ...
assertTrue(repository.exists(null, null, null, null)); repository.remove(null, null, null, null); assertFalse(repository.exists(null, null, null, null)); } }
[FOCAL] public boolean MiniRepository.exists(ID subject, UID predicate, NODE object, UID context) [CLASS] class MiniRepository implements Repository [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID co...
/* static context [FOCAL] public boolean MiniRepository.exists(ID subject, UID predicate, NODE object, UID context) [INPUTS] branches=- | result=context, object, predicate, subject [CALLS-INTERNAL] CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) [CALL...
/* static context [FOCAL] public boolean MiniRepository.exists(ID subject, UID predicate, NODE object, UID context) [INPUTS] branches=- | result=context, object, predicate, subject [CALLS-INTERNAL] CloseableIterator<STMT> findStatements(ID subject, UID predicate, NODE object, UID context, boolean includeInferred) [CALL...
true
ok
{"focal": {"class": "MiniRepository", "name": "exists", "signature": "boolean exists(ID subject, UID predicate, NODE object, UID context)", "start_line": 3, "modifiers": "public", "params": [{"name": "subject", "type": "ID"}, {"name": "predicate", "type": "UID"}, {"name": "object", "type": "NODE"}, {"name": "context", ...
2491679_4
class PisPasepValidator implements ConstraintValidator<PisPasep, String> { @Override public boolean isValid(String pis, final ConstraintValidatorContext context) { boolean result = false; if ( pis == null || "".equals(pis) ) { result = true; } else { result = PISPASEP.isValido(pis); } return result; ...
PisPasepValidator validator = new PisPasepValidator(); PowerMock.mockStatic(PISPASEP.class); EasyMock.expect(PISPASEP.isValido(EasyMock.anyObject(String.class))).andReturn(true); PowerMock.replay(PISPASEP.class); // validator.isValid() must use the return of PISPASEP.isValido(). // PISPASEP value doesn't ...
[FOCAL] @Override public boolean PisPasepValidator.isValid(String pis, ConstraintValidatorContext context) [CLASS] class PisPasepValidator implements ConstraintValidator<PisPasep, String> [METRICS] loc=10 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] "".equals/1, PISPASEP.isValido/1 [PATH1] if(p...
/* static context [FOCAL] @Override public boolean PisPasepValidator.isValid(String pis, ConstraintValidatorContext context) [PATH1] if(pis == null || "".equals(pis))=T -> return result [PATH2] if(pis == null || "".equals(pis))=F -> return result [INPUTS] branches=pis | result=pis | unused=context [CALLS-EXTERNAL] "".e...
/* static context [FOCAL] @Override public boolean PisPasepValidator.isValid(String pis, ConstraintValidatorContext context) [PATH1] if(pis == null || "".equals(pis))=T -> return result [PATH2] if(pis == null || "".equals(pis))=F -> return result [INPUTS] branches=pis | result=pis | unused=context [CALLS-EXTERNAL] "".e...
true
ok
{"focal": {"class": "PisPasepValidator", "name": "isValid", "signature": "boolean isValid(String pis, ConstraintValidatorContext context)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "pis", "type": "String"}, {"name": "context", "type": "ConstraintValidatorContext"}], "return_type": "boolean"...
2497245_83
class SizeValue { @Nonnull public static SizeValue percent(final int percentage) { return new SizeValue(percentage, SizeValueType.Percent); } public SizeValue(@Nonnull final SizeValueType type); public SizeValue(final int value, @Nonnull final SizeValueType type); public SizeValue(@Nonnull final Si...
SizeValue value = SizeValue.percent(10); assertEquals(100, value.getValueAsInt(1000.f)); assertEquals(10, value.getValueAsInt(100.f)); assertEquals(100.f, value.getValue(1000.f), 1.0e-7); assertEquals(10.f, value.getValue(100.f), 1.0e-7); assertTrue(value.hasValue()); assertTrue(value.isPerc...
[FOCAL] @Nonnull public static SizeValue SizeValue.percent(int percentage) [CLASS] class SizeValue [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] SizeValue [INPUTS] branches=- | result=percentage [DATAFLOW] percentage@param->L3 [CLASS-MEMBERS] SizeValue(SizeValueType type); SizeValue(int val...
/* static context [FOCAL] @Nonnull public static SizeValue SizeValue.percent(int percentage) [INPUTS] branches=- | result=percentage [NEW] SizeValue */
/* static context [FOCAL] @Nonnull public static SizeValue SizeValue.percent(int percentage) [INPUTS] branches=- | result=percentage [NEW] SizeValue */ class SizeValue { @Nonnull public static SizeValue percent(final int percentage) { return new SizeValue(percentage, SizeValueType.Percent); } public Size...
true
ok
{"focal": {"class": "SizeValue", "name": "percent", "signature": "SizeValue percent(int percentage)", "start_line": 3, "modifiers": "@Nonnull public static", "params": [{"name": "percentage", "type": "int"}], "return_type": "SizeValue"}, "class_info": {"name": "SizeValue", "kind": "class", "modifiers": "", "superclass"...
2499324_6
class PcapReader implements Iterable<Packet> { protected LinkType getLinkType(long linkTypeVal) { switch ((int)linkTypeVal) { case 0: return LinkType.NULL; case 1: return LinkType.EN10MB; case 101: return LinkType.RAW; case 108: return LinkType.LOOP; case 113: return LinkType.LIN...
assertEquals(PcapReader.LinkType.RAW, reader.getLinkType(101)); } }
[FOCAL] protected LinkType PcapReader.getLinkType(long linkTypeVal) [CLASS] class PcapReader implements Iterable<Packet> [METRICS] loc=15 cc=6 branches=1 loops=0 returns=6 throws=0 nesting=1 [PATH1] switch((int)linkTypeVal)=case 0 -> return LinkType.NULL [PATH2] switch((int)linkTypeVal)=case 1 -> return LinkType.EN10MB...
/* static context [FOCAL] protected LinkType PcapReader.getLinkType(long linkTypeVal) [PATH1] switch((int)linkTypeVal)=case 0 -> return LinkType.NULL [PATH2] switch((int)linkTypeVal)=case 1 -> return LinkType.EN10MB [PATH3] switch((int)linkTypeVal)=case 101 -> return LinkType.RAW [PATH4] switch((int)linkTypeVal)=case 1...
/* static context [FOCAL] protected LinkType PcapReader.getLinkType(long linkTypeVal) [PATH1] switch((int)linkTypeVal)=case 0 -> return LinkType.NULL [PATH2] switch((int)linkTypeVal)=case 1 -> return LinkType.EN10MB [PATH3] switch((int)linkTypeVal)=case 101 -> return LinkType.RAW [PATH4] switch((int)linkTypeVal)=case 1...
true
ok
{"focal": {"class": "PcapReader", "name": "getLinkType", "signature": "LinkType getLinkType(long linkTypeVal)", "start_line": 3, "modifiers": "protected", "params": [{"name": "linkTypeVal", "type": "long"}], "return_type": "LinkType"}, "class_info": {"name": "PcapReader", "kind": "class", "modifiers": "", "superclass":...
2501197_4
class Validation { public <T> Set<ConstraintViolation<T>> validateProperty(T object, String propertyPath, Class<?>... groups) { Set<ConstraintViolation<T>> violations = new HashSet<ConstraintViolation<T>>(); try { int currentIndex = -1; String currentPropertyPath; ...
RootBean rootBean = new RootBean(); NestedBean nestedBean = new NestedBean(); rootBean.setNestedBean(nestedBean); Set<ConstraintViolation<RootBean>> violations = validation.validateProperty(rootBean, "nestedBean.property"); Assert.assertTrue(violations.size() == 1); } }
[FOCAL] public Set<ConstraintViolation<T>> Validation.validateProperty(T object, String propertyPath, Class<?>... groups) [CLASS] class Validation [METRICS] loc=32 cc=5 branches=2 loops=1 returns=1 throws=0 nesting=3 [CALLS-INTERNAL] ConstraintViolation findNotNullViolation(Set<ConstraintViolation<T>> violations) [CALL...
/* static context [FOCAL] public Set<ConstraintViolation<T>> Validation.validateProperty(T object, String propertyPath, Class<?>... groups) [PATH1] if(currentIndex >= 0)=T -> if(notNullViolation == null)=T -> do_while(currentIndex >= 0)=F -> return violations [PATH2] if(currentIndex >= 0)=F -> if(notNullViolation == nu...
/* static context [FOCAL] public Set<ConstraintViolation<T>> Validation.validateProperty(T object, String propertyPath, Class<?>... groups) [PATH1] if(currentIndex >= 0)=T -> if(notNullViolation == null)=T -> do_while(currentIndex >= 0)=F -> return violations [PATH2] if(currentIndex >= 0)=F -> if(notNullViolation == nu...
true
ok
{"focal": {"class": "Validation", "name": "validateProperty", "signature": "Set<ConstraintViolation<T>> validateProperty(T object, String propertyPath, Class<?>... groups)", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "T"}, {"name": "propertyPath", "type": "String"}, {"name": "groups",...
2505794_638
class OrPredicate implements Predicate<T> { @Override public boolean evaluate(final T instance) { return any(predicates, new UnaryPredicate<UnaryPredicate<? super T>>() { @Override public boolean evaluate(UnaryPredicate<? super T> predicate) { return predicate.evaluate(instance)...
// Given OrPredicate<Object> orPredicate = new OrPredicate<Object>(Literals.<UnaryPredicate<? super Object>>iterable()); // When boolean result = orPredicate.evaluate(new Object()); // Then assertThat(result, is(false)); } }
[FOCAL] @Override public boolean OrPredicate.evaluate(T instance) [CLASS] class OrPredicate implements Predicate<T> [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] any/2 (inherited), predicate.evaluate/1 [NEW] UnaryPredicate<UnaryPredicate<? super T>> [INPUTS] branches=- | result=i...
/* static context [FOCAL] @Override public boolean OrPredicate.evaluate(T instance) [INPUTS] branches=- | result=instance [COLLABORATORS] field predicate evaluate/1 [NEW] UnaryPredicate<UnaryPredicate<? super T>> [CALLS-EXTERNAL] any/2 (inherited), predicate.evaluate/1 */
/* static context [FOCAL] @Override public boolean OrPredicate.evaluate(T instance) [INPUTS] branches=- | result=instance [COLLABORATORS] field predicate evaluate/1 [NEW] UnaryPredicate<UnaryPredicate<? super T>> [CALLS-EXTERNAL] any/2 (inherited), predicate.evaluate/1 */ class OrPredicate implements Predicate<T> { ...
true
ok
{"focal": {"class": "OrPredicate", "name": "evaluate", "signature": "boolean evaluate(T instance)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "instance", "type": "T"}], "return_type": "boolean"}, "class_info": {"name": "OrPredicate", "kind": "class", "modifiers": "", "superclass": null, "int...
2510313_7
class DefaultStatementBuilder implements StatementBuilder, OngoingUpdate, OngoingReadingWithWhere, OngoingReadingWithoutWhere, OngoingMatchAndUpdate { @Override public OngoingReadingWithoutWhere match(PatternElement... pattern) { return this.match(false, pattern); } DefaultStatementBuilder(); DefaultStat...
DefaultStatementBuilder builder = new DefaultStatementBuilder(); assertThatIllegalArgumentException().isThrownBy(() -> builder.match((PatternElement[]) null)) .withMessage("Patterns to match are required."); assertThatIllegalArgumentException().isThrownBy(() -> builder.match()) .withMessage("At least one p...
[FOCAL] @Override public OngoingReadingWithoutWhere DefaultStatementBuilder.match(PatternElement... pattern) [CLASS] class DefaultStatementBuilder implements StatementBuilder, OngoingUpdate, OngoingReadingWithWhere, OngoingReadingWithoutWhere, OngoingMatchAndUpdate [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 thro...
/* static context [FOCAL] @Override public OngoingReadingWithoutWhere DefaultStatementBuilder.match(PatternElement... pattern) [INPUTS] branches=- | result=pattern [CALLS-INTERNAL] OngoingReadingWithoutWhere match(boolean optional, PatternElement... pattern) */
/* static context [FOCAL] @Override public OngoingReadingWithoutWhere DefaultStatementBuilder.match(PatternElement... pattern) [INPUTS] branches=- | result=pattern [CALLS-INTERNAL] OngoingReadingWithoutWhere match(boolean optional, PatternElement... pattern) */ class DefaultStatementBuilder implements StatementBuilder,...
true
ok
{"focal": {"class": "DefaultStatementBuilder", "name": "match", "signature": "OngoingReadingWithoutWhere match(PatternElement... pattern)", "start_line": 4, "modifiers": "@Override public", "params": [{"name": "pattern", "type": "PatternElement..."}], "return_type": "OngoingReadingWithoutWhere"}, "class_info": {"name":...
2516145_2
class Configurator { public String[] asArray(String value){ return value.split(","); } @PostConstruct public void initialize(); @Produces public int getInteger(InjectionPoint ip); @Produces public boolean getBoolean(InjectionPoint ip); @Produces public String getString(InjectionPoint ip...
String[] expected = {"hey","joe"}; String[] actual = cut.asArray("hey,joe"); assertArrayEquals(expected, actual); } }
[FOCAL] public String[] Configurator.asArray(String value) [CLASS] class Configurator [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] String.split/1 [INPUTS] branches=- | result=value [DATAFLOW] value@param->L2 [CLASS-MEMBERS] void initialize(); int getInteger(InjectionPoint ip); b...
/* static context [FOCAL] public String[] Configurator.asArray(String value) [INPUTS] branches=- | result=value [CALLS-EXTERNAL] String.split/1 */
/* static context [FOCAL] public String[] Configurator.asArray(String value) [INPUTS] branches=- | result=value [CALLS-EXTERNAL] String.split/1 */ class Configurator { public String[] asArray(String value){ return value.split(","); } @PostConstruct public void initialize(); @Produces public int...
true
ok
{"focal": {"class": "Configurator", "name": "asArray", "signature": "String[] asArray(String value)", "start_line": 3, "modifiers": "public", "params": [{"name": "value", "type": "String"}], "return_type": "String[]"}, "class_info": {"name": "Configurator", "kind": "class", "modifiers": "", "superclass": null, "interfa...
2521501_29
class SC extends Canvas { public void confirm(String message, BooleanCallback callback) { confirm(null, message, callback); } public SC(); SC(ServerSideProxyFactory serverSideProxyFactory); public void say(String message); public void say(String message, BooleanCallback bcb); public void say(String title...
final String message = "message"; sc.confirm(message, null); verify(serverSideProxy).call(eq("confirm"), anyInt(), eq(message), anyString()); } }
[FOCAL] public void SC.confirm(String message, BooleanCallback callback) [CLASS] class SC extends Canvas [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void confirm(String title, String message, BooleanCallback callback) [DATAFLOW] callback@param->L2; message@param->L2 [CLASS-MEMB...
/* static context [FOCAL] public void SC.confirm(String message, BooleanCallback callback) [CALLS-INTERNAL] void confirm(String title, String message, BooleanCallback callback) */
/* static context [FOCAL] public void SC.confirm(String message, BooleanCallback callback) [CALLS-INTERNAL] void confirm(String title, String message, BooleanCallback callback) */ class SC extends Canvas { public void confirm(String message, BooleanCallback callback) { confirm(null, message, callback); } public ...
true
ok
{"focal": {"class": "SC", "name": "confirm", "signature": "void confirm(String message, BooleanCallback callback)", "start_line": 3, "modifiers": "public", "params": [{"name": "message", "type": "String"}, {"name": "callback", "type": "BooleanCallback"}], "return_type": "void"}, "class_info": {"name": "SC", "kind": "cl...
2524488_375
class ScannerOptions implements ScannerBase { @Override public synchronized void fetchColumn(Text colFam, Text colQual) { checkArgument(colFam != null, "colFam is null"); checkArgument(colQual != null, "colQual is null"); Column c = new Column(TextUtil.getBytes(colFam), TextUtil.getBytes(colQual), null...
try (ScannerOptions options = new ScannerOptions()) { assertEquals(0, options.getFetchedColumns().size()); IteratorSetting.Column col = new IteratorSetting.Column(new Text("family"), new Text("qualifier")); options.fetchColumn(col); SortedSet<Column> fetchedColumns = options.getFet...
[FOCAL] @Override public synchronized void ScannerOptions.fetchColumn(Text colFam, Text colQual) [CLASS] class ScannerOptions implements ScannerBase [METRICS] loc=7 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] checkArgument/2 (inherited), TextUtil.getBytes/1, fetchedColumns.add/1 [NEW] Column [...
/* static context [FOCAL] @Override public synchronized void ScannerOptions.fetchColumn(Text colFam, Text colQual) [COLLABORATORS] field fetchedColumns add/1 [NEW] Column [CALLS-EXTERNAL] checkArgument/2 (inherited), TextUtil.getBytes/1, fetchedColumns.add/1 */
/* static context [FOCAL] @Override public synchronized void ScannerOptions.fetchColumn(Text colFam, Text colQual) [COLLABORATORS] field fetchedColumns add/1 [NEW] Column [CALLS-EXTERNAL] checkArgument/2 (inherited), TextUtil.getBytes/1, fetchedColumns.add/1 */ class ScannerOptions implements ScannerBase { @Override...
true
ok
{"focal": {"class": "ScannerOptions", "name": "fetchColumn", "signature": "void fetchColumn(Text colFam, Text colQual)", "start_line": 3, "modifiers": "@Override public synchronized", "params": [{"name": "colFam", "type": "Text"}, {"name": "colQual", "type": "Text"}], "return_type": "void"}, "class_info": {"name": "Sca...
2536041_2
class DistCache { public static void addJarDirToDistributedCache(Configuration conf, File jarDirectory) throws IOException { if (!jarDirectory.exists() || !jarDirectory.isDirectory()) { throw new IOException("Jar directory: " + jarDirectory.getCanonicalPath() + " does not " + "exist or is not...
DistCache.addJarDirToDistributedCache(testConf, testFolder.getRoot().getCanonicalPath()); // Throw the added jar paths in a set to detect duplicates. String[] splitJarPaths = StringUtils.split(testConf.get("tmpjars"), ","); Set<String> addedJarPaths = new HashSet<String>(); for (String path: splitJa...
[FOCAL] public static void DistCache.addJarDirToDistributedCache(Configuration conf, File jarDirectory) [CLASS] class DistCache [METRICS] loc=12 cc=4 branches=2 loops=1 returns=0 throws=1 nesting=2 [CALLS-INTERNAL] void addJarToDistributedCache(Configuration conf, File jarFile) [CALLS-EXTERNAL] File.exists/0, File.isDi...
/* static context [FOCAL] public static void DistCache.addJarDirToDistributedCache(Configuration conf, File jarDirectory) [THROWS-WHEN] IOException when !jarDirectory.exists() || !jarDirectory.isDirectory() [PATH1] if(!jarDirectory.exists() || !jarDirectory.isDirectory())=F -> foreach(File file : jarDirectory.listFiles...
/* static context [FOCAL] public static void DistCache.addJarDirToDistributedCache(Configuration conf, File jarDirectory) [THROWS-WHEN] IOException when !jarDirectory.exists() || !jarDirectory.isDirectory() [PATH1] if(!jarDirectory.exists() || !jarDirectory.isDirectory())=F -> foreach(File file : jarDirectory.listFiles...
true
ok
{"focal": {"class": "DistCache", "name": "addJarDirToDistributedCache", "signature": "void addJarDirToDistributedCache(Configuration conf, File jarDirectory) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "conf", "type": "Configuration"}, {"name": "jarDirectory", "type": "File"}...
2544900_7
class JsspPhenotypeEvaluator implements IPhenotypeEvaluator { public double[] evaluateSchedule(Integer[] jobArray) { _schedule = null; return evaluateSchedule(jobArray, false); } public JsspPhenotypeEvaluator(JobsDefinition jobsDefinition); @Override public double[] evaluate(Obje...
JsspPhenotypeEvaluator evaluator = new JsspPhenotypeEvaluator(_jobsDefinition); Integer[] jobArray = new Integer[] {1,1,1,2,2,2}; double[] objVal = evaluator.evaluateSchedule(jobArray); assertEquals (12, (int)objVal[0]); jobArray = new Integer[] {1,2,1,2,1,2}; ...
[FOCAL] public double[] JsspPhenotypeEvaluator.evaluateSchedule(Integer[] jobArray) [CLASS] class JsspPhenotypeEvaluator implements IPhenotypeEvaluator [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] double[] evaluateSchedule(Integer[] jobArray, boolean buildSchedule) [INPUTS] bran...
/* static context [FOCAL] public double[] JsspPhenotypeEvaluator.evaluateSchedule(Integer[] jobArray) [INPUTS] branches=- | result=jobArray [CALLS-INTERNAL] double[] evaluateSchedule(Integer[] jobArray, boolean buildSchedule) */
/* static context [FOCAL] public double[] JsspPhenotypeEvaluator.evaluateSchedule(Integer[] jobArray) [INPUTS] branches=- | result=jobArray [CALLS-INTERNAL] double[] evaluateSchedule(Integer[] jobArray, boolean buildSchedule) */ class JsspPhenotypeEvaluator implements IPhenotypeEvaluator { public double[] evaluate...
true
ok
{"focal": {"class": "JsspPhenotypeEvaluator", "name": "evaluateSchedule", "signature": "double[] evaluateSchedule(Integer[] jobArray)", "start_line": 3, "modifiers": "public", "params": [{"name": "jobArray", "type": "Integer[]"}], "return_type": "double[]"}, "class_info": {"name": "JsspPhenotypeEvaluator", "kind": "cla...
2550825_37
class AkkaRouterConfigHelper { public Map<String, String> getRouterConfigInformation(RouterConfig routerConfig) { Map<String, String> result = new HashMap<String, String>(); result.put("Router", routerConfig.getClass().getSimpleName()); String routerDispatcher = routerConfig.routerDispatche...
Map<String, String> result = tested.getRouterConfigInformation(new TestCustomRouterConfig()); Map<String, String> expected = createdExpected(); assertEquals("extracted values", expected, result); } }
[FOCAL] public Map<String, String> AkkaRouterConfigHelper.getRouterConfigInformation(RouterConfig routerConfig) [CLASS] class AkkaRouterConfigHelper [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Map<String, String> extract(RouterConfig routerConfig) [CALLS-EXTERNAL] Map<String, S...
/* static context [FOCAL] public Map<String, String> AkkaRouterConfigHelper.getRouterConfigInformation(RouterConfig routerConfig) [COLLABORATORS] param routerConfig:RouterConfig getClass/0,routerDispatcher/0 [CALLS-INTERNAL] Map<String, String> extract(RouterConfig routerConfig) [NEW] HashMap<String, String> [CALLS-EXT...
/* static context [FOCAL] public Map<String, String> AkkaRouterConfigHelper.getRouterConfigInformation(RouterConfig routerConfig) [COLLABORATORS] param routerConfig:RouterConfig getClass/0,routerDispatcher/0 [CALLS-INTERNAL] Map<String, String> extract(RouterConfig routerConfig) [NEW] HashMap<String, String> [CALLS-EXT...
true
ok
{"focal": {"class": "AkkaRouterConfigHelper", "name": "getRouterConfigInformation", "signature": "Map<String, String> getRouterConfigInformation(RouterConfig routerConfig)", "start_line": 3, "modifiers": "public", "params": [{"name": "routerConfig", "type": "RouterConfig"}], "return_type": "Map<String, String>"}, "clas...
2562751_4
class Decoder { static byte[] convertBoolArrayToByteArray(boolean[] boolArr) { byte[] byteArr = new byte[(boolArr.length + 7) / 8]; for (int i = 0; i < byteArr.length; i++) { byteArr[i] = readByte(boolArr, 8 * i); } return byteArr; } public DecoderResult decode(AztecDetectorResult detector...
boolean[] bool0 = {}; boolean[] bool1 = { true }; boolean[] bool7 = { true, false, true, false, true, false, true }; boolean[] bool8 = { true, false, true, false, true, false, true, false }; boolean[] bool9 = { true, false, true, false, true, false, true, false, true }; b...
[FOCAL] static byte[] Decoder.convertBoolArrayToByteArray(boolean[] boolArr) [CLASS] class Decoder [METRICS] loc=7 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] byte readByte(boolean[] rawbits, int startIndex) [PATH1] for(i < byteArr.length)=T -> exit loop -> return byteArr [PATH2] for(i < byteA...
/* static context [FOCAL] static byte[] Decoder.convertBoolArrayToByteArray(boolean[] boolArr) [PATH1] for(i < byteArr.length)=T -> exit loop -> return byteArr [PATH2] for(i < byteArr.length)=F -> return byteArr [INPUTS] branches=boolArr | result=boolArr [CALLS-INTERNAL] byte readByte(boolean[] rawbits, int startIndex)...
/* static context [FOCAL] static byte[] Decoder.convertBoolArrayToByteArray(boolean[] boolArr) [PATH1] for(i < byteArr.length)=T -> exit loop -> return byteArr [PATH2] for(i < byteArr.length)=F -> return byteArr [INPUTS] branches=boolArr | result=boolArr [CALLS-INTERNAL] byte readByte(boolean[] rawbits, int startIndex)...
true
ok
{"focal": {"class": "Decoder", "name": "convertBoolArrayToByteArray", "signature": "byte[] convertBoolArrayToByteArray(boolean[] boolArr)", "start_line": 3, "modifiers": "static", "params": [{"name": "boolArr", "type": "boolean[]"}], "return_type": "byte[]"}, "class_info": {"name": "Decoder", "kind": "class", "modifier...
2572668_0
class RemoteUserTokenUserManager extends AbstractReadOnlyUserManager { @Override public Set<User> searchUsers(UserSearchCriteria criteria) { final Set<User> users = this.listUsers(); final Set<User> filteredUsers = this.filterListInMemeory(users, criteria); logger.debug("filteredUsers({...
UserManager userLocator = this.lookup(UserManager.class, RemoteUserTokenAuthenticatingRealm.REALM_NAME); Set<User> result = userLocator.searchUsers(new UserSearchCriteria("joh")); Assert.assertEquals(1, result.size()); // your test could be a bit more robust Assert.assertEquals(...
[FOCAL] @Override public Set<User> RemoteUserTokenUserManager.searchUsers(UserSearchCriteria criteria) [CLASS] class RemoteUserTokenUserManager extends AbstractReadOnlyUserManager [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Set<User> listUsers() [CALLS-EXTERNAL] this.filterList...
/* static context [FOCAL] @Override public Set<User> RemoteUserTokenUserManager.searchUsers(UserSearchCriteria criteria) [INPUTS] branches=- | result=criteria [CALLS-INTERNAL] Set<User> listUsers() [CALLS-EXTERNAL] this.filterListInMemeory/2, logger.debug/3 */
/* static context [FOCAL] @Override public Set<User> RemoteUserTokenUserManager.searchUsers(UserSearchCriteria criteria) [INPUTS] branches=- | result=criteria [CALLS-INTERNAL] Set<User> listUsers() [CALLS-EXTERNAL] this.filterListInMemeory/2, logger.debug/3 */ class RemoteUserTokenUserManager extends AbstractReadOnlyUs...
true
ok
{"focal": {"class": "RemoteUserTokenUserManager", "name": "searchUsers", "signature": "Set<User> searchUsers(UserSearchCriteria criteria)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "criteria", "type": "UserSearchCriteria"}], "return_type": "Set<User>"}, "class_info": {"name": "RemoteUserTok...
2576064_42
class DataWrapperFactory { public static Map<String, List<CtxModelObject>> sortByObfuscability(List<CtxModelObject> ctxDataList) { if (null == ctxDataList || ctxDataList.size() <= 0) { // LOG.error("Can't sort null values"); return null; } String notObfuscableType = "NOT_OBFUCSABLE"; DataTypeUtils dat...
// Null or empty Map<String, List<CtxModelObject>> ctxDataListRetrieved1 = DataWrapperFactory.sortByObfuscability(null); Map<String, List<CtxModelObject>> ctxDataListRetrieved2 = DataWrapperFactory.sortByObfuscability(new ArrayList<CtxModelObject>()); assertNull("Retrieved data list should be null", ctxDataList...
[FOCAL] public static Map<String, List<CtxModelObject>> DataWrapperFactory.sortByObfuscability(List<CtxModelObject> ctxDataList) [CLASS] class DataWrapperFactory [METRICS] loc=43 cc=7 branches=5 loops=1 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] List<CtxModelObject>.size/0, data.getId().getType/0, CtxModelObject.get...
class DataWrapperFactory { public static Map<String, List<CtxModelObject>> sortByObfuscability(List<CtxModelObject> ctxDataList) { if (null == ctxDataList || ctxDataList.size() <= 0) { // LOG.error("Can't sort null values"); return null; } String notObfuscableType = "NOT_OBFUCSABLE"; DataTypeUtils dat...
false
ok
{"focal": {"class": "DataWrapperFactory", "name": "sortByObfuscability", "signature": "Map<String, List<CtxModelObject>> sortByObfuscability(List<CtxModelObject> ctxDataList)", "start_line": 3, "modifiers": "public static", "params": [{"name": "ctxDataList", "type": "List<CtxModelObject>"}], "return_type": "Map<String,...
2580771_3
class DirectMemoryServlet extends HttpServlet { @Override protected void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException { // url format = /cache/key so get the key from path String path = req.getPathInfo(); String servletPath =...
MockHttpServletRequest request = new MockHttpServletRequest(); request.addHeader( "Accept", MediaType.APPLICATION_JSON ); request.setServletPath( "cache" ); request.setPathInfo( "/foo" ); MockHttpServletResponse response = new MockHttpServletResponse(); directMemoryS...
[FOCAL] @Override protected void DirectMemoryServlet.doGet(HttpServletRequest req, HttpServletResponse resp) [CLASS] class DirectMemoryServlet extends HttpServlet [METRICS] loc=58 cc=6 branches=4 loops=0 returns=4 throws=0 nesting=1 [CALLS-INTERNAL] ContentTypeHandler findGetCacheContentTypeHandler(HttpServletRequest r...
/* static context [FOCAL] @Override protected void DirectMemoryServlet.doGet(HttpServletRequest req, HttpServletResponse resp) [PATH1] if(StringUtils.isEmpty( key ))=F -> if(StringUtils.isEmpty( acceptContentType ))=F -> if(contentTypeHandler == null)=F -> if(bytes == null || bytes.length == 0)=T -> return [PATH2] if(S...
/* static context [FOCAL] @Override protected void DirectMemoryServlet.doGet(HttpServletRequest req, HttpServletResponse resp) [PATH1] if(StringUtils.isEmpty( key ))=F -> if(StringUtils.isEmpty( acceptContentType ))=F -> if(contentTypeHandler == null)=F -> if(bytes == null || bytes.length == 0)=T -> return [PATH2] if(S...
true
ok
{"focal": {"class": "DirectMemoryServlet", "name": "doGet", "signature": "void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException", "start_line": 3, "modifiers": "@Override protected", "params": [{"name": "req", "type": "HttpServletRequest"}, {"name": "resp", "type": "HttpServl...
2588654_1
class PeakPlugin implements PluginWithDependencies { protected boolean updatePeakForChannel(Network network, Channel channel) { try { int storedCount = getCount(network, channel); int numberCurrentlyOnChannel = channel.getNicks().size(); if (storedCount < numberCurrentl...
testChannel.addNick(testNick1); assertTrue(peakPlugin.updatePeakForChannel(network, testChannel)); assertFalse(peakPlugin.updatePeakForChannel(network, testChannel)); testChannel.addNick(testNick2); assertTrue(peakPlugin.updatePeakForChannel(network, testChannel)); asser...
[FOCAL] protected boolean PeakPlugin.updatePeakForChannel(Network network, Channel channel) [CLASS] class PeakPlugin implements PluginWithDependencies [METRICS] loc=16 cc=3 branches=1 loops=0 returns=2 throws=0 nesting=2 [CALLS-INTERNAL] String channelIdentifier(Network network, Channel channel); int getCount(Network n...
/* static context [FOCAL] protected boolean PeakPlugin.updatePeakForChannel(Network network, Channel channel) [PATH1] try-body throws -> return false [PATH2] if(storedCount < numberCurrentlyOnChannel)=T -> return true [PATH3] if(storedCount < numberCurrentlyOnChannel)=F -> return false [INPUTS] branches=channel, networ...
/* static context [FOCAL] protected boolean PeakPlugin.updatePeakForChannel(Network network, Channel channel) [PATH1] try-body throws -> return false [PATH2] if(storedCount < numberCurrentlyOnChannel)=T -> return true [PATH3] if(storedCount < numberCurrentlyOnChannel)=F -> return false [INPUTS] branches=channel, networ...
true
ok
{"focal": {"class": "PeakPlugin", "name": "updatePeakForChannel", "signature": "boolean updatePeakForChannel(Network network, Channel channel)", "start_line": 3, "modifiers": "protected", "params": [{"name": "network", "type": "Network"}, {"name": "channel", "type": "Channel"}], "return_type": "boolean"}, "class_info":...
2611961_0
class RegistrationUtils { public static String estimateAge(String birthdate) throws ParseException { Date date = RegistrationUtils.parseDate(birthdate); return PatientUtils.estimateAge(date); } public static Date parseDate(String date); public static String formatDate(Date date); public static PersonName get...
Assert.assertEquals( "~0 D ", RegistrationUtils.estimateAge( date ) ); } }
[FOCAL] public static String RegistrationUtils.estimateAge(String birthdate) [CLASS] class RegistrationUtils [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] RegistrationUtils.parseDate/1, PatientUtils.estimateAge/1 [EXCEPTIONS] declares ParseException [INPUTS] branches=- | result=b...
/* static context [FOCAL] public static String RegistrationUtils.estimateAge(String birthdate) [INPUTS] branches=- | result=birthdate [EXCEPTIONS] declares ParseException [CALLS-EXTERNAL] RegistrationUtils.parseDate/1, PatientUtils.estimateAge/1 */
/* static context [FOCAL] public static String RegistrationUtils.estimateAge(String birthdate) [INPUTS] branches=- | result=birthdate [EXCEPTIONS] declares ParseException [CALLS-EXTERNAL] RegistrationUtils.parseDate/1, PatientUtils.estimateAge/1 */ class RegistrationUtils { public static String estimateAge(String bir...
true
ok
{"focal": {"class": "RegistrationUtils", "name": "estimateAge", "signature": "String estimateAge(String birthdate) throws ParseException", "start_line": 3, "modifiers": "public static", "params": [{"name": "birthdate", "type": "String"}], "return_type": "String"}, "class_info": {"name": "RegistrationUtils", "kind": "cl...
2613332_20
class DashBoardPage extends SharePage implements Dashboard { @SuppressWarnings("unchecked") @Override public DashBoardPage render(RenderTime timer) { basicRender(timer); // We don't know if the dashlets will appear so do the basic rendering try { getDashlet("...
//Were already logged in from the previous test. drone.refresh(); DashBoardPage dashBoard = drone.getCurrentPage().render(); Assert.assertNotNull(dashBoard); } }
[FOCAL] @SuppressWarnings("unchecked") @Override public DashBoardPage DashBoardPage.render(RenderTime timer) [CLASS] class DashBoardPage extends SharePage implements Dashboard [METRICS] loc=18 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1 [CALLS-INTERNAL] Dashlet getDashlet(String name) [CALLS-EXTERNAL] basicRen...
/* static context [FOCAL] @SuppressWarnings("unchecked") @Override public DashBoardPage DashBoardPage.render(RenderTime timer) [THROWS-WHEN] PageException when try-body throws [PATH1] try-body throws -> throw new PageException(this.getClass().getName() + " failed to render in... [PATH2] return this [EXCEPTIONS] throws ...
/* static context [FOCAL] @SuppressWarnings("unchecked") @Override public DashBoardPage DashBoardPage.render(RenderTime timer) [THROWS-WHEN] PageException when try-body throws [PATH1] try-body throws -> throw new PageException(this.getClass().getName() + " failed to render in... [PATH2] return this [EXCEPTIONS] throws ...
true
ok
{"focal": {"class": "DashBoardPage", "name": "render", "signature": "DashBoardPage render(RenderTime timer)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") @Override public", "params": [{"name": "timer", "type": "RenderTime"}], "return_type": "DashBoardPage"}, "class_info": {"name": "DashBoardPage", "...
2614085_60
class HtmlPortletPreferenceSearchContentExtractor implements ISearchContentExtractor { @Override public boolean appliesTo(IPortletDefinition portlet) { final boolean portletMatch = portletName.equalsIgnoreCase(portlet.getPortletDescriptorKey().getPortletName()); final boolean we...
final IPortletDescriptorKey portletDescriptorKey = mock(IPortletDescriptorKey.class); when(portletDescriptorKey.getPortletName()).thenAnswer(invocation -> NOT_A_MATCH); when(portletDescriptorKey.getWebAppName()).thenAnswer(invocation -> NOT_A_MATCH); final IPortletPreference portletPre...
[FOCAL] @Override public boolean HtmlPortletPreferenceSearchContentExtractor.appliesTo(IPortletDefinition portlet) [CLASS] class HtmlPortletPreferenceSearchContentExtractor implements ISearchContentExtractor [METRICS] loc=14 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] portletName.equalsIgnoreC...
/* static context [FOCAL] @Override public boolean HtmlPortletPreferenceSearchContentExtractor.appliesTo(IPortletDefinition portlet) [INPUTS] branches=- | result=portlet [COLLABORATORS] field portletName equalsIgnoreCase/1; param portlet:IPortletDefinition getPortletDescriptorKey/0,getPortletPreferences/0; field webapp...
/* static context [FOCAL] @Override public boolean HtmlPortletPreferenceSearchContentExtractor.appliesTo(IPortletDefinition portlet) [INPUTS] branches=- | result=portlet [COLLABORATORS] field portletName equalsIgnoreCase/1; param portlet:IPortletDefinition getPortletDescriptorKey/0,getPortletPreferences/0; field webapp...
true
ok
{"focal": {"class": "HtmlPortletPreferenceSearchContentExtractor", "name": "appliesTo", "signature": "boolean appliesTo(IPortletDefinition portlet)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "portlet", "type": "IPortletDefinition"}], "return_type": "boolean"}, "class_info": {"name": "HtmlPo...
2618757_4
class SpringPluggableSchemas implements Schemas, Namespaces { public Map<String, Schema> getNamedMappings() { ensureInit(); return nameToSchemaMappings; } public SpringPluggableSchemas(); public SpringPluggableSchemas(ClassLoader classLoader); public SpringPluggableSchemas(Resou...
Map<String, Schema> names = sps.getNamedMappings(); Resource resource; Schema beansSchema = names.get("www.springframework.org/schema/beans/spring-beans-2.5.xsd"); resource = assertSourceInfoAndGetResource(beansSchema, SpringPluggableSchemaSourceInfo.class); assertResource("org/...
[FOCAL] public Map<String, Schema> SpringPluggableSchemas.getNamedMappings() [CLASS] class SpringPluggableSchemas implements Schemas, Namespaces [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] void ensureInit() [CLASS-MEMBERS] SpringPluggableSchemas(); SpringPluggableSchemas(ClassL...
/* static context [FOCAL] public Map<String, Schema> SpringPluggableSchemas.getNamedMappings() [CALLS-INTERNAL] void ensureInit() */
/* static context [FOCAL] public Map<String, Schema> SpringPluggableSchemas.getNamedMappings() [CALLS-INTERNAL] void ensureInit() */ class SpringPluggableSchemas implements Schemas, Namespaces { public Map<String, Schema> getNamedMappings() { ensureInit(); return nameToSchemaMappings; } pu...
true
ok
{"focal": {"class": "SpringPluggableSchemas", "name": "getNamedMappings", "signature": "Map<String, Schema> getNamedMappings()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Map<String, Schema>"}, "class_info": {"name": "SpringPluggableSchemas", "kind": "class", "modifiers": "", "superclass": n...
2622978_77
class JpaCacheEvictionHandler { public final void onAfterTestMethod(@Observes(precedence = 45) AfterPersistenceTest event) { executeCacheEviction(event, TestExecutionPhase.AFTER); } public JpaCacheEvictionHandler(); public JpaCacheEvictionHandler(Instance<Context> ctx, JpaCacheEvictionConfig...
jpaCacheEvictionHandler.onAfterTestMethod(createAfterEvent(new StubTestCaseWithModifiedAnnotation())); assertThat(tmpLookupName).isEqualTo("customEntityManager"); assertThat(tmpCacheEvicted).isTrue(); } }
[FOCAL] public final void JpaCacheEvictionHandler.onAfterTestMethod(AfterPersistenceTest event) [CLASS] class JpaCacheEvictionHandler [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void executeCacheEviction(TestEvent event, TestExecutionPhase currentPhase) [DATAFLOW] event@param->...
/* static context [FOCAL] public final void JpaCacheEvictionHandler.onAfterTestMethod(AfterPersistenceTest event) [CALLS-INTERNAL] void executeCacheEviction(TestEvent event, TestExecutionPhase currentPhase) */
/* static context [FOCAL] public final void JpaCacheEvictionHandler.onAfterTestMethod(AfterPersistenceTest event) [CALLS-INTERNAL] void executeCacheEviction(TestEvent event, TestExecutionPhase currentPhase) */ class JpaCacheEvictionHandler { public final void onAfterTestMethod(@Observes(precedence = 45) AfterPersi...
true
ok
{"focal": {"class": "JpaCacheEvictionHandler", "name": "onAfterTestMethod", "signature": "void onAfterTestMethod(AfterPersistenceTest event)", "start_line": 3, "modifiers": "public final", "params": [{"name": "event", "type": "AfterPersistenceTest"}], "return_type": "void"}, "class_info": {"name": "JpaCacheEvictionHand...
2624179_0
class ReplicantRuntime { @Action void registerConnector( @Nonnull final Connector connector ) { if ( Replicant.shouldCheckInvariants() ) { invariant( () -> _connectors.stream() .noneMatch( e -> e.getConnector().getSchema().getId() == connector.getSchema().getId() ), ...
final ReplicantRuntime runtime1 = Replicant.context().getRuntime(); final SystemSchema schema = newSchema(); // This connector will self-register to runtime1 final Connector connector1 = createConnector( schema ); final IllegalStateException exception = expectThrows( IllegalStateException.c...
[FOCAL] @Action void ReplicantRuntime.registerConnector(Connector connector) [CLASS] class ReplicantRuntime [METRICS] loc=18 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-INTERNAL] ObservableValue<?> getConnectorsObservableValue(); void deregisterConnector(Connector connector) [CALLS-EXTERNAL] Replicant.s...
/* static context [FOCAL] @Action void ReplicantRuntime.registerConnector(Connector connector) [PATH1] if(Replicant.shouldCheckInvariants())=T [PATH2] if(Replicant.shouldCheckInvariants())=F [COLLABORATORS] field e getConnector/0; param connector:Connector getSchema/0 [CALLS-INTERNAL] ObservableValue<?> getConnectorsOb...
/* static context [FOCAL] @Action void ReplicantRuntime.registerConnector(Connector connector) [PATH1] if(Replicant.shouldCheckInvariants())=T [PATH2] if(Replicant.shouldCheckInvariants())=F [COLLABORATORS] field e getConnector/0; param connector:Connector getSchema/0 [CALLS-INTERNAL] ObservableValue<?> getConnectorsOb...
true
ok
{"focal": {"class": "ReplicantRuntime", "name": "registerConnector", "signature": "void registerConnector(Connector connector)", "start_line": 3, "modifiers": "@Action", "params": [{"name": "connector", "type": "Connector"}], "return_type": "void"}, "class_info": {"name": "ReplicantRuntime", "kind": "class", "modifiers...
2626654_7
class HDIVUtil { public static String stripAndFillSessionData(final String url, final UrlDataImpl urldata) { final int pos = url.indexOf(';'); if (pos != -1) { final char[] data = url.toCharArray(); int sessionStart; if ((sessionStart = indexOf(data, jsessionLower, pos)) != -1 || (sessionStart = indexOf(...
final String url = "/testAction.do;jsessionid=67CFB560B6EC2677D51814A2A2B16B24"; final UrlDataImpl data = new UrlDataImpl(url, Method.GET); Assert.assertEquals("/testAction.do", HDIVUtil.stripAndFillSessionData(url, data)); Assert.assertEquals("jsessionid=67CFB560B6EC2677D51814A2A2B16B24", data.getjSessionId()...
[FOCAL] public static String HDIVUtil.stripAndFillSessionData(String url, UrlDataImpl urldata) [CLASS] class HDIVUtil [METRICS] loc=26 cc=7 branches=6 loops=0 returns=2 throws=0 nesting=4 [CALLS-INTERNAL] int indexOf(char[] source, char[] target, int fromIndex) [CALLS-EXTERNAL] String.indexOf/1, String.toCharArray/0, U...
/* static context [FOCAL] public static String HDIVUtil.stripAndFillSessionData(String url, UrlDataImpl urldata) [PATH1] if(pos != -1)=T -> if((sessionStart = indexOf(data, jsessionLower, pos)) != -1 || (sessionStart = indexOf(data, jsessionUpper, pos)) != -1)=T -> if(sessionEnd == -1)#1=T -> if(sessionEnd == -1)#2=T -...
/* static context [FOCAL] public static String HDIVUtil.stripAndFillSessionData(String url, UrlDataImpl urldata) [PATH1] if(pos != -1)=T -> if((sessionStart = indexOf(data, jsessionLower, pos)) != -1 || (sessionStart = indexOf(data, jsessionUpper, pos)) != -1)=T -> if(sessionEnd == -1)#1=T -> if(sessionEnd == -1)#2=T -...
true
ok
{"focal": {"class": "HDIVUtil", "name": "stripAndFillSessionData", "signature": "String stripAndFillSessionData(String url, UrlDataImpl urldata)", "start_line": 3, "modifiers": "public static", "params": [{"name": "url", "type": "String"}, {"name": "urldata", "type": "UrlDataImpl"}], "return_type": "String"}, "class_in...
2647335_4
class BundleNameTemplate { public String forGroup(String groupName, ResourceHtmlTag tag) { return namePattern .replace("@groupName@", groupName) .replace("@extension@", tag.getExtension()); } public BundleNameTemplate(String namePattern); @Override public bool...
String p = "@groupName@-345\\.@extension@"; BundleNameTemplate template = new BundleNameTemplate(p); assertEquals("test-345\\.css", template.forGroup("test", ResourceHtmlTag.CSS)); assertEquals("test-345\\.js", template.forGroup("test", ResourceHtmlTag.JS)); } }
[FOCAL] public String BundleNameTemplate.forGroup(String groupName, ResourceHtmlTag tag) [CLASS] class BundleNameTemplate [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] namePattern .replace("@groupName@", groupName).replace/2, namePattern.replace/2, ResourceHtmlTag.getExtension/0 ...
/* static context [FOCAL] public String BundleNameTemplate.forGroup(String groupName, ResourceHtmlTag tag) [INPUTS] branches=- | result=groupName, tag [COLLABORATORS] field namePattern replace/2; param tag:ResourceHtmlTag getExtension/0 [CALLS-EXTERNAL] namePattern .replace("@groupName@", groupName).replace/2, namePatt...
/* static context [FOCAL] public String BundleNameTemplate.forGroup(String groupName, ResourceHtmlTag tag) [INPUTS] branches=- | result=groupName, tag [COLLABORATORS] field namePattern replace/2; param tag:ResourceHtmlTag getExtension/0 [CALLS-EXTERNAL] namePattern .replace("@groupName@", groupName).replace/2, namePatt...
true
ok
{"focal": {"class": "BundleNameTemplate", "name": "forGroup", "signature": "String forGroup(String groupName, ResourceHtmlTag tag)", "start_line": 3, "modifiers": "public", "params": [{"name": "groupName", "type": "String"}, {"name": "tag", "type": "ResourceHtmlTag"}], "return_type": "String"}, "class_info": {"name": "...
2651891_0
class StringRepository { public String get() { if (stringList.isEmpty()) { return null; } else { String result = stringList.remove(0); return result; } } public StringRepository(List<String> stringList); public void put(String data); @...
StringRepository instance = new StringRepository(stringList); Story story = Story.create(new Scenario() { { expect(stringList).isEmpty(); willReturn(true); } }); story.begin(); assertNull(instance.get()); story.end()...
[FOCAL] public String StringRepository.get() [CLASS] class StringRepository [METRICS] loc=8 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] List<String>.isEmpty/0, List<String>.remove/1 [FIELDS] read=stringList:List<String> [PATH1] if(stringList.isEmpty())=T -> return null [PATH2] if(stringList.is...
/* static context [FOCAL] public String StringRepository.get() [PATH1] if(stringList.isEmpty())=T -> return null [PATH2] if(stringList.isEmpty())=F -> return result [INPUTS] branches=stringList | result=stringList [COLLABORATORS] field stringList:List<String> isEmpty/0,remove/1 [FIELDS] read=stringList:List<String> [CA...
/* static context [FOCAL] public String StringRepository.get() [PATH1] if(stringList.isEmpty())=T -> return null [PATH2] if(stringList.isEmpty())=F -> return result [INPUTS] branches=stringList | result=stringList [COLLABORATORS] field stringList:List<String> isEmpty/0,remove/1 [FIELDS] read=stringList:List<String> [CA...
true
ok
{"focal": {"class": "StringRepository", "name": "get", "signature": "String get()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "StringRepository", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "stringList", "type...
2656737_4
class CDABuilder { public String createConsentCDA(Patient patient, PatientConsentPolicy policy, DocumentEntry documentEntry) { // Basic checks if (patient == null) throw new IllegalArgumentException("Patient cannot be null."); if (policy == null) throw new IllegalArgumentException("policy cannot be nu...
Patient patient = createPatient(); DocumentEntry de = documentEntryBuilder.createDocumentEntry( new CoalaAuthor("testName", "testName", "testName"), patient, PatientConsentPolicy.ONE, new Date(), new Date()); String cdaResult = cdaBuilder.createConsentCDA(patient, PatientConsentPolicy.ONE, de); ass...
[FOCAL] public String CDABuilder.createConsentCDA(Patient patient, PatientConsentPolicy policy, DocumentEntry documentEntry) [CLASS] class CDABuilder [METRICS] loc=55 cc=5 branches=3 loops=0 returns=1 throws=4 nesting=1 [CALLS-INTERNAL] VelocityContext createMetaContext(VelocityContext context, Patient patient, Patient...
/* static context [FOCAL] public String CDABuilder.createConsentCDA(Patient patient, PatientConsentPolicy policy, DocumentEntry documentEntry) [THROWS-WHEN] IllegalArgumentException when patient == null [THROWS-WHEN] IllegalArgumentException when !(patient == null) && policy == null [THROWS-WHEN] IllegalArgumentExcepti...
/* static context [FOCAL] public String CDABuilder.createConsentCDA(Patient patient, PatientConsentPolicy policy, DocumentEntry documentEntry) [THROWS-WHEN] IllegalArgumentException when patient == null [THROWS-WHEN] IllegalArgumentException when !(patient == null) && policy == null [THROWS-WHEN] IllegalArgumentExcepti...
true
ok
{"focal": {"class": "CDABuilder", "name": "createConsentCDA", "signature": "String createConsentCDA(Patient patient, PatientConsentPolicy policy, DocumentEntry documentEntry)", "start_line": 3, "modifiers": "public", "params": [{"name": "patient", "type": "Patient"}, {"name": "policy", "type": "PatientConsentPolicy"}, ...
2666578_179
class StringAuthentication implements Authentication { @Override public int hashCode() { int hash = 17; hash = hash * 31 + key.hashCode(); hash = hash * 31 + ( ( value != null ) ? value.hashCode() : 0 ); return hash; } public StringAuthentication( String key, Strin...
Authentication auth1 = new StringAuthentication( "key", "value" ); Authentication auth2 = new StringAuthentication( "key", "value" ); assertEquals( auth1.hashCode(), auth2.hashCode() ); } }
[FOCAL] @Override public int StringAuthentication.hashCode() [CLASS] class StringAuthentication implements Authentication [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] key.hashCode/0, value.hashCode/0 [COLLABORATORS] field key hashCode/0; field value hashCode/0 [DATAFLOW] hash@L4...
/* static context [FOCAL] @Override public int StringAuthentication.hashCode() [COLLABORATORS] field key hashCode/0; field value hashCode/0 [CALLS-EXTERNAL] key.hashCode/0, value.hashCode/0 */
/* static context [FOCAL] @Override public int StringAuthentication.hashCode() [COLLABORATORS] field key hashCode/0; field value hashCode/0 [CALLS-EXTERNAL] key.hashCode/0, value.hashCode/0 */ class StringAuthentication implements Authentication { @Override public int hashCode() { int hash = 17; ...
true
ok
{"focal": {"class": "StringAuthentication", "name": "hashCode", "signature": "int hashCode()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "int"}, "class_info": {"name": "StringAuthentication", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Authentication", "fiel...
2675355_2
class JavaParserJsonDeserializer { public Node deserializeObject(JsonReader reader) { Log.info("Deserializing JSON to Node."); JsonObject jsonObject = reader.readObject(); return deserializeObject(jsonObject); } private Node deserializeObject(JsonObject nodeJson); private NodeL...
Type type = parseType("Blub<>"); String serialized = serialize(type, false); Node deserialized = deserializer.deserializeObject(Json.createReader(new StringReader(serialized))); assertEqualsStringIgnoringEol("Blub<>", deserialized.toString()); assertEquals(type.hashCode(), dese...
[FOCAL] public Node JavaParserJsonDeserializer.deserializeObject(JsonReader reader) [CLASS] class JavaParserJsonDeserializer [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Node deserializeObject(JsonObject nodeJson) [CALLS-EXTERNAL] Log.info/1, JsonReader.readObject/0 [INPUTS] bra...
/* static context [FOCAL] public Node JavaParserJsonDeserializer.deserializeObject(JsonReader reader) [INPUTS] branches=- | result=reader [COLLABORATORS] param reader:JsonReader readObject/0 [CALLS-INTERNAL] Node deserializeObject(JsonObject nodeJson) [CALLS-EXTERNAL] Log.info/1, JsonReader.readObject/0 */
/* static context [FOCAL] public Node JavaParserJsonDeserializer.deserializeObject(JsonReader reader) [INPUTS] branches=- | result=reader [COLLABORATORS] param reader:JsonReader readObject/0 [CALLS-INTERNAL] Node deserializeObject(JsonObject nodeJson) [CALLS-EXTERNAL] Log.info/1, JsonReader.readObject/0 */ class JavaPa...
true
ok
{"focal": {"class": "JavaParserJsonDeserializer", "name": "deserializeObject", "signature": "Node deserializeObject(JsonReader reader)", "start_line": 3, "modifiers": "public", "params": [{"name": "reader", "type": "JsonReader"}], "return_type": "Node"}, "class_info": {"name": "JavaParserJsonDeserializer", "kind": "cla...
2675654_37
class Deps { public static DependencyAtom getMinimumVersion(DependencyAtom left, DependencyAtom right) { String leftVersion = left.getPropertyValue(); String rightVersion = right.getPropertyValue(); if ((leftVersion == null) || (rightVersion == null) || leftVersion.equals(rightVersion)) { ...
DependencyAtom left = DependencyAtom.parse("foo:foo:1.0", new AtomicReference<String>()); DependencyAtom right = DependencyAtom.parse("foo:foo:1.0", new AtomicReference<String>()); DependencyAtom result = Deps.getMinimumVersion(left, right); assertNull(result); left = Dependenc...
[FOCAL] public static DependencyAtom Deps.getMinimumVersion(DependencyAtom left, DependencyAtom right) [CLASS] class Deps [METRICS] loc=61 cc=16 branches=13 loops=1 returns=8 throws=0 nesting=4 [CALLS-EXTERNAL] DependencyAtom.getPropertyValue/0, String.equals/1, String.split/1, String.startsWith/1, String.substring/1, ...
class Deps { public static DependencyAtom getMinimumVersion(DependencyAtom left, DependencyAtom right) { String leftVersion = left.getPropertyValue(); String rightVersion = right.getPropertyValue(); if ((leftVersion == null) || (rightVersion == null) || leftVersion.equals(rightVersion)) { ...
false
ok
{"focal": {"class": "Deps", "name": "getMinimumVersion", "signature": "DependencyAtom getMinimumVersion(DependencyAtom left, DependencyAtom right)", "start_line": 3, "modifiers": "public static", "params": [{"name": "left", "type": "DependencyAtom"}, {"name": "right", "type": "DependencyAtom"}], "return_type": "Depende...
2680621_5
class FormEntryContext { public Widget getWidgetByFieldName(String fieldName) { for (Map.Entry<Widget, String> e : fieldNames.entrySet()) { if (e.getValue().equals(fieldName)) return e.getKey(); } return null; } public FormEntryContext(Mode mode); public Mode getMode(); public String registerWidge...
DropdownWidget widget = new DropdownWidget(); context.registerWidget(widget); String fieldName = context.getFieldName(widget); Widget w = context.getWidgetByFieldName(fieldName); assertNotNull(w); } }
[FOCAL] public Widget FormEntryContext.getWidgetByFieldName(String fieldName) [CLASS] class FormEntryContext [METRICS] loc=7 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] fieldNames.entrySet/0, e.getValue().equals/1, Map.Entry<Widget, String>.getValue/0, Map.Entry<Widget, String>.getKey/0 [PATH1...
/* static context [FOCAL] public Widget FormEntryContext.getWidgetByFieldName(String fieldName) [PATH1] foreach(Map.Entry<Widget, String> e : fieldNames.entrySet())=T -> if(e.getValue().equals(fieldName))=F -> exit loop -> return null [PATH2] foreach(Map.Entry<Widget, String> e : fieldNames.entrySet())=T -> if(e.getVal...
/* static context [FOCAL] public Widget FormEntryContext.getWidgetByFieldName(String fieldName) [PATH1] foreach(Map.Entry<Widget, String> e : fieldNames.entrySet())=T -> if(e.getValue().equals(fieldName))=F -> exit loop -> return null [PATH2] foreach(Map.Entry<Widget, String> e : fieldNames.entrySet())=T -> if(e.getVal...
true
ok
{"focal": {"class": "FormEntryContext", "name": "getWidgetByFieldName", "signature": "Widget getWidgetByFieldName(String fieldName)", "start_line": 3, "modifiers": "public", "params": [{"name": "fieldName", "type": "String"}], "return_type": "Widget"}, "class_info": {"name": "FormEntryContext", "kind": "class", "modifi...
2685841_1710
class AdditionalDocumentsController implements PatientDataController<Attachment> { @Override public void writeJSON(Patient patient, JSONObject json) { writeJSON(patient, json, null); } @Override public PatientData<Attachment> load(Patient patient); @Override public void save(@Nonnull f...
JSONObject json = new JSONObject(); this.mocker.getComponentUnderTest().writeJSON(this.patient, json, Collections.singletonList(CONTROLLER_NAME)); Assert.assertTrue(json.has(DATA_NAME)); JSONArray result = json.getJSONArray(DATA_NAME); Assert.assertEquals(2, result.length()); ...
[FOCAL] @Override public void AdditionalDocumentsController.writeJSON(Patient patient, JSONObject json) [CLASS] class AdditionalDocumentsController implements PatientDataController<Attachment> [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void writeJSON(Patient patient, JSONObjec...
/* static context [FOCAL] @Override public void AdditionalDocumentsController.writeJSON(Patient patient, JSONObject json) [CALLS-INTERNAL] void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames) */
/* static context [FOCAL] @Override public void AdditionalDocumentsController.writeJSON(Patient patient, JSONObject json) [CALLS-INTERNAL] void writeJSON(Patient patient, JSONObject json, Collection<String> selectedFieldNames) */ class AdditionalDocumentsController implements PatientDataController<Attachment> { @O...
true
ok
{"focal": {"class": "AdditionalDocumentsController", "name": "writeJSON", "signature": "void writeJSON(Patient patient, JSONObject json)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "patient", "type": "Patient"}, {"name": "json", "type": "JSONObject"}], "return_type": "void"}, "class_info": {...
2689039_50
class SimpleVehicleMessage extends NamedVehicleMessage { @Override public void writeToParcel(Parcel out, int flags) { super.writeToParcel(out, flags); out.writeValue(getValue()); } public SimpleVehicleMessage(Long timestamp, String name, Object value); public SimpleVehicleMessage...
Parcel parcel = Parcel.obtain(); message.writeToParcel(parcel, 0); // Reset parcel for reading parcel.setDataPosition(0); VehicleMessage createdFromParcel = VehicleMessage.CREATOR.createFromParcel(parcel); assertThat(createdFromParcel, instanceOf(SimpleV...
[FOCAL] @Override public void SimpleVehicleMessage.writeToParcel(Parcel out, int flags) [CLASS] class SimpleVehicleMessage extends NamedVehicleMessage [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] Object getValue() [CALLS-EXTERNAL] NamedVehicleMessage.writeToParcel/2, Parcel.writ...
/* static context [FOCAL] @Override public void SimpleVehicleMessage.writeToParcel(Parcel out, int flags) [COLLABORATORS] param out:Parcel writeValue/1 [CALLS-INTERNAL] Object getValue() [CALLS-EXTERNAL] NamedVehicleMessage.writeToParcel/2, Parcel.writeValue/1 */
/* static context [FOCAL] @Override public void SimpleVehicleMessage.writeToParcel(Parcel out, int flags) [COLLABORATORS] param out:Parcel writeValue/1 [CALLS-INTERNAL] Object getValue() [CALLS-EXTERNAL] NamedVehicleMessage.writeToParcel/2, Parcel.writeValue/1 */ class SimpleVehicleMessage extends NamedVehicleMessage {...
true
ok
{"focal": {"class": "SimpleVehicleMessage", "name": "writeToParcel", "signature": "void writeToParcel(Parcel out, int flags)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "out", "type": "Parcel"}, {"name": "flags", "type": "int"}], "return_type": "void"}, "class_info": {"name": "SimpleVehicleM...
2694049_1
class KerberizedSshServer { SshServer getServer() { return server; } public KerberizedSshServer(int port, String keytab, String principalName); public void start(); public static void main(String args[]); } class KerberizedSshServerTest { @Test public void testServerWithPrincipal() throws UnknownHostExc...
KerberizedSshServer server = new KerberizedSshServer(1235, "aFile", "host/localhost"); SshServer sshServer = server.getServer(); GSSAuthenticator authenticator = sshServer.getGSSAuthenticator(); assertNotNull(authenticator); String principal = (String) getField(authenticator, "servicePrincipalName"); ...
[FOCAL] SshServer KerberizedSshServer.getServer() [CLASS] class KerberizedSshServer [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] KerberizedSshServer(int port, String keytab, String principalName); void start(); void main(String args) [TEST] KerberizedSshServerTest: @Test public v...
/* static context [FOCAL] SshServer KerberizedSshServer.getServer() */
/* static context [FOCAL] SshServer KerberizedSshServer.getServer() */ class KerberizedSshServer { SshServer getServer() { return server; } public KerberizedSshServer(int port, String keytab, String principalName); public void start(); public static void main(String args[]); } class KerberizedSshServerTest...
true
ok
{"focal": {"class": "KerberizedSshServer", "name": "getServer", "signature": "SshServer getServer()", "start_line": 3, "modifiers": "", "params": [], "return_type": "SshServer"}, "class_info": {"name": "KerberizedSshServer", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "member...
2698192_2
class Throwables2 { public static String explain(final Throwable throwable) { checkNotNull(throwable); StringBuilder buff = new StringBuilder(); explain(buff, throwable); Throwable cause = throwable; while ((cause = cause.getCause()) != null) { buff.append(", caused by: "); explain(...
String msg = Throwables2.explain(new RuntimeException("foo")); log(msg); assertThat(msg, is("java.lang.RuntimeException: foo")); } }
[FOCAL] public static String Throwables2.explain(Throwable throwable) [CLASS] class Throwables2 [METRICS] loc=14 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] void explain(StringBuilder buff, Throwable throwable) [CALLS-EXTERNAL] checkNotNull/1 (inherited), Throwable.getCause/0, StringBuilder.ap...
/* static context [FOCAL] public static String Throwables2.explain(Throwable throwable) [PATH1] while((cause = cause.getCause()) != null)=T -> exit loop -> return buff.toString() [PATH2] while((cause = cause.getCause()) != null)=F -> return buff.toString() [INPUTS] branches=throwable | result=- [CALLS-INTERNAL] void ex...
/* static context [FOCAL] public static String Throwables2.explain(Throwable throwable) [PATH1] while((cause = cause.getCause()) != null)=T -> exit loop -> return buff.toString() [PATH2] while((cause = cause.getCause()) != null)=F -> return buff.toString() [INPUTS] branches=throwable | result=- [CALLS-INTERNAL] void ex...
true
ok
{"focal": {"class": "Throwables2", "name": "explain", "signature": "String explain(Throwable throwable)", "start_line": 3, "modifiers": "public static", "params": [{"name": "throwable", "type": "Throwable"}], "return_type": "String"}, "class_info": {"name": "Throwables2", "kind": "class", "modifiers": "", "superclass":...
2708082_94
class DecisionPath extends DecisionMaker implements Serializable { public void pushDecision(Decision decision) { int p = last.get(); decision.setPosition(p); if(decisions.size() == p){ decisions.add(decision); }else if(decisions.size() == p + 1) { decisions.s...
Assert.assertEquals(dp.size(), 1); Assert.assertEquals(dp.last.get(), 1); IntDecision d1 = dp.makeIntDecision(vars[0], DecisionOperatorFactory.makeIntEq(), 4); dp.pushDecision(d1); Assert.assertEquals(d1.getPosition(), 1); Assert.assertEquals(dp.size(), 2); Assert...
[FOCAL] public void DecisionPath.pushDecision(Decision decision) [CLASS] class DecisionPath extends DecisionMaker implements Serializable [METRICS] loc=9 cc=3 branches=2 loops=0 returns=0 throws=1 nesting=2 [CALLS-EXTERNAL] last.get/0, Decision.setPosition/1, decisions.size/0, decisions.add/1, decisions.set/2 [NEW] Sol...
/* static context [FOCAL] public void DecisionPath.pushDecision(Decision decision) [THROWS-WHEN] SolverException when !(decisions.size() == p) && !(decisions.size() == p + 1) [PATH1] if(decisions.size() == p)=F -> if(decisions.size() == p + 1)=F -> throw new SolverException("Cannot add decision to decision path") [PATH...
/* static context [FOCAL] public void DecisionPath.pushDecision(Decision decision) [THROWS-WHEN] SolverException when !(decisions.size() == p) && !(decisions.size() == p + 1) [PATH1] if(decisions.size() == p)=F -> if(decisions.size() == p + 1)=F -> throw new SolverException("Cannot add decision to decision path") [PATH...
true
ok
{"focal": {"class": "DecisionPath", "name": "pushDecision", "signature": "void pushDecision(Decision decision)", "start_line": 3, "modifiers": "public", "params": [{"name": "decision", "type": "Decision"}], "return_type": "void"}, "class_info": {"name": "DecisionPath", "kind": "class", "modifiers": "", "superclass": "D...
2708789_0
class HelloWorldTasklet implements Tasklet { @Override public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { // why not using println? because it makes testing harder, *nix and // windows think different about ...
assertEquals(RepeatStatus.FINISHED, tasklet.execute(null, null)); // assert sysoutput assertEquals("Hello World!", outContent.toString()); } }
[FOCAL] @Override public RepeatStatus HelloWorldTasklet.execute(StepContribution contribution, ChunkContext chunkContext) [CLASS] class HelloWorldTasklet implements Tasklet [METRICS] loc=10 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] System.out.print/1 [EXCEPTIONS] declares Exception [INPUTS] ...
/* static context [FOCAL] @Override public RepeatStatus HelloWorldTasklet.execute(StepContribution contribution, ChunkContext chunkContext) [INPUTS] branches=- | result=- | unused=contribution, chunkContext [EXCEPTIONS] declares Exception [CALLS-EXTERNAL] System.out.print/1 */
/* static context [FOCAL] @Override public RepeatStatus HelloWorldTasklet.execute(StepContribution contribution, ChunkContext chunkContext) [INPUTS] branches=- | result=- | unused=contribution, chunkContext [EXCEPTIONS] declares Exception [CALLS-EXTERNAL] System.out.print/1 */ class HelloWorldTasklet implements Tasklet...
true
ok
{"focal": {"class": "HelloWorldTasklet", "name": "execute", "signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "contribution", "type": "StepContribution"}, {"name": "chunkContext", "type": ...
2710254_2
class YAMLUtils { public void loadSettings(String resourcePath, String defaultResourcePath, Object bean) { try { Map properties = loadSettings(resourcePath, defaultResourcePath); BeanUtils.populate(bean, properties); } catch (IllegalAccessException | InvocationTargetExceptio...
Map map = new HashMap(); new YAMLUtils().loadSettings("test.yml", "default-test.yml", map); Assert.assertNotNull(map); Assert.assertEquals(map.get("prop1"), 11); Assert.assertEquals(map.get("prop2"), "22"); Assert.assertEquals(map.get("prop3"), 3); } }
[FOCAL] public void YAMLUtils.loadSettings(String resourcePath, String defaultResourcePath, Object bean) [CLASS] class YAMLUtils [METRICS] loc=8 cc=2 branches=0 loops=0 returns=0 throws=1 nesting=1 [CALLS-INTERNAL] void loadSettings(String resourcePath, Object bean) [CALLS-EXTERNAL] BeanUtils.populate/2 [NEW] IllegalSt...
/* static context [FOCAL] public void YAMLUtils.loadSettings(String resourcePath, String defaultResourcePath, Object bean) [THROWS-WHEN] IllegalStateException when try-body throws [PATH1] try-body throws -> throw new IllegalStateException(e) [EXCEPTIONS] throws IllegalStateException; catches IllegalAccessException | In...
/* static context [FOCAL] public void YAMLUtils.loadSettings(String resourcePath, String defaultResourcePath, Object bean) [THROWS-WHEN] IllegalStateException when try-body throws [PATH1] try-body throws -> throw new IllegalStateException(e) [EXCEPTIONS] throws IllegalStateException; catches IllegalAccessException | In...
true
ok
{"focal": {"class": "YAMLUtils", "name": "loadSettings", "signature": "void loadSettings(String resourcePath, String defaultResourcePath, Object bean)", "start_line": 3, "modifiers": "public", "params": [{"name": "resourcePath", "type": "String"}, {"name": "defaultResourcePath", "type": "String"}, {"name": "bean", "typ...
2719141_12
class FileManipulator { public boolean contentEquals( String src, String dest ) throws FileManipulatorException { FileObject srcFile = null; FileObject destFile = null; try { LOGGER.debug( "Comparing the content of {} and {}", src, dest ); srcFile...
assertEquals( true, fileManipulator.contentEquals( "http://localhost:" + port + "/repos/asf/incubator/kalumet/trunk/LICENSE", "http://localhost:" + port + "/repos/asf/incubator/kalumet/trunk/LICENSE" ) ); } }
[FOCAL] public boolean FileManipulator.contentEquals(String src, String dest) [CLASS] class FileManipulator [METRICS] loc=59 cc=9 branches=5 loops=0 returns=2 throws=3 nesting=3 [CALLS-INTERNAL] FileObject resolveFile(String vfsPath) [CALLS-EXTERNAL] LOGGER.debug/3, FileObject.exists/0, srcFile.getType().equals/1, File...
/* static context [FOCAL] public boolean FileManipulator.contentEquals(String src, String dest) [PATH1] if(!srcFile.exists() || !destFile.exists())=F -> if(!srcFile.getType().equals( FileType.FILE ))=F -> if(!destFile.getType().equals( FileType.FILE ))=T -> throw new IllegalArgumentException( "The destination URI " + d...
/* static context [FOCAL] public boolean FileManipulator.contentEquals(String src, String dest) [PATH1] if(!srcFile.exists() || !destFile.exists())=F -> if(!srcFile.getType().equals( FileType.FILE ))=F -> if(!destFile.getType().equals( FileType.FILE ))=T -> throw new IllegalArgumentException( "The destination URI " + d...
true
ok
{"focal": {"class": "FileManipulator", "name": "contentEquals", "signature": "boolean contentEquals(String src, String dest) throws FileManipulatorException", "start_line": 3, "modifiers": "public", "params": [{"name": "src", "type": "String"}, {"name": "dest", "type": "String"}], "return_type": "boolean"}, "class_info...
2737689_92
class PYamlObject extends PAbstractObject { public final PJsonObject toJSON() { try { JSONObject json = new JSONObject(); for (String key: this.obj.keySet()) { Object opt = opt(key); if (opt instanceof PYamlObject) { opt = ((PYamlO...
Map<String, Object> map = new HashMap<>(); map.put("att1", 1); map.put("att2", new Object[]{1, 2}); Map<String, Object> embedded = new HashMap<>(); embedded.put("embeddedAtt1", true); Map<String, Object> embeddedEmbedded = new HashMap<>(); embeddedEmbedded.put("e...
[FOCAL] public final PJsonObject PYamlObject.toJSON() [CLASS] class PYamlObject extends PAbstractObject [METRICS] loc=17 cc=5 branches=2 loops=1 returns=1 throws=1 nesting=4 [CALLS-INTERNAL] Object opt(String key) [CALLS-EXTERNAL] this.obj.keySet/0, ((PYamlObject) opt).toJSON().getInternalObj/0, ((PYamlObject) opt).toJ...
/* static context [FOCAL] public final PJsonObject PYamlObject.toJSON() [THROWS-WHEN] ExceptionUtils.getRuntimeException(e) when try-body throws [PATH1] foreach(String key : this.obj.keySet())=T -> if(opt instanceof PYamlObject)=F -> if(opt instanceof PYamlArray)=T -> exit loop -> return new PJsonObject(json, this.getC...
/* static context [FOCAL] public final PJsonObject PYamlObject.toJSON() [THROWS-WHEN] ExceptionUtils.getRuntimeException(e) when try-body throws [PATH1] foreach(String key : this.obj.keySet())=T -> if(opt instanceof PYamlObject)=F -> if(opt instanceof PYamlArray)=T -> exit loop -> return new PJsonObject(json, this.getC...
true
ok
{"focal": {"class": "PYamlObject", "name": "toJSON", "signature": "PJsonObject toJSON()", "start_line": 3, "modifiers": "public final", "params": [], "return_type": "PJsonObject"}, "class_info": {"name": "PYamlObject", "kind": "class", "modifiers": "", "superclass": "PAbstractObject", "interfaces": null, "fields": [], ...
2740148_425
class BilouCodec implements SequenceCodec<String> { @Override public boolean areOutcomesCompatible(String[] outcomes) { Set<String> start = new HashSet<>(); Set<String> cont = new HashSet<>(); Set<String> last = new HashSet<>(); Set<String> unit = new HashSet<>(); for (int i = 0; i < outcomes....
Assert.assertFalse(codec.areOutcomesCompatible(new String[] {B_START, B_CONTINUE})); Assert.assertFalse(codec.areOutcomesCompatible(new String[] {A_UNIT, B_START, B_CONTINUE})); Assert.assertFalse(codec.areOutcomesCompatible(new String[] {A_START, A_LAST, B_START, B_CONTINUE})); } }
[FOCAL] @Override public boolean BilouCodec.areOutcomesCompatible(String[] outcomes) [CLASS] class BilouCodec implements SequenceCodec<String> [METRICS] loc=52 cc=14 branches=9 loops=4 returns=6 throws=0 nesting=6 [CALLS-EXTERNAL] String.endsWith/1, Set<String>.add/1, String.substring/2, String.length/0, BilouCodec.STA...
/* static context [FOCAL] @Override public boolean BilouCodec.areOutcomesCompatible(String[] outcomes) [PATH1] for(i < outcomes.length)=T -> if(outcome.endsWith(BilouCodec.START))=F -> if(outcome.endsWith(BilouCodec.CONTINUE))=T -> exit loop -> if(start.size() == 0 && unit.size() == 0)=F -> foreach(String startPrefix :...
/* static context [FOCAL] @Override public boolean BilouCodec.areOutcomesCompatible(String[] outcomes) [PATH1] for(i < outcomes.length)=T -> if(outcome.endsWith(BilouCodec.START))=F -> if(outcome.endsWith(BilouCodec.CONTINUE))=T -> exit loop -> if(start.size() == 0 && unit.size() == 0)=F -> foreach(String startPrefix :...
true
ok
{"focal": {"class": "BilouCodec", "name": "areOutcomesCompatible", "signature": "boolean areOutcomesCompatible(String[] outcomes)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "outcomes", "type": "String[]"}], "return_type": "boolean"}, "class_info": {"name": "BilouCodec", "kind": "class", "mo...