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
7480345_95
class CallbackMethodCompiler extends BroMethodCompiler { protected static String createCallbackCWrapper(FunctionType functionType, String name, String innerName) { // We order structs by name in reverse order. The names are constructed // such that nested structs get names which are naturally order...
assertEquals( "void* f_inner(void);\n" + "void* f(void) {\n" + " return f_inner();\n" + "}\n", CallbackMethodCompiler.createCallbackCWrapper( new FunctionType(I8_PTR), "f", "f_inner")); } }
[FOCAL] protected static String CallbackMethodCompiler.createCallbackCWrapper(FunctionType functionType, String name, String innerName) [CLASS] class CallbackMethodCompiler extends BroMethodCompiler [METRICS] loc=68 cc=8 branches=5 loops=2 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] Collections.reverseOrder/0, hiSign...
/* static context [FOCAL] protected static String CallbackMethodCompiler.createCallbackCWrapper(FunctionType functionType, String name, String innerName) [PATH1] for(i < functionType.getParameterTypes().length)=T -> if(i > 0)=T -> if(functionType.getParameterTypes()[i] instanceof StructureType)=T -> exit loop -> if(fun...
/* static context [FOCAL] protected static String CallbackMethodCompiler.createCallbackCWrapper(FunctionType functionType, String name, String innerName) [PATH1] for(i < functionType.getParameterTypes().length)=T -> if(i > 0)=T -> if(functionType.getParameterTypes()[i] instanceof StructureType)=T -> exit loop -> if(fun...
true
ok
{"focal": {"class": "CallbackMethodCompiler", "name": "createCallbackCWrapper", "signature": "String createCallbackCWrapper(FunctionType functionType, String name, String innerName)", "start_line": 3, "modifiers": "protected static", "params": [{"name": "functionType", "type": "FunctionType"}, {"name": "name", "type": ...
7481569_302
class ProjectHelper { public Set<Project> getUngroupedRepositories() { return cacheProjects(PROJECT_HELPER_UNGROUPED_REPOSITORIES, ungroupedRepositories); } private ProjectHelper(PageConfig cfg); public static ProjectHelper getInstance(PageConfig cfg); public List<RepositoryInfo> getRepo...
Set<Project> result = helper.getUngroupedRepositories(); Assert.assertEquals(2, result.size()); for (Project p : result) { Assert.assertTrue(p.getName().startsWith("allowed_")); } } }
[FOCAL] public Set<Project> ProjectHelper.getUngroupedRepositories() [CLASS] class ProjectHelper [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Set<Project> cacheProjects(String name, Set<Project> original) [CLASS-MEMBERS] ProjectHelper(PageConfig cfg); ProjectHelper getInstance(P...
/* static context [FOCAL] public Set<Project> ProjectHelper.getUngroupedRepositories() [CALLS-INTERNAL] Set<Project> cacheProjects(String name, Set<Project> original) */
/* static context [FOCAL] public Set<Project> ProjectHelper.getUngroupedRepositories() [CALLS-INTERNAL] Set<Project> cacheProjects(String name, Set<Project> original) */ class ProjectHelper { public Set<Project> getUngroupedRepositories() { return cacheProjects(PROJECT_HELPER_UNGROUPED_REPOSITORIES, ungrou...
true
ok
{"focal": {"class": "ProjectHelper", "name": "getUngroupedRepositories", "signature": "Set<Project> getUngroupedRepositories()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Set<Project>"}, "class_info": {"name": "ProjectHelper", "kind": "class", "modifiers": "", "superclass": null, "interfaces...
7482468_0
class Column implements QueryElement { @Override public String toString() { return Visitors.readable(this); } public Column(SelectorName selectorName); public Column(SelectorName selectorName, String propertyName, String columnName); public Column(ColumnFunction columnFunction, String c...
Column column = new Column(new SelectorName("selectorName")); assertThat(column.toString(), is("selectorName.*")); } }
[FOCAL] @Override public String Column.toString() [CLASS] class Column implements QueryElement [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Visitors.readable/1 [CLASS-MEMBERS] Column(SelectorName selectorName); Column(SelectorName selectorName, String propertyName, String column...
/* static context [FOCAL] @Override public String Column.toString() [CALLS-EXTERNAL] Visitors.readable/1 */
/* static context [FOCAL] @Override public String Column.toString() [CALLS-EXTERNAL] Visitors.readable/1 */ class Column implements QueryElement { @Override public String toString() { return Visitors.readable(this); } public Column(SelectorName selectorName); public Column(SelectorName sele...
true
ok
{"focal": {"class": "Column", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "Column", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "QueryElement", "fields": [], "members": [{"n...
7499734_214
class Hazelcast { @Deprecated public static <E> IList<E> getList(String name) { return getDefaultInstance().getList(name); } private Hazelcast(); @Deprecated public static HazelcastInstance init(Config config); @Deprecated public static HazelcastInstance getDefaultInstance(); @De...
IList<String> list = Hazelcast.getList("testListIsEmpty"); assertTrue(list.isEmpty()); list.add("Hello World"); assertFalse(list.isEmpty()); } }
[FOCAL] @Deprecated public static IList<E> Hazelcast.getList(String name) [CLASS] class Hazelcast [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] HazelcastInstance getDefaultInstance() [CALLS-EXTERNAL] getDefaultInstance().getList/1 [INPUTS] branches=- | result=name [DATAFLOW] name...
/* static context [FOCAL] @Deprecated public static IList<E> Hazelcast.getList(String name) [INPUTS] branches=- | result=name [CALLS-INTERNAL] HazelcastInstance getDefaultInstance() [CALLS-EXTERNAL] getDefaultInstance().getList/1 */
/* static context [FOCAL] @Deprecated public static IList<E> Hazelcast.getList(String name) [INPUTS] branches=- | result=name [CALLS-INTERNAL] HazelcastInstance getDefaultInstance() [CALLS-EXTERNAL] getDefaultInstance().getList/1 */ class Hazelcast { @Deprecated public static <E> IList<E> getList(String name) ...
true
ok
{"focal": {"class": "Hazelcast", "name": "getList", "signature": "IList<E> getList(String name)", "start_line": 3, "modifiers": "@Deprecated public static", "params": [{"name": "name", "type": "String"}], "return_type": "IList<E>"}, "class_info": {"name": "Hazelcast", "kind": "class", "modifiers": "", "superclass": nul...
7506968_32
class RepositoryTableModel extends AbstractTableModel { public Class getColumnClass( final int column ) { if ( column == 2 ) { return Date.class; } return String.class; } public RepositoryTableModel(); public boolean isShowHiddenFiles(); public void setShowHiddenFiles( final boolean show...
RepositoryTableModel repoTableModel = new RepositoryTableModel(); assertNotNull( repoTableModel ); assertEquals( Date.class, repoTableModel.getColumnClass( 2 ) ); assertEquals( String.class, repoTableModel.getColumnClass( 1 ) ); } }
[FOCAL] public Class RepositoryTableModel.getColumnClass(int column) [CLASS] class RepositoryTableModel extends AbstractTableModel [METRICS] loc=6 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [PATH1] if(column == 2)=T -> return Date.class [PATH2] if(column == 2)=F -> return String.class [INPUTS] branches=column...
/* static context [FOCAL] public Class RepositoryTableModel.getColumnClass(int column) [PATH1] if(column == 2)=T -> return Date.class [PATH2] if(column == 2)=F -> return String.class [INPUTS] branches=column | result=- */
/* static context [FOCAL] public Class RepositoryTableModel.getColumnClass(int column) [PATH1] if(column == 2)=T -> return Date.class [PATH2] if(column == 2)=F -> return String.class [INPUTS] branches=column | result=- */ class RepositoryTableModel extends AbstractTableModel { public Class getColumnClass( final int ...
true
ok
{"focal": {"class": "RepositoryTableModel", "name": "getColumnClass", "signature": "Class getColumnClass(int column)", "start_line": 3, "modifiers": "public", "params": [{"name": "column", "type": "int"}], "return_type": "Class"}, "class_info": {"name": "RepositoryTableModel", "kind": "class", "modifiers": "", "supercl...
7575297_13
class HtmlUtils { public static String removeTag(String html, String tagName) { Element bodyElement = Jsoup.parse(html).body(); bodyElement.getElementsByTag(tagName).remove(); return bodyElement.html(); } public static String text(String html); public static String text(String ...
String html = "<a onclick='alert(1)' onBlur='alert(1)'>你好</a><A>1</a>"; Assert.assertEquals("", HtmlUtils.removeTag(html, "a")); } }
[FOCAL] public static String HtmlUtils.removeTag(String html, String tagName) [CLASS] class HtmlUtils [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Jsoup.parse(html).body/0, Jsoup.parse/1, bodyElement.getElementsByTag(tagName).remove/0, Element.getElementsByTag/1, Element.html/0 ...
/* static context [FOCAL] public static String HtmlUtils.removeTag(String html, String tagName) [INPUTS] branches=- | result=html [CALLS-EXTERNAL] Jsoup.parse(html).body/0, Jsoup.parse/1, bodyElement.getElementsByTag(tagName).remove/0, Element.getElementsByTag/1, Element.html/0 */
/* static context [FOCAL] public static String HtmlUtils.removeTag(String html, String tagName) [INPUTS] branches=- | result=html [CALLS-EXTERNAL] Jsoup.parse(html).body/0, Jsoup.parse/1, bodyElement.getElementsByTag(tagName).remove/0, Element.getElementsByTag/1, Element.html/0 */ class HtmlUtils { public static S...
true
ok
{"focal": {"class": "HtmlUtils", "name": "removeTag", "signature": "String removeTag(String html, String tagName)", "start_line": 3, "modifiers": "public static", "params": [{"name": "html", "type": "String"}, {"name": "tagName", "type": "String"}], "return_type": "String"}, "class_info": {"name": "HtmlUtils", "kind": ...
7589324_102
class RepositoryTodoIndexService implements TodoIndexService { @Transactional @Override public void deleteFromIndex(Long id) { LOGGER.debug("Deleting an existing document with id: {}", id); repository.delete(id.toString()); } @Transactional @Override public void addToIndex(Todo tod...
service.deleteFromIndex(1L); verify(repositoryMock, times(1)).delete("1"); verifyNoMoreInteractions(repositoryMock); } }
[FOCAL] @Transactional @Override public void RepositoryTodoIndexService.deleteFromIndex(Long id) [CLASS] class RepositoryTodoIndexService implements TodoIndexService [METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] LOGGER.debug/2, repository.delete/1, Long.toString/0 [COLLABORATORS]...
/* static context [FOCAL] @Transactional @Override public void RepositoryTodoIndexService.deleteFromIndex(Long id) [COLLABORATORS] field repository delete/1 [CALLS-EXTERNAL] LOGGER.debug/2, repository.delete/1, Long.toString/0 */
/* static context [FOCAL] @Transactional @Override public void RepositoryTodoIndexService.deleteFromIndex(Long id) [COLLABORATORS] field repository delete/1 [CALLS-EXTERNAL] LOGGER.debug/2, repository.delete/1, Long.toString/0 */ class RepositoryTodoIndexService implements TodoIndexService { @Transactional @Ov...
true
ok
{"focal": {"class": "RepositoryTodoIndexService", "name": "deleteFromIndex", "signature": "void deleteFromIndex(Long id)", "start_line": 3, "modifiers": "@Transactional @Override public", "params": [{"name": "id", "type": "Long"}], "return_type": "void"}, "class_info": {"name": "RepositoryTodoIndexService", "kind": "cl...
7593542_1
class MyBean { public String sayHello(String name, boolean hipster) { return (hipster) ? ("Yo " + name) : ("Hello " + name); } } class MyBeanTest { @Test public void testHello() {
MyBean bean = new MyBean(); final String result = bean.sayHello("Scott", false); Assert.assertEquals("Hello Scott", result); } }
[FOCAL] public String MyBean.sayHello(String name, boolean hipster) [CLASS] class MyBean [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=hipster, name [DATAFLOW] hipster@param->L2; name@param->L2 [TEST] MyBeanTest: @Test public void testHello()
/* static context [FOCAL] public String MyBean.sayHello(String name, boolean hipster) [INPUTS] branches=- | result=hipster, name */
/* static context [FOCAL] public String MyBean.sayHello(String name, boolean hipster) [INPUTS] branches=- | result=hipster, name */ class MyBean { public String sayHello(String name, boolean hipster) { return (hipster) ? ("Yo " + name) : ("Hello " + name); } } class MyBeanTest { @Test public...
true
ok
{"focal": {"class": "MyBean", "name": "sayHello", "signature": "String sayHello(String name, boolean hipster)", "start_line": 3, "modifiers": "public", "params": [{"name": "name", "type": "String"}, {"name": "hipster", "type": "boolean"}], "return_type": "String"}, "class_info": {"name": "MyBean", "kind": "class", "mod...
7612313_0
class PasswordCache extends I2PAppThread implements PasswordHolder { @Override public synchronized DerivedKey getKey() throws IOException, GeneralSecurityException { if (derivedKey == null) createDerivedKey(); return derivedKey; } public PasswordCache(Configuration configu...
passwordCache.setPassword(PASSWORD); DerivedKey derivedKey = passwordCache.getKey(); assertEquals(derivedKey.scryptParams, FileEncryptionConstants.KDF_PARAMETERS); byte[] expectedKey = FileEncryptionUtil.getEncryptionKey(PASSWORD, derivedKey.salt, derivedKey.scryptParams); assert...
[FOCAL] @Override public synchronized DerivedKey PasswordCache.getKey() [CLASS] class PasswordCache extends I2PAppThread implements PasswordHolder [METRICS] loc=6 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] void createDerivedKey() [EXCEPTIONS] declares IOException, GeneralSecurityException [PA...
/* static context [FOCAL] @Override public synchronized DerivedKey PasswordCache.getKey() [PATH1] if(derivedKey == null)=T -> return derivedKey [PATH2] if(derivedKey == null)=F -> return derivedKey [EXCEPTIONS] declares IOException, GeneralSecurityException [CALLS-INTERNAL] void createDerivedKey() */
/* static context [FOCAL] @Override public synchronized DerivedKey PasswordCache.getKey() [PATH1] if(derivedKey == null)=T -> return derivedKey [PATH2] if(derivedKey == null)=F -> return derivedKey [EXCEPTIONS] declares IOException, GeneralSecurityException [CALLS-INTERNAL] void createDerivedKey() */ class PasswordCach...
true
ok
{"focal": {"class": "PasswordCache", "name": "getKey", "signature": "DerivedKey getKey() throws IOException, GeneralSecurityException", "start_line": 3, "modifiers": "@Override public synchronized", "params": [], "return_type": "DerivedKey"}, "class_info": {"name": "PasswordCache", "kind": "class", "modifiers": "", "su...
7623114_51
class CompareOp { public static int acompare(double x1, double x2) { if (isZero(x1 - x2)) { return 0; } else { return Double.compare(x1, x2); } } public static boolean isZero(double x); public static boolean isZero(float x); public static boolean isZ...
float tol = 0.01f; float x1 = 100; float x2 = x1 - tol / 10; assertEquals(0, CompareOp.acompare(x1, x2, tol)); x2 = x1 - tol * 10; assertTrue(CompareOp.acompare(x1, x2, tol) > 0); x2 = x1 + tol * 10; assertTrue(CompareOp.acompare...
[FOCAL] public static int CompareOp.acompare(double x1, double x2) [CLASS] class CompareOp [METRICS] loc=7 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] boolean isZero(double x) [CALLS-EXTERNAL] Double.compare/2 [PATH1] if(isZero(x1 - x2))=T -> return 0 [PATH2] if(isZero(x1 - x2))=F -> return Do...
/* static context [FOCAL] public static int CompareOp.acompare(double x1, double x2) [PATH1] if(isZero(x1 - x2))=T -> return 0 [PATH2] if(isZero(x1 - x2))=F -> return Double.compare(x1, x2) [INPUTS] branches=x1, x2 | result=x1, x2 [CALLS-INTERNAL] boolean isZero(double x) [CALLS-EXTERNAL] Double.compare/2 */
/* static context [FOCAL] public static int CompareOp.acompare(double x1, double x2) [PATH1] if(isZero(x1 - x2))=T -> return 0 [PATH2] if(isZero(x1 - x2))=F -> return Double.compare(x1, x2) [INPUTS] branches=x1, x2 | result=x1, x2 [CALLS-INTERNAL] boolean isZero(double x) [CALLS-EXTERNAL] Double.compare/2 */ class Comp...
true
ok
{"focal": {"class": "CompareOp", "name": "acompare", "signature": "int acompare(double x1, double x2)", "start_line": 3, "modifiers": "public static", "params": [{"name": "x1", "type": "double"}, {"name": "x2", "type": "double"}], "return_type": "int"}, "class_info": {"name": "CompareOp", "kind": "class", "modifiers": ...
7676364_12
class ThreadPoolManager { public static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) { return getExecutor(builder, env.getSharedData()); } static synchronized ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, Map<String, Object>...
Map<String, Object> cache = new HashMap<String, Object>(); ThreadPoolBuilder builder = new ThreadPoolBuilder(name.getTableNameString(), new Configuration(false)); ThreadPoolExecutor exec = ThreadPoolManager.getExecutor(builder, cache); assertNotNull("Got a null exector from the pool!", exec); //shut...
[FOCAL] public static synchronized ThreadPoolExecutor ThreadPoolManager.getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) [CLASS] class ThreadPoolManager [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder,...
/* static context [FOCAL] public static synchronized ThreadPoolExecutor ThreadPoolManager.getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) [INPUTS] branches=- | result=builder, env [COLLABORATORS] param env:RegionCoprocessorEnvironment getSharedData/0 [CALLS-INTERNAL] ThreadPoolExecutor getExecu...
/* static context [FOCAL] public static synchronized ThreadPoolExecutor ThreadPoolManager.getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env) [INPUTS] branches=- | result=builder, env [COLLABORATORS] param env:RegionCoprocessorEnvironment getSharedData/0 [CALLS-INTERNAL] ThreadPoolExecutor getExecu...
true
ok
{"focal": {"class": "ThreadPoolManager", "name": "getExecutor", "signature": "ThreadPoolExecutor getExecutor(ThreadPoolBuilder builder, RegionCoprocessorEnvironment env)", "start_line": 3, "modifiers": "public static synchronized", "params": [{"name": "builder", "type": "ThreadPoolBuilder"}, {"name": "env", "type": "Re...
7707976_1
class SimpleDBChronicle extends Chronicle { @Override public void add(ChronologicalRecord item) { add(Collections.singleton(item).iterator(), 0); } public SimpleDBChronicle(AmazonSimpleDBClient client, String key); private ReplaceableItem getItem(ChronologicalRecord record); @Override public void add(Iterat...
chronicle.add(getTestItem(0)); Assert.assertEquals(1, chronicle.getNumEvents(0, System.currentTimeMillis())); Assert.assertEquals(1, getChronicle().getNumEvents(0, System.currentTimeMillis())); } }
[FOCAL] @Override public void SimpleDBChronicle.add(ChronologicalRecord item) [CLASS] class SimpleDBChronicle extends Chronicle [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void add(Iterator<ChronologicalRecord> items, int pageSize) [CALLS-EXTERNAL] Collections.singleton(item).i...
/* static context [FOCAL] @Override public void SimpleDBChronicle.add(ChronologicalRecord item) [CALLS-INTERNAL] void add(Iterator<ChronologicalRecord> items, int pageSize) [CALLS-EXTERNAL] Collections.singleton(item).iterator/0, Collections.singleton/1 */
/* static context [FOCAL] @Override public void SimpleDBChronicle.add(ChronologicalRecord item) [CALLS-INTERNAL] void add(Iterator<ChronologicalRecord> items, int pageSize) [CALLS-EXTERNAL] Collections.singleton(item).iterator/0, Collections.singleton/1 */ class SimpleDBChronicle extends Chronicle { @Override public...
true
ok
{"focal": {"class": "SimpleDBChronicle", "name": "add", "signature": "void add(ChronologicalRecord item)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "item", "type": "ChronologicalRecord"}], "return_type": "void"}, "class_info": {"name": "SimpleDBChronicle", "kind": "class", "modifiers": "", ...
7710120_32
class ConditionalCriteriaBuilder { public static <T> ConditionRoot<T> criteriaFor(Class<T> clazz) { return new ConditionalCriteriaBuilder<T>().new RootBuilderImpl(); } private ConditionalCriteriaBuilder(); } class ConditionalCriteriaBuilderTest { @Test public void shouldBuildEqualsCond...
ConditionalCriteria criteria = criteriaFor(Person.class).lbrace().withProperty(aaa()).eq(1234).rbrace() .buildSingle(); assertEquals("aaa", criteria.getPropertyName()); assertEquals(ConditionalCriteria.Operator.Equal, criteria.getOperator()); assertEquals(1234, criteria....
[FOCAL] public static ConditionRoot<T> ConditionalCriteriaBuilder.criteriaFor(Class<T> clazz) [CLASS] class ConditionalCriteriaBuilder [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] RootBuilderImpl, ConditionalCriteriaBuilder<T> [INPUTS] branches=- | result=- | unused=clazz [CLASS-MEMBERS] C...
/* static context [FOCAL] public static ConditionRoot<T> ConditionalCriteriaBuilder.criteriaFor(Class<T> clazz) [INPUTS] branches=- | result=- | unused=clazz [NEW] RootBuilderImpl, ConditionalCriteriaBuilder<T> */
/* static context [FOCAL] public static ConditionRoot<T> ConditionalCriteriaBuilder.criteriaFor(Class<T> clazz) [INPUTS] branches=- | result=- | unused=clazz [NEW] RootBuilderImpl, ConditionalCriteriaBuilder<T> */ class ConditionalCriteriaBuilder { public static <T> ConditionRoot<T> criteriaFor(Class<T> clazz) { ...
true
ok
{"focal": {"class": "ConditionalCriteriaBuilder", "name": "criteriaFor", "signature": "ConditionRoot<T> criteriaFor(Class<T> clazz)", "start_line": 3, "modifiers": "public static", "params": [{"name": "clazz", "type": "Class<T>"}], "return_type": "ConditionRoot<T>"}, "class_info": {"name": "ConditionalCriteriaBuilder",...
7731254_63
class IdParser { public static Node[] parse(String id) { if (id.length() == 0) { return EMPTY_NODES_ARRAY; } List<Node> result = Lists.newArrayList(); Iterable<String> split = SeparatorChar.SPLITTER.split(id); for (String s : split) { if (s.charAt(0...
try { parse("form:table:@rows("); fail(); } catch (IllegalArgumentException e) { // ignore } try { parse("form:table:@rows(12"); fail(); } catch (IllegalArgumentException e) { // ignore } as...
[FOCAL] public static Node[] IdParser.parse(String id) [CLASS] class IdParser [METRICS] loc=35 cc=7 branches=5 loops=1 returns=2 throws=2 nesting=4 [CALLS-EXTERNAL] String.length/0, Lists.newArrayList/0, SeparatorChar.SPLITTER.split/1, String.charAt/1, String.indexOf/1, List<Node>.add/1, String.substring/2, List<Node>....
/* static context [FOCAL] public static Node[] IdParser.parse(String id) [THROWS-WHEN] IllegalArgumentException when !(id.length() == 0) && foreach(String s : split)=T && s.charAt(0) == META_COMPONENT_SEPARATOR_CHAR && !(startImageIdx < 0) && s.charAt(s.length() - 1) != FUNCTION_IMAGE_END_TOKEN [THROWS-WHEN] IllegalArg...
/* static context [FOCAL] public static Node[] IdParser.parse(String id) [THROWS-WHEN] IllegalArgumentException when !(id.length() == 0) && foreach(String s : split)=T && s.charAt(0) == META_COMPONENT_SEPARATOR_CHAR && !(startImageIdx < 0) && s.charAt(s.length() - 1) != FUNCTION_IMAGE_END_TOKEN [THROWS-WHEN] IllegalArg...
true
ok
{"focal": {"class": "IdParser", "name": "parse", "signature": "Node[] parse(String id)", "start_line": 3, "modifiers": "public static", "params": [{"name": "id", "type": "String"}], "return_type": "Node[]"}, "class_info": {"name": "IdParser", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fi...
7742400_8
class Unix { native static int symlink(String linkedToPath, String symlinkPath)native static int symlink(String linkedToPath, String symlinkPath); native static int symlink(String linkedToPath, String symlinkPath)protected static native int getIntDefine(String definedName); native static int symlink(String linkedToPa...
if(!isUnix()) return; File f = File.createTempFile("testSymlink", ".test"); File d = new File(f.getParentFile(), f.getName()+".dir"); d.mkdir(); File a = new File(d, "a"); a.createNewFile(); File b = new File(d, "b"); int result = Unix.symlink(a.getPath(), b.getPath()); assertTrue(result == 0)...
[FOCAL] native static int Unix.symlink(String linkedToPath, String symlinkPath) [CLASS] class Unix [METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CLASS-MEMBERS] int getIntDefine(String definedName); int open(String pathname, int flags, int mode); int close(int fd); int select(int[] readfds, int[]...
/* static context [FOCAL] native static int Unix.symlink(String linkedToPath, String symlinkPath) */
/* static context [FOCAL] native static int Unix.symlink(String linkedToPath, String symlinkPath) */ class Unix { native static int symlink(String linkedToPath, String symlinkPath)native static int symlink(String linkedToPath, String symlinkPath); native static int symlink(String linkedToPath, String symlinkPath)prot...
true
partial
{"focal": {"class": "Unix", "name": "symlink", "signature": "int symlink(String linkedToPath, String symlinkPath)", "start_line": 3, "modifiers": "native static", "params": [{"name": "linkedToPath", "type": "String"}, {"name": "symlinkPath", "type": "String"}], "return_type": "int"}, "class_info": {"name": "Unix", "kin...
7762720_25
class TranscriptModel implements java.io.Serializable, Constants { public int getExonCount() { return this.exonCount; } private TranscriptModel(); public static TranscriptModel createTranscriptModel(); public void setAccessionNumber(String acc); public void setChromosome(byte c); ...
int N = uc010wrv.getExonCount(); Assert.assertEquals(18,N); } }
[FOCAL] public int TranscriptModel.getExonCount() [CLASS] class TranscriptModel implements java.io.Serializable, Constants [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [FIELDS] read=exonCount [CLASS-MEMBERS] TranscriptModel(); TranscriptModel createTranscriptModel(); void setAccessionNumber(Stri...
/* static context [FOCAL] public int TranscriptModel.getExonCount() [FIELDS] read=exonCount */
/* static context [FOCAL] public int TranscriptModel.getExonCount() [FIELDS] read=exonCount */ class TranscriptModel implements java.io.Serializable, Constants { public int getExonCount() { return this.exonCount; } private TranscriptModel(); public static TranscriptModel createTranscriptMode...
true
ok
{"focal": {"class": "TranscriptModel", "name": "getExonCount", "signature": "int getExonCount()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "TranscriptModel", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "java.io.Serializable, Constants", ...
7766448_1
class DemoApiTool { public static String sign(String appKey, String secret, Map<String, String> paramMap) { // 对参数名进行字典排序 String[] keyArray = paramMap.keySet().toArray(new String[0]); Arrays.sort(keyArray); // 拼接有序的参数名-值串 StringBuilder stringBuilder = new StringBuilder(...
String appKey = "XXXXXXXX"; String secret = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; Map<String, String> paramMap = new HashMap<String, String>(); paramMap.put("city", "上海"); paramMap.put("latitude", "31.21524"); paramMap.put("longitude", "121.420033"); paramMap.put("c...
[FOCAL] public static String DemoApiTool.sign(String appKey, String secret, Map<String, String> paramMap) [CLASS] class DemoApiTool [METRICS] loc=31 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] paramMap.keySet().toArray/1, Map<String, String>.keySet/0, Arrays.sort/1, StringBuilder.append/1, str...
/* static context [FOCAL] public static String DemoApiTool.sign(String appKey, String secret, Map<String, String> paramMap) [PATH1] foreach(String key : keyArray)=T -> exit loop -> return sign [PATH2] foreach(String key : keyArray)=F -> return sign [INPUTS] branches=paramMap | result=- [COLLABORATORS] param paramMap:Ma...
/* static context [FOCAL] public static String DemoApiTool.sign(String appKey, String secret, Map<String, String> paramMap) [PATH1] foreach(String key : keyArray)=T -> exit loop -> return sign [PATH2] foreach(String key : keyArray)=F -> return sign [INPUTS] branches=paramMap | result=- [COLLABORATORS] param paramMap:Ma...
true
ok
{"focal": {"class": "DemoApiTool", "name": "sign", "signature": "String sign(String appKey, String secret, Map<String, String> paramMap)", "start_line": 3, "modifiers": "public static", "params": [{"name": "appKey", "type": "String"}, {"name": "secret", "type": "String"}, {"name": "paramMap", "type": "Map<String, Strin...
7767313_22
class JsonFileBackedDAO implements DemandSideDAO { public synchronized void loadData(String dbLocation) throws DSPException { try { if ((dbLocation != null) && (dbLocation != "")) { this.dbLocation = dbLocation; } else { // otherwise use a default location and filename relative to this class this....
try { dao.loadData("dummyfile.json"); } catch (Exception e) { assertTrue("The DSPException should occur", e.getClass().getName().equals("org.openrtb.dsp.intf.model.DSPException")); String msg = "dummyfile.json (The system cannot find the file s...
[FOCAL] public synchronized void JsonFileBackedDAO.loadData(String dbLocation) [CLASS] class JsonFileBackedDAO implements DemandSideDAO [METRICS] loc=26 cc=5 branches=1 loops=2 returns=0 throws=1 nesting=2 [CALLS-EXTERNAL] getClass().getResource("dspConf.json").getFile/0, getClass().getResource/1, getClass/0 (inherited...
/* static context [FOCAL] public synchronized void JsonFileBackedDAO.loadData(String dbLocation) [THROWS-WHEN] DSPException when try-body throws [PATH1] if((dbLocation != null) && (dbLocation != ""))=T -> foreach(RTBExchange ex : props.exchanges)=T -> exit loop -> foreach(RTBAdvertiser adv : props.advertisers)=F [PATH2...
/* static context [FOCAL] public synchronized void JsonFileBackedDAO.loadData(String dbLocation) [THROWS-WHEN] DSPException when try-body throws [PATH1] if((dbLocation != null) && (dbLocation != ""))=T -> foreach(RTBExchange ex : props.exchanges)=T -> exit loop -> foreach(RTBAdvertiser adv : props.advertisers)=F [PATH2...
true
ok
{"focal": {"class": "JsonFileBackedDAO", "name": "loadData", "signature": "void loadData(String dbLocation) throws DSPException", "start_line": 3, "modifiers": "public synchronized", "params": [{"name": "dbLocation", "type": "String"}], "return_type": "void"}, "class_info": {"name": "JsonFileBackedDAO", "kind": "class"...
7783162_11
class MoneyAlgorithmics { public MonetaryAmount addAll(MonetaryAmount... amounts) { throw new UnsupportedOperationException(); } public MonetaryAmount multiply(MonetaryAmount amount, Number factor); public MonetaryAmount subtract(MonetaryAmount amount, MonetaryAmount amt2); public Monetary...
assertEquals(Money.of(20, "CHF"), alg.addAll(Money.of(10, "CHF"), Money.of(10, "CHF"))); assertEquals(Money.of(20.8, "CHF"), alg.addAll(Money.of(10.5, "CHF"), Money.of(10.3, "CHF"))); assertEquals(Money.of(-90, "CHF"), alg.addAll(Money.of(-100.3, "CHF"), Money.of(10.3, "CHF"))); assertEq...
[FOCAL] public MonetaryAmount MoneyAlgorithmics.addAll(MonetaryAmount... amounts) [CLASS] class MoneyAlgorithmics [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=1 nesting=0 [NEW] UnsupportedOperationException [EXCEPTIONS] throws UnsupportedOperationException [THROWS-WHEN] UnsupportedOperationException when al...
/* static context [FOCAL] public MonetaryAmount MoneyAlgorithmics.addAll(MonetaryAmount... amounts) [THROWS-WHEN] UnsupportedOperationException when always [INPUTS] branches=- | result=- | unused=amounts [EXCEPTIONS] throws UnsupportedOperationException [NEW] UnsupportedOperationException */
/* static context [FOCAL] public MonetaryAmount MoneyAlgorithmics.addAll(MonetaryAmount... amounts) [THROWS-WHEN] UnsupportedOperationException when always [INPUTS] branches=- | result=- | unused=amounts [EXCEPTIONS] throws UnsupportedOperationException [NEW] UnsupportedOperationException */ class MoneyAlgorithmics { ...
true
ok
{"focal": {"class": "MoneyAlgorithmics", "name": "addAll", "signature": "MonetaryAmount addAll(MonetaryAmount... amounts)", "start_line": 3, "modifiers": "public", "params": [{"name": "amounts", "type": "MonetaryAmount..."}], "return_type": "MonetaryAmount"}, "class_info": {"name": "MoneyAlgorithmics", "kind": "class",...
7823906_2
class LabelUtil { public static String getResourceLabel(String key) { try { ResourceBundle res = ResourceBundle.getBundle("labels", new EncodedControl("UTF-8")); return res.getString(key); } catch (MissingResourceException me) { logger.warn("Unable to find ResourceBUndle", me); return key; } }...
String actual = LabelUtil.getResourceLabel("non-existing-key"); Assert.assertEquals("non-existing-key", actual); } }
[FOCAL] public static String LabelUtil.getResourceLabel(String key) [CLASS] class LabelUtil [METRICS] loc=10 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] ResourceBundle.getBundle/2, ResourceBundle.getString/1, logger.warn/2 [NEW] EncodedControl [EXCEPTIONS] catches MissingResourceException me [...
/* static context [FOCAL] public static String LabelUtil.getResourceLabel(String key) [PATH1] try-body throws -> return key [PATH2] return res.getString(key) [INPUTS] branches=- | result=key [EXCEPTIONS] catches MissingResourceException me [NEW] EncodedControl [CALLS-EXTERNAL] ResourceBundle.getBundle/2, ResourceBundle...
/* static context [FOCAL] public static String LabelUtil.getResourceLabel(String key) [PATH1] try-body throws -> return key [PATH2] return res.getString(key) [INPUTS] branches=- | result=key [EXCEPTIONS] catches MissingResourceException me [NEW] EncodedControl [CALLS-EXTERNAL] ResourceBundle.getBundle/2, ResourceBundle...
true
ok
{"focal": {"class": "LabelUtil", "name": "getResourceLabel", "signature": "String getResourceLabel(String key)", "start_line": 3, "modifiers": "public static", "params": [{"name": "key", "type": "String"}], "return_type": "String"}, "class_info": {"name": "LabelUtil", "kind": "class", "modifiers": "", "superclass": nul...
7826526_51
class ZeroFilterFunc extends FilterFunc { public final Boolean exec(final Tuple input) throws ExecException { if (input == null || input.get(0) == null) { return false; } if (mode.equals("default")) { String xCS = (String) input.get(1); if (containsXcsVa...
Tuple input = tupleFactory.newTuple(2); input.set(0, "http://en.m.wikipedia.org/wiki/The_Slave_Hunters"); input.set(1, "zero=420-01"); ZeroFilterFunc zero = new ZeroFilterFunc("default"); assertTrue(zero.exec(input)); } }
[FOCAL] public final Boolean ZeroFilterFunc.exec(Tuple input) [CLASS] class ZeroFilterFunc extends FilterFunc [METRICS] loc=20 cc=4 branches=3 loops=0 returns=4 throws=0 nesting=2 [CALLS-INTERNAL] String simplifyFilename(String filename); ZeroConfig getZeroConfig(String key); boolean containsXcsValue(String rawString);...
/* static context [FOCAL] public final Boolean ZeroFilterFunc.exec(Tuple input) [PATH1] if(input == null || input.get(0) == null)=F -> if(mode.equals("default"))=T -> if(containsXcsValue(xCS))=T -> return isValidZeroRequest((String) input.get(0), zeroConfig) [PATH2] if(input == null || input.get(0) == null)=T -> return...
/* static context [FOCAL] public final Boolean ZeroFilterFunc.exec(Tuple input) [PATH1] if(input == null || input.get(0) == null)=F -> if(mode.equals("default"))=T -> if(containsXcsValue(xCS))=T -> return isValidZeroRequest((String) input.get(0), zeroConfig) [PATH2] if(input == null || input.get(0) == null)=T -> return...
true
ok
{"focal": {"class": "ZeroFilterFunc", "name": "exec", "signature": "Boolean exec(Tuple input) throws ExecException", "start_line": 3, "modifiers": "public final", "params": [{"name": "input", "type": "Tuple"}], "return_type": "Boolean"}, "class_info": {"name": "ZeroFilterFunc", "kind": "class", "modifiers": "", "superc...
7832943_3
class PersistentEphemeralNode { @VisibleForTesting String getActualPath() throws ExecutionException, InterruptedException { return _async.getActualPath(); } public PersistentEphemeralNode(CuratorFramework curator, String basePath, byte[] data, CreateMode mode); public void close(long dur...
PersistentEphemeralNode node = createNode(PATH); byte[] bytes = _curator.getData().forPath(node.getActualPath()); assertArrayEquals(bytes, DATA); } }
[FOCAL] @VisibleForTesting String PersistentEphemeralNode.getActualPath() [CLASS] class PersistentEphemeralNode [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] _async.getActualPath/0 [EXCEPTIONS] declares ExecutionException, InterruptedException [CLASS-MEMBERS] PersistentEphemeralN...
/* static context [FOCAL] @VisibleForTesting String PersistentEphemeralNode.getActualPath() [EXCEPTIONS] declares ExecutionException, InterruptedException [CALLS-EXTERNAL] _async.getActualPath/0 */
/* static context [FOCAL] @VisibleForTesting String PersistentEphemeralNode.getActualPath() [EXCEPTIONS] declares ExecutionException, InterruptedException [CALLS-EXTERNAL] _async.getActualPath/0 */ class PersistentEphemeralNode { @VisibleForTesting String getActualPath() throws ExecutionException, InterruptedE...
true
ok
{"focal": {"class": "PersistentEphemeralNode", "name": "getActualPath", "signature": "String getActualPath() throws ExecutionException, InterruptedException", "start_line": 3, "modifiers": "@VisibleForTesting", "params": [], "return_type": "String"}, "class_info": {"name": "PersistentEphemeralNode", "kind": "class", "m...
7837044_3
class DiscoveryThread extends Thread { protected MulticastSocket createSocket() throws UnknownHostException, IOException { InetAddress address = InetAddress.getByName(multicastAddress); MulticastSocket socket = new MulticastSocket(port); socket.joinGroup(address); return socket; ...
DiscoveryListener listener = mock(DiscoveryListener.class); DiscoveryThread thread = new DiscoveryThread( AndroidNetworkIntents.DEFAULT_MULTICAST_ADDRESS, AndroidNetworkIntents.DEFAULT_PORT, listener ); MulticastSocket socket1 = thread.createSocket()...
[FOCAL] protected MulticastSocket DiscoveryThread.createSocket() [CLASS] class DiscoveryThread extends Thread [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] InetAddress.getByName/1, MulticastSocket.joinGroup/1 [NEW] MulticastSocket [EXCEPTIONS] declares UnknownHostException, IOExc...
/* static context [FOCAL] protected MulticastSocket DiscoveryThread.createSocket() [EXCEPTIONS] declares UnknownHostException, IOException [NEW] MulticastSocket [CALLS-EXTERNAL] InetAddress.getByName/1, MulticastSocket.joinGroup/1 */
/* static context [FOCAL] protected MulticastSocket DiscoveryThread.createSocket() [EXCEPTIONS] declares UnknownHostException, IOException [NEW] MulticastSocket [CALLS-EXTERNAL] InetAddress.getByName/1, MulticastSocket.joinGroup/1 */ class DiscoveryThread extends Thread { protected MulticastSocket createSocket() t...
true
ok
{"focal": {"class": "DiscoveryThread", "name": "createSocket", "signature": "MulticastSocket createSocket() throws UnknownHostException, IOException", "start_line": 3, "modifiers": "protected", "params": [], "return_type": "MulticastSocket"}, "class_info": {"name": "DiscoveryThread", "kind": "class", "modifiers": "", "...
7842918_5
class EntityCollections { public static void setEntityRefsFromEntities(Collection<String> refs, Collection<Entity> entities) { refs.clear(); for (Iterator<Entity> i = entities.iterator(); i.hasNext();) { Entity entity = i.next(); refs.add(entity.getReference()); } } public static boolean isIntersect...
Entity e1 = mock(Entity.class); when(e1.getReference()).thenReturn("/ref/e1"); Entity e2 = mock(Entity.class); when(e2.getReference()).thenReturn("/ref/e2"); ArrayList<String> refernces = new ArrayList<String>(); setEntityRefsFromEntities(refernces, Arrays.asList(new Entity[] { e1, e2 })); assertTrue...
[FOCAL] public static void EntityCollections.setEntityRefsFromEntities(Collection<String> refs, Collection<Entity> entities) [CLASS] class EntityCollections [METRICS] loc=9 cc=2 branches=0 loops=1 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] Collection<String>.clear/0, Collection<Entity>.iterator/0, Iterator<Entity>.h...
/* static context [FOCAL] public static void EntityCollections.setEntityRefsFromEntities(Collection<String> refs, Collection<Entity> entities) [PATH1] for(i.hasNext())=T -> exit loop [PATH2] for(i.hasNext())=F [INPUTS] branches=entities | result=- [COLLABORATORS] param refs:Collection<String> clear/0,add/1; param entit...
/* static context [FOCAL] public static void EntityCollections.setEntityRefsFromEntities(Collection<String> refs, Collection<Entity> entities) [PATH1] for(i.hasNext())=T -> exit loop [PATH2] for(i.hasNext())=F [INPUTS] branches=entities | result=- [COLLABORATORS] param refs:Collection<String> clear/0,add/1; param entit...
true
ok
{"focal": {"class": "EntityCollections", "name": "setEntityRefsFromEntities", "signature": "void setEntityRefsFromEntities(Collection<String> refs, Collection<Entity> entities)", "start_line": 3, "modifiers": "public static", "params": [{"name": "refs", "type": "Collection<String>"}, {"name": "entities", "type": "Colle...
7891529_103
class InputDialogFooter extends Composite { @UiHandler("cancelButton") public void handleCancelClick(final ClickEvent event) { this.actionDelegate.cancelled(); } @Inject public InputDialogFooter(final @Nonnull UILocalizationConstant messages); public void setDelegate(final ActionDelegate...
footer.handleCancelClick(mock(ClickEvent.class)); verify(actionDelegate).cancelled(); } }
[FOCAL] @UiHandler("cancelButton") public void InputDialogFooter.handleCancelClick(ClickEvent event) [CLASS] class InputDialogFooter extends Composite [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] ActionDelegate.cancelled/0 [FIELDS] read=actionDelegate:ActionDelegate [INPUTS] bra...
/* static context [FOCAL] @UiHandler("cancelButton") public void InputDialogFooter.handleCancelClick(ClickEvent event) [INPUTS] branches=- | result=- | unused=event [COLLABORATORS] field actionDelegate:ActionDelegate cancelled/0 [FIELDS] read=actionDelegate:ActionDelegate [CALLS-EXTERNAL] ActionDelegate.cancelled/0 */
/* static context [FOCAL] @UiHandler("cancelButton") public void InputDialogFooter.handleCancelClick(ClickEvent event) [INPUTS] branches=- | result=- | unused=event [COLLABORATORS] field actionDelegate:ActionDelegate cancelled/0 [FIELDS] read=actionDelegate:ActionDelegate [CALLS-EXTERNAL] ActionDelegate.cancelled/0 */ ...
true
ok
{"focal": {"class": "InputDialogFooter", "name": "handleCancelClick", "signature": "void handleCancelClick(ClickEvent event)", "start_line": 3, "modifiers": "@UiHandler(\"cancelButton\") public", "params": [{"name": "event", "type": "ClickEvent"}], "return_type": "void"}, "class_info": {"name": "InputDialogFooter", "ki...
7891564_7
class ReferencesManager { public static Pair<String, String> modifyBodyWithReferences(Message message, String body) { if (body == null || body.isEmpty() || body.trim().isEmpty()) return new Pair<>(body, null); List<ExtensionElement> elements = message.getExtensions(ReferenceElement.ELEMENT, Refere...
String expected = "<font color='#9e9e9e'>\u2503</font> This is a quote\n" + "<font color='#9e9e9e'>\u2503</font> of two lines\n" + "Hello world!"; Pair<String, String> result = ReferencesManager.modifyBodyWithReferences(message4, body4); assert...
[FOCAL] public static Pair<String, String> ReferencesManager.modifyBodyWithReferences(Message message, String body) [CLASS] class ReferencesManager [METRICS] loc=32 cc=9 branches=6 loops=2 returns=4 throws=0 nesting=2 [CALLS-INTERNAL] List<ReferenceElement> getReferences(List<ExtensionElement> elements); String charsTo...
/* static context [FOCAL] public static Pair<String, String> ReferencesManager.modifyBodyWithReferences(Message message, String body) [PATH1] if(body == null || body.isEmpty() || body.trim().isEmpty())=F -> if(elements == null || elements.size() == 0)=F -> if(references.isEmpty())=F -> foreach(ReferenceElement referenc...
/* static context [FOCAL] public static Pair<String, String> ReferencesManager.modifyBodyWithReferences(Message message, String body) [PATH1] if(body == null || body.isEmpty() || body.trim().isEmpty())=F -> if(elements == null || elements.size() == 0)=F -> if(references.isEmpty())=F -> foreach(ReferenceElement referenc...
true
ok
{"focal": {"class": "ReferencesManager", "name": "modifyBodyWithReferences", "signature": "Pair<String, String> modifyBodyWithReferences(Message message, String body)", "start_line": 3, "modifiers": "public static", "params": [{"name": "message", "type": "Message"}, {"name": "body", "type": "String"}], "return_type": "...
7908045_0
class ReleaseSymbolType extends SymbolType implements Rule, Translation { @Override public String toTarget(Translator translator, Symbol symbol) { Release release; try { release = new Release(symbol.getProperty(OptionType.RELEASE.name())); } catch (Exception e) { return "<strong>Malformed r...
Symbol symbol = new Symbol(releaseSymbolType); symbol.putProperty(ReleaseSymbolType.OptionType.RELEASE.name(), "20121220"); String html = releaseSymbolType.toTarget(null, symbol); assertTrue(html.contains("<h3>release \n" + "\t<a href=\"\">20121220</a>\n" + "</h3>")); asser...
[FOCAL] @Override public String ReleaseSymbolType.toTarget(Translator translator, Symbol symbol) [CLASS] class ReleaseSymbolType extends SymbolType implements Rule, Translation [METRICS] loc=20 cc=3 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] void addFilesHtml(TagGroup html, Release release); void ...
/* static context [FOCAL] @Override public String ReleaseSymbolType.toTarget(Translator translator, Symbol symbol) [PATH1] try-body throws -> return "<strong>Malformed release: " + e.getMessage() + "</strong>" [PATH2] if(release.exists())=T -> return html.html() [PATH3] if(release.exists())=F -> return html.html() [INP...
/* static context [FOCAL] @Override public String ReleaseSymbolType.toTarget(Translator translator, Symbol symbol) [PATH1] try-body throws -> return "<strong>Malformed release: " + e.getMessage() + "</strong>" [PATH2] if(release.exists())=T -> return html.html() [PATH3] if(release.exists())=F -> return html.html() [INP...
true
ok
{"focal": {"class": "ReleaseSymbolType", "name": "toTarget", "signature": "String toTarget(Translator translator, Symbol symbol)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "translator", "type": "Translator"}, {"name": "symbol", "type": "Symbol"}], "return_type": "String"}, "class_info": {"n...
7923123_11
class CalendarPickerView extends ListView { public FluentInitializer init(Date minDate, Date maxDate, TimeZone timeZone, Locale locale) { if (minDate == null || maxDate == null) { throw new IllegalArgumentException( "minDate and maxDate must be non-null. " + dbg(minDate, maxDate)); } if ...
view.init(minDate, maxDate, timeZone, locale) // .inMode(SINGLE); assertThat(view.highlightedCals).hasSize(0); assertThat(view.highlightedCells).hasSize(0); } }
[FOCAL] public FluentInitializer CalendarPickerView.init(Date minDate, Date maxDate, TimeZone timeZone, Locale locale) [CLASS] class CalendarPickerView extends ListView [METRICS] loc=73 cc=7 branches=4 loops=2 returns=1 throws=4 nesting=1 [CALLS-INTERNAL] List<List<MonthCellDescriptor>> getMonthCells(MonthDescriptor mo...
/* static context [FOCAL] public FluentInitializer CalendarPickerView.init(Date minDate, Date maxDate, TimeZone timeZone, Locale locale) [THROWS-WHEN] IllegalArgumentException when minDate == null || maxDate == null [THROWS-WHEN] IllegalArgumentException when !(minDate == null || maxDate == null) && minDate.after(maxDa...
/* static context [FOCAL] public FluentInitializer CalendarPickerView.init(Date minDate, Date maxDate, TimeZone timeZone, Locale locale) [THROWS-WHEN] IllegalArgumentException when minDate == null || maxDate == null [THROWS-WHEN] IllegalArgumentException when !(minDate == null || maxDate == null) && minDate.after(maxDa...
true
ok
{"focal": {"class": "CalendarPickerView", "name": "init", "signature": "FluentInitializer init(Date minDate, Date maxDate, TimeZone timeZone, Locale locale)", "start_line": 3, "modifiers": "public", "params": [{"name": "minDate", "type": "Date"}, {"name": "maxDate", "type": "Date"}, {"name": "timeZone", "type": "TimeZo...
7968180_69
class CytoPanelStateChangedEvent extends AbstractCyEvent<Object> { public CytoPanelState getNewState() { return newState; } public CytoPanelStateChangedEvent(final Object source, final CytoPanel cp, final CytoPanelState newState); public CytoPanel getCytoPanel(); CytoPanelStateChangedEvent event; @Mock p...
assertEquals(newState, event.getNewState()); } }
[FOCAL] public CytoPanelState CytoPanelStateChangedEvent.getNewState() [CLASS] class CytoPanelStateChangedEvent extends AbstractCyEvent<Object> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [FIELDS] read=newState:CytoPanelState [INPUTS] branches=- | result=newState [DATAFLOW] this.newState@param-...
/* static context [FOCAL] public CytoPanelState CytoPanelStateChangedEvent.getNewState() [INPUTS] branches=- | result=newState [FIELDS] read=newState:CytoPanelState */
/* static context [FOCAL] public CytoPanelState CytoPanelStateChangedEvent.getNewState() [INPUTS] branches=- | result=newState [FIELDS] read=newState:CytoPanelState */ class CytoPanelStateChangedEvent extends AbstractCyEvent<Object> { public CytoPanelState getNewState() { return newState; } public CytoPanelStat...
true
ok
{"focal": {"class": "CytoPanelStateChangedEvent", "name": "getNewState", "signature": "CytoPanelState getNewState()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "CytoPanelState"}, "class_info": {"name": "CytoPanelStateChangedEvent", "kind": "class", "modifiers": "", "superclass": "AbstractCyEv...
7983535_9
class TypeUtil { public final static Type getCollectionType(Type type) { if (type instanceof GenericArrayType) { return ((GenericArrayType) type).getGenericComponentType(); } else if (type instanceof Class<?>) { Class<?> clazz = (Class<?>) type; if (clazz.isArray()) return clazz.get...
assertEquals(Object.class, getCollectionType(Collection.class)); assertEquals(Number.class, getCollectionType(tListN)); assertEquals(Number.class, expandType(getCollectionType(tListE), ParametrizedClass.class)); assertEquals(Object.class, expandType(getCollectionType(tListF), ParametrizedClass.class)); ...
[FOCAL] public final static Type TypeUtil.getCollectionType(Type type) [CLASS] class TypeUtil [METRICS] loc=17 cc=6 branches=5 loops=0 returns=4 throws=1 nesting=4 [CALLS-INTERNAL] Class<?> getRawClass(Type type); Type typeOf(int parameterIdx, Type fromType) [CALLS-EXTERNAL] ((GenericArrayType) type).getGenericComponen...
/* static context [FOCAL] public final static Type TypeUtil.getCollectionType(Type type) [THROWS-WHEN] IllegalArgumentException when !(type instanceof GenericArrayType) && type instanceof Class<?> && !clazz.isArray() && !Collection.class.isAssignableFrom(clazz) [THROWS-WHEN] IllegalArgumentException when !(type instanc...
/* static context [FOCAL] public final static Type TypeUtil.getCollectionType(Type type) [THROWS-WHEN] IllegalArgumentException when !(type instanceof GenericArrayType) && type instanceof Class<?> && !clazz.isArray() && !Collection.class.isAssignableFrom(clazz) [THROWS-WHEN] IllegalArgumentException when !(type instanc...
true
ok
{"focal": {"class": "TypeUtil", "name": "getCollectionType", "signature": "Type getCollectionType(Type type)", "start_line": 3, "modifiers": "public final static", "params": [{"name": "type", "type": "Type"}], "return_type": "Type"}, "class_info": {"name": "TypeUtil", "kind": "class", "modifiers": "", "superclass": nul...
7997879_106
class TextFormat { public static void write004(Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException { /* See http://prometheus.io/docs/instrumenting/exposition_formats/ * for the output format specification. */ while(mfs.hasMoreElements()) { Collector.MetricFamilySampl...
Gauge labels = Gauge.build().name("labels").help("help").labelNames("l").register(registry); labels.labels("ąćčęntěd a\nb\\c\"d").inc(); TextFormat.write004(writer, registry.metricFamilySamples()); assertEquals("# HELP labels help\n" + "# TYPE labels gauge\n" + "labels{...
[FOCAL] public static void TextFormat.write004(Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) [CLASS] class TextFormat [METRICS] loc=39 cc=6 branches=2 loops=3 returns=0 throws=0 nesting=4 [CALLS-INTERNAL] String typeString(Collector.Type t); void writeEscapedHelp(Writer writer, String s); void writeEsc...
/* static context [FOCAL] public static void TextFormat.write004(Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) [PATH1] while(mfs.hasMoreElements())=T -> foreach(Collector.MetricFamilySamples.Sample sample : metricFamilySamples.samples)=T -> if(sample.labelNames.size() > 0)=T -> for(i < sample.labelName...
/* static context [FOCAL] public static void TextFormat.write004(Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) [PATH1] while(mfs.hasMoreElements())=T -> foreach(Collector.MetricFamilySamples.Sample sample : metricFamilySamples.samples)=T -> if(sample.labelNames.size() > 0)=T -> for(i < sample.labelName...
true
ok
{"focal": {"class": "TextFormat", "name": "write004", "signature": "void write004(Writer writer, Enumeration<Collector.MetricFamilySamples> mfs) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "writer", "type": "Writer"}, {"name": "mfs", "type": "Enumeration<Collector.MetricFamil...
8000878_7
class RaygunStripWrappedExceptionFilter implements IRaygunOnBeforeSend, IRaygunSendEventFactory<IRaygunOnBeforeSend> { public RaygunMessage onBeforeSend(RaygunClient client, RaygunMessage message) { if(message.getDetails() != null && message.getDetails().getError() != null ...
RaygunStripWrappedExceptionFilter f = new RaygunStripWrappedExceptionFilter(ClassNotFoundException.class); RaygunMessage message = new RaygunMessage(); message.getDetails().setError(new RaygunErrorMessage(new Exception("keep me!", new ClassNotFoundException("keep me too!")))); f.onBefor...
[FOCAL] public RaygunMessage RaygunStripWrappedExceptionFilter.onBeforeSend(RaygunClient client, RaygunMessage message) [CLASS] class RaygunStripWrappedExceptionFilter implements IRaygunOnBeforeSend, IRaygunSendEventFactory<IRaygunOnBeforeSend> [METRICS] loc=21 cc=4 branches=2 loops=1 returns=2 throws=0 nesting=3 [CALL...
/* static context [FOCAL] public RaygunMessage RaygunStripWrappedExceptionFilter.onBeforeSend(RaygunClient client, RaygunMessage message) [PATH1] if((message.getDetails() != null && message.getDetails().getError() != null && message.getDetails().getError().getInnerE...)=T -> foreach(Class<?> stripClass : stripClasses)=...
/* static context [FOCAL] public RaygunMessage RaygunStripWrappedExceptionFilter.onBeforeSend(RaygunClient client, RaygunMessage message) [PATH1] if((message.getDetails() != null && message.getDetails().getError() != null && message.getDetails().getError().getInnerE...)=T -> foreach(Class<?> stripClass : stripClasses)=...
true
ok
{"focal": {"class": "RaygunStripWrappedExceptionFilter", "name": "onBeforeSend", "signature": "RaygunMessage onBeforeSend(RaygunClient client, RaygunMessage message)", "start_line": 3, "modifiers": "public", "params": [{"name": "client", "type": "RaygunClient"}, {"name": "message", "type": "RaygunMessage"}], "return_ty...
8010626_2018
class VcfImporterService implements ImportService { @Transactional @Override public EntityImportReport doImport( RepositoryCollection source, MetadataAction metadataAction, DataAction dataAction, @Nullable @CheckForNull String packageId) { if (dataAction != DataAction.ADD) { thr...
RepositoryCollection source = mock(RepositoryCollection.class); String defaultPackage = "package"; assertThrows( IllegalArgumentException.class, () -> vcfImporterService.doImport( source, MetadataAction.ADD, DataAction.ADD_UPDATE_EXISTING, defaultPackage)); } }
[FOCAL] @Transactional @Override public EntityImportReport VcfImporterService.doImport(RepositoryCollection source, MetadataAction metadataAction, DataAction dataAction, String packageId) [CLASS] class VcfImporterService implements ImportService [METRICS] loc=34 cc=5 branches=3 loops=0 returns=1 throws=2 nesting=2 [CAL...
/* static context [FOCAL] @Transactional @Override public EntityImportReport VcfImporterService.doImport(RepositoryCollection source, MetadataAction metadataAction, DataAction dataAction, String packageId) [THROWS-WHEN] IllegalArgumentException when dataAction != DataAction.ADD [THROWS-WHEN] MolgenisDataException when ...
/* static context [FOCAL] @Transactional @Override public EntityImportReport VcfImporterService.doImport(RepositoryCollection source, MetadataAction metadataAction, DataAction dataAction, String packageId) [THROWS-WHEN] IllegalArgumentException when dataAction != DataAction.ADD [THROWS-WHEN] MolgenisDataException when ...
true
ok
{"focal": {"class": "VcfImporterService", "name": "doImport", "signature": "EntityImportReport doImport(RepositoryCollection source, MetadataAction metadataAction, DataAction dataAction, String packageId)", "start_line": 3, "modifiers": "@Transactional @Override public", "params": [{"name": "source", "type": "Repositor...
8015168_6
class Vectoriser { public Vector vectorise(Document document) { Vector body = luceneEncode(bodyCard, document.getBody()); Vector title = luceneEncode(titleCard, document.getTitle()); //Vector tags = luceneEncode(tagCard, Strings.collectionToCommaDelimitedString(document.getTags())); //Vector reputation = Vect...
Vectoriser vectorise = new Vectoriser(); Document doc = Document.of("first second", "", "", 0.0, new HashSet<String>()); Vector vec = vectorise.vectorise(doc); assertEquals("Adding one term should result in two dimensions set to one.", 4, vec.getNumNondefaultElements()); } }
[FOCAL] public Vector Vectoriser.vectorise(Document document) [CLASS] class Vectoriser [METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] Vector luceneEncode(int probes, String text) [CALLS-EXTERNAL] Document.getBody/0, Document.getTitle/0, Vectors.append/2 [INPUTS] branches=- | resul...
/* static context [FOCAL] public Vector Vectoriser.vectorise(Document document) [INPUTS] branches=- | result=document [COLLABORATORS] param document:Document getBody/0,getTitle/0 [CALLS-INTERNAL] Vector luceneEncode(int probes, String text) [CALLS-EXTERNAL] Document.getBody/0, Document.getTitle/0, Vectors.append/2 */
/* static context [FOCAL] public Vector Vectoriser.vectorise(Document document) [INPUTS] branches=- | result=document [COLLABORATORS] param document:Document getBody/0,getTitle/0 [CALLS-INTERNAL] Vector luceneEncode(int probes, String text) [CALLS-EXTERNAL] Document.getBody/0, Document.getTitle/0, Vectors.append/2 */ c...
true
ok
{"focal": {"class": "Vectoriser", "name": "vectorise", "signature": "Vector vectorise(Document document)", "start_line": 3, "modifiers": "public", "params": [{"name": "document", "type": "Document"}], "return_type": "Vector"}, "class_info": {"name": "Vectoriser", "kind": "class", "modifiers": "", "superclass": null, "i...
8022939_8
class DefaultLocalizationProvider implements LocalizationProvider { @Override public String getString(String key) { return getPropertyResolver().getString(checkNotNull(key)); } private DefaultLocalizationProvider(Builder builder); @Override public Boolean getBoolean(String key); @Ove...
thrown.expect(UnsupportedLocationException.class); String expectedMessage = "Unsupported location: '" + LOCATION + "'"; thrown.expectMessage(expectedMessage); LocalizationProvider localizationProvider = createDefault(); when(localeResolver.getLocale()).thenReturn(Locale.ITALY); ...
[FOCAL] @Override public String DefaultLocalizationProvider.getString(String key) [CLASS] class DefaultLocalizationProvider implements LocalizationProvider [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] PropertyResolver getPropertyResolver() [CALLS-EXTERNAL] getPropertyResolver()....
/* static context [FOCAL] @Override public String DefaultLocalizationProvider.getString(String key) [INPUTS] branches=- | result=key [CALLS-INTERNAL] PropertyResolver getPropertyResolver() [CALLS-EXTERNAL] getPropertyResolver().getString/1, checkNotNull/1 (inherited) */
/* static context [FOCAL] @Override public String DefaultLocalizationProvider.getString(String key) [INPUTS] branches=- | result=key [CALLS-INTERNAL] PropertyResolver getPropertyResolver() [CALLS-EXTERNAL] getPropertyResolver().getString/1, checkNotNull/1 (inherited) */ class DefaultLocalizationProvider implements Loca...
true
ok
{"focal": {"class": "DefaultLocalizationProvider", "name": "getString", "signature": "String getString(String key)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "key", "type": "String"}], "return_type": "String"}, "class_info": {"name": "DefaultLocalizationProvider", "kind": "class", "modifier...
8025185_0
class LanguageDictionary { public AppleLanguage getLanguage() { return language; } public LanguageDictionary(String lprojName); public static LanguageDictionary createFromFile(File f); public JSONObject readContentFromBinaryFile(File binaryFile); public void addJSONContent(JSONObject content); pri...
String name = "French"; LanguageDictionary dict = new LanguageDictionary(name); Assert.assertEquals(dict.getLanguage().getIsoCode(), "fr"); } }
[FOCAL] public AppleLanguage LanguageDictionary.getLanguage() [CLASS] class LanguageDictionary [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] LanguageDictionary(String lprojName); LanguageDictionary createFromFile(File f); JSONObject readContentFromBinaryFile(File binaryFile); void...
/* static context [FOCAL] public AppleLanguage LanguageDictionary.getLanguage() */
/* static context [FOCAL] public AppleLanguage LanguageDictionary.getLanguage() */ class LanguageDictionary { public AppleLanguage getLanguage() { return language; } public LanguageDictionary(String lprojName); public static LanguageDictionary createFromFile(File f); public JSONObject readContentFromB...
true
ok
{"focal": {"class": "LanguageDictionary", "name": "getLanguage", "signature": "AppleLanguage getLanguage()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "AppleLanguage"}, "class_info": {"name": "LanguageDictionary", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fiel...
8031741_0
class Calculator { public static Position findPosition(Position startingLocation, Position endLocation, double distanceTravelled) { double distance = distanceTravelled / 6371000; LatLonPoint result = GreatCircle.pointAtDistanceBetweenPoints( Math.toRadians(startingLocat...
double lat = ParseUtils.parseLatitude("61 00.000N"); double lon = ParseUtils.parseLongitude("051 00.000W"); Position start = Position.create(lat, lon); Position result = Calculator.findPosition(start, 45.0, 9260.0); assertNotNull(result); assertEquals("61 03.530N", resu...
[FOCAL] public static Position Calculator.findPosition(Position startingLocation, Position endLocation, double distanceTravelled) [CLASS] class Calculator [METRICS] loc=12 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] GreatCircle.pointAtDistanceBetweenPoints/6, Math.toRadians/1, Position.getLati...
/* static context [FOCAL] public static Position Calculator.findPosition(Position startingLocation, Position endLocation, double distanceTravelled) [INPUTS] branches=- | result=distanceTravelled, endLocation, startingLocation [COLLABORATORS] param startingLocation:Position getLatitude/0,getLongitude/0; param endLocatio...
/* static context [FOCAL] public static Position Calculator.findPosition(Position startingLocation, Position endLocation, double distanceTravelled) [INPUTS] branches=- | result=distanceTravelled, endLocation, startingLocation [COLLABORATORS] param startingLocation:Position getLatitude/0,getLongitude/0; param endLocatio...
true
ok
{"focal": {"class": "Calculator", "name": "findPosition", "signature": "Position findPosition(Position startingLocation, Position endLocation, double distanceTravelled)", "start_line": 3, "modifiers": "public static", "params": [{"name": "startingLocation", "type": "Position"}, {"name": "endLocation", "type": "Position...
8033805_0
class JavaClass { public int returnInputValue(int input) { return input; } private static final int TEST_VALUE; } class JavaClassTest { private static final int TEST_VALUE; @Test public void shouldReturnGivenValue() {
JavaClass javaClass = new JavaClass(); int returnedValue = javaClass.returnInputValue(TEST_VALUE); assertThat(returnedValue).isEqualTo(TEST_VALUE); } }
[FOCAL] public int JavaClass.returnInputValue(int input) [CLASS] class JavaClass [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [INPUTS] branches=- | result=input [DATAFLOW] input@param->L2 [TEST] JavaClassTest: @Test public void shouldReturnGivenValue() [TEST-FIELDS] int TEST_VALUE
/* static context [FOCAL] public int JavaClass.returnInputValue(int input) [INPUTS] branches=- | result=input */
/* static context [FOCAL] public int JavaClass.returnInputValue(int input) [INPUTS] branches=- | result=input */ class JavaClass { public int returnInputValue(int input) { return input; } private static final int TEST_VALUE; } class JavaClassTest { private static final int TEST_VALUE; ...
true
ok
{"focal": {"class": "JavaClass", "name": "returnInputValue", "signature": "int returnInputValue(int input)", "start_line": 3, "modifiers": "public", "params": [{"name": "input", "type": "int"}], "return_type": "int"}, "class_info": {"name": "JavaClass", "kind": "class", "modifiers": "", "superclass": null, "interfaces"...
8037199_2
class Template { public static String renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry) { return renderWhereStringTemplate(sqlWhereString, TEMPLATE, dialect, functionRegistry); } private Template(); @Deprecated @SuppressWarnings({ "JavaDoc" }) public stati...
String fragment = "trim( col )"; String template = Template.renderWhereStringTemplate( fragment, Template.TEMPLATE, DIALECT, FUNCTION_REGISTRY ); assertEquals( "trim(" + Template.TEMPLATE + ".col)", template ); fragment = "trim( from col )"; template = Template.renderWhereStringTemplate( fragment, Template.T...
[FOCAL] public static String Template.renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry) [CLASS] class Template [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] String renderWhereStringTemplate(String sqlWhereString, String placeh...
/* static context [FOCAL] public static String Template.renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry) [INPUTS] branches=- | result=dialect, functionRegistry, sqlWhereString [CALLS-INTERNAL] String renderWhereStringTemplate(String sqlWhereString, String placehold...
/* static context [FOCAL] public static String Template.renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry) [INPUTS] branches=- | result=dialect, functionRegistry, sqlWhereString [CALLS-INTERNAL] String renderWhereStringTemplate(String sqlWhereString, String placehold...
true
ok
{"focal": {"class": "Template", "name": "renderWhereStringTemplate", "signature": "String renderWhereStringTemplate(String sqlWhereString, Dialect dialect, SQLFunctionRegistry functionRegistry)", "start_line": 3, "modifiers": "public static", "params": [{"name": "sqlWhereString", "type": "String"}, {"name": "dialect", ...
8049046_20
class SimpleListPropertyCommandExecutor implements ListPropertyCommandExecutor { @Override public void execute(final AddToList command) { final List<Object> list = getListOrFail(command); final Object value = valueMapper.map(command.getValue()); silentChangeExecutor.execute(list, new ...
final AddToList command1 = new AddToList(exemplaryListId, exemplaryVersionChange, new Value("second"), 0); final AddToList command2 = new AddToList(exemplaryListId, exemplaryVersionChange, new Value("first"), 0); final AddToList command3 = new AddToList(exemplaryListId, exemplaryVersionChange, n...
[FOCAL] @Override public void SimpleListPropertyCommandExecutor.execute(AddToList command) [CLASS] class SimpleListPropertyCommandExecutor implements ListPropertyCommandExecutor [METRICS] loc=15 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] List<Object> getListOrFail(ListCommand command); void u...
/* static context [FOCAL] @Override public void SimpleListPropertyCommandExecutor.execute(AddToList command) [COLLABORATORS] field valueMapper:ValueMapper map/1; param command:AddToList getValue/0,getPosition/0; field silentChangeExecutor:SilentChangeExecutor execute/2 [CALLS-INTERNAL] List<Object> getListOrFail(ListCo...
/* static context [FOCAL] @Override public void SimpleListPropertyCommandExecutor.execute(AddToList command) [COLLABORATORS] field valueMapper:ValueMapper map/1; param command:AddToList getValue/0,getPosition/0; field silentChangeExecutor:SilentChangeExecutor execute/2 [CALLS-INTERNAL] List<Object> getListOrFail(ListCo...
true
ok
{"focal": {"class": "SimpleListPropertyCommandExecutor", "name": "execute", "signature": "void execute(AddToList command)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "command", "type": "AddToList"}], "return_type": "void"}, "class_info": {"name": "SimpleListPropertyCommandExecutor", "kind": ...
8054843_6
class Hack { public static HackedObject into(final Object source) { return new HackedMirrorObject(source); } private Hack(); public static R mirrorStaticMethod(final String tag, final R fallback, final Object... args); private static Method findSourceStaticMethod(final StackTraceElement[] stack, final int nu...
assertFail(ClassNotFoundException.class, Hack.into("NoSuchClass").method("nonSense").withoutParams()); assertFail(ClassNotFoundException.class, Hack.into(Simple.class).field("mIntField").ofType("NoSuchType")); assertFail(ClassNotFoundException.class, Hack.into(Simple.class).staticField("mStaticField").ofType("NoS...
[FOCAL] public static HackedObject Hack.into(Object source) [CLASS] class Hack [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [NEW] HackedMirrorObject [INPUTS] branches=- | result=source [DATAFLOW] source@param->L2 [CLASS-MEMBERS] Hack(); R mirrorStaticMethod(String tag, R fallback, Object... args...
/* static context [FOCAL] public static HackedObject Hack.into(Object source) [INPUTS] branches=- | result=source [NEW] HackedMirrorObject */
/* static context [FOCAL] public static HackedObject Hack.into(Object source) [INPUTS] branches=- | result=source [NEW] HackedMirrorObject */ class Hack { public static HackedObject into(final Object source) { return new HackedMirrorObject(source); } private Hack(); public static R mirrorStaticMethod(final St...
true
ok
{"focal": {"class": "Hack", "name": "into", "signature": "HackedObject into(Object source)", "start_line": 3, "modifiers": "public static", "params": [{"name": "source", "type": "Object"}], "return_type": "HackedObject"}, "class_info": {"name": "Hack", "kind": "class", "modifiers": "", "superclass": null, "interfaces":...
8131104_25
class RotationsToDistanceDecoder implements Decoder<T> { @Override public void update(T newPage) { decoder.update(newPage); } public RotationsToDistanceDecoder(FilteredBroadcastMessenger<TaggedTelemetryEvent> updateHub, BigDecimal wheelCircumference); public void reset(); @Override p...
FilteredBroadcastMessenger<TaggedTelemetryEvent> bus = new FilteredBroadcastMessenger<TaggedTelemetryEvent>(); class FreqListener implements BroadcastListener<TaggedTelemetryEvent> { private long rotations; public void receiveMessage(TaggedTelemetryEvent telemetryEvent) { ...
[FOCAL] @Override public void RotationsToDistanceDecoder.update(T newPage) [CLASS] class RotationsToDistanceDecoder implements Decoder<T> [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] decoder.update/1 [COLLABORATORS] field decoder update/1 [DATAFLOW] newPage@param->L3 [CLASS-MEMB...
/* static context [FOCAL] @Override public void RotationsToDistanceDecoder.update(T newPage) [COLLABORATORS] field decoder update/1 [CALLS-EXTERNAL] decoder.update/1 */
/* static context [FOCAL] @Override public void RotationsToDistanceDecoder.update(T newPage) [COLLABORATORS] field decoder update/1 [CALLS-EXTERNAL] decoder.update/1 */ class RotationsToDistanceDecoder implements Decoder<T> { @Override public void update(T newPage) { decoder.update(newPage); } ...
true
ok
{"focal": {"class": "RotationsToDistanceDecoder", "name": "update", "signature": "void update(T newPage)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "newPage", "type": "T"}], "return_type": "void"}, "class_info": {"name": "RotationsToDistanceDecoder", "kind": "class", "modifiers": "", "super...
8134070_1
class UserManagerImpl extends UniversalManagerImpl implements UserManager, UserService { public User getUser(String userId) { return dao.get(new Integer(userId)); } @Required public void setPasswordEncoder(PasswordEncoder passwordEncoder); public List<User> getUsers(User user); public Stri...
final User testData = new User("1"); testData.getRoles().add(new Role("user")); // set expected behavior on dao context.checking(new Expectations() {{ one(userDao).get(with(equal(1))); will(returnValue(testData)); }}); User user = userMan...
[FOCAL] public User UserManagerImpl.getUser(String userId) [CLASS] class UserManagerImpl extends UniversalManagerImpl implements UserManager, UserService [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] dao.get/1 [NEW] Integer [INPUTS] branches=- | result=userId [COLLABORATORS] fiel...
/* static context [FOCAL] public User UserManagerImpl.getUser(String userId) [INPUTS] branches=- | result=userId [COLLABORATORS] field dao get/1 [NEW] Integer [CALLS-EXTERNAL] dao.get/1 */
/* static context [FOCAL] public User UserManagerImpl.getUser(String userId) [INPUTS] branches=- | result=userId [COLLABORATORS] field dao get/1 [NEW] Integer [CALLS-EXTERNAL] dao.get/1 */ class UserManagerImpl extends UniversalManagerImpl implements UserManager, UserService { public User getUser(String userId) { ...
true
ok
{"focal": {"class": "UserManagerImpl", "name": "getUser", "signature": "User getUser(String userId)", "start_line": 3, "modifiers": "public", "params": [{"name": "userId", "type": "String"}], "return_type": "User"}, "class_info": {"name": "UserManagerImpl", "kind": "class", "modifiers": "", "superclass": "UniversalMana...
8135809_1
class LuaSquidSensor implements Sensor { @Override public void execute(SensorContext context) { FileSystem fileSystem = context.fileSystem(); FilePredicates predicates = fileSystem.predicates(); List<SquidAstVisitor<LexerlessGrammar>> visitors = new ArrayList<>(checks.all()); visitors.add(new FileL...
DefaultFileSystem fs = new DefaultFileSystem(TEST_DIR); tester.setFileSystem(fs); DefaultInputFile inputFile = new DefaultInputFile("key", "smallFile.lua") .setType(InputFile.Type.MAIN) .setLanguage(Lua.KEY) .initMetadata(new FileMetadata().readMetadata(new FileReader(new File(TEST_DIR, "s...
[FOCAL] @Override public void LuaSquidSensor.execute(SensorContext context) [CLASS] class LuaSquidSensor implements Sensor [METRICS] loc=21 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void save(SensorContext context, Collection<SourceCode> squidSourceFiles) [CALLS-EXTERNAL] SensorContext.fileS...
/* static context [FOCAL] @Override public void LuaSquidSensor.execute(SensorContext context) [COLLABORATORS] param context:SensorContext fileSystem/0; field checks all/0; field inputFile absolutePath/0; field scanner scanFiles/1,getIndex/0 [CALLS-INTERNAL] void save(SensorContext context, Collection<SourceCode> squidS...
/* static context [FOCAL] @Override public void LuaSquidSensor.execute(SensorContext context) [COLLABORATORS] param context:SensorContext fileSystem/0; field checks all/0; field inputFile absolutePath/0; field scanner scanFiles/1,getIndex/0 [CALLS-INTERNAL] void save(SensorContext context, Collection<SourceCode> squidS...
true
ok
{"focal": {"class": "LuaSquidSensor", "name": "execute", "signature": "void execute(SensorContext context)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "context", "type": "SensorContext"}], "return_type": "void"}, "class_info": {"name": "LuaSquidSensor", "kind": "class", "modifiers": "", "sup...
8139882_0
class KieWorkbenchEntryPoint extends DefaultWorkbenchEntryPoint { @PostConstruct public void init() { appFormerJsBridge.init("org.kie.bc.KIEWebapp"); homeConfiguration.setMonitoring(true); workbench.addStartupBlocker(KieWorkbenchEntryPoint.class); // Due to a limitatio...
kieWorkbenchEntryPoint.init(); verify(workbench).addStartupBlocker(KieWorkbenchEntryPoint.class); verify(navTreeEditor).setMaxLevels(NavTreeDefinitions.GROUP_WORKBENCH, 2); } }
[FOCAL] @PostConstruct public void KieWorkbenchEntryPoint.init() [CLASS] class KieWorkbenchEntryPoint extends DefaultWorkbenchEntryPoint [METRICS] loc=12 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] appFormerJsBridge.init/1, HomeConfiguration.setMonitoring/1, Workbench.addStartupBlocker/1, navi...
/* static context [FOCAL] @PostConstruct public void KieWorkbenchEntryPoint.init() [COLLABORATORS] field appFormerJsBridge init/1; field homeConfiguration:HomeConfiguration setMonitoring/1; field workbench:Workbench addStartupBlocker/1; field navigationExplorerScreen:NavigationExplorerScreen getNavTreeEditor/0 [FIELDS]...
/* static context [FOCAL] @PostConstruct public void KieWorkbenchEntryPoint.init() [COLLABORATORS] field appFormerJsBridge init/1; field homeConfiguration:HomeConfiguration setMonitoring/1; field workbench:Workbench addStartupBlocker/1; field navigationExplorerScreen:NavigationExplorerScreen getNavTreeEditor/0 [FIELDS]...
true
ok
{"focal": {"class": "KieWorkbenchEntryPoint", "name": "init", "signature": "void init()", "start_line": 3, "modifiers": "@PostConstruct public", "params": [], "return_type": "void"}, "class_info": {"name": "KieWorkbenchEntryPoint", "kind": "class", "modifiers": "", "superclass": "DefaultWorkbenchEntryPoint", "interface...
8143599_92
class SmppObject { static public void setDebug(Debug dbg) { debug = dbg; } static public void setEvent(Event evt); static public Debug getDebug(); static public Event getEvent(); } class SmppObjectTest { @Test public void testSetDebug() {
Debug debug = mock(Debug.class); SmppObject.setDebug(debug); assertEquals(debug, SmppObject.getDebug()); } }
[FOCAL] static public void SmppObject.setDebug(Debug dbg) [CLASS] class SmppObject [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [DATAFLOW] dbg@param->L2 [CLASS-MEMBERS] void setEvent(Event evt); Debug getDebug(); Event getEvent() [TEST] SmppObjectTest: @Test public void testSetDebug()
/* static context [FOCAL] static public void SmppObject.setDebug(Debug dbg) */
/* static context [FOCAL] static public void SmppObject.setDebug(Debug dbg) */ class SmppObject { static public void setDebug(Debug dbg) { debug = dbg; } static public void setEvent(Event evt); static public Debug getDebug(); static public Event getEvent(); } class SmppObjectTest { @Test public void testS...
true
ok
{"focal": {"class": "SmppObject", "name": "setDebug", "signature": "void setDebug(Debug dbg)", "start_line": 3, "modifiers": "static public", "params": [{"name": "dbg", "type": "Debug"}], "return_type": "void"}, "class_info": {"name": "SmppObject", "kind": "class", "modifiers": "", "superclass": null, "interfaces": nul...
8147920_29
class StatementSizeEstimator { public static long estimatedSizeOf(Statement statement) { Value object = statement.getObject(); Resource context = statement.getContext(); long result = STATEMENT_OVERHEAD + 2 * URI_BNODE_OVERHEAD // subject, predicate + OBJ_REF...
// Arrange Statement statement = VALUE_FACTORY.createStatement( VALUE_FACTORY.createBNode("http://a"), VALUE_FACTORY.createURI("http://b"), VALUE_FACTORY.createURI("http://c"), VALUE_FACTORY.createURI("http://d")); // Act l...
[FOCAL] public static long StatementSizeEstimator.estimatedSizeOf(Statement statement) [CLASS] class StatementSizeEstimator [METRICS] loc=30 cc=5 branches=4 loops=0 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] Statement.getObject/0, Statement.getContext/0, StringSizeEstimator.estimatedSizeOf/1, statement.getSubject()....
/* static context [FOCAL] public static long StatementSizeEstimator.estimatedSizeOf(Statement statement) [PATH1] if(object instanceof Literal)=T -> if(literal.getLanguage() != null)=T -> if(literal.getDatatype() != null)=T -> if(context != null)=T -> return result [PATH2] if(object instanceof Literal)=T -> if(literal.g...
/* static context [FOCAL] public static long StatementSizeEstimator.estimatedSizeOf(Statement statement) [PATH1] if(object instanceof Literal)=T -> if(literal.getLanguage() != null)=T -> if(literal.getDatatype() != null)=T -> if(context != null)=T -> return result [PATH2] if(object instanceof Literal)=T -> if(literal.g...
true
ok
{"focal": {"class": "StatementSizeEstimator", "name": "estimatedSizeOf", "signature": "long estimatedSizeOf(Statement statement)", "start_line": 3, "modifiers": "public static", "params": [{"name": "statement", "type": "Statement"}], "return_type": "long"}, "class_info": {"name": "StatementSizeEstimator", "kind": "clas...
8155767_6
class OwmClient { public WeatherStatusResponse currentWeatherAtCity (float lat, float lon, int cnt) throws IOException, JSONException { //, boolean cluster, OwmClient.Lang lang) { String subUrl = String.format (Locale.ROOT, "find/city?lat=%f&lon=%f&cnt=%d&cluster=yes", Float.valueOf (lat), Float.valueOf (lon), ...
HttpClient mockHttpClient = createHttpClientThatRespondsWith (TestData.CURRENT_WEATHER_AT_CITY_ID_MOSKOW); OwmClient owm = new OwmClient (mockHttpClient); StatusWeatherData weatherData = owm.currentWeatherAtCity (524901); assertEquals ("Moscow", weatherData.getName ()); assertEquals (524901, weatherData.getId...
[FOCAL] public WeatherStatusResponse OwmClient.currentWeatherAtCity(float lat, float lon, int cnt) [CLASS] class OwmClient [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] JSONObject doQuery(String subUrl) [CALLS-EXTERNAL] String.format/5, Float.valueOf/1, Integer.valueOf/1 [NEW] We...
/* static context [FOCAL] public WeatherStatusResponse OwmClient.currentWeatherAtCity(float lat, float lon, int cnt) [INPUTS] branches=- | result=cnt, lat, lon [EXCEPTIONS] declares IOException, JSONException [CALLS-INTERNAL] JSONObject doQuery(String subUrl) [NEW] WeatherStatusResponse [CALLS-EXTERNAL] String.format/5...
/* static context [FOCAL] public WeatherStatusResponse OwmClient.currentWeatherAtCity(float lat, float lon, int cnt) [INPUTS] branches=- | result=cnt, lat, lon [EXCEPTIONS] declares IOException, JSONException [CALLS-INTERNAL] JSONObject doQuery(String subUrl) [NEW] WeatherStatusResponse [CALLS-EXTERNAL] String.format/5...
true
ok
{"focal": {"class": "OwmClient", "name": "currentWeatherAtCity", "signature": "WeatherStatusResponse currentWeatherAtCity(float lat, float lon, int cnt) throws IOException, JSONException", "start_line": 3, "modifiers": "public", "params": [{"name": "lat", "type": "float"}, {"name": "lon", "type": "float"}, {"name": "cn...
8166928_10
class FunctionConsumer extends DefaultConsumer { @Override public void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException { long deliveryTag = envelope.getDeliveryTag(); Stopwatch stopwatch = Stopwatch.createStarted(); ...
FunctionConsumer<TestMsg> consumer = new FunctionConsumer<>(channel, msg -> { throw new RuntimeException("Message processing failed on purpose."); }, TestMsg.class, "name", metrics); consumer.handleDelivery(null, envelope, null, message); verify(channel)...
[FOCAL] @Override public void FunctionConsumer.handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) [CLASS] class FunctionConsumer extends DefaultConsumer [METRICS] loc=28 cc=3 branches=1 loops=0 returns=0 throws=0 nesting=2 [CALLS-EXTERNAL] Envelope.getDeliveryTag/0, Stop...
/* static context [FOCAL] @Override public void FunctionConsumer.handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) [PATH1] try-body throws [PATH2] if(log.isTraceEnabled())=T [PATH3] if(log.isTraceEnabled())=F [INPUTS] branches=- | result=- | unused=consumerTag, properti...
/* static context [FOCAL] @Override public void FunctionConsumer.handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) [PATH1] try-body throws [PATH2] if(log.isTraceEnabled())=T [PATH3] if(log.isTraceEnabled())=F [INPUTS] branches=- | result=- | unused=consumerTag, properti...
true
ok
{"focal": {"class": "FunctionConsumer", "name": "handleDelivery", "signature": "void handleDelivery(String consumerTag, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "consumerTag", "type": "String"}, {"name": "...
8176370_4
class HtmlHyperlink extends HtmlTagWithContent { public void setHref(String href) { this.href = href; } public HtmlHyperlink(); public HtmlHyperlink(String href, String label); @Override protected StringBuilder getHtmlAttributes(); public String getHref(); public String getOnclick(); ...
hyperlink.setId("fullId"); hyperlink.addCssClass("classy"); hyperlink.addCssStyle("styly"); hyperlink.setHref("fullHref"); hyperlink.addContent("valued"); assertThat(hyperlink.toHtml().toString()).isEqualTo("<a id=\"fullId\" class=\"classy\" style=\"styly\" href=\"fullHref\">valued</a>"); } }
[FOCAL] public void HtmlHyperlink.setHref(String href) [CLASS] class HtmlHyperlink extends HtmlTagWithContent [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [FIELDS] write=href [STATE] href via getHref() [DATAFLOW] href@param->L2 [CLASS-MEMBERS] HtmlHyperlink(); HtmlHyperlink(String href, String l...
/* static context [FOCAL] public void HtmlHyperlink.setHref(String href) [STATE] href via getHref() [FIELDS] write=href */
/* static context [FOCAL] public void HtmlHyperlink.setHref(String href) [STATE] href via getHref() [FIELDS] write=href */ class HtmlHyperlink extends HtmlTagWithContent { public void setHref(String href) { this.href = href; } public HtmlHyperlink(); public HtmlHyperlink(String href, String label)...
true
ok
{"focal": {"class": "HtmlHyperlink", "name": "setHref", "signature": "void setHref(String href)", "start_line": 3, "modifiers": "public", "params": [{"name": "href", "type": "String"}], "return_type": "void"}, "class_info": {"name": "HtmlHyperlink", "kind": "class", "modifiers": "", "superclass": "HtmlTagWithContent", ...
8188105_4
class OftpComponent extends DefaultComponent { public OftpSettings getSettings() { return settings; } public OftpComponent(); public OftpComponent(CamelContext context); @Override protected void doStart(); @Override protected void doStop(); @Override protected Endpoint createEndpoint(String uri, String re...
OftpServerEndpoint endpoint = resolveMandatoryEndpoint("oftp-server://TheServerOID:secret@myhost/?" + "userData=DEV&debSize=1496&restart=true&cipherSuite=tripledesRsaSha1"); OftpSettings config = endpoint.getSettings(); assertEquals("userData", "DEV", config.getUserData()); assertEquals("debSize", 1496, co...
[FOCAL] public OftpSettings OftpComponent.getSettings() [CLASS] class OftpComponent extends DefaultComponent [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] OftpComponent(); OftpComponent(CamelContext context); void doStart(); void doStop(); Endpoint createEndpoint(String uri, Strin...
/* static context [FOCAL] public OftpSettings OftpComponent.getSettings() */
/* static context [FOCAL] public OftpSettings OftpComponent.getSettings() */ class OftpComponent extends DefaultComponent { public OftpSettings getSettings() { return settings; } public OftpComponent(); public OftpComponent(CamelContext context); @Override protected void doStart(); @Override protected void...
true
ok
{"focal": {"class": "OftpComponent", "name": "getSettings", "signature": "OftpSettings getSettings()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "OftpSettings"}, "class_info": {"name": "OftpComponent", "kind": "class", "modifiers": "", "superclass": "DefaultComponent", "interfaces": null, "fi...
8201183_0
class System extends Thread implements PlugIn { public System(EngineManager engine) { setName("System"); this.engine = engine; } public System(EngineManager engine); @Override public void reciveMsg(SCSMsg msg); private SCSMsg setTime(SCSMsg msg); private Value getVersion(); private Value getKernel(); pr...
System sys = new System(null); assertNotNull("System must be create", sys); } }
[FOCAL] public System.System(EngineManager engine) [CLASS] class System extends Thread implements PlugIn [METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] setName/1 (inherited) [FIELDS] write=engine [STATE] engine [DATAFLOW] engine@param->L3 [CLASS-MEMBERS] System(EngineManager engin...
/* static context [FOCAL] public System.System(EngineManager engine) [STATE] engine [FIELDS] write=engine [CALLS-EXTERNAL] setName/1 (inherited) */
/* static context [FOCAL] public System.System(EngineManager engine) [STATE] engine [FIELDS] write=engine [CALLS-EXTERNAL] setName/1 (inherited) */ class System extends Thread implements PlugIn { public System(EngineManager engine) { setName("System"); this.engine = engine; } public System(EngineManager engin...
true
ok
{"focal": {"class": "System", "name": "System", "signature": "System(EngineManager engine)", "start_line": 3, "modifiers": "public", "params": [{"name": "engine", "type": "EngineManager"}], "return_type": null}, "class_info": {"name": "System", "kind": "class", "modifiers": "", "superclass": "Thread", "interfaces": "Pl...
8204840_6
class TextContent extends Content implements LineText.ChangeListener { @Override public void onChange() { refresh(); } public TextContent(LineText text); @Override public void draw(Graphics2D graphics); @Override protected void refreshUp(); @Override protected void refreshDow...
SingleLineText singleLineText = new SingleLineText(); TextContent textContent = new TextContent(singleLineText); TestingRefreshContent testingRefreshContent = new TestingRefreshContent(); testingRefreshContent.setAsParent(textContent); assertEquals(0, testingRefreshContent.refre...
[FOCAL] @Override public void TextContent.onChange() [CLASS] class TextContent extends Content implements LineText.ChangeListener [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-EXTERNAL] refresh/0 (inherited) [CLASS-MEMBERS] TextContent(LineText text); void draw(Graphics2D graphics); void r...
/* static context [FOCAL] @Override public void TextContent.onChange() [CALLS-EXTERNAL] refresh/0 (inherited) */
/* static context [FOCAL] @Override public void TextContent.onChange() [CALLS-EXTERNAL] refresh/0 (inherited) */ class TextContent extends Content implements LineText.ChangeListener { @Override public void onChange() { refresh(); } public TextContent(LineText text); @Override public ...
true
ok
{"focal": {"class": "TextContent", "name": "onChange", "signature": "void onChange()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "TextContent", "kind": "class", "modifiers": "", "superclass": "Content", "interfaces": "LineText.ChangeListener", "fields...
8212556_25
class StringTools { public static boolean isBlank(CharSequence sourceSequence) { int sequenceLength; if (sourceSequence == null || (sequenceLength = sourceSequence.length()) == 0) { return true; } for (int i = 0; i < sequenceLength; i++) { if ((Character.isWh...
Assert.assertFalse(StringTools.isBlank(" a a ")); Assert.assertFalse(StringTools.isBlank("a a")); Assert.assertFalse(StringTools.isBlank(" a ")); Assert.assertFalse(StringTools.isBlank("a")); Assert.assertTrue(StringTools.isBlank(" ")); Assert.assertTrue(StringTools.isB...
[FOCAL] public static boolean StringTools.isBlank(CharSequence sourceSequence) [CLASS] class StringTools [METRICS] loc=12 cc=4 branches=2 loops=1 returns=3 throws=0 nesting=2 [CALLS-EXTERNAL] CharSequence.length/0, Character.isWhitespace/1, CharSequence.charAt/1 [PATH1] if(sourceSequence == null || (sequenceLength = so...
/* static context [FOCAL] public static boolean StringTools.isBlank(CharSequence sourceSequence) [PATH1] if(sourceSequence == null || (sequenceLength = sourceSequence.length()) == 0)=F -> for(i < sequenceLength)=T -> if((Character.isWhitespace(sourceSequence.charAt(i)) == false))=F -> exit loop -> return true [PATH2] i...
/* static context [FOCAL] public static boolean StringTools.isBlank(CharSequence sourceSequence) [PATH1] if(sourceSequence == null || (sequenceLength = sourceSequence.length()) == 0)=F -> for(i < sequenceLength)=T -> if((Character.isWhitespace(sourceSequence.charAt(i)) == false))=F -> exit loop -> return true [PATH2] i...
true
ok
{"focal": {"class": "StringTools", "name": "isBlank", "signature": "boolean isBlank(CharSequence sourceSequence)", "start_line": 3, "modifiers": "public static", "params": [{"name": "sourceSequence", "type": "CharSequence"}], "return_type": "boolean"}, "class_info": {"name": "StringTools", "kind": "class", "modifiers":...
8236056_71
class ShortMap implements Iterable<ShortMap.Entry<V>> { public V remove (short key) { if (key == 0) { if (!hasZeroValue) return null; V oldValue = zeroValue; zeroValue = null; hasZeroValue = false; size--; return oldValue; } ...
testAdd(); Assert.assertNull(shortMap.remove((short) 100)); Assert.assertEquals("NewExample123", shortMap.remove((short) 123)); Assert.assertEquals(2, shortMap.size); Assert.assertEquals("Example34", shortMap.remove((short) 34)); Assert.assertEquals(1, shortMap.size); ...
[FOCAL] public V ShortMap.remove(short key) [CLASS] class ShortMap implements Iterable<ShortMap.Entry<V>> [METRICS] loc=39 cc=6 branches=5 loops=0 returns=6 throws=0 nesting=2 [CALLS-INTERNAL] V removeStash(short key); int hash2(short h); int hash3(short h) [PATH1] if(key == 0)=F -> if(keyTable[index] == key)#1=F -> if...
/* static context [FOCAL] public V ShortMap.remove(short key) [PATH1] if(key == 0)=F -> if(keyTable[index] == key)#1=F -> if(keyTable[index] == key)#2=F -> if(keyTable[index] == key)#3=T -> return oldValue [PATH2] if(key == 0)=T -> if(!hasZeroValue)=T -> return null [PATH3] if(key == 0)=F -> if(keyTable[index] == key)#...
/* static context [FOCAL] public V ShortMap.remove(short key) [PATH1] if(key == 0)=F -> if(keyTable[index] == key)#1=F -> if(keyTable[index] == key)#2=F -> if(keyTable[index] == key)#3=T -> return oldValue [PATH2] if(key == 0)=T -> if(!hasZeroValue)=T -> return null [PATH3] if(key == 0)=F -> if(keyTable[index] == key)#...
true
ok
{"focal": {"class": "ShortMap", "name": "remove", "signature": "V remove(short key)", "start_line": 3, "modifiers": "public", "params": [{"name": "key", "type": "short"}], "return_type": "V"}, "class_info": {"name": "ShortMap", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Iterable<ShortMap.Entry...
8262372_172
class FavoredNodeAssignmentHelper { Map<HRegionInfo, ServerName[]> placeSecondaryAndTertiaryRS( Map<HRegionInfo, ServerName> primaryRSMap) { Map<HRegionInfo, ServerName[]> secondaryAndTertiaryMap = new HashMap<HRegionInfo, ServerName[]>(); for (Map.Entry<HRegionInfo, ServerName> entry : primary...
// Test the case where there is only one server in one rack and another rack // has more servers. We try to choose secondary/tertiary on different // racks than what the primary is on. But if the other rack doesn't have // enough nodes to have both secondary/tertiary RSs, the tertiary is placed // o...
[FOCAL] Map<HRegionInfo, ServerName[]> FavoredNodeAssignmentHelper.placeSecondaryAndTertiaryRS(Map<HRegionInfo, ServerName> primaryRSMap) [CLASS] class FavoredNodeAssignmentHelper [METRICS] loc=32 cc=5 branches=2 loops=1 returns=1 throws=0 nesting=3 [CALLS-INTERNAL] ServerName[] multiRackCase(HRegionInfo regionInfo, Se...
/* static context [FOCAL] Map<HRegionInfo, ServerName[]> FavoredNodeAssignmentHelper.placeSecondaryAndTertiaryRS(Map<HRegionInfo, ServerName> primaryRSMap) [PATH1] foreach(Map.Entry<HRegionInfo, ServerName> entry : primaryRSMap.entrySet())=T -> if(getTotalNumberOfRacks() == 1)=T -> if(favoredNodes != null)=T -> exit lo...
/* static context [FOCAL] Map<HRegionInfo, ServerName[]> FavoredNodeAssignmentHelper.placeSecondaryAndTertiaryRS(Map<HRegionInfo, ServerName> primaryRSMap) [PATH1] foreach(Map.Entry<HRegionInfo, ServerName> entry : primaryRSMap.entrySet())=T -> if(getTotalNumberOfRacks() == 1)=T -> if(favoredNodes != null)=T -> exit lo...
true
ok
{"focal": {"class": "FavoredNodeAssignmentHelper", "name": "placeSecondaryAndTertiaryRS", "signature": "Map<HRegionInfo, ServerName[]> placeSecondaryAndTertiaryRS(Map<HRegionInfo, ServerName> primaryRSMap)", "start_line": 3, "modifiers": "", "params": [{"name": "primaryRSMap", "type": "Map<HRegionInfo, ServerName>"}], ...
8276360_0
class FileIngestorRouteBuilder extends RouteBuilder { protected String getEnqueueRecordsDestinationUri() { return "activemq:queue:" + recordsQueueName; } @Override public void configure(); public String getSourceDirPath(); public void setSourceDirPath(String sourceDirPath); public String getDoneDirPath(); p...
RouteDefinition routeDef = context.getRouteDefinition( FileIngestorRouteBuilder.ENQUEUE_RECORD_ROUTE_ID); routeDef.adviceWith(context, new RouteBuilder() { @Override public void configure() throws Exception { interceptSendToEndpoint(builder.getEnqueueRecordsDestinationUri()) .choice() ...
[FOCAL] protected String FileIngestorRouteBuilder.getEnqueueRecordsDestinationUri() [CLASS] class FileIngestorRouteBuilder extends RouteBuilder [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] void configure(); String getSourceDirPath(); void setSourceDirPath(String sourceDirPath); S...
/* static context [FOCAL] protected String FileIngestorRouteBuilder.getEnqueueRecordsDestinationUri() */
/* static context [FOCAL] protected String FileIngestorRouteBuilder.getEnqueueRecordsDestinationUri() */ class FileIngestorRouteBuilder extends RouteBuilder { protected String getEnqueueRecordsDestinationUri() { return "activemq:queue:" + recordsQueueName; } @Override public void configure(); public String get...
true
ok
{"focal": {"class": "FileIngestorRouteBuilder", "name": "getEnqueueRecordsDestinationUri", "signature": "String getEnqueueRecordsDestinationUri()", "start_line": 3, "modifiers": "protected", "params": [], "return_type": "String"}, "class_info": {"name": "FileIngestorRouteBuilder", "kind": "class", "modifiers": "", "sup...
8279377_2
class DVUtil { static Double calculateDurationAgainstDvTemporal(String value, DvTemporal operationTemporal, String symbol) { DateTime dateTime = getDateTime(operationTemporal, value); return calculateDurationAgainstDateTime(value, dateTime, symbol); } public static DataValue createDV( ...
Double aDouble = DVUtil.calculateDurationAgainstDvTemporal("365, d", new DvDateTime("2016-01-01T12:00:00"), "-"); assertThat(aDouble, equalTo(3.1536E10)); } }
[FOCAL] static Double DVUtil.calculateDurationAgainstDvTemporal(String value, DvTemporal operationTemporal, String symbol) [CLASS] class DVUtil [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] DateTime getDateTime(DvTemporal operationDataValue, String value); Double calculateDuratio...
/* static context [FOCAL] static Double DVUtil.calculateDurationAgainstDvTemporal(String value, DvTemporal operationTemporal, String symbol) [INPUTS] branches=- | result=operationTemporal, symbol, value [CALLS-INTERNAL] DateTime getDateTime(DvTemporal operationDataValue, String value); Double calculateDurationAgainstDa...
/* static context [FOCAL] static Double DVUtil.calculateDurationAgainstDvTemporal(String value, DvTemporal operationTemporal, String symbol) [INPUTS] branches=- | result=operationTemporal, symbol, value [CALLS-INTERNAL] DateTime getDateTime(DvTemporal operationDataValue, String value); Double calculateDurationAgainstDa...
true
ok
{"focal": {"class": "DVUtil", "name": "calculateDurationAgainstDvTemporal", "signature": "Double calculateDurationAgainstDvTemporal(String value, DvTemporal operationTemporal, String symbol)", "start_line": 3, "modifiers": "static", "params": [{"name": "value", "type": "String"}, {"name": "operationTemporal", "type": "...
8289370_122
class AttachmentService { public boolean updateAttachmentContent(String name, EntityRef parent, IndicatingInputStream is, long length, boolean silent) { Map<String,String> headers = Collections.singletonMap("Content-Type", "application/octet-stream"); MyResultInfo result = new MyResultInfo(); ...
handler.addRequest("PUT", "/qcbin/rest/domains/domain/projects/project/defects/1/attachments/logfile.txt", 200) .expectHeader("Content-Type", "application/octet-stream") .content("attachmentServiceTest_attachment.xml"); handler.async(); addEntityListener(new Enti...
[FOCAL] public boolean AttachmentService.updateAttachmentContent(String name, EntityRef parent, IndicatingInputStream is, long length, boolean silent) [CLASS] class AttachmentService [METRICS] loc=16 cc=4 branches=3 loops=0 returns=2 throws=0 nesting=2 [CALLS-EXTERNAL] Collections.singletonMap/2, restService.put/6, Ent...
/* static context [FOCAL] public boolean AttachmentService.updateAttachmentContent(String name, EntityRef parent, IndicatingInputStream is, long length, boolean silent) [PATH1] if((restService.put(new MyInputData(is, length, headers), result, "{0}s/{1}/attachments/{2}", parent.type, parent.id, En...)=T -> if(!silent)=T...
/* static context [FOCAL] public boolean AttachmentService.updateAttachmentContent(String name, EntityRef parent, IndicatingInputStream is, long length, boolean silent) [PATH1] if((restService.put(new MyInputData(is, length, headers), result, "{0}s/{1}/attachments/{2}", parent.type, parent.id, En...)=T -> if(!silent)=T...
true
ok
{"focal": {"class": "AttachmentService", "name": "updateAttachmentContent", "signature": "boolean updateAttachmentContent(String name, EntityRef parent, IndicatingInputStream is, long length, boolean silent)", "start_line": 3, "modifiers": "public", "params": [{"name": "name", "type": "String"}, {"name": "parent", "typ...
8296012_4
class StreamLogger implements Runnable { @Override public void run() { String line; try { while ((line = bufferedReader.readLine()) != null) { log.info(line); } } catch (IOException e) { throw new TaskException("Exception while interce...
Log mockLog = EasyMock.createStrictMock(Log.class); mockLog.info("Two peas in a bucket."); mockLog.info("Big ham ham ham."); EasyMock.expectLastCall(); EasyMock.replay(mockLog); InputStream in = new ByteArrayInputStream("Two peas in a bucket.\nBig ham ham ham.\n".getByte...
[FOCAL] @Override public void StreamLogger.run() [CLASS] class StreamLogger implements Runnable [METRICS] loc=14 cc=3 branches=0 loops=1 returns=0 throws=1 nesting=2 [CALLS-EXTERNAL] bufferedReader.readLine/0, log.info/1, IOUtils.closeQuietly/1 [NEW] TaskException [EXCEPTIONS] throws TaskException; catches IOException ...
/* static context [FOCAL] @Override public void StreamLogger.run() [THROWS-WHEN] TaskException when try-body throws [PATH1] try-body throws -> throw new TaskException("Exception while intercepting stream.", e) [PATH2] while((line = bufferedReader.readLine()) != null)=T -> exit loop [PATH3] while((line = bufferedReader....
/* static context [FOCAL] @Override public void StreamLogger.run() [THROWS-WHEN] TaskException when try-body throws [PATH1] try-body throws -> throw new TaskException("Exception while intercepting stream.", e) [PATH2] while((line = bufferedReader.readLine()) != null)=T -> exit loop [PATH3] while((line = bufferedReader....
true
ok
{"focal": {"class": "StreamLogger", "name": "run", "signature": "void run()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "void"}, "class_info": {"name": "StreamLogger", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Runnable", "fields": [], "members": [{"name": ...
8322886_1
class MixPanelOutputConnector extends AbstractPipelineComponent implements OutputConnector, Configurable<JSONObject> { protected void logActivity(JSONObject payload) throws JSONException, IOException { String eventName = payload.getString("event"); JSONObject properties = payload.getJSONObject("pro...
MixPanelOutputConnector mixPanelOutputConnector = new MixPanelOutputConnector() { @Override protected MixpanelAPI getMixpanelAPI() { return new MixpanelAPI(mockMixpanelServer.getServerURL() + "/track", null); } }; mixPanelOutputConnector.setPip...
[FOCAL] protected void MixPanelOutputConnector.logActivity(JSONObject payload) [CLASS] class MixPanelOutputConnector extends AbstractPipelineComponent implements OutputConnector, Configurable<JSONObject> [METRICS] loc=20 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-INTERNAL] MixpanelAPI getMixpanelAPI();...
/* static context [FOCAL] protected void MixPanelOutputConnector.logActivity(JSONObject payload) [PATH1] if(time == 0L)=T [PATH2] if(time == 0L)=F [INPUTS] branches=payload | result=- [COLLABORATORS] param payload:JSONObject getString/1,getJSONObject/1 [EXCEPTIONS] declares JSONException, IOException [CALLS-INTERNAL] M...
/* static context [FOCAL] protected void MixPanelOutputConnector.logActivity(JSONObject payload) [PATH1] if(time == 0L)=T [PATH2] if(time == 0L)=F [INPUTS] branches=payload | result=- [COLLABORATORS] param payload:JSONObject getString/1,getJSONObject/1 [EXCEPTIONS] declares JSONException, IOException [CALLS-INTERNAL] M...
true
ok
{"focal": {"class": "MixPanelOutputConnector", "name": "logActivity", "signature": "void logActivity(JSONObject payload) throws JSONException, IOException", "start_line": 3, "modifiers": "protected", "params": [{"name": "payload", "type": "JSONObject"}], "return_type": "void"}, "class_info": {"name": "MixPanelOutputCon...
8333478_3
class SpaceTaskAPIController { @RequestMapping(value = "/execute",method=RequestMethod.POST) public ModelAndView executeTask(@RequestParam String spaceName,@RequestParam String locators,@RequestBody SpaceTaskRequest body) { return execute(spaceName,locators,body); } public SpaceTaskAPIController(); private ...
space.getTypeManager().registerTypeDescriptor(new SpaceTypeDescriptorBuilder("test-type") .idProperty("id",false).addFixedProperty("val",String.class).create()); space.clear(new Object()); SpaceDocument d=new SpaceDocument("test-type"); d.setProperty("id",0); d.setProperty("val","val0"); space.write(d);...
[FOCAL] @RequestMapping(value = "/execute",method=RequestMethod.POST) public ModelAndView SpaceTaskAPIController.executeTask(String spaceName, String locators, SpaceTaskRequest body) [CLASS] class SpaceTaskAPIController [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] ModelAndView e...
/* static context [FOCAL] @RequestMapping(value = "/execute",method=RequestMethod.POST) public ModelAndView SpaceTaskAPIController.executeTask(String spaceName, String locators, SpaceTaskRequest body) [INPUTS] branches=- | result=body, locators, spaceName [CALLS-INTERNAL] ModelAndView execute(String spaceName, String l...
/* static context [FOCAL] @RequestMapping(value = "/execute",method=RequestMethod.POST) public ModelAndView SpaceTaskAPIController.executeTask(String spaceName, String locators, SpaceTaskRequest body) [INPUTS] branches=- | result=body, locators, spaceName [CALLS-INTERNAL] ModelAndView execute(String spaceName, String l...
true
ok
{"focal": {"class": "SpaceTaskAPIController", "name": "executeTask", "signature": "ModelAndView executeTask(String spaceName, String locators, SpaceTaskRequest body)", "start_line": 3, "modifiers": "@RequestMapping(value = \"/execute\",method=RequestMethod.POST) public", "params": [{"name": "spaceName", "type": "String...
8369425_1
class StableTicksAxis extends ValueAxis<Number> { public static double calculateTickSpacing( double delta, int maxTicks ) { if ( delta == 0.0 ) return 0.0; if ( delta <= 0.0 ) throw new IllegalArgumentException( "delta must be positive" ); if ( maxTicks < 1 ) throw new IllegalArgumentException( "must b...
assertEquals( 5e10, StableTicksAxis.calculateTickSpacing( 23e10, 5 ), 0.0001e10 ); } }
[FOCAL] public static double StableTicksAxis.calculateTickSpacing(double delta, int maxTicks) [CLASS] class StableTicksAxis extends ValueAxis<Number> [METRICS] loc=53 cc=11 branches=8 loops=2 returns=2 throws=2 nesting=3 [CALLS-EXTERNAL] Math.log10/1, Math.pow/2 [NEW] IllegalArgumentException [EXCEPTIONS] throws Illega...
/* static context [FOCAL] public static double StableTicksAxis.calculateTickSpacing(double delta, int maxTicks) [THROWS-WHEN] IllegalArgumentException when !(delta == 0.0) && delta <= 0.0 [THROWS-WHEN] IllegalArgumentException when !(delta == 0.0) && !(delta <= 0.0) && maxTicks < 1 [PATH1] if(delta == 0.0)=F -> if(delt...
/* static context [FOCAL] public static double StableTicksAxis.calculateTickSpacing(double delta, int maxTicks) [THROWS-WHEN] IllegalArgumentException when !(delta == 0.0) && delta <= 0.0 [THROWS-WHEN] IllegalArgumentException when !(delta == 0.0) && !(delta <= 0.0) && maxTicks < 1 [PATH1] if(delta == 0.0)=F -> if(delt...
true
ok
{"focal": {"class": "StableTicksAxis", "name": "calculateTickSpacing", "signature": "double calculateTickSpacing(double delta, int maxTicks)", "start_line": 3, "modifiers": "public static", "params": [{"name": "delta", "type": "double"}, {"name": "maxTicks", "type": "int"}], "return_type": "double"}, "class_info": {"na...
8411032_2
class Trie { public T check(final String aString) { final char[] chars = aString.toCharArray(); for (int i = 0; i < chars.length; i++) { final Node<T> root = this.roots.get(chars[i]); if (root != null) { final T res = root.check(chars, i); if ...
final String toBeChecked = "Test"; final Elem z = this.trie.check(toBeChecked); Assert.assertNull(z); } }
[FOCAL] public T Trie.check(String aString) [CLASS] class Trie [METRICS] loc=13 cc=4 branches=2 loops=1 returns=2 throws=0 nesting=3 [CALLS-EXTERNAL] String.toCharArray/0, this.roots.get/1, Node<T>.check/2 [FIELDS] read=roots [PATH1] for(i < chars.length)=T -> if(root != null)=T -> if(res != null)=F -> exit loop -> ret...
/* static context [FOCAL] public T Trie.check(String aString) [PATH1] for(i < chars.length)=T -> if(root != null)=T -> if(res != null)=F -> exit loop -> return null [PATH2] for(i < chars.length)=T -> if(root != null)=T -> if(res != null)=T -> return res [PATH3] for(i < chars.length)=F -> return null [PATH4] for(i < cha...
/* static context [FOCAL] public T Trie.check(String aString) [PATH1] for(i < chars.length)=T -> if(root != null)=T -> if(res != null)=F -> exit loop -> return null [PATH2] for(i < chars.length)=T -> if(root != null)=T -> if(res != null)=T -> return res [PATH3] for(i < chars.length)=F -> return null [PATH4] for(i < cha...
true
ok
{"focal": {"class": "Trie", "name": "check", "signature": "T check(String aString)", "start_line": 3, "modifiers": "public", "params": [{"name": "aString", "type": "String"}], "return_type": "T"}, "class_info": {"name": "Trie", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name"...
8426406_624
class RegexStringMatcher extends BodyMatcher<NottableString> { public boolean matches(String matched) { return matches(null, string(matched)); } public RegexStringMatcher(MockServerLogger mockServerLogger, boolean controlPlaneMatcher); RegexStringMatcher(MockServerLogger mockServerLogger, N...
assertFalse(notMatcher(new RegexStringMatcher(new MockServerLogger(), string("some_value"), true)).matches("some_value")); } }
[FOCAL] public boolean RegexStringMatcher.matches(String matched) [CLASS] class RegexStringMatcher extends BodyMatcher<NottableString> [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] boolean matches(MatchDifference context, NottableString matched) [CALLS-EXTERNAL] string/1 (inherit...
/* static context [FOCAL] public boolean RegexStringMatcher.matches(String matched) [INPUTS] branches=- | result=matched [CALLS-INTERNAL] boolean matches(MatchDifference context, NottableString matched) [CALLS-EXTERNAL] string/1 (inherited) */
/* static context [FOCAL] public boolean RegexStringMatcher.matches(String matched) [INPUTS] branches=- | result=matched [CALLS-INTERNAL] boolean matches(MatchDifference context, NottableString matched) [CALLS-EXTERNAL] string/1 (inherited) */ class RegexStringMatcher extends BodyMatcher<NottableString> { public b...
true
ok
{"focal": {"class": "RegexStringMatcher", "name": "matches", "signature": "boolean matches(String matched)", "start_line": 3, "modifiers": "public", "params": [{"name": "matched", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "RegexStringMatcher", "kind": "class", "modifiers": "", "superclass": ...
8427412_17
class StockOperationServiceImpl extends BaseOpenmrsService implements IStockOperationService { public void calculateReservations(StockOperation operation) { if (operation == null) { throw new IllegalArgumentException("The operation must be defined"); } /* We want to ensure that duplicated transactions ar...
Stockroom sourceRoom = stockroomDataService.getById(0); Stockroom destRoom = stockroomDataService.getById(1); Item item0 = itemDataService.getById(0); Item item2 = itemDataService.getById(2); // Add some item stock with different qualifiers to the source room ItemStockDetail detail1 = new ItemStockDetail(...
[FOCAL] public void StockOperationServiceImpl.calculateReservations(StockOperation operation) [CLASS] class StockOperationServiceImpl extends BaseOpenmrsService implements IStockOperationService [METRICS] loc=53 cc=7 branches=3 loops=3 returns=0 throws=1 nesting=3 [CALLS-INTERNAL] ItemStock findAndCloneStock(Map<Pair<S...
class StockOperationServiceImpl extends BaseOpenmrsService implements IStockOperationService { public void calculateReservations(StockOperation operation) { if (operation == null) { throw new IllegalArgumentException("The operation must be defined"); } /* We want to ensure that duplicated transactions ar...
false
ok
{"focal": {"class": "StockOperationServiceImpl", "name": "calculateReservations", "signature": "void calculateReservations(StockOperation operation)", "start_line": 3, "modifiers": "public", "params": [{"name": "operation", "type": "StockOperation"}], "return_type": "void"}, "class_info": {"name": "StockOperationServic...
8428305_19
class Indexer implements ActorStateUpdateListener { @Override public final void onUpdate(List<? extends ActorStateUpdate> updates) { updates.stream().filter( update -> update.getActorClass().getAnnotation(IndexConfig.class) != null ).forEach(update -> { ...
ActorStateUpdate update = createActorStateUpdateReindexing("1.0.0"); when(update.getLifecycleStep()).thenReturn(ActorLifecycleStep.ACTIVATE); indexer.onUpdate(newArrayList(update)); await() .atMost(Durations.ONE_MINUTE) .pollInterval(ONE_HUNDRED_MILLISEC...
[FOCAL] @Override public final void Indexer.onUpdate(List<? extends ActorStateUpdate> updates) [CLASS] class Indexer implements ActorStateUpdateListener [METRICS] loc=36 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=4 [CALLS-INTERNAL] boolean contains(Class<?>[] includedMessageClasses, Class messageClass); void de...
/* static context [FOCAL] @Override public final void Indexer.onUpdate(List<? extends ActorStateUpdate> updates) [COLLABORATORS] param updates:List<? extends ActorStateUpdate> stream/0; field update getActorClass/0,getMessageClass/0,getLifecycleStep/0,getActorRef/0; field activatedActors contains/1,add/1 [CALLS-INTERNA...
/* static context [FOCAL] @Override public final void Indexer.onUpdate(List<? extends ActorStateUpdate> updates) [COLLABORATORS] param updates:List<? extends ActorStateUpdate> stream/0; field update getActorClass/0,getMessageClass/0,getLifecycleStep/0,getActorRef/0; field activatedActors contains/1,add/1 [CALLS-INTERNA...
true
ok
{"focal": {"class": "Indexer", "name": "onUpdate", "signature": "void onUpdate(List<? extends ActorStateUpdate> updates)", "start_line": 3, "modifiers": "@Override public final", "params": [{"name": "updates", "type": "List<? extends ActorStateUpdate>"}], "return_type": "void"}, "class_info": {"name": "Indexer", "kind"...
8436798_1
class FormExtractor implements IExtractor { @Override public String extractValue(IHttpRequest request) { return StringUtils.defaultIfEmpty(request.getFormParameterValue(key), null); } public FormExtractor(String key); } class FormExtractorTest { @Test public void testFormExtraction() {
IHttpRequest request = mock(IHttpRequest.class); when(request.getFormParameterValue(eq("testField"))).thenReturn("test"); FormExtractor extractor = new FormExtractor("testField"); assertEquals("test", extractor.extractValue(request)); when(request.getFormParameterValue(eq("testField"))).thenReturn(null)...
[FOCAL] @Override public String FormExtractor.extractValue(IHttpRequest request) [CLASS] class FormExtractor implements IExtractor [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] StringUtils.defaultIfEmpty/2, IHttpRequest.getFormParameterValue/1 [INPUTS] branches=- | result=request...
/* static context [FOCAL] @Override public String FormExtractor.extractValue(IHttpRequest request) [INPUTS] branches=- | result=request [COLLABORATORS] param request:IHttpRequest getFormParameterValue/1 [CALLS-EXTERNAL] StringUtils.defaultIfEmpty/2, IHttpRequest.getFormParameterValue/1 */
/* static context [FOCAL] @Override public String FormExtractor.extractValue(IHttpRequest request) [INPUTS] branches=- | result=request [COLLABORATORS] param request:IHttpRequest getFormParameterValue/1 [CALLS-EXTERNAL] StringUtils.defaultIfEmpty/2, IHttpRequest.getFormParameterValue/1 */ class FormExtractor implements...
true
ok
{"focal": {"class": "FormExtractor", "name": "extractValue", "signature": "String extractValue(IHttpRequest request)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "request", "type": "IHttpRequest"}], "return_type": "String"}, "class_info": {"name": "FormExtractor", "kind": "class", "modifiers"...
8467178_18
class Configuration { public void setEndpoints(String notify, String sessions) throws IllegalArgumentException { if (notify == null || notify.isEmpty()) { throw new IllegalArgumentException("Notify endpoint cannot be empty or null."); } else { if (delivery instanceof HttpDel...
Delivery delivery = new Delivery() { @Override public void deliver(Serializer serializer, Object object, Map<String, String> headers) { } @Override public void close() { } }; config.delivery = delivery; config.sessi...
[FOCAL] public void Configuration.setEndpoints(String notify, String sessions) [CLASS] class Configuration [METRICS] loc=31 cc=5 branches=4 loops=0 returns=0 throws=1 nesting=2 [CALLS-EXTERNAL] String.isEmpty/0, ((HttpDelivery) delivery).setEndpoint/1, LOGGER.warn/1, this.autoCaptureSessions.get/0, this.autoCaptureSess...
/* static context [FOCAL] public void Configuration.setEndpoints(String notify, String sessions) [THROWS-WHEN] IllegalArgumentException when notify == null || notify.isEmpty() [PATH1] if(notify == null || notify.isEmpty())=F -> if(delivery instanceof HttpDelivery)=T -> if(invalidSessionsEndpoint && this.autoCaptureSess...
/* static context [FOCAL] public void Configuration.setEndpoints(String notify, String sessions) [THROWS-WHEN] IllegalArgumentException when notify == null || notify.isEmpty() [PATH1] if(notify == null || notify.isEmpty())=F -> if(delivery instanceof HttpDelivery)=T -> if(invalidSessionsEndpoint && this.autoCaptureSess...
true
ok
{"focal": {"class": "Configuration", "name": "setEndpoints", "signature": "void setEndpoints(String notify, String sessions) throws IllegalArgumentException", "start_line": 3, "modifiers": "public", "params": [{"name": "notify", "type": "String"}, {"name": "sessions", "type": "String"}], "return_type": "void"}, "class_...
8497273_2
class PathUtils { public static String relativePath(File parent, File child) { Preconditions.checkArgument(contains(parent, child)); String parentName = conventPath(parent); String childName = conventPath(child); String relative = childName.substring(parentName.length()); ...
File parent = new File("/"); File child = new File("/"); Assert.assertEquals(PathUtils.relativePath(parent, child), "/"); parent = new File("/"); child = new File("/opt"); Assert.assertEquals(PathUtils.relativePath(parent, child), "/opt"); parent = new File("/"...
[FOCAL] public static String PathUtils.relativePath(File parent, File child) [CLASS] class PathUtils [METRICS] loc=12 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-INTERNAL] String conventPath(File file); boolean contains(File parent, File child) [CALLS-EXTERNAL] Preconditions.checkArgument/1, String.subs...
/* static context [FOCAL] public static String PathUtils.relativePath(File parent, File child) [PATH1] if(relative.length() == 0)=T -> return "/" [PATH2] if(relative.length() == 0)=F -> return "/" + relative.substring(0, relative.length() - 1) [INPUTS] branches=child, parent | result=child, parent [CALLS-INTERNAL] Stri...
/* static context [FOCAL] public static String PathUtils.relativePath(File parent, File child) [PATH1] if(relative.length() == 0)=T -> return "/" [PATH2] if(relative.length() == 0)=F -> return "/" + relative.substring(0, relative.length() - 1) [INPUTS] branches=child, parent | result=child, parent [CALLS-INTERNAL] Stri...
true
ok
{"focal": {"class": "PathUtils", "name": "relativePath", "signature": "String relativePath(File parent, File child)", "start_line": 3, "modifiers": "public static", "params": [{"name": "parent", "type": "File"}, {"name": "child", "type": "File"}], "return_type": "String"}, "class_info": {"name": "PathUtils", "kind": "c...
8504385_1
class ServerOption implements Serializable { public static Gson getGson() { Gson gson = new GsonBuilder(). registerTypeAdapter(ServerOption.class, new ServerOptionParentDeserializer()). excludeFieldsWithoutExposeAnnotation(). create(); return gson; } public ServerOption(); public ServerOption(fi...
URL url = Thread.currentThread().getContextClassLoader().getResource("at/alladin/rmbt/util/model/option/test3.json"); File file = new File(url.getPath()); ServerOptionContainer options = new ServerOptionContainer( new ArrayList<>(Arrays.asList(ServerOption.getGson().fromJson(new FileReader(file), ServerOption...
[FOCAL] public static Gson ServerOption.getGson() [CLASS] class ServerOption implements Serializable [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] new GsonBuilder(). registerTypeAdapter(ServerOption.class....create/0, new GsonBuilder(). registerTypeAdapter(ServerOption.class....e...
/* static context [FOCAL] public static Gson ServerOption.getGson() [NEW] GsonBuilder, ServerOptionParentDeserializer [CALLS-EXTERNAL] new GsonBuilder(). registerTypeAdapter(ServerOption.class....create/0, new GsonBuilder(). registerTypeAdapter(ServerOption.class....excludeFieldsWithoutExposeAnnotation/0, new GsonBuild...
/* static context [FOCAL] public static Gson ServerOption.getGson() [NEW] GsonBuilder, ServerOptionParentDeserializer [CALLS-EXTERNAL] new GsonBuilder(). registerTypeAdapter(ServerOption.class....create/0, new GsonBuilder(). registerTypeAdapter(ServerOption.class....excludeFieldsWithoutExposeAnnotation/0, new GsonBuild...
true
ok
{"focal": {"class": "ServerOption", "name": "getGson", "signature": "Gson getGson()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "Gson"}, "class_info": {"name": "ServerOption", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Serializable", "fields": [], "members": [...
8530120_97
class Asset { public void copyAssetsFromContent(File path) { copy(path, config.getDestinationFolder(), FileUtil.getNotContentFileFilter()); } @Deprecated public Asset(File source, File destination, CompositeConfiguration config); public Asset(JBakeConfiguration config); public void copy...
URL contentUrl = this.getClass().getResource("/fixture/content"); File contents = new File(contentUrl.getFile()); Asset asset = new Asset(config); asset.copyAssetsFromContent(contents); int totalFiles = countFiles(folder.toFile()); int expected = 3; Assertions.a...
[FOCAL] public void Asset.copyAssetsFromContent(File path) [CLASS] class Asset [METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void copy(File sourceFolder, File targetFolder, FileFilter filter) [CALLS-EXTERNAL] DefaultJBakeConfiguration.getDestinationFolder/0, FileUtil.getNotConten...
/* static context [FOCAL] public void Asset.copyAssetsFromContent(File path) [COLLABORATORS] field config:DefaultJBakeConfiguration getDestinationFolder/0 [CALLS-INTERNAL] void copy(File sourceFolder, File targetFolder, FileFilter filter) [FIELDS] read=config:DefaultJBakeConfiguration [CALLS-EXTERNAL] DefaultJBakeConfi...
/* static context [FOCAL] public void Asset.copyAssetsFromContent(File path) [COLLABORATORS] field config:DefaultJBakeConfiguration getDestinationFolder/0 [CALLS-INTERNAL] void copy(File sourceFolder, File targetFolder, FileFilter filter) [FIELDS] read=config:DefaultJBakeConfiguration [CALLS-EXTERNAL] DefaultJBakeConfi...
true
ok
{"focal": {"class": "Asset", "name": "copyAssetsFromContent", "signature": "void copyAssetsFromContent(File path)", "start_line": 3, "modifiers": "public", "params": [{"name": "path", "type": "File"}], "return_type": "void"}, "class_info": {"name": "Asset", "kind": "class", "modifiers": "", "superclass": null, "interfa...
8570603_1
class PipedPromise extends DeferredObject<D_OUT, F_OUT, P_OUT> implements Promise<D_OUT, F_OUT, P_OUT> { protected Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> pipe( Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> promise) { promise.done(new DoneCallback<D_OUT>() { @Override public...
final ValueHolder<String> preRewireValue = new ValueHolder<String>(); final ValueHolder<String> postRewireValue = new ValueHolder<String>(); Callable<Integer> task = new Callable<Integer>() { public Integer call() { throw new RuntimeException("oops"); } }; deferredManager.when(task).pipe(null, new...
[FOCAL] protected Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> PipedPromise.pipe(Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> promise) [CLASS] class PipedPromise extends DeferredObject<D_OUT, F_OUT, P_OUT> implements Promise<D_OUT, F_OUT, P_OUT> [METRICS] loc=21 cc=1 branches=0 loops=0 retur...
/* static context [FOCAL] protected Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> PipedPromise.pipe(Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> promise) [INPUTS] branches=- | result=promise [COLLABORATORS] param promise:Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> done/1 [NEW] ...
/* static context [FOCAL] protected Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> PipedPromise.pipe(Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> promise) [INPUTS] branches=- | result=promise [COLLABORATORS] param promise:Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> done/1 [NEW] ...
true
ok
{"focal": {"class": "PipedPromise", "name": "pipe", "signature": "Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> pipe(Promise<? extends D_OUT, ? extends F_OUT, ? extends P_OUT> promise)", "start_line": 3, "modifiers": "protected", "params": [{"name": "promise", "type": "Promise<? extends D_OUT, ? extends F_...
8575137_0
class BindingSet implements BindingInformationProvider { static String asHumanDescription(Collection<? extends MemberViewBinding> bindings) { Iterator<? extends MemberViewBinding> iterator = bindings.iterator(); switch (bindings.size()) { case 1: return iterator.next().getDescription(); c...
MemberViewBinding one = new TestViewBinding("one"); MemberViewBinding two = new TestViewBinding("two"); MemberViewBinding three = new TestViewBinding("three"); String result1 = asHumanDescription(singletonList(one)); assertThat(result1).isEqualTo("one"); String result2 = asHumanDescription(asL...
[FOCAL] static String BindingSet.asHumanDescription(Collection<? extends MemberViewBinding> bindings) [CLASS] class BindingSet implements BindingInformationProvider [METRICS] loc=21 cc=6 branches=3 loops=1 returns=3 throws=0 nesting=3 [CALLS-EXTERNAL] Collection<? extends MemberViewBinding>.iterator/0, Collection<? ext...
/* static context [FOCAL] static String BindingSet.asHumanDescription(Collection<? extends MemberViewBinding> bindings) [PATH1] switch(bindings.size())=default -> for(i < count)=T -> if(i != 0)=T -> if(i == count - 1)=T -> exit loop -> return builder.toString() [PATH2] switch(bindings.size())=case 1 -> return iterator....
/* static context [FOCAL] static String BindingSet.asHumanDescription(Collection<? extends MemberViewBinding> bindings) [PATH1] switch(bindings.size())=default -> for(i < count)=T -> if(i != 0)=T -> if(i == count - 1)=T -> exit loop -> return builder.toString() [PATH2] switch(bindings.size())=case 1 -> return iterator....
true
ok
{"focal": {"class": "BindingSet", "name": "asHumanDescription", "signature": "String asHumanDescription(Collection<? extends MemberViewBinding> bindings)", "start_line": 3, "modifiers": "static", "params": [{"name": "bindings", "type": "Collection<? extends MemberViewBinding>"}], "return_type": "String"}, "class_info":...
8582237_64
class UniqueKeyStatisticsImpl implements ItemStatistics<ExecRow> { @Override public long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) { double startSelectivity = start==null?0.0d:quantilesSketch.getCDF(new ExecRow[]{start})[0]; ...
Assert.assertEquals(4000.0d,(double) impl.rangeSelectivity(row2000,row6000,true,false),50.0d); } }
[FOCAL] @Override public long UniqueKeyStatisticsImpl.rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) [CLASS] class UniqueKeyStatisticsImpl implements ItemStatistics<ExecRow> [METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EX...
/* static context [FOCAL] @Override public long UniqueKeyStatisticsImpl.rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) [INPUTS] branches=- | result=start, stop | unused=includeStart, includeStop, useExtrapolation [COLLABORATORS] field quantilesSketch g...
/* static context [FOCAL] @Override public long UniqueKeyStatisticsImpl.rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation) [INPUTS] branches=- | result=start, stop | unused=includeStart, includeStop, useExtrapolation [COLLABORATORS] field quantilesSketch g...
true
ok
{"focal": {"class": "UniqueKeyStatisticsImpl", "name": "rangeSelectivity", "signature": "long rangeSelectivity(ExecRow start, ExecRow stop, boolean includeStart, boolean includeStop, boolean useExtrapolation)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "start", "type": "ExecRow"}, {"name": "...
8595333_34
class HttpConfiguration { public int getMaxHttpConnection() { return maxHttpConnection; } public HttpConfiguration(); public String getIpAddress(); public void setIpAddress(String ipAddress); public String getProxyUserName(); public void setProxyUserName(String proxyUserName); public String getProxyPasswo...
Assert.assertEquals(httpConf.getMaxHttpConnection(), 10); } }
[FOCAL] public int HttpConfiguration.getMaxHttpConnection() [CLASS] class HttpConfiguration [METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] HttpConfiguration(); String getIpAddress(); void setIpAddress(String ipAddress); String getProxyUserName(); void setProxyUserName(String proxyU...
/* static context [FOCAL] public int HttpConfiguration.getMaxHttpConnection() */
/* static context [FOCAL] public int HttpConfiguration.getMaxHttpConnection() */ class HttpConfiguration { public int getMaxHttpConnection() { return maxHttpConnection; } public HttpConfiguration(); public String getIpAddress(); public void setIpAddress(String ipAddress); public String getProxyUserName(); ...
true
ok
{"focal": {"class": "HttpConfiguration", "name": "getMaxHttpConnection", "signature": "int getMaxHttpConnection()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "HttpConfiguration", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields":...
8599516_1
class RecyclingPagerAdapter extends PagerAdapter { @Override public final void destroyItem(ViewGroup container, int position, Object object) { View view = (View) object; container.removeView(view); int viewType = getItemViewType(position); if (viewType != IGNORE_ITEM_VIEW_TYPE) { recycleBin.add...
LinearLayout container = new LinearLayout(context); TextView child = new TextView(context); container.addView(child); RecyclingPagerAdapter adapter = new RecyclingPagerAdapter(recycleBin) { @Override public int getItemViewType(int position) { return IGNORE_ITEM_VIEW_TYPE; } @...
[FOCAL] @Override public final void RecyclingPagerAdapter.destroyItem(ViewGroup container, int position, Object object) [CLASS] class RecyclingPagerAdapter extends PagerAdapter [METRICS] loc=8 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] ViewGroup.removeView/1, getItemViewType/1 (inherited), Re...
/* static context [FOCAL] @Override public final void RecyclingPagerAdapter.destroyItem(ViewGroup container, int position, Object object) [PATH1] if(viewType != IGNORE_ITEM_VIEW_TYPE)=T [PATH2] if(viewType != IGNORE_ITEM_VIEW_TYPE)=F [INPUTS] branches=position | result=- [COLLABORATORS] param container:ViewGroup remove...
/* static context [FOCAL] @Override public final void RecyclingPagerAdapter.destroyItem(ViewGroup container, int position, Object object) [PATH1] if(viewType != IGNORE_ITEM_VIEW_TYPE)=T [PATH2] if(viewType != IGNORE_ITEM_VIEW_TYPE)=F [INPUTS] branches=position | result=- [COLLABORATORS] param container:ViewGroup remove...
true
ok
{"focal": {"class": "RecyclingPagerAdapter", "name": "destroyItem", "signature": "void destroyItem(ViewGroup container, int position, Object object)", "start_line": 3, "modifiers": "@Override public final", "params": [{"name": "container", "type": "ViewGroup"}, {"name": "position", "type": "int"}, {"name": "object", "t...
8621768_4
class Loader { public ClassLoader getClassLoader() { // get jars if somehing changed File[] jars = getJarsIfSomeIsModifiedAfterInterval(); if (jars == null) return currentClassLoader; // update classloader synchronized (this) { try { // copy jars to a new spooldir File newSpoolDir = copyJars...
updateJar("a"); updateJar("b"); msg("change to urlcl"); Thread.sleep(200); ClassLoader cur = loader.getClassLoader(); assertTr(cur != parent); assertTr(cur instanceof JarClassLoader); // loader.close(); msg("no change"); Thread.sleep(200); assertTr(cur == loader.getClassLoader()); msg("chang...
[FOCAL] public ClassLoader Loader.getClassLoader() [CLASS] class Loader [METRICS] loc=50 cc=10 branches=5 loops=3 returns=2 throws=0 nesting=5 [CALLS-INTERNAL] File copyJarsToTempDir(File[] jars); File[] getJarsIfSomeIsModifiedAfterInterval(); URL[] toUrlArray(List<File> files); void cleanup() [CALLS-EXTERNAL] File.lis...
/* static context [FOCAL] public ClassLoader Loader.getClassLoader() [PATH1] if(jars == null)=F -> foreach(File f : newSpoolDir.listFiles(onlyJars))=F -> foreach(File f : libDir.listFiles(onlyJars))=T -> if(!new File(jarDir, f.getName()).exists())=F -> if(log.debug())#1=T -> exit loop -> if(log.debug())#2=T -> if(log.t...
/* static context [FOCAL] public ClassLoader Loader.getClassLoader() [PATH1] if(jars == null)=F -> foreach(File f : newSpoolDir.listFiles(onlyJars))=F -> foreach(File f : libDir.listFiles(onlyJars))=T -> if(!new File(jarDir, f.getName()).exists())=F -> if(log.debug())#1=T -> exit loop -> if(log.debug())#2=T -> if(log.t...
true
ok
{"focal": {"class": "Loader", "name": "getClassLoader", "signature": "ClassLoader getClassLoader()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "ClassLoader"}, "class_info": {"name": "Loader", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "loader...
8629076_1
class FileTools { public static File doChoosePath() { JFileChooser fileChooser = new JFileChooser(System.getProperty("user.home")); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); if (fileChooser.showOpenDialog(MainWindow.getInstance()) == JFileChooser.APPROVE_OPTION) { return fil...
System.out.println("doChoosePath"); File expResult = null; File result = FileTools.doChoosePath(); assertEquals(expResult, result); // TODO review the generated test code and remove the default call to fail. fail("The test case is a prototype."); } }
[FOCAL] public static File FileTools.doChoosePath() [CLASS] class FileTools [METRICS] loc=10 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] System.getProperty/1, JFileChooser.setFileSelectionMode/1, JFileChooser.showOpenDialog/1, MainWindow.getInstance/0, JFileChooser.getCurrentDirectory/0 [NEW] ...
/* static context [FOCAL] public static File FileTools.doChoosePath() [PATH1] if(fileChooser.showOpenDialog(MainWindow.getInstance()) == JFileChooser.APPROVE_OPTION)=T -> return fileChooser.getCurrentDirectory() [PATH2] if(fileChooser.showOpenDialog(MainWindow.getInstance()) == JFileChooser.APPROVE_OPTION)=F -> return ...
/* static context [FOCAL] public static File FileTools.doChoosePath() [PATH1] if(fileChooser.showOpenDialog(MainWindow.getInstance()) == JFileChooser.APPROVE_OPTION)=T -> return fileChooser.getCurrentDirectory() [PATH2] if(fileChooser.showOpenDialog(MainWindow.getInstance()) == JFileChooser.APPROVE_OPTION)=F -> return ...
true
ok
{"focal": {"class": "FileTools", "name": "doChoosePath", "signature": "File doChoosePath()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "File"}, "class_info": {"name": "FileTools", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name...
8648747_53
class CryptoUtils { public synchronized long toDigest(final String key) throws DigestException, UnsupportedEncodingException { if (key == null) { throw new NullPointerException("You attempted to convert a null string into a hash digest"); } final byte[] bytes = key.getB...
assertNotEquals(cryptoUtils.toDigest(imageUrl1), cryptoUtils.toDigest(imageUrl3)); } }
[FOCAL] public synchronized long CryptoUtils.toDigest(String key) [CLASS] class CryptoUtils [METRICS] loc=9 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1 [CALLS-INTERNAL] long toDigest(byte[] bytes) [CALLS-EXTERNAL] String.getBytes/1 [NEW] NullPointerException [EXCEPTIONS] declares DigestException, UnsupportedEn...
/* static context [FOCAL] public synchronized long CryptoUtils.toDigest(String key) [THROWS-WHEN] NullPointerException when key == null [PATH1] if(key == null)=T -> throw new NullPointerException("You attempted to convert a null string in... [PATH2] if(key == null)=F -> return toDigest(bytes) [INPUTS] branches=key | re...
/* static context [FOCAL] public synchronized long CryptoUtils.toDigest(String key) [THROWS-WHEN] NullPointerException when key == null [PATH1] if(key == null)=T -> throw new NullPointerException("You attempted to convert a null string in... [PATH2] if(key == null)=F -> return toDigest(bytes) [INPUTS] branches=key | re...
true
ok
{"focal": {"class": "CryptoUtils", "name": "toDigest", "signature": "long toDigest(String key) throws DigestException, UnsupportedEncodingException", "start_line": 3, "modifiers": "public synchronized", "params": [{"name": "key", "type": "String"}], "return_type": "long"}, "class_info": {"name": "CryptoUtils", "kind": ...
8672234_4
class Speller { public List<String> replaceRunOnWords(final String original) { final List<CandidateData> candidateData = replaceRunOnWordCandidates(original); final List<String> candidates = new ArrayList<>(); for (CandidateData candidate : candidateData) { candidates.add(candidate.word); } ...
final Speller spell = new Speller(dictionary); Assertions.assertThat(spell.replaceRunOnWords("abaka")).isEmpty(); Assertions.assertThat(spell.replaceRunOnWords("abakaabace")).contains("abaka abace"); Assertions.assertThat(spell.replaceRunOnWords("Abakaabace")).contains("Abaka abace"); // Test on an...
[FOCAL] public List<String> Speller.replaceRunOnWords(String original) [CLASS] class Speller [METRICS] loc=8 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-INTERNAL] List<CandidateData> replaceRunOnWordCandidates(String original) [CALLS-EXTERNAL] List<String>.add/1 [NEW] ArrayList<> [PATH1] foreach(Candida...
/* static context [FOCAL] public List<String> Speller.replaceRunOnWords(String original) [PATH1] foreach(CandidateData candidate : candidateData)=T -> exit loop -> return candidates [PATH2] foreach(CandidateData candidate : candidateData)=F -> return candidates [INPUTS] branches=original | result=- [CALLS-INTERNAL] Lis...
/* static context [FOCAL] public List<String> Speller.replaceRunOnWords(String original) [PATH1] foreach(CandidateData candidate : candidateData)=T -> exit loop -> return candidates [PATH2] foreach(CandidateData candidate : candidateData)=F -> return candidates [INPUTS] branches=original | result=- [CALLS-INTERNAL] Lis...
true
ok
{"focal": {"class": "Speller", "name": "replaceRunOnWords", "signature": "List<String> replaceRunOnWords(String original)", "start_line": 3, "modifiers": "public", "params": [{"name": "original", "type": "String"}], "return_type": "List<String>"}, "class_info": {"name": "Speller", "kind": "class", "modifiers": "", "sup...
8680105_8
class WorldDestination extends SimpleDestination { @NotNull @Override protected EntityCoordinates getDestination() throws TeleportException { MultiverseWorld mvWorld = this.getApi().getWorldManager().getWorld(world); if (mvWorld == null) { throw new TeleportException(Message.bu...
BasePlayer player = api.getServerInterface().getPlayer("Player"); assertNotNull(player); // Location must be middle of block since our safe teleporter does this ((Entity) player).teleport(Locations.getEntityCoordinates("someworld", UUID.randomUUID(), 50.5, 50, 50.5, 0, 0)); Worl...
[FOCAL] @NotNull @Override protected EntityCoordinates WorldDestination.getDestination() [CLASS] class WorldDestination extends SimpleDestination [METRICS] loc=12 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1 [CALLS-EXTERNAL] this.getApi().getWorldManager().getWorld/1, this.getApi().getWorldManager/0, this.getAp...
/* static context [FOCAL] @NotNull @Override protected EntityCoordinates WorldDestination.getDestination() [THROWS-WHEN] TeleportException when mvWorld == null [PATH1] if(mvWorld == null)=T -> throw new TeleportException(Message.bundleMessage(NOT_LOADED, world)) [PATH2] if(mvWorld == null)=F -> return Locations.getEnti...
/* static context [FOCAL] @NotNull @Override protected EntityCoordinates WorldDestination.getDestination() [THROWS-WHEN] TeleportException when mvWorld == null [PATH1] if(mvWorld == null)=T -> throw new TeleportException(Message.bundleMessage(NOT_LOADED, world)) [PATH2] if(mvWorld == null)=F -> return Locations.getEnti...
true
ok
{"focal": {"class": "WorldDestination", "name": "getDestination", "signature": "EntityCoordinates getDestination() throws TeleportException", "start_line": 3, "modifiers": "@NotNull @Override protected", "params": [], "return_type": "EntityCoordinates"}, "class_info": {"name": "WorldDestination", "kind": "class", "modi...
8682860_4
class TimerPresenter implements TimerActivityContract.UserActionsListener { public static void roundTimeUp(Calendar calendar) { calendar.set(Calendar.SECOND, 0); // Round to the nearest MINUTE_INCREMENT, advancing the clock at least MINIMUM_INCREMENT. int remainder = calendar.get(Calendar.M...
Calendar calendar = new GregorianCalendar(); calendar.set(Calendar.MINUTE, TimerPresenter.MINIMUM_INCREMENT); TimerPresenter.roundTimeUp(calendar); assertThat(calendar.get(Calendar.SECOND), is(0)); assertThat(calendar.get(Calendar.MINUTE), is(TimerPresenter.MINUTE_INCREMENT)); ...
[FOCAL] public static void TimerPresenter.roundTimeUp(Calendar calendar) [CLASS] class TimerPresenter implements TimerActivityContract.UserActionsListener [METRICS] loc=10 cc=2 branches=1 loops=0 returns=0 throws=0 nesting=1 [CALLS-EXTERNAL] Calendar.set/2, Calendar.get/1, Calendar.add/2 [PATH1] if(increment < MINIMUM_...
/* static context [FOCAL] public static void TimerPresenter.roundTimeUp(Calendar calendar) [PATH1] if(increment < MINIMUM_INCREMENT)=T [PATH2] if(increment < MINIMUM_INCREMENT)=F [INPUTS] branches=calendar | result=- [COLLABORATORS] param calendar:Calendar set/2,get/1,add/2 [CALLS-EXTERNAL] Calendar.set/2, Calendar.get...
/* static context [FOCAL] public static void TimerPresenter.roundTimeUp(Calendar calendar) [PATH1] if(increment < MINIMUM_INCREMENT)=T [PATH2] if(increment < MINIMUM_INCREMENT)=F [INPUTS] branches=calendar | result=- [COLLABORATORS] param calendar:Calendar set/2,get/1,add/2 [CALLS-EXTERNAL] Calendar.set/2, Calendar.get...
true
ok
{"focal": {"class": "TimerPresenter", "name": "roundTimeUp", "signature": "void roundTimeUp(Calendar calendar)", "start_line": 3, "modifiers": "public static", "params": [{"name": "calendar", "type": "Calendar"}], "return_type": "void"}, "class_info": {"name": "TimerPresenter", "kind": "class", "modifiers": "", "superc...
8693016_2
class RF1Importer extends BaseImporter { public VersionRows extractVersionRows() { // Read all the concepts from the raw data List<ConceptRow> crs = new ArrayList<ConceptRow>(); BufferedReader br = null; try { br = new BufferedReader(new InputStreamRead...
try { RF1Importer rf1i = new RF1Importer( this.getClass().getResourceAsStream("/rf1_con_test.txt"), this.getClass().getResourceAsStream("/rf1_rel_test.txt"), "20110731"); VersionRows vr1 = rf1i.extractVersionRows(); ...
[FOCAL] public VersionRows RF1Importer.extractVersionRows() [CLASS] class RF1Importer extends BaseImporter [METRICS] loc=115 cc=13 branches=6 loops=2 returns=1 throws=4 nesting=3 [CALLS-EXTERNAL] BufferedReader.readLine/0, String.getBytes/0, line.trim().length/0, String.trim/0, String.indexOf/1, String.indexOf/2, Buffe...
/* static context [FOCAL] public VersionRows RF1Importer.extractVersionRows() [PATH2] while(null != (line = br.readLine()))#1=T -> if(line.trim().length() < 1)#1=T -> exit loop -> if(br != null)#1=T -> try-body throws -> while(null != (line = br.readLine()))#2=F -> if(br != null)#2=F -> return vr */
/* static context [FOCAL] public VersionRows RF1Importer.extractVersionRows() [PATH2] while(null != (line = br.readLine()))#1=T -> if(line.trim().length() < 1)#1=T -> exit loop -> if(br != null)#1=T -> try-body throws -> while(null != (line = br.readLine()))#2=F -> if(br != null)#2=F -> return vr */ class RF1Importer e...
true
ok
{"focal": {"class": "RF1Importer", "name": "extractVersionRows", "signature": "VersionRows extractVersionRows()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "VersionRows"}, "class_info": {"name": "RF1Importer", "kind": "class", "modifiers": "", "superclass": "BaseImporter", "interfaces": null,...
8706918_55
class Newer extends BaseExpression { @Override public Result apply(PathData item) throws IOException { if(getFileStatus(item).getModificationTime() > filetime) { return Result.PASS; } return Result.FAIL; } public Newer(); @Override public void initialise(FindOptions options); @Override...
FileStatus fileStatus = mock(FileStatus.class); when(fileStatus.getModificationTime()).thenReturn(NOW - (4l*86400000)); fs.setFileStatus("newer.file", fileStatus); PathData item = new PathData("/directory/path/newer.file", fs.getConf()); assertEquals(Result.PASS, newer.apply(item)); } }
[FOCAL] @Override public Result Newer.apply(PathData item) [CLASS] class Newer extends BaseExpression [METRICS] loc=7 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1 [CALLS-EXTERNAL] getFileStatus(item).getModificationTime/0, getFileStatus/1 (inherited) [EXCEPTIONS] declares IOException [PATH1] if(getFileStatus(it...
/* static context [FOCAL] @Override public Result Newer.apply(PathData item) [PATH1] if(getFileStatus(item).getModificationTime() > filetime)=T -> return Result.PASS [PATH2] if(getFileStatus(item).getModificationTime() > filetime)=F -> return Result.FAIL [INPUTS] branches=item | result=- [EXCEPTIONS] declares IOExcepti...
/* static context [FOCAL] @Override public Result Newer.apply(PathData item) [PATH1] if(getFileStatus(item).getModificationTime() > filetime)=T -> return Result.PASS [PATH2] if(getFileStatus(item).getModificationTime() > filetime)=F -> return Result.FAIL [INPUTS] branches=item | result=- [EXCEPTIONS] declares IOExcepti...
true
ok
{"focal": {"class": "Newer", "name": "apply", "signature": "Result apply(PathData item) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "item", "type": "PathData"}], "return_type": "Result"}, "class_info": {"name": "Newer", "kind": "class", "modifiers": "", "superclass": "Base...
8714569_2
class NormalisedOntology implements Serializable { public Set<Inclusion> normalise(final Set<? extends Axiom> inclusions) { // Exhaustively apply NF1 to NF4 Set<Inclusion> newIs = transformAxiom(inclusions); Set<Inclusion> oldIs = new HashSet<Inclusion>(newIs.size()); final...
IFactory factory = new CoreFactory(); // Add roles NamedRole container = new NamedRole("container"); NamedRole contains = new NamedRole("contains"); // Add features NamedFeature mgPerTablet = new NamedFeature("mgPerTablet"); // Add concepts NamedConcept...
[FOCAL] public Set<Inclusion> NormalisedOntology.normalise(Set<? extends Axiom> inclusions) [CLASS] class NormalisedOntology implements Serializable [METRICS] loc=77 cc=16 branches=7 loops=8 returns=1 throws=0 nesting=5 [CALLS-INTERNAL] Set<Inclusion> transformAxiom(Set<? extends Axiom> axioms); String printInternalObj...
class NormalisedOntology implements Serializable { public Set<Inclusion> normalise(final Set<? extends Axiom> inclusions) { // Exhaustively apply NF1 to NF4 Set<Inclusion> newIs = transformAxiom(inclusions); Set<Inclusion> oldIs = new HashSet<Inclusion>(newIs.size()); final...
false
ok
{"focal": {"class": "NormalisedOntology", "name": "normalise", "signature": "Set<Inclusion> normalise(Set<? extends Axiom> inclusions)", "start_line": 3, "modifiers": "public", "params": [{"name": "inclusions", "type": "Set<? extends Axiom>"}], "return_type": "Set<Inclusion>"}, "class_info": {"name": "NormalisedOntolog...
8715861_5
class PGTypeTable implements Table<PGTypeTable.Row> { @Override public String getSQL(Version currentVersion) { return Tables.getSQL(SQL, currentVersion); } private PGTypeTable(); @Override public Row createRow(Context context, ResultBatch resultBatch, int rowIdx); @Rule public final ExpectedExcep...
assertEquals(INSTANCE.getSQL(Version.parse("9.1.9")), SQL[3]); } }
[FOCAL] @Override public String PGTypeTable.getSQL(Version currentVersion) [CLASS] class PGTypeTable implements Table<PGTypeTable.Row> [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-EXTERNAL] Tables.getSQL/2 [INPUTS] branches=- | result=currentVersion [DATAFLOW] currentVersion@param->L3 [CL...
/* static context [FOCAL] @Override public String PGTypeTable.getSQL(Version currentVersion) [INPUTS] branches=- | result=currentVersion [CALLS-EXTERNAL] Tables.getSQL/2 */
/* static context [FOCAL] @Override public String PGTypeTable.getSQL(Version currentVersion) [INPUTS] branches=- | result=currentVersion [CALLS-EXTERNAL] Tables.getSQL/2 */ class PGTypeTable implements Table<PGTypeTable.Row> { @Override public String getSQL(Version currentVersion) { return Tables.getSQL(SQL, c...
true
ok
{"focal": {"class": "PGTypeTable", "name": "getSQL", "signature": "String getSQL(Version currentVersion)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "currentVersion", "type": "Version"}], "return_type": "String"}, "class_info": {"name": "PGTypeTable", "kind": "class", "modifiers": "", "super...
8731044_81
class TemplatingFunctions { public Property inheritProperty(Node content, String relPath) throws RepositoryException { if (content == null) { return null; } if (StringUtils.isBlank(relPath)) { throw new IllegalArgumentException("relative path cannot be null or empty"...
// GIVEN // WHEN Property property = functions.inheritProperty(topPage, "iMaybeExistSomewhereElseButNotHere"); Property property2 = functions.inheritProperty(topPageComponent, "iMaybeExistSomewhereElseButNotHere"); // THEN assertNull(property); assertNull(propert...
[FOCAL] public Property TemplatingFunctions.inheritProperty(Node content, String relPath) [CLASS] class TemplatingFunctions [METRICS] loc=19 cc=5 branches=2 loops=0 returns=3 throws=1 nesting=1 [CALLS-INTERNAL] Node wrapForInheritance(Node destination) [CALLS-EXTERNAL] StringUtils.isBlank/1, Node.getProperty/1 [NEW] Il...
/* static context [FOCAL] public Property TemplatingFunctions.inheritProperty(Node content, String relPath) [THROWS-WHEN] IllegalArgumentException when !(content == null) && StringUtils.isBlank(relPath) [PATH1] if(content == null)=F -> if(StringUtils.isBlank(relPath))=F -> try-body throws -> return null */
/* static context [FOCAL] public Property TemplatingFunctions.inheritProperty(Node content, String relPath) [THROWS-WHEN] IllegalArgumentException when !(content == null) && StringUtils.isBlank(relPath) [PATH1] if(content == null)=F -> if(StringUtils.isBlank(relPath))=F -> try-body throws -> return null */ class Templa...
true
ok
{"focal": {"class": "TemplatingFunctions", "name": "inheritProperty", "signature": "Property inheritProperty(Node content, String relPath) throws RepositoryException", "start_line": 3, "modifiers": "public", "params": [{"name": "content", "type": "Node"}, {"name": "relPath", "type": "String"}], "return_type": "Property...
8744004_2
class MyService { @POST @Path("/permissions") public Response permissions(String body, @Context GraphDatabaseService db) throws IOException { String[] splits = body.split(","); PermissionRequest ids = new PermissionRequest(splits[0], splits[1]); Set<String> documents = new HashSet<S...
String ids = "A,DOC1 DOC2 DOC3 DOC4 DOC5 DOC6 DOC7"; Response response = service.permissions(ids, db); List list = objectMapper.readValue((String) response.getEntity(), List.class); assertEquals(new HashSet<String>(Arrays.asList("DOC1", "DOC2", "DOC3", "DOC4", "DOC5", "DOC7")), new Hash...
[FOCAL] @POST @Path("/permissions") public Response MyService.permissions(String body, GraphDatabaseService db) [CLASS] class MyService [METRICS] loc=103 cc=20 branches=10 loops=8 returns=1 throws=0 nesting=6 [CALLS-INTERNAL] Node getAllowed(Node from, Node to) [CALLS-EXTERNAL] String.split/1, db.index().forNodes("User...
/* static context [FOCAL] @POST @Path("/permissions") public Response MyService.permissions(String body, GraphDatabaseService db) [PATH1] foreach(Node node : docids)=T -> exit loop -> if(user != null && documentNodes.size() > 0)=T -> foreach(Relationship relationship : user.getRelationships( RelTypes.IS_MEMBER_OF, Dire...
/* static context [FOCAL] @POST @Path("/permissions") public Response MyService.permissions(String body, GraphDatabaseService db) [PATH1] foreach(Node node : docids)=T -> exit loop -> if(user != null && documentNodes.size() > 0)=T -> foreach(Relationship relationship : user.getRelationships( RelTypes.IS_MEMBER_OF, Dire...
true
ok
{"focal": {"class": "MyService", "name": "permissions", "signature": "Response permissions(String body, GraphDatabaseService db) throws IOException", "start_line": 3, "modifiers": "@POST @Path(\"/permissions\") public", "params": [{"name": "body", "type": "String"}, {"name": "db", "type": "GraphDatabaseService"}], "ret...
8750145_6
class List { public abstract <B> List<B> map(Function<A, B> func)public abstract <B> List<B> map(Function<A, B> func); public abstract <B> List<B> map(Function<A, B> func)private List(); public abstract <B> List<B> map(Function<A, B> func)public abstract List<B> bind(Function<A, List<B>> func); public abstract <B> ...
// Given a list List<Integer> list = itemList(1, 2, 3); // When an increment function is mapped across it List<Integer> result = list.map(i -> i + 1); // Then each of the elements is incremented assert(result.equals(itemList(2, 3, 4))); } }
[FOCAL] public abstract List<B> List.map(Function<A, B> func) [CLASS] class List [METRICS] loc=1 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CLASS-MEMBERS] List(); List<B> bind(Function<A, List<B>> func); List<A> filter(Predicate<A> predicate); boolean isEmpty(); B foldRight(BiFunction<A, B, B> function, B ac...
/* static context [FOCAL] public abstract List<B> List.map(Function<A, B> func) */
/* static context [FOCAL] public abstract List<B> List.map(Function<A, B> func) */ class List { public abstract <B> List<B> map(Function<A, B> func)public abstract <B> List<B> map(Function<A, B> func); public abstract <B> List<B> map(Function<A, B> func)private List(); public abstract <B> List<B> map(Function<A, B>...
true
partial
{"focal": {"class": "List", "name": "map", "signature": "List<B> map(Function<A, B> func)", "start_line": 3, "modifiers": "public abstract", "params": [{"name": "func", "type": "Function<A, B>"}], "return_type": "List<B>"}, "class_info": {"name": "List", "kind": "class", "modifiers": "", "superclass": null, "interfaces...
8757198_2
class TarjanLowestCommonAncestor { public V calculate(V start, V a, V b) { List<LcaRequestResponse<V>> list = new LinkedList<LcaRequestResponse<V>>(); list.add(new LcaRequestResponse<V>(a, b)); return calculate(start, list).get(0); } TarjanLowestCommonAncestor(Gra...
DirectedGraph<String, DefaultEdge> g = new DefaultDirectedGraph<String, DefaultEdge>(DefaultEdge.class); g.addVertex("a"); g.addVertex("b"); g.addVertex("c"); g.addVertex("d"); g.addVertex("e"); g.addVertex("f"); g.addVertex("g"); g.addEdge("a", "b"); g.addEdge("b", "c"); g.addEdge("c", "d"); g.addEdge("d...
[FOCAL] public V TarjanLowestCommonAncestor.calculate(V start, V a, V b) [CLASS] class TarjanLowestCommonAncestor [METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CALLS-INTERNAL] List<V> calculate(V start, List<LcaRequestResponse<V>> lrr) [CALLS-EXTERNAL] List<LcaRequestResponse<V>>.add/1, calculat...
/* static context [FOCAL] public V TarjanLowestCommonAncestor.calculate(V start, V a, V b) [INPUTS] branches=- | result=start [CALLS-INTERNAL] List<V> calculate(V start, List<LcaRequestResponse<V>> lrr) [NEW] LinkedList<LcaRequestResponse<V>>, LcaRequestResponse<V> [CALLS-EXTERNAL] List<LcaRequestResponse<V>>.add/1, ca...
/* static context [FOCAL] public V TarjanLowestCommonAncestor.calculate(V start, V a, V b) [INPUTS] branches=- | result=start [CALLS-INTERNAL] List<V> calculate(V start, List<LcaRequestResponse<V>> lrr) [NEW] LinkedList<LcaRequestResponse<V>>, LcaRequestResponse<V> [CALLS-EXTERNAL] List<LcaRequestResponse<V>>.add/1, ca...
true
ok
{"focal": {"class": "TarjanLowestCommonAncestor", "name": "calculate", "signature": "V calculate(V start, V a, V b)", "start_line": 3, "modifiers": "public", "params": [{"name": "start", "type": "V"}, {"name": "a", "type": "V"}, {"name": "b", "type": "V"}], "return_type": "V"}, "class_info": {"name": "TarjanLowestCommo...
8759133_1
class ZuulFiltersModule extends AbstractModule { @VisibleForTesting String[] findFilterLocations(AbstractConfiguration config) { String[] locations = config.getStringArray("zuul.filters.locations"); if (locations == null) { locations = new String[]{"inbound", "outbound", "endpoint"}...
Mockito.when(configuration.getStringArray("zuul.filters.locations")).thenReturn(new String[0]); String[] filterLocations = module.findFilterLocations(configuration); assertThat(filterLocations.length, equalTo(0)); } }
[FOCAL] @VisibleForTesting String[] ZuulFiltersModule.findFilterLocations(AbstractConfiguration config) [CLASS] class ZuulFiltersModule extends AbstractModule [METRICS] loc=19 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=2 [CALLS-EXTERNAL] AbstractConfiguration.getStringArray/1, Arrays.stream(locations) .map(Stri...
/* static context [FOCAL] @VisibleForTesting String[] ZuulFiltersModule.findFilterLocations(AbstractConfiguration config) [PATH1] if(locations == null)=T -> if(filterLocations.length != 0)=T -> foreach(String location : filterLocations)=T -> exit loop -> return filterLocations [PATH2] if(locations == null)=F -> if(filt...
/* static context [FOCAL] @VisibleForTesting String[] ZuulFiltersModule.findFilterLocations(AbstractConfiguration config) [PATH1] if(locations == null)=T -> if(filterLocations.length != 0)=T -> foreach(String location : filterLocations)=T -> exit loop -> return filterLocations [PATH2] if(locations == null)=F -> if(filt...
true
ok
{"focal": {"class": "ZuulFiltersModule", "name": "findFilterLocations", "signature": "String[] findFilterLocations(AbstractConfiguration config)", "start_line": 3, "modifiers": "@VisibleForTesting", "params": [{"name": "config", "type": "AbstractConfiguration"}], "return_type": "String[]"}, "class_info": {"name": "Zuul...
8772570_1
class FreeDBTAGWizardPlugin implements TAGWizardPlugin { @Override public String getName() { return NAME; } @Override public float getVersion(); @Override public float getMinimumMessicVersion(); @Override public String getDescription( Locale locale ); @Override public Propertie...
FreeDBTAGWizardPlugin d = new FreeDBTAGWizardPlugin(); Assert.assertTrue( d.getName().equals( FreeDBTAGWizardPlugin.NAME ) ); } }
[FOCAL] @Override public String FreeDBTAGWizardPlugin.getName() [CLASS] class FreeDBTAGWizardPlugin implements TAGWizardPlugin [METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] float getVersion(); float getMinimumMessicVersion(); String getDescription(Locale locale); Properties getCon...
/* static context [FOCAL] @Override public String FreeDBTAGWizardPlugin.getName() */
/* static context [FOCAL] @Override public String FreeDBTAGWizardPlugin.getName() */ class FreeDBTAGWizardPlugin implements TAGWizardPlugin { @Override public String getName() { return NAME; } @Override public float getVersion(); @Override public float getMinimumMessicVersion(); @O...
true
ok
{"focal": {"class": "FreeDBTAGWizardPlugin", "name": "getName", "signature": "String getName()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "FreeDBTAGWizardPlugin", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "TAGWizardPlugin"...
8777778_3
class MsgDeliveryTagMapping { void basicReject(long deliveryTag, boolean requeue) throws IOException { Map<Long, MsgResponse> rejections = deliveryTags.subMap(deliveryTag, deliveryTag + 1); eachChannelOnce(rejections, MsgResult.REJECT, false, requeue); rejections.clear(); } MsgDeliveryTagMapping()...
when(envelope.getDeliveryTag()).thenReturn(43L); Envelope e = map.envelopeWithPseudoDeliveryTag(channel, envelope); assertNotEquals(43L, e.getDeliveryTag()); assertDoesNotThrow(() -> map.basicReject(e.getDeliveryTag(), false)); assertDoesNotThrow(() -> verify(channel).basicReject(43L, false)); } ...
[FOCAL] void MsgDeliveryTagMapping.basicReject(long deliveryTag, boolean requeue) [CLASS] class MsgDeliveryTagMapping [METRICS] loc=5 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0 [CALLS-INTERNAL] void eachChannelOnce(Map<Long, MsgResponse> responseMap, MsgResult msgResult, boolean multiple, boolean requeue) [CA...
/* static context [FOCAL] void MsgDeliveryTagMapping.basicReject(long deliveryTag, boolean requeue) [COLLABORATORS] field deliveryTags subMap/2 [EXCEPTIONS] declares IOException [CALLS-INTERNAL] void eachChannelOnce(Map<Long, MsgResponse> responseMap, MsgResult msgResult, boolean multiple, boolean requeue) [CALLS-EXTER...
/* static context [FOCAL] void MsgDeliveryTagMapping.basicReject(long deliveryTag, boolean requeue) [COLLABORATORS] field deliveryTags subMap/2 [EXCEPTIONS] declares IOException [CALLS-INTERNAL] void eachChannelOnce(Map<Long, MsgResponse> responseMap, MsgResult msgResult, boolean multiple, boolean requeue) [CALLS-EXTER...
true
ok
{"focal": {"class": "MsgDeliveryTagMapping", "name": "basicReject", "signature": "void basicReject(long deliveryTag, boolean requeue) throws IOException", "start_line": 3, "modifiers": "", "params": [{"name": "deliveryTag", "type": "long"}, {"name": "requeue", "type": "boolean"}], "return_type": "void"}, "class_info": ...
8786725_102
class DeviceManager implements RadarListener { @Override public void deviceLeft(NetworkDevice device) { if (device == null || device.getNetworkDeviceName() == null || device.getNetworkDeviceType() == null) return; // Remove what services this device has. logger.info("Device "+device.getNetworkDeviceName()+" of...
NetworkDevice leavingGuy = networkDevice("ADDR_UNKNOWN", "UNEXISTANT"); assertEquals(1, dao.list().size()); UpDriver driver = new UpDriver("DD"); driver.addService("s"); driverDao .insert(new DriverModel("id1", driver, currentDevice.getName())); driverDao .insert(new DriverModel("id2", driver, curre...
[FOCAL] @Override public void DeviceManager.deviceLeft(NetworkDevice device) [CLASS] class DeviceManager implements RadarListener [METRICS] loc=23 cc=5 branches=3 loops=1 returns=1 throws=0 nesting=3 [CALLS-EXTERNAL] NetworkDevice.getNetworkDeviceName/0, NetworkDevice.getNetworkDeviceType/0, logger.info/1, connectionMa...
/* static context [FOCAL] @Override public void DeviceManager.deviceLeft(NetworkDevice device) [PATH1] if(device == null || device.getNetworkDeviceName() == null || device.getNetworkDeviceType() == null)=F -> if(devices != null && !devices.isEmpty())=T -> if(returnedDrivers != null && !returnedDrivers.isEmpty())=T -> f...
/* static context [FOCAL] @Override public void DeviceManager.deviceLeft(NetworkDevice device) [PATH1] if(device == null || device.getNetworkDeviceName() == null || device.getNetworkDeviceType() == null)=F -> if(devices != null && !devices.isEmpty())=T -> if(returnedDrivers != null && !returnedDrivers.isEmpty())=T -> f...
true
ok
{"focal": {"class": "DeviceManager", "name": "deviceLeft", "signature": "void deviceLeft(NetworkDevice device)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "device", "type": "NetworkDevice"}], "return_type": "void"}, "class_info": {"name": "DeviceManager", "kind": "class", "modifiers": "", "s...
8791847_17
class IntRange extends AbstractList<Integer> implements ArrayWritable<Integer>, RandomAccess, Serializable { @Override public int size() { return size; } IntRange(int start, int end); IntRange(int start, int end, int step); @Override public Integer get(int index); public int i...
Assert.assertEquals(ir0.size(), 10); Assert.assertEquals(ir1.size(), 4); } }
[FOCAL] @Override public int IntRange.size() [CLASS] class IntRange extends AbstractList<Integer> implements ArrayWritable<Integer>, RandomAccess, Serializable [METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0 [CLASS-MEMBERS] IntRange(int start, int end); IntRange(int start, int end, int step); Integ...
/* static context [FOCAL] @Override public int IntRange.size() */
/* static context [FOCAL] @Override public int IntRange.size() */ class IntRange extends AbstractList<Integer> implements ArrayWritable<Integer>, RandomAccess, Serializable { @Override public int size() { return size; } IntRange(int start, int end); IntRange(int start, int end, int ste...
true
ok
{"focal": {"class": "IntRange", "name": "size", "signature": "int size()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "int"}, "class_info": {"name": "IntRange", "kind": "class", "modifiers": "", "superclass": "AbstractList<Integer>", "interfaces": "ArrayWritable<Integer>, RandomAcces...
8824082_4
class BeanPropertiesMapper implements NodePropertiesMapper<T> { public T mapNodeProperties(final NodeRef nodeRef, final Map<QName, Serializable> properties) { try { T mappedObject = this.mappedClass.newInstance(); BeanWrapper bw = PropertyAccessorFactory.forBeanPropertyAccess(mappedObject); afterBeanWrapp...
Date testDate = new Date(); BeanPropertiesMapper<CmFolder> mapper = new BeanPropertiesMapperRegistry(namespaceService, dictionaryService) .addBeanPropertiesMapper(this.mapper).getForClass(CmFolder.class); CmFolder cmFolder = mapper.mapNodeProperties(NODE_REF, ImmutableMap.of(QName.createQName("custom_uri"...
[FOCAL] public T BeanPropertiesMapper.mapNodeProperties(NodeRef nodeRef, Map<QName, Serializable> properties) [CLASS] class BeanPropertiesMapper implements NodePropertiesMapper<T> [METRICS] loc=25 cc=5 branches=2 loops=1 returns=1 throws=1 nesting=3 [CALLS-INTERNAL] void afterBeanWrapperInitialized(BeanWrapper bw) [CAL...
/* static context [FOCAL] public T BeanPropertiesMapper.mapNodeProperties(NodeRef nodeRef, Map<QName, Serializable> properties) [THROWS-WHEN] RuntimeException when try-body throws [PATH1] foreach(Map.Entry<QName, PropertyDescriptor> entry : mappedQNames.entrySet())=T -> if(pd != null)=T -> exit loop -> if(configurer !=...
/* static context [FOCAL] public T BeanPropertiesMapper.mapNodeProperties(NodeRef nodeRef, Map<QName, Serializable> properties) [THROWS-WHEN] RuntimeException when try-body throws [PATH1] foreach(Map.Entry<QName, PropertyDescriptor> entry : mappedQNames.entrySet())=T -> if(pd != null)=T -> exit loop -> if(configurer !=...
true
ok
{"focal": {"class": "BeanPropertiesMapper", "name": "mapNodeProperties", "signature": "T mapNodeProperties(NodeRef nodeRef, Map<QName, Serializable> properties)", "start_line": 3, "modifiers": "public", "params": [{"name": "nodeRef", "type": "NodeRef"}, {"name": "properties", "type": "Map<QName, Serializable>"}], "retu...
8853829_0
class Order { public double getTotal() { double total = 0; for (Product product : products) { total += product.getPrice(); } return total; } public Order(Product ... products); private static final double ERROR; } class OrderTest { private static final double ERROR; @Test public void should_su...
Order order = new Order(new Product(30), new Product(40.0)); assertEquals(70.0, order.getTotal(), ERROR); } }
[FOCAL] public double Order.getTotal() [CLASS] class Order [METRICS] loc=7 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1 [CALLS-EXTERNAL] Product.getPrice/0 [PATH1] foreach(Product product : products)=T -> exit loop -> return total [PATH2] foreach(Product product : products)=F -> return total [DATAFLOW] product@...
/* static context [FOCAL] public double Order.getTotal() [PATH1] foreach(Product product : products)=T -> exit loop -> return total [PATH2] foreach(Product product : products)=F -> return total [CALLS-EXTERNAL] Product.getPrice/0 */
/* static context [FOCAL] public double Order.getTotal() [PATH1] foreach(Product product : products)=T -> exit loop -> return total [PATH2] foreach(Product product : products)=F -> return total [CALLS-EXTERNAL] Product.getPrice/0 */ class Order { public double getTotal() { double total = 0; for (Product product :...
true
ok
{"focal": {"class": "Order", "name": "getTotal", "signature": "double getTotal()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "double"}, "class_info": {"name": "Order", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "ERROR", "type": "double", "mod...
8859474_6
class JSources extends JNode { List<JPackage> getHierarchyPackages(List<JavaPackage> packages) { Map<String, JPackage> pkgMap = new HashMap<>(); for (JavaPackage pkg : packages) { addPackage(pkgMap, new JPackage(pkg, wrapper)); } // merge packages without classes boolean repeat; do { repeat = false;...
List<JavaPackage> packages = asList( newPkg("a.p1"), newPkg("a.b.c.p2"), newPkg("a.b.c.p3"), newPkg("d.e"), newPkg("d.f.a")); List<JPackage> out = sources.getHierarchyPackages(packages); assertThat(out, hasSize(2)); assertThat(out.get(0).getName(), is("a")); assertThat(out.get(0).getInner...
[FOCAL] List<JPackage> JSources.getHierarchyPackages(List<JavaPackage> packages) [CLASS] class JSources extends JNode [METRICS] loc=44 cc=8 branches=2 loops=5 returns=1 throws=0 nesting=3 [CALLS-INTERNAL] void addPackage(Map<String, JPackage> pkgs, JPackage pkg) [CALLS-EXTERNAL] Map<String, JPackage>.values/0, JPackage...
/* static context [FOCAL] List<JPackage> JSources.getHierarchyPackages(List<JavaPackage> packages) [PATH1] foreach(JavaPackage pkg : packages)=F -> foreach(JPackage pkg : pkgMap.values())#1=T -> if(innerPackages.size() == 1 && pkg.getClasses().isEmpty())=T -> do_while(repeat)=F -> foreach(JPackage pkg : pkgMap.values()...
/* static context [FOCAL] List<JPackage> JSources.getHierarchyPackages(List<JavaPackage> packages) [PATH1] foreach(JavaPackage pkg : packages)=F -> foreach(JPackage pkg : pkgMap.values())#1=T -> if(innerPackages.size() == 1 && pkg.getClasses().isEmpty())=T -> do_while(repeat)=F -> foreach(JPackage pkg : pkgMap.values()...
true
ok
{"focal": {"class": "JSources", "name": "getHierarchyPackages", "signature": "List<JPackage> getHierarchyPackages(List<JavaPackage> packages)", "start_line": 3, "modifiers": "", "params": [{"name": "packages", "type": "List<JavaPackage>"}], "return_type": "List<JPackage>"}, "class_info": {"name": "JSources", "kind": "c...
8914350_60
class AsyncSuroSender implements Runnable { public void run() { boolean sent = false; boolean retried = false; long startTS = System.currentTimeMillis(); for (int i = 0; i < config.getRetryCount(); ++i) { ConnectionPool.SuroConnection connection = connectionPool.chooseC...
AsyncSuroClient client = injector.getInstance(AsyncSuroClient.class); for (SuroServer4Test c : servers) { c.setTryLater(); } AsyncSuroSender sender = new AsyncSuroSender( TestConnectionPool.createMessageSet(600), client, injec...
[FOCAL] public void AsyncSuroSender.run() [CLASS] class AsyncSuroSender implements Runnable [METRICS] loc=38 cc=8 branches=3 loops=2 returns=0 throws=0 nesting=4 [CALLS-EXTERNAL] System.currentTimeMillis/0, config.getRetryCount/0, connectionPool.chooseConnection/0, ConnectionPool.SuroConnection.send/1, Result.getResult...
/* static context [FOCAL] public void AsyncSuroSender.run() [PATH1] for(i < config.getRetryCount())=T -> if(connection == null)=F -> if(result != null && result.getResultCode() == ResultCode.OK && result.isSetMessage())=F -> try-body throws -> exit loop -> if(sent)=F -> foreach(Message m : new MessageSetReader(messageS...
/* static context [FOCAL] public void AsyncSuroSender.run() [PATH1] for(i < config.getRetryCount())=T -> if(connection == null)=F -> if(result != null && result.getResultCode() == ResultCode.OK && result.isSetMessage())=F -> try-body throws -> exit loop -> if(sent)=F -> foreach(Message m : new MessageSetReader(messageS...
true
ok
{"focal": {"class": "AsyncSuroSender", "name": "run", "signature": "void run()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "void"}, "class_info": {"name": "AsyncSuroSender", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Runnable", "fields": [{"name": "injector", "type":...