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 |
|---|---|---|---|---|---|---|---|---|
4189503_130 | class InProgramCalculation extends AbstractPatientCalculation {
@Override
public CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Object> params, PatientCalculationContext context) {
Program program = (params != null && params.containsKey("program")) ? (Program) params.get("program") : null;
... | Program hivProgram = MetadataUtils.existing(Program.class, HivMetadata._Program.HIV);
Program tbProgram = MetadataUtils.existing(Program.class, TbMetadata._Program.TB);
// Enroll patient #6 in TB program
TestUtils.enrollInProgram(TestUtils.getPatient(6), tbProgram, TestUtils.date(2012, 1, 1));
// Enroll pat... | [FOCAL] @Override public CalculationResultMap InProgramCalculation.evaluate(Collection<Integer> cohort, Map<String, Object> params, PatientCalculationContext context)
[CLASS] class InProgramCalculation extends AbstractPatientCalculation
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNA... | /* static context
[FOCAL] @Override public CalculationResultMap InProgramCalculation.evaluate(Collection<Integer> cohort, Map<String, Object> params, PatientCalculationContext context)
[INPUTS] branches=- | result=cohort, context, params
[COLLABORATORS] param params:Map<String, Object> containsKey/1,get/1
[CALLS-EXTERN... | /* static context
[FOCAL] @Override public CalculationResultMap InProgramCalculation.evaluate(Collection<Integer> cohort, Map<String, Object> params, PatientCalculationContext context)
[INPUTS] branches=- | result=cohort, context, params
[COLLABORATORS] param params:Map<String, Object> containsKey/1,get/1
[CALLS-EXTERN... | true | ok | {"focal": {"class": "InProgramCalculation", "name": "evaluate", "signature": "CalculationResultMap evaluate(Collection<Integer> cohort, Map<String, Object> params, PatientCalculationContext context)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "cohort", "type": "Collection<Integer>"}, {"name"... |
4193864_175 | class FeedRenderingPool {
void handleSubscriptions() {
Set<FeedProvider> requiredSubscriptions = buildRequiredSubscriptions();
List<FeedProvider> newSubscriptions = new ArrayList<FeedProvider>();
List<FeedProvider> removedSubscriptions = new ArrayList<FeedProvider>();
Set<FeedProvid... | pool.cancelTimer();
Field f = FeedView.class.getDeclaredField("feedPool");
f.setAccessible(true);
FeedRenderingPool rp = (FeedRenderingPool) f.get(fv1);
rp.cancelTimer();
final String feedId = "f1";
FeedView fv2 = Mockito.mock(FeedView.class);
FeedProvider... | [FOCAL] void FeedRenderingPool.handleSubscriptions()
[CLASS] class FeedRenderingPool
[METRICS] loc=38 cc=6 branches=3 loops=2 returns=1 throws=0 nesting=2
[CALLS-INTERNAL] Set<FeedProvider> buildRequiredSubscriptions(); SubscriptionManager getSubscriptionManager(); boolean exceededMaxSubscriptions(Set<FeedProvider> req... | /* static context
[FOCAL] void FeedRenderingPool.handleSubscriptions()
[PATH1] if(exceededMaxSubscriptions(requiredSubscriptions, newSubscriptions))=F -> if(manager != null)=T -> foreach(FeedProvider feed : removedSubscriptions)=T -> exit loop -> foreach(FeedProvider feed : newSubscriptions)=F -> if(!newlyAddedSubscrip... | /* static context
[FOCAL] void FeedRenderingPool.handleSubscriptions()
[PATH1] if(exceededMaxSubscriptions(requiredSubscriptions, newSubscriptions))=F -> if(manager != null)=T -> foreach(FeedProvider feed : removedSubscriptions)=T -> exit loop -> foreach(FeedProvider feed : newSubscriptions)=F -> if(!newlyAddedSubscrip... | true | ok | {"focal": {"class": "FeedRenderingPool", "name": "handleSubscriptions", "signature": "void handleSubscriptions()", "start_line": 3, "modifiers": "", "params": [], "return_type": "void"}, "class_info": {"name": "FeedRenderingPool", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"na... |
4195698_13 | class FileHelper {
protected static void copyDirectory(final File srcDir, final File destDir)
throws IOException {
if (srcDir == null) {
throw new NullPointerException("Source must not be null");
}
if (destDir == null) {
throw new NullPointerException("Destination must not be null");
}
if (srcDir.e... |
final File srcDir = buildOrnidroidHomeTest(TEST_DIRECTORY + "/srcDir");
final File destDir = new File(TEST_DIRECTORY + "/destDir");
// copy in an other directory
try {
FileHelper.copyDirectory(srcDir, destDir);
final File[] srcDirContent = srcDir.listFiles();
final File[] destDirContent = destDir.lis... | [FOCAL] protected static void FileHelper.copyDirectory(File srcDir, File destDir)
[CLASS] class FileHelper
[METRICS] loc=37 cc=9 branches=7 loops=1 returns=0 throws=5 nesting=3
[CALLS-INTERNAL] void doCopyDirectory(File srcDir, File destDir, List<String> exclusionList)
[CALLS-EXTERNAL] File.exists/0, File.isDirectory/0... | /* static context
[FOCAL] protected static void FileHelper.copyDirectory(File srcDir, File destDir)
[THROWS-WHEN] NullPointerException when srcDir == null
[THROWS-WHEN] NullPointerException when !(srcDir == null) && destDir == null
[THROWS-WHEN] FileNotFoundException when !(srcDir == null) && !(destDir == null) && srcD... | /* static context
[FOCAL] protected static void FileHelper.copyDirectory(File srcDir, File destDir)
[THROWS-WHEN] NullPointerException when srcDir == null
[THROWS-WHEN] NullPointerException when !(srcDir == null) && destDir == null
[THROWS-WHEN] FileNotFoundException when !(srcDir == null) && !(destDir == null) && srcD... | true | ok | {"focal": {"class": "FileHelper", "name": "copyDirectory", "signature": "void copyDirectory(File srcDir, File destDir) throws IOException", "start_line": 3, "modifiers": "protected static", "params": [{"name": "srcDir", "type": "File"}, {"name": "destDir", "type": "File"}], "return_type": "void"}, "class_info": {"name"... |
4214268_3 | class Util {
public static long bin2long(byte[] array, int offset) {
return ((array[offset + 0] & 0xffL) << 56) + ((array[offset + 1] & 0xffL) << 48)
+ ((array[offset + 2] & 0xffL) << 40) + ((array[offset + 3] & 0xffL) << 32)
+ ((array[offset + 4] & 0xffL) << 24) + ((array[offset + 5] & 0xffL) <<... | assertEquals(1000L, Util.bin2long(thousandlong, 0));
}
} | [FOCAL] public static long Util.bin2long(byte[] array, int offset)
[CLASS] class Util
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[INPUTS] branches=- | result=array, offset
[DATAFLOW] array@param->L2; offset@param->L2
[CLASS-MEMBERS] Util(); void int2bin(byte[] out, int offset, int i); byte[] i... | /* static context
[FOCAL] public static long Util.bin2long(byte[] array, int offset)
[INPUTS] branches=- | result=array, offset
*/
| /* static context
[FOCAL] public static long Util.bin2long(byte[] array, int offset)
[INPUTS] branches=- | result=array, offset
*/
class Util {
public static long bin2long(byte[] array, int offset) {
return ((array[offset + 0] & 0xffL) << 56) + ((array[offset + 1] & 0xffL) << 48)
+ ((array[offset + 2] & ... | true | ok | {"focal": {"class": "Util", "name": "bin2long", "signature": "long bin2long(byte[] array, int offset)", "start_line": 3, "modifiers": "public static", "params": [{"name": "array", "type": "byte[]"}, {"name": "offset", "type": "int"}], "return_type": "long"}, "class_info": {"name": "Util", "kind": "class", "modifiers": ... |
4233818_4 | class MyBean {
public DependencyA getDependencyA() {
return dependencyA;
}
public MyBean();
public MyBean(DependencyA dependencyA);
public void setDependencyA(DependencyA dependencyA);
@Autowired
@Qualifier(value="myBeanSetterInjection")
private MyBean myBeanSetterInjection;
@Autowired
@Qualifier(valu... | assertThat(myBeanConstructorInjection.getDependencyA(), notNullValue());
assertThat(myBeanSetterInjection.getDependencyA(), notNullValue());
}
} | [FOCAL] public DependencyA MyBean.getDependencyA()
[CLASS] class MyBean
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] MyBean(); MyBean(DependencyA dependencyA); void setDependencyA(DependencyA dependencyA)
[TEST] MyBeanTest: @Test public void testXMLwiring()
[TEST-FIELDS] MyBean m... | /* static context
[FOCAL] public DependencyA MyBean.getDependencyA()
*/
| /* static context
[FOCAL] public DependencyA MyBean.getDependencyA()
*/
class MyBean {
public DependencyA getDependencyA() {
return dependencyA;
}
public MyBean();
public MyBean(DependencyA dependencyA);
public void setDependencyA(DependencyA dependencyA);
@Autowired
@Qualifier(value="myBeanSetterInjecti... | true | ok | {"focal": {"class": "MyBean", "name": "getDependencyA", "signature": "DependencyA getDependencyA()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "DependencyA"}, "class_info": {"name": "MyBean", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "myBean... |
4237245_15 | class Vector extends AbstractList<E> implements List<E>, RandomAccess {
public synchronized E elementAt(int index) {
if (index >= elementCount) {
throw new ArrayIndexOutOfBoundsException(index + " >= "
+ elementCount);
}
return (E) elementData[index];
}
public Vector(int initialCapacity);
public ... | fail("Not yet implemented");
}
} | [FOCAL] public synchronized E Vector.elementAt(int index)
[CLASS] class Vector extends AbstractList<E> implements List<E>, RandomAccess
[METRICS] loc=8 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[NEW] ArrayIndexOutOfBoundsException
[EXCEPTIONS] throws ArrayIndexOutOfBoundsException
[THROWS-WHEN] ArrayIndexOut... | /* static context
[FOCAL] public synchronized E Vector.elementAt(int index)
[THROWS-WHEN] ArrayIndexOutOfBoundsException when index >= elementCount
[PATH1] if(index >= elementCount)=T -> throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount)
[PATH2] if(index >= elementCount)=F -> return (E) elementData... | /* static context
[FOCAL] public synchronized E Vector.elementAt(int index)
[THROWS-WHEN] ArrayIndexOutOfBoundsException when index >= elementCount
[PATH1] if(index >= elementCount)=T -> throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount)
[PATH2] if(index >= elementCount)=F -> return (E) elementData... | true | ok | {"focal": {"class": "Vector", "name": "elementAt", "signature": "E elementAt(int index)", "start_line": 3, "modifiers": "public synchronized", "params": [{"name": "index", "type": "int"}], "return_type": "E"}, "class_info": {"name": "Vector", "kind": "class", "modifiers": "", "superclass": "AbstractList<E>", "interface... |
4238016_112 | class UnknownMacroMacroRunnable implements IMacroRunnable {
@Override
public String getHtml(IMacroContext macroContext) {
return "<span class=\"text-error\">{{" + macroContext.getMacroName() + "/}}</span>"; //$NON-NLS-1$ //$NON-NLS-2$
}
@Override public String cleanupHtml(String html);
private UnknownMacroMac... | when(context.getMacroName()).thenReturn("nonexistent"); //$NON-NLS-1$
assertEquals("<span class=\"text-error\">{{nonexistent/}}</span>", runnable.getHtml(context)); //$NON-NLS-1$
}
} | [FOCAL] @Override public String UnknownMacroMacroRunnable.getHtml(IMacroContext macroContext)
[CLASS] class UnknownMacroMacroRunnable implements IMacroRunnable
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] IMacroContext.getMacroName/0
[INPUTS] branches=- | result=macroContext
[CO... | /* static context
[FOCAL] @Override public String UnknownMacroMacroRunnable.getHtml(IMacroContext macroContext)
[INPUTS] branches=- | result=macroContext
[COLLABORATORS] param macroContext:IMacroContext getMacroName/0
[CALLS-EXTERNAL] IMacroContext.getMacroName/0
*/
| /* static context
[FOCAL] @Override public String UnknownMacroMacroRunnable.getHtml(IMacroContext macroContext)
[INPUTS] branches=- | result=macroContext
[COLLABORATORS] param macroContext:IMacroContext getMacroName/0
[CALLS-EXTERNAL] IMacroContext.getMacroName/0
*/
class UnknownMacroMacroRunnable implements IMacroRunn... | true | ok | {"focal": {"class": "UnknownMacroMacroRunnable", "name": "getHtml", "signature": "String getHtml(IMacroContext macroContext)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "macroContext", "type": "IMacroContext"}], "return_type": "String"}, "class_info": {"name": "UnknownMacroMacroRunnable", "k... |
4242485_127 | class BrowserOperatingSystemMapping implements Serializable {
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final BrowserOperatingSystemMapping other = (BrowserOperati... | final BrowserOperatingSystemMapping m = new BrowserOperatingSystemMapping(1, 1);
final String otherClass = "";
assertThat(m.equals(otherClass)).isFalse();
}
} | [FOCAL] @Override public boolean BrowserOperatingSystemMapping.equals(Object obj)
[CLASS] class BrowserOperatingSystemMapping implements Serializable
[METRICS] loc=20 cc=6 branches=5 loops=0 returns=6 throws=0 nesting=1
[CALLS-EXTERNAL] getClass/0 (inherited), Object.getClass/0
[PATH1] if(this == obj)=F -> if(obj == nu... | /* static context
[FOCAL] @Override public boolean BrowserOperatingSystemMapping.equals(Object obj)
[PATH1] if(this == obj)=F -> if(obj == null)=F -> if(getClass() != obj.getClass())=F -> if(browserId != other.browserId)=F -> if(operatingSystemId != other.operatingSystemId)=T -> return false
[PATH2] if(this == obj)=T -... | /* static context
[FOCAL] @Override public boolean BrowserOperatingSystemMapping.equals(Object obj)
[PATH1] if(this == obj)=F -> if(obj == null)=F -> if(getClass() != obj.getClass())=F -> if(browserId != other.browserId)=F -> if(operatingSystemId != other.operatingSystemId)=T -> return false
[PATH2] if(this == obj)=T -... | true | ok | {"focal": {"class": "BrowserOperatingSystemMapping", "name": "equals", "signature": "boolean equals(Object obj)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "obj", "type": "Object"}], "return_type": "boolean"}, "class_info": {"name": "BrowserOperatingSystemMapping", "kind": "class", "modifier... |
4265123_11 | class EnumGenerator {
public FieldDeclaration generateAttribute(Classifier clazz, AST ast,
Property property) {
Type type = property.getType();
logger.log(Level.FINE, "Class: " + clazz.getName() + " - "
+ "Property: " + property.getName() + " - "
+ "Property Upper: " + property.getUpper() + " - "
+... | AST ast = AST.newAST(AST.JLS3);
CompilationUnit cu = ast.newCompilationUnit();
EnumDeclaration ed = enumGenerator.generateEnum(clazz, ast, cu);
EList<Property> properties = mock(EList.class);
Iterator<Property> propertyIter = mock(Iterator.class);
Property property = mock(Property.class);
Type type = moc... | [FOCAL] public FieldDeclaration EnumGenerator.generateAttribute(Classifier clazz, AST ast, Property property)
[CLASS] class EnumGenerator
[METRICS] loc=30 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] void generateJavadoc(AST ast, Comment comment, Javadoc javadoc)
[CALLS-EXTERNAL] Property.getTy... | /* static context
[FOCAL] public FieldDeclaration EnumGenerator.generateAttribute(Classifier clazz, AST ast, Property property)
[PATH1] foreach(Comment comment : comments)=T -> exit loop -> return fieldDeclaration
[PATH2] foreach(Comment comment : comments)=F -> return fieldDeclaration
[INPUTS] branches=property | resu... | /* static context
[FOCAL] public FieldDeclaration EnumGenerator.generateAttribute(Classifier clazz, AST ast, Property property)
[PATH1] foreach(Comment comment : comments)=T -> exit loop -> return fieldDeclaration
[PATH2] foreach(Comment comment : comments)=F -> return fieldDeclaration
[INPUTS] branches=property | resu... | true | ok | {"focal": {"class": "EnumGenerator", "name": "generateAttribute", "signature": "FieldDeclaration generateAttribute(Classifier clazz, AST ast, Property property)", "start_line": 3, "modifiers": "public", "params": [{"name": "clazz", "type": "Classifier"}, {"name": "ast", "type": "AST"}, {"name": "property", "type": "Pro... |
4265955_13 | class CSVDataStore extends ContentDataStore implements FileDataStore {
@Override
public FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader() throws IOException {
return new CSVFeatureSource(this).getReader();
}
public CSVDataStore(File file);
public CSVDataStore(File file, ... | FeatureReader<SimpleFeatureType, SimpleFeature> reader = csvDataStore.getFeatureReader();
List<Coordinate> geometries = new ArrayList<Coordinate>();
List<String> cities = new ArrayList<String>();
List<String> numbers = new ArrayList<String>();
while (reader.hasNext()) {
... | [FOCAL] @Override public FeatureReader<SimpleFeatureType, SimpleFeature> CSVDataStore.getFeatureReader()
[CLASS] class CSVDataStore extends ContentDataStore implements FileDataStore
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] new CSVFeatureSource(this).getReader/0
[NEW] CSVFeat... | /* static context
[FOCAL] @Override public FeatureReader<SimpleFeatureType, SimpleFeature> CSVDataStore.getFeatureReader()
[EXCEPTIONS] declares IOException
[NEW] CSVFeatureSource
[CALLS-EXTERNAL] new CSVFeatureSource(this).getReader/0
*/
| /* static context
[FOCAL] @Override public FeatureReader<SimpleFeatureType, SimpleFeature> CSVDataStore.getFeatureReader()
[EXCEPTIONS] declares IOException
[NEW] CSVFeatureSource
[CALLS-EXTERNAL] new CSVFeatureSource(this).getReader/0
*/
class CSVDataStore extends ContentDataStore implements FileDataStore {
@Over... | true | ok | {"focal": {"class": "CSVDataStore", "name": "getFeatureReader", "signature": "FeatureReader<SimpleFeatureType, SimpleFeature> getFeatureReader() throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "FeatureReader<SimpleFeatureType, SimpleFeature>"}, "class_info": {"name": ... |
4276349_2 | class GalaxyAnnouncementModule extends AbstractModule {
@Provides
@Singleton
AnnouncementConfig getAnnouncementConfig(final Config config)
{
final AnnouncementConfig baseConfig = config.getBean(AnnouncementConfig.class);
return new AnnouncementConfig(baseConfig) {
@Override... | final GalaxyAnnouncementModule module = new GalaxyAnnouncementModule();
final AnnouncementConfig cfg = module.getAnnouncementConfig(config);
Assert.assertEquals("configured-service", cfg.getServiceName());
Assert.assertEquals("configured-type", cfg.getServiceType());
Assert.ass... | [FOCAL] @Provides @Singleton AnnouncementConfig GalaxyAnnouncementModule.getAnnouncementConfig(Config config)
[CLASS] class GalaxyAnnouncementModule extends AbstractModule
[METRICS] loc=18 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] Config.getBean/1, ObjectUtils.toString/2, AbstractModule.getS... | /* static context
[FOCAL] @Provides @Singleton AnnouncementConfig GalaxyAnnouncementModule.getAnnouncementConfig(Config config)
[INPUTS] branches=- | result=config
[COLLABORATORS] param config:Config getBean/1
[NEW] AnnouncementConfig
[CALLS-EXTERNAL] Config.getBean/1, ObjectUtils.toString/2, AbstractModule.getServiceN... | /* static context
[FOCAL] @Provides @Singleton AnnouncementConfig GalaxyAnnouncementModule.getAnnouncementConfig(Config config)
[INPUTS] branches=- | result=config
[COLLABORATORS] param config:Config getBean/1
[NEW] AnnouncementConfig
[CALLS-EXTERNAL] Config.getBean/1, ObjectUtils.toString/2, AbstractModule.getServiceN... | true | ok | {"focal": {"class": "GalaxyAnnouncementModule", "name": "getAnnouncementConfig", "signature": "AnnouncementConfig getAnnouncementConfig(Config config)", "start_line": 3, "modifiers": "@Provides @Singleton", "params": [{"name": "config", "type": "Config"}], "return_type": "AnnouncementConfig"}, "class_info": {"name": "G... |
4288215_27 | class PLCLoginModule implements LoginModule {
@Override
public boolean logout() throws LoginException {
LOG.debug("logout");
subject.getPrincipals().clear();
return true;
}
@Override public boolean abort();
@Override public boolean commit();
@Override public void initia... | when(userDao.getByUsername(eq(TEST_USERNAME))).thenReturn(testUser);
PLCLoginModule testLoginModule = invokeLogin(TEST_USERNAME, TEST_PASSWORD);
assertTrue(subject.getPrincipals().contains(new UserRole("plcuser")));
assertTrue(subject.getPrincipals().contains(new UserPrincipal(testUser))... | [FOCAL] @Override public boolean PLCLoginModule.logout()
[CLASS] class PLCLoginModule implements LoginModule
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] LOG.debug/1, subject.getPrincipals().clear/0, Subject.getPrincipals/0
[FIELDS] read=subject:Subject
[EXCEPTIONS] declares Log... | /* static context
[FOCAL] @Override public boolean PLCLoginModule.logout()
[COLLABORATORS] field subject:Subject getPrincipals/0
[EXCEPTIONS] declares LoginException
[FIELDS] read=subject:Subject
[CALLS-EXTERNAL] LOG.debug/1, subject.getPrincipals().clear/0, Subject.getPrincipals/0
*/
| /* static context
[FOCAL] @Override public boolean PLCLoginModule.logout()
[COLLABORATORS] field subject:Subject getPrincipals/0
[EXCEPTIONS] declares LoginException
[FIELDS] read=subject:Subject
[CALLS-EXTERNAL] LOG.debug/1, subject.getPrincipals().clear/0, Subject.getPrincipals/0
*/
class PLCLoginModule implements Lo... | true | ok | {"focal": {"class": "PLCLoginModule", "name": "logout", "signature": "boolean logout() throws LoginException", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "boolean"}, "class_info": {"name": "PLCLoginModule", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "LoginMod... |
4291387_17 | class DynamicPropertyUpdater {
void addOrChangeProperty(final String name, final Object newValue, final Configuration config) {
// We do not want to abort the operation due to failed validation on one property
try {
if (!config.containsKey(name)) {
logger.debug("adding p... | AbstractConfiguration.setDefaultListDelimiter(':');
AbstractConfiguration config = new ConcurrentCompositeConfiguration();
config.addConfigurationListener(new ExpandedConfigurationListenerAdapter(new MyListener()));
MyListener.resetCount();
config.setProperty("test.host", "test:... | [FOCAL] void DynamicPropertyUpdater.addOrChangeProperty(String name, Object newValue, Configuration config)
[CLASS] class DynamicPropertyUpdater
[METRICS] loc=40 cc=8 branches=5 loops=1 returns=0 throws=0 nesting=5
[CALLS-EXTERNAL] Configuration.containsKey/1, logger.debug/3, Configuration.addProperty/2, Configuration.... | /* static context
[FOCAL] void DynamicPropertyUpdater.addOrChangeProperty(String name, Object newValue, Configuration config)
[PATH1] if(!config.containsKey(name))=F -> if(newValue != null)=T -> if(oldValue instanceof CopyOnWriteArrayList && AbstractConfiguration.getDefaultListDelimiter() != '\0')=T -> foreach(String s... | /* static context
[FOCAL] void DynamicPropertyUpdater.addOrChangeProperty(String name, Object newValue, Configuration config)
[PATH1] if(!config.containsKey(name))=F -> if(newValue != null)=T -> if(oldValue instanceof CopyOnWriteArrayList && AbstractConfiguration.getDefaultListDelimiter() != '\0')=T -> foreach(String s... | true | ok | {"focal": {"class": "DynamicPropertyUpdater", "name": "addOrChangeProperty", "signature": "void addOrChangeProperty(String name, Object newValue, Configuration config)", "start_line": 3, "modifiers": "", "params": [{"name": "name", "type": "String"}, {"name": "newValue", "type": "Object"}, {"name": "config", "type": "C... |
4298283_0 | class KakaduUtilities {
public static void initializeRGBChannels(Jp2_channels channels) throws KduException {
final int numColours = 3;
channels.Init(numColours);
// channels.Set_colour_mapping(0, 0, 0);
// channels.Set_colour_mapping(1, 0, 1);
// channels.Set_colour_mapping... | assumeTrue(format("JNI version=%d, expected < 7, ignoring", JNI_VERSION), JNI_VERSION < 7);
KakaduUtilities.initializeRGBChannels(channels);
verify(channels).Init(eq(3));
List<List<Object>> args = colorMappingCapturer.invocationArguments;
assertEquals(3, args.size());
... | [FOCAL] public static void KakaduUtilities.initializeRGBChannels(Jp2_channels channels)
[CLASS] class KakaduUtilities
[METRICS] loc=39 cc=4 branches=1 loops=0 returns=0 throws=2 nesting=2
[CALLS-INTERNAL] int getKakaduJniMajorVersion()
[CALLS-EXTERNAL] Jp2_channels.Init/1, Jp2_channels.class.getMethod/4, Jp2_channels.c... | /* static context
[FOCAL] public static void KakaduUtilities.initializeRGBChannels(Jp2_channels channels)
[THROWS-WHEN] RuntimeException when try-body throws
[THROWS-WHEN] RuntimeException when major < 7 && try-body throws
[THROWS-WHEN] RuntimeException when !(major < 7) && try-body throws
[PATH1] if(major < 7)=T -> tr... | /* static context
[FOCAL] public static void KakaduUtilities.initializeRGBChannels(Jp2_channels channels)
[THROWS-WHEN] RuntimeException when try-body throws
[THROWS-WHEN] RuntimeException when major < 7 && try-body throws
[THROWS-WHEN] RuntimeException when !(major < 7) && try-body throws
[PATH1] if(major < 7)=T -> tr... | true | ok | {"focal": {"class": "KakaduUtilities", "name": "initializeRGBChannels", "signature": "void initializeRGBChannels(Jp2_channels channels) throws KduException", "start_line": 3, "modifiers": "public static", "params": [{"name": "channels", "type": "Jp2_channels"}], "return_type": "void"}, "class_info": {"name": "KakaduUti... |
4298401_4 | class ClouderaManagerClientBuilder {
public static void clearCachedResources() {
clientStaticResources.invalidateAll();
}
public ClouderaManagerClientBuilder withAcceptLanguage(
String acceptLaunguage);
public ClouderaManagerClientBuilder withBaseURL(URL baseUrl);
public ClouderaManagerClientBuild... | ClouderaManagerClientBuilder builder = new ClouderaManagerClientBuilder();
ApiRootResource a = newProxy(builder);
assertNotNull(a);
ApiRootResource b = newProxy(builder);
assertNotNull(b);
ClouderaManagerClientBuilder.clearCachedResources();
// test after clear
assertNotNull(newProxy(bu... | [FOCAL] public static void ClouderaManagerClientBuilder.clearCachedResources()
[CLASS] class ClouderaManagerClientBuilder
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] clientStaticResources.invalidateAll/0
[COLLABORATORS] field clientStaticResources invalidateAll/0
[CLASS-MEMBERS... | /* static context
[FOCAL] public static void ClouderaManagerClientBuilder.clearCachedResources()
[COLLABORATORS] field clientStaticResources invalidateAll/0
[CALLS-EXTERNAL] clientStaticResources.invalidateAll/0
*/
| /* static context
[FOCAL] public static void ClouderaManagerClientBuilder.clearCachedResources()
[COLLABORATORS] field clientStaticResources invalidateAll/0
[CALLS-EXTERNAL] clientStaticResources.invalidateAll/0
*/
class ClouderaManagerClientBuilder {
public static void clearCachedResources() {
clientStaticResou... | true | ok | {"focal": {"class": "ClouderaManagerClientBuilder", "name": "clearCachedResources", "signature": "void clearCachedResources()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "void"}, "class_info": {"name": "ClouderaManagerClientBuilder", "kind": "class", "modifiers": "", "superclass": null... |
4298676_0 | class QueryDslCustomerRepository implements CustomerRepository {
@Override
@Transactional(readOnly = true)
public List<Customer> findAll() {
SQLQuery allCustomersQuery = qdslTemplate.newSqlQuery().from(qCustomer)
.leftJoin(qCustomer._addressCustomerRef, qAddress);
return qdslTemplate.query(allCustomersQuery... | List<Customer> results = repository.findAll();
assertThat(results, is(notNullValue()));
assertThat(results, hasSize(3));
assertThat(results.get(0), notNullValue());
assertThat(results.get(1), notNullValue());
assertThat(results.get(2), notNullValue());
}
} | [FOCAL] @Override @Transactional(readOnly = true) public List<Customer> QueryDslCustomerRepository.findAll()
[CLASS] class QueryDslCustomerRepository implements CustomerRepository
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] qdslTemplate.newSqlQuery().from(qCustomer).leftJoin/2,... | /* static context
[FOCAL] @Override @Transactional(readOnly = true) public List<Customer> QueryDslCustomerRepository.findAll()
[COLLABORATORS] field qdslTemplate newSqlQuery/0,query/3
[NEW] CustomerListExtractor
[CALLS-EXTERNAL] qdslTemplate.newSqlQuery().from(qCustomer).leftJoin/2, qdslTemplate.newSqlQuery().from/1, q... | /* static context
[FOCAL] @Override @Transactional(readOnly = true) public List<Customer> QueryDslCustomerRepository.findAll()
[COLLABORATORS] field qdslTemplate newSqlQuery/0,query/3
[NEW] CustomerListExtractor
[CALLS-EXTERNAL] qdslTemplate.newSqlQuery().from(qCustomer).leftJoin/2, qdslTemplate.newSqlQuery().from/1, q... | true | ok | {"focal": {"class": "QueryDslCustomerRepository", "name": "findAll", "signature": "List<Customer> findAll()", "start_line": 3, "modifiers": "@Override @Transactional(readOnly = true) public", "params": [], "return_type": "List<Customer>"}, "class_info": {"name": "QueryDslCustomerRepository", "kind": "class", "modifiers... |
4298816_47 | class FileTools {
public static void listFilesRecursive(File path, List<File> filesArray) {
if (path.exists()) {
File[] files = path.listFiles();
if (files == null) {
Log.fatal("Could not list file " + path.toString() + " you may not have read permissions, skipping i... | // test on SymLinkNullPointer
try {
File sudoersFile = new File("/etc/sudoers");
if (!sudoersFile.exists()) {
Log.fatal("Could not test FileTools on file where we have no read rights");
}
ArrayList<File> files = new ArrayList<>();
... | [FOCAL] public static void FileTools.listFilesRecursive(File path, List<File> filesArray)
[CLASS] class FileTools
[METRICS] loc=15 cc=5 branches=3 loops=1 returns=0 throws=0 nesting=3
[CALLS-EXTERNAL] File.exists/0, File.listFiles/0, Log.fatal/1, File.toString/0, Log.stderr/1, files[i].isDirectory/0, FileTools.listFile... | /* static context
[FOCAL] public static void FileTools.listFilesRecursive(File path, List<File> filesArray)
[PATH1] if(path.exists())=T -> if(files == null)=T -> for(files != null && i < files.length)=T -> if(files[i].isDirectory())=T -> exit loop
[PATH2] if(path.exists())=T -> if(files == null)=F -> for(files != null ... | /* static context
[FOCAL] public static void FileTools.listFilesRecursive(File path, List<File> filesArray)
[PATH1] if(path.exists())=T -> if(files == null)=T -> for(files != null && i < files.length)=T -> if(files[i].isDirectory())=T -> exit loop
[PATH2] if(path.exists())=T -> if(files == null)=F -> for(files != null ... | true | ok | {"focal": {"class": "FileTools", "name": "listFilesRecursive", "signature": "void listFilesRecursive(File path, List<File> filesArray)", "start_line": 3, "modifiers": "public static", "params": [{"name": "path", "type": "File"}, {"name": "filesArray", "type": "List<File>"}], "return_type": "void"}, "class_info": {"name... |
4300205_7 | class TicketSeedFileParser {
public List<SessionTicketKey> parse(File file) throws IOException {
return parseBytes(Files.toByteArray(file));
}
public TicketSeedFileParser();
public TicketSeedFileParser(String hexSalt);
public TicketSeedFileParser(byte[] salt);
public List<SessionTi... | List<SessionTicketKey> keys = new TicketSeedFileParser().parse(
new File(TicketSeedFileParserTest.class.getResource("/seeds_with_only_current.json").getFile()));
Assert.assertEquals(2, keys.size());
}
} | [FOCAL] public List<SessionTicketKey> TicketSeedFileParser.parse(File file)
[CLASS] class TicketSeedFileParser
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] List<SessionTicketKey> parseBytes(byte[] json)
[CALLS-EXTERNAL] Files.toByteArray/1
[EXCEPTIONS] declares IOException
[INPU... | /* static context
[FOCAL] public List<SessionTicketKey> TicketSeedFileParser.parse(File file)
[INPUTS] branches=- | result=file
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] List<SessionTicketKey> parseBytes(byte[] json)
[CALLS-EXTERNAL] Files.toByteArray/1
*/
| /* static context
[FOCAL] public List<SessionTicketKey> TicketSeedFileParser.parse(File file)
[INPUTS] branches=- | result=file
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] List<SessionTicketKey> parseBytes(byte[] json)
[CALLS-EXTERNAL] Files.toByteArray/1
*/
class TicketSeedFileParser {
public List<SessionT... | true | ok | {"focal": {"class": "TicketSeedFileParser", "name": "parse", "signature": "List<SessionTicketKey> parse(File file) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "file", "type": "File"}], "return_type": "List<SessionTicketKey>"}, "class_info": {"name": "TicketSeedFileParser", "kind": "... |
4315362_26 | class Try implements Iterable<T>, Serializable {
@SuppressWarnings("unchecked")
public <U> Try<U> flatMap(CheckedFunction<? super T, ? extends Try<? extends U>> mapper) {
Objects.requireNonNull(mapper, "mapper is null");
if (isSuccess()) {
try {
return (Try<U>) mappe... | assertSame(FAILURE, SUCCESS.flatMap(ignored -> FAILURE));
}
} | [FOCAL] @SuppressWarnings("unchecked") public Try<U> Try.flatMap(CheckedFunction<? super T, ? extends Try<? extends U>> mapper)
[CLASS] class Try implements Iterable<T>, Serializable
[METRICS] loc=13 cc=3 branches=1 loops=0 returns=3 throws=0 nesting=2
[CALLS-INTERNAL] T get(); Try<T> failure(Throwable exception); bool... | /* static context
[FOCAL] @SuppressWarnings("unchecked") public Try<U> Try.flatMap(CheckedFunction<? super T, ? extends Try<? extends U>> mapper)
[PATH1] if(isSuccess())=T -> try-body throws -> return failure(t)
[PATH2] if(isSuccess())=F -> return (Try<U>) this
[PATH3] if(isSuccess())=T -> return (Try<U>) mapper.apply(... | /* static context
[FOCAL] @SuppressWarnings("unchecked") public Try<U> Try.flatMap(CheckedFunction<? super T, ? extends Try<? extends U>> mapper)
[PATH1] if(isSuccess())=T -> try-body throws -> return failure(t)
[PATH2] if(isSuccess())=F -> return (Try<U>) this
[PATH3] if(isSuccess())=T -> return (Try<U>) mapper.apply(... | true | ok | {"focal": {"class": "Try", "name": "flatMap", "signature": "Try<U> flatMap(CheckedFunction<? super T, ? extends Try<? extends U>> mapper)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") public", "params": [{"name": "mapper", "type": "CheckedFunction<? super T, ? extends Try<? extends U>>"}], "return_t... |
4335519_191 | class ExpressionStack {
public ExpressionStack execute(ExpressionTree expression, ProgramStateConstraints constraints) {
Deque<SymbolicValue> newStack = copy();
Kind kind = ((JavaScriptTree) expression).getKind();
switch (kind) {
case LOGICAL_COMPLEMENT:
SymbolicValue negatedValue = newStac... | execute("a == null");
assertSingleValueInStack(RelationalSymbolicValue.create(Kind.EQUAL_TO, simple1, SpecialSymbolicValue.NULL));
}
} | [FOCAL] public ExpressionStack ExpressionStack.execute(ExpressionTree expression, ProgramStateConstraints constraints)
[CLASS] class ExpressionStack
[METRICS] loc=150 cc=85 branches=2 loops=0 returns=1 throws=1 nesting=2
[CALLS-INTERNAL] Deque<SymbolicValue> copy(); void executeCallExpression(CallExpressionTree express... | class ExpressionStack {
public ExpressionStack execute(ExpressionTree expression, ProgramStateConstraints constraints) {
Deque<SymbolicValue> newStack = copy();
Kind kind = ((JavaScriptTree) expression).getKind();
switch (kind) {
case LOGICAL_COMPLEMENT:
SymbolicValue negatedValue = newStac... | false | ok | {"focal": {"class": "ExpressionStack", "name": "execute", "signature": "ExpressionStack execute(ExpressionTree expression, ProgramStateConstraints constraints)", "start_line": 3, "modifiers": "public", "params": [{"name": "expression", "type": "ExpressionTree"}, {"name": "constraints", "type": "ProgramStateConstraints"... | |
4336113_33 | class NATBehavior implements Attribute {
@Override
public AttributeType getType() {
return NATSTUNAttributeType.NAT_BEHAVIOR;
}
public NATBehavior();
public NATBehavior(final NATFeatureRealization mapping, final NATFeatureRealization filtering);
public NATFeatureRealization getFeatu... | assertEquals("Type must be correct.", this.behavior.getType(), NATSTUNAttributeType.NAT_BEHAVIOR);
}
} | [FOCAL] @Override public AttributeType NATBehavior.getType()
[CLASS] class NATBehavior implements Attribute
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] NATBehavior(); NATBehavior(NATFeatureRealization mapping, NATFeatureRealization filtering); NATFeatureRealization getFeatureRea... | /* static context
[FOCAL] @Override public AttributeType NATBehavior.getType()
*/
| /* static context
[FOCAL] @Override public AttributeType NATBehavior.getType()
*/
class NATBehavior implements Attribute {
@Override
public AttributeType getType() {
return NATSTUNAttributeType.NAT_BEHAVIOR;
}
public NATBehavior();
public NATBehavior(final NATFeatureRealization mapping, ... | true | ok | {"focal": {"class": "NATBehavior", "name": "getType", "signature": "AttributeType getType()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "AttributeType"}, "class_info": {"name": "NATBehavior", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Attribute", "fields": ... |
4340532_4 | class AcceptHeader {
public List<Accept> getAccepts() {
return accepts;
}
public AcceptHeader(final String headerValue);
}
class AcceptHeaderTest {
@Test
public void multipleMediaRanges_withWhiteSpace() {
| final String appXml = APPLICATION_XML.getMediaType();
final String appXhtml = APPLICATION_XHTML_XML.getMediaType();
final String appPdf = APPLICATION_PDF.getMediaType();
final AcceptHeader acceptHeader = new AcceptHeader(appXml + ", " + appXhtml + ", " + appPdf);
assertE... | [FOCAL] public List<Accept> AcceptHeader.getAccepts()
[CLASS] class AcceptHeader
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] AcceptHeader(String headerValue)
[TEST] AcceptHeaderTest: @Test public void multipleMediaRanges_withWhiteSpace() | /* static context
[FOCAL] public List<Accept> AcceptHeader.getAccepts()
*/
| /* static context
[FOCAL] public List<Accept> AcceptHeader.getAccepts()
*/
class AcceptHeader {
public List<Accept> getAccepts() {
return accepts;
}
public AcceptHeader(final String headerValue);
}
class AcceptHeaderTest {
@Test
public void multipleMediaRanges_withWhiteSpace() {
| true | ok | {"focal": {"class": "AcceptHeader", "name": "getAccepts", "signature": "List<Accept> getAccepts()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "List<Accept>"}, "class_info": {"name": "AcceptHeader", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "member... |
4349381_5 | class Segment {
public static List<Segment> parseSegments(InputStream in) {
BufferedReader reader = null;
try {
reader = new BufferedReader(new InputStreamReader(in, "UTF-8"));
Gson gson = new Gson();
return gson.fromJson(reader, new TypeToken<List<Segment>>() {}... | //given
InputStream is = this.getClass().getResourceAsStream(
"/segments.json");
//when
List<Segment> segs = Segment.parseSegments(is);
//then
assertNotNull(segs);
assertEquals(3, segs.size());
assertEquals(5, segs.get(2).coords.size());
... | [FOCAL] public static List<Segment> Segment.parseSegments(InputStream in)
[CLASS] class Segment
[METRICS] loc=10 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] Gson.fromJson/2, new TypeToken<List<Segment>>() {}.getType/0
[NEW] BufferedReader, InputStreamReader, Gson, TypeToken<List<Segment>>, Arr... | /* static context
[FOCAL] public static List<Segment> Segment.parseSegments(InputStream in)
[PATH1] try-body throws -> return new ArrayList<Segment>()
[PATH2] return gson.fromJson(reader, new TypeToken<List<Segment>>() {}.getType())
[INPUTS] branches=- | result=in
[EXCEPTIONS] catches UnsupportedEncodingException e
[NE... | /* static context
[FOCAL] public static List<Segment> Segment.parseSegments(InputStream in)
[PATH1] try-body throws -> return new ArrayList<Segment>()
[PATH2] return gson.fromJson(reader, new TypeToken<List<Segment>>() {}.getType())
[INPUTS] branches=- | result=in
[EXCEPTIONS] catches UnsupportedEncodingException e
[NE... | true | ok | {"focal": {"class": "Segment", "name": "parseSegments", "signature": "List<Segment> parseSegments(InputStream in)", "start_line": 3, "modifiers": "public static", "params": [{"name": "in", "type": "InputStream"}], "return_type": "List<Segment>"}, "class_info": {"name": "Segment", "kind": "class", "modifiers": "", "supe... |
4353723_0 | class Select2MultiChoice extends AbstractSelect2Choice<T, Collection<T>> {
static List<String> splitInput(String input) {
if (input.startsWith("{") && input.endsWith("}")) {
// Assume we're using JSON IDs
List<String> result = new ArrayList<String>();
int openBracket =... | List<String> strings = Select2MultiChoice.splitInput("A");
assertEquals(1, strings.size());
assertEquals("A", strings.get(0));
}
} | [FOCAL] static List<String> Select2MultiChoice.splitInput(String input)
[CLASS] class Select2MultiChoice extends AbstractSelect2Choice<T, Collection<T>>
[METRICS] loc=31 cc=7 branches=5 loops=1 returns=2 throws=0 nesting=4
[CALLS-EXTERNAL] String.startsWith/1, String.endsWith/1, String.length/0, String.charAt/1, String... | /* static context
[FOCAL] static List<String> Select2MultiChoice.splitInput(String input)
[PATH1] if(input.startsWith("{") && input.endsWith("}"))=T -> for(i < input.length())=T -> if(c == '{')=T -> if(lastStartIdx == null)=T -> if(c == '}')=T -> if(openBracket == 0)=T -> exit loop -> return result
[PATH2] if(input.sta... | /* static context
[FOCAL] static List<String> Select2MultiChoice.splitInput(String input)
[PATH1] if(input.startsWith("{") && input.endsWith("}"))=T -> for(i < input.length())=T -> if(c == '{')=T -> if(lastStartIdx == null)=T -> if(c == '}')=T -> if(openBracket == 0)=T -> exit loop -> return result
[PATH2] if(input.sta... | true | ok | {"focal": {"class": "Select2MultiChoice", "name": "splitInput", "signature": "List<String> splitInput(String input)", "start_line": 3, "modifiers": "static", "params": [{"name": "input", "type": "String"}], "return_type": "List<String>"}, "class_info": {"name": "Select2MultiChoice", "kind": "class", "modifiers": "", "s... |
4368712_128 | class CombinedFeedController {
@POST
@Template(name = "/index.ftl")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public Viewable create(@Valid @BeanParam FeedRequestBean request) {
String[] urlArray = createUrls(request.getUrls()).stream().toArray(String[]::new);
CombinedFeed feed =... | Form form = new Form();
form.param("title", params[0]);
form.param("description", params[1]);
form.param("urls", new StringJoiner(",").add(params[2]).add(params[3]).toString());
form.param("refreshPeriod", params[4]);
Response response = target().request().post(Entity.en... | [FOCAL] @POST @Template(name = "/index.ftl") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Viewable CombinedFeedController.create(FeedRequestBean request)
[CLASS] class CombinedFeedController
[METRICS] loc=13 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] List<String> createUrls(String ... | /* static context
[FOCAL] @POST @Template(name = "/index.ftl") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Viewable CombinedFeedController.create(FeedRequestBean request)
[COLLABORATORS] param request:FeedRequestBean getUrls/0,getTitle/0,getDescription/0,getRefreshPeriod/0; field feedService save/1
[CALLS-I... | /* static context
[FOCAL] @POST @Template(name = "/index.ftl") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Viewable CombinedFeedController.create(FeedRequestBean request)
[COLLABORATORS] param request:FeedRequestBean getUrls/0,getTitle/0,getDescription/0,getRefreshPeriod/0; field feedService save/1
[CALLS-I... | true | ok | {"focal": {"class": "CombinedFeedController", "name": "create", "signature": "Viewable create(FeedRequestBean request)", "start_line": 3, "modifiers": "@POST @Template(name = \"/index.ftl\") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public", "params": [{"name": "request", "type": "FeedRequestBean"}], "return_typ... |
4368907_40 | class XBELValidatorServiceImpl implements XBELValidatorService {
@Override
public void validate(String s) throws ValidationError {
try {
xv.validate(s);
} catch (SAXParseException e) {
final String name = e.getSystemId();
final String msg = e.getMessage();
... | final String testxml =
ROOT + "examples/invalid/beldocument_invalid.xbel";
final File testFile = new File(testxml);
if (!testFile.canRead())
fail("can't read " + testxml);
xvs.validate(testFile);
}
} | [FOCAL] @Override public void XBELValidatorServiceImpl.validate(String s)
[CLASS] class XBELValidatorServiceImpl implements XBELValidatorService
[METRICS] loc=18 cc=4 branches=0 loops=0 returns=0 throws=3 nesting=1
[CALLS-EXTERNAL] xv.validate/1, IOException.getSystemId/0, IOException.getMessage/0, IOException.getLineN... | /* static context
[FOCAL] @Override public void XBELValidatorServiceImpl.validate(String s)
[THROWS-WHEN] ValidationError when try-body throws
[THROWS-WHEN] RuntimeException when try-body throws
[PATH1] try-body throws -> throw new ValidationError(name, msg, e, line, column)
[PATH2] try-body throws -> throw new Runtime... | /* static context
[FOCAL] @Override public void XBELValidatorServiceImpl.validate(String s)
[THROWS-WHEN] ValidationError when try-body throws
[THROWS-WHEN] RuntimeException when try-body throws
[PATH1] try-body throws -> throw new ValidationError(name, msg, e, line, column)
[PATH2] try-body throws -> throw new Runtime... | true | ok | {"focal": {"class": "XBELValidatorServiceImpl", "name": "validate", "signature": "void validate(String s) throws ValidationError", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "s", "type": "String"}], "return_type": "void"}, "class_info": {"name": "XBELValidatorServiceImpl", "kind": "class", "m... |
4376619_1 | class DecompressTasklet implements Tasklet {
public RepeatStatus execute(StepContribution contribution,
ChunkContext chunkContext) throws Exception {
ZipInputStream zis = new ZipInputStream(new BufferedInputStream(inputResource.getInputStream()));
File targetDirectoryAsFile = new File(targetDirectory);
i... | DecompressTasklet tasklet = new DecompressTasklet();
tasklet.setInputResource(new ClassPathResource("/input/products.zip"));
File outputDir = new File("./target/decompresstasklet");
if(outputDir.exists()) {
FileUtils.deleteDirectory(outputDir);
}
tasklet.setTargetDirectory(outputDir.getAbsolutePath());
... | [FOCAL] public RepeatStatus DecompressTasklet.execute(StepContribution contribution, ChunkContext chunkContext)
[CLASS] class DecompressTasklet implements Tasklet
[METRICS] loc=31 cc=5 branches=3 loops=1 returns=1 throws=1 nesting=2
[CALLS-EXTERNAL] inputResource.getInputStream/0, File.exists/0, FileUtils.forceMkdir/1,... | /* static context
[FOCAL] public RepeatStatus DecompressTasklet.execute(StepContribution contribution, ChunkContext chunkContext)
[THROWS-WHEN] IllegalStateException when !targetDirectoryAsFile.exists() && zis.getNextEntry() != null && !target.exists() && !target.exists()
[THROWS-WHEN] IllegalStateException when !targe... | /* static context
[FOCAL] public RepeatStatus DecompressTasklet.execute(StepContribution contribution, ChunkContext chunkContext)
[THROWS-WHEN] IllegalStateException when !targetDirectoryAsFile.exists() && zis.getNextEntry() != null && !target.exists() && !target.exists()
[THROWS-WHEN] IllegalStateException when !targe... | true | ok | {"focal": {"class": "DecompressTasklet", "name": "execute", "signature": "RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "contribution", "type": "StepContribution"}, {"name": "chunkContext", "type": "ChunkCont... |
4387088_1 | class BackupManager {
public static List<File> getBackupList(String bookUID) {
File[] backupFiles = new File(getBackupFolderPath(bookUID)).listFiles();
Arrays.sort(backupFiles);
List<File> backupFilesList = Arrays.asList(backupFiles);
Collections.reverse(backupFilesList);
re... | String bookUID = createNewBookWithDefaultAccounts();
BookUtils.activateBook(bookUID);
BackupManager.backupActiveBook();
Thread.sleep(1000); // FIXME: Use Mockito to get a different date in Exporter.buildExportFilename
BackupManager.backupActiveBook();
assertThat(BackupM... | [FOCAL] public static List<File> BackupManager.getBackupList(String bookUID)
[CLASS] class BackupManager
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String getBackupFolderPath(String bookUID)
[CALLS-EXTERNAL] new File(getBackupFolderPath(bookUID)).listFiles/0, Arrays.sort/1, Ar... | /* static context
[FOCAL] public static List<File> BackupManager.getBackupList(String bookUID)
[INPUTS] branches=- | result=bookUID
[CALLS-INTERNAL] String getBackupFolderPath(String bookUID)
[NEW] File
[CALLS-EXTERNAL] new File(getBackupFolderPath(bookUID)).listFiles/0, Arrays.sort/1, Arrays.asList/1, Collections.reve... | /* static context
[FOCAL] public static List<File> BackupManager.getBackupList(String bookUID)
[INPUTS] branches=- | result=bookUID
[CALLS-INTERNAL] String getBackupFolderPath(String bookUID)
[NEW] File
[CALLS-EXTERNAL] new File(getBackupFolderPath(bookUID)).listFiles/0, Arrays.sort/1, Arrays.asList/1, Collections.reve... | true | ok | {"focal": {"class": "BackupManager", "name": "getBackupList", "signature": "List<File> getBackupList(String bookUID)", "start_line": 3, "modifiers": "public static", "params": [{"name": "bookUID", "type": "String"}], "return_type": "List<File>"}, "class_info": {"name": "BackupManager", "kind": "class", "modifiers": "",... |
4389698_31 | class JavaCCReader extends Reader {
@Override
public int read(char[] cbuf, int off, int len) throws IOException {
try {
return reader.read(cbuf, off, len);
} catch (IOException e) {
return handleIOException(e);
}
}
public JavaCCReader(Reader reader);
... | final StringReader stringReader = new StringReader("hello");
final JavaCCReader javaccReader = new JavaCCReader(stringReader);
final BufferedReader reader = new BufferedReader(javaccReader);
assertEquals("hello", reader.readLine());
}
} | [FOCAL] @Override public int JavaCCReader.read(char[] cbuf, int off, int len)
[CLASS] class JavaCCReader extends Reader
[METRICS] loc=8 cc=2 branches=0 loops=0 returns=2 throws=0 nesting=1
[CALLS-INTERNAL] int handleIOException(IOException e)
[CALLS-EXTERNAL] reader.read/3
[EXCEPTIONS] declares IOException; catches IOE... | /* static context
[FOCAL] @Override public int JavaCCReader.read(char[] cbuf, int off, int len)
[PATH1] try-body throws -> return handleIOException(e)
[PATH2] return reader.read(cbuf, off, len)
[INPUTS] branches=- | result=cbuf, len, off
[COLLABORATORS] field reader read/3
[EXCEPTIONS] declares IOException; catches IOE... | /* static context
[FOCAL] @Override public int JavaCCReader.read(char[] cbuf, int off, int len)
[PATH1] try-body throws -> return handleIOException(e)
[PATH2] return reader.read(cbuf, off, len)
[INPUTS] branches=- | result=cbuf, len, off
[COLLABORATORS] field reader read/3
[EXCEPTIONS] declares IOException; catches IOE... | true | ok | {"focal": {"class": "JavaCCReader", "name": "read", "signature": "int read(char[] cbuf, int off, int len) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "cbuf", "type": "char[]"}, {"name": "off", "type": "int"}, {"name": "len", "type": "int"}], "return_type": "int"}, "class_i... |
4390160_3 | class OoaBFilter {
public int getSize() {
return array.length;
}
public OoaBFilter(int size, int bufSize);
public boolean containsAndAdd(Element element);
}
class OoaBFilterTest {
@Test
public void testSizeRounding() {
| OoaBFilter filter = new OoaBFilter(3, 0);
assertEquals("3 should round to 4", 4, filter.getSize());
filter = new OoaBFilter(4, 0);
assertEquals("4 should round to 4", 4, filter.getSize());
filter = new OoaBFilter(129, 0);
assertEquals("129 should round to 256", 256, filter.getSize());
}
} | [FOCAL] public int OoaBFilter.getSize()
[CLASS] class OoaBFilter
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] OoaBFilter(int size, int bufSize); boolean containsAndAdd(Element element)
[TEST] OoaBFilterTest: @Test public void testSizeRounding() | /* static context
[FOCAL] public int OoaBFilter.getSize()
*/
| /* static context
[FOCAL] public int OoaBFilter.getSize()
*/
class OoaBFilter {
public int getSize() {
return array.length;
}
public OoaBFilter(int size, int bufSize);
public boolean containsAndAdd(Element element);
}
class OoaBFilterTest {
@Test
public void testSizeRounding() {
| true | ok | {"focal": {"class": "OoaBFilter", "name": "getSize", "signature": "int getSize()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "int"}, "class_info": {"name": "OoaBFilter", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "OoaBFilter", ... |
4398263_37 | class BasicRequestFactory implements RequestFactory {
public <RequestType extends ConversationsRequest> Request create(RequestType request) {
if (request instanceof ReviewsRequest) {
return createFromReviewRequest((ReviewsRequest) request);
} else if (request instanceof QuestionAndAnswe... | final ReviewSubmissionRequest request = new ReviewSubmissionRequest.Builder(Action.Submit, "prod1")
.authenticationProvider(new BVHostedAuthenticationProvider("red@email.com", "https://red.com/auth"))
.hostedAuthenticationEmail("blue@email.com")
.hostedAuthenticationCallback("https://blue.co... | [FOCAL] public Request BasicRequestFactory.create(RequestType request)
[CLASS] class BasicRequestFactory implements RequestFactory
[METRICS] loc=44 cc=21 branches=20 loops=0 returns=20 throws=1 nesting=20
[CALLS-INTERNAL] Request createFromAnswerSubmissionRequest(AnswerSubmissionRequest request); Request createFromAuth... | /* static context
[FOCAL] public Request BasicRequestFactory.create(RequestType request)
[EXCEPTIONS] throws IllegalStateException
[NEW] IllegalStateException
[CALLS-EXTERNAL] request.getClass().getCanonicalName/0, RequestType.getClass/0
*/
| /* static context
[FOCAL] public Request BasicRequestFactory.create(RequestType request)
[EXCEPTIONS] throws IllegalStateException
[NEW] IllegalStateException
[CALLS-EXTERNAL] request.getClass().getCanonicalName/0, RequestType.getClass/0
*/
class BasicRequestFactory implements RequestFactory {
public <RequestType ... | true | ok | {"focal": {"class": "BasicRequestFactory", "name": "create", "signature": "Request create(RequestType request)", "start_line": 3, "modifiers": "public", "params": [{"name": "request", "type": "RequestType"}], "return_type": "Request"}, "class_info": {"name": "BasicRequestFactory", "kind": "class", "modifiers": "", "sup... |
4408504_1 | class StdInChIGenerator extends StdInChITool {
public InChI generateInchi(IAtomContainer atc)
throws IOException, CDKException {
String workingDir=System.getProperty("user.dir")+
System.getProperty("file.separator");
return generateInchi(atc,workingDir);
}
public InC... | IAtomContainer ac = new AtomContainer();
IAtom a1 = new Atom("C");
IAtom a2 = new Atom("C");
a1.setImplicitHydrogenCount(3);
a2.setImplicitHydrogenCount(3);
ac.addAtom(a1);
ac.addAtom(a2);
ac.addBond(new Bond(a1, a2, IBond.Order.SINGLE));
InChI inc... | [FOCAL] public InChI StdInChIGenerator.generateInchi(IAtomContainer atc)
[CLASS] class StdInChIGenerator extends StdInChITool
[METRICS] loc=7 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] InChI generateInchi(IAtomContainer atc, String workingDir)
[CALLS-EXTERNAL] System.getProperty/1
[EXCEPTIONS... | /* static context
[FOCAL] public InChI StdInChIGenerator.generateInchi(IAtomContainer atc)
[INPUTS] branches=- | result=atc
[EXCEPTIONS] declares IOException, CDKException
[CALLS-INTERNAL] InChI generateInchi(IAtomContainer atc, String workingDir)
[CALLS-EXTERNAL] System.getProperty/1
*/
| /* static context
[FOCAL] public InChI StdInChIGenerator.generateInchi(IAtomContainer atc)
[INPUTS] branches=- | result=atc
[EXCEPTIONS] declares IOException, CDKException
[CALLS-INTERNAL] InChI generateInchi(IAtomContainer atc, String workingDir)
[CALLS-EXTERNAL] System.getProperty/1
*/
class StdInChIGenerator extends... | true | ok | {"focal": {"class": "StdInChIGenerator", "name": "generateInchi", "signature": "InChI generateInchi(IAtomContainer atc) throws IOException, CDKException", "start_line": 3, "modifiers": "public", "params": [{"name": "atc", "type": "IAtomContainer"}], "return_type": "InChI"}, "class_info": {"name": "StdInChIGenerator", "... |
4416959_338 | class MutableComponentModelImpl implements MutableComponentModel {
public boolean isRootClass()
{
return parentModel == null;
}
public MutableComponentModelImpl(String componentClassName, Logger logger, Resource baseResource,
ComponentModel parentModel, bo... | Resource r = mockResource();
Logger logger = mockLogger();
replay();
MutableComponentModel model = new MutableComponentModelImpl(CLASS_NAME, logger, r, null, false, null);
assertTrue(model.isRootClass());
MutableComponentModel subModel = new MutableComponentModelImpl(... | [FOCAL] public boolean MutableComponentModelImpl.isRootClass()
[CLASS] class MutableComponentModelImpl implements MutableComponentModel
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] MutableComponentModelImpl(String componentClassName, Logger logger, Resource baseResource, Componen... | /* static context
[FOCAL] public boolean MutableComponentModelImpl.isRootClass()
*/
| /* static context
[FOCAL] public boolean MutableComponentModelImpl.isRootClass()
*/
class MutableComponentModelImpl implements MutableComponentModel {
public boolean isRootClass()
{
return parentModel == null;
}
public MutableComponentModelImpl(String componentClassName, Logger logger, Resour... | true | ok | {"focal": {"class": "MutableComponentModelImpl", "name": "isRootClass", "signature": "boolean isRootClass()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "MutableComponentModelImpl", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "MutableC... |
4421246_0 | class BasicIndexRuleEvaluator extends QueryEvaluator<Node> {
@Override
public QueryResult getResult() throws Exception {
return this.getResult(false);
}
public BasicIndexRuleEvaluator(final CommonCoreQueryEvaluator<Node> evaluator);
public BasicIndexRuleEvaluator();
public BasicIndexRuleEvaluator(final boo... | {
QueryResult selectResult = evaluator.getResult(
"SELECT ?s ?p ?o " +
"WHERE {?s ?p ?o.}");
assertEquals(700, selectResult.size());
}
insertTriple();
{
QueryResult selectResult = evaluator.getResult(
"SELECT ?s ?p ?o " +
"WHERE {?s ?p ?o.}");
assertEquals(701, selectResult.s... | [FOCAL] @Override public QueryResult BasicIndexRuleEvaluator.getResult()
[CLASS] class BasicIndexRuleEvaluator extends QueryEvaluator<Node>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] QueryResult getResult(boolean oneTime)
[EXCEPTIONS] declares Exception
[CLASS-MEMBERS] BasicIn... | /* static context
[FOCAL] @Override public QueryResult BasicIndexRuleEvaluator.getResult()
[EXCEPTIONS] declares Exception
[CALLS-INTERNAL] QueryResult getResult(boolean oneTime)
*/
| /* static context
[FOCAL] @Override public QueryResult BasicIndexRuleEvaluator.getResult()
[EXCEPTIONS] declares Exception
[CALLS-INTERNAL] QueryResult getResult(boolean oneTime)
*/
class BasicIndexRuleEvaluator extends QueryEvaluator<Node> {
@Override
public QueryResult getResult() throws Exception {
return this.... | true | ok | {"focal": {"class": "BasicIndexRuleEvaluator", "name": "getResult", "signature": "QueryResult getResult() throws Exception", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "QueryResult"}, "class_info": {"name": "BasicIndexRuleEvaluator", "kind": "class", "modifiers": "", "superclass": "Q... |
4437408_1 | class GeoCoordinate implements Comparable<GeoCoordinate> {
@Override
public String toString() {
return "latitude: " + this.latitude + ", longitude: " + this.longitude;
}
public GeoCoordinate(double latitude, double longitude);
public GeoCoordinate(int latitudeE6, int longitudeE6);
public GeoCoordinate(Stri... | GeoCoordinate invalidCoordinate = new GeoCoordinate(91d, 0d);
fail("invalid coordinate must throw exception: " + invalidCoordinate.toString());
}
} | [FOCAL] @Override public String GeoCoordinate.toString()
[CLASS] class GeoCoordinate implements Comparable<GeoCoordinate>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[FIELDS] read=latitude, longitude
[CLASS-MEMBERS] GeoCoordinate(double latitude, double longitude); GeoCoordinate(int latitudeE6,... | /* static context
[FOCAL] @Override public String GeoCoordinate.toString()
[FIELDS] read=latitude, longitude
*/
| /* static context
[FOCAL] @Override public String GeoCoordinate.toString()
[FIELDS] read=latitude, longitude
*/
class GeoCoordinate implements Comparable<GeoCoordinate> {
@Override
public String toString() {
return "latitude: " + this.latitude + ", longitude: " + this.longitude;
}
public GeoCoordinate(double l... | true | ok | {"focal": {"class": "GeoCoordinate", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "GeoCoordinate", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "Comparable<GeoCoordinate>", "f... |
4449830_4 | class VlcjDevice implements WebcamDevice, BufferFormatCallback, RenderCallback, FPSSource {
@Override
public String toString() {
return String.format("%s[%s (%s)]", getClass().getSimpleName(), getName(), getMRL());
}
protected VlcjDevice(MediaListItem item);
public String getCaptureDevice();
public MediaLis... | VlcjDriver driver = getDriverMock();
Assert.assertNotNull(driver.toString());
}
} | [FOCAL] @Override public String VlcjDevice.toString()
[CLASS] class VlcjDevice implements WebcamDevice, BufferFormatCallback, RenderCallback, FPSSource
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String getMRL(); String getName()
[CALLS-EXTERNAL] String.format/4, getClass().get... | /* static context
[FOCAL] @Override public String VlcjDevice.toString()
[CALLS-INTERNAL] String getMRL(); String getName()
[CALLS-EXTERNAL] String.format/4, getClass().getSimpleName/0, getClass/0 (inherited)
*/
| /* static context
[FOCAL] @Override public String VlcjDevice.toString()
[CALLS-INTERNAL] String getMRL(); String getName()
[CALLS-EXTERNAL] String.format/4, getClass().getSimpleName/0, getClass/0 (inherited)
*/
class VlcjDevice implements WebcamDevice, BufferFormatCallback, RenderCallback, FPSSource {
@Override
publ... | true | ok | {"focal": {"class": "VlcjDevice", "name": "toString", "signature": "String toString()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "String"}, "class_info": {"name": "VlcjDevice", "kind": "class", "modifiers": "", "superclass": null, "interfaces": "WebcamDevice, BufferFormatCallback, ... |
4494450_40 | class NestedNode {
public IParserNode getLastChild()
{
final IParserNode lastChild = getChild( numChildren() - 1 );
return lastChild != null
&& lastChild.numChildren() > 0 ? lastChild.getLastChild()
: lastChild;
}
protected NestedNode( fi... | assertEquals( NodeKind.RETURN,
function.getLastChild().getId() );
assertNull( function.getChild( Integer.MAX_VALUE ) );
}
} | [FOCAL] public IParserNode NestedNode.getLastChild()
[CLASS] class NestedNode
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] IParserNode getChild(int index); int numChildren()
[CALLS-EXTERNAL] IParserNode.numChildren/0, IParserNode.getLastChild/0
[DATAFLOW] lastChild@L3->L5
[CLASS... | /* static context
[FOCAL] public IParserNode NestedNode.getLastChild()
[CALLS-INTERNAL] IParserNode getChild(int index); int numChildren()
[CALLS-EXTERNAL] IParserNode.numChildren/0, IParserNode.getLastChild/0
*/
| /* static context
[FOCAL] public IParserNode NestedNode.getLastChild()
[CALLS-INTERNAL] IParserNode getChild(int index); int numChildren()
[CALLS-EXTERNAL] IParserNode.numChildren/0, IParserNode.getLastChild/0
*/
class NestedNode {
public IParserNode getLastChild()
{
final IParserNode lastChild = getChild(... | true | ok | {"focal": {"class": "NestedNode", "name": "getLastChild", "signature": "IParserNode getLastChild()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "IParserNode"}, "class_info": {"name": "NestedNode", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [{"name": "fu... |
4514536_390 | class NamedClusterLoadSaveUtil {
public void saveNamedClusterRep( NamedCluster namedCluster, NamedClusterService namedClusterService, Repository rep,
IMetaStore metaStore, ObjectId id_job, ObjectId objectId, LogChannelInterface logChannelInterface )
throws KettleException {
if ( namedCluster != nul... | String hdfsHost = "hdfsHost";
String hdfsPort = "hdfsPort";
String jobTrackerHost = "jobTrackerHost";
String jobTrackerPort = "jobTrackerPort";
when( namedCluster.getHdfsHost() ).thenReturn( hdfsHost );
when( namedCluster.getHdfsPort() ).thenReturn( hdfsPort );
when( namedCluster.getJobTrac... | [FOCAL] public void NamedClusterLoadSaveUtil.saveNamedClusterRep(NamedCluster namedCluster, NamedClusterService namedClusterService, Repository rep, IMetaStore metaStore, ObjectId id_job, ObjectId objectId, LogChannelInterface logChannelInterface)
[CLASS] class NamedClusterLoadSaveUtil
[METRICS] loc=22 cc=5 branches=3 ... | /* static context
[FOCAL] public void NamedClusterLoadSaveUtil.saveNamedClusterRep(NamedCluster namedCluster, NamedClusterService namedClusterService, Repository rep, IMetaStore metaStore, ObjectId id_job, ObjectId objectId, LogChannelInterface logChannelInterface)
[PATH1] if(namedCluster != null)=T -> if(!Const.isEmpt... | /* static context
[FOCAL] public void NamedClusterLoadSaveUtil.saveNamedClusterRep(NamedCluster namedCluster, NamedClusterService namedClusterService, Repository rep, IMetaStore metaStore, ObjectId id_job, ObjectId objectId, LogChannelInterface logChannelInterface)
[PATH1] if(namedCluster != null)=T -> if(!Const.isEmpt... | true | ok | {"focal": {"class": "NamedClusterLoadSaveUtil", "name": "saveNamedClusterRep", "signature": "void saveNamedClusterRep(NamedCluster namedCluster, NamedClusterService namedClusterService, Repository rep, IMetaStore metaStore, ObjectId id_job, ObjectId objectId, LogChannelInterface logChannelInterface) throws KettleExcept... |
4522462_26 | class IntrospectionModeller {
public static AbstractResource createResource(Class<?> resourceClass) {
final Class<?> annotatedResourceClass = getAnnotatedResourceClass(resourceClass);
final Path rPathAnnotation = annotatedResourceClass.getAnnotation(Path.class);
final boolean isRootResource... | AbstractResource subResource = IntrospectionModeller.createResource(TestSubResourceOne.class);
assertEquals(null, subResource.getPath());
assertEquals(2, subResource.getResourceMethods().size());
assertEquals(0, subResource.getSubResourceLocators().size());
assertEquals(0, subRes... | [FOCAL] public static AbstractResource IntrospectionModeller.createResource(Class<?> resourceClass)
[CLASS] class IntrospectionModeller
[METRICS] loc=45 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] Class getAnnotatedResourceClass(Class rc); void workOutConstructorsList(AbstractResource resource... | /* static context
[FOCAL] public static AbstractResource IntrospectionModeller.createResource(Class<?> resourceClass)
[PATH1] if(isRootResourceClass)=T -> if(LOGGER.isLoggable(Level.FINEST))=T -> return resource
[PATH2] if(isRootResourceClass)=F -> if(LOGGER.isLoggable(Level.FINEST))=F -> return resource
[INPUTS] branc... | /* static context
[FOCAL] public static AbstractResource IntrospectionModeller.createResource(Class<?> resourceClass)
[PATH1] if(isRootResourceClass)=T -> if(LOGGER.isLoggable(Level.FINEST))=T -> return resource
[PATH2] if(isRootResourceClass)=F -> if(LOGGER.isLoggable(Level.FINEST))=F -> return resource
[INPUTS] branc... | true | ok | {"focal": {"class": "IntrospectionModeller", "name": "createResource", "signature": "AbstractResource createResource(Class<?> resourceClass)", "start_line": 3, "modifiers": "public static", "params": [{"name": "resourceClass", "type": "Class<?>"}], "return_type": "AbstractResource"}, "class_info": {"name": "Introspecti... |
4536629_11 | class LocalResourceOwnerAuthenticator implements ResourceOwnerAuthenticator {
@Override
public AuthenticatedPrincipal authenticate(String username, String password) {
ResourceOwner user = resourceOwnerRepository.findByUsername(username);
if (user == null) {
return null;
}
// Validate pas... | AuthenticatedPrincipal principal =
this.authenticator.authenticate(this.resourceOwner.getUsername(), "bad");
assertNull(principal);
}
} | [FOCAL] @Override public AuthenticatedPrincipal LocalResourceOwnerAuthenticator.authenticate(String username, String password)
[CLASS] class LocalResourceOwnerAuthenticator implements ResourceOwnerAuthenticator
[METRICS] loc=13 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] ResourceOwnerRepositor... | /* static context
[FOCAL] @Override public AuthenticatedPrincipal LocalResourceOwnerAuthenticator.authenticate(String username, String password)
[PATH1] if(user == null)=F -> if(!user.checkPassword(password))=T -> return null
[PATH2] if(user == null)=F -> if(!user.checkPassword(password))=F -> return new AuthenticatedP... | /* static context
[FOCAL] @Override public AuthenticatedPrincipal LocalResourceOwnerAuthenticator.authenticate(String username, String password)
[PATH1] if(user == null)=F -> if(!user.checkPassword(password))=T -> return null
[PATH2] if(user == null)=F -> if(!user.checkPassword(password))=F -> return new AuthenticatedP... | true | ok | {"focal": {"class": "LocalResourceOwnerAuthenticator", "name": "authenticate", "signature": "AuthenticatedPrincipal authenticate(String username, String password)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "username", "type": "String"}, {"name": "password", "type": "String"}], "return_type"... |
4541580_83 | class Humanize {
public static String wordWrap(final String value, final int len)
{
if (len < 0 || value.length() <= len)
return value;
BreakIterator bi = BreakIterator.getWordInstance(currentLocale());
bi.setText(value);
return value.substring(0, bi.following(len)... | int df = rand.nextInt(9);
String phrase = "Lorem ipsum dolorem si amet, lorem ipsum. Dolorem sic et nunc." + df;
assertEquals(wordWrap(phrase, 2), "Lorem");
assertEquals(wordWrap(phrase, 30), "Lorem ipsum dolorem si amet, lorem");
assertEquals(wordWrap(phrase, phrase.length()), ... | [FOCAL] public static String Humanize.wordWrap(String value, int len)
[CLASS] class Humanize
[METRICS] loc=10 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-INTERNAL] Locale currentLocale()
[CALLS-EXTERNAL] String.length/0, BreakIterator.getWordInstance/1, BreakIterator.setText/1, String.substring/2, Break... | class Humanize {
public static String wordWrap(final String value, final int len)
{
if (len < 0 || value.length() <= len)
return value;
BreakIterator bi = BreakIterator.getWordInstance(currentLocale());
bi.setText(value);
return value.substring(0, bi.following(len)... | false | ok | {"focal": {"class": "Humanize", "name": "wordWrap", "signature": "String wordWrap(String value, int len)", "start_line": 3, "modifiers": "public static", "params": [{"name": "value", "type": "String"}, {"name": "len", "type": "int"}], "return_type": "String"}, "class_info": {"name": "Humanize", "kind": "class", "modifi... | |
4544259_1 | class RepositoryServiceImpl implements RepositoryService {
@Override
public void updateBundleRepositoryDescriptor(String name) throws Exception {
if (repositories.get(name) == null) {
throw new IllegalArgumentException("Repository " + name + " doesn't exist");
}
if (reposito... | repositoryService.create("test");
repositoryService.addArtifact("mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch/7.3.2_1", "test");
repositoryService.updateBundleRepositoryDescriptor("test");
Assert.assertTrue(Files.exists(Paths.get("target/repositories/test... | [FOCAL] @Override public void RepositoryServiceImpl.updateBundleRepositoryDescriptor(String name)
[CLASS] class RepositoryServiceImpl implements RepositoryService
[METRICS] loc=19 cc=4 branches=3 loops=0 returns=0 throws=1 nesting=3
[CALLS-INTERNAL] void addResources(BundleRepository repository, List<Resource> resource... | /* static context
[FOCAL] @Override public void RepositoryServiceImpl.updateBundleRepositoryDescriptor(String name)
[THROWS-WHEN] IllegalArgumentException when repositories.get(name) == null
[PATH1] if(repositories.get(name) == null)=F -> if(repositories.get(name).getLocation() != null && !repositories.get(name).getLoc... | /* static context
[FOCAL] @Override public void RepositoryServiceImpl.updateBundleRepositoryDescriptor(String name)
[THROWS-WHEN] IllegalArgumentException when repositories.get(name) == null
[PATH1] if(repositories.get(name) == null)=F -> if(repositories.get(name).getLocation() != null && !repositories.get(name).getLoc... | true | ok | {"focal": {"class": "RepositoryServiceImpl", "name": "updateBundleRepositoryDescriptor", "signature": "void updateBundleRepositoryDescriptor(String name) throws Exception", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "name", "type": "String"}], "return_type": "void"}, "class_info": {"name": "R... |
4544982_100 | class Scope {
@Nullable
public Symbol getSymbol(String name, Kind... kinds) {
List<Kind> kindList = Arrays.asList(kinds);
List<Symbol> result = new ArrayList<>();
for (Symbol s : symbols) {
if (s.called(name)) {
if (kindList.isEmpty() || kindList.contains(s.kind())) {
result.add... | Scope methodScope = getScopeFor(Kind.METHOD_DECLARATION);
assertThat(methodScope.getSymbol("$g")).isNotNull();
}
} | [FOCAL] @Nullable public Symbol Scope.getSymbol(String name, Kind... kinds)
[CLASS] class Scope
[METRICS] loc=24 cc=8 branches=6 loops=1 returns=4 throws=0 nesting=4
[CALLS-EXTERNAL] Arrays.asList/1, Symbol.called/1, List<Kind>.isEmpty/0, List<Kind>.contains/1, Symbol.kind/0, List<Symbol>.add/1, Symbol.is/1, List<Kind>... | /* static context
[FOCAL] @Nullable public Symbol Scope.getSymbol(String name, Kind... kinds)
[PATH1] foreach(Symbol s : symbols)=T -> if(s.called(name))=T -> if(kindList.isEmpty() || kindList.contains(s.kind()))=F -> if(s.is(Kind.PARAMETER) && kindList.equals(Collections.singletonList(Kind.VARIABLE)))=F -> exit loop -... | /* static context
[FOCAL] @Nullable public Symbol Scope.getSymbol(String name, Kind... kinds)
[PATH1] foreach(Symbol s : symbols)=T -> if(s.called(name))=T -> if(kindList.isEmpty() || kindList.contains(s.kind()))=F -> if(s.is(Kind.PARAMETER) && kindList.equals(Collections.singletonList(Kind.VARIABLE)))=F -> exit loop -... | true | ok | {"focal": {"class": "Scope", "name": "getSymbol", "signature": "Symbol getSymbol(String name, Kind... kinds)", "start_line": 3, "modifiers": "@Nullable public", "params": [{"name": "name", "type": "String"}, {"name": "kinds", "type": "Kind..."}], "return_type": "Symbol"}, "class_info": {"name": "Scope", "kind": "class"... |
4546290_35 | class IndexRecordFilterHook implements RecordUpdateHook {
@Override
public void beforeUpdate(Record record, Record originalRecord, Repository repository, FieldTypes fieldTypes,
RecordEvent recordEvent) throws RepositoryException, InterruptedException {
Collection<IndexInfo> indexInfos = ind... | IndexInfo inclusion = createMockIndexInfo("include", true);
when(indexesInfo.getIndexInfos()).thenReturn(Lists.newArrayList(inclusion));
RecordEvent recordEvent = new RecordEvent();
recordEvent.setType(Type.UPDATE);
recordEvent.setTableName(Table.RECORD.name);
indexFilt... | [FOCAL] @Override public void IndexRecordFilterHook.beforeUpdate(Record record, Record originalRecord, Repository repository, FieldTypes fieldTypes, RecordEvent recordEvent)
[CLASS] class IndexRecordFilterHook implements RecordUpdateHook
[METRICS] loc=43 cc=7 branches=5 loops=1 returns=0 throws=0 nesting=3
[CALLS-INTER... | /* static context
[FOCAL] @Override public void IndexRecordFilterHook.beforeUpdate(Record record, Record originalRecord, Repository repository, FieldTypes fieldTypes, RecordEvent recordEvent)
[PATH1] if(indexInfos.size() > 0)=T -> if(indexesInfo.getRecordFilterDependsOnRecordType())=T -> foreach(QName name : names)=T -... | /* static context
[FOCAL] @Override public void IndexRecordFilterHook.beforeUpdate(Record record, Record originalRecord, Repository repository, FieldTypes fieldTypes, RecordEvent recordEvent)
[PATH1] if(indexInfos.size() > 0)=T -> if(indexesInfo.getRecordFilterDependsOnRecordType())=T -> foreach(QName name : names)=T -... | true | ok | {"focal": {"class": "IndexRecordFilterHook", "name": "beforeUpdate", "signature": "void beforeUpdate(Record record, Record originalRecord, Repository repository, FieldTypes fieldTypes, RecordEvent recordEvent) throws RepositoryException, InterruptedException", "start_line": 3, "modifiers": "@Override public", "params":... |
4546424_51 | class AdminService extends DbService implements ServiceConstants {
@GET
@Path (REST_API_VIDEOS)
@Produces (MediaType.APPLICATION_JSON)
public Response findVideos() {
if (isDebugEnabled) {
S_LOGGER.debug("Entered into AdminService.findVideos()");
}
try {
List<VideoInfo> videoList = mongoO... | List<VideoInfo> videolist = mongoOperation.getCollection(VIDEOS_COLLECTION_NAME , VideoInfo.class);
assertNotNull(videolist);
}
} | [FOCAL] @GET @Path (REST_API_VIDEOS) @Produces (MediaType.APPLICATION_JSON) public Response AdminService.findVideos()
[CLASS] class AdminService extends DbService implements ServiceConstants
[METRICS] loc=19 cc=4 branches=2 loops=0 returns=2 throws=1 nesting=2
[CALLS-EXTERNAL] S_LOGGER.debug/1, mongoOperation.getCollec... | class AdminService extends DbService implements ServiceConstants {
@GET
@Path (REST_API_VIDEOS)
@Produces (MediaType.APPLICATION_JSON)
public Response findVideos() {
if (isDebugEnabled) {
S_LOGGER.debug("Entered into AdminService.findVideos()");
}
try {
List<VideoInfo> videoList = mongoO... | false | ok | {"focal": {"class": "AdminService", "name": "findVideos", "signature": "Response findVideos()", "start_line": 3, "modifiers": "@GET @Path (REST_API_VIDEOS) @Produces (MediaType.APPLICATION_JSON) public", "params": [], "return_type": "Response"}, "class_info": {"name": "AdminService", "kind": "class", "modifiers": "", "... | |
4570530_3 | class ContextAnalyzer {
public boolean areThereImportsWithoutExports() {
boolean allImportsHaveExports = false;
for (String importedBeanName : imports.keySet()) {
if (!exports.containsKey(importedBeanName)) {
allImportsHaveExports = true;
String ... | ContextAnalyzer analyzer = new ContextAnalyzer();
String beanName = "firstObject";
BeanReferenceInfo importRef1 = new BeanReferenceInfo();
importRef1.setBeanName(beanName);
analyzer.putInImports(importRef1);
assertTrue(analyzer.areThereImportsWi... | [FOCAL] public boolean ContextAnalyzer.areThereImportsWithoutExports()
[CLASS] class ContextAnalyzer
[METRICS] loc=13 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] imports.keySet/0, exports.containsKey/1, imports.get(importedBeanName).get(0).getLocation/0, imports.get(importedBeanName).get/1, im... | /* static context
[FOCAL] public boolean ContextAnalyzer.areThereImportsWithoutExports()
[PATH1] foreach(String importedBeanName : imports.keySet())=T -> if(!exports.containsKey(importedBeanName))=T -> exit loop -> return allImportsHaveExports
[PATH2] foreach(String importedBeanName : imports.keySet())=F -> return allI... | /* static context
[FOCAL] public boolean ContextAnalyzer.areThereImportsWithoutExports()
[PATH1] foreach(String importedBeanName : imports.keySet())=T -> if(!exports.containsKey(importedBeanName))=T -> exit loop -> return allImportsHaveExports
[PATH2] foreach(String importedBeanName : imports.keySet())=F -> return allI... | true | ok | {"focal": {"class": "ContextAnalyzer", "name": "areThereImportsWithoutExports", "signature": "boolean areThereImportsWithoutExports()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "boolean"}, "class_info": {"name": "ContextAnalyzer", "kind": "class", "modifiers": "", "superclass": null, "interf... |
4576305_28 | class RabbitMQCollector extends CollectorComponent {
@Override
public CheckResult check() {
try {
start();
CheckResult failure = connection.failure.get();
if (failure != null) return failure;
return CheckResult.OK;
} catch (Throwable e) {
Call.propagateIfFatal(e);
return... | CheckResult check = collector.check();
assertThat(check.ok()).isFalse();
assertThat(check.error()).isInstanceOf(UncheckedIOException.class);
}
} | [FOCAL] @Override public CheckResult RabbitMQCollector.check()
[CLASS] class RabbitMQCollector extends CollectorComponent
[METRICS] loc=12 cc=3 branches=1 loops=0 returns=3 throws=0 nesting=2
[CALLS-INTERNAL] RabbitMQCollector start()
[CALLS-EXTERNAL] connection.failure.get/0, Call.propagateIfFatal/1, CheckResult.faile... | /* static context
[FOCAL] @Override public CheckResult RabbitMQCollector.check()
[PATH1] try-body throws -> return CheckResult.failed(e)
[PATH2] if(failure != null)=T -> return failure
[PATH3] if(failure != null)=F -> return CheckResult.OK
[EXCEPTIONS] catches Throwable e
[CALLS-INTERNAL] RabbitMQCollector start()
[CAL... | /* static context
[FOCAL] @Override public CheckResult RabbitMQCollector.check()
[PATH1] try-body throws -> return CheckResult.failed(e)
[PATH2] if(failure != null)=T -> return failure
[PATH3] if(failure != null)=F -> return CheckResult.OK
[EXCEPTIONS] catches Throwable e
[CALLS-INTERNAL] RabbitMQCollector start()
[CAL... | true | ok | {"focal": {"class": "RabbitMQCollector", "name": "check", "signature": "CheckResult check()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "CheckResult"}, "class_info": {"name": "RabbitMQCollector", "kind": "class", "modifiers": "", "superclass": "CollectorComponent", "interfaces": nul... |
4581618_0 | class TypeUtil {
public static IType removeQualifiers(IType type) {
while (type instanceof IQualifierType) {
type = ((IQualifierType) type).getType();
}
return type;
}
public static IType getPointerToType(IType type);
public static boolean isIBasicType(IType type, I... | IASTFunctionDefinition mainFunctionDefinition =
(IASTFunctionDefinition) declarationsInFile.get(0);
IASTCompoundStatement body = (IASTCompoundStatement) mainFunctionDefinition.getBody();
IASTStatement[] statements = body.getStatements();
assertTrue(statements[2] instanceof I... | [FOCAL] public static IType TypeUtil.removeQualifiers(IType type)
[CLASS] class TypeUtil
[METRICS] loc=6 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] ((IQualifierType) type).getType/0
[PATH1] while(type instanceof IQualifierType)=T -> exit loop -> return type
[PATH2] while(type instanceof IQual... | /* static context
[FOCAL] public static IType TypeUtil.removeQualifiers(IType type)
[PATH1] while(type instanceof IQualifierType)=T -> exit loop -> return type
[PATH2] while(type instanceof IQualifierType)=F -> return type
[INPUTS] branches=type | result=type
[CALLS-EXTERNAL] ((IQualifierType) type).getType/0
*/
| /* static context
[FOCAL] public static IType TypeUtil.removeQualifiers(IType type)
[PATH1] while(type instanceof IQualifierType)=T -> exit loop -> return type
[PATH2] while(type instanceof IQualifierType)=F -> return type
[INPUTS] branches=type | result=type
[CALLS-EXTERNAL] ((IQualifierType) type).getType/0
*/
class ... | true | ok | {"focal": {"class": "TypeUtil", "name": "removeQualifiers", "signature": "IType removeQualifiers(IType type)", "start_line": 3, "modifiers": "public static", "params": [{"name": "type", "type": "IType"}], "return_type": "IType"}, "class_info": {"name": "TypeUtil", "kind": "class", "modifiers": "", "superclass": null, "... |
4586516_11 | class NotAuthorizedExceptionMapper extends CandlepinExceptionMapper implements ExceptionMapper<NotAuthorizedException> {
@Override
public Response toResponse(NotAuthorizedException exception) {
return getDefaultBuilder(exception, Response.Status.UNAUTHORIZED, determineBestMediaType()).build();
}
}... | NotAuthorizedException nae = new NotAuthorizedException(
"Not Authorized", "Negotiate", "Basic realm=candlepin");
NotAuthorizedExceptionMapper naem =
injector.getInstance(NotAuthorizedExceptionMapper.class);
Response r = naem.toResponse(nae);
assertEquals(401, r.g... | [FOCAL] @Override public Response NotAuthorizedExceptionMapper.toResponse(NotAuthorizedException exception)
[CLASS] class NotAuthorizedExceptionMapper extends CandlepinExceptionMapper implements ExceptionMapper<NotAuthorizedException>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL]... | /* static context
[FOCAL] @Override public Response NotAuthorizedExceptionMapper.toResponse(NotAuthorizedException exception)
[INPUTS] branches=- | result=exception
[CALLS-EXTERNAL] getDefaultBuilder(exception, Response.Status.UNAUTHORIZED....build/0, getDefaultBuilder/3 (inherited), determineBestMediaType/0 (inherited... | /* static context
[FOCAL] @Override public Response NotAuthorizedExceptionMapper.toResponse(NotAuthorizedException exception)
[INPUTS] branches=- | result=exception
[CALLS-EXTERNAL] getDefaultBuilder(exception, Response.Status.UNAUTHORIZED....build/0, getDefaultBuilder/3 (inherited), determineBestMediaType/0 (inherited... | true | ok | {"focal": {"class": "NotAuthorizedExceptionMapper", "name": "toResponse", "signature": "Response toResponse(NotAuthorizedException exception)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "exception", "type": "NotAuthorizedException"}], "return_type": "Response"}, "class_info": {"name": "NotAu... |
4597760_91 | class MondrianFileObject extends DecoratedFileObject {
@Override
public FileContent getContent() throws FileSystemException {
return new DecoratedFileContent( super.getContent() ) {
@Override public InputStream getInputStream() throws FileSystemException {
return annotator.getInputStream( super.g... | FileObject schemaFile = FileObjectTestHelper.mockFile( "schemaFile", true );
FileObject annotationsFile = FileObjectTestHelper.mockFile( "annotationsFile", true );
MondrianSchemaAnnotator mondrianSchemaAnnotator = new MondrianSchemaAnnotator() {
@Override
public InputStream getInputStream(
... | [FOCAL] @Override public FileContent MondrianFileObject.getContent()
[CLASS] class MondrianFileObject extends DecoratedFileObject
[METRICS] loc=8 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] DecoratedFileObject.getContent/0, annotator.getInputStream/2, DecoratedFileObject.getInputStream/0, anno... | /* static context
[FOCAL] @Override public FileContent MondrianFileObject.getContent()
[COLLABORATORS] field annotator getInputStream/2; field annotationsFile getContent/0
[EXCEPTIONS] declares FileSystemException
[NEW] DecoratedFileContent
[CALLS-EXTERNAL] DecoratedFileObject.getContent/0, annotator.getInputStream/2, ... | /* static context
[FOCAL] @Override public FileContent MondrianFileObject.getContent()
[COLLABORATORS] field annotator getInputStream/2; field annotationsFile getContent/0
[EXCEPTIONS] declares FileSystemException
[NEW] DecoratedFileContent
[CALLS-EXTERNAL] DecoratedFileObject.getContent/0, annotator.getInputStream/2, ... | true | ok | {"focal": {"class": "MondrianFileObject", "name": "getContent", "signature": "FileContent getContent() throws FileSystemException", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "FileContent"}, "class_info": {"name": "MondrianFileObject", "kind": "class", "modifiers": "", "superclass": ... |
4603135_103 | class EmbeddedEPNManager extends AbstractEPNManager {
public void publish(String subject, java.util.List<? extends java.io.Serializable> events) throws Exception {
publish(subject, new EventList(events));
}
protected EPNContainer getContainer();
protected java.util.Map<String,java.util.List<Em... | Network net=new Network();
net.setName(TEST_NETWORK);
net.setVersion(VER1);
Subscription sub=new Subscription();
sub.setSubject(TEST_SUBJECT);
sub.setNodeName(N1);
net.getSubscriptions().add(sub);
Node n1=new Node();
n1.setName(N1... | [FOCAL] public void EmbeddedEPNManager.publish(String subject, java.util.List<? extends java.io.Serializable> events)
[CLASS] class EmbeddedEPNManager extends AbstractEPNManager
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void publish(String subject, EventList events)
[NEW] Eve... | /* static context
[FOCAL] public void EmbeddedEPNManager.publish(String subject, java.util.List<? extends java.io.Serializable> events)
[EXCEPTIONS] declares Exception
[CALLS-INTERNAL] void publish(String subject, EventList events)
[NEW] EventList
*/
| /* static context
[FOCAL] public void EmbeddedEPNManager.publish(String subject, java.util.List<? extends java.io.Serializable> events)
[EXCEPTIONS] declares Exception
[CALLS-INTERNAL] void publish(String subject, EventList events)
[NEW] EventList
*/
class EmbeddedEPNManager extends AbstractEPNManager {
public voi... | true | ok | {"focal": {"class": "EmbeddedEPNManager", "name": "publish", "signature": "void publish(String subject, java.util.List<? extends java.io.Serializable> events) throws Exception", "start_line": 3, "modifiers": "public", "params": [{"name": "subject", "type": "String"}, {"name": "events", "type": "java.util.List<? extends... |
4605969_0 | class ProjectionSupport {
public static Point2D.Double convertToLatLon(double x, double y) {
return convertToLatLon(x, y, new Point2D.Double());
}
public static Point2D.Double convertToLatLon(double x, double y,
Point2D.Double result);
public static Point2D.Double convertFromLatLon(double lat, doubl... | Point2D.Double p = ProjectionSupport.convertToLatLon(547300.0, 179000.0);
assertEquals(0.12031431734872115, p.x, 1e-7);
assertEquals(51.49076555222841, p.y, 1e-7);
}
} | [FOCAL] public static Point2D.Double ProjectionSupport.convertToLatLon(double x, double y)
[CLASS] class ProjectionSupport
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] Point2D.Double convertToLatLon(double x, double y, Point2D.Double result)
[NEW] Point2D.Double
[INPUTS] branche... | /* static context
[FOCAL] public static Point2D.Double ProjectionSupport.convertToLatLon(double x, double y)
[INPUTS] branches=- | result=x, y
[CALLS-INTERNAL] Point2D.Double convertToLatLon(double x, double y, Point2D.Double result)
[NEW] Point2D.Double
*/
| /* static context
[FOCAL] public static Point2D.Double ProjectionSupport.convertToLatLon(double x, double y)
[INPUTS] branches=- | result=x, y
[CALLS-INTERNAL] Point2D.Double convertToLatLon(double x, double y, Point2D.Double result)
[NEW] Point2D.Double
*/
class ProjectionSupport {
public static Point2D.Double conv... | true | ok | {"focal": {"class": "ProjectionSupport", "name": "convertToLatLon", "signature": "Point2D.Double convertToLatLon(double x, double y)", "start_line": 3, "modifiers": "public static", "params": [{"name": "x", "type": "double"}, {"name": "y", "type": "double"}], "return_type": "Point2D.Double"}, "class_info": {"name": "Pr... |
4606342_196 | class VcVmUtil {
public static boolean runSPOnSingleVM(NodeEntity node, Callable<Void> call) {
if (node.getMoId() == null) {
logger.info("VC vm does not exist for node: " + node.getVmName());
return false;
}
VcVirtualMachine vcVm = VcCache.getIgnoreMissing(node.getMoId());
... | NodeEntity node = new NodeEntity();
node.setMoId("vm-001");
MockVcCache.setGetFlag(true);
MockTmScheduler.setResultIsNull(false);
MockTmScheduler.setFlag(VmOperation.START_VM, true);
Callable<Void> callable = getCallable();
boolean result = VcVmUtil.runSPOnSingleVM(node, callab... | [FOCAL] public static boolean VcVmUtil.runSPOnSingleVM(NodeEntity node, Callable<Void> call)
[CLASS] class VcVmUtil
[METRICS] loc=41 cc=6 branches=4 loops=0 returns=4 throws=2 nesting=3
[CALLS-EXTERNAL] NodeEntity.getMoId/0, logger.info/1, NodeEntity.getVmName/0, VcCache.getIgnoreMissing/1, Scheduler.executeStoredProce... | /* static context
[FOCAL] public static boolean VcVmUtil.runSPOnSingleVM(NodeEntity node, Callable<Void> call)
[THROWS-WHEN] BddException.INTERNAL(e, e.getMessage()) when !(node.getMoId() == null) && !(vcVm == null) && try-body throws
[THROWS-WHEN] BddException.INTERNAL(e, e.getMessage()) when !(node.getMoId() == null)... | /* static context
[FOCAL] public static boolean VcVmUtil.runSPOnSingleVM(NodeEntity node, Callable<Void> call)
[THROWS-WHEN] BddException.INTERNAL(e, e.getMessage()) when !(node.getMoId() == null) && !(vcVm == null) && try-body throws
[THROWS-WHEN] BddException.INTERNAL(e, e.getMessage()) when !(node.getMoId() == null)... | true | ok | {"focal": {"class": "VcVmUtil", "name": "runSPOnSingleVM", "signature": "boolean runSPOnSingleVM(NodeEntity node, Callable<Void> call)", "start_line": 3, "modifiers": "public static", "params": [{"name": "node", "type": "NodeEntity"}, {"name": "call", "type": "Callable<Void>"}], "return_type": "boolean"}, "class_info":... |
4610430_20 | class RouterImpl implements Router {
@Override
public String getReverseRoute(
Class<?> controllerClass,
String controllerMethodName) {
Optional<Map<String, Object>> parameterMap = Optional.empty();
return getReverseRoute(controllerClass, controllerMethodName, parameter... | String contextPath = "";
when(ninjaProperties.getContextPath()).thenReturn(contextPath);
String route = router.getReverseRoute(TestController.class, "ref");
String route2 = router.getReverseRoute(new MethodReference(TestController.class, "ref"));
assertThat(route, is("... | [FOCAL] @Override public String RouterImpl.getReverseRoute(Class<?> controllerClass, String controllerMethodName)
[CLASS] class RouterImpl implements Router
[METRICS] loc=10 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] String getReverseRoute(Class<?> controllerClass, String controllerMethodName... | /* static context
[FOCAL] @Override public String RouterImpl.getReverseRoute(Class<?> controllerClass, String controllerMethodName)
[INPUTS] branches=- | result=controllerClass, controllerMethodName
[CALLS-INTERNAL] String getReverseRoute(Class<?> controllerClass, String controllerMethodName, Object... parameterMap)
[C... | /* static context
[FOCAL] @Override public String RouterImpl.getReverseRoute(Class<?> controllerClass, String controllerMethodName)
[INPUTS] branches=- | result=controllerClass, controllerMethodName
[CALLS-INTERNAL] String getReverseRoute(Class<?> controllerClass, String controllerMethodName, Object... parameterMap)
[C... | true | ok | {"focal": {"class": "RouterImpl", "name": "getReverseRoute", "signature": "String getReverseRoute(Class<?> controllerClass, String controllerMethodName)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "controllerClass", "type": "Class<?>"}, {"name": "controllerMethodName", "type": "String"}], "r... |
4614129_29 | class TinySAL implements SAL {
@Override
public CardApplicationDisconnectResponse cardApplicationDisconnect(CardApplicationDisconnect request) {
CardApplicationDisconnectResponse response = WSHelper.makeResponse(CardApplicationDisconnectResponse.class,
WSHelper.makeResultOK());
try {
ConnectionHandle... | System.out.println("cardApplicationDisconnect");
// test normal case
// get esign path
CardApplicationPath cardApplicationPath = new CardApplicationPath();
CardApplicationPathType cardApplicationPathType = new CardApplicationPathType();
cardApplicationPathType.setCardApplication(appIdentifier_ESIGN);
cardApplica... | [FOCAL] @Override public CardApplicationDisconnectResponse TinySAL.cardApplicationDisconnect(CardApplicationDisconnect request)
[CLASS] class TinySAL implements SAL
[METRICS] loc=36 cc=5 branches=2 loops=0 returns=2 throws=0 nesting=2
[CALLS-INTERNAL] void throwThreadKillException(Exception ex)
[CALLS-EXTERNAL] WSHelpe... | class TinySAL implements SAL {
@Override
public CardApplicationDisconnectResponse cardApplicationDisconnect(CardApplicationDisconnect request) {
CardApplicationDisconnectResponse response = WSHelper.makeResponse(CardApplicationDisconnectResponse.class,
WSHelper.makeResultOK());
try {
ConnectionHandle... | false | ok | {"focal": {"class": "TinySAL", "name": "cardApplicationDisconnect", "signature": "CardApplicationDisconnectResponse cardApplicationDisconnect(CardApplicationDisconnect request)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "request", "type": "CardApplicationDisconnect"}], "return_type": "CardA... | |
4643211_0 | class CountTimestampSamplesWritable implements Writable {
public CountTimestampSamplesWritable(long count, long epochMilliseconds, List<Long> samples) {
this.countTimestampWritable = new CountTimestampWritable(count, epochMilliseconds);
this.samples = samples;
}
public CountTimestampSamplesWritable(lon... | CountTimestampSamplesWritable orig =
new CountTimestampSamplesWritable(7L, 123L, Arrays.asList(18L, 19L, 20L));
assertEquals(orig.getCount(), 7L);
assertEquals(orig.getEpochMilliseconds(), 123L);
assertEquals(Arrays.asList(18L, 19L, 20L), orig.getSamples());
ByteArrayOutputStream bytesOut = ... | [FOCAL] public CountTimestampSamplesWritable.CountTimestampSamplesWritable(long count, long epochMilliseconds, List<Long> samples)
[CLASS] class CountTimestampSamplesWritable implements Writable
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[NEW] CountTimestampWritable
[FIELDS] write=countTimesta... | /* static context
[FOCAL] public CountTimestampSamplesWritable.CountTimestampSamplesWritable(long count, long epochMilliseconds, List<Long> samples)
[STATE] countTimestampWritable, samples via getSamples()
[FIELDS] write=countTimestampWritable, samples
[NEW] CountTimestampWritable
*/
| /* static context
[FOCAL] public CountTimestampSamplesWritable.CountTimestampSamplesWritable(long count, long epochMilliseconds, List<Long> samples)
[STATE] countTimestampWritable, samples via getSamples()
[FIELDS] write=countTimestampWritable, samples
[NEW] CountTimestampWritable
*/
class CountTimestampSamplesWritable... | true | ok | {"focal": {"class": "CountTimestampSamplesWritable", "name": "CountTimestampSamplesWritable", "signature": "CountTimestampSamplesWritable(long count, long epochMilliseconds, List<Long> samples)", "start_line": 3, "modifiers": "public", "params": [{"name": "count", "type": "long"}, {"name": "epochMilliseconds", "type": ... |
4646950_7 | class SauceSession {
public MutableCapabilities getCapabilities() {
sauceOptions = getSauceOptions();
setBrowserOptions(browserName);
capabilities.setCapability(sauceOptionsTag, sauceOptions);
capabilities.setCapability(CapabilityType.BROWSER_NAME, browserName);
capabilitie... | String actualBrowser = sauceSession.getCapabilities().getBrowserName();
assertThat(actualBrowser, IsEqualIgnoringCase.equalToIgnoringCase("Chrome"));
}
} | [FOCAL] public MutableCapabilities SauceSession.getCapabilities()
[CLASS] class SauceSession
[METRICS] loc=11 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] MutableCapabilities getSauceOptions(); void setBrowserOptions(String browserName)
[CALLS-EXTERNAL] capabilities.setCapability/2
[COLLABORATO... | /* static context
[FOCAL] public MutableCapabilities SauceSession.getCapabilities()
[COLLABORATORS] field capabilities setCapability/2
[CALLS-INTERNAL] MutableCapabilities getSauceOptions(); void setBrowserOptions(String browserName)
[CALLS-EXTERNAL] capabilities.setCapability/2
*/
| /* static context
[FOCAL] public MutableCapabilities SauceSession.getCapabilities()
[COLLABORATORS] field capabilities setCapability/2
[CALLS-INTERNAL] MutableCapabilities getSauceOptions(); void setBrowserOptions(String browserName)
[CALLS-EXTERNAL] capabilities.setCapability/2
*/
class SauceSession {
public Muta... | true | ok | {"focal": {"class": "SauceSession", "name": "getCapabilities", "signature": "MutableCapabilities getCapabilities()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "MutableCapabilities"}, "class_info": {"name": "SauceSession", "kind": "class", "modifiers": "", "superclass": null, "interfaces": nul... |
4653065_0 | class UdhUtil {
public static byte[] getMessageWithUdhInBytes(String s, byte dataCoding) {
final int udhLength = ((byte)s.charAt(0))+1;
final byte[] udh = s.substring(0, udhLength).getBytes();
final byte[] content = DataCodingSpecification.getMessageInBytes(s.substring(udhLength), dataCodin... | String message = "This is the message";
byte dataCoding = 0;
String messageWithUdh = new String(udh).concat(message);
byte[] result = UdhUtil.getMessageWithUdhInBytes(messageWithUdh, dataCoding);
Assert.assertEquals(udh[0], result[0]);
Assert.assertEquals(udh[1], result[1... | [FOCAL] public static byte[] UdhUtil.getMessageWithUdhInBytes(String s, byte dataCoding)
[CLASS] class UdhUtil
[METRICS] loc=9 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] String.charAt/1, s.substring(0, udhLength).getBytes/0, String.substring/2, DataCodingSpecification.getMessageInBytes/2, Str... | /* static context
[FOCAL] public static byte[] UdhUtil.getMessageWithUdhInBytes(String s, byte dataCoding)
[INPUTS] branches=- | result=dataCoding, s
[CALLS-EXTERNAL] String.charAt/1, s.substring(0, udhLength).getBytes/0, String.substring/2, DataCodingSpecification.getMessageInBytes/2, String.substring/1, System.arrayc... | /* static context
[FOCAL] public static byte[] UdhUtil.getMessageWithUdhInBytes(String s, byte dataCoding)
[INPUTS] branches=- | result=dataCoding, s
[CALLS-EXTERNAL] String.charAt/1, s.substring(0, udhLength).getBytes/0, String.substring/2, DataCodingSpecification.getMessageInBytes/2, String.substring/1, System.arrayc... | true | ok | {"focal": {"class": "UdhUtil", "name": "getMessageWithUdhInBytes", "signature": "byte[] getMessageWithUdhInBytes(String s, byte dataCoding)", "start_line": 3, "modifiers": "public static", "params": [{"name": "s", "type": "String"}, {"name": "dataCoding", "type": "byte"}], "return_type": "byte[]"}, "class_info": {"name... |
4664478_9 | class DeployLifecycleParticipant extends AbstractMavenLifecycleParticipant implements LogEnabled {
public void afterProjectsRead(final MavenSession session)
throws MavenExecutionException
{
try {
final int totalModules = session.getProjects().size();
logger.info("Inspecting build with total o... | final Model model = createModel("org.foo", "simple");
// deploy defined as "usual"
model.getBuild().getPlugins().add(
createPlugin(DeployLifecycleParticipant.MAVEN_DEPLOY_PLUGIN_GROUP_ID,
DeployLifecycleParticipant.MAVEN_DEPLOY_PLUGIN_ARTIFACT_ID, "deploy"));
// out plugin just decla... | [FOCAL] public void DeployLifecycleParticipant.afterProjectsRead(MavenSession session)
[CLASS] class DeployLifecycleParticipant extends AbstractMavenLifecycleParticipant implements LogEnabled
[METRICS] loc=74 cc=13 branches=8 loops=3 returns=1 throws=1 nesting=6
[CALLS-INTERNAL] Plugin getBuildPluginsMavenDeployPlugin(... | /* static context
[FOCAL] public void DeployLifecycleParticipant.afterProjectsRead(MavenSession session)
[THROWS-WHEN] MavenExecutionException when try-body throws
[PATH2] foreach(MavenProject project : session.getProjects())#1=T -> if(nexusMavenPlugin != null)#1=T -> if(!nexusMavenPlugin.getExecutions().isEmpty())=F -... | /* static context
[FOCAL] public void DeployLifecycleParticipant.afterProjectsRead(MavenSession session)
[THROWS-WHEN] MavenExecutionException when try-body throws
[PATH2] foreach(MavenProject project : session.getProjects())#1=T -> if(nexusMavenPlugin != null)#1=T -> if(!nexusMavenPlugin.getExecutions().isEmpty())=F -... | true | ok | {"focal": {"class": "DeployLifecycleParticipant", "name": "afterProjectsRead", "signature": "void afterProjectsRead(MavenSession session) throws MavenExecutionException", "start_line": 3, "modifiers": "public", "params": [{"name": "session", "type": "MavenSession"}], "return_type": "void"}, "class_info": {"name": "Depl... |
4665987_17 | class DataSourceConfigManager implements ManagedServiceFactory {
@Override
public void updated(final String pid, final Dictionary config) throws ConfigurationException {
deleted(pid);
if (config == null) {
return;
}
Dictionary<String, Object> loadedConfig = external... | final DataSourceFactory dsf = expectTracked(c, context, DataSourceFactory.class, H2_DSF_FILTER);
DataSource ds = expectDataSourceCreated(dsf);
expectRegistration(ds);
StringEncryptor encryptor = expectTracked(c, context, StringEncryptor.class, "(objectClass=org.jasypt.encryption.StringEn... | [FOCAL] @Override public void DataSourceConfigManager.updated(String pid, Dictionary config)
[CLASS] class DataSourceConfigManager implements ManagedServiceFactory
[METRICS] loc=41 cc=3 branches=2 loops=0 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] String getDSFFilter(Dictionary<String, Object> config); String getPoo... | /* static context
[FOCAL] @Override public void DataSourceConfigManager.updated(String pid, Dictionary config)
[PATH1] if(config == null)=T -> return
[PATH2] if(config == null)=F -> if(Objects.nonNull(pdsfFilter))=T
[PATH3] if(config == null)=F -> if(Objects.nonNull(pdsfFilter))=F
[INPUTS] branches=config | result=-
[C... | /* static context
[FOCAL] @Override public void DataSourceConfigManager.updated(String pid, Dictionary config)
[PATH1] if(config == null)=T -> return
[PATH2] if(config == null)=F -> if(Objects.nonNull(pdsfFilter))=T
[PATH3] if(config == null)=F -> if(Objects.nonNull(pdsfFilter))=F
[INPUTS] branches=config | result=-
[C... | true | ok | {"focal": {"class": "DataSourceConfigManager", "name": "updated", "signature": "void updated(String pid, Dictionary config) throws ConfigurationException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "pid", "type": "String"}, {"name": "config", "type": "Dictionary"}], "return_type": "void"}, "... |
4668183_0 | class IdRegistry {
@Nonnull
public T get(String id) throws IllegalArgumentException {
T t = map.get(id);
if (t == null) {
throw new IllegalArgumentException("Unknown id <" + id + ">");
}
return t;
}
protected IdRegistry(Set<T> instances);
}
class IdRegist... | Injector injector = Guice.createInjector(new AbstractModule() {
@Override
protected void configure() {
bind(FooRegistry.class);
Multibinder.newSetBinder(binder(), Foo.class);
}
});
FooRegistry registry = injector.getInstance(Foo... | [FOCAL] @Nonnull public T IdRegistry.get(String id)
[CLASS] class IdRegistry
[METRICS] loc=8 cc=2 branches=1 loops=0 returns=1 throws=1 nesting=1
[CALLS-EXTERNAL] map.get/1
[NEW] IllegalArgumentException
[EXCEPTIONS] declares IllegalArgumentException; throws IllegalArgumentException
[THROWS-WHEN] IllegalArgumentExcepti... | /* static context
[FOCAL] @Nonnull public T IdRegistry.get(String id)
[THROWS-WHEN] IllegalArgumentException when t == null
[PATH1] if(t == null)=T -> throw new IllegalArgumentException("Unknown id <" + id + ">")
[PATH2] if(t == null)=F -> return t
[INPUTS] branches=id | result=id
[COLLABORATORS] field map get/1
[EXCEP... | /* static context
[FOCAL] @Nonnull public T IdRegistry.get(String id)
[THROWS-WHEN] IllegalArgumentException when t == null
[PATH1] if(t == null)=T -> throw new IllegalArgumentException("Unknown id <" + id + ">")
[PATH2] if(t == null)=F -> return t
[INPUTS] branches=id | result=id
[COLLABORATORS] field map get/1
[EXCEP... | true | ok | {"focal": {"class": "IdRegistry", "name": "get", "signature": "T get(String id) throws IllegalArgumentException", "start_line": 3, "modifiers": "@Nonnull public", "params": [{"name": "id", "type": "String"}], "return_type": "T"}, "class_info": {"name": "IdRegistry", "kind": "class", "modifiers": "", "superclass": null,... |
4673630_6 | class LdapSettingsManager {
public Map<String, LdapUserMapping> getUserMappings() {
if (userMappings == null) {
// Use linked hash map to preserve order
userMappings = new LinkedHashMap<>();
String[] serverKeys = settings.getStringArray(LDAP_SERVERS_PROPERTY);
if (serverKeys.length > 0) {... | LdapSettingsManager settingsManager = new LdapSettingsManager(
generateMultipleLdapSettingsWithUserAndGroupMapping(), new LdapAutodiscovery());
assertThat(settingsManager.getUserMappings().size()).isEqualTo(2);
// We do it twice to make sure the settings keep the same.
assertThat(settingsManager.g... | [FOCAL] public Map<String, LdapUserMapping> LdapSettingsManager.getUserMappings()
[CLASS] class LdapSettingsManager
[METRICS] loc=28 cc=6 branches=4 loops=1 returns=1 throws=0 nesting=4
[CALLS-EXTERNAL] settings.getStringArray/1, StringUtils.isNotBlank/1, LdapUserMapping.getBaseDn/0, LOG.info/3, userMappings.put/2, LOG... | /* static context
[FOCAL] public Map<String, LdapUserMapping> LdapSettingsManager.getUserMappings()
[PATH1] if(userMappings == null)=T -> if(serverKeys.length > 0)=T -> foreach(String serverKey : serverKeys)=T -> if(StringUtils.isNotBlank(userMapping.getBaseDn()))#1=T -> exit loop -> return userMappings
[PATH2] if(user... | /* static context
[FOCAL] public Map<String, LdapUserMapping> LdapSettingsManager.getUserMappings()
[PATH1] if(userMappings == null)=T -> if(serverKeys.length > 0)=T -> foreach(String serverKey : serverKeys)=T -> if(StringUtils.isNotBlank(userMapping.getBaseDn()))#1=T -> exit loop -> return userMappings
[PATH2] if(user... | true | ok | {"focal": {"class": "LdapSettingsManager", "name": "getUserMappings", "signature": "Map<String, LdapUserMapping> getUserMappings()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Map<String, LdapUserMapping>"}, "class_info": {"name": "LdapSettingsManager", "kind": "class", "modifiers": "", "supe... |
4678495_8 | class IsGoodQuality extends FilterFunc {
@Override
public Boolean exec(Tuple tuple) throws IOException {
if (tuple == null || tuple.size() == 0) {
return false;
}
try {
Object object = tuple.get(0);
if (object == null) {
return false;
}
int i = (Integer) object;
... | Tuple tuple = TupleFactory.getInstance().newTuple(new Integer(1));
assertThat(func.exec(tuple), is(true));
}
} | [FOCAL] @Override public Boolean IsGoodQuality.exec(Tuple tuple)
[CLASS] class IsGoodQuality extends FilterFunc
[METRICS] loc=16 cc=4 branches=2 loops=0 returns=3 throws=1 nesting=2
[CALLS-EXTERNAL] Tuple.size/0, Tuple.get/1
[NEW] IOException
[EXCEPTIONS] declares IOException; throws IOException; catches ExecException ... | /* static context
[FOCAL] @Override public Boolean IsGoodQuality.exec(Tuple tuple)
[THROWS-WHEN] IOException when !(tuple == null || tuple.size() == 0) && try-body throws
[PATH1] if(tuple == null || tuple.size() == 0)=F -> try-body throws -> throw new IOException(e)
[PATH2] if(tuple == null || tuple.size() == 0)=T -> r... | /* static context
[FOCAL] @Override public Boolean IsGoodQuality.exec(Tuple tuple)
[THROWS-WHEN] IOException when !(tuple == null || tuple.size() == 0) && try-body throws
[PATH1] if(tuple == null || tuple.size() == 0)=F -> try-body throws -> throw new IOException(e)
[PATH2] if(tuple == null || tuple.size() == 0)=T -> r... | true | ok | {"focal": {"class": "IsGoodQuality", "name": "exec", "signature": "Boolean exec(Tuple tuple) throws IOException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "tuple", "type": "Tuple"}], "return_type": "Boolean"}, "class_info": {"name": "IsGoodQuality", "kind": "class", "modifiers": "", "superc... |
4694994_16 | class WebOpacNet extends OkHttpBaseApi implements OpacApi {
static String[] getTitleAndSubtitle(String title) {
Matcher titleMatcher = Pattern.compile("<\u00ac1>([^<]*)</\u00ac1>").matcher(title);
Matcher subtitleMatcher = Pattern.compile("<\u00ac2>([^<]*)</\u00ac2>").matcher(title);
if (ti... | String[] titleAndSubtitle = WebOpacNet.getTitleAndSubtitle(
"<¬1>Letzte Dinge regeln</¬1><¬2>fürs Lebensende vorsorgen - mit " +
"Todesfällen umgehen</¬2>");
assertEquals("Letzte Dinge regeln", titleAndSubtitle[0]);
assertEquals("fürs Lebensende ... | [FOCAL] static String[] WebOpacNet.getTitleAndSubtitle(String title)
[CLASS] class WebOpacNet extends OkHttpBaseApi implements OpacApi
[METRICS] loc=15 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=2
[CALLS-EXTERNAL] Pattern.compile("<\u00ac1>([^<]*)</\u00ac1>").matcher/1, Pattern.compile/1, Pattern.compile("<\u00... | /* static context
[FOCAL] static String[] WebOpacNet.getTitleAndSubtitle(String title)
[PATH1] if(titleMatcher.find())=T -> if(subtitleMatcher.find())=T -> return new String[]{theTitle, subtitle}
[PATH2] if(titleMatcher.find())=F -> return new String[]{title}
[PATH3] if(titleMatcher.find())=T -> if(subtitleMatcher.find... | /* static context
[FOCAL] static String[] WebOpacNet.getTitleAndSubtitle(String title)
[PATH1] if(titleMatcher.find())=T -> if(subtitleMatcher.find())=T -> return new String[]{theTitle, subtitle}
[PATH2] if(titleMatcher.find())=F -> return new String[]{title}
[PATH3] if(titleMatcher.find())=T -> if(subtitleMatcher.find... | true | ok | {"focal": {"class": "WebOpacNet", "name": "getTitleAndSubtitle", "signature": "String[] getTitleAndSubtitle(String title)", "start_line": 3, "modifiers": "static", "params": [{"name": "title", "type": "String"}], "return_type": "String[]"}, "class_info": {"name": "WebOpacNet", "kind": "class", "modifiers": "", "supercl... |
4695543_1 | class Util {
public static String camelCaseToLowerUnderscore(String s) {
if (s.toUpperCase().equals(s) && isLettersAndDigits(s)) {
return s.toLowerCase();
}
StringBuilder b = new StringBuilder();
b.append(s.charAt(0));
boolean underscoreAdded = false;
bo... | assertEquals("hello_there", camelCaseToLowerUnderscore("HelloTHERE"));
}
} | [FOCAL] public static String Util.camelCaseToLowerUnderscore(String s)
[CLASS] class Util
[METRICS] loc=31 cc=7 branches=5 loops=1 returns=2 throws=0 nesting=4
[CALLS-INTERNAL] boolean isLettersAndDigits(String s)
[CALLS-EXTERNAL] s.toUpperCase().equals/1, String.toUpperCase/0, String.toLowerCase/0, StringBuilder.appen... | /* static context
[FOCAL] public static String Util.camelCaseToLowerUnderscore(String s)
[PATH1] if(s.toUpperCase().equals(s) && isLettersAndDigits(s))=F -> for(i < s.length())=T -> if(!Character.isLetterOrDigit(ch))=F -> if(Character.isUpperCase(ch))=T -> if(!underscoreAdded && !lastCharacterUppercase)=T -> exit loop ... | /* static context
[FOCAL] public static String Util.camelCaseToLowerUnderscore(String s)
[PATH1] if(s.toUpperCase().equals(s) && isLettersAndDigits(s))=F -> for(i < s.length())=T -> if(!Character.isLetterOrDigit(ch))=F -> if(Character.isUpperCase(ch))=T -> if(!underscoreAdded && !lastCharacterUppercase)=T -> exit loop ... | true | ok | {"focal": {"class": "Util", "name": "camelCaseToLowerUnderscore", "signature": "String camelCaseToLowerUnderscore(String s)", "start_line": 3, "modifiers": "public static", "params": [{"name": "s", "type": "String"}], "return_type": "String"}, "class_info": {"name": "Util", "kind": "class", "modifiers": "", "superclass... |
4695732_1 | class MapFileWriter {
static int writeHeaderBuffer(final MapWriterConfiguration configuration,
final TileBasedDataProcessor dataProcessor, final ByteBuffer containerHeaderBuffer) {
LOGGER.fine("writing header");
LOGGER.fine("Bounding box for file: " + dataProcessor.getBoundingBox().maxLatitudeE6 + ", "
+ ... | ByteBuffer headerBuffer = ByteBuffer.allocate(MapFileWriter.HEADER_BUFFER_SIZE);
int headerLength = MapFileWriter.writeHeaderBuffer(this.configuration, this.dataProcessor, headerBuffer);
// expected header length
// 20 + 4 + 4 + 8 + 8 + 16 + 2
// + 9 ("Mercator")
// + 1 + 8 + 1
// + 3 ("de")
// + 17 ("... | [FOCAL] static int MapFileWriter.writeHeaderBuffer(MapWriterConfiguration configuration, TileBasedDataProcessor dataProcessor, ByteBuffer containerHeaderBuffer)
[CLASS] class MapFileWriter
[METRICS] loc=103 cc=7 branches=4 loops=2 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] byte infoByteOptmizationParams(MapWriterCon... | class MapFileWriter {
static int writeHeaderBuffer(final MapWriterConfiguration configuration,
final TileBasedDataProcessor dataProcessor, final ByteBuffer containerHeaderBuffer) {
LOGGER.fine("writing header");
LOGGER.fine("Bounding box for file: " + dataProcessor.getBoundingBox().maxLatitudeE6 + ", "
+ ... | false | ok | {"focal": {"class": "MapFileWriter", "name": "writeHeaderBuffer", "signature": "int writeHeaderBuffer(MapWriterConfiguration configuration, TileBasedDataProcessor dataProcessor, ByteBuffer containerHeaderBuffer)", "start_line": 3, "modifiers": "static", "params": [{"name": "configuration", "type": "MapWriterConfigurati... | |
4713292_14 | class RepetitionChecker extends AbstractTypedChecker {
public List<Mistake> check(Sentence sentence) {
List<Mistake> mistakes = new LinkedList<Mistake>();
int offset = sentence.getSpan().getStart();
List<Token> tokens = sentence.getTokens();
String token = tokens.get(0).getLexeme().toLowerCase();
for (i... |
Sentence sentence = createSentence("Se se morre de amor .",
Class.SUBORDINATING_CONJUNCTION, Class.PERSONAL_PRONOUN,
Class.FINITIVE_VERB, Class.PREPOSITION, Class.NOUN,
Class.PUNCTUATION_MARK);
RepetitionChecker checker = new RepetitionChecker();
List<Mistake> errors = checker.check(sentence);
ass... | [FOCAL] public List<Mistake> RepetitionChecker.check(Sentence sentence)
[CLASS] class RepetitionChecker extends AbstractTypedChecker
[METRICS] loc=26 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2
[CALLS-INTERNAL] String[] createSuggestion(String error); boolean isException(List<Token> tokens, int i)
[CALLS-EXTER... | /* static context
[FOCAL] public List<Mistake> RepetitionChecker.check(Sentence sentence)
[PATH1] for(i < tokens.size())=T -> if(token.equals(next) && !isException(tokens, i))=T -> exit loop -> return mistakes
[PATH2] for(i < tokens.size())=F -> return mistakes
[PATH3] for(i < tokens.size())=T -> if(token.equals(next) ... | /* static context
[FOCAL] public List<Mistake> RepetitionChecker.check(Sentence sentence)
[PATH1] for(i < tokens.size())=T -> if(token.equals(next) && !isException(tokens, i))=T -> exit loop -> return mistakes
[PATH2] for(i < tokens.size())=F -> return mistakes
[PATH3] for(i < tokens.size())=T -> if(token.equals(next) ... | true | ok | {"focal": {"class": "RepetitionChecker", "name": "check", "signature": "List<Mistake> check(Sentence sentence)", "start_line": 3, "modifiers": "public", "params": [{"name": "sentence", "type": "Sentence"}], "return_type": "List<Mistake>"}, "class_info": {"name": "RepetitionChecker", "kind": "class", "modifiers": "", "s... |
4726303_127 | class Operator extends AbstractSopremoType implements
ISerializableSopremoType, JsonStream, Cloneable, BeanInfo {
public List<JsonStream> getOutputs() {
final ArrayList<JsonStream> outputs = new ArrayList<JsonStream>(this.maxOutputs);
for (int index = 0; index < this.maxOutputs; index++)
outputs.add(this.get... | final Operator<?> fixture = new OpImpl(0);
final List<JsonStream> result = fixture.getOutputs();
assertNotNull(result);
assertEquals(1, result.size());
final List<JsonStream> expectedResults = new ArrayList<JsonStream>();
expectedResults.add(fixture.getOutput(0));
assertEquals(expectedResults, result);... | [FOCAL] public List<JsonStream> Operator.getOutputs()
[CLASS] class Operator extends AbstractSopremoType implements ISerializableSopremoType, JsonStream, Cloneable, BeanInfo
[METRICS] loc=6 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] JsonStream getOutput(int index)
[CALLS-EXTERNAL] ArrayList<J... | /* static context
[FOCAL] public List<JsonStream> Operator.getOutputs()
[PATH1] for(index < this.maxOutputs)=T -> exit loop -> return outputs
[PATH2] for(index < this.maxOutputs)=F -> return outputs
[CALLS-INTERNAL] JsonStream getOutput(int index)
[FIELDS] read=maxOutputs
[NEW] ArrayList<JsonStream>
[CALLS-EXTERNAL] Ar... | /* static context
[FOCAL] public List<JsonStream> Operator.getOutputs()
[PATH1] for(index < this.maxOutputs)=T -> exit loop -> return outputs
[PATH2] for(index < this.maxOutputs)=F -> return outputs
[CALLS-INTERNAL] JsonStream getOutput(int index)
[FIELDS] read=maxOutputs
[NEW] ArrayList<JsonStream>
[CALLS-EXTERNAL] Ar... | true | ok | {"focal": {"class": "Operator", "name": "getOutputs", "signature": "List<JsonStream> getOutputs()", "start_line": 4, "modifiers": "public", "params": [], "return_type": "List<JsonStream>"}, "class_info": {"name": "Operator", "kind": "class", "modifiers": "", "superclass": "AbstractSopremoType", "interfaces": "ISerializ... |
4726428_33 | class MigrationProperties extends Properties {
public int getRequiredInt(String property) {
String prop = getRequiredString(property);
try {
return Integer.parseInt(prop);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Property " + property + " expected type: int");
... | assertEquals(VALID_INT_VALUE, sut.getRequiredInt(VALID_INT));
}
} | [FOCAL] public int MigrationProperties.getRequiredInt(String property)
[CLASS] class MigrationProperties extends Properties
[METRICS] loc=8 cc=2 branches=0 loops=0 returns=1 throws=1 nesting=1
[CALLS-INTERNAL] String getRequiredString(String property)
[CALLS-EXTERNAL] Integer.parseInt/1
[NEW] IllegalArgumentException
[... | /* static context
[FOCAL] public int MigrationProperties.getRequiredInt(String property)
[THROWS-WHEN] IllegalArgumentException when try-body throws
[PATH1] try-body throws -> throw new IllegalArgumentException("Property " + property + " expected ty...
[PATH2] return Integer.parseInt(prop)
[INPUTS] branches=- | result=... | /* static context
[FOCAL] public int MigrationProperties.getRequiredInt(String property)
[THROWS-WHEN] IllegalArgumentException when try-body throws
[PATH1] try-body throws -> throw new IllegalArgumentException("Property " + property + " expected ty...
[PATH2] return Integer.parseInt(prop)
[INPUTS] branches=- | result=... | true | ok | {"focal": {"class": "MigrationProperties", "name": "getRequiredInt", "signature": "int getRequiredInt(String property)", "start_line": 3, "modifiers": "public", "params": [{"name": "property", "type": "String"}], "return_type": "int"}, "class_info": {"name": "MigrationProperties", "kind": "class", "modifiers": "", "sup... |
4737996_7 | class SignatureManagerImpl implements SignatureManager {
@Override
public Map<SignatureType, SortedMap<String, SignatureFileInfo>> getAvailableSignatureFiles() {
final Path binSigFileDir = config.getSignatureFileDir();
final Path containerSigFileDir = config.getContainerSignatureDir();... |
deleteSigDirs();
createSigDirs();
final Path containerSigFile1 = containerSigFileDir.resolve("container_sigs-20100927.xml");
final Path containerSigFile2 = containerSigFileDir.resolve("container_sigs-20100827.xml");
Files.createFile(containerSigFile1);
... | [FOCAL] @Override public Map<SignatureType, SortedMap<String, SignatureFileInfo>> SignatureManagerImpl.getAvailableSignatureFiles()
[CLASS] class SignatureManagerImpl implements SignatureManager
[METRICS] loc=59 cc=5 branches=0 loops=2 returns=1 throws=0 nesting=2
[CALLS-INTERNAL] SignatureFileInfo forBinarySigFile(Pat... | /* static context
[FOCAL] @Override public Map<SignatureType, SortedMap<String, SignatureFileInfo>> SignatureManagerImpl.getAvailableSignatureFiles()
[PATH1] foreach(Path file : FileUtil.listFilesQuietly(binSigFileDir, false, xmlExtensionFilter))=T -> try-body throws -> exit loop -> foreach(Path file : FileUtil.listFil... | /* static context
[FOCAL] @Override public Map<SignatureType, SortedMap<String, SignatureFileInfo>> SignatureManagerImpl.getAvailableSignatureFiles()
[PATH1] foreach(Path file : FileUtil.listFilesQuietly(binSigFileDir, false, xmlExtensionFilter))=T -> try-body throws -> exit loop -> foreach(Path file : FileUtil.listFil... | true | ok | {"focal": {"class": "SignatureManagerImpl", "name": "getAvailableSignatureFiles", "signature": "Map<SignatureType, SortedMap<String, SignatureFileInfo>> getAvailableSignatureFiles()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Map<SignatureType, SortedMap<String, SignatureFileInfo>>... |
4738719_1 | class JacORBConfiguration implements Configuration {
@Override
public void setAttributes(Properties properties)
{
// Some lunatics illegally put non String objects into System props
// as keys / values - we ignore them.
for ( String key : properties.stringPropertyNames() )
{... | Properties orbProps = new Properties();
orbProps.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
orbProps.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");
ORB orb = ORB.init( new String[] {}, orbProps);
Properties props = new Properties(... | [FOCAL] @Override public void JacORBConfiguration.setAttributes(Properties properties)
[CLASS] class JacORBConfiguration implements Configuration
[METRICS] loc=10 cc=2 branches=0 loops=1 returns=0 throws=0 nesting=1
[CALLS-INTERNAL] void setAttribute(String key, String value)
[CALLS-EXTERNAL] Properties.stringPropertyN... | /* static context
[FOCAL] @Override public void JacORBConfiguration.setAttributes(Properties properties)
[PATH1] foreach(String key : properties.stringPropertyNames())=T -> exit loop
[PATH2] foreach(String key : properties.stringPropertyNames())=F
[INPUTS] branches=properties | result=-
[COLLABORATORS] param properties... | /* static context
[FOCAL] @Override public void JacORBConfiguration.setAttributes(Properties properties)
[PATH1] foreach(String key : properties.stringPropertyNames())=T -> exit loop
[PATH2] foreach(String key : properties.stringPropertyNames())=F
[INPUTS] branches=properties | result=-
[COLLABORATORS] param properties... | true | ok | {"focal": {"class": "JacORBConfiguration", "name": "setAttributes", "signature": "void setAttributes(Properties properties)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "properties", "type": "Properties"}], "return_type": "void"}, "class_info": {"name": "JacORBConfiguration", "kind": "class",... |
4741942_80 | class LoadBalancingSinkProcessor extends AbstractSinkProcessor {
@Override
public Status process() throws EventDeliveryException {
Status status = null;
Iterator<Sink> sinkIterator = selector.createSinkIterator();
while (sinkIterator.hasNext()) {
Sink sink = sinkIterator.next();
try {
... | Channel ch = new MockChannel();
int n = 100;
int numEvents = 3*n;
for (int i = 0; i < numEvents; i++) {
ch.put(new MockEvent("test" + i));
}
MockSink s1 = new MockSink(1);
s1.setChannel(ch);
MockSink s2 = new MockSink(2);
s2.setChannel(ch);
// s2 always fails
s2.setF... | [FOCAL] @Override public Status LoadBalancingSinkProcessor.process()
[CLASS] class LoadBalancingSinkProcessor extends AbstractSinkProcessor
[METRICS] loc=22 cc=4 branches=1 loops=1 returns=1 throws=1 nesting=2
[CALLS-EXTERNAL] selector.createSinkIterator/0, Iterator<Sink>.hasNext/0, Iterator<Sink>.next/0, Sink.process/... | /* static context
[FOCAL] @Override public Status LoadBalancingSinkProcessor.process()
[THROWS-WHEN] EventDeliveryException when sinkIterator.hasNext() && try-body throws && status == null
[THROWS-WHEN] EventDeliveryException when sinkIterator.hasNext() && status == null
[THROWS-WHEN] EventDeliveryException when !sinkI... | /* static context
[FOCAL] @Override public Status LoadBalancingSinkProcessor.process()
[THROWS-WHEN] EventDeliveryException when sinkIterator.hasNext() && try-body throws && status == null
[THROWS-WHEN] EventDeliveryException when sinkIterator.hasNext() && status == null
[THROWS-WHEN] EventDeliveryException when !sinkI... | true | ok | {"focal": {"class": "LoadBalancingSinkProcessor", "name": "process", "signature": "Status process() throws EventDeliveryException", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "Status"}, "class_info": {"name": "LoadBalancingSinkProcessor", "kind": "class", "modifiers": "", "superclass... |
4741958_389 | class ClusterClassifier extends AbstractVectorClassifier implements OnlineLearner, Writable {
@Override
public Vector classify(Vector instance) {
if (models.get(0) instanceof SoftCluster) {
Collection<SoftCluster> clusters = Lists.newArrayList();
List<Double> distances = Lists.newArrayList();
... | ClusterClassifier classifier = newGaussianClassifier();
Vector pdf = classifier.classify(new DenseVector(2));
assertEquals("[0,0]", "[0.212, 0.576, 0.212]",
AbstractCluster.formatVector(pdf, null));
pdf = classifier.classify(new DenseVector(2).assign(2));
assertEquals("[2,2]", "[0.952, 0.047... | [FOCAL] @Override public Vector ClusterClassifier.classify(Vector instance)
[CLASS] class ClusterClassifier extends AbstractVectorClassifier implements OnlineLearner, Writable
[METRICS] loc=20 cc=4 branches=1 loops=2 returns=2 throws=0 nesting=2
[CALLS-EXTERNAL] models.get/1, Lists.newArrayList/0, Collection<SoftCluste... | /* static context
[FOCAL] @Override public Vector ClusterClassifier.classify(Vector instance)
[PATH1] if(models.get(0) instanceof SoftCluster)=T -> foreach(Cluster model : models)#1=T -> exit loop -> return new FuzzyKMeansClusterer().computePi(clusters, distances)
[PATH2] if(models.get(0) instanceof SoftCluster)=F -> f... | /* static context
[FOCAL] @Override public Vector ClusterClassifier.classify(Vector instance)
[PATH1] if(models.get(0) instanceof SoftCluster)=T -> foreach(Cluster model : models)#1=T -> exit loop -> return new FuzzyKMeansClusterer().computePi(clusters, distances)
[PATH2] if(models.get(0) instanceof SoftCluster)=F -> f... | true | ok | {"focal": {"class": "ClusterClassifier", "name": "classify", "signature": "Vector classify(Vector instance)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "instance", "type": "Vector"}], "return_type": "Vector"}, "class_info": {"name": "ClusterClassifier", "kind": "class", "modifiers": "", "sup... |
4744588_1 | class LuaContainerLaunchParameters implements ContainerLaunchParameters {
public String toCommand(LuaWrapper table) {
StringBuilder sb = new StringBuilder(table.getString(LuaFields.COMMAND_BASE));
if (!table.isNil(LuaFields.ARGS)) {
LuaWrapper a = table.getTable(LuaFields.ARGS);
Iterator<LuaPair>... | env.setString(LuaFields.COMMAND_BASE, "${JAVA_HOME}/bin/java -Xmx512M com.cloudera.kitten.test.Main");
LuaWrapper args = env.createTable(LuaFields.ARGS);
args.setString("-Dmapred.jobtracker.url", "http://foo:50030");
args.setBoolean("-Dmapred.compress.output", false);
args.addString("bar");
asse... | [FOCAL] public String LuaContainerLaunchParameters.toCommand(LuaWrapper table)
[CLASS] class LuaContainerLaunchParameters implements ContainerLaunchParameters
[METRICS] loc=20 cc=4 branches=1 loops=2 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] LuaWrapper.getString/1, LuaWrapper.isNil/1, LuaWrapper.getTable/1, LuaWrap... | /* static context
[FOCAL] public String LuaContainerLaunchParameters.toCommand(LuaWrapper table)
[PATH1] if(!table.isNil(LuaFields.ARGS))=T -> while(namedArgsIter.hasNext())=T -> exit loop -> while(restIter.hasNext())=F -> return sb.toString()
[PATH2] if(!table.isNil(LuaFields.ARGS))=T -> while(namedArgsIter.hasNext())... | /* static context
[FOCAL] public String LuaContainerLaunchParameters.toCommand(LuaWrapper table)
[PATH1] if(!table.isNil(LuaFields.ARGS))=T -> while(namedArgsIter.hasNext())=T -> exit loop -> while(restIter.hasNext())=F -> return sb.toString()
[PATH2] if(!table.isNil(LuaFields.ARGS))=T -> while(namedArgsIter.hasNext())... | true | ok | {"focal": {"class": "LuaContainerLaunchParameters", "name": "toCommand", "signature": "String toCommand(LuaWrapper table)", "start_line": 3, "modifiers": "public", "params": [{"name": "table", "type": "LuaWrapper"}], "return_type": "String"}, "class_info": {"name": "LuaContainerLaunchParameters", "kind": "class", "modi... |
4750298_0 | class DisplayLayerHandler implements MessageHandler {
Pair<URL, Map<String, Serializable>> createParams(BufferedReader reader)
throws Exception {
String line = reader.readLine();
URL resourceId = null;
Map<String, Serializable> params = new HashMap<String, Serializable>();
while (line != null) {
line ... | DisplayLayerHandler handler = new DisplayLayerHandler();
String resourceId = "file://home/user/data/myshp.shp#myshp";
String shpId ="file://home/user/data/myshp.shp";
StringBuilder builder = new StringBuilder("geoResourceId;"+resourceId );
builder.append("\nurl;java.net.URL;"+shpId );
String message = build... | [FOCAL] Pair<URL, Map<String, Serializable>> DisplayLayerHandler.createParams(BufferedReader reader)
[CLASS] class DisplayLayerHandler implements MessageHandler
[METRICS] loc=23 cc=4 branches=2 loops=1 returns=1 throws=0 nesting=3
[CALLS-INTERNAL] void addParam(Map<String, Serializable> params, String line)
[CALLS-EXTE... | /* static context
[FOCAL] Pair<URL, Map<String, Serializable>> DisplayLayerHandler.createParams(BufferedReader reader)
[PATH1] while(line != null)=T -> if(line.length() > 0)=T -> if(resourceId == null && line.toLowerCase().startsWith(RESOURCE_ID))=T -> exit loop -> return new Pair<URL, Map<String, Serializable>>(resour... | /* static context
[FOCAL] Pair<URL, Map<String, Serializable>> DisplayLayerHandler.createParams(BufferedReader reader)
[PATH1] while(line != null)=T -> if(line.length() > 0)=T -> if(resourceId == null && line.toLowerCase().startsWith(RESOURCE_ID))=T -> exit loop -> return new Pair<URL, Map<String, Serializable>>(resour... | true | ok | {"focal": {"class": "DisplayLayerHandler", "name": "createParams", "signature": "Pair<URL, Map<String, Serializable>> createParams(BufferedReader reader) throws Exception", "start_line": 3, "modifiers": "", "params": [{"name": "reader", "type": "BufferedReader"}], "return_type": "Pair<URL, Map<String, Serializable>>"},... |
4757131_6 | class UserForm extends BasePage {
public String save() {
// For some reason, WebTest + Tomcat causes version to be 0. Works fine on Jetty.
if (user.getId() != null && user.getId() == 0) {
user.setId(null);
}
if (user.getId() == null) {
user.setVersion(null);... | bean.setId("-1");
bean.edit();
assertNotNull(bean.getUser());
bean.getUser().setFirstName("Jack");
assertEquals(bean.save(), "success");
assertNotNull(bean.getUser());
}
} | [FOCAL] public String UserForm.save()
[CLASS] class UserForm extends BasePage
[METRICS] loc=21 cc=4 branches=2 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] user.getId/0, user.setId/1, user.setVersion/1, UserManager.saveUser/1, addError/1 (inherited), addMessage/2 (inherited), user.getFullName/0
[FIELDS] read=u... | /* static context
[FOCAL] public String UserForm.save()
[PATH1] if(user.getId() != null && user.getId() == 0)=T -> if(user.getId() == null)=T -> try-body throws -> return "error"
[PATH2] if(user.getId() != null && user.getId() == 0)=F -> if(user.getId() == null)=F -> return "success"
[COLLABORATORS] field user getId/0,... | /* static context
[FOCAL] public String UserForm.save()
[PATH1] if(user.getId() != null && user.getId() == 0)=T -> if(user.getId() == null)=T -> try-body throws -> return "error"
[PATH2] if(user.getId() != null && user.getId() == 0)=F -> if(user.getId() == null)=F -> return "success"
[COLLABORATORS] field user getId/0,... | true | ok | {"focal": {"class": "UserForm", "name": "save", "signature": "String save()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "UserForm", "kind": "class", "modifiers": "", "superclass": "BasePage", "interfaces": null, "fields": [{"name": "bean", "type": "UserForm",... |
4759439_0 | class ShadowMaker {
public static void processImage(String in, String out) throws IOException {
File imageFile = new File(in);
BufferedImage bufferedImage= ImageIO.read(imageFile);
int width = bufferedImage.getWidth(null);
int height = bufferedImage.getHeight(null);
Buffered... | URL in = ShadowMakerTest.class.getResource("test.png");
URL out = ShadowMakerTest.class.getResource("out.png");
assertNotNull(in);
assertNotNull(out);
System.out.println(in.getFile());
System.out.println(out.getFile());
ShadowMaker.processImage(
in... | [FOCAL] public static void ShadowMaker.processImage(String in, String out)
[CLASS] class ShadowMaker
[METRICS] loc=12 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] void makeShadow(BufferedImage image)
[CALLS-EXTERNAL] ImageIO.read/1, BufferedImage.getWidth/1, BufferedImage.getHeight/1, BufferedI... | /* static context
[FOCAL] public static void ShadowMaker.processImage(String in, String out)
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] void makeShadow(BufferedImage image)
[NEW] File, BufferedImage
[CALLS-EXTERNAL] ImageIO.read/1, BufferedImage.getWidth/1, BufferedImage.getHeight/1, BufferedImage.createGraphic... | /* static context
[FOCAL] public static void ShadowMaker.processImage(String in, String out)
[EXCEPTIONS] declares IOException
[CALLS-INTERNAL] void makeShadow(BufferedImage image)
[NEW] File, BufferedImage
[CALLS-EXTERNAL] ImageIO.read/1, BufferedImage.getWidth/1, BufferedImage.getHeight/1, BufferedImage.createGraphic... | true | ok | {"focal": {"class": "ShadowMaker", "name": "processImage", "signature": "void processImage(String in, String out) throws IOException", "start_line": 3, "modifiers": "public static", "params": [{"name": "in", "type": "String"}, {"name": "out", "type": "String"}], "return_type": "void"}, "class_info": {"name": "ShadowMak... |
4782751_9 | class Reference implements InvocationHandler {
public void setMethodName(String methodName) {
this.methodName = methodName;
}
protected Reference(Bridge client, String dT, String dI, String oI,
String mN, List<String> operations);
protected Reference(Reference other);
public Reference(Bridge bridge, List... | // Set method name on 4 part
reference.setMethodName("foobar");
assertEquals(reference.getMethodName(), "foobar");
// Set method name on 3 part
ref3.setMethodName("foobar");
assertEquals(ref3.getMethodName(), "foobar");
}
} | [FOCAL] public void Reference.setMethodName(String methodName)
[CLASS] class Reference implements InvocationHandler
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[FIELDS] write=methodName
[STATE] methodName via getMethodName()
[DATAFLOW] methodName@param->L2
[CLASS-MEMBERS] Reference(Bridge clien... | /* static context
[FOCAL] public void Reference.setMethodName(String methodName)
[STATE] methodName via getMethodName()
[FIELDS] write=methodName
*/
| /* static context
[FOCAL] public void Reference.setMethodName(String methodName)
[STATE] methodName via getMethodName()
[FIELDS] write=methodName
*/
class Reference implements InvocationHandler {
public void setMethodName(String methodName) {
this.methodName = methodName;
}
protected Reference(Bridge client, St... | true | ok | {"focal": {"class": "Reference", "name": "setMethodName", "signature": "void setMethodName(String methodName)", "start_line": 3, "modifiers": "public", "params": [{"name": "methodName", "type": "String"}], "return_type": "void"}, "class_info": {"name": "Reference", "kind": "class", "modifiers": "", "superclass": null, ... |
4805389_0 | class Person {
public String getName() {
return name;
}
public Person(String name);
}
class PersonTest {
@Test
public void canConstructAPersonWithAName() {
| Person person = new Person("Larry");
assertEquals("Larry", person.getName());
}
} | [FOCAL] public String Person.getName()
[CLASS] class Person
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] Person(String name)
[TEST] PersonTest: @Test public void canConstructAPersonWithAName() | /* static context
[FOCAL] public String Person.getName()
*/
| /* static context
[FOCAL] public String Person.getName()
*/
class Person {
public String getName() {
return name;
}
public Person(String name);
}
class PersonTest {
@Test
public void canConstructAPersonWithAName() {
| true | ok | {"focal": {"class": "Person", "name": "getName", "signature": "String getName()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "String"}, "class_info": {"name": "Person", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null, "fields": [], "members": [{"name": "Person", "kind"... |
4810329_146 | class CallExpressionImpl extends PyTree implements CallExpression, HasTypeDependencies {
@Override
public InferredType type() {
Symbol calleeSymbol = calleeSymbol();
if (calleeSymbol != null) {
InferredType type = getType(calleeSymbol);
if (type.equals(InferredTypes.anyType()) && callee.is(Kind... | assertThat(lastExpression("len()").type()).isEqualTo(InferredTypes.INT);
}
} | [FOCAL] @Override public InferredType CallExpressionImpl.type()
[CLASS] class CallExpressionImpl extends PyTree implements CallExpression, HasTypeDependencies
[METRICS] loc=12 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=2
[CALLS-INTERNAL] InferredType getDeclaredType(Expression callee); InferredType getType(Symb... | /* static context
[FOCAL] @Override public InferredType CallExpressionImpl.type()
[PATH1] if(calleeSymbol != null)=T -> if(type.equals(InferredTypes.anyType()) && callee.is(Kind.QUALIFIED_EXPR))=T -> return getDeclaredType(callee)
[PATH2] if(calleeSymbol != null)=F -> return InferredTypes.anyType()
[PATH3] if(calleeSym... | /* static context
[FOCAL] @Override public InferredType CallExpressionImpl.type()
[PATH1] if(calleeSymbol != null)=T -> if(type.equals(InferredTypes.anyType()) && callee.is(Kind.QUALIFIED_EXPR))=T -> return getDeclaredType(callee)
[PATH2] if(calleeSymbol != null)=F -> return InferredTypes.anyType()
[PATH3] if(calleeSym... | true | ok | {"focal": {"class": "CallExpressionImpl", "name": "type", "signature": "InferredType type()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "InferredType"}, "class_info": {"name": "CallExpressionImpl", "kind": "class", "modifiers": "", "superclass": "PyTree", "interfaces": "CallExpressi... |
4812472_36 | class MatrixUtils {
public static double minAbsDiag(Matrix matrix) {
double min = Double.MAX_VALUE;
for (int i = 0; i < matrix.getColumnDimension(); i++) {
double curr = Math.abs(matrix.get(i, i));
if (min > curr) {
min = curr;
}
}
return min;
}
public static boolean anyNaNorInf(Matrix matrix... | Matrix X = new Matrix( new double[][] {
{ 5, -4},
{-4, 6},
});
assertEquals(5, MatrixUtils.minAbsDiag(X), 0.000001);
X = new Matrix( new double[][] {
{ 5, -1},
{-4, -2},
});
assertEquals(2, MatrixUtils.minAbsDiag(X), 0.000001);
}
} | [FOCAL] public static double MatrixUtils.minAbsDiag(Matrix matrix)
[CLASS] class MatrixUtils
[METRICS] loc=11 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] Matrix.getColumnDimension/0, Math.abs/1, Matrix.get/2
[PATH1] for(i < matrix.getColumnDimension())=T -> if(min > curr)=T -> exit loop -> ret... | /* static context
[FOCAL] public static double MatrixUtils.minAbsDiag(Matrix matrix)
[PATH1] for(i < matrix.getColumnDimension())=T -> if(min > curr)=T -> exit loop -> return min
[PATH2] for(i < matrix.getColumnDimension())=F -> return min
[PATH3] for(i < matrix.getColumnDimension())=T -> if(min > curr)=F -> exit loop ... | /* static context
[FOCAL] public static double MatrixUtils.minAbsDiag(Matrix matrix)
[PATH1] for(i < matrix.getColumnDimension())=T -> if(min > curr)=T -> exit loop -> return min
[PATH2] for(i < matrix.getColumnDimension())=F -> return min
[PATH3] for(i < matrix.getColumnDimension())=T -> if(min > curr)=F -> exit loop ... | true | ok | {"focal": {"class": "MatrixUtils", "name": "minAbsDiag", "signature": "double minAbsDiag(Matrix matrix)", "start_line": 3, "modifiers": "public static", "params": [{"name": "matrix", "type": "Matrix"}], "return_type": "double"}, "class_info": {"name": "MatrixUtils", "kind": "class", "modifiers": "", "superclass": null,... |
4820146_5 | class PHPass {
public boolean CheckPassword(String password, String storedHash) {
String hash = cryptPrivate(password, storedHash);
MessageDigest md = null;
if (hash.startsWith("*")) { // If not phpass, try some algorythms from unix crypt()
if (storedHash.startsWith("$6$")) {
... | boolean check = phpass.CheckPassword(wrongpl, hashpl);
assertFalse(check);
}
} | [FOCAL] public boolean PHPass.CheckPassword(String password, String storedHash)
[CLASS] class PHPass
[METRICS] loc=35 cc=10 branches=6 loops=0 returns=2 throws=0 nesting=3
[CALLS-INTERNAL] String cryptPrivate(String password, String setting)
[CALLS-EXTERNAL] String.startsWith/1, MessageDigest.getInstance/1, BCrypt.chec... | /* static context
[FOCAL] public boolean PHPass.CheckPassword(String password, String storedHash)
[PATH1] if(hash.startsWith("*"))=T -> if(storedHash.startsWith("$6$"))=T -> try-body throws -> if(md == null && storedHash.startsWith("$5$"))=T -> if(md == null && storedHash.startsWith("$2"))=F -> if(md == null && storedH... | /* static context
[FOCAL] public boolean PHPass.CheckPassword(String password, String storedHash)
[PATH1] if(hash.startsWith("*"))=T -> if(storedHash.startsWith("$6$"))=T -> try-body throws -> if(md == null && storedHash.startsWith("$5$"))=T -> if(md == null && storedHash.startsWith("$2"))=F -> if(md == null && storedH... | true | ok | {"focal": {"class": "PHPass", "name": "CheckPassword", "signature": "boolean CheckPassword(String password, String storedHash)", "start_line": 3, "modifiers": "public", "params": [{"name": "password", "type": "String"}, {"name": "storedHash", "type": "String"}], "return_type": "boolean"}, "class_info": {"name": "PHPass... |
4823750_0 | class LoginController {
@RequestMapping(method = RequestMethod.POST)
public String handleLogin(@RequestParam String username, @RequestParam String password, HttpSession session)
throws AuthenticationException {
Account account = this.accountService.login(username, password);
session... |
MockHttpSession mockHttpSession = new MockHttpSession();
mockHttpSession.setAttribute(LoginController.REQUESTED_URL, "someUrl");
String view = this.loginController.handleLogin("john", "secret", mockHttpSession);
Account account = (Account) mockHttpSession.getAttribute(LoginController.... | [FOCAL] @RequestMapping(method = RequestMethod.POST) public String LoginController.handleLogin(String username, String password, HttpSession session)
[CLASS] class LoginController
[METRICS] loc=13 cc=2 branches=1 loops=0 returns=2 throws=0 nesting=1
[CALLS-EXTERNAL] AccountService.login/2, HttpSession.setAttribute/2, H... | /* static context
[FOCAL] @RequestMapping(method = RequestMethod.POST) public String LoginController.handleLogin(String username, String password, HttpSession session)
[PATH1] if(StringUtils.hasText(url) && !url.contains("login"))=T -> return "redirect:" + url
[PATH2] if(StringUtils.hasText(url) && !url.contains("login... | /* static context
[FOCAL] @RequestMapping(method = RequestMethod.POST) public String LoginController.handleLogin(String username, String password, HttpSession session)
[PATH1] if(StringUtils.hasText(url) && !url.contains("login"))=T -> return "redirect:" + url
[PATH2] if(StringUtils.hasText(url) && !url.contains("login... | true | ok | {"focal": {"class": "LoginController", "name": "handleLogin", "signature": "String handleLogin(String username, String password, HttpSession session) throws AuthenticationException", "start_line": 3, "modifiers": "@RequestMapping(method = RequestMethod.POST) public", "params": [{"name": "username", "type": "String"}, {... |
4835576_9 | class DefaultMockSelectionStrategy implements MockSelectionStrategy {
@SuppressWarnings("unchecked")
public <T> OrderedSet<T> selectMocks(OrderedSet<Object> mocks, Class<T> mockClass) {
OrderedSet<T> matchingMocks = new OrderedSet<T>();
for (Object object : mocks) {
if (mockClass.isAssignableFrom(object.getCl... | // Given
Object mock1 = mock(InputStream.class);
Object mock2 = mock(OutputStream.class);
OrderedSet<Object> mocks = new OrderedSet<Object>(Arrays.asList(mock1, mock2));
// When
OrderedSet<FileOutputStream> actualMocks = strategy.selectMocks(mocks, FileOutputStream.class);
// Then
assertTrue(actualMoc... | [FOCAL] @SuppressWarnings("unchecked") public OrderedSet<T> DefaultMockSelectionStrategy.selectMocks(OrderedSet<Object> mocks, Class<T> mockClass)
[CLASS] class DefaultMockSelectionStrategy implements MockSelectionStrategy
[METRICS] loc=10 cc=3 branches=1 loops=1 returns=1 throws=0 nesting=2
[CALLS-EXTERNAL] Class<T>.i... | /* static context
[FOCAL] @SuppressWarnings("unchecked") public OrderedSet<T> DefaultMockSelectionStrategy.selectMocks(OrderedSet<Object> mocks, Class<T> mockClass)
[PATH1] foreach(Object object : mocks)=T -> if(mockClass.isAssignableFrom(object.getClass()))=T -> exit loop -> return matchingMocks
[PATH2] foreach(Object... | /* static context
[FOCAL] @SuppressWarnings("unchecked") public OrderedSet<T> DefaultMockSelectionStrategy.selectMocks(OrderedSet<Object> mocks, Class<T> mockClass)
[PATH1] foreach(Object object : mocks)=T -> if(mockClass.isAssignableFrom(object.getClass()))=T -> exit loop -> return matchingMocks
[PATH2] foreach(Object... | true | ok | {"focal": {"class": "DefaultMockSelectionStrategy", "name": "selectMocks", "signature": "OrderedSet<T> selectMocks(OrderedSet<Object> mocks, Class<T> mockClass)", "start_line": 3, "modifiers": "@SuppressWarnings(\"unchecked\") public", "params": [{"name": "mocks", "type": "OrderedSet<Object>"}, {"name": "mockClass", "t... |
4889322_32 | class ClientActionClassesResolver {
public Map<String, ClientActionClassInformation> resolve() {
Map<String, ClientActionClassInformation> actionClasses = new HashMap<String, ClientActionClassInformation>();
Map<String, Object> foundActions = springIntegration.getActualContext().getBeansWithAnnotation(Clien... | //given
//when
Map<String, ClientActionClassInformation> actionClasses = clientActionClassesResolver.resolve();
//then
assertTrue(actionClasses.containsKey(NonStandardClientActionClass.NAME));
ClientActionClassInformation namedFromClassName = actionClasses.get(NonStandardClientActionClass.NAME... | [FOCAL] public Map<String, ClientActionClassInformation> ClientActionClassesResolver.resolve()
[CLASS] class ClientActionClassesResolver
[METRICS] loc=12 cc=2 branches=0 loops=1 returns=1 throws=0 nesting=1
[CALLS-INTERNAL] ClientActionClassInformation prepareActionClass(Object actionClassInstance)
[CALLS-EXTERNAL] spr... | /* static context
[FOCAL] public Map<String, ClientActionClassInformation> ClientActionClassesResolver.resolve()
[PATH1] foreach(Map.Entry<String, Object> actionClassEntry : foundActions.entrySet())=T -> exit loop -> return actionClasses
[PATH2] foreach(Map.Entry<String, Object> actionClassEntry : foundActions.entrySet... | /* static context
[FOCAL] public Map<String, ClientActionClassInformation> ClientActionClassesResolver.resolve()
[PATH1] foreach(Map.Entry<String, Object> actionClassEntry : foundActions.entrySet())=T -> exit loop -> return actionClasses
[PATH2] foreach(Map.Entry<String, Object> actionClassEntry : foundActions.entrySet... | true | ok | {"focal": {"class": "ClientActionClassesResolver", "name": "resolve", "signature": "Map<String, ClientActionClassInformation> resolve()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Map<String, ClientActionClassInformation>"}, "class_info": {"name": "ClientActionClassesResolver", "kind": "clas... |
4889980_4 | class ValidatorMandatory extends AbstractValueValidator<Object> {
public static ValidatorMandatory getInstance() {
return INSTANCE;
}
public ValidatorMandatory();
@Override protected String getCode();
@Override protected NlsMessage validateNull();
private NlsMessage getFailureMessage();
@Override... |
verifyPositiveValidation(ValidatorMandatory.getInstance(), BigDecimal.ZERO);
}
} | [FOCAL] public static ValidatorMandatory ValidatorMandatory.getInstance()
[CLASS] class ValidatorMandatory extends AbstractValueValidator<Object>
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] ValidatorMandatory(); String getCode(); NlsMessage validateNull(); NlsMessage getFailureM... | /* static context
[FOCAL] public static ValidatorMandatory ValidatorMandatory.getInstance()
*/
| /* static context
[FOCAL] public static ValidatorMandatory ValidatorMandatory.getInstance()
*/
class ValidatorMandatory extends AbstractValueValidator<Object> {
public static ValidatorMandatory getInstance() {
return INSTANCE;
}
public ValidatorMandatory();
@Override protected String getCode();
@Over... | true | ok | {"focal": {"class": "ValidatorMandatory", "name": "getInstance", "signature": "ValidatorMandatory getInstance()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "ValidatorMandatory"}, "class_info": {"name": "ValidatorMandatory", "kind": "class", "modifiers": "", "superclass": "AbstractValue... |
4898786_11 | class ProcessManagerContext {
synchronized void tryAcceptTask(TaskHandle taskHandle) throws IllegalStateException {
tryCheckLoad();
TaskExclusivity prevExclusivity = currentExclusivity;
String prevExclusiveId = currentExclusiveId;
boolean canAccept = tryChangeExclusivity(taskHandle);
if (canAccept) {
... |
RuntimeInfo runtimeInfo = createRuntimeInfo();
ProcessManagerContext managerContext = new ProcessManagerContext(clusterContext, runtimeInfo);
setUpTaskHandle(taskHandle1, CONTEXT_EXCLUSIVE, taskId1, contextId1);
setUpTaskHandle(taskHandle2, CONTEXT_EXCLUSIVE, taskId2, contextId2);
try {
managerContext.... | [FOCAL] synchronized void ProcessManagerContext.tryAcceptTask(TaskHandle taskHandle)
[CLASS] class ProcessManagerContext
[METRICS] loc=25 cc=3 branches=1 loops=0 returns=0 throws=2 nesting=2
[CALLS-INTERNAL] boolean tryChangeExclusivity(TaskHandle taskHandle); void setExclusivity(TaskExclusivity exclusivity, String exc... | /* static context
[FOCAL] synchronized void ProcessManagerContext.tryAcceptTask(TaskHandle taskHandle)
[THROWS-WHEN] e when canAccept && try-body throws
[THROWS-WHEN] IllegalStateException when !canAccept
[PATH1] if(canAccept)=T -> try-body throws -> throw e
[PATH2] if(canAccept)=F -> throw new IllegalStateException("E... | /* static context
[FOCAL] synchronized void ProcessManagerContext.tryAcceptTask(TaskHandle taskHandle)
[THROWS-WHEN] e when canAccept && try-body throws
[THROWS-WHEN] IllegalStateException when !canAccept
[PATH1] if(canAccept)=T -> try-body throws -> throw e
[PATH2] if(canAccept)=F -> throw new IllegalStateException("E... | true | ok | {"focal": {"class": "ProcessManagerContext", "name": "tryAcceptTask", "signature": "void tryAcceptTask(TaskHandle taskHandle) throws IllegalStateException", "start_line": 3, "modifiers": "synchronized", "params": [{"name": "taskHandle", "type": "TaskHandle"}], "return_type": "void"}, "class_info": {"name": "ProcessMana... |
4908338_0 | class Detail extends BaseHstComponent {
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {
HippoBean doc = getContentBean(request);
if (doc == null) {
log.warn("Did not find a content bean for relative content ... | HippoBean detailBean = new MockHippoBean();
ServletContext servletContext = createMock(ServletContext.class);
ComponentConfiguration componentConfiguration = new MockComponentConfiguration();
ObjectConverter objectConverter = createMock(ObjectConverter.class);
HstRequest reques... | [FOCAL] @Override public void Detail.doBeforeRender(HstRequest request, HstResponse response)
[CLASS] class Detail extends BaseHstComponent
[METRICS] loc=15 cc=2 branches=1 loops=0 returns=1 throws=0 nesting=1
[CALLS-EXTERNAL] getContentBean/1 (inherited), log.warn/3, request.getRequestContext().getResolvedSiteMapItem(... | /* static context
[FOCAL] @Override public void Detail.doBeforeRender(HstRequest request, HstResponse response)
[PATH1] if(doc == null)=T -> return
[PATH2] if(doc == null)=F
[INPUTS] branches=request | result=-
[COLLABORATORS] param request:HstRequest getRequestContext/0,setAttribute/2; param response:HstResponse setSt... | /* static context
[FOCAL] @Override public void Detail.doBeforeRender(HstRequest request, HstResponse response)
[PATH1] if(doc == null)=T -> return
[PATH2] if(doc == null)=F
[INPUTS] branches=request | result=-
[COLLABORATORS] param request:HstRequest getRequestContext/0,setAttribute/2; param response:HstResponse setSt... | true | ok | {"focal": {"class": "Detail", "name": "doBeforeRender", "signature": "void doBeforeRender(HstRequest request, HstResponse response) throws HstComponentException", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "request", "type": "HstRequest"}, {"name": "response", "type": "HstResponse"}], "return... |
4910671_5 | class Searcher {
private List<Result> search(Query query, Optional<Sort> sort) {
IndexSearcher searcher = null;
try {
searcher = new IndexSearcher(DirectoryReader.open(directory));
List<Result> result = new ArrayList<>();
TopDocs topDocs = searcher.search(query, ... | Talk talk1 = newAuthorTalk("Florian Hopf");
Talk talk2 = newAuthorTalk("Florian");
indexer.index(talk1, talk2);
List<Result> documents = searcher.search("speaker:Florian");
assertEquals(2, documents.size());
documents = searcher.search("speaker:\"Florian Hopf\"");
... | [FOCAL] private List<Result> Searcher.search(Query query, Optional<Sort> sort)
[CLASS] class Searcher
[METRICS] loc=17 cc=3 branches=0 loops=1 returns=1 throws=1 nesting=2
[CALLS-INTERNAL] Result asResult(Document doc, Query query)
[CALLS-EXTERNAL] DirectoryReader.open/1, IndexSearcher.search/3, Optional<Sort>.or/1, In... | /* static context
[FOCAL] private List<Result> Searcher.search(Query query, Optional<Sort> sort)
[THROWS-WHEN] IllegalStateException when try-body throws
[PATH1] foreach(ScoreDoc scoreDoc : topDocs.scoreDocs)=T -> exit loop -> return result
[PATH2] try-body throws -> throw new IllegalStateException(ex)
[PATH3] foreach(... | /* static context
[FOCAL] private List<Result> Searcher.search(Query query, Optional<Sort> sort)
[THROWS-WHEN] IllegalStateException when try-body throws
[PATH1] foreach(ScoreDoc scoreDoc : topDocs.scoreDocs)=T -> exit loop -> return result
[PATH2] try-body throws -> throw new IllegalStateException(ex)
[PATH3] foreach(... | true | ok | {"focal": {"class": "Searcher", "name": "search", "signature": "List<Result> search(Query query, Optional<Sort> sort)", "start_line": 3, "modifiers": "private", "params": [{"name": "query", "type": "Query"}, {"name": "sort", "type": "Optional<Sort>"}], "return_type": "List<Result>"}, "class_info": {"name": "Searcher", ... |
4925395_67 | class ThreadedInstaller implements Installer {
@Override
public void install(final Version version) {
new Thread(new Runnable() {
@Override
public void run() {
wrapped.install(version);
}
}).start();
}
public ThreadedInstaller(Installer wrapped);
public static Installer P... | installer.install(version);
Thread.sleep(10);
verify(wrappedSpy).install(version);
}
} | [FOCAL] @Override public void ThreadedInstaller.install(Version version)
[CLASS] class ThreadedInstaller implements Installer
[METRICS] loc=9 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-EXTERNAL] new Thread(new Runnable() { @Override public void run() {....start/0, SlowInstaller.install/1
[NEW] Thread, ... | /* static context
[FOCAL] @Override public void ThreadedInstaller.install(Version version)
[COLLABORATORS] field wrapped:SlowInstaller install/1
[FIELDS] read=wrapped:SlowInstaller
[NEW] Thread, Runnable
[CALLS-EXTERNAL] new Thread(new Runnable() { @Override public void run() {....start/0, SlowInstaller.install/1
*/
| /* static context
[FOCAL] @Override public void ThreadedInstaller.install(Version version)
[COLLABORATORS] field wrapped:SlowInstaller install/1
[FIELDS] read=wrapped:SlowInstaller
[NEW] Thread, Runnable
[CALLS-EXTERNAL] new Thread(new Runnable() { @Override public void run() {....start/0, SlowInstaller.install/1
*/
cl... | true | ok | {"focal": {"class": "ThreadedInstaller", "name": "install", "signature": "void install(Version version)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "version", "type": "Version"}], "return_type": "void"}, "class_info": {"name": "ThreadedInstaller", "kind": "class", "modifiers": "", "superclas... |
4941867_5 | class AnnotationFinder extends ClassVisitor {
public Set<Class<?>> getAnnotatedClasses() {
return annotatedClasses;
}
public AnnotationFinder(ClassLoader classLoader, Collection<Class<? extends Annotation>> annotations);
private Class<?> selfClass();
private Class<?> classFromInternalNam... | Collection<String> compile = cp.compile(
"package governator.test;" +
"public class Foo {" +
" @A class Inner {}" +
" @A static class StaticInner {}" +
"}"
);
assertThat(scan("governator.test.Foo$Inner", a).getAnnotatedClasses(),
... | [FOCAL] public Set<Class<?>> AnnotationFinder.getAnnotatedClasses()
[CLASS] class AnnotationFinder extends ClassVisitor
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CLASS-MEMBERS] AnnotationFinder(ClassLoader classLoader, Collection<Class<? extends Annotation>> annotations); Class<?> selfClass(... | /* static context
[FOCAL] public Set<Class<?>> AnnotationFinder.getAnnotatedClasses()
*/
| /* static context
[FOCAL] public Set<Class<?>> AnnotationFinder.getAnnotatedClasses()
*/
class AnnotationFinder extends ClassVisitor {
public Set<Class<?>> getAnnotatedClasses() {
return annotatedClasses;
}
public AnnotationFinder(ClassLoader classLoader, Collection<Class<? extends Annotation>> a... | true | ok | {"focal": {"class": "AnnotationFinder", "name": "getAnnotatedClasses", "signature": "Set<Class<?>> getAnnotatedClasses()", "start_line": 3, "modifiers": "public", "params": [], "return_type": "Set<Class<?>>"}, "class_info": {"name": "AnnotationFinder", "kind": "class", "modifiers": "", "superclass": "ClassVisitor", "in... |
4946769_202 | class HttpUtils {
public static String completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint) {
if (StringUtils.isNullOrEmpty(endpoint)) {
return endpoint;
}
endpoint = endpoint.trim();
String lowerCaseEndpoint = endpoint.toLowerCase();
... | assertEquals("HTTP://LOCALHOST:9001/TEST/A001", HttpUtils.completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(uppercaseURLHTTP));
}
} | [FOCAL] public static String HttpUtils.completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint)
[CLASS] class HttpUtils
[METRICS] loc=12 cc=3 branches=2 loops=0 returns=3 throws=0 nesting=1
[CALLS-EXTERNAL] StringUtils.isNullOrEmpty/1, String.trim/0, String.toLowerCase/0, String.startsWith/1
[P... | /* static context
[FOCAL] public static String HttpUtils.completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint)
[PATH1] if(StringUtils.isNullOrEmpty(endpoint))=F -> if(!lowerCaseEndpoint.startsWith("http://") && !lowerCaseEndpoint.startsWith("https://") && !endpoint.startsWith("$"))=T -> retu... | /* static context
[FOCAL] public static String HttpUtils.completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint)
[PATH1] if(StringUtils.isNullOrEmpty(endpoint))=F -> if(!lowerCaseEndpoint.startsWith("http://") && !lowerCaseEndpoint.startsWith("https://") && !endpoint.startsWith("$"))=T -> retu... | true | ok | {"focal": {"class": "HttpUtils", "name": "completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion", "signature": "String completeUrlWithHttpIfProtocolIsNotHttpOrHttpsOrPropertyExpansion(String endpoint)", "start_line": 3, "modifiers": "public static", "params": [{"name": "endpoint", "type": "String"}], "return... |
4955633_3 | class AliasMessage implements Message {
public static Builder builder(String previousId) {
return new Builder(previousId);
}
public abstract String previousId();
public Builder toBuilder();
}
class AliasMessageTest {
@Test
public void invalidPreviousIdThrows() {
| try {
AliasMessage.builder(null);
fail();
} catch (IllegalArgumentException e) {
assertThat(e).hasMessage("previousId cannot be null or empty.");
}
}
} | [FOCAL] public static Builder AliasMessage.builder(String previousId)
[CLASS] class AliasMessage implements Message
[METRICS] loc=3 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[NEW] Builder
[INPUTS] branches=- | result=previousId
[DATAFLOW] previousId@param->L2
[CLASS-MEMBERS] String previousId(); Builder toBu... | /* static context
[FOCAL] public static Builder AliasMessage.builder(String previousId)
[INPUTS] branches=- | result=previousId
[NEW] Builder
*/
| /* static context
[FOCAL] public static Builder AliasMessage.builder(String previousId)
[INPUTS] branches=- | result=previousId
[NEW] Builder
*/
class AliasMessage implements Message {
public static Builder builder(String previousId) {
return new Builder(previousId);
}
public abstract String previousId();
... | true | ok | {"focal": {"class": "AliasMessage", "name": "builder", "signature": "Builder builder(String previousId)", "start_line": 3, "modifiers": "public static", "params": [{"name": "previousId", "type": "String"}], "return_type": "Builder"}, "class_info": {"name": "AliasMessage", "kind": "class", "modifiers": "", "superclass":... |
4959580_16 | class RepeaterUtil implements IRepeaterUtil {
@Override
public String isComponentScrollBarAtBottom(MarkupContainer component) {
return String.format("QuickView.isComponentScrollBarAtBottom('%s');", component.getMarkupId());
}
public RepeaterUtil(Application application);
public static Re... | public void isComponentScrollBarAtBottom() {
WebMarkupContainer c = new WebMarkupContainer("parent");
c.setMarkupId("parent");
String actual = RepeaterUtil.get().isComponentScrollBarAtBottom(c);
String expected = "QuickView.isComponentScrollBarAtBottom('parent');";
Assert.ass... | [FOCAL] @Override public String RepeaterUtil.isComponentScrollBarAtBottom(MarkupContainer component)
[CLASS] class RepeaterUtil implements IRepeaterUtil
[METRICS] loc=4 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] String.format/2, MarkupContainer.getMarkupId/0
[INPUTS] branches=- | result=compo... | /* static context
[FOCAL] @Override public String RepeaterUtil.isComponentScrollBarAtBottom(MarkupContainer component)
[INPUTS] branches=- | result=component
[COLLABORATORS] param component:MarkupContainer getMarkupId/0
[CALLS-EXTERNAL] String.format/2, MarkupContainer.getMarkupId/0
*/
| /* static context
[FOCAL] @Override public String RepeaterUtil.isComponentScrollBarAtBottom(MarkupContainer component)
[INPUTS] branches=- | result=component
[COLLABORATORS] param component:MarkupContainer getMarkupId/0
[CALLS-EXTERNAL] String.format/2, MarkupContainer.getMarkupId/0
*/
class RepeaterUtil implements IRe... | true | ok | {"focal": {"class": "RepeaterUtil", "name": "isComponentScrollBarAtBottom", "signature": "String isComponentScrollBarAtBottom(MarkupContainer component)", "start_line": 3, "modifiers": "@Override public", "params": [{"name": "component", "type": "MarkupContainer"}], "return_type": "String"}, "class_info": {"name": "Rep... |
4992906_267 | class SaxonXPathRuleQuery extends AbstractXPathRuleQuery {
@Override
public List<String> getRuleChainVisits() {
initializeXPathExpression();
return super.getRuleChainVisits();
}
@Deprecated public SaxonXPathRuleQuery();
public SaxonXPathRuleQuery(DeprecatedAttrLogger attrCtx);
... | SaxonXPathRuleQuery query = createQuery("//dummyNode[@Test1 = false()][@Test2 = true()]");
List<String> ruleChainVisits = query.getRuleChainVisits();
Assert.assertEquals(1, ruleChainVisits.size());
Assert.assertTrue(ruleChainVisits.contains("dummyNode"));
Assert.assertEquals(2, q... | [FOCAL] @Override public List<String> SaxonXPathRuleQuery.getRuleChainVisits()
[CLASS] class SaxonXPathRuleQuery extends AbstractXPathRuleQuery
[METRICS] loc=5 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-INTERNAL] void initializeXPathExpression()
[CALLS-EXTERNAL] AbstractXPathRuleQuery.getRuleChainVisit... | /* static context
[FOCAL] @Override public List<String> SaxonXPathRuleQuery.getRuleChainVisits()
[CALLS-INTERNAL] void initializeXPathExpression()
[CALLS-EXTERNAL] AbstractXPathRuleQuery.getRuleChainVisits/0
*/
| /* static context
[FOCAL] @Override public List<String> SaxonXPathRuleQuery.getRuleChainVisits()
[CALLS-INTERNAL] void initializeXPathExpression()
[CALLS-EXTERNAL] AbstractXPathRuleQuery.getRuleChainVisits/0
*/
class SaxonXPathRuleQuery extends AbstractXPathRuleQuery {
@Override
public List<String> getRuleChai... | true | ok | {"focal": {"class": "SaxonXPathRuleQuery", "name": "getRuleChainVisits", "signature": "List<String> getRuleChainVisits()", "start_line": 3, "modifiers": "@Override public", "params": [], "return_type": "List<String>"}, "class_info": {"name": "SaxonXPathRuleQuery", "kind": "class", "modifiers": "", "superclass": "Abstra... |
5002457_14 | class ComputeRays {
public static double splitLineStringIntoPoints(LineString geom, double segmentSizeConstraint,
List<Coordinate> pts) {
// If the linear sound source length is inferior than half the distance between the nearest point of the sound
// so... | GeometryFactory factory = new GeometryFactory();
List<Coordinate> sourcePoints = new ArrayList<>();
// source line is split in 3 parts of 2.5 meters
// This is because minimal receiver-source distance is equal to 5 meters
// The constrain is distance / 2.0 so 2.5 meters
/... | [FOCAL] public static double ComputeRays.splitLineStringIntoPoints(LineString geom, double segmentSizeConstraint, List<Coordinate> pts)
[CLASS] class ComputeRays
[METRICS] loc=75 cc=11 branches=7 loops=3 returns=2 throws=0 nesting=4
[CALLS-EXTERNAL] LineString.getLength/0, LineString.getCoordinates/0, Coordinate.distan... | class ComputeRays {
public static double splitLineStringIntoPoints(LineString geom, double segmentSizeConstraint,
List<Coordinate> pts) {
// If the linear sound source length is inferior than half the distance between the nearest point of the sound
// so... | false | ok | {"focal": {"class": "ComputeRays", "name": "splitLineStringIntoPoints", "signature": "double splitLineStringIntoPoints(LineString geom, double segmentSizeConstraint, List<Coordinate> pts)", "start_line": 3, "modifiers": "public static", "params": [{"name": "geom", "type": "LineString"}, {"name": "segmentSizeConstraint"... | |
5003951_0 | class ClojureModelWriter extends ModelWriterSupport {
public void write(Writer writer, Map<String, Object> stringObjectMap, Model model) throws IOException {
try {
final Var REQUIRE = Var.intern(RT.CLOJURE_NS, Symbol.create("require"));
final Symbol REFLECTOR = Symbol.create("org.so... | Model model = readClojureModel("test1.clj");
assertNotNull(model);
ClojureModelWriter writer = new ClojureModelWriter();
StringWriter sw = new StringWriter();
writer.write(sw, new HashMap(), model);
System.out.println(sw.getBuffer().toString());
}
} | [FOCAL] public void ClojureModelWriter.write(Writer writer, Map<String, Object> stringObjectMap, Model model)
[CLASS] class ClojureModelWriter extends ModelWriterSupport
[METRICS] loc=13 cc=2 branches=0 loops=0 returns=0 throws=1 nesting=1
[CALLS-EXTERNAL] Var.intern/2, Symbol.create/1, Var.invoke/1, Namespace.findOrCr... | /* static context
[FOCAL] public void ClojureModelWriter.write(Writer writer, Map<String, Object> stringObjectMap, Model model)
[THROWS-WHEN] (IOException) new IOException(e.toString()).initCause(e) when try-body throws
[PATH1] try-body throws -> throw (IOException) new IOException(e.toString()).initCause(e)
[INPUTS] b... | /* static context
[FOCAL] public void ClojureModelWriter.write(Writer writer, Map<String, Object> stringObjectMap, Model model)
[THROWS-WHEN] (IOException) new IOException(e.toString()).initCause(e) when try-body throws
[PATH1] try-body throws -> throw (IOException) new IOException(e.toString()).initCause(e)
[INPUTS] b... | true | ok | {"focal": {"class": "ClojureModelWriter", "name": "write", "signature": "void write(Writer writer, Map<String, Object> stringObjectMap, Model model) throws IOException", "start_line": 3, "modifiers": "public", "params": [{"name": "writer", "type": "Writer"}, {"name": "stringObjectMap", "type": "Map<String, Object>"}, {... |
5017081_2 | class Slugify {
@Deprecated
public Slugify(boolean lowerCase) {
this();
withLowerCase(lowerCase);
}
@Deprecated public Slugify(boolean lowerCase);
public Slugify();
public Slugify withCustomReplacement(final String from, final String to);
public Slugify withCustomReplacements(final Map<String, String> ... | // given
String string = "\tHello \tworld \r\t";
// when
String result = new Slugify().slugify(string);
// then
assertEquals("hello-world", result);
}
} | [FOCAL] @Deprecated public Slugify.Slugify(boolean lowerCase)
[CLASS] class Slugify
[METRICS] loc=6 cc=1 branches=0 loops=0 returns=0 throws=0 nesting=0
[CALLS-INTERNAL] Slugify withLowerCase(boolean lowerCase)
[DATAFLOW] lowerCase@param->L5
[CLASS-MEMBERS] Slugify(boolean lowerCase); Slugify(); Slugify withCustomRepla... | /* static context
[FOCAL] @Deprecated public Slugify.Slugify(boolean lowerCase)
[CALLS-INTERNAL] Slugify withLowerCase(boolean lowerCase)
*/
| /* static context
[FOCAL] @Deprecated public Slugify.Slugify(boolean lowerCase)
[CALLS-INTERNAL] Slugify withLowerCase(boolean lowerCase)
*/
class Slugify {
@Deprecated
public Slugify(boolean lowerCase) {
this();
withLowerCase(lowerCase);
}
@Deprecated public Slugify(boolean lowerCase);
public Slugify();
... | true | ok | {"focal": {"class": "Slugify", "name": "Slugify", "signature": "Slugify(boolean lowerCase)", "start_line": 3, "modifiers": "@Deprecated public", "params": [{"name": "lowerCase", "type": "boolean"}], "return_type": null}, "class_info": {"name": "Slugify", "kind": "class", "modifiers": "", "superclass": null, "interfaces... |
5022064_10 | class StringDistanceBuilderExample {
public static float example03() {
String a = "A quirky thing it is. This is a sentence.";
String b = "This sentence is similar; a quirky thing it is.";
StringDistance metric =
with(new EuclideanDistance<String>())
.tokenize(Tokenizers.whitespace())
.build();
... | assertEquals(2.0000f, StringDistanceBuilderExample.example03(), DELTA);
}
} | [FOCAL] public static float StringDistanceBuilderExample.example03()
[CLASS] class StringDistanceBuilderExample
[METRICS] loc=12 cc=1 branches=0 loops=0 returns=1 throws=0 nesting=0
[CALLS-EXTERNAL] with(new EuclideanDistance<String>()) .tokenize(Tokenizer....build/0, with(new EuclideanDistance<String>()).tokenize/1, w... | /* static context
[FOCAL] public static float StringDistanceBuilderExample.example03()
[NEW] EuclideanDistance<String>
[CALLS-EXTERNAL] with(new EuclideanDistance<String>()) .tokenize(Tokenizer....build/0, with(new EuclideanDistance<String>()).tokenize/1, with/1 (inherited), Tokenizers.whitespace/0, StringDistance.dist... | /* static context
[FOCAL] public static float StringDistanceBuilderExample.example03()
[NEW] EuclideanDistance<String>
[CALLS-EXTERNAL] with(new EuclideanDistance<String>()) .tokenize(Tokenizer....build/0, with(new EuclideanDistance<String>()).tokenize/1, with/1 (inherited), Tokenizers.whitespace/0, StringDistance.dist... | true | ok | {"focal": {"class": "StringDistanceBuilderExample", "name": "example03", "signature": "float example03()", "start_line": 3, "modifiers": "public static", "params": [], "return_type": "float"}, "class_info": {"name": "StringDistanceBuilderExample", "kind": "class", "modifiers": "", "superclass": null, "interfaces": null... |
5054231_2 | class MessageUtils {
static public List<BodyPart> extractMessageAttachments(Log logger, Object content) throws MessagingException, IOException {
ArrayList<BodyPart> ret = new ArrayList<BodyPart>();
if (content instanceof Multipart) {
Multipart part = (Multipart) content;
for... | Message message = TestUtils.createMockMimeMessage(session, 2);
List<BodyPart> parts = MessageUtils.extractMessageAttachments(logger, message.getContent());
assertEquals(2, parts.size());
}
} | [FOCAL] static public List<BodyPart> MessageUtils.extractMessageAttachments(Log logger, Object content)
[CLASS] class MessageUtils
[METRICS] loc=21 cc=5 branches=3 loops=1 returns=1 throws=0 nesting=4
[CALLS-EXTERNAL] Multipart.getCount/0, Multipart.getBodyPart/1, BodyPart.getFileName/0, BodyPart.getHeader/1, BodyPart.... | /* static context
[FOCAL] static public List<BodyPart> MessageUtils.extractMessageAttachments(Log logger, Object content)
[PATH1] if(content instanceof Multipart)=T -> for(i < part.getCount())=T -> if(bodyPart.isMimeType("multipart/*"))=F -> if(contentId != null || fileName != null)=T -> exit loop -> return ret
[PATH2]... | /* static context
[FOCAL] static public List<BodyPart> MessageUtils.extractMessageAttachments(Log logger, Object content)
[PATH1] if(content instanceof Multipart)=T -> for(i < part.getCount())=T -> if(bodyPart.isMimeType("multipart/*"))=F -> if(contentId != null || fileName != null)=T -> exit loop -> return ret
[PATH2]... | true | ok | {"focal": {"class": "MessageUtils", "name": "extractMessageAttachments", "signature": "List<BodyPart> extractMessageAttachments(Log logger, Object content) throws MessagingException, IOException", "start_line": 3, "modifiers": "static public", "params": [{"name": "logger", "type": "Log"}, {"name": "content", "type": "O... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.