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
2742247_3
class InfinispanSessionManager extends ManagerBase { public String getCacheName(){ return this.cache.getName(); } @Override public String getInfo(); @Override public String getName(); @Override public void load(); @Override public void unload(); @Override protected synchronized voi...
InfinispanSessionManager managerOne = createSessionManager("zzz"); InfinispanSessionManager managerTwo = createSessionManager("zzz"); InfinispanSessionManager managerThree = createSessionManager("zzz"); assertEquals("tc_session_contextNamezzz", managerOne.getCacheName()); assert...
[FOCAL] public String InfinispanSessionManager.getCacheName() [CLASS] class InfinispanSessionManager extends ManagerBase [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] this.cache.getName/0 [FIELDS] read=cache [COLLABORATORS] field cache getName/0 [CLASS-MEMBERS] String getInfo(); ...
/* static context [FOCAL] public String InfinispanSessionManager.getCacheName() [COLLABORATORS] field cache getName/0 [FIELDS] read=cache [CALLS-EXTERNAL] this.cache.getName/0 */
/* static context [FOCAL] public String InfinispanSessionManager.getCacheName() [COLLABORATORS] field cache getName/0 [FIELDS] read=cache [CALLS-EXTERNAL] this.cache.getName/0 */ class InfinispanSessionManager extends ManagerBase { public String getCacheName(){ return this.cache.getName(); } @Over...
true
ok
{"focal": {"class": "InfinispanSessionManager", "name": "getCacheName", "signature": "String getCacheName()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "InfinispanSessionManager", "kind": "class", "modifiers": "", "superclass": "ManagerBase", "interfaces": nu...
2747986_8
class SOAPMailSender extends MailSender { public MimeMessage createMessage(String from, String to, String cc, String subject, SOAPMessage soapMessage) throws ConnectionException { return createMessage(from, to, cc, subject, soapMessage, createSession()); } public SOAPMailSender(String...
SOAPMessage soapMessage = null; MimeMessage mimeMsg = null; MimeHeaders mimeHeaders = new MimeHeaders(); InputStream contentStream = FIXTURE_LOADER.getResourceAsStream("mime_message_content.dat"); mimeHeaders.setHeader("Content-Type", "text/xml; charset=utf-8"); ...
[FOCAL] public MimeMessage SOAPMailSender.createMessage(String from, String to, String cc, String subject, SOAPMessage soapMessage) [CLASS] class SOAPMailSender extends MailSender [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] MimeMessage createMessage(String from, String to, Stri...
/* static context [FOCAL] public MimeMessage SOAPMailSender.createMessage(String from, String to, String cc, String subject, SOAPMessage soapMessage) [INPUTS] branches=- | result=cc, from, soapMessage, subject, to [EXCEPTIONS] declares ConnectionException [CALLS-INTERNAL] MimeMessage createMessage(String from, String t...
/* static context [FOCAL] public MimeMessage SOAPMailSender.createMessage(String from, String to, String cc, String subject, SOAPMessage soapMessage) [INPUTS] branches=- | result=cc, from, soapMessage, subject, to [EXCEPTIONS] declares ConnectionException [CALLS-INTERNAL] MimeMessage createMessage(String from, String t...
true
ok
{"focal": {"class": "SOAPMailSender", "name": "createMessage", "signature": "MimeMessage createMessage(String from, String to, String cc, String subject, SOAPMessage soapMessage) throws ConnectionException", "start_line": 3, "modifiers": "public", "params": [{"name": "from", "type": "String"}, {"name": "to", "type": "S...
2752522_464
class JTextReporter { public static Connection showDialog(String title) { return showDialog(title, null); } public static Connection showDialog(String title, String initialText); public static Connection showDialog(String title, String initialText, int flags); public static Connection show...
Connection conn = showDialog(TITLE, TEXT[0] + "\n").get(); final int N = 10; conn.appendSeparatorLine(N); char[] chars = new char[N]; Arrays.fill(chars, JTextReporter.DEFAULT_SEPARATOR_CHAR); String expected = String.format("%s%n%s%n", TEXT[0], String.valueOf(chars)); ...
[FOCAL] public static Connection JTextReporter.showDialog(String title) [CLASS] class JTextReporter [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Connection showDialog(String title, String initialText) [INPUTS] branches=- | result=title [DATAFLOW] title@param->L2 [CLASS-MEMBERS] ...
/* static context [FOCAL] public static Connection JTextReporter.showDialog(String title) [INPUTS] branches=- | result=title [CALLS-INTERNAL] Connection showDialog(String title, String initialText) */
/* static context [FOCAL] public static Connection JTextReporter.showDialog(String title) [INPUTS] branches=- | result=title [CALLS-INTERNAL] Connection showDialog(String title, String initialText) */ class JTextReporter { public static Connection showDialog(String title) { return showDialog(title, null); ...
true
ok
{"focal": {"class": "JTextReporter", "name": "showDialog", "signature": "Connection showDialog(String title)", "start_line": 3, "modifiers": "public static", "params": [{"name": "title", "type": "String"}], "return_type": "Connection"}, "class_info": {"name": "JTextReporter", "kind": "class", "modifiers": "", "supercla...
2755429_1
class NicoLiveSAXHandler extends DefaultHandler { public String innerText() { return sbuf.toString(); } public void start(String uri, String localName, String qName, Attributes attributes); @Override public final void startEleme...
SAXParser sax = SAXParserFactory.newInstance().newSAXParser(); sax.parse(in, new NicoLiveSAXHandler() { @Override public void end(String uri, String localName, String qName) { if (qName.equals("elem")) { assertThat(innerText(), is("content"));...
[FOCAL] public String NicoLiveSAXHandler.innerText() [CLASS] class NicoLiveSAXHandler extends DefaultHandler [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] sbuf.toString/0 [COLLABORATORS] field sbuf toString/0 [CLASS-MEMBERS] void start(String uri, String localName, String qName, ...
/* static context [FOCAL] public String NicoLiveSAXHandler.innerText() [COLLABORATORS] field sbuf toString/0 [CALLS-EXTERNAL] sbuf.toString/0 */
/* static context [FOCAL] public String NicoLiveSAXHandler.innerText() [COLLABORATORS] field sbuf toString/0 [CALLS-EXTERNAL] sbuf.toString/0 */ class NicoLiveSAXHandler extends DefaultHandler { public String innerText() { return sbuf.toString(); } public void start(String uri, ...
true
ok
{"focal": {"class": "NicoLiveSAXHandler", "name": "innerText", "signature": "String innerText()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "NicoLiveSAXHandler", "kind": "class", "modifiers": "", "superclass": "DefaultHandler", "interfaces": null, "fields": [...
2784782_5
class IconController extends ApiController { @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public HttpEntity raw(@PathVariable String icon) throws IOException { return raw(null, icon); } @Autowired public IconController(GeoServer geoServer); @RequestMapping(value = "/...
MockGeoServer.get().catalog() .resources() .resource("workspaces/foo/styles/one.yaml", "title: raw") .directory("workspaces/foo/styles") .resource("workspaces/foo/styles/icon.png", "PNG8") .resource("workspaces/foo/styles/symbols.TTF", "TTF") .directory(...
[FOCAL] @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public HttpEntity IconController.raw(String icon) [CLASS] class IconController extends ApiController [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] HttpEntity raw(String wsName, String icon) [EXCEPTIONS] dec...
/* static context [FOCAL] @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public HttpEntity IconController.raw(String icon) [INPUTS] branches=- | result=icon [EXCEPTIONS] declares IOException [CALLS-INTERNAL] HttpEntity raw(String wsName, String icon) */
/* static context [FOCAL] @RequestMapping(value = "/{icon:.+}", method = RequestMethod.GET) public HttpEntity IconController.raw(String icon) [INPUTS] branches=- | result=icon [EXCEPTIONS] declares IOException [CALLS-INTERNAL] HttpEntity raw(String wsName, String icon) */ class IconController extends ApiController { ...
true
ok
{"focal": {"class": "IconController", "name": "raw", "signature": "HttpEntity raw(String icon) throws IOException", "start_line": 3, "modifiers": "@RequestMapping(value = \"/{icon:.+}\", method = RequestMethod.GET) public", "params": [{"name": "icon", "type": "String"}], "return_type": "HttpEntity"}, "class_info": {"na...
2791813_183
class ParalysisEffect implements Effect { @Override public boolean appliesTo(Character caster, Character target) { if (target.isDead()) { return false; } return true; } @Override public void apply(Character caster, Character target); @Override public boolean appliesTo(Character caster, WorldObject wo...
final Character caster = mock(Character.class); final Character deadTarget = mock(Character.class); when(deadTarget.isDead()).thenReturn(Boolean.TRUE); final Character aliveTarget = mock(Character.class); // Paralyzing a dead char is invalid. assertFalse(paralysisEffect.appliesTo(caster, deadTarget)); /...
[FOCAL] @Override public boolean ParalysisEffect.appliesTo(Character caster, Character target) [CLASS] class ParalysisEffect implements Effect [METRICS] loc=8 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] Character.isDead/0 [PATH1] if(target.isDead())=T -> return false [PATH2] if(target.isDead()...
/* static context [FOCAL] @Override public boolean ParalysisEffect.appliesTo(Character caster, Character target) [PATH1] if(target.isDead())=T -> return false [PATH2] if(target.isDead())=F -> return true [INPUTS] branches=target | result=- | unused=caster [CALLS-EXTERNAL] Character.isDead/0 */
/* static context [FOCAL] @Override public boolean ParalysisEffect.appliesTo(Character caster, Character target) [PATH1] if(target.isDead())=T -> return false [PATH2] if(target.isDead())=F -> return true [INPUTS] branches=target | result=- | unused=caster [CALLS-EXTERNAL] Character.isDead/0 */ class ParalysisEffect imp...
true
ok
{"focal": {"class": "ParalysisEffect", "name": "appliesTo", "signature": "boolean appliesTo(Character caster, Character target)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "caster", "type": "Character"}, {"name": "target", "type": "Character"}], "return_type": "boolean"}, "class_info": {"nam...
2803695_0
class CoherenceCacheProvider implements CachingProvider { @Override public boolean isSupported(OptionalFeature optionalFeature) { return false; } @Override public CacheManagerFactory getCacheManagerFactory(); } class CoherenceCacheProviderTest { @Test public void testIsSupported() {...
CachingProvider cacheProvider = getCachingProvider(); for (OptionalFeature feature: OptionalFeature.values()) { assertFalse(cacheProvider.isSupported(feature)); } } }
[FOCAL] @Override public boolean CoherenceCacheProvider.isSupported(OptionalFeature optionalFeature) [CLASS] class CoherenceCacheProvider implements CachingProvider [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=- | unused=optionalFeature [CLASS-MEMBERS] CacheManagerFa...
/* static context [FOCAL] @Override public boolean CoherenceCacheProvider.isSupported(OptionalFeature optionalFeature) [INPUTS] branches=- | result=- | unused=optionalFeature */
/* static context [FOCAL] @Override public boolean CoherenceCacheProvider.isSupported(OptionalFeature optionalFeature) [INPUTS] branches=- | result=- | unused=optionalFeature */ class CoherenceCacheProvider implements CachingProvider { @Override public boolean isSupported(OptionalFeature optionalFeature) { ...
true
ok
{"focal": {"class": "CoherenceCacheProvider", "name": "isSupported", "signature": "boolean isSupported(OptionalFeature optionalFeature)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "optionalFeature", "type": "OptionalFeature"}], "return_type": "boolean"}, "class_info": {"name": "CoherenceCach...
2818491_3
class AnnotationDetector { public void detect() throws IOException { detect(new ClassFileIterator()); } public AnnotationDetector(final Reporter reporter); public void detect(final String... packageNames); public void detect(final File... filesOrDirectories); private File toFile(fina...
final long time = System.currentTimeMillis(); @SuppressWarnings("unchecked") final CountingReporter counter = new CountingReporter(Test.class); final AnnotationDetector cf = new AnnotationDetector(counter); cf.detect("eu.infomas"); // only this package and sub package(s) are sca...
[FOCAL] public void AnnotationDetector.detect() [CLASS] class AnnotationDetector [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void detect(String... packageNames) [NEW] ClassFileIterator [EXCEPTIONS] declares IOException [CLASS-MEMBERS] AnnotationDetector(Reporter reporter); void...
/* static context [FOCAL] public void AnnotationDetector.detect() [EXCEPTIONS] declares IOException [CALLS-INTERNAL] void detect(String... packageNames) [NEW] ClassFileIterator */
/* static context [FOCAL] public void AnnotationDetector.detect() [EXCEPTIONS] declares IOException [CALLS-INTERNAL] void detect(String... packageNames) [NEW] ClassFileIterator */ class AnnotationDetector { public void detect() throws IOException { detect(new ClassFileIterator()); } public Annota...
true
ok
{"focal": {"class": "AnnotationDetector", "name": "detect", "signature": "void detect() throws IOException", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "AnnotationDetector", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"n...
2845921_1
class Calculator { public void enter(char c) { switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': state.processDigit(c); break; case '.': state.processDot(); ...
try { calculator.enter('A'); throw new AssertionFailureNotDetectedError(); } catch (IllegalArgumentException e) { assertEquals(e.getMessage(), "Character 'A' is not supported"); } } }
[FOCAL] public void Calculator.enter(char c) [CLASS] class Calculator [METRICS] loc=33 cc=18 branches=1 loops=0 returns=0 throws=1 nesting=1 [CALLS-EXTERNAL] state.processDigit/1, state.processDot/0, state.processOperator/1, state.processEquals/0 [NEW] EnteringFirstOperandState, IllegalArgumentException [EXCEPTIONS] th...
/* static context [FOCAL] public void Calculator.enter(char c) [THROWS-WHEN] IllegalArgumentException when switch(c)=default [PATH1] switch(c)=default -> throw new IllegalArgumentException("Character '" + c + "' is not supported") [PATH2] switch(c)=case '9' [PATH3] switch(c)=case '8' [PATH4] switch(c)=case '7' [PATH5] ...
/* static context [FOCAL] public void Calculator.enter(char c) [THROWS-WHEN] IllegalArgumentException when switch(c)=default [PATH1] switch(c)=default -> throw new IllegalArgumentException("Character '" + c + "' is not supported") [PATH2] switch(c)=case '9' [PATH3] switch(c)=case '8' [PATH4] switch(c)=case '7' [PATH5] ...
true
ok
{"focal": {"class": "Calculator", "name": "enter", "signature": "void enter(char c)", "start_line": 3, "modifiers": "public", "params": [{"name": "c", "type": "char"}], "return_type": "void"}, "class_info": {"name": "Calculator", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"nam...
2851858_9
class CheckBoxPropertyEditor extends AbstractFormComponentPropertyEditor { public static PropertyEditorProvider getProvider() { return PROVIDER; } public CheckBoxPropertyEditor(String id, PropertyMetaData propertyMetaData, CheckBox checkBox); @Override public void required(boolean required);...
BeanMetaData beanMetaData = Wicketopia.get().getBeanMetaData(EditableBean.class); EditableBean bean = new EditableBean(); final IModel<Boolean> model = new PropertyModel<Boolean>(bean, "bool"); bean.setBool(true); Context context = new Context(Context.CREATE); EditorBuild...
[FOCAL] public static PropertyEditorProvider CheckBoxPropertyEditor.getProvider() [CLASS] class CheckBoxPropertyEditor extends AbstractFormComponentPropertyEditor [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] CheckBoxPropertyEditor(String id, PropertyMetaData propertyMetaData, Che...
/* static context [FOCAL] public static PropertyEditorProvider CheckBoxPropertyEditor.getProvider() */
/* static context [FOCAL] public static PropertyEditorProvider CheckBoxPropertyEditor.getProvider() */ class CheckBoxPropertyEditor extends AbstractFormComponentPropertyEditor { public static PropertyEditorProvider getProvider() { return PROVIDER; } public CheckBoxPropertyEditor(String id, Proper...
true
ok
{"focal": {"class": "CheckBoxPropertyEditor", "name": "getProvider", "signature": "PropertyEditorProvider getProvider()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "PropertyEditorProvider"}, "class_info": {"name": "CheckBoxPropertyEditor", "kind": "class", "modifiers": "", "superclass"...
2854377_35
class PartnerConnectionImpl extends AbstractSalesforceConnection implements PartnerConnection { @Nonnull @Override public synchronized List<SObject> retrieve(@Nonnull String sObjectType, @Nonnull List<Id> ids, @Nonnull List<String> fieldList) throws ApiException { logger.entry(sObjectTy...
List<Id> ids = new ArrayList<Id>(); ids.add(new Id("0035000000km1oh")); List<SObject> results = this.conn.retrieve("Contact", ids, Arrays.asList("FirstName", "LastName")); assertEquals(1, results.size()); SObject contact = results.get(0); assertEquals("0035000000km1oh", ...
[FOCAL] @Nonnull @Override public synchronized List<SObject> PartnerConnectionImpl.retrieve(String sObjectType, List<Id> ids, List<String> fieldList) [CLASS] class PartnerConnectionImpl extends AbstractSalesforceConnection implements PartnerConnection [METRICS] loc=31 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=...
/* static context [FOCAL] @Nonnull @Override public synchronized List<SObject> PartnerConnectionImpl.retrieve(String sObjectType, List<Id> ids, List<String> fieldList) [PATH1] foreach(Id id : ids)=T -> exit loop -> return new ArrayList<SObject>(facadeSObjects) [PATH2] foreach(Id id : ids)=F -> return new ArrayList<SObj...
/* static context [FOCAL] @Nonnull @Override public synchronized List<SObject> PartnerConnectionImpl.retrieve(String sObjectType, List<Id> ids, List<String> fieldList) [PATH1] foreach(Id id : ids)=T -> exit loop -> return new ArrayList<SObject>(facadeSObjects) [PATH2] foreach(Id id : ids)=F -> return new ArrayList<SObj...
true
ok
{"focal": {"class": "PartnerConnectionImpl", "name": "retrieve", "signature": "List<SObject> retrieve(String sObjectType, List<Id> ids, List<String> fieldList) throws ApiException", "start_line": 3, "modifiers": "@Nonnull @Override public synchronized", "params": [{"name": "sObjectType", "type": "String"}, {"name": "id...
2858655_84
class FeatureServiceReflectionFactory extends AbstractFeatureServiceFactory { protected Environment getEnvironment(final Properties properties, String... packagesToSearch) { final Environment environment = new Environment(); if (properties != null) { environment.setProperti...
Environment environment = factory.getEnvironment(null, "com.tacitknowledge.flip.fixtures", "com.tacitknowledge.flip.otherfixtures"); assertNotNull(environment); Assert.assertTrue(environment.getProperties().isEmpty()); assertTrue(isListHasItemOfType(environment.getPrope...
[FOCAL] protected Environment FeatureServiceReflectionFactory.getEnvironment(Properties properties, String... packagesToSearch) [CLASS] class FeatureServiceReflectionFactory extends AbstractFeatureServiceFactory [METRICS] loc=23 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] Environment.setProper...
/* static context [FOCAL] protected Environment FeatureServiceReflectionFactory.getEnvironment(Properties properties, String... packagesToSearch) [PATH1] if(properties != null)=T -> return environment [PATH2] if(properties != null)=F -> return environment [INPUTS] branches=properties | result=- [NEW] Environment, Servi...
/* static context [FOCAL] protected Environment FeatureServiceReflectionFactory.getEnvironment(Properties properties, String... packagesToSearch) [PATH1] if(properties != null)=T -> return environment [PATH2] if(properties != null)=F -> return environment [INPUTS] branches=properties | result=- [NEW] Environment, Servi...
true
ok
{"focal": {"class": "FeatureServiceReflectionFactory", "name": "getEnvironment", "signature": "Environment getEnvironment(Properties properties, String... packagesToSearch)", "start_line": 3, "modifiers": "protected", "params": [{"name": "properties", "type": "Properties"}, {"name": "packagesToSearch", "type": "String....
2874089_0
class XMLUtils { public static boolean validate( File f ) { try { SAXParser parser = factory.newSAXParser(); parser.setProperty( Constants.XML_SCHEMA_PROPERTY, Constants.XML_SCHEMA_LANGUAGE ); SimpleErrorHandler errorHandler = new SimpleErrorHandler(); SAXReader reader = new SAXReader( ...
boolean valid = XMLUtils.validate(new File("src/test/resources/valid.xml")); Assert.assertTrue(valid); } }
[FOCAL] public static boolean XMLUtils.validate(File f) [CLASS] class XMLUtils [METRICS] loc=27 cc=5 branches=0 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] factory.newSAXParser/0, SAXParser.setProperty/2, SAXParser.getXMLReader/0, SAXReader.setValidation/1, SAXReader.setErrorHandler/1, SAXReader.read/1, Simpl...
/* static context [FOCAL] public static boolean XMLUtils.validate(File f) [PATH1] try-body throws -> return false [PATH2] return errorHandler.isValid() [COLLABORATORS] field factory newSAXParser/0 [EXCEPTIONS] catches ParserConfigurationException e, SAXException e, DocumentException e, NullPointerException e [NEW] Simp...
/* static context [FOCAL] public static boolean XMLUtils.validate(File f) [PATH1] try-body throws -> return false [PATH2] return errorHandler.isValid() [COLLABORATORS] field factory newSAXParser/0 [EXCEPTIONS] catches ParserConfigurationException e, SAXException e, DocumentException e, NullPointerException e [NEW] Simp...
true
ok
{"focal": {"class": "XMLUtils", "name": "validate", "signature": "boolean validate(File f)", "start_line": 3, "modifiers": "public static", "params": [{"name": "f", "type": "File"}], "return_type": "boolean"}, "class_info": {"name": "XMLUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "...
2882681_1
class TrackingManager { public static Tracking search(String id) throws EncomendaZException { return search(id, null, null, null); } private static void validateParameters(String id); public static boolean isValidId(String id); public static Tracking search(String trackId, Integer start, Integer end, String cl...
Tracking tracking = TrackingManager.search("PB261442824BR"); assertTrue(tracking.isCompleted()); } }
[FOCAL] public static Tracking TrackingManager.search(String id) [CLASS] class TrackingManager [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Tracking search(String trackId, Integer start, Integer end, String clientId) [EXCEPTIONS] declares EncomendaZException [INPUTS] branches=- ...
/* static context [FOCAL] public static Tracking TrackingManager.search(String id) [INPUTS] branches=- | result=id [EXCEPTIONS] declares EncomendaZException [CALLS-INTERNAL] Tracking search(String trackId, Integer start, Integer end, String clientId) */
/* static context [FOCAL] public static Tracking TrackingManager.search(String id) [INPUTS] branches=- | result=id [EXCEPTIONS] declares EncomendaZException [CALLS-INTERNAL] Tracking search(String trackId, Integer start, Integer end, String clientId) */ class TrackingManager { public static Tracking search(String id)...
true
ok
{"focal": {"class": "TrackingManager", "name": "search", "signature": "Tracking search(String id) throws EncomendaZException", "start_line": 3, "modifiers": "public static", "params": [{"name": "id", "type": "String"}], "return_type": "Tracking"}, "class_info": {"name": "TrackingManager", "kind": "class", "modifiers": ...
2885102_12
class JSONDecoder { public JSONValue decode() { char current = reader.current(); if(current == Opener.OBJECT.sign) { return decodeObject(); } else if(current == Opener.STRING.sign) { return decodeString(); } else if(current == Opener.ARRAY.sign) { ...
JSONDecoder decoder = new JSONDecoder("[null,true,12,false,\"BLA\"]"); JSONValue result = decoder.decode(); TestCase.assertEquals("[null,true,12,false,\"BLA\"]", result.toJSON()); } }
[FOCAL] public JSONValue JSONDecoder.decode() [CLASS] class JSONDecoder [METRICS] loc=30 cc=8 branches=7 loops=0 returns=8 throws=0 nesting=7 [CALLS-INTERNAL] JSONArray decodeArray(); JSONBoolean decodeFalse(); JSONBoolean decodeTrue(); JSONNull decodeNull(); JSONNumber decodeNumber(); JSONObject decodeObject(); JSONSt...
/* static context [FOCAL] public JSONValue JSONDecoder.decode() [PATH1] if(current == Opener.OBJECT.sign)=F -> if(current == Opener.STRING.sign)=F -> if(current == Opener.ARRAY.sign)=F -> if(( Character.isDigit(current) || current == Opener.MINUS.sign || current == Opener.PLUS.sign || current == Opener.DOT....)=F -> if...
/* static context [FOCAL] public JSONValue JSONDecoder.decode() [PATH1] if(current == Opener.OBJECT.sign)=F -> if(current == Opener.STRING.sign)=F -> if(current == Opener.ARRAY.sign)=F -> if(( Character.isDigit(current) || current == Opener.MINUS.sign || current == Opener.PLUS.sign || current == Opener.DOT....)=F -> if...
true
ok
{"focal": {"class": "JSONDecoder", "name": "decode", "signature": "JSONValue decode()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "JSONValue"}, "class_info": {"name": "JSONDecoder", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "J...
2885902_8
class TriangulatingFaceReader implements ElementReader { @Override public ElementType getElementType() { return reader.getElementType(); } TriangulatingFaceReader(final ElementReader reader); @Override public int getCount(); @Override public Element readElement(); @Override publ...
ElementType type = new ElementType( "face", new ListProperty( DataType.UCHAR, "vertex_index", DataType.INT)); ElementReader reader = mock(ElementReader.class); when(reader.getElementType()).thenReturn(type); Triangulating...
[FOCAL] @Override public ElementType TriangulatingFaceReader.getElementType() [CLASS] class TriangulatingFaceReader implements ElementReader [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] reader.getElementType/0 [COLLABORATORS] field reader getElementType/0 [CLASS-MEMBERS] Triangu...
/* static context [FOCAL] @Override public ElementType TriangulatingFaceReader.getElementType() [COLLABORATORS] field reader getElementType/0 [CALLS-EXTERNAL] reader.getElementType/0 */
/* static context [FOCAL] @Override public ElementType TriangulatingFaceReader.getElementType() [COLLABORATORS] field reader getElementType/0 [CALLS-EXTERNAL] reader.getElementType/0 */ class TriangulatingFaceReader implements ElementReader { @Override public ElementType getElementType() { return reade...
true
ok
{"focal": {"class": "TriangulatingFaceReader", "name": "getElementType", "signature": "ElementType getElementType()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "ElementType"}, "class_info": {"name": "TriangulatingFaceReader", "kind": "class", "modifiers": "", "superclass": null, "in...
2899580_56
class AggregateSnapshotter extends AbstractSnapshotter { @SuppressWarnings("unchecked") @Override protected DomainEventMessage createSnapshot(Class<?> aggregateType, String aggregateIdentifier, DomainEventStream...
void testCreateSnapshot_AggregateMarkedDeletedWillNotGenerateSnapshot() { String aggregateIdentifier = UUID.randomUUID().toString(); DomainEventMessage firstEvent = new GenericDomainEventMessage<>("type", aggregateIdentifier, (long) 0, ...
[FOCAL] @SuppressWarnings("unchecked") @Override protected DomainEventMessage AggregateSnapshotter.createSnapshot(Class<?> aggregateType, String aggregateIdentifier, DomainEventStream eventStream) [CLASS] class AggregateSnapshotter extends AbstractSnapshotter [METRICS] loc=26 cc=3 branches=2 loops=0 returns=2 throws=1 ...
/* static context [FOCAL] @SuppressWarnings("unchecked") @Override protected DomainEventMessage AggregateSnapshotter.createSnapshot(Class<?> aggregateType, String aggregateIdentifier, DomainEventStream eventStream) [THROWS-WHEN] IllegalArgumentException when aggregateFactory == null [PATH1] if(aggregateFactory == null)...
/* static context [FOCAL] @SuppressWarnings("unchecked") @Override protected DomainEventMessage AggregateSnapshotter.createSnapshot(Class<?> aggregateType, String aggregateIdentifier, DomainEventStream eventStream) [THROWS-WHEN] IllegalArgumentException when aggregateFactory == null [PATH1] if(aggregateFactory == null)...
true
ok
{"focal": {"class": "AggregateSnapshotter", "name": "createSnapshot", "signature": "DomainEventMessage createSnapshot(Class<?> aggregateType, String aggregateIdentifier, DomainEventStream eventStream)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") @Override protected", "params": [{"name": "aggregateT...
2907398_1
class SendEmailTask implements DeferredTask { @Override public void run() { Properties props = new Properties(); Session session = Session.getDefaultInstance(props, null); Message message = new MimeMessage(session); try { if (email.getFromPersonal().equals(EmailBuil...
//given Email email = mock(Email.class); when(email.getFromAddress()).thenReturn("a@a.com"); when(email.getFromPersonal()).thenReturn("A Personal"); when(email.getTo()).thenReturn("b@b.com"); when(email.getReplyToAddress()).thenReturn("c@c.com"); Transport transpo...
[FOCAL] @Override public void SendEmailTask.run() [CLASS] class SendEmailTask implements DeferredTask [METRICS] loc=29 cc=5 branches=2 loops=0 returns=0 throws=0 nesting=2 [CALLS-EXTERNAL] Session.getDefaultInstance/2, email.getFromPersonal().equals/1, email.getFromPersonal/0, Message.setFrom/1, email.getFromAddress/0,...
/* static context [FOCAL] @Override public void SendEmailTask.run() [PATH1] if(email.getFromPersonal().equals(EmailBuilder.DEFAULT_PERSONAL))=T -> if(Strings.isNullOrEmpty(email.getReplyToAddress()))=T [PATH2] if(email.getFromPersonal().equals(EmailBuilder.DEFAULT_PERSONAL))=F -> if(Strings.isNullOrEmpty(email.getReply...
/* static context [FOCAL] @Override public void SendEmailTask.run() [PATH1] if(email.getFromPersonal().equals(EmailBuilder.DEFAULT_PERSONAL))=T -> if(Strings.isNullOrEmpty(email.getReplyToAddress()))=T [PATH2] if(email.getFromPersonal().equals(EmailBuilder.DEFAULT_PERSONAL))=F -> if(Strings.isNullOrEmpty(email.getReply...
true
ok
{"focal": {"class": "SendEmailTask", "name": "run", "signature": "void run()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "SendEmailTask", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "DeferredTask", "fields": [], "members": [{"n...
2916790_3
class PostgresKB implements KnowledgeBase { @Override public ResultSetCursor getOutgoingRelations(int[] instances) throws Exception { final StringBuilder b = new StringBuilder(); for (int i : instances) { b.append('('); b.append(i); b.append(')'); b.append(','); } String sql = "SELECT relatio...
Connection conn = pool.getConnection(); ResultSet rs = conn.createStatement().executeQuery( "SELECT uri FROM index_resources"); while (rs.next()) { String uriFromDB = rs.getString(1); int key = kb.getUriIndex(uriFromDB); RemoteCursor cursor = kb .getOutgoingRelations(new int[] { key }); whi...
[FOCAL] @Override public ResultSetCursor PostgresKB.getOutgoingRelations(int[] instances) [CLASS] class PostgresKB implements KnowledgeBase [METRICS] loc=23 cc=3 branches=0 loops=1 returns=1 throws=1 nesting=1 [CALLS-INTERNAL] ResultSet executeQuery(PreparedStatement stmt, String sql) [CALLS-EXTERNAL] StringBuilder.app...
/* static context [FOCAL] @Override public ResultSetCursor PostgresKB.getOutgoingRelations(int[] instances) [THROWS-WHEN] e when foreach(int i : instances)=T && try-body throws [THROWS-WHEN] e when foreach(int i : instances)=F && try-body throws [PATH1] foreach(int i : instances)=T -> exit loop -> try-body throws -> th...
/* static context [FOCAL] @Override public ResultSetCursor PostgresKB.getOutgoingRelations(int[] instances) [THROWS-WHEN] e when foreach(int i : instances)=T && try-body throws [THROWS-WHEN] e when foreach(int i : instances)=F && try-body throws [PATH1] foreach(int i : instances)=T -> exit loop -> try-body throws -> th...
true
ok
{"focal": {"class": "PostgresKB", "name": "getOutgoingRelations", "signature": "ResultSetCursor getOutgoingRelations(int[] instances) throws Exception", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "instances", "type": "int[]"}], "return_type": "ResultSetCursor"}, "class_info": {"name": "Postgr...
2928039_24
class NumberFormatTransformer extends Transformer { @SuppressWarnings("unchecked") public Object transformRow(Map<String, Object> row, Context context) { VariableResolver resolver = context.getVariableResolver(); for (Map<String, String> fld : context.getAllEntityFields()) { String style = resolver.r...
List fields = new ArrayList(); fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN, "inputs")); fields.add(AbstractDataImportHandlerTest.createMap(DataImporter.COLUMN, "outputs", RegexTransformer.SRC_COL_NAME, "inputs", NumberFormatTransformer.FORMAT_ST...
[FOCAL] @SuppressWarnings("unchecked") public Object NumberFormatTransformer.transformRow(Map<String, Object> row, Context context) [CLASS] class NumberFormatTransformer extends Transformer [METRICS] loc=54 cc=11 branches=6 loops=2 returns=1 throws=3 nesting=5 [CALLS-INTERNAL] Number process(String val, String style, L...
/* static context [FOCAL] @SuppressWarnings("unchecked") public Object NumberFormatTransformer.transformRow(Map<String, Object> row, Context context) [THROWS-WHEN] DataImportHandlerException when foreach(Map<String, String> fld : context.getAllEntityFields())=T && style != null && srcCol == null && localeStr != null &&...
/* static context [FOCAL] @SuppressWarnings("unchecked") public Object NumberFormatTransformer.transformRow(Map<String, Object> row, Context context) [THROWS-WHEN] DataImportHandlerException when foreach(Map<String, String> fld : context.getAllEntityFields())=T && style != null && srcCol == null && localeStr != null &&...
true
ok
{"focal": {"class": "NumberFormatTransformer", "name": "transformRow", "signature": "Object transformRow(Map<String, Object> row, Context context)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") public", "params": [{"name": "row", "type": "Map<String, Object>"}, {"name": "context", "type": "Context"}]...
2930574_3
class LocalStreamService extends AbstractService { Map<Path, Path> populateTrashCommitPaths(Set<FileStatus> trashSet) { // find trash paths Map<Path, Path> trashPaths = new TreeMap<Path, Path>(); Path trash = cluster.getTrashPathWithDateHour(); Iterator<FileStatus> it = trashSet.iterator(); while...
FileStatus[] status = new FileStatus[10]; String[] expectedstatus = new String[10]; status[0] = new FileStatus(20, false, 3, 23823, 2438232, new Path( "/databus/data/test1/testcluster1/test1-2012-08-29-07-09_00000")); status[1] = new FileStatus(20, false, 3, 23823, 2438232, new Path( ...
[FOCAL] Map<Path, Path> LocalStreamService.populateTrashCommitPaths(Set<FileStatus> trashSet) [CLASS] class LocalStreamService extends AbstractService [METRICS] loc=15 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] cluster.getTrashPathWithDateHour/0, Set<FileStatus>.iterator/0, Iterator<FileStatu...
class LocalStreamService extends AbstractService { Map<Path, Path> populateTrashCommitPaths(Set<FileStatus> trashSet) { // find trash paths Map<Path, Path> trashPaths = new TreeMap<Path, Path>(); Path trash = cluster.getTrashPathWithDateHour(); Iterator<FileStatus> it = trashSet.iterator(); while...
false
ok
{"focal": {"class": "LocalStreamService", "name": "populateTrashCommitPaths", "signature": "Map<Path, Path> populateTrashCommitPaths(Set<FileStatus> trashSet)", "start_line": 3, "modifiers": "", "params": [{"name": "trashSet", "type": "Set<FileStatus>"}], "return_type": "Map<Path, Path>"}, "class_info": {"name": "Local...
2934254_65
class OpenTSDBMessageFormatter { public Iterable<String> formatResults(Iterable<Result> results, final Server server) { return from(results).transformAndConcat(new Function<Result, List<String>>() { @Override public List<String> apply(Result input) { return formatResult(input, server); } }).toList(...
Map<String, String> tagMap; // Verify tag map with multiple values. tagMap = newHashMap(); tagMap.put("x-tag1-x", "x-tag1val-x"); tagMap.put("x-tag2-x", "x-tag2val-x"); tagMap.put("x-tag3-x", "x-tag3val-x"); OpenTSDBMessageFormatter formatter = new OpenTSDBMessageFormatter(ImmutableList.of("Type", ...
[FOCAL] public Iterable<String> OpenTSDBMessageFormatter.formatResults(Iterable<Result> results, Server server) [CLASS] class OpenTSDBMessageFormatter [METRICS] loc=10 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] List<String> formatResult(Result result, Server server) [CALLS-EXTERNAL] from(resu...
/* static context [FOCAL] public Iterable<String> OpenTSDBMessageFormatter.formatResults(Iterable<Result> results, Server server) [INPUTS] branches=- | result=results, server [CALLS-INTERNAL] List<String> formatResult(Result result, Server server) [NEW] Function<Result, List<String>> [CALLS-EXTERNAL] from(results).tran...
/* static context [FOCAL] public Iterable<String> OpenTSDBMessageFormatter.formatResults(Iterable<Result> results, Server server) [INPUTS] branches=- | result=results, server [CALLS-INTERNAL] List<String> formatResult(Result result, Server server) [NEW] Function<Result, List<String>> [CALLS-EXTERNAL] from(results).tran...
true
ok
{"focal": {"class": "OpenTSDBMessageFormatter", "name": "formatResults", "signature": "Iterable<String> formatResults(Iterable<Result> results, Server server)", "start_line": 3, "modifiers": "public", "params": [{"name": "results", "type": "Iterable<Result>"}, {"name": "server", "type": "Server"}], "return_type": "Iter...
2945916_56
class Fields { public static AddressListField cc(Address address) { return addressList0(FieldName.CC, Collections.singleton(address)); } private Fields(); public static MimeVersionField version(String ver); public static ContentTypeField contentType(String contentType); public static...
Mailbox mailbox1 = DefaultAddressParser.DEFAULT.parseMailbox("JD <john.doe@acme.org>"); Mailbox mailbox2 = DefaultAddressParser.DEFAULT.parseMailbox("jane.doe@example.org"); Mailbox mailbox3 = DefaultAddressParser.DEFAULT.parseMailbox("Mary Smith <mary@example.net>"); Group group = new G...
[FOCAL] public static AddressListField Fields.cc(Address address) [CLASS] class Fields [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] AddressListField addressList0(String fieldName, Iterable<? extends Address> addresses) [CALLS-EXTERNAL] Collections.singleton/1 [INPUTS] branches=-...
/* static context [FOCAL] public static AddressListField Fields.cc(Address address) [INPUTS] branches=- | result=address [CALLS-INTERNAL] AddressListField addressList0(String fieldName, Iterable<? extends Address> addresses) [CALLS-EXTERNAL] Collections.singleton/1 */
/* static context [FOCAL] public static AddressListField Fields.cc(Address address) [INPUTS] branches=- | result=address [CALLS-INTERNAL] AddressListField addressList0(String fieldName, Iterable<? extends Address> addresses) [CALLS-EXTERNAL] Collections.singleton/1 */ class Fields { public static AddressListField ...
true
ok
{"focal": {"class": "Fields", "name": "cc", "signature": "AddressListField cc(Address address)", "start_line": 3, "modifiers": "public static", "params": [{"name": "address", "type": "Address"}], "return_type": "AddressListField"}, "class_info": {"name": "Fields", "kind": "class", "modifiers": "", "superclass": null, "...
2948043_16
class LinksInjector { public void inject(Object entity, RESTServiceDiscovery restServiceDiscovery) { Field injectionField = findInjectionField(entity); if (injectionField == null) { return; } RESTServiceDiscovery fieldValue = null; try { injectionFie...
RESTServiceDiscovery initialLinks = new RESTServiceDiscovery(); initialLinks.addLink(URI.create("https://resteasy.github.io"), "resteasy"); EntityWithLinks entity = new EntityWithLinks(initialLinks); RESTServiceDiscovery newLinks = new RESTServiceDiscovery(); newLinks.addLink(UR...
[FOCAL] public void LinksInjector.inject(Object entity, RESTServiceDiscovery restServiceDiscovery) [CLASS] class LinksInjector [METRICS] loc=27 cc=5 branches=2 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] Field findInjectionField(Object entity) [CALLS-EXTERNAL] Field.setAccessible/1, Field.get/1, LogMessages.L...
/* static context [FOCAL] public void LinksInjector.inject(Object entity, RESTServiceDiscovery restServiceDiscovery) [PATH1] if(injectionField == null)=F -> try-body throws -> if(fieldValue == null)=T [PATH2] if(injectionField == null)=T -> return [PATH3] if(injectionField == null)=F -> if(fieldValue == null)=F [INPUTS...
/* static context [FOCAL] public void LinksInjector.inject(Object entity, RESTServiceDiscovery restServiceDiscovery) [PATH1] if(injectionField == null)=F -> try-body throws -> if(fieldValue == null)=T [PATH2] if(injectionField == null)=T -> return [PATH3] if(injectionField == null)=F -> if(fieldValue == null)=F [INPUTS...
true
ok
{"focal": {"class": "LinksInjector", "name": "inject", "signature": "void inject(Object entity, RESTServiceDiscovery restServiceDiscovery)", "start_line": 3, "modifiers": "public", "params": [{"name": "entity", "type": "Object"}, {"name": "restServiceDiscovery", "type": "RESTServiceDiscovery"}], "return_type": "void"},...
2964129_9
class SocketIOFrameHelper { public static String encodeJSONMessage(final long messageID, final String endPoint, final String data) { return SocketIOFrameGenerator.encode(FrameType.JSON, messageID, false, endPoint, data, null); } public static String encodeDisconnect(); public static String encodeDisconnect(fina...
String expected = "4:" + MSGID + ":" + ENDPOINT + ":" + JSONData; String result = SocketIOFrameHelper.encodeJSONMessage(MSGID, ENDPOINT, JSONData); assertTrue(result.equals(expected)); } }
[FOCAL] public static String SocketIOFrameHelper.encodeJSONMessage(long messageID, String endPoint, String data) [CLASS] class SocketIOFrameHelper [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] SocketIOFrameGenerator.encode/6 [INPUTS] branches=- | result=data, endPoint, messageID ...
/* static context [FOCAL] public static String SocketIOFrameHelper.encodeJSONMessage(long messageID, String endPoint, String data) [INPUTS] branches=- | result=data, endPoint, messageID [CALLS-EXTERNAL] SocketIOFrameGenerator.encode/6 */
/* static context [FOCAL] public static String SocketIOFrameHelper.encodeJSONMessage(long messageID, String endPoint, String data) [INPUTS] branches=- | result=data, endPoint, messageID [CALLS-EXTERNAL] SocketIOFrameGenerator.encode/6 */ class SocketIOFrameHelper { public static String encodeJSONMessage(final long me...
true
ok
{"focal": {"class": "SocketIOFrameHelper", "name": "encodeJSONMessage", "signature": "String encodeJSONMessage(long messageID, String endPoint, String data)", "start_line": 3, "modifiers": "public static", "params": [{"name": "messageID", "type": "long"}, {"name": "endPoint", "type": "String"}, {"name": "data", "type":...
2974683_0
class InputBytes extends ByteArrayInputStream implements Input { @Override public synchronized int read(long pos, byte[] b, int start, int len) throws IOException { this.pos = (int)pos; return read(b, start, len); } public InputBytes(byte[] data); public InputBytes(ByteBuffer data); @Overri...
Random random = new Random(); int length = random.nextInt(SIZE); byte[] data = new byte[length]; random.nextBytes(data); Input in = new InputBytes(data); for (int i = 0; i < COUNT; i++) { int p = random.nextInt(length); int l = Math.min(random.nextInt(SIZE/10), length-p); ...
[FOCAL] @Override public synchronized int InputBytes.read(long pos, byte[] b, int start, int len) [CLASS] class InputBytes extends ByteArrayInputStream implements Input [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] read/3 (inherited) [FIELDS] write=pos [EXCEPTIONS] declares IOExc...
/* static context [FOCAL] @Override public synchronized int InputBytes.read(long pos, byte[] b, int start, int len) [INPUTS] branches=- | result=b, len, start [STATE] pos [EXCEPTIONS] declares IOException [FIELDS] write=pos [CALLS-EXTERNAL] read/3 (inherited) */
/* static context [FOCAL] @Override public synchronized int InputBytes.read(long pos, byte[] b, int start, int len) [INPUTS] branches=- | result=b, len, start [STATE] pos [EXCEPTIONS] declares IOException [FIELDS] write=pos [CALLS-EXTERNAL] read/3 (inherited) */ class InputBytes extends ByteArrayInputStream implements ...
true
ok
{"focal": {"class": "InputBytes", "name": "read", "signature": "int read(long pos, byte[] b, int start, int len) throws IOException", "start_line": 3, "modifiers": "@Override public synchronized", "params": [{"name": "pos", "type": "long"}, {"name": "b", "type": "byte[]"}, {"name": "start", "type": "int"}, {"name": "le...
2978404_14
class JmsPropertyScanner { public void scan(Object object) { try { scan(object, "", false, new ArrayList<Object>()); } catch (JMSException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } ...
MapContainer pojo = new MapContainer(); scanner.scan(pojo); verify(visitor).visit("map", pojo, MapContainer.class.getField("map")); } }
[FOCAL] public void JmsPropertyScanner.scan(Object object) [CLASS] class JmsPropertyScanner [METRICS] loc=9 cc=3 branches=0 loops=0 returns=0 throws=2 nesting=1 [CALLS-INTERNAL] void scan(Object object, String string, boolean nestedAdd, List<Object> visited) [NEW] ArrayList<Object>, RuntimeException [EXCEPTIONS] throws...
/* static context [FOCAL] public void JmsPropertyScanner.scan(Object object) [THROWS-WHEN] RuntimeException when try-body throws [PATH1] try-body throws -> throw new RuntimeException(e) [EXCEPTIONS] throws RuntimeException; catches JMSException e, IllegalAccessException e [CALLS-INTERNAL] void scan(Object object, Strin...
/* static context [FOCAL] public void JmsPropertyScanner.scan(Object object) [THROWS-WHEN] RuntimeException when try-body throws [PATH1] try-body throws -> throw new RuntimeException(e) [EXCEPTIONS] throws RuntimeException; catches JMSException e, IllegalAccessException e [CALLS-INTERNAL] void scan(Object object, Strin...
true
ok
{"focal": {"class": "JmsPropertyScanner", "name": "scan", "signature": "void scan(Object object)", "start_line": 3, "modifiers": "public", "params": [{"name": "object", "type": "Object"}], "return_type": "void"}, "class_info": {"name": "JmsPropertyScanner", "kind": "class", "modifiers": "", "superclass": null, "interfa...
2988101_135
class ResetSchema { @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel run(DocumentModel target) throws OperationException { resetSchemaProperties(target); if (saveDocument) { target = session.saveDocument(target); if (save) { ...
String schema = "common"; assertTrue(target1.hasSchema(schema)); target1.setProperty(schema, "icon-expanded", "icon-expanded1"); target1.setProperty(schema, "icon", "icon1"); context.setInput(target1); OperationChain chain = new OperationChain("testSingleTargetFullSchem...
[FOCAL] @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel ResetSchema.run(DocumentModel target) [CLASS] class ResetSchema [METRICS] loc=11 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] void resetSchemaProperties(DocumentModel target) [CALLS-EXTERNAL] CoreSession.sav...
/* static context [FOCAL] @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel ResetSchema.run(DocumentModel target) [PATH1] if(saveDocument)=T -> if(save)=T -> return target [PATH2] if(saveDocument)=F -> return target [PATH3] if(saveDocument)=T -> if(save)=F -> return target [INPUTS] branche...
/* static context [FOCAL] @OperationMethod(collector = DocumentModelCollector.class) public DocumentModel ResetSchema.run(DocumentModel target) [PATH1] if(saveDocument)=T -> if(save)=T -> return target [PATH2] if(saveDocument)=F -> return target [PATH3] if(saveDocument)=T -> if(save)=F -> return target [INPUTS] branche...
true
ok
{"focal": {"class": "ResetSchema", "name": "run", "signature": "DocumentModel run(DocumentModel target) throws OperationException", "start_line": 3, "modifiers": "@OperationMethod(collector = DocumentModelCollector.class) public", "params": [{"name": "target", "type": "DocumentModel"}], "return_type": "DocumentModel"},...
2988709_13
class JenaGraph implements Graph { public void setNamespaces(Map<String, String> namespaces) { this.namespaces = namespaces; } @SuppressWarnings( { "ThrowableInstanceNeverThrown" }) protected static RuntimeException wrapException(Exception e); protected GraphConnection openGraph(); protect...
Map<String, String> namespaces = new HashMap<String, String>(); namespaces.put("dummy", "http://dummy"); boolean forceReload = false; Model jenaGraph = graph.openGraph(forceReload).getGraph(); Map<String, String> map = jenaGraph.getNsPrefixMap(); // old namespaces are ke...
[FOCAL] public void JenaGraph.setNamespaces(Map<String, String> namespaces) [CLASS] class JenaGraph implements Graph [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [FIELDS] write=namespaces [STATE] namespaces via getNamespaces() [DATAFLOW] namespaces@param->L2 [CLASS-MEMBERS] RuntimeException wrap...
/* static context [FOCAL] public void JenaGraph.setNamespaces(Map<String, String> namespaces) [STATE] namespaces via getNamespaces() [FIELDS] write=namespaces */
/* static context [FOCAL] public void JenaGraph.setNamespaces(Map<String, String> namespaces) [STATE] namespaces via getNamespaces() [FIELDS] write=namespaces */ class JenaGraph implements Graph { public void setNamespaces(Map<String, String> namespaces) { this.namespaces = namespaces; } @Suppress...
true
ok
{"focal": {"class": "JenaGraph", "name": "setNamespaces", "signature": "void setNamespaces(Map<String, String> namespaces)", "start_line": 3, "modifiers": "public", "params": [{"name": "namespaces", "type": "Map<String, String>"}], "return_type": "void"}, "class_info": {"name": "JenaGraph", "kind": "class", "modifiers"...
2988715_4
class NavTreeService extends DefaultComponent { public List<NavTreeDescriptor> getTreeDescriptors() { return registry.getTreeDescriptors(getDirectoryTreeService()); } @Override public void activate(ComponentContext context); @Override public void deactivate(ComponentContext context); @Over...
NavTreeService service = Framework.getLocalService(NavTreeService.class); assertNotNull(service); List<NavTreeDescriptor> descs = service.getTreeDescriptors(); assertEquals(2, descs.size()); NavTreeDescriptor desc = descs.get(0); assertEquals("/incl/tag_cloud.xhtml", de...
[FOCAL] public List<NavTreeDescriptor> NavTreeService.getTreeDescriptors() [CLASS] class NavTreeService extends DefaultComponent [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] DirectoryTreeService getDirectoryTreeService() [CALLS-EXTERNAL] registry.getTreeDescriptors/1 [COLLABORAT...
/* static context [FOCAL] public List<NavTreeDescriptor> NavTreeService.getTreeDescriptors() [COLLABORATORS] field registry getTreeDescriptors/1 [CALLS-INTERNAL] DirectoryTreeService getDirectoryTreeService() [CALLS-EXTERNAL] registry.getTreeDescriptors/1 */
/* static context [FOCAL] public List<NavTreeDescriptor> NavTreeService.getTreeDescriptors() [COLLABORATORS] field registry getTreeDescriptors/1 [CALLS-INTERNAL] DirectoryTreeService getDirectoryTreeService() [CALLS-EXTERNAL] registry.getTreeDescriptors/1 */ class NavTreeService extends DefaultComponent { public L...
true
ok
{"focal": {"class": "NavTreeService", "name": "getTreeDescriptors", "signature": "List<NavTreeDescriptor> getTreeDescriptors()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "List<NavTreeDescriptor>"}, "class_info": {"name": "NavTreeService", "kind": "class", "modifiers": "", "superclass": "Defa...
2988721_0
class PackageBuilder { public PackageBuilder() { def = new PackageDefinitionImpl(); platforms = new ArrayList<>(); dependencies = new ArrayList<>(); conflicts = new ArrayList<>(); provides = new ArrayList<>(); entries = new LinkedHashMap<>(); installForms = n...
PackageBuilder builder = new PackageBuilder(); builder.name("nuxeo-automation").version("5.3.2").type( PackageType.ADDON); builder.title("Nuxeo Automation").description( "The automation framework"); builder.platform("dm-5.3.2"); builder.dependency(...
[FOCAL] public PackageBuilder.PackageBuilder() [CLASS] class PackageBuilder [METRICS] loc=11 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [NEW] PackageDefinitionImpl, ArrayList<>, LinkedHashMap<> [CLASS-MEMBERS] PackageBuilder(); PackageBuilder name(String name); PackageBuilder version(Version version); Package...
/* static context [FOCAL] public PackageBuilder.PackageBuilder() [NEW] PackageDefinitionImpl, ArrayList<>, LinkedHashMap<> */
/* static context [FOCAL] public PackageBuilder.PackageBuilder() [NEW] PackageDefinitionImpl, ArrayList<>, LinkedHashMap<> */ class PackageBuilder { public PackageBuilder() { def = new PackageDefinitionImpl(); platforms = new ArrayList<>(); dependencies = new ArrayList<>(); conflict...
true
ok
{"focal": {"class": "PackageBuilder", "name": "PackageBuilder", "signature": "PackageBuilder()", "start_line": 3, "modifiers": "public", "params": [], "return_type": null}, "class_info": {"name": "PackageBuilder", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name...
2988725_41
class LDAPSession extends BaseSession implements EntrySource { @Override public DocumentModelList getEntries() throws DirectoryException { try { SearchControls scts = directory.getSearchControls(); if (log.isDebugEnabled()) { log.debug(String.format( ...
Session session = getLDAPDirectory("userDirectory").getSession(); try { DocumentModelList entries = session.getEntries(); assertNotNull(entries); assertEquals(4, entries.size()); List<String> entryIds = new ArrayList<String>(); for (DocumentMod...
[FOCAL] @Override public DocumentModelList LDAPSession.getEntries() [CLASS] class LDAPSession extends BaseSession implements EntrySource [METRICS] loc=20 cc=4 branches=1 loops=0 returns=1 throws=2 nesting=2 [CALLS-INTERNAL] DocumentModelList ldapResultsToDocumentModels(NamingEnumeration<SearchResult> results, boolean f...
/* static context [FOCAL] @Override public DocumentModelList LDAPSession.getEntries() [THROWS-WHEN] org.nuxeo.ecm.directory.SizeLimitExceededException when try-body throws [THROWS-WHEN] DirectoryException when try-body throws [PATH1] try-body throws -> throw new org.nuxeo.ecm.directory.SizeLimitExceededException(e) [PA...
/* static context [FOCAL] @Override public DocumentModelList LDAPSession.getEntries() [THROWS-WHEN] org.nuxeo.ecm.directory.SizeLimitExceededException when try-body throws [THROWS-WHEN] DirectoryException when try-body throws [PATH1] try-body throws -> throw new org.nuxeo.ecm.directory.SizeLimitExceededException(e) [PA...
true
ok
{"focal": {"class": "LDAPSession", "name": "getEntries", "signature": "DocumentModelList getEntries() throws DirectoryException", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "DocumentModelList"}, "class_info": {"name": "LDAPSession", "kind": "class", "modifiers": "", "superclass": "Ba...
2989006_0
class SampleOperation { @OperationMethod public DocumentModel run() { if (StringUtils.isBlank(path)) { return session.getRootDocument(); } else { return session.getDocument(new PathRef(path)); } } @Inject protected CoreSession session; @Inject ...
OperationContext ctx = new OperationContext(session); DocumentModel doc = (DocumentModel) automationService.run(ctx, SampleOperation.ID); assertEquals("/", doc.getPathAsString()); } }
[FOCAL] @OperationMethod public DocumentModel SampleOperation.run() [CLASS] class SampleOperation [METRICS] loc=8 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] StringUtils.isBlank/1, CoreSession.getRootDocument/0, CoreSession.getDocument/1 [NEW] PathRef [FIELDS] read=session:CoreSession [PATH1] ...
/* static context [FOCAL] @OperationMethod public DocumentModel SampleOperation.run() [PATH1] if(StringUtils.isBlank(path))=T -> return session.getRootDocument() [PATH2] if(StringUtils.isBlank(path))=F -> return session.getDocument(new PathRef(path)) [INPUTS] branches=- | result=session [COLLABORATORS] field session:Co...
/* static context [FOCAL] @OperationMethod public DocumentModel SampleOperation.run() [PATH1] if(StringUtils.isBlank(path))=T -> return session.getRootDocument() [PATH2] if(StringUtils.isBlank(path))=F -> return session.getDocument(new PathRef(path)) [INPUTS] branches=- | result=session [COLLABORATORS] field session:Co...
true
ok
{"focal": {"class": "SampleOperation", "name": "run", "signature": "DocumentModel run()", "start_line": 3, "modifiers": "@OperationMethod public", "params": [], "return_type": "DocumentModel"}, "class_info": {"name": "SampleOperation", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": ...
2990192_10
class SkippingOutputStream extends FilterOutputStream { public void write(int b) throws IOException { if (toSkip > 0) { toSkip--; } else { out.write(b); } } public SkippingOutputStream(long toSkip, OutputStream wrapped); public void write(byte[] b); public void write(byte[] b, int ...
// GIVEN byte[] expected = new byte[]{1, 2, 3, 4, 5}; SkippingOutputStream testSubject = new SkippingOutputStream(0, outputStream); // WHEN testSubject.write(expected, 1, 3); // THEN assertEquals(3, outputStream.toByteArray().length); assertArrayEquals(new byte[]{2, 3,...
[FOCAL] public void SkippingOutputStream.write(int b) [CLASS] class SkippingOutputStream extends FilterOutputStream [METRICS] loc=7 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] out.write/1 [EXCEPTIONS] declares IOException [PATH1] if(toSkip > 0)=T [PATH2] if(toSkip > 0)=F [COLLABORATORS] field ...
/* static context [FOCAL] public void SkippingOutputStream.write(int b) [PATH1] if(toSkip > 0)=T [PATH2] if(toSkip > 0)=F [COLLABORATORS] field out write/1 [EXCEPTIONS] declares IOException [CALLS-EXTERNAL] out.write/1 */
/* static context [FOCAL] public void SkippingOutputStream.write(int b) [PATH1] if(toSkip > 0)=T [PATH2] if(toSkip > 0)=F [COLLABORATORS] field out write/1 [EXCEPTIONS] declares IOException [CALLS-EXTERNAL] out.write/1 */ class SkippingOutputStream extends FilterOutputStream { public void write(int b) throws IOExcep...
true
ok
{"focal": {"class": "SkippingOutputStream", "name": "write", "signature": "void write(int b) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "b", "type": "int"}], "return_type": "void"}, "class_info": {"name": "SkippingOutputStream", "kind": "class", "modifiers": "", "superclass": "Filt...
2992799_3
class ConditionalAttributeBehavior extends ModifyingTagBehavior { @Override public String toString() { return "ConditionalAttributeBehavior{" + "expression=" + expression + ", attribute=" + attribute + ", line=" + line + ", col=" + col + ...
try { TemplateTokenizer tokenizer = new TemplateTokenizer(ConditionalAttributeBehaviorTest.class.getResourceAsStream("conditionalattribute.html")); TemplateParser parser = new TemplateParser(tokenizer, Expressions.cambridgeExpressionLanguage); ExpressionContext context = new MapExpressi...
[FOCAL] @Override public String ConditionalAttributeBehavior.toString() [CLASS] class ConditionalAttributeBehavior extends ModifyingTagBehavior [METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] ConditionalAttributeBehavior(Expression expression, DynamicAttribute attribute, int line, i...
/* static context [FOCAL] @Override public String ConditionalAttributeBehavior.toString() */
/* static context [FOCAL] @Override public String ConditionalAttributeBehavior.toString() */ class ConditionalAttributeBehavior extends ModifyingTagBehavior { @Override public String toString() { return "ConditionalAttributeBehavior{" + "expression=" + expression + ", at...
true
ok
{"focal": {"class": "ConditionalAttributeBehavior", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "ConditionalAttributeBehavior", "kind": "class", "modifiers": "", "superclass": "ModifyingTagBehavior...
2995118_78
class AssociationMappingErrorService { public Map<String, String> createAssociationErrorMap(AssociationReport associationReport) { Map<String, String> associationErrorMap = new HashMap<>(); //Create map of errors if (associationReport != null) { if (associationReport.getSnpErr...
// Checking return type HashMap map = new HashMap(); Map<String, String> returnedMap = associationMappingErrorService.createAssociationErrorMap(associationReport); assertEquals(returnedMap, map); // Stubbing behaviour of AssociationReport when(associationReport.getSnpEr...
[FOCAL] public Map<String, String> AssociationMappingErrorService.createAssociationErrorMap(AssociationReport associationReport) [CLASS] class AssociationMappingErrorService [METRICS] loc=38 cc=8 branches=7 loops=0 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] AssociationReport.getSnpError/0, associationReport.getSnpEr...
/* static context [FOCAL] public Map<String, String> AssociationMappingErrorService.createAssociationErrorMap(AssociationReport associationReport) [PATH1] if(associationReport != null)=T -> if(associationReport.getSnpError() != null && !associationReport.getSnpError().isEmpty())=T -> if(associationReport.getSnpGeneOnDi...
/* static context [FOCAL] public Map<String, String> AssociationMappingErrorService.createAssociationErrorMap(AssociationReport associationReport) [PATH1] if(associationReport != null)=T -> if(associationReport.getSnpError() != null && !associationReport.getSnpError().isEmpty())=T -> if(associationReport.getSnpGeneOnDi...
true
ok
{"focal": {"class": "AssociationMappingErrorService", "name": "createAssociationErrorMap", "signature": "Map<String, String> createAssociationErrorMap(AssociationReport associationReport)", "start_line": 3, "modifiers": "public", "params": [{"name": "associationReport", "type": "AssociationReport"}], "return_type": "Ma...
2997701_136
class StatsBuffer { public int getCount() { return curSize; } public StatsBuffer(int size, double[] percentiles); private static boolean validPercentiles(double[] percentiles); public void reset(); public void record(long n); public void computeStats(); private void computePercentiles(int curSiz...
StatsBuffer buffer = getNoWrap(); assertEquals(buffer.getCount(), SIZE / 2 + 1); } }
[FOCAL] public int StatsBuffer.getCount() [CLASS] class StatsBuffer [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] StatsBuffer(int size, double[] percentiles); boolean validPercentiles(double[] percentiles); void reset(); void record(long n); void computeStats(); void computePercen...
/* static context [FOCAL] public int StatsBuffer.getCount() */
/* static context [FOCAL] public int StatsBuffer.getCount() */ class StatsBuffer { public int getCount() { return curSize; } public StatsBuffer(int size, double[] percentiles); private static boolean validPercentiles(double[] percentiles); public void reset(); public void record(long n); public vo...
true
ok
{"focal": {"class": "StatsBuffer", "name": "getCount", "signature": "int getCount()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "StatsBuffer", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "PERCENTILES", "type": "d...
3010630_0
class WSBACoordinatorCompletionParticipant extends WSBAParticipantCompletionParticipant implements BusinessAgreementWithCoordinatorCompletionParticipant { public void complete() throws WrongStateException, SystemException { invoke(Complete.class); } public WSBACoordinatorCompletionPartic...
LifecycleImpl lifecycle = new LifecycleImpl(); ServiceInvocationMeta serviceInvocationMeta = new ServiceInvocationMeta(lifecycle, LifecycleImpl.class, null); WSBACoordinatorCompletionParticipant participant = new WSBACoordinatorCompletionParticipant(serviceInvocationMeta, new HashMap()); ...
[FOCAL] public void WSBACoordinatorCompletionParticipant.complete() [CLASS] class WSBACoordinatorCompletionParticipant extends WSBAParticipantCompletionParticipant implements BusinessAgreementWithCoordinatorCompletionParticipant [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] invok...
/* static context [FOCAL] public void WSBACoordinatorCompletionParticipant.complete() [EXCEPTIONS] declares WrongStateException, SystemException [CALLS-EXTERNAL] invoke/1 (inherited) */
/* static context [FOCAL] public void WSBACoordinatorCompletionParticipant.complete() [EXCEPTIONS] declares WrongStateException, SystemException [CALLS-EXTERNAL] invoke/1 (inherited) */ class WSBACoordinatorCompletionParticipant extends WSBAParticipantCompletionParticipant implements BusinessAgreementWithCoordi...
true
ok
{"focal": {"class": "WSBACoordinatorCompletionParticipant", "name": "complete", "signature": "void complete() throws WrongStateException, SystemException", "start_line": 4, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "WSBACoordinatorCompletionParticipant", "kind": "class", "modif...
3016145_9
class LayeredTokenPattern { public LayeredTokenMatcher matcher(LayeredSequence seq) throws SequenceException { String encoded = encodeSequence(seq); Matcher m = encodedPattern.matcher(encoded); return new LayeredTokenMatcher(m); } public LayeredTokenPattern(String patt...
String patternStr = "There_w are_w CD_p [B-NP_n I-NP_n]+ (IN_p [B-NP_n I-NP_n]+)*"; LayeredTokenPattern pat = new LayeredTokenPattern(patternStr); LayeredTokenMatcher m = pat.matcher(seq); assertTrue(m.find()); assertEquals(0, m.start()); assertEquals(6, m.end()); } }
[FOCAL] public LayeredTokenMatcher LayeredTokenPattern.matcher(LayeredSequence seq) [CLASS] class LayeredTokenPattern [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] String encodeSequence(LayeredSequence seq) [CALLS-EXTERNAL] encodedPattern.matcher/1 [NEW] LayeredTokenMatcher [EXCE...
/* static context [FOCAL] public LayeredTokenMatcher LayeredTokenPattern.matcher(LayeredSequence seq) [INPUTS] branches=- | result=seq [COLLABORATORS] field encodedPattern matcher/1 [EXCEPTIONS] declares SequenceException [CALLS-INTERNAL] String encodeSequence(LayeredSequence seq) [NEW] LayeredTokenMatcher [CALLS-EXTER...
/* static context [FOCAL] public LayeredTokenMatcher LayeredTokenPattern.matcher(LayeredSequence seq) [INPUTS] branches=- | result=seq [COLLABORATORS] field encodedPattern matcher/1 [EXCEPTIONS] declares SequenceException [CALLS-INTERNAL] String encodeSequence(LayeredSequence seq) [NEW] LayeredTokenMatcher [CALLS-EXTER...
true
ok
{"focal": {"class": "LayeredTokenPattern", "name": "matcher", "signature": "LayeredTokenMatcher matcher(LayeredSequence seq) throws SequenceException", "start_line": 3, "modifiers": "public", "params": [{"name": "seq", "type": "LayeredSequence"}], "return_type": "LayeredTokenMatcher"}, "class_info": {"name": "LayeredTo...
3020895_48
class ProducingDoubleDataSource extends BufferedDoubleDataSource implements Runnable { public void start() { dataProducingThread = new Thread(this); dataProducingThread.setDaemon(true); dataProducingThread.start(); } protected ProducingDoubleDataSource(); protected ProducingDoubleDataSource(long numDataTh...
int numDoubles = 10; TestProducer producer = new TestProducer(numDoubles); producer.start(); assertEquals(numDoubles, producer.getDataLength()); double[] data = producer.getAllData(); assertEquals(numDoubles, data.length); } }
[FOCAL] public void ProducingDoubleDataSource.start() [CLASS] class ProducingDoubleDataSource extends BufferedDoubleDataSource implements Runnable [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] dataProducingThread.setDaemon/1, dataProducingThread.start/0 [NEW] Thread [COLLABORATOR...
/* static context [FOCAL] public void ProducingDoubleDataSource.start() [COLLABORATORS] field dataProducingThread setDaemon/1,start/0 [NEW] Thread [CALLS-EXTERNAL] dataProducingThread.setDaemon/1, dataProducingThread.start/0 */
/* static context [FOCAL] public void ProducingDoubleDataSource.start() [COLLABORATORS] field dataProducingThread setDaemon/1,start/0 [NEW] Thread [CALLS-EXTERNAL] dataProducingThread.setDaemon/1, dataProducingThread.start/0 */ class ProducingDoubleDataSource extends BufferedDoubleDataSource implements Runnable { pub...
true
ok
{"focal": {"class": "ProducingDoubleDataSource", "name": "start", "signature": "void start()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "ProducingDoubleDataSource", "kind": "class", "modifiers": "", "superclass": "BufferedDoubleDataSource", "interfaces": "Runn...
3026246_81
class BCHelper { public static void registerProvider() { if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) Security.addProvider(new BouncyCastleProvider()); } public static MessageDigest getMessageDigest(String algorithm); } class BCHelperTest { @Test pub...
if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) != null) Security.removeProvider(BouncyCastleProvider.PROVIDER_NAME); Assert.assertNull(Security.getProvider(BouncyCastleProvider.PROVIDER_NAME)); BCHelper.registerProvider(); Provider provider = Security.getProv...
[FOCAL] public static void BCHelper.registerProvider() [CLASS] class BCHelper [METRICS] loc=4 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] Security.getProvider/1, Security.addProvider/1 [NEW] BouncyCastleProvider [PATH1] if(Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null)=T [PA...
/* static context [FOCAL] public static void BCHelper.registerProvider() [PATH1] if(Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null)=T [PATH2] if(Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null)=F [NEW] BouncyCastleProvider [CALLS-EXTERNAL] Security.getProvider/1, Security.addProvider/...
/* static context [FOCAL] public static void BCHelper.registerProvider() [PATH1] if(Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null)=T [PATH2] if(Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null)=F [NEW] BouncyCastleProvider [CALLS-EXTERNAL] Security.getProvider/1, Security.addProvider/...
true
ok
{"focal": {"class": "BCHelper", "name": "registerProvider", "signature": "void registerProvider()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "void"}, "class_info": {"name": "BCHelper", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [...
3028163_81
class TogglzEndpoint { @WriteOperation public TogglzFeature setFeatureState(@Selector String name, boolean enabled) { final Feature feature = featureManager.getFeatures().stream() .filter(f -> f.name().equals(name)) .findFirst() .orElseThrow(() -> new Ill...
contextRunner.withConfiguration(AutoConfigurations.of( DispatcherServletPathConfig.class, TogglzAutoConfiguration.class, TogglzEndpointAutoConfiguration.class)) .withPropertyValues( "management.endpoints.web.exposure.include...
[FOCAL] @WriteOperation public TogglzFeature TogglzEndpoint.setFeatureState(String name, boolean enabled) [CLASS] class TogglzEndpoint [METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] FeatureState changeFeatureStatus(Feature feature, boolean enabled) [CALLS-EXTERNAL] featureManager...
/* static context [FOCAL] @WriteOperation public TogglzFeature TogglzEndpoint.setFeatureState(String name, boolean enabled) [INPUTS] branches=- | result=enabled, name [COLLABORATORS] field featureManager getFeatures/0; field f name/0 [CALLS-INTERNAL] FeatureState changeFeatureStatus(Feature feature, boolean enabled) [N...
/* static context [FOCAL] @WriteOperation public TogglzFeature TogglzEndpoint.setFeatureState(String name, boolean enabled) [INPUTS] branches=- | result=enabled, name [COLLABORATORS] field featureManager getFeatures/0; field f name/0 [CALLS-INTERNAL] FeatureState changeFeatureStatus(Feature feature, boolean enabled) [N...
true
ok
{"focal": {"class": "TogglzEndpoint", "name": "setFeatureState", "signature": "TogglzFeature setFeatureState(String name, boolean enabled)", "start_line": 3, "modifiers": "@WriteOperation public", "params": [{"name": "name", "type": "String"}, {"name": "enabled", "type": "boolean"}], "return_type": "TogglzFeature"}, "c...
3050780_1
class URLInformation { public String getPublicationId() { if (this.publicationId == null) { this.publicationId = extractBeforeSlash(this.url); } return this.publicationId; } public URLInformation(); private void setSourceURL(String webappUrl); public String ge...
URLInformation urli = new URLInformation(); String pubId = urli.getPublicationId(); assertEquals(pubId,"test"); } }
[FOCAL] public String URLInformation.getPublicationId() [CLASS] class URLInformation [METRICS] loc=6 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] String extractBeforeSlash(String remaining) [FIELDS] read=publicationId, url | write=publicationId [PATH1] if(this.publicationId == null)=T -> return...
/* static context [FOCAL] public String URLInformation.getPublicationId() [PATH1] if(this.publicationId == null)=T -> return this.publicationId [PATH2] if(this.publicationId == null)=F -> return this.publicationId [STATE] publicationId [CALLS-INTERNAL] String extractBeforeSlash(String remaining) [FIELDS] read=publicati...
/* static context [FOCAL] public String URLInformation.getPublicationId() [PATH1] if(this.publicationId == null)=T -> return this.publicationId [PATH2] if(this.publicationId == null)=F -> return this.publicationId [STATE] publicationId [CALLS-INTERNAL] String extractBeforeSlash(String remaining) [FIELDS] read=publicati...
true
ok
{"focal": {"class": "URLInformation", "name": "getPublicationId", "signature": "String getPublicationId()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "URLInformation", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name...
3061876_8
class LogUtils { public static String maskApiKey(final String key) { int visibleChars = (int) (0.1 * key.length()); int right = visibleChars / 2; int left = visibleChars - right; // left >= right String beginning = key.substring(0, left); String end = key.substring(key.length() - right); return beginning...
Assert.assertEquals("N708W...5015S", LogUtils.maskApiKey("N708W589120i0Tn984uwX6Z9c8582ccyN42Ah9PG18sO66bOCGf46sann382306D203304s2RowSA628G7KeWx1h2A8657H5015S")); Assert.assertEquals("PJGt...ube", LogUtils.maskApiKey("PJGttqarjMhhBYddWFKxwfZEqGERCDJCZHuveHwfUFJgokYfxupwKWyFHDGlcVRDCzgBDnRHeube")); Assert.assertE...
[FOCAL] public static String LogUtils.maskApiKey(String key) [CLASS] class LogUtils [METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] String.length/0, String.substring/2, String.substring/1 [INPUTS] branches=- | result=key [DATAFLOW] beginning@L6->L8; end@L7->L8; key@param->L3,L6,L7;...
/* static context [FOCAL] public static String LogUtils.maskApiKey(String key) [INPUTS] branches=- | result=key [CALLS-EXTERNAL] String.length/0, String.substring/2, String.substring/1 */
/* static context [FOCAL] public static String LogUtils.maskApiKey(String key) [INPUTS] branches=- | result=key [CALLS-EXTERNAL] String.length/0, String.substring/2, String.substring/1 */ class LogUtils { public static String maskApiKey(final String key) { int visibleChars = (int) (0.1 * key.length()); int right...
true
ok
{"focal": {"class": "LogUtils", "name": "maskApiKey", "signature": "String maskApiKey(String key)", "start_line": 3, "modifiers": "public static", "params": [{"name": "key", "type": "String"}], "return_type": "String"}, "class_info": {"name": "LogUtils", "kind": "class", "modifiers": "", "superclass": null, "interfaces...
3069429_0
class TweetParser { protected Map<String, Integer> tokenize(String text) { Map<String, Integer> tokenMap = newHashMap(); StringTokenizer st = new StringTokenizer(text, "\"{}[]:;|<>?`'.,/~!@#$%^&*()_-+= \t\n\r\f\\"); while (st.hasMoreTokens()) { String token = st.nextToken(); ...
String text = "Twitter is an online social networking service and microblogging service" // + " that enables its users to send and read text-based posts of up to 140 characters," // + " known as \"tweets\". You can signup and test it yourself."; Map<String, Integer> token...
[FOCAL] protected Map<String, Integer> TweetParser.tokenize(String text) [CLASS] class TweetParser [METRICS] loc=14 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] newHashMap/0 (inherited), StringTokenizer.hasMoreTokens/0, StringTokenizer.nextToken/0, String.length/0, Map<String, Integer>.contains...
/* static context [FOCAL] protected Map<String, Integer> TweetParser.tokenize(String text) [PATH1] while(st.hasMoreTokens())=T -> if(token.length() < MIN_TOKEN_LENGTH)=T -> exit loop -> return tokenMap [PATH2] while(st.hasMoreTokens())=F -> return tokenMap [PATH3] while(st.hasMoreTokens())=T -> if(token.length() < MIN_...
/* static context [FOCAL] protected Map<String, Integer> TweetParser.tokenize(String text) [PATH1] while(st.hasMoreTokens())=T -> if(token.length() < MIN_TOKEN_LENGTH)=T -> exit loop -> return tokenMap [PATH2] while(st.hasMoreTokens())=F -> return tokenMap [PATH3] while(st.hasMoreTokens())=T -> if(token.length() < MIN_...
true
ok
{"focal": {"class": "TweetParser", "name": "tokenize", "signature": "Map<String, Integer> tokenize(String text)", "start_line": 3, "modifiers": "protected", "params": [{"name": "text", "type": "String"}], "return_type": "Map<String, Integer>"}, "class_info": {"name": "TweetParser", "kind": "class", "modifiers": "", "su...
3086072_0
class SettingActivity extends PreferenceActivity { @Background public void loadProject() { try { projectUserRelationDao.delete(projectUserRelationDao.queryForAll()); List<Status> statuses = backlogService.getStatuses(); for (Status status : statuses) { statusDao.createOrUpdate(status); Ln.d("pu...
Robolectric.application.onCreate(); SettingActivity activity = new SettingActivity(); assertThat(activity, is(notNullValue())); ((RoboApplication)Robolectric.application).getInjector().injectMembers(activity); assertThat(activity.priorityDao , is(notNullValue())); BacklogService backlogService = create...
[FOCAL] @Background public void SettingActivity.loadProject() [CLASS] class SettingActivity extends PreferenceActivity [METRICS] loc=84 cc=11 branches=0 loops=8 returns=0 throws=0 nesting=3 [CALLS-INTERNAL] void failSetup(Exception e); void finishSetup(); void incrementProgress(); void setProgressMax(int projectSize) [...
/* static context [FOCAL] @Background public void SettingActivity.loadProject() [PATH1] foreach(Status status : statuses)=T -> exit loop -> foreach(Priority priority : priorities)=T -> exit loop -> foreach(Resolution resolution : resolutions)=T -> exit loop -> foreach(Project project : projects)=T -> foreach(IssueType ...
/* static context [FOCAL] @Background public void SettingActivity.loadProject() [PATH1] foreach(Status status : statuses)=T -> exit loop -> foreach(Priority priority : priorities)=T -> exit loop -> foreach(Resolution resolution : resolutions)=T -> exit loop -> foreach(Project project : projects)=T -> foreach(IssueType ...
true
ok
{"focal": {"class": "SettingActivity", "name": "loadProject", "signature": "void loadProject()", "start_line": 3, "modifiers": "@Background public", "params": [], "return_type": "void"}, "class_info": {"name": "SettingActivity", "kind": "class", "modifiers": "", "superclass": "PreferenceActivity", "interfaces": null, "...
3102907_0
class AccessRequest extends RadiusPacket { protected String createMSCHAPV2Response(String username, byte[] password, byte ident, byte[] ntResponse, byte[] peerChallenge, byte[] authenticator) { byte[] authResponse = Authenticator.GenerateAuthenticatorResponse( password, ntResponse, peerCh...
String username = "gerhard"; String password = "test12345"; /* * byte[] authenticatorChallenge = new byte[] { 0x54, 0x6c, (byte) 0xa8, * (byte) 0x9c, 0x30, 0x36, 0x49, (byte) 0xcf, 0x30, 0x2d, (byte) 0x89, * 0x79, (byte) 0x99, (byte) 0xcc, 0x70, (byte) 0xa0 }; * * byte[] responseData = new byte[]...
[FOCAL] protected String AccessRequest.createMSCHAPV2Response(String username, byte[] password, byte ident, byte[] ntResponse, byte[] peerChallenge, byte[] authenticator) [CLASS] class AccessRequest extends RadiusPacket [METRICS] loc=20 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Authenticator...
class AccessRequest extends RadiusPacket { protected String createMSCHAPV2Response(String username, byte[] password, byte ident, byte[] ntResponse, byte[] peerChallenge, byte[] authenticator) { byte[] authResponse = Authenticator.GenerateAuthenticatorResponse( password, ntResponse, peerCh...
false
ok
{"focal": {"class": "AccessRequest", "name": "createMSCHAPV2Response", "signature": "String createMSCHAPV2Response(String username, byte[] password, byte ident, byte[] ntResponse, byte[] peerChallenge, byte[] authenticator)", "start_line": 3, "modifiers": "protected", "params": [{"name": "username", "type": "String"}, ...
3110085_1
class BankingService { @Compensatable public void transferMoney(String fromAccount, String toAccount, Double amount) { accountManager.debitAccount(fromAccount, amount); accountManager.creditAccount(toAccount, amount); } private DBCollection accounts; @Inject BankingService banking...
//Initiate a 'high value' transfer that will fail try { bankingService.transferMoney("A", "B", 600.0); Assert.fail("Expected a TransactionCompensatedException to be thrown"); } catch (TransactionCompensatedException e) { //expected } assertBal...
[FOCAL] @Compensatable public void BankingService.transferMoney(String fromAccount, String toAccount, Double amount) [CLASS] class BankingService [METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] accountManager.debitAccount/2, accountManager.creditAccount/2 [COLLABORATORS] field acco...
/* static context [FOCAL] @Compensatable public void BankingService.transferMoney(String fromAccount, String toAccount, Double amount) [COLLABORATORS] field accountManager debitAccount/2,creditAccount/2 [CALLS-EXTERNAL] accountManager.debitAccount/2, accountManager.creditAccount/2 */
/* static context [FOCAL] @Compensatable public void BankingService.transferMoney(String fromAccount, String toAccount, Double amount) [COLLABORATORS] field accountManager debitAccount/2,creditAccount/2 [CALLS-EXTERNAL] accountManager.debitAccount/2, accountManager.creditAccount/2 */ class BankingService { @Compen...
true
ok
{"focal": {"class": "BankingService", "name": "transferMoney", "signature": "void transferMoney(String fromAccount, String toAccount, Double amount)", "start_line": 3, "modifiers": "@Compensatable public", "params": [{"name": "fromAccount", "type": "String"}, {"name": "toAccount", "type": "String"}, {"name": "amount", ...
3113319_1
class FlatStrategyPriceCalculator implements StrategyPriceCalculator { @Override public BigDecimal getPrice(Carrier carrier, Map<Purchasable, Long> items) { BigDecimal price = carrier.getPerShipping() != null ? carrier.getPerShipping() : BigDecimal.ZERO; Long numberOfItems = 0l; for...
Carrier carrier = new Carrier(); carrier.setPerShipping(BigDecimal.TEN); carrier.setPerItem(BigDecimal.ONE); Map<Purchasable, Long> items = Maps.newHashMap(); BigDecimal price = this.componentManager.getComponentUnderTest().getPrice(carrier, items); Assert.assertEquals...
[FOCAL] @Override public BigDecimal FlatStrategyPriceCalculator.getPrice(Carrier carrier, Map<Purchasable, Long> items) [CLASS] class FlatStrategyPriceCalculator implements StrategyPriceCalculator [METRICS] loc=18 cc=3 branches=1 loops=1 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] Carrier.getPerShipping/0, Map<Purcha...
/* static context [FOCAL] @Override public BigDecimal FlatStrategyPriceCalculator.getPrice(Carrier carrier, Map<Purchasable, Long> items) [PATH1] foreach(Long number : items.values())=T -> exit loop -> if(numberOfItems == 0)=T -> return BigDecimal.ZERO [PATH2] foreach(Long number : items.values())=F -> if(numberOfItems...
/* static context [FOCAL] @Override public BigDecimal FlatStrategyPriceCalculator.getPrice(Carrier carrier, Map<Purchasable, Long> items) [PATH1] foreach(Long number : items.values())=T -> exit loop -> if(numberOfItems == 0)=T -> return BigDecimal.ZERO [PATH2] foreach(Long number : items.values())=F -> if(numberOfItems...
true
ok
{"focal": {"class": "FlatStrategyPriceCalculator", "name": "getPrice", "signature": "BigDecimal getPrice(Carrier carrier, Map<Purchasable, Long> items)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "carrier", "type": "Carrier"}, {"name": "items", "type": "Map<Purchasable, Long>"}], "return_typ...
3114475_22
class Number160 extends Number implements Comparable<Number160> { public String toString(final boolean removeLeadingZero) { boolean removeZero = removeLeadingZero; final StringBuilder sb = new StringBuilder("0x"); for (int i = 0; i < INT_ARRAY_SIZE; i++) { toHex(val[i], removeZe...
Number160 ki2 = new Number160(0x2c); Assert.assertEquals("0x2c", ki2.toString()); } }
[FOCAL] public String Number160.toString(boolean removeLeadingZero) [CLASS] class Number160 extends Number implements Comparable<Number160> [METRICS] loc=11 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] void toHex(int integer2, boolean removeLeadingZero, StringBuilder sb) [CALLS-EXTERNAL] String...
/* static context [FOCAL] public String Number160.toString(boolean removeLeadingZero) [PATH1] for(i < INT_ARRAY_SIZE)=T -> if(removeZero && val[i] != 0)=T -> exit loop -> return sb.toString() [PATH2] for(i < INT_ARRAY_SIZE)=F -> return sb.toString() [PATH3] for(i < INT_ARRAY_SIZE)=T -> if(removeZero && val[i] != 0)=F -...
/* static context [FOCAL] public String Number160.toString(boolean removeLeadingZero) [PATH1] for(i < INT_ARRAY_SIZE)=T -> if(removeZero && val[i] != 0)=T -> exit loop -> return sb.toString() [PATH2] for(i < INT_ARRAY_SIZE)=F -> return sb.toString() [PATH3] for(i < INT_ARRAY_SIZE)=T -> if(removeZero && val[i] != 0)=F -...
true
ok
{"focal": {"class": "Number160", "name": "toString", "signature": "String toString(boolean removeLeadingZero)", "start_line": 3, "modifiers": "public", "params": [{"name": "removeLeadingZero", "type": "boolean"}], "return_type": "String"}, "class_info": {"name": "Number160", "kind": "class", "modifiers": "", "superclas...
3116751_0
class Formatter { protected String buildFullMessage(String message, Object... args) { StringBuilder stringBuilder = new StringBuilder(message.length()); int lastIndex = 0; int argIndex = 0; while (true) { int argPos = message.indexOf(ARGS_PATTERN, lastIndex); if (argPos == -1) { break; } str...
Assert.assertEquals("This is a test", formatter.buildFullMessage("{} is a test", "This")); Assert.assertEquals("This is a test", formatter.buildFullMessage("This is a {}", "test")); Assert.assertEquals("This is a test", formatter.buildFullMessage("This {} {} test", "is", "a")); Assert.assertEquals("This is a te...
[FOCAL] protected String Formatter.buildFullMessage(String message, Object... args) [CLASS] class Formatter [METRICS] loc=26 cc=3 branches=2 loops=1 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] String formatArgument(Object arg) [CALLS-EXTERNAL] String.length/0, String.indexOf/2, StringBuilder.append/1, String.substrin...
/* static context [FOCAL] protected String Formatter.buildFullMessage(String message, Object... args) [PATH1] while(true)=T -> if(argPos == -1)=T -> return stringBuilder.toString() [INPUTS] branches=args, message | result=message [CALLS-INTERNAL] String formatArgument(Object arg) [NEW] StringBuilder [CALLS-EXTERNAL] St...
/* static context [FOCAL] protected String Formatter.buildFullMessage(String message, Object... args) [PATH1] while(true)=T -> if(argPos == -1)=T -> return stringBuilder.toString() [INPUTS] branches=args, message | result=message [CALLS-INTERNAL] String formatArgument(Object arg) [NEW] StringBuilder [CALLS-EXTERNAL] St...
true
ok
{"focal": {"class": "Formatter", "name": "buildFullMessage", "signature": "String buildFullMessage(String message, Object... args)", "start_line": 3, "modifiers": "protected", "params": [{"name": "message", "type": "String"}, {"name": "args", "type": "Object..."}], "return_type": "String"}, "class_info": {"name": "Form...
3119164_27
class SpeculativeGammaConfiguration { public SpeculativeGammaConfiguration newWithLocks() { if (locksDetected) { return this; } return new SpeculativeGammaConfiguration( true, listenersDetected, commuteDetected, nonRefTypeDetected, orelseDetected, true, ...
SpeculativeGammaConfiguration config = new SpeculativeGammaConfiguration() .newWithLocks(); assertTrue(config.fat); assertFalse(config.nonRefTypeDetected); assertFalse(config.commuteDetected); assertFalse(config.orelseDetected); assertFalse(config.listen...
[FOCAL] public SpeculativeGammaConfiguration SpeculativeGammaConfiguration.newWithLocks() [CLASS] class SpeculativeGammaConfiguration [METRICS] loc=9 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [NEW] SpeculativeGammaConfiguration [PATH1] if(locksDetected)=T -> return this [PATH2] if(locksDetected)=F -> return ...
/* static context [FOCAL] public SpeculativeGammaConfiguration SpeculativeGammaConfiguration.newWithLocks() [PATH1] if(locksDetected)=T -> return this [PATH2] if(locksDetected)=F -> return new SpeculativeGammaConfiguration( true, listenersDetected, commute... [NEW] SpeculativeGammaConfiguration */
/* static context [FOCAL] public SpeculativeGammaConfiguration SpeculativeGammaConfiguration.newWithLocks() [PATH1] if(locksDetected)=T -> return this [PATH2] if(locksDetected)=F -> return new SpeculativeGammaConfiguration( true, listenersDetected, commute... [NEW] SpeculativeGammaConfiguration */ class SpeculativeGamm...
true
ok
{"focal": {"class": "SpeculativeGammaConfiguration", "name": "newWithLocks", "signature": "SpeculativeGammaConfiguration newWithLocks()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "SpeculativeGammaConfiguration"}, "class_info": {"name": "SpeculativeGammaConfiguration", "kind": "class", "modif...
3125904_1
class DataStore implements Closeable { @SuppressWarnings("unchecked") public <Model> void inject(@NotNull Model model) { try { for (Class type = model.getClass(); type != null && type != Object.class && type != Enum.class; type = type.getSuperclass()) { for (Field field : ty...
String name = TMP + "/inject"; ChronicleTools.deleteOnExit(name); for (int i = 0; i < 10; i++) { ExampleDataModel model = new ExampleDataModel(); Chronicle chronicle = new IndexedChronicle(name); DataStore dataStore = new DataStore(chronicle, ModelMode.MASTER...
[FOCAL] @SuppressWarnings("unchecked") public void DataStore.inject(Model model) [CLASS] class DataStore implements Closeable [METRICS] loc=12 cc=4 branches=0 loops=2 returns=0 throws=1 nesting=3 [CALLS-INTERNAL] void injectField(Model model, Field field) [CALLS-EXTERNAL] Model.getClass/0, Class.getSuperclass/0, Class....
/* static context [FOCAL] @SuppressWarnings("unchecked") public void DataStore.inject(Model model) [THROWS-WHEN] AssertionError when try-body throws [PATH1] for(type != null && type != Object.class && type != Enum.class)=T -> foreach(Field field : type.getDeclaredFields())=F -> exit loop [PATH2] try-body throws -> thro...
/* static context [FOCAL] @SuppressWarnings("unchecked") public void DataStore.inject(Model model) [THROWS-WHEN] AssertionError when try-body throws [PATH1] for(type != null && type != Object.class && type != Enum.class)=T -> foreach(Field field : type.getDeclaredFields())=F -> exit loop [PATH2] try-body throws -> thro...
true
ok
{"focal": {"class": "DataStore", "name": "inject", "signature": "void inject(Model model)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") public", "params": [{"name": "model", "type": "Model"}], "return_type": "void"}, "class_info": {"name": "DataStore", "kind": "class", "modifiers": "", "superclass":...
3130403_11
class PageableCollectionBase extends PropertyChangeSupportedBase implements PageableCollection<T_ITEM> { @Override public Selection<T_ITEM> getSelection() { return getSelectionHandler().getSelection(); } public PageableCollectionBase(QueryOptions queryOptions); @Override public final QueryParams getQu...
doSelect(collection, 0, 0, true, "a"); resetCallCounter(); assertEquals("[a]", IterableUtil.asCollection(collection.getSelection()).toString()); } }
[FOCAL] @Override public Selection<T_ITEM> PageableCollectionBase.getSelection() [CLASS] class PageableCollectionBase extends PropertyChangeSupportedBase implements PageableCollection<T_ITEM> [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] getSelectionHandler().getSelection/0, getS...
/* static context [FOCAL] @Override public Selection<T_ITEM> PageableCollectionBase.getSelection() [CALLS-EXTERNAL] getSelectionHandler().getSelection/0, getSelectionHandler/0 (inherited) */
/* static context [FOCAL] @Override public Selection<T_ITEM> PageableCollectionBase.getSelection() [CALLS-EXTERNAL] getSelectionHandler().getSelection/0, getSelectionHandler/0 (inherited) */ class PageableCollectionBase extends PropertyChangeSupportedBase implements PageableCollection<T_ITEM> { @Override public Se...
true
ok
{"focal": {"class": "PageableCollectionBase", "name": "getSelection", "signature": "Selection<T_ITEM> getSelection()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Selection<T_ITEM>"}, "class_info": {"name": "PageableCollectionBase", "kind": "class", "modifiers": "", "superclass": "Pr...
3139136_1
class BeanAnalyzer { public static Map<String, PropertyDescriptor> getAllProperties(GenericType root) throws IntrospectionException { Map<String, PropertyDescriptor> properties = cPropertiesCache.get(root); if (properties == null) { GenericType rootType = root.g...
Map<String, PropertyDescriptor> properties = BeanAnalyzer.getAllProperties(new GenericType(IntGenerics.class)); PropertyDescriptor value = properties.get("value"); assertEquals(Integer.class, value.getPropertyType()); assertEquals(Integer.class, value.getReadMethod().getRetur...
[FOCAL] public static Map<String, PropertyDescriptor> BeanAnalyzer.getAllProperties(GenericType root) [CLASS] class BeanAnalyzer [METRICS] loc=20 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=2 [CALLS-INTERNAL] Map<String, PropertyDescriptor> createProperties(GenericType root, GenericType type) [CALLS-EXTERNAL] cP...
/* static context [FOCAL] public static Map<String, PropertyDescriptor> BeanAnalyzer.getAllProperties(GenericType root) [PATH1] if(properties == null)=T -> if(rootType == null)=T -> return properties [PATH2] if(properties == null)=F -> return properties [PATH3] if(properties == null)=T -> if(rootType == null)=F -> retu...
/* static context [FOCAL] public static Map<String, PropertyDescriptor> BeanAnalyzer.getAllProperties(GenericType root) [PATH1] if(properties == null)=T -> if(rootType == null)=T -> return properties [PATH2] if(properties == null)=F -> return properties [PATH3] if(properties == null)=T -> if(rootType == null)=F -> retu...
true
ok
{"focal": {"class": "BeanAnalyzer", "name": "getAllProperties", "signature": "Map<String, PropertyDescriptor> getAllProperties(GenericType root) throws IntrospectionException", "start_line": 3, "modifiers": "public static", "params": [{"name": "root", "type": "GenericType"}], "return_type": "Map<String, PropertyDescrip...
3149437_2
class KerberosAuthenticationProvider implements AuthenticationProvider { @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication; JaasSubjectHolder subjectHol...
when(userDetailsService.loadUserByUsername(TEST_USER)).thenReturn(USER_DETAILS); when(kerberosClient.login(TEST_USER, TEST_PASSWORD)).thenReturn(JAAS_SUBJECT_HOLDER); Authentication authenticate = provider.authenticate(INPUT_TOKEN); verify(kerberosClient).login(TEST_USER, TEST_PASSWORD...
[FOCAL] @Override public Authentication KerberosAuthenticationProvider.authenticate(Authentication authentication) [CLASS] class KerberosAuthenticationProvider implements AuthenticationProvider [METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] KerberosClient.login/2, UsernamePasswor...
/* static context [FOCAL] @Override public Authentication KerberosAuthenticationProvider.authenticate(Authentication authentication) [INPUTS] branches=- | result=authentication, kerberosClient, userDetailsService [COLLABORATORS] field kerberosClient:KerberosClient login/2; field userDetailsService:UserDetailsService lo...
/* static context [FOCAL] @Override public Authentication KerberosAuthenticationProvider.authenticate(Authentication authentication) [INPUTS] branches=- | result=authentication, kerberosClient, userDetailsService [COLLABORATORS] field kerberosClient:KerberosClient login/2; field userDetailsService:UserDetailsService lo...
true
ok
{"focal": {"class": "KerberosAuthenticationProvider", "name": "authenticate", "signature": "Authentication authenticate(Authentication authentication) throws AuthenticationException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "authentication", "type": "Authentication"}], "return_type": "Auth...
3149449_52
class ArtifactResolutionProfileImpl extends ArtifactResolutionProfileBase { protected HostConfiguration getHostConfiguration(URI uri, SAMLMessageContext context) throws MessageEncodingException { try { HostConfiguration hc = httpClient.getHostConfiguration(); if (hc != null) { ...
HttpClient client = new HttpClient(); ArtifactResolutionProfileImpl artifactResolutionProfile = new ArtifactResolutionProfileImpl(client); URI uri = new URI("http", "test", "/artifact", null); HostConfiguration hostConfiguration = artifactResolutionProfile.getHostConfiguration(uri, null)...
[FOCAL] protected HostConfiguration ArtifactResolutionProfileImpl.getHostConfiguration(URI uri, SAMLMessageContext context) [CLASS] class ArtifactResolutionProfileImpl extends ArtifactResolutionProfileBase [METRICS] loc=45 cc=4 branches=2 loops=0 returns=1 throws=1 nesting=2 [CALLS-INTERNAL] SecureProtocolSocketFactory...
/* static context [FOCAL] protected HostConfiguration ArtifactResolutionProfileImpl.getHostConfiguration(URI uri, SAMLMessageContext context) [THROWS-WHEN] MessageEncodingException when try-body throws [PATH1] if(hc != null)=T -> if(uri.getScheme().equalsIgnoreCase("http"))=T -> return hc [PATH2] try-body throws -> thr...
/* static context [FOCAL] protected HostConfiguration ArtifactResolutionProfileImpl.getHostConfiguration(URI uri, SAMLMessageContext context) [THROWS-WHEN] MessageEncodingException when try-body throws [PATH1] if(hc != null)=T -> if(uri.getScheme().equalsIgnoreCase("http"))=T -> return hc [PATH2] try-body throws -> thr...
true
ok
{"focal": {"class": "ArtifactResolutionProfileImpl", "name": "getHostConfiguration", "signature": "HostConfiguration getHostConfiguration(URI uri, SAMLMessageContext context) throws MessageEncodingException", "start_line": 3, "modifiers": "protected", "params": [{"name": "uri", "type": "URI"}, {"name": "context", "type...
3175956_0
class HelloWorld { public String hello(String message) { return "Hello " + message; } private static EJBContainer ejbContainer; private static Context ctx; } class HelloWorldTest { private static EJBContainer ejbContainer; private static Context ctx; @Test public void hello...
// Retrieve a reference to the session bean using a portable // global JNDI name HelloWorld helloWorld = (HelloWorld) ctx.lookup("java:global/classes/HelloWorld"); // Do your tests assertNotNull(helloWorld); String expected = "World"; String hello = helloWorld.he...
[FOCAL] public String HelloWorld.hello(String message) [CLASS] class HelloWorld [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=message [DATAFLOW] message@param->L2 [TEST] HelloWorldTest: @Test public void hello() throws NamingException [TEST-FIELDS] EJBContainer ejbCon...
/* static context [FOCAL] public String HelloWorld.hello(String message) [INPUTS] branches=- | result=message */
/* static context [FOCAL] public String HelloWorld.hello(String message) [INPUTS] branches=- | result=message */ class HelloWorld { public String hello(String message) { return "Hello " + message; } private static EJBContainer ejbContainer; private static Context ctx; } class HelloWorldTest ...
true
ok
{"focal": {"class": "HelloWorld", "name": "hello", "signature": "String hello(String message)", "start_line": 3, "modifiers": "public", "params": [{"name": "message", "type": "String"}], "return_type": "String"}, "class_info": {"name": "HelloWorld", "kind": "class", "modifiers": "", "superclass": null, "interfaces": nu...
3192456_15
class ShaderPopulator { public void pushTransforms(Matrix4 modelTransform, ShaderProgram shader, Camera camera) { Matrix3 normalMatrix = new Matrix3(modelTransform).invert().transpose(); //Matrix4 modelViewProjection = modelTransform.multiply(camera.getViewProjectionMatrix()); Matrix4 viewMatrix = camera.getVi...
MatrixBasedCamera camera = new MatrixBasedCamera(new CameraPerspective(45, 4.0f/3.0f, 1, 1000)); ShaderProgram shaderProgram = MockUtil.deepMock(ShaderProgram.class); Matrix4 model = new Matrix4(1, 0, 0, 3, 0, 1, 0, 2, 0, 0, 1, -1, 0, 0, 0, 1); camera.translate(new Vector3(5, -1, 10)); Quaternion...
[FOCAL] public void ShaderPopulator.pushTransforms(Matrix4 modelTransform, ShaderProgram shader, Camera camera) [CLASS] class ShaderPopulator [METRICS] loc=20 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] new Matrix3(modelTransform).invert().transpose/0, new Matrix3(modelTransform).invert/0, Cam...
/* static context [FOCAL] public void ShaderPopulator.pushTransforms(Matrix4 modelTransform, ShaderProgram shader, Camera camera) [COLLABORATORS] param camera:Camera getViewMatrix/0,getPerspective/0; param shader:ShaderProgram uniform/1; param modelTransform:Matrix4 toFloatBuffer/0 [NEW] Matrix3 [CALLS-EXTERNAL] new Ma...
/* static context [FOCAL] public void ShaderPopulator.pushTransforms(Matrix4 modelTransform, ShaderProgram shader, Camera camera) [COLLABORATORS] param camera:Camera getViewMatrix/0,getPerspective/0; param shader:ShaderProgram uniform/1; param modelTransform:Matrix4 toFloatBuffer/0 [NEW] Matrix3 [CALLS-EXTERNAL] new Ma...
true
ok
{"focal": {"class": "ShaderPopulator", "name": "pushTransforms", "signature": "void pushTransforms(Matrix4 modelTransform, ShaderProgram shader, Camera camera)", "start_line": 3, "modifiers": "public", "params": [{"name": "modelTransform", "type": "Matrix4"}, {"name": "shader", "type": "ShaderProgram"}, {"name": "camer...
3192987_254
class ConfigurationFolder { @Override public int hashCode() { return Objects.hash(id, name, path); } public ConfigurationFolder(); public ConfigurationFolder(final String id, final String name, final String path); public String getId(); public void setId(final String id); pu...
ConfigurationFolder folder = new ConfigurationFolder("id", "name", "path"); ConfigurationFolder folder2 = new ConfigurationFolder("id", "name", "path"); ConfigurationFolder folder3 = new ConfigurationFolder("id3", "name", "path"); assertEquals(folder.hashCode(), folder2.hashCode()); ...
[FOCAL] @Override public int ConfigurationFolder.hashCode() [CLASS] class ConfigurationFolder [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Objects.hash/3 [CLASS-MEMBERS] ConfigurationFolder(); ConfigurationFolder(String id, String name, String path); String getId(); void setId(S...
/* static context [FOCAL] @Override public int ConfigurationFolder.hashCode() [CALLS-EXTERNAL] Objects.hash/3 */
/* static context [FOCAL] @Override public int ConfigurationFolder.hashCode() [CALLS-EXTERNAL] Objects.hash/3 */ class ConfigurationFolder { @Override public int hashCode() { return Objects.hash(id, name, path); } public ConfigurationFolder(); public ConfigurationFolder(final String id, ...
true
ok
{"focal": {"class": "ConfigurationFolder", "name": "hashCode", "signature": "int hashCode()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "int"}, "class_info": {"name": "ConfigurationFolder", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "memb...
3206489_2
class PhotoTaker { public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { if (resultCode == Activity.RESULT_CANCELED) { onResultCanceled(requestCode); return; } if (resultCode != Activity.RESULT_OK) { onResultNotOk(requestCode); return; } ...
taker.onActivityResult(OTHER_ACTION, RESULT_FIRST_USER, null); verify(listener, never()).onError(anyInt()); taker.onActivityResult(OTHER_ACTION, RESULT_CANCELED, null); verify(listener, never()).onCancel(anyInt()); } }
[FOCAL] public void PhotoTaker.onActivityResult(int requestCode, int resultCode, Intent data) [CLASS] class PhotoTaker [METRICS] loc=28 cc=7 branches=4 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] void onResultCanceled(int requestCode); void onResultNotOk(int requestCode) [CALLS-EXTERNAL] captureAction.onResul...
/* static context [FOCAL] public void PhotoTaker.onActivityResult(int requestCode, int resultCode, Intent data) [PATH1] if(resultCode == Activity.RESULT_CANCELED)=F -> if(resultCode != Activity.RESULT_OK)=F -> if(data == null)=T -> switch(requestCode)=case CAPTURE_IMAGE [PATH2] if(resultCode == Activity.RESULT_CANCELED...
/* static context [FOCAL] public void PhotoTaker.onActivityResult(int requestCode, int resultCode, Intent data) [PATH1] if(resultCode == Activity.RESULT_CANCELED)=F -> if(resultCode != Activity.RESULT_OK)=F -> if(data == null)=T -> switch(requestCode)=case CAPTURE_IMAGE [PATH2] if(resultCode == Activity.RESULT_CANCELED...
true
ok
{"focal": {"class": "PhotoTaker", "name": "onActivityResult", "signature": "void onActivityResult(int requestCode, int resultCode, Intent data)", "start_line": 3, "modifiers": "public", "params": [{"name": "requestCode", "type": "int"}, {"name": "resultCode", "type": "int"}, {"name": "data", "type": "Intent"}], "return...
3216014_3
class LoremIpsum { public static double variance(double[] values) { double[] squared = new double[values.length]; for (int i = 0; i < values.length; i++) { squared[i] = values[i] * values[i]; } double meanVal = mean(values); return mean(squared) - (meanVal * mea...
double[] ia1 = { 6.0d, 6.0d, 4.0d, 4.0d }; assertEquals(1.0d, LoremIpsum.variance(ia1), 0.01d); double[] ia2 = { 1.0d, 2.0d, 3.0d, 4.0d }; assertEquals(1.25d, LoremIpsum.variance(ia2), 0.01d); } }
[FOCAL] public static double LoremIpsum.variance(double[] values) [CLASS] class LoremIpsum [METRICS] loc=9 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] double mean(int[] values) [PATH1] for(i < values.length)=T -> exit loop -> return mean(squared) - (meanVal * meanVal) [PATH2] for(i < values.le...
/* static context [FOCAL] public static double LoremIpsum.variance(double[] values) [PATH1] for(i < values.length)=T -> exit loop -> return mean(squared) - (meanVal * meanVal) [PATH2] for(i < values.length)=F -> return mean(squared) - (meanVal * meanVal) [INPUTS] branches=values | result=values [CALLS-INTERNAL] double ...
/* static context [FOCAL] public static double LoremIpsum.variance(double[] values) [PATH1] for(i < values.length)=T -> exit loop -> return mean(squared) - (meanVal * meanVal) [PATH2] for(i < values.length)=F -> return mean(squared) - (meanVal * meanVal) [INPUTS] branches=values | result=values [CALLS-INTERNAL] double ...
true
ok
{"focal": {"class": "LoremIpsum", "name": "variance", "signature": "double variance(double[] values)", "start_line": 3, "modifiers": "public static", "params": [{"name": "values", "type": "double[]"}], "return_type": "double"}, "class_info": {"name": "LoremIpsum", "kind": "class", "modifiers": "", "superclass": null, "...
3224235_1
class SoftmaxClassifier implements ProbabilisticClassifier<F,L>, Serializable { public Accuracy train(List<LabeledDatum<F,L>> Data) { trainScores = getTrainingResults(Data); int[] GTLabels = makeLabelVector(Data); int[] Predictions = trainScores.columnArgmaxs(); TrainAccuracy = new Accuracy(Predictions, GTL...
int numItems = 400; String dir = "data/parsed"; DataSet<LabeledDatum<Double, Integer>,Double> Dataset = new DataSet<LabeledDatum<Double, Integer>,Double>(numItems); int l = 0; double[] x = new double[2]; try { FileInputStream fstream = new FileInputStream(dir + "/fournary_test.txt"); DataInputS...
[FOCAL] public Accuracy SoftmaxClassifier.train(List<LabeledDatum<F,L>> Data) [CLASS] class SoftmaxClassifier implements ProbabilisticClassifier<F,L>, Serializable [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] DoubleMatrix getTrainingResults(List<LabeledDatum<F,L>> Data); int[] m...
/* static context [FOCAL] public Accuracy SoftmaxClassifier.train(List<LabeledDatum<F,L>> Data) [COLLABORATORS] field trainScores columnArgmaxs/0 [CALLS-INTERNAL] DoubleMatrix getTrainingResults(List<LabeledDatum<F,L>> Data); int[] makeLabelVector(List<LabeledDatum<F,L>> Data) [NEW] Accuracy [CALLS-EXTERNAL] trainScore...
/* static context [FOCAL] public Accuracy SoftmaxClassifier.train(List<LabeledDatum<F,L>> Data) [COLLABORATORS] field trainScores columnArgmaxs/0 [CALLS-INTERNAL] DoubleMatrix getTrainingResults(List<LabeledDatum<F,L>> Data); int[] makeLabelVector(List<LabeledDatum<F,L>> Data) [NEW] Accuracy [CALLS-EXTERNAL] trainScore...
true
ok
{"focal": {"class": "SoftmaxClassifier", "name": "train", "signature": "Accuracy train(List<LabeledDatum<F,L>> Data)", "start_line": 3, "modifiers": "public", "params": [{"name": "Data", "type": "List<LabeledDatum<F,L>>"}], "return_type": "Accuracy"}, "class_info": {"name": "SoftmaxClassifier", "kind": "class", "modifi...
3242289_6
class AuthenticatorActivity extends AccountAuthenticatorFragmentActivity implements Injectable { @OnClick(R.id.auth_btn_login) public void login() { String username = mTxtUsername.getText().toString(); String password = mTxtPassword.getText().toString(); if (username.isEmpty() || passw...
final String username = "username"; final String password = "password"; authenticator.mAuthenticator = mock(fi.bitrite.android.ws.auth.Authenticator.class); when(authenticator.mAuthenticator.login( new Account(username, MOCK_ACCOUNT_TYPE), password, ...
[FOCAL] @OnClick(R.id.auth_btn_login) public void AuthenticatorActivity.login() [CLASS] class AuthenticatorActivity extends AccountAuthenticatorFragmentActivity implements Injectable [METRICS] loc=21 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] mTxtUsername.getText().toString/0, mTxtUsername.ge...
/* static context [FOCAL] @OnClick(R.id.auth_btn_login) public void AuthenticatorActivity.login() [PATH1] if(username.isEmpty() || password.isEmpty())=T -> return [PATH2] if(username.isEmpty() || password.isEmpty())=F [COLLABORATORS] field mTxtUsername getText/0; field mTxtPassword getText/0; field mAuthenticator login...
/* static context [FOCAL] @OnClick(R.id.auth_btn_login) public void AuthenticatorActivity.login() [PATH1] if(username.isEmpty() || password.isEmpty())=T -> return [PATH2] if(username.isEmpty() || password.isEmpty())=F [COLLABORATORS] field mTxtUsername getText/0; field mTxtPassword getText/0; field mAuthenticator login...
true
ok
{"focal": {"class": "AuthenticatorActivity", "name": "login", "signature": "void login()", "start_line": 3, "modifiers": "@OnClick(R.id.auth_btn_login) public", "params": [], "return_type": "void"}, "class_info": {"name": "AuthenticatorActivity", "kind": "class", "modifiers": "", "superclass": "AccountAuthenticatorFrag...
3249257_3
class BulkJSONDataESSink extends SimpleJSONDataESSink { protected String getBulkData(List<SimpleDataEvent> events) { StringBuilder builder = new StringBuilder(); for (SimpleDataEvent event : events) { builder.append(JSONUtils.getElasticSearchBulkHeader(event, this.indexName, this.typeName)); buil...
BulkJSONDataESSink sink = new BulkJSONDataESSink(); Map<String, String> properties = new HashMap<String, String>(); properties.put(SimpleJSONDataESSink.ES_BASE_URL_KEY, "http://localhost:9200"); properties.put(SimpleJSONDataESSink.ES_INDEX_NAME_KEY, "test"); properties.put(SimpleJSONDataESSink.ES_TY...
[FOCAL] protected String BulkJSONDataESSink.getBulkData(List<SimpleDataEvent> events) [CLASS] class BulkJSONDataESSink extends SimpleJSONDataESSink [METRICS] loc=10 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] StringBuilder.append/1, JSONUtils.getElasticSearchBulkHeader/3, JSONUtils.getElasticS...
/* static context [FOCAL] protected String BulkJSONDataESSink.getBulkData(List<SimpleDataEvent> events) [PATH1] foreach(SimpleDataEvent event : events)=T -> exit loop -> return builder.toString() [PATH2] foreach(SimpleDataEvent event : events)=F -> return builder.toString() [INPUTS] branches=events | result=- [FIELDS] ...
/* static context [FOCAL] protected String BulkJSONDataESSink.getBulkData(List<SimpleDataEvent> events) [PATH1] foreach(SimpleDataEvent event : events)=T -> exit loop -> return builder.toString() [PATH2] foreach(SimpleDataEvent event : events)=F -> return builder.toString() [INPUTS] branches=events | result=- [FIELDS] ...
true
ok
{"focal": {"class": "BulkJSONDataESSink", "name": "getBulkData", "signature": "String getBulkData(List<SimpleDataEvent> events)", "start_line": 3, "modifiers": "protected", "params": [{"name": "events", "type": "List<SimpleDataEvent>"}], "return_type": "String"}, "class_info": {"name": "BulkJSONDataESSink", "kind": "cl...
3250434_237
class MapIdField { public void remove(String mapId) { mappedObjects.remove(mapId); } public MapIdField(); public void put(String mapId, Object value); public Object get(String mapId); public boolean containsMapId(String mapId); private MapIdField mapIdField; } class MapIdField...
mapIdField.put("aMapId", "aMapIdValue"); mapIdField.remove("aMapId"); assertFalse(mapIdField.containsMapId("aMapId")); } }
[FOCAL] public void MapIdField.remove(String mapId) [CLASS] class MapIdField [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] mappedObjects.remove/1 [COLLABORATORS] field mappedObjects remove/1 [DATAFLOW] mapId@param->L2 [CLASS-MEMBERS] MapIdField(); void put(String mapId, Object va...
/* static context [FOCAL] public void MapIdField.remove(String mapId) [COLLABORATORS] field mappedObjects remove/1 [CALLS-EXTERNAL] mappedObjects.remove/1 */
/* static context [FOCAL] public void MapIdField.remove(String mapId) [COLLABORATORS] field mappedObjects remove/1 [CALLS-EXTERNAL] mappedObjects.remove/1 */ class MapIdField { public void remove(String mapId) { mappedObjects.remove(mapId); } public MapIdField(); public void put(String mapId...
true
ok
{"focal": {"class": "MapIdField", "name": "remove", "signature": "void remove(String mapId)", "start_line": 3, "modifiers": "public", "params": [{"name": "mapId", "type": "String"}], "return_type": "void"}, "class_info": {"name": "MapIdField", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "f...
3256677_0
class FormatProfiler extends Configured implements Tool { public void createJobConf(JobConf conf, String[] args) throws IOException { log.info("Loading paths..."); String line = null; List<Path> paths = new ArrayList<Path>(); BufferedReader br = new BufferedReader( new FileReader( args[ 0 ] ) ); while( ( li...
// prepare for test //createTextInputFile(); log.info("Checking input file is present..."); // Check that the input file is present: Path[] inputFiles = FileUtil.stat2Paths(getFileSystem().listStatus( input, new OutputLogFilter())); Assert.assertEquals(1, inputFiles.length); // Set up arguments fo...
[FOCAL] public void FormatProfiler.createJobConf(JobConf conf, String[] args) [CLASS] class FormatProfiler extends Configured implements Tool [METRICS] loc=44 cc=2 branches=0 loops=1 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] Log.info/1, BufferedReader.readLine/0, List<Path>.add/1, BufferedReader.close/0, FileInputF...
/* static context [FOCAL] public void FormatProfiler.createJobConf(JobConf conf, String[] args) [PATH1] while(( line = br.readLine() ) != null)=T -> exit loop [PATH2] while(( line = br.readLine() ) != null)=F [INPUTS] branches=args | result=- [COLLABORATORS] param conf:JobConf setJobName/1,setInputFormat/1,setMapperCla...
/* static context [FOCAL] public void FormatProfiler.createJobConf(JobConf conf, String[] args) [PATH1] while(( line = br.readLine() ) != null)=T -> exit loop [PATH2] while(( line = br.readLine() ) != null)=F [INPUTS] branches=args | result=- [COLLABORATORS] param conf:JobConf setJobName/1,setInputFormat/1,setMapperCla...
true
ok
{"focal": {"class": "FormatProfiler", "name": "createJobConf", "signature": "void createJobConf(JobConf conf, String[] args) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "conf", "type": "JobConf"}, {"name": "args", "type": "String[]"}], "return_type": "void"}, "class_info": {"name": ...
3263787_707
class FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formSubmissionsRepository.findByInstanceId(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logger.warn("Cou...
FormSubmission formSubmission = new FormSubmission("anm id 1", "instance id 1", "child_close", "entity id 1", 0L, "1", null, 0L); when(formSubmissionsRepository.findByInstanceId("instance id 1")).thenReturn(formSubmission); router.route("instance id 1"); verify(formSubmissionsRepositor...
[FOCAL] public void FormSubmissionRouter.route(String instanceId) [CLASS] class FormSubmissionRouter [METRICS] loc=19 cc=3 branches=1 loops=0 returns=1 throws=1 nesting=1 [CALLS-EXTERNAL] AllFormSubmissions.findByInstanceId/1, handlerMap.get/1, FormSubmission.formName/0, logger.warn/1, logger.info/1, format/4 (inherite...
class FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formSubmissionsRepository.findByInstanceId(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logger.warn("Cou...
false
ok
{"focal": {"class": "FormSubmissionRouter", "name": "route", "signature": "void route(String instanceId) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "instanceId", "type": "String"}], "return_type": "void"}, "class_info": {"name": "FormSubmissionRouter", "kind": "class", "modifiers": "...
3291848_10
class RedirectionActionHelper { public static String buildFormPostContent(final WebContext context) { final String requestedUrl = context.getFullRequestURL(); final Map<String, String[]> parameters = context.getRequestParameters(); final StringBuilder buffer = new StringBuilder(); b...
final String content = RedirectionActionHelper.buildFormPostContent(MockWebContext.create().setFullRequestURL(CALLBACK_URL)); assertEquals("<html>\n<body>\n<form action=\"" + CALLBACK_URL + "\" name=\"f\" method=\"post\">\n" + "<input value='POST' type='submit' />\n</form>\n" + "...
[FOCAL] public static String RedirectionActionHelper.buildFormPostContent(WebContext context) [CLASS] class RedirectionActionHelper [METRICS] loc=22 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=3 [CALLS-INTERNAL] String escapeHtml(String s) [CALLS-EXTERNAL] WebContext.getFullRequestURL/0, WebContext.getRequestPar...
/* static context [FOCAL] public static String RedirectionActionHelper.buildFormPostContent(WebContext context) [PATH1] if(parameters != null)=T -> foreach(Map.Entry<String, String[]> entry : parameters.entrySet())=T -> if(values != null && values.length > 0)=T -> exit loop -> return buffer.toString() [PATH2] if(parame...
/* static context [FOCAL] public static String RedirectionActionHelper.buildFormPostContent(WebContext context) [PATH1] if(parameters != null)=T -> foreach(Map.Entry<String, String[]> entry : parameters.entrySet())=T -> if(values != null && values.length > 0)=T -> exit loop -> return buffer.toString() [PATH2] if(parame...
true
ok
{"focal": {"class": "RedirectionActionHelper", "name": "buildFormPostContent", "signature": "String buildFormPostContent(WebContext context)", "start_line": 3, "modifiers": "public static", "params": [{"name": "context", "type": "WebContext"}], "return_type": "String"}, "class_info": {"name": "RedirectionActionHelper",...
3293934_46
class KafkaAdapter extends CommAdapter<String> { public Flowable<String> messages (String destination) { return messageReceiver.messages(destination).map(incomingMessage -> incomingMessage.message); } KafkaAdapter(MessageSender messageSender, MessageReceiver messageReceiver, ...
String topic = "topic4SubsErrorTest"; ensureTopicsExists(topic); // send two good and one bad message KafkaProducer<String, String> stringProducer = kafkaHelper.createStringProducer(); stringProducer.send(new ProducerRecord<>(topic, "1")).get(); logger.error("Sent 1"); ...
[FOCAL] public Flowable<String> KafkaAdapter.messages(String destination) [CLASS] class KafkaAdapter extends CommAdapter<String> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] messageReceiver.messages(destination).map/1, messageReceiver.messages/1 [INPUTS] branches=- | result=dest...
/* static context [FOCAL] public Flowable<String> KafkaAdapter.messages(String destination) [INPUTS] branches=- | result=destination [COLLABORATORS] field messageReceiver messages/1 [CALLS-EXTERNAL] messageReceiver.messages(destination).map/1, messageReceiver.messages/1 */
/* static context [FOCAL] public Flowable<String> KafkaAdapter.messages(String destination) [INPUTS] branches=- | result=destination [COLLABORATORS] field messageReceiver messages/1 [CALLS-EXTERNAL] messageReceiver.messages(destination).map/1, messageReceiver.messages/1 */ class KafkaAdapter extends CommAdapter<String>...
true
ok
{"focal": {"class": "KafkaAdapter", "name": "messages", "signature": "Flowable<String> messages(String destination)", "start_line": 3, "modifiers": "public", "params": [{"name": "destination", "type": "String"}], "return_type": "Flowable<String>"}, "class_info": {"name": "KafkaAdapter", "kind": "class", "modifiers": ""...
3296177_17
class JsonUtils { public static boolean nodeAbsent(Object json, String path, Configuration configuration) { return nodeAbsent(json, Path.create(path), configuration); } public static Node convertToJson(Object source, String label); public static Node convertToJson(Object source, String label, ...
// JSON string has to be double escaped (once for Java, once for JSON) assertFalse(nodeAbsent("{\"test\\\\backslash\":{\"value\":1}}", Path.create("test\\backslash"), false)); } }
[FOCAL] public static boolean JsonUtils.nodeAbsent(Object json, String path, Configuration configuration) [CLASS] class JsonUtils [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] boolean nodeAbsent(Object json, Path path, Configuration configuration) [CALLS-EXTERNAL] Path.create/1 [...
/* static context [FOCAL] public static boolean JsonUtils.nodeAbsent(Object json, String path, Configuration configuration) [INPUTS] branches=- | result=configuration, json, path [CALLS-INTERNAL] boolean nodeAbsent(Object json, Path path, Configuration configuration) [CALLS-EXTERNAL] Path.create/1 */
/* static context [FOCAL] public static boolean JsonUtils.nodeAbsent(Object json, String path, Configuration configuration) [INPUTS] branches=- | result=configuration, json, path [CALLS-INTERNAL] boolean nodeAbsent(Object json, Path path, Configuration configuration) [CALLS-EXTERNAL] Path.create/1 */ class JsonUtils { ...
true
ok
{"focal": {"class": "JsonUtils", "name": "nodeAbsent", "signature": "boolean nodeAbsent(Object json, String path, Configuration configuration)", "start_line": 3, "modifiers": "public static", "params": [{"name": "json", "type": "Object"}, {"name": "path", "type": "String"}, {"name": "configuration", "type": "Configurat...
3308294_2
class JavaDocUtils { public String getParameterSummary(String paramName, Element element) { String comment = elements.getDocComment(element); if (StringUtils.isBlank(comment)) { return null; } comment = comment.trim(); StringBuilder parameterCommentBuilder = ne...
when(elements.getDocComment(executableElement)).thenReturn("\n" + " Bla bla bla\n" + " \n" + " @param name the name\n" + " @param content the content"); JavaDocUtils javaDocUtils = new JavaDocUtils(elements); assertE...
[FOCAL] public String JavaDocUtils.getParameterSummary(String paramName, Element element) [CLASS] class JavaDocUtils [METRICS] loc=52 cc=12 branches=8 loops=3 returns=3 throws=0 nesting=4 [CALLS-EXTERNAL] Elements.getDocComment/1, StringUtils.isBlank/1, String.trim/0, StringTokenizer.hasMoreTokens/0, st.nextToken().tri...
/* static context [FOCAL] public String JavaDocUtils.getParameterSummary(String paramName, Element element) [PATH1] if(StringUtils.isBlank(comment))=F -> while(st.hasMoreTokens())=T -> if(nextToken.startsWith("@param " + paramName + " " ) || nextToken.equals("@param " + paramName))=F -> if(nextToken.startsWith("@"))=T ...
/* static context [FOCAL] public String JavaDocUtils.getParameterSummary(String paramName, Element element) [PATH1] if(StringUtils.isBlank(comment))=F -> while(st.hasMoreTokens())=T -> if(nextToken.startsWith("@param " + paramName + " " ) || nextToken.equals("@param " + paramName))=F -> if(nextToken.startsWith("@"))=T ...
true
ok
{"focal": {"class": "JavaDocUtils", "name": "getParameterSummary", "signature": "String getParameterSummary(String paramName, Element element)", "start_line": 3, "modifiers": "public", "params": [{"name": "paramName", "type": "String"}, {"name": "element", "type": "Element"}], "return_type": "String"}, "class_info": {"...
3314133_111
class UpdatePacketDecoder { public BGPv4Packet decodeUpdatePacket(ByteBuf buffer) { UpdatePacket packet = new UpdatePacket(); ProtocolPacketUtils.verifyPacketSize(buffer, BGPv4Constants.BGP_PACKET_MIN_SIZE_UPDATE, -1); if(buffer.readableBytes() < 2) throw new MalformedAttributeListException(); // ...
(new AssertExecption() { @Override protected void doExecute() { decoder.decodeUpdatePacket(buildProtocolPacket(new byte[] { // (byte)0x03, // type code UPDATE 0x00, 0x00, // withdrawn routes length (0 octets) 0x00, 0x02, // Total path attributes length (2 octets), points to end of pa...
[FOCAL] public BGPv4Packet UpdatePacketDecoder.decodeUpdatePacket(ByteBuf buffer) [CLASS] class UpdatePacketDecoder [METRICS] loc=69 cc=15 branches=9 loops=1 returns=1 throws=8 nesting=3 [CALLS-INTERNAL] List<NetworkLayerReachabilityInformation> decodeWithdrawnRoutes(ByteBuf buffer); List<PathAttribute> decodePathAttri...
/* static context [FOCAL] public BGPv4Packet UpdatePacketDecoder.decodeUpdatePacket(ByteBuf buffer) [THROWS-WHEN] MalformedAttributeListException when buffer.readableBytes() < 2 [THROWS-WHEN] MalformedAttributeListException when !(buffer.readableBytes() < 2) && withdrawnOctets > buffer.readableBytes() [THROWS-WHEN] Mal...
/* static context [FOCAL] public BGPv4Packet UpdatePacketDecoder.decodeUpdatePacket(ByteBuf buffer) [THROWS-WHEN] MalformedAttributeListException when buffer.readableBytes() < 2 [THROWS-WHEN] MalformedAttributeListException when !(buffer.readableBytes() < 2) && withdrawnOctets > buffer.readableBytes() [THROWS-WHEN] Mal...
true
ok
{"focal": {"class": "UpdatePacketDecoder", "name": "decodeUpdatePacket", "signature": "BGPv4Packet decodeUpdatePacket(ByteBuf buffer)", "start_line": 3, "modifiers": "public", "params": [{"name": "buffer", "type": "ByteBuf"}], "return_type": "BGPv4Packet"}, "class_info": {"name": "UpdatePacketDecoder", "kind": "class",...
3315140_46
class ProvisioningCLI { public static void main(String... args) { loadJDKLoggingConfiguration(); // Injector injector = Guice.createInjector(new LoggerModule()); // ProvisioningCLI provisioningCLI = injector.getInstance(ProvisioningCLI.class); new ProvisioningCLI().startCLI(args); ...
final String configPath = "/home/user/.clustermeister/configuration.properties"; final String argLine = "--config "+configPath+" --provider amazon"; provisioningCLI.parseArguments(buildArgs(argLine)); assertEquals(configPath, provisioningCLI.getConfigFilePath()); assertEquals(Pro...
[FOCAL] public static void ProvisioningCLI.main(String... args) [CLASS] class ProvisioningCLI [METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void loadJDKLoggingConfiguration() [CALLS-EXTERNAL] new ProvisioningCLI().startCLI/1 [NEW] ProvisioningCLI [DATAFLOW] args@param->L5 [CLASS-...
/* static context [FOCAL] public static void ProvisioningCLI.main(String... args) [CALLS-INTERNAL] void loadJDKLoggingConfiguration() [NEW] ProvisioningCLI [CALLS-EXTERNAL] new ProvisioningCLI().startCLI/1 */
/* static context [FOCAL] public static void ProvisioningCLI.main(String... args) [CALLS-INTERNAL] void loadJDKLoggingConfiguration() [NEW] ProvisioningCLI [CALLS-EXTERNAL] new ProvisioningCLI().startCLI/1 */ class ProvisioningCLI { public static void main(String... args) { loadJDKLoggingConfiguration(); /...
true
ok
{"focal": {"class": "ProvisioningCLI", "name": "main", "signature": "void main(String... args)", "start_line": 3, "modifiers": "public static", "params": [{"name": "args", "type": "String..."}], "return_type": "void"}, "class_info": {"name": "ProvisioningCLI", "kind": "class", "modifiers": "", "superclass": null, "inte...
3319591_6
class WktParser { public Geometry parse(String wkt) { if (wkt != null) { tempWkt = wkt; if (skip(org.geomajas.geometry.Geometry.MULTI_POLYGON.toUpperCase())) { return parseMultiPolygon(); } else if (skip(org.geomajas.geometry.Geometry.POLYGON.toUpperCase())) { return parsePolygon(); } else if (s...
Geometry geometry = parser.parse(MULTIPOLYGON1); Assert.assertNotNull(geometry); Assert.assertTrue(geometry instanceof MultiPolygon); MultiPolygon mp = (MultiPolygon) geometry; Assert.assertEquals(2, mp.getNumGeometries()); geometry = parser.parse(MULTIPOLYGON2); Assert.assertNotNull(geometry); Assert....
[FOCAL] public Geometry WktParser.parse(String wkt) [CLASS] class WktParser [METRICS] loc=19 cc=8 branches=7 loops=0 returns=7 throws=0 nesting=7 [CALLS-INTERNAL] LineString parseLineString(); MultiLineString parseMultiLineString(); MultiPoint parseMultiPoint(); MultiPolygon parseMultiPolygon(); Point parsePoint(); Pol...
/* static context [FOCAL] public Geometry WktParser.parse(String wkt) [PATH1] if(wkt != null)=T -> if(skip(org.geomajas.geometry.Geometry.MULTI_POLYGON.toUpperCase()))=F -> if(skip(org.geomajas.geometry.Geometry.POLYGON.toUpperCase()))=F -> if(skip(org.geomajas.geometry.Geometry.MULTI_LINE_STRING.toUpperCase()))=F -> i...
/* static context [FOCAL] public Geometry WktParser.parse(String wkt) [PATH1] if(wkt != null)=T -> if(skip(org.geomajas.geometry.Geometry.MULTI_POLYGON.toUpperCase()))=F -> if(skip(org.geomajas.geometry.Geometry.POLYGON.toUpperCase()))=F -> if(skip(org.geomajas.geometry.Geometry.MULTI_LINE_STRING.toUpperCase()))=F -> i...
true
ok
{"focal": {"class": "WktParser", "name": "parse", "signature": "Geometry parse(String wkt)", "start_line": 3, "modifiers": "public", "params": [{"name": "wkt", "type": "String"}], "return_type": "Geometry"}, "class_info": {"name": "WktParser", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "f...
3328338_6
class DuoShibboleth { public boolean verifyResponseEqualsUsername(String duoResponse) { try { String duoVerifiedResponse = DuoWeb.verifyResponse(ikey, skey, akey, duoResponse); boolean usernameMatches = duoVerifiedResponse.equals(username); if (usernameMatches) { ...
String response = ""; assertFalse(duoShibboleth.verifyResponseEqualsUsername(response)); } }
[FOCAL] public boolean DuoShibboleth.verifyResponseEqualsUsername(String duoResponse) [CLASS] class DuoShibboleth [METRICS] loc=15 cc=3 branches=1 loops=0 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] DuoWeb.verifyResponse/4, String.equals/1, log.info/1, log.error/2 [EXCEPTIONS] catches Exception e [PATH1] try-body thr...
/* static context [FOCAL] public boolean DuoShibboleth.verifyResponseEqualsUsername(String duoResponse) [PATH1] try-body throws -> return false [PATH2] if(usernameMatches)=T -> return true [PATH3] if(usernameMatches)=F -> return false [INPUTS] branches=duoResponse | result=- [EXCEPTIONS] catches Exception e [CALLS-EXTE...
/* static context [FOCAL] public boolean DuoShibboleth.verifyResponseEqualsUsername(String duoResponse) [PATH1] try-body throws -> return false [PATH2] if(usernameMatches)=T -> return true [PATH3] if(usernameMatches)=F -> return false [INPUTS] branches=duoResponse | result=- [EXCEPTIONS] catches Exception e [CALLS-EXTE...
true
ok
{"focal": {"class": "DuoShibboleth", "name": "verifyResponseEqualsUsername", "signature": "boolean verifyResponseEqualsUsername(String duoResponse)", "start_line": 3, "modifiers": "public", "params": [{"name": "duoResponse", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "DuoShibboleth", "kind": ...
3333998_352
class BleutradeDigest extends BaseParamsDigest { @Override public String digestParams(RestInvocation restInvocation) { String invocationUrl = restInvocation.getInvocationUrl(); Mac mac = getMac(); mac.update(invocationUrl.getBytes()); return String.format("%0128x", new BigInteger(1, mac.doFinal()...
// given RestInvocation invocation = new RestInvocation(null, null, null, null, "rest body", null, null, null); String expected = "6372f349eea659b26f5e01bc76e1485de744a1894d5e036b98eca724a8104719ea8767518286863d1becd0a1313ad5e7e507749f7cdb98a4dee92fec055643c4"; // when String encode...
[FOCAL] @Override public String BleutradeDigest.digestParams(RestInvocation restInvocation) [CLASS] class BleutradeDigest extends BaseParamsDigest [METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] RestInvocation.getInvocationUrl/0, getMac/0 (inherited), Mac.update/1, String.getBytes/...
/* static context [FOCAL] @Override public String BleutradeDigest.digestParams(RestInvocation restInvocation) [COLLABORATORS] param restInvocation:RestInvocation getInvocationUrl/0 [NEW] BigInteger [CALLS-EXTERNAL] RestInvocation.getInvocationUrl/0, getMac/0 (inherited), Mac.update/1, String.getBytes/0, String.format/2...
/* static context [FOCAL] @Override public String BleutradeDigest.digestParams(RestInvocation restInvocation) [COLLABORATORS] param restInvocation:RestInvocation getInvocationUrl/0 [NEW] BigInteger [CALLS-EXTERNAL] RestInvocation.getInvocationUrl/0, getMac/0 (inherited), Mac.update/1, String.getBytes/0, String.format/2...
true
ok
{"focal": {"class": "BleutradeDigest", "name": "digestParams", "signature": "String digestParams(RestInvocation restInvocation)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "restInvocation", "type": "RestInvocation"}], "return_type": "String"}, "class_info": {"name": "BleutradeDigest", "kind"...
3337772_506
class EnableHlsTaskRunner extends BaseHlsTaskRunner { public String performTask(String taskParameters) { EnableStreamingTaskParameters taskParams = EnableStreamingTaskParameters.deserialize(taskParameters); String spaceId = taskParams.getSpaceId(); boolean secure = taskParams.i...
// Expect calls to get bucket name EasyMock.expect(unwrappedS3Provider.getBucketName(EasyMock.isA(String.class))) .andReturn(bucketName); // Origin Access Id already exists and is reused expectExistingOriginAccessId(); // Distribution exists, is set to OPEN stre...
[FOCAL] public String EnableHlsTaskRunner.performTask(String taskParameters) [CLASS] class EnableHlsTaskRunner extends BaseHlsTaskRunner [METRICS] loc=154 cc=7 branches=6 loops=0 returns=1 throws=1 nesting=2 [CALLS-INTERNAL] String getOriginAccessId(); void setBucketAccessPolicy(String bucketName, String oaIdentityId);...
class EnableHlsTaskRunner extends BaseHlsTaskRunner { public String performTask(String taskParameters) { EnableStreamingTaskParameters taskParams = EnableStreamingTaskParameters.deserialize(taskParameters); String spaceId = taskParams.getSpaceId(); boolean secure = taskParams.i...
false
ok
{"focal": {"class": "EnableHlsTaskRunner", "name": "performTask", "signature": "String performTask(String taskParameters)", "start_line": 3, "modifiers": "public", "params": [{"name": "taskParameters", "type": "String"}], "return_type": "String"}, "class_info": {"name": "EnableHlsTaskRunner", "kind": "class", "modifier...
3352045_33
class ESMClass { public ESMClass setSpecificFeature(GSMSpecificFeature specificFeature) { value = GSMSpecificFeature.compose(value, specificFeature); return this; } public ESMClass(); public ESMClass(int value); public ESMClass(byte value); public ESMClass(MessageMode messa...
assertTrue(GSMSpecificFeature.DEFAULT.containedIn(esmClass)); esmClass.setSpecificFeature(GSMSpecificFeature.UDHI); assertTrue(GSMSpecificFeature.UDHI.containedIn(esmClass)); } }
[FOCAL] public ESMClass ESMClass.setSpecificFeature(GSMSpecificFeature specificFeature) [CLASS] class ESMClass [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] GSMSpecificFeature.compose/2 [DATAFLOW] specificFeature@param->L2 [CLASS-MEMBERS] ESMClass(); ESMClass(int value); ESMClass...
/* static context [FOCAL] public ESMClass ESMClass.setSpecificFeature(GSMSpecificFeature specificFeature) [CALLS-EXTERNAL] GSMSpecificFeature.compose/2 */
/* static context [FOCAL] public ESMClass ESMClass.setSpecificFeature(GSMSpecificFeature specificFeature) [CALLS-EXTERNAL] GSMSpecificFeature.compose/2 */ class ESMClass { public ESMClass setSpecificFeature(GSMSpecificFeature specificFeature) { value = GSMSpecificFeature.compose(value, specificFeature); ...
true
ok
{"focal": {"class": "ESMClass", "name": "setSpecificFeature", "signature": "ESMClass setSpecificFeature(GSMSpecificFeature specificFeature)", "start_line": 3, "modifiers": "public", "params": [{"name": "specificFeature", "type": "GSMSpecificFeature"}], "return_type": "ESMClass"}, "class_info": {"name": "ESMClass", "kin...
3360581_13
class MessageUtils { public static String serializeMsgstr(Message message) { if (message.isPlural()) { StringBuilder sb = new StringBuilder(); List<String> plurals = message.getMsgstrPlural(); for (Iterator<String> it=plurals.iterator(); it.hasNext(); ) { ...
Message msg = new Message(); msg.setMsgid("id"); msg.setMsgstr("str"); Assert.assertEquals("str", MessageUtils.serializeMsgstr(msg)); } }
[FOCAL] public static String MessageUtils.serializeMsgstr(Message message) [CLASS] class MessageUtils [METRICS] loc=17 cc=4 branches=2 loops=1 returns=2 throws=0 nesting=3 [CALLS-EXTERNAL] Message.isPlural/0, Message.getMsgstrPlural/0, List<String>.iterator/0, Iterator<String>.hasNext/0, Iterator<String>.next/0, String...
/* static context [FOCAL] public static String MessageUtils.serializeMsgstr(Message message) [PATH1] if(message.isPlural())=T -> for(it.hasNext())=T -> if(it.hasNext())=T -> exit loop -> return sb.toString() [PATH2] if(message.isPlural())=F -> return msgstr == null ? "" : msgstr [PATH3] if(message.isPlural())=T -> for(...
/* static context [FOCAL] public static String MessageUtils.serializeMsgstr(Message message) [PATH1] if(message.isPlural())=T -> for(it.hasNext())=T -> if(it.hasNext())=T -> exit loop -> return sb.toString() [PATH2] if(message.isPlural())=F -> return msgstr == null ? "" : msgstr [PATH3] if(message.isPlural())=T -> for(...
true
ok
{"focal": {"class": "MessageUtils", "name": "serializeMsgstr", "signature": "String serializeMsgstr(Message message)", "start_line": 3, "modifiers": "public static", "params": [{"name": "message", "type": "Message"}], "return_type": "String"}, "class_info": {"name": "MessageUtils", "kind": "class", "modifiers": "", "su...
3362935_1
class OnDemandScreenshotService { static Map<String, String> keyValueMapFor(String logLine) { Map<String, String> keyValueMap = new HashMap<String, String>(); Matcher matcher = KEY_VALUE_HOLDER_PATTERN.matcher(logLine); if (matcher.find()) { for (String keyValuePair : matcher.gr...
assertThat(keyValueMapFor("{name=ConfigureMorseActivity-SOS}"), IsMap.containingOnly("name", "ConfigureMorseActivity-SOS")); } }
[FOCAL] static Map<String, String> OnDemandScreenshotService.keyValueMapFor(String logLine) [CLASS] class OnDemandScreenshotService [METRICS] loc=15 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=3 [CALLS-EXTERNAL] KEY_VALUE_HOLDER_PATTERN.matcher/1, Matcher.find/0, matcher.group(1).split/1, Matcher.group/1, String...
/* static context [FOCAL] static Map<String, String> OnDemandScreenshotService.keyValueMapFor(String logLine) [PATH1] if(matcher.find())=T -> foreach(String keyValuePair : matcher.group(1).split(","))=T -> if(separatorIndex > 0)=T -> exit loop -> return keyValueMap [PATH2] if(matcher.find())=F -> return keyValueMap [PA...
/* static context [FOCAL] static Map<String, String> OnDemandScreenshotService.keyValueMapFor(String logLine) [PATH1] if(matcher.find())=T -> foreach(String keyValuePair : matcher.group(1).split(","))=T -> if(separatorIndex > 0)=T -> exit loop -> return keyValueMap [PATH2] if(matcher.find())=F -> return keyValueMap [PA...
true
ok
{"focal": {"class": "OnDemandScreenshotService", "name": "keyValueMapFor", "signature": "Map<String, String> keyValueMapFor(String logLine)", "start_line": 3, "modifiers": "static", "params": [{"name": "logLine", "type": "String"}], "return_type": "Map<String, String>"}, "class_info": {"name": "OnDemandScreenshotServic...
3370128_31
class Parser { public static JdbcCallParseInfo modifyJdbcCall(String jdbcSql, boolean stdStrings, int serverVersion, int protocolVersion, EscapeSyntaxCallMode escapeSyntaxCallMode) throws SQLException { // Mini-parser for JDBC function-call syntax (only) // TODO: Merge with escape processing (and param...
assertEquals("select * from pack_getValue(?) as result", Parser.modifyJdbcCall("{ ? = call pack_getValue}", true, ServerVersion.v9_6.getVersionNum(), 3, EscapeSyntaxCallMode.SELECT).getSql()); assertEquals("select * from pack_getValue(?,?) as result", Parser.modifyJdbcCall("{ ? = call pack_getValue(?) }", true...
[FOCAL] public static JdbcCallParseInfo Parser.modifyJdbcCall(String jdbcSql, boolean stdStrings, int serverVersion, int protocolVersion, EscapeSyntaxCallMode escapeSyntaxCallMode) [CLASS] class Parser [METRICS] loc=222 cc=44 branches=33 loops=3 returns=2 throws=2 nesting=7 [CALLS-EXTERNAL] String.length/0, String.char...
class Parser { public static JdbcCallParseInfo modifyJdbcCall(String jdbcSql, boolean stdStrings, int serverVersion, int protocolVersion, EscapeSyntaxCallMode escapeSyntaxCallMode) throws SQLException { // Mini-parser for JDBC function-call syntax (only) // TODO: Merge with escape processing (and param...
false
ok
{"focal": {"class": "Parser", "name": "modifyJdbcCall", "signature": "JdbcCallParseInfo modifyJdbcCall(String jdbcSql, boolean stdStrings, int serverVersion, int protocolVersion, EscapeSyntaxCallMode escapeSyntaxCallMode) throws SQLException", "start_line": 3, "modifiers": "public static", "params": [{"name": "jdbcSql"...
3375991_0
class QueryParser implements IQueryParser { @Override public Query parseQuery(String expression) { if (expression == null) { return null; } OqlParser parser = newParser(expression); try { parser.oql(); } catch (RecognitionException e) { ...
String inOql = "DEFINE c='http://localhost:8181/onexus/onx/test' SELECT c (field) FROM c"; Query query = queryParser.parseQuery(inOql); String outOql = query.toString(new StringBuilder(), false).toString(); assertEquals(inOql, outOql); } }
[FOCAL] @Override public Query QueryParser.parseQuery(String expression) [CLASS] class QueryParser implements IQueryParser [METRICS] loc=17 cc=3 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] OqlParser newParser(String expression) [CALLS-EXTERNAL] OqlParser.oql/0, RecognitionException.printStackTrace/...
/* static context [FOCAL] @Override public Query QueryParser.parseQuery(String expression) [PATH1] if(expression == null)=F -> try-body throws -> return parser.getQuery() [PATH2] if(expression == null)=T -> return null [INPUTS] branches=expression | result=expression [EXCEPTIONS] catches RecognitionException e [CALLS-I...
/* static context [FOCAL] @Override public Query QueryParser.parseQuery(String expression) [PATH1] if(expression == null)=F -> try-body throws -> return parser.getQuery() [PATH2] if(expression == null)=T -> return null [INPUTS] branches=expression | result=expression [EXCEPTIONS] catches RecognitionException e [CALLS-I...
true
ok
{"focal": {"class": "QueryParser", "name": "parseQuery", "signature": "Query parseQuery(String expression)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "expression", "type": "String"}], "return_type": "Query"}, "class_info": {"name": "QueryParser", "kind": "class", "modifiers": "", "superclas...
3376848_2
class WebDriverThreadLocalContainer implements WebDriverContainer { @Override @CheckReturnValue public boolean hasWebDriverStarted() { WebDriver webDriver = threadWebDriver.get(currentThread().getId()); return webDriver != null; } @Override public void addListener(WebDriverEventListener listener); ...
assertThat(container.hasWebDriverStarted()).isFalse(); } }
[FOCAL] @Override @CheckReturnValue public boolean WebDriverThreadLocalContainer.hasWebDriverStarted() [CLASS] class WebDriverThreadLocalContainer implements WebDriverContainer [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] threadWebDriver.get/1, currentThread().getId/0, currentTh...
/* static context [FOCAL] @Override @CheckReturnValue public boolean WebDriverThreadLocalContainer.hasWebDriverStarted() [COLLABORATORS] field threadWebDriver get/1 [CALLS-EXTERNAL] threadWebDriver.get/1, currentThread().getId/0, currentThread/0 (inherited) */
/* static context [FOCAL] @Override @CheckReturnValue public boolean WebDriverThreadLocalContainer.hasWebDriverStarted() [COLLABORATORS] field threadWebDriver get/1 [CALLS-EXTERNAL] threadWebDriver.get/1, currentThread().getId/0, currentThread/0 (inherited) */ class WebDriverThreadLocalContainer implements WebDriverCon...
true
ok
{"focal": {"class": "WebDriverThreadLocalContainer", "name": "hasWebDriverStarted", "signature": "boolean hasWebDriverStarted()", "start_line": 3, "modifiers": "@Override @CheckReturnValue public", "params": [], "return_type": "boolean"}, "class_info": {"name": "WebDriverThreadLocalContainer", "kind": "class", "modifie...
3382195_492
class MfaRegisterQRGenerator { public static String getQRCode(String issuer, String accountName, String secretKey) throws WriterException, IOException { if(!StringUtils.hasText(issuer) || issuer.contains(":")) { throw new Ill...
GoogleAuthenticator authenticator = new GoogleAuthenticator(); GoogleAuthenticatorKey key = authenticator.createCredentials(); String encodedQrCode = MfaRegisterQRGenerator.getQRCode("testIssuer", "accountName", key.getKey()); String result = decodeQrPng(encodedQrCode); String[]...
[FOCAL] public static String MfaRegisterQRGenerator.getQRCode(String issuer, String accountName, String secretKey) [CLASS] class MfaRegisterQRGenerator [METRICS] loc=23 cc=3 branches=2 loops=0 returns=1 throws=2 nesting=1 [CALLS-EXTERNAL] StringUtils.hasText/1, String.contains/1, QRCodeWriter.encode/4, String.format/5,...
/* static context [FOCAL] public static String MfaRegisterQRGenerator.getQRCode(String issuer, String accountName, String secretKey) [THROWS-WHEN] IllegalArgumentException when !StringUtils.hasText(issuer) || issuer.contains(":") [THROWS-WHEN] IllegalArgumentException when !(!StringUtils.hasText(issuer) || issuer.conta...
/* static context [FOCAL] public static String MfaRegisterQRGenerator.getQRCode(String issuer, String accountName, String secretKey) [THROWS-WHEN] IllegalArgumentException when !StringUtils.hasText(issuer) || issuer.contains(":") [THROWS-WHEN] IllegalArgumentException when !(!StringUtils.hasText(issuer) || issuer.conta...
true
ok
{"focal": {"class": "MfaRegisterQRGenerator", "name": "getQRCode", "signature": "String getQRCode(String issuer, String accountName, String secretKey) throws WriterException, IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "issuer", "type": "String"}, {"name": "accountName", "type": "St...
3398614_3
class ChannelWriter extends AtmosphereInterceptorWriter { protected String constructStatusAndHeaders(AtmosphereResponse response, int contentLength) { StringBuffer b = new StringBuffer("HTTP/1.1") .append(" ") .append(response.getStatus()) .append(" ") ...
String contentType = "application/json"; Map<String, String> headers = new HashMap<String, String>(); headers.put("Content-Type", contentType); headers.put("X-Custom-Header", "value"); AtmosphereResponse response = setupResponse(headers); int contentLength = 100; ...
[FOCAL] protected String ChannelWriter.constructStatusAndHeaders(AtmosphereResponse response, int contentLength) [CLASS] class ChannelWriter extends AtmosphereInterceptorWriter [METRICS] loc=24 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] new StringBuffer("HTTP/1.1") .append(" ") .append(respon...
/* static context [FOCAL] protected String ChannelWriter.constructStatusAndHeaders(AtmosphereResponse response, int contentLength) [PATH1] if(contentLength != -1)=T -> foreach(String s : headers.keySet())=T -> if(!s.equalsIgnoreCase("Content-Type"))=T -> exit loop -> return b.toString() [PATH2] if(contentLength != -1)=...
/* static context [FOCAL] protected String ChannelWriter.constructStatusAndHeaders(AtmosphereResponse response, int contentLength) [PATH1] if(contentLength != -1)=T -> foreach(String s : headers.keySet())=T -> if(!s.equalsIgnoreCase("Content-Type"))=T -> exit loop -> return b.toString() [PATH2] if(contentLength != -1)=...
true
ok
{"focal": {"class": "ChannelWriter", "name": "constructStatusAndHeaders", "signature": "String constructStatusAndHeaders(AtmosphereResponse response, int contentLength)", "start_line": 3, "modifiers": "protected", "params": [{"name": "response", "type": "AtmosphereResponse"}, {"name": "contentLength", "type": "int"}], ...
3407114_33
class ParseUtil { public static Pair<String, String> parseLspciMachineReadable(String line) { Matcher matcher = LSPCI_MACHINE_READABLE.matcher(line); if (matcher.matches()) { return new Pair<>(matcher.group(1), matcher.group(2)); } return null; } private ParseU...
Pair<String, String> pair = ParseUtil.parseLspciMachineReadable("foo [bar]"); assertEquals("foo", pair.getA()); assertEquals("bar", pair.getB()); assertNull(ParseUtil.parseLspciMachineReadable("Bad format")); } }
[FOCAL] public static Pair<String, String> ParseUtil.parseLspciMachineReadable(String line) [CLASS] class ParseUtil [METRICS] loc=7 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] LSPCI_MACHINE_READABLE.matcher/1, Matcher.matches/0, Matcher.group/1 [NEW] Pair<> [PATH1] if(matcher.matches())=T -> r...
/* static context [FOCAL] public static Pair<String, String> ParseUtil.parseLspciMachineReadable(String line) [PATH1] if(matcher.matches())=T -> return new Pair<>(matcher.group(1), matcher.group(2)) [PATH2] if(matcher.matches())=F -> return null [INPUTS] branches=line | result=line [NEW] Pair<> [CALLS-EXTERNAL] LSPCI_M...
/* static context [FOCAL] public static Pair<String, String> ParseUtil.parseLspciMachineReadable(String line) [PATH1] if(matcher.matches())=T -> return new Pair<>(matcher.group(1), matcher.group(2)) [PATH2] if(matcher.matches())=F -> return null [INPUTS] branches=line | result=line [NEW] Pair<> [CALLS-EXTERNAL] LSPCI_M...
true
ok
{"focal": {"class": "ParseUtil", "name": "parseLspciMachineReadable", "signature": "Pair<String, String> parseLspciMachineReadable(String line)", "start_line": 3, "modifiers": "public static", "params": [{"name": "line", "type": "String"}], "return_type": "Pair<String, String>"}, "class_info": {"name": "ParseUtil", "ki...
3407162_17
class CombinedMessageSelector implements MessageSelector { @Override public boolean matches(final OSCMessageEvent messageEvent) { return logicOperator.matches(selector1.matches(messageEvent), selector2.matches(messageEvent)); } @SuppressWarnings("WeakerAccess") public CombinedMessageSelector( final MessageS...
final MessageSelector matcher = new CombinedMessageSelector( new OSCPatternAddressMessageSelector("/hello"), new OSCPatternTypeTagsMessageSelector("i"), CombinedMessageSelector.LogicOperator.AND); Assert.assertFalse(matches(matcher, "/", "")); Assert.assertFalse(matches(matcher, "/hello", "")); As...
[FOCAL] @Override public boolean CombinedMessageSelector.matches(OSCMessageEvent messageEvent) [CLASS] class CombinedMessageSelector implements MessageSelector [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] logicOperator.matches/2, selector1.matches/1, selector2.matches/1 [INPUTS]...
/* static context [FOCAL] @Override public boolean CombinedMessageSelector.matches(OSCMessageEvent messageEvent) [INPUTS] branches=- | result=messageEvent [COLLABORATORS] field logicOperator matches/2; field selector1 matches/1; field selector2 matches/1 [CALLS-EXTERNAL] logicOperator.matches/2, selector1.matches/1, se...
/* static context [FOCAL] @Override public boolean CombinedMessageSelector.matches(OSCMessageEvent messageEvent) [INPUTS] branches=- | result=messageEvent [COLLABORATORS] field logicOperator matches/2; field selector1 matches/1; field selector2 matches/1 [CALLS-EXTERNAL] logicOperator.matches/2, selector1.matches/1, se...
true
ok
{"focal": {"class": "CombinedMessageSelector", "name": "matches", "signature": "boolean matches(OSCMessageEvent messageEvent)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "messageEvent", "type": "OSCMessageEvent"}], "return_type": "boolean"}, "class_info": {"name": "CombinedMessageSelector", ...
3409328_0
class Subnet implements Serializable { @JsonIgnore public String getId() { return id; } public String getName(); public void setName(String name); @JsonIgnore public boolean isEnableDHCP(); public Boolean getEnableDHCP(); public void setEnableDHCP(Boolean enableDHCP); publi...
Subnet subnet = objectMapper.readValue(SUBNET_JSON, Subnet.class); assertThat(subnet.getId(), is(equalTo(ID))); } }
[FOCAL] @JsonIgnore public String Subnet.getId() [CLASS] class Subnet implements Serializable [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] String getName(); void setName(String name); boolean isEnableDHCP(); Boolean getEnableDHCP(); void setEnableDHCP(Boolean enableDHCP); String ...
/* static context [FOCAL] @JsonIgnore public String Subnet.getId() */
/* static context [FOCAL] @JsonIgnore public String Subnet.getId() */ class Subnet implements Serializable { @JsonIgnore public String getId() { return id; } public String getName(); public void setName(String name); @JsonIgnore public boolean isEnableDHCP(); public Boolean getEnab...
true
ok
{"focal": {"class": "Subnet", "name": "getId", "signature": "String getId()", "start_line": 3, "modifiers": "@JsonIgnore public", "params": [], "return_type": "String"}, "class_info": {"name": "Subnet", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Serializable", "fields": [{"name": "POOL_END", "...
3411081_27
class IOExceptionFactory extends AbstractExceptionFactory<IOException> { @Override public IOException createException(String message) { return new IOException(message); } public IOExceptionFactory(); @Override public boolean indicatesFailure(IOException exception, Dialect dialect); @Override public Excepti...
IOException exception = new IOException(); IOException result = this.factory.createException(exception); assertSame(exception, result); } }
[FOCAL] @Override public IOException IOExceptionFactory.createException(String message) [CLASS] class IOExceptionFactory extends AbstractExceptionFactory<IOException> [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] IOException [INPUTS] branches=- | result=message [DATAFLOW] message@param->L4 ...
/* static context [FOCAL] @Override public IOException IOExceptionFactory.createException(String message) [INPUTS] branches=- | result=message [NEW] IOException */
/* static context [FOCAL] @Override public IOException IOExceptionFactory.createException(String message) [INPUTS] branches=- | result=message [NEW] IOException */ class IOExceptionFactory extends AbstractExceptionFactory<IOException> { @Override public IOException createException(String message) { return new IOE...
true
ok
{"focal": {"class": "IOExceptionFactory", "name": "createException", "signature": "IOException createException(String message)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "message", "type": "String"}], "return_type": "IOException"}, "class_info": {"name": "IOExceptionFactory", "kind": "class...
3423262_43
class DeferredValueMatcher implements ValueMatcher { public boolean matches(Class<?> parentEntityType, String propertyName, Object value) { if (value == null) { return _value == null; } else if (_value == null) { return false; } if (_resolvedValueSet) { return value.equals(_re...
DeferredValueMatcher matcher = matcher(1); assertTrue(matcher.matches(Stop.class, "locationType", 1)); assertFalse(matcher.matches(Stop.class, "locationType", 2)); } }
[FOCAL] public boolean DeferredValueMatcher.matches(Class<?> parentEntityType, String propertyName, Object value) [CLASS] class DeferredValueMatcher implements ValueMatcher [METRICS] loc=56 cc=14 branches=13 loops=0 returns=11 throws=2 nesting=5 [CALLS-INTERNAL] boolean isRegexObj(Object value); boolean regexMatch(Stri...
/* static context [FOCAL] public boolean DeferredValueMatcher.matches(Class<?> parentEntityType, String propertyName, Object value) [THROWS-WHEN] IllegalStateException when !(value == null) && !(_value == null) && !_resolvedValueSet && !expectedValueType.isAssignableFrom(actualValueType) && actualValueType == String.cl...
/* static context [FOCAL] public boolean DeferredValueMatcher.matches(Class<?> parentEntityType, String propertyName, Object value) [THROWS-WHEN] IllegalStateException when !(value == null) && !(_value == null) && !_resolvedValueSet && !expectedValueType.isAssignableFrom(actualValueType) && actualValueType == String.cl...
true
ok
{"focal": {"class": "DeferredValueMatcher", "name": "matches", "signature": "boolean matches(Class<?> parentEntityType, String propertyName, Object value)", "start_line": 3, "modifiers": "public", "params": [{"name": "parentEntityType", "type": "Class<?>"}, {"name": "propertyName", "type": "String"}, {"name": "value", ...
3424353_158
class AssignmentDaoImpl implements AssignmentDao { @Override @Transactional(rollbackFor = Throwable.class) public void delete(Assignment assignment) { getSession().delete(assignment); } @Autowired @Qualifier("assignmentSessionFactory") public void setSessionFactory(SessionFactory sessionFa...
Date currentServiceDate = currentServiceDate(); Assignment retrievedAssignment = _dao.getAssignment("blockId", currentServiceDate); assertNull(retrievedAssignment); Assignment assignment = new Assignment("blockId", "vehicleId", currentServiceDate); _dao.save(assignment); ...
[FOCAL] @Override @Transactional(rollbackFor = Throwable.class) public void AssignmentDaoImpl.delete(Assignment assignment) [CLASS] class AssignmentDaoImpl implements AssignmentDao [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] Session getSession() [CALLS-EXTERNAL] getSession().de...
/* static context [FOCAL] @Override @Transactional(rollbackFor = Throwable.class) public void AssignmentDaoImpl.delete(Assignment assignment) [CALLS-INTERNAL] Session getSession() [CALLS-EXTERNAL] getSession().delete/1 */
/* static context [FOCAL] @Override @Transactional(rollbackFor = Throwable.class) public void AssignmentDaoImpl.delete(Assignment assignment) [CALLS-INTERNAL] Session getSession() [CALLS-EXTERNAL] getSession().delete/1 */ class AssignmentDaoImpl implements AssignmentDao { @Override @Transactional(rollbackFor =...
true
ok
{"focal": {"class": "AssignmentDaoImpl", "name": "delete", "signature": "void delete(Assignment assignment)", "start_line": 3, "modifiers": "@Override @Transactional(rollbackFor = Throwable.class) public", "params": [{"name": "assignment", "type": "Assignment"}], "return_type": "void"}, "class_info": {"name": "Assignme...
3425475_5
class SiriClientSubscriptionManager implements StatusProviderService { public void clearPendingSubscription(SiriClientRequest request, SubscriptionRequest subscriptionRequest) { _log.info("clear pending subscription: {}", request); _initiateSubscriptionsManager.clearPendingSubscription(request, ...
SiriClientRequest request = new SiriClientRequest(); SubscriptionRequest subscriptionRequest = new SubscriptionRequest(); _manager.clearPendingSubscription(request, subscriptionRequest); Mockito.verify(_initiateSubscriptionsManager).clearPendingSubscription( request, subscriptionRequest); } }
[FOCAL] public void SiriClientSubscriptionManager.clearPendingSubscription(SiriClientRequest request, SubscriptionRequest subscriptionRequest) [CLASS] class SiriClientSubscriptionManager implements StatusProviderService [METRICS] loc=8 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] _log.info/2, I...
/* static context [FOCAL] public void SiriClientSubscriptionManager.clearPendingSubscription(SiriClientRequest request, SubscriptionRequest subscriptionRequest) [COLLABORATORS] field _initiateSubscriptionsManager:InitiateSubscriptionsManager clearPendingSubscription/2 [FIELDS] read=_initiateSubscriptionsManager:Initiat...
/* static context [FOCAL] public void SiriClientSubscriptionManager.clearPendingSubscription(SiriClientRequest request, SubscriptionRequest subscriptionRequest) [COLLABORATORS] field _initiateSubscriptionsManager:InitiateSubscriptionsManager clearPendingSubscription/2 [FIELDS] read=_initiateSubscriptionsManager:Initiat...
true
ok
{"focal": {"class": "SiriClientSubscriptionManager", "name": "clearPendingSubscription", "signature": "void clearPendingSubscription(SiriClientRequest request, SubscriptionRequest subscriptionRequest)", "start_line": 3, "modifiers": "public", "params": [{"name": "request", "type": "SiriClientRequest"}, {"name": "subscr...
3429525_9
class TwilioAdapter { protected String renderOpenQuestion(Question question, ArrayList<String> prompts, String sessionKey) { TwiMLResponse twiml = new TwiMLResponse(); String typeProperty = question.getMediaPropertyValue(MediumType.BROADSOFT, MediaPropertyKey.TYPE); if (typeProperty != nu...
Question question = getOpenQuestion( false, false ); AdapterConfig adapter = createTwilioAdapter(); Session session = createSession(adapter, remoteAddressVoice); String result = renderQuestion(question, adapter, session); log.info( "Result Open Question: " + result ); ...
[FOCAL] protected String TwilioAdapter.renderOpenQuestion(Question question, ArrayList<String> prompts, String sessionKey) [CLASS] class TwilioAdapter [METRICS] loc=57 cc=7 branches=3 loops=0 returns=1 throws=0 nesting=3 [CALLS-INTERNAL] String getAnswerUrl(); String getTimeoutUrl(); void addPrompts(List<String> prompt...
class TwilioAdapter { protected String renderOpenQuestion(Question question, ArrayList<String> prompts, String sessionKey) { TwiMLResponse twiml = new TwiMLResponse(); String typeProperty = question.getMediaPropertyValue(MediumType.BROADSOFT, MediaPropertyKey.TYPE); if (typeProperty != nu...
false
ok
{"focal": {"class": "TwilioAdapter", "name": "renderOpenQuestion", "signature": "String renderOpenQuestion(Question question, ArrayList<String> prompts, String sessionKey)", "start_line": 3, "modifiers": "protected", "params": [{"name": "question", "type": "Question"}, {"name": "prompts", "type": "ArrayList<String>"}, ...
3430789_14
class Namespace { public Namespace child(List<String> values) { ImmutableList<String> child = ImmutableList.<String>builder().addAll(this.values).addAll(values).build(); return Namespace.of(child); } private Namespace(List<String> values); public static Namespace root(); public static Namespace of(List<Str...
Namespace namespace = Namespace.of("root"); Namespace child = namespace.child("child"); Assert.assertEquals(child.toString(), "root/child"); } }
[FOCAL] public Namespace Namespace.child(List<String> values) [CLASS] class Namespace [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] ImmutableList.<String>builder().addAll(this.values).addAl....build/0, ImmutableList.<String>builder().addAll(this.values).addAll/1, ImmutableList.<S...
/* static context [FOCAL] public Namespace Namespace.child(List<String> values) [INPUTS] branches=- | result=values [FIELDS] read=values [CALLS-EXTERNAL] ImmutableList.<String>builder().addAll(this.values).addAl....build/0, ImmutableList.<String>builder().addAll(this.values).addAll/1, ImmutableList.<String>builder().ad...
/* static context [FOCAL] public Namespace Namespace.child(List<String> values) [INPUTS] branches=- | result=values [FIELDS] read=values [CALLS-EXTERNAL] ImmutableList.<String>builder().addAll(this.values).addAl....build/0, ImmutableList.<String>builder().addAll(this.values).addAll/1, ImmutableList.<String>builder().ad...
true
ok
{"focal": {"class": "Namespace", "name": "child", "signature": "Namespace child(List<String> values)", "start_line": 3, "modifiers": "public", "params": [{"name": "values", "type": "List<String>"}], "return_type": "Namespace"}, "class_info": {"name": "Namespace", "kind": "class", "modifiers": "", "superclass": null, "i...
3433581_0
class JFXtrasFontRoboto { public static void loadAll() { for (AvailableFonts f : AvailableFonts.values()) { load(f); } } synchronized public static void load(AvailableFonts font); private VBox box; List<String> EXCLUDED_CLASSES; } class JFXtrasFontRobotoTest { private VBox box; List<Stri...
// load the fonts and set one on the label TestUtil.runThenWaitForPaintPulse( () -> { JFXtrasFontRoboto.loadAll(); Label l = new Label("xxxxx"); l.setStyle("-fx-font-family: 'Roboto Italic'; -fx-font-size:32pt;"); box.getChildren().clear(); box.getChildren().add(l); }); /...
[FOCAL] public static void JFXtrasFontRoboto.loadAll() [CLASS] class JFXtrasFontRoboto [METRICS] loc=5 cc=2 branches=0 loops=1 returns=0 throws=0 nesting=1 [CALLS-INTERNAL] void load(AvailableFonts font) [CALLS-EXTERNAL] AvailableFonts.values/0 [PATH1] foreach(AvailableFonts f : AvailableFonts.values())=T -> exit loop ...
/* static context [FOCAL] public static void JFXtrasFontRoboto.loadAll() [PATH1] foreach(AvailableFonts f : AvailableFonts.values())=T -> exit loop [PATH2] foreach(AvailableFonts f : AvailableFonts.values())=F [CALLS-INTERNAL] void load(AvailableFonts font) [CALLS-EXTERNAL] AvailableFonts.values/0 */
/* static context [FOCAL] public static void JFXtrasFontRoboto.loadAll() [PATH1] foreach(AvailableFonts f : AvailableFonts.values())=T -> exit loop [PATH2] foreach(AvailableFonts f : AvailableFonts.values())=F [CALLS-INTERNAL] void load(AvailableFonts font) [CALLS-EXTERNAL] AvailableFonts.values/0 */ class JFXtrasFontR...
true
ok
{"focal": {"class": "JFXtrasFontRoboto", "name": "loadAll", "signature": "void loadAll()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "void"}, "class_info": {"name": "JFXtrasFontRoboto", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "box",...
3444675_9
class FlattrAuthenticator { protected String buildScopeString() { StringBuilder sb = new StringBuilder(); if (scope.contains(Scope.FLATTR )) sb.append(" flattr"); if (scope.contains(Scope.THING )) sb.append(" thing"); if (scope.contains(Scope.EMAIL )) sb.append(" e...
ConsumerKey ck = new ConsumerKey("ck-abc", "ck-123"); FlattrAuthenticator auth = new FlattrAuthenticator(ck); auth.getScope().add(Scope.FLATTR); assertThat(auth.buildScopeString(), is("flattr")); auth.getScope().add(Scope.THING); assertThat(auth.buildScopeString(), is("...
[FOCAL] protected String FlattrAuthenticator.buildScopeString() [CLASS] class FlattrAuthenticator [METRICS] loc=10 cc=5 branches=4 loops=0 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] scope.contains/1, StringBuilder.append/1, sb.toString().trim/0, StringBuilder.toString/0 [NEW] StringBuilder [PATH1] if(scope.contains(...
/* static context [FOCAL] protected String FlattrAuthenticator.buildScopeString() [PATH1] if(scope.contains(Scope.FLATTR ))=T -> if(scope.contains(Scope.THING ))=T -> if(scope.contains(Scope.EMAIL ))=T -> if(scope.contains(Scope.EXTENDEDREAD))=T -> return sb.toString().trim() [PATH2] if(scope.contains(Scope.FLATTR ))=F...
/* static context [FOCAL] protected String FlattrAuthenticator.buildScopeString() [PATH1] if(scope.contains(Scope.FLATTR ))=T -> if(scope.contains(Scope.THING ))=T -> if(scope.contains(Scope.EMAIL ))=T -> if(scope.contains(Scope.EXTENDEDREAD))=T -> return sb.toString().trim() [PATH2] if(scope.contains(Scope.FLATTR ))=F...
true
ok
{"focal": {"class": "FlattrAuthenticator", "name": "buildScopeString", "signature": "String buildScopeString()", "start_line": 3, "modifiers": "protected", "params": [], "return_type": "String"}, "class_info": {"name": "FlattrAuthenticator", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fie...
3447638_7
class DateTimeFieldMappingFactory implements FieldMappingFactory { @Override public FieldMapping createFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required) { return new DateTimeFieldMapping(entityType...
DateTimeFieldMappingFactory factory = new DateTimeFieldMappingFactory(); FieldMapping mapping = factory.createFieldMapping(null, NycTestLocationRecord.class, "dt", "timestamp", Long.class, true); NycTestLocationRecord record = new NycTestLocationRecord(); record.setTimestamp(1284377940000L); ...
[FOCAL] @Override public FieldMapping DateTimeFieldMappingFactory.createFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required) [CLASS] class DateTimeFieldMappingFactory implements FieldMappingFactory [METRICS] loc=7 cc=1 br...
/* static context [FOCAL] @Override public FieldMapping DateTimeFieldMappingFactory.createFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required) [INPUTS] branches=- | result=csvFieldName, entityType, objFieldName, required ...
/* static context [FOCAL] @Override public FieldMapping DateTimeFieldMappingFactory.createFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required) [INPUTS] branches=- | result=csvFieldName, entityType, objFieldName, required ...
true
ok
{"focal": {"class": "DateTimeFieldMappingFactory", "name": "createFieldMapping", "signature": "FieldMapping createFieldMapping(EntitySchemaFactory schemaFactory, Class<?> entityType, String csvFieldName, String objFieldName, Class<?> objFieldType, boolean required)", "start_line": 3, "modifiers": "@Override public", "p...
3449807_27
class TopologicalSorter { public List<VertexClass> sort() // toplogical sort { while (numVerts > 0) // while vertices remain, { // get a vertex with no successors, or -1 int currentVertex = noSuccessors(); if (currentVertex == -1) // must be a cycle ...
TestNode n4 = new TestNode(buildTypeId4); TestNode n3 = new TestNode(buildTypeId3, n4); TestNode n2 = new TestNode(buildTypeId2, n3); TestNode n1 = new TestNode(buildTypeId1, n2); List<TestNode> sorted = new TopologicalSorter<TestNode>(ImmutableList.of(n1, n2, n3, n4)).s...
[FOCAL] public List<VertexClass> TopologicalSorter.sort() [CLASS] class TopologicalSorter [METRICS] loc=22 cc=4 branches=1 loops=2 returns=1 throws=1 nesting=2 [CALLS-INTERNAL] int noSuccessors(); void deleteVertex(int delVert) [CALLS-EXTERNAL] newArrayList/0 (inherited), ArrayList<VertexClass>.add/1 [NEW] IllegalState...
/* static context [FOCAL] public List<VertexClass> TopologicalSorter.sort() [THROWS-WHEN] IllegalStateException when numVerts > 0 && currentVertex == -1 [PATH1] while(numVerts > 0)=T -> if(currentVertex == -1)=F -> exit loop -> foreach(Vertex vertex : sortedArray)=F -> return result [PATH2] while(numVerts > 0)=T -> if(...
/* static context [FOCAL] public List<VertexClass> TopologicalSorter.sort() [THROWS-WHEN] IllegalStateException when numVerts > 0 && currentVertex == -1 [PATH1] while(numVerts > 0)=T -> if(currentVertex == -1)=F -> exit loop -> foreach(Vertex vertex : sortedArray)=F -> return result [PATH2] while(numVerts > 0)=T -> if(...
true
ok
{"focal": {"class": "TopologicalSorter", "name": "sort", "signature": "List<VertexClass> sort()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "List<VertexClass>"}, "class_info": {"name": "TopologicalSorter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [],...
3460824_46
class ConfigPropertyUtils { public static <T extends Enum<T>> Pattern createValidationPatternFromEnumType(Class<T> enumType) { String regEx = Stream.of(enumType.getEnumConstants()) .map(Enum::name) .collect(Collectors.joining("|", "(?i)", "")); //Enum constants may...
Pattern actual = ConfigPropertyUtils.createValidationPatternFromEnumType(BadBadEnum.class); assertEquals("(?i)This_Enum_Val_Cointains_Really_\\$_BAD_CHARS_£", actual.pattern()); assertTrue(actual.matcher(BadBadEnum.This_Enum_Val_Cointains_Really_$_BAD_CHARS_£.name()).matches()); } }
[FOCAL] public static Pattern ConfigPropertyUtils.createValidationPatternFromEnumType(Class<T> enumType) [CLASS] class ConfigPropertyUtils [METRICS] loc=10 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Stream.of(enumType.getEnumConstants()) .map(Enum::name).collect/1, Stream.of(enumType.getEnumC...
/* static context [FOCAL] public static Pattern ConfigPropertyUtils.createValidationPatternFromEnumType(Class<T> enumType) [INPUTS] branches=- | result=enumType [COLLABORATORS] param enumType:Class<T> getEnumConstants/0 [CALLS-EXTERNAL] Stream.of(enumType.getEnumConstants()) .map(Enum::name).collect/1, Stream.of(enumTy...
/* static context [FOCAL] public static Pattern ConfigPropertyUtils.createValidationPatternFromEnumType(Class<T> enumType) [INPUTS] branches=- | result=enumType [COLLABORATORS] param enumType:Class<T> getEnumConstants/0 [CALLS-EXTERNAL] Stream.of(enumType.getEnumConstants()) .map(Enum::name).collect/1, Stream.of(enumTy...
true
ok
{"focal": {"class": "ConfigPropertyUtils", "name": "createValidationPatternFromEnumType", "signature": "Pattern createValidationPatternFromEnumType(Class<T> enumType)", "start_line": 3, "modifiers": "public static", "params": [{"name": "enumType", "type": "Class<T>"}], "return_type": "Pattern"}, "class_info": {"name": ...